aclocal.m4 revision 5592a31f
13a925b30Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 245bc899bSmrg 345bc899bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 43a925b30Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 545bc899bSmrg# This file is free software; the Free Software Foundation 645bc899bSmrg# gives unlimited permission to copy and/or distribute it, 745bc899bSmrg# with or without modifications, as long as this notice is preserved. 845bc899bSmrg 945bc899bSmrg# This program is distributed in the hope that it will be useful, 1045bc899bSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1145bc899bSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1245bc899bSmrg# PARTICULAR PURPOSE. 1345bc899bSmrg 1450f2e948Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1550f2e948Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1650f2e948Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 1750f2e948Smrg[m4_warning([this file was generated for autoconf 2.63. 1850f2e948SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 1950f2e948SmrgIf you have problems, you may need to regenerate the build system entirely. 2050f2e948SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 2150f2e948Smrg 2245bc899bSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 235592a31fSmrg# 245592a31fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 255592a31fSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 265592a31fSmrg# Written by Gordon Matzigkeit, 1996 275592a31fSmrg# 285592a31fSmrg# This file is free software; the Free Software Foundation gives 295592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 305592a31fSmrg# modifications, as long as this notice is preserved. 315592a31fSmrg 325592a31fSmrgm4_define([_LT_COPYING], [dnl 335592a31fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 345592a31fSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 355592a31fSmrg# Written by Gordon Matzigkeit, 1996 365592a31fSmrg# 375592a31fSmrg# This file is part of GNU Libtool. 385592a31fSmrg# 395592a31fSmrg# GNU Libtool is free software; you can redistribute it and/or 405592a31fSmrg# modify it under the terms of the GNU General Public License as 415592a31fSmrg# published by the Free Software Foundation; either version 2 of 425592a31fSmrg# the License, or (at your option) any later version. 435592a31fSmrg# 445592a31fSmrg# As a special exception to the GNU General Public License, 455592a31fSmrg# if you distribute this file as part of a program or library that 465592a31fSmrg# is built using GNU Libtool, you may include this file under the 475592a31fSmrg# same distribution terms that you use for the rest of that program. 485592a31fSmrg# 495592a31fSmrg# GNU Libtool is distributed in the hope that it will be useful, 505592a31fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 515592a31fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 525592a31fSmrg# GNU General Public License for more details. 535592a31fSmrg# 545592a31fSmrg# You should have received a copy of the GNU General Public License 555592a31fSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 565592a31fSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 575592a31fSmrg# obtained by writing to the Free Software Foundation, Inc., 585592a31fSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 595592a31fSmrg]) 6045bc899bSmrg 615592a31fSmrg# serial 56 LT_INIT 621ac89addSmrg 631ac89addSmrg 645592a31fSmrg# LT_PREREQ(VERSION) 655592a31fSmrg# ------------------ 665592a31fSmrg# Complain and exit if this libtool version is less that VERSION. 675592a31fSmrgm4_defun([LT_PREREQ], 685592a31fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 695592a31fSmrg [m4_default([$3], 705592a31fSmrg [m4_fatal([Libtool version $1 or higher is required], 715592a31fSmrg 63)])], 725592a31fSmrg [$2])]) 7350f2e948Smrg 7450f2e948Smrg 755592a31fSmrg# _LT_CHECK_BUILDDIR 765592a31fSmrg# ------------------ 775592a31fSmrg# Complain if the absolute build directory name contains unusual characters 785592a31fSmrgm4_defun([_LT_CHECK_BUILDDIR], 795592a31fSmrg[case `pwd` in 805592a31fSmrg *\ * | *\ *) 815592a31fSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 825592a31fSmrgesac 835592a31fSmrg]) 845592a31fSmrg 855592a31fSmrg 865592a31fSmrg# LT_INIT([OPTIONS]) 875592a31fSmrg# ------------------ 885592a31fSmrgAC_DEFUN([LT_INIT], 895592a31fSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 905592a31fSmrgAC_BEFORE([$0], [LT_LANG])dnl 915592a31fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 925592a31fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 935592a31fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 945592a31fSmrg 955592a31fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 965592a31fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 975592a31fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 985592a31fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 995592a31fSmrgdnl unless we require an AC_DEFUNed macro: 1005592a31fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1015592a31fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1025592a31fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1035592a31fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1045592a31fSmrgm4_require([_LT_PROG_LTMAIN])dnl 1055592a31fSmrg 1065592a31fSmrgdnl Parse OPTIONS 1075592a31fSmrg_LT_SET_OPTIONS([$0], [$1]) 10845bc899bSmrg 10945bc899bSmrg# This can be used to rebuild libtool when needed 1105592a31fSmrgLIBTOOL_DEPS="$ltmain" 11145bc899bSmrg 11245bc899bSmrg# Always use our own libtool. 11345bc899bSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 11445bc899bSmrgAC_SUBST(LIBTOOL)dnl 11545bc899bSmrg 1165592a31fSmrg_LT_SETUP 11750f2e948Smrg 1185592a31fSmrg# Only expand once: 1195592a31fSmrgm4_define([LT_INIT]) 1205592a31fSmrg])# LT_INIT 12150f2e948Smrg 1225592a31fSmrg# Old names: 1235592a31fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1245592a31fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1255592a31fSmrgdnl aclocal-1.4 backwards compatibility: 1265592a31fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1275592a31fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1285592a31fSmrg 1295592a31fSmrg 1305592a31fSmrg# _LT_CC_BASENAME(CC) 1315592a31fSmrg# ------------------- 1325592a31fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1335592a31fSmrgm4_defun([_LT_CC_BASENAME], 1345592a31fSmrg[for cc_temp in $1""; do 1355592a31fSmrg case $cc_temp in 1365592a31fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1375592a31fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1385592a31fSmrg \-*) ;; 1395592a31fSmrg *) break;; 1405592a31fSmrg esac 1415592a31fSmrgdone 1425592a31fSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 1435592a31fSmrg]) 1445592a31fSmrg 1455592a31fSmrg 1465592a31fSmrg# _LT_FILEUTILS_DEFAULTS 1475592a31fSmrg# ---------------------- 1485592a31fSmrg# It is okay to use these file commands and assume they have been set 1495592a31fSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1505592a31fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1515592a31fSmrg[: ${CP="cp -f"} 1525592a31fSmrg: ${MV="mv -f"} 1535592a31fSmrg: ${RM="rm -f"} 1545592a31fSmrg])# _LT_FILEUTILS_DEFAULTS 1555592a31fSmrg 1565592a31fSmrg 1575592a31fSmrg# _LT_SETUP 1585592a31fSmrg# --------- 1595592a31fSmrgm4_defun([_LT_SETUP], 1605592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16145bc899bSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1625592a31fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1635592a31fSmrg_LT_DECL([], [host], [0])dnl 1645592a31fSmrg_LT_DECL([], [host_os], [0])dnl 1655592a31fSmrgdnl 1665592a31fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1675592a31fSmrg_LT_DECL([], [build], [0])dnl 1685592a31fSmrg_LT_DECL([], [build_os], [0])dnl 1695592a31fSmrgdnl 17045bc899bSmrgAC_REQUIRE([AC_PROG_CC])dnl 1715592a31fSmrgAC_REQUIRE([LT_PATH_LD])dnl 1725592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 1735592a31fSmrgdnl 17445bc899bSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1755592a31fSmrgtest -z "$LN_S" && LN_S="ln -s" 1765592a31fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 17745bc899bSmrgdnl 1785592a31fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1795592a31fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1805592a31fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1815592a31fSmrgdnl 1825592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1835592a31fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 1845592a31fSmrgm4_require([_LT_CMD_RELOAD])dnl 1855592a31fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 1865592a31fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 1875592a31fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 1885592a31fSmrg 1895592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([ 1905592a31fSmrg# See if we are running on zsh, and set the options which allow our 1915592a31fSmrg# commands through without removal of \ escapes INIT. 1925592a31fSmrgif test -n "\${ZSH_VERSION+set}" ; then 1935592a31fSmrg setopt NO_GLOB_SUBST 1945592a31fSmrgfi 1955592a31fSmrg]) 1965592a31fSmrgif test -n "${ZSH_VERSION+set}" ; then 1975592a31fSmrg setopt NO_GLOB_SUBST 1985592a31fSmrgfi 19945bc899bSmrg 2005592a31fSmrg_LT_CHECK_OBJDIR 2015592a31fSmrg 2025592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 2035592a31fSmrg_LT_PROG_ECHO_BACKSLASH 20445bc899bSmrg 20545bc899bSmrgcase $host_os in 20645bc899bSmrgaix3*) 20745bc899bSmrg # AIX sometimes has problems with the GCC collect2 program. For some 20845bc899bSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 20945bc899bSmrg # vanish in a puff of smoke. 21045bc899bSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 21145bc899bSmrg COLLECT_NAMES= 21245bc899bSmrg export COLLECT_NAMES 21345bc899bSmrg fi 21445bc899bSmrg ;; 21545bc899bSmrgesac 21645bc899bSmrg 21745bc899bSmrg# Sed substitution that helps us do robust quoting. It backslashifies 21845bc899bSmrg# metacharacters that are still active within double-quoted strings. 2195592a31fSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 22045bc899bSmrg 22145bc899bSmrg# Same as above, but do not quote variable references. 2225592a31fSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 22345bc899bSmrg 22445bc899bSmrg# Sed substitution to delay expansion of an escaped shell variable in a 22545bc899bSmrg# double_quote_subst'ed string. 22645bc899bSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 22745bc899bSmrg 2285592a31fSmrg# Sed substitution to delay expansion of an escaped single quote. 2295592a31fSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2305592a31fSmrg 23145bc899bSmrg# Sed substitution to avoid accidental globbing in evaled expressions 23245bc899bSmrgno_glob_subst='s/\*/\\\*/g' 23345bc899bSmrg 23445bc899bSmrg# Global variables: 2355592a31fSmrgofile=libtool 23645bc899bSmrgcan_build_shared=yes 23745bc899bSmrg 23845bc899bSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 23945bc899bSmrg# which needs '.lib'). 24045bc899bSmrglibext=a 241226fade8Smrg 2425592a31fSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2433a925b30Smrg 24445bc899bSmrgold_CC="$CC" 24545bc899bSmrgold_CFLAGS="$CFLAGS" 24645bc899bSmrg 24745bc899bSmrg# Set sane defaults for various variables 24845bc899bSmrgtest -z "$CC" && CC=cc 24945bc899bSmrgtest -z "$LTCC" && LTCC=$CC 25045bc899bSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 25145bc899bSmrgtest -z "$LD" && LD=ld 25245bc899bSmrgtest -z "$ac_objext" && ac_objext=o 25345bc899bSmrg 25445bc899bSmrg_LT_CC_BASENAME([$compiler]) 25545bc899bSmrg 25645bc899bSmrg# Only perform the check for file, if the check method requires it 2575592a31fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 25845bc899bSmrgcase $deplibs_check_method in 25945bc899bSmrgfile_magic*) 26045bc899bSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2615592a31fSmrg _LT_PATH_MAGIC 26245bc899bSmrg fi 26345bc899bSmrg ;; 26445bc899bSmrgesac 26545bc899bSmrg 2665592a31fSmrg# Use C for the default configuration in the libtool script 2675592a31fSmrgLT_SUPPORTED_TAG([CC]) 2685592a31fSmrg_LT_LANG_C_CONFIG 2695592a31fSmrg_LT_LANG_DEFAULT_CONFIG 2705592a31fSmrg_LT_CONFIG_COMMANDS 2715592a31fSmrg])# _LT_SETUP 27250f2e948Smrg 27350f2e948Smrg 2745592a31fSmrg# _LT_PROG_LTMAIN 2755592a31fSmrg# --------------- 2765592a31fSmrg# Note that this code is called both from `configure', and `config.status' 2775592a31fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2785592a31fSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2795592a31fSmrg# so we pass a copy along to make sure it has a sensible value anyway. 2805592a31fSmrgm4_defun([_LT_PROG_LTMAIN], 2815592a31fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 2825592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 2835592a31fSmrgltmain="$ac_aux_dir/ltmain.sh" 2845592a31fSmrg])# _LT_PROG_LTMAIN 28550f2e948Smrg 28650f2e948Smrg 2875592a31fSmrg 2885592a31fSmrg# So that we can recreate a full libtool script including additional 2895592a31fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 2905592a31fSmrg# in macros and then make a single call at the end using the `libtool' 2915592a31fSmrg# label. 2925592a31fSmrg 2935592a31fSmrg 2945592a31fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 2955592a31fSmrg# ---------------------------------------- 2965592a31fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 2975592a31fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 2985592a31fSmrg[m4_ifval([$1], 2995592a31fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3005592a31fSmrg [$1 3015592a31fSmrg])])]) 3025592a31fSmrg 3035592a31fSmrg# Initialize. 3045592a31fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3055592a31fSmrg 3065592a31fSmrg 3075592a31fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3085592a31fSmrg# ------------------------------ 3095592a31fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3105592a31fSmrgm4_define([_LT_CONFIG_LIBTOOL], 3115592a31fSmrg[m4_ifval([$1], 3125592a31fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3135592a31fSmrg [$1 3145592a31fSmrg])])]) 3155592a31fSmrg 3165592a31fSmrg# Initialize. 3175592a31fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3185592a31fSmrg 3195592a31fSmrg 3205592a31fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3215592a31fSmrg# ----------------------------------------------------- 3225592a31fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3235592a31fSmrg[_LT_CONFIG_LIBTOOL([$1]) 3245592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3255592a31fSmrg]) 3265592a31fSmrg 3275592a31fSmrg 3285592a31fSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3295592a31fSmrg# ----------------------------- 3305592a31fSmrg# Add leading comment marks to the start of each line, and a trailing 3315592a31fSmrg# full-stop to the whole comment if one is not present already. 3325592a31fSmrgm4_define([_LT_FORMAT_COMMENT], 3335592a31fSmrg[m4_ifval([$1], [ 3345592a31fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3355592a31fSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3365592a31fSmrg)]) 3375592a31fSmrg 3385592a31fSmrg 3395592a31fSmrg 3405592a31fSmrg 3415592a31fSmrg 3425592a31fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3435592a31fSmrg# ------------------------------------------------------------------- 3445592a31fSmrg# CONFIGNAME is the name given to the value in the libtool script. 3455592a31fSmrg# VARNAME is the (base) name used in the configure script. 3465592a31fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3475592a31fSmrg# VARNAME. Any other value will be used directly. 3485592a31fSmrgm4_define([_LT_DECL], 3495592a31fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3505592a31fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3515592a31fSmrg [m4_ifval([$1], [$1], [$2])]) 3525592a31fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3535592a31fSmrg m4_ifval([$4], 3545592a31fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3555592a31fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3565592a31fSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3575592a31fSmrg]) 3585592a31fSmrg 3595592a31fSmrg 3605592a31fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3615592a31fSmrg# -------------------------------------------------------- 3625592a31fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3635592a31fSmrg 3645592a31fSmrg 3655592a31fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3665592a31fSmrg# ------------------------------------------------ 3675592a31fSmrgm4_define([lt_decl_tag_varnames], 3685592a31fSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3695592a31fSmrg 3705592a31fSmrg 3715592a31fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3725592a31fSmrg# --------------------------------------------------------- 3735592a31fSmrgm4_define([_lt_decl_filter], 3745592a31fSmrg[m4_case([$#], 3755592a31fSmrg [0], [m4_fatal([$0: too few arguments: $#])], 3765592a31fSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3775592a31fSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3785592a31fSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3795592a31fSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3805592a31fSmrg]) 3815592a31fSmrg 3825592a31fSmrg 3835592a31fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 3845592a31fSmrg# -------------------------------------------------- 3855592a31fSmrgm4_define([lt_decl_quote_varnames], 3865592a31fSmrg[_lt_decl_filter([value], [1], $@)]) 3875592a31fSmrg 3885592a31fSmrg 3895592a31fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 3905592a31fSmrg# --------------------------------------------------- 3915592a31fSmrgm4_define([lt_decl_dquote_varnames], 3925592a31fSmrg[_lt_decl_filter([value], [2], $@)]) 3935592a31fSmrg 3945592a31fSmrg 3955592a31fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 3965592a31fSmrg# --------------------------------------------------- 3975592a31fSmrgm4_define([lt_decl_varnames_tagged], 3985592a31fSmrg[m4_assert([$# <= 2])dnl 3995592a31fSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 4005592a31fSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4015592a31fSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4025592a31fSmrgm4_define([_lt_decl_varnames_tagged], 4035592a31fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4045592a31fSmrg 4055592a31fSmrg 4065592a31fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4075592a31fSmrg# ------------------------------------------------ 4085592a31fSmrgm4_define([lt_decl_all_varnames], 4095592a31fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4105592a31fSmrg m4_if([$2], [], 4115592a31fSmrg m4_quote(lt_decl_varnames), 4125592a31fSmrg m4_quote(m4_shift($@))))[]dnl 4135592a31fSmrg]) 4145592a31fSmrgm4_define([_lt_decl_all_varnames], 4155592a31fSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 4165592a31fSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4175592a31fSmrg]) 4185592a31fSmrg 4195592a31fSmrg 4205592a31fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4215592a31fSmrg# ------------------------------------ 4225592a31fSmrg# Quote a variable value, and forward it to `config.status' so that its 4235592a31fSmrg# declaration there will have the same value as in `configure'. VARNAME 4245592a31fSmrg# must have a single quote delimited value for this to work. 4255592a31fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4265592a31fSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 4275592a31fSmrg 4285592a31fSmrg 4295592a31fSmrg# _LT_CONFIG_STATUS_DECLARATIONS 4305592a31fSmrg# ------------------------------ 4315592a31fSmrg# We delimit libtool config variables with single quotes, so when 4325592a31fSmrg# we write them to config.status, we have to be sure to quote all 4335592a31fSmrg# embedded single quotes properly. In configure, this macro expands 4345592a31fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4355592a31fSmrg# 4365592a31fSmrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 4375592a31fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4385592a31fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4395592a31fSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4405592a31fSmrg 4415592a31fSmrg 4425592a31fSmrg# _LT_LIBTOOL_TAGS 4435592a31fSmrg# ---------------- 4445592a31fSmrg# Output comment and list of tags supported by the script 4455592a31fSmrgm4_defun([_LT_LIBTOOL_TAGS], 4465592a31fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4475592a31fSmrgavailable_tags="_LT_TAGS"dnl 4485592a31fSmrg]) 4495592a31fSmrg 4505592a31fSmrg 4515592a31fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4525592a31fSmrg# ----------------------------------- 4535592a31fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4545592a31fSmrg# expand to a commented shell variable setting: 4555592a31fSmrg# 4565592a31fSmrg# # Some comment about what VAR is for. 4575592a31fSmrg# visible_name=$lt_internal_name 4585592a31fSmrgm4_define([_LT_LIBTOOL_DECLARE], 4595592a31fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4605592a31fSmrg [description])))[]dnl 4615592a31fSmrgm4_pushdef([_libtool_name], 4625592a31fSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4635592a31fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4645592a31fSmrg [0], [_libtool_name=[$]$1], 4655592a31fSmrg [1], [_libtool_name=$lt_[]$1], 4665592a31fSmrg [2], [_libtool_name=$lt_[]$1], 4675592a31fSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4685592a31fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4695592a31fSmrg]) 4705592a31fSmrg 4715592a31fSmrg 4725592a31fSmrg# _LT_LIBTOOL_CONFIG_VARS 4735592a31fSmrg# ----------------------- 4745592a31fSmrg# Produce commented declarations of non-tagged libtool config variables 4755592a31fSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4765592a31fSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4775592a31fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4785592a31fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4795592a31fSmrg[m4_foreach([_lt_var], 4805592a31fSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4815592a31fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 4825592a31fSmrg 4835592a31fSmrg 4845592a31fSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 4855592a31fSmrg# ------------------------- 4865592a31fSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 4875592a31fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 4885592a31fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 48950f2e948Smrg 49050f2e948Smrg 4915592a31fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 4925592a31fSmrg# ------------------------------ 4935592a31fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 4945592a31fSmrg 4955592a31fSmrg 4965592a31fSmrg# _LT_CONFIG_COMMANDS 49750f2e948Smrg# ------------------- 4985592a31fSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 4995592a31fSmrg# variables for single and double quote escaping we saved from calls 5005592a31fSmrg# to _LT_DECL, we can put quote escaped variables declarations 5015592a31fSmrg# into `config.status', and then the shell code to quote escape them in 5025592a31fSmrg# for loops in `config.status'. Finally, any additional code accumulated 5035592a31fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5045592a31fSmrgm4_defun([_LT_CONFIG_COMMANDS], 5055592a31fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5065592a31fSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5075592a31fSmrg dnl instead of duplicating it all over again into config.status, 5085592a31fSmrg dnl then we will have config.status run $CONFIG_LT later, so it 5095592a31fSmrg dnl needs to know what name is stored there: 5105592a31fSmrg [AC_CONFIG_COMMANDS([libtool], 5115592a31fSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5125592a31fSmrg dnl If the libtool generation code is destined for config.status, 5135592a31fSmrg dnl expand the accumulated commands and init code now: 5145592a31fSmrg [AC_CONFIG_COMMANDS([libtool], 5155592a31fSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5165592a31fSmrg])#_LT_CONFIG_COMMANDS 5175592a31fSmrg 5185592a31fSmrg 5195592a31fSmrg# Initialize. 5205592a31fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5215592a31fSmrg[ 5225592a31fSmrg 5235592a31fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5245592a31fSmrg# if CDPATH is set. 5255592a31fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5265592a31fSmrg 5275592a31fSmrgsed_quote_subst='$sed_quote_subst' 5285592a31fSmrgdouble_quote_subst='$double_quote_subst' 5295592a31fSmrgdelay_variable_subst='$delay_variable_subst' 5305592a31fSmrg_LT_CONFIG_STATUS_DECLARATIONS 5315592a31fSmrgLTCC='$LTCC' 5325592a31fSmrgLTCFLAGS='$LTCFLAGS' 5335592a31fSmrgcompiler='$compiler_DEFAULT' 5345592a31fSmrg 5355592a31fSmrg# Quote evaled strings. 5365592a31fSmrgfor var in lt_decl_all_varnames([[ \ 5375592a31fSmrg]], lt_decl_quote_varnames); do 5385592a31fSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 5395592a31fSmrg *[[\\\\\\\`\\"\\\$]]*) 5405592a31fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5415592a31fSmrg ;; 5425592a31fSmrg *) 5435592a31fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5445592a31fSmrg ;; 5455592a31fSmrg esac 5465592a31fSmrgdone 5475592a31fSmrg 5485592a31fSmrg# Double-quote double-evaled strings. 5495592a31fSmrgfor var in lt_decl_all_varnames([[ \ 5505592a31fSmrg]], lt_decl_dquote_varnames); do 5515592a31fSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 5525592a31fSmrg *[[\\\\\\\`\\"\\\$]]*) 5535592a31fSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5545592a31fSmrg ;; 5555592a31fSmrg *) 5565592a31fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5575592a31fSmrg ;; 5585592a31fSmrg esac 5595592a31fSmrgdone 5605592a31fSmrg 5615592a31fSmrg# Fix-up fallback echo if it was mangled by the above quoting rules. 5625592a31fSmrgcase \$lt_ECHO in 5635592a31fSmrg*'\\\[$]0 --fallback-echo"')dnl " 5645592a31fSmrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 5655592a31fSmrg ;; 5665592a31fSmrgesac 5675592a31fSmrg 5685592a31fSmrg_LT_OUTPUT_LIBTOOL_INIT 5695592a31fSmrg]) 5705592a31fSmrg 5715592a31fSmrg 5725592a31fSmrg# LT_OUTPUT 5735592a31fSmrg# --------- 5745592a31fSmrg# This macro allows early generation of the libtool script (before 5755592a31fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 5765592a31fSmrg# tests. 5775592a31fSmrgAC_DEFUN([LT_OUTPUT], 5785592a31fSmrg[: ${CONFIG_LT=./config.lt} 5795592a31fSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 5805592a31fSmrgcat >"$CONFIG_LT" <<_LTEOF 5815592a31fSmrg#! $SHELL 5825592a31fSmrg# Generated by $as_me. 5835592a31fSmrg# Run this file to recreate a libtool stub with the current configuration. 5845592a31fSmrg 5855592a31fSmrglt_cl_silent=false 5865592a31fSmrgSHELL=\${CONFIG_SHELL-$SHELL} 5875592a31fSmrg_LTEOF 5885592a31fSmrg 5895592a31fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 5905592a31fSmrgAS_SHELL_SANITIZE 5915592a31fSmrg_AS_PREPARE 5925592a31fSmrg 5935592a31fSmrgexec AS_MESSAGE_FD>&1 5945592a31fSmrgexec AS_MESSAGE_LOG_FD>>config.log 5955592a31fSmrg{ 5965592a31fSmrg echo 5975592a31fSmrg AS_BOX([Running $as_me.]) 5985592a31fSmrg} >&AS_MESSAGE_LOG_FD 5995592a31fSmrg 6005592a31fSmrglt_cl_help="\ 6015592a31fSmrg\`$as_me' creates a local libtool stub from the current configuration, 6025592a31fSmrgfor use in further configure time tests before the real libtool is 6035592a31fSmrggenerated. 6045592a31fSmrg 6055592a31fSmrgUsage: $[0] [[OPTIONS]] 6065592a31fSmrg 6075592a31fSmrg -h, --help print this help, then exit 6085592a31fSmrg -V, --version print version number, then exit 6095592a31fSmrg -q, --quiet do not print progress messages 6105592a31fSmrg -d, --debug don't remove temporary files 6115592a31fSmrg 6125592a31fSmrgReport bugs to <bug-libtool@gnu.org>." 6135592a31fSmrg 6145592a31fSmrglt_cl_version="\ 6155592a31fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6165592a31fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6175592a31fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6185592a31fSmrg 6195592a31fSmrgCopyright (C) 2008 Free Software Foundation, Inc. 6205592a31fSmrgThis config.lt script is free software; the Free Software Foundation 6215592a31fSmrggives unlimited permision to copy, distribute and modify it." 6225592a31fSmrg 6235592a31fSmrgwhile test $[#] != 0 6245592a31fSmrgdo 6255592a31fSmrg case $[1] in 6265592a31fSmrg --version | --v* | -V ) 6275592a31fSmrg echo "$lt_cl_version"; exit 0 ;; 6285592a31fSmrg --help | --h* | -h ) 6295592a31fSmrg echo "$lt_cl_help"; exit 0 ;; 6305592a31fSmrg --debug | --d* | -d ) 6315592a31fSmrg debug=: ;; 6325592a31fSmrg --quiet | --q* | --silent | --s* | -q ) 6335592a31fSmrg lt_cl_silent=: ;; 6345592a31fSmrg 6355592a31fSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6365592a31fSmrgTry \`$[0] --help' for more information.]) ;; 6375592a31fSmrg 6385592a31fSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6395592a31fSmrgTry \`$[0] --help' for more information.]) ;; 6405592a31fSmrg esac 6415592a31fSmrg shift 6425592a31fSmrgdone 6435592a31fSmrg 6445592a31fSmrgif $lt_cl_silent; then 6455592a31fSmrg exec AS_MESSAGE_FD>/dev/null 6465592a31fSmrgfi 6475592a31fSmrg_LTEOF 6485592a31fSmrg 6495592a31fSmrgcat >>"$CONFIG_LT" <<_LTEOF 6505592a31fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6515592a31fSmrg_LTEOF 6525592a31fSmrg 6535592a31fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 6545592a31fSmrgAC_MSG_NOTICE([creating $ofile]) 6555592a31fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 6565592a31fSmrgAS_EXIT(0) 6575592a31fSmrg_LTEOF 6585592a31fSmrgchmod +x "$CONFIG_LT" 6595592a31fSmrg 6605592a31fSmrg# configure is writing to config.log, but config.lt does its own redirection, 6615592a31fSmrg# appending to config.log, which fails on DOS, as config.log is still kept 6625592a31fSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 6635592a31fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 6645592a31fSmrgif test "$no_create" != yes; then 6655592a31fSmrg lt_cl_success=: 6665592a31fSmrg test "$silent" = yes && 6675592a31fSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 6685592a31fSmrg exec AS_MESSAGE_LOG_FD>/dev/null 6695592a31fSmrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 6705592a31fSmrg exec AS_MESSAGE_LOG_FD>>config.log 6715592a31fSmrg $lt_cl_success || AS_EXIT(1) 6725592a31fSmrgfi 6735592a31fSmrg])# LT_OUTPUT 6745592a31fSmrg 6755592a31fSmrg 6765592a31fSmrg# _LT_CONFIG(TAG) 6775592a31fSmrg# --------------- 6785592a31fSmrg# If TAG is the built-in tag, create an initial libtool script with a 6795592a31fSmrg# default configuration from the untagged config vars. Otherwise add code 6805592a31fSmrg# to config.status for appending the configuration named by TAG from the 6815592a31fSmrg# matching tagged config vars. 6825592a31fSmrgm4_defun([_LT_CONFIG], 6835592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6845592a31fSmrg_LT_CONFIG_SAVE_COMMANDS([ 6855592a31fSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 6865592a31fSmrg m4_if(_LT_TAG, [C], [ 6875592a31fSmrg # See if we are running on zsh, and set the options which allow our 6885592a31fSmrg # commands through without removal of \ escapes. 6895592a31fSmrg if test -n "${ZSH_VERSION+set}" ; then 6905592a31fSmrg setopt NO_GLOB_SUBST 6915592a31fSmrg fi 6925592a31fSmrg 6935592a31fSmrg cfgfile="${ofile}T" 6945592a31fSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 6955592a31fSmrg $RM "$cfgfile" 6965592a31fSmrg 6975592a31fSmrg cat <<_LT_EOF >> "$cfgfile" 6985592a31fSmrg#! $SHELL 6995592a31fSmrg 7005592a31fSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7015592a31fSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7025592a31fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7035592a31fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7045592a31fSmrg# 7055592a31fSmrg_LT_COPYING 7065592a31fSmrg_LT_LIBTOOL_TAGS 7075592a31fSmrg 7085592a31fSmrg# ### BEGIN LIBTOOL CONFIG 7095592a31fSmrg_LT_LIBTOOL_CONFIG_VARS 7105592a31fSmrg_LT_LIBTOOL_TAG_VARS 7115592a31fSmrg# ### END LIBTOOL CONFIG 7125592a31fSmrg 7135592a31fSmrg_LT_EOF 7145592a31fSmrg 7155592a31fSmrg case $host_os in 7165592a31fSmrg aix3*) 7175592a31fSmrg cat <<\_LT_EOF >> "$cfgfile" 7185592a31fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 7195592a31fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7205592a31fSmrg# vanish in a puff of smoke. 7215592a31fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 7225592a31fSmrg COLLECT_NAMES= 7235592a31fSmrg export COLLECT_NAMES 7245592a31fSmrgfi 7255592a31fSmrg_LT_EOF 7265592a31fSmrg ;; 7275592a31fSmrg esac 7285592a31fSmrg 7295592a31fSmrg _LT_PROG_LTMAIN 7305592a31fSmrg 7315592a31fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 7325592a31fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7335592a31fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 7345592a31fSmrg # is reportedly fixed, but why not run on old versions too? 7355592a31fSmrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 7365592a31fSmrg || (rm -f "$cfgfile"; exit 1) 7375592a31fSmrg 7385592a31fSmrg _LT_PROG_XSI_SHELLFNS 7395592a31fSmrg 7405592a31fSmrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 7415592a31fSmrg || (rm -f "$cfgfile"; exit 1) 7425592a31fSmrg 7435592a31fSmrg mv -f "$cfgfile" "$ofile" || 7445592a31fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7455592a31fSmrg chmod +x "$ofile" 7465592a31fSmrg], 7475592a31fSmrg[cat <<_LT_EOF >> "$ofile" 7485592a31fSmrg 7495592a31fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7505592a31fSmrgdnl in a comment (ie after a #). 7515592a31fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7525592a31fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7535592a31fSmrg# ### END LIBTOOL TAG CONFIG: $1 7545592a31fSmrg_LT_EOF 7555592a31fSmrg])dnl /m4_if 7565592a31fSmrg], 7575592a31fSmrg[m4_if([$1], [], [ 7585592a31fSmrg PACKAGE='$PACKAGE' 7595592a31fSmrg VERSION='$VERSION' 7605592a31fSmrg TIMESTAMP='$TIMESTAMP' 7615592a31fSmrg RM='$RM' 7625592a31fSmrg ofile='$ofile'], []) 7635592a31fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7645592a31fSmrg])# _LT_CONFIG 7655592a31fSmrg 7665592a31fSmrg 7675592a31fSmrg# LT_SUPPORTED_TAG(TAG) 7685592a31fSmrg# --------------------- 7695592a31fSmrg# Trace this macro to discover what tags are supported by the libtool 7705592a31fSmrg# --tag option, using: 7715592a31fSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 7725592a31fSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 7735592a31fSmrg 7745592a31fSmrg 7755592a31fSmrg# C support is built-in for now 7765592a31fSmrgm4_define([_LT_LANG_C_enabled], []) 7775592a31fSmrgm4_define([_LT_TAGS], []) 7785592a31fSmrg 7795592a31fSmrg 7805592a31fSmrg# LT_LANG(LANG) 7815592a31fSmrg# ------------- 7825592a31fSmrg# Enable libtool support for the given language if not already enabled. 7835592a31fSmrgAC_DEFUN([LT_LANG], 7845592a31fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 7855592a31fSmrgm4_case([$1], 7865592a31fSmrg [C], [_LT_LANG(C)], 7875592a31fSmrg [C++], [_LT_LANG(CXX)], 7885592a31fSmrg [Java], [_LT_LANG(GCJ)], 7895592a31fSmrg [Fortran 77], [_LT_LANG(F77)], 7905592a31fSmrg [Fortran], [_LT_LANG(FC)], 7915592a31fSmrg [Windows Resource], [_LT_LANG(RC)], 7925592a31fSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 7935592a31fSmrg [_LT_LANG($1)], 7945592a31fSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 7955592a31fSmrg])# LT_LANG 7965592a31fSmrg 7975592a31fSmrg 7985592a31fSmrg# _LT_LANG(LANGNAME) 7995592a31fSmrg# ------------------ 8005592a31fSmrgm4_defun([_LT_LANG], 8015592a31fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8025592a31fSmrg [LT_SUPPORTED_TAG([$1])dnl 8035592a31fSmrg m4_append([_LT_TAGS], [$1 ])dnl 8045592a31fSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8055592a31fSmrg _LT_LANG_$1_CONFIG($1)])dnl 8065592a31fSmrg])# _LT_LANG 8075592a31fSmrg 8085592a31fSmrg 8095592a31fSmrg# _LT_LANG_DEFAULT_CONFIG 8105592a31fSmrg# ----------------------- 8115592a31fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8125592a31fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8135592a31fSmrg [LT_LANG(CXX)], 8145592a31fSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8155592a31fSmrg 8165592a31fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8175592a31fSmrg [LT_LANG(F77)], 8185592a31fSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8195592a31fSmrg 8205592a31fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8215592a31fSmrg [LT_LANG(FC)], 8225592a31fSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8235592a31fSmrg 8245592a31fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8255592a31fSmrgdnl pulling things in needlessly. 8265592a31fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8275592a31fSmrg [LT_LANG(GCJ)], 8285592a31fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8295592a31fSmrg [LT_LANG(GCJ)], 8305592a31fSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8315592a31fSmrg [LT_LANG(GCJ)], 8325592a31fSmrg [m4_ifdef([AC_PROG_GCJ], 8335592a31fSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8345592a31fSmrg m4_ifdef([A][M_PROG_GCJ], 8355592a31fSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8365592a31fSmrg m4_ifdef([LT_PROG_GCJ], 8375592a31fSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8385592a31fSmrg 8395592a31fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 8405592a31fSmrg [LT_LANG(RC)], 8415592a31fSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 8425592a31fSmrg])# _LT_LANG_DEFAULT_CONFIG 8435592a31fSmrg 8445592a31fSmrg# Obsolete macros: 8455592a31fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 8465592a31fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 8475592a31fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 8485592a31fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 8495592a31fSmrgdnl aclocal-1.4 backwards compatibility: 8505592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 8515592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 8525592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 8535592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 8545592a31fSmrg 8555592a31fSmrg 8565592a31fSmrg# _LT_TAG_COMPILER 8575592a31fSmrg# ---------------- 8585592a31fSmrgm4_defun([_LT_TAG_COMPILER], 85950f2e948Smrg[AC_REQUIRE([AC_PROG_CC])dnl 86045bc899bSmrg 8615592a31fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 8625592a31fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 8635592a31fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 8645592a31fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 8655592a31fSmrg 86650f2e948Smrg# If no C compiler was specified, use CC. 86750f2e948SmrgLTCC=${LTCC-"$CC"} 868226fade8Smrg 86950f2e948Smrg# If no C compiler flags were specified, use CFLAGS. 87050f2e948SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 871226fade8Smrg 87250f2e948Smrg# Allow CC to be a program name with arguments. 87350f2e948Smrgcompiler=$CC 8745592a31fSmrg])# _LT_TAG_COMPILER 875226fade8Smrg 87645bc899bSmrg 87750f2e948Smrg# _LT_COMPILER_BOILERPLATE 87850f2e948Smrg# ------------------------ 87950f2e948Smrg# Check for compiler boilerplate output or warnings with 88050f2e948Smrg# the simple compiler test code. 8815592a31fSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 8825592a31fSmrg[m4_require([_LT_DECL_SED])dnl 88350f2e948Smrgac_outfile=conftest.$ac_objext 88450f2e948Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 88550f2e948Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 88650f2e948Smrg_lt_compiler_boilerplate=`cat conftest.err` 8875592a31fSmrg$RM conftest* 88850f2e948Smrg])# _LT_COMPILER_BOILERPLATE 88945bc899bSmrg 89045bc899bSmrg 89150f2e948Smrg# _LT_LINKER_BOILERPLATE 89250f2e948Smrg# ---------------------- 89350f2e948Smrg# Check for linker boilerplate output or warnings with 89450f2e948Smrg# the simple link test code. 8955592a31fSmrgm4_defun([_LT_LINKER_BOILERPLATE], 8965592a31fSmrg[m4_require([_LT_DECL_SED])dnl 89750f2e948Smrgac_outfile=conftest.$ac_objext 89850f2e948Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 89950f2e948Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 90050f2e948Smrg_lt_linker_boilerplate=`cat conftest.err` 9015592a31fSmrg$RM -r conftest* 90250f2e948Smrg])# _LT_LINKER_BOILERPLATE 90345bc899bSmrg 90450f2e948Smrg# _LT_REQUIRED_DARWIN_CHECKS 9055592a31fSmrg# ------------------------- 9065592a31fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 90750f2e948Smrg case $host_os in 90850f2e948Smrg rhapsody* | darwin*) 90950f2e948Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 91050f2e948Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9115592a31fSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9125592a31fSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9135592a31fSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9145592a31fSmrg _LT_DECL([], [DSYMUTIL], [1], 9155592a31fSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9165592a31fSmrg _LT_DECL([], [NMEDIT], [1], 9175592a31fSmrg [Tool to change global to local symbols on Mac OS X]) 9185592a31fSmrg _LT_DECL([], [LIPO], [1], 9195592a31fSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 9205592a31fSmrg _LT_DECL([], [OTOOL], [1], 9215592a31fSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9225592a31fSmrg _LT_DECL([], [OTOOL64], [1], 9235592a31fSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 92450f2e948Smrg 92550f2e948Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 92650f2e948Smrg [lt_cv_apple_cc_single_mod=no 92750f2e948Smrg if test -z "${LT_MULTI_MODULE}"; then 9285592a31fSmrg # By default we will add the -single_module flag. You can override 9295592a31fSmrg # by either setting the environment variable LT_MULTI_MODULE 9305592a31fSmrg # non-empty at configure time, or by adding -multi_module to the 9315592a31fSmrg # link flags. 9325592a31fSmrg rm -rf libconftest.dylib* 9335592a31fSmrg echo "int foo(void){return 1;}" > conftest.c 9345592a31fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9355592a31fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 9365592a31fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9375592a31fSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 9385592a31fSmrg _lt_result=$? 9395592a31fSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 9405592a31fSmrg lt_cv_apple_cc_single_mod=yes 9415592a31fSmrg else 9425592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 9435592a31fSmrg fi 9445592a31fSmrg rm -rf libconftest.dylib* 9455592a31fSmrg rm -f conftest.* 94650f2e948Smrg fi]) 94750f2e948Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 94850f2e948Smrg [lt_cv_ld_exported_symbols_list], 94950f2e948Smrg [lt_cv_ld_exported_symbols_list=no 95050f2e948Smrg save_LDFLAGS=$LDFLAGS 95150f2e948Smrg echo "_main" > conftest.sym 95250f2e948Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 95350f2e948Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 9545592a31fSmrg [lt_cv_ld_exported_symbols_list=yes], 9555592a31fSmrg [lt_cv_ld_exported_symbols_list=no]) 9565592a31fSmrg LDFLAGS="$save_LDFLAGS" 957226fade8Smrg ]) 95850f2e948Smrg case $host_os in 9595592a31fSmrg rhapsody* | darwin1.[[012]]) 96050f2e948Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 96150f2e948Smrg darwin1.*) 9625592a31fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 9635592a31fSmrg darwin*) # darwin 5.x on 96450f2e948Smrg # if running on 10.5 or later, the deployment target defaults 96550f2e948Smrg # to the OS version, if on x86, and 10.4, the deployment 96650f2e948Smrg # target defaults to 10.4. Don't you love it? 96750f2e948Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 9685592a31fSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 9695592a31fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 9705592a31fSmrg 10.[[012]]*) 9715592a31fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 9725592a31fSmrg 10.*) 9735592a31fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 97450f2e948Smrg esac 97550f2e948Smrg ;; 97650f2e948Smrg esac 97750f2e948Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 97850f2e948Smrg _lt_dar_single_mod='$single_module' 97950f2e948Smrg fi 98050f2e948Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 98150f2e948Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 98250f2e948Smrg else 9835592a31fSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 98450f2e948Smrg fi 98550f2e948Smrg if test "$DSYMUTIL" != ":"; then 9865592a31fSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 98750f2e948Smrg else 98850f2e948Smrg _lt_dsymutil= 989226fade8Smrg fi 990226fade8Smrg ;; 991226fade8Smrg esac 99250f2e948Smrg]) 9931ac89addSmrg 9945592a31fSmrg 9955592a31fSmrg# _LT_DARWIN_LINKER_FEATURES 9965592a31fSmrg# -------------------------- 9975592a31fSmrg# Checks for linker and compiler features on darwin 9985592a31fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 9995592a31fSmrg[ 10005592a31fSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 10015592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 10025592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 10035592a31fSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 10045592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 10055592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 10065592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 10075592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 10085592a31fSmrg case $cc_basename in 10095592a31fSmrg ifort*) _lt_dar_can_shared=yes ;; 10105592a31fSmrg *) _lt_dar_can_shared=$GCC ;; 10115592a31fSmrg esac 10125592a31fSmrg if test "$_lt_dar_can_shared" = "yes"; then 10135592a31fSmrg output_verbose_link_cmd=echo 10145592a31fSmrg _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}" 10155592a31fSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 10165592a31fSmrg _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}" 10175592a31fSmrg _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}" 10185592a31fSmrg m4_if([$1], [CXX], 10195592a31fSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 10205592a31fSmrg _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}" 10215592a31fSmrg _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}" 10225592a31fSmrg fi 10235592a31fSmrg],[]) 10245592a31fSmrg else 10255592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 10265592a31fSmrg fi 10275592a31fSmrg]) 10285592a31fSmrg 10295592a31fSmrg# _LT_SYS_MODULE_PATH_AIX 10305592a31fSmrg# ----------------------- 103150f2e948Smrg# Links a minimal program and checks the executable 103250f2e948Smrg# for the system default hardcoded library path. In most cases, 103350f2e948Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 103450f2e948Smrg# the location of the communication and MPI libs are included too. 103550f2e948Smrg# If we don't find anything, use the default library path according 103650f2e948Smrg# to the aix ld manual. 10375592a31fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 10385592a31fSmrg[m4_require([_LT_DECL_SED])dnl 103950f2e948SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 104050f2e948Smrglt_aix_libpath_sed=' 104150f2e948Smrg /Import File Strings/,/^$/ { 104250f2e948Smrg /^0/ { 104350f2e948Smrg s/^0 *\(.*\)$/\1/ 104450f2e948Smrg p 104550f2e948Smrg } 104650f2e948Smrg }' 104750f2e948Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 104850f2e948Smrg# Check for a 64-bit object if we didn't find anything. 104950f2e948Smrgif test -z "$aix_libpath"; then 105050f2e948Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 105150f2e948Smrgfi],[]) 105250f2e948Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 10535592a31fSmrg])# _LT_SYS_MODULE_PATH_AIX 105445bc899bSmrg 105545bc899bSmrg 10565592a31fSmrg# _LT_SHELL_INIT(ARG) 10575592a31fSmrg# ------------------- 10585592a31fSmrgm4_define([_LT_SHELL_INIT], 105950f2e948Smrg[ifdef([AC_DIVERSION_NOTICE], 106050f2e948Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 106150f2e948Smrg [AC_DIVERT_PUSH(NOTICE)]) 106250f2e948Smrg$1 106350f2e948SmrgAC_DIVERT_POP 10645592a31fSmrg])# _LT_SHELL_INIT 106545bc899bSmrg 1066226fade8Smrg 10675592a31fSmrg# _LT_PROG_ECHO_BACKSLASH 10685592a31fSmrg# ----------------------- 106950f2e948Smrg# Add some code to the start of the generated configure script which 107050f2e948Smrg# will find an echo command which doesn't interpret backslashes. 10715592a31fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 10725592a31fSmrg[_LT_SHELL_INIT([ 107350f2e948Smrg# Check that we are running under the correct shell. 107450f2e948SmrgSHELL=${CONFIG_SHELL-/bin/sh} 1075226fade8Smrg 10765592a31fSmrgcase X$lt_ECHO in 107750f2e948SmrgX*--fallback-echo) 107850f2e948Smrg # Remove one level of quotation (which was required for Make). 10795592a31fSmrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 108050f2e948Smrg ;; 108150f2e948Smrgesac 108250f2e948Smrg 10835592a31fSmrgECHO=${lt_ECHO-echo} 108450f2e948Smrgif test "X[$]1" = X--no-reexec; then 108550f2e948Smrg # Discard the --no-reexec flag, and continue. 108650f2e948Smrg shift 108750f2e948Smrgelif test "X[$]1" = X--fallback-echo; then 108850f2e948Smrg # Avoid inline document here, it may be left over 108950f2e948Smrg : 10905592a31fSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 10915592a31fSmrg # Yippee, $ECHO works! 109250f2e948Smrg : 10931ac89addSmrgelse 109450f2e948Smrg # Restart under the correct shell. 109550f2e948Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 10961ac89addSmrgfi 109745bc899bSmrg 109850f2e948Smrgif test "X[$]1" = X--fallback-echo; then 109950f2e948Smrg # used as fallback echo 110050f2e948Smrg shift 11015592a31fSmrg cat <<_LT_EOF 110250f2e948Smrg[$]* 11035592a31fSmrg_LT_EOF 110450f2e948Smrg exit 0 1105226fade8Smrgfi 11061ac89addSmrg 110750f2e948Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 110850f2e948Smrg# if CDPATH is set. 110950f2e948Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 11101ac89addSmrg 11115592a31fSmrgif test -z "$lt_ECHO"; then 11125592a31fSmrg if test "X${echo_test_string+set}" != Xset; then 11135592a31fSmrg # find a string as large as possible, as long as the shell can cope with it 11145592a31fSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 11155592a31fSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 11165592a31fSmrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 11175592a31fSmrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 11185592a31fSmrg then 11195592a31fSmrg break 11205592a31fSmrg fi 11215592a31fSmrg done 11225592a31fSmrg fi 11231ac89addSmrg 11245592a31fSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 11255592a31fSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 11265592a31fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11275592a31fSmrg : 11285592a31fSmrg else 11295592a31fSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 11305592a31fSmrg # backslashes. This makes it impossible to quote backslashes using 11315592a31fSmrg # echo "$something" | sed 's/\\/\\\\/g' 11325592a31fSmrg # 11335592a31fSmrg # So, first we look for a working echo in the user's PATH. 11341ac89addSmrg 11355592a31fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 11365592a31fSmrg for dir in $PATH /usr/ucb; do 11375592a31fSmrg IFS="$lt_save_ifs" 11385592a31fSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 11395592a31fSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 11405592a31fSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 11415592a31fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11425592a31fSmrg ECHO="$dir/echo" 11435592a31fSmrg break 11445592a31fSmrg fi 11455592a31fSmrg done 114650f2e948Smrg IFS="$lt_save_ifs" 11471ac89addSmrg 11485592a31fSmrg if test "X$ECHO" = Xecho; then 11495592a31fSmrg # We didn't find a better echo, so look for alternatives. 11505592a31fSmrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 11515592a31fSmrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 11525592a31fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11535592a31fSmrg # This shell has a builtin print -r that does the trick. 11545592a31fSmrg ECHO='print -r' 11555592a31fSmrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 11565592a31fSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 11575592a31fSmrg # If we have ksh, try running configure again with it. 11585592a31fSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 11595592a31fSmrg export ORIGINAL_CONFIG_SHELL 11605592a31fSmrg CONFIG_SHELL=/bin/ksh 11615592a31fSmrg export CONFIG_SHELL 11625592a31fSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 11633a925b30Smrg else 11645592a31fSmrg # Try using printf. 11655592a31fSmrg ECHO='printf %s\n' 11665592a31fSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 11675592a31fSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 11685592a31fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11695592a31fSmrg # Cool, printf works 11705592a31fSmrg : 11715592a31fSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 11725592a31fSmrg test "X$echo_testing_string" = 'X\t' && 11735592a31fSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 11745592a31fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11755592a31fSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 11765592a31fSmrg export CONFIG_SHELL 11775592a31fSmrg SHELL="$CONFIG_SHELL" 11785592a31fSmrg export SHELL 11795592a31fSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 11805592a31fSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 11815592a31fSmrg test "X$echo_testing_string" = 'X\t' && 11825592a31fSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 11835592a31fSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 11845592a31fSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 11855592a31fSmrg else 11865592a31fSmrg # maybe with a smaller string... 11875592a31fSmrg prev=: 11881ac89addSmrg 11895592a31fSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 11905592a31fSmrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 11915592a31fSmrg then 11925592a31fSmrg break 11935592a31fSmrg fi 11945592a31fSmrg prev="$cmd" 11955592a31fSmrg done 11963a925b30Smrg 11975592a31fSmrg if test "$prev" != 'sed 50q "[$]0"'; then 11985592a31fSmrg echo_test_string=`eval $prev` 11995592a31fSmrg export echo_test_string 12005592a31fSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 12015592a31fSmrg else 12025592a31fSmrg # Oops. We lost completely, so just stick with echo. 12035592a31fSmrg ECHO=echo 12045592a31fSmrg fi 12055592a31fSmrg fi 120650f2e948Smrg fi 120750f2e948Smrg fi 1208226fade8Smrg fi 1209226fade8Smrgfi 12101ac89addSmrg 121150f2e948Smrg# Copy echo and quote the copy suitably for passing to libtool from 121250f2e948Smrg# the Makefile, instead of quoting the original, which is used later. 12135592a31fSmrglt_ECHO=$ECHO 12145592a31fSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 12155592a31fSmrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 121650f2e948Smrgfi 121745bc899bSmrg 12185592a31fSmrgAC_SUBST(lt_ECHO) 12195592a31fSmrg]) 12205592a31fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12215592a31fSmrg_LT_DECL([], [ECHO], [1], 12225592a31fSmrg [An echo program that does not interpret backslashes]) 12235592a31fSmrg])# _LT_PROG_ECHO_BACKSLASH 122445bc899bSmrg 12251ac89addSmrg 12265592a31fSmrg# _LT_ENABLE_LOCK 12275592a31fSmrg# --------------- 12285592a31fSmrgm4_defun([_LT_ENABLE_LOCK], 122950f2e948Smrg[AC_ARG_ENABLE([libtool-lock], 12305592a31fSmrg [AS_HELP_STRING([--disable-libtool-lock], 12315592a31fSmrg [avoid locking (might break parallel builds)])]) 123250f2e948Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 123350f2e948Smrg 123450f2e948Smrg# Some flags need to be propagated to the compiler or linker for good 123550f2e948Smrg# libtool support. 123650f2e948Smrgcase $host in 123750f2e948Smrgia64-*-hpux*) 123850f2e948Smrg # Find out which ABI we are using. 123950f2e948Smrg echo 'int i;' > conftest.$ac_ext 124050f2e948Smrg if AC_TRY_EVAL(ac_compile); then 124150f2e948Smrg case `/usr/bin/file conftest.$ac_objext` in 12425592a31fSmrg *ELF-32*) 12435592a31fSmrg HPUX_IA64_MODE="32" 12445592a31fSmrg ;; 12455592a31fSmrg *ELF-64*) 12465592a31fSmrg HPUX_IA64_MODE="64" 12475592a31fSmrg ;; 1248226fade8Smrg esac 124950f2e948Smrg fi 125050f2e948Smrg rm -rf conftest* 125150f2e948Smrg ;; 125250f2e948Smrg*-*-irix6*) 125350f2e948Smrg # Find out which ABI we are using. 125450f2e948Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 125550f2e948Smrg if AC_TRY_EVAL(ac_compile); then 12565592a31fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 12575592a31fSmrg case `/usr/bin/file conftest.$ac_objext` in 12585592a31fSmrg *32-bit*) 12595592a31fSmrg LD="${LD-ld} -melf32bsmip" 12605592a31fSmrg ;; 12615592a31fSmrg *N32*) 12625592a31fSmrg LD="${LD-ld} -melf32bmipn32" 12635592a31fSmrg ;; 12645592a31fSmrg *64-bit*) 12655592a31fSmrg LD="${LD-ld} -melf64bmip" 12665592a31fSmrg ;; 12675592a31fSmrg esac 12685592a31fSmrg else 12695592a31fSmrg case `/usr/bin/file conftest.$ac_objext` in 12705592a31fSmrg *32-bit*) 12715592a31fSmrg LD="${LD-ld} -32" 12725592a31fSmrg ;; 12735592a31fSmrg *N32*) 12745592a31fSmrg LD="${LD-ld} -n32" 12755592a31fSmrg ;; 12765592a31fSmrg *64-bit*) 12775592a31fSmrg LD="${LD-ld} -64" 12785592a31fSmrg ;; 12795592a31fSmrg esac 12805592a31fSmrg fi 1281226fade8Smrg fi 128250f2e948Smrg rm -rf conftest* 1283226fade8Smrg ;; 128445bc899bSmrg 128550f2e948Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 12865592a31fSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 128750f2e948Smrg # Find out which ABI we are using. 128850f2e948Smrg echo 'int i;' > conftest.$ac_ext 128950f2e948Smrg if AC_TRY_EVAL(ac_compile); then 129050f2e948Smrg case `/usr/bin/file conftest.o` in 12915592a31fSmrg *32-bit*) 12925592a31fSmrg case $host in 12935592a31fSmrg x86_64-*kfreebsd*-gnu) 12945592a31fSmrg LD="${LD-ld} -m elf_i386_fbsd" 12955592a31fSmrg ;; 12965592a31fSmrg x86_64-*linux*) 12975592a31fSmrg LD="${LD-ld} -m elf_i386" 12985592a31fSmrg ;; 12995592a31fSmrg ppc64-*linux*|powerpc64-*linux*) 13005592a31fSmrg LD="${LD-ld} -m elf32ppclinux" 13015592a31fSmrg ;; 13025592a31fSmrg s390x-*linux*) 13035592a31fSmrg LD="${LD-ld} -m elf_s390" 13045592a31fSmrg ;; 13055592a31fSmrg sparc64-*linux*) 13065592a31fSmrg LD="${LD-ld} -m elf32_sparc" 13075592a31fSmrg ;; 13085592a31fSmrg esac 13095592a31fSmrg ;; 13105592a31fSmrg *64-bit*) 13115592a31fSmrg case $host in 13125592a31fSmrg x86_64-*kfreebsd*-gnu) 13135592a31fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 13145592a31fSmrg ;; 13155592a31fSmrg x86_64-*linux*) 13165592a31fSmrg LD="${LD-ld} -m elf_x86_64" 13175592a31fSmrg ;; 13185592a31fSmrg ppc*-*linux*|powerpc*-*linux*) 13195592a31fSmrg LD="${LD-ld} -m elf64ppc" 13205592a31fSmrg ;; 13215592a31fSmrg s390*-*linux*|s390*-*tpf*) 13225592a31fSmrg LD="${LD-ld} -m elf64_s390" 13235592a31fSmrg ;; 13245592a31fSmrg sparc*-*linux*) 13255592a31fSmrg LD="${LD-ld} -m elf64_sparc" 13265592a31fSmrg ;; 13275592a31fSmrg esac 13285592a31fSmrg ;; 132950f2e948Smrg esac 133050f2e948Smrg fi 133150f2e948Smrg rm -rf conftest* 1332226fade8Smrg ;; 133345bc899bSmrg 133450f2e948Smrg*-*-sco3.2v5*) 133550f2e948Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 133650f2e948Smrg SAVE_CFLAGS="$CFLAGS" 133750f2e948Smrg CFLAGS="$CFLAGS -belf" 133850f2e948Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 133950f2e948Smrg [AC_LANG_PUSH(C) 13405592a31fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 134150f2e948Smrg AC_LANG_POP]) 134250f2e948Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 134350f2e948Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 134450f2e948Smrg CFLAGS="$SAVE_CFLAGS" 134550f2e948Smrg fi 1346226fade8Smrg ;; 134750f2e948Smrgsparc*-*solaris*) 134850f2e948Smrg # Find out which ABI we are using. 134950f2e948Smrg echo 'int i;' > conftest.$ac_ext 135050f2e948Smrg if AC_TRY_EVAL(ac_compile); then 135150f2e948Smrg case `/usr/bin/file conftest.o` in 135250f2e948Smrg *64-bit*) 135350f2e948Smrg case $lt_cv_prog_gnu_ld in 135450f2e948Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 135550f2e948Smrg *) 13565592a31fSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 135750f2e948Smrg LD="${LD-ld} -64" 135850f2e948Smrg fi 135950f2e948Smrg ;; 136050f2e948Smrg esac 136150f2e948Smrg ;; 136250f2e948Smrg esac 136350f2e948Smrg fi 136450f2e948Smrg rm -rf conftest* 1365226fade8Smrg ;; 136650f2e948Smrgesac 136745bc899bSmrg 136850f2e948Smrgneed_locks="$enable_libtool_lock" 13695592a31fSmrg])# _LT_ENABLE_LOCK 13705592a31fSmrg 13715592a31fSmrg 13725592a31fSmrg# _LT_CMD_OLD_ARCHIVE 13735592a31fSmrg# ------------------- 13745592a31fSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 13755592a31fSmrg[AC_CHECK_TOOL(AR, ar, false) 13765592a31fSmrgtest -z "$AR" && AR=ar 13775592a31fSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 13785592a31fSmrg_LT_DECL([], [AR], [1], [The archiver]) 13795592a31fSmrg_LT_DECL([], [AR_FLAGS], [1]) 13805592a31fSmrg 13815592a31fSmrgAC_CHECK_TOOL(STRIP, strip, :) 13825592a31fSmrgtest -z "$STRIP" && STRIP=: 13835592a31fSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 138450f2e948Smrg 13855592a31fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 13865592a31fSmrgtest -z "$RANLIB" && RANLIB=: 13875592a31fSmrg_LT_DECL([], [RANLIB], [1], 13885592a31fSmrg [Commands used to install an old-style archive]) 13895592a31fSmrg 13905592a31fSmrg# Determine commands to create old-style static archives. 13915592a31fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 13925592a31fSmrgold_postinstall_cmds='chmod 644 $oldlib' 13935592a31fSmrgold_postuninstall_cmds= 13945592a31fSmrg 13955592a31fSmrgif test -n "$RANLIB"; then 13965592a31fSmrg case $host_os in 13975592a31fSmrg openbsd*) 13985592a31fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 13995592a31fSmrg ;; 14005592a31fSmrg *) 14015592a31fSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 14025592a31fSmrg ;; 14035592a31fSmrg esac 14045592a31fSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 14055592a31fSmrgfi 14065592a31fSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 14075592a31fSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 14085592a31fSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 14095592a31fSmrg [Commands used to build an old-style archive]) 14105592a31fSmrg])# _LT_CMD_OLD_ARCHIVE 141145bc899bSmrg 141245bc899bSmrg 14135592a31fSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 141450f2e948Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 141550f2e948Smrg# ---------------------------------------------------------------- 141650f2e948Smrg# Check whether the given compiler option works 14175592a31fSmrgAC_DEFUN([_LT_COMPILER_OPTION], 14185592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 14195592a31fSmrgm4_require([_LT_DECL_SED])dnl 142050f2e948SmrgAC_CACHE_CHECK([$1], [$2], 142150f2e948Smrg [$2=no 14225592a31fSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 142350f2e948Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 142450f2e948Smrg lt_compiler_flag="$3" 142550f2e948Smrg # Insert the option either (1) after the last *FLAGS variable, or 142650f2e948Smrg # (2) before a word containing "conftest.", or (3) at the end. 142750f2e948Smrg # Note that $ac_compile itself does not contain backslashes and begins 142850f2e948Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 142950f2e948Smrg # The option is referenced via a variable to avoid confusing sed. 143050f2e948Smrg lt_compile=`echo "$ac_compile" | $SED \ 143150f2e948Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 143250f2e948Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 143350f2e948Smrg -e 's:$: $lt_compiler_flag:'` 143450f2e948Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 143550f2e948Smrg (eval "$lt_compile" 2>conftest.err) 143650f2e948Smrg ac_status=$? 143750f2e948Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 143850f2e948Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 143950f2e948Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 144050f2e948Smrg # The compiler can only warn and ignore the option if not recognized 144150f2e948Smrg # So say no if there are warnings other than the usual output. 14425592a31fSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 144350f2e948Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 144450f2e948Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 144550f2e948Smrg $2=yes 144650f2e948Smrg fi 144750f2e948Smrg fi 14485592a31fSmrg $RM conftest* 144950f2e948Smrg]) 145045bc899bSmrg 145150f2e948Smrgif test x"[$]$2" = xyes; then 14525592a31fSmrg m4_if([$5], , :, [$5]) 145350f2e948Smrgelse 14545592a31fSmrg m4_if([$6], , :, [$6]) 145550f2e948Smrgfi 14565592a31fSmrg])# _LT_COMPILER_OPTION 145745bc899bSmrg 14585592a31fSmrg# Old name: 14595592a31fSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 14605592a31fSmrgdnl aclocal-1.4 backwards compatibility: 14615592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 146250f2e948Smrg 14635592a31fSmrg 14645592a31fSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 14655592a31fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 14665592a31fSmrg# ---------------------------------------------------- 14675592a31fSmrg# Check whether the given linker option works 14685592a31fSmrgAC_DEFUN([_LT_LINKER_OPTION], 14695592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 14705592a31fSmrgm4_require([_LT_DECL_SED])dnl 147150f2e948SmrgAC_CACHE_CHECK([$1], [$2], 147250f2e948Smrg [$2=no 147350f2e948Smrg save_LDFLAGS="$LDFLAGS" 147450f2e948Smrg LDFLAGS="$LDFLAGS $3" 147550f2e948Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 147650f2e948Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 147750f2e948Smrg # The linker can only warn and ignore the option if not recognized 147850f2e948Smrg # So say no if there are warnings 147950f2e948Smrg if test -s conftest.err; then 148050f2e948Smrg # Append any errors to the config.log. 148150f2e948Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 14825592a31fSmrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 148350f2e948Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 148450f2e948Smrg if diff conftest.exp conftest.er2 >/dev/null; then 148550f2e948Smrg $2=yes 148650f2e948Smrg fi 148750f2e948Smrg else 148850f2e948Smrg $2=yes 148950f2e948Smrg fi 149050f2e948Smrg fi 14915592a31fSmrg $RM -r conftest* 149250f2e948Smrg LDFLAGS="$save_LDFLAGS" 149350f2e948Smrg]) 149450f2e948Smrg 149550f2e948Smrgif test x"[$]$2" = xyes; then 14965592a31fSmrg m4_if([$4], , :, [$4]) 149750f2e948Smrgelse 14985592a31fSmrg m4_if([$5], , :, [$5]) 149950f2e948Smrgfi 15005592a31fSmrg])# _LT_LINKER_OPTION 150150f2e948Smrg 15025592a31fSmrg# Old name: 15035592a31fSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 15045592a31fSmrgdnl aclocal-1.4 backwards compatibility: 15055592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 150650f2e948Smrg 15075592a31fSmrg 15085592a31fSmrg# LT_CMD_MAX_LEN 15095592a31fSmrg#--------------- 15105592a31fSmrgAC_DEFUN([LT_CMD_MAX_LEN], 15115592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 15125592a31fSmrg# find the maximum length of command line arguments 151350f2e948SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 151450f2e948SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 151550f2e948Smrg i=0 151650f2e948Smrg teststring="ABCD" 151750f2e948Smrg 151850f2e948Smrg case $build_os in 151950f2e948Smrg msdosdjgpp*) 152050f2e948Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 152150f2e948Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 152250f2e948Smrg # during glob expansion). Even if it were fixed, the result of this 152350f2e948Smrg # check would be larger than it should be. 152450f2e948Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 15251ac89addSmrg ;; 152650f2e948Smrg 152750f2e948Smrg gnu*) 152850f2e948Smrg # Under GNU Hurd, this test is not required because there is 152950f2e948Smrg # no limit to the length of command line arguments. 153050f2e948Smrg # Libtool will interpret -1 as no limit whatsoever 153150f2e948Smrg lt_cv_sys_max_cmd_len=-1; 15321ac89addSmrg ;; 153350f2e948Smrg 15345592a31fSmrg cygwin* | mingw* | cegcc*) 153550f2e948Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 153650f2e948Smrg # about 5 minutes as the teststring grows exponentially. 153750f2e948Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 153850f2e948Smrg # you end up with a "frozen" computer, even though with patience 153950f2e948Smrg # the test eventually succeeds (with a max line length of 256k). 154050f2e948Smrg # Instead, let's just punt: use the minimum linelength reported by 154150f2e948Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 154250f2e948Smrg lt_cv_sys_max_cmd_len=8192; 15431ac89addSmrg ;; 154450f2e948Smrg 154550f2e948Smrg amigaos*) 154650f2e948Smrg # On AmigaOS with pdksh, this test takes hours, literally. 154750f2e948Smrg # So we just punt and use a minimum line length of 8192. 154850f2e948Smrg lt_cv_sys_max_cmd_len=8192; 15491ac89addSmrg ;; 155045bc899bSmrg 155150f2e948Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 155250f2e948Smrg # This has been around since 386BSD, at least. Likely further. 155350f2e948Smrg if test -x /sbin/sysctl; then 155450f2e948Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 155550f2e948Smrg elif test -x /usr/sbin/sysctl; then 155650f2e948Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 155750f2e948Smrg else 155850f2e948Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 155950f2e948Smrg fi 156050f2e948Smrg # And add a safety zone 156150f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 156250f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 156350f2e948Smrg ;; 156445bc899bSmrg 156550f2e948Smrg interix*) 156650f2e948Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 156750f2e948Smrg lt_cv_sys_max_cmd_len=196608 156850f2e948Smrg ;; 156950f2e948Smrg 157050f2e948Smrg osf*) 157150f2e948Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 157250f2e948Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 157350f2e948Smrg # nice to cause kernel panics so lets avoid the loop below. 157450f2e948Smrg # First set a reasonable default. 157550f2e948Smrg lt_cv_sys_max_cmd_len=16384 157650f2e948Smrg # 157750f2e948Smrg if test -x /sbin/sysconfig; then 157850f2e948Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 157950f2e948Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 158050f2e948Smrg esac 158145bc899bSmrg fi 1582226fade8Smrg ;; 158350f2e948Smrg sco3.2v5*) 158450f2e948Smrg lt_cv_sys_max_cmd_len=102400 15851ac89addSmrg ;; 158650f2e948Smrg sysv5* | sco5v6* | sysv4.2uw2*) 158750f2e948Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 158850f2e948Smrg if test -n "$kargmax"; then 15895592a31fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 159050f2e948Smrg else 159150f2e948Smrg lt_cv_sys_max_cmd_len=32768 159250f2e948Smrg fi 15931ac89addSmrg ;; 15941ac89addSmrg *) 159550f2e948Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 159650f2e948Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 159750f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 159850f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 159950f2e948Smrg else 16005592a31fSmrg # Make teststring a little bigger before we do anything with it. 16015592a31fSmrg # a 1K string should be a reasonable start. 16025592a31fSmrg for i in 1 2 3 4 5 6 7 8 ; do 16035592a31fSmrg teststring=$teststring$teststring 16045592a31fSmrg done 160550f2e948Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 16065592a31fSmrg # If test is not a shell built-in, we'll probably end up computing a 16075592a31fSmrg # maximum length that is only half of the actual maximum length, but 16085592a31fSmrg # we can't tell. 16095592a31fSmrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 16105592a31fSmrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 161150f2e948Smrg test $i != 17 # 1/2 MB should be enough 161250f2e948Smrg do 161350f2e948Smrg i=`expr $i + 1` 161450f2e948Smrg teststring=$teststring$teststring 161550f2e948Smrg done 16165592a31fSmrg # Only check the string length outside the loop. 16175592a31fSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 161850f2e948Smrg teststring= 16195592a31fSmrg # Add a significant safety factor because C++ compilers can tack on 16205592a31fSmrg # massive amounts of additional arguments before passing them to the 16215592a31fSmrg # linker. It appears as though 1/2 is a usable value. 162250f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 162350f2e948Smrg fi 16241ac89addSmrg ;; 16251ac89addSmrg esac 162650f2e948Smrg]) 162750f2e948Smrgif test -n $lt_cv_sys_max_cmd_len ; then 162850f2e948Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 162950f2e948Smrgelse 163050f2e948Smrg AC_MSG_RESULT(none) 163150f2e948Smrgfi 16325592a31fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 16335592a31fSmrg_LT_DECL([], [max_cmd_len], [0], 16345592a31fSmrg [What is the maximum length of a command?]) 16355592a31fSmrg])# LT_CMD_MAX_LEN 163645bc899bSmrg 16375592a31fSmrg# Old name: 16385592a31fSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 16395592a31fSmrgdnl aclocal-1.4 backwards compatibility: 16405592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 164145bc899bSmrg 16425592a31fSmrg 16435592a31fSmrg# _LT_HEADER_DLFCN 16445592a31fSmrg# ---------------- 16455592a31fSmrgm4_defun([_LT_HEADER_DLFCN], 16465592a31fSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 16475592a31fSmrg])# _LT_HEADER_DLFCN 164845bc899bSmrg 1649226fade8Smrg 16505592a31fSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 16515592a31fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 16525592a31fSmrg# ---------------------------------------------------------------- 16535592a31fSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 16545592a31fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 165550f2e948Smrgif test "$cross_compiling" = yes; then : 165650f2e948Smrg [$4] 165750f2e948Smrgelse 165850f2e948Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 165950f2e948Smrg lt_status=$lt_dlunknown 16605592a31fSmrg cat > conftest.$ac_ext <<_LT_EOF 166150f2e948Smrg[#line __oline__ "configure" 166250f2e948Smrg#include "confdefs.h" 166345bc899bSmrg 166450f2e948Smrg#if HAVE_DLFCN_H 166550f2e948Smrg#include <dlfcn.h> 166650f2e948Smrg#endif 166745bc899bSmrg 166850f2e948Smrg#include <stdio.h> 166945bc899bSmrg 167050f2e948Smrg#ifdef RTLD_GLOBAL 167150f2e948Smrg# define LT_DLGLOBAL RTLD_GLOBAL 167250f2e948Smrg#else 167350f2e948Smrg# ifdef DL_GLOBAL 167450f2e948Smrg# define LT_DLGLOBAL DL_GLOBAL 167550f2e948Smrg# else 167650f2e948Smrg# define LT_DLGLOBAL 0 167750f2e948Smrg# endif 167850f2e948Smrg#endif 167945bc899bSmrg 168050f2e948Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 168150f2e948Smrg find out it does not work in some platform. */ 168250f2e948Smrg#ifndef LT_DLLAZY_OR_NOW 168350f2e948Smrg# ifdef RTLD_LAZY 168450f2e948Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 168550f2e948Smrg# else 168650f2e948Smrg# ifdef DL_LAZY 168750f2e948Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 168850f2e948Smrg# else 168950f2e948Smrg# ifdef RTLD_NOW 169050f2e948Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 169150f2e948Smrg# else 169250f2e948Smrg# ifdef DL_NOW 169350f2e948Smrg# define LT_DLLAZY_OR_NOW DL_NOW 169450f2e948Smrg# else 169550f2e948Smrg# define LT_DLLAZY_OR_NOW 0 169650f2e948Smrg# endif 169750f2e948Smrg# endif 169850f2e948Smrg# endif 169950f2e948Smrg# endif 170050f2e948Smrg#endif 170145bc899bSmrg 170250f2e948Smrgvoid fnord() { int i=42;} 170350f2e948Smrgint main () 170450f2e948Smrg{ 170550f2e948Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 170650f2e948Smrg int status = $lt_dlunknown; 170750f2e948Smrg 170850f2e948Smrg if (self) 170950f2e948Smrg { 171050f2e948Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 171150f2e948Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 171250f2e948Smrg /* dlclose (self); */ 171350f2e948Smrg } 171445bc899bSmrg else 171550f2e948Smrg puts (dlerror ()); 171645bc899bSmrg 17175592a31fSmrg return status; 171850f2e948Smrg}] 17195592a31fSmrg_LT_EOF 172050f2e948Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 172150f2e948Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 172250f2e948Smrg lt_status=$? 172350f2e948Smrg case x$lt_status in 172450f2e948Smrg x$lt_dlno_uscore) $1 ;; 172550f2e948Smrg x$lt_dlneed_uscore) $2 ;; 172650f2e948Smrg x$lt_dlunknown|x*) $3 ;; 17271ac89addSmrg esac 172850f2e948Smrg else : 172950f2e948Smrg # compilation failed 173050f2e948Smrg $3 173145bc899bSmrg fi 173245bc899bSmrgfi 173350f2e948Smrgrm -fr conftest* 17345592a31fSmrg])# _LT_TRY_DLOPEN_SELF 173545bc899bSmrg 1736226fade8Smrg 17375592a31fSmrg# LT_SYS_DLOPEN_SELF 17385592a31fSmrg# ------------------ 17395592a31fSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 17405592a31fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 174150f2e948Smrgif test "x$enable_dlopen" != xyes; then 174250f2e948Smrg enable_dlopen=unknown 174350f2e948Smrg enable_dlopen_self=unknown 174450f2e948Smrg enable_dlopen_self_static=unknown 174550f2e948Smrgelse 174650f2e948Smrg lt_cv_dlopen=no 174750f2e948Smrg lt_cv_dlopen_libs= 1748226fade8Smrg 174950f2e948Smrg case $host_os in 175050f2e948Smrg beos*) 175150f2e948Smrg lt_cv_dlopen="load_add_on" 175250f2e948Smrg lt_cv_dlopen_libs= 175350f2e948Smrg lt_cv_dlopen_self=yes 175450f2e948Smrg ;; 1755226fade8Smrg 17565592a31fSmrg mingw* | pw32* | cegcc*) 175750f2e948Smrg lt_cv_dlopen="LoadLibrary" 175850f2e948Smrg lt_cv_dlopen_libs= 17595592a31fSmrg ;; 1760226fade8Smrg 176150f2e948Smrg cygwin*) 176250f2e948Smrg lt_cv_dlopen="dlopen" 176350f2e948Smrg lt_cv_dlopen_libs= 17645592a31fSmrg ;; 1765226fade8Smrg 176650f2e948Smrg darwin*) 176750f2e948Smrg # if libdl is installed we need to link against it 176850f2e948Smrg AC_CHECK_LIB([dl], [dlopen], 176950f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 177050f2e948Smrg lt_cv_dlopen="dyld" 177150f2e948Smrg lt_cv_dlopen_libs= 177250f2e948Smrg lt_cv_dlopen_self=yes 177350f2e948Smrg ]) 17745592a31fSmrg ;; 1775226fade8Smrg 177650f2e948Smrg *) 177750f2e948Smrg AC_CHECK_FUNC([shl_load], 177850f2e948Smrg [lt_cv_dlopen="shl_load"], 177950f2e948Smrg [AC_CHECK_LIB([dld], [shl_load], 178050f2e948Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 178150f2e948Smrg [AC_CHECK_FUNC([dlopen], 178250f2e948Smrg [lt_cv_dlopen="dlopen"], 178350f2e948Smrg [AC_CHECK_LIB([dl], [dlopen], 178450f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 178550f2e948Smrg [AC_CHECK_LIB([svld], [dlopen], 178650f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 178750f2e948Smrg [AC_CHECK_LIB([dld], [dld_link], 178850f2e948Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 178950f2e948Smrg ]) 179050f2e948Smrg ]) 179150f2e948Smrg ]) 179250f2e948Smrg ]) 179350f2e948Smrg ]) 179450f2e948Smrg ;; 179550f2e948Smrg esac 1796226fade8Smrg 179750f2e948Smrg if test "x$lt_cv_dlopen" != xno; then 179850f2e948Smrg enable_dlopen=yes 179950f2e948Smrg else 180050f2e948Smrg enable_dlopen=no 180150f2e948Smrg fi 1802226fade8Smrg 180350f2e948Smrg case $lt_cv_dlopen in 180450f2e948Smrg dlopen) 180550f2e948Smrg save_CPPFLAGS="$CPPFLAGS" 180650f2e948Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1807226fade8Smrg 180850f2e948Smrg save_LDFLAGS="$LDFLAGS" 180950f2e948Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1810226fade8Smrg 181150f2e948Smrg save_LIBS="$LIBS" 181250f2e948Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1813226fade8Smrg 181450f2e948Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 181550f2e948Smrg lt_cv_dlopen_self, [dnl 18165592a31fSmrg _LT_TRY_DLOPEN_SELF( 181750f2e948Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 181850f2e948Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 181950f2e948Smrg ]) 1820226fade8Smrg 182150f2e948Smrg if test "x$lt_cv_dlopen_self" = xyes; then 182250f2e948Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 182350f2e948Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 18245592a31fSmrg lt_cv_dlopen_self_static, [dnl 18255592a31fSmrg _LT_TRY_DLOPEN_SELF( 182650f2e948Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 182750f2e948Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 182850f2e948Smrg ]) 1829226fade8Smrg fi 1830226fade8Smrg 183150f2e948Smrg CPPFLAGS="$save_CPPFLAGS" 183250f2e948Smrg LDFLAGS="$save_LDFLAGS" 183350f2e948Smrg LIBS="$save_LIBS" 183450f2e948Smrg ;; 183550f2e948Smrg esac 1836226fade8Smrg 183750f2e948Smrg case $lt_cv_dlopen_self in 183850f2e948Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 183950f2e948Smrg *) enable_dlopen_self=unknown ;; 184050f2e948Smrg esac 1841226fade8Smrg 184250f2e948Smrg case $lt_cv_dlopen_self_static in 184350f2e948Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 184450f2e948Smrg *) enable_dlopen_self_static=unknown ;; 184550f2e948Smrg esac 184650f2e948Smrgfi 18475592a31fSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 18485592a31fSmrg [Whether dlopen is supported]) 18495592a31fSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 18505592a31fSmrg [Whether dlopen of programs is supported]) 18515592a31fSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 18525592a31fSmrg [Whether dlopen of statically linked programs is supported]) 18535592a31fSmrg])# LT_SYS_DLOPEN_SELF 1854226fade8Smrg 18555592a31fSmrg# Old name: 18565592a31fSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 18575592a31fSmrgdnl aclocal-1.4 backwards compatibility: 18585592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1859226fade8Smrg 18605592a31fSmrg 18615592a31fSmrg# _LT_COMPILER_C_O([TAGNAME]) 18625592a31fSmrg# --------------------------- 18635592a31fSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 18645592a31fSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 18655592a31fSmrgm4_defun([_LT_COMPILER_C_O], 18665592a31fSmrg[m4_require([_LT_DECL_SED])dnl 18675592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 18685592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 186950f2e948SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 18705592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 18715592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 18725592a31fSmrg $RM -r conftest 2>/dev/null 187350f2e948Smrg mkdir conftest 187450f2e948Smrg cd conftest 187550f2e948Smrg mkdir out 187650f2e948Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1877226fade8Smrg 187850f2e948Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 187950f2e948Smrg # Insert the option either (1) after the last *FLAGS variable, or 188050f2e948Smrg # (2) before a word containing "conftest.", or (3) at the end. 188150f2e948Smrg # Note that $ac_compile itself does not contain backslashes and begins 188250f2e948Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 188350f2e948Smrg lt_compile=`echo "$ac_compile" | $SED \ 188450f2e948Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 188550f2e948Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 188650f2e948Smrg -e 's:$: $lt_compiler_flag:'` 188750f2e948Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 188850f2e948Smrg (eval "$lt_compile" 2>out/conftest.err) 188950f2e948Smrg ac_status=$? 189050f2e948Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 189150f2e948Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 189250f2e948Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 189350f2e948Smrg then 189450f2e948Smrg # The compiler can only warn and ignore the option if not recognized 189550f2e948Smrg # So say no if there are warnings 18965592a31fSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 189750f2e948Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 189850f2e948Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 18995592a31fSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 190050f2e948Smrg fi 190150f2e948Smrg fi 190250f2e948Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 19035592a31fSmrg $RM conftest* 190450f2e948Smrg # SGI C++ compiler will create directory out/ii_files/ for 190550f2e948Smrg # template instantiation 19065592a31fSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 19075592a31fSmrg $RM out/* && rmdir out 190850f2e948Smrg cd .. 19095592a31fSmrg $RM -r conftest 19105592a31fSmrg $RM conftest* 191150f2e948Smrg]) 19125592a31fSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 19135592a31fSmrg [Does compiler simultaneously support -c and -o options?]) 19145592a31fSmrg])# _LT_COMPILER_C_O 1915226fade8Smrg 1916226fade8Smrg 19175592a31fSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 19185592a31fSmrg# ---------------------------------- 191950f2e948Smrg# Check to see if we can do hard links to lock some files if needed 19205592a31fSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 19215592a31fSmrg[m4_require([_LT_ENABLE_LOCK])dnl 19225592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19235592a31fSmrg_LT_COMPILER_C_O([$1]) 1924226fade8Smrg 192550f2e948Smrghard_links="nottested" 19265592a31fSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 192750f2e948Smrg # do not overwrite the value of need_locks provided by the user 192850f2e948Smrg AC_MSG_CHECKING([if we can lock with hard links]) 192950f2e948Smrg hard_links=yes 19305592a31fSmrg $RM conftest* 193150f2e948Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 193250f2e948Smrg touch conftest.a 193350f2e948Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 193450f2e948Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 193550f2e948Smrg AC_MSG_RESULT([$hard_links]) 193650f2e948Smrg if test "$hard_links" = no; then 193750f2e948Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 193850f2e948Smrg need_locks=warn 193950f2e948Smrg fi 194050f2e948Smrgelse 194150f2e948Smrg need_locks=no 194250f2e948Smrgfi 19435592a31fSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 19445592a31fSmrg])# _LT_COMPILER_FILE_LOCKS 1945226fade8Smrg 1946226fade8Smrg 19475592a31fSmrg# _LT_CHECK_OBJDIR 19485592a31fSmrg# ---------------- 19495592a31fSmrgm4_defun([_LT_CHECK_OBJDIR], 195050f2e948Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 195150f2e948Smrg[rm -f .libs 2>/dev/null 195250f2e948Smrgmkdir .libs 2>/dev/null 195350f2e948Smrgif test -d .libs; then 195450f2e948Smrg lt_cv_objdir=.libs 195550f2e948Smrgelse 195650f2e948Smrg # MS-DOS does not allow filenames that begin with a dot. 195750f2e948Smrg lt_cv_objdir=_libs 195850f2e948Smrgfi 195950f2e948Smrgrmdir .libs 2>/dev/null]) 196050f2e948Smrgobjdir=$lt_cv_objdir 19615592a31fSmrg_LT_DECL([], [objdir], [0], 19625592a31fSmrg [The name of the directory that contains temporary libtool files])dnl 19635592a31fSmrgm4_pattern_allow([LT_OBJDIR])dnl 19645592a31fSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 19655592a31fSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 19665592a31fSmrg])# _LT_CHECK_OBJDIR 1967226fade8Smrg 1968226fade8Smrg 19695592a31fSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 19705592a31fSmrg# -------------------------------------- 197150f2e948Smrg# Check hardcoding attributes. 19725592a31fSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 197350f2e948Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 19745592a31fSmrg_LT_TAGVAR(hardcode_action, $1)= 19755592a31fSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 19765592a31fSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 19775592a31fSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 197845bc899bSmrg 19795592a31fSmrg # We can hardcode non-existent directories. 19805592a31fSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 198150f2e948Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 198250f2e948Smrg # have to relink, otherwise we might link with an installed library 198350f2e948Smrg # when we should be linking with a yet-to-be-installed one 19845592a31fSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 19855592a31fSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 198650f2e948Smrg # Linking always hardcodes the temporary library directory. 19875592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=relink 198850f2e948Smrg else 198950f2e948Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 19905592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 199150f2e948Smrg fi 199250f2e948Smrgelse 199350f2e948Smrg # We cannot hardcode anything, or else we can only hardcode existing 199450f2e948Smrg # directories. 19955592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 199650f2e948Smrgfi 19975592a31fSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 1998226fade8Smrg 19995592a31fSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 20005592a31fSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 200150f2e948Smrg # Fast installation is not supported 200250f2e948Smrg enable_fast_install=no 200350f2e948Smrgelif test "$shlibpath_overrides_runpath" = yes || 200450f2e948Smrg test "$enable_shared" = no; then 200550f2e948Smrg # Fast installation is not necessary 200650f2e948Smrg enable_fast_install=needless 200750f2e948Smrgfi 20085592a31fSmrg_LT_TAGDECL([], [hardcode_action], [0], 20095592a31fSmrg [How to hardcode a shared library path into an executable]) 20105592a31fSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2011226fade8Smrg 2012226fade8Smrg 20135592a31fSmrg# _LT_CMD_STRIPLIB 20145592a31fSmrg# ---------------- 20155592a31fSmrgm4_defun([_LT_CMD_STRIPLIB], 20165592a31fSmrg[m4_require([_LT_DECL_EGREP]) 20175592a31fSmrgstriplib= 201850f2e948Smrgold_striplib= 201950f2e948SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 20205592a31fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 202150f2e948Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 202250f2e948Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 202350f2e948Smrg AC_MSG_RESULT([yes]) 202450f2e948Smrgelse 202550f2e948Smrg# FIXME - insert some real tests, host_os isn't really good enough 202650f2e948Smrg case $host_os in 20275592a31fSmrg darwin*) 20285592a31fSmrg if test -n "$STRIP" ; then 20295592a31fSmrg striplib="$STRIP -x" 20305592a31fSmrg old_striplib="$STRIP -S" 20315592a31fSmrg AC_MSG_RESULT([yes]) 20325592a31fSmrg else 20335592a31fSmrg AC_MSG_RESULT([no]) 20345592a31fSmrg fi 20355592a31fSmrg ;; 20365592a31fSmrg *) 20375592a31fSmrg AC_MSG_RESULT([no]) 203850f2e948Smrg ;; 203950f2e948Smrg esac 204050f2e948Smrgfi 20415592a31fSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 20425592a31fSmrg_LT_DECL([], [striplib], [1]) 20435592a31fSmrg])# _LT_CMD_STRIPLIB 204445bc899bSmrg 204545bc899bSmrg 20465592a31fSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 204750f2e948Smrg# ----------------------------- 204850f2e948Smrg# PORTME Fill in your ld.so characteristics 20495592a31fSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 20505592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 20515592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 20525592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20535592a31fSmrgm4_require([_LT_DECL_OBJDUMP])dnl 20545592a31fSmrgm4_require([_LT_DECL_SED])dnl 205550f2e948SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 20565592a31fSmrgm4_if([$1], 20575592a31fSmrg [], [ 205850f2e948Smrgif test "$GCC" = yes; then 205950f2e948Smrg case $host_os in 206050f2e948Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 206150f2e948Smrg *) lt_awk_arg="/^libraries:/" ;; 206250f2e948Smrg esac 206350f2e948Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 20645592a31fSmrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 206550f2e948Smrg # if the path contains ";" then we assume it to be the separator 206650f2e948Smrg # otherwise default to the standard path separator (i.e. ":") - it is 206750f2e948Smrg # assumed that no part of a normal pathname contains ";" but that should 206850f2e948Smrg # okay in the real world where ";" in dirpaths is itself problematic. 20695592a31fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 207050f2e948Smrg else 20715592a31fSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 207250f2e948Smrg fi 207350f2e948Smrg # Ok, now we have the path, separated by spaces, we can step through it 207450f2e948Smrg # and add multilib dir if necessary. 207550f2e948Smrg lt_tmp_lt_search_path_spec= 207650f2e948Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 207750f2e948Smrg for lt_sys_path in $lt_search_path_spec; do 207850f2e948Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 207950f2e948Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 208050f2e948Smrg else 208150f2e948Smrg test -d "$lt_sys_path" && \ 208250f2e948Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 20831ac89addSmrg fi 20841ac89addSmrg done 20855592a31fSmrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 208650f2e948SmrgBEGIN {RS=" "; FS="/|\n";} { 208750f2e948Smrg lt_foo=""; 208850f2e948Smrg lt_count=0; 208950f2e948Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 209050f2e948Smrg if ($lt_i != "" && $lt_i != ".") { 209150f2e948Smrg if ($lt_i == "..") { 209250f2e948Smrg lt_count++; 209350f2e948Smrg } else { 209450f2e948Smrg if (lt_count == 0) { 209550f2e948Smrg lt_foo="/" $lt_i lt_foo; 209650f2e948Smrg } else { 209750f2e948Smrg lt_count--; 209850f2e948Smrg } 209950f2e948Smrg } 210050f2e948Smrg } 210150f2e948Smrg } 210250f2e948Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 210350f2e948Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 210450f2e948Smrg}'` 21055592a31fSmrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 21061ac89addSmrgelse 210750f2e948Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 210850f2e948Smrgfi]) 21095592a31fSmrglibrary_names_spec= 21105592a31fSmrglibname_spec='lib$name' 21115592a31fSmrgsoname_spec= 21125592a31fSmrgshrext_cmds=".so" 21135592a31fSmrgpostinstall_cmds= 21145592a31fSmrgpostuninstall_cmds= 21155592a31fSmrgfinish_cmds= 21165592a31fSmrgfinish_eval= 21175592a31fSmrgshlibpath_var= 21185592a31fSmrgshlibpath_overrides_runpath=unknown 21195592a31fSmrgversion_type=none 21205592a31fSmrgdynamic_linker="$host_os ld.so" 21215592a31fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 212250f2e948Smrgneed_lib_prefix=unknown 212350f2e948Smrghardcode_into_libs=no 212445bc899bSmrg 212550f2e948Smrg# when you set need_version to no, make sure it does not cause -set_version 212650f2e948Smrg# flags to be left without arguments 212750f2e948Smrgneed_version=unknown 212845bc899bSmrg 212950f2e948Smrgcase $host_os in 213050f2e948Smrgaix3*) 213150f2e948Smrg version_type=linux 213250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 213350f2e948Smrg shlibpath_var=LIBPATH 213445bc899bSmrg 213550f2e948Smrg # AIX 3 has no versioning support, so we append a major version to the name. 213650f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 213750f2e948Smrg ;; 213845bc899bSmrg 213950f2e948Smrgaix[[4-9]]*) 214050f2e948Smrg version_type=linux 214150f2e948Smrg need_lib_prefix=no 214250f2e948Smrg need_version=no 214350f2e948Smrg hardcode_into_libs=yes 214450f2e948Smrg if test "$host_cpu" = ia64; then 214550f2e948Smrg # AIX 5 supports IA64 214650f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 214750f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 214850f2e948Smrg else 214950f2e948Smrg # With GCC up to 2.95.x, collect2 would create an import file 215050f2e948Smrg # for dependence libraries. The import file would start with 215150f2e948Smrg # the line `#! .'. This would cause the generated library to 215250f2e948Smrg # depend on `.', always an invalid library. This was fixed in 215350f2e948Smrg # development snapshots of GCC prior to 3.0. 215450f2e948Smrg case $host_os in 215550f2e948Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 215650f2e948Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 215750f2e948Smrg echo ' yes ' 21585592a31fSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 215950f2e948Smrg : 216050f2e948Smrg else 216150f2e948Smrg can_build_shared=no 216250f2e948Smrg fi 21631ac89addSmrg ;; 216450f2e948Smrg esac 216550f2e948Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 216650f2e948Smrg # soname into executable. Probably we can add versioning support to 216750f2e948Smrg # collect2, so additional links can be useful in future. 216850f2e948Smrg if test "$aix_use_runtimelinking" = yes; then 216950f2e948Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 217050f2e948Smrg # instead of lib<name>.a to let people know that these are not 217150f2e948Smrg # typical AIX shared libraries. 217250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 217350f2e948Smrg else 217450f2e948Smrg # We preserve .a as extension for shared libraries through AIX4.2 217550f2e948Smrg # and later when we are not doing run time linking. 217650f2e948Smrg library_names_spec='${libname}${release}.a $libname.a' 217750f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 21781ac89addSmrg fi 217950f2e948Smrg shlibpath_var=LIBPATH 218050f2e948Smrg fi 21811ac89addSmrg ;; 218245bc899bSmrg 218350f2e948Smrgamigaos*) 21845592a31fSmrg case $host_cpu in 21855592a31fSmrg powerpc) 21865592a31fSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 21875592a31fSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 21885592a31fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 21895592a31fSmrg ;; 21905592a31fSmrg m68k) 21915592a31fSmrg library_names_spec='$libname.ixlibrary $libname.a' 21925592a31fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 21935592a31fSmrg 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' 21945592a31fSmrg ;; 21955592a31fSmrg esac 21961ac89addSmrg ;; 219745bc899bSmrg 21981ac89addSmrgbeos*) 219950f2e948Smrg library_names_spec='${libname}${shared_ext}' 220050f2e948Smrg dynamic_linker="$host_os ld.so" 220150f2e948Smrg shlibpath_var=LIBRARY_PATH 22021ac89addSmrg ;; 220345bc899bSmrg 22041ac89addSmrgbsdi[[45]]*) 220550f2e948Smrg version_type=linux 220650f2e948Smrg need_version=no 220750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 220850f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 220950f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 221050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 221150f2e948Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 221250f2e948Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 221350f2e948Smrg # the default ld.so.conf also contains /usr/contrib/lib and 221450f2e948Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 221550f2e948Smrg # libtool to hard-code these into programs 22161ac89addSmrg ;; 221745bc899bSmrg 22185592a31fSmrgcygwin* | mingw* | pw32* | cegcc*) 221950f2e948Smrg version_type=windows 222050f2e948Smrg shrext_cmds=".dll" 222150f2e948Smrg need_version=no 222250f2e948Smrg need_lib_prefix=no 222345bc899bSmrg 222450f2e948Smrg case $GCC,$host_os in 22255592a31fSmrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 222650f2e948Smrg library_names_spec='$libname.dll.a' 222750f2e948Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 222850f2e948Smrg postinstall_cmds='base_file=`basename \${file}`~ 22295592a31fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 223050f2e948Smrg dldir=$destdir/`dirname \$dlpath`~ 223150f2e948Smrg test -d \$dldir || mkdir -p \$dldir~ 223250f2e948Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 22335592a31fSmrg chmod a+x \$dldir/$dlname~ 22345592a31fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 22355592a31fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 22365592a31fSmrg fi' 223750f2e948Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 223850f2e948Smrg dlpath=$dir/\$dldll~ 22395592a31fSmrg $RM \$dlpath' 224050f2e948Smrg shlibpath_overrides_runpath=yes 224145bc899bSmrg 224250f2e948Smrg case $host_os in 224350f2e948Smrg cygwin*) 224450f2e948Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 224550f2e948Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 224650f2e948Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 224750f2e948Smrg ;; 22485592a31fSmrg mingw* | cegcc*) 224950f2e948Smrg # MinGW DLLs use traditional 'lib' prefix 225050f2e948Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 22515592a31fSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 22525592a31fSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 225350f2e948Smrg # It is most probably a Windows format PATH printed by 225450f2e948Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 225550f2e948Smrg # path with ; separators, and with drive letters. We can handle the 225650f2e948Smrg # drive letters (cygwin fileutils understands them), so leave them, 225750f2e948Smrg # especially as we might pass files found there to a mingw objdump, 225850f2e948Smrg # which wouldn't understand a cygwinified path. Ahh. 22595592a31fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 226050f2e948Smrg else 22615592a31fSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 226250f2e948Smrg fi 226350f2e948Smrg ;; 226450f2e948Smrg pw32*) 226550f2e948Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 226650f2e948Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 226745bc899bSmrg ;; 226845bc899bSmrg esac 226950f2e948Smrg ;; 227045bc899bSmrg 227150f2e948Smrg *) 227250f2e948Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 227350f2e948Smrg ;; 227450f2e948Smrg esac 227550f2e948Smrg dynamic_linker='Win32 ld.exe' 227650f2e948Smrg # FIXME: first we should search . and the directory the executable is in 227750f2e948Smrg shlibpath_var=PATH 22781ac89addSmrg ;; 227945bc899bSmrg 228050f2e948Smrgdarwin* | rhapsody*) 228150f2e948Smrg dynamic_linker="$host_os dyld" 228250f2e948Smrg version_type=darwin 228350f2e948Smrg need_lib_prefix=no 228450f2e948Smrg need_version=no 22855592a31fSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 228650f2e948Smrg soname_spec='${libname}${release}${major}$shared_ext' 228750f2e948Smrg shlibpath_overrides_runpath=yes 228850f2e948Smrg shlibpath_var=DYLD_LIBRARY_PATH 228950f2e948Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 22905592a31fSmrgm4_if([$1], [],[ 22915592a31fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 229250f2e948Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 229350f2e948Smrg ;; 229450f2e948Smrg 229550f2e948Smrgdgux*) 229650f2e948Smrg version_type=linux 229750f2e948Smrg need_lib_prefix=no 229850f2e948Smrg need_version=no 229950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 230050f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 230150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 230250f2e948Smrg ;; 230350f2e948Smrg 230450f2e948Smrgfreebsd1*) 230550f2e948Smrg dynamic_linker=no 230650f2e948Smrg ;; 230750f2e948Smrg 230850f2e948Smrgfreebsd* | dragonfly*) 230950f2e948Smrg # DragonFly does not have aout. When/if they implement a new 231050f2e948Smrg # versioning mechanism, adjust this. 231150f2e948Smrg if test -x /usr/bin/objformat; then 231250f2e948Smrg objformat=`/usr/bin/objformat` 231350f2e948Smrg else 231450f2e948Smrg case $host_os in 231550f2e948Smrg freebsd[[123]]*) objformat=aout ;; 231650f2e948Smrg *) objformat=elf ;; 231750f2e948Smrg esac 231850f2e948Smrg fi 231950f2e948Smrg version_type=freebsd-$objformat 232050f2e948Smrg case $version_type in 232150f2e948Smrg freebsd-elf*) 232250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 232350f2e948Smrg need_version=no 232450f2e948Smrg need_lib_prefix=no 232550f2e948Smrg ;; 232650f2e948Smrg freebsd-*) 232750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 232850f2e948Smrg need_version=yes 232950f2e948Smrg ;; 233050f2e948Smrg esac 233150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 233250f2e948Smrg case $host_os in 233350f2e948Smrg freebsd2*) 233450f2e948Smrg shlibpath_overrides_runpath=yes 233550f2e948Smrg ;; 233650f2e948Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 233750f2e948Smrg shlibpath_overrides_runpath=yes 233850f2e948Smrg hardcode_into_libs=yes 233950f2e948Smrg ;; 234050f2e948Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 234150f2e948Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 234250f2e948Smrg shlibpath_overrides_runpath=no 234350f2e948Smrg hardcode_into_libs=yes 234450f2e948Smrg ;; 234550f2e948Smrg *) # from 4.6 on, and DragonFly 234650f2e948Smrg shlibpath_overrides_runpath=yes 234750f2e948Smrg hardcode_into_libs=yes 234850f2e948Smrg ;; 234950f2e948Smrg esac 235050f2e948Smrg ;; 235150f2e948Smrg 235250f2e948Smrggnu*) 235350f2e948Smrg version_type=linux 235450f2e948Smrg need_lib_prefix=no 235550f2e948Smrg need_version=no 235650f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 235750f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 235850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 235950f2e948Smrg hardcode_into_libs=yes 236050f2e948Smrg ;; 236150f2e948Smrg 236250f2e948Smrghpux9* | hpux10* | hpux11*) 236350f2e948Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 236450f2e948Smrg # link against other versions. 236550f2e948Smrg version_type=sunos 236650f2e948Smrg need_lib_prefix=no 236750f2e948Smrg need_version=no 236850f2e948Smrg case $host_cpu in 23691ac89addSmrg ia64*) 237050f2e948Smrg shrext_cmds='.so' 237150f2e948Smrg hardcode_into_libs=yes 237250f2e948Smrg dynamic_linker="$host_os dld.so" 237350f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 237450f2e948Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 237550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 237650f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 237750f2e948Smrg if test "X$HPUX_IA64_MODE" = X32; then 237850f2e948Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 237950f2e948Smrg else 238050f2e948Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 238150f2e948Smrg fi 238250f2e948Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 238345bc899bSmrg ;; 23845592a31fSmrg hppa*64*) 23855592a31fSmrg shrext_cmds='.sl' 23865592a31fSmrg hardcode_into_libs=yes 23875592a31fSmrg dynamic_linker="$host_os dld.sl" 23885592a31fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 23895592a31fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 23905592a31fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23915592a31fSmrg soname_spec='${libname}${release}${shared_ext}$major' 23925592a31fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 23935592a31fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 23945592a31fSmrg ;; 23955592a31fSmrg *) 239650f2e948Smrg shrext_cmds='.sl' 239750f2e948Smrg dynamic_linker="$host_os dld.sl" 239850f2e948Smrg shlibpath_var=SHLIB_PATH 239950f2e948Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 240050f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 240150f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 240245bc899bSmrg ;; 24031ac89addSmrg esac 240450f2e948Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 240550f2e948Smrg postinstall_cmds='chmod 555 $lib' 24061ac89addSmrg ;; 240745bc899bSmrg 240850f2e948Smrginterix[[3-9]]*) 240950f2e948Smrg version_type=linux 241050f2e948Smrg need_lib_prefix=no 241150f2e948Smrg need_version=no 241250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 241350f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 241450f2e948Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 241550f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 241650f2e948Smrg shlibpath_overrides_runpath=no 241750f2e948Smrg hardcode_into_libs=yes 24181ac89addSmrg ;; 241945bc899bSmrg 24201ac89addSmrgirix5* | irix6* | nonstopux*) 242150f2e948Smrg case $host_os in 242250f2e948Smrg nonstopux*) version_type=nonstopux ;; 242350f2e948Smrg *) 242450f2e948Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 242550f2e948Smrg version_type=linux 242650f2e948Smrg else 242750f2e948Smrg version_type=irix 242850f2e948Smrg fi ;; 24291ac89addSmrg esac 243050f2e948Smrg need_lib_prefix=no 243150f2e948Smrg need_version=no 243250f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 243350f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 243450f2e948Smrg case $host_os in 243550f2e948Smrg irix5* | nonstopux*) 243650f2e948Smrg libsuff= shlibsuff= 243750f2e948Smrg ;; 243850f2e948Smrg *) 243950f2e948Smrg case $LD in # libtool.m4 will add one of these switches to LD 244050f2e948Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 244150f2e948Smrg libsuff= shlibsuff= libmagic=32-bit;; 244250f2e948Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 244350f2e948Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 244450f2e948Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 244550f2e948Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 244650f2e948Smrg *) libsuff= shlibsuff= libmagic=never-match;; 244750f2e948Smrg esac 244850f2e948Smrg ;; 244950f2e948Smrg esac 245050f2e948Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 245150f2e948Smrg shlibpath_overrides_runpath=no 245250f2e948Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 245350f2e948Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 245450f2e948Smrg hardcode_into_libs=yes 245550f2e948Smrg ;; 245650f2e948Smrg 245750f2e948Smrg# No shared lib support for Linux oldld, aout, or coff. 245850f2e948Smrglinux*oldld* | linux*aout* | linux*coff*) 245950f2e948Smrg dynamic_linker=no 24601ac89addSmrg ;; 246145bc899bSmrg 24621ac89addSmrg# This must be Linux ELF. 246350f2e948Smrglinux* | k*bsd*-gnu) 246450f2e948Smrg version_type=linux 246550f2e948Smrg need_lib_prefix=no 246650f2e948Smrg need_version=no 246750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 246850f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 246950f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 247050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 247150f2e948Smrg shlibpath_overrides_runpath=no 24725592a31fSmrg # Some binutils ld are patched to set DT_RUNPATH 24735592a31fSmrg save_LDFLAGS=$LDFLAGS 24745592a31fSmrg save_libdir=$libdir 24755592a31fSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 24765592a31fSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 24775592a31fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 24785592a31fSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 24795592a31fSmrg [shlibpath_overrides_runpath=yes])]) 24805592a31fSmrg LDFLAGS=$save_LDFLAGS 24815592a31fSmrg libdir=$save_libdir 24825592a31fSmrg 248350f2e948Smrg # This implies no fast_install, which is unacceptable. 248450f2e948Smrg # Some rework will be needed to allow for fast_install 248550f2e948Smrg # before this can be enabled. 248650f2e948Smrg hardcode_into_libs=yes 24875592a31fSmrg 24885592a31fSmrg # Add ABI-specific directories to the system library path. 24895592a31fSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 249050f2e948Smrg 249150f2e948Smrg # Append ld.so.conf contents to the search path 249250f2e948Smrg if test -f /etc/ld.so.conf; then 24935592a31fSmrg 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' ' '` 24943a925b30Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 249550f2e948Smrg fi 249650f2e948Smrg 249750f2e948Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 249850f2e948Smrg # powerpc, because MkLinux only supported shared libraries with the 249950f2e948Smrg # GNU dynamic linker. Since this was broken with cross compilers, 250050f2e948Smrg # most powerpc-linux boxes support dynamic linking these days and 250150f2e948Smrg # people can always --disable-shared, the test was removed, and we 250250f2e948Smrg # assume the GNU/Linux dynamic linker is in use. 250350f2e948Smrg dynamic_linker='GNU/Linux ld.so' 25041ac89addSmrg ;; 250545bc899bSmrg 25061ac89addSmrgnetbsd*) 250750f2e948Smrg version_type=sunos 250850f2e948Smrg need_lib_prefix=no 250950f2e948Smrg need_version=no 25105592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 251150f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 251250f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 251350f2e948Smrg dynamic_linker='NetBSD (a.out) ld.so' 25141ac89addSmrg else 251550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 251650f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 251750f2e948Smrg dynamic_linker='NetBSD ld.elf_so' 25181ac89addSmrg fi 251950f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 252050f2e948Smrg shlibpath_overrides_runpath=yes 252150f2e948Smrg hardcode_into_libs=yes 25221ac89addSmrg ;; 252345bc899bSmrg 252450f2e948Smrgnewsos6) 252550f2e948Smrg version_type=linux 252650f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 252750f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 252850f2e948Smrg shlibpath_overrides_runpath=yes 25291ac89addSmrg ;; 253045bc899bSmrg 25315592a31fSmrg*nto* | *qnx*) 25325592a31fSmrg version_type=qnx 253350f2e948Smrg need_lib_prefix=no 253450f2e948Smrg need_version=no 253550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 253650f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 253750f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 25385592a31fSmrg shlibpath_overrides_runpath=no 25395592a31fSmrg hardcode_into_libs=yes 25405592a31fSmrg dynamic_linker='ldqnx.so' 25411ac89addSmrg ;; 254245bc899bSmrg 25431ac89addSmrgopenbsd*) 254450f2e948Smrg version_type=sunos 254550f2e948Smrg sys_lib_dlsearch_path_spec="/usr/lib" 254650f2e948Smrg need_lib_prefix=no 254750f2e948Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 254850f2e948Smrg case $host_os in 25495592a31fSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 25505592a31fSmrg *) need_version=no ;; 255150f2e948Smrg esac 255250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 255350f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 255450f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 25555592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 255650f2e948Smrg case $host_os in 255750f2e948Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 255850f2e948Smrg shlibpath_overrides_runpath=no 255950f2e948Smrg ;; 256050f2e948Smrg *) 256150f2e948Smrg shlibpath_overrides_runpath=yes 256250f2e948Smrg ;; 256350f2e948Smrg esac 25641ac89addSmrg else 256550f2e948Smrg shlibpath_overrides_runpath=yes 25661ac89addSmrg fi 25671ac89addSmrg ;; 256845bc899bSmrg 256950f2e948Smrgos2*) 257050f2e948Smrg libname_spec='$name' 257150f2e948Smrg shrext_cmds=".dll" 257250f2e948Smrg need_lib_prefix=no 257350f2e948Smrg library_names_spec='$libname${shared_ext} $libname.a' 257450f2e948Smrg dynamic_linker='OS/2 ld.exe' 257550f2e948Smrg shlibpath_var=LIBPATH 25761ac89addSmrg ;; 25771ac89addSmrg 257850f2e948Smrgosf3* | osf4* | osf5*) 257950f2e948Smrg version_type=osf 258050f2e948Smrg need_lib_prefix=no 258150f2e948Smrg need_version=no 258250f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 258350f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 258450f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 258550f2e948Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 258650f2e948Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 25871ac89addSmrg ;; 258845bc899bSmrg 258950f2e948Smrgrdos*) 259050f2e948Smrg dynamic_linker=no 25911ac89addSmrg ;; 259245bc899bSmrg 259350f2e948Smrgsolaris*) 259450f2e948Smrg version_type=linux 259550f2e948Smrg need_lib_prefix=no 259650f2e948Smrg need_version=no 259750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 259850f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 259950f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 260050f2e948Smrg shlibpath_overrides_runpath=yes 260150f2e948Smrg hardcode_into_libs=yes 260250f2e948Smrg # ldd complains unless libraries are executable 260350f2e948Smrg postinstall_cmds='chmod +x $lib' 260450f2e948Smrg ;; 260545bc899bSmrg 260650f2e948Smrgsunos4*) 260750f2e948Smrg version_type=sunos 260850f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 260950f2e948Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 261050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 261150f2e948Smrg shlibpath_overrides_runpath=yes 261250f2e948Smrg if test "$with_gnu_ld" = yes; then 261350f2e948Smrg need_lib_prefix=no 26141ac89addSmrg fi 261550f2e948Smrg need_version=yes 261645bc899bSmrg ;; 261745bc899bSmrg 261850f2e948Smrgsysv4 | sysv4.3*) 261950f2e948Smrg version_type=linux 262050f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 262150f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 262250f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 262350f2e948Smrg case $host_vendor in 262450f2e948Smrg sni) 262550f2e948Smrg shlibpath_overrides_runpath=no 262650f2e948Smrg need_lib_prefix=no 262750f2e948Smrg runpath_var=LD_RUN_PATH 262850f2e948Smrg ;; 262950f2e948Smrg siemens) 263050f2e948Smrg need_lib_prefix=no 263150f2e948Smrg ;; 263250f2e948Smrg motorola) 263350f2e948Smrg need_lib_prefix=no 263450f2e948Smrg need_version=no 263550f2e948Smrg shlibpath_overrides_runpath=no 263650f2e948Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 263750f2e948Smrg ;; 2638226fade8Smrg esac 263950f2e948Smrg ;; 264045bc899bSmrg 264150f2e948Smrgsysv4*MP*) 264250f2e948Smrg if test -d /usr/nec ;then 264350f2e948Smrg version_type=linux 264450f2e948Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 264550f2e948Smrg soname_spec='$libname${shared_ext}.$major' 264650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 264750f2e948Smrg fi 264850f2e948Smrg ;; 264945bc899bSmrg 265050f2e948Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 265150f2e948Smrg version_type=freebsd-elf 265250f2e948Smrg need_lib_prefix=no 265350f2e948Smrg need_version=no 265450f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 265550f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 265650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 26575592a31fSmrg shlibpath_overrides_runpath=yes 265850f2e948Smrg hardcode_into_libs=yes 265950f2e948Smrg if test "$with_gnu_ld" = yes; then 266050f2e948Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2661226fade8Smrg else 266250f2e948Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 266350f2e948Smrg case $host_os in 266450f2e948Smrg sco3.2v5*) 266550f2e948Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 266650f2e948Smrg ;; 266750f2e948Smrg esac 2668226fade8Smrg fi 266950f2e948Smrg sys_lib_dlsearch_path_spec='/usr/lib' 267050f2e948Smrg ;; 267145bc899bSmrg 26725592a31fSmrgtpf*) 26735592a31fSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 26745592a31fSmrg version_type=linux 26755592a31fSmrg need_lib_prefix=no 26765592a31fSmrg need_version=no 26775592a31fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26785592a31fSmrg shlibpath_var=LD_LIBRARY_PATH 26795592a31fSmrg shlibpath_overrides_runpath=no 26805592a31fSmrg hardcode_into_libs=yes 26815592a31fSmrg ;; 26825592a31fSmrg 268350f2e948Smrguts4*) 268450f2e948Smrg version_type=linux 268550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 268650f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 268750f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 268850f2e948Smrg ;; 2689226fade8Smrg 269050f2e948Smrg*) 269150f2e948Smrg dynamic_linker=no 269250f2e948Smrg ;; 269350f2e948Smrgesac 269450f2e948SmrgAC_MSG_RESULT([$dynamic_linker]) 269550f2e948Smrgtest "$dynamic_linker" = no && can_build_shared=no 2696226fade8Smrg 269750f2e948Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 269850f2e948Smrgif test "$GCC" = yes; then 269950f2e948Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 27001ac89addSmrgfi 270145bc899bSmrg 27025592a31fSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 27035592a31fSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 27045592a31fSmrgfi 27055592a31fSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 27065592a31fSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 27075592a31fSmrgfi 270845bc899bSmrg 27095592a31fSmrg_LT_DECL([], [variables_saved_for_relink], [1], 27105592a31fSmrg [Variables whose values should be saved in libtool wrapper scripts and 27115592a31fSmrg restored at link time]) 27125592a31fSmrg_LT_DECL([], [need_lib_prefix], [0], 27135592a31fSmrg [Do we need the "lib" prefix for modules?]) 27145592a31fSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 27155592a31fSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 27165592a31fSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 27175592a31fSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 27185592a31fSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 27195592a31fSmrg [Is shlibpath searched before the hard-coded library search path?]) 27205592a31fSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 27215592a31fSmrg_LT_DECL([], [library_names_spec], [1], 27225592a31fSmrg [[List of archive names. First name is the real one, the rest are links. 27235592a31fSmrg The last name is the one that the linker finds with -lNAME]]) 27245592a31fSmrg_LT_DECL([], [soname_spec], [1], 27255592a31fSmrg [[The coded name of the library, if different from the real name]]) 27265592a31fSmrg_LT_DECL([], [postinstall_cmds], [2], 27275592a31fSmrg [Command to use after installation of a shared archive]) 27285592a31fSmrg_LT_DECL([], [postuninstall_cmds], [2], 27295592a31fSmrg [Command to use after uninstallation of a shared archive]) 27305592a31fSmrg_LT_DECL([], [finish_cmds], [2], 27315592a31fSmrg [Commands used to finish a libtool library installation in a directory]) 27325592a31fSmrg_LT_DECL([], [finish_eval], [1], 27335592a31fSmrg [[As "finish_cmds", except a single script fragment to be evaled but 27345592a31fSmrg not shown]]) 27355592a31fSmrg_LT_DECL([], [hardcode_into_libs], [0], 27365592a31fSmrg [Whether we should hardcode library paths into libraries]) 27375592a31fSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 27385592a31fSmrg [Compile-time system search path for libraries]) 27395592a31fSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 27405592a31fSmrg [Run-time system search path for libraries]) 27415592a31fSmrg])# _LT_SYS_DYNAMIC_LINKER 27425592a31fSmrg 27435592a31fSmrg 27445592a31fSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 27453a925b30Smrg# -------------------------- 27463a925b30Smrg# find a file program which can recognize shared library 27475592a31fSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 27485592a31fSmrg[m4_require([_LT_DECL_EGREP])dnl 27493a925b30SmrgAC_MSG_CHECKING([for $1]) 27503a925b30SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 27513a925b30Smrg[case $MAGIC_CMD in 27523a925b30Smrg[[\\/*] | ?:[\\/]*]) 275350f2e948Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 275450f2e948Smrg ;; 275550f2e948Smrg*) 275650f2e948Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 275750f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 275850f2e948Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 275950f2e948Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 276050f2e948Smrgdnl not every word. This closes a longstanding sh security hole. 27615592a31fSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 276250f2e948Smrg for ac_dir in $ac_dummy; do 276350f2e948Smrg IFS="$lt_save_ifs" 276450f2e948Smrg test -z "$ac_dir" && ac_dir=. 276550f2e948Smrg if test -f $ac_dir/$1; then 276650f2e948Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 276750f2e948Smrg if test -n "$file_magic_test_file"; then 276850f2e948Smrg case $deplibs_check_method in 276950f2e948Smrg "file_magic "*) 277050f2e948Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 277150f2e948Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 277250f2e948Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 277350f2e948Smrg $EGREP "$file_magic_regex" > /dev/null; then 277450f2e948Smrg : 277550f2e948Smrg else 27765592a31fSmrg cat <<_LT_EOF 1>&2 277745bc899bSmrg 277850f2e948Smrg*** Warning: the command libtool uses to detect shared libraries, 277950f2e948Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 278050f2e948Smrg*** The result is that libtool may fail to recognize shared libraries 278150f2e948Smrg*** as such. This will affect the creation of libtool libraries that 278250f2e948Smrg*** depend on shared libraries, but programs linked with such libtool 278350f2e948Smrg*** libraries will work regardless of this problem. Nevertheless, you 278450f2e948Smrg*** may want to report the problem to your system manager and/or to 278550f2e948Smrg*** bug-libtool@gnu.org 278645bc899bSmrg 27875592a31fSmrg_LT_EOF 278850f2e948Smrg fi ;; 278950f2e948Smrg esac 279050f2e948Smrg fi 279150f2e948Smrg break 279250f2e948Smrg fi 279350f2e948Smrg done 279450f2e948Smrg IFS="$lt_save_ifs" 279550f2e948Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 279645bc899bSmrg ;; 279750f2e948Smrgesac]) 279850f2e948SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 279950f2e948Smrgif test -n "$MAGIC_CMD"; then 280050f2e948Smrg AC_MSG_RESULT($MAGIC_CMD) 280150f2e948Smrgelse 280250f2e948Smrg AC_MSG_RESULT(no) 280350f2e948Smrgfi 28045592a31fSmrg_LT_DECL([], [MAGIC_CMD], [0], 28055592a31fSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 28065592a31fSmrg])# _LT_PATH_TOOL_PREFIX 280745bc899bSmrg 28085592a31fSmrg# Old name: 28095592a31fSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 28105592a31fSmrgdnl aclocal-1.4 backwards compatibility: 28115592a31fSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 281245bc899bSmrg 28135592a31fSmrg 28145592a31fSmrg# _LT_PATH_MAGIC 28155592a31fSmrg# -------------- 281650f2e948Smrg# find a file program which can recognize a shared library 28175592a31fSmrgm4_defun([_LT_PATH_MAGIC], 28185592a31fSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 281950f2e948Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 282050f2e948Smrg if test -n "$ac_tool_prefix"; then 28215592a31fSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 282250f2e948Smrg else 282350f2e948Smrg MAGIC_CMD=: 282450f2e948Smrg fi 282550f2e948Smrgfi 28265592a31fSmrg])# _LT_PATH_MAGIC 282745bc899bSmrg 282845bc899bSmrg 28295592a31fSmrg# LT_PATH_LD 283050f2e948Smrg# ---------- 283150f2e948Smrg# find the pathname to the GNU or non-GNU linker 28325592a31fSmrgAC_DEFUN([LT_PATH_LD], 28335592a31fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 28343a925b30SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 28353a925b30SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 28365592a31fSmrgm4_require([_LT_DECL_SED])dnl 28375592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 28385592a31fSmrg 28395592a31fSmrgAC_ARG_WITH([gnu-ld], 28405592a31fSmrg [AS_HELP_STRING([--with-gnu-ld], 28415592a31fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 28425592a31fSmrg [test "$withval" = no || with_gnu_ld=yes], 28435592a31fSmrg [with_gnu_ld=no])dnl 28445592a31fSmrg 284550f2e948Smrgac_prog=ld 284650f2e948Smrgif test "$GCC" = yes; then 284750f2e948Smrg # Check if gcc -print-prog-name=ld gives a path. 284850f2e948Smrg AC_MSG_CHECKING([for ld used by $CC]) 284950f2e948Smrg case $host in 285050f2e948Smrg *-*-mingw*) 285150f2e948Smrg # gcc leaves a trailing carriage return which upsets mingw 285250f2e948Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 285350f2e948Smrg *) 285450f2e948Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 285550f2e948Smrg esac 285650f2e948Smrg case $ac_prog in 285750f2e948Smrg # Accept absolute paths. 285850f2e948Smrg [[\\/]]* | ?:[[\\/]]*) 285950f2e948Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 286050f2e948Smrg # Canonicalize the pathname of ld 28615592a31fSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 28625592a31fSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 28635592a31fSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 286450f2e948Smrg done 286550f2e948Smrg test -z "$LD" && LD="$ac_prog" 286650f2e948Smrg ;; 286750f2e948Smrg "") 286850f2e948Smrg # If it fails, then pretend we aren't using GCC. 286950f2e948Smrg ac_prog=ld 287050f2e948Smrg ;; 287150f2e948Smrg *) 287250f2e948Smrg # If it is relative, then search for the first ld in PATH. 287350f2e948Smrg with_gnu_ld=unknown 287450f2e948Smrg ;; 287550f2e948Smrg esac 287650f2e948Smrgelif test "$with_gnu_ld" = yes; then 287750f2e948Smrg AC_MSG_CHECKING([for GNU ld]) 2878226fade8Smrgelse 287950f2e948Smrg AC_MSG_CHECKING([for non-GNU ld]) 2880226fade8Smrgfi 288150f2e948SmrgAC_CACHE_VAL(lt_cv_path_LD, 288250f2e948Smrg[if test -z "$LD"; then 288350f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 288450f2e948Smrg for ac_dir in $PATH; do 288550f2e948Smrg IFS="$lt_save_ifs" 288650f2e948Smrg test -z "$ac_dir" && ac_dir=. 288750f2e948Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 288850f2e948Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 288950f2e948Smrg # Check to see if the program is GNU ld. I'd rather use --version, 289050f2e948Smrg # but apparently some variants of GNU ld only accept -v. 289150f2e948Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 289250f2e948Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 289350f2e948Smrg *GNU* | *'with BFD'*) 289450f2e948Smrg test "$with_gnu_ld" != no && break 289550f2e948Smrg ;; 289650f2e948Smrg *) 289750f2e948Smrg test "$with_gnu_ld" != yes && break 289850f2e948Smrg ;; 289950f2e948Smrg esac 290050f2e948Smrg fi 290150f2e948Smrg done 290250f2e948Smrg IFS="$lt_save_ifs" 2903226fade8Smrgelse 290450f2e948Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 290550f2e948Smrgfi]) 290650f2e948SmrgLD="$lt_cv_path_LD" 290750f2e948Smrgif test -n "$LD"; then 290850f2e948Smrg AC_MSG_RESULT($LD) 2909226fade8Smrgelse 291050f2e948Smrg AC_MSG_RESULT(no) 2911226fade8Smrgfi 291250f2e948Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 29135592a31fSmrg_LT_PATH_LD_GNU 29145592a31fSmrgAC_SUBST([LD]) 2915226fade8Smrg 29165592a31fSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 29175592a31fSmrg])# LT_PATH_LD 2918226fade8Smrg 29195592a31fSmrg# Old names: 29205592a31fSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 29215592a31fSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 29225592a31fSmrgdnl aclocal-1.4 backwards compatibility: 29235592a31fSmrgdnl AC_DEFUN([AM_PROG_LD], []) 29245592a31fSmrgdnl AC_DEFUN([AC_PROG_LD], []) 29255592a31fSmrg 29265592a31fSmrg 29275592a31fSmrg# _LT_PATH_LD_GNU 29285592a31fSmrg#- -------------- 29295592a31fSmrgm4_defun([_LT_PATH_LD_GNU], 29305592a31fSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 293150f2e948Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 293250f2e948Smrgcase `$LD -v 2>&1 </dev/null` in 293350f2e948Smrg*GNU* | *'with BFD'*) 293450f2e948Smrg lt_cv_prog_gnu_ld=yes 293550f2e948Smrg ;; 293650f2e948Smrg*) 293750f2e948Smrg lt_cv_prog_gnu_ld=no 293850f2e948Smrg ;; 293950f2e948Smrgesac]) 294050f2e948Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 29415592a31fSmrg])# _LT_PATH_LD_GNU 2942226fade8Smrg 2943226fade8Smrg 29445592a31fSmrg# _LT_CMD_RELOAD 29455592a31fSmrg# -------------- 294650f2e948Smrg# find reload flag for linker 294750f2e948Smrg# -- PORTME Some linkers may need a different reload flag. 29485592a31fSmrgm4_defun([_LT_CMD_RELOAD], 294950f2e948Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 295050f2e948Smrg lt_cv_ld_reload_flag, 295150f2e948Smrg [lt_cv_ld_reload_flag='-r']) 295250f2e948Smrgreload_flag=$lt_cv_ld_reload_flag 295350f2e948Smrgcase $reload_flag in 295450f2e948Smrg"" | " "*) ;; 295550f2e948Smrg*) reload_flag=" $reload_flag" ;; 295650f2e948Smrgesac 295750f2e948Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 295850f2e948Smrgcase $host_os in 295950f2e948Smrg darwin*) 296050f2e948Smrg if test "$GCC" = yes; then 296150f2e948Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 29621ac89addSmrg else 296350f2e948Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 29641ac89addSmrg fi 296550f2e948Smrg ;; 296650f2e948Smrgesac 29675592a31fSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 29685592a31fSmrg_LT_DECL([], [reload_cmds], [2])dnl 29695592a31fSmrg])# _LT_CMD_RELOAD 297045bc899bSmrg 2971226fade8Smrg 29725592a31fSmrg# _LT_CHECK_MAGIC_METHOD 29735592a31fSmrg# ---------------------- 297450f2e948Smrg# how to check for library dependencies 297550f2e948Smrg# -- PORTME fill in with the dynamic library characteristics 29765592a31fSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 29775592a31fSmrg[m4_require([_LT_DECL_EGREP]) 29785592a31fSmrgm4_require([_LT_DECL_OBJDUMP]) 29795592a31fSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 298050f2e948Smrglt_cv_deplibs_check_method, 298150f2e948Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 298250f2e948Smrglt_cv_file_magic_test_file= 298350f2e948Smrglt_cv_deplibs_check_method='unknown' 298450f2e948Smrg# Need to set the preceding variable on all platforms that support 298550f2e948Smrg# interlibrary dependencies. 298650f2e948Smrg# 'none' -- dependencies not supported. 298750f2e948Smrg# `unknown' -- same as none, but documents that we really don't know. 298850f2e948Smrg# 'pass_all' -- all dependencies passed with no checks. 298950f2e948Smrg# 'test_compile' -- check by making test program. 299050f2e948Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 299150f2e948Smrg# which responds to the $file_magic_cmd with a given extended regex. 299250f2e948Smrg# If you have `file' or equivalent on your system and you're not sure 299350f2e948Smrg# whether `pass_all' will *always* work, you probably want this one. 299445bc899bSmrg 2995226fade8Smrgcase $host_os in 299650f2e948Smrgaix[[4-9]]*) 299750f2e948Smrg lt_cv_deplibs_check_method=pass_all 299850f2e948Smrg ;; 299945bc899bSmrg 300050f2e948Smrgbeos*) 300150f2e948Smrg lt_cv_deplibs_check_method=pass_all 300250f2e948Smrg ;; 300345bc899bSmrg 300450f2e948Smrgbsdi[[45]]*) 300550f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 300650f2e948Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 300750f2e948Smrg lt_cv_file_magic_test_file=/shlib/libc.so 300850f2e948Smrg ;; 300945bc899bSmrg 301050f2e948Smrgcygwin*) 301150f2e948Smrg # func_win32_libid is a shell function defined in ltmain.sh 301250f2e948Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 301350f2e948Smrg lt_cv_file_magic_cmd='func_win32_libid' 301450f2e948Smrg ;; 301545bc899bSmrg 301650f2e948Smrgmingw* | pw32*) 301750f2e948Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 301850f2e948Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 301950f2e948Smrg # unless we find 'file', for example because we are cross-compiling. 302050f2e948Smrg if ( file / ) >/dev/null 2>&1; then 302150f2e948Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 302250f2e948Smrg lt_cv_file_magic_cmd='func_win32_libid' 302350f2e948Smrg else 302450f2e948Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 302550f2e948Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 302650f2e948Smrg fi 302750f2e948Smrg ;; 302845bc899bSmrg 30295592a31fSmrgcegcc) 30305592a31fSmrg # use the weaker test based on 'objdump'. See mingw*. 30315592a31fSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 30325592a31fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 30335592a31fSmrg ;; 30345592a31fSmrg 303550f2e948Smrgdarwin* | rhapsody*) 303650f2e948Smrg lt_cv_deplibs_check_method=pass_all 303750f2e948Smrg ;; 3038226fade8Smrg 303950f2e948Smrgfreebsd* | dragonfly*) 30405592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3041226fade8Smrg case $host_cpu in 304250f2e948Smrg i*86 ) 304350f2e948Smrg # Not sure whether the presence of OpenBSD here was a mistake. 304450f2e948Smrg # Let's accept both of them until this is cleared up. 304550f2e948Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 304650f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 304750f2e948Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3048226fade8Smrg ;; 3049226fade8Smrg esac 305050f2e948Smrg else 305150f2e948Smrg lt_cv_deplibs_check_method=pass_all 305250f2e948Smrg fi 305350f2e948Smrg ;; 3054226fade8Smrg 305550f2e948Smrggnu*) 305650f2e948Smrg lt_cv_deplibs_check_method=pass_all 305750f2e948Smrg ;; 3058226fade8Smrg 305950f2e948Smrghpux10.20* | hpux11*) 306050f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 306150f2e948Smrg case $host_cpu in 306250f2e948Smrg ia64*) 306350f2e948Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 306450f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3065226fade8Smrg ;; 306650f2e948Smrg hppa*64*) 306750f2e948Smrg [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]'] 306850f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3069226fade8Smrg ;; 307050f2e948Smrg *) 307150f2e948Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 307250f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3073226fade8Smrg ;; 307450f2e948Smrg esac 307550f2e948Smrg ;; 3076226fade8Smrg 307750f2e948Smrginterix[[3-9]]*) 307850f2e948Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 307950f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 308050f2e948Smrg ;; 3081226fade8Smrg 308250f2e948Smrgirix5* | irix6* | nonstopux*) 308350f2e948Smrg case $LD in 308450f2e948Smrg *-32|*"-32 ") libmagic=32-bit;; 308550f2e948Smrg *-n32|*"-n32 ") libmagic=N32;; 308650f2e948Smrg *-64|*"-64 ") libmagic=64-bit;; 308750f2e948Smrg *) libmagic=never-match;; 308850f2e948Smrg esac 308950f2e948Smrg lt_cv_deplibs_check_method=pass_all 309050f2e948Smrg ;; 3091226fade8Smrg 309250f2e948Smrg# This must be Linux ELF. 309350f2e948Smrglinux* | k*bsd*-gnu) 309450f2e948Smrg lt_cv_deplibs_check_method=pass_all 309550f2e948Smrg ;; 3096226fade8Smrg 309750f2e948Smrgnetbsd*) 30985592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 309950f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 310050f2e948Smrg else 310150f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 310250f2e948Smrg fi 310350f2e948Smrg ;; 3104226fade8Smrg 310550f2e948Smrgnewos6*) 310650f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 310750f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 310850f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 310950f2e948Smrg ;; 3110226fade8Smrg 31115592a31fSmrg*nto* | *qnx*) 31125592a31fSmrg lt_cv_deplibs_check_method=pass_all 311350f2e948Smrg ;; 3114226fade8Smrg 311550f2e948Smrgopenbsd*) 31165592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 311750f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 311850f2e948Smrg else 311950f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 312050f2e948Smrg fi 312150f2e948Smrg ;; 3122226fade8Smrg 312350f2e948Smrgosf3* | osf4* | osf5*) 312450f2e948Smrg lt_cv_deplibs_check_method=pass_all 312550f2e948Smrg ;; 3126226fade8Smrg 312750f2e948Smrgrdos*) 312850f2e948Smrg lt_cv_deplibs_check_method=pass_all 312950f2e948Smrg ;; 3130226fade8Smrg 313150f2e948Smrgsolaris*) 313250f2e948Smrg lt_cv_deplibs_check_method=pass_all 313350f2e948Smrg ;; 313450f2e948Smrg 31355592a31fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 31365592a31fSmrg lt_cv_deplibs_check_method=pass_all 31375592a31fSmrg ;; 31385592a31fSmrg 313950f2e948Smrgsysv4 | sysv4.3*) 314050f2e948Smrg case $host_vendor in 314150f2e948Smrg motorola) 314250f2e948Smrg 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]]' 314350f2e948Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3144226fade8Smrg ;; 314550f2e948Smrg ncr) 314650f2e948Smrg lt_cv_deplibs_check_method=pass_all 3147226fade8Smrg ;; 314850f2e948Smrg sequent) 314950f2e948Smrg lt_cv_file_magic_cmd='/bin/file' 315050f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3151226fade8Smrg ;; 315250f2e948Smrg sni) 315350f2e948Smrg lt_cv_file_magic_cmd='/bin/file' 315450f2e948Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 315550f2e948Smrg lt_cv_file_magic_test_file=/lib/libc.so 315650f2e948Smrg ;; 315750f2e948Smrg siemens) 315850f2e948Smrg lt_cv_deplibs_check_method=pass_all 315950f2e948Smrg ;; 316050f2e948Smrg pc) 316150f2e948Smrg lt_cv_deplibs_check_method=pass_all 316250f2e948Smrg ;; 316350f2e948Smrg esac 316450f2e948Smrg ;; 316545bc899bSmrg 31665592a31fSmrgtpf*) 316750f2e948Smrg lt_cv_deplibs_check_method=pass_all 316850f2e948Smrg ;; 3169226fade8Smrgesac 3170226fade8Smrg]) 317150f2e948Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 317250f2e948Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 317350f2e948Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 31745592a31fSmrg 31755592a31fSmrg_LT_DECL([], [deplibs_check_method], [1], 31765592a31fSmrg [Method to check whether dependent libraries are shared objects]) 31775592a31fSmrg_LT_DECL([], [file_magic_cmd], [1], 31785592a31fSmrg [Command to use when deplibs_check_method == "file_magic"]) 31795592a31fSmrg])# _LT_CHECK_MAGIC_METHOD 3180226fade8Smrg 318145bc899bSmrg 31825592a31fSmrg# LT_PATH_NM 318350f2e948Smrg# ---------- 31845592a31fSmrg# find the pathname to a BSD- or MS-compatible name lister 31855592a31fSmrgAC_DEFUN([LT_PATH_NM], 31865592a31fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 31875592a31fSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 318850f2e948Smrg[if test -n "$NM"; then 318950f2e948Smrg # Let the user override the test. 319050f2e948Smrg lt_cv_path_NM="$NM" 319150f2e948Smrgelse 319250f2e948Smrg lt_nm_to_check="${ac_tool_prefix}nm" 319350f2e948Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 319450f2e948Smrg lt_nm_to_check="$lt_nm_to_check nm" 319550f2e948Smrg fi 319650f2e948Smrg for lt_tmp_nm in $lt_nm_to_check; do 319750f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 319850f2e948Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 319950f2e948Smrg IFS="$lt_save_ifs" 320050f2e948Smrg test -z "$ac_dir" && ac_dir=. 320150f2e948Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 320250f2e948Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 320350f2e948Smrg # Check to see if the nm accepts a BSD-compat flag. 320450f2e948Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 320550f2e948Smrg # nm: unknown option "B" ignored 320650f2e948Smrg # Tru64's nm complains that /dev/null is an invalid object file 320750f2e948Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 320850f2e948Smrg */dev/null* | *'Invalid file or object type'*) 320950f2e948Smrg lt_cv_path_NM="$tmp_nm -B" 321050f2e948Smrg break 321150f2e948Smrg ;; 321250f2e948Smrg *) 321350f2e948Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 321450f2e948Smrg */dev/null*) 321550f2e948Smrg lt_cv_path_NM="$tmp_nm -p" 321650f2e948Smrg break 321750f2e948Smrg ;; 321850f2e948Smrg *) 321950f2e948Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 322050f2e948Smrg continue # so that we can try to find one that supports BSD flags 322150f2e948Smrg ;; 322250f2e948Smrg esac 322350f2e948Smrg ;; 322450f2e948Smrg esac 322550f2e948Smrg fi 322650f2e948Smrg done 322750f2e948Smrg IFS="$lt_save_ifs" 3228226fade8Smrg done 32295592a31fSmrg : ${lt_cv_path_NM=no} 323050f2e948Smrgfi]) 32315592a31fSmrgif test "$lt_cv_path_NM" != "no"; then 32325592a31fSmrg NM="$lt_cv_path_NM" 32335592a31fSmrgelse 32345592a31fSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 32355592a31fSmrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 32365592a31fSmrg AC_SUBST([DUMPBIN]) 32375592a31fSmrg if test "$DUMPBIN" != ":"; then 32385592a31fSmrg NM="$DUMPBIN" 32395592a31fSmrg fi 32405592a31fSmrgfi 32415592a31fSmrgtest -z "$NM" && NM=nm 32425592a31fSmrgAC_SUBST([NM]) 32435592a31fSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 32445592a31fSmrg 32455592a31fSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 32465592a31fSmrg [lt_cv_nm_interface="BSD nm" 32475592a31fSmrg echo "int some_variable = 0;" > conftest.$ac_ext 32485592a31fSmrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 32495592a31fSmrg (eval "$ac_compile" 2>conftest.err) 32505592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 32515592a31fSmrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 32525592a31fSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 32535592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 32545592a31fSmrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 32555592a31fSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 32565592a31fSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 32575592a31fSmrg lt_cv_nm_interface="MS dumpbin" 32585592a31fSmrg fi 32595592a31fSmrg rm -f conftest*]) 32605592a31fSmrg])# LT_PATH_NM 326145bc899bSmrg 32625592a31fSmrg# Old names: 32635592a31fSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 32645592a31fSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 32655592a31fSmrgdnl aclocal-1.4 backwards compatibility: 32665592a31fSmrgdnl AC_DEFUN([AM_PROG_NM], []) 32675592a31fSmrgdnl AC_DEFUN([AC_PROG_NM], []) 326845bc899bSmrg 32695592a31fSmrg 32705592a31fSmrg# LT_LIB_M 32715592a31fSmrg# -------- 327250f2e948Smrg# check for math library 32735592a31fSmrgAC_DEFUN([LT_LIB_M], 327450f2e948Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 327550f2e948SmrgLIBM= 327650f2e948Smrgcase $host in 327750f2e948Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 327850f2e948Smrg # These system don't have libm, or don't need it 327950f2e948Smrg ;; 328050f2e948Smrg*-ncr-sysv4.3*) 328150f2e948Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 328250f2e948Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 328350f2e948Smrg ;; 328450f2e948Smrg*) 328550f2e948Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3286226fade8Smrg ;; 3287226fade8Smrgesac 32885592a31fSmrgAC_SUBST([LIBM]) 32895592a31fSmrg])# LT_LIB_M 329045bc899bSmrg 32915592a31fSmrg# Old name: 32925592a31fSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 32935592a31fSmrgdnl aclocal-1.4 backwards compatibility: 32945592a31fSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 329545bc899bSmrg 329645bc899bSmrg 32975592a31fSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 32985592a31fSmrg# ------------------------------- 32995592a31fSmrgm4_defun([_LT_COMPILER_NO_RTTI], 33005592a31fSmrg[m4_require([_LT_TAG_COMPILER])dnl 330145bc899bSmrg 33025592a31fSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 330345bc899bSmrg 33045592a31fSmrgif test "$GCC" = yes; then 33055592a31fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 330645bc899bSmrg 33075592a31fSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 33085592a31fSmrg lt_cv_prog_compiler_rtti_exceptions, 33095592a31fSmrg [-fno-rtti -fno-exceptions], [], 33105592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 33115592a31fSmrgfi 33125592a31fSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 33135592a31fSmrg [Compiler flag to turn off builtin functions]) 33145592a31fSmrg])# _LT_COMPILER_NO_RTTI 331545bc899bSmrg 331645bc899bSmrg 33175592a31fSmrg# _LT_CMD_GLOBAL_SYMBOLS 33185592a31fSmrg# ---------------------- 33195592a31fSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 33205592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 33215592a31fSmrgAC_REQUIRE([AC_PROG_CC])dnl 33225592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 33235592a31fSmrgAC_REQUIRE([LT_PATH_LD])dnl 33245592a31fSmrgm4_require([_LT_DECL_SED])dnl 33255592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 33265592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 332745bc899bSmrg 33285592a31fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 33295592a31fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 33305592a31fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 333150f2e948Smrg[ 33325592a31fSmrg# These are sane defaults that work on at least a few old systems. 33335592a31fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 333445bc899bSmrg 33355592a31fSmrg# Character class describing NM global symbol codes. 33365592a31fSmrgsymcode='[[BCDEGRST]]' 333745bc899bSmrg 33385592a31fSmrg# Regexp to match symbols that can be accessed directly from C. 33395592a31fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 334045bc899bSmrg 33415592a31fSmrg# Define system-specific variables. 33425592a31fSmrgcase $host_os in 33435592a31fSmrgaix*) 33445592a31fSmrg symcode='[[BCDT]]' 33455592a31fSmrg ;; 33465592a31fSmrgcygwin* | mingw* | pw32* | cegcc*) 33475592a31fSmrg symcode='[[ABCDGISTW]]' 33485592a31fSmrg ;; 33495592a31fSmrghpux*) 33505592a31fSmrg if test "$host_cpu" = ia64; then 33515592a31fSmrg symcode='[[ABCDEGRST]]' 33525592a31fSmrg fi 33535592a31fSmrg ;; 33545592a31fSmrgirix* | nonstopux*) 33555592a31fSmrg symcode='[[BCDEGRST]]' 33565592a31fSmrg ;; 33575592a31fSmrgosf*) 33585592a31fSmrg symcode='[[BCDEGQRST]]' 33595592a31fSmrg ;; 33605592a31fSmrgsolaris*) 33615592a31fSmrg symcode='[[BDRT]]' 33625592a31fSmrg ;; 33635592a31fSmrgsco3.2v5*) 33645592a31fSmrg symcode='[[DT]]' 33655592a31fSmrg ;; 33665592a31fSmrgsysv4.2uw2*) 33675592a31fSmrg symcode='[[DT]]' 33685592a31fSmrg ;; 33695592a31fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 33705592a31fSmrg symcode='[[ABDT]]' 33715592a31fSmrg ;; 33725592a31fSmrgsysv4) 33735592a31fSmrg symcode='[[DFNSTU]]' 33745592a31fSmrg ;; 33755592a31fSmrgesac 337645bc899bSmrg 33775592a31fSmrg# If we're using GNU nm, then use its standard symbol codes. 33785592a31fSmrgcase `$NM -V 2>&1` in 33795592a31fSmrg*GNU* | *'with BFD'*) 33805592a31fSmrg symcode='[[ABCDGIRSTW]]' ;; 33815592a31fSmrgesac 338245bc899bSmrg 33835592a31fSmrg# Transform an extracted symbol line into a proper C declaration. 33845592a31fSmrg# Some systems (esp. on ia64) link data and code symbols differently, 33855592a31fSmrg# so use this general approach. 33865592a31fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 338745bc899bSmrg 33885592a31fSmrg# Transform an extracted symbol line into symbol name and symbol address 33895592a31fSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 33905592a31fSmrglt_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'" 339145bc899bSmrg 33925592a31fSmrg# Handle CRLF in mingw tool chain 33935592a31fSmrgopt_cr= 33945592a31fSmrgcase $build_os in 33955592a31fSmrgmingw*) 33965592a31fSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 33975592a31fSmrg ;; 33985592a31fSmrgesac 33993a925b30Smrg 34005592a31fSmrg# Try without a prefix underscore, then with it. 34015592a31fSmrgfor ac_symprfx in "" "_"; do 34023a925b30Smrg 34035592a31fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 34045592a31fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 34053a925b30Smrg 34065592a31fSmrg # Write the raw and C identifiers. 34075592a31fSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 34085592a31fSmrg # Fake it for dumpbin and say T for any non-static function 34095592a31fSmrg # and D for any global variable. 34105592a31fSmrg # Also find C++ and __fastcall symbols from MSVC++, 34115592a31fSmrg # which start with @ or ?. 34125592a31fSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 34135592a31fSmrg" {last_section=section; section=\$ 3};"\ 34145592a31fSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 34155592a31fSmrg" \$ 0!~/External *\|/{next};"\ 34165592a31fSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 34175592a31fSmrg" {if(hide[section]) next};"\ 34185592a31fSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 34195592a31fSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 34205592a31fSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 34215592a31fSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 34225592a31fSmrg" ' prfx=^$ac_symprfx]" 34235592a31fSmrg else 34245592a31fSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 34253a925b30Smrg fi 342645bc899bSmrg 34275592a31fSmrg # Check to see that the pipe works correctly. 34285592a31fSmrg pipe_works=no 342945bc899bSmrg 34305592a31fSmrg rm -f conftest* 34315592a31fSmrg cat > conftest.$ac_ext <<_LT_EOF 34325592a31fSmrg#ifdef __cplusplus 34335592a31fSmrgextern "C" { 34345592a31fSmrg#endif 34355592a31fSmrgchar nm_test_var; 34365592a31fSmrgvoid nm_test_func(void); 34375592a31fSmrgvoid nm_test_func(void){} 34385592a31fSmrg#ifdef __cplusplus 34395592a31fSmrg} 34405592a31fSmrg#endif 34415592a31fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 34425592a31fSmrg_LT_EOF 34433a925b30Smrg 34445592a31fSmrg if AC_TRY_EVAL(ac_compile); then 34455592a31fSmrg # Now try to grab the symbols. 34465592a31fSmrg nlist=conftest.nm 34475592a31fSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 34485592a31fSmrg # Try sorting and uniquifying the output. 34495592a31fSmrg if sort "$nlist" | uniq > "$nlist"T; then 34505592a31fSmrg mv -f "$nlist"T "$nlist" 34515592a31fSmrg else 34525592a31fSmrg rm -f "$nlist"T 34535592a31fSmrg fi 34543a925b30Smrg 34555592a31fSmrg # Make sure that we snagged all the symbols we need. 34565592a31fSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 34575592a31fSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 34585592a31fSmrg cat <<_LT_EOF > conftest.$ac_ext 34595592a31fSmrg#ifdef __cplusplus 34605592a31fSmrgextern "C" { 34615592a31fSmrg#endif 34623a925b30Smrg 34635592a31fSmrg_LT_EOF 34645592a31fSmrg # Now generate the symbol file. 34655592a31fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 34663a925b30Smrg 34675592a31fSmrg cat <<_LT_EOF >> conftest.$ac_ext 34683a925b30Smrg 34695592a31fSmrg/* The mapping between symbol names and symbols. */ 34705592a31fSmrgconst struct { 34715592a31fSmrg const char *name; 34725592a31fSmrg void *address; 34735592a31fSmrg} 34745592a31fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 34755592a31fSmrg{ 34765592a31fSmrg { "@PROGRAM@", (void *) 0 }, 34775592a31fSmrg_LT_EOF 34785592a31fSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 34795592a31fSmrg cat <<\_LT_EOF >> conftest.$ac_ext 34805592a31fSmrg {0, (void *) 0} 34815592a31fSmrg}; 34823a925b30Smrg 34835592a31fSmrg/* This works around a problem in FreeBSD linker */ 34845592a31fSmrg#ifdef FREEBSD_WORKAROUND 34855592a31fSmrgstatic const void *lt_preloaded_setup() { 34865592a31fSmrg return lt__PROGRAM__LTX_preloaded_symbols; 34875592a31fSmrg} 34885592a31fSmrg#endif 34893a925b30Smrg 34905592a31fSmrg#ifdef __cplusplus 34915592a31fSmrg} 34925592a31fSmrg#endif 34935592a31fSmrg_LT_EOF 34945592a31fSmrg # Now try linking the two files. 34955592a31fSmrg mv conftest.$ac_objext conftstm.$ac_objext 34965592a31fSmrg lt_save_LIBS="$LIBS" 34975592a31fSmrg lt_save_CFLAGS="$CFLAGS" 34985592a31fSmrg LIBS="conftstm.$ac_objext" 34995592a31fSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 35005592a31fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 35015592a31fSmrg pipe_works=yes 35025592a31fSmrg fi 35035592a31fSmrg LIBS="$lt_save_LIBS" 35045592a31fSmrg CFLAGS="$lt_save_CFLAGS" 35055592a31fSmrg else 35065592a31fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 35075592a31fSmrg fi 35085592a31fSmrg else 35095592a31fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 35105592a31fSmrg fi 351150f2e948Smrg else 35125592a31fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 351350f2e948Smrg fi 351450f2e948Smrg else 35155592a31fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 35165592a31fSmrg cat conftest.$ac_ext >&5 351750f2e948Smrg fi 35185592a31fSmrg rm -rf conftest* conftst* 351945bc899bSmrg 35205592a31fSmrg # Do not use the global_symbol_pipe unless it works. 35215592a31fSmrg if test "$pipe_works" = yes; then 35225592a31fSmrg break 35235592a31fSmrg else 35245592a31fSmrg lt_cv_sys_global_symbol_pipe= 35255592a31fSmrg fi 35265592a31fSmrgdone 35275592a31fSmrg]) 35285592a31fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 35295592a31fSmrg lt_cv_sys_global_symbol_to_cdecl= 35305592a31fSmrgfi 35315592a31fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 35325592a31fSmrg AC_MSG_RESULT(failed) 353350f2e948Smrgelse 35345592a31fSmrg AC_MSG_RESULT(ok) 353550f2e948Smrgfi 353645bc899bSmrg 35375592a31fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 35385592a31fSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 35395592a31fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 35405592a31fSmrg [Transform the output of nm in a proper C declaration]) 35415592a31fSmrg_LT_DECL([global_symbol_to_c_name_address], 35425592a31fSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 35435592a31fSmrg [Transform the output of nm in a C name address pair]) 35445592a31fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 35455592a31fSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 35465592a31fSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 35475592a31fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 354845bc899bSmrg 354945bc899bSmrg 35505592a31fSmrg# _LT_COMPILER_PIC([TAGNAME]) 35515592a31fSmrg# --------------------------- 35525592a31fSmrgm4_defun([_LT_COMPILER_PIC], 35535592a31fSmrg[m4_require([_LT_TAG_COMPILER])dnl 35545592a31fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 35555592a31fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 35565592a31fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 355745bc899bSmrg 35585592a31fSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 35595592a31fSmrgm4_if([$1], [CXX], [ 35605592a31fSmrg # C++ specific cases for pic, static, wl, etc. 35615592a31fSmrg if test "$GXX" = yes; then 35625592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 35635592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 35643a925b30Smrg 35655592a31fSmrg case $host_os in 35665592a31fSmrg aix*) 35675592a31fSmrg # All AIX code is PIC. 35683a925b30Smrg if test "$host_cpu" = ia64; then 35695592a31fSmrg # AIX 5 now supports IA64 processor 35705592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 35713a925b30Smrg fi 35723a925b30Smrg ;; 357345bc899bSmrg 35745592a31fSmrg amigaos*) 357550f2e948Smrg case $host_cpu in 35765592a31fSmrg powerpc) 35775592a31fSmrg # see comment about AmigaOS4 .so support 35785592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 35795592a31fSmrg ;; 35805592a31fSmrg m68k) 35815592a31fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 35825592a31fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 35835592a31fSmrg # like `-m68040'. 35845592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 358550f2e948Smrg ;; 358650f2e948Smrg esac 358750f2e948Smrg ;; 35883a925b30Smrg 35895592a31fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 35905592a31fSmrg # PIC is the default for these OSes. 35915592a31fSmrg ;; 35925592a31fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 35935592a31fSmrg # This hack is so that the source file can tell whether it is being 35945592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 35955592a31fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 35965592a31fSmrg # (--disable-auto-import) libraries 35975592a31fSmrg m4_if([$1], [GCJ], [], 35985592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 35995592a31fSmrg ;; 36005592a31fSmrg darwin* | rhapsody*) 36015592a31fSmrg # PIC is the default on this platform 36025592a31fSmrg # Common symbols not allowed in MH_DYLIB files 36035592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 36045592a31fSmrg ;; 36055592a31fSmrg *djgpp*) 36065592a31fSmrg # DJGPP does not support shared libraries at all 36075592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 36085592a31fSmrg ;; 36095592a31fSmrg interix[[3-9]]*) 36105592a31fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 36115592a31fSmrg # Instead, we relocate shared libraries at runtime. 36125592a31fSmrg ;; 36135592a31fSmrg sysv4*MP*) 36145592a31fSmrg if test -d /usr/nec; then 36155592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 36165592a31fSmrg fi 36175592a31fSmrg ;; 36185592a31fSmrg hpux*) 36195592a31fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 36205592a31fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 36215592a31fSmrg # sets the default TLS model and affects inlining. 36225592a31fSmrg case $host_cpu in 36235592a31fSmrg hppa*64*) 362450f2e948Smrg ;; 36253a925b30Smrg *) 36265592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 362750f2e948Smrg ;; 36285592a31fSmrg esac 36295592a31fSmrg ;; 36305592a31fSmrg *qnx* | *nto*) 36315592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 36325592a31fSmrg # it will coredump. 36335592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 36345592a31fSmrg ;; 36355592a31fSmrg *) 36365592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 36375592a31fSmrg ;; 36383a925b30Smrg esac 36395592a31fSmrg else 36405592a31fSmrg case $host_os in 36415592a31fSmrg aix[[4-9]]*) 36425592a31fSmrg # All AIX code is PIC. 36435592a31fSmrg if test "$host_cpu" = ia64; then 36445592a31fSmrg # AIX 5 now supports IA64 processor 36455592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 36465592a31fSmrg else 36475592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 36483a925b30Smrg fi 364950f2e948Smrg ;; 36505592a31fSmrg chorus*) 36515592a31fSmrg case $cc_basename in 36525592a31fSmrg cxch68*) 36535592a31fSmrg # Green Hills C++ Compiler 36545592a31fSmrg # _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" 36553a925b30Smrg ;; 365650f2e948Smrg esac 365750f2e948Smrg ;; 36585592a31fSmrg dgux*) 36595592a31fSmrg case $cc_basename in 36605592a31fSmrg ec++*) 36615592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 36625592a31fSmrg ;; 36635592a31fSmrg ghcx*) 36645592a31fSmrg # Green Hills C++ Compiler 36655592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 36665592a31fSmrg ;; 36675592a31fSmrg *) 36685592a31fSmrg ;; 366950f2e948Smrg esac 367050f2e948Smrg ;; 36715592a31fSmrg freebsd* | dragonfly*) 36725592a31fSmrg # FreeBSD uses GNU C++ 367350f2e948Smrg ;; 36745592a31fSmrg hpux9* | hpux10* | hpux11*) 36755592a31fSmrg case $cc_basename in 36765592a31fSmrg CC*) 36775592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 36785592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 36795592a31fSmrg if test "$host_cpu" != ia64; then 36805592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 36815592a31fSmrg fi 36825592a31fSmrg ;; 36835592a31fSmrg aCC*) 36845592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 36855592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 36865592a31fSmrg case $host_cpu in 36875592a31fSmrg hppa*64*|ia64*) 36885592a31fSmrg # +Z the default 36895592a31fSmrg ;; 36905592a31fSmrg *) 36915592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 36925592a31fSmrg ;; 36935592a31fSmrg esac 36945592a31fSmrg ;; 36955592a31fSmrg *) 36965592a31fSmrg ;; 36975592a31fSmrg esac 369850f2e948Smrg ;; 36995592a31fSmrg interix*) 37005592a31fSmrg # This is c89, which is MS Visual C++ (no shared libs) 37015592a31fSmrg # Anyone wants to do a port? 370250f2e948Smrg ;; 37035592a31fSmrg irix5* | irix6* | nonstopux*) 37045592a31fSmrg case $cc_basename in 37055592a31fSmrg CC*) 37065592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37075592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 37085592a31fSmrg # CC pic flag -KPIC is the default. 37095592a31fSmrg ;; 37105592a31fSmrg *) 37115592a31fSmrg ;; 37125592a31fSmrg esac 37133a925b30Smrg ;; 37145592a31fSmrg linux* | k*bsd*-gnu) 37155592a31fSmrg case $cc_basename in 37165592a31fSmrg KCC*) 37175592a31fSmrg # KAI C++ Compiler 37185592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 37195592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 37205592a31fSmrg ;; 37215592a31fSmrg ecpc* ) 37225592a31fSmrg # old Intel C++ for x86_64 which still supported -KPIC. 37235592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37245592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 37255592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 37265592a31fSmrg ;; 37275592a31fSmrg icpc* ) 37285592a31fSmrg # Intel C++, used to be incompatible with GCC. 37295592a31fSmrg # ICC 10 doesn't accept -KPIC any more. 37305592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37315592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 37325592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 37335592a31fSmrg ;; 37345592a31fSmrg pgCC* | pgcpp*) 37355592a31fSmrg # Portland Group C++ compiler 37365592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37375592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 37385592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 37395592a31fSmrg ;; 37405592a31fSmrg cxx*) 37415592a31fSmrg # Compaq C++ 37425592a31fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 37435592a31fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 37445592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 37455592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 37465592a31fSmrg ;; 37475592a31fSmrg xlc* | xlC*) 37485592a31fSmrg # IBM XL 8.0 on PPC 37495592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37505592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 37515592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 37525592a31fSmrg ;; 37535592a31fSmrg *) 37545592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 37555592a31fSmrg *Sun\ C*) 37565592a31fSmrg # Sun C++ 5.9 37575592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 37585592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 37595592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 37605592a31fSmrg ;; 37615592a31fSmrg esac 37625592a31fSmrg ;; 37635592a31fSmrg esac 37643a925b30Smrg ;; 37655592a31fSmrg lynxos*) 37663a925b30Smrg ;; 37675592a31fSmrg m88k*) 37683a925b30Smrg ;; 37695592a31fSmrg mvs*) 37705592a31fSmrg case $cc_basename in 37715592a31fSmrg cxx*) 37725592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 37735592a31fSmrg ;; 37745592a31fSmrg *) 37755592a31fSmrg ;; 37765592a31fSmrg esac 37773a925b30Smrg ;; 37785592a31fSmrg netbsd*) 37793a925b30Smrg ;; 37805592a31fSmrg *qnx* | *nto*) 37815592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 37825592a31fSmrg # it will coredump. 37835592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 37845592a31fSmrg ;; 37855592a31fSmrg osf3* | osf4* | osf5*) 37865592a31fSmrg case $cc_basename in 37875592a31fSmrg KCC*) 37885592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 37895592a31fSmrg ;; 37905592a31fSmrg RCC*) 37915592a31fSmrg # Rational C++ 2.4.1 37925592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 37935592a31fSmrg ;; 37945592a31fSmrg cxx*) 37955592a31fSmrg # Digital/Compaq C++ 37965592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 37975592a31fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 37985592a31fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 37995592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 38005592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 38015592a31fSmrg ;; 38025592a31fSmrg *) 38035592a31fSmrg ;; 38045592a31fSmrg esac 38053a925b30Smrg ;; 38065592a31fSmrg psos*) 38073a925b30Smrg ;; 38085592a31fSmrg solaris*) 38095592a31fSmrg case $cc_basename in 38105592a31fSmrg CC*) 38115592a31fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 38125592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38135592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38145592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 38155592a31fSmrg ;; 38165592a31fSmrg gcx*) 38175592a31fSmrg # Green Hills C++ Compiler 38185592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 38195592a31fSmrg ;; 38205592a31fSmrg *) 38215592a31fSmrg ;; 38225592a31fSmrg esac 38233a925b30Smrg ;; 38245592a31fSmrg sunos4*) 38255592a31fSmrg case $cc_basename in 38265592a31fSmrg CC*) 38275592a31fSmrg # Sun C++ 4.x 38285592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 38295592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38305592a31fSmrg ;; 38315592a31fSmrg lcc*) 38325592a31fSmrg # Lucid 38335592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 38345592a31fSmrg ;; 38353a925b30Smrg *) 38363a925b30Smrg ;; 38373a925b30Smrg esac 383850f2e948Smrg ;; 38395592a31fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 38405592a31fSmrg case $cc_basename in 38415592a31fSmrg CC*) 38425592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38435592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38445592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38455592a31fSmrg ;; 38465592a31fSmrg esac 384750f2e948Smrg ;; 38485592a31fSmrg tandem*) 38495592a31fSmrg case $cc_basename in 38505592a31fSmrg NCC*) 38515592a31fSmrg # NonStop-UX NCC 3.20 38525592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 38535592a31fSmrg ;; 38543a925b30Smrg *) 38553a925b30Smrg ;; 38565592a31fSmrg esac 385750f2e948Smrg ;; 38585592a31fSmrg vxworks*) 385950f2e948Smrg ;; 386050f2e948Smrg *) 38615592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 386250f2e948Smrg ;; 38633a925b30Smrg esac 38645592a31fSmrg fi 38655592a31fSmrg], 38665592a31fSmrg[ 38675592a31fSmrg if test "$GCC" = yes; then 38685592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38695592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 38705592a31fSmrg 38715592a31fSmrg case $host_os in 38725592a31fSmrg aix*) 38735592a31fSmrg # All AIX code is PIC. 38745592a31fSmrg if test "$host_cpu" = ia64; then 38755592a31fSmrg # AIX 5 now supports IA64 processor 38765592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 38775592a31fSmrg fi 38785592a31fSmrg ;; 38795592a31fSmrg 38805592a31fSmrg amigaos*) 38815592a31fSmrg case $host_cpu in 38825592a31fSmrg powerpc) 38835592a31fSmrg # see comment about AmigaOS4 .so support 38845592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 38855592a31fSmrg ;; 38865592a31fSmrg m68k) 38875592a31fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 38885592a31fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 38895592a31fSmrg # like `-m68040'. 38905592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 38915592a31fSmrg ;; 38925592a31fSmrg esac 38935592a31fSmrg ;; 38945592a31fSmrg 38955592a31fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 38965592a31fSmrg # PIC is the default for these OSes. 38975592a31fSmrg ;; 38985592a31fSmrg 38995592a31fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 39005592a31fSmrg # This hack is so that the source file can tell whether it is being 39015592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 39025592a31fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39035592a31fSmrg # (--disable-auto-import) libraries 39045592a31fSmrg m4_if([$1], [GCJ], [], 39055592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39065592a31fSmrg ;; 39075592a31fSmrg 39085592a31fSmrg darwin* | rhapsody*) 39095592a31fSmrg # PIC is the default on this platform 39105592a31fSmrg # Common symbols not allowed in MH_DYLIB files 39115592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39125592a31fSmrg ;; 39135592a31fSmrg 39145592a31fSmrg hpux*) 39155592a31fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39165592a31fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39175592a31fSmrg # sets the default TLS model and affects inlining. 39185592a31fSmrg case $host_cpu in 39195592a31fSmrg hppa*64*) 39205592a31fSmrg # +Z the default 39213a925b30Smrg ;; 39223a925b30Smrg *) 39235592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39243a925b30Smrg ;; 39255592a31fSmrg esac 39265592a31fSmrg ;; 39275592a31fSmrg 39285592a31fSmrg interix[[3-9]]*) 39295592a31fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39305592a31fSmrg # Instead, we relocate shared libraries at runtime. 39315592a31fSmrg ;; 39325592a31fSmrg 39335592a31fSmrg msdosdjgpp*) 39345592a31fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 39355592a31fSmrg # on systems that don't support them. 39365592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 39375592a31fSmrg enable_shared=no 39385592a31fSmrg ;; 39395592a31fSmrg 39405592a31fSmrg *nto* | *qnx*) 39415592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39425592a31fSmrg # it will coredump. 39435592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39445592a31fSmrg ;; 39455592a31fSmrg 39465592a31fSmrg sysv4*MP*) 39475592a31fSmrg if test -d /usr/nec; then 39485592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39495592a31fSmrg fi 39505592a31fSmrg ;; 39515592a31fSmrg 39525592a31fSmrg *) 39535592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39545592a31fSmrg ;; 39553a925b30Smrg esac 39565592a31fSmrg else 39575592a31fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 39585592a31fSmrg case $host_os in 39595592a31fSmrg aix*) 39605592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39615592a31fSmrg if test "$host_cpu" = ia64; then 39625592a31fSmrg # AIX 5 now supports IA64 processor 39635592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39645592a31fSmrg else 39655592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39665592a31fSmrg fi 39675592a31fSmrg ;; 39685592a31fSmrg 39695592a31fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 39705592a31fSmrg # This hack is so that the source file can tell whether it is being 39715592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 39725592a31fSmrg m4_if([$1], [GCJ], [], 39735592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39745592a31fSmrg ;; 39755592a31fSmrg 39765592a31fSmrg hpux9* | hpux10* | hpux11*) 39775592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39785592a31fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 39795592a31fSmrg # not for PA HP-UX. 39805592a31fSmrg case $host_cpu in 39815592a31fSmrg hppa*64*|ia64*) 39825592a31fSmrg # +Z the default 39833a925b30Smrg ;; 39843a925b30Smrg *) 39855592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 39863a925b30Smrg ;; 39875592a31fSmrg esac 39885592a31fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 39895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 39905592a31fSmrg ;; 399145bc899bSmrg 39925592a31fSmrg irix5* | irix6* | nonstopux*) 39935592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 39945592a31fSmrg # PIC (with -KPIC) is the default. 39955592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 39965592a31fSmrg ;; 399745bc899bSmrg 39985592a31fSmrg linux* | k*bsd*-gnu) 39995592a31fSmrg case $cc_basename in 40005592a31fSmrg # old Intel for x86_64 which still supported -KPIC. 40015592a31fSmrg ecc*) 40025592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40035592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40045592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40055592a31fSmrg ;; 40065592a31fSmrg # icc used to be incompatible with GCC. 40075592a31fSmrg # ICC 10 doesn't accept -KPIC any more. 40085592a31fSmrg icc* | ifort*) 40095592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40105592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40115592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40125592a31fSmrg ;; 40135592a31fSmrg # Lahey Fortran 8.1. 40145592a31fSmrg lf95*) 40155592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40165592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 40175592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 40185592a31fSmrg ;; 40195592a31fSmrg pgcc* | pgf77* | pgf90* | pgf95*) 40205592a31fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 40215592a31fSmrg # which looks to be a dead project) 40225592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40235592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40245592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40255592a31fSmrg ;; 40265592a31fSmrg ccc*) 40275592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40285592a31fSmrg # All Alpha code is PIC. 40295592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40305592a31fSmrg ;; 40315592a31fSmrg xl*) 40325592a31fSmrg # IBM XL C 8.0/Fortran 10.1 on PPC 40335592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40345592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 40355592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 40365592a31fSmrg ;; 40375592a31fSmrg *) 40385592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 40395592a31fSmrg *Sun\ C*) 40405592a31fSmrg # Sun C 5.9 40415592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40425592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40435592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40445592a31fSmrg ;; 40455592a31fSmrg *Sun\ F*) 40465592a31fSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 40475592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40485592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40495592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 40505592a31fSmrg ;; 40515592a31fSmrg esac 40525592a31fSmrg ;; 40535592a31fSmrg esac 40545592a31fSmrg ;; 405545bc899bSmrg 40565592a31fSmrg newsos6) 40575592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40585592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40595592a31fSmrg ;; 40601ac89addSmrg 40615592a31fSmrg *nto* | *qnx*) 40625592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 40635592a31fSmrg # it will coredump. 40645592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 40655592a31fSmrg ;; 40661ac89addSmrg 40675592a31fSmrg osf3* | osf4* | osf5*) 40685592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40695592a31fSmrg # All OSF/1 code is PIC. 40705592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40715592a31fSmrg ;; 40721ac89addSmrg 40735592a31fSmrg rdos*) 40745592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40755592a31fSmrg ;; 40761ac89addSmrg 40775592a31fSmrg solaris*) 40785592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40795592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40805592a31fSmrg case $cc_basename in 40815592a31fSmrg f77* | f90* | f95*) 40825592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 40835592a31fSmrg *) 40845592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 40855592a31fSmrg esac 40865592a31fSmrg ;; 408745bc899bSmrg 40885592a31fSmrg sunos4*) 40895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 40905592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 40915592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40925592a31fSmrg ;; 409345bc899bSmrg 40945592a31fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 40955592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40965592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40975592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40985592a31fSmrg ;; 409945bc899bSmrg 41005592a31fSmrg sysv4*MP*) 41015592a31fSmrg if test -d /usr/nec ;then 41025592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 41035592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41045592a31fSmrg fi 41055592a31fSmrg ;; 410645bc899bSmrg 41075592a31fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41085592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41095592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41105592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41115592a31fSmrg ;; 41123a925b30Smrg 41135592a31fSmrg unicos*) 41145592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41155592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 41165592a31fSmrg ;; 41171ac89addSmrg 41185592a31fSmrg uts4*) 41195592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41205592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41215592a31fSmrg ;; 41225592a31fSmrg 41235592a31fSmrg *) 41245592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 41255592a31fSmrg ;; 412650f2e948Smrg esac 41275592a31fSmrg fi 41285592a31fSmrg]) 41295592a31fSmrgcase $host_os in 41305592a31fSmrg # For platforms which do not support PIC, -DPIC is meaningless: 41315592a31fSmrg *djgpp*) 41325592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41335592a31fSmrg ;; 41345592a31fSmrg *) 41355592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 41365592a31fSmrg ;; 41375592a31fSmrgesac 41385592a31fSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 41395592a31fSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 41405592a31fSmrg [How to pass a linker flag through the compiler]) 41411ac89addSmrg 41425592a31fSmrg# 41435592a31fSmrg# Check to make sure the PIC flag actually works. 41445592a31fSmrg# 41455592a31fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 41465592a31fSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 41475592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 41485592a31fSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 41495592a31fSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 41505592a31fSmrg "" | " "*) ;; 41515592a31fSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 41525592a31fSmrg esac], 41535592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 41545592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 415550f2e948Smrgfi 41565592a31fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 41575592a31fSmrg [Additional compiler flags for building library objects]) 41581ac89addSmrg 41595592a31fSmrg# 41605592a31fSmrg# Check to make sure the static flag actually works. 41615592a31fSmrg# 41625592a31fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 41635592a31fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 41645592a31fSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 41655592a31fSmrg $lt_tmp_static_flag, 41665592a31fSmrg [], 41675592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 41685592a31fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 41695592a31fSmrg [Compiler flag to prevent dynamic linking]) 41705592a31fSmrg])# _LT_COMPILER_PIC 41711ac89addSmrg 41721ac89addSmrg 41735592a31fSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 41745592a31fSmrg# ---------------------------- 41755592a31fSmrg# See if the linker supports building shared libraries. 41765592a31fSmrgm4_defun([_LT_LINKER_SHLIBS], 41775592a31fSmrg[AC_REQUIRE([LT_PATH_LD])dnl 41785592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 41795592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 41805592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 41815592a31fSmrgm4_require([_LT_DECL_SED])dnl 41825592a31fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 41835592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 41845592a31fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 41855592a31fSmrgm4_if([$1], [CXX], [ 41865592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 41875592a31fSmrg case $host_os in 41885592a31fSmrg aix[[4-9]]*) 41895592a31fSmrg # If we're using GNU nm, then we don't want the "-C" option. 41905592a31fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 41915592a31fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 41925592a31fSmrg _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' 41935592a31fSmrg else 41945592a31fSmrg _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' 419550f2e948Smrg fi 419650f2e948Smrg ;; 41975592a31fSmrg pw32*) 41985592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 41993a925b30Smrg ;; 42005592a31fSmrg cygwin* | mingw* | cegcc*) 42015592a31fSmrg _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' 42025592a31fSmrg ;; 42035592a31fSmrg *) 42045592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 42055592a31fSmrg ;; 42065592a31fSmrg esac 42075592a31fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 42085592a31fSmrg], [ 42095592a31fSmrg runpath_var= 42105592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 42115592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 42125592a31fSmrg _LT_TAGVAR(archive_cmds, $1)= 42135592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 42145592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 42155592a31fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 42165592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 42175592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 42185592a31fSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 42195592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 42205592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 42215592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 42225592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 42235592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 42245592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 42255592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 42265592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=no 42275592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 42285592a31fSmrg _LT_TAGVAR(module_cmds, $1)= 42295592a31fSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 42305592a31fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 42315592a31fSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 42325592a31fSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 42335592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 42345592a31fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 42355592a31fSmrg # included in the symbol list 42365592a31fSmrg _LT_TAGVAR(include_expsyms, $1)= 42375592a31fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 42385592a31fSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 42395592a31fSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 42405592a31fSmrg # as well as any symbol that contains `d'. 42415592a31fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 42425592a31fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 42435592a31fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 42445592a31fSmrg # the symbol is explicitly referenced. Since portable code cannot 42455592a31fSmrg # rely on this symbol name, it's probably fine to never include it in 42465592a31fSmrg # preloaded symbol tables. 42475592a31fSmrg # Exclude shared library initialization/finalization symbols. 42485592a31fSmrgdnl Note also adjust exclude_expsyms for C++ above. 42495592a31fSmrg extract_expsyms_cmds= 42501ac89addSmrg 42515592a31fSmrg case $host_os in 42525592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 42535592a31fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 42545592a31fSmrg # When not using gcc, we currently assume that we are using 42555592a31fSmrg # Microsoft Visual C++. 42565592a31fSmrg if test "$GCC" != yes; then 42575592a31fSmrg with_gnu_ld=no 425850f2e948Smrg fi 42593a925b30Smrg ;; 42605592a31fSmrg interix*) 42615592a31fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 42625592a31fSmrg with_gnu_ld=yes 42635592a31fSmrg ;; 42645592a31fSmrg openbsd*) 42655592a31fSmrg with_gnu_ld=no 42665592a31fSmrg ;; 42673a925b30Smrg esac 42681ac89addSmrg 42695592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 42705592a31fSmrg if test "$with_gnu_ld" = yes; then 42715592a31fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 42725592a31fSmrg wlarc='${wl}' 42731ac89addSmrg 42745592a31fSmrg # Set some defaults for GNU ld with shared library support. These 42755592a31fSmrg # are reset later if shared libraries are not supported. Putting them 42765592a31fSmrg # here allows them to be overridden if necessary. 42775592a31fSmrg runpath_var=LD_RUN_PATH 42785592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 42795592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 42805592a31fSmrg # ancient GNU ld didn't support --whole-archive et. al. 42815592a31fSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 42825592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 42835592a31fSmrg else 42845592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 42855592a31fSmrg fi 42865592a31fSmrg supports_anon_versioning=no 42875592a31fSmrg case `$LD -v 2>&1` in 42885592a31fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 42895592a31fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 42905592a31fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 42915592a31fSmrg *\ 2.11.*) ;; # other 2.11 versions 42925592a31fSmrg *) supports_anon_versioning=yes ;; 42935592a31fSmrg esac 42941ac89addSmrg 42955592a31fSmrg # See if GNU ld supports shared libraries. 42965592a31fSmrg case $host_os in 42975592a31fSmrg aix[[3-9]]*) 42985592a31fSmrg # On AIX/PPC, the GNU linker is very broken 42995592a31fSmrg if test "$host_cpu" != ia64; then 43005592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 43015592a31fSmrg cat <<_LT_EOF 1>&2 43021ac89addSmrg 43035592a31fSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 43045592a31fSmrg*** to be unable to reliably create shared libraries on AIX. 43055592a31fSmrg*** Therefore, libtool is disabling shared libraries support. If you 43065592a31fSmrg*** really care for shared libraries, you may want to modify your PATH 43075592a31fSmrg*** so that a non-GNU linker is found, and then restart. 43081ac89addSmrg 43095592a31fSmrg_LT_EOF 43105592a31fSmrg fi 43115592a31fSmrg ;; 43121ac89addSmrg 43135592a31fSmrg amigaos*) 43145592a31fSmrg case $host_cpu in 43155592a31fSmrg powerpc) 43165592a31fSmrg # see comment about AmigaOS4 .so support 43175592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 43185592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 43195592a31fSmrg ;; 43205592a31fSmrg m68k) 43215592a31fSmrg _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)' 43225592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 43235592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 43245592a31fSmrg ;; 43255592a31fSmrg esac 43265592a31fSmrg ;; 43271ac89addSmrg 43285592a31fSmrg beos*) 43295592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 43305592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 43315592a31fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 43325592a31fSmrg # support --undefined. This deserves some investigation. FIXME 43335592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 43345592a31fSmrg else 43355592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 43365592a31fSmrg fi 43375592a31fSmrg ;; 43381ac89addSmrg 43395592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 43405592a31fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 43415592a31fSmrg # as there is no search path for DLLs. 43425592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 43435592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 43445592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 43455592a31fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 43465592a31fSmrg _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' 43475592a31fSmrg 43485592a31fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 43495592a31fSmrg _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' 43505592a31fSmrg # If the export-symbols file already is a .def file (1st line 43515592a31fSmrg # is EXPORTS), use it as is; otherwise, prepend... 43525592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 43535592a31fSmrg cp $export_symbols $output_objdir/$soname.def; 43545592a31fSmrg else 43555592a31fSmrg echo EXPORTS > $output_objdir/$soname.def; 43565592a31fSmrg cat $export_symbols >> $output_objdir/$soname.def; 43575592a31fSmrg fi~ 43585592a31fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 43595592a31fSmrg else 43605592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 43615592a31fSmrg fi 43625592a31fSmrg ;; 43631ac89addSmrg 43645592a31fSmrg interix[[3-9]]*) 43655592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 43665592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 43675592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 43685592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 43695592a31fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 43705592a31fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 43715592a31fSmrg # default) and relocated if they conflict, which is a slow very memory 43725592a31fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 43735592a31fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 43745592a31fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 43755592a31fSmrg _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' 43765592a31fSmrg _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' 43775592a31fSmrg ;; 43781ac89addSmrg 43795592a31fSmrg gnu* | linux* | tpf* | k*bsd*-gnu) 43805592a31fSmrg tmp_diet=no 43815592a31fSmrg if test "$host_os" = linux-dietlibc; then 43825592a31fSmrg case $cc_basename in 43835592a31fSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 43845592a31fSmrg esac 43855592a31fSmrg fi 43865592a31fSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 43875592a31fSmrg && test "$tmp_diet" = no 43885592a31fSmrg then 43895592a31fSmrg tmp_addflag= 43905592a31fSmrg tmp_sharedflag='-shared' 43915592a31fSmrg case $cc_basename,$host_cpu in 43925592a31fSmrg pgcc*) # Portland Group C compiler 43935592a31fSmrg _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' 43945592a31fSmrg tmp_addflag=' $pic_flag' 43955592a31fSmrg ;; 43965592a31fSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 43975592a31fSmrg _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' 43985592a31fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 43995592a31fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 44005592a31fSmrg tmp_addflag=' -i_dynamic' ;; 44015592a31fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 44025592a31fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 44035592a31fSmrg ifc* | ifort*) # Intel Fortran compiler 44045592a31fSmrg tmp_addflag=' -nofor_main' ;; 44055592a31fSmrg lf95*) # Lahey Fortran 8.1 44065592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 44075592a31fSmrg tmp_sharedflag='--shared' ;; 44085592a31fSmrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 44095592a31fSmrg tmp_sharedflag='-qmkshrobj' 44105592a31fSmrg tmp_addflag= ;; 44115592a31fSmrg esac 44125592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 44135592a31fSmrg *Sun\ C*) # Sun C 5.9 44145592a31fSmrg _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' 44155592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 44165592a31fSmrg tmp_sharedflag='-G' ;; 44175592a31fSmrg *Sun\ F*) # Sun Fortran 8.3 44185592a31fSmrg tmp_sharedflag='-G' ;; 44195592a31fSmrg esac 44205592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44211ac89addSmrg 44225592a31fSmrg if test "x$supports_anon_versioning" = xyes; then 44235592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 44245592a31fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 44255592a31fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 44265592a31fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 44275592a31fSmrg fi 44281ac89addSmrg 44295592a31fSmrg case $cc_basename in 44305592a31fSmrg xlf*) 44315592a31fSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 44325592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 44335592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 44345592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 44355592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 44365592a31fSmrg if test "x$supports_anon_versioning" = xyes; then 44375592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 44385592a31fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 44395592a31fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 44405592a31fSmrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 44415592a31fSmrg fi 44425592a31fSmrg ;; 44435592a31fSmrg esac 44445592a31fSmrg else 44455592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44465592a31fSmrg fi 44475592a31fSmrg ;; 44481ac89addSmrg 44495592a31fSmrg netbsd*) 44505592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 44515592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 44525592a31fSmrg wlarc= 44535592a31fSmrg else 44545592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44555592a31fSmrg _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' 44565592a31fSmrg fi 44575592a31fSmrg ;; 44581ac89addSmrg 44595592a31fSmrg solaris*) 44605592a31fSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 44615592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44625592a31fSmrg cat <<_LT_EOF 1>&2 44631ac89addSmrg 44645592a31fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 44655592a31fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 44665592a31fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 44675592a31fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 44685592a31fSmrg*** your PATH or compiler configuration so that the native linker is 44695592a31fSmrg*** used, and then restart. 44701ac89addSmrg 44715592a31fSmrg_LT_EOF 44725592a31fSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 44735592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 44745592a31fSmrg _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' 44755592a31fSmrg else 44765592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44775592a31fSmrg fi 44785592a31fSmrg ;; 44791ac89addSmrg 44805592a31fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 44815592a31fSmrg case `$LD -v 2>&1` in 44825592a31fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 44835592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 44845592a31fSmrg cat <<_LT_EOF 1>&2 44851ac89addSmrg 44865592a31fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 44875592a31fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 44885592a31fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 44895592a31fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 44905592a31fSmrg*** your PATH or compiler configuration so that the native linker is 44915592a31fSmrg*** used, and then restart. 44921ac89addSmrg 44935592a31fSmrg_LT_EOF 44945592a31fSmrg ;; 44955592a31fSmrg *) 44965592a31fSmrg # For security reasons, it is highly recommended that you always 44975592a31fSmrg # use absolute paths for naming shared libraries, and exclude the 44985592a31fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 44995592a31fSmrg # requires that you compile everything twice, which is a pain. 45005592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 45015592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 45025592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 45035592a31fSmrg _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' 45045592a31fSmrg else 45055592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 45065592a31fSmrg fi 45075592a31fSmrg ;; 45085592a31fSmrg esac 45095592a31fSmrg ;; 45101ac89addSmrg 45115592a31fSmrg sunos4*) 45125592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 45135592a31fSmrg wlarc= 45145592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 45155592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 45165592a31fSmrg ;; 45171ac89addSmrg 45185592a31fSmrg *) 45195592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 45205592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 45215592a31fSmrg _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' 45225592a31fSmrg else 45235592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 45245592a31fSmrg fi 45255592a31fSmrg ;; 45265592a31fSmrg esac 45271ac89addSmrg 45285592a31fSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 45295592a31fSmrg runpath_var= 45305592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 45315592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 45325592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 45335592a31fSmrg fi 45345592a31fSmrg else 45355592a31fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 45365592a31fSmrg case $host_os in 45375592a31fSmrg aix3*) 45385592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 45395592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 45405592a31fSmrg _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' 45415592a31fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 45425592a31fSmrg # are no directories specified by -L. 45435592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 45445592a31fSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 45455592a31fSmrg # Neither direct hardcoding nor static linking is supported with a 45465592a31fSmrg # broken collect2. 45475592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 45485592a31fSmrg fi 45495592a31fSmrg ;; 45501ac89addSmrg 45515592a31fSmrg aix[[4-9]]*) 45525592a31fSmrg if test "$host_cpu" = ia64; then 45535592a31fSmrg # On IA64, the linker does run time linking by default, so we don't 45545592a31fSmrg # have to do anything special. 45555592a31fSmrg aix_use_runtimelinking=no 45565592a31fSmrg exp_sym_flag='-Bexport' 45575592a31fSmrg no_entry_flag="" 45585592a31fSmrg else 45595592a31fSmrg # If we're using GNU nm, then we don't want the "-C" option. 45605592a31fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 45615592a31fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 45625592a31fSmrg _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' 45635592a31fSmrg else 45645592a31fSmrg _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' 45655592a31fSmrg fi 45665592a31fSmrg aix_use_runtimelinking=no 45671ac89addSmrg 45685592a31fSmrg # Test if we are trying to use run time linking or normal 45695592a31fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 45705592a31fSmrg # need to do runtime linking. 45715592a31fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 45725592a31fSmrg for ld_flag in $LDFLAGS; do 45735592a31fSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 45745592a31fSmrg aix_use_runtimelinking=yes 45755592a31fSmrg break 45765592a31fSmrg fi 45775592a31fSmrg done 45785592a31fSmrg ;; 45795592a31fSmrg esac 45801ac89addSmrg 45815592a31fSmrg exp_sym_flag='-bexport' 45825592a31fSmrg no_entry_flag='-bnoentry' 45835592a31fSmrg fi 45841ac89addSmrg 45855592a31fSmrg # When large executables or shared objects are built, AIX ld can 45865592a31fSmrg # have problems creating the table of contents. If linking a library 45875592a31fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 45885592a31fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 45895592a31fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 45905592a31fSmrg 45915592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='' 45925592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 45935592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 45945592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 45955592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 45965592a31fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 45971ac89addSmrg 45985592a31fSmrg if test "$GCC" = yes; then 45995592a31fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 46005592a31fSmrg # We only want to do this on AIX 4.2 and lower, the check 46015592a31fSmrg # below for broken collect2 doesn't work under 4.3+ 46025592a31fSmrg collect2name=`${CC} -print-prog-name=collect2` 46035592a31fSmrg if test -f "$collect2name" && 46045592a31fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 46055592a31fSmrg then 46065592a31fSmrg # We have reworked collect2 46075592a31fSmrg : 46085592a31fSmrg else 46095592a31fSmrg # We have old collect2 46105592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 46115592a31fSmrg # It fails to find uninstalled libraries when the uninstalled 46125592a31fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 46135592a31fSmrg # to unsupported forces relinking 46145592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 46155592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 46165592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46175592a31fSmrg fi 46185592a31fSmrg ;; 46195592a31fSmrg esac 46205592a31fSmrg shared_flag='-shared' 46215592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 46225592a31fSmrg shared_flag="$shared_flag "'${wl}-G' 46235592a31fSmrg fi 46245592a31fSmrg else 46255592a31fSmrg # not using gcc 46265592a31fSmrg if test "$host_cpu" = ia64; then 46275592a31fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 46285592a31fSmrg # chokes on -Wl,-G. The following line is correct: 46295592a31fSmrg shared_flag='-G' 46305592a31fSmrg else 46315592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 46325592a31fSmrg shared_flag='${wl}-G' 46335592a31fSmrg else 46345592a31fSmrg shared_flag='${wl}-bM:SRE' 46355592a31fSmrg fi 46365592a31fSmrg fi 46375592a31fSmrg fi 46381ac89addSmrg 46395592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 46405592a31fSmrg # It seems that -bexpall does not export symbols beginning with 46415592a31fSmrg # underscore (_), so it is better to generate a list of symbols to export. 46425592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 46435592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 46445592a31fSmrg # Warning - without using the other runtime loading flags (-brtl), 46455592a31fSmrg # -berok will link without error, but may produce a broken library. 46465592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 46475592a31fSmrg # Determine the default libpath from the value encoded in an 46485592a31fSmrg # empty executable. 46495592a31fSmrg _LT_SYS_MODULE_PATH_AIX 46505592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 46515592a31fSmrg _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" 46525592a31fSmrg else 46535592a31fSmrg if test "$host_cpu" = ia64; then 46545592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 46555592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 46565592a31fSmrg _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" 46575592a31fSmrg else 46585592a31fSmrg # Determine the default libpath from the value encoded in an 46595592a31fSmrg # empty executable. 46605592a31fSmrg _LT_SYS_MODULE_PATH_AIX 46615592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 46625592a31fSmrg # Warning - without using the other run time loading flags, 46635592a31fSmrg # -berok will link without error, but may produce a broken library. 46645592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 46655592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 46665592a31fSmrg # Exported symbols can be pulled into shared objects from archives 46675592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 46685592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 46695592a31fSmrg # This is similar to how AIX traditionally builds its shared libraries. 46705592a31fSmrg _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' 46715592a31fSmrg fi 46725592a31fSmrg fi 46735592a31fSmrg ;; 46741ac89addSmrg 46755592a31fSmrg amigaos*) 46765592a31fSmrg case $host_cpu in 46775592a31fSmrg powerpc) 46785592a31fSmrg # see comment about AmigaOS4 .so support 46795592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 46805592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 46815592a31fSmrg ;; 46825592a31fSmrg m68k) 46835592a31fSmrg _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)' 46845592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 46855592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 46865592a31fSmrg ;; 46875592a31fSmrg esac 46885592a31fSmrg ;; 46891ac89addSmrg 46905592a31fSmrg bsdi[[45]]*) 46915592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 46925592a31fSmrg ;; 46931ac89addSmrg 46945592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 46955592a31fSmrg # When not using gcc, we currently assume that we are using 46965592a31fSmrg # Microsoft Visual C++. 46975592a31fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 46985592a31fSmrg # no search path for DLLs. 46995592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 47005592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47015592a31fSmrg # Tell ltmain to make .lib files, not .a files. 47025592a31fSmrg libext=lib 47035592a31fSmrg # Tell ltmain to make .dll files, not .so files. 47045592a31fSmrg shrext_cmds=".dll" 47055592a31fSmrg # FIXME: Setting linknames here is a bad hack. 47065592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 47075592a31fSmrg # The linker will automatically build a .lib file if we build a DLL. 47085592a31fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 47095592a31fSmrg # FIXME: Should let the user specify the lib program. 47105592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 47115592a31fSmrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 47125592a31fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 47135592a31fSmrg ;; 47141ac89addSmrg 47155592a31fSmrg darwin* | rhapsody*) 47165592a31fSmrg _LT_DARWIN_LINKER_FEATURES($1) 47175592a31fSmrg ;; 47181ac89addSmrg 47195592a31fSmrg dgux*) 47205592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 47215592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47225592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47235592a31fSmrg ;; 47241ac89addSmrg 47255592a31fSmrg freebsd1*) 47265592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47275592a31fSmrg ;; 47281ac89addSmrg 47295592a31fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 47305592a31fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 47315592a31fSmrg # does not break anything, and helps significantly (at the cost of a little 47325592a31fSmrg # extra space). 47335592a31fSmrg freebsd2.2*) 47345592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 47355592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 47365592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 47375592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47385592a31fSmrg ;; 473945bc899bSmrg 47405592a31fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 47415592a31fSmrg freebsd2*) 47425592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 47435592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 47445592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47455592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47465592a31fSmrg ;; 474745bc899bSmrg 47485592a31fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 47495592a31fSmrg freebsd* | dragonfly*) 47505592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 47515592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 47525592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 47535592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47545592a31fSmrg ;; 475545bc899bSmrg 47565592a31fSmrg hpux9*) 47575592a31fSmrg if test "$GCC" = yes; then 47585592a31fSmrg _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' 47595592a31fSmrg else 47605592a31fSmrg _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' 47615592a31fSmrg fi 47625592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 47635592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 47645592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 476545bc899bSmrg 47665592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 47675592a31fSmrg # but as the default location of the library. 47685592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47695592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47705592a31fSmrg ;; 477145bc899bSmrg 47725592a31fSmrg hpux10*) 47735592a31fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 47745592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 47755592a31fSmrg else 47765592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 47775592a31fSmrg fi 47785592a31fSmrg if test "$with_gnu_ld" = no; then 47795592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 47805592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 47815592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 47825592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 47835592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 47845592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47855592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 47865592a31fSmrg # but as the default location of the library. 47875592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47885592a31fSmrg fi 47895592a31fSmrg ;; 479045bc899bSmrg 47915592a31fSmrg hpux11*) 47925592a31fSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 47935592a31fSmrg case $host_cpu in 47945592a31fSmrg hppa*64*) 47955592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 47965592a31fSmrg ;; 47975592a31fSmrg ia64*) 47985592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 47995592a31fSmrg ;; 48005592a31fSmrg *) 48015592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 48025592a31fSmrg ;; 48035592a31fSmrg esac 48045592a31fSmrg else 48055592a31fSmrg case $host_cpu in 48065592a31fSmrg hppa*64*) 48075592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 48085592a31fSmrg ;; 48095592a31fSmrg ia64*) 48105592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 48115592a31fSmrg ;; 48125592a31fSmrg *) 48135592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 48145592a31fSmrg ;; 48155592a31fSmrg esac 48165592a31fSmrg fi 48175592a31fSmrg if test "$with_gnu_ld" = no; then 48185592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 48195592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 482045bc899bSmrg 48215592a31fSmrg case $host_cpu in 48225592a31fSmrg hppa*64*|ia64*) 48235592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 48245592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48255592a31fSmrg ;; 48265592a31fSmrg *) 48275592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 48285592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 48295592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 483045bc899bSmrg 48315592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 48325592a31fSmrg # but as the default location of the library. 48335592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 48345592a31fSmrg ;; 48355592a31fSmrg esac 48365592a31fSmrg fi 483750f2e948Smrg ;; 48385592a31fSmrg 48395592a31fSmrg irix5* | irix6* | nonstopux*) 48405592a31fSmrg if test "$GCC" = yes; then 48415592a31fSmrg _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' 48425592a31fSmrg # Try to use the -exported_symbol ld option, if it does not 48435592a31fSmrg # work, assume that -exports_file does not work either and 48445592a31fSmrg # implicitly export all symbols. 48455592a31fSmrg save_LDFLAGS="$LDFLAGS" 48465592a31fSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 48475592a31fSmrg AC_LINK_IFELSE(int foo(void) {}, 48485592a31fSmrg _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' 48495592a31fSmrg ) 48505592a31fSmrg LDFLAGS="$save_LDFLAGS" 48515592a31fSmrg else 48525592a31fSmrg _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' 48535592a31fSmrg _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' 48545592a31fSmrg fi 48555592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 48565592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48575592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 48585592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 48595592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 486050f2e948Smrg ;; 48611ac89addSmrg 48625592a31fSmrg netbsd*) 48635592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48645592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 48655592a31fSmrg else 48665592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 48675592a31fSmrg fi 48685592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 48695592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 48705592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48715592a31fSmrg ;; 48721ac89addSmrg 48735592a31fSmrg newsos6) 48745592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 48755592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 48765592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 48775592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 48785592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48795592a31fSmrg ;; 48801ac89addSmrg 48815592a31fSmrg *nto* | *qnx*) 48825592a31fSmrg ;; 48831ac89addSmrg 48845592a31fSmrg openbsd*) 48855592a31fSmrg if test -f /usr/libexec/ld.so; then 48865592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 48875592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48885592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 48895592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 48905592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 48915592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 48925592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48935592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48945592a31fSmrg else 48955592a31fSmrg case $host_os in 48965592a31fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 48975592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 48985592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 48995592a31fSmrg ;; 49005592a31fSmrg *) 49015592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 49025592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 49035592a31fSmrg ;; 49045592a31fSmrg esac 49055592a31fSmrg fi 49065592a31fSmrg else 49075592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49085592a31fSmrg fi 49095592a31fSmrg ;; 49101ac89addSmrg 49115592a31fSmrg os2*) 49125592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 49135592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49145592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49155592a31fSmrg _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' 49165592a31fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 49175592a31fSmrg ;; 49181ac89addSmrg 49195592a31fSmrg osf3*) 49205592a31fSmrg if test "$GCC" = yes; then 49215592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49225592a31fSmrg _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' 49235592a31fSmrg else 49245592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 49255592a31fSmrg _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' 49265592a31fSmrg fi 49275592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 49285592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49295592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 49305592a31fSmrg ;; 49311ac89addSmrg 49325592a31fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 49335592a31fSmrg if test "$GCC" = yes; then 49345592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 49355592a31fSmrg _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' 49365592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49375592a31fSmrg else 49385592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 49395592a31fSmrg _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' 49405592a31fSmrg _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~ 49415592a31fSmrg $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' 49421ac89addSmrg 49435592a31fSmrg # Both c and cxx compiler support -rpath directly 49445592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 49455592a31fSmrg fi 49465592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 49475592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 49485592a31fSmrg ;; 49491ac89addSmrg 49505592a31fSmrg solaris*) 49515592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 49525592a31fSmrg if test "$GCC" = yes; then 49535592a31fSmrg wlarc='${wl}' 49545592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 49555592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49565592a31fSmrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 49575592a31fSmrg else 49585592a31fSmrg case `$CC -V 2>&1` in 49595592a31fSmrg *"Compilers 5.0"*) 49605592a31fSmrg wlarc='' 49615592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 49625592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49635592a31fSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 49645592a31fSmrg ;; 49655592a31fSmrg *) 49665592a31fSmrg wlarc='${wl}' 49675592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 49685592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 49695592a31fSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 49705592a31fSmrg ;; 49715592a31fSmrg esac 49725592a31fSmrg fi 49735592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 49745592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49755592a31fSmrg case $host_os in 49765592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 49775592a31fSmrg *) 49785592a31fSmrg # The compiler driver will combine and reorder linker options, 49795592a31fSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 49805592a31fSmrg # but is careful enough not to reorder. 49815592a31fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 49825592a31fSmrg if test "$GCC" = yes; then 49835592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 49845592a31fSmrg else 49855592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 49865592a31fSmrg fi 49875592a31fSmrg ;; 49885592a31fSmrg esac 49895592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 49905592a31fSmrg ;; 49911ac89addSmrg 49925592a31fSmrg sunos4*) 49935592a31fSmrg if test "x$host_vendor" = xsequent; then 49945592a31fSmrg # Use $CC to link under sequent, because it throws in some extra .o 49955592a31fSmrg # files that make .init and .fini sections work. 49965592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 49975592a31fSmrg else 49985592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 49995592a31fSmrg fi 50005592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50015592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 50025592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50035592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50045592a31fSmrg ;; 50051ac89addSmrg 50065592a31fSmrg sysv4) 50075592a31fSmrg case $host_vendor in 50085592a31fSmrg sni) 50095592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50105592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 50115592a31fSmrg ;; 50125592a31fSmrg siemens) 50135592a31fSmrg ## LD is ld it makes a PLAMLIB 50145592a31fSmrg ## CC just makes a GrossModule. 50155592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 50165592a31fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 50175592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 50185592a31fSmrg ;; 50195592a31fSmrg motorola) 50205592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50215592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 50225592a31fSmrg ;; 50235592a31fSmrg esac 50245592a31fSmrg runpath_var='LD_RUN_PATH' 50255592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50265592a31fSmrg ;; 50271ac89addSmrg 50285592a31fSmrg sysv4.3*) 50295592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50305592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50315592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 50325592a31fSmrg ;; 50331ac89addSmrg 50345592a31fSmrg sysv4*MP*) 50355592a31fSmrg if test -d /usr/nec; then 50365592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50375592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50385592a31fSmrg runpath_var=LD_RUN_PATH 50395592a31fSmrg hardcode_runpath_var=yes 50405592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 50415592a31fSmrg fi 50425592a31fSmrg ;; 50431ac89addSmrg 50445592a31fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 50455592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 50465592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 50475592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50485592a31fSmrg runpath_var='LD_RUN_PATH' 50491ac89addSmrg 50505592a31fSmrg if test "$GCC" = yes; then 50515592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50525592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50535592a31fSmrg else 50545592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50555592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50565592a31fSmrg fi 50575592a31fSmrg ;; 50581ac89addSmrg 50595592a31fSmrg sysv5* | sco3.2v5* | sco5v6*) 50605592a31fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 50615592a31fSmrg # link with -lc, and that would cause any symbols used from libc to 50625592a31fSmrg # always be unresolved, which means just about no library would 50635592a31fSmrg # ever link correctly. If we're not using GNU ld we use -z text 50645592a31fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 50655592a31fSmrg # as -z defs. 50665592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 50675592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 50685592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 50695592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50705592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 50715592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50725592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50735592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 50745592a31fSmrg runpath_var='LD_RUN_PATH' 50751ac89addSmrg 50765592a31fSmrg if test "$GCC" = yes; then 50775592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50785592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50795592a31fSmrg else 50805592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50815592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 50825592a31fSmrg fi 50835592a31fSmrg ;; 50841ac89addSmrg 50855592a31fSmrg uts4*) 50865592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 50875592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50885592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 50895592a31fSmrg ;; 509050f2e948Smrg 50915592a31fSmrg *) 50925592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 50935592a31fSmrg ;; 50945592a31fSmrg esac 509550f2e948Smrg 50965592a31fSmrg if test x$host_vendor = xsni; then 50975592a31fSmrg case $host in 50985592a31fSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 50995592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 51005592a31fSmrg ;; 51015592a31fSmrg esac 51025592a31fSmrg fi 51035592a31fSmrg fi 51045592a31fSmrg]) 51055592a31fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 51065592a31fSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 510750f2e948Smrg 51085592a31fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 510950f2e948Smrg 51105592a31fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 51115592a31fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 51125592a31fSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 51135592a31fSmrg [The commands to extract the exported symbol list from a shared archive]) 511450f2e948Smrg 51155592a31fSmrg# 51165592a31fSmrg# Do we need to explicitly link libc? 51175592a31fSmrg# 51185592a31fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 51195592a31fSmrgx|xyes) 51205592a31fSmrg # Assume -lc should be added 51215592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51221ac89addSmrg 51235592a31fSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 51245592a31fSmrg case $_LT_TAGVAR(archive_cmds, $1) in 51255592a31fSmrg *'~'*) 51265592a31fSmrg # FIXME: we may have to deal with multi-command sequences. 51275592a31fSmrg ;; 51285592a31fSmrg '$CC '*) 51295592a31fSmrg # Test whether the compiler implicitly links with -lc since on some 51305592a31fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 51315592a31fSmrg # to ld, don't add -lc before -lgcc. 51325592a31fSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 51335592a31fSmrg $RM conftest* 51345592a31fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 51351ac89addSmrg 51365592a31fSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 51375592a31fSmrg soname=conftest 51385592a31fSmrg lib=conftest 51395592a31fSmrg libobjs=conftest.$ac_objext 51405592a31fSmrg deplibs= 51415592a31fSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 51425592a31fSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 51435592a31fSmrg compiler_flags=-v 51445592a31fSmrg linker_flags=-v 51455592a31fSmrg verstring= 51465592a31fSmrg output_objdir=. 51475592a31fSmrg libname=conftest 51485592a31fSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 51495592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 51505592a31fSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 51515592a31fSmrg then 51525592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 51535592a31fSmrg else 51545592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51555592a31fSmrg fi 51565592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 51575592a31fSmrg else 51585592a31fSmrg cat conftest.err 1>&5 51595592a31fSmrg fi 51605592a31fSmrg $RM conftest* 51615592a31fSmrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 51625592a31fSmrg ;; 51635592a31fSmrg esac 51645592a31fSmrg fi 51655592a31fSmrg ;; 51665592a31fSmrgesac 51671ac89addSmrg 51685592a31fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 51695592a31fSmrg [Whether or not to add -lc for building shared libraries]) 51705592a31fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 51715592a31fSmrg [enable_shared_with_static_runtimes], [0], 51725592a31fSmrg [Whether or not to disallow shared libs when runtime libs are static]) 51735592a31fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 51745592a31fSmrg [Compiler flag to allow reflexive dlopens]) 51755592a31fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 51765592a31fSmrg [Compiler flag to generate shared objects directly from archives]) 51775592a31fSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 51785592a31fSmrg [Whether the compiler copes with passing no objects directly]) 51795592a31fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 51805592a31fSmrg [Create an old-style archive from a shared archive]) 51815592a31fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 51825592a31fSmrg [Create a temporary old-style archive to link instead of a shared archive]) 51835592a31fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 51845592a31fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 51855592a31fSmrg_LT_TAGDECL([], [module_cmds], [2], 51865592a31fSmrg [Commands used to build a loadable module if different from building 51875592a31fSmrg a shared archive.]) 51885592a31fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 51895592a31fSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 51905592a31fSmrg [Whether we are building with GNU ld or not]) 51915592a31fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 51925592a31fSmrg [Flag that allows shared libraries with undefined symbols to be built]) 51935592a31fSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 51945592a31fSmrg [Flag that enforces no undefined symbols]) 51955592a31fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 51965592a31fSmrg [Flag to hardcode $libdir into a binary during linking. 51975592a31fSmrg This must work even if $libdir does not exist]) 51985592a31fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 51995592a31fSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 52005592a31fSmrg during linking. This must work even if $libdir does not exist]]) 52015592a31fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 52025592a31fSmrg [Whether we need a single "-rpath" flag with a separated argument]) 52035592a31fSmrg_LT_TAGDECL([], [hardcode_direct], [0], 52045592a31fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 52055592a31fSmrg DIR into the resulting binary]) 52065592a31fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 52075592a31fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 52085592a31fSmrg DIR into the resulting binary and the resulting library dependency is 52095592a31fSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 52105592a31fSmrg library is relocated]) 52115592a31fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 52125592a31fSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 52135592a31fSmrg into the resulting binary]) 52145592a31fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 52155592a31fSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 52165592a31fSmrg into the resulting binary]) 52175592a31fSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 52185592a31fSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 52195592a31fSmrg into the library and all subsequent libraries and executables linked 52205592a31fSmrg against it]) 52215592a31fSmrg_LT_TAGDECL([], [inherit_rpath], [0], 52225592a31fSmrg [Set to yes if linker adds runtime paths of dependent libraries 52235592a31fSmrg to runtime path list]) 52245592a31fSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 52255592a31fSmrg [Whether libtool must link a program against all its dependency libraries]) 52265592a31fSmrg_LT_TAGDECL([], [fix_srcfile_path], [1], 52275592a31fSmrg [Fix the shell variable $srcfile for the compiler]) 52285592a31fSmrg_LT_TAGDECL([], [always_export_symbols], [0], 52295592a31fSmrg [Set to "yes" if exported symbols are required]) 52305592a31fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 52315592a31fSmrg [The commands to list exported symbols]) 52325592a31fSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 52335592a31fSmrg [Symbols that should not be listed in the preloaded symbols]) 52345592a31fSmrg_LT_TAGDECL([], [include_expsyms], [1], 52355592a31fSmrg [Symbols that must always be exported]) 52365592a31fSmrg_LT_TAGDECL([], [prelink_cmds], [2], 52375592a31fSmrg [Commands necessary for linking programs (against libraries) with templates]) 52385592a31fSmrg_LT_TAGDECL([], [file_list_spec], [1], 52395592a31fSmrg [Specify filename containing input files]) 52405592a31fSmrgdnl FIXME: Not yet implemented 52415592a31fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 52425592a31fSmrgdnl [Compiler flag to generate thread safe objects]) 52435592a31fSmrg])# _LT_LINKER_SHLIBS 52445592a31fSmrg 52455592a31fSmrg 52465592a31fSmrg# _LT_LANG_C_CONFIG([TAG]) 52475592a31fSmrg# ------------------------ 52485592a31fSmrg# Ensure that the configuration variables for a C compiler are suitably 52495592a31fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 52505592a31fSmrg# the compiler configuration to `libtool'. 52515592a31fSmrgm4_defun([_LT_LANG_C_CONFIG], 52525592a31fSmrg[m4_require([_LT_DECL_EGREP])dnl 52535592a31fSmrglt_save_CC="$CC" 52545592a31fSmrgAC_LANG_PUSH(C) 52551ac89addSmrg 52565592a31fSmrg# Source file extension for C test sources. 52575592a31fSmrgac_ext=c 52581ac89addSmrg 52595592a31fSmrg# Object file extension for compiled C test sources. 52605592a31fSmrgobjext=o 52615592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 52621ac89addSmrg 52635592a31fSmrg# Code to be used in simple compile tests 52645592a31fSmrglt_simple_compile_test_code="int some_variable = 0;" 52651ac89addSmrg 52665592a31fSmrg# Code to be used in simple link tests 52675592a31fSmrglt_simple_link_test_code='int main(){return(0);}' 52681ac89addSmrg 52695592a31fSmrg_LT_TAG_COMPILER 52705592a31fSmrg# Save the default compiler, since it gets overwritten when the other 52715592a31fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 52725592a31fSmrgcompiler_DEFAULT=$CC 52731ac89addSmrg 52745592a31fSmrg# save warnings/boilerplate of simple test code 52755592a31fSmrg_LT_COMPILER_BOILERPLATE 52765592a31fSmrg_LT_LINKER_BOILERPLATE 52771ac89addSmrg 52785592a31fSmrgif test -n "$compiler"; then 52795592a31fSmrg _LT_COMPILER_NO_RTTI($1) 52805592a31fSmrg _LT_COMPILER_PIC($1) 52815592a31fSmrg _LT_COMPILER_C_O($1) 52825592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 52835592a31fSmrg _LT_LINKER_SHLIBS($1) 52845592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 52855592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 52865592a31fSmrg LT_SYS_DLOPEN_SELF 52875592a31fSmrg _LT_CMD_STRIPLIB 52885592a31fSmrg 52895592a31fSmrg # Report which library types will actually be built 52905592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 52915592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 52925592a31fSmrg 52935592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 52945592a31fSmrg test "$can_build_shared" = "no" && enable_shared=no 52955592a31fSmrg 52965592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 52975592a31fSmrg # are all built from PIC. 52985592a31fSmrg case $host_os in 52995592a31fSmrg aix3*) 53005592a31fSmrg test "$enable_shared" = yes && enable_static=no 53015592a31fSmrg if test -n "$RANLIB"; then 53025592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 53035592a31fSmrg postinstall_cmds='$RANLIB $lib' 53045592a31fSmrg fi 53055592a31fSmrg ;; 53061ac89addSmrg 53075592a31fSmrg aix[[4-9]]*) 53085592a31fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 53095592a31fSmrg test "$enable_shared" = yes && enable_static=no 53105592a31fSmrg fi 53115592a31fSmrg ;; 53125592a31fSmrg esac 53135592a31fSmrg AC_MSG_RESULT([$enable_shared]) 53141ac89addSmrg 53155592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 53165592a31fSmrg # Make sure either enable_shared or enable_static is yes. 53175592a31fSmrg test "$enable_shared" = yes || enable_static=yes 53185592a31fSmrg AC_MSG_RESULT([$enable_static]) 53191ac89addSmrg 53205592a31fSmrg _LT_CONFIG($1) 53215592a31fSmrgfi 53225592a31fSmrgAC_LANG_POP 53235592a31fSmrgCC="$lt_save_CC" 53245592a31fSmrg])# _LT_LANG_C_CONFIG 532550f2e948Smrg 532650f2e948Smrg 53275592a31fSmrg# _LT_PROG_CXX 53285592a31fSmrg# ------------ 53295592a31fSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 53305592a31fSmrg# compiler, we have our own version here. 53315592a31fSmrgm4_defun([_LT_PROG_CXX], 53325592a31fSmrg[ 53335592a31fSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 53345592a31fSmrgAC_PROG_CXX 53355592a31fSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 53365592a31fSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 53375592a31fSmrg (test "X$CXX" != "Xg++"))) ; then 53385592a31fSmrg AC_PROG_CXXCPP 53395592a31fSmrgelse 53405592a31fSmrg _lt_caught_CXX_error=yes 53415592a31fSmrgfi 53425592a31fSmrgpopdef([AC_MSG_ERROR]) 53435592a31fSmrg])# _LT_PROG_CXX 534450f2e948Smrg 53455592a31fSmrgdnl aclocal-1.4 backwards compatibility: 53465592a31fSmrgdnl AC_DEFUN([_LT_PROG_CXX], []) 534750f2e948Smrg 534850f2e948Smrg 53495592a31fSmrg# _LT_LANG_CXX_CONFIG([TAG]) 53505592a31fSmrg# -------------------------- 53515592a31fSmrg# Ensure that the configuration variables for a C++ compiler are suitably 53525592a31fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 53535592a31fSmrg# the compiler configuration to `libtool'. 53545592a31fSmrgm4_defun([_LT_LANG_CXX_CONFIG], 53555592a31fSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl 53565592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 53575592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 53585592a31fSmrg 53595592a31fSmrgAC_LANG_PUSH(C++) 53605592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 53615592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 53625592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 53635592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 53645592a31fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 53655592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 53665592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 53675592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 53685592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53695592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 53705592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 53715592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 53725592a31fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 53735592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 53745592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 53755592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 53765592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 53775592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 53785592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 53795592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 53805592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 53815592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 53821ac89addSmrg 53835592a31fSmrg# Source file extension for C++ test sources. 53845592a31fSmrgac_ext=cpp 53851ac89addSmrg 53865592a31fSmrg# Object file extension for compiled C++ test sources. 53875592a31fSmrgobjext=o 53885592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 53895592a31fSmrg 53905592a31fSmrg# No sense in running all these tests if we already determined that 53915592a31fSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 53925592a31fSmrg# are currently assumed to apply to all compilers on this platform, 53935592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 53945592a31fSmrgif test "$_lt_caught_CXX_error" != yes; then 53955592a31fSmrg # Code to be used in simple compile tests 53965592a31fSmrg lt_simple_compile_test_code="int some_variable = 0;" 53975592a31fSmrg 53985592a31fSmrg # Code to be used in simple link tests 53995592a31fSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 54005592a31fSmrg 54015592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 54025592a31fSmrg _LT_TAG_COMPILER 54035592a31fSmrg 54045592a31fSmrg # save warnings/boilerplate of simple test code 54055592a31fSmrg _LT_COMPILER_BOILERPLATE 54065592a31fSmrg _LT_LINKER_BOILERPLATE 54075592a31fSmrg 54085592a31fSmrg # Allow CC to be a program name with arguments. 54095592a31fSmrg lt_save_CC=$CC 54105592a31fSmrg lt_save_LD=$LD 54115592a31fSmrg lt_save_GCC=$GCC 54125592a31fSmrg GCC=$GXX 54135592a31fSmrg lt_save_with_gnu_ld=$with_gnu_ld 54145592a31fSmrg lt_save_path_LD=$lt_cv_path_LD 54155592a31fSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 54165592a31fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 54175592a31fSmrg else 54185592a31fSmrg $as_unset lt_cv_prog_gnu_ld 54195592a31fSmrg fi 54205592a31fSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 54215592a31fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 54225592a31fSmrg else 54235592a31fSmrg $as_unset lt_cv_path_LD 54245592a31fSmrg fi 54255592a31fSmrg test -z "${LDCXX+set}" || LD=$LDCXX 54265592a31fSmrg CC=${CXX-"c++"} 54275592a31fSmrg compiler=$CC 54285592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 54295592a31fSmrg _LT_CC_BASENAME([$compiler]) 54301ac89addSmrg 54315592a31fSmrg if test -n "$compiler"; then 54325592a31fSmrg # We don't want -fno-exception when compiling C++ code, so set the 54335592a31fSmrg # no_builtin_flag separately 54345592a31fSmrg if test "$GXX" = yes; then 54355592a31fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 54365592a31fSmrg else 54375592a31fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 54385592a31fSmrg fi 54391ac89addSmrg 54405592a31fSmrg if test "$GXX" = yes; then 54415592a31fSmrg # Set up default GNU C++ configuration 544250f2e948Smrg 54435592a31fSmrg LT_PATH_LD 544450f2e948Smrg 54455592a31fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 54465592a31fSmrg # archiving commands below assume that GNU ld is being used. 54475592a31fSmrg if test "$with_gnu_ld" = yes; then 54485592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 54495592a31fSmrg _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' 545050f2e948Smrg 54515592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54525592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 545350f2e948Smrg 54545592a31fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 54555592a31fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 54565592a31fSmrg # investigate it a little bit more. (MM) 54575592a31fSmrg wlarc='${wl}' 545850f2e948Smrg 54595592a31fSmrg # ancient GNU ld didn't support --whole-archive et. al. 54605592a31fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 54615592a31fSmrg $GREP 'no-whole-archive' > /dev/null; then 54625592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 54635592a31fSmrg else 54645592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 54655592a31fSmrg fi 54665592a31fSmrg else 54675592a31fSmrg with_gnu_ld=no 54685592a31fSmrg wlarc= 54695592a31fSmrg 54705592a31fSmrg # A generic and very simple default shared library creation 54715592a31fSmrg # command for GNU C++ for the case where it uses the native 54725592a31fSmrg # linker, instead of GNU ld. If possible, this setting should 54735592a31fSmrg # overridden to take advantage of the native linker features on 54745592a31fSmrg # the platform it is being used on. 54755592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 54765592a31fSmrg fi 547750f2e948Smrg 54785592a31fSmrg # Commands to make compiler produce verbose output that lists 54795592a31fSmrg # what "hidden" libraries, object files and flags are used when 54805592a31fSmrg # linking a shared library. 54815592a31fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 548250f2e948Smrg 54835592a31fSmrg else 54845592a31fSmrg GXX=no 54855592a31fSmrg with_gnu_ld=no 54865592a31fSmrg wlarc= 54875592a31fSmrg fi 548850f2e948Smrg 54895592a31fSmrg # PORTME: fill in a description of your system's C++ link characteristics 54905592a31fSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 54915592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 54925592a31fSmrg case $host_os in 54935592a31fSmrg aix3*) 54945592a31fSmrg # FIXME: insert proper C++ library support 54955592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 54965592a31fSmrg ;; 54975592a31fSmrg aix[[4-9]]*) 54985592a31fSmrg if test "$host_cpu" = ia64; then 54995592a31fSmrg # On IA64, the linker does run time linking by default, so we don't 55005592a31fSmrg # have to do anything special. 55015592a31fSmrg aix_use_runtimelinking=no 55025592a31fSmrg exp_sym_flag='-Bexport' 55035592a31fSmrg no_entry_flag="" 55045592a31fSmrg else 55055592a31fSmrg aix_use_runtimelinking=no 55065592a31fSmrg 55075592a31fSmrg # Test if we are trying to use run time linking or normal 55085592a31fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 55095592a31fSmrg # need to do runtime linking. 55105592a31fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 55115592a31fSmrg for ld_flag in $LDFLAGS; do 55125592a31fSmrg case $ld_flag in 55135592a31fSmrg *-brtl*) 55145592a31fSmrg aix_use_runtimelinking=yes 55155592a31fSmrg break 55165592a31fSmrg ;; 55175592a31fSmrg esac 55185592a31fSmrg done 55195592a31fSmrg ;; 55205592a31fSmrg esac 552150f2e948Smrg 55225592a31fSmrg exp_sym_flag='-bexport' 55235592a31fSmrg no_entry_flag='-bnoentry' 55245592a31fSmrg fi 552550f2e948Smrg 55265592a31fSmrg # When large executables or shared objects are built, AIX ld can 55275592a31fSmrg # have problems creating the table of contents. If linking a library 55285592a31fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 55295592a31fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 55305592a31fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 55315592a31fSmrg 55325592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='' 55335592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 55345592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 55355592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55365592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55375592a31fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 55385592a31fSmrg 55395592a31fSmrg if test "$GXX" = yes; then 55405592a31fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 55415592a31fSmrg # We only want to do this on AIX 4.2 and lower, the check 55425592a31fSmrg # below for broken collect2 doesn't work under 4.3+ 55435592a31fSmrg collect2name=`${CC} -print-prog-name=collect2` 55445592a31fSmrg if test -f "$collect2name" && 55455592a31fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 55465592a31fSmrg then 55475592a31fSmrg # We have reworked collect2 55485592a31fSmrg : 55495592a31fSmrg else 55505592a31fSmrg # We have old collect2 55515592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 55525592a31fSmrg # It fails to find uninstalled libraries when the uninstalled 55535592a31fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 55545592a31fSmrg # to unsupported forces relinking 55555592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55565592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55575592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 55585592a31fSmrg fi 55595592a31fSmrg esac 55605592a31fSmrg shared_flag='-shared' 55615592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 55625592a31fSmrg shared_flag="$shared_flag "'${wl}-G' 55635592a31fSmrg fi 55645592a31fSmrg else 55655592a31fSmrg # not using gcc 55665592a31fSmrg if test "$host_cpu" = ia64; then 55675592a31fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 55685592a31fSmrg # chokes on -Wl,-G. The following line is correct: 55695592a31fSmrg shared_flag='-G' 55705592a31fSmrg else 55715592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 55725592a31fSmrg shared_flag='${wl}-G' 55735592a31fSmrg else 55745592a31fSmrg shared_flag='${wl}-bM:SRE' 55755592a31fSmrg fi 55765592a31fSmrg fi 55775592a31fSmrg fi 557850f2e948Smrg 55795592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 55805592a31fSmrg # It seems that -bexpall does not export symbols beginning with 55815592a31fSmrg # underscore (_), so it is better to generate a list of symbols to 55825592a31fSmrg # export. 55835592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 55845592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 55855592a31fSmrg # Warning - without using the other runtime loading flags (-brtl), 55865592a31fSmrg # -berok will link without error, but may produce a broken library. 55875592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55885592a31fSmrg # Determine the default libpath from the value encoded in an empty 55895592a31fSmrg # executable. 55905592a31fSmrg _LT_SYS_MODULE_PATH_AIX 55915592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 55925592a31fSmrg 55935592a31fSmrg _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" 55945592a31fSmrg else 55955592a31fSmrg if test "$host_cpu" = ia64; then 55965592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 55975592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55985592a31fSmrg _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" 55995592a31fSmrg else 56005592a31fSmrg # Determine the default libpath from the value encoded in an 56015592a31fSmrg # empty executable. 56025592a31fSmrg _LT_SYS_MODULE_PATH_AIX 56035592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 56045592a31fSmrg # Warning - without using the other run time loading flags, 56055592a31fSmrg # -berok will link without error, but may produce a broken library. 56065592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 56075592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 56085592a31fSmrg # Exported symbols can be pulled into shared objects from archives 56095592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 56105592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56115592a31fSmrg # This is similar to how AIX traditionally builds its shared 56125592a31fSmrg # libraries. 56135592a31fSmrg _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' 56145592a31fSmrg fi 56155592a31fSmrg fi 56165592a31fSmrg ;; 561750f2e948Smrg 56185592a31fSmrg beos*) 56195592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 56205592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56215592a31fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 56225592a31fSmrg # support --undefined. This deserves some investigation. FIXME 56235592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 56245592a31fSmrg else 56255592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56265592a31fSmrg fi 56275592a31fSmrg ;; 562850f2e948Smrg 56295592a31fSmrg chorus*) 56305592a31fSmrg case $cc_basename in 56315592a31fSmrg *) 56325592a31fSmrg # FIXME: insert proper C++ library support 56335592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56345592a31fSmrg ;; 56355592a31fSmrg esac 56365592a31fSmrg ;; 563750f2e948Smrg 56385592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 56395592a31fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 56405592a31fSmrg # as there is no search path for DLLs. 56415592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56425592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56435592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 56445592a31fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56455592a31fSmrg 56465592a31fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 56475592a31fSmrg _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' 56485592a31fSmrg # If the export-symbols file already is a .def file (1st line 56495592a31fSmrg # is EXPORTS), use it as is; otherwise, prepend... 56505592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 56515592a31fSmrg cp $export_symbols $output_objdir/$soname.def; 56525592a31fSmrg else 56535592a31fSmrg echo EXPORTS > $output_objdir/$soname.def; 56545592a31fSmrg cat $export_symbols >> $output_objdir/$soname.def; 56555592a31fSmrg fi~ 56565592a31fSmrg $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' 56575592a31fSmrg else 56585592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56595592a31fSmrg fi 56605592a31fSmrg ;; 56615592a31fSmrg darwin* | rhapsody*) 56625592a31fSmrg _LT_DARWIN_LINKER_FEATURES($1) 56635592a31fSmrg ;; 566450f2e948Smrg 56655592a31fSmrg dgux*) 56665592a31fSmrg case $cc_basename in 56675592a31fSmrg ec++*) 56685592a31fSmrg # FIXME: insert proper C++ library support 56695592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56705592a31fSmrg ;; 56715592a31fSmrg ghcx*) 56725592a31fSmrg # Green Hills C++ Compiler 56735592a31fSmrg # FIXME: insert proper C++ library support 56745592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56755592a31fSmrg ;; 56765592a31fSmrg *) 56775592a31fSmrg # FIXME: insert proper C++ library support 56785592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56795592a31fSmrg ;; 56805592a31fSmrg esac 56815592a31fSmrg ;; 568250f2e948Smrg 56835592a31fSmrg freebsd[[12]]*) 56845592a31fSmrg # C++ shared libraries reported to be fairly broken before 56855592a31fSmrg # switch to ELF 56865592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56875592a31fSmrg ;; 568850f2e948Smrg 56895592a31fSmrg freebsd-elf*) 56905592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 56915592a31fSmrg ;; 56925592a31fSmrg 56935592a31fSmrg freebsd* | dragonfly*) 56945592a31fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 56955592a31fSmrg # conventions 56965592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 56975592a31fSmrg ;; 569850f2e948Smrg 56995592a31fSmrg gnu*) 57005592a31fSmrg ;; 570150f2e948Smrg 57025592a31fSmrg hpux9*) 57035592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 57045592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57055592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57065592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57075592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 57085592a31fSmrg # but as the default 57095592a31fSmrg # location of the library. 57105592a31fSmrg 57115592a31fSmrg case $cc_basename in 57125592a31fSmrg CC*) 57135592a31fSmrg # FIXME: insert proper C++ library support 57145592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57155592a31fSmrg ;; 57165592a31fSmrg aCC*) 57175592a31fSmrg _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' 57185592a31fSmrg # Commands to make compiler produce verbose output that lists 57195592a31fSmrg # what "hidden" libraries, object files and flags are used when 57205592a31fSmrg # linking a shared library. 57215592a31fSmrg # 57225592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 57235592a31fSmrg # explicitly linking system object files so we need to strip them 57245592a31fSmrg # from the output so that they don't get included in the library 57255592a31fSmrg # dependencies. 57265592a31fSmrg 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' 57275592a31fSmrg ;; 57285592a31fSmrg *) 57295592a31fSmrg if test "$GXX" = yes; then 57305592a31fSmrg _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' 57315592a31fSmrg else 57325592a31fSmrg # FIXME: insert proper C++ library support 57335592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57345592a31fSmrg fi 57355592a31fSmrg ;; 57365592a31fSmrg esac 57375592a31fSmrg ;; 573850f2e948Smrg 57395592a31fSmrg hpux10*|hpux11*) 57405592a31fSmrg if test $with_gnu_ld = no; then 57415592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 57425592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57435592a31fSmrg 57445592a31fSmrg case $host_cpu in 57455592a31fSmrg hppa*64*|ia64*) 57465592a31fSmrg ;; 57475592a31fSmrg *) 57485592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 57495592a31fSmrg ;; 57505592a31fSmrg esac 57515592a31fSmrg fi 57525592a31fSmrg case $host_cpu in 57535592a31fSmrg hppa*64*|ia64*) 57545592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 57555592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57565592a31fSmrg ;; 57575592a31fSmrg *) 57585592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57595592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57605592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 57615592a31fSmrg # but as the default 57625592a31fSmrg # location of the library. 57635592a31fSmrg ;; 57645592a31fSmrg esac 57655592a31fSmrg 57665592a31fSmrg case $cc_basename in 57675592a31fSmrg CC*) 57685592a31fSmrg # FIXME: insert proper C++ library support 57695592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 57705592a31fSmrg ;; 57715592a31fSmrg aCC*) 57725592a31fSmrg case $host_cpu in 57735592a31fSmrg hppa*64*) 57745592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57755592a31fSmrg ;; 57765592a31fSmrg ia64*) 57775592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57785592a31fSmrg ;; 57795592a31fSmrg *) 57805592a31fSmrg _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' 57815592a31fSmrg ;; 57825592a31fSmrg esac 57835592a31fSmrg # Commands to make compiler produce verbose output that lists 57845592a31fSmrg # what "hidden" libraries, object files and flags are used when 57855592a31fSmrg # linking a shared library. 57865592a31fSmrg # 57875592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 57885592a31fSmrg # explicitly linking system object files so we need to strip them 57895592a31fSmrg # from the output so that they don't get included in the library 57905592a31fSmrg # dependencies. 57915592a31fSmrg 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' 57925592a31fSmrg ;; 57935592a31fSmrg *) 57945592a31fSmrg if test "$GXX" = yes; then 57955592a31fSmrg if test $with_gnu_ld = no; then 57965592a31fSmrg case $host_cpu in 57975592a31fSmrg hppa*64*) 57985592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 57995592a31fSmrg ;; 58005592a31fSmrg ia64*) 58015592a31fSmrg _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' 58025592a31fSmrg ;; 58035592a31fSmrg *) 58045592a31fSmrg _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' 58055592a31fSmrg ;; 58065592a31fSmrg esac 58075592a31fSmrg fi 58085592a31fSmrg else 58095592a31fSmrg # FIXME: insert proper C++ library support 58105592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58115592a31fSmrg fi 58125592a31fSmrg ;; 58135592a31fSmrg esac 58145592a31fSmrg ;; 581550f2e948Smrg 58165592a31fSmrg interix[[3-9]]*) 58175592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 58185592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58195592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58205592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 58215592a31fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 58225592a31fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 58235592a31fSmrg # default) and relocated if they conflict, which is a slow very memory 58245592a31fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 58255592a31fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 58265592a31fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 58275592a31fSmrg _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' 58285592a31fSmrg _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' 58295592a31fSmrg ;; 58305592a31fSmrg irix5* | irix6*) 58315592a31fSmrg case $cc_basename in 58325592a31fSmrg CC*) 58335592a31fSmrg # SGI C++ 58345592a31fSmrg _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' 58355592a31fSmrg 58365592a31fSmrg # Archives containing C++ object files must be created using 58375592a31fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 58385592a31fSmrg # necessary to make sure instantiated templates are included 58395592a31fSmrg # in the archive. 58405592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 58415592a31fSmrg ;; 58425592a31fSmrg *) 58435592a31fSmrg if test "$GXX" = yes; then 58445592a31fSmrg if test "$with_gnu_ld" = no; then 58455592a31fSmrg _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' 58465592a31fSmrg else 58475592a31fSmrg _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' 58485592a31fSmrg fi 58495592a31fSmrg fi 58505592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58515592a31fSmrg ;; 58525592a31fSmrg esac 58535592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 58545592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58555592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 58565592a31fSmrg ;; 585750f2e948Smrg 58585592a31fSmrg linux* | k*bsd*-gnu) 58595592a31fSmrg case $cc_basename in 58605592a31fSmrg KCC*) 58615592a31fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 58625592a31fSmrg 58635592a31fSmrg # KCC will only create a shared library if the output file 58645592a31fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 58655592a31fSmrg # to its proper name (with version) after linking. 58665592a31fSmrg _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' 58675592a31fSmrg _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' 58685592a31fSmrg # Commands to make compiler produce verbose output that lists 58695592a31fSmrg # what "hidden" libraries, object files and flags are used when 58705592a31fSmrg # linking a shared library. 58715592a31fSmrg # 58725592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 58735592a31fSmrg # explicitly linking system object files so we need to strip them 58745592a31fSmrg # from the output so that they don't get included in the library 58755592a31fSmrg # dependencies. 58765592a31fSmrg 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' 58775592a31fSmrg 58785592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 58795592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 58805592a31fSmrg 58815592a31fSmrg # Archives containing C++ object files must be created using 58825592a31fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 58835592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 58845592a31fSmrg ;; 58855592a31fSmrg icpc* | ecpc* ) 58865592a31fSmrg # Intel C++ 58875592a31fSmrg with_gnu_ld=yes 58885592a31fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 58895592a31fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 58905592a31fSmrg # earlier do not add the objects themselves. 58915592a31fSmrg case `$CC -V 2>&1` in 58925592a31fSmrg *"Version 7."*) 58935592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 58945592a31fSmrg _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' 58955592a31fSmrg ;; 58965592a31fSmrg *) # Version 8.0 or newer 58975592a31fSmrg tmp_idyn= 58985592a31fSmrg case $host_cpu in 58995592a31fSmrg ia64*) tmp_idyn=' -i_dynamic';; 59005592a31fSmrg esac 59015592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59025592a31fSmrg _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' 59035592a31fSmrg ;; 59045592a31fSmrg esac 59055592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 59065592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 59075592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59085592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 59095592a31fSmrg ;; 59105592a31fSmrg pgCC* | pgcpp*) 59115592a31fSmrg # Portland Group C++ compiler 59125592a31fSmrg case `$CC -V` in 59135592a31fSmrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 59145592a31fSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 59155592a31fSmrg rm -rf $tpldir~ 59165592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 59175592a31fSmrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 59185592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 59195592a31fSmrg rm -rf $tpldir~ 59205592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 59215592a31fSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 59225592a31fSmrg $RANLIB $oldlib' 59235592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 59245592a31fSmrg rm -rf $tpldir~ 59255592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 59265592a31fSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 59275592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 59285592a31fSmrg rm -rf $tpldir~ 59295592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 59305592a31fSmrg $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' 59315592a31fSmrg ;; 59325592a31fSmrg *) # Version 6 will use weak symbols 59335592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 59345592a31fSmrg _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' 59355592a31fSmrg ;; 59365592a31fSmrg esac 593750f2e948Smrg 59385592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 59395592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59405592a31fSmrg _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' 59415592a31fSmrg ;; 59425592a31fSmrg cxx*) 59435592a31fSmrg # Compaq C++ 59445592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 59455592a31fSmrg _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' 594650f2e948Smrg 59475592a31fSmrg runpath_var=LD_RUN_PATH 59485592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59495592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 595050f2e948Smrg 59515592a31fSmrg # Commands to make compiler produce verbose output that lists 59525592a31fSmrg # what "hidden" libraries, object files and flags are used when 59535592a31fSmrg # linking a shared library. 59545592a31fSmrg # 59555592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 59565592a31fSmrg # explicitly linking system object files so we need to strip them 59575592a31fSmrg # from the output so that they don't get included in the library 59585592a31fSmrg # dependencies. 59595592a31fSmrg 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' 59605592a31fSmrg ;; 59615592a31fSmrg xl*) 59625592a31fSmrg # IBM XL 8.0 on PPC, with GNU ld 59635592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59645592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59655592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 59665592a31fSmrg if test "x$supports_anon_versioning" = xyes; then 59675592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 59685592a31fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 59695592a31fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 59705592a31fSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 59715592a31fSmrg fi 59725592a31fSmrg ;; 59735592a31fSmrg *) 59745592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 59755592a31fSmrg *Sun\ C*) 59765592a31fSmrg # Sun C++ 5.9 59775592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 59785592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 59795592a31fSmrg _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' 59805592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59815592a31fSmrg _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' 59825592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 59835592a31fSmrg 59845592a31fSmrg # Not sure whether something based on 59855592a31fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 59865592a31fSmrg # would be better. 59875592a31fSmrg output_verbose_link_cmd='echo' 59885592a31fSmrg 59895592a31fSmrg # Archives containing C++ object files must be created using 59905592a31fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 59915592a31fSmrg # necessary to make sure instantiated templates are included 59925592a31fSmrg # in the archive. 59935592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 59945592a31fSmrg ;; 59955592a31fSmrg esac 59965592a31fSmrg ;; 59975592a31fSmrg esac 59985592a31fSmrg ;; 599950f2e948Smrg 60005592a31fSmrg lynxos*) 60015592a31fSmrg # FIXME: insert proper C++ library support 60025592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60035592a31fSmrg ;; 600450f2e948Smrg 60055592a31fSmrg m88k*) 60065592a31fSmrg # FIXME: insert proper C++ library support 60075592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60085592a31fSmrg ;; 600950f2e948Smrg 60105592a31fSmrg mvs*) 60115592a31fSmrg case $cc_basename in 60125592a31fSmrg cxx*) 60135592a31fSmrg # FIXME: insert proper C++ library support 60145592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60155592a31fSmrg ;; 60165592a31fSmrg *) 60175592a31fSmrg # FIXME: insert proper C++ library support 60185592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60195592a31fSmrg ;; 60205592a31fSmrg esac 60215592a31fSmrg ;; 602250f2e948Smrg 60235592a31fSmrg netbsd*) 60245592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 60255592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 60265592a31fSmrg wlarc= 60275592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 60285592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60295592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60305592a31fSmrg fi 60315592a31fSmrg # Workaround some broken pre-1.5 toolchains 60325592a31fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 60335592a31fSmrg ;; 603450f2e948Smrg 60355592a31fSmrg *nto* | *qnx*) 60365592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 60375592a31fSmrg ;; 603850f2e948Smrg 60395592a31fSmrg openbsd2*) 60405592a31fSmrg # C++ shared libraries are fairly broken 60415592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60425592a31fSmrg ;; 604350f2e948Smrg 60445592a31fSmrg openbsd*) 60455592a31fSmrg if test -f /usr/libexec/ld.so; then 60465592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60475592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60485592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60495592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 60505592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 60515592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 60525592a31fSmrg _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' 60535592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 60545592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 60555592a31fSmrg fi 60565592a31fSmrg output_verbose_link_cmd=echo 60575592a31fSmrg else 60585592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60595592a31fSmrg fi 60605592a31fSmrg ;; 606150f2e948Smrg 60625592a31fSmrg osf3* | osf4* | osf5*) 60635592a31fSmrg case $cc_basename in 60645592a31fSmrg KCC*) 60655592a31fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 60665592a31fSmrg 60675592a31fSmrg # KCC will only create a shared library if the output file 60685592a31fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 60695592a31fSmrg # to its proper name (with version) after linking. 60705592a31fSmrg _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' 60715592a31fSmrg 60725592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 60735592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 60745592a31fSmrg 60755592a31fSmrg # Archives containing C++ object files must be created using 60765592a31fSmrg # the KAI C++ compiler. 60775592a31fSmrg case $host in 60785592a31fSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 60795592a31fSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 60805592a31fSmrg esac 60815592a31fSmrg ;; 60825592a31fSmrg RCC*) 60835592a31fSmrg # Rational C++ 2.4.1 60845592a31fSmrg # FIXME: insert proper C++ library support 60855592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60865592a31fSmrg ;; 60875592a31fSmrg cxx*) 60885592a31fSmrg case $host in 60895592a31fSmrg osf3*) 60905592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 60915592a31fSmrg _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' 60925592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 60935592a31fSmrg ;; 60945592a31fSmrg *) 60955592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 60965592a31fSmrg _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' 60975592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 60985592a31fSmrg echo "-hidden">> $lib.exp~ 60995592a31fSmrg $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~ 61005592a31fSmrg $RM $lib.exp' 61015592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 61025592a31fSmrg ;; 61035592a31fSmrg esac 610450f2e948Smrg 61055592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 610650f2e948Smrg 61075592a31fSmrg # Commands to make compiler produce verbose output that lists 61085592a31fSmrg # what "hidden" libraries, object files and flags are used when 61095592a31fSmrg # linking a shared library. 61105592a31fSmrg # 61115592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 61125592a31fSmrg # explicitly linking system object files so we need to strip them 61135592a31fSmrg # from the output so that they don't get included in the library 61145592a31fSmrg # dependencies. 61155592a31fSmrg 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' 61165592a31fSmrg ;; 61175592a31fSmrg *) 61185592a31fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 61195592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 61205592a31fSmrg case $host in 61215592a31fSmrg osf3*) 61225592a31fSmrg _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' 61235592a31fSmrg ;; 61245592a31fSmrg *) 61255592a31fSmrg _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' 61265592a31fSmrg ;; 61275592a31fSmrg esac 61285592a31fSmrg 61295592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 61305592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 61315592a31fSmrg 61325592a31fSmrg # Commands to make compiler produce verbose output that lists 61335592a31fSmrg # what "hidden" libraries, object files and flags are used when 61345592a31fSmrg # linking a shared library. 61355592a31fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 61365592a31fSmrg 61375592a31fSmrg else 61385592a31fSmrg # FIXME: insert proper C++ library support 61395592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61405592a31fSmrg fi 61415592a31fSmrg ;; 61425592a31fSmrg esac 61435592a31fSmrg ;; 614450f2e948Smrg 61455592a31fSmrg psos*) 61465592a31fSmrg # FIXME: insert proper C++ library support 61475592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61485592a31fSmrg ;; 614950f2e948Smrg 61505592a31fSmrg sunos4*) 61515592a31fSmrg case $cc_basename in 61525592a31fSmrg CC*) 61535592a31fSmrg # Sun C++ 4.x 61545592a31fSmrg # FIXME: insert proper C++ library support 61555592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61565592a31fSmrg ;; 61575592a31fSmrg lcc*) 61585592a31fSmrg # Lucid 61595592a31fSmrg # FIXME: insert proper C++ library support 61605592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61615592a31fSmrg ;; 61625592a31fSmrg *) 61635592a31fSmrg # FIXME: insert proper C++ library support 61645592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61655592a31fSmrg ;; 61665592a31fSmrg esac 61675592a31fSmrg ;; 616850f2e948Smrg 61695592a31fSmrg solaris*) 61705592a31fSmrg case $cc_basename in 61715592a31fSmrg CC*) 61725592a31fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 61735592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 61745592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 61755592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 61765592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 61775592a31fSmrg $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' 61785592a31fSmrg 61795592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 61805592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 61815592a31fSmrg case $host_os in 61825592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 61835592a31fSmrg *) 61845592a31fSmrg # The compiler driver will combine and reorder linker options, 61855592a31fSmrg # but understands `-z linker_flag'. 61865592a31fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 61875592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 61885592a31fSmrg ;; 61895592a31fSmrg esac 61905592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 619150f2e948Smrg 61925592a31fSmrg output_verbose_link_cmd='echo' 619350f2e948Smrg 61945592a31fSmrg # Archives containing C++ object files must be created using 61955592a31fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 61965592a31fSmrg # necessary to make sure instantiated templates are included 61975592a31fSmrg # in the archive. 61985592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 61995592a31fSmrg ;; 62005592a31fSmrg gcx*) 62015592a31fSmrg # Green Hills C++ Compiler 62025592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 620350f2e948Smrg 62045592a31fSmrg # The C++ compiler must be used to create the archive. 62055592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 62065592a31fSmrg ;; 62075592a31fSmrg *) 62085592a31fSmrg # GNU C++ compiler with Solaris linker 62095592a31fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 62105592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 62115592a31fSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 62125592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 62135592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 62145592a31fSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 62155592a31fSmrg 62165592a31fSmrg # Commands to make compiler produce verbose output that lists 62175592a31fSmrg # what "hidden" libraries, object files and flags are used when 62185592a31fSmrg # linking a shared library. 62195592a31fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 62205592a31fSmrg else 62215592a31fSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 62225592a31fSmrg # platform. 62235592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 62245592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 62255592a31fSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 62265592a31fSmrg 62275592a31fSmrg # Commands to make compiler produce verbose output that lists 62285592a31fSmrg # what "hidden" libraries, object files and flags are used when 62295592a31fSmrg # linking a shared library. 62305592a31fSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 62315592a31fSmrg fi 62325592a31fSmrg 62335592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 62345592a31fSmrg case $host_os in 62355592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 62365592a31fSmrg *) 62375592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 62385592a31fSmrg ;; 62395592a31fSmrg esac 62405592a31fSmrg fi 62415592a31fSmrg ;; 62425592a31fSmrg esac 62435592a31fSmrg ;; 624450f2e948Smrg 62455592a31fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 62465592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 62475592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62485592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62495592a31fSmrg runpath_var='LD_RUN_PATH' 625050f2e948Smrg 62515592a31fSmrg case $cc_basename in 62525592a31fSmrg CC*) 62535592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62545592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62555592a31fSmrg ;; 62565592a31fSmrg *) 62575592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62585592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62595592a31fSmrg ;; 62605592a31fSmrg esac 62615592a31fSmrg ;; 626250f2e948Smrg 62635592a31fSmrg sysv5* | sco3.2v5* | sco5v6*) 62645592a31fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 62655592a31fSmrg # link with -lc, and that would cause any symbols used from libc to 62665592a31fSmrg # always be unresolved, which means just about no library would 62675592a31fSmrg # ever link correctly. If we're not using GNU ld we use -z text 62685592a31fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 62695592a31fSmrg # as -z defs. 62705592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 62715592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 62725592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62735592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 62745592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 62755592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 62765592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 62775592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 62785592a31fSmrg runpath_var='LD_RUN_PATH' 627950f2e948Smrg 62805592a31fSmrg case $cc_basename in 62815592a31fSmrg CC*) 62825592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62835592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62845592a31fSmrg ;; 62855592a31fSmrg *) 62865592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62875592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 62885592a31fSmrg ;; 62895592a31fSmrg esac 62905592a31fSmrg ;; 629150f2e948Smrg 62925592a31fSmrg tandem*) 62935592a31fSmrg case $cc_basename in 62945592a31fSmrg NCC*) 62955592a31fSmrg # NonStop-UX NCC 3.20 62965592a31fSmrg # FIXME: insert proper C++ library support 62975592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62985592a31fSmrg ;; 62995592a31fSmrg *) 63005592a31fSmrg # FIXME: insert proper C++ library support 63015592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63025592a31fSmrg ;; 63035592a31fSmrg esac 63045592a31fSmrg ;; 630550f2e948Smrg 63065592a31fSmrg vxworks*) 63075592a31fSmrg # FIXME: insert proper C++ library support 63085592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63095592a31fSmrg ;; 63101ac89addSmrg 63115592a31fSmrg *) 63125592a31fSmrg # FIXME: insert proper C++ library support 63135592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63145592a31fSmrg ;; 63155592a31fSmrg esac 63161ac89addSmrg 63175592a31fSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 63185592a31fSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 63195592a31fSmrg 63205592a31fSmrg _LT_TAGVAR(GCC, $1)="$GXX" 63215592a31fSmrg _LT_TAGVAR(LD, $1)="$LD" 63225592a31fSmrg 63235592a31fSmrg ## CAVEAT EMPTOR: 63245592a31fSmrg ## There is no encapsulation within the following macros, do not change 63255592a31fSmrg ## the running order or otherwise move them around unless you know exactly 63265592a31fSmrg ## what you are doing... 63275592a31fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 63285592a31fSmrg _LT_COMPILER_PIC($1) 63295592a31fSmrg _LT_COMPILER_C_O($1) 63305592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 63315592a31fSmrg _LT_LINKER_SHLIBS($1) 63325592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 63335592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 63345592a31fSmrg 63355592a31fSmrg _LT_CONFIG($1) 63365592a31fSmrg fi # test -n "$compiler" 63375592a31fSmrg 63385592a31fSmrg CC=$lt_save_CC 63395592a31fSmrg LDCXX=$LD 63405592a31fSmrg LD=$lt_save_LD 63415592a31fSmrg GCC=$lt_save_GCC 63425592a31fSmrg with_gnu_ld=$lt_save_with_gnu_ld 63435592a31fSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 63445592a31fSmrg lt_cv_path_LD=$lt_save_path_LD 63455592a31fSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 63465592a31fSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 63475592a31fSmrgfi # test "$_lt_caught_CXX_error" != yes 63481ac89addSmrg 63495592a31fSmrgAC_LANG_POP 63505592a31fSmrg])# _LT_LANG_CXX_CONFIG 63511ac89addSmrg 63521ac89addSmrg 63535592a31fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 63545592a31fSmrg# --------------------------------- 63555592a31fSmrg# Figure out "hidden" library dependencies from verbose 63565592a31fSmrg# compiler output when linking a shared library. 63575592a31fSmrg# Parse the compiler output and extract the necessary 63585592a31fSmrg# objects, libraries and library flags. 63595592a31fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 63605592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63615592a31fSmrg# Dependencies to place before and after the object being linked: 63625592a31fSmrg_LT_TAGVAR(predep_objects, $1)= 63635592a31fSmrg_LT_TAGVAR(postdep_objects, $1)= 63645592a31fSmrg_LT_TAGVAR(predeps, $1)= 63655592a31fSmrg_LT_TAGVAR(postdeps, $1)= 63665592a31fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 63671ac89addSmrg 63685592a31fSmrgdnl we can't use the lt_simple_compile_test_code here, 63695592a31fSmrgdnl because it contains code intended for an executable, 63705592a31fSmrgdnl not a library. It's possible we should let each 63715592a31fSmrgdnl tag define a new lt_????_link_test_code variable, 63725592a31fSmrgdnl but it's only used here... 63735592a31fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 63745592a31fSmrgint a; 63755592a31fSmrgvoid foo (void) { a = 0; } 63765592a31fSmrg_LT_EOF 63775592a31fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 63785592a31fSmrgclass Foo 63795592a31fSmrg{ 63805592a31fSmrgpublic: 63815592a31fSmrg Foo (void) { a = 0; } 63825592a31fSmrgprivate: 63835592a31fSmrg int a; 63845592a31fSmrg}; 63855592a31fSmrg_LT_EOF 63865592a31fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 63875592a31fSmrg subroutine foo 63885592a31fSmrg implicit none 63895592a31fSmrg integer*4 a 63905592a31fSmrg a=0 63915592a31fSmrg return 63925592a31fSmrg end 63935592a31fSmrg_LT_EOF 63945592a31fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 63955592a31fSmrg subroutine foo 63965592a31fSmrg implicit none 63975592a31fSmrg integer a 63985592a31fSmrg a=0 63995592a31fSmrg return 64005592a31fSmrg end 64015592a31fSmrg_LT_EOF 64025592a31fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 64035592a31fSmrgpublic class foo { 64045592a31fSmrg private int a; 64055592a31fSmrg public void bar (void) { 64065592a31fSmrg a = 0; 64075592a31fSmrg } 64085592a31fSmrg}; 64095592a31fSmrg_LT_EOF 64105592a31fSmrg]) 64115592a31fSmrgdnl Parse the compiler output and extract the necessary 64125592a31fSmrgdnl objects, libraries and library flags. 64135592a31fSmrgif AC_TRY_EVAL(ac_compile); then 64145592a31fSmrg # Parse the compiler output and extract the necessary 64155592a31fSmrg # objects, libraries and library flags. 641645bc899bSmrg 64175592a31fSmrg # Sentinel used to keep track of whether or not we are before 64185592a31fSmrg # the conftest object file. 64195592a31fSmrg pre_test_object_deps_done=no 642045bc899bSmrg 64215592a31fSmrg for p in `eval "$output_verbose_link_cmd"`; do 64225592a31fSmrg case $p in 642345bc899bSmrg 64245592a31fSmrg -L* | -R* | -l*) 64255592a31fSmrg # Some compilers place space between "-{L,R}" and the path. 64265592a31fSmrg # Remove the space. 64275592a31fSmrg if test $p = "-L" || 64285592a31fSmrg test $p = "-R"; then 64295592a31fSmrg prev=$p 64305592a31fSmrg continue 64315592a31fSmrg else 64325592a31fSmrg prev= 64335592a31fSmrg fi 643450f2e948Smrg 64355592a31fSmrg if test "$pre_test_object_deps_done" = no; then 64365592a31fSmrg case $p in 64375592a31fSmrg -L* | -R*) 64385592a31fSmrg # Internal compiler library paths should come after those 64395592a31fSmrg # provided the user. The postdeps already come after the 64405592a31fSmrg # user supplied libs so there is no need to process them. 64415592a31fSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 64425592a31fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 64435592a31fSmrg else 64445592a31fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 64455592a31fSmrg fi 64465592a31fSmrg ;; 64475592a31fSmrg # The "-l" case would never come before the object being 64485592a31fSmrg # linked, so don't bother handling this case. 64495592a31fSmrg esac 64505592a31fSmrg else 64515592a31fSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 64525592a31fSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 64535592a31fSmrg else 64545592a31fSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 64555592a31fSmrg fi 64565592a31fSmrg fi 64575592a31fSmrg ;; 645850f2e948Smrg 64595592a31fSmrg *.$objext) 64605592a31fSmrg # This assumes that the test object file only shows up 64615592a31fSmrg # once in the compiler output. 64625592a31fSmrg if test "$p" = "conftest.$objext"; then 64635592a31fSmrg pre_test_object_deps_done=yes 64645592a31fSmrg continue 64655592a31fSmrg fi 646650f2e948Smrg 64675592a31fSmrg if test "$pre_test_object_deps_done" = no; then 64685592a31fSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 64695592a31fSmrg _LT_TAGVAR(predep_objects, $1)="$p" 64705592a31fSmrg else 64715592a31fSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 64725592a31fSmrg fi 64735592a31fSmrg else 64745592a31fSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 64755592a31fSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 64765592a31fSmrg else 64775592a31fSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 64785592a31fSmrg fi 64795592a31fSmrg fi 64805592a31fSmrg ;; 648150f2e948Smrg 64825592a31fSmrg *) ;; # Ignore the rest. 648350f2e948Smrg 64845592a31fSmrg esac 64855592a31fSmrg done 64863a925b30Smrg 64875592a31fSmrg # Clean up. 64885592a31fSmrg rm -f a.out a.exe 648950f2e948Smrgelse 64905592a31fSmrg echo "libtool.m4: error: problem compiling $1 test program" 649150f2e948Smrgfi 649250f2e948Smrg 64935592a31fSmrg$RM -f confest.$objext 649450f2e948Smrg 64955592a31fSmrg# PORTME: override above test on systems where it is broken 64965592a31fSmrgm4_if([$1], [CXX], 64975592a31fSmrg[case $host_os in 64985592a31fSmrginterix[[3-9]]*) 64995592a31fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 65005592a31fSmrg # hack all around it, let's just trust "g++" to DTRT. 65015592a31fSmrg _LT_TAGVAR(predep_objects,$1)= 65025592a31fSmrg _LT_TAGVAR(postdep_objects,$1)= 65035592a31fSmrg _LT_TAGVAR(postdeps,$1)= 65045592a31fSmrg ;; 650550f2e948Smrg 65065592a31fSmrglinux*) 65075592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 65085592a31fSmrg *Sun\ C*) 65095592a31fSmrg # Sun C++ 5.9 651050f2e948Smrg 65115592a31fSmrg # The more standards-conforming stlport4 library is 65125592a31fSmrg # incompatible with the Cstd library. Avoid specifying 65135592a31fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 65145592a31fSmrg # -library=stlport4 depends on it. 65155592a31fSmrg case " $CXX $CXXFLAGS " in 65165592a31fSmrg *" -library=stlport4 "*) 65175592a31fSmrg solaris_use_stlport4=yes 65185592a31fSmrg ;; 65195592a31fSmrg esac 652050f2e948Smrg 65215592a31fSmrg if test "$solaris_use_stlport4" != yes; then 65225592a31fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 65235592a31fSmrg fi 65245592a31fSmrg ;; 65255592a31fSmrg esac 65265592a31fSmrg ;; 65275592a31fSmrg 65285592a31fSmrgsolaris*) 65295592a31fSmrg case $cc_basename in 65305592a31fSmrg CC*) 65315592a31fSmrg # The more standards-conforming stlport4 library is 65325592a31fSmrg # incompatible with the Cstd library. Avoid specifying 65335592a31fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 65345592a31fSmrg # -library=stlport4 depends on it. 65355592a31fSmrg case " $CXX $CXXFLAGS " in 65365592a31fSmrg *" -library=stlport4 "*) 65375592a31fSmrg solaris_use_stlport4=yes 65385592a31fSmrg ;; 65395592a31fSmrg esac 654050f2e948Smrg 65415592a31fSmrg # Adding this requires a known-good setup of shared libraries for 65425592a31fSmrg # Sun compiler versions before 5.6, else PIC objects from an old 65435592a31fSmrg # archive will be linked into the output, leading to subtle bugs. 65445592a31fSmrg if test "$solaris_use_stlport4" != yes; then 65455592a31fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 65465592a31fSmrg fi 65475592a31fSmrg ;; 65485592a31fSmrg esac 65495592a31fSmrg ;; 65505592a31fSmrgesac 65515592a31fSmrg]) 655250f2e948Smrg 65535592a31fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 65545592a31fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 65555592a31fSmrgesac 65565592a31fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 65575592a31fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 65585592a31fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 65595592a31fSmrgfi 65605592a31fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 65615592a31fSmrg [The directories searched by this compiler when creating a shared library]) 65625592a31fSmrg_LT_TAGDECL([], [predep_objects], [1], 65635592a31fSmrg [Dependencies to place before and after the objects being linked to 65645592a31fSmrg create a shared library]) 65655592a31fSmrg_LT_TAGDECL([], [postdep_objects], [1]) 65665592a31fSmrg_LT_TAGDECL([], [predeps], [1]) 65675592a31fSmrg_LT_TAGDECL([], [postdeps], [1]) 65685592a31fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 65695592a31fSmrg [The library search path used internally by the compiler when linking 65705592a31fSmrg a shared library]) 65715592a31fSmrg])# _LT_SYS_HIDDEN_LIBDEPS 65725592a31fSmrg 65735592a31fSmrg 65745592a31fSmrg# _LT_PROG_F77 65755592a31fSmrg# ------------ 65765592a31fSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string 65775592a31fSmrg# if there is no fortran compiler, we have our own version here. 65785592a31fSmrgm4_defun([_LT_PROG_F77], 65793a925b30Smrg[ 65805592a31fSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 65815592a31fSmrgAC_PROG_F77 65825592a31fSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 65835592a31fSmrg _lt_disable_F77=yes 65845592a31fSmrgfi 65855592a31fSmrgpopdef([AC_MSG_ERROR]) 65865592a31fSmrg])# _LT_PROG_F77 658750f2e948Smrg 65885592a31fSmrgdnl aclocal-1.4 backwards compatibility: 65895592a31fSmrgdnl AC_DEFUN([_LT_PROG_F77], []) 659050f2e948Smrg 659150f2e948Smrg 65925592a31fSmrg# _LT_LANG_F77_CONFIG([TAG]) 65935592a31fSmrg# -------------------------- 65945592a31fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 65955592a31fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 65965592a31fSmrg# to write the compiler configuration to `libtool'. 65975592a31fSmrgm4_defun([_LT_LANG_F77_CONFIG], 65985592a31fSmrg[AC_REQUIRE([_LT_PROG_F77])dnl 65995592a31fSmrgAC_LANG_PUSH(Fortran 77) 660050f2e948Smrg 66015592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 66025592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 66035592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 66045592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 66055592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 66065592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 66075592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 66085592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 66095592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 66105592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 66115592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 66125592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 66135592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 66145592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 66155592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 66165592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 66175592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 66185592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 66195592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 66205592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 662150f2e948Smrg 66225592a31fSmrg# Source file extension for f77 test sources. 66235592a31fSmrgac_ext=f 662450f2e948Smrg 66255592a31fSmrg# Object file extension for compiled f77 test sources. 66265592a31fSmrgobjext=o 66275592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 66285592a31fSmrg 66295592a31fSmrg# No sense in running all these tests if we already determined that 66305592a31fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 66315592a31fSmrg# are currently assumed to apply to all compilers on this platform, 66325592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 66335592a31fSmrgif test "$_lt_disable_F77" != yes; then 66345592a31fSmrg # Code to be used in simple compile tests 66355592a31fSmrg lt_simple_compile_test_code="\ 66365592a31fSmrg subroutine t 66375592a31fSmrg return 66385592a31fSmrg end 66395592a31fSmrg" 664050f2e948Smrg 66415592a31fSmrg # Code to be used in simple link tests 66425592a31fSmrg lt_simple_link_test_code="\ 66435592a31fSmrg program t 66445592a31fSmrg end 66455592a31fSmrg" 664650f2e948Smrg 66475592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 66485592a31fSmrg _LT_TAG_COMPILER 664950f2e948Smrg 66505592a31fSmrg # save warnings/boilerplate of simple test code 66515592a31fSmrg _LT_COMPILER_BOILERPLATE 66525592a31fSmrg _LT_LINKER_BOILERPLATE 665350f2e948Smrg 66545592a31fSmrg # Allow CC to be a program name with arguments. 66555592a31fSmrg lt_save_CC="$CC" 66565592a31fSmrg lt_save_GCC=$GCC 66575592a31fSmrg CC=${F77-"f77"} 66585592a31fSmrg compiler=$CC 66595592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 66605592a31fSmrg _LT_CC_BASENAME([$compiler]) 66615592a31fSmrg GCC=$G77 66625592a31fSmrg if test -n "$compiler"; then 66635592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 66645592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 666550f2e948Smrg 66665592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 66675592a31fSmrg test "$can_build_shared" = "no" && enable_shared=no 666850f2e948Smrg 66695592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 66705592a31fSmrg # are all built from PIC. 66715592a31fSmrg case $host_os in 66725592a31fSmrg aix3*) 66735592a31fSmrg test "$enable_shared" = yes && enable_static=no 66745592a31fSmrg if test -n "$RANLIB"; then 66755592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 66765592a31fSmrg postinstall_cmds='$RANLIB $lib' 66775592a31fSmrg fi 66785592a31fSmrg ;; 66795592a31fSmrg aix[[4-9]]*) 66805592a31fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 66815592a31fSmrg test "$enable_shared" = yes && enable_static=no 66825592a31fSmrg fi 66835592a31fSmrg ;; 66845592a31fSmrg esac 66855592a31fSmrg AC_MSG_RESULT([$enable_shared]) 66865592a31fSmrg 66875592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 66885592a31fSmrg # Make sure either enable_shared or enable_static is yes. 66895592a31fSmrg test "$enable_shared" = yes || enable_static=yes 66905592a31fSmrg AC_MSG_RESULT([$enable_static]) 66915592a31fSmrg 66925592a31fSmrg _LT_TAGVAR(GCC, $1)="$G77" 66935592a31fSmrg _LT_TAGVAR(LD, $1)="$LD" 66945592a31fSmrg 66955592a31fSmrg ## CAVEAT EMPTOR: 66965592a31fSmrg ## There is no encapsulation within the following macros, do not change 66975592a31fSmrg ## the running order or otherwise move them around unless you know exactly 66985592a31fSmrg ## what you are doing... 66995592a31fSmrg _LT_COMPILER_PIC($1) 67005592a31fSmrg _LT_COMPILER_C_O($1) 67015592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 67025592a31fSmrg _LT_LINKER_SHLIBS($1) 67035592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 67045592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 67055592a31fSmrg 67065592a31fSmrg _LT_CONFIG($1) 67075592a31fSmrg fi # test -n "$compiler" 67085592a31fSmrg 67095592a31fSmrg GCC=$lt_save_GCC 67105592a31fSmrg CC="$lt_save_CC" 67115592a31fSmrgfi # test "$_lt_disable_F77" != yes 671250f2e948Smrg 67135592a31fSmrgAC_LANG_POP 67145592a31fSmrg])# _LT_LANG_F77_CONFIG 671550f2e948Smrg 671650f2e948Smrg 67175592a31fSmrg# _LT_PROG_FC 67185592a31fSmrg# ----------- 67195592a31fSmrg# Since AC_PROG_FC is broken, in that it returns the empty string 67205592a31fSmrg# if there is no fortran compiler, we have our own version here. 67215592a31fSmrgm4_defun([_LT_PROG_FC], 67225592a31fSmrg[ 67235592a31fSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 67245592a31fSmrgAC_PROG_FC 67255592a31fSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 67265592a31fSmrg _lt_disable_FC=yes 67275592a31fSmrgfi 67285592a31fSmrgpopdef([AC_MSG_ERROR]) 67295592a31fSmrg])# _LT_PROG_FC 673050f2e948Smrg 67315592a31fSmrgdnl aclocal-1.4 backwards compatibility: 67325592a31fSmrgdnl AC_DEFUN([_LT_PROG_FC], []) 673350f2e948Smrg 673450f2e948Smrg 67355592a31fSmrg# _LT_LANG_FC_CONFIG([TAG]) 67365592a31fSmrg# ------------------------- 67375592a31fSmrg# Ensure that the configuration variables for a Fortran compiler are 67385592a31fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 67395592a31fSmrg# to write the compiler configuration to `libtool'. 67405592a31fSmrgm4_defun([_LT_LANG_FC_CONFIG], 67415592a31fSmrg[AC_REQUIRE([_LT_PROG_FC])dnl 67425592a31fSmrgAC_LANG_PUSH(Fortran) 67435592a31fSmrg 67445592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 67455592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 67465592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 67475592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 67485592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 67495592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 67505592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 67515592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 67525592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 67535592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 67545592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 67555592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 67565592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 67575592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 67585592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 67595592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 67605592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 67615592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 67625592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 67635592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 67645592a31fSmrg 67655592a31fSmrg# Source file extension for fc test sources. 67665592a31fSmrgac_ext=${ac_fc_srcext-f} 67675592a31fSmrg 67685592a31fSmrg# Object file extension for compiled fc test sources. 67695592a31fSmrgobjext=o 67705592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 67715592a31fSmrg 67725592a31fSmrg# No sense in running all these tests if we already determined that 67735592a31fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 67745592a31fSmrg# are currently assumed to apply to all compilers on this platform, 67755592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 67765592a31fSmrgif test "$_lt_disable_FC" != yes; then 67775592a31fSmrg # Code to be used in simple compile tests 67785592a31fSmrg lt_simple_compile_test_code="\ 67795592a31fSmrg subroutine t 67805592a31fSmrg return 67815592a31fSmrg end 67825592a31fSmrg" 678350f2e948Smrg 67845592a31fSmrg # Code to be used in simple link tests 67855592a31fSmrg lt_simple_link_test_code="\ 67865592a31fSmrg program t 67875592a31fSmrg end 67885592a31fSmrg" 678950f2e948Smrg 67905592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 67915592a31fSmrg _LT_TAG_COMPILER 679250f2e948Smrg 67935592a31fSmrg # save warnings/boilerplate of simple test code 67945592a31fSmrg _LT_COMPILER_BOILERPLATE 67955592a31fSmrg _LT_LINKER_BOILERPLATE 679650f2e948Smrg 67975592a31fSmrg # Allow CC to be a program name with arguments. 67985592a31fSmrg lt_save_CC="$CC" 67995592a31fSmrg lt_save_GCC=$GCC 68005592a31fSmrg CC=${FC-"f95"} 68015592a31fSmrg compiler=$CC 68025592a31fSmrg GCC=$ac_cv_fc_compiler_gnu 68035592a31fSmrg 68045592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 68055592a31fSmrg _LT_CC_BASENAME([$compiler]) 680650f2e948Smrg 68075592a31fSmrg if test -n "$compiler"; then 68085592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 68095592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 68105592a31fSmrg 68115592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 68125592a31fSmrg test "$can_build_shared" = "no" && enable_shared=no 68135592a31fSmrg 68145592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 68155592a31fSmrg # are all built from PIC. 68163a925b30Smrg case $host_os in 68175592a31fSmrg aix3*) 68185592a31fSmrg test "$enable_shared" = yes && enable_static=no 68195592a31fSmrg if test -n "$RANLIB"; then 68205592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 68215592a31fSmrg postinstall_cmds='$RANLIB $lib' 68225592a31fSmrg fi 68235592a31fSmrg ;; 68243a925b30Smrg aix[[4-9]]*) 68255592a31fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 68265592a31fSmrg test "$enable_shared" = yes && enable_static=no 68273a925b30Smrg fi 68285592a31fSmrg ;; 68293a925b30Smrg esac 68305592a31fSmrg AC_MSG_RESULT([$enable_shared]) 68315592a31fSmrg 68325592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 68335592a31fSmrg # Make sure either enable_shared or enable_static is yes. 68345592a31fSmrg test "$enable_shared" = yes || enable_static=yes 68355592a31fSmrg AC_MSG_RESULT([$enable_static]) 68365592a31fSmrg 68375592a31fSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 68385592a31fSmrg _LT_TAGVAR(LD, $1)="$LD" 68395592a31fSmrg 68405592a31fSmrg ## CAVEAT EMPTOR: 68415592a31fSmrg ## There is no encapsulation within the following macros, do not change 68425592a31fSmrg ## the running order or otherwise move them around unless you know exactly 68435592a31fSmrg ## what you are doing... 68445592a31fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 68455592a31fSmrg _LT_COMPILER_PIC($1) 68465592a31fSmrg _LT_COMPILER_C_O($1) 68475592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 68485592a31fSmrg _LT_LINKER_SHLIBS($1) 68495592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 68505592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 68515592a31fSmrg 68525592a31fSmrg _LT_CONFIG($1) 68535592a31fSmrg fi # test -n "$compiler" 68545592a31fSmrg 68555592a31fSmrg GCC=$lt_save_GCC 68565592a31fSmrg CC="$lt_save_CC" 68575592a31fSmrgfi # test "$_lt_disable_FC" != yes 685850f2e948Smrg 68595592a31fSmrgAC_LANG_POP 68605592a31fSmrg])# _LT_LANG_FC_CONFIG 686150f2e948Smrg 686250f2e948Smrg 68635592a31fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 68645592a31fSmrg# -------------------------- 68655592a31fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 68665592a31fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 68675592a31fSmrg# to write the compiler configuration to `libtool'. 68685592a31fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 68695592a31fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 68705592a31fSmrgAC_LANG_SAVE 687150f2e948Smrg 68725592a31fSmrg# Source file extension for Java test sources. 68735592a31fSmrgac_ext=java 687450f2e948Smrg 68755592a31fSmrg# Object file extension for compiled Java test sources. 68765592a31fSmrgobjext=o 68775592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 687850f2e948Smrg 68795592a31fSmrg# Code to be used in simple compile tests 68805592a31fSmrglt_simple_compile_test_code="class foo {}" 688150f2e948Smrg 68825592a31fSmrg# Code to be used in simple link tests 68835592a31fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 688450f2e948Smrg 68855592a31fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 68865592a31fSmrg_LT_TAG_COMPILER 688745bc899bSmrg 68885592a31fSmrg# save warnings/boilerplate of simple test code 68895592a31fSmrg_LT_COMPILER_BOILERPLATE 68905592a31fSmrg_LT_LINKER_BOILERPLATE 689145bc899bSmrg 68925592a31fSmrg# Allow CC to be a program name with arguments. 68935592a31fSmrglt_save_CC="$CC" 68945592a31fSmrglt_save_GCC=$GCC 68955592a31fSmrgGCC=yes 68965592a31fSmrgCC=${GCJ-"gcj"} 68975592a31fSmrgcompiler=$CC 68985592a31fSmrg_LT_TAGVAR(compiler, $1)=$CC 68995592a31fSmrg_LT_TAGVAR(LD, $1)="$LD" 69005592a31fSmrg_LT_CC_BASENAME([$compiler]) 69015592a31fSmrg 69025592a31fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 69035592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 69045592a31fSmrg 69055592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 69065592a31fSmrg 69075592a31fSmrgif test -n "$compiler"; then 69085592a31fSmrg _LT_COMPILER_NO_RTTI($1) 69095592a31fSmrg _LT_COMPILER_PIC($1) 69105592a31fSmrg _LT_COMPILER_C_O($1) 69115592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 69125592a31fSmrg _LT_LINKER_SHLIBS($1) 69135592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 69145592a31fSmrg 69155592a31fSmrg _LT_CONFIG($1) 69165592a31fSmrgfi 69175592a31fSmrg 69185592a31fSmrgAC_LANG_RESTORE 69195592a31fSmrg 69205592a31fSmrgGCC=$lt_save_GCC 69215592a31fSmrgCC="$lt_save_CC" 69225592a31fSmrg])# _LT_LANG_GCJ_CONFIG 69235592a31fSmrg 69245592a31fSmrg 69255592a31fSmrg# _LT_LANG_RC_CONFIG([TAG]) 69265592a31fSmrg# ------------------------- 69275592a31fSmrg# Ensure that the configuration variables for the Windows resource compiler 69285592a31fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 69295592a31fSmrg# to write the compiler configuration to `libtool'. 69305592a31fSmrgm4_defun([_LT_LANG_RC_CONFIG], 69315592a31fSmrg[AC_REQUIRE([LT_PROG_RC])dnl 69325592a31fSmrgAC_LANG_SAVE 69335592a31fSmrg 69345592a31fSmrg# Source file extension for RC test sources. 69355592a31fSmrgac_ext=rc 69365592a31fSmrg 69375592a31fSmrg# Object file extension for compiled RC test sources. 69385592a31fSmrgobjext=o 69395592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 69405592a31fSmrg 69415592a31fSmrg# Code to be used in simple compile tests 69425592a31fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 69435592a31fSmrg 69445592a31fSmrg# Code to be used in simple link tests 69455592a31fSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 69465592a31fSmrg 69475592a31fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 69485592a31fSmrg_LT_TAG_COMPILER 69495592a31fSmrg 69505592a31fSmrg# save warnings/boilerplate of simple test code 69515592a31fSmrg_LT_COMPILER_BOILERPLATE 69525592a31fSmrg_LT_LINKER_BOILERPLATE 695345bc899bSmrg 69545592a31fSmrg# Allow CC to be a program name with arguments. 69555592a31fSmrglt_save_CC="$CC" 69565592a31fSmrglt_save_GCC=$GCC 69575592a31fSmrgGCC= 69585592a31fSmrgCC=${RC-"windres"} 69595592a31fSmrgcompiler=$CC 69605592a31fSmrg_LT_TAGVAR(compiler, $1)=$CC 69615592a31fSmrg_LT_CC_BASENAME([$compiler]) 69625592a31fSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 696345bc899bSmrg 69645592a31fSmrgif test -n "$compiler"; then 69655592a31fSmrg : 69665592a31fSmrg _LT_CONFIG($1) 69675592a31fSmrgfi 696845bc899bSmrg 69695592a31fSmrgGCC=$lt_save_GCC 69705592a31fSmrgAC_LANG_RESTORE 69715592a31fSmrgCC="$lt_save_CC" 69725592a31fSmrg])# _LT_LANG_RC_CONFIG 697345bc899bSmrg 697445bc899bSmrg 69755592a31fSmrg# LT_PROG_GCJ 69765592a31fSmrg# ----------- 69775592a31fSmrgAC_DEFUN([LT_PROG_GCJ], 69785592a31fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 69795592a31fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 69805592a31fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 69815592a31fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 69825592a31fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 69835592a31fSmrg]) 698445bc899bSmrg 69855592a31fSmrg# Old name: 69865592a31fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 69875592a31fSmrgdnl aclocal-1.4 backwards compatibility: 69885592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 698945bc899bSmrg 699045bc899bSmrg 69915592a31fSmrg# LT_PROG_RC 69925592a31fSmrg# ---------- 69935592a31fSmrgAC_DEFUN([LT_PROG_RC], 69945592a31fSmrg[AC_CHECK_TOOL(RC, windres,) 69955592a31fSmrg]) 69961ac89addSmrg 69975592a31fSmrg# Old name: 69985592a31fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 69995592a31fSmrgdnl aclocal-1.4 backwards compatibility: 70005592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 70011ac89addSmrg 70021ac89addSmrg 70035592a31fSmrg# _LT_DECL_EGREP 70045592a31fSmrg# -------------- 70055592a31fSmrg# If we don't have a new enough Autoconf to choose the best grep 70065592a31fSmrg# available, choose the one first in the user's PATH. 70075592a31fSmrgm4_defun([_LT_DECL_EGREP], 70085592a31fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 70095592a31fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 70105592a31fSmrgtest -z "$GREP" && GREP=grep 70115592a31fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 70125592a31fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 70135592a31fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 70145592a31fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 70155592a31fSmrgAC_SUBST([GREP]) 70165592a31fSmrg]) 7017226fade8Smrg 701850f2e948Smrg 70195592a31fSmrg# _LT_DECL_OBJDUMP 70205592a31fSmrg# -------------- 70215592a31fSmrg# If we don't have a new enough Autoconf to choose the best objdump 70225592a31fSmrg# available, choose the one first in the user's PATH. 70235592a31fSmrgm4_defun([_LT_DECL_OBJDUMP], 70245592a31fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 70255592a31fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 70265592a31fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 70275592a31fSmrgAC_SUBST([OBJDUMP]) 70285592a31fSmrg]) 702950f2e948Smrg 703050f2e948Smrg 70315592a31fSmrg# _LT_DECL_SED 70325592a31fSmrg# ------------ 70335592a31fSmrg# Check for a fully-functional sed program, that truncates 70345592a31fSmrg# as few characters as possible. Prefer GNU sed if found. 70355592a31fSmrgm4_defun([_LT_DECL_SED], 70365592a31fSmrg[AC_PROG_SED 70375592a31fSmrgtest -z "$SED" && SED=sed 70385592a31fSmrgXsed="$SED -e 1s/^X//" 70395592a31fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 70405592a31fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 70415592a31fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 70425592a31fSmrg])# _LT_DECL_SED 70435592a31fSmrg 70445592a31fSmrgm4_ifndef([AC_PROG_SED], [ 70455592a31fSmrg# NOTE: This macro has been submitted for inclusion into # 70465592a31fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 70475592a31fSmrg# a released version of Autoconf we should remove this # 70485592a31fSmrg# macro and use it instead. # 70495592a31fSmrg 70505592a31fSmrgm4_defun([AC_PROG_SED], 70515592a31fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 70525592a31fSmrgAC_CACHE_VAL(lt_cv_path_SED, 70535592a31fSmrg[# Loop through the user's path and test for sed and gsed. 70545592a31fSmrg# Then use that list of sed's as ones to test for truncation. 70555592a31fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 70565592a31fSmrgfor as_dir in $PATH 70575592a31fSmrgdo 70585592a31fSmrg IFS=$as_save_IFS 70595592a31fSmrg test -z "$as_dir" && as_dir=. 70605592a31fSmrg for lt_ac_prog in sed gsed; do 70615592a31fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 70625592a31fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 70635592a31fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 70645592a31fSmrg fi 70655592a31fSmrg done 70665592a31fSmrg done 70675592a31fSmrgdone 70685592a31fSmrgIFS=$as_save_IFS 70695592a31fSmrglt_ac_max=0 70705592a31fSmrglt_ac_count=0 70715592a31fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 70725592a31fSmrg# along with /bin/sed that truncates output. 70735592a31fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 70745592a31fSmrg test ! -f $lt_ac_sed && continue 70755592a31fSmrg cat /dev/null > conftest.in 70765592a31fSmrg lt_ac_count=0 70775592a31fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 70785592a31fSmrg # Check for GNU sed and select it if it is found. 70795592a31fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 70805592a31fSmrg lt_cv_path_SED=$lt_ac_sed 70815592a31fSmrg break 708245bc899bSmrg fi 70835592a31fSmrg while true; do 70845592a31fSmrg cat conftest.in conftest.in >conftest.tmp 70855592a31fSmrg mv conftest.tmp conftest.in 70865592a31fSmrg cp conftest.in conftest.nl 70875592a31fSmrg echo >>conftest.nl 70885592a31fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 70895592a31fSmrg cmp -s conftest.out conftest.nl || break 70905592a31fSmrg # 10000 chars as input seems more than enough 70915592a31fSmrg test $lt_ac_count -gt 10 && break 70925592a31fSmrg lt_ac_count=`expr $lt_ac_count + 1` 70935592a31fSmrg if test $lt_ac_count -gt $lt_ac_max; then 70945592a31fSmrg lt_ac_max=$lt_ac_count 70955592a31fSmrg lt_cv_path_SED=$lt_ac_sed 70965592a31fSmrg fi 70975592a31fSmrg done 70985592a31fSmrgdone 709945bc899bSmrg]) 71005592a31fSmrgSED=$lt_cv_path_SED 71015592a31fSmrgAC_SUBST([SED]) 71025592a31fSmrgAC_MSG_RESULT([$SED]) 71035592a31fSmrg])#AC_PROG_SED 71045592a31fSmrg])#m4_ifndef 71051ac89addSmrg 71065592a31fSmrg# Old name: 71075592a31fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 71085592a31fSmrgdnl aclocal-1.4 backwards compatibility: 71095592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 71105592a31fSmrg 71115592a31fSmrg 71125592a31fSmrg# _LT_CHECK_SHELL_FEATURES 71135592a31fSmrg# ------------------------ 71145592a31fSmrg# Find out whether the shell is Bourne or XSI compatible, 71155592a31fSmrg# or has some other useful features. 71165592a31fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 71175592a31fSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 71185592a31fSmrg# Try some XSI features 71195592a31fSmrgxsi_shell=no 71205592a31fSmrg( _lt_dummy="a/b/c" 71215592a31fSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 71225592a31fSmrg = c,a/b,, \ 71235592a31fSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 71245592a31fSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 71255592a31fSmrg && xsi_shell=yes 71265592a31fSmrgAC_MSG_RESULT([$xsi_shell]) 71275592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 71285592a31fSmrg 71295592a31fSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 71305592a31fSmrglt_shell_append=no 71315592a31fSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 71325592a31fSmrg >/dev/null 2>&1 \ 71335592a31fSmrg && lt_shell_append=yes 71345592a31fSmrgAC_MSG_RESULT([$lt_shell_append]) 71355592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 71365592a31fSmrg 71375592a31fSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 71385592a31fSmrg lt_unset=unset 71395592a31fSmrgelse 71405592a31fSmrg lt_unset=false 714145bc899bSmrgfi 71425592a31fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 71435592a31fSmrg 71445592a31fSmrg# test EBCDIC or ASCII 71455592a31fSmrgcase `echo X|tr X '\101'` in 71465592a31fSmrg A) # ASCII based system 71475592a31fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 71485592a31fSmrg lt_SP2NL='tr \040 \012' 71495592a31fSmrg lt_NL2SP='tr \015\012 \040\040' 71505592a31fSmrg ;; 71515592a31fSmrg *) # EBCDIC based system 71525592a31fSmrg lt_SP2NL='tr \100 \n' 71535592a31fSmrg lt_NL2SP='tr \r\n \100\100' 71545592a31fSmrg ;; 715545bc899bSmrgesac 71565592a31fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 71575592a31fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 71585592a31fSmrg])# _LT_CHECK_SHELL_FEATURES 715950f2e948Smrg 716050f2e948Smrg 71615592a31fSmrg# _LT_PROG_XSI_SHELLFNS 71625592a31fSmrg# --------------------- 71635592a31fSmrg# Bourne and XSI compatible variants of some useful shell functions. 71645592a31fSmrgm4_defun([_LT_PROG_XSI_SHELLFNS], 71655592a31fSmrg[case $xsi_shell in 71665592a31fSmrg yes) 71675592a31fSmrg cat << \_LT_EOF >> "$cfgfile" 71685592a31fSmrg 71695592a31fSmrg# func_dirname file append nondir_replacement 71705592a31fSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 71715592a31fSmrg# otherwise set result to NONDIR_REPLACEMENT. 71725592a31fSmrgfunc_dirname () 71735592a31fSmrg{ 71745592a31fSmrg case ${1} in 71755592a31fSmrg */*) func_dirname_result="${1%/*}${2}" ;; 71765592a31fSmrg * ) func_dirname_result="${3}" ;; 71775592a31fSmrg esac 71785592a31fSmrg} 717950f2e948Smrg 71805592a31fSmrg# func_basename file 71815592a31fSmrgfunc_basename () 71825592a31fSmrg{ 71835592a31fSmrg func_basename_result="${1##*/}" 71845592a31fSmrg} 71855592a31fSmrg 71865592a31fSmrg# func_dirname_and_basename file append nondir_replacement 71875592a31fSmrg# perform func_basename and func_dirname in a single function 71885592a31fSmrg# call: 71895592a31fSmrg# dirname: Compute the dirname of FILE. If nonempty, 71905592a31fSmrg# add APPEND to the result, otherwise set result 71915592a31fSmrg# to NONDIR_REPLACEMENT. 71925592a31fSmrg# value returned in "$func_dirname_result" 71935592a31fSmrg# basename: Compute filename of FILE. 71945592a31fSmrg# value retuned in "$func_basename_result" 71955592a31fSmrg# Implementation must be kept synchronized with func_dirname 71965592a31fSmrg# and func_basename. For efficiency, we do not delegate to 71975592a31fSmrg# those functions but instead duplicate the functionality here. 71985592a31fSmrgfunc_dirname_and_basename () 71995592a31fSmrg{ 72005592a31fSmrg case ${1} in 72015592a31fSmrg */*) func_dirname_result="${1%/*}${2}" ;; 72025592a31fSmrg * ) func_dirname_result="${3}" ;; 72031ac89addSmrg esac 72045592a31fSmrg func_basename_result="${1##*/}" 72055592a31fSmrg} 72065592a31fSmrg 72075592a31fSmrg# func_stripname prefix suffix name 72085592a31fSmrg# strip PREFIX and SUFFIX off of NAME. 72095592a31fSmrg# PREFIX and SUFFIX must not contain globbing or regex special 72105592a31fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 72115592a31fSmrg# dot (in which case that matches only a dot). 72125592a31fSmrgfunc_stripname () 72135592a31fSmrg{ 72145592a31fSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 72155592a31fSmrg # positional parameters, so assign one to ordinary parameter first. 72165592a31fSmrg func_stripname_result=${3} 72175592a31fSmrg func_stripname_result=${func_stripname_result#"${1}"} 72185592a31fSmrg func_stripname_result=${func_stripname_result%"${2}"} 72195592a31fSmrg} 72205592a31fSmrg 72215592a31fSmrg# func_opt_split 72225592a31fSmrgfunc_opt_split () 72235592a31fSmrg{ 72245592a31fSmrg func_opt_split_opt=${1%%=*} 72255592a31fSmrg func_opt_split_arg=${1#*=} 72265592a31fSmrg} 72275592a31fSmrg 72285592a31fSmrg# func_lo2o object 72295592a31fSmrgfunc_lo2o () 72305592a31fSmrg{ 72315592a31fSmrg case ${1} in 72325592a31fSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 72335592a31fSmrg *) func_lo2o_result=${1} ;; 72345592a31fSmrg esac 72355592a31fSmrg} 72365592a31fSmrg 72375592a31fSmrg# func_xform libobj-or-source 72385592a31fSmrgfunc_xform () 72395592a31fSmrg{ 72405592a31fSmrg func_xform_result=${1%.*}.lo 72415592a31fSmrg} 72425592a31fSmrg 72435592a31fSmrg# func_arith arithmetic-term... 72445592a31fSmrgfunc_arith () 72455592a31fSmrg{ 72465592a31fSmrg func_arith_result=$(( $[*] )) 72475592a31fSmrg} 72485592a31fSmrg 72495592a31fSmrg# func_len string 72505592a31fSmrg# STRING may not start with a hyphen. 72515592a31fSmrgfunc_len () 72525592a31fSmrg{ 72535592a31fSmrg func_len_result=${#1} 72545592a31fSmrg} 72555592a31fSmrg 72565592a31fSmrg_LT_EOF 725750f2e948Smrg ;; 72585592a31fSmrg *) # Bourne compatible functions. 72595592a31fSmrg cat << \_LT_EOF >> "$cfgfile" 72605592a31fSmrg 72615592a31fSmrg# func_dirname file append nondir_replacement 72625592a31fSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 72635592a31fSmrg# otherwise set result to NONDIR_REPLACEMENT. 72645592a31fSmrgfunc_dirname () 72655592a31fSmrg{ 72665592a31fSmrg # Extract subdirectory from the argument. 72675592a31fSmrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 72685592a31fSmrg if test "X$func_dirname_result" = "X${1}"; then 72695592a31fSmrg func_dirname_result="${3}" 72705592a31fSmrg else 72715592a31fSmrg func_dirname_result="$func_dirname_result${2}" 72725592a31fSmrg fi 72735592a31fSmrg} 72745592a31fSmrg 72755592a31fSmrg# func_basename file 72765592a31fSmrgfunc_basename () 72775592a31fSmrg{ 72785592a31fSmrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 72795592a31fSmrg} 72805592a31fSmrg 72815592a31fSmrgdnl func_dirname_and_basename 72825592a31fSmrgdnl A portable version of this function is already defined in general.m4sh 72835592a31fSmrgdnl so there is no need for it here. 72845592a31fSmrg 72855592a31fSmrg# func_stripname prefix suffix name 72865592a31fSmrg# strip PREFIX and SUFFIX off of NAME. 72875592a31fSmrg# PREFIX and SUFFIX must not contain globbing or regex special 72885592a31fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 72895592a31fSmrg# dot (in which case that matches only a dot). 72905592a31fSmrg# func_strip_suffix prefix name 72915592a31fSmrgfunc_stripname () 72925592a31fSmrg{ 72935592a31fSmrg case ${2} in 72945592a31fSmrg .*) func_stripname_result=`$ECHO "X${3}" \ 72955592a31fSmrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 72965592a31fSmrg *) func_stripname_result=`$ECHO "X${3}" \ 72975592a31fSmrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 729850f2e948Smrg esac 72995592a31fSmrg} 730045bc899bSmrg 73015592a31fSmrg# sed scripts: 73025592a31fSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 73035592a31fSmrgmy_sed_long_arg='1s/^-[[^=]]*=//' 730445bc899bSmrg 73055592a31fSmrg# func_opt_split 73065592a31fSmrgfunc_opt_split () 73075592a31fSmrg{ 73085592a31fSmrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 73095592a31fSmrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 73105592a31fSmrg} 731145bc899bSmrg 73125592a31fSmrg# func_lo2o object 73135592a31fSmrgfunc_lo2o () 73145592a31fSmrg{ 73155592a31fSmrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 73165592a31fSmrg} 731745bc899bSmrg 73185592a31fSmrg# func_xform libobj-or-source 73195592a31fSmrgfunc_xform () 73205592a31fSmrg{ 73215592a31fSmrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 73225592a31fSmrg} 732345bc899bSmrg 73245592a31fSmrg# func_arith arithmetic-term... 73255592a31fSmrgfunc_arith () 73265592a31fSmrg{ 73275592a31fSmrg func_arith_result=`expr "$[@]"` 73285592a31fSmrg} 732945bc899bSmrg 73305592a31fSmrg# func_len string 73315592a31fSmrg# STRING may not start with a hyphen. 73325592a31fSmrgfunc_len () 73335592a31fSmrg{ 73345592a31fSmrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 73355592a31fSmrg} 733645bc899bSmrg 73375592a31fSmrg_LT_EOF 73385592a31fSmrgesac 733945bc899bSmrg 73405592a31fSmrgcase $lt_shell_append in 73415592a31fSmrg yes) 73425592a31fSmrg cat << \_LT_EOF >> "$cfgfile" 734345bc899bSmrg 73445592a31fSmrg# func_append var value 73455592a31fSmrg# Append VALUE to the end of shell variable VAR. 73465592a31fSmrgfunc_append () 73475592a31fSmrg{ 73485592a31fSmrg eval "$[1]+=\$[2]" 73495592a31fSmrg} 73505592a31fSmrg_LT_EOF 73515592a31fSmrg ;; 73525592a31fSmrg *) 73535592a31fSmrg cat << \_LT_EOF >> "$cfgfile" 735445bc899bSmrg 73555592a31fSmrg# func_append var value 73565592a31fSmrg# Append VALUE to the end of shell variable VAR. 73575592a31fSmrgfunc_append () 73585592a31fSmrg{ 73595592a31fSmrg eval "$[1]=\$$[1]\$[2]" 73605592a31fSmrg} 736145bc899bSmrg 73625592a31fSmrg_LT_EOF 73635592a31fSmrg ;; 73645592a31fSmrg esac 73655592a31fSmrg]) 736645bc899bSmrg 73675592a31fSmrg# Helper functions for option handling. -*- Autoconf -*- 73685592a31fSmrg# 73695592a31fSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 73705592a31fSmrg# Written by Gary V. Vaughan, 2004 73715592a31fSmrg# 73725592a31fSmrg# This file is free software; the Free Software Foundation gives 73735592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 73745592a31fSmrg# modifications, as long as this notice is preserved. 737545bc899bSmrg 73765592a31fSmrg# serial 6 ltoptions.m4 737745bc899bSmrg 73785592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 73795592a31fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 738045bc899bSmrg 738145bc899bSmrg 73825592a31fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 73835592a31fSmrg# ------------------------------------------ 73845592a31fSmrgm4_define([_LT_MANGLE_OPTION], 73855592a31fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 738645bc899bSmrg 73871ac89addSmrg 73885592a31fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 73895592a31fSmrg# --------------------------------------- 73905592a31fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 73915592a31fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 73925592a31fSmrg# saved as a flag. 73935592a31fSmrgm4_define([_LT_SET_OPTION], 73945592a31fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 73955592a31fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 73965592a31fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 73975592a31fSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 73985592a31fSmrg]) 73991ac89addSmrg 74001ac89addSmrg 74015592a31fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 74025592a31fSmrg# ------------------------------------------------------------ 74035592a31fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 74045592a31fSmrgm4_define([_LT_IF_OPTION], 74055592a31fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 74065592a31fSmrg 74075592a31fSmrg 74085592a31fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 74095592a31fSmrg# ------------------------------------------------------- 74105592a31fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 74115592a31fSmrg# are set. 74125592a31fSmrgm4_define([_LT_UNLESS_OPTIONS], 74135592a31fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 74145592a31fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 74155592a31fSmrg [m4_define([$0_found])])])[]dnl 74165592a31fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 74175592a31fSmrg])[]dnl 74185592a31fSmrg]) 741945bc899bSmrg 742045bc899bSmrg 74215592a31fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 74225592a31fSmrg# ---------------------------------------- 74235592a31fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 74245592a31fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 74255592a31fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 74265592a31fSmrg# the unknown option and exit. 74275592a31fSmrgm4_defun([_LT_SET_OPTIONS], 74285592a31fSmrg[# Set options 74295592a31fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 74305592a31fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 74315592a31fSmrg 74325592a31fSmrgm4_if([$1],[LT_INIT],[ 74335592a31fSmrg dnl 74345592a31fSmrg dnl Simply set some default values (i.e off) if boolean options were not 74355592a31fSmrg dnl specified: 74365592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 74375592a31fSmrg ]) 74385592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 74395592a31fSmrg ]) 74405592a31fSmrg dnl 74415592a31fSmrg dnl If no reference was made to various pairs of opposing options, then 74425592a31fSmrg dnl we run the default mode handler for the pair. For example, if neither 74435592a31fSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 74445592a31fSmrg dnl archives by default: 74455592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 74465592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 74475592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 74485592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 74495592a31fSmrg [_LT_ENABLE_FAST_INSTALL]) 74505592a31fSmrg ]) 74515592a31fSmrg])# _LT_SET_OPTIONS 745245bc899bSmrg 745345bc899bSmrg 745445bc899bSmrg 74555592a31fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 74565592a31fSmrg# ----------------------------------------- 74575592a31fSmrgm4_define([_LT_MANGLE_DEFUN], 74585592a31fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 745945bc899bSmrg 746050f2e948Smrg 74615592a31fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 74625592a31fSmrg# ----------------------------------------------- 74635592a31fSmrgm4_define([LT_OPTION_DEFINE], 74645592a31fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 74655592a31fSmrg])# LT_OPTION_DEFINE 746650f2e948Smrg 746750f2e948Smrg 74685592a31fSmrg# dlopen 74695592a31fSmrg# ------ 74705592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 74715592a31fSmrg]) 74725592a31fSmrg 74735592a31fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 74745592a31fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 74755592a31fSmrgAC_DIAGNOSE([obsolete], 74765592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 74775592a31fSmrgput the `dlopen' option into LT_INIT's first parameter.]) 74785592a31fSmrg]) 74795592a31fSmrg 74805592a31fSmrgdnl aclocal-1.4 backwards compatibility: 74815592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 74825592a31fSmrg 74835592a31fSmrg 74845592a31fSmrg# win32-dll 74855592a31fSmrg# --------- 74865592a31fSmrg# Declare package support for building win32 dll's. 74875592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 74885592a31fSmrg[enable_win32_dll=yes 74895592a31fSmrg 74905592a31fSmrgcase $host in 74915592a31fSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 74925592a31fSmrg AC_CHECK_TOOL(AS, as, false) 74935592a31fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 74945592a31fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 74955592a31fSmrg ;; 74965592a31fSmrgesac 749745bc899bSmrg 74985592a31fSmrgtest -z "$AS" && AS=as 74995592a31fSmrg_LT_DECL([], [AS], [0], [Assembler program])dnl 750045bc899bSmrg 75015592a31fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 75025592a31fSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 750345bc899bSmrg 75045592a31fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 75055592a31fSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 75065592a31fSmrg])# win32-dll 750745bc899bSmrg 75085592a31fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 75095592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 75105592a31fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 75115592a31fSmrgAC_DIAGNOSE([obsolete], 75125592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 75135592a31fSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 75145592a31fSmrg]) 751545bc899bSmrg 75165592a31fSmrgdnl aclocal-1.4 backwards compatibility: 75175592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 751845bc899bSmrg 751945bc899bSmrg 75205592a31fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 75215592a31fSmrg# ---------------------------- 75225592a31fSmrg# implement the --enable-shared flag, and supports the `shared' and 75235592a31fSmrg# `disable-shared' LT_INIT options. 75245592a31fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 75255592a31fSmrgm4_define([_LT_ENABLE_SHARED], 75265592a31fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 75275592a31fSmrgAC_ARG_ENABLE([shared], 75285592a31fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 75295592a31fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 75305592a31fSmrg [p=${PACKAGE-default} 75315592a31fSmrg case $enableval in 75325592a31fSmrg yes) enable_shared=yes ;; 75335592a31fSmrg no) enable_shared=no ;; 75345592a31fSmrg *) 75355592a31fSmrg enable_shared=no 75365592a31fSmrg # Look at the argument we got. We use all the common list separators. 75375592a31fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 75385592a31fSmrg for pkg in $enableval; do 75395592a31fSmrg IFS="$lt_save_ifs" 75405592a31fSmrg if test "X$pkg" = "X$p"; then 75415592a31fSmrg enable_shared=yes 75425592a31fSmrg fi 75435592a31fSmrg done 75445592a31fSmrg IFS="$lt_save_ifs" 7545226fade8Smrg ;; 75465592a31fSmrg esac], 75475592a31fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 754845bc899bSmrg 75495592a31fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 75505592a31fSmrg [Whether or not to build shared libraries]) 75515592a31fSmrg])# _LT_ENABLE_SHARED 755245bc899bSmrg 75535592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 75545592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 755545bc899bSmrg 75565592a31fSmrg# Old names: 75575592a31fSmrgAC_DEFUN([AC_ENABLE_SHARED], 75585592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 75595592a31fSmrg]) 756045bc899bSmrg 75615592a31fSmrgAC_DEFUN([AC_DISABLE_SHARED], 75625592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 75635592a31fSmrg]) 756445bc899bSmrg 75655592a31fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 75665592a31fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 756745bc899bSmrg 75685592a31fSmrgdnl aclocal-1.4 backwards compatibility: 75695592a31fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 75705592a31fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 757145bc899bSmrg 757245bc899bSmrg 757345bc899bSmrg 75745592a31fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 75755592a31fSmrg# ---------------------------- 75765592a31fSmrg# implement the --enable-static flag, and support the `static' and 75775592a31fSmrg# `disable-static' LT_INIT options. 75785592a31fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 75795592a31fSmrgm4_define([_LT_ENABLE_STATIC], 75805592a31fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 75815592a31fSmrgAC_ARG_ENABLE([static], 75825592a31fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 75835592a31fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 75845592a31fSmrg [p=${PACKAGE-default} 75855592a31fSmrg case $enableval in 75865592a31fSmrg yes) enable_static=yes ;; 75875592a31fSmrg no) enable_static=no ;; 75885592a31fSmrg *) 75895592a31fSmrg enable_static=no 75905592a31fSmrg # Look at the argument we got. We use all the common list separators. 75915592a31fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 75925592a31fSmrg for pkg in $enableval; do 75935592a31fSmrg IFS="$lt_save_ifs" 75945592a31fSmrg if test "X$pkg" = "X$p"; then 75955592a31fSmrg enable_static=yes 75965592a31fSmrg fi 75975592a31fSmrg done 75985592a31fSmrg IFS="$lt_save_ifs" 7599226fade8Smrg ;; 76005592a31fSmrg esac], 76015592a31fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 760245bc899bSmrg 76035592a31fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 76045592a31fSmrg [Whether or not to build static libraries]) 76055592a31fSmrg])# _LT_ENABLE_STATIC 760645bc899bSmrg 76075592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 76085592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 760945bc899bSmrg 76105592a31fSmrg# Old names: 76115592a31fSmrgAC_DEFUN([AC_ENABLE_STATIC], 76125592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 76135592a31fSmrg]) 761445bc899bSmrg 76155592a31fSmrgAC_DEFUN([AC_DISABLE_STATIC], 76165592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 76175592a31fSmrg]) 761845bc899bSmrg 76195592a31fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 76205592a31fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 762145bc899bSmrg 76225592a31fSmrgdnl aclocal-1.4 backwards compatibility: 76235592a31fSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 76245592a31fSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 762545bc899bSmrg 762645bc899bSmrg 762745bc899bSmrg 76285592a31fSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 76295592a31fSmrg# ---------------------------------- 76305592a31fSmrg# implement the --enable-fast-install flag, and support the `fast-install' 76315592a31fSmrg# and `disable-fast-install' LT_INIT options. 76325592a31fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 76335592a31fSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 76345592a31fSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 76355592a31fSmrgAC_ARG_ENABLE([fast-install], 76365592a31fSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 76375592a31fSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 76385592a31fSmrg [p=${PACKAGE-default} 76395592a31fSmrg case $enableval in 76405592a31fSmrg yes) enable_fast_install=yes ;; 76415592a31fSmrg no) enable_fast_install=no ;; 76425592a31fSmrg *) 76435592a31fSmrg enable_fast_install=no 76445592a31fSmrg # Look at the argument we got. We use all the common list separators. 76455592a31fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 76465592a31fSmrg for pkg in $enableval; do 76475592a31fSmrg IFS="$lt_save_ifs" 76485592a31fSmrg if test "X$pkg" = "X$p"; then 76495592a31fSmrg enable_fast_install=yes 765050f2e948Smrg fi 76515592a31fSmrg done 76525592a31fSmrg IFS="$lt_save_ifs" 7653226fade8Smrg ;; 76545592a31fSmrg esac], 76555592a31fSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 765645bc899bSmrg 76575592a31fSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 76585592a31fSmrg [Whether or not to optimize for fast installation])dnl 76595592a31fSmrg])# _LT_ENABLE_FAST_INSTALL 766045bc899bSmrg 76615592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 76625592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 76631ac89addSmrg 76645592a31fSmrg# Old names: 76655592a31fSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 76665592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 76675592a31fSmrgAC_DIAGNOSE([obsolete], 76685592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 76695592a31fSmrgthe `fast-install' option into LT_INIT's first parameter.]) 76705592a31fSmrg]) 76711ac89addSmrg 76725592a31fSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 76735592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 76745592a31fSmrgAC_DIAGNOSE([obsolete], 76755592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 76765592a31fSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 76775592a31fSmrg]) 76781ac89addSmrg 76795592a31fSmrgdnl aclocal-1.4 backwards compatibility: 76805592a31fSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 76815592a31fSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 76821ac89addSmrg 768350f2e948Smrg 76845592a31fSmrg# _LT_WITH_PIC([MODE]) 76855592a31fSmrg# -------------------- 76865592a31fSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 76875592a31fSmrg# LT_INIT options. 76885592a31fSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 76895592a31fSmrgm4_define([_LT_WITH_PIC], 76905592a31fSmrg[AC_ARG_WITH([pic], 76915592a31fSmrg [AS_HELP_STRING([--with-pic], 76925592a31fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 76935592a31fSmrg [pic_mode="$withval"], 76945592a31fSmrg [pic_mode=default]) 76955592a31fSmrg 76965592a31fSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 76971ac89addSmrg 76985592a31fSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 76995592a31fSmrg])# _LT_WITH_PIC 77001ac89addSmrg 77015592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 77025592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 770350f2e948Smrg 77045592a31fSmrg# Old name: 77055592a31fSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 77065592a31fSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 77075592a31fSmrgAC_DIAGNOSE([obsolete], 77085592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 77095592a31fSmrgput the `pic-only' option into LT_INIT's first parameter.]) 771050f2e948Smrg]) 771150f2e948Smrg 77125592a31fSmrgdnl aclocal-1.4 backwards compatibility: 77135592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 771450f2e948Smrg 771550f2e948Smrg 77165592a31fSmrgm4_define([_LTDL_MODE], []) 77175592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 77185592a31fSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 77195592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 77205592a31fSmrg [m4_define([_LTDL_MODE], [recursive])]) 77215592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 77225592a31fSmrg [m4_define([_LTDL_MODE], [subproject])]) 772350f2e948Smrg 77245592a31fSmrgm4_define([_LTDL_TYPE], []) 77255592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 77265592a31fSmrg [m4_define([_LTDL_TYPE], [installable])]) 77275592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 77285592a31fSmrg [m4_define([_LTDL_TYPE], [convenience])]) 772950f2e948Smrg 77305592a31fSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 773145bc899bSmrg# 77325592a31fSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 77335592a31fSmrg# Written by Gary V. Vaughan, 2004 7734226fade8Smrg# 77355592a31fSmrg# This file is free software; the Free Software Foundation gives 77365592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 77375592a31fSmrg# modifications, as long as this notice is preserved. 77385592a31fSmrg 77395592a31fSmrg# serial 6 ltsugar.m4 77405592a31fSmrg 77415592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 77425592a31fSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 77435592a31fSmrg 77445592a31fSmrg 77455592a31fSmrg# lt_join(SEP, ARG1, [ARG2...]) 77465592a31fSmrg# ----------------------------- 77475592a31fSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 77485592a31fSmrg# associated separator. 77495592a31fSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 77505592a31fSmrg# versions in m4sugar had bugs. 77515592a31fSmrgm4_define([lt_join], 77525592a31fSmrg[m4_if([$#], [1], [], 77535592a31fSmrg [$#], [2], [[$2]], 77545592a31fSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 77555592a31fSmrgm4_define([_lt_join], 77565592a31fSmrg[m4_if([$#$2], [2], [], 77575592a31fSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 77585592a31fSmrg 77595592a31fSmrg 77605592a31fSmrg# lt_car(LIST) 77615592a31fSmrg# lt_cdr(LIST) 77625592a31fSmrg# ------------ 77635592a31fSmrg# Manipulate m4 lists. 77645592a31fSmrg# These macros are necessary as long as will still need to support 77655592a31fSmrg# Autoconf-2.59 which quotes differently. 77665592a31fSmrgm4_define([lt_car], [[$1]]) 77675592a31fSmrgm4_define([lt_cdr], 77685592a31fSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 77695592a31fSmrg [$#], 1, [], 77705592a31fSmrg [m4_dquote(m4_shift($@))])]) 77715592a31fSmrgm4_define([lt_unquote], $1) 77725592a31fSmrg 77735592a31fSmrg 77745592a31fSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 77755592a31fSmrg# ------------------------------------------ 77765592a31fSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 77775592a31fSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 77785592a31fSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 77795592a31fSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 77805592a31fSmrg# than defined and empty). 77813a925b30Smrg# 77825592a31fSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 77835592a31fSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 77845592a31fSmrgm4_define([lt_append], 77855592a31fSmrg[m4_define([$1], 77865592a31fSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 77875592a31fSmrg 77885592a31fSmrg 77895592a31fSmrg 77905592a31fSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 77915592a31fSmrg# ---------------------------------------------------------- 77925592a31fSmrg# Produce a SEP delimited list of all paired combinations of elements of 77935592a31fSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 77945592a31fSmrg# has the form PREFIXmINFIXSUFFIXn. 77955592a31fSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 77965592a31fSmrgm4_define([lt_combine], 77975592a31fSmrg[m4_if(m4_eval([$# > 3]), [1], 77985592a31fSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 77995592a31fSmrg[[m4_foreach([_Lt_prefix], [$2], 78005592a31fSmrg [m4_foreach([_Lt_suffix], 78015592a31fSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 78025592a31fSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 78035592a31fSmrg 78045592a31fSmrg 78055592a31fSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 78065592a31fSmrg# ----------------------------------------------------------------------- 78075592a31fSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 78085592a31fSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 78095592a31fSmrgm4_define([lt_if_append_uniq], 78105592a31fSmrg[m4_ifdef([$1], 78115592a31fSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 78125592a31fSmrg [lt_append([$1], [$2], [$3])$4], 78135592a31fSmrg [$5])], 78145592a31fSmrg [lt_append([$1], [$2], [$3])$4])]) 78155592a31fSmrg 78165592a31fSmrg 78175592a31fSmrg# lt_dict_add(DICT, KEY, VALUE) 78185592a31fSmrg# ----------------------------- 78195592a31fSmrgm4_define([lt_dict_add], 78205592a31fSmrg[m4_define([$1($2)], [$3])]) 782145bc899bSmrg 782245bc899bSmrg 78235592a31fSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 78245592a31fSmrg# -------------------------------------------- 78255592a31fSmrgm4_define([lt_dict_add_subkey], 78265592a31fSmrg[m4_define([$1($2:$3)], [$4])]) 782745bc899bSmrg 782845bc899bSmrg 78295592a31fSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 78305592a31fSmrg# ---------------------------------- 78315592a31fSmrgm4_define([lt_dict_fetch], 78325592a31fSmrg[m4_ifval([$3], 78335592a31fSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 78345592a31fSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 783545bc899bSmrg 78361ac89addSmrg 78375592a31fSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 78385592a31fSmrg# ----------------------------------------------------------------- 78395592a31fSmrgm4_define([lt_if_dict_fetch], 78405592a31fSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 78415592a31fSmrg [$5], 78425592a31fSmrg [$6])]) 784345bc899bSmrg 78445592a31fSmrg 78455592a31fSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 78465592a31fSmrg# -------------------------------------------------------------- 78475592a31fSmrgm4_define([lt_dict_filter], 78485592a31fSmrg[m4_if([$5], [], [], 78495592a31fSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 78505592a31fSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 78515592a31fSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 7852226fade8Smrg]) 785350f2e948Smrg 78545592a31fSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 78555592a31fSmrg# 78565592a31fSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 78575592a31fSmrg# Written by Scott James Remnant, 2004 78585592a31fSmrg# 78595592a31fSmrg# This file is free software; the Free Software Foundation gives 78605592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 78615592a31fSmrg# modifications, as long as this notice is preserved. 786250f2e948Smrg 78635592a31fSmrg# Generated from ltversion.in. 786450f2e948Smrg 78655592a31fSmrg# serial 3012 ltversion.m4 78665592a31fSmrg# This file is part of GNU Libtool 786750f2e948Smrg 78685592a31fSmrgm4_define([LT_PACKAGE_VERSION], [2.2.6]) 78695592a31fSmrgm4_define([LT_PACKAGE_REVISION], [1.3012]) 787050f2e948Smrg 78715592a31fSmrgAC_DEFUN([LTVERSION_VERSION], 78725592a31fSmrg[macro_version='2.2.6' 78735592a31fSmrgmacro_revision='1.3012' 78745592a31fSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 78755592a31fSmrg_LT_DECL(, macro_revision, 0) 7876226fade8Smrg]) 787750f2e948Smrg 78785592a31fSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 78795592a31fSmrg# 78805592a31fSmrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 78815592a31fSmrg# Written by Scott James Remnant, 2004. 78825592a31fSmrg# 78835592a31fSmrg# This file is free software; the Free Software Foundation gives 78845592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 78855592a31fSmrg# modifications, as long as this notice is preserved. 78865592a31fSmrg 78875592a31fSmrg# serial 4 lt~obsolete.m4 78885592a31fSmrg 78895592a31fSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 78905592a31fSmrg# 78915592a31fSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 78925592a31fSmrg# which have later been changed to m4_define as they aren't part of the 78935592a31fSmrg# exported API, or moved to Autoconf or Automake where they belong. 78945592a31fSmrg# 78955592a31fSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 78965592a31fSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 78975592a31fSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 78985592a31fSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 78995592a31fSmrg# and doesn't know about Autoconf macros at all.) 79005592a31fSmrg# 79015592a31fSmrg# So we provide this file, which has a silly filename so it's always 79025592a31fSmrg# included after everything else. This provides aclocal with the 79035592a31fSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 79045592a31fSmrg# because those macros already exist, or will be overwritten later. 79055592a31fSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 79065592a31fSmrg# 79075592a31fSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 79085592a31fSmrg# Yes, that means every name once taken will need to remain here until 79095592a31fSmrg# we give up compatibility with versions before 1.7, at which point 79105592a31fSmrg# we need to keep only those names which we still refer to. 79115592a31fSmrg 79125592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 79135592a31fSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 79145592a31fSmrg 79155592a31fSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 79165592a31fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 79175592a31fSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 79185592a31fSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 79195592a31fSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 79205592a31fSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 79215592a31fSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 79225592a31fSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 79235592a31fSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 79245592a31fSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 79255592a31fSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 79265592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 79275592a31fSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 79285592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 79295592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 79305592a31fSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 79315592a31fSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 79325592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 79335592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 79345592a31fSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 79355592a31fSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 79365592a31fSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 79375592a31fSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 79385592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 79395592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 79405592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 79415592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 79425592a31fSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 79435592a31fSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 79445592a31fSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 79455592a31fSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 79465592a31fSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 79475592a31fSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 79485592a31fSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 79495592a31fSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 79505592a31fSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 79515592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 79525592a31fSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 79535592a31fSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 79545592a31fSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 79555592a31fSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 79565592a31fSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 79575592a31fSmrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 79585592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 79595592a31fSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 79605592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 79615592a31fSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 79625592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 79635592a31fSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 79645592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 79655592a31fSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 79665592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 79675592a31fSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 79685592a31fSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 79695592a31fSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 79705592a31fSmrg 797145bc899bSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 797245bc899bSmrg# 797345bc899bSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 797445bc899bSmrg# 797545bc899bSmrg# This program is free software; you can redistribute it and/or modify 797645bc899bSmrg# it under the terms of the GNU General Public License as published by 797745bc899bSmrg# the Free Software Foundation; either version 2 of the License, or 797845bc899bSmrg# (at your option) any later version. 797945bc899bSmrg# 798045bc899bSmrg# This program is distributed in the hope that it will be useful, but 798145bc899bSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 798245bc899bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 798345bc899bSmrg# General Public License for more details. 798445bc899bSmrg# 798545bc899bSmrg# You should have received a copy of the GNU General Public License 798645bc899bSmrg# along with this program; if not, write to the Free Software 798745bc899bSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 798845bc899bSmrg# 798945bc899bSmrg# As a special exception to the GNU General Public License, if you 799045bc899bSmrg# distribute this file as part of a program that contains a 799145bc899bSmrg# configuration script generated by Autoconf, you may include it under 799245bc899bSmrg# the same distribution terms that you use for the rest of that program. 799345bc899bSmrg 799445bc899bSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 799545bc899bSmrg# ---------------------------------- 799645bc899bSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 799745bc899bSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 799845bc899bSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 799945bc899bSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 800045bc899bSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 800145bc899bSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 800245bc899bSmrgfi 800345bc899bSmrgif test -n "$PKG_CONFIG"; then 800445bc899bSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 800545bc899bSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 800645bc899bSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 800745bc899bSmrg AC_MSG_RESULT([yes]) 800845bc899bSmrg else 800945bc899bSmrg AC_MSG_RESULT([no]) 801045bc899bSmrg PKG_CONFIG="" 801145bc899bSmrg fi 801245bc899bSmrg 801345bc899bSmrgfi[]dnl 801445bc899bSmrg])# PKG_PROG_PKG_CONFIG 801545bc899bSmrg 801645bc899bSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 801745bc899bSmrg# 801845bc899bSmrg# Check to see whether a particular set of modules exists. Similar 801945bc899bSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 802045bc899bSmrg# 802145bc899bSmrg# 802245bc899bSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 802345bc899bSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 802445bc899bSmrg# PKG_CHECK_EXISTS manually 802545bc899bSmrg# -------------------------------------------------------------- 802645bc899bSmrgAC_DEFUN([PKG_CHECK_EXISTS], 802745bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 802845bc899bSmrgif test -n "$PKG_CONFIG" && \ 802945bc899bSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 803045bc899bSmrg m4_ifval([$2], [$2], [:]) 803145bc899bSmrgm4_ifvaln([$3], [else 803245bc899bSmrg $3])dnl 803345bc899bSmrgfi]) 803445bc899bSmrg 803545bc899bSmrg 803645bc899bSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 803745bc899bSmrg# --------------------------------------------- 803845bc899bSmrgm4_define([_PKG_CONFIG], 803950f2e948Smrg[if test -n "$$1"; then 804050f2e948Smrg pkg_cv_[]$1="$$1" 804150f2e948Smrg elif test -n "$PKG_CONFIG"; then 804250f2e948Smrg PKG_CHECK_EXISTS([$3], 804350f2e948Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 804450f2e948Smrg [pkg_failed=yes]) 804550f2e948Smrg else 804650f2e948Smrg pkg_failed=untried 804745bc899bSmrgfi[]dnl 804845bc899bSmrg])# _PKG_CONFIG 804945bc899bSmrg 805045bc899bSmrg# _PKG_SHORT_ERRORS_SUPPORTED 805145bc899bSmrg# ----------------------------- 805245bc899bSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 805345bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 805445bc899bSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 805545bc899bSmrg _pkg_short_errors_supported=yes 805645bc899bSmrgelse 805745bc899bSmrg _pkg_short_errors_supported=no 805845bc899bSmrgfi[]dnl 805945bc899bSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 806045bc899bSmrg 806145bc899bSmrg 806245bc899bSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 806345bc899bSmrg# [ACTION-IF-NOT-FOUND]) 806445bc899bSmrg# 806545bc899bSmrg# 806645bc899bSmrg# Note that if there is a possibility the first call to 806745bc899bSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 806845bc899bSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 806945bc899bSmrg# 807045bc899bSmrg# 807145bc899bSmrg# -------------------------------------------------------------- 807245bc899bSmrgAC_DEFUN([PKG_CHECK_MODULES], 807345bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 807445bc899bSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 807545bc899bSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 807645bc899bSmrg 807745bc899bSmrgpkg_failed=no 807845bc899bSmrgAC_MSG_CHECKING([for $1]) 807945bc899bSmrg 808045bc899bSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 808145bc899bSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 808245bc899bSmrg 808345bc899bSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 808445bc899bSmrgand $1[]_LIBS to avoid the need to call pkg-config. 808545bc899bSmrgSee the pkg-config man page for more details.]) 808645bc899bSmrg 808745bc899bSmrgif test $pkg_failed = yes; then 808845bc899bSmrg _PKG_SHORT_ERRORS_SUPPORTED 808945bc899bSmrg if test $_pkg_short_errors_supported = yes; then 809050f2e948Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 809145bc899bSmrg else 809250f2e948Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 809345bc899bSmrg fi 809445bc899bSmrg # Put the nasty error message in config.log where it belongs 809545bc899bSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 809645bc899bSmrg 809745bc899bSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 809845bc899bSmrg[Package requirements ($2) were not met: 809945bc899bSmrg 810045bc899bSmrg$$1_PKG_ERRORS 810145bc899bSmrg 810245bc899bSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 810345bc899bSmrginstalled software in a non-standard prefix. 810445bc899bSmrg 810545bc899bSmrg_PKG_TEXT 810645bc899bSmrg])], 810745bc899bSmrg [AC_MSG_RESULT([no]) 810845bc899bSmrg $4]) 810945bc899bSmrgelif test $pkg_failed = untried; then 811045bc899bSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 811145bc899bSmrg[The pkg-config script could not be found or is too old. Make sure it 811245bc899bSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 811345bc899bSmrgpath to pkg-config. 811445bc899bSmrg 811545bc899bSmrg_PKG_TEXT 811645bc899bSmrg 811750f2e948SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 811845bc899bSmrg [$4]) 811945bc899bSmrgelse 812045bc899bSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 812145bc899bSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 812245bc899bSmrg AC_MSG_RESULT([yes]) 812345bc899bSmrg ifelse([$3], , :, [$3]) 812445bc899bSmrgfi[]dnl 812545bc899bSmrg])# PKG_CHECK_MODULES 812645bc899bSmrg 812750f2e948Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 812845bc899bSmrgdnl 812945bc899bSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 813045bc899bSmrgdnl 813145bc899bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 813245bc899bSmrgdnl copy of this software and associated documentation files (the 813345bc899bSmrgdnl "Software"), to deal in the Software without restriction, including 813445bc899bSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 813545bc899bSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 813645bc899bSmrgdnl to whom the Software is furnished to do so, provided that the above 813745bc899bSmrgdnl copyright notice(s) and this permission notice appear in all copies of 813845bc899bSmrgdnl the Software and that both the above copyright notice(s) and this 813945bc899bSmrgdnl permission notice appear in supporting documentation. 814045bc899bSmrgdnl 814145bc899bSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 814245bc899bSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 814345bc899bSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 814445bc899bSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 814545bc899bSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 814645bc899bSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 814745bc899bSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 814845bc899bSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 814945bc899bSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 815045bc899bSmrgdnl 815145bc899bSmrgdnl Except as contained in this notice, the name of a copyright holder 815245bc899bSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 815345bc899bSmrgdnl or other dealings in this Software without prior written authorization 815445bc899bSmrgdnl of the copyright holder. 815545bc899bSmrg 815645bc899bSmrg# XORG_MACROS_VERSION(required-version) 815745bc899bSmrg# ------------------------------------- 815845bc899bSmrg# Minimum version: 1.1.0 815945bc899bSmrg# 816045bc899bSmrg# If you're using a macro added in Version 1.1 or newer, include this in 816145bc899bSmrg# your configure.ac with the minimum required version, such as: 816245bc899bSmrg# XORG_MACROS_VERSION(1.1) 816345bc899bSmrg# 81645592a31fSmrg# To ensure that this macro is defined, also add: 81655592a31fSmrg# m4_ifndef([XORG_MACROS_VERSION], 81665592a31fSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 816745bc899bSmrg# 816845bc899bSmrg# 816945bc899bSmrg# See the "minimum version" comment for each macro you use to see what 817045bc899bSmrg# version you require. 81715592a31fSmrgm4_defun([XORG_MACROS_VERSION],[ 81725592a31fSmrgm4_define([vers_have], [1.4.1]) 81735592a31fSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 81745592a31fSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 81755592a31fSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 81765592a31fSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 81775592a31fSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 81785592a31fSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 81795592a31fSmrgm4_undefine([vers_have]) 81805592a31fSmrgm4_undefine([maj_have]) 81815592a31fSmrgm4_undefine([maj_needed]) 818245bc899bSmrg]) # XORG_MACROS_VERSION 818345bc899bSmrg 818445bc899bSmrg# XORG_PROG_RAWCPP() 818545bc899bSmrg# ------------------ 818645bc899bSmrg# Minimum version: 1.0.0 818745bc899bSmrg# 818845bc899bSmrg# Find cpp program and necessary flags for use in pre-processing text files 818945bc899bSmrg# such as man pages and config files 819045bc899bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 819145bc899bSmrgAC_REQUIRE([AC_PROG_CPP]) 819245bc899bSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 819345bc899bSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 819445bc899bSmrg 819545bc899bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 819645bc899bSmrg# which is not the best choice for supporting other OS'es, but covers most 819745bc899bSmrg# of the ones we need for now. 819845bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 819945bc899bSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 820045bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 820145bc899bSmrg AC_MSG_RESULT([no]) 820245bc899bSmrgelse 820345bc899bSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 820445bc899bSmrg RAWCPPFLAGS=-undef 820545bc899bSmrg AC_MSG_RESULT([yes]) 820650f2e948Smrg # under Cygwin unix is still defined even with -undef 820750f2e948Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 820850f2e948Smrg RAWCPPFLAGS="-undef -ansi" 820950f2e948Smrg AC_MSG_RESULT([yes, with -ansi]) 821045bc899bSmrg else 821145bc899bSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 821245bc899bSmrg fi 821345bc899bSmrgfi 821445bc899bSmrgrm -f conftest.$ac_ext 821545bc899bSmrg 821645bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 821745bc899bSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 821845bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 821945bc899bSmrg AC_MSG_RESULT([no]) 822045bc899bSmrgelse 822145bc899bSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 822245bc899bSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 822345bc899bSmrg AC_MSG_RESULT([yes]) 822445bc899bSmrg else 822545bc899bSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 822645bc899bSmrg fi 822745bc899bSmrgfi 822845bc899bSmrgrm -f conftest.$ac_ext 822945bc899bSmrgAC_SUBST(RAWCPPFLAGS) 823045bc899bSmrg]) # XORG_PROG_RAWCPP 823145bc899bSmrg 823245bc899bSmrg# XORG_MANPAGE_SECTIONS() 823345bc899bSmrg# ----------------------- 823445bc899bSmrg# Minimum version: 1.0.0 823545bc899bSmrg# 823645bc899bSmrg# Determine which sections man pages go in for the different man page types 823745bc899bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 823845bc899bSmrg# Not sure if there's any better way than just hardcoding by OS name. 823945bc899bSmrg# Override default settings by setting environment variables 824045bc899bSmrg 824145bc899bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 824245bc899bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 824345bc899bSmrg 824445bc899bSmrgif test x$APP_MAN_SUFFIX = x ; then 824545bc899bSmrg APP_MAN_SUFFIX=1 824645bc899bSmrgfi 824745bc899bSmrgif test x$APP_MAN_DIR = x ; then 824845bc899bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 824945bc899bSmrgfi 825045bc899bSmrg 825145bc899bSmrgif test x$LIB_MAN_SUFFIX = x ; then 825245bc899bSmrg LIB_MAN_SUFFIX=3 825345bc899bSmrgfi 825445bc899bSmrgif test x$LIB_MAN_DIR = x ; then 825545bc899bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 825645bc899bSmrgfi 825745bc899bSmrg 825845bc899bSmrgif test x$FILE_MAN_SUFFIX = x ; then 825945bc899bSmrg case $host_os in 826045bc899bSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 826145bc899bSmrg *) FILE_MAN_SUFFIX=5 ;; 826245bc899bSmrg esac 826345bc899bSmrgfi 826445bc899bSmrgif test x$FILE_MAN_DIR = x ; then 826545bc899bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 826645bc899bSmrgfi 826745bc899bSmrg 826845bc899bSmrgif test x$MISC_MAN_SUFFIX = x ; then 826945bc899bSmrg case $host_os in 827045bc899bSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 827145bc899bSmrg *) MISC_MAN_SUFFIX=7 ;; 827245bc899bSmrg esac 827345bc899bSmrgfi 827445bc899bSmrgif test x$MISC_MAN_DIR = x ; then 827545bc899bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 827645bc899bSmrgfi 827745bc899bSmrg 827845bc899bSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 827945bc899bSmrg case $host_os in 828045bc899bSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 828145bc899bSmrg *) DRIVER_MAN_SUFFIX=4 ;; 828245bc899bSmrg esac 828345bc899bSmrgfi 828445bc899bSmrgif test x$DRIVER_MAN_DIR = x ; then 828545bc899bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 828645bc899bSmrgfi 828745bc899bSmrg 828845bc899bSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 828945bc899bSmrg case $host_os in 829045bc899bSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 829145bc899bSmrg *) ADMIN_MAN_SUFFIX=8 ;; 829245bc899bSmrg esac 829345bc899bSmrgfi 829445bc899bSmrgif test x$ADMIN_MAN_DIR = x ; then 829545bc899bSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 829645bc899bSmrgfi 829745bc899bSmrg 829845bc899bSmrg 829945bc899bSmrgAC_SUBST([APP_MAN_SUFFIX]) 830045bc899bSmrgAC_SUBST([LIB_MAN_SUFFIX]) 830145bc899bSmrgAC_SUBST([FILE_MAN_SUFFIX]) 830245bc899bSmrgAC_SUBST([MISC_MAN_SUFFIX]) 830345bc899bSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 830445bc899bSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 830545bc899bSmrgAC_SUBST([APP_MAN_DIR]) 830645bc899bSmrgAC_SUBST([LIB_MAN_DIR]) 830745bc899bSmrgAC_SUBST([FILE_MAN_DIR]) 830845bc899bSmrgAC_SUBST([MISC_MAN_DIR]) 830945bc899bSmrgAC_SUBST([DRIVER_MAN_DIR]) 831045bc899bSmrgAC_SUBST([ADMIN_MAN_DIR]) 831145bc899bSmrg]) # XORG_MANPAGE_SECTIONS 831245bc899bSmrg 831345bc899bSmrg# XORG_CHECK_LINUXDOC 831445bc899bSmrg# ------------------- 831545bc899bSmrg# Minimum version: 1.0.0 831645bc899bSmrg# 831745bc899bSmrg# Defines the variable MAKE_TEXT if the necessary tools and 831845bc899bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 831945bc899bSmrg# Whether or not the necessary tools and files are found can be checked 832045bc899bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 832145bc899bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 832250f2e948Smrgif test x$XORG_SGML_PATH = x ; then 832350f2e948Smrg XORG_SGML_PATH=$prefix/share/sgml 832450f2e948Smrgfi 832550f2e948SmrgHAVE_DEFS_ENT= 832650f2e948Smrg 832750f2e948Smrgif test x"$cross_compiling" = x"yes" ; then 832850f2e948Smrg HAVE_DEFS_ENT=no 832950f2e948Smrgelse 833050f2e948Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 833150f2e948Smrgfi 833245bc899bSmrg 833345bc899bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 833445bc899bSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 833545bc899bSmrg 833645bc899bSmrgAC_MSG_CHECKING([Whether to build documentation]) 833745bc899bSmrg 833850f2e948Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 833945bc899bSmrg BUILDDOC=yes 834045bc899bSmrgelse 834145bc899bSmrg BUILDDOC=no 834245bc899bSmrgfi 834345bc899bSmrg 834445bc899bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 834545bc899bSmrg 834645bc899bSmrgAC_MSG_RESULT([$BUILDDOC]) 834745bc899bSmrg 834845bc899bSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 834945bc899bSmrg 835050f2e948Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 835145bc899bSmrg BUILDPDFDOC=yes 835245bc899bSmrgelse 835345bc899bSmrg BUILDPDFDOC=no 835445bc899bSmrgfi 835545bc899bSmrg 835645bc899bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 835745bc899bSmrg 835845bc899bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 835945bc899bSmrg 836050f2e948SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 836150f2e948SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 836245bc899bSmrgMAKE_PDF="$PS2PDF" 836350f2e948SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 836445bc899bSmrg 836545bc899bSmrgAC_SUBST(MAKE_TEXT) 836645bc899bSmrgAC_SUBST(MAKE_PS) 836745bc899bSmrgAC_SUBST(MAKE_PDF) 836845bc899bSmrgAC_SUBST(MAKE_HTML) 836945bc899bSmrg]) # XORG_CHECK_LINUXDOC 837045bc899bSmrg 837150f2e948Smrg# XORG_CHECK_DOCBOOK 837250f2e948Smrg# ------------------- 837350f2e948Smrg# Minimum version: 1.0.0 837450f2e948Smrg# 837550f2e948Smrg# Checks for the ability to build output formats from SGML DocBook source. 837650f2e948Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 837750f2e948Smrg# indicates whether the necessary tools and files are found and, if set, 837850f2e948Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 837950f2e948SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 838050f2e948Smrgif test x$XORG_SGML_PATH = x ; then 838150f2e948Smrg XORG_SGML_PATH=$prefix/share/sgml 838250f2e948Smrgfi 838350f2e948SmrgHAVE_DEFS_ENT= 838450f2e948SmrgBUILDTXTDOC=no 838550f2e948SmrgBUILDPDFDOC=no 838650f2e948SmrgBUILDPSDOC=no 838750f2e948SmrgBUILDHTMLDOC=no 838850f2e948Smrg 838950f2e948SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 839050f2e948Smrg 839150f2e948SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 839250f2e948SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 839350f2e948SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 839450f2e948SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 839550f2e948Smrg 839650f2e948SmrgAC_MSG_CHECKING([Whether to build text documentation]) 839750f2e948Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 839850f2e948Smrg test x$BUILD_TXTDOC != xno; then 839950f2e948Smrg BUILDTXTDOC=yes 840050f2e948Smrgfi 840150f2e948SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 840250f2e948SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 840350f2e948Smrg 840450f2e948SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 840550f2e948Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 840650f2e948Smrg test x$BUILD_PDFDOC != xno; then 840750f2e948Smrg BUILDPDFDOC=yes 840850f2e948Smrgfi 840950f2e948SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 841050f2e948SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 841150f2e948Smrg 841250f2e948SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 841350f2e948Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 841450f2e948Smrg test x$BUILD_PSDOC != xno; then 841550f2e948Smrg BUILDPSDOC=yes 841650f2e948Smrgfi 841750f2e948SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 841850f2e948SmrgAC_MSG_RESULT([$BUILDPSDOC]) 841950f2e948Smrg 842050f2e948SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 842150f2e948Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 842250f2e948Smrg test x$BUILD_HTMLDOC != xno; then 842350f2e948Smrg BUILDHTMLDOC=yes 842450f2e948Smrgfi 842550f2e948SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 842650f2e948SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 842750f2e948Smrg 842850f2e948SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 842950f2e948SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 843050f2e948SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 843150f2e948SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 843250f2e948Smrg 843350f2e948SmrgAC_SUBST(MAKE_TEXT) 843450f2e948SmrgAC_SUBST(MAKE_PS) 843550f2e948SmrgAC_SUBST(MAKE_PDF) 843650f2e948SmrgAC_SUBST(MAKE_HTML) 843750f2e948Smrg]) # XORG_CHECK_DOCBOOK 843850f2e948Smrg 843945bc899bSmrg# XORG_CHECK_MALLOC_ZERO 844045bc899bSmrg# ---------------------- 844145bc899bSmrg# Minimum version: 1.0.0 844245bc899bSmrg# 844345bc899bSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 844445bc899bSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 844545bc899bSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 844645bc899bSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 844745bc899bSmrgAC_ARG_ENABLE(malloc0returnsnull, 84485592a31fSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 844945bc899bSmrg [malloc(0) returns NULL (default: auto)]), 845045bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 845145bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 845245bc899bSmrg 845345bc899bSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 845445bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 845545bc899bSmrg AC_RUN_IFELSE([ 845645bc899bSmrgchar *malloc(); 845745bc899bSmrgchar *realloc(); 845845bc899bSmrgchar *calloc(); 845945bc899bSmrgmain() { 846045bc899bSmrg char *m0, *r0, *c0, *p; 846145bc899bSmrg m0 = malloc(0); 846245bc899bSmrg p = malloc(10); 846345bc899bSmrg r0 = realloc(p,0); 846445bc899bSmrg c0 = calloc(0); 846545bc899bSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 846645bc899bSmrg}], 846745bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 846845bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 846945bc899bSmrgfi 847045bc899bSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 847145bc899bSmrg 847245bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 847345bc899bSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 847445bc899bSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 847545bc899bSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 847645bc899bSmrgelse 847745bc899bSmrg MALLOC_ZERO_CFLAGS="" 847845bc899bSmrg XMALLOC_ZERO_CFLAGS="" 847945bc899bSmrg XTMALLOC_ZERO_CFLAGS="" 848045bc899bSmrgfi 848145bc899bSmrg 848245bc899bSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 848345bc899bSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 848445bc899bSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 848545bc899bSmrg]) # XORG_CHECK_MALLOC_ZERO 848645bc899bSmrg 848745bc899bSmrg# XORG_WITH_LINT() 848845bc899bSmrg# ---------------- 848945bc899bSmrg# Minimum version: 1.1.0 849045bc899bSmrg# 849145bc899bSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 849245bc899bSmrg# is specified. (Use --with-lint=sparse for sparse.) 849345bc899bSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 849445bc899bSmrg# Sets $LINT_FLAGS to flags to pass to source checker 849545bc899bSmrg# Sets LINT automake conditional if enabled (default: disabled) 849645bc899bSmrg# 849745bc899bSmrgAC_DEFUN([XORG_WITH_LINT],[ 849845bc899bSmrg 849945bc899bSmrg# Allow checking code with lint, sparse, etc. 85005592a31fSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 850145bc899bSmrg [Use a lint-style source code checker (default: disabled)])], 850245bc899bSmrg [use_lint=$withval], [use_lint=no]) 850345bc899bSmrgif test "x$use_lint" = "xyes" ; then 850445bc899bSmrg LINT="lint" 850545bc899bSmrgelse 850645bc899bSmrg LINT="$use_lint" 850745bc899bSmrgfi 850845bc899bSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 850945bc899bSmrg case $LINT in 851045bc899bSmrg lint|*/lint) 851145bc899bSmrg case $host_os in 851245bc899bSmrg solaris*) 851345bc899bSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 851445bc899bSmrg ;; 851545bc899bSmrg esac 851645bc899bSmrg ;; 851745bc899bSmrg esac 851845bc899bSmrgfi 851945bc899bSmrg 852045bc899bSmrgAC_SUBST(LINT) 852145bc899bSmrgAC_SUBST(LINT_FLAGS) 852245bc899bSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 852345bc899bSmrg 852445bc899bSmrg]) # XORG_WITH_LINT 852545bc899bSmrg 852645bc899bSmrg# XORG_LINT_LIBRARY(LIBNAME) 852745bc899bSmrg# -------------------------- 852845bc899bSmrg# Minimum version: 1.1.0 852945bc899bSmrg# 853045bc899bSmrg# Sets up flags for building lint libraries for checking programs that call 853145bc899bSmrg# functions in the library. 853245bc899bSmrg# Disabled by default, enable with --enable-lint-library 853345bc899bSmrg# Sets: 853445bc899bSmrg# @LINTLIB@ - name of lint library file to make 853545bc899bSmrg# MAKE_LINT_LIB - automake conditional 853645bc899bSmrg# 853745bc899bSmrg 853845bc899bSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 853945bc899bSmrgAC_REQUIRE([XORG_WITH_LINT]) 854045bc899bSmrg# Build lint "library" for more indepth checks of programs calling this library 85415592a31fSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 854245bc899bSmrg [Create lint library (default: disabled)])], 854345bc899bSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 854445bc899bSmrgif test "x$make_lint_lib" != "xno" ; then 854545bc899bSmrg if test "x$LINT" = "xno" ; then 854645bc899bSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 854745bc899bSmrg fi 854845bc899bSmrg if test "x$make_lint_lib" = "xyes" ; then 854945bc899bSmrg LINTLIB=llib-l$1.ln 855045bc899bSmrg else 855145bc899bSmrg LINTLIB=$make_lint_lib 855245bc899bSmrg fi 855345bc899bSmrgfi 855445bc899bSmrgAC_SUBST(LINTLIB) 855545bc899bSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 855645bc899bSmrg 855745bc899bSmrg]) # XORG_LINT_LIBRARY 855845bc899bSmrg 855950f2e948Smrg# XORG_CWARNFLAGS 856050f2e948Smrg# --------------- 856150f2e948Smrg# Minimum version: 1.2.0 856250f2e948Smrg# 856350f2e948Smrg# Defines CWARNFLAGS to enable C compiler warnings. 856450f2e948Smrg# 856550f2e948SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 856650f2e948SmrgAC_REQUIRE([AC_PROG_CC]) 856750f2e948Smrgif test "x$GCC" = xyes ; then 856850f2e948Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 856950f2e948Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 857050f2e948Smrg-Wbad-function-cast" 85715592a31fSmrg case `$CC -dumpversion` in 857250f2e948Smrg 3.4.* | 4.*) 85735592a31fSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 857450f2e948Smrg ;; 857550f2e948Smrg esac 857650f2e948Smrgelse 857750f2e948Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 857850f2e948Smrg if test "x$SUNCC" = "xyes"; then 857950f2e948Smrg CWARNFLAGS="-v" 858050f2e948Smrg fi 858150f2e948Smrgfi 858250f2e948SmrgAC_SUBST(CWARNFLAGS) 85835592a31fSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 858450f2e948Smrg]) # XORG_CWARNFLAGS 85855592a31fSmrg 85865592a31fSmrg# XORG_STRICT_OPTION 85875592a31fSmrg# ----------------------- 85885592a31fSmrg# Minimum version: 1.3.0 85895592a31fSmrg# 85905592a31fSmrg# Add configure option to enable strict compilation 85915592a31fSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 85925592a31fSmrgAC_REQUIRE([AC_PROG_CC]) 85935592a31fSmrgAC_REQUIRE([AC_PROG_CC_C99]) 85945592a31fSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 85955592a31fSmrg 85965592a31fSmrgAC_ARG_ENABLE(strict-compilation, 85975592a31fSmrg AS_HELP_STRING([--enable-strict-compilation], 85985592a31fSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 85995592a31fSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 86005592a31fSmrgif test "x$STRICT_COMPILE" = "xyes"; then 86015592a31fSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 86025592a31fSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 86035592a31fSmrg if test "x$GCC" = xyes ; then 86045592a31fSmrg STRICT_CFLAGS="-pedantic -Werror" 86055592a31fSmrg elif test "x$SUNCC" = "xyes"; then 86065592a31fSmrg STRICT_CFLAGS="-errwarn" 86075592a31fSmrg elif test "x$INTELCC" = "xyes"; then 86085592a31fSmrg STRICT_CFLAGS="-Werror" 86095592a31fSmrg fi 86105592a31fSmrgfi 86115592a31fSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 86125592a31fSmrgAC_SUBST([CWARNFLAGS]) 86135592a31fSmrg]) # XORG_STRICT_OPTION 86145592a31fSmrg 86155592a31fSmrg# XORG_DEFAULT_OPTIONS 86165592a31fSmrg# -------------------- 86175592a31fSmrg# Minimum version: 1.3.0 86185592a31fSmrg# 86195592a31fSmrg# Defines default options for X.Org modules. 86205592a31fSmrg# 86215592a31fSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 86225592a31fSmrgXORG_CWARNFLAGS 86235592a31fSmrgXORG_STRICT_OPTION 86245592a31fSmrgXORG_RELEASE_VERSION 86255592a31fSmrgXORG_CHANGELOG 86265592a31fSmrgXORG_INSTALL 86275592a31fSmrgXORG_MANPAGE_SECTIONS 86285592a31fSmrg]) # XORG_DEFAULT_OPTIONS 86295592a31fSmrg 86305592a31fSmrg# XORG_INSTALL() 86315592a31fSmrg# ---------------- 86325592a31fSmrg# Minimum version: 1.4.0 86335592a31fSmrg# 86345592a31fSmrg# Defines the variable INSTALL_CMD as the command to copy 86355592a31fSmrg# INSTALL from $prefix/share/doc/util-macros. 86365592a31fSmrg# 86375592a31fSmrgAC_DEFUN([XORG_INSTALL], [ 86385592a31fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 86395592a31fSmrgmacros_docdir=$($PKG_CONFIG --print-errors --variable=docdir xorg-macros) 86405592a31fSmrgINSTALL_CMD="(cp -f "$macros_docdir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 86415592a31fSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 86425592a31fSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 86435592a31fSmrgecho 'util-macros \"docdir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 86445592a31fSmrgAC_SUBST([INSTALL_CMD]) 86455592a31fSmrg]) # XORG_INSTALL 864650f2e948Smrgdnl Copyright 2005 Red Hat, Inc 864750f2e948Smrgdnl 864850f2e948Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 864950f2e948Smrgdnl documentation for any purpose is hereby granted without fee, provided that 865050f2e948Smrgdnl the above copyright notice appear in all copies and that both that 865150f2e948Smrgdnl copyright notice and this permission notice appear in supporting 865250f2e948Smrgdnl documentation. 865350f2e948Smrgdnl 865450f2e948Smrgdnl The above copyright notice and this permission notice shall be included 865550f2e948Smrgdnl in all copies or substantial portions of the Software. 865650f2e948Smrgdnl 865750f2e948Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 865850f2e948Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 865950f2e948Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 866050f2e948Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 866150f2e948Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 866250f2e948Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 866350f2e948Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 866450f2e948Smrgdnl 866550f2e948Smrgdnl Except as contained in this notice, the name of the copyright holders shall 866650f2e948Smrgdnl not be used in advertising or otherwise to promote the sale, use or 866750f2e948Smrgdnl other dealings in this Software without prior written authorization 866850f2e948Smrgdnl from the copyright holders. 866950f2e948Smrgdnl 867050f2e948Smrg 867150f2e948Smrg# XORG_RELEASE_VERSION 867250f2e948Smrg# -------------------- 867350f2e948Smrg# Adds --with/without-release-string and changes the PACKAGE and 867450f2e948Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 867550f2e948Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 867650f2e948Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 867750f2e948Smrg 867850f2e948SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 867950f2e948Smrg AC_ARG_WITH(release-version, 86805592a31fSmrg AS_HELP_STRING([--with-release-version=STRING], 868150f2e948Smrg [Use release version string in package name]), 868250f2e948Smrg [RELEASE_VERSION="$withval"], 868350f2e948Smrg [RELEASE_VERSION=""]) 868450f2e948Smrg if test "x$RELEASE_VERSION" != "x"; then 868550f2e948Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 868650f2e948Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 868750f2e948Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 868850f2e948Smrg fi 868950f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 869050f2e948Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 869150f2e948Smrg [Major version of this package]) 869250f2e948Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 869350f2e948Smrg if test "x$PVM" = "x"; then 869450f2e948Smrg PVM="0" 869550f2e948Smrg fi 869650f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 869750f2e948Smrg [$PVM], 869850f2e948Smrg [Minor version of this package]) 869950f2e948Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 870050f2e948Smrg if test "x$PVP" = "x"; then 870150f2e948Smrg PVP="0" 870250f2e948Smrg fi 870350f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 870450f2e948Smrg [$PVP], 870550f2e948Smrg [Patch version of this package]) 870650f2e948Smrg]) 870750f2e948Smrg 870850f2e948Smrg# XORG_CHANGELOG() 870950f2e948Smrg# ---------------- 871050f2e948Smrg# Minimum version: 1.2.0 871150f2e948Smrg# 871250f2e948Smrg# Defines the variable CHANGELOG_CMD as the command to generate 871350f2e948Smrg# ChangeLog from git. 871450f2e948Smrg# 871550f2e948Smrg# 871650f2e948SmrgAC_DEFUN([XORG_CHANGELOG], [ 87175592a31fSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 87185592a31fSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 87195592a31fSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 872050f2e948Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 872150f2e948SmrgAC_SUBST([CHANGELOG_CMD]) 872250f2e948Smrg]) # XORG_CHANGELOG 872350f2e948Smrg 87245592a31fSmrgdnl Copyright 2005 Red Hat, Inc 87255592a31fSmrgdnl 87265592a31fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 87275592a31fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 87285592a31fSmrgdnl the above copyright notice appear in all copies and that both that 87295592a31fSmrgdnl copyright notice and this permission notice appear in supporting 87305592a31fSmrgdnl documentation. 87315592a31fSmrgdnl 87325592a31fSmrgdnl The above copyright notice and this permission notice shall be included 87335592a31fSmrgdnl in all copies or substantial portions of the Software. 87345592a31fSmrgdnl 87355592a31fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 87365592a31fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 87375592a31fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 87385592a31fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 87395592a31fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 87405592a31fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 87415592a31fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 87425592a31fSmrgdnl 87435592a31fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 87445592a31fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 87455592a31fSmrgdnl other dealings in this Software without prior written authorization 87465592a31fSmrgdnl from the copyright holders. 87475592a31fSmrgdnl 87485592a31fSmrg 87495592a31fSmrg# XORG_DRIVER_CHECK_EXT() 87505592a31fSmrg# -------------------------- 87515592a31fSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 87525592a31fSmrg# is defined, then add $1 to $REQUIRED_MODULES. 87535592a31fSmrg 87545592a31fSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 87555592a31fSmrg SAVE_CFLAGS="$CFLAGS" 87565592a31fSmrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 87575592a31fSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 87585592a31fSmrg#include "xorg-server.h" 87595592a31fSmrg#if !defined $1 87605592a31fSmrg#error $1 not defined 87615592a31fSmrg#endif 87625592a31fSmrg ]])], 87635592a31fSmrg [_EXT_CHECK=yes], 87645592a31fSmrg [_EXT_CHECK=no]) 87655592a31fSmrg CFLAGS="$SAVE_CFLAGS" 87665592a31fSmrg AC_MSG_CHECKING([if $1 is defined]) 87675592a31fSmrg AC_MSG_RESULT([$_EXT_CHECK]) 87685592a31fSmrg if test "$_EXT_CHECK" != no; then 87695592a31fSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 87705592a31fSmrg fi 87715592a31fSmrg]) 87725592a31fSmrg 877350f2e948Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 877445bc899bSmrg# 877545bc899bSmrg# This file is free software; the Free Software Foundation 877645bc899bSmrg# gives unlimited permission to copy and/or distribute it, 877745bc899bSmrg# with or without modifications, as long as this notice is preserved. 877845bc899bSmrg 877945bc899bSmrg# AM_AUTOMAKE_VERSION(VERSION) 878045bc899bSmrg# ---------------------------- 878145bc899bSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 878245bc899bSmrg# generated from the m4 files accompanying Automake X.Y. 878350f2e948Smrg# (This private macro should not be called outside this file.) 878450f2e948SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 87853a925b30Smrg[am__api_version='1.11' 878650f2e948Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 878750f2e948Smrgdnl require some minimum version. Point them to the right macro. 87883a925b30Smrgm4_if([$1], [1.11], [], 878950f2e948Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 879050f2e948Smrg]) 879150f2e948Smrg 879250f2e948Smrg# _AM_AUTOCONF_VERSION(VERSION) 879350f2e948Smrg# ----------------------------- 879450f2e948Smrg# aclocal traces this macro to find the Autoconf version. 879550f2e948Smrg# This is a private macro too. Using m4_define simplifies 879650f2e948Smrg# the logic in aclocal, which can simply ignore this definition. 879750f2e948Smrgm4_define([_AM_AUTOCONF_VERSION], []) 879845bc899bSmrg 879945bc899bSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 880045bc899bSmrg# ------------------------------- 880150f2e948Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 880250f2e948Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 880345bc899bSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 88043a925b30Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 880550f2e948Smrgm4_ifndef([AC_AUTOCONF_VERSION], 880650f2e948Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 880750f2e948Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 880845bc899bSmrg 880945bc899bSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 881045bc899bSmrg 881145bc899bSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 881245bc899bSmrg# 881345bc899bSmrg# This file is free software; the Free Software Foundation 881445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 881545bc899bSmrg# with or without modifications, as long as this notice is preserved. 881645bc899bSmrg 881745bc899bSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 881845bc899bSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 881945bc899bSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 882045bc899bSmrg# 882145bc899bSmrg# Of course, Automake must honor this variable whenever it calls a 882245bc899bSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 882345bc899bSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 882445bc899bSmrg# depending on how configure is run. This is pretty annoying, since 882545bc899bSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 882645bc899bSmrg# source directory, any form will work fine, but in subdirectories a 882745bc899bSmrg# relative path needs to be adjusted first. 882845bc899bSmrg# 882945bc899bSmrg# $ac_aux_dir/missing 883045bc899bSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 883145bc899bSmrg# $top_srcdir/$ac_aux_dir/missing 883245bc899bSmrg# fails if $ac_aux_dir is absolute, 883345bc899bSmrg# fails when called from a subdirectory in a VPATH build with 883445bc899bSmrg# a relative $ac_aux_dir 883545bc899bSmrg# 883645bc899bSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 883745bc899bSmrg# are both prefixed by $srcdir. In an in-source build this is usually 883845bc899bSmrg# harmless because $srcdir is `.', but things will broke when you 883945bc899bSmrg# start a VPATH build or use an absolute $srcdir. 884045bc899bSmrg# 884145bc899bSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 884245bc899bSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 884345bc899bSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 884445bc899bSmrg# and then we would define $MISSING as 884545bc899bSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 884645bc899bSmrg# This will work as long as MISSING is not called from configure, because 884745bc899bSmrg# unfortunately $(top_srcdir) has no meaning in configure. 884845bc899bSmrg# However there are other variables, like CC, which are often used in 884945bc899bSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 885045bc899bSmrg# 885145bc899bSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 885245bc899bSmrg# absolute PATH. The drawback is that using absolute paths prevent a 885345bc899bSmrg# configured tree to be moved without reconfiguration. 885445bc899bSmrg 885545bc899bSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 885645bc899bSmrg[dnl Rely on autoconf to set up CDPATH properly. 885745bc899bSmrgAC_PREREQ([2.50])dnl 885845bc899bSmrg# expand $ac_aux_dir to an absolute path 885945bc899bSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 886045bc899bSmrg]) 886145bc899bSmrg 886245bc899bSmrg# AM_CONDITIONAL -*- Autoconf -*- 886345bc899bSmrg 88643a925b30Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 886545bc899bSmrg# Free Software Foundation, Inc. 886645bc899bSmrg# 886745bc899bSmrg# This file is free software; the Free Software Foundation 886845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 886945bc899bSmrg# with or without modifications, as long as this notice is preserved. 887045bc899bSmrg 88713a925b30Smrg# serial 9 887245bc899bSmrg 887345bc899bSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 887445bc899bSmrg# ------------------------------------- 887545bc899bSmrg# Define a conditional. 887645bc899bSmrgAC_DEFUN([AM_CONDITIONAL], 887745bc899bSmrg[AC_PREREQ(2.52)dnl 887845bc899bSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 887945bc899bSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 888050f2e948SmrgAC_SUBST([$1_TRUE])dnl 888150f2e948SmrgAC_SUBST([$1_FALSE])dnl 888250f2e948Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 888350f2e948Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 88843a925b30Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 888545bc899bSmrgif $2; then 888645bc899bSmrg $1_TRUE= 888745bc899bSmrg $1_FALSE='#' 888845bc899bSmrgelse 888945bc899bSmrg $1_TRUE='#' 889045bc899bSmrg $1_FALSE= 889145bc899bSmrgfi 889245bc899bSmrgAC_CONFIG_COMMANDS_PRE( 889345bc899bSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 889445bc899bSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 889545bc899bSmrgUsually this means the macro was only invoked conditionally.]]) 889645bc899bSmrgfi])]) 889745bc899bSmrg 88983a925b30Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 889945bc899bSmrg# Free Software Foundation, Inc. 890045bc899bSmrg# 890145bc899bSmrg# This file is free software; the Free Software Foundation 890245bc899bSmrg# gives unlimited permission to copy and/or distribute it, 890345bc899bSmrg# with or without modifications, as long as this notice is preserved. 890445bc899bSmrg 89053a925b30Smrg# serial 10 890645bc899bSmrg 890745bc899bSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 890845bc899bSmrg# written in clear, in which case automake, when reading aclocal.m4, 890945bc899bSmrg# will think it sees a *use*, and therefore will trigger all it's 891045bc899bSmrg# C support machinery. Also note that it means that autoscan, seeing 891145bc899bSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 891245bc899bSmrg 891345bc899bSmrg 891445bc899bSmrg# _AM_DEPENDENCIES(NAME) 891545bc899bSmrg# ---------------------- 891645bc899bSmrg# See how the compiler implements dependency checking. 891745bc899bSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 891845bc899bSmrg# We try a few techniques and use that to set a single cache variable. 891945bc899bSmrg# 892045bc899bSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 892145bc899bSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 892245bc899bSmrg# dependency, and given that the user is not expected to run this macro, 892345bc899bSmrg# just rely on AC_PROG_CC. 892445bc899bSmrgAC_DEFUN([_AM_DEPENDENCIES], 892545bc899bSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 892645bc899bSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 892745bc899bSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 892845bc899bSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 892945bc899bSmrg 893045bc899bSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 893145bc899bSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 893245bc899bSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 893350f2e948Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 893445bc899bSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 893545bc899bSmrg [depcc="$$1" am_compiler_list=]) 893645bc899bSmrg 893745bc899bSmrgAC_CACHE_CHECK([dependency style of $depcc], 893845bc899bSmrg [am_cv_$1_dependencies_compiler_type], 893945bc899bSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 894045bc899bSmrg # We make a subdir and do the tests there. Otherwise we can end up 894145bc899bSmrg # making bogus files that we don't know about and never remove. For 894245bc899bSmrg # instance it was reported that on HP-UX the gcc test will end up 894345bc899bSmrg # making a dummy file named `D' -- because `-MD' means `put the output 894445bc899bSmrg # in D'. 894545bc899bSmrg mkdir conftest.dir 894645bc899bSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 894745bc899bSmrg # using a relative directory. 894845bc899bSmrg cp "$am_depcomp" conftest.dir 894945bc899bSmrg cd conftest.dir 895045bc899bSmrg # We will build objects and dependencies in a subdirectory because 895145bc899bSmrg # it helps to detect inapplicable dependency modes. For instance 895245bc899bSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 895345bc899bSmrg # side effect of compilation, but ICC will put the dependencies in 895445bc899bSmrg # the current directory while Tru64 will put them in the object 895545bc899bSmrg # directory. 895645bc899bSmrg mkdir sub 895745bc899bSmrg 895845bc899bSmrg am_cv_$1_dependencies_compiler_type=none 895945bc899bSmrg if test "$am_compiler_list" = ""; then 896045bc899bSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 896145bc899bSmrg fi 89623a925b30Smrg am__universal=false 89633a925b30Smrg m4_case([$1], [CC], 89643a925b30Smrg [case " $depcc " in #( 89653a925b30Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 89663a925b30Smrg esac], 89673a925b30Smrg [CXX], 89683a925b30Smrg [case " $depcc " in #( 89693a925b30Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 89703a925b30Smrg esac]) 89713a925b30Smrg 897245bc899bSmrg for depmode in $am_compiler_list; do 897345bc899bSmrg # Setup a source with many dependencies, because some compilers 897445bc899bSmrg # like to wrap large dependency lists on column 80 (with \), and 897545bc899bSmrg # we should not choose a depcomp mode which is confused by this. 897645bc899bSmrg # 897745bc899bSmrg # We need to recreate these files for each test, as the compiler may 897845bc899bSmrg # overwrite some of them when testing with obscure command lines. 897945bc899bSmrg # This happens at least with the AIX C compiler. 898045bc899bSmrg : > sub/conftest.c 898145bc899bSmrg for i in 1 2 3 4 5 6; do 898245bc899bSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 898345bc899bSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 898445bc899bSmrg # Solaris 8's {/usr,}/bin/sh. 898545bc899bSmrg touch sub/conftst$i.h 898645bc899bSmrg done 898745bc899bSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 898845bc899bSmrg 89893a925b30Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 89903a925b30Smrg # mode. It turns out that the SunPro C++ compiler does not properly 89913a925b30Smrg # handle `-M -o', and we need to detect this. Also, some Intel 89923a925b30Smrg # versions had trouble with output in subdirs 89933a925b30Smrg am__obj=sub/conftest.${OBJEXT-o} 89943a925b30Smrg am__minus_obj="-o $am__obj" 899545bc899bSmrg case $depmode in 89963a925b30Smrg gcc) 89973a925b30Smrg # This depmode causes a compiler race in universal mode. 89983a925b30Smrg test "$am__universal" = false || continue 89993a925b30Smrg ;; 900045bc899bSmrg nosideeffect) 900145bc899bSmrg # after this tag, mechanisms are not by side-effect, so they'll 900245bc899bSmrg # only be used when explicitly requested 900345bc899bSmrg if test "x$enable_dependency_tracking" = xyes; then 900445bc899bSmrg continue 900545bc899bSmrg else 900645bc899bSmrg break 900745bc899bSmrg fi 900845bc899bSmrg ;; 90093a925b30Smrg msvisualcpp | msvcmsys) 90103a925b30Smrg # This compiler won't grok `-c -o', but also, the minuso test has 90113a925b30Smrg # not run yet. These depmodes are late enough in the game, and 90123a925b30Smrg # so weak that their functioning should not be impacted. 90133a925b30Smrg am__obj=conftest.${OBJEXT-o} 90143a925b30Smrg am__minus_obj= 90153a925b30Smrg ;; 901645bc899bSmrg none) break ;; 901745bc899bSmrg esac 901845bc899bSmrg if depmode=$depmode \ 90193a925b30Smrg source=sub/conftest.c object=$am__obj \ 902045bc899bSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 90213a925b30Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 902245bc899bSmrg >/dev/null 2>conftest.err && 902350f2e948Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 902445bc899bSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 90253a925b30Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 902645bc899bSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 902745bc899bSmrg # icc doesn't choke on unknown options, it will just issue warnings 902845bc899bSmrg # or remarks (even with -Werror). So we grep stderr for any message 902945bc899bSmrg # that says an option was ignored or not supported. 903045bc899bSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 903145bc899bSmrg # icc: Command line warning: ignoring option '-M'; no argument required 903245bc899bSmrg # The diagnosis changed in icc 8.0: 903345bc899bSmrg # icc: Command line remark: option '-MP' not supported 903445bc899bSmrg if (grep 'ignoring option' conftest.err || 903545bc899bSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 903645bc899bSmrg am_cv_$1_dependencies_compiler_type=$depmode 903745bc899bSmrg break 903845bc899bSmrg fi 903945bc899bSmrg fi 904045bc899bSmrg done 904145bc899bSmrg 904245bc899bSmrg cd .. 904345bc899bSmrg rm -rf conftest.dir 904445bc899bSmrgelse 904545bc899bSmrg am_cv_$1_dependencies_compiler_type=none 904645bc899bSmrgfi 904745bc899bSmrg]) 904845bc899bSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 904945bc899bSmrgAM_CONDITIONAL([am__fastdep$1], [ 905045bc899bSmrg test "x$enable_dependency_tracking" != xno \ 905145bc899bSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 905245bc899bSmrg]) 905345bc899bSmrg 905445bc899bSmrg 905545bc899bSmrg# AM_SET_DEPDIR 905645bc899bSmrg# ------------- 905745bc899bSmrg# Choose a directory name for dependency files. 905845bc899bSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 905945bc899bSmrgAC_DEFUN([AM_SET_DEPDIR], 906045bc899bSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 906145bc899bSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 906245bc899bSmrg]) 906345bc899bSmrg 906445bc899bSmrg 906545bc899bSmrg# AM_DEP_TRACK 906645bc899bSmrg# ------------ 906745bc899bSmrgAC_DEFUN([AM_DEP_TRACK], 906845bc899bSmrg[AC_ARG_ENABLE(dependency-tracking, 906945bc899bSmrg[ --disable-dependency-tracking speeds up one-time build 907045bc899bSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 907145bc899bSmrgif test "x$enable_dependency_tracking" != xno; then 907245bc899bSmrg am_depcomp="$ac_aux_dir/depcomp" 907345bc899bSmrg AMDEPBACKSLASH='\' 907445bc899bSmrgfi 907545bc899bSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 907650f2e948SmrgAC_SUBST([AMDEPBACKSLASH])dnl 907750f2e948Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 907845bc899bSmrg]) 907945bc899bSmrg 908045bc899bSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 908145bc899bSmrg 908250f2e948Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 908345bc899bSmrg# Free Software Foundation, Inc. 908445bc899bSmrg# 908545bc899bSmrg# This file is free software; the Free Software Foundation 908645bc899bSmrg# gives unlimited permission to copy and/or distribute it, 908745bc899bSmrg# with or without modifications, as long as this notice is preserved. 908845bc899bSmrg 90893a925b30Smrg#serial 5 909045bc899bSmrg 909145bc899bSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 909245bc899bSmrg# ------------------------------ 909345bc899bSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 90943a925b30Smrg[{ 90953a925b30Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 90963a925b30Smrg # are listed without --file. Let's play safe and only enable the eval 90973a925b30Smrg # if we detect the quoting. 90983a925b30Smrg case $CONFIG_FILES in 90993a925b30Smrg *\'*) eval set x "$CONFIG_FILES" ;; 91003a925b30Smrg *) set x $CONFIG_FILES ;; 91013a925b30Smrg esac 91023a925b30Smrg shift 91033a925b30Smrg for mf 91043a925b30Smrg do 91053a925b30Smrg # Strip MF so we end up with the name of the file. 91063a925b30Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 91073a925b30Smrg # Check whether this is an Automake generated Makefile or not. 91083a925b30Smrg # We used to match only the files named `Makefile.in', but 91093a925b30Smrg # some people rename them; so instead we look at the file content. 91103a925b30Smrg # Grep'ing the first line is not enough: some people post-process 91113a925b30Smrg # each Makefile.in and add a new line on top of each file to say so. 91123a925b30Smrg # Grep'ing the whole file is not good either: AIX grep has a line 91133a925b30Smrg # limit of 2048, but all sed's we know have understand at least 4000. 91143a925b30Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 91153a925b30Smrg dirpart=`AS_DIRNAME("$mf")` 91163a925b30Smrg else 91173a925b30Smrg continue 91183a925b30Smrg fi 91193a925b30Smrg # Extract the definition of DEPDIR, am__include, and am__quote 91203a925b30Smrg # from the Makefile without running `make'. 91213a925b30Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 91223a925b30Smrg test -z "$DEPDIR" && continue 91233a925b30Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 91243a925b30Smrg test -z "am__include" && continue 91253a925b30Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 91263a925b30Smrg # When using ansi2knr, U may be empty or an underscore; expand it 91273a925b30Smrg U=`sed -n 's/^U = //p' < "$mf"` 91283a925b30Smrg # Find all dependency output files, they are included files with 91293a925b30Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 91303a925b30Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 91313a925b30Smrg # expansion. 91323a925b30Smrg for file in `sed -n " 91333a925b30Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 91343a925b30Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 91353a925b30Smrg # Make sure the directory exists. 91363a925b30Smrg test -f "$dirpart/$file" && continue 91373a925b30Smrg fdir=`AS_DIRNAME(["$file"])` 91383a925b30Smrg AS_MKDIR_P([$dirpart/$fdir]) 91393a925b30Smrg # echo "creating $dirpart/$file" 91403a925b30Smrg echo '# dummy' > "$dirpart/$file" 91413a925b30Smrg done 914245bc899bSmrg done 91433a925b30Smrg} 914445bc899bSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 914545bc899bSmrg 914645bc899bSmrg 914745bc899bSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 914845bc899bSmrg# ----------------------------- 914945bc899bSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 915045bc899bSmrg# 915145bc899bSmrg# This code is only required when automatic dependency tracking 915245bc899bSmrg# is enabled. FIXME. This creates each `.P' file that we will 915345bc899bSmrg# need in order to bootstrap the dependency handling code. 915445bc899bSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 915545bc899bSmrg[AC_CONFIG_COMMANDS([depfiles], 915645bc899bSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 915745bc899bSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 915845bc899bSmrg]) 915945bc899bSmrg 916045bc899bSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 916145bc899bSmrg# Free Software Foundation, Inc. 916245bc899bSmrg# 916345bc899bSmrg# This file is free software; the Free Software Foundation 916445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 916545bc899bSmrg# with or without modifications, as long as this notice is preserved. 916645bc899bSmrg 916745bc899bSmrg# serial 8 916845bc899bSmrg 916945bc899bSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 917045bc899bSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 917145bc899bSmrg 917245bc899bSmrg# Do all the work for Automake. -*- Autoconf -*- 917345bc899bSmrg 917450f2e948Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 91753a925b30Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 917645bc899bSmrg# 917745bc899bSmrg# This file is free software; the Free Software Foundation 917845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 917945bc899bSmrg# with or without modifications, as long as this notice is preserved. 918045bc899bSmrg 91813a925b30Smrg# serial 16 918245bc899bSmrg 918345bc899bSmrg# This macro actually does too much. Some checks are only needed if 918445bc899bSmrg# your package does certain things. But this isn't really a big deal. 918545bc899bSmrg 918645bc899bSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 918745bc899bSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 918845bc899bSmrg# ----------------------------------------------- 918945bc899bSmrg# The call with PACKAGE and VERSION arguments is the old style 919045bc899bSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 919145bc899bSmrg# and VERSION should now be passed to AC_INIT and removed from 919245bc899bSmrg# the call to AM_INIT_AUTOMAKE. 919345bc899bSmrg# We support both call styles for the transition. After 919445bc899bSmrg# the next Automake release, Autoconf can make the AC_INIT 919545bc899bSmrg# arguments mandatory, and then we can depend on a new Autoconf 919645bc899bSmrg# release and drop the old call support. 919745bc899bSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 91983a925b30Smrg[AC_PREREQ([2.62])dnl 919945bc899bSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 920045bc899bSmrgdnl the ones we care about. 920145bc899bSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 920245bc899bSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 920345bc899bSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 920450f2e948Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 920550f2e948Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 920650f2e948Smrg # is not polluted with repeated "-I." 920750f2e948Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 920850f2e948Smrg # test to see if srcdir already configured 920950f2e948Smrg if test -f $srcdir/config.status; then 921050f2e948Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 921150f2e948Smrg fi 921245bc899bSmrgfi 921345bc899bSmrg 921445bc899bSmrg# test whether we have cygpath 921545bc899bSmrgif test -z "$CYGPATH_W"; then 921645bc899bSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 921745bc899bSmrg CYGPATH_W='cygpath -w' 921845bc899bSmrg else 921945bc899bSmrg CYGPATH_W=echo 922045bc899bSmrg fi 922145bc899bSmrgfi 922245bc899bSmrgAC_SUBST([CYGPATH_W]) 922345bc899bSmrg 922445bc899bSmrg# Define the identity of the package. 922545bc899bSmrgdnl Distinguish between old-style and new-style calls. 922645bc899bSmrgm4_ifval([$2], 922745bc899bSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 922845bc899bSmrg AC_SUBST([PACKAGE], [$1])dnl 922945bc899bSmrg AC_SUBST([VERSION], [$2])], 923045bc899bSmrg[_AM_SET_OPTIONS([$1])dnl 923150f2e948Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 923250f2e948Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 923350f2e948Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 923445bc899bSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 923545bc899bSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 923645bc899bSmrg 923745bc899bSmrg_AM_IF_OPTION([no-define],, 923845bc899bSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 923945bc899bSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 924045bc899bSmrg 924145bc899bSmrg# Some tools Automake needs. 924245bc899bSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 924345bc899bSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 924445bc899bSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 924545bc899bSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 924645bc899bSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 924745bc899bSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 924845bc899bSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 92493a925b30SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 92503a925b30SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 925145bc899bSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 925245bc899bSmrg# We need awk for the "check" target. The system "awk" is bad on 925345bc899bSmrg# some platforms. 925445bc899bSmrgAC_REQUIRE([AC_PROG_AWK])dnl 925545bc899bSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 925645bc899bSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 925745bc899bSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 92583a925b30Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 92593a925b30Smrg [_AM_PROG_TAR([v7])])]) 926045bc899bSmrg_AM_IF_OPTION([no-dependencies],, 926145bc899bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 92623a925b30Smrg [_AM_DEPENDENCIES(CC)], 92633a925b30Smrg [define([AC_PROG_CC], 92643a925b30Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 926545bc899bSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 92663a925b30Smrg [_AM_DEPENDENCIES(CXX)], 92673a925b30Smrg [define([AC_PROG_CXX], 92683a925b30Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 926950f2e948SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 92703a925b30Smrg [_AM_DEPENDENCIES(OBJC)], 92713a925b30Smrg [define([AC_PROG_OBJC], 92723a925b30Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 927345bc899bSmrg]) 92743a925b30Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 92753a925b30Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 92763a925b30Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 92773a925b30Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 92783a925b30SmrgAC_CONFIG_COMMANDS_PRE(dnl 92793a925b30Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 92803a925b30Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 928145bc899bSmrg]) 928245bc899bSmrg 92833a925b30Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 92843a925b30Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 92853a925b30Smrgdnl mangled by Autoconf and run in a shell conditional statement. 92863a925b30Smrgm4_define([_AC_COMPILER_EXEEXT], 92873a925b30Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 92883a925b30Smrg 928945bc899bSmrg 929045bc899bSmrg# When config.status generates a header, we must update the stamp-h file. 929145bc899bSmrg# This file resides in the same directory as the config header 929245bc899bSmrg# that is generated. The stamp files are numbered to have different names. 929345bc899bSmrg 929445bc899bSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 929545bc899bSmrg# loop where config.status creates the headers, so we can generate 929645bc899bSmrg# our stamp files there. 929745bc899bSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 929845bc899bSmrg[# Compute $1's index in $config_headers. 929950f2e948Smrg_am_arg=$1 930045bc899bSmrg_am_stamp_count=1 930145bc899bSmrgfor _am_header in $config_headers :; do 930245bc899bSmrg case $_am_header in 930350f2e948Smrg $_am_arg | $_am_arg:* ) 930445bc899bSmrg break ;; 930545bc899bSmrg * ) 930645bc899bSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 930745bc899bSmrg esac 930845bc899bSmrgdone 930950f2e948Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 931045bc899bSmrg 93113a925b30Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 931245bc899bSmrg# 931345bc899bSmrg# This file is free software; the Free Software Foundation 931445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 931545bc899bSmrg# with or without modifications, as long as this notice is preserved. 931645bc899bSmrg 931745bc899bSmrg# AM_PROG_INSTALL_SH 931845bc899bSmrg# ------------------ 931945bc899bSmrg# Define $install_sh. 932045bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 932145bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 93223a925b30Smrgif test x"${install_sh}" != xset; then 93233a925b30Smrg case $am_aux_dir in 93243a925b30Smrg *\ * | *\ *) 93253a925b30Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 93263a925b30Smrg *) 93273a925b30Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 93283a925b30Smrg esac 93293a925b30Smrgfi 933045bc899bSmrgAC_SUBST(install_sh)]) 933145bc899bSmrg 933245bc899bSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 933345bc899bSmrg# 933445bc899bSmrg# This file is free software; the Free Software Foundation 933545bc899bSmrg# gives unlimited permission to copy and/or distribute it, 933645bc899bSmrg# with or without modifications, as long as this notice is preserved. 933745bc899bSmrg 933845bc899bSmrg# serial 2 933945bc899bSmrg 934045bc899bSmrg# Check whether the underlying file-system supports filenames 934145bc899bSmrg# with a leading dot. For instance MS-DOS doesn't. 934245bc899bSmrgAC_DEFUN([AM_SET_LEADING_DOT], 934345bc899bSmrg[rm -rf .tst 2>/dev/null 934445bc899bSmrgmkdir .tst 2>/dev/null 934545bc899bSmrgif test -d .tst; then 934645bc899bSmrg am__leading_dot=. 934745bc899bSmrgelse 934845bc899bSmrg am__leading_dot=_ 934945bc899bSmrgfi 935045bc899bSmrgrmdir .tst 2>/dev/null 935145bc899bSmrgAC_SUBST([am__leading_dot])]) 935245bc899bSmrg 935345bc899bSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 935445bc899bSmrg# From Jim Meyering 935545bc899bSmrg 93563a925b30Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 935745bc899bSmrg# Free Software Foundation, Inc. 935845bc899bSmrg# 935945bc899bSmrg# This file is free software; the Free Software Foundation 936045bc899bSmrg# gives unlimited permission to copy and/or distribute it, 936145bc899bSmrg# with or without modifications, as long as this notice is preserved. 936245bc899bSmrg 93633a925b30Smrg# serial 5 936445bc899bSmrg 93653a925b30Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 93663a925b30Smrg# ---------------------------------- 93673a925b30Smrg# Control maintainer-specific portions of Makefiles. 93683a925b30Smrg# Default is to disable them, unless `enable' is passed literally. 93693a925b30Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 93703a925b30Smrg# can override the default with the --enable/--disable switch. 937145bc899bSmrgAC_DEFUN([AM_MAINTAINER_MODE], 93723a925b30Smrg[m4_case(m4_default([$1], [disable]), 93733a925b30Smrg [enable], [m4_define([am_maintainer_other], [disable])], 93743a925b30Smrg [disable], [m4_define([am_maintainer_other], [enable])], 93753a925b30Smrg [m4_define([am_maintainer_other], [enable]) 93763a925b30Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 93773a925b30SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 93783a925b30Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 93793a925b30Smrg AC_ARG_ENABLE([maintainer-mode], 93803a925b30Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 938145bc899bSmrg (and sometimes confusing) to the casual installer], 93823a925b30Smrg [USE_MAINTAINER_MODE=$enableval], 93833a925b30Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 938445bc899bSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 93853a925b30Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 938645bc899bSmrg MAINT=$MAINTAINER_MODE_TRUE 93873a925b30Smrg AC_SUBST([MAINT])dnl 938845bc899bSmrg] 938945bc899bSmrg) 939045bc899bSmrg 939145bc899bSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 939245bc899bSmrg 939345bc899bSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 939445bc899bSmrg 93953a925b30Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 939645bc899bSmrg# 939745bc899bSmrg# This file is free software; the Free Software Foundation 939845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 939945bc899bSmrg# with or without modifications, as long as this notice is preserved. 940045bc899bSmrg 94013a925b30Smrg# serial 4 940245bc899bSmrg 940345bc899bSmrg# AM_MAKE_INCLUDE() 940445bc899bSmrg# ----------------- 940545bc899bSmrg# Check to see how make treats includes. 940645bc899bSmrgAC_DEFUN([AM_MAKE_INCLUDE], 940745bc899bSmrg[am_make=${MAKE-make} 940845bc899bSmrgcat > confinc << 'END' 940945bc899bSmrgam__doit: 94103a925b30Smrg @echo this is the am__doit target 941145bc899bSmrg.PHONY: am__doit 941245bc899bSmrgEND 941345bc899bSmrg# If we don't find an include directive, just comment out the code. 941445bc899bSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 941545bc899bSmrgam__include="#" 941645bc899bSmrgam__quote= 941745bc899bSmrg_am_result=none 941845bc899bSmrg# First try GNU make style include. 941945bc899bSmrgecho "include confinc" > confmf 94203a925b30Smrg# Ignore all kinds of additional output from `make'. 94213a925b30Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 94223a925b30Smrg*the\ am__doit\ target*) 94233a925b30Smrg am__include=include 94243a925b30Smrg am__quote= 94253a925b30Smrg _am_result=GNU 94263a925b30Smrg ;; 94273a925b30Smrgesac 942845bc899bSmrg# Now try BSD make style include. 942945bc899bSmrgif test "$am__include" = "#"; then 943045bc899bSmrg echo '.include "confinc"' > confmf 94313a925b30Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 94323a925b30Smrg *the\ am__doit\ target*) 94333a925b30Smrg am__include=.include 94343a925b30Smrg am__quote="\"" 94353a925b30Smrg _am_result=BSD 94363a925b30Smrg ;; 94373a925b30Smrg esac 943845bc899bSmrgfi 943945bc899bSmrgAC_SUBST([am__include]) 944045bc899bSmrgAC_SUBST([am__quote]) 944145bc899bSmrgAC_MSG_RESULT([$_am_result]) 944245bc899bSmrgrm -f confinc confmf 944345bc899bSmrg]) 944445bc899bSmrg 944545bc899bSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 944645bc899bSmrg 94473a925b30Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 944845bc899bSmrg# Free Software Foundation, Inc. 944945bc899bSmrg# 945045bc899bSmrg# This file is free software; the Free Software Foundation 945145bc899bSmrg# gives unlimited permission to copy and/or distribute it, 945245bc899bSmrg# with or without modifications, as long as this notice is preserved. 945345bc899bSmrg 94543a925b30Smrg# serial 6 945545bc899bSmrg 945645bc899bSmrg# AM_MISSING_PROG(NAME, PROGRAM) 945745bc899bSmrg# ------------------------------ 945845bc899bSmrgAC_DEFUN([AM_MISSING_PROG], 945945bc899bSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 946045bc899bSmrg$1=${$1-"${am_missing_run}$2"} 946145bc899bSmrgAC_SUBST($1)]) 946245bc899bSmrg 946345bc899bSmrg 946445bc899bSmrg# AM_MISSING_HAS_RUN 946545bc899bSmrg# ------------------ 946645bc899bSmrg# Define MISSING if not defined so far and test if it supports --run. 946745bc899bSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 946845bc899bSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 946945bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 947050f2e948SmrgAC_REQUIRE_AUX_FILE([missing])dnl 94713a925b30Smrgif test x"${MISSING+set}" != xset; then 94723a925b30Smrg case $am_aux_dir in 94733a925b30Smrg *\ * | *\ *) 94743a925b30Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 94753a925b30Smrg *) 94763a925b30Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 94773a925b30Smrg esac 94783a925b30Smrgfi 947945bc899bSmrg# Use eval to expand $SHELL 948045bc899bSmrgif eval "$MISSING --run true"; then 948145bc899bSmrg am_missing_run="$MISSING --run " 948245bc899bSmrgelse 948345bc899bSmrg am_missing_run= 948445bc899bSmrg AC_MSG_WARN([`missing' script is too old or missing]) 948545bc899bSmrgfi 948645bc899bSmrg]) 948745bc899bSmrg 948850f2e948Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 948945bc899bSmrg# 949045bc899bSmrg# This file is free software; the Free Software Foundation 949145bc899bSmrg# gives unlimited permission to copy and/or distribute it, 949245bc899bSmrg# with or without modifications, as long as this notice is preserved. 949345bc899bSmrg 949445bc899bSmrg# AM_PROG_MKDIR_P 949545bc899bSmrg# --------------- 949650f2e948Smrg# Check for `mkdir -p'. 949745bc899bSmrgAC_DEFUN([AM_PROG_MKDIR_P], 949850f2e948Smrg[AC_PREREQ([2.60])dnl 949950f2e948SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 950050f2e948Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 950150f2e948Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 950250f2e948Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 950350f2e948Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 950450f2e948Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 950550f2e948Smrgdnl adjustment using top_builddir (which is defined more often than 950650f2e948Smrgdnl MKDIR_P). 950750f2e948SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 950850f2e948Smrgcase $mkdir_p in 950950f2e948Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 951050f2e948Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 951150f2e948Smrgesac 951250f2e948Smrg]) 951345bc899bSmrg 951445bc899bSmrg# Helper functions for option handling. -*- Autoconf -*- 951545bc899bSmrg 951650f2e948Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 951745bc899bSmrg# 951845bc899bSmrg# This file is free software; the Free Software Foundation 951945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 952045bc899bSmrg# with or without modifications, as long as this notice is preserved. 952145bc899bSmrg 952250f2e948Smrg# serial 4 952345bc899bSmrg 952445bc899bSmrg# _AM_MANGLE_OPTION(NAME) 952545bc899bSmrg# ----------------------- 952645bc899bSmrgAC_DEFUN([_AM_MANGLE_OPTION], 952745bc899bSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 952845bc899bSmrg 952945bc899bSmrg# _AM_SET_OPTION(NAME) 953045bc899bSmrg# ------------------------------ 953145bc899bSmrg# Set option NAME. Presently that only means defining a flag for this option. 953245bc899bSmrgAC_DEFUN([_AM_SET_OPTION], 953345bc899bSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 953445bc899bSmrg 953545bc899bSmrg# _AM_SET_OPTIONS(OPTIONS) 953645bc899bSmrg# ---------------------------------- 953745bc899bSmrg# OPTIONS is a space-separated list of Automake options. 953845bc899bSmrgAC_DEFUN([_AM_SET_OPTIONS], 953950f2e948Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 954045bc899bSmrg 954145bc899bSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 954245bc899bSmrg# ------------------------------------------- 954345bc899bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 954445bc899bSmrgAC_DEFUN([_AM_IF_OPTION], 954545bc899bSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 954645bc899bSmrg 954745bc899bSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 954845bc899bSmrg 95493a925b30Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 955045bc899bSmrg# Free Software Foundation, Inc. 955145bc899bSmrg# 955245bc899bSmrg# This file is free software; the Free Software Foundation 955345bc899bSmrg# gives unlimited permission to copy and/or distribute it, 955445bc899bSmrg# with or without modifications, as long as this notice is preserved. 955545bc899bSmrg 95563a925b30Smrg# serial 5 955745bc899bSmrg 955845bc899bSmrg# AM_SANITY_CHECK 955945bc899bSmrg# --------------- 956045bc899bSmrgAC_DEFUN([AM_SANITY_CHECK], 956145bc899bSmrg[AC_MSG_CHECKING([whether build environment is sane]) 956245bc899bSmrg# Just in case 956345bc899bSmrgsleep 1 956445bc899bSmrgecho timestamp > conftest.file 95653a925b30Smrg# Reject unsafe characters in $srcdir or the absolute working directory 95663a925b30Smrg# name. Accept space and tab only in the latter. 95673a925b30Smrgam_lf=' 95683a925b30Smrg' 95693a925b30Smrgcase `pwd` in 95703a925b30Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 95713a925b30Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 95723a925b30Smrgesac 95733a925b30Smrgcase $srcdir in 95743a925b30Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 95753a925b30Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 95763a925b30Smrgesac 95773a925b30Smrg 957845bc899bSmrg# Do `set' in a subshell so we don't clobber the current shell's 957945bc899bSmrg# arguments. Must try -L first in case configure is actually a 958045bc899bSmrg# symlink; some systems play weird games with the mod time of symlinks 958145bc899bSmrg# (eg FreeBSD returns the mod time of the symlink's containing 958245bc899bSmrg# directory). 958345bc899bSmrgif ( 95843a925b30Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 958545bc899bSmrg if test "$[*]" = "X"; then 958645bc899bSmrg # -L didn't work. 95873a925b30Smrg set X `ls -t "$srcdir/configure" conftest.file` 958845bc899bSmrg fi 958945bc899bSmrg rm -f conftest.file 959045bc899bSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 959145bc899bSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 959245bc899bSmrg 959345bc899bSmrg # If neither matched, then we have a broken ls. This can happen 959445bc899bSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 959545bc899bSmrg # broken ls alias from the environment. This has actually 959645bc899bSmrg # happened. Such a system could not be considered "sane". 959745bc899bSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 959845bc899bSmrgalias in your environment]) 959945bc899bSmrg fi 960045bc899bSmrg 960145bc899bSmrg test "$[2]" = conftest.file 960245bc899bSmrg ) 960345bc899bSmrgthen 960445bc899bSmrg # Ok. 960545bc899bSmrg : 960645bc899bSmrgelse 960745bc899bSmrg AC_MSG_ERROR([newly created file is older than distributed files! 960845bc899bSmrgCheck your system clock]) 960945bc899bSmrgfi 961045bc899bSmrgAC_MSG_RESULT(yes)]) 961145bc899bSmrg 96125592a31fSmrg# Copyright (C) 2009 Free Software Foundation, Inc. 96135592a31fSmrg# 96145592a31fSmrg# This file is free software; the Free Software Foundation 96155592a31fSmrg# gives unlimited permission to copy and/or distribute it, 96165592a31fSmrg# with or without modifications, as long as this notice is preserved. 96175592a31fSmrg 96185592a31fSmrg# serial 1 96195592a31fSmrg 96205592a31fSmrg# AM_SILENT_RULES([DEFAULT]) 96215592a31fSmrg# -------------------------- 96225592a31fSmrg# Enable less verbose build rules; with the default set to DEFAULT 96235592a31fSmrg# (`yes' being less verbose, `no' or empty being verbose). 96245592a31fSmrgAC_DEFUN([AM_SILENT_RULES], 96255592a31fSmrg[AC_ARG_ENABLE([silent-rules], 96265592a31fSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 96275592a31fSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 96285592a31fSmrgcase $enable_silent_rules in 96295592a31fSmrgyes) AM_DEFAULT_VERBOSITY=0;; 96305592a31fSmrgno) AM_DEFAULT_VERBOSITY=1;; 96315592a31fSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 96325592a31fSmrgesac 96335592a31fSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 96345592a31fSmrgAM_BACKSLASH='\' 96355592a31fSmrgAC_SUBST([AM_BACKSLASH])dnl 96365592a31fSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 96375592a31fSmrg]) 96385592a31fSmrg 963945bc899bSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 964045bc899bSmrg# 964145bc899bSmrg# This file is free software; the Free Software Foundation 964245bc899bSmrg# gives unlimited permission to copy and/or distribute it, 964345bc899bSmrg# with or without modifications, as long as this notice is preserved. 964445bc899bSmrg 964545bc899bSmrg# AM_PROG_INSTALL_STRIP 964645bc899bSmrg# --------------------- 964745bc899bSmrg# One issue with vendor `install' (even GNU) is that you can't 964845bc899bSmrg# specify the program used to strip binaries. This is especially 964945bc899bSmrg# annoying in cross-compiling environments, where the build's strip 965045bc899bSmrg# is unlikely to handle the host's binaries. 965145bc899bSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 965245bc899bSmrg# always use install-sh in `make install-strip', and initialize 965345bc899bSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 965445bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 965545bc899bSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 965645bc899bSmrg# Installed binaries are usually stripped using `strip' when the user 965745bc899bSmrg# run `make install-strip'. However `strip' might not be the right 965845bc899bSmrg# tool to use in cross-compilation environments, therefore Automake 965945bc899bSmrg# will honor the `STRIP' environment variable to overrule this program. 966045bc899bSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 966145bc899bSmrgif test "$cross_compiling" != no; then 966245bc899bSmrg AC_CHECK_TOOL([STRIP], [strip], :) 966345bc899bSmrgfi 966450f2e948SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 966545bc899bSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 966645bc899bSmrg 96673a925b30Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 966850f2e948Smrg# 966950f2e948Smrg# This file is free software; the Free Software Foundation 967050f2e948Smrg# gives unlimited permission to copy and/or distribute it, 967150f2e948Smrg# with or without modifications, as long as this notice is preserved. 967250f2e948Smrg 96733a925b30Smrg# serial 2 96743a925b30Smrg 967550f2e948Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 967650f2e948Smrg# --------------------------- 967750f2e948Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 967850f2e948Smrg# This macro is traced by Automake. 967950f2e948SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 968050f2e948Smrg 96813a925b30Smrg# AM_SUBST_NOTMAKE(VARIABLE) 96823a925b30Smrg# --------------------------- 96833a925b30Smrg# Public sister of _AM_SUBST_NOTMAKE. 96843a925b30SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 96853a925b30Smrg 968645bc899bSmrg# Check how to create a tarball. -*- Autoconf -*- 968745bc899bSmrg 968845bc899bSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 968945bc899bSmrg# 969045bc899bSmrg# This file is free software; the Free Software Foundation 969145bc899bSmrg# gives unlimited permission to copy and/or distribute it, 969245bc899bSmrg# with or without modifications, as long as this notice is preserved. 969345bc899bSmrg 969445bc899bSmrg# serial 2 969545bc899bSmrg 969645bc899bSmrg# _AM_PROG_TAR(FORMAT) 969745bc899bSmrg# -------------------- 969845bc899bSmrg# Check how to create a tarball in format FORMAT. 969945bc899bSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 970045bc899bSmrg# 970145bc899bSmrg# Substitute a variable $(am__tar) that is a command 970245bc899bSmrg# writing to stdout a FORMAT-tarball containing the directory 970345bc899bSmrg# $tardir. 970445bc899bSmrg# tardir=directory && $(am__tar) > result.tar 970545bc899bSmrg# 970645bc899bSmrg# Substitute a variable $(am__untar) that extract such 970745bc899bSmrg# a tarball read from stdin. 970845bc899bSmrg# $(am__untar) < result.tar 970945bc899bSmrgAC_DEFUN([_AM_PROG_TAR], 971045bc899bSmrg[# Always define AMTAR for backward compatibility. 971145bc899bSmrgAM_MISSING_PROG([AMTAR], [tar]) 971245bc899bSmrgm4_if([$1], [v7], 971345bc899bSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 971445bc899bSmrg [m4_case([$1], [ustar],, [pax],, 971545bc899bSmrg [m4_fatal([Unknown tar format])]) 971645bc899bSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 971745bc899bSmrg# Loop over all known methods to create a tar archive until one works. 971845bc899bSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 971945bc899bSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 972045bc899bSmrg# Do not fold the above two line into one, because Tru64 sh and 972145bc899bSmrg# Solaris sh will not grok spaces in the rhs of `-'. 972245bc899bSmrgfor _am_tool in $_am_tools 972345bc899bSmrgdo 972445bc899bSmrg case $_am_tool in 972545bc899bSmrg gnutar) 972645bc899bSmrg for _am_tar in tar gnutar gtar; 972745bc899bSmrg do 972845bc899bSmrg AM_RUN_LOG([$_am_tar --version]) && break 972945bc899bSmrg done 973045bc899bSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 973145bc899bSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 973245bc899bSmrg am__untar="$_am_tar -xf -" 973345bc899bSmrg ;; 973445bc899bSmrg plaintar) 973545bc899bSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 973645bc899bSmrg # ustar tarball either. 973745bc899bSmrg (tar --version) >/dev/null 2>&1 && continue 973845bc899bSmrg am__tar='tar chf - "$$tardir"' 973945bc899bSmrg am__tar_='tar chf - "$tardir"' 974045bc899bSmrg am__untar='tar xf -' 974145bc899bSmrg ;; 974245bc899bSmrg pax) 974345bc899bSmrg am__tar='pax -L -x $1 -w "$$tardir"' 974445bc899bSmrg am__tar_='pax -L -x $1 -w "$tardir"' 974545bc899bSmrg am__untar='pax -r' 974645bc899bSmrg ;; 974745bc899bSmrg cpio) 974845bc899bSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 974945bc899bSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 975045bc899bSmrg am__untar='cpio -i -H $1 -d' 975145bc899bSmrg ;; 975245bc899bSmrg none) 975345bc899bSmrg am__tar=false 975445bc899bSmrg am__tar_=false 975545bc899bSmrg am__untar=false 975645bc899bSmrg ;; 975745bc899bSmrg esac 975845bc899bSmrg 975945bc899bSmrg # If the value was cached, stop now. We just wanted to have am__tar 976045bc899bSmrg # and am__untar set. 976145bc899bSmrg test -n "${am_cv_prog_tar_$1}" && break 976245bc899bSmrg 976345bc899bSmrg # tar/untar a dummy directory, and stop if the command works 976445bc899bSmrg rm -rf conftest.dir 976545bc899bSmrg mkdir conftest.dir 976645bc899bSmrg echo GrepMe > conftest.dir/file 976745bc899bSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 976845bc899bSmrg rm -rf conftest.dir 976945bc899bSmrg if test -s conftest.tar; then 977045bc899bSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 977145bc899bSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 977245bc899bSmrg fi 977345bc899bSmrgdone 977445bc899bSmrgrm -rf conftest.dir 977545bc899bSmrg 977645bc899bSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 977745bc899bSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 977845bc899bSmrgAC_SUBST([am__tar]) 977945bc899bSmrgAC_SUBST([am__untar]) 978045bc899bSmrg]) # _AM_PROG_TAR 978145bc899bSmrg 9782