aclocal.m4 revision b40a6198
1b40a6198Smrg# generated automatically by aclocal 1.11.3 -*- Autoconf -*- 245bc899bSmrg 345bc899bSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4b40a6198Smrg# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 5b40a6198Smrg# Inc. 645bc899bSmrg# This file is free software; the Free Software Foundation 745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 845bc899bSmrg# with or without modifications, as long as this notice is preserved. 945bc899bSmrg 1045bc899bSmrg# This program is distributed in the hope that it will be useful, 1145bc899bSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1245bc899bSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1345bc899bSmrg# PARTICULAR PURPOSE. 1445bc899bSmrg 1550f2e948Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1650f2e948Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17b40a6198Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18b40a6198Smrg[m4_warning([this file was generated for autoconf 2.68. 1950f2e948SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2050f2e948SmrgIf you have problems, you may need to regenerate the build system entirely. 2150f2e948SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 2250f2e948Smrg 2345bc899bSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 245592a31fSmrg# 255592a31fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26b40a6198Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 27b40a6198Smrg# Foundation, Inc. 285592a31fSmrg# Written by Gordon Matzigkeit, 1996 295592a31fSmrg# 305592a31fSmrg# This file is free software; the Free Software Foundation gives 315592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 325592a31fSmrg# modifications, as long as this notice is preserved. 335592a31fSmrg 345592a31fSmrgm4_define([_LT_COPYING], [dnl 355592a31fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36b40a6198Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 37b40a6198Smrg# Foundation, Inc. 385592a31fSmrg# Written by Gordon Matzigkeit, 1996 395592a31fSmrg# 405592a31fSmrg# This file is part of GNU Libtool. 415592a31fSmrg# 425592a31fSmrg# GNU Libtool is free software; you can redistribute it and/or 435592a31fSmrg# modify it under the terms of the GNU General Public License as 445592a31fSmrg# published by the Free Software Foundation; either version 2 of 455592a31fSmrg# the License, or (at your option) any later version. 465592a31fSmrg# 475592a31fSmrg# As a special exception to the GNU General Public License, 485592a31fSmrg# if you distribute this file as part of a program or library that 495592a31fSmrg# is built using GNU Libtool, you may include this file under the 505592a31fSmrg# same distribution terms that you use for the rest of that program. 515592a31fSmrg# 525592a31fSmrg# GNU Libtool is distributed in the hope that it will be useful, 535592a31fSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 545592a31fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 555592a31fSmrg# GNU General Public License for more details. 565592a31fSmrg# 575592a31fSmrg# You should have received a copy of the GNU General Public License 585592a31fSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 595592a31fSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 605592a31fSmrg# obtained by writing to the Free Software Foundation, Inc., 615592a31fSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 625592a31fSmrg]) 6345bc899bSmrg 64b40a6198Smrg# serial 57 LT_INIT 651ac89addSmrg 661ac89addSmrg 675592a31fSmrg# LT_PREREQ(VERSION) 685592a31fSmrg# ------------------ 695592a31fSmrg# Complain and exit if this libtool version is less that VERSION. 705592a31fSmrgm4_defun([LT_PREREQ], 715592a31fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 725592a31fSmrg [m4_default([$3], 735592a31fSmrg [m4_fatal([Libtool version $1 or higher is required], 745592a31fSmrg 63)])], 755592a31fSmrg [$2])]) 7650f2e948Smrg 7750f2e948Smrg 785592a31fSmrg# _LT_CHECK_BUILDDIR 795592a31fSmrg# ------------------ 805592a31fSmrg# Complain if the absolute build directory name contains unusual characters 815592a31fSmrgm4_defun([_LT_CHECK_BUILDDIR], 825592a31fSmrg[case `pwd` in 835592a31fSmrg *\ * | *\ *) 845592a31fSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 855592a31fSmrgesac 865592a31fSmrg]) 875592a31fSmrg 885592a31fSmrg 895592a31fSmrg# LT_INIT([OPTIONS]) 905592a31fSmrg# ------------------ 915592a31fSmrgAC_DEFUN([LT_INIT], 925592a31fSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93b40a6198SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 945592a31fSmrgAC_BEFORE([$0], [LT_LANG])dnl 955592a31fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 965592a31fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 975592a31fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 985592a31fSmrg 995592a31fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 1005592a31fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1015592a31fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1025592a31fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1035592a31fSmrgdnl unless we require an AC_DEFUNed macro: 1045592a31fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1055592a31fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1065592a31fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1075592a31fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1085592a31fSmrgm4_require([_LT_PROG_LTMAIN])dnl 1095592a31fSmrg 110b40a6198Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 111b40a6198Smrg 1125592a31fSmrgdnl Parse OPTIONS 1135592a31fSmrg_LT_SET_OPTIONS([$0], [$1]) 11445bc899bSmrg 11545bc899bSmrg# This can be used to rebuild libtool when needed 1165592a31fSmrgLIBTOOL_DEPS="$ltmain" 11745bc899bSmrg 11845bc899bSmrg# Always use our own libtool. 11945bc899bSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 12045bc899bSmrgAC_SUBST(LIBTOOL)dnl 12145bc899bSmrg 1225592a31fSmrg_LT_SETUP 12350f2e948Smrg 1245592a31fSmrg# Only expand once: 1255592a31fSmrgm4_define([LT_INIT]) 1265592a31fSmrg])# LT_INIT 12750f2e948Smrg 1285592a31fSmrg# Old names: 1295592a31fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1305592a31fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1315592a31fSmrgdnl aclocal-1.4 backwards compatibility: 1325592a31fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1335592a31fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1345592a31fSmrg 1355592a31fSmrg 1365592a31fSmrg# _LT_CC_BASENAME(CC) 1375592a31fSmrg# ------------------- 1385592a31fSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1395592a31fSmrgm4_defun([_LT_CC_BASENAME], 1405592a31fSmrg[for cc_temp in $1""; do 1415592a31fSmrg case $cc_temp in 1425592a31fSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1435592a31fSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1445592a31fSmrg \-*) ;; 1455592a31fSmrg *) break;; 1465592a31fSmrg esac 1475592a31fSmrgdone 148b40a6198Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1495592a31fSmrg]) 1505592a31fSmrg 1515592a31fSmrg 1525592a31fSmrg# _LT_FILEUTILS_DEFAULTS 1535592a31fSmrg# ---------------------- 1545592a31fSmrg# It is okay to use these file commands and assume they have been set 1555592a31fSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1565592a31fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1575592a31fSmrg[: ${CP="cp -f"} 1585592a31fSmrg: ${MV="mv -f"} 1595592a31fSmrg: ${RM="rm -f"} 1605592a31fSmrg])# _LT_FILEUTILS_DEFAULTS 1615592a31fSmrg 1625592a31fSmrg 1635592a31fSmrg# _LT_SETUP 1645592a31fSmrg# --------- 1655592a31fSmrgm4_defun([_LT_SETUP], 1665592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16745bc899bSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 168b40a6198SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169b40a6198SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170b40a6198Smrg 171b40a6198Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 172b40a6198Smrgdnl 1735592a31fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1745592a31fSmrg_LT_DECL([], [host], [0])dnl 1755592a31fSmrg_LT_DECL([], [host_os], [0])dnl 1765592a31fSmrgdnl 1775592a31fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1785592a31fSmrg_LT_DECL([], [build], [0])dnl 1795592a31fSmrg_LT_DECL([], [build_os], [0])dnl 1805592a31fSmrgdnl 18145bc899bSmrgAC_REQUIRE([AC_PROG_CC])dnl 1825592a31fSmrgAC_REQUIRE([LT_PATH_LD])dnl 1835592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 1845592a31fSmrgdnl 18545bc899bSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1865592a31fSmrgtest -z "$LN_S" && LN_S="ln -s" 1875592a31fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 18845bc899bSmrgdnl 1895592a31fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1905592a31fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1915592a31fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1925592a31fSmrgdnl 1935592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1945592a31fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195b40a6198Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1965592a31fSmrgm4_require([_LT_CMD_RELOAD])dnl 1975592a31fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198b40a6198Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1995592a31fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2005592a31fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201b40a6198Smrgm4_require([_LT_WITH_SYSROOT])dnl 2025592a31fSmrg 2035592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([ 2045592a31fSmrg# See if we are running on zsh, and set the options which allow our 2055592a31fSmrg# commands through without removal of \ escapes INIT. 2065592a31fSmrgif test -n "\${ZSH_VERSION+set}" ; then 2075592a31fSmrg setopt NO_GLOB_SUBST 2085592a31fSmrgfi 2095592a31fSmrg]) 2105592a31fSmrgif test -n "${ZSH_VERSION+set}" ; then 2115592a31fSmrg setopt NO_GLOB_SUBST 2125592a31fSmrgfi 21345bc899bSmrg 2145592a31fSmrg_LT_CHECK_OBJDIR 2155592a31fSmrg 2165592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 21745bc899bSmrg 21845bc899bSmrgcase $host_os in 21945bc899bSmrgaix3*) 22045bc899bSmrg # AIX sometimes has problems with the GCC collect2 program. For some 22145bc899bSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 22245bc899bSmrg # vanish in a puff of smoke. 22345bc899bSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 22445bc899bSmrg COLLECT_NAMES= 22545bc899bSmrg export COLLECT_NAMES 22645bc899bSmrg fi 22745bc899bSmrg ;; 22845bc899bSmrgesac 22945bc899bSmrg 23045bc899bSmrg# Global variables: 2315592a31fSmrgofile=libtool 23245bc899bSmrgcan_build_shared=yes 23345bc899bSmrg 23445bc899bSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 23545bc899bSmrg# which needs '.lib'). 23645bc899bSmrglibext=a 237226fade8Smrg 2385592a31fSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2393a925b30Smrg 24045bc899bSmrgold_CC="$CC" 24145bc899bSmrgold_CFLAGS="$CFLAGS" 24245bc899bSmrg 24345bc899bSmrg# Set sane defaults for various variables 24445bc899bSmrgtest -z "$CC" && CC=cc 24545bc899bSmrgtest -z "$LTCC" && LTCC=$CC 24645bc899bSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 24745bc899bSmrgtest -z "$LD" && LD=ld 24845bc899bSmrgtest -z "$ac_objext" && ac_objext=o 24945bc899bSmrg 25045bc899bSmrg_LT_CC_BASENAME([$compiler]) 25145bc899bSmrg 25245bc899bSmrg# Only perform the check for file, if the check method requires it 2535592a31fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 25445bc899bSmrgcase $deplibs_check_method in 25545bc899bSmrgfile_magic*) 25645bc899bSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2575592a31fSmrg _LT_PATH_MAGIC 25845bc899bSmrg fi 25945bc899bSmrg ;; 26045bc899bSmrgesac 26145bc899bSmrg 2625592a31fSmrg# Use C for the default configuration in the libtool script 2635592a31fSmrgLT_SUPPORTED_TAG([CC]) 2645592a31fSmrg_LT_LANG_C_CONFIG 2655592a31fSmrg_LT_LANG_DEFAULT_CONFIG 2665592a31fSmrg_LT_CONFIG_COMMANDS 2675592a31fSmrg])# _LT_SETUP 26850f2e948Smrg 26950f2e948Smrg 270b40a6198Smrg# _LT_PREPARE_SED_QUOTE_VARS 271b40a6198Smrg# -------------------------- 272b40a6198Smrg# Define a few sed substitution that help us do robust quoting. 273b40a6198Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 274b40a6198Smrg[# Backslashify metacharacters that are still active within 275b40a6198Smrg# double-quoted strings. 276b40a6198Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277b40a6198Smrg 278b40a6198Smrg# Same as above, but do not quote variable references. 279b40a6198Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280b40a6198Smrg 281b40a6198Smrg# Sed substitution to delay expansion of an escaped shell variable in a 282b40a6198Smrg# double_quote_subst'ed string. 283b40a6198Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284b40a6198Smrg 285b40a6198Smrg# Sed substitution to delay expansion of an escaped single quote. 286b40a6198Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287b40a6198Smrg 288b40a6198Smrg# Sed substitution to avoid accidental globbing in evaled expressions 289b40a6198Smrgno_glob_subst='s/\*/\\\*/g' 290b40a6198Smrg]) 291b40a6198Smrg 2925592a31fSmrg# _LT_PROG_LTMAIN 2935592a31fSmrg# --------------- 2945592a31fSmrg# Note that this code is called both from `configure', and `config.status' 2955592a31fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2965592a31fSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2975592a31fSmrg# so we pass a copy along to make sure it has a sensible value anyway. 2985592a31fSmrgm4_defun([_LT_PROG_LTMAIN], 2995592a31fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3005592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3015592a31fSmrgltmain="$ac_aux_dir/ltmain.sh" 3025592a31fSmrg])# _LT_PROG_LTMAIN 30350f2e948Smrg 30450f2e948Smrg 3055592a31fSmrg 3065592a31fSmrg# So that we can recreate a full libtool script including additional 3075592a31fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3085592a31fSmrg# in macros and then make a single call at the end using the `libtool' 3095592a31fSmrg# label. 3105592a31fSmrg 3115592a31fSmrg 3125592a31fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3135592a31fSmrg# ---------------------------------------- 3145592a31fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3155592a31fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3165592a31fSmrg[m4_ifval([$1], 3175592a31fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3185592a31fSmrg [$1 3195592a31fSmrg])])]) 3205592a31fSmrg 3215592a31fSmrg# Initialize. 3225592a31fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3235592a31fSmrg 3245592a31fSmrg 3255592a31fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3265592a31fSmrg# ------------------------------ 3275592a31fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3285592a31fSmrgm4_define([_LT_CONFIG_LIBTOOL], 3295592a31fSmrg[m4_ifval([$1], 3305592a31fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3315592a31fSmrg [$1 3325592a31fSmrg])])]) 3335592a31fSmrg 3345592a31fSmrg# Initialize. 3355592a31fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3365592a31fSmrg 3375592a31fSmrg 3385592a31fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3395592a31fSmrg# ----------------------------------------------------- 3405592a31fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3415592a31fSmrg[_LT_CONFIG_LIBTOOL([$1]) 3425592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3435592a31fSmrg]) 3445592a31fSmrg 3455592a31fSmrg 3465592a31fSmrg# _LT_FORMAT_COMMENT([COMMENT]) 3475592a31fSmrg# ----------------------------- 3485592a31fSmrg# Add leading comment marks to the start of each line, and a trailing 3495592a31fSmrg# full-stop to the whole comment if one is not present already. 3505592a31fSmrgm4_define([_LT_FORMAT_COMMENT], 3515592a31fSmrg[m4_ifval([$1], [ 3525592a31fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3535592a31fSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3545592a31fSmrg)]) 3555592a31fSmrg 3565592a31fSmrg 3575592a31fSmrg 3585592a31fSmrg 3595592a31fSmrg 3605592a31fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3615592a31fSmrg# ------------------------------------------------------------------- 3625592a31fSmrg# CONFIGNAME is the name given to the value in the libtool script. 3635592a31fSmrg# VARNAME is the (base) name used in the configure script. 3645592a31fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3655592a31fSmrg# VARNAME. Any other value will be used directly. 3665592a31fSmrgm4_define([_LT_DECL], 3675592a31fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3685592a31fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3695592a31fSmrg [m4_ifval([$1], [$1], [$2])]) 3705592a31fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3715592a31fSmrg m4_ifval([$4], 3725592a31fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3735592a31fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 3745592a31fSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3755592a31fSmrg]) 3765592a31fSmrg 3775592a31fSmrg 3785592a31fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3795592a31fSmrg# -------------------------------------------------------- 3805592a31fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3815592a31fSmrg 3825592a31fSmrg 3835592a31fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3845592a31fSmrg# ------------------------------------------------ 3855592a31fSmrgm4_define([lt_decl_tag_varnames], 3865592a31fSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 3875592a31fSmrg 3885592a31fSmrg 3895592a31fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3905592a31fSmrg# --------------------------------------------------------- 3915592a31fSmrgm4_define([_lt_decl_filter], 3925592a31fSmrg[m4_case([$#], 3935592a31fSmrg [0], [m4_fatal([$0: too few arguments: $#])], 3945592a31fSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3955592a31fSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3965592a31fSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3975592a31fSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3985592a31fSmrg]) 3995592a31fSmrg 4005592a31fSmrg 4015592a31fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4025592a31fSmrg# -------------------------------------------------- 4035592a31fSmrgm4_define([lt_decl_quote_varnames], 4045592a31fSmrg[_lt_decl_filter([value], [1], $@)]) 4055592a31fSmrg 4065592a31fSmrg 4075592a31fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4085592a31fSmrg# --------------------------------------------------- 4095592a31fSmrgm4_define([lt_decl_dquote_varnames], 4105592a31fSmrg[_lt_decl_filter([value], [2], $@)]) 4115592a31fSmrg 4125592a31fSmrg 4135592a31fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4145592a31fSmrg# --------------------------------------------------- 4155592a31fSmrgm4_define([lt_decl_varnames_tagged], 4165592a31fSmrg[m4_assert([$# <= 2])dnl 4175592a31fSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 4185592a31fSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4195592a31fSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4205592a31fSmrgm4_define([_lt_decl_varnames_tagged], 4215592a31fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4225592a31fSmrg 4235592a31fSmrg 4245592a31fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4255592a31fSmrg# ------------------------------------------------ 4265592a31fSmrgm4_define([lt_decl_all_varnames], 4275592a31fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4285592a31fSmrg m4_if([$2], [], 4295592a31fSmrg m4_quote(lt_decl_varnames), 4305592a31fSmrg m4_quote(m4_shift($@))))[]dnl 4315592a31fSmrg]) 4325592a31fSmrgm4_define([_lt_decl_all_varnames], 4335592a31fSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 4345592a31fSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4355592a31fSmrg]) 4365592a31fSmrg 4375592a31fSmrg 4385592a31fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4395592a31fSmrg# ------------------------------------ 4405592a31fSmrg# Quote a variable value, and forward it to `config.status' so that its 4415592a31fSmrg# declaration there will have the same value as in `configure'. VARNAME 4425592a31fSmrg# must have a single quote delimited value for this to work. 4435592a31fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 444b40a6198Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4455592a31fSmrg 4465592a31fSmrg 4475592a31fSmrg# _LT_CONFIG_STATUS_DECLARATIONS 4485592a31fSmrg# ------------------------------ 4495592a31fSmrg# We delimit libtool config variables with single quotes, so when 4505592a31fSmrg# we write them to config.status, we have to be sure to quote all 4515592a31fSmrg# embedded single quotes properly. In configure, this macro expands 4525592a31fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4535592a31fSmrg# 454b40a6198Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4555592a31fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4565592a31fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4575592a31fSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4585592a31fSmrg 4595592a31fSmrg 4605592a31fSmrg# _LT_LIBTOOL_TAGS 4615592a31fSmrg# ---------------- 4625592a31fSmrg# Output comment and list of tags supported by the script 4635592a31fSmrgm4_defun([_LT_LIBTOOL_TAGS], 4645592a31fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4655592a31fSmrgavailable_tags="_LT_TAGS"dnl 4665592a31fSmrg]) 4675592a31fSmrg 4685592a31fSmrg 4695592a31fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4705592a31fSmrg# ----------------------------------- 4715592a31fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4725592a31fSmrg# expand to a commented shell variable setting: 4735592a31fSmrg# 4745592a31fSmrg# # Some comment about what VAR is for. 4755592a31fSmrg# visible_name=$lt_internal_name 4765592a31fSmrgm4_define([_LT_LIBTOOL_DECLARE], 4775592a31fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4785592a31fSmrg [description])))[]dnl 4795592a31fSmrgm4_pushdef([_libtool_name], 4805592a31fSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4815592a31fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4825592a31fSmrg [0], [_libtool_name=[$]$1], 4835592a31fSmrg [1], [_libtool_name=$lt_[]$1], 4845592a31fSmrg [2], [_libtool_name=$lt_[]$1], 4855592a31fSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4865592a31fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4875592a31fSmrg]) 4885592a31fSmrg 4895592a31fSmrg 4905592a31fSmrg# _LT_LIBTOOL_CONFIG_VARS 4915592a31fSmrg# ----------------------- 4925592a31fSmrg# Produce commented declarations of non-tagged libtool config variables 4935592a31fSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4945592a31fSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4955592a31fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4965592a31fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4975592a31fSmrg[m4_foreach([_lt_var], 4985592a31fSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4995592a31fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5005592a31fSmrg 5015592a31fSmrg 5025592a31fSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 5035592a31fSmrg# ------------------------- 5045592a31fSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 5055592a31fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5065592a31fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 50750f2e948Smrg 50850f2e948Smrg 5095592a31fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5105592a31fSmrg# ------------------------------ 5115592a31fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5125592a31fSmrg 5135592a31fSmrg 5145592a31fSmrg# _LT_CONFIG_COMMANDS 51550f2e948Smrg# ------------------- 5165592a31fSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5175592a31fSmrg# variables for single and double quote escaping we saved from calls 5185592a31fSmrg# to _LT_DECL, we can put quote escaped variables declarations 5195592a31fSmrg# into `config.status', and then the shell code to quote escape them in 5205592a31fSmrg# for loops in `config.status'. Finally, any additional code accumulated 5215592a31fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5225592a31fSmrgm4_defun([_LT_CONFIG_COMMANDS], 5235592a31fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5245592a31fSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5255592a31fSmrg dnl instead of duplicating it all over again into config.status, 5265592a31fSmrg dnl then we will have config.status run $CONFIG_LT later, so it 5275592a31fSmrg dnl needs to know what name is stored there: 5285592a31fSmrg [AC_CONFIG_COMMANDS([libtool], 5295592a31fSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5305592a31fSmrg dnl If the libtool generation code is destined for config.status, 5315592a31fSmrg dnl expand the accumulated commands and init code now: 5325592a31fSmrg [AC_CONFIG_COMMANDS([libtool], 5335592a31fSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5345592a31fSmrg])#_LT_CONFIG_COMMANDS 5355592a31fSmrg 5365592a31fSmrg 5375592a31fSmrg# Initialize. 5385592a31fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5395592a31fSmrg[ 5405592a31fSmrg 5415592a31fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5425592a31fSmrg# if CDPATH is set. 5435592a31fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5445592a31fSmrg 5455592a31fSmrgsed_quote_subst='$sed_quote_subst' 5465592a31fSmrgdouble_quote_subst='$double_quote_subst' 5475592a31fSmrgdelay_variable_subst='$delay_variable_subst' 5485592a31fSmrg_LT_CONFIG_STATUS_DECLARATIONS 5495592a31fSmrgLTCC='$LTCC' 5505592a31fSmrgLTCFLAGS='$LTCFLAGS' 5515592a31fSmrgcompiler='$compiler_DEFAULT' 5525592a31fSmrg 553b40a6198Smrg# A function that is used when there is no print builtin or printf. 554b40a6198Smrgfunc_fallback_echo () 555b40a6198Smrg{ 556b40a6198Smrg eval 'cat <<_LTECHO_EOF 557b40a6198Smrg\$[]1 558b40a6198Smrg_LTECHO_EOF' 559b40a6198Smrg} 560b40a6198Smrg 5615592a31fSmrg# Quote evaled strings. 5625592a31fSmrgfor var in lt_decl_all_varnames([[ \ 5635592a31fSmrg]], lt_decl_quote_varnames); do 564b40a6198Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5655592a31fSmrg *[[\\\\\\\`\\"\\\$]]*) 566b40a6198Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5675592a31fSmrg ;; 5685592a31fSmrg *) 5695592a31fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5705592a31fSmrg ;; 5715592a31fSmrg esac 5725592a31fSmrgdone 5735592a31fSmrg 5745592a31fSmrg# Double-quote double-evaled strings. 5755592a31fSmrgfor var in lt_decl_all_varnames([[ \ 5765592a31fSmrg]], lt_decl_dquote_varnames); do 577b40a6198Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5785592a31fSmrg *[[\\\\\\\`\\"\\\$]]*) 579b40a6198Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5805592a31fSmrg ;; 5815592a31fSmrg *) 5825592a31fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5835592a31fSmrg ;; 5845592a31fSmrg esac 5855592a31fSmrgdone 5865592a31fSmrg 5875592a31fSmrg_LT_OUTPUT_LIBTOOL_INIT 5885592a31fSmrg]) 5895592a31fSmrg 590b40a6198Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 591b40a6198Smrg# ------------------------------------ 592b40a6198Smrg# Generate a child script FILE with all initialization necessary to 593b40a6198Smrg# reuse the environment learned by the parent script, and make the 594b40a6198Smrg# file executable. If COMMENT is supplied, it is inserted after the 595b40a6198Smrg# `#!' sequence but before initialization text begins. After this 596b40a6198Smrg# macro, additional text can be appended to FILE to form the body of 597b40a6198Smrg# the child script. The macro ends with non-zero status if the 598b40a6198Smrg# file could not be fully written (such as if the disk is full). 599b40a6198Smrgm4_ifdef([AS_INIT_GENERATED], 600b40a6198Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 601b40a6198Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 602b40a6198Smrg[m4_require([AS_PREPARE])]dnl 603b40a6198Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 604b40a6198Smrg[lt_write_fail=0 605b40a6198Smrgcat >$1 <<_ASEOF || lt_write_fail=1 606b40a6198Smrg#! $SHELL 607b40a6198Smrg# Generated by $as_me. 608b40a6198Smrg$2 609b40a6198SmrgSHELL=\${CONFIG_SHELL-$SHELL} 610b40a6198Smrgexport SHELL 611b40a6198Smrg_ASEOF 612b40a6198Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 613b40a6198SmrgAS_SHELL_SANITIZE 614b40a6198Smrg_AS_PREPARE 615b40a6198Smrgexec AS_MESSAGE_FD>&1 616b40a6198Smrg_ASEOF 617b40a6198Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 618b40a6198Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6195592a31fSmrg 6205592a31fSmrg# LT_OUTPUT 6215592a31fSmrg# --------- 6225592a31fSmrg# This macro allows early generation of the libtool script (before 6235592a31fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 6245592a31fSmrg# tests. 6255592a31fSmrgAC_DEFUN([LT_OUTPUT], 6265592a31fSmrg[: ${CONFIG_LT=./config.lt} 6275592a31fSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 628b40a6198Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 629b40a6198Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6305592a31fSmrg 6315592a31fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 632b40a6198Smrglt_cl_silent=false 6335592a31fSmrgexec AS_MESSAGE_LOG_FD>>config.log 6345592a31fSmrg{ 6355592a31fSmrg echo 6365592a31fSmrg AS_BOX([Running $as_me.]) 6375592a31fSmrg} >&AS_MESSAGE_LOG_FD 6385592a31fSmrg 6395592a31fSmrglt_cl_help="\ 6405592a31fSmrg\`$as_me' creates a local libtool stub from the current configuration, 6415592a31fSmrgfor use in further configure time tests before the real libtool is 6425592a31fSmrggenerated. 6435592a31fSmrg 6445592a31fSmrgUsage: $[0] [[OPTIONS]] 6455592a31fSmrg 6465592a31fSmrg -h, --help print this help, then exit 6475592a31fSmrg -V, --version print version number, then exit 6485592a31fSmrg -q, --quiet do not print progress messages 6495592a31fSmrg -d, --debug don't remove temporary files 6505592a31fSmrg 6515592a31fSmrgReport bugs to <bug-libtool@gnu.org>." 6525592a31fSmrg 6535592a31fSmrglt_cl_version="\ 6545592a31fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6555592a31fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6565592a31fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6575592a31fSmrg 658b40a6198SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6595592a31fSmrgThis config.lt script is free software; the Free Software Foundation 6605592a31fSmrggives unlimited permision to copy, distribute and modify it." 6615592a31fSmrg 6625592a31fSmrgwhile test $[#] != 0 6635592a31fSmrgdo 6645592a31fSmrg case $[1] in 6655592a31fSmrg --version | --v* | -V ) 6665592a31fSmrg echo "$lt_cl_version"; exit 0 ;; 6675592a31fSmrg --help | --h* | -h ) 6685592a31fSmrg echo "$lt_cl_help"; exit 0 ;; 6695592a31fSmrg --debug | --d* | -d ) 6705592a31fSmrg debug=: ;; 6715592a31fSmrg --quiet | --q* | --silent | --s* | -q ) 6725592a31fSmrg lt_cl_silent=: ;; 6735592a31fSmrg 6745592a31fSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6755592a31fSmrgTry \`$[0] --help' for more information.]) ;; 6765592a31fSmrg 6775592a31fSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6785592a31fSmrgTry \`$[0] --help' for more information.]) ;; 6795592a31fSmrg esac 6805592a31fSmrg shift 6815592a31fSmrgdone 6825592a31fSmrg 6835592a31fSmrgif $lt_cl_silent; then 6845592a31fSmrg exec AS_MESSAGE_FD>/dev/null 6855592a31fSmrgfi 6865592a31fSmrg_LTEOF 6875592a31fSmrg 6885592a31fSmrgcat >>"$CONFIG_LT" <<_LTEOF 6895592a31fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6905592a31fSmrg_LTEOF 6915592a31fSmrg 6925592a31fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 6935592a31fSmrgAC_MSG_NOTICE([creating $ofile]) 6945592a31fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 6955592a31fSmrgAS_EXIT(0) 6965592a31fSmrg_LTEOF 6975592a31fSmrgchmod +x "$CONFIG_LT" 6985592a31fSmrg 6995592a31fSmrg# configure is writing to config.log, but config.lt does its own redirection, 7005592a31fSmrg# appending to config.log, which fails on DOS, as config.log is still kept 7015592a31fSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7025592a31fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 703b40a6198Smrglt_cl_success=: 704b40a6198Smrgtest "$silent" = yes && 705b40a6198Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 706b40a6198Smrgexec AS_MESSAGE_LOG_FD>/dev/null 707b40a6198Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 708b40a6198Smrgexec AS_MESSAGE_LOG_FD>>config.log 709b40a6198Smrg$lt_cl_success || AS_EXIT(1) 7105592a31fSmrg])# LT_OUTPUT 7115592a31fSmrg 7125592a31fSmrg 7135592a31fSmrg# _LT_CONFIG(TAG) 7145592a31fSmrg# --------------- 7155592a31fSmrg# If TAG is the built-in tag, create an initial libtool script with a 7165592a31fSmrg# default configuration from the untagged config vars. Otherwise add code 7175592a31fSmrg# to config.status for appending the configuration named by TAG from the 7185592a31fSmrg# matching tagged config vars. 7195592a31fSmrgm4_defun([_LT_CONFIG], 7205592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7215592a31fSmrg_LT_CONFIG_SAVE_COMMANDS([ 7225592a31fSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7235592a31fSmrg m4_if(_LT_TAG, [C], [ 7245592a31fSmrg # See if we are running on zsh, and set the options which allow our 7255592a31fSmrg # commands through without removal of \ escapes. 7265592a31fSmrg if test -n "${ZSH_VERSION+set}" ; then 7275592a31fSmrg setopt NO_GLOB_SUBST 7285592a31fSmrg fi 7295592a31fSmrg 7305592a31fSmrg cfgfile="${ofile}T" 7315592a31fSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7325592a31fSmrg $RM "$cfgfile" 7335592a31fSmrg 7345592a31fSmrg cat <<_LT_EOF >> "$cfgfile" 7355592a31fSmrg#! $SHELL 7365592a31fSmrg 7375592a31fSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7385592a31fSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7395592a31fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7405592a31fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7415592a31fSmrg# 7425592a31fSmrg_LT_COPYING 7435592a31fSmrg_LT_LIBTOOL_TAGS 7445592a31fSmrg 7455592a31fSmrg# ### BEGIN LIBTOOL CONFIG 7465592a31fSmrg_LT_LIBTOOL_CONFIG_VARS 7475592a31fSmrg_LT_LIBTOOL_TAG_VARS 7485592a31fSmrg# ### END LIBTOOL CONFIG 7495592a31fSmrg 7505592a31fSmrg_LT_EOF 7515592a31fSmrg 7525592a31fSmrg case $host_os in 7535592a31fSmrg aix3*) 7545592a31fSmrg cat <<\_LT_EOF >> "$cfgfile" 7555592a31fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 7565592a31fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7575592a31fSmrg# vanish in a puff of smoke. 7585592a31fSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 7595592a31fSmrg COLLECT_NAMES= 7605592a31fSmrg export COLLECT_NAMES 7615592a31fSmrgfi 7625592a31fSmrg_LT_EOF 7635592a31fSmrg ;; 7645592a31fSmrg esac 7655592a31fSmrg 7665592a31fSmrg _LT_PROG_LTMAIN 7675592a31fSmrg 7685592a31fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 7695592a31fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7705592a31fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 7715592a31fSmrg # is reportedly fixed, but why not run on old versions too? 772b40a6198Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 773b40a6198Smrg || (rm -f "$cfgfile"; exit 1) 7745592a31fSmrg 775b40a6198Smrg _LT_PROG_REPLACE_SHELLFNS 7765592a31fSmrg 777b40a6198Smrg mv -f "$cfgfile" "$ofile" || 7785592a31fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7795592a31fSmrg chmod +x "$ofile" 7805592a31fSmrg], 7815592a31fSmrg[cat <<_LT_EOF >> "$ofile" 7825592a31fSmrg 7835592a31fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7845592a31fSmrgdnl in a comment (ie after a #). 7855592a31fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7865592a31fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7875592a31fSmrg# ### END LIBTOOL TAG CONFIG: $1 7885592a31fSmrg_LT_EOF 7895592a31fSmrg])dnl /m4_if 7905592a31fSmrg], 7915592a31fSmrg[m4_if([$1], [], [ 7925592a31fSmrg PACKAGE='$PACKAGE' 7935592a31fSmrg VERSION='$VERSION' 7945592a31fSmrg TIMESTAMP='$TIMESTAMP' 7955592a31fSmrg RM='$RM' 7965592a31fSmrg ofile='$ofile'], []) 7975592a31fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7985592a31fSmrg])# _LT_CONFIG 7995592a31fSmrg 8005592a31fSmrg 8015592a31fSmrg# LT_SUPPORTED_TAG(TAG) 8025592a31fSmrg# --------------------- 8035592a31fSmrg# Trace this macro to discover what tags are supported by the libtool 8045592a31fSmrg# --tag option, using: 8055592a31fSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8065592a31fSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8075592a31fSmrg 8085592a31fSmrg 8095592a31fSmrg# C support is built-in for now 8105592a31fSmrgm4_define([_LT_LANG_C_enabled], []) 8115592a31fSmrgm4_define([_LT_TAGS], []) 8125592a31fSmrg 8135592a31fSmrg 8145592a31fSmrg# LT_LANG(LANG) 8155592a31fSmrg# ------------- 8165592a31fSmrg# Enable libtool support for the given language if not already enabled. 8175592a31fSmrgAC_DEFUN([LT_LANG], 8185592a31fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8195592a31fSmrgm4_case([$1], 8205592a31fSmrg [C], [_LT_LANG(C)], 8215592a31fSmrg [C++], [_LT_LANG(CXX)], 822b40a6198Smrg [Go], [_LT_LANG(GO)], 8235592a31fSmrg [Java], [_LT_LANG(GCJ)], 8245592a31fSmrg [Fortran 77], [_LT_LANG(F77)], 8255592a31fSmrg [Fortran], [_LT_LANG(FC)], 8265592a31fSmrg [Windows Resource], [_LT_LANG(RC)], 8275592a31fSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8285592a31fSmrg [_LT_LANG($1)], 8295592a31fSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8305592a31fSmrg])# LT_LANG 8315592a31fSmrg 8325592a31fSmrg 8335592a31fSmrg# _LT_LANG(LANGNAME) 8345592a31fSmrg# ------------------ 8355592a31fSmrgm4_defun([_LT_LANG], 8365592a31fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8375592a31fSmrg [LT_SUPPORTED_TAG([$1])dnl 8385592a31fSmrg m4_append([_LT_TAGS], [$1 ])dnl 8395592a31fSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8405592a31fSmrg _LT_LANG_$1_CONFIG($1)])dnl 8415592a31fSmrg])# _LT_LANG 8425592a31fSmrg 8435592a31fSmrg 844b40a6198Smrgm4_ifndef([AC_PROG_GO], [ 845b40a6198Smrg# NOTE: This macro has been submitted for inclusion into # 846b40a6198Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 847b40a6198Smrg# a released version of Autoconf we should remove this # 848b40a6198Smrg# macro and use it instead. # 849b40a6198Smrgm4_defun([AC_PROG_GO], 850b40a6198Smrg[AC_LANG_PUSH(Go)dnl 851b40a6198SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 852b40a6198SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 853b40a6198Smrg_AC_ARG_VAR_LDFLAGS()dnl 854b40a6198SmrgAC_CHECK_TOOL(GOC, gccgo) 855b40a6198Smrgif test -z "$GOC"; then 856b40a6198Smrg if test -n "$ac_tool_prefix"; then 857b40a6198Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 858b40a6198Smrg fi 859b40a6198Smrgfi 860b40a6198Smrgif test -z "$GOC"; then 861b40a6198Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862b40a6198Smrgfi 863b40a6198Smrg])#m4_defun 864b40a6198Smrg])#m4_ifndef 865b40a6198Smrg 866b40a6198Smrg 8675592a31fSmrg# _LT_LANG_DEFAULT_CONFIG 8685592a31fSmrg# ----------------------- 8695592a31fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8705592a31fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8715592a31fSmrg [LT_LANG(CXX)], 8725592a31fSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8735592a31fSmrg 8745592a31fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8755592a31fSmrg [LT_LANG(F77)], 8765592a31fSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8775592a31fSmrg 8785592a31fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8795592a31fSmrg [LT_LANG(FC)], 8805592a31fSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8815592a31fSmrg 8825592a31fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8835592a31fSmrgdnl pulling things in needlessly. 8845592a31fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8855592a31fSmrg [LT_LANG(GCJ)], 8865592a31fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8875592a31fSmrg [LT_LANG(GCJ)], 8885592a31fSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8895592a31fSmrg [LT_LANG(GCJ)], 8905592a31fSmrg [m4_ifdef([AC_PROG_GCJ], 8915592a31fSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8925592a31fSmrg m4_ifdef([A][M_PROG_GCJ], 8935592a31fSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8945592a31fSmrg m4_ifdef([LT_PROG_GCJ], 8955592a31fSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8965592a31fSmrg 897b40a6198SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 898b40a6198Smrg [LT_LANG(GO)], 899b40a6198Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 900b40a6198Smrg 9015592a31fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9025592a31fSmrg [LT_LANG(RC)], 9035592a31fSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9045592a31fSmrg])# _LT_LANG_DEFAULT_CONFIG 9055592a31fSmrg 9065592a31fSmrg# Obsolete macros: 9075592a31fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9085592a31fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9095592a31fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9105592a31fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 911b40a6198SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9125592a31fSmrgdnl aclocal-1.4 backwards compatibility: 9135592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9145592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9155592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9165592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 917b40a6198Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9185592a31fSmrg 9195592a31fSmrg 9205592a31fSmrg# _LT_TAG_COMPILER 9215592a31fSmrg# ---------------- 9225592a31fSmrgm4_defun([_LT_TAG_COMPILER], 92350f2e948Smrg[AC_REQUIRE([AC_PROG_CC])dnl 92445bc899bSmrg 9255592a31fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9265592a31fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9275592a31fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9285592a31fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9295592a31fSmrg 93050f2e948Smrg# If no C compiler was specified, use CC. 93150f2e948SmrgLTCC=${LTCC-"$CC"} 932226fade8Smrg 93350f2e948Smrg# If no C compiler flags were specified, use CFLAGS. 93450f2e948SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935226fade8Smrg 93650f2e948Smrg# Allow CC to be a program name with arguments. 93750f2e948Smrgcompiler=$CC 9385592a31fSmrg])# _LT_TAG_COMPILER 939226fade8Smrg 94045bc899bSmrg 94150f2e948Smrg# _LT_COMPILER_BOILERPLATE 94250f2e948Smrg# ------------------------ 94350f2e948Smrg# Check for compiler boilerplate output or warnings with 94450f2e948Smrg# the simple compiler test code. 9455592a31fSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 9465592a31fSmrg[m4_require([_LT_DECL_SED])dnl 94750f2e948Smrgac_outfile=conftest.$ac_objext 94850f2e948Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 94950f2e948Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 95050f2e948Smrg_lt_compiler_boilerplate=`cat conftest.err` 9515592a31fSmrg$RM conftest* 95250f2e948Smrg])# _LT_COMPILER_BOILERPLATE 95345bc899bSmrg 95445bc899bSmrg 95550f2e948Smrg# _LT_LINKER_BOILERPLATE 95650f2e948Smrg# ---------------------- 95750f2e948Smrg# Check for linker boilerplate output or warnings with 95850f2e948Smrg# the simple link test code. 9595592a31fSmrgm4_defun([_LT_LINKER_BOILERPLATE], 9605592a31fSmrg[m4_require([_LT_DECL_SED])dnl 96150f2e948Smrgac_outfile=conftest.$ac_objext 96250f2e948Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 96350f2e948Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 96450f2e948Smrg_lt_linker_boilerplate=`cat conftest.err` 9655592a31fSmrg$RM -r conftest* 96650f2e948Smrg])# _LT_LINKER_BOILERPLATE 96745bc899bSmrg 96850f2e948Smrg# _LT_REQUIRED_DARWIN_CHECKS 9695592a31fSmrg# ------------------------- 9705592a31fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 97150f2e948Smrg case $host_os in 97250f2e948Smrg rhapsody* | darwin*) 97350f2e948Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 97450f2e948Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9755592a31fSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9765592a31fSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9775592a31fSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9785592a31fSmrg _LT_DECL([], [DSYMUTIL], [1], 9795592a31fSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9805592a31fSmrg _LT_DECL([], [NMEDIT], [1], 9815592a31fSmrg [Tool to change global to local symbols on Mac OS X]) 9825592a31fSmrg _LT_DECL([], [LIPO], [1], 9835592a31fSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 9845592a31fSmrg _LT_DECL([], [OTOOL], [1], 9855592a31fSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9865592a31fSmrg _LT_DECL([], [OTOOL64], [1], 9875592a31fSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 98850f2e948Smrg 98950f2e948Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 99050f2e948Smrg [lt_cv_apple_cc_single_mod=no 99150f2e948Smrg if test -z "${LT_MULTI_MODULE}"; then 9925592a31fSmrg # By default we will add the -single_module flag. You can override 9935592a31fSmrg # by either setting the environment variable LT_MULTI_MODULE 9945592a31fSmrg # non-empty at configure time, or by adding -multi_module to the 9955592a31fSmrg # link flags. 9965592a31fSmrg rm -rf libconftest.dylib* 9975592a31fSmrg echo "int foo(void){return 1;}" > conftest.c 9985592a31fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9995592a31fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10005592a31fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10015592a31fSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10025592a31fSmrg _lt_result=$? 1003b40a6198Smrg # If there is a non-empty error log, and "single_module" 1004b40a6198Smrg # appears in it, assume the flag caused a linker warning 1005b40a6198Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1006b40a6198Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1007b40a6198Smrg # Otherwise, if the output was created with a 0 exit code from 1008b40a6198Smrg # the compiler, it worked. 1009b40a6198Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 10105592a31fSmrg lt_cv_apple_cc_single_mod=yes 10115592a31fSmrg else 10125592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 10135592a31fSmrg fi 10145592a31fSmrg rm -rf libconftest.dylib* 10155592a31fSmrg rm -f conftest.* 101650f2e948Smrg fi]) 1017b40a6198Smrg 101850f2e948Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 101950f2e948Smrg [lt_cv_ld_exported_symbols_list], 102050f2e948Smrg [lt_cv_ld_exported_symbols_list=no 102150f2e948Smrg save_LDFLAGS=$LDFLAGS 102250f2e948Smrg echo "_main" > conftest.sym 102350f2e948Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 102450f2e948Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10255592a31fSmrg [lt_cv_ld_exported_symbols_list=yes], 10265592a31fSmrg [lt_cv_ld_exported_symbols_list=no]) 10275592a31fSmrg LDFLAGS="$save_LDFLAGS" 1028226fade8Smrg ]) 1029b40a6198Smrg 1030b40a6198Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1031b40a6198Smrg [lt_cv_ld_force_load=no 1032b40a6198Smrg cat > conftest.c << _LT_EOF 1033b40a6198Smrgint forced_loaded() { return 2;} 1034b40a6198Smrg_LT_EOF 1035b40a6198Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1036b40a6198Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1037b40a6198Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1038b40a6198Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1039b40a6198Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1040b40a6198Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1041b40a6198Smrg cat > conftest.c << _LT_EOF 1042b40a6198Smrgint main() { return 0;} 1043b40a6198Smrg_LT_EOF 1044b40a6198Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1045b40a6198Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1046b40a6198Smrg _lt_result=$? 1047b40a6198Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1048b40a6198Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1049b40a6198Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1050b40a6198Smrg lt_cv_ld_force_load=yes 1051b40a6198Smrg else 1052b40a6198Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1053b40a6198Smrg fi 1054b40a6198Smrg rm -f conftest.err libconftest.a conftest conftest.c 1055b40a6198Smrg rm -rf conftest.dSYM 1056b40a6198Smrg ]) 105750f2e948Smrg case $host_os in 10585592a31fSmrg rhapsody* | darwin1.[[012]]) 105950f2e948Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 106050f2e948Smrg darwin1.*) 10615592a31fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10625592a31fSmrg darwin*) # darwin 5.x on 106350f2e948Smrg # if running on 10.5 or later, the deployment target defaults 106450f2e948Smrg # to the OS version, if on x86, and 10.4, the deployment 106550f2e948Smrg # target defaults to 10.4. Don't you love it? 106650f2e948Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10675592a31fSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10685592a31fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10695592a31fSmrg 10.[[012]]*) 10705592a31fSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10715592a31fSmrg 10.*) 10725592a31fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 107350f2e948Smrg esac 107450f2e948Smrg ;; 107550f2e948Smrg esac 107650f2e948Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 107750f2e948Smrg _lt_dar_single_mod='$single_module' 107850f2e948Smrg fi 107950f2e948Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 108050f2e948Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 108150f2e948Smrg else 10825592a31fSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 108350f2e948Smrg fi 1084b40a6198Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 10855592a31fSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 108650f2e948Smrg else 108750f2e948Smrg _lt_dsymutil= 1088226fade8Smrg fi 1089226fade8Smrg ;; 1090226fade8Smrg esac 109150f2e948Smrg]) 10921ac89addSmrg 10935592a31fSmrg 1094b40a6198Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1095b40a6198Smrg# --------------------------------- 10965592a31fSmrg# Checks for linker and compiler features on darwin 10975592a31fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 10985592a31fSmrg[ 10995592a31fSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11005592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11015592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 11025592a31fSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11035592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1104b40a6198Smrg if test "$lt_cv_ld_force_load" = "yes"; then 1105b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' 1106b40a6198Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1107b40a6198Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1108b40a6198Smrg else 1109b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1110b40a6198Smrg fi 11115592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11125592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 11135592a31fSmrg case $cc_basename in 11145592a31fSmrg ifort*) _lt_dar_can_shared=yes ;; 11155592a31fSmrg *) _lt_dar_can_shared=$GCC ;; 11165592a31fSmrg esac 11175592a31fSmrg if test "$_lt_dar_can_shared" = "yes"; then 1118b40a6198Smrg output_verbose_link_cmd=func_echo_all 11195592a31fSmrg _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}" 11205592a31fSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 11215592a31fSmrg _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}" 11225592a31fSmrg _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}" 11235592a31fSmrg m4_if([$1], [CXX], 11245592a31fSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 11255592a31fSmrg _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}" 11265592a31fSmrg _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}" 11275592a31fSmrg fi 11285592a31fSmrg],[]) 11295592a31fSmrg else 11305592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 11315592a31fSmrg fi 11325592a31fSmrg]) 11335592a31fSmrg 1134b40a6198Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135b40a6198Smrg# ---------------------------------- 113650f2e948Smrg# Links a minimal program and checks the executable 113750f2e948Smrg# for the system default hardcoded library path. In most cases, 113850f2e948Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 113950f2e948Smrg# the location of the communication and MPI libs are included too. 114050f2e948Smrg# If we don't find anything, use the default library path according 114150f2e948Smrg# to the aix ld manual. 1142b40a6198Smrg# Store the results from the different compilers for each TAGNAME. 1143b40a6198Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11445592a31fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11455592a31fSmrg[m4_require([_LT_DECL_SED])dnl 1146b40a6198Smrgif test "${lt_cv_aix_libpath+set}" = set; then 1147b40a6198Smrg aix_libpath=$lt_cv_aix_libpath 1148b40a6198Smrgelse 1149b40a6198Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150b40a6198Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151b40a6198Smrg lt_aix_libpath_sed='[ 1152b40a6198Smrg /Import File Strings/,/^$/ { 1153b40a6198Smrg /^0/ { 1154b40a6198Smrg s/^0 *\([^ ]*\) *$/\1/ 1155b40a6198Smrg p 1156b40a6198Smrg } 1157b40a6198Smrg }]' 1158b40a6198Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159b40a6198Smrg # Check for a 64-bit object if we didn't find anything. 1160b40a6198Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161b40a6198Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162b40a6198Smrg fi],[]) 1163b40a6198Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164b40a6198Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165b40a6198Smrg fi 1166b40a6198Smrg ]) 1167b40a6198Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168b40a6198Smrgfi 11695592a31fSmrg])# _LT_SYS_MODULE_PATH_AIX 117045bc899bSmrg 117145bc899bSmrg 11725592a31fSmrg# _LT_SHELL_INIT(ARG) 11735592a31fSmrg# ------------------- 11745592a31fSmrgm4_define([_LT_SHELL_INIT], 1175b40a6198Smrg[m4_divert_text([M4SH-INIT], [$1 1176b40a6198Smrg])])# _LT_SHELL_INIT 1177b40a6198Smrg 117845bc899bSmrg 1179226fade8Smrg 11805592a31fSmrg# _LT_PROG_ECHO_BACKSLASH 11815592a31fSmrg# ----------------------- 1182b40a6198Smrg# Find how we can fake an echo command that does not interpret backslash. 1183b40a6198Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1184b40a6198Smrg# of the generated configure script which will find a shell with a builtin 1185b40a6198Smrg# printf (which we can use as an echo command). 11865592a31fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1187b40a6198Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1188b40a6198SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1189b40a6198SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1190b40a6198Smrg 1191b40a6198SmrgAC_MSG_CHECKING([how to print strings]) 1192b40a6198Smrg# Test print first, because it will be a builtin if present. 1193b40a6198Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1194b40a6198Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1195b40a6198Smrg ECHO='print -r --' 1196b40a6198Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1197b40a6198Smrg ECHO='printf %s\n' 11981ac89addSmrgelse 1199b40a6198Smrg # Use this function as a fallback that always works. 1200b40a6198Smrg func_fallback_echo () 1201b40a6198Smrg { 1202b40a6198Smrg eval 'cat <<_LTECHO_EOF 1203b40a6198Smrg$[]1 1204b40a6198Smrg_LTECHO_EOF' 1205b40a6198Smrg } 1206b40a6198Smrg ECHO='func_fallback_echo' 1207226fade8Smrgfi 12081ac89addSmrg 1209b40a6198Smrg# func_echo_all arg... 1210b40a6198Smrg# Invoke $ECHO with all args, space-separated. 1211b40a6198Smrgfunc_echo_all () 1212b40a6198Smrg{ 1213b40a6198Smrg $ECHO "$*" 1214b40a6198Smrg} 12153a925b30Smrg 1216b40a6198Smrgcase "$ECHO" in 1217b40a6198Smrg printf*) AC_MSG_RESULT([printf]) ;; 1218b40a6198Smrg print*) AC_MSG_RESULT([print -r]) ;; 1219b40a6198Smrg *) AC_MSG_RESULT([cat]) ;; 1220b40a6198Smrgesac 12211ac89addSmrg 1222b40a6198Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1223b40a6198Smrg[_AS_DETECT_SUGGESTED([ 1224b40a6198Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225b40a6198Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226b40a6198Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227b40a6198Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228b40a6198Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1229b40a6198Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1230b40a6198Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 123145bc899bSmrg 12325592a31fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233b40a6198Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12345592a31fSmrg])# _LT_PROG_ECHO_BACKSLASH 123545bc899bSmrg 12361ac89addSmrg 1237b40a6198Smrg# _LT_WITH_SYSROOT 1238b40a6198Smrg# ---------------- 1239b40a6198SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240b40a6198Smrg[AC_MSG_CHECKING([for sysroot]) 1241b40a6198SmrgAC_ARG_WITH([sysroot], 1242b40a6198Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243b40a6198Smrg (or the compiler's sysroot if not specified).], 1244b40a6198Smrg[], [with_sysroot=no]) 1245b40a6198Smrg 1246b40a6198Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1247b40a6198Smrgdnl in case the user passed a directory name. 1248b40a6198Smrglt_sysroot= 1249b40a6198Smrgcase ${with_sysroot} in #( 1250b40a6198Smrg yes) 1251b40a6198Smrg if test "$GCC" = yes; then 1252b40a6198Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253b40a6198Smrg fi 1254b40a6198Smrg ;; #( 1255b40a6198Smrg /*) 1256b40a6198Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257b40a6198Smrg ;; #( 1258b40a6198Smrg no|'') 1259b40a6198Smrg ;; #( 1260b40a6198Smrg *) 1261b40a6198Smrg AC_MSG_RESULT([${with_sysroot}]) 1262b40a6198Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263b40a6198Smrg ;; 1264b40a6198Smrgesac 1265b40a6198Smrg 1266b40a6198Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1267b40a6198Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268b40a6198Smrg[dependent libraries, and in which our libraries should be installed.])]) 1269b40a6198Smrg 12705592a31fSmrg# _LT_ENABLE_LOCK 12715592a31fSmrg# --------------- 12725592a31fSmrgm4_defun([_LT_ENABLE_LOCK], 127350f2e948Smrg[AC_ARG_ENABLE([libtool-lock], 12745592a31fSmrg [AS_HELP_STRING([--disable-libtool-lock], 12755592a31fSmrg [avoid locking (might break parallel builds)])]) 127650f2e948Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 127750f2e948Smrg 127850f2e948Smrg# Some flags need to be propagated to the compiler or linker for good 127950f2e948Smrg# libtool support. 128050f2e948Smrgcase $host in 128150f2e948Smrgia64-*-hpux*) 128250f2e948Smrg # Find out which ABI we are using. 128350f2e948Smrg echo 'int i;' > conftest.$ac_ext 128450f2e948Smrg if AC_TRY_EVAL(ac_compile); then 128550f2e948Smrg case `/usr/bin/file conftest.$ac_objext` in 12865592a31fSmrg *ELF-32*) 12875592a31fSmrg HPUX_IA64_MODE="32" 12885592a31fSmrg ;; 12895592a31fSmrg *ELF-64*) 12905592a31fSmrg HPUX_IA64_MODE="64" 12915592a31fSmrg ;; 1292226fade8Smrg esac 129350f2e948Smrg fi 129450f2e948Smrg rm -rf conftest* 129550f2e948Smrg ;; 129650f2e948Smrg*-*-irix6*) 129750f2e948Smrg # Find out which ABI we are using. 1298b40a6198Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 129950f2e948Smrg if AC_TRY_EVAL(ac_compile); then 13005592a31fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 13015592a31fSmrg case `/usr/bin/file conftest.$ac_objext` in 13025592a31fSmrg *32-bit*) 13035592a31fSmrg LD="${LD-ld} -melf32bsmip" 13045592a31fSmrg ;; 13055592a31fSmrg *N32*) 13065592a31fSmrg LD="${LD-ld} -melf32bmipn32" 13075592a31fSmrg ;; 13085592a31fSmrg *64-bit*) 13095592a31fSmrg LD="${LD-ld} -melf64bmip" 13105592a31fSmrg ;; 13115592a31fSmrg esac 13125592a31fSmrg else 13135592a31fSmrg case `/usr/bin/file conftest.$ac_objext` in 13145592a31fSmrg *32-bit*) 13155592a31fSmrg LD="${LD-ld} -32" 13165592a31fSmrg ;; 13175592a31fSmrg *N32*) 13185592a31fSmrg LD="${LD-ld} -n32" 13195592a31fSmrg ;; 13205592a31fSmrg *64-bit*) 13215592a31fSmrg LD="${LD-ld} -64" 13225592a31fSmrg ;; 13235592a31fSmrg esac 13245592a31fSmrg fi 1325226fade8Smrg fi 132650f2e948Smrg rm -rf conftest* 1327226fade8Smrg ;; 132845bc899bSmrg 132950f2e948Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 13305592a31fSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 133150f2e948Smrg # Find out which ABI we are using. 133250f2e948Smrg echo 'int i;' > conftest.$ac_ext 133350f2e948Smrg if AC_TRY_EVAL(ac_compile); then 133450f2e948Smrg case `/usr/bin/file conftest.o` in 13355592a31fSmrg *32-bit*) 13365592a31fSmrg case $host in 13375592a31fSmrg x86_64-*kfreebsd*-gnu) 13385592a31fSmrg LD="${LD-ld} -m elf_i386_fbsd" 13395592a31fSmrg ;; 13405592a31fSmrg x86_64-*linux*) 13415592a31fSmrg LD="${LD-ld} -m elf_i386" 13425592a31fSmrg ;; 13435592a31fSmrg ppc64-*linux*|powerpc64-*linux*) 13445592a31fSmrg LD="${LD-ld} -m elf32ppclinux" 13455592a31fSmrg ;; 13465592a31fSmrg s390x-*linux*) 13475592a31fSmrg LD="${LD-ld} -m elf_s390" 13485592a31fSmrg ;; 13495592a31fSmrg sparc64-*linux*) 13505592a31fSmrg LD="${LD-ld} -m elf32_sparc" 13515592a31fSmrg ;; 13525592a31fSmrg esac 13535592a31fSmrg ;; 13545592a31fSmrg *64-bit*) 13555592a31fSmrg case $host in 13565592a31fSmrg x86_64-*kfreebsd*-gnu) 13575592a31fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 13585592a31fSmrg ;; 13595592a31fSmrg x86_64-*linux*) 13605592a31fSmrg LD="${LD-ld} -m elf_x86_64" 13615592a31fSmrg ;; 13625592a31fSmrg ppc*-*linux*|powerpc*-*linux*) 13635592a31fSmrg LD="${LD-ld} -m elf64ppc" 13645592a31fSmrg ;; 13655592a31fSmrg s390*-*linux*|s390*-*tpf*) 13665592a31fSmrg LD="${LD-ld} -m elf64_s390" 13675592a31fSmrg ;; 13685592a31fSmrg sparc*-*linux*) 13695592a31fSmrg LD="${LD-ld} -m elf64_sparc" 13705592a31fSmrg ;; 13715592a31fSmrg esac 13725592a31fSmrg ;; 137350f2e948Smrg esac 137450f2e948Smrg fi 137550f2e948Smrg rm -rf conftest* 1376226fade8Smrg ;; 137745bc899bSmrg 137850f2e948Smrg*-*-sco3.2v5*) 137950f2e948Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 138050f2e948Smrg SAVE_CFLAGS="$CFLAGS" 138150f2e948Smrg CFLAGS="$CFLAGS -belf" 138250f2e948Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 138350f2e948Smrg [AC_LANG_PUSH(C) 13845592a31fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 138550f2e948Smrg AC_LANG_POP]) 138650f2e948Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 138750f2e948Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 138850f2e948Smrg CFLAGS="$SAVE_CFLAGS" 138950f2e948Smrg fi 1390226fade8Smrg ;; 1391b40a6198Smrg*-*solaris*) 139250f2e948Smrg # Find out which ABI we are using. 139350f2e948Smrg echo 'int i;' > conftest.$ac_ext 139450f2e948Smrg if AC_TRY_EVAL(ac_compile); then 139550f2e948Smrg case `/usr/bin/file conftest.o` in 139650f2e948Smrg *64-bit*) 139750f2e948Smrg case $lt_cv_prog_gnu_ld in 1398b40a6198Smrg yes*) 1399b40a6198Smrg case $host in 1400b40a6198Smrg i?86-*-solaris*) 1401b40a6198Smrg LD="${LD-ld} -m elf_x86_64" 1402b40a6198Smrg ;; 1403b40a6198Smrg sparc*-*-solaris*) 1404b40a6198Smrg LD="${LD-ld} -m elf64_sparc" 1405b40a6198Smrg ;; 1406b40a6198Smrg esac 1407b40a6198Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1408b40a6198Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1409b40a6198Smrg LD="${LD-ld}_sol2" 1410b40a6198Smrg fi 1411b40a6198Smrg ;; 141250f2e948Smrg *) 14135592a31fSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 141450f2e948Smrg LD="${LD-ld} -64" 141550f2e948Smrg fi 141650f2e948Smrg ;; 141750f2e948Smrg esac 141850f2e948Smrg ;; 141950f2e948Smrg esac 142050f2e948Smrg fi 142150f2e948Smrg rm -rf conftest* 1422226fade8Smrg ;; 142350f2e948Smrgesac 142445bc899bSmrg 142550f2e948Smrgneed_locks="$enable_libtool_lock" 14265592a31fSmrg])# _LT_ENABLE_LOCK 14275592a31fSmrg 14285592a31fSmrg 1429b40a6198Smrg# _LT_PROG_AR 1430b40a6198Smrg# ----------- 1431b40a6198Smrgm4_defun([_LT_PROG_AR], 1432b40a6198Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1433b40a6198Smrg: ${AR=ar} 1434b40a6198Smrg: ${AR_FLAGS=cru} 1435b40a6198Smrg_LT_DECL([], [AR], [1], [The archiver]) 1436b40a6198Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1437b40a6198Smrg 1438b40a6198SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1439b40a6198Smrg [lt_cv_ar_at_file=no 1440b40a6198Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1441b40a6198Smrg [echo conftest.$ac_objext > conftest.lst 1442b40a6198Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1443b40a6198Smrg AC_TRY_EVAL([lt_ar_try]) 1444b40a6198Smrg if test "$ac_status" -eq 0; then 1445b40a6198Smrg # Ensure the archiver fails upon bogus file names. 1446b40a6198Smrg rm -f conftest.$ac_objext libconftest.a 1447b40a6198Smrg AC_TRY_EVAL([lt_ar_try]) 1448b40a6198Smrg if test "$ac_status" -ne 0; then 1449b40a6198Smrg lt_cv_ar_at_file=@ 1450b40a6198Smrg fi 1451b40a6198Smrg fi 1452b40a6198Smrg rm -f conftest.* libconftest.a 1453b40a6198Smrg ]) 1454b40a6198Smrg ]) 1455b40a6198Smrg 1456b40a6198Smrgif test "x$lt_cv_ar_at_file" = xno; then 1457b40a6198Smrg archiver_list_spec= 1458b40a6198Smrgelse 1459b40a6198Smrg archiver_list_spec=$lt_cv_ar_at_file 1460b40a6198Smrgfi 1461b40a6198Smrg_LT_DECL([], [archiver_list_spec], [1], 1462b40a6198Smrg [How to feed a file listing to the archiver]) 1463b40a6198Smrg])# _LT_PROG_AR 1464b40a6198Smrg 1465b40a6198Smrg 14665592a31fSmrg# _LT_CMD_OLD_ARCHIVE 14675592a31fSmrg# ------------------- 14685592a31fSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1469b40a6198Smrg[_LT_PROG_AR 14705592a31fSmrg 14715592a31fSmrgAC_CHECK_TOOL(STRIP, strip, :) 14725592a31fSmrgtest -z "$STRIP" && STRIP=: 14735592a31fSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 147450f2e948Smrg 14755592a31fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 14765592a31fSmrgtest -z "$RANLIB" && RANLIB=: 14775592a31fSmrg_LT_DECL([], [RANLIB], [1], 14785592a31fSmrg [Commands used to install an old-style archive]) 14795592a31fSmrg 14805592a31fSmrg# Determine commands to create old-style static archives. 14815592a31fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 14825592a31fSmrgold_postinstall_cmds='chmod 644 $oldlib' 14835592a31fSmrgold_postuninstall_cmds= 14845592a31fSmrg 14855592a31fSmrgif test -n "$RANLIB"; then 14865592a31fSmrg case $host_os in 14875592a31fSmrg openbsd*) 1488b40a6198Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 14895592a31fSmrg ;; 14905592a31fSmrg *) 1491b40a6198Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 14925592a31fSmrg ;; 14935592a31fSmrg esac 1494b40a6198Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 14955592a31fSmrgfi 1496b40a6198Smrg 1497b40a6198Smrgcase $host_os in 1498b40a6198Smrg darwin*) 1499b40a6198Smrg lock_old_archive_extraction=yes ;; 1500b40a6198Smrg *) 1501b40a6198Smrg lock_old_archive_extraction=no ;; 1502b40a6198Smrgesac 15035592a31fSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 15045592a31fSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15055592a31fSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 15065592a31fSmrg [Commands used to build an old-style archive]) 1507b40a6198Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1508b40a6198Smrg [Whether to use a lock for old archive extraction]) 15095592a31fSmrg])# _LT_CMD_OLD_ARCHIVE 151045bc899bSmrg 151145bc899bSmrg 15125592a31fSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 151350f2e948Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 151450f2e948Smrg# ---------------------------------------------------------------- 151550f2e948Smrg# Check whether the given compiler option works 15165592a31fSmrgAC_DEFUN([_LT_COMPILER_OPTION], 15175592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15185592a31fSmrgm4_require([_LT_DECL_SED])dnl 151950f2e948SmrgAC_CACHE_CHECK([$1], [$2], 152050f2e948Smrg [$2=no 15215592a31fSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 152250f2e948Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 152350f2e948Smrg lt_compiler_flag="$3" 152450f2e948Smrg # Insert the option either (1) after the last *FLAGS variable, or 152550f2e948Smrg # (2) before a word containing "conftest.", or (3) at the end. 152650f2e948Smrg # Note that $ac_compile itself does not contain backslashes and begins 152750f2e948Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 152850f2e948Smrg # The option is referenced via a variable to avoid confusing sed. 152950f2e948Smrg lt_compile=`echo "$ac_compile" | $SED \ 153050f2e948Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 153150f2e948Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 153250f2e948Smrg -e 's:$: $lt_compiler_flag:'` 1533b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 153450f2e948Smrg (eval "$lt_compile" 2>conftest.err) 153550f2e948Smrg ac_status=$? 153650f2e948Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1537b40a6198Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 153850f2e948Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 153950f2e948Smrg # The compiler can only warn and ignore the option if not recognized 154050f2e948Smrg # So say no if there are warnings other than the usual output. 1541b40a6198Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 154250f2e948Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 154350f2e948Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 154450f2e948Smrg $2=yes 154550f2e948Smrg fi 154650f2e948Smrg fi 15475592a31fSmrg $RM conftest* 154850f2e948Smrg]) 154945bc899bSmrg 155050f2e948Smrgif test x"[$]$2" = xyes; then 15515592a31fSmrg m4_if([$5], , :, [$5]) 155250f2e948Smrgelse 15535592a31fSmrg m4_if([$6], , :, [$6]) 155450f2e948Smrgfi 15555592a31fSmrg])# _LT_COMPILER_OPTION 155645bc899bSmrg 15575592a31fSmrg# Old name: 15585592a31fSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 15595592a31fSmrgdnl aclocal-1.4 backwards compatibility: 15605592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 156150f2e948Smrg 15625592a31fSmrg 15635592a31fSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15645592a31fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 15655592a31fSmrg# ---------------------------------------------------- 15665592a31fSmrg# Check whether the given linker option works 15675592a31fSmrgAC_DEFUN([_LT_LINKER_OPTION], 15685592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15695592a31fSmrgm4_require([_LT_DECL_SED])dnl 157050f2e948SmrgAC_CACHE_CHECK([$1], [$2], 157150f2e948Smrg [$2=no 157250f2e948Smrg save_LDFLAGS="$LDFLAGS" 157350f2e948Smrg LDFLAGS="$LDFLAGS $3" 157450f2e948Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 157550f2e948Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 157650f2e948Smrg # The linker can only warn and ignore the option if not recognized 157750f2e948Smrg # So say no if there are warnings 157850f2e948Smrg if test -s conftest.err; then 157950f2e948Smrg # Append any errors to the config.log. 158050f2e948Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1581b40a6198Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 158250f2e948Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 158350f2e948Smrg if diff conftest.exp conftest.er2 >/dev/null; then 158450f2e948Smrg $2=yes 158550f2e948Smrg fi 158650f2e948Smrg else 158750f2e948Smrg $2=yes 158850f2e948Smrg fi 158950f2e948Smrg fi 15905592a31fSmrg $RM -r conftest* 159150f2e948Smrg LDFLAGS="$save_LDFLAGS" 159250f2e948Smrg]) 159350f2e948Smrg 159450f2e948Smrgif test x"[$]$2" = xyes; then 15955592a31fSmrg m4_if([$4], , :, [$4]) 159650f2e948Smrgelse 15975592a31fSmrg m4_if([$5], , :, [$5]) 159850f2e948Smrgfi 15995592a31fSmrg])# _LT_LINKER_OPTION 160050f2e948Smrg 16015592a31fSmrg# Old name: 16025592a31fSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16035592a31fSmrgdnl aclocal-1.4 backwards compatibility: 16045592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 160550f2e948Smrg 16065592a31fSmrg 16075592a31fSmrg# LT_CMD_MAX_LEN 16085592a31fSmrg#--------------- 16095592a31fSmrgAC_DEFUN([LT_CMD_MAX_LEN], 16105592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16115592a31fSmrg# find the maximum length of command line arguments 161250f2e948SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 161350f2e948SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 161450f2e948Smrg i=0 161550f2e948Smrg teststring="ABCD" 161650f2e948Smrg 161750f2e948Smrg case $build_os in 161850f2e948Smrg msdosdjgpp*) 161950f2e948Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 162050f2e948Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 162150f2e948Smrg # during glob expansion). Even if it were fixed, the result of this 162250f2e948Smrg # check would be larger than it should be. 162350f2e948Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16241ac89addSmrg ;; 162550f2e948Smrg 162650f2e948Smrg gnu*) 162750f2e948Smrg # Under GNU Hurd, this test is not required because there is 162850f2e948Smrg # no limit to the length of command line arguments. 162950f2e948Smrg # Libtool will interpret -1 as no limit whatsoever 163050f2e948Smrg lt_cv_sys_max_cmd_len=-1; 16311ac89addSmrg ;; 163250f2e948Smrg 16335592a31fSmrg cygwin* | mingw* | cegcc*) 163450f2e948Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 163550f2e948Smrg # about 5 minutes as the teststring grows exponentially. 163650f2e948Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 163750f2e948Smrg # you end up with a "frozen" computer, even though with patience 163850f2e948Smrg # the test eventually succeeds (with a max line length of 256k). 163950f2e948Smrg # Instead, let's just punt: use the minimum linelength reported by 164050f2e948Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 164150f2e948Smrg lt_cv_sys_max_cmd_len=8192; 16421ac89addSmrg ;; 164350f2e948Smrg 1644b40a6198Smrg mint*) 1645b40a6198Smrg # On MiNT this can take a long time and run out of memory. 1646b40a6198Smrg lt_cv_sys_max_cmd_len=8192; 1647b40a6198Smrg ;; 1648b40a6198Smrg 164950f2e948Smrg amigaos*) 165050f2e948Smrg # On AmigaOS with pdksh, this test takes hours, literally. 165150f2e948Smrg # So we just punt and use a minimum line length of 8192. 165250f2e948Smrg lt_cv_sys_max_cmd_len=8192; 16531ac89addSmrg ;; 165445bc899bSmrg 165550f2e948Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 165650f2e948Smrg # This has been around since 386BSD, at least. Likely further. 165750f2e948Smrg if test -x /sbin/sysctl; then 165850f2e948Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 165950f2e948Smrg elif test -x /usr/sbin/sysctl; then 166050f2e948Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 166150f2e948Smrg else 166250f2e948Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 166350f2e948Smrg fi 166450f2e948Smrg # And add a safety zone 166550f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 166650f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 166750f2e948Smrg ;; 166845bc899bSmrg 166950f2e948Smrg interix*) 167050f2e948Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 167150f2e948Smrg lt_cv_sys_max_cmd_len=196608 167250f2e948Smrg ;; 167350f2e948Smrg 1674b40a6198Smrg os2*) 1675b40a6198Smrg # The test takes a long time on OS/2. 1676b40a6198Smrg lt_cv_sys_max_cmd_len=8192 1677b40a6198Smrg ;; 1678b40a6198Smrg 167950f2e948Smrg osf*) 168050f2e948Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 168150f2e948Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 168250f2e948Smrg # nice to cause kernel panics so lets avoid the loop below. 168350f2e948Smrg # First set a reasonable default. 168450f2e948Smrg lt_cv_sys_max_cmd_len=16384 168550f2e948Smrg # 168650f2e948Smrg if test -x /sbin/sysconfig; then 168750f2e948Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 168850f2e948Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 168950f2e948Smrg esac 169045bc899bSmrg fi 1691226fade8Smrg ;; 169250f2e948Smrg sco3.2v5*) 169350f2e948Smrg lt_cv_sys_max_cmd_len=102400 16941ac89addSmrg ;; 169550f2e948Smrg sysv5* | sco5v6* | sysv4.2uw2*) 169650f2e948Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 169750f2e948Smrg if test -n "$kargmax"; then 16985592a31fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 169950f2e948Smrg else 170050f2e948Smrg lt_cv_sys_max_cmd_len=32768 170150f2e948Smrg fi 17021ac89addSmrg ;; 17031ac89addSmrg *) 170450f2e948Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 170550f2e948Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 170650f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 170750f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 170850f2e948Smrg else 17095592a31fSmrg # Make teststring a little bigger before we do anything with it. 17105592a31fSmrg # a 1K string should be a reasonable start. 17115592a31fSmrg for i in 1 2 3 4 5 6 7 8 ; do 17125592a31fSmrg teststring=$teststring$teststring 17135592a31fSmrg done 171450f2e948Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17155592a31fSmrg # If test is not a shell built-in, we'll probably end up computing a 17165592a31fSmrg # maximum length that is only half of the actual maximum length, but 17175592a31fSmrg # we can't tell. 1718b40a6198Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1719b40a6198Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 172050f2e948Smrg test $i != 17 # 1/2 MB should be enough 172150f2e948Smrg do 172250f2e948Smrg i=`expr $i + 1` 172350f2e948Smrg teststring=$teststring$teststring 172450f2e948Smrg done 17255592a31fSmrg # Only check the string length outside the loop. 17265592a31fSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 172750f2e948Smrg teststring= 17285592a31fSmrg # Add a significant safety factor because C++ compilers can tack on 17295592a31fSmrg # massive amounts of additional arguments before passing them to the 17305592a31fSmrg # linker. It appears as though 1/2 is a usable value. 173150f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 173250f2e948Smrg fi 17331ac89addSmrg ;; 17341ac89addSmrg esac 173550f2e948Smrg]) 173650f2e948Smrgif test -n $lt_cv_sys_max_cmd_len ; then 173750f2e948Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 173850f2e948Smrgelse 173950f2e948Smrg AC_MSG_RESULT(none) 174050f2e948Smrgfi 17415592a31fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 17425592a31fSmrg_LT_DECL([], [max_cmd_len], [0], 17435592a31fSmrg [What is the maximum length of a command?]) 17445592a31fSmrg])# LT_CMD_MAX_LEN 174545bc899bSmrg 17465592a31fSmrg# Old name: 17475592a31fSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 17485592a31fSmrgdnl aclocal-1.4 backwards compatibility: 17495592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 175045bc899bSmrg 17515592a31fSmrg 17525592a31fSmrg# _LT_HEADER_DLFCN 17535592a31fSmrg# ---------------- 17545592a31fSmrgm4_defun([_LT_HEADER_DLFCN], 17555592a31fSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 17565592a31fSmrg])# _LT_HEADER_DLFCN 175745bc899bSmrg 1758226fade8Smrg 17595592a31fSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 17605592a31fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 17615592a31fSmrg# ---------------------------------------------------------------- 17625592a31fSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 17635592a31fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 176450f2e948Smrgif test "$cross_compiling" = yes; then : 176550f2e948Smrg [$4] 176650f2e948Smrgelse 176750f2e948Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 176850f2e948Smrg lt_status=$lt_dlunknown 17695592a31fSmrg cat > conftest.$ac_ext <<_LT_EOF 1770b40a6198Smrg[#line $LINENO "configure" 177150f2e948Smrg#include "confdefs.h" 177245bc899bSmrg 177350f2e948Smrg#if HAVE_DLFCN_H 177450f2e948Smrg#include <dlfcn.h> 177550f2e948Smrg#endif 177645bc899bSmrg 177750f2e948Smrg#include <stdio.h> 177845bc899bSmrg 177950f2e948Smrg#ifdef RTLD_GLOBAL 178050f2e948Smrg# define LT_DLGLOBAL RTLD_GLOBAL 178150f2e948Smrg#else 178250f2e948Smrg# ifdef DL_GLOBAL 178350f2e948Smrg# define LT_DLGLOBAL DL_GLOBAL 178450f2e948Smrg# else 178550f2e948Smrg# define LT_DLGLOBAL 0 178650f2e948Smrg# endif 178750f2e948Smrg#endif 178845bc899bSmrg 178950f2e948Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 179050f2e948Smrg find out it does not work in some platform. */ 179150f2e948Smrg#ifndef LT_DLLAZY_OR_NOW 179250f2e948Smrg# ifdef RTLD_LAZY 179350f2e948Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 179450f2e948Smrg# else 179550f2e948Smrg# ifdef DL_LAZY 179650f2e948Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 179750f2e948Smrg# else 179850f2e948Smrg# ifdef RTLD_NOW 179950f2e948Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 180050f2e948Smrg# else 180150f2e948Smrg# ifdef DL_NOW 180250f2e948Smrg# define LT_DLLAZY_OR_NOW DL_NOW 180350f2e948Smrg# else 180450f2e948Smrg# define LT_DLLAZY_OR_NOW 0 180550f2e948Smrg# endif 180650f2e948Smrg# endif 180750f2e948Smrg# endif 180850f2e948Smrg# endif 180950f2e948Smrg#endif 181045bc899bSmrg 1811b40a6198Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 1812b40a6198Smrg correspondingly for the symbols needed. */ 1813b40a6198Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1814b40a6198Smrgint fnord () __attribute__((visibility("default"))); 1815b40a6198Smrg#endif 1816b40a6198Smrg 1817b40a6198Smrgint fnord () { return 42; } 181850f2e948Smrgint main () 181950f2e948Smrg{ 182050f2e948Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 182150f2e948Smrg int status = $lt_dlunknown; 182250f2e948Smrg 182350f2e948Smrg if (self) 182450f2e948Smrg { 182550f2e948Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1826b40a6198Smrg else 1827b40a6198Smrg { 1828b40a6198Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1829b40a6198Smrg else puts (dlerror ()); 1830b40a6198Smrg } 183150f2e948Smrg /* dlclose (self); */ 183250f2e948Smrg } 183345bc899bSmrg else 183450f2e948Smrg puts (dlerror ()); 183545bc899bSmrg 18365592a31fSmrg return status; 183750f2e948Smrg}] 18385592a31fSmrg_LT_EOF 183950f2e948Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 184050f2e948Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 184150f2e948Smrg lt_status=$? 184250f2e948Smrg case x$lt_status in 184350f2e948Smrg x$lt_dlno_uscore) $1 ;; 184450f2e948Smrg x$lt_dlneed_uscore) $2 ;; 184550f2e948Smrg x$lt_dlunknown|x*) $3 ;; 18461ac89addSmrg esac 184750f2e948Smrg else : 184850f2e948Smrg # compilation failed 184950f2e948Smrg $3 185045bc899bSmrg fi 185145bc899bSmrgfi 185250f2e948Smrgrm -fr conftest* 18535592a31fSmrg])# _LT_TRY_DLOPEN_SELF 185445bc899bSmrg 1855226fade8Smrg 18565592a31fSmrg# LT_SYS_DLOPEN_SELF 18575592a31fSmrg# ------------------ 18585592a31fSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 18595592a31fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 186050f2e948Smrgif test "x$enable_dlopen" != xyes; then 186150f2e948Smrg enable_dlopen=unknown 186250f2e948Smrg enable_dlopen_self=unknown 186350f2e948Smrg enable_dlopen_self_static=unknown 186450f2e948Smrgelse 186550f2e948Smrg lt_cv_dlopen=no 186650f2e948Smrg lt_cv_dlopen_libs= 1867226fade8Smrg 186850f2e948Smrg case $host_os in 186950f2e948Smrg beos*) 187050f2e948Smrg lt_cv_dlopen="load_add_on" 187150f2e948Smrg lt_cv_dlopen_libs= 187250f2e948Smrg lt_cv_dlopen_self=yes 187350f2e948Smrg ;; 1874226fade8Smrg 18755592a31fSmrg mingw* | pw32* | cegcc*) 187650f2e948Smrg lt_cv_dlopen="LoadLibrary" 187750f2e948Smrg lt_cv_dlopen_libs= 18785592a31fSmrg ;; 1879226fade8Smrg 188050f2e948Smrg cygwin*) 188150f2e948Smrg lt_cv_dlopen="dlopen" 188250f2e948Smrg lt_cv_dlopen_libs= 18835592a31fSmrg ;; 1884226fade8Smrg 188550f2e948Smrg darwin*) 188650f2e948Smrg # if libdl is installed we need to link against it 188750f2e948Smrg AC_CHECK_LIB([dl], [dlopen], 188850f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 188950f2e948Smrg lt_cv_dlopen="dyld" 189050f2e948Smrg lt_cv_dlopen_libs= 189150f2e948Smrg lt_cv_dlopen_self=yes 189250f2e948Smrg ]) 18935592a31fSmrg ;; 1894226fade8Smrg 189550f2e948Smrg *) 189650f2e948Smrg AC_CHECK_FUNC([shl_load], 189750f2e948Smrg [lt_cv_dlopen="shl_load"], 189850f2e948Smrg [AC_CHECK_LIB([dld], [shl_load], 189950f2e948Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 190050f2e948Smrg [AC_CHECK_FUNC([dlopen], 190150f2e948Smrg [lt_cv_dlopen="dlopen"], 190250f2e948Smrg [AC_CHECK_LIB([dl], [dlopen], 190350f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 190450f2e948Smrg [AC_CHECK_LIB([svld], [dlopen], 190550f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 190650f2e948Smrg [AC_CHECK_LIB([dld], [dld_link], 190750f2e948Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 190850f2e948Smrg ]) 190950f2e948Smrg ]) 191050f2e948Smrg ]) 191150f2e948Smrg ]) 191250f2e948Smrg ]) 191350f2e948Smrg ;; 191450f2e948Smrg esac 1915226fade8Smrg 191650f2e948Smrg if test "x$lt_cv_dlopen" != xno; then 191750f2e948Smrg enable_dlopen=yes 191850f2e948Smrg else 191950f2e948Smrg enable_dlopen=no 192050f2e948Smrg fi 1921226fade8Smrg 192250f2e948Smrg case $lt_cv_dlopen in 192350f2e948Smrg dlopen) 192450f2e948Smrg save_CPPFLAGS="$CPPFLAGS" 192550f2e948Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1926226fade8Smrg 192750f2e948Smrg save_LDFLAGS="$LDFLAGS" 192850f2e948Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1929226fade8Smrg 193050f2e948Smrg save_LIBS="$LIBS" 193150f2e948Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1932226fade8Smrg 193350f2e948Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 193450f2e948Smrg lt_cv_dlopen_self, [dnl 19355592a31fSmrg _LT_TRY_DLOPEN_SELF( 193650f2e948Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 193750f2e948Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 193850f2e948Smrg ]) 1939226fade8Smrg 194050f2e948Smrg if test "x$lt_cv_dlopen_self" = xyes; then 194150f2e948Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 194250f2e948Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 19435592a31fSmrg lt_cv_dlopen_self_static, [dnl 19445592a31fSmrg _LT_TRY_DLOPEN_SELF( 194550f2e948Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 194650f2e948Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 194750f2e948Smrg ]) 1948226fade8Smrg fi 1949226fade8Smrg 195050f2e948Smrg CPPFLAGS="$save_CPPFLAGS" 195150f2e948Smrg LDFLAGS="$save_LDFLAGS" 195250f2e948Smrg LIBS="$save_LIBS" 195350f2e948Smrg ;; 195450f2e948Smrg esac 1955226fade8Smrg 195650f2e948Smrg case $lt_cv_dlopen_self in 195750f2e948Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 195850f2e948Smrg *) enable_dlopen_self=unknown ;; 195950f2e948Smrg esac 1960226fade8Smrg 196150f2e948Smrg case $lt_cv_dlopen_self_static in 196250f2e948Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 196350f2e948Smrg *) enable_dlopen_self_static=unknown ;; 196450f2e948Smrg esac 196550f2e948Smrgfi 19665592a31fSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 19675592a31fSmrg [Whether dlopen is supported]) 19685592a31fSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 19695592a31fSmrg [Whether dlopen of programs is supported]) 19705592a31fSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 19715592a31fSmrg [Whether dlopen of statically linked programs is supported]) 19725592a31fSmrg])# LT_SYS_DLOPEN_SELF 1973226fade8Smrg 19745592a31fSmrg# Old name: 19755592a31fSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 19765592a31fSmrgdnl aclocal-1.4 backwards compatibility: 19775592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1978226fade8Smrg 19795592a31fSmrg 19805592a31fSmrg# _LT_COMPILER_C_O([TAGNAME]) 19815592a31fSmrg# --------------------------- 19825592a31fSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 19835592a31fSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 19845592a31fSmrgm4_defun([_LT_COMPILER_C_O], 19855592a31fSmrg[m4_require([_LT_DECL_SED])dnl 19865592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19875592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 198850f2e948SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 19895592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 19905592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 19915592a31fSmrg $RM -r conftest 2>/dev/null 199250f2e948Smrg mkdir conftest 199350f2e948Smrg cd conftest 199450f2e948Smrg mkdir out 199550f2e948Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1996226fade8Smrg 199750f2e948Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 199850f2e948Smrg # Insert the option either (1) after the last *FLAGS variable, or 199950f2e948Smrg # (2) before a word containing "conftest.", or (3) at the end. 200050f2e948Smrg # Note that $ac_compile itself does not contain backslashes and begins 200150f2e948Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 200250f2e948Smrg lt_compile=`echo "$ac_compile" | $SED \ 200350f2e948Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 200450f2e948Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 200550f2e948Smrg -e 's:$: $lt_compiler_flag:'` 2006b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 200750f2e948Smrg (eval "$lt_compile" 2>out/conftest.err) 200850f2e948Smrg ac_status=$? 200950f2e948Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2010b40a6198Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 201150f2e948Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 201250f2e948Smrg then 201350f2e948Smrg # The compiler can only warn and ignore the option if not recognized 201450f2e948Smrg # So say no if there are warnings 2015b40a6198Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 201650f2e948Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 201750f2e948Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20185592a31fSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 201950f2e948Smrg fi 202050f2e948Smrg fi 202150f2e948Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 20225592a31fSmrg $RM conftest* 202350f2e948Smrg # SGI C++ compiler will create directory out/ii_files/ for 202450f2e948Smrg # template instantiation 20255592a31fSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 20265592a31fSmrg $RM out/* && rmdir out 202750f2e948Smrg cd .. 20285592a31fSmrg $RM -r conftest 20295592a31fSmrg $RM conftest* 203050f2e948Smrg]) 20315592a31fSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 20325592a31fSmrg [Does compiler simultaneously support -c and -o options?]) 20335592a31fSmrg])# _LT_COMPILER_C_O 2034226fade8Smrg 2035226fade8Smrg 20365592a31fSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 20375592a31fSmrg# ---------------------------------- 203850f2e948Smrg# Check to see if we can do hard links to lock some files if needed 20395592a31fSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 20405592a31fSmrg[m4_require([_LT_ENABLE_LOCK])dnl 20415592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20425592a31fSmrg_LT_COMPILER_C_O([$1]) 2043226fade8Smrg 204450f2e948Smrghard_links="nottested" 20455592a31fSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 204650f2e948Smrg # do not overwrite the value of need_locks provided by the user 204750f2e948Smrg AC_MSG_CHECKING([if we can lock with hard links]) 204850f2e948Smrg hard_links=yes 20495592a31fSmrg $RM conftest* 205050f2e948Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205150f2e948Smrg touch conftest.a 205250f2e948Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 205350f2e948Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205450f2e948Smrg AC_MSG_RESULT([$hard_links]) 205550f2e948Smrg if test "$hard_links" = no; then 205650f2e948Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 205750f2e948Smrg need_locks=warn 205850f2e948Smrg fi 205950f2e948Smrgelse 206050f2e948Smrg need_locks=no 206150f2e948Smrgfi 20625592a31fSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 20635592a31fSmrg])# _LT_COMPILER_FILE_LOCKS 2064226fade8Smrg 2065226fade8Smrg 20665592a31fSmrg# _LT_CHECK_OBJDIR 20675592a31fSmrg# ---------------- 20685592a31fSmrgm4_defun([_LT_CHECK_OBJDIR], 206950f2e948Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 207050f2e948Smrg[rm -f .libs 2>/dev/null 207150f2e948Smrgmkdir .libs 2>/dev/null 207250f2e948Smrgif test -d .libs; then 207350f2e948Smrg lt_cv_objdir=.libs 207450f2e948Smrgelse 207550f2e948Smrg # MS-DOS does not allow filenames that begin with a dot. 207650f2e948Smrg lt_cv_objdir=_libs 207750f2e948Smrgfi 207850f2e948Smrgrmdir .libs 2>/dev/null]) 207950f2e948Smrgobjdir=$lt_cv_objdir 20805592a31fSmrg_LT_DECL([], [objdir], [0], 20815592a31fSmrg [The name of the directory that contains temporary libtool files])dnl 20825592a31fSmrgm4_pattern_allow([LT_OBJDIR])dnl 20835592a31fSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 20845592a31fSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 20855592a31fSmrg])# _LT_CHECK_OBJDIR 2086226fade8Smrg 2087226fade8Smrg 20885592a31fSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 20895592a31fSmrg# -------------------------------------- 209050f2e948Smrg# Check hardcoding attributes. 20915592a31fSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 209250f2e948Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 20935592a31fSmrg_LT_TAGVAR(hardcode_action, $1)= 20945592a31fSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 20955592a31fSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 20965592a31fSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 209745bc899bSmrg 20985592a31fSmrg # We can hardcode non-existent directories. 20995592a31fSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 210050f2e948Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 210150f2e948Smrg # have to relink, otherwise we might link with an installed library 210250f2e948Smrg # when we should be linking with a yet-to-be-installed one 21035592a31fSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 21045592a31fSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 210550f2e948Smrg # Linking always hardcodes the temporary library directory. 21065592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=relink 210750f2e948Smrg else 210850f2e948Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21095592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 211050f2e948Smrg fi 211150f2e948Smrgelse 211250f2e948Smrg # We cannot hardcode anything, or else we can only hardcode existing 211350f2e948Smrg # directories. 21145592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 211550f2e948Smrgfi 21165592a31fSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2117226fade8Smrg 21185592a31fSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 21195592a31fSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 212050f2e948Smrg # Fast installation is not supported 212150f2e948Smrg enable_fast_install=no 212250f2e948Smrgelif test "$shlibpath_overrides_runpath" = yes || 212350f2e948Smrg test "$enable_shared" = no; then 212450f2e948Smrg # Fast installation is not necessary 212550f2e948Smrg enable_fast_install=needless 212650f2e948Smrgfi 21275592a31fSmrg_LT_TAGDECL([], [hardcode_action], [0], 21285592a31fSmrg [How to hardcode a shared library path into an executable]) 21295592a31fSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2130226fade8Smrg 2131226fade8Smrg 21325592a31fSmrg# _LT_CMD_STRIPLIB 21335592a31fSmrg# ---------------- 21345592a31fSmrgm4_defun([_LT_CMD_STRIPLIB], 21355592a31fSmrg[m4_require([_LT_DECL_EGREP]) 21365592a31fSmrgstriplib= 213750f2e948Smrgold_striplib= 213850f2e948SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 21395592a31fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 214050f2e948Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 214150f2e948Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 214250f2e948Smrg AC_MSG_RESULT([yes]) 214350f2e948Smrgelse 214450f2e948Smrg# FIXME - insert some real tests, host_os isn't really good enough 214550f2e948Smrg case $host_os in 21465592a31fSmrg darwin*) 21475592a31fSmrg if test -n "$STRIP" ; then 21485592a31fSmrg striplib="$STRIP -x" 21495592a31fSmrg old_striplib="$STRIP -S" 21505592a31fSmrg AC_MSG_RESULT([yes]) 21515592a31fSmrg else 21525592a31fSmrg AC_MSG_RESULT([no]) 21535592a31fSmrg fi 21545592a31fSmrg ;; 21555592a31fSmrg *) 21565592a31fSmrg AC_MSG_RESULT([no]) 215750f2e948Smrg ;; 215850f2e948Smrg esac 215950f2e948Smrgfi 21605592a31fSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 21615592a31fSmrg_LT_DECL([], [striplib], [1]) 21625592a31fSmrg])# _LT_CMD_STRIPLIB 216345bc899bSmrg 216445bc899bSmrg 21655592a31fSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 216650f2e948Smrg# ----------------------------- 216750f2e948Smrg# PORTME Fill in your ld.so characteristics 21685592a31fSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 21695592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 21705592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 21715592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21725592a31fSmrgm4_require([_LT_DECL_OBJDUMP])dnl 21735592a31fSmrgm4_require([_LT_DECL_SED])dnl 2174b40a6198Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 217550f2e948SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 21765592a31fSmrgm4_if([$1], 21775592a31fSmrg [], [ 217850f2e948Smrgif test "$GCC" = yes; then 217950f2e948Smrg case $host_os in 218050f2e948Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 218150f2e948Smrg *) lt_awk_arg="/^libraries:/" ;; 218250f2e948Smrg esac 2183b40a6198Smrg case $host_os in 2184b40a6198Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2185b40a6198Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2186b40a6198Smrg esac 2187b40a6198Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2188b40a6198Smrg case $lt_search_path_spec in 2189b40a6198Smrg *\;*) 219050f2e948Smrg # if the path contains ";" then we assume it to be the separator 219150f2e948Smrg # otherwise default to the standard path separator (i.e. ":") - it is 219250f2e948Smrg # assumed that no part of a normal pathname contains ";" but that should 219350f2e948Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2194b40a6198Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2195b40a6198Smrg ;; 2196b40a6198Smrg *) 2197b40a6198Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2198b40a6198Smrg ;; 2199b40a6198Smrg esac 220050f2e948Smrg # Ok, now we have the path, separated by spaces, we can step through it 220150f2e948Smrg # and add multilib dir if necessary. 220250f2e948Smrg lt_tmp_lt_search_path_spec= 220350f2e948Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 220450f2e948Smrg for lt_sys_path in $lt_search_path_spec; do 220550f2e948Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 220650f2e948Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 220750f2e948Smrg else 220850f2e948Smrg test -d "$lt_sys_path" && \ 220950f2e948Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 22101ac89addSmrg fi 22111ac89addSmrg done 2212b40a6198Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 221350f2e948SmrgBEGIN {RS=" "; FS="/|\n";} { 221450f2e948Smrg lt_foo=""; 221550f2e948Smrg lt_count=0; 221650f2e948Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 221750f2e948Smrg if ($lt_i != "" && $lt_i != ".") { 221850f2e948Smrg if ($lt_i == "..") { 221950f2e948Smrg lt_count++; 222050f2e948Smrg } else { 222150f2e948Smrg if (lt_count == 0) { 222250f2e948Smrg lt_foo="/" $lt_i lt_foo; 222350f2e948Smrg } else { 222450f2e948Smrg lt_count--; 222550f2e948Smrg } 222650f2e948Smrg } 222750f2e948Smrg } 222850f2e948Smrg } 222950f2e948Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 223050f2e948Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 223150f2e948Smrg}'` 2232b40a6198Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2233b40a6198Smrg # for these hosts. 2234b40a6198Smrg case $host_os in 2235b40a6198Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2236b40a6198Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2237b40a6198Smrg esac 2238b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 22391ac89addSmrgelse 224050f2e948Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 224150f2e948Smrgfi]) 22425592a31fSmrglibrary_names_spec= 22435592a31fSmrglibname_spec='lib$name' 22445592a31fSmrgsoname_spec= 22455592a31fSmrgshrext_cmds=".so" 22465592a31fSmrgpostinstall_cmds= 22475592a31fSmrgpostuninstall_cmds= 22485592a31fSmrgfinish_cmds= 22495592a31fSmrgfinish_eval= 22505592a31fSmrgshlibpath_var= 22515592a31fSmrgshlibpath_overrides_runpath=unknown 22525592a31fSmrgversion_type=none 22535592a31fSmrgdynamic_linker="$host_os ld.so" 22545592a31fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 225550f2e948Smrgneed_lib_prefix=unknown 225650f2e948Smrghardcode_into_libs=no 225745bc899bSmrg 225850f2e948Smrg# when you set need_version to no, make sure it does not cause -set_version 225950f2e948Smrg# flags to be left without arguments 226050f2e948Smrgneed_version=unknown 226145bc899bSmrg 226250f2e948Smrgcase $host_os in 226350f2e948Smrgaix3*) 2264b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 226550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 226650f2e948Smrg shlibpath_var=LIBPATH 226745bc899bSmrg 226850f2e948Smrg # AIX 3 has no versioning support, so we append a major version to the name. 226950f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 227050f2e948Smrg ;; 227145bc899bSmrg 227250f2e948Smrgaix[[4-9]]*) 2273b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 227450f2e948Smrg need_lib_prefix=no 227550f2e948Smrg need_version=no 227650f2e948Smrg hardcode_into_libs=yes 227750f2e948Smrg if test "$host_cpu" = ia64; then 227850f2e948Smrg # AIX 5 supports IA64 227950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 228050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 228150f2e948Smrg else 228250f2e948Smrg # With GCC up to 2.95.x, collect2 would create an import file 228350f2e948Smrg # for dependence libraries. The import file would start with 228450f2e948Smrg # the line `#! .'. This would cause the generated library to 228550f2e948Smrg # depend on `.', always an invalid library. This was fixed in 228650f2e948Smrg # development snapshots of GCC prior to 3.0. 228750f2e948Smrg case $host_os in 228850f2e948Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 228950f2e948Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 229050f2e948Smrg echo ' yes ' 22915592a31fSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 229250f2e948Smrg : 229350f2e948Smrg else 229450f2e948Smrg can_build_shared=no 229550f2e948Smrg fi 22961ac89addSmrg ;; 229750f2e948Smrg esac 229850f2e948Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 229950f2e948Smrg # soname into executable. Probably we can add versioning support to 230050f2e948Smrg # collect2, so additional links can be useful in future. 230150f2e948Smrg if test "$aix_use_runtimelinking" = yes; then 230250f2e948Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 230350f2e948Smrg # instead of lib<name>.a to let people know that these are not 230450f2e948Smrg # typical AIX shared libraries. 230550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 230650f2e948Smrg else 230750f2e948Smrg # We preserve .a as extension for shared libraries through AIX4.2 230850f2e948Smrg # and later when we are not doing run time linking. 230950f2e948Smrg library_names_spec='${libname}${release}.a $libname.a' 231050f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 23111ac89addSmrg fi 231250f2e948Smrg shlibpath_var=LIBPATH 231350f2e948Smrg fi 23141ac89addSmrg ;; 231545bc899bSmrg 231650f2e948Smrgamigaos*) 23175592a31fSmrg case $host_cpu in 23185592a31fSmrg powerpc) 23195592a31fSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 23205592a31fSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 23215592a31fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23225592a31fSmrg ;; 23235592a31fSmrg m68k) 23245592a31fSmrg library_names_spec='$libname.ixlibrary $libname.a' 23255592a31fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2326b40a6198Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' 23275592a31fSmrg ;; 23285592a31fSmrg esac 23291ac89addSmrg ;; 233045bc899bSmrg 23311ac89addSmrgbeos*) 233250f2e948Smrg library_names_spec='${libname}${shared_ext}' 233350f2e948Smrg dynamic_linker="$host_os ld.so" 233450f2e948Smrg shlibpath_var=LIBRARY_PATH 23351ac89addSmrg ;; 233645bc899bSmrg 23371ac89addSmrgbsdi[[45]]*) 2338b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 233950f2e948Smrg need_version=no 234050f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 234150f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 234250f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 234350f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 234450f2e948Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 234550f2e948Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 234650f2e948Smrg # the default ld.so.conf also contains /usr/contrib/lib and 234750f2e948Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 234850f2e948Smrg # libtool to hard-code these into programs 23491ac89addSmrg ;; 235045bc899bSmrg 23515592a31fSmrgcygwin* | mingw* | pw32* | cegcc*) 235250f2e948Smrg version_type=windows 235350f2e948Smrg shrext_cmds=".dll" 235450f2e948Smrg need_version=no 235550f2e948Smrg need_lib_prefix=no 235645bc899bSmrg 2357b40a6198Smrg case $GCC,$cc_basename in 2358b40a6198Smrg yes,*) 2359b40a6198Smrg # gcc 236050f2e948Smrg library_names_spec='$libname.dll.a' 236150f2e948Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 236250f2e948Smrg postinstall_cmds='base_file=`basename \${file}`~ 23635592a31fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 236450f2e948Smrg dldir=$destdir/`dirname \$dlpath`~ 236550f2e948Smrg test -d \$dldir || mkdir -p \$dldir~ 236650f2e948Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 23675592a31fSmrg chmod a+x \$dldir/$dlname~ 23685592a31fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 23695592a31fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 23705592a31fSmrg fi' 237150f2e948Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 237250f2e948Smrg dlpath=$dir/\$dldll~ 23735592a31fSmrg $RM \$dlpath' 237450f2e948Smrg shlibpath_overrides_runpath=yes 237545bc899bSmrg 237650f2e948Smrg case $host_os in 237750f2e948Smrg cygwin*) 237850f2e948Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 237950f2e948Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2380b40a6198Smrgm4_if([$1], [],[ 2381b40a6198Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 238250f2e948Smrg ;; 23835592a31fSmrg mingw* | cegcc*) 238450f2e948Smrg # MinGW DLLs use traditional 'lib' prefix 238550f2e948Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 238650f2e948Smrg ;; 238750f2e948Smrg pw32*) 238850f2e948Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 238950f2e948Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 239045bc899bSmrg ;; 239145bc899bSmrg esac 2392b40a6198Smrg dynamic_linker='Win32 ld.exe' 2393b40a6198Smrg ;; 2394b40a6198Smrg 2395b40a6198Smrg *,cl*) 2396b40a6198Smrg # Native MSVC 2397b40a6198Smrg libname_spec='$name' 2398b40a6198Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2399b40a6198Smrg library_names_spec='${libname}.dll.lib' 2400b40a6198Smrg 2401b40a6198Smrg case $build_os in 2402b40a6198Smrg mingw*) 2403b40a6198Smrg sys_lib_search_path_spec= 2404b40a6198Smrg lt_save_ifs=$IFS 2405b40a6198Smrg IFS=';' 2406b40a6198Smrg for lt_path in $LIB 2407b40a6198Smrg do 2408b40a6198Smrg IFS=$lt_save_ifs 2409b40a6198Smrg # Let DOS variable expansion print the short 8.3 style file name. 2410b40a6198Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2411b40a6198Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2412b40a6198Smrg done 2413b40a6198Smrg IFS=$lt_save_ifs 2414b40a6198Smrg # Convert to MSYS style. 2415b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2416b40a6198Smrg ;; 2417b40a6198Smrg cygwin*) 2418b40a6198Smrg # Convert to unix form, then to dos form, then back to unix form 2419b40a6198Smrg # but this time dos style (no spaces!) so that the unix form looks 2420b40a6198Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2421b40a6198Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2422b40a6198Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2423b40a6198Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2424b40a6198Smrg ;; 2425b40a6198Smrg *) 2426b40a6198Smrg sys_lib_search_path_spec="$LIB" 2427b40a6198Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2428b40a6198Smrg # It is most probably a Windows format PATH. 2429b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2430b40a6198Smrg else 2431b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2432b40a6198Smrg fi 2433b40a6198Smrg # FIXME: find the short name or the path components, as spaces are 2434b40a6198Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2435b40a6198Smrg ;; 2436b40a6198Smrg esac 2437b40a6198Smrg 2438b40a6198Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2439b40a6198Smrg postinstall_cmds='base_file=`basename \${file}`~ 2440b40a6198Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2441b40a6198Smrg dldir=$destdir/`dirname \$dlpath`~ 2442b40a6198Smrg test -d \$dldir || mkdir -p \$dldir~ 2443b40a6198Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2444b40a6198Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2445b40a6198Smrg dlpath=$dir/\$dldll~ 2446b40a6198Smrg $RM \$dlpath' 2447b40a6198Smrg shlibpath_overrides_runpath=yes 2448b40a6198Smrg dynamic_linker='Win32 link.exe' 244950f2e948Smrg ;; 245045bc899bSmrg 245150f2e948Smrg *) 2452b40a6198Smrg # Assume MSVC wrapper 245350f2e948Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2454b40a6198Smrg dynamic_linker='Win32 ld.exe' 245550f2e948Smrg ;; 245650f2e948Smrg esac 245750f2e948Smrg # FIXME: first we should search . and the directory the executable is in 245850f2e948Smrg shlibpath_var=PATH 24591ac89addSmrg ;; 246045bc899bSmrg 246150f2e948Smrgdarwin* | rhapsody*) 246250f2e948Smrg dynamic_linker="$host_os dyld" 246350f2e948Smrg version_type=darwin 246450f2e948Smrg need_lib_prefix=no 246550f2e948Smrg need_version=no 24665592a31fSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 246750f2e948Smrg soname_spec='${libname}${release}${major}$shared_ext' 246850f2e948Smrg shlibpath_overrides_runpath=yes 246950f2e948Smrg shlibpath_var=DYLD_LIBRARY_PATH 247050f2e948Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 24715592a31fSmrgm4_if([$1], [],[ 24725592a31fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 247350f2e948Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 247450f2e948Smrg ;; 247550f2e948Smrg 247650f2e948Smrgdgux*) 2477b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 247850f2e948Smrg need_lib_prefix=no 247950f2e948Smrg need_version=no 248050f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 248150f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 248250f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 248350f2e948Smrg ;; 248450f2e948Smrg 248550f2e948Smrgfreebsd* | dragonfly*) 248650f2e948Smrg # DragonFly does not have aout. When/if they implement a new 248750f2e948Smrg # versioning mechanism, adjust this. 248850f2e948Smrg if test -x /usr/bin/objformat; then 248950f2e948Smrg objformat=`/usr/bin/objformat` 249050f2e948Smrg else 249150f2e948Smrg case $host_os in 2492b40a6198Smrg freebsd[[23]].*) objformat=aout ;; 249350f2e948Smrg *) objformat=elf ;; 249450f2e948Smrg esac 249550f2e948Smrg fi 249650f2e948Smrg version_type=freebsd-$objformat 249750f2e948Smrg case $version_type in 249850f2e948Smrg freebsd-elf*) 249950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 250050f2e948Smrg need_version=no 250150f2e948Smrg need_lib_prefix=no 250250f2e948Smrg ;; 250350f2e948Smrg freebsd-*) 250450f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 250550f2e948Smrg need_version=yes 250650f2e948Smrg ;; 250750f2e948Smrg esac 250850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 250950f2e948Smrg case $host_os in 2510b40a6198Smrg freebsd2.*) 251150f2e948Smrg shlibpath_overrides_runpath=yes 251250f2e948Smrg ;; 251350f2e948Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 251450f2e948Smrg shlibpath_overrides_runpath=yes 251550f2e948Smrg hardcode_into_libs=yes 251650f2e948Smrg ;; 251750f2e948Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 251850f2e948Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 251950f2e948Smrg shlibpath_overrides_runpath=no 252050f2e948Smrg hardcode_into_libs=yes 252150f2e948Smrg ;; 252250f2e948Smrg *) # from 4.6 on, and DragonFly 252350f2e948Smrg shlibpath_overrides_runpath=yes 252450f2e948Smrg hardcode_into_libs=yes 252550f2e948Smrg ;; 252650f2e948Smrg esac 252750f2e948Smrg ;; 252850f2e948Smrg 252950f2e948Smrggnu*) 2530b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 253150f2e948Smrg need_lib_prefix=no 253250f2e948Smrg need_version=no 253350f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 253450f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 253550f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 2536b40a6198Smrg shlibpath_overrides_runpath=no 2537b40a6198Smrg hardcode_into_libs=yes 2538b40a6198Smrg ;; 2539b40a6198Smrg 2540b40a6198Smrghaiku*) 2541b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 2542b40a6198Smrg need_lib_prefix=no 2543b40a6198Smrg need_version=no 2544b40a6198Smrg dynamic_linker="$host_os runtime_loader" 2545b40a6198Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2546b40a6198Smrg soname_spec='${libname}${release}${shared_ext}$major' 2547b40a6198Smrg shlibpath_var=LIBRARY_PATH 2548b40a6198Smrg shlibpath_overrides_runpath=yes 2549b40a6198Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 255050f2e948Smrg hardcode_into_libs=yes 255150f2e948Smrg ;; 255250f2e948Smrg 255350f2e948Smrghpux9* | hpux10* | hpux11*) 255450f2e948Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 255550f2e948Smrg # link against other versions. 255650f2e948Smrg version_type=sunos 255750f2e948Smrg need_lib_prefix=no 255850f2e948Smrg need_version=no 255950f2e948Smrg case $host_cpu in 25601ac89addSmrg ia64*) 256150f2e948Smrg shrext_cmds='.so' 256250f2e948Smrg hardcode_into_libs=yes 256350f2e948Smrg dynamic_linker="$host_os dld.so" 256450f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 256550f2e948Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 256650f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 256750f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 256850f2e948Smrg if test "X$HPUX_IA64_MODE" = X32; then 256950f2e948Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 257050f2e948Smrg else 257150f2e948Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 257250f2e948Smrg fi 257350f2e948Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 257445bc899bSmrg ;; 25755592a31fSmrg hppa*64*) 25765592a31fSmrg shrext_cmds='.sl' 25775592a31fSmrg hardcode_into_libs=yes 25785592a31fSmrg dynamic_linker="$host_os dld.sl" 25795592a31fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 25805592a31fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25815592a31fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25825592a31fSmrg soname_spec='${libname}${release}${shared_ext}$major' 25835592a31fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 25845592a31fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25855592a31fSmrg ;; 25865592a31fSmrg *) 258750f2e948Smrg shrext_cmds='.sl' 258850f2e948Smrg dynamic_linker="$host_os dld.sl" 258950f2e948Smrg shlibpath_var=SHLIB_PATH 259050f2e948Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 259150f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 259250f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 259345bc899bSmrg ;; 25941ac89addSmrg esac 2595b40a6198Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 259650f2e948Smrg postinstall_cmds='chmod 555 $lib' 2597b40a6198Smrg # or fails outright, so override atomically: 2598b40a6198Smrg install_override_mode=555 25991ac89addSmrg ;; 260045bc899bSmrg 260150f2e948Smrginterix[[3-9]]*) 2602b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 260350f2e948Smrg need_lib_prefix=no 260450f2e948Smrg need_version=no 260550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 260650f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 260750f2e948Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 260850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 260950f2e948Smrg shlibpath_overrides_runpath=no 261050f2e948Smrg hardcode_into_libs=yes 26111ac89addSmrg ;; 261245bc899bSmrg 26131ac89addSmrgirix5* | irix6* | nonstopux*) 261450f2e948Smrg case $host_os in 261550f2e948Smrg nonstopux*) version_type=nonstopux ;; 261650f2e948Smrg *) 261750f2e948Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2618b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 261950f2e948Smrg else 262050f2e948Smrg version_type=irix 262150f2e948Smrg fi ;; 26221ac89addSmrg esac 262350f2e948Smrg need_lib_prefix=no 262450f2e948Smrg need_version=no 262550f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 262650f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 262750f2e948Smrg case $host_os in 262850f2e948Smrg irix5* | nonstopux*) 262950f2e948Smrg libsuff= shlibsuff= 263050f2e948Smrg ;; 263150f2e948Smrg *) 263250f2e948Smrg case $LD in # libtool.m4 will add one of these switches to LD 263350f2e948Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 263450f2e948Smrg libsuff= shlibsuff= libmagic=32-bit;; 263550f2e948Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 263650f2e948Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 263750f2e948Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 263850f2e948Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 263950f2e948Smrg *) libsuff= shlibsuff= libmagic=never-match;; 264050f2e948Smrg esac 264150f2e948Smrg ;; 264250f2e948Smrg esac 264350f2e948Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 264450f2e948Smrg shlibpath_overrides_runpath=no 264550f2e948Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 264650f2e948Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 264750f2e948Smrg hardcode_into_libs=yes 264850f2e948Smrg ;; 264950f2e948Smrg 265050f2e948Smrg# No shared lib support for Linux oldld, aout, or coff. 265150f2e948Smrglinux*oldld* | linux*aout* | linux*coff*) 265250f2e948Smrg dynamic_linker=no 26531ac89addSmrg ;; 265445bc899bSmrg 2655b40a6198Smrg# This must be glibc/ELF. 2656b40a6198Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 2657b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 265850f2e948Smrg need_lib_prefix=no 265950f2e948Smrg need_version=no 266050f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 266150f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 266250f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 266350f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 266450f2e948Smrg shlibpath_overrides_runpath=no 2665b40a6198Smrg 26665592a31fSmrg # Some binutils ld are patched to set DT_RUNPATH 2667b40a6198Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2668b40a6198Smrg [lt_cv_shlibpath_overrides_runpath=no 2669b40a6198Smrg save_LDFLAGS=$LDFLAGS 2670b40a6198Smrg save_libdir=$libdir 2671b40a6198Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2672b40a6198Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2673b40a6198Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2674b40a6198Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2675b40a6198Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2676b40a6198Smrg LDFLAGS=$save_LDFLAGS 2677b40a6198Smrg libdir=$save_libdir 2678b40a6198Smrg ]) 2679b40a6198Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 26805592a31fSmrg 268150f2e948Smrg # This implies no fast_install, which is unacceptable. 268250f2e948Smrg # Some rework will be needed to allow for fast_install 268350f2e948Smrg # before this can be enabled. 268450f2e948Smrg hardcode_into_libs=yes 26855592a31fSmrg 26865592a31fSmrg # Add ABI-specific directories to the system library path. 26875592a31fSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 268850f2e948Smrg 268950f2e948Smrg # Append ld.so.conf contents to the search path 269050f2e948Smrg if test -f /etc/ld.so.conf; then 2691b40a6198Smrg lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` 26923a925b30Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2693b40a6198Smrg 269450f2e948Smrg fi 269550f2e948Smrg 269650f2e948Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 269750f2e948Smrg # powerpc, because MkLinux only supported shared libraries with the 269850f2e948Smrg # GNU dynamic linker. Since this was broken with cross compilers, 269950f2e948Smrg # most powerpc-linux boxes support dynamic linking these days and 270050f2e948Smrg # people can always --disable-shared, the test was removed, and we 270150f2e948Smrg # assume the GNU/Linux dynamic linker is in use. 270250f2e948Smrg dynamic_linker='GNU/Linux ld.so' 27031ac89addSmrg ;; 270445bc899bSmrg 27051ac89addSmrgnetbsd*) 270650f2e948Smrg version_type=sunos 270750f2e948Smrg need_lib_prefix=no 270850f2e948Smrg need_version=no 27095592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 271050f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 271150f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 271250f2e948Smrg dynamic_linker='NetBSD (a.out) ld.so' 27131ac89addSmrg else 271450f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 271550f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 271650f2e948Smrg dynamic_linker='NetBSD ld.elf_so' 27171ac89addSmrg fi 271850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 271950f2e948Smrg shlibpath_overrides_runpath=yes 272050f2e948Smrg hardcode_into_libs=yes 27211ac89addSmrg ;; 272245bc899bSmrg 272350f2e948Smrgnewsos6) 2724b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 272550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 272650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 272750f2e948Smrg shlibpath_overrides_runpath=yes 27281ac89addSmrg ;; 272945bc899bSmrg 27305592a31fSmrg*nto* | *qnx*) 27315592a31fSmrg version_type=qnx 273250f2e948Smrg need_lib_prefix=no 273350f2e948Smrg need_version=no 273450f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 273550f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 273650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 27375592a31fSmrg shlibpath_overrides_runpath=no 27385592a31fSmrg hardcode_into_libs=yes 27395592a31fSmrg dynamic_linker='ldqnx.so' 27401ac89addSmrg ;; 274145bc899bSmrg 27421ac89addSmrgopenbsd*) 274350f2e948Smrg version_type=sunos 274450f2e948Smrg sys_lib_dlsearch_path_spec="/usr/lib" 274550f2e948Smrg need_lib_prefix=no 274650f2e948Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 274750f2e948Smrg case $host_os in 27485592a31fSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 27495592a31fSmrg *) need_version=no ;; 275050f2e948Smrg esac 275150f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 275250f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 275350f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 27545592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 275550f2e948Smrg case $host_os in 275650f2e948Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 275750f2e948Smrg shlibpath_overrides_runpath=no 275850f2e948Smrg ;; 275950f2e948Smrg *) 276050f2e948Smrg shlibpath_overrides_runpath=yes 276150f2e948Smrg ;; 276250f2e948Smrg esac 27631ac89addSmrg else 276450f2e948Smrg shlibpath_overrides_runpath=yes 27651ac89addSmrg fi 27661ac89addSmrg ;; 276745bc899bSmrg 276850f2e948Smrgos2*) 276950f2e948Smrg libname_spec='$name' 277050f2e948Smrg shrext_cmds=".dll" 277150f2e948Smrg need_lib_prefix=no 277250f2e948Smrg library_names_spec='$libname${shared_ext} $libname.a' 277350f2e948Smrg dynamic_linker='OS/2 ld.exe' 277450f2e948Smrg shlibpath_var=LIBPATH 27751ac89addSmrg ;; 27761ac89addSmrg 277750f2e948Smrgosf3* | osf4* | osf5*) 277850f2e948Smrg version_type=osf 277950f2e948Smrg need_lib_prefix=no 278050f2e948Smrg need_version=no 278150f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 278250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 278350f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 278450f2e948Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 278550f2e948Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 27861ac89addSmrg ;; 278745bc899bSmrg 278850f2e948Smrgrdos*) 278950f2e948Smrg dynamic_linker=no 27901ac89addSmrg ;; 279145bc899bSmrg 279250f2e948Smrgsolaris*) 2793b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 279450f2e948Smrg need_lib_prefix=no 279550f2e948Smrg need_version=no 279650f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 279750f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 279850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 279950f2e948Smrg shlibpath_overrides_runpath=yes 280050f2e948Smrg hardcode_into_libs=yes 280150f2e948Smrg # ldd complains unless libraries are executable 280250f2e948Smrg postinstall_cmds='chmod +x $lib' 280350f2e948Smrg ;; 280445bc899bSmrg 280550f2e948Smrgsunos4*) 280650f2e948Smrg version_type=sunos 280750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 280850f2e948Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 280950f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 281050f2e948Smrg shlibpath_overrides_runpath=yes 281150f2e948Smrg if test "$with_gnu_ld" = yes; then 281250f2e948Smrg need_lib_prefix=no 28131ac89addSmrg fi 281450f2e948Smrg need_version=yes 281545bc899bSmrg ;; 281645bc899bSmrg 281750f2e948Smrgsysv4 | sysv4.3*) 2818b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 281950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 282050f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 282150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 282250f2e948Smrg case $host_vendor in 282350f2e948Smrg sni) 282450f2e948Smrg shlibpath_overrides_runpath=no 282550f2e948Smrg need_lib_prefix=no 282650f2e948Smrg runpath_var=LD_RUN_PATH 282750f2e948Smrg ;; 282850f2e948Smrg siemens) 282950f2e948Smrg need_lib_prefix=no 283050f2e948Smrg ;; 283150f2e948Smrg motorola) 283250f2e948Smrg need_lib_prefix=no 283350f2e948Smrg need_version=no 283450f2e948Smrg shlibpath_overrides_runpath=no 283550f2e948Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 283650f2e948Smrg ;; 2837226fade8Smrg esac 283850f2e948Smrg ;; 283945bc899bSmrg 284050f2e948Smrgsysv4*MP*) 284150f2e948Smrg if test -d /usr/nec ;then 2842b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 284350f2e948Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 284450f2e948Smrg soname_spec='$libname${shared_ext}.$major' 284550f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 284650f2e948Smrg fi 284750f2e948Smrg ;; 284845bc899bSmrg 284950f2e948Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 285050f2e948Smrg version_type=freebsd-elf 285150f2e948Smrg need_lib_prefix=no 285250f2e948Smrg need_version=no 285350f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 285450f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 285550f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 28565592a31fSmrg shlibpath_overrides_runpath=yes 285750f2e948Smrg hardcode_into_libs=yes 285850f2e948Smrg if test "$with_gnu_ld" = yes; then 285950f2e948Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2860226fade8Smrg else 286150f2e948Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 286250f2e948Smrg case $host_os in 286350f2e948Smrg sco3.2v5*) 286450f2e948Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 286550f2e948Smrg ;; 286650f2e948Smrg esac 2867226fade8Smrg fi 286850f2e948Smrg sys_lib_dlsearch_path_spec='/usr/lib' 286950f2e948Smrg ;; 287045bc899bSmrg 28715592a31fSmrgtpf*) 28725592a31fSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2873b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 28745592a31fSmrg need_lib_prefix=no 28755592a31fSmrg need_version=no 28765592a31fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28775592a31fSmrg shlibpath_var=LD_LIBRARY_PATH 28785592a31fSmrg shlibpath_overrides_runpath=no 28795592a31fSmrg hardcode_into_libs=yes 28805592a31fSmrg ;; 28815592a31fSmrg 288250f2e948Smrguts4*) 2883b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 288450f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 288550f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 288650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 288750f2e948Smrg ;; 2888226fade8Smrg 288950f2e948Smrg*) 289050f2e948Smrg dynamic_linker=no 289150f2e948Smrg ;; 289250f2e948Smrgesac 289350f2e948SmrgAC_MSG_RESULT([$dynamic_linker]) 289450f2e948Smrgtest "$dynamic_linker" = no && can_build_shared=no 2895226fade8Smrg 289650f2e948Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 289750f2e948Smrgif test "$GCC" = yes; then 289850f2e948Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 28991ac89addSmrgfi 290045bc899bSmrg 29015592a31fSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 29025592a31fSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 29035592a31fSmrgfi 29045592a31fSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 29055592a31fSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 29065592a31fSmrgfi 290745bc899bSmrg 29085592a31fSmrg_LT_DECL([], [variables_saved_for_relink], [1], 29095592a31fSmrg [Variables whose values should be saved in libtool wrapper scripts and 29105592a31fSmrg restored at link time]) 29115592a31fSmrg_LT_DECL([], [need_lib_prefix], [0], 29125592a31fSmrg [Do we need the "lib" prefix for modules?]) 29135592a31fSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 29145592a31fSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 29155592a31fSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 29165592a31fSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 29175592a31fSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 29185592a31fSmrg [Is shlibpath searched before the hard-coded library search path?]) 29195592a31fSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 29205592a31fSmrg_LT_DECL([], [library_names_spec], [1], 29215592a31fSmrg [[List of archive names. First name is the real one, the rest are links. 29225592a31fSmrg The last name is the one that the linker finds with -lNAME]]) 29235592a31fSmrg_LT_DECL([], [soname_spec], [1], 29245592a31fSmrg [[The coded name of the library, if different from the real name]]) 2925b40a6198Smrg_LT_DECL([], [install_override_mode], [1], 2926b40a6198Smrg [Permission mode override for installation of shared libraries]) 29275592a31fSmrg_LT_DECL([], [postinstall_cmds], [2], 29285592a31fSmrg [Command to use after installation of a shared archive]) 29295592a31fSmrg_LT_DECL([], [postuninstall_cmds], [2], 29305592a31fSmrg [Command to use after uninstallation of a shared archive]) 29315592a31fSmrg_LT_DECL([], [finish_cmds], [2], 29325592a31fSmrg [Commands used to finish a libtool library installation in a directory]) 29335592a31fSmrg_LT_DECL([], [finish_eval], [1], 29345592a31fSmrg [[As "finish_cmds", except a single script fragment to be evaled but 29355592a31fSmrg not shown]]) 29365592a31fSmrg_LT_DECL([], [hardcode_into_libs], [0], 29375592a31fSmrg [Whether we should hardcode library paths into libraries]) 29385592a31fSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 29395592a31fSmrg [Compile-time system search path for libraries]) 29405592a31fSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 29415592a31fSmrg [Run-time system search path for libraries]) 29425592a31fSmrg])# _LT_SYS_DYNAMIC_LINKER 29435592a31fSmrg 29445592a31fSmrg 29455592a31fSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 29463a925b30Smrg# -------------------------- 29473a925b30Smrg# find a file program which can recognize shared library 29485592a31fSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 29495592a31fSmrg[m4_require([_LT_DECL_EGREP])dnl 29503a925b30SmrgAC_MSG_CHECKING([for $1]) 29513a925b30SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 29523a925b30Smrg[case $MAGIC_CMD in 29533a925b30Smrg[[\\/*] | ?:[\\/]*]) 295450f2e948Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 295550f2e948Smrg ;; 295650f2e948Smrg*) 295750f2e948Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 295850f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 295950f2e948Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 296050f2e948Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 296150f2e948Smrgdnl not every word. This closes a longstanding sh security hole. 29625592a31fSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 296350f2e948Smrg for ac_dir in $ac_dummy; do 296450f2e948Smrg IFS="$lt_save_ifs" 296550f2e948Smrg test -z "$ac_dir" && ac_dir=. 296650f2e948Smrg if test -f $ac_dir/$1; then 296750f2e948Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 296850f2e948Smrg if test -n "$file_magic_test_file"; then 296950f2e948Smrg case $deplibs_check_method in 297050f2e948Smrg "file_magic "*) 297150f2e948Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 297250f2e948Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 297350f2e948Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 297450f2e948Smrg $EGREP "$file_magic_regex" > /dev/null; then 297550f2e948Smrg : 297650f2e948Smrg else 29775592a31fSmrg cat <<_LT_EOF 1>&2 297845bc899bSmrg 297950f2e948Smrg*** Warning: the command libtool uses to detect shared libraries, 298050f2e948Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 298150f2e948Smrg*** The result is that libtool may fail to recognize shared libraries 298250f2e948Smrg*** as such. This will affect the creation of libtool libraries that 298350f2e948Smrg*** depend on shared libraries, but programs linked with such libtool 298450f2e948Smrg*** libraries will work regardless of this problem. Nevertheless, you 298550f2e948Smrg*** may want to report the problem to your system manager and/or to 298650f2e948Smrg*** bug-libtool@gnu.org 298745bc899bSmrg 29885592a31fSmrg_LT_EOF 298950f2e948Smrg fi ;; 299050f2e948Smrg esac 299150f2e948Smrg fi 299250f2e948Smrg break 299350f2e948Smrg fi 299450f2e948Smrg done 299550f2e948Smrg IFS="$lt_save_ifs" 299650f2e948Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 299745bc899bSmrg ;; 299850f2e948Smrgesac]) 299950f2e948SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 300050f2e948Smrgif test -n "$MAGIC_CMD"; then 300150f2e948Smrg AC_MSG_RESULT($MAGIC_CMD) 300250f2e948Smrgelse 300350f2e948Smrg AC_MSG_RESULT(no) 300450f2e948Smrgfi 30055592a31fSmrg_LT_DECL([], [MAGIC_CMD], [0], 30065592a31fSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 30075592a31fSmrg])# _LT_PATH_TOOL_PREFIX 300845bc899bSmrg 30095592a31fSmrg# Old name: 30105592a31fSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 30115592a31fSmrgdnl aclocal-1.4 backwards compatibility: 30125592a31fSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 301345bc899bSmrg 30145592a31fSmrg 30155592a31fSmrg# _LT_PATH_MAGIC 30165592a31fSmrg# -------------- 301750f2e948Smrg# find a file program which can recognize a shared library 30185592a31fSmrgm4_defun([_LT_PATH_MAGIC], 30195592a31fSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 302050f2e948Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 302150f2e948Smrg if test -n "$ac_tool_prefix"; then 30225592a31fSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 302350f2e948Smrg else 302450f2e948Smrg MAGIC_CMD=: 302550f2e948Smrg fi 302650f2e948Smrgfi 30275592a31fSmrg])# _LT_PATH_MAGIC 302845bc899bSmrg 302945bc899bSmrg 30305592a31fSmrg# LT_PATH_LD 303150f2e948Smrg# ---------- 303250f2e948Smrg# find the pathname to the GNU or non-GNU linker 30335592a31fSmrgAC_DEFUN([LT_PATH_LD], 30345592a31fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 30353a925b30SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 30363a925b30SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 30375592a31fSmrgm4_require([_LT_DECL_SED])dnl 30385592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 3039b40a6198Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 30405592a31fSmrg 30415592a31fSmrgAC_ARG_WITH([gnu-ld], 30425592a31fSmrg [AS_HELP_STRING([--with-gnu-ld], 30435592a31fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 30445592a31fSmrg [test "$withval" = no || with_gnu_ld=yes], 30455592a31fSmrg [with_gnu_ld=no])dnl 30465592a31fSmrg 304750f2e948Smrgac_prog=ld 304850f2e948Smrgif test "$GCC" = yes; then 304950f2e948Smrg # Check if gcc -print-prog-name=ld gives a path. 305050f2e948Smrg AC_MSG_CHECKING([for ld used by $CC]) 305150f2e948Smrg case $host in 305250f2e948Smrg *-*-mingw*) 305350f2e948Smrg # gcc leaves a trailing carriage return which upsets mingw 305450f2e948Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 305550f2e948Smrg *) 305650f2e948Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 305750f2e948Smrg esac 305850f2e948Smrg case $ac_prog in 305950f2e948Smrg # Accept absolute paths. 306050f2e948Smrg [[\\/]]* | ?:[[\\/]]*) 306150f2e948Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 306250f2e948Smrg # Canonicalize the pathname of ld 30635592a31fSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 30645592a31fSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 30655592a31fSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 306650f2e948Smrg done 306750f2e948Smrg test -z "$LD" && LD="$ac_prog" 306850f2e948Smrg ;; 306950f2e948Smrg "") 307050f2e948Smrg # If it fails, then pretend we aren't using GCC. 307150f2e948Smrg ac_prog=ld 307250f2e948Smrg ;; 307350f2e948Smrg *) 307450f2e948Smrg # If it is relative, then search for the first ld in PATH. 307550f2e948Smrg with_gnu_ld=unknown 307650f2e948Smrg ;; 307750f2e948Smrg esac 307850f2e948Smrgelif test "$with_gnu_ld" = yes; then 307950f2e948Smrg AC_MSG_CHECKING([for GNU ld]) 3080226fade8Smrgelse 308150f2e948Smrg AC_MSG_CHECKING([for non-GNU ld]) 3082226fade8Smrgfi 308350f2e948SmrgAC_CACHE_VAL(lt_cv_path_LD, 308450f2e948Smrg[if test -z "$LD"; then 308550f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 308650f2e948Smrg for ac_dir in $PATH; do 308750f2e948Smrg IFS="$lt_save_ifs" 308850f2e948Smrg test -z "$ac_dir" && ac_dir=. 308950f2e948Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 309050f2e948Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 309150f2e948Smrg # Check to see if the program is GNU ld. I'd rather use --version, 309250f2e948Smrg # but apparently some variants of GNU ld only accept -v. 309350f2e948Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 309450f2e948Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 309550f2e948Smrg *GNU* | *'with BFD'*) 309650f2e948Smrg test "$with_gnu_ld" != no && break 309750f2e948Smrg ;; 309850f2e948Smrg *) 309950f2e948Smrg test "$with_gnu_ld" != yes && break 310050f2e948Smrg ;; 310150f2e948Smrg esac 310250f2e948Smrg fi 310350f2e948Smrg done 310450f2e948Smrg IFS="$lt_save_ifs" 3105226fade8Smrgelse 310650f2e948Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 310750f2e948Smrgfi]) 310850f2e948SmrgLD="$lt_cv_path_LD" 310950f2e948Smrgif test -n "$LD"; then 311050f2e948Smrg AC_MSG_RESULT($LD) 3111226fade8Smrgelse 311250f2e948Smrg AC_MSG_RESULT(no) 3113226fade8Smrgfi 311450f2e948Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 31155592a31fSmrg_LT_PATH_LD_GNU 31165592a31fSmrgAC_SUBST([LD]) 3117226fade8Smrg 31185592a31fSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 31195592a31fSmrg])# LT_PATH_LD 3120226fade8Smrg 31215592a31fSmrg# Old names: 31225592a31fSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 31235592a31fSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 31245592a31fSmrgdnl aclocal-1.4 backwards compatibility: 31255592a31fSmrgdnl AC_DEFUN([AM_PROG_LD], []) 31265592a31fSmrgdnl AC_DEFUN([AC_PROG_LD], []) 31275592a31fSmrg 31285592a31fSmrg 31295592a31fSmrg# _LT_PATH_LD_GNU 31305592a31fSmrg#- -------------- 31315592a31fSmrgm4_defun([_LT_PATH_LD_GNU], 31325592a31fSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 313350f2e948Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 313450f2e948Smrgcase `$LD -v 2>&1 </dev/null` in 313550f2e948Smrg*GNU* | *'with BFD'*) 313650f2e948Smrg lt_cv_prog_gnu_ld=yes 313750f2e948Smrg ;; 313850f2e948Smrg*) 313950f2e948Smrg lt_cv_prog_gnu_ld=no 314050f2e948Smrg ;; 314150f2e948Smrgesac]) 314250f2e948Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 31435592a31fSmrg])# _LT_PATH_LD_GNU 3144226fade8Smrg 3145226fade8Smrg 31465592a31fSmrg# _LT_CMD_RELOAD 31475592a31fSmrg# -------------- 314850f2e948Smrg# find reload flag for linker 314950f2e948Smrg# -- PORTME Some linkers may need a different reload flag. 31505592a31fSmrgm4_defun([_LT_CMD_RELOAD], 315150f2e948Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 315250f2e948Smrg lt_cv_ld_reload_flag, 315350f2e948Smrg [lt_cv_ld_reload_flag='-r']) 315450f2e948Smrgreload_flag=$lt_cv_ld_reload_flag 315550f2e948Smrgcase $reload_flag in 315650f2e948Smrg"" | " "*) ;; 315750f2e948Smrg*) reload_flag=" $reload_flag" ;; 315850f2e948Smrgesac 315950f2e948Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 316050f2e948Smrgcase $host_os in 3161b40a6198Smrg cygwin* | mingw* | pw32* | cegcc*) 3162b40a6198Smrg if test "$GCC" != yes; then 3163b40a6198Smrg reload_cmds=false 3164b40a6198Smrg fi 3165b40a6198Smrg ;; 316650f2e948Smrg darwin*) 316750f2e948Smrg if test "$GCC" = yes; then 316850f2e948Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 31691ac89addSmrg else 317050f2e948Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 31711ac89addSmrg fi 317250f2e948Smrg ;; 317350f2e948Smrgesac 3174b40a6198Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3175b40a6198Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 31765592a31fSmrg])# _LT_CMD_RELOAD 317745bc899bSmrg 3178226fade8Smrg 31795592a31fSmrg# _LT_CHECK_MAGIC_METHOD 31805592a31fSmrg# ---------------------- 318150f2e948Smrg# how to check for library dependencies 318250f2e948Smrg# -- PORTME fill in with the dynamic library characteristics 31835592a31fSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 31845592a31fSmrg[m4_require([_LT_DECL_EGREP]) 31855592a31fSmrgm4_require([_LT_DECL_OBJDUMP]) 31865592a31fSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 318750f2e948Smrglt_cv_deplibs_check_method, 318850f2e948Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 318950f2e948Smrglt_cv_file_magic_test_file= 319050f2e948Smrglt_cv_deplibs_check_method='unknown' 319150f2e948Smrg# Need to set the preceding variable on all platforms that support 319250f2e948Smrg# interlibrary dependencies. 319350f2e948Smrg# 'none' -- dependencies not supported. 319450f2e948Smrg# `unknown' -- same as none, but documents that we really don't know. 319550f2e948Smrg# 'pass_all' -- all dependencies passed with no checks. 319650f2e948Smrg# 'test_compile' -- check by making test program. 319750f2e948Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 319850f2e948Smrg# which responds to the $file_magic_cmd with a given extended regex. 319950f2e948Smrg# If you have `file' or equivalent on your system and you're not sure 320050f2e948Smrg# whether `pass_all' will *always* work, you probably want this one. 320145bc899bSmrg 3202226fade8Smrgcase $host_os in 320350f2e948Smrgaix[[4-9]]*) 320450f2e948Smrg lt_cv_deplibs_check_method=pass_all 320550f2e948Smrg ;; 320645bc899bSmrg 320750f2e948Smrgbeos*) 320850f2e948Smrg lt_cv_deplibs_check_method=pass_all 320950f2e948Smrg ;; 321045bc899bSmrg 321150f2e948Smrgbsdi[[45]]*) 321250f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 321350f2e948Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 321450f2e948Smrg lt_cv_file_magic_test_file=/shlib/libc.so 321550f2e948Smrg ;; 321645bc899bSmrg 321750f2e948Smrgcygwin*) 321850f2e948Smrg # func_win32_libid is a shell function defined in ltmain.sh 321950f2e948Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 322050f2e948Smrg lt_cv_file_magic_cmd='func_win32_libid' 322150f2e948Smrg ;; 322245bc899bSmrg 322350f2e948Smrgmingw* | pw32*) 322450f2e948Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 322550f2e948Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 322650f2e948Smrg # unless we find 'file', for example because we are cross-compiling. 3227b40a6198Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3228b40a6198Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 322950f2e948Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 323050f2e948Smrg lt_cv_file_magic_cmd='func_win32_libid' 323150f2e948Smrg else 3232b40a6198Smrg # Keep this pattern in sync with the one in func_win32_libid. 3233b40a6198Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 323450f2e948Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 323550f2e948Smrg fi 323650f2e948Smrg ;; 323745bc899bSmrg 3238b40a6198Smrgcegcc*) 32395592a31fSmrg # use the weaker test based on 'objdump'. See mingw*. 32405592a31fSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 32415592a31fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32425592a31fSmrg ;; 32435592a31fSmrg 324450f2e948Smrgdarwin* | rhapsody*) 324550f2e948Smrg lt_cv_deplibs_check_method=pass_all 324650f2e948Smrg ;; 3247226fade8Smrg 324850f2e948Smrgfreebsd* | dragonfly*) 32495592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3250226fade8Smrg case $host_cpu in 325150f2e948Smrg i*86 ) 325250f2e948Smrg # Not sure whether the presence of OpenBSD here was a mistake. 325350f2e948Smrg # Let's accept both of them until this is cleared up. 325450f2e948Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 325550f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 325650f2e948Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3257226fade8Smrg ;; 3258226fade8Smrg esac 325950f2e948Smrg else 326050f2e948Smrg lt_cv_deplibs_check_method=pass_all 326150f2e948Smrg fi 326250f2e948Smrg ;; 3263226fade8Smrg 326450f2e948Smrggnu*) 326550f2e948Smrg lt_cv_deplibs_check_method=pass_all 326650f2e948Smrg ;; 3267226fade8Smrg 3268b40a6198Smrghaiku*) 3269b40a6198Smrg lt_cv_deplibs_check_method=pass_all 3270b40a6198Smrg ;; 3271b40a6198Smrg 327250f2e948Smrghpux10.20* | hpux11*) 327350f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 327450f2e948Smrg case $host_cpu in 327550f2e948Smrg ia64*) 327650f2e948Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 327750f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3278226fade8Smrg ;; 327950f2e948Smrg hppa*64*) 3280b40a6198Smrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] 328150f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3282226fade8Smrg ;; 328350f2e948Smrg *) 3284b40a6198Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 328550f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3286226fade8Smrg ;; 328750f2e948Smrg esac 328850f2e948Smrg ;; 3289226fade8Smrg 329050f2e948Smrginterix[[3-9]]*) 329150f2e948Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 329250f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 329350f2e948Smrg ;; 3294226fade8Smrg 329550f2e948Smrgirix5* | irix6* | nonstopux*) 329650f2e948Smrg case $LD in 329750f2e948Smrg *-32|*"-32 ") libmagic=32-bit;; 329850f2e948Smrg *-n32|*"-n32 ") libmagic=N32;; 329950f2e948Smrg *-64|*"-64 ") libmagic=64-bit;; 330050f2e948Smrg *) libmagic=never-match;; 330150f2e948Smrg esac 330250f2e948Smrg lt_cv_deplibs_check_method=pass_all 330350f2e948Smrg ;; 3304226fade8Smrg 3305b40a6198Smrg# This must be glibc/ELF. 3306b40a6198Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 330750f2e948Smrg lt_cv_deplibs_check_method=pass_all 330850f2e948Smrg ;; 3309226fade8Smrg 331050f2e948Smrgnetbsd*) 33115592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 331250f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 331350f2e948Smrg else 331450f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 331550f2e948Smrg fi 331650f2e948Smrg ;; 3317226fade8Smrg 331850f2e948Smrgnewos6*) 331950f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 332050f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 332150f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 332250f2e948Smrg ;; 3323226fade8Smrg 33245592a31fSmrg*nto* | *qnx*) 33255592a31fSmrg lt_cv_deplibs_check_method=pass_all 332650f2e948Smrg ;; 3327226fade8Smrg 332850f2e948Smrgopenbsd*) 33295592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 333050f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 333150f2e948Smrg else 333250f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 333350f2e948Smrg fi 333450f2e948Smrg ;; 3335226fade8Smrg 333650f2e948Smrgosf3* | osf4* | osf5*) 333750f2e948Smrg lt_cv_deplibs_check_method=pass_all 333850f2e948Smrg ;; 3339226fade8Smrg 334050f2e948Smrgrdos*) 334150f2e948Smrg lt_cv_deplibs_check_method=pass_all 334250f2e948Smrg ;; 3343226fade8Smrg 334450f2e948Smrgsolaris*) 334550f2e948Smrg lt_cv_deplibs_check_method=pass_all 334650f2e948Smrg ;; 334750f2e948Smrg 33485592a31fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 33495592a31fSmrg lt_cv_deplibs_check_method=pass_all 33505592a31fSmrg ;; 33515592a31fSmrg 335250f2e948Smrgsysv4 | sysv4.3*) 335350f2e948Smrg case $host_vendor in 335450f2e948Smrg motorola) 335550f2e948Smrg 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]]' 335650f2e948Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3357226fade8Smrg ;; 335850f2e948Smrg ncr) 335950f2e948Smrg lt_cv_deplibs_check_method=pass_all 3360226fade8Smrg ;; 336150f2e948Smrg sequent) 336250f2e948Smrg lt_cv_file_magic_cmd='/bin/file' 336350f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3364226fade8Smrg ;; 336550f2e948Smrg sni) 336650f2e948Smrg lt_cv_file_magic_cmd='/bin/file' 336750f2e948Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 336850f2e948Smrg lt_cv_file_magic_test_file=/lib/libc.so 336950f2e948Smrg ;; 337050f2e948Smrg siemens) 337150f2e948Smrg lt_cv_deplibs_check_method=pass_all 337250f2e948Smrg ;; 337350f2e948Smrg pc) 337450f2e948Smrg lt_cv_deplibs_check_method=pass_all 337550f2e948Smrg ;; 337650f2e948Smrg esac 337750f2e948Smrg ;; 337845bc899bSmrg 33795592a31fSmrgtpf*) 338050f2e948Smrg lt_cv_deplibs_check_method=pass_all 338150f2e948Smrg ;; 3382226fade8Smrgesac 3383226fade8Smrg]) 3384b40a6198Smrg 3385b40a6198Smrgfile_magic_glob= 3386b40a6198Smrgwant_nocaseglob=no 3387b40a6198Smrgif test "$build" = "$host"; then 3388b40a6198Smrg case $host_os in 3389b40a6198Smrg mingw* | pw32*) 3390b40a6198Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3391b40a6198Smrg want_nocaseglob=yes 3392b40a6198Smrg else 3393b40a6198Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3394b40a6198Smrg fi 3395b40a6198Smrg ;; 3396b40a6198Smrg esac 3397b40a6198Smrgfi 3398b40a6198Smrg 339950f2e948Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 340050f2e948Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 340150f2e948Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 34025592a31fSmrg 34035592a31fSmrg_LT_DECL([], [deplibs_check_method], [1], 34045592a31fSmrg [Method to check whether dependent libraries are shared objects]) 34055592a31fSmrg_LT_DECL([], [file_magic_cmd], [1], 3406b40a6198Smrg [Command to use when deplibs_check_method = "file_magic"]) 3407b40a6198Smrg_LT_DECL([], [file_magic_glob], [1], 3408b40a6198Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3409b40a6198Smrg_LT_DECL([], [want_nocaseglob], [1], 3410b40a6198Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 34115592a31fSmrg])# _LT_CHECK_MAGIC_METHOD 3412226fade8Smrg 341345bc899bSmrg 34145592a31fSmrg# LT_PATH_NM 341550f2e948Smrg# ---------- 34165592a31fSmrg# find the pathname to a BSD- or MS-compatible name lister 34175592a31fSmrgAC_DEFUN([LT_PATH_NM], 34185592a31fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 34195592a31fSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 342050f2e948Smrg[if test -n "$NM"; then 342150f2e948Smrg # Let the user override the test. 342250f2e948Smrg lt_cv_path_NM="$NM" 342350f2e948Smrgelse 342450f2e948Smrg lt_nm_to_check="${ac_tool_prefix}nm" 342550f2e948Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 342650f2e948Smrg lt_nm_to_check="$lt_nm_to_check nm" 342750f2e948Smrg fi 342850f2e948Smrg for lt_tmp_nm in $lt_nm_to_check; do 342950f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 343050f2e948Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 343150f2e948Smrg IFS="$lt_save_ifs" 343250f2e948Smrg test -z "$ac_dir" && ac_dir=. 343350f2e948Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 343450f2e948Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 343550f2e948Smrg # Check to see if the nm accepts a BSD-compat flag. 343650f2e948Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 343750f2e948Smrg # nm: unknown option "B" ignored 343850f2e948Smrg # Tru64's nm complains that /dev/null is an invalid object file 343950f2e948Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 344050f2e948Smrg */dev/null* | *'Invalid file or object type'*) 344150f2e948Smrg lt_cv_path_NM="$tmp_nm -B" 344250f2e948Smrg break 344350f2e948Smrg ;; 344450f2e948Smrg *) 344550f2e948Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 344650f2e948Smrg */dev/null*) 344750f2e948Smrg lt_cv_path_NM="$tmp_nm -p" 344850f2e948Smrg break 344950f2e948Smrg ;; 345050f2e948Smrg *) 345150f2e948Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 345250f2e948Smrg continue # so that we can try to find one that supports BSD flags 345350f2e948Smrg ;; 345450f2e948Smrg esac 345550f2e948Smrg ;; 345650f2e948Smrg esac 345750f2e948Smrg fi 345850f2e948Smrg done 345950f2e948Smrg IFS="$lt_save_ifs" 3460226fade8Smrg done 34615592a31fSmrg : ${lt_cv_path_NM=no} 346250f2e948Smrgfi]) 34635592a31fSmrgif test "$lt_cv_path_NM" != "no"; then 34645592a31fSmrg NM="$lt_cv_path_NM" 34655592a31fSmrgelse 34665592a31fSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3467b40a6198Smrg if test -n "$DUMPBIN"; then : 3468b40a6198Smrg # Let the user override the test. 3469b40a6198Smrg else 3470b40a6198Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3471b40a6198Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3472b40a6198Smrg *COFF*) 3473b40a6198Smrg DUMPBIN="$DUMPBIN -symbols" 3474b40a6198Smrg ;; 3475b40a6198Smrg *) 3476b40a6198Smrg DUMPBIN=: 3477b40a6198Smrg ;; 3478b40a6198Smrg esac 3479b40a6198Smrg fi 34805592a31fSmrg AC_SUBST([DUMPBIN]) 34815592a31fSmrg if test "$DUMPBIN" != ":"; then 34825592a31fSmrg NM="$DUMPBIN" 34835592a31fSmrg fi 34845592a31fSmrgfi 34855592a31fSmrgtest -z "$NM" && NM=nm 34865592a31fSmrgAC_SUBST([NM]) 34875592a31fSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 34885592a31fSmrg 34895592a31fSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 34905592a31fSmrg [lt_cv_nm_interface="BSD nm" 34915592a31fSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3492b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 34935592a31fSmrg (eval "$ac_compile" 2>conftest.err) 34945592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3495b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 34965592a31fSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 34975592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3498b40a6198Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 34995592a31fSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 35005592a31fSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 35015592a31fSmrg lt_cv_nm_interface="MS dumpbin" 35025592a31fSmrg fi 35035592a31fSmrg rm -f conftest*]) 35045592a31fSmrg])# LT_PATH_NM 350545bc899bSmrg 35065592a31fSmrg# Old names: 35075592a31fSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 35085592a31fSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 35095592a31fSmrgdnl aclocal-1.4 backwards compatibility: 35105592a31fSmrgdnl AC_DEFUN([AM_PROG_NM], []) 35115592a31fSmrgdnl AC_DEFUN([AC_PROG_NM], []) 351245bc899bSmrg 3513b40a6198Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3514b40a6198Smrg# -------------------------------- 3515b40a6198Smrg# how to determine the name of the shared library 3516b40a6198Smrg# associated with a specific link library. 3517b40a6198Smrg# -- PORTME fill in with the dynamic library characteristics 3518b40a6198Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3519b40a6198Smrg[m4_require([_LT_DECL_EGREP]) 3520b40a6198Smrgm4_require([_LT_DECL_OBJDUMP]) 3521b40a6198Smrgm4_require([_LT_DECL_DLLTOOL]) 3522b40a6198SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3523b40a6198Smrglt_cv_sharedlib_from_linklib_cmd, 3524b40a6198Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 35255592a31fSmrg 3526b40a6198Smrgcase $host_os in 3527b40a6198Smrgcygwin* | mingw* | pw32* | cegcc*) 3528b40a6198Smrg # two different shell functions defined in ltmain.sh 3529b40a6198Smrg # decide which to use based on capabilities of $DLLTOOL 3530b40a6198Smrg case `$DLLTOOL --help 2>&1` in 3531b40a6198Smrg *--identify-strict*) 3532b40a6198Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3533b40a6198Smrg ;; 3534b40a6198Smrg *) 3535b40a6198Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3536b40a6198Smrg ;; 3537b40a6198Smrg esac 3538b40a6198Smrg ;; 3539b40a6198Smrg*) 3540b40a6198Smrg # fallback: assume linklib IS sharedlib 3541b40a6198Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3542b40a6198Smrg ;; 3543b40a6198Smrgesac 3544b40a6198Smrg]) 3545b40a6198Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3546b40a6198Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3547b40a6198Smrg 3548b40a6198Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3549b40a6198Smrg [Command to associate shared and link libraries]) 3550b40a6198Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3551b40a6198Smrg 3552b40a6198Smrg 3553b40a6198Smrg# _LT_PATH_MANIFEST_TOOL 3554b40a6198Smrg# ---------------------- 3555b40a6198Smrg# locate the manifest tool 3556b40a6198Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3557b40a6198Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3558b40a6198Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3559b40a6198SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3560b40a6198Smrg [lt_cv_path_mainfest_tool=no 3561b40a6198Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3562b40a6198Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3563b40a6198Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3564b40a6198Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3565b40a6198Smrg lt_cv_path_mainfest_tool=yes 3566b40a6198Smrg fi 3567b40a6198Smrg rm -f conftest*]) 3568b40a6198Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3569b40a6198Smrg MANIFEST_TOOL=: 3570b40a6198Smrgfi 3571b40a6198Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3572b40a6198Smrg])# _LT_PATH_MANIFEST_TOOL 3573b40a6198Smrg 3574b40a6198Smrg 3575b40a6198Smrg# LT_LIB_M 35765592a31fSmrg# -------- 357750f2e948Smrg# check for math library 35785592a31fSmrgAC_DEFUN([LT_LIB_M], 357950f2e948Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 358050f2e948SmrgLIBM= 358150f2e948Smrgcase $host in 3582b40a6198Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 358350f2e948Smrg # These system don't have libm, or don't need it 358450f2e948Smrg ;; 358550f2e948Smrg*-ncr-sysv4.3*) 358650f2e948Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 358750f2e948Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 358850f2e948Smrg ;; 358950f2e948Smrg*) 359050f2e948Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3591226fade8Smrg ;; 3592226fade8Smrgesac 35935592a31fSmrgAC_SUBST([LIBM]) 35945592a31fSmrg])# LT_LIB_M 359545bc899bSmrg 35965592a31fSmrg# Old name: 35975592a31fSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 35985592a31fSmrgdnl aclocal-1.4 backwards compatibility: 35995592a31fSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 360045bc899bSmrg 360145bc899bSmrg 36025592a31fSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 36035592a31fSmrg# ------------------------------- 36045592a31fSmrgm4_defun([_LT_COMPILER_NO_RTTI], 36055592a31fSmrg[m4_require([_LT_TAG_COMPILER])dnl 360645bc899bSmrg 36075592a31fSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 360845bc899bSmrg 36095592a31fSmrgif test "$GCC" = yes; then 3610b40a6198Smrg case $cc_basename in 3611b40a6198Smrg nvcc*) 3612b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3613b40a6198Smrg *) 3614b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3615b40a6198Smrg esac 361645bc899bSmrg 36175592a31fSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 36185592a31fSmrg lt_cv_prog_compiler_rtti_exceptions, 36195592a31fSmrg [-fno-rtti -fno-exceptions], [], 36205592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 36215592a31fSmrgfi 36225592a31fSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 36235592a31fSmrg [Compiler flag to turn off builtin functions]) 36245592a31fSmrg])# _LT_COMPILER_NO_RTTI 362545bc899bSmrg 362645bc899bSmrg 36275592a31fSmrg# _LT_CMD_GLOBAL_SYMBOLS 36285592a31fSmrg# ---------------------- 36295592a31fSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 36305592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 36315592a31fSmrgAC_REQUIRE([AC_PROG_CC])dnl 3632b40a6198SmrgAC_REQUIRE([AC_PROG_AWK])dnl 36335592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 36345592a31fSmrgAC_REQUIRE([LT_PATH_LD])dnl 36355592a31fSmrgm4_require([_LT_DECL_SED])dnl 36365592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 36375592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 363845bc899bSmrg 36395592a31fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 36405592a31fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 36415592a31fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 364250f2e948Smrg[ 36435592a31fSmrg# These are sane defaults that work on at least a few old systems. 36445592a31fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 364545bc899bSmrg 36465592a31fSmrg# Character class describing NM global symbol codes. 36475592a31fSmrgsymcode='[[BCDEGRST]]' 364845bc899bSmrg 36495592a31fSmrg# Regexp to match symbols that can be accessed directly from C. 36505592a31fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 365145bc899bSmrg 36525592a31fSmrg# Define system-specific variables. 36535592a31fSmrgcase $host_os in 36545592a31fSmrgaix*) 36555592a31fSmrg symcode='[[BCDT]]' 36565592a31fSmrg ;; 36575592a31fSmrgcygwin* | mingw* | pw32* | cegcc*) 36585592a31fSmrg symcode='[[ABCDGISTW]]' 36595592a31fSmrg ;; 36605592a31fSmrghpux*) 36615592a31fSmrg if test "$host_cpu" = ia64; then 36625592a31fSmrg symcode='[[ABCDEGRST]]' 36635592a31fSmrg fi 36645592a31fSmrg ;; 36655592a31fSmrgirix* | nonstopux*) 36665592a31fSmrg symcode='[[BCDEGRST]]' 36675592a31fSmrg ;; 36685592a31fSmrgosf*) 36695592a31fSmrg symcode='[[BCDEGQRST]]' 36705592a31fSmrg ;; 36715592a31fSmrgsolaris*) 36725592a31fSmrg symcode='[[BDRT]]' 36735592a31fSmrg ;; 36745592a31fSmrgsco3.2v5*) 36755592a31fSmrg symcode='[[DT]]' 36765592a31fSmrg ;; 36775592a31fSmrgsysv4.2uw2*) 36785592a31fSmrg symcode='[[DT]]' 36795592a31fSmrg ;; 36805592a31fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 36815592a31fSmrg symcode='[[ABDT]]' 36825592a31fSmrg ;; 36835592a31fSmrgsysv4) 36845592a31fSmrg symcode='[[DFNSTU]]' 36855592a31fSmrg ;; 36865592a31fSmrgesac 368745bc899bSmrg 36885592a31fSmrg# If we're using GNU nm, then use its standard symbol codes. 36895592a31fSmrgcase `$NM -V 2>&1` in 36905592a31fSmrg*GNU* | *'with BFD'*) 36915592a31fSmrg symcode='[[ABCDGIRSTW]]' ;; 36925592a31fSmrgesac 369345bc899bSmrg 36945592a31fSmrg# Transform an extracted symbol line into a proper C declaration. 36955592a31fSmrg# Some systems (esp. on ia64) link data and code symbols differently, 36965592a31fSmrg# so use this general approach. 36975592a31fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 369845bc899bSmrg 36995592a31fSmrg# Transform an extracted symbol line into symbol name and symbol address 3700b40a6198Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3701b40a6198Smrglt_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'" 370245bc899bSmrg 37035592a31fSmrg# Handle CRLF in mingw tool chain 37045592a31fSmrgopt_cr= 37055592a31fSmrgcase $build_os in 37065592a31fSmrgmingw*) 37075592a31fSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 37085592a31fSmrg ;; 37095592a31fSmrgesac 37103a925b30Smrg 37115592a31fSmrg# Try without a prefix underscore, then with it. 37125592a31fSmrgfor ac_symprfx in "" "_"; do 37133a925b30Smrg 37145592a31fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 37155592a31fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 37163a925b30Smrg 37175592a31fSmrg # Write the raw and C identifiers. 37185592a31fSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 37195592a31fSmrg # Fake it for dumpbin and say T for any non-static function 37205592a31fSmrg # and D for any global variable. 37215592a31fSmrg # Also find C++ and __fastcall symbols from MSVC++, 37225592a31fSmrg # which start with @ or ?. 37235592a31fSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 37245592a31fSmrg" {last_section=section; section=\$ 3};"\ 3725b40a6198Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 37265592a31fSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 37275592a31fSmrg" \$ 0!~/External *\|/{next};"\ 37285592a31fSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 37295592a31fSmrg" {if(hide[section]) next};"\ 37305592a31fSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 37315592a31fSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 37325592a31fSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 37335592a31fSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 37345592a31fSmrg" ' prfx=^$ac_symprfx]" 37355592a31fSmrg else 37365592a31fSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 37373a925b30Smrg fi 3738b40a6198Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 373945bc899bSmrg 37405592a31fSmrg # Check to see that the pipe works correctly. 37415592a31fSmrg pipe_works=no 374245bc899bSmrg 37435592a31fSmrg rm -f conftest* 37445592a31fSmrg cat > conftest.$ac_ext <<_LT_EOF 37455592a31fSmrg#ifdef __cplusplus 37465592a31fSmrgextern "C" { 37475592a31fSmrg#endif 37485592a31fSmrgchar nm_test_var; 37495592a31fSmrgvoid nm_test_func(void); 37505592a31fSmrgvoid nm_test_func(void){} 37515592a31fSmrg#ifdef __cplusplus 37525592a31fSmrg} 37535592a31fSmrg#endif 37545592a31fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 37555592a31fSmrg_LT_EOF 37563a925b30Smrg 37575592a31fSmrg if AC_TRY_EVAL(ac_compile); then 37585592a31fSmrg # Now try to grab the symbols. 37595592a31fSmrg nlist=conftest.nm 3760b40a6198Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 37615592a31fSmrg # Try sorting and uniquifying the output. 37625592a31fSmrg if sort "$nlist" | uniq > "$nlist"T; then 37635592a31fSmrg mv -f "$nlist"T "$nlist" 37645592a31fSmrg else 37655592a31fSmrg rm -f "$nlist"T 37665592a31fSmrg fi 37673a925b30Smrg 37685592a31fSmrg # Make sure that we snagged all the symbols we need. 37695592a31fSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 37705592a31fSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 37715592a31fSmrg cat <<_LT_EOF > conftest.$ac_ext 3772b40a6198Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3773b40a6198Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3774b40a6198Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3775b40a6198Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3776b40a6198Smrg# define LT@&t@_DLSYM_CONST 3777b40a6198Smrg#elif defined(__osf__) 3778b40a6198Smrg/* This system does not cope well with relocations in const data. */ 3779b40a6198Smrg# define LT@&t@_DLSYM_CONST 3780b40a6198Smrg#else 3781b40a6198Smrg# define LT@&t@_DLSYM_CONST const 3782b40a6198Smrg#endif 3783b40a6198Smrg 37845592a31fSmrg#ifdef __cplusplus 37855592a31fSmrgextern "C" { 37865592a31fSmrg#endif 37873a925b30Smrg 37885592a31fSmrg_LT_EOF 37895592a31fSmrg # Now generate the symbol file. 37905592a31fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 37913a925b30Smrg 37925592a31fSmrg cat <<_LT_EOF >> conftest.$ac_ext 37933a925b30Smrg 37945592a31fSmrg/* The mapping between symbol names and symbols. */ 3795b40a6198SmrgLT@&t@_DLSYM_CONST struct { 37965592a31fSmrg const char *name; 37975592a31fSmrg void *address; 37985592a31fSmrg} 37995592a31fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 38005592a31fSmrg{ 38015592a31fSmrg { "@PROGRAM@", (void *) 0 }, 38025592a31fSmrg_LT_EOF 38035592a31fSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 38045592a31fSmrg cat <<\_LT_EOF >> conftest.$ac_ext 38055592a31fSmrg {0, (void *) 0} 38065592a31fSmrg}; 38073a925b30Smrg 38085592a31fSmrg/* This works around a problem in FreeBSD linker */ 38095592a31fSmrg#ifdef FREEBSD_WORKAROUND 38105592a31fSmrgstatic const void *lt_preloaded_setup() { 38115592a31fSmrg return lt__PROGRAM__LTX_preloaded_symbols; 38125592a31fSmrg} 38135592a31fSmrg#endif 38143a925b30Smrg 38155592a31fSmrg#ifdef __cplusplus 38165592a31fSmrg} 38175592a31fSmrg#endif 38185592a31fSmrg_LT_EOF 38195592a31fSmrg # Now try linking the two files. 38205592a31fSmrg mv conftest.$ac_objext conftstm.$ac_objext 3821b40a6198Smrg lt_globsym_save_LIBS=$LIBS 3822b40a6198Smrg lt_globsym_save_CFLAGS=$CFLAGS 38235592a31fSmrg LIBS="conftstm.$ac_objext" 38245592a31fSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 38255592a31fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 38265592a31fSmrg pipe_works=yes 38275592a31fSmrg fi 3828b40a6198Smrg LIBS=$lt_globsym_save_LIBS 3829b40a6198Smrg CFLAGS=$lt_globsym_save_CFLAGS 38305592a31fSmrg else 38315592a31fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 38325592a31fSmrg fi 38335592a31fSmrg else 38345592a31fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 38355592a31fSmrg fi 383650f2e948Smrg else 38375592a31fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 383850f2e948Smrg fi 383950f2e948Smrg else 38405592a31fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 38415592a31fSmrg cat conftest.$ac_ext >&5 384250f2e948Smrg fi 38435592a31fSmrg rm -rf conftest* conftst* 384445bc899bSmrg 38455592a31fSmrg # Do not use the global_symbol_pipe unless it works. 38465592a31fSmrg if test "$pipe_works" = yes; then 38475592a31fSmrg break 38485592a31fSmrg else 38495592a31fSmrg lt_cv_sys_global_symbol_pipe= 38505592a31fSmrg fi 38515592a31fSmrgdone 38525592a31fSmrg]) 38535592a31fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 38545592a31fSmrg lt_cv_sys_global_symbol_to_cdecl= 38555592a31fSmrgfi 38565592a31fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 38575592a31fSmrg AC_MSG_RESULT(failed) 385850f2e948Smrgelse 38595592a31fSmrg AC_MSG_RESULT(ok) 386050f2e948Smrgfi 386145bc899bSmrg 3862b40a6198Smrg# Response file support. 3863b40a6198Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3864b40a6198Smrg nm_file_list_spec='@' 3865b40a6198Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3866b40a6198Smrg nm_file_list_spec='@' 3867b40a6198Smrgfi 3868b40a6198Smrg 38695592a31fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 38705592a31fSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 38715592a31fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 38725592a31fSmrg [Transform the output of nm in a proper C declaration]) 38735592a31fSmrg_LT_DECL([global_symbol_to_c_name_address], 38745592a31fSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 38755592a31fSmrg [Transform the output of nm in a C name address pair]) 38765592a31fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 38775592a31fSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 38785592a31fSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3879b40a6198Smrg_LT_DECL([], [nm_file_list_spec], [1], 3880b40a6198Smrg [Specify filename containing input files for $NM]) 38815592a31fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 388245bc899bSmrg 388345bc899bSmrg 38845592a31fSmrg# _LT_COMPILER_PIC([TAGNAME]) 38855592a31fSmrg# --------------------------- 38865592a31fSmrgm4_defun([_LT_COMPILER_PIC], 38875592a31fSmrg[m4_require([_LT_TAG_COMPILER])dnl 38885592a31fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 38895592a31fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 38905592a31fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 389145bc899bSmrg 38925592a31fSmrgm4_if([$1], [CXX], [ 38935592a31fSmrg # C++ specific cases for pic, static, wl, etc. 38945592a31fSmrg if test "$GXX" = yes; then 38955592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38965592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 38973a925b30Smrg 38985592a31fSmrg case $host_os in 38995592a31fSmrg aix*) 39005592a31fSmrg # All AIX code is PIC. 39013a925b30Smrg if test "$host_cpu" = ia64; then 39025592a31fSmrg # AIX 5 now supports IA64 processor 39035592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39043a925b30Smrg fi 39053a925b30Smrg ;; 390645bc899bSmrg 39075592a31fSmrg amigaos*) 390850f2e948Smrg case $host_cpu in 39095592a31fSmrg powerpc) 39105592a31fSmrg # see comment about AmigaOS4 .so support 39115592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39125592a31fSmrg ;; 39135592a31fSmrg m68k) 39145592a31fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 39155592a31fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 39165592a31fSmrg # like `-m68040'. 39175592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 391850f2e948Smrg ;; 391950f2e948Smrg esac 392050f2e948Smrg ;; 39213a925b30Smrg 39225592a31fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39235592a31fSmrg # PIC is the default for these OSes. 39245592a31fSmrg ;; 39255592a31fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39265592a31fSmrg # This hack is so that the source file can tell whether it is being 39275592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 39285592a31fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39295592a31fSmrg # (--disable-auto-import) libraries 39305592a31fSmrg m4_if([$1], [GCJ], [], 39315592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39325592a31fSmrg ;; 39335592a31fSmrg darwin* | rhapsody*) 39345592a31fSmrg # PIC is the default on this platform 39355592a31fSmrg # Common symbols not allowed in MH_DYLIB files 39365592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39375592a31fSmrg ;; 39385592a31fSmrg *djgpp*) 39395592a31fSmrg # DJGPP does not support shared libraries at all 39405592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 39415592a31fSmrg ;; 3942b40a6198Smrg haiku*) 3943b40a6198Smrg # PIC is the default for Haiku. 3944b40a6198Smrg # The "-static" flag exists, but is broken. 3945b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3946b40a6198Smrg ;; 39475592a31fSmrg interix[[3-9]]*) 39485592a31fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39495592a31fSmrg # Instead, we relocate shared libraries at runtime. 39505592a31fSmrg ;; 39515592a31fSmrg sysv4*MP*) 39525592a31fSmrg if test -d /usr/nec; then 39535592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39545592a31fSmrg fi 39555592a31fSmrg ;; 39565592a31fSmrg hpux*) 39575592a31fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39585592a31fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39595592a31fSmrg # sets the default TLS model and affects inlining. 39605592a31fSmrg case $host_cpu in 39615592a31fSmrg hppa*64*) 396250f2e948Smrg ;; 39633a925b30Smrg *) 39645592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 396550f2e948Smrg ;; 39665592a31fSmrg esac 39675592a31fSmrg ;; 39685592a31fSmrg *qnx* | *nto*) 39695592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39705592a31fSmrg # it will coredump. 39715592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39725592a31fSmrg ;; 39735592a31fSmrg *) 39745592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39755592a31fSmrg ;; 39763a925b30Smrg esac 39775592a31fSmrg else 39785592a31fSmrg case $host_os in 39795592a31fSmrg aix[[4-9]]*) 39805592a31fSmrg # All AIX code is PIC. 39815592a31fSmrg if test "$host_cpu" = ia64; then 39825592a31fSmrg # AIX 5 now supports IA64 processor 39835592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39845592a31fSmrg else 39855592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39863a925b30Smrg fi 398750f2e948Smrg ;; 39885592a31fSmrg chorus*) 39895592a31fSmrg case $cc_basename in 39905592a31fSmrg cxch68*) 39915592a31fSmrg # Green Hills C++ Compiler 39925592a31fSmrg # _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" 39933a925b30Smrg ;; 399450f2e948Smrg esac 399550f2e948Smrg ;; 3996b40a6198Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3997b40a6198Smrg # This hack is so that the source file can tell whether it is being 3998b40a6198Smrg # built for inclusion in a dll (and should export symbols for example). 3999b40a6198Smrg m4_if([$1], [GCJ], [], 4000b40a6198Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4001b40a6198Smrg ;; 40025592a31fSmrg dgux*) 40035592a31fSmrg case $cc_basename in 40045592a31fSmrg ec++*) 40055592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40065592a31fSmrg ;; 40075592a31fSmrg ghcx*) 40085592a31fSmrg # Green Hills C++ Compiler 40095592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 40105592a31fSmrg ;; 40115592a31fSmrg *) 40125592a31fSmrg ;; 401350f2e948Smrg esac 401450f2e948Smrg ;; 40155592a31fSmrg freebsd* | dragonfly*) 40165592a31fSmrg # FreeBSD uses GNU C++ 401750f2e948Smrg ;; 40185592a31fSmrg hpux9* | hpux10* | hpux11*) 40195592a31fSmrg case $cc_basename in 40205592a31fSmrg CC*) 40215592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40225592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40235592a31fSmrg if test "$host_cpu" != ia64; then 40245592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40255592a31fSmrg fi 40265592a31fSmrg ;; 40275592a31fSmrg aCC*) 40285592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40295592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40305592a31fSmrg case $host_cpu in 40315592a31fSmrg hppa*64*|ia64*) 40325592a31fSmrg # +Z the default 40335592a31fSmrg ;; 40345592a31fSmrg *) 40355592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40365592a31fSmrg ;; 40375592a31fSmrg esac 40385592a31fSmrg ;; 40395592a31fSmrg *) 40405592a31fSmrg ;; 40415592a31fSmrg esac 404250f2e948Smrg ;; 40435592a31fSmrg interix*) 40445592a31fSmrg # This is c89, which is MS Visual C++ (no shared libs) 40455592a31fSmrg # Anyone wants to do a port? 404650f2e948Smrg ;; 40475592a31fSmrg irix5* | irix6* | nonstopux*) 40485592a31fSmrg case $cc_basename in 40495592a31fSmrg CC*) 40505592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40515592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40525592a31fSmrg # CC pic flag -KPIC is the default. 40535592a31fSmrg ;; 40545592a31fSmrg *) 40555592a31fSmrg ;; 40565592a31fSmrg esac 40573a925b30Smrg ;; 4058b40a6198Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 40595592a31fSmrg case $cc_basename in 40605592a31fSmrg KCC*) 40615592a31fSmrg # KAI C++ Compiler 40625592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 40635592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40645592a31fSmrg ;; 40655592a31fSmrg ecpc* ) 40665592a31fSmrg # old Intel C++ for x86_64 which still supported -KPIC. 40675592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40685592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40695592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40705592a31fSmrg ;; 40715592a31fSmrg icpc* ) 40725592a31fSmrg # Intel C++, used to be incompatible with GCC. 40735592a31fSmrg # ICC 10 doesn't accept -KPIC any more. 40745592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40755592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40765592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40775592a31fSmrg ;; 40785592a31fSmrg pgCC* | pgcpp*) 40795592a31fSmrg # Portland Group C++ compiler 40805592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40815592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40825592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40835592a31fSmrg ;; 40845592a31fSmrg cxx*) 40855592a31fSmrg # Compaq C++ 40865592a31fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 40875592a31fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 40885592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 40895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40905592a31fSmrg ;; 4091b40a6198Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4092b40a6198Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 40935592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40945592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 40955592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 40965592a31fSmrg ;; 40975592a31fSmrg *) 40985592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 40995592a31fSmrg *Sun\ C*) 41005592a31fSmrg # Sun C++ 5.9 41015592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41025592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41035592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41045592a31fSmrg ;; 41055592a31fSmrg esac 41065592a31fSmrg ;; 41075592a31fSmrg esac 41083a925b30Smrg ;; 41095592a31fSmrg lynxos*) 41103a925b30Smrg ;; 41115592a31fSmrg m88k*) 41123a925b30Smrg ;; 41135592a31fSmrg mvs*) 41145592a31fSmrg case $cc_basename in 41155592a31fSmrg cxx*) 41165592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 41175592a31fSmrg ;; 41185592a31fSmrg *) 41195592a31fSmrg ;; 41205592a31fSmrg esac 41213a925b30Smrg ;; 41225592a31fSmrg netbsd*) 41233a925b30Smrg ;; 41245592a31fSmrg *qnx* | *nto*) 41255592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 41265592a31fSmrg # it will coredump. 41275592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 41285592a31fSmrg ;; 41295592a31fSmrg osf3* | osf4* | osf5*) 41305592a31fSmrg case $cc_basename in 41315592a31fSmrg KCC*) 41325592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 41335592a31fSmrg ;; 41345592a31fSmrg RCC*) 41355592a31fSmrg # Rational C++ 2.4.1 41365592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41375592a31fSmrg ;; 41385592a31fSmrg cxx*) 41395592a31fSmrg # Digital/Compaq C++ 41405592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41415592a31fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 41425592a31fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 41435592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41445592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 41455592a31fSmrg ;; 41465592a31fSmrg *) 41475592a31fSmrg ;; 41485592a31fSmrg esac 41493a925b30Smrg ;; 41505592a31fSmrg psos*) 41513a925b30Smrg ;; 41525592a31fSmrg solaris*) 41535592a31fSmrg case $cc_basename in 4154b40a6198Smrg CC* | sunCC*) 41555592a31fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 41565592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41575592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41585592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41595592a31fSmrg ;; 41605592a31fSmrg gcx*) 41615592a31fSmrg # Green Hills C++ Compiler 41625592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41635592a31fSmrg ;; 41645592a31fSmrg *) 41655592a31fSmrg ;; 41665592a31fSmrg esac 41673a925b30Smrg ;; 41685592a31fSmrg sunos4*) 41695592a31fSmrg case $cc_basename in 41705592a31fSmrg CC*) 41715592a31fSmrg # Sun C++ 4.x 41725592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41735592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41745592a31fSmrg ;; 41755592a31fSmrg lcc*) 41765592a31fSmrg # Lucid 41775592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41785592a31fSmrg ;; 41793a925b30Smrg *) 41803a925b30Smrg ;; 41813a925b30Smrg esac 418250f2e948Smrg ;; 41835592a31fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41845592a31fSmrg case $cc_basename in 41855592a31fSmrg CC*) 41865592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41875592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41885592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41895592a31fSmrg ;; 41905592a31fSmrg esac 419150f2e948Smrg ;; 41925592a31fSmrg tandem*) 41935592a31fSmrg case $cc_basename in 41945592a31fSmrg NCC*) 41955592a31fSmrg # NonStop-UX NCC 3.20 41965592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41975592a31fSmrg ;; 41983a925b30Smrg *) 41993a925b30Smrg ;; 42005592a31fSmrg esac 420150f2e948Smrg ;; 42025592a31fSmrg vxworks*) 420350f2e948Smrg ;; 420450f2e948Smrg *) 42055592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 420650f2e948Smrg ;; 42073a925b30Smrg esac 42085592a31fSmrg fi 42095592a31fSmrg], 42105592a31fSmrg[ 42115592a31fSmrg if test "$GCC" = yes; then 42125592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42135592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42145592a31fSmrg 42155592a31fSmrg case $host_os in 42165592a31fSmrg aix*) 42175592a31fSmrg # All AIX code is PIC. 42185592a31fSmrg if test "$host_cpu" = ia64; then 42195592a31fSmrg # AIX 5 now supports IA64 processor 42205592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42215592a31fSmrg fi 42225592a31fSmrg ;; 42235592a31fSmrg 42245592a31fSmrg amigaos*) 42255592a31fSmrg case $host_cpu in 42265592a31fSmrg powerpc) 42275592a31fSmrg # see comment about AmigaOS4 .so support 42285592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42295592a31fSmrg ;; 42305592a31fSmrg m68k) 42315592a31fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 42325592a31fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 42335592a31fSmrg # like `-m68040'. 42345592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42355592a31fSmrg ;; 42365592a31fSmrg esac 42375592a31fSmrg ;; 42385592a31fSmrg 42395592a31fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42405592a31fSmrg # PIC is the default for these OSes. 42415592a31fSmrg ;; 42425592a31fSmrg 42435592a31fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 42445592a31fSmrg # This hack is so that the source file can tell whether it is being 42455592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 42465592a31fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42475592a31fSmrg # (--disable-auto-import) libraries 42485592a31fSmrg m4_if([$1], [GCJ], [], 42495592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42505592a31fSmrg ;; 42515592a31fSmrg 42525592a31fSmrg darwin* | rhapsody*) 42535592a31fSmrg # PIC is the default on this platform 42545592a31fSmrg # Common symbols not allowed in MH_DYLIB files 42555592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42565592a31fSmrg ;; 42575592a31fSmrg 4258b40a6198Smrg haiku*) 4259b40a6198Smrg # PIC is the default for Haiku. 4260b40a6198Smrg # The "-static" flag exists, but is broken. 4261b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4262b40a6198Smrg ;; 4263b40a6198Smrg 42645592a31fSmrg hpux*) 42655592a31fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42665592a31fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42675592a31fSmrg # sets the default TLS model and affects inlining. 42685592a31fSmrg case $host_cpu in 42695592a31fSmrg hppa*64*) 42705592a31fSmrg # +Z the default 42713a925b30Smrg ;; 42723a925b30Smrg *) 42735592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42743a925b30Smrg ;; 42755592a31fSmrg esac 42765592a31fSmrg ;; 42775592a31fSmrg 42785592a31fSmrg interix[[3-9]]*) 42795592a31fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42805592a31fSmrg # Instead, we relocate shared libraries at runtime. 42815592a31fSmrg ;; 42825592a31fSmrg 42835592a31fSmrg msdosdjgpp*) 42845592a31fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 42855592a31fSmrg # on systems that don't support them. 42865592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42875592a31fSmrg enable_shared=no 42885592a31fSmrg ;; 42895592a31fSmrg 42905592a31fSmrg *nto* | *qnx*) 42915592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42925592a31fSmrg # it will coredump. 42935592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 42945592a31fSmrg ;; 42955592a31fSmrg 42965592a31fSmrg sysv4*MP*) 42975592a31fSmrg if test -d /usr/nec; then 42985592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42995592a31fSmrg fi 43005592a31fSmrg ;; 43015592a31fSmrg 43025592a31fSmrg *) 43035592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43045592a31fSmrg ;; 43053a925b30Smrg esac 4306b40a6198Smrg 4307b40a6198Smrg case $cc_basename in 4308b40a6198Smrg nvcc*) # Cuda Compiler Driver 2.2 4309b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4310b40a6198Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4311b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4312b40a6198Smrg fi 4313b40a6198Smrg ;; 4314b40a6198Smrg esac 43155592a31fSmrg else 43165592a31fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 43175592a31fSmrg case $host_os in 43185592a31fSmrg aix*) 43195592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43205592a31fSmrg if test "$host_cpu" = ia64; then 43215592a31fSmrg # AIX 5 now supports IA64 processor 43225592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43235592a31fSmrg else 43245592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43255592a31fSmrg fi 43265592a31fSmrg ;; 43275592a31fSmrg 43285592a31fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 43295592a31fSmrg # This hack is so that the source file can tell whether it is being 43305592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 43315592a31fSmrg m4_if([$1], [GCJ], [], 43325592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43335592a31fSmrg ;; 43345592a31fSmrg 43355592a31fSmrg hpux9* | hpux10* | hpux11*) 43365592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43375592a31fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 43385592a31fSmrg # not for PA HP-UX. 43395592a31fSmrg case $host_cpu in 43405592a31fSmrg hppa*64*|ia64*) 43415592a31fSmrg # +Z the default 43423a925b30Smrg ;; 43433a925b30Smrg *) 43445592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43453a925b30Smrg ;; 43465592a31fSmrg esac 43475592a31fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 43485592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 43495592a31fSmrg ;; 435045bc899bSmrg 43515592a31fSmrg irix5* | irix6* | nonstopux*) 43525592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43535592a31fSmrg # PIC (with -KPIC) is the default. 43545592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43555592a31fSmrg ;; 435645bc899bSmrg 4357b40a6198Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 43585592a31fSmrg case $cc_basename in 43595592a31fSmrg # old Intel for x86_64 which still supported -KPIC. 43605592a31fSmrg ecc*) 43615592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43625592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43635592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43645592a31fSmrg ;; 43655592a31fSmrg # icc used to be incompatible with GCC. 43665592a31fSmrg # ICC 10 doesn't accept -KPIC any more. 43675592a31fSmrg icc* | ifort*) 43685592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43695592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43705592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43715592a31fSmrg ;; 43725592a31fSmrg # Lahey Fortran 8.1. 43735592a31fSmrg lf95*) 43745592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43755592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43765592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 43775592a31fSmrg ;; 4378b40a6198Smrg nagfor*) 4379b40a6198Smrg # NAG Fortran compiler 4380b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4381b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4382b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4383b40a6198Smrg ;; 4384b40a6198Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 43855592a31fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 43865592a31fSmrg # which looks to be a dead project) 43875592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43885592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43905592a31fSmrg ;; 43915592a31fSmrg ccc*) 43925592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43935592a31fSmrg # All Alpha code is PIC. 43945592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43955592a31fSmrg ;; 4396b40a6198Smrg xl* | bgxl* | bgf* | mpixl*) 4397b40a6198Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 43985592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43995592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44005592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44015592a31fSmrg ;; 44025592a31fSmrg *) 44035592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 4404b40a6198Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4405b40a6198Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4406b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4407b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4409b40a6198Smrg ;; 4410b40a6198Smrg *Sun\ F* | *Sun*Fortran*) 4411b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4412b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4413b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4414b40a6198Smrg ;; 44155592a31fSmrg *Sun\ C*) 44165592a31fSmrg # Sun C 5.9 44175592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44185592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44195592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44205592a31fSmrg ;; 4421b40a6198Smrg *Intel*\ [[CF]]*Compiler*) 4422b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4423b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4424b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4425b40a6198Smrg ;; 4426b40a6198Smrg *Portland\ Group*) 4427b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4428b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44295592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44305592a31fSmrg ;; 44315592a31fSmrg esac 44325592a31fSmrg ;; 44335592a31fSmrg esac 44345592a31fSmrg ;; 443545bc899bSmrg 44365592a31fSmrg newsos6) 44375592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44385592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44395592a31fSmrg ;; 44401ac89addSmrg 44415592a31fSmrg *nto* | *qnx*) 44425592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44435592a31fSmrg # it will coredump. 44445592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44455592a31fSmrg ;; 44461ac89addSmrg 44475592a31fSmrg osf3* | osf4* | osf5*) 44485592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44495592a31fSmrg # All OSF/1 code is PIC. 44505592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44515592a31fSmrg ;; 44521ac89addSmrg 44535592a31fSmrg rdos*) 44545592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44555592a31fSmrg ;; 44561ac89addSmrg 44575592a31fSmrg solaris*) 44585592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44595592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44605592a31fSmrg case $cc_basename in 4461b40a6198Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 44625592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 44635592a31fSmrg *) 44645592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 44655592a31fSmrg esac 44665592a31fSmrg ;; 446745bc899bSmrg 44685592a31fSmrg sunos4*) 44695592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44705592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44715592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44725592a31fSmrg ;; 447345bc899bSmrg 44745592a31fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 44755592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44765592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44775592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44785592a31fSmrg ;; 447945bc899bSmrg 44805592a31fSmrg sysv4*MP*) 44815592a31fSmrg if test -d /usr/nec ;then 44825592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 44835592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44845592a31fSmrg fi 44855592a31fSmrg ;; 448645bc899bSmrg 44875592a31fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44885592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44905592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44915592a31fSmrg ;; 44923a925b30Smrg 44935592a31fSmrg unicos*) 44945592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44955592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 44965592a31fSmrg ;; 44971ac89addSmrg 44985592a31fSmrg uts4*) 44995592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45005592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45015592a31fSmrg ;; 45025592a31fSmrg 45035592a31fSmrg *) 45045592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45055592a31fSmrg ;; 450650f2e948Smrg esac 45075592a31fSmrg fi 45085592a31fSmrg]) 45095592a31fSmrgcase $host_os in 45105592a31fSmrg # For platforms which do not support PIC, -DPIC is meaningless: 45115592a31fSmrg *djgpp*) 45125592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45135592a31fSmrg ;; 45145592a31fSmrg *) 45155592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 45165592a31fSmrg ;; 45175592a31fSmrgesac 4518b40a6198Smrg 4519b40a6198SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4520b40a6198Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4521b40a6198Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4522b40a6198Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 45231ac89addSmrg 45245592a31fSmrg# 45255592a31fSmrg# Check to make sure the PIC flag actually works. 45265592a31fSmrg# 45275592a31fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 45285592a31fSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 45295592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 45305592a31fSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 45315592a31fSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 45325592a31fSmrg "" | " "*) ;; 45335592a31fSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 45345592a31fSmrg esac], 45355592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 45365592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 453750f2e948Smrgfi 45385592a31fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 45395592a31fSmrg [Additional compiler flags for building library objects]) 45401ac89addSmrg 4541b40a6198Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4542b40a6198Smrg [How to pass a linker flag through the compiler]) 45435592a31fSmrg# 45445592a31fSmrg# Check to make sure the static flag actually works. 45455592a31fSmrg# 45465592a31fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 45475592a31fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 45485592a31fSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 45495592a31fSmrg $lt_tmp_static_flag, 45505592a31fSmrg [], 45515592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 45525592a31fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 45535592a31fSmrg [Compiler flag to prevent dynamic linking]) 45545592a31fSmrg])# _LT_COMPILER_PIC 45551ac89addSmrg 45561ac89addSmrg 45575592a31fSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 45585592a31fSmrg# ---------------------------- 45595592a31fSmrg# See if the linker supports building shared libraries. 45605592a31fSmrgm4_defun([_LT_LINKER_SHLIBS], 45615592a31fSmrg[AC_REQUIRE([LT_PATH_LD])dnl 45625592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 4563b40a6198Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 45645592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 45655592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 45665592a31fSmrgm4_require([_LT_DECL_SED])dnl 45675592a31fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 45685592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 45695592a31fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 45705592a31fSmrgm4_if([$1], [CXX], [ 45715592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4572b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 45735592a31fSmrg case $host_os in 45745592a31fSmrg aix[[4-9]]*) 45755592a31fSmrg # If we're using GNU nm, then we don't want the "-C" option. 45765592a31fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4577b40a6198Smrg # Also, AIX nm treats weak defined symbols like other global defined 4578b40a6198Smrg # symbols, whereas GNU nm marks them as "W". 45795592a31fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4580b40a6198Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 45815592a31fSmrg else 45825592a31fSmrg _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' 458350f2e948Smrg fi 458450f2e948Smrg ;; 45855592a31fSmrg pw32*) 45865592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4587b40a6198Smrg ;; 45885592a31fSmrg cygwin* | mingw* | cegcc*) 4589b40a6198Smrg case $cc_basename in 4590b40a6198Smrg cl*) 4591b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4592b40a6198Smrg ;; 4593b40a6198Smrg *) 4594b40a6198Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4595b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4596b40a6198Smrg ;; 4597b40a6198Smrg esac 4598b40a6198Smrg ;; 45995592a31fSmrg *) 46005592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4601b40a6198Smrg ;; 46025592a31fSmrg esac 46035592a31fSmrg], [ 46045592a31fSmrg runpath_var= 46055592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 46065592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 46075592a31fSmrg _LT_TAGVAR(archive_cmds, $1)= 46085592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 46095592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 46105592a31fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46115592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 46125592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46135592a31fSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 46145592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 46155592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 46165592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 46175592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46185592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 46195592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46205592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=no 46215592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 46225592a31fSmrg _LT_TAGVAR(module_cmds, $1)= 46235592a31fSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 46245592a31fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 46255592a31fSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 46265592a31fSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 46275592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 46285592a31fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 46295592a31fSmrg # included in the symbol list 46305592a31fSmrg _LT_TAGVAR(include_expsyms, $1)= 46315592a31fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 46325592a31fSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 46335592a31fSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 46345592a31fSmrg # as well as any symbol that contains `d'. 46355592a31fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 46365592a31fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 46375592a31fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 46385592a31fSmrg # the symbol is explicitly referenced. Since portable code cannot 46395592a31fSmrg # rely on this symbol name, it's probably fine to never include it in 46405592a31fSmrg # preloaded symbol tables. 46415592a31fSmrg # Exclude shared library initialization/finalization symbols. 46425592a31fSmrgdnl Note also adjust exclude_expsyms for C++ above. 46435592a31fSmrg extract_expsyms_cmds= 46441ac89addSmrg 46455592a31fSmrg case $host_os in 46465592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 46475592a31fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 46485592a31fSmrg # When not using gcc, we currently assume that we are using 46495592a31fSmrg # Microsoft Visual C++. 46505592a31fSmrg if test "$GCC" != yes; then 46515592a31fSmrg with_gnu_ld=no 465250f2e948Smrg fi 46533a925b30Smrg ;; 46545592a31fSmrg interix*) 46555592a31fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 46565592a31fSmrg with_gnu_ld=yes 46575592a31fSmrg ;; 46585592a31fSmrg openbsd*) 46595592a31fSmrg with_gnu_ld=no 46605592a31fSmrg ;; 46613a925b30Smrg esac 46621ac89addSmrg 46635592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 4664b40a6198Smrg 4665b40a6198Smrg # On some targets, GNU ld is compatible enough with the native linker 4666b40a6198Smrg # that we're better off using the native interface for both. 4667b40a6198Smrg lt_use_gnu_ld_interface=no 46685592a31fSmrg if test "$with_gnu_ld" = yes; then 4669b40a6198Smrg case $host_os in 4670b40a6198Smrg aix*) 4671b40a6198Smrg # The AIX port of GNU ld has always aspired to compatibility 4672b40a6198Smrg # with the native linker. However, as the warning in the GNU ld 4673b40a6198Smrg # block says, versions before 2.19.5* couldn't really create working 4674b40a6198Smrg # shared libraries, regardless of the interface used. 4675b40a6198Smrg case `$LD -v 2>&1` in 4676b40a6198Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4677b40a6198Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4678b40a6198Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4679b40a6198Smrg *) 4680b40a6198Smrg lt_use_gnu_ld_interface=yes 4681b40a6198Smrg ;; 4682b40a6198Smrg esac 4683b40a6198Smrg ;; 4684b40a6198Smrg *) 4685b40a6198Smrg lt_use_gnu_ld_interface=yes 4686b40a6198Smrg ;; 4687b40a6198Smrg esac 4688b40a6198Smrg fi 4689b40a6198Smrg 4690b40a6198Smrg if test "$lt_use_gnu_ld_interface" = yes; then 46915592a31fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 46925592a31fSmrg wlarc='${wl}' 46931ac89addSmrg 46945592a31fSmrg # Set some defaults for GNU ld with shared library support. These 46955592a31fSmrg # are reset later if shared libraries are not supported. Putting them 46965592a31fSmrg # here allows them to be overridden if necessary. 46975592a31fSmrg runpath_var=LD_RUN_PATH 46985592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 46995592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 47005592a31fSmrg # ancient GNU ld didn't support --whole-archive et. al. 47015592a31fSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 47025592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 47035592a31fSmrg else 47045592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 47055592a31fSmrg fi 47065592a31fSmrg supports_anon_versioning=no 47075592a31fSmrg case `$LD -v 2>&1` in 4708b40a6198Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 47095592a31fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 47105592a31fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 47115592a31fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 47125592a31fSmrg *\ 2.11.*) ;; # other 2.11 versions 47135592a31fSmrg *) supports_anon_versioning=yes ;; 47145592a31fSmrg esac 47151ac89addSmrg 47165592a31fSmrg # See if GNU ld supports shared libraries. 47175592a31fSmrg case $host_os in 47185592a31fSmrg aix[[3-9]]*) 47195592a31fSmrg # On AIX/PPC, the GNU linker is very broken 47205592a31fSmrg if test "$host_cpu" != ia64; then 47215592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47225592a31fSmrg cat <<_LT_EOF 1>&2 47231ac89addSmrg 4724b40a6198Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 47255592a31fSmrg*** to be unable to reliably create shared libraries on AIX. 47265592a31fSmrg*** Therefore, libtool is disabling shared libraries support. If you 4727b40a6198Smrg*** really care for shared libraries, you may want to install binutils 4728b40a6198Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4729b40a6198Smrg*** You will then need to restart the configuration process. 47301ac89addSmrg 47315592a31fSmrg_LT_EOF 47325592a31fSmrg fi 47335592a31fSmrg ;; 47341ac89addSmrg 47355592a31fSmrg amigaos*) 47365592a31fSmrg case $host_cpu in 47375592a31fSmrg powerpc) 47385592a31fSmrg # see comment about AmigaOS4 .so support 47395592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47405592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 47415592a31fSmrg ;; 47425592a31fSmrg m68k) 47435592a31fSmrg _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)' 47445592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47455592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47465592a31fSmrg ;; 47475592a31fSmrg esac 47485592a31fSmrg ;; 47491ac89addSmrg 47505592a31fSmrg beos*) 47515592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 47525592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47535592a31fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 47545592a31fSmrg # support --undefined. This deserves some investigation. FIXME 47555592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47565592a31fSmrg else 47575592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47585592a31fSmrg fi 47595592a31fSmrg ;; 47601ac89addSmrg 47615592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 47625592a31fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 47635592a31fSmrg # as there is no search path for DLLs. 47645592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4765b40a6198Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 47665592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47675592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 47685592a31fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4769b40a6198Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4770b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 47715592a31fSmrg 47725592a31fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 47735592a31fSmrg _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' 47745592a31fSmrg # If the export-symbols file already is a .def file (1st line 47755592a31fSmrg # is EXPORTS), use it as is; otherwise, prepend... 47765592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 47775592a31fSmrg cp $export_symbols $output_objdir/$soname.def; 47785592a31fSmrg else 47795592a31fSmrg echo EXPORTS > $output_objdir/$soname.def; 47805592a31fSmrg cat $export_symbols >> $output_objdir/$soname.def; 47815592a31fSmrg fi~ 47825592a31fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 47835592a31fSmrg else 47845592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47855592a31fSmrg fi 47865592a31fSmrg ;; 47871ac89addSmrg 4788b40a6198Smrg haiku*) 4789b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4790b40a6198Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4791b40a6198Smrg ;; 4792b40a6198Smrg 47935592a31fSmrg interix[[3-9]]*) 47945592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 47955592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47965592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 47975592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47985592a31fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 47995592a31fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 48005592a31fSmrg # default) and relocated if they conflict, which is a slow very memory 48015592a31fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 48025592a31fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 48035592a31fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 48045592a31fSmrg _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' 48055592a31fSmrg _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' 48065592a31fSmrg ;; 48071ac89addSmrg 4808b40a6198Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 48095592a31fSmrg tmp_diet=no 48105592a31fSmrg if test "$host_os" = linux-dietlibc; then 48115592a31fSmrg case $cc_basename in 48125592a31fSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 48135592a31fSmrg esac 48145592a31fSmrg fi 48155592a31fSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 48165592a31fSmrg && test "$tmp_diet" = no 48175592a31fSmrg then 4818b40a6198Smrg tmp_addflag=' $pic_flag' 48195592a31fSmrg tmp_sharedflag='-shared' 48205592a31fSmrg case $cc_basename,$host_cpu in 48215592a31fSmrg pgcc*) # Portland Group C compiler 4822b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 48235592a31fSmrg tmp_addflag=' $pic_flag' 48245592a31fSmrg ;; 4825b40a6198Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 4826b40a6198Smrg # Portland Group f77 and f90 compilers 4827b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 48285592a31fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 48295592a31fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 48305592a31fSmrg tmp_addflag=' -i_dynamic' ;; 48315592a31fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 48325592a31fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 48335592a31fSmrg ifc* | ifort*) # Intel Fortran compiler 48345592a31fSmrg tmp_addflag=' -nofor_main' ;; 48355592a31fSmrg lf95*) # Lahey Fortran 8.1 48365592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48375592a31fSmrg tmp_sharedflag='--shared' ;; 4838b40a6198Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 48395592a31fSmrg tmp_sharedflag='-qmkshrobj' 48405592a31fSmrg tmp_addflag= ;; 4841b40a6198Smrg nvcc*) # Cuda Compiler Driver 2.2 4842b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 4843b40a6198Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4844b40a6198Smrg ;; 48455592a31fSmrg esac 48465592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 48475592a31fSmrg *Sun\ C*) # Sun C 5.9 4848b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 48495592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48505592a31fSmrg tmp_sharedflag='-G' ;; 48515592a31fSmrg *Sun\ F*) # Sun Fortran 8.3 48525592a31fSmrg tmp_sharedflag='-G' ;; 48535592a31fSmrg esac 48545592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48551ac89addSmrg 48565592a31fSmrg if test "x$supports_anon_versioning" = xyes; then 48575592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48585592a31fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48595592a31fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48605592a31fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 48615592a31fSmrg fi 48621ac89addSmrg 48635592a31fSmrg case $cc_basename in 4864b40a6198Smrg xlf* | bgf* | bgxlf* | mpixlf*) 48655592a31fSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 48665592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4867b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4868b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 48695592a31fSmrg if test "x$supports_anon_versioning" = xyes; then 48705592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48715592a31fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48725592a31fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4873b40a6198Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 48745592a31fSmrg fi 48755592a31fSmrg ;; 48765592a31fSmrg esac 48775592a31fSmrg else 48785592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 48795592a31fSmrg fi 48805592a31fSmrg ;; 48811ac89addSmrg 48825592a31fSmrg netbsd*) 48835592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48845592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 48855592a31fSmrg wlarc= 48865592a31fSmrg else 4887b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4888b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 48895592a31fSmrg fi 48905592a31fSmrg ;; 48911ac89addSmrg 48925592a31fSmrg solaris*) 48935592a31fSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 48945592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 48955592a31fSmrg cat <<_LT_EOF 1>&2 48961ac89addSmrg 48975592a31fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 48985592a31fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 48995592a31fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 49005592a31fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 49015592a31fSmrg*** your PATH or compiler configuration so that the native linker is 49025592a31fSmrg*** used, and then restart. 49031ac89addSmrg 49045592a31fSmrg_LT_EOF 49055592a31fSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4906b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4907b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 49085592a31fSmrg else 49095592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49105592a31fSmrg fi 49115592a31fSmrg ;; 49121ac89addSmrg 49135592a31fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 49145592a31fSmrg case `$LD -v 2>&1` in 49155592a31fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 49165592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49175592a31fSmrg cat <<_LT_EOF 1>&2 49181ac89addSmrg 49195592a31fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 49205592a31fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 49215592a31fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 49225592a31fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 49235592a31fSmrg*** your PATH or compiler configuration so that the native linker is 49245592a31fSmrg*** used, and then restart. 49251ac89addSmrg 49265592a31fSmrg_LT_EOF 49275592a31fSmrg ;; 49285592a31fSmrg *) 49295592a31fSmrg # For security reasons, it is highly recommended that you always 49305592a31fSmrg # use absolute paths for naming shared libraries, and exclude the 49315592a31fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 49325592a31fSmrg # requires that you compile everything twice, which is a pain. 49335592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49345592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49355592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49365592a31fSmrg _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' 49375592a31fSmrg else 49385592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49395592a31fSmrg fi 49405592a31fSmrg ;; 49415592a31fSmrg esac 49425592a31fSmrg ;; 49431ac89addSmrg 49445592a31fSmrg sunos4*) 49455592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49465592a31fSmrg wlarc= 49475592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 49485592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49495592a31fSmrg ;; 49501ac89addSmrg 49515592a31fSmrg *) 49525592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4953b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4954b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 49555592a31fSmrg else 49565592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49575592a31fSmrg fi 49585592a31fSmrg ;; 49595592a31fSmrg esac 49601ac89addSmrg 49615592a31fSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 49625592a31fSmrg runpath_var= 49635592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49645592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49655592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49665592a31fSmrg fi 49675592a31fSmrg else 49685592a31fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 49695592a31fSmrg case $host_os in 49705592a31fSmrg aix3*) 49715592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49725592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 49735592a31fSmrg _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' 49745592a31fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 49755592a31fSmrg # are no directories specified by -L. 49765592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49775592a31fSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 49785592a31fSmrg # Neither direct hardcoding nor static linking is supported with a 49795592a31fSmrg # broken collect2. 49805592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 49815592a31fSmrg fi 49825592a31fSmrg ;; 49831ac89addSmrg 49845592a31fSmrg aix[[4-9]]*) 49855592a31fSmrg if test "$host_cpu" = ia64; then 49865592a31fSmrg # On IA64, the linker does run time linking by default, so we don't 49875592a31fSmrg # have to do anything special. 49885592a31fSmrg aix_use_runtimelinking=no 49895592a31fSmrg exp_sym_flag='-Bexport' 49905592a31fSmrg no_entry_flag="" 49915592a31fSmrg else 49925592a31fSmrg # If we're using GNU nm, then we don't want the "-C" option. 49935592a31fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4994b40a6198Smrg # Also, AIX nm treats weak defined symbols like other global 4995b40a6198Smrg # defined symbols, whereas GNU nm marks them as "W". 49965592a31fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4997b40a6198Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 49985592a31fSmrg else 49995592a31fSmrg _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' 50005592a31fSmrg fi 50015592a31fSmrg aix_use_runtimelinking=no 50021ac89addSmrg 50035592a31fSmrg # Test if we are trying to use run time linking or normal 50045592a31fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 50055592a31fSmrg # need to do runtime linking. 50065592a31fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 50075592a31fSmrg for ld_flag in $LDFLAGS; do 50085592a31fSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 50095592a31fSmrg aix_use_runtimelinking=yes 50105592a31fSmrg break 50115592a31fSmrg fi 50125592a31fSmrg done 50135592a31fSmrg ;; 50145592a31fSmrg esac 50151ac89addSmrg 50165592a31fSmrg exp_sym_flag='-bexport' 50175592a31fSmrg no_entry_flag='-bnoentry' 50185592a31fSmrg fi 50191ac89addSmrg 50205592a31fSmrg # When large executables or shared objects are built, AIX ld can 50215592a31fSmrg # have problems creating the table of contents. If linking a library 50225592a31fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 50235592a31fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 50245592a31fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 50255592a31fSmrg 50265592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='' 50275592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 50285592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 50295592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50305592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50315592a31fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 50321ac89addSmrg 50335592a31fSmrg if test "$GCC" = yes; then 50345592a31fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 50355592a31fSmrg # We only want to do this on AIX 4.2 and lower, the check 50365592a31fSmrg # below for broken collect2 doesn't work under 4.3+ 50375592a31fSmrg collect2name=`${CC} -print-prog-name=collect2` 50385592a31fSmrg if test -f "$collect2name" && 50395592a31fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 50405592a31fSmrg then 50415592a31fSmrg # We have reworked collect2 50425592a31fSmrg : 50435592a31fSmrg else 50445592a31fSmrg # We have old collect2 50455592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 50465592a31fSmrg # It fails to find uninstalled libraries when the uninstalled 50475592a31fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 50485592a31fSmrg # to unsupported forces relinking 50495592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50505592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50515592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50525592a31fSmrg fi 50535592a31fSmrg ;; 50545592a31fSmrg esac 50555592a31fSmrg shared_flag='-shared' 50565592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 50575592a31fSmrg shared_flag="$shared_flag "'${wl}-G' 50585592a31fSmrg fi 50595592a31fSmrg else 50605592a31fSmrg # not using gcc 50615592a31fSmrg if test "$host_cpu" = ia64; then 50625592a31fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 50635592a31fSmrg # chokes on -Wl,-G. The following line is correct: 50645592a31fSmrg shared_flag='-G' 50655592a31fSmrg else 50665592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 50675592a31fSmrg shared_flag='${wl}-G' 50685592a31fSmrg else 50695592a31fSmrg shared_flag='${wl}-bM:SRE' 50705592a31fSmrg fi 50715592a31fSmrg fi 50725592a31fSmrg fi 50731ac89addSmrg 50745592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 50755592a31fSmrg # It seems that -bexpall does not export symbols beginning with 50765592a31fSmrg # underscore (_), so it is better to generate a list of symbols to export. 50775592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 50785592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 50795592a31fSmrg # Warning - without using the other runtime loading flags (-brtl), 50805592a31fSmrg # -berok will link without error, but may produce a broken library. 50815592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 50825592a31fSmrg # Determine the default libpath from the value encoded in an 50835592a31fSmrg # empty executable. 5084b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50855592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5086b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 50875592a31fSmrg else 50885592a31fSmrg if test "$host_cpu" = ia64; then 50895592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 50905592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 50915592a31fSmrg _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" 50925592a31fSmrg else 50935592a31fSmrg # Determine the default libpath from the value encoded in an 50945592a31fSmrg # empty executable. 5095b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50965592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 50975592a31fSmrg # Warning - without using the other run time loading flags, 50985592a31fSmrg # -berok will link without error, but may produce a broken library. 50995592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 51005592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5101b40a6198Smrg if test "$with_gnu_ld" = yes; then 5102b40a6198Smrg # We only use this code for GNU lds that support --whole-archive. 5103b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5104b40a6198Smrg else 5105b40a6198Smrg # Exported symbols can be pulled into shared objects from archives 5106b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5107b40a6198Smrg fi 51085592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51095592a31fSmrg # This is similar to how AIX traditionally builds its shared libraries. 51105592a31fSmrg _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' 51115592a31fSmrg fi 51125592a31fSmrg fi 51135592a31fSmrg ;; 51141ac89addSmrg 51155592a31fSmrg amigaos*) 51165592a31fSmrg case $host_cpu in 51175592a31fSmrg powerpc) 51185592a31fSmrg # see comment about AmigaOS4 .so support 51195592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51205592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51215592a31fSmrg ;; 51225592a31fSmrg m68k) 51235592a31fSmrg _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)' 51245592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51255592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51265592a31fSmrg ;; 51275592a31fSmrg esac 51285592a31fSmrg ;; 51291ac89addSmrg 51305592a31fSmrg bsdi[[45]]*) 51315592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 51325592a31fSmrg ;; 51331ac89addSmrg 51345592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 51355592a31fSmrg # When not using gcc, we currently assume that we are using 51365592a31fSmrg # Microsoft Visual C++. 51375592a31fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 51385592a31fSmrg # no search path for DLLs. 5139b40a6198Smrg case $cc_basename in 5140b40a6198Smrg cl*) 5141b40a6198Smrg # Native MSVC 5142b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5143b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5144b40a6198Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5145b40a6198Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5146b40a6198Smrg # Tell ltmain to make .lib files, not .a files. 5147b40a6198Smrg libext=lib 5148b40a6198Smrg # Tell ltmain to make .dll files, not .so files. 5149b40a6198Smrg shrext_cmds=".dll" 5150b40a6198Smrg # FIXME: Setting linknames here is a bad hack. 5151b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5152b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5153b40a6198Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5154b40a6198Smrg else 5155b40a6198Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5156b40a6198Smrg fi~ 5157b40a6198Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5158b40a6198Smrg linknames=' 5159b40a6198Smrg # The linker will not automatically build a static lib if we build a DLL. 5160b40a6198Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5161b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5162b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5163b40a6198Smrg _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' 5164b40a6198Smrg # Don't use ranlib 5165b40a6198Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5166b40a6198Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5167b40a6198Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5168b40a6198Smrg case $lt_outputfile in 5169b40a6198Smrg *.exe|*.EXE) ;; 5170b40a6198Smrg *) 5171b40a6198Smrg lt_outputfile="$lt_outputfile.exe" 5172b40a6198Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5173b40a6198Smrg ;; 5174b40a6198Smrg esac~ 5175b40a6198Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5176b40a6198Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5177b40a6198Smrg $RM "$lt_outputfile.manifest"; 5178b40a6198Smrg fi' 5179b40a6198Smrg ;; 5180b40a6198Smrg *) 5181b40a6198Smrg # Assume MSVC wrapper 5182b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5183b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5184b40a6198Smrg # Tell ltmain to make .lib files, not .a files. 5185b40a6198Smrg libext=lib 5186b40a6198Smrg # Tell ltmain to make .dll files, not .so files. 5187b40a6198Smrg shrext_cmds=".dll" 5188b40a6198Smrg # FIXME: Setting linknames here is a bad hack. 5189b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5190b40a6198Smrg # The linker will automatically build a .lib file if we build a DLL. 5191b40a6198Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5192b40a6198Smrg # FIXME: Should let the user specify the lib program. 5193b40a6198Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5194b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5195b40a6198Smrg ;; 5196b40a6198Smrg esac 51975592a31fSmrg ;; 51981ac89addSmrg 51995592a31fSmrg darwin* | rhapsody*) 52005592a31fSmrg _LT_DARWIN_LINKER_FEATURES($1) 52015592a31fSmrg ;; 52021ac89addSmrg 52035592a31fSmrg dgux*) 52045592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 52055592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52065592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52075592a31fSmrg ;; 52081ac89addSmrg 52095592a31fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 52105592a31fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 52115592a31fSmrg # does not break anything, and helps significantly (at the cost of a little 52125592a31fSmrg # extra space). 52135592a31fSmrg freebsd2.2*) 52145592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 52155592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52165592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52175592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52185592a31fSmrg ;; 521945bc899bSmrg 52205592a31fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5221b40a6198Smrg freebsd2.*) 52225592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 52235592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52245592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52255592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52265592a31fSmrg ;; 522745bc899bSmrg 52285592a31fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 52295592a31fSmrg freebsd* | dragonfly*) 5230b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 52315592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52325592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52335592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52345592a31fSmrg ;; 523545bc899bSmrg 52365592a31fSmrg hpux9*) 52375592a31fSmrg if test "$GCC" = yes; then 5238b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 52395592a31fSmrg else 52405592a31fSmrg _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' 52415592a31fSmrg fi 52425592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52435592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52445592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 524545bc899bSmrg 52465592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 52475592a31fSmrg # but as the default location of the library. 52485592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52495592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52505592a31fSmrg ;; 525145bc899bSmrg 52525592a31fSmrg hpux10*) 5253b40a6198Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5254b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52555592a31fSmrg else 52565592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 52575592a31fSmrg fi 52585592a31fSmrg if test "$with_gnu_ld" = no; then 52595592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52605592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52615592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52625592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 52635592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52645592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 52655592a31fSmrg # but as the default location of the library. 52665592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52675592a31fSmrg fi 52685592a31fSmrg ;; 526945bc899bSmrg 52705592a31fSmrg hpux11*) 5271b40a6198Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52725592a31fSmrg case $host_cpu in 52735592a31fSmrg hppa*64*) 52745592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52755592a31fSmrg ;; 52765592a31fSmrg ia64*) 5277b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52785592a31fSmrg ;; 52795592a31fSmrg *) 5280b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52815592a31fSmrg ;; 52825592a31fSmrg esac 52835592a31fSmrg else 52845592a31fSmrg case $host_cpu in 52855592a31fSmrg hppa*64*) 52865592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52875592a31fSmrg ;; 52885592a31fSmrg ia64*) 52895592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52905592a31fSmrg ;; 52915592a31fSmrg *) 5292b40a6198Smrg m4_if($1, [], [ 5293b40a6198Smrg # Older versions of the 11.00 compiler do not understand -b yet 5294b40a6198Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5295b40a6198Smrg _LT_LINKER_OPTION([if $CC understands -b], 5296b40a6198Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5297b40a6198Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5298b40a6198Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5299b40a6198Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 53005592a31fSmrg ;; 53015592a31fSmrg esac 53025592a31fSmrg fi 53035592a31fSmrg if test "$with_gnu_ld" = no; then 53045592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 53055592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 530645bc899bSmrg 53075592a31fSmrg case $host_cpu in 53085592a31fSmrg hppa*64*|ia64*) 53095592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 53105592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53115592a31fSmrg ;; 53125592a31fSmrg *) 53135592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53145592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53155592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 531645bc899bSmrg 53175592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 53185592a31fSmrg # but as the default location of the library. 53195592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53205592a31fSmrg ;; 53215592a31fSmrg esac 53225592a31fSmrg fi 532350f2e948Smrg ;; 53245592a31fSmrg 53255592a31fSmrg irix5* | irix6* | nonstopux*) 53265592a31fSmrg if test "$GCC" = yes; then 5327b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 53285592a31fSmrg # Try to use the -exported_symbol ld option, if it does not 53295592a31fSmrg # work, assume that -exports_file does not work either and 53305592a31fSmrg # implicitly export all symbols. 5331b40a6198Smrg # This should be the same for all languages, so no per-tag cache variable. 5332b40a6198Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5333b40a6198Smrg [lt_cv_irix_exported_symbol], 5334b40a6198Smrg [save_LDFLAGS="$LDFLAGS" 5335b40a6198Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5336b40a6198Smrg AC_LINK_IFELSE( 5337b40a6198Smrg [AC_LANG_SOURCE( 5338b40a6198Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5339b40a6198Smrg [C++], [[int foo (void) { return 0; }]], 5340b40a6198Smrg [Fortran 77], [[ 5341b40a6198Smrg subroutine foo 5342b40a6198Smrg end]], 5343b40a6198Smrg [Fortran], [[ 5344b40a6198Smrg subroutine foo 5345b40a6198Smrg end]])])], 5346b40a6198Smrg [lt_cv_irix_exported_symbol=yes], 5347b40a6198Smrg [lt_cv_irix_exported_symbol=no]) 5348b40a6198Smrg LDFLAGS="$save_LDFLAGS"]) 5349b40a6198Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 5350b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 5351b40a6198Smrg fi 53525592a31fSmrg else 5353b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 5354b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 53555592a31fSmrg fi 53565592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 53575592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53585592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53595592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 53605592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 536150f2e948Smrg ;; 53621ac89addSmrg 53635592a31fSmrg netbsd*) 53645592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53655592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 53665592a31fSmrg else 53675592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 53685592a31fSmrg fi 53695592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53705592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53715592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53725592a31fSmrg ;; 53731ac89addSmrg 53745592a31fSmrg newsos6) 53755592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 53765592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53775592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53785592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53795592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53805592a31fSmrg ;; 53811ac89addSmrg 53825592a31fSmrg *nto* | *qnx*) 53835592a31fSmrg ;; 53841ac89addSmrg 53855592a31fSmrg openbsd*) 53865592a31fSmrg if test -f /usr/libexec/ld.so; then 53875592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53885592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53895592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53905592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 53915592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 53925592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 53935592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 53945592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 53955592a31fSmrg else 53965592a31fSmrg case $host_os in 53975592a31fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 53985592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53995592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54005592a31fSmrg ;; 54015592a31fSmrg *) 54025592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54035592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54045592a31fSmrg ;; 54055592a31fSmrg esac 54065592a31fSmrg fi 54075592a31fSmrg else 54085592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 54095592a31fSmrg fi 54105592a31fSmrg ;; 54111ac89addSmrg 54125592a31fSmrg os2*) 54135592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54145592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54155592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5416b40a6198Smrg _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' 54175592a31fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 54185592a31fSmrg ;; 54191ac89addSmrg 54205592a31fSmrg osf3*) 54215592a31fSmrg if test "$GCC" = yes; then 54225592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5423b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 54245592a31fSmrg else 54255592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5426b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 54275592a31fSmrg fi 54285592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54295592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54305592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54315592a31fSmrg ;; 54321ac89addSmrg 54335592a31fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 54345592a31fSmrg if test "$GCC" = yes; then 54355592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5436b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 54375592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54385592a31fSmrg else 54395592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5440b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 54415592a31fSmrg _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~ 5442b40a6198Smrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 54431ac89addSmrg 54445592a31fSmrg # Both c and cxx compiler support -rpath directly 54455592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 54465592a31fSmrg fi 54475592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54485592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54495592a31fSmrg ;; 54501ac89addSmrg 54515592a31fSmrg solaris*) 54525592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 54535592a31fSmrg if test "$GCC" = yes; then 54545592a31fSmrg wlarc='${wl}' 5455b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 54565592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5457b40a6198Smrg $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54585592a31fSmrg else 54595592a31fSmrg case `$CC -V 2>&1` in 54605592a31fSmrg *"Compilers 5.0"*) 54615592a31fSmrg wlarc='' 54625592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 54635592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54645592a31fSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 54655592a31fSmrg ;; 54665592a31fSmrg *) 54675592a31fSmrg wlarc='${wl}' 54685592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 54695592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54705592a31fSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54715592a31fSmrg ;; 54725592a31fSmrg esac 54735592a31fSmrg fi 54745592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54755592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54765592a31fSmrg case $host_os in 54775592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54785592a31fSmrg *) 54795592a31fSmrg # The compiler driver will combine and reorder linker options, 54805592a31fSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 54815592a31fSmrg # but is careful enough not to reorder. 54825592a31fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 54835592a31fSmrg if test "$GCC" = yes; then 54845592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 54855592a31fSmrg else 54865592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 54875592a31fSmrg fi 54885592a31fSmrg ;; 54895592a31fSmrg esac 54905592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54915592a31fSmrg ;; 54921ac89addSmrg 54935592a31fSmrg sunos4*) 54945592a31fSmrg if test "x$host_vendor" = xsequent; then 54955592a31fSmrg # Use $CC to link under sequent, because it throws in some extra .o 54965592a31fSmrg # files that make .init and .fini sections work. 54975592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 54985592a31fSmrg else 54995592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 55005592a31fSmrg fi 55015592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55025592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 55035592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55045592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55055592a31fSmrg ;; 55061ac89addSmrg 55075592a31fSmrg sysv4) 55085592a31fSmrg case $host_vendor in 55095592a31fSmrg sni) 55105592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55115592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 55125592a31fSmrg ;; 55135592a31fSmrg siemens) 55145592a31fSmrg ## LD is ld it makes a PLAMLIB 55155592a31fSmrg ## CC just makes a GrossModule. 55165592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 55175592a31fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 55185592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 55195592a31fSmrg ;; 55205592a31fSmrg motorola) 55215592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55225592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 55235592a31fSmrg ;; 55245592a31fSmrg esac 55255592a31fSmrg runpath_var='LD_RUN_PATH' 55265592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55275592a31fSmrg ;; 55281ac89addSmrg 55295592a31fSmrg sysv4.3*) 55305592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55315592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55325592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 55335592a31fSmrg ;; 55341ac89addSmrg 55355592a31fSmrg sysv4*MP*) 55365592a31fSmrg if test -d /usr/nec; then 55375592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55385592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55395592a31fSmrg runpath_var=LD_RUN_PATH 55405592a31fSmrg hardcode_runpath_var=yes 55415592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 55425592a31fSmrg fi 55435592a31fSmrg ;; 55441ac89addSmrg 55455592a31fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 55465592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55475592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55485592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55495592a31fSmrg runpath_var='LD_RUN_PATH' 55501ac89addSmrg 55515592a31fSmrg if test "$GCC" = yes; then 55525592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55535592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55545592a31fSmrg else 55555592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55565592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55575592a31fSmrg fi 55585592a31fSmrg ;; 55591ac89addSmrg 55605592a31fSmrg sysv5* | sco3.2v5* | sco5v6*) 55615592a31fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 55625592a31fSmrg # link with -lc, and that would cause any symbols used from libc to 55635592a31fSmrg # always be unresolved, which means just about no library would 55645592a31fSmrg # ever link correctly. If we're not using GNU ld we use -z text 55655592a31fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 55665592a31fSmrg # as -z defs. 55675592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55685592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55695592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55705592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55715592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 55725592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55735592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55745592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55755592a31fSmrg runpath_var='LD_RUN_PATH' 55761ac89addSmrg 55775592a31fSmrg if test "$GCC" = yes; then 55785592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55795592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55805592a31fSmrg else 55815592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55825592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55835592a31fSmrg fi 55845592a31fSmrg ;; 55851ac89addSmrg 55865592a31fSmrg uts4*) 55875592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55885592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55895592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55905592a31fSmrg ;; 559150f2e948Smrg 55925592a31fSmrg *) 55935592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 55945592a31fSmrg ;; 55955592a31fSmrg esac 559650f2e948Smrg 55975592a31fSmrg if test x$host_vendor = xsni; then 55985592a31fSmrg case $host in 55995592a31fSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 56005592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 56015592a31fSmrg ;; 56025592a31fSmrg esac 56035592a31fSmrg fi 56045592a31fSmrg fi 56055592a31fSmrg]) 56065592a31fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 56075592a31fSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 560850f2e948Smrg 56095592a31fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 561050f2e948Smrg 56115592a31fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 56125592a31fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 56135592a31fSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 56145592a31fSmrg [The commands to extract the exported symbol list from a shared archive]) 561550f2e948Smrg 56165592a31fSmrg# 56175592a31fSmrg# Do we need to explicitly link libc? 56185592a31fSmrg# 56195592a31fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 56205592a31fSmrgx|xyes) 56215592a31fSmrg # Assume -lc should be added 56225592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56231ac89addSmrg 56245592a31fSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 56255592a31fSmrg case $_LT_TAGVAR(archive_cmds, $1) in 56265592a31fSmrg *'~'*) 56275592a31fSmrg # FIXME: we may have to deal with multi-command sequences. 56285592a31fSmrg ;; 56295592a31fSmrg '$CC '*) 56305592a31fSmrg # Test whether the compiler implicitly links with -lc since on some 56315592a31fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 56325592a31fSmrg # to ld, don't add -lc before -lgcc. 5633b40a6198Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5634b40a6198Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5635b40a6198Smrg [$RM conftest* 5636b40a6198Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5637b40a6198Smrg 5638b40a6198Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5639b40a6198Smrg soname=conftest 5640b40a6198Smrg lib=conftest 5641b40a6198Smrg libobjs=conftest.$ac_objext 5642b40a6198Smrg deplibs= 5643b40a6198Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5644b40a6198Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5645b40a6198Smrg compiler_flags=-v 5646b40a6198Smrg linker_flags=-v 5647b40a6198Smrg verstring= 5648b40a6198Smrg output_objdir=. 5649b40a6198Smrg libname=conftest 5650b40a6198Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5651b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5652b40a6198Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5653b40a6198Smrg then 5654b40a6198Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5655b40a6198Smrg else 5656b40a6198Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5657b40a6198Smrg fi 5658b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5659b40a6198Smrg else 5660b40a6198Smrg cat conftest.err 1>&5 5661b40a6198Smrg fi 5662b40a6198Smrg $RM conftest* 5663b40a6198Smrg ]) 5664b40a6198Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 56655592a31fSmrg ;; 56665592a31fSmrg esac 56675592a31fSmrg fi 56685592a31fSmrg ;; 56695592a31fSmrgesac 56701ac89addSmrg 56715592a31fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 56725592a31fSmrg [Whether or not to add -lc for building shared libraries]) 56735592a31fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 56745592a31fSmrg [enable_shared_with_static_runtimes], [0], 56755592a31fSmrg [Whether or not to disallow shared libs when runtime libs are static]) 56765592a31fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 56775592a31fSmrg [Compiler flag to allow reflexive dlopens]) 56785592a31fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 56795592a31fSmrg [Compiler flag to generate shared objects directly from archives]) 56805592a31fSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 56815592a31fSmrg [Whether the compiler copes with passing no objects directly]) 56825592a31fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 56835592a31fSmrg [Create an old-style archive from a shared archive]) 56845592a31fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 56855592a31fSmrg [Create a temporary old-style archive to link instead of a shared archive]) 56865592a31fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 56875592a31fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 56885592a31fSmrg_LT_TAGDECL([], [module_cmds], [2], 56895592a31fSmrg [Commands used to build a loadable module if different from building 56905592a31fSmrg a shared archive.]) 56915592a31fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 56925592a31fSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 56935592a31fSmrg [Whether we are building with GNU ld or not]) 56945592a31fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 56955592a31fSmrg [Flag that allows shared libraries with undefined symbols to be built]) 56965592a31fSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 56975592a31fSmrg [Flag that enforces no undefined symbols]) 56985592a31fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 56995592a31fSmrg [Flag to hardcode $libdir into a binary during linking. 57005592a31fSmrg This must work even if $libdir does not exist]) 57015592a31fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 57025592a31fSmrg [Whether we need a single "-rpath" flag with a separated argument]) 57035592a31fSmrg_LT_TAGDECL([], [hardcode_direct], [0], 57045592a31fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57055592a31fSmrg DIR into the resulting binary]) 57065592a31fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 57075592a31fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57085592a31fSmrg DIR into the resulting binary and the resulting library dependency is 57095592a31fSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 57105592a31fSmrg library is relocated]) 57115592a31fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 57125592a31fSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 57135592a31fSmrg into the resulting binary]) 57145592a31fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 57155592a31fSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 57165592a31fSmrg into the resulting binary]) 57175592a31fSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 57185592a31fSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 57195592a31fSmrg into the library and all subsequent libraries and executables linked 57205592a31fSmrg against it]) 57215592a31fSmrg_LT_TAGDECL([], [inherit_rpath], [0], 57225592a31fSmrg [Set to yes if linker adds runtime paths of dependent libraries 57235592a31fSmrg to runtime path list]) 57245592a31fSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 57255592a31fSmrg [Whether libtool must link a program against all its dependency libraries]) 57265592a31fSmrg_LT_TAGDECL([], [always_export_symbols], [0], 57275592a31fSmrg [Set to "yes" if exported symbols are required]) 57285592a31fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 57295592a31fSmrg [The commands to list exported symbols]) 57305592a31fSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 57315592a31fSmrg [Symbols that should not be listed in the preloaded symbols]) 57325592a31fSmrg_LT_TAGDECL([], [include_expsyms], [1], 57335592a31fSmrg [Symbols that must always be exported]) 57345592a31fSmrg_LT_TAGDECL([], [prelink_cmds], [2], 57355592a31fSmrg [Commands necessary for linking programs (against libraries) with templates]) 5736b40a6198Smrg_LT_TAGDECL([], [postlink_cmds], [2], 5737b40a6198Smrg [Commands necessary for finishing linking programs]) 57385592a31fSmrg_LT_TAGDECL([], [file_list_spec], [1], 57395592a31fSmrg [Specify filename containing input files]) 57405592a31fSmrgdnl FIXME: Not yet implemented 57415592a31fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 57425592a31fSmrgdnl [Compiler flag to generate thread safe objects]) 57435592a31fSmrg])# _LT_LINKER_SHLIBS 57445592a31fSmrg 57455592a31fSmrg 57465592a31fSmrg# _LT_LANG_C_CONFIG([TAG]) 57475592a31fSmrg# ------------------------ 57485592a31fSmrg# Ensure that the configuration variables for a C compiler are suitably 57495592a31fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 57505592a31fSmrg# the compiler configuration to `libtool'. 57515592a31fSmrgm4_defun([_LT_LANG_C_CONFIG], 57525592a31fSmrg[m4_require([_LT_DECL_EGREP])dnl 57535592a31fSmrglt_save_CC="$CC" 57545592a31fSmrgAC_LANG_PUSH(C) 57551ac89addSmrg 57565592a31fSmrg# Source file extension for C test sources. 57575592a31fSmrgac_ext=c 57581ac89addSmrg 57595592a31fSmrg# Object file extension for compiled C test sources. 57605592a31fSmrgobjext=o 57615592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 57621ac89addSmrg 57635592a31fSmrg# Code to be used in simple compile tests 57645592a31fSmrglt_simple_compile_test_code="int some_variable = 0;" 57651ac89addSmrg 57665592a31fSmrg# Code to be used in simple link tests 57675592a31fSmrglt_simple_link_test_code='int main(){return(0);}' 57681ac89addSmrg 57695592a31fSmrg_LT_TAG_COMPILER 57705592a31fSmrg# Save the default compiler, since it gets overwritten when the other 57715592a31fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 57725592a31fSmrgcompiler_DEFAULT=$CC 57731ac89addSmrg 57745592a31fSmrg# save warnings/boilerplate of simple test code 57755592a31fSmrg_LT_COMPILER_BOILERPLATE 57765592a31fSmrg_LT_LINKER_BOILERPLATE 57771ac89addSmrg 57785592a31fSmrgif test -n "$compiler"; then 57795592a31fSmrg _LT_COMPILER_NO_RTTI($1) 57805592a31fSmrg _LT_COMPILER_PIC($1) 57815592a31fSmrg _LT_COMPILER_C_O($1) 57825592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 57835592a31fSmrg _LT_LINKER_SHLIBS($1) 57845592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 57855592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 57865592a31fSmrg LT_SYS_DLOPEN_SELF 57875592a31fSmrg _LT_CMD_STRIPLIB 57885592a31fSmrg 57895592a31fSmrg # Report which library types will actually be built 57905592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 57915592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 57925592a31fSmrg 57935592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 57945592a31fSmrg test "$can_build_shared" = "no" && enable_shared=no 57955592a31fSmrg 57965592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 57975592a31fSmrg # are all built from PIC. 57985592a31fSmrg case $host_os in 57995592a31fSmrg aix3*) 58005592a31fSmrg test "$enable_shared" = yes && enable_static=no 58015592a31fSmrg if test -n "$RANLIB"; then 58025592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 58035592a31fSmrg postinstall_cmds='$RANLIB $lib' 58045592a31fSmrg fi 58055592a31fSmrg ;; 58061ac89addSmrg 58075592a31fSmrg aix[[4-9]]*) 58085592a31fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58095592a31fSmrg test "$enable_shared" = yes && enable_static=no 58105592a31fSmrg fi 58115592a31fSmrg ;; 58125592a31fSmrg esac 58135592a31fSmrg AC_MSG_RESULT([$enable_shared]) 58141ac89addSmrg 58155592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 58165592a31fSmrg # Make sure either enable_shared or enable_static is yes. 58175592a31fSmrg test "$enable_shared" = yes || enable_static=yes 58185592a31fSmrg AC_MSG_RESULT([$enable_static]) 58191ac89addSmrg 58205592a31fSmrg _LT_CONFIG($1) 58215592a31fSmrgfi 58225592a31fSmrgAC_LANG_POP 58235592a31fSmrgCC="$lt_save_CC" 58245592a31fSmrg])# _LT_LANG_C_CONFIG 582550f2e948Smrg 582650f2e948Smrg 58275592a31fSmrg# _LT_LANG_CXX_CONFIG([TAG]) 58285592a31fSmrg# -------------------------- 58295592a31fSmrg# Ensure that the configuration variables for a C++ compiler are suitably 58305592a31fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 58315592a31fSmrg# the compiler configuration to `libtool'. 58325592a31fSmrgm4_defun([_LT_LANG_CXX_CONFIG], 5833b40a6198Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 58345592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 5835b40a6198Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5836b40a6198Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5837b40a6198Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5838b40a6198Smrg (test "X$CXX" != "Xg++"))) ; then 5839b40a6198Smrg AC_PROG_CXXCPP 5840b40a6198Smrgelse 5841b40a6198Smrg _lt_caught_CXX_error=yes 5842b40a6198Smrgfi 58435592a31fSmrg 58445592a31fSmrgAC_LANG_PUSH(C++) 58455592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 58465592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 58475592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 58485592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 58495592a31fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 58505592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 58515592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 58525592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 58535592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 58545592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 58555592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 58565592a31fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 58575592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 58585592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 58595592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 58605592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 58615592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 58625592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5863b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5864b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 58655592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 58665592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 58675592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 58681ac89addSmrg 58695592a31fSmrg# Source file extension for C++ test sources. 58705592a31fSmrgac_ext=cpp 58711ac89addSmrg 58725592a31fSmrg# Object file extension for compiled C++ test sources. 58735592a31fSmrgobjext=o 58745592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 58755592a31fSmrg 58765592a31fSmrg# No sense in running all these tests if we already determined that 58775592a31fSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 58785592a31fSmrg# are currently assumed to apply to all compilers on this platform, 58795592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 58805592a31fSmrgif test "$_lt_caught_CXX_error" != yes; then 58815592a31fSmrg # Code to be used in simple compile tests 58825592a31fSmrg lt_simple_compile_test_code="int some_variable = 0;" 58835592a31fSmrg 58845592a31fSmrg # Code to be used in simple link tests 58855592a31fSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 58865592a31fSmrg 58875592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 58885592a31fSmrg _LT_TAG_COMPILER 58895592a31fSmrg 58905592a31fSmrg # save warnings/boilerplate of simple test code 58915592a31fSmrg _LT_COMPILER_BOILERPLATE 58925592a31fSmrg _LT_LINKER_BOILERPLATE 58935592a31fSmrg 58945592a31fSmrg # Allow CC to be a program name with arguments. 58955592a31fSmrg lt_save_CC=$CC 5896b40a6198Smrg lt_save_CFLAGS=$CFLAGS 58975592a31fSmrg lt_save_LD=$LD 58985592a31fSmrg lt_save_GCC=$GCC 58995592a31fSmrg GCC=$GXX 59005592a31fSmrg lt_save_with_gnu_ld=$with_gnu_ld 59015592a31fSmrg lt_save_path_LD=$lt_cv_path_LD 59025592a31fSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 59035592a31fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 59045592a31fSmrg else 59055592a31fSmrg $as_unset lt_cv_prog_gnu_ld 59065592a31fSmrg fi 59075592a31fSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 59085592a31fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 59095592a31fSmrg else 59105592a31fSmrg $as_unset lt_cv_path_LD 59115592a31fSmrg fi 59125592a31fSmrg test -z "${LDCXX+set}" || LD=$LDCXX 59135592a31fSmrg CC=${CXX-"c++"} 5914b40a6198Smrg CFLAGS=$CXXFLAGS 59155592a31fSmrg compiler=$CC 59165592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 59175592a31fSmrg _LT_CC_BASENAME([$compiler]) 59181ac89addSmrg 59195592a31fSmrg if test -n "$compiler"; then 59205592a31fSmrg # We don't want -fno-exception when compiling C++ code, so set the 59215592a31fSmrg # no_builtin_flag separately 59225592a31fSmrg if test "$GXX" = yes; then 59235592a31fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 59245592a31fSmrg else 59255592a31fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 59265592a31fSmrg fi 59271ac89addSmrg 59285592a31fSmrg if test "$GXX" = yes; then 59295592a31fSmrg # Set up default GNU C++ configuration 593050f2e948Smrg 59315592a31fSmrg LT_PATH_LD 593250f2e948Smrg 59335592a31fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 59345592a31fSmrg # archiving commands below assume that GNU ld is being used. 59355592a31fSmrg if test "$with_gnu_ld" = yes; then 5936b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5937b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 593850f2e948Smrg 59395592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59405592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 594150f2e948Smrg 59425592a31fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 59435592a31fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 59445592a31fSmrg # investigate it a little bit more. (MM) 59455592a31fSmrg wlarc='${wl}' 594650f2e948Smrg 59475592a31fSmrg # ancient GNU ld didn't support --whole-archive et. al. 59485592a31fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 59495592a31fSmrg $GREP 'no-whole-archive' > /dev/null; then 59505592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 59515592a31fSmrg else 59525592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59535592a31fSmrg fi 59545592a31fSmrg else 59555592a31fSmrg with_gnu_ld=no 59565592a31fSmrg wlarc= 59575592a31fSmrg 59585592a31fSmrg # A generic and very simple default shared library creation 59595592a31fSmrg # command for GNU C++ for the case where it uses the native 59605592a31fSmrg # linker, instead of GNU ld. If possible, this setting should 59615592a31fSmrg # overridden to take advantage of the native linker features on 59625592a31fSmrg # the platform it is being used on. 59635592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 59645592a31fSmrg fi 596550f2e948Smrg 59665592a31fSmrg # Commands to make compiler produce verbose output that lists 59675592a31fSmrg # what "hidden" libraries, object files and flags are used when 59685592a31fSmrg # linking a shared library. 5969b40a6198Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 597050f2e948Smrg 59715592a31fSmrg else 59725592a31fSmrg GXX=no 59735592a31fSmrg with_gnu_ld=no 59745592a31fSmrg wlarc= 59755592a31fSmrg fi 597650f2e948Smrg 59775592a31fSmrg # PORTME: fill in a description of your system's C++ link characteristics 59785592a31fSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 59795592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 59805592a31fSmrg case $host_os in 59815592a31fSmrg aix3*) 59825592a31fSmrg # FIXME: insert proper C++ library support 59835592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59845592a31fSmrg ;; 59855592a31fSmrg aix[[4-9]]*) 59865592a31fSmrg if test "$host_cpu" = ia64; then 59875592a31fSmrg # On IA64, the linker does run time linking by default, so we don't 59885592a31fSmrg # have to do anything special. 59895592a31fSmrg aix_use_runtimelinking=no 59905592a31fSmrg exp_sym_flag='-Bexport' 59915592a31fSmrg no_entry_flag="" 59925592a31fSmrg else 59935592a31fSmrg aix_use_runtimelinking=no 59945592a31fSmrg 59955592a31fSmrg # Test if we are trying to use run time linking or normal 59965592a31fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 59975592a31fSmrg # need to do runtime linking. 59985592a31fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 59995592a31fSmrg for ld_flag in $LDFLAGS; do 60005592a31fSmrg case $ld_flag in 60015592a31fSmrg *-brtl*) 60025592a31fSmrg aix_use_runtimelinking=yes 60035592a31fSmrg break 60045592a31fSmrg ;; 60055592a31fSmrg esac 60065592a31fSmrg done 60075592a31fSmrg ;; 60085592a31fSmrg esac 600950f2e948Smrg 60105592a31fSmrg exp_sym_flag='-bexport' 60115592a31fSmrg no_entry_flag='-bnoentry' 60125592a31fSmrg fi 601350f2e948Smrg 60145592a31fSmrg # When large executables or shared objects are built, AIX ld can 60155592a31fSmrg # have problems creating the table of contents. If linking a library 60165592a31fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 60175592a31fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60185592a31fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60195592a31fSmrg 60205592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='' 60215592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60225592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60235592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60245592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60255592a31fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60265592a31fSmrg 60275592a31fSmrg if test "$GXX" = yes; then 60285592a31fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60295592a31fSmrg # We only want to do this on AIX 4.2 and lower, the check 60305592a31fSmrg # below for broken collect2 doesn't work under 4.3+ 60315592a31fSmrg collect2name=`${CC} -print-prog-name=collect2` 60325592a31fSmrg if test -f "$collect2name" && 60335592a31fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60345592a31fSmrg then 60355592a31fSmrg # We have reworked collect2 60365592a31fSmrg : 60375592a31fSmrg else 60385592a31fSmrg # We have old collect2 60395592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60405592a31fSmrg # It fails to find uninstalled libraries when the uninstalled 60415592a31fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 60425592a31fSmrg # to unsupported forces relinking 60435592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60445592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60455592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60465592a31fSmrg fi 60475592a31fSmrg esac 60485592a31fSmrg shared_flag='-shared' 60495592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 60505592a31fSmrg shared_flag="$shared_flag "'${wl}-G' 60515592a31fSmrg fi 60525592a31fSmrg else 60535592a31fSmrg # not using gcc 60545592a31fSmrg if test "$host_cpu" = ia64; then 60555592a31fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60565592a31fSmrg # chokes on -Wl,-G. The following line is correct: 60575592a31fSmrg shared_flag='-G' 60585592a31fSmrg else 60595592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 60605592a31fSmrg shared_flag='${wl}-G' 60615592a31fSmrg else 60625592a31fSmrg shared_flag='${wl}-bM:SRE' 60635592a31fSmrg fi 60645592a31fSmrg fi 60655592a31fSmrg fi 606650f2e948Smrg 60675592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60685592a31fSmrg # It seems that -bexpall does not export symbols beginning with 60695592a31fSmrg # underscore (_), so it is better to generate a list of symbols to 60705592a31fSmrg # export. 60715592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 60725592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 60735592a31fSmrg # Warning - without using the other runtime loading flags (-brtl), 60745592a31fSmrg # -berok will link without error, but may produce a broken library. 60755592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60765592a31fSmrg # Determine the default libpath from the value encoded in an empty 60775592a31fSmrg # executable. 6078b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60795592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60805592a31fSmrg 6081b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 60825592a31fSmrg else 60835592a31fSmrg if test "$host_cpu" = ia64; then 60845592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60855592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 60865592a31fSmrg _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" 60875592a31fSmrg else 60885592a31fSmrg # Determine the default libpath from the value encoded in an 60895592a31fSmrg # empty executable. 6090b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60915592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60925592a31fSmrg # Warning - without using the other run time loading flags, 60935592a31fSmrg # -berok will link without error, but may produce a broken library. 60945592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 60955592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6096b40a6198Smrg if test "$with_gnu_ld" = yes; then 6097b40a6198Smrg # We only use this code for GNU lds that support --whole-archive. 6098b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6099b40a6198Smrg else 6100b40a6198Smrg # Exported symbols can be pulled into shared objects from archives 6101b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6102b40a6198Smrg fi 61035592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61045592a31fSmrg # This is similar to how AIX traditionally builds its shared 61055592a31fSmrg # libraries. 61065592a31fSmrg _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' 61075592a31fSmrg fi 61085592a31fSmrg fi 61095592a31fSmrg ;; 611050f2e948Smrg 61115592a31fSmrg beos*) 61125592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 61135592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61145592a31fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 61155592a31fSmrg # support --undefined. This deserves some investigation. FIXME 61165592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61175592a31fSmrg else 61185592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61195592a31fSmrg fi 61205592a31fSmrg ;; 612150f2e948Smrg 61225592a31fSmrg chorus*) 61235592a31fSmrg case $cc_basename in 61245592a31fSmrg *) 61255592a31fSmrg # FIXME: insert proper C++ library support 61265592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61275592a31fSmrg ;; 61285592a31fSmrg esac 61295592a31fSmrg ;; 613050f2e948Smrg 61315592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 6132b40a6198Smrg case $GXX,$cc_basename in 6133b40a6198Smrg ,cl* | no,cl*) 6134b40a6198Smrg # Native MSVC 6135b40a6198Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6136b40a6198Smrg # no search path for DLLs. 6137b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6138b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6139b40a6198Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6140b40a6198Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6141b40a6198Smrg # Tell ltmain to make .lib files, not .a files. 6142b40a6198Smrg libext=lib 6143b40a6198Smrg # Tell ltmain to make .dll files, not .so files. 6144b40a6198Smrg shrext_cmds=".dll" 6145b40a6198Smrg # FIXME: Setting linknames here is a bad hack. 6146b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6147b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6148b40a6198Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6149b40a6198Smrg else 6150b40a6198Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6151b40a6198Smrg fi~ 6152b40a6198Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6153b40a6198Smrg linknames=' 6154b40a6198Smrg # The linker will not automatically build a static lib if we build a DLL. 6155b40a6198Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6156b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6157b40a6198Smrg # Don't use ranlib 6158b40a6198Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6159b40a6198Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6160b40a6198Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6161b40a6198Smrg case $lt_outputfile in 6162b40a6198Smrg *.exe|*.EXE) ;; 6163b40a6198Smrg *) 6164b40a6198Smrg lt_outputfile="$lt_outputfile.exe" 6165b40a6198Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6166b40a6198Smrg ;; 6167b40a6198Smrg esac~ 6168b40a6198Smrg func_to_tool_file "$lt_outputfile"~ 6169b40a6198Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6170b40a6198Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6171b40a6198Smrg $RM "$lt_outputfile.manifest"; 6172b40a6198Smrg fi' 6173b40a6198Smrg ;; 6174b40a6198Smrg *) 6175b40a6198Smrg # g++ 6176b40a6198Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6177b40a6198Smrg # as there is no search path for DLLs. 6178b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6179b40a6198Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6180b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6181b40a6198Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6182b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6183b40a6198Smrg 6184b40a6198Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6185b40a6198Smrg _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' 6186b40a6198Smrg # If the export-symbols file already is a .def file (1st line 6187b40a6198Smrg # is EXPORTS), use it as is; otherwise, prepend... 6188b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6189b40a6198Smrg cp $export_symbols $output_objdir/$soname.def; 6190b40a6198Smrg else 6191b40a6198Smrg echo EXPORTS > $output_objdir/$soname.def; 6192b40a6198Smrg cat $export_symbols >> $output_objdir/$soname.def; 6193b40a6198Smrg fi~ 6194b40a6198Smrg $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' 6195b40a6198Smrg else 6196b40a6198Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6197b40a6198Smrg fi 6198b40a6198Smrg ;; 6199b40a6198Smrg esac 6200b40a6198Smrg ;; 62015592a31fSmrg darwin* | rhapsody*) 62025592a31fSmrg _LT_DARWIN_LINKER_FEATURES($1) 62035592a31fSmrg ;; 620450f2e948Smrg 62055592a31fSmrg dgux*) 62065592a31fSmrg case $cc_basename in 62075592a31fSmrg ec++*) 62085592a31fSmrg # FIXME: insert proper C++ library support 62095592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62105592a31fSmrg ;; 62115592a31fSmrg ghcx*) 62125592a31fSmrg # Green Hills C++ Compiler 62135592a31fSmrg # FIXME: insert proper C++ library support 62145592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62155592a31fSmrg ;; 62165592a31fSmrg *) 62175592a31fSmrg # FIXME: insert proper C++ library support 62185592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62195592a31fSmrg ;; 62205592a31fSmrg esac 62215592a31fSmrg ;; 622250f2e948Smrg 6223b40a6198Smrg freebsd2.*) 62245592a31fSmrg # C++ shared libraries reported to be fairly broken before 62255592a31fSmrg # switch to ELF 62265592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62275592a31fSmrg ;; 622850f2e948Smrg 62295592a31fSmrg freebsd-elf*) 62305592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62315592a31fSmrg ;; 62325592a31fSmrg 62335592a31fSmrg freebsd* | dragonfly*) 62345592a31fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 62355592a31fSmrg # conventions 62365592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 62375592a31fSmrg ;; 623850f2e948Smrg 62395592a31fSmrg gnu*) 62405592a31fSmrg ;; 624150f2e948Smrg 6242b40a6198Smrg haiku*) 6243b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6244b40a6198Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6245b40a6198Smrg ;; 6246b40a6198Smrg 62475592a31fSmrg hpux9*) 62485592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62495592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62505592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62515592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62525592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 62535592a31fSmrg # but as the default 62545592a31fSmrg # location of the library. 62555592a31fSmrg 62565592a31fSmrg case $cc_basename in 62575592a31fSmrg CC*) 62585592a31fSmrg # FIXME: insert proper C++ library support 62595592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62605592a31fSmrg ;; 62615592a31fSmrg aCC*) 62625592a31fSmrg _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' 62635592a31fSmrg # Commands to make compiler produce verbose output that lists 62645592a31fSmrg # what "hidden" libraries, object files and flags are used when 62655592a31fSmrg # linking a shared library. 62665592a31fSmrg # 62675592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 62685592a31fSmrg # explicitly linking system object files so we need to strip them 62695592a31fSmrg # from the output so that they don't get included in the library 62705592a31fSmrg # dependencies. 6271b40a6198Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 62725592a31fSmrg ;; 62735592a31fSmrg *) 62745592a31fSmrg if test "$GXX" = yes; then 6275b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 62765592a31fSmrg else 62775592a31fSmrg # FIXME: insert proper C++ library support 62785592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62795592a31fSmrg fi 62805592a31fSmrg ;; 62815592a31fSmrg esac 62825592a31fSmrg ;; 628350f2e948Smrg 62845592a31fSmrg hpux10*|hpux11*) 62855592a31fSmrg if test $with_gnu_ld = no; then 62865592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62875592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62885592a31fSmrg 62895592a31fSmrg case $host_cpu in 62905592a31fSmrg hppa*64*|ia64*) 62915592a31fSmrg ;; 62925592a31fSmrg *) 62935592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62945592a31fSmrg ;; 62955592a31fSmrg esac 62965592a31fSmrg fi 62975592a31fSmrg case $host_cpu in 62985592a31fSmrg hppa*64*|ia64*) 62995592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63005592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63015592a31fSmrg ;; 63025592a31fSmrg *) 63035592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63045592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63055592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 63065592a31fSmrg # but as the default 63075592a31fSmrg # location of the library. 63085592a31fSmrg ;; 63095592a31fSmrg esac 63105592a31fSmrg 63115592a31fSmrg case $cc_basename in 63125592a31fSmrg CC*) 63135592a31fSmrg # FIXME: insert proper C++ library support 63145592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63155592a31fSmrg ;; 63165592a31fSmrg aCC*) 63175592a31fSmrg case $host_cpu in 63185592a31fSmrg hppa*64*) 63195592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63205592a31fSmrg ;; 63215592a31fSmrg ia64*) 63225592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63235592a31fSmrg ;; 63245592a31fSmrg *) 63255592a31fSmrg _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' 63265592a31fSmrg ;; 63275592a31fSmrg esac 63285592a31fSmrg # Commands to make compiler produce verbose output that lists 63295592a31fSmrg # what "hidden" libraries, object files and flags are used when 63305592a31fSmrg # linking a shared library. 63315592a31fSmrg # 63325592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 63335592a31fSmrg # explicitly linking system object files so we need to strip them 63345592a31fSmrg # from the output so that they don't get included in the library 63355592a31fSmrg # dependencies. 6336b40a6198Smrg output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 63375592a31fSmrg ;; 63385592a31fSmrg *) 63395592a31fSmrg if test "$GXX" = yes; then 63405592a31fSmrg if test $with_gnu_ld = no; then 63415592a31fSmrg case $host_cpu in 63425592a31fSmrg hppa*64*) 63435592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63445592a31fSmrg ;; 63455592a31fSmrg ia64*) 6346b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63475592a31fSmrg ;; 63485592a31fSmrg *) 6349b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63505592a31fSmrg ;; 63515592a31fSmrg esac 63525592a31fSmrg fi 63535592a31fSmrg else 63545592a31fSmrg # FIXME: insert proper C++ library support 63555592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63565592a31fSmrg fi 63575592a31fSmrg ;; 63585592a31fSmrg esac 63595592a31fSmrg ;; 636050f2e948Smrg 63615592a31fSmrg interix[[3-9]]*) 63625592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63635592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63645592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 63655592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63665592a31fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 63675592a31fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 63685592a31fSmrg # default) and relocated if they conflict, which is a slow very memory 63695592a31fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 63705592a31fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 63715592a31fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 63725592a31fSmrg _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' 63735592a31fSmrg _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' 63745592a31fSmrg ;; 63755592a31fSmrg irix5* | irix6*) 63765592a31fSmrg case $cc_basename in 63775592a31fSmrg CC*) 63785592a31fSmrg # SGI C++ 6379b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 63805592a31fSmrg 63815592a31fSmrg # Archives containing C++ object files must be created using 63825592a31fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 63835592a31fSmrg # necessary to make sure instantiated templates are included 63845592a31fSmrg # in the archive. 63855592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 63865592a31fSmrg ;; 63875592a31fSmrg *) 63885592a31fSmrg if test "$GXX" = yes; then 63895592a31fSmrg if test "$with_gnu_ld" = no; then 6390b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 63915592a31fSmrg else 6392b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' 63935592a31fSmrg fi 63945592a31fSmrg fi 63955592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 63965592a31fSmrg ;; 63975592a31fSmrg esac 63985592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63995592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64005592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 64015592a31fSmrg ;; 640250f2e948Smrg 6403b40a6198Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 64045592a31fSmrg case $cc_basename in 64055592a31fSmrg KCC*) 64065592a31fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 64075592a31fSmrg 64085592a31fSmrg # KCC will only create a shared library if the output file 64095592a31fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 64105592a31fSmrg # to its proper name (with version) after linking. 64115592a31fSmrg _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' 64125592a31fSmrg _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' 64135592a31fSmrg # Commands to make compiler produce verbose output that lists 64145592a31fSmrg # what "hidden" libraries, object files and flags are used when 64155592a31fSmrg # linking a shared library. 64165592a31fSmrg # 64175592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 64185592a31fSmrg # explicitly linking system object files so we need to strip them 64195592a31fSmrg # from the output so that they don't get included in the library 64205592a31fSmrg # dependencies. 6421b40a6198Smrg output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 64225592a31fSmrg 64235592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64245592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64255592a31fSmrg 64265592a31fSmrg # Archives containing C++ object files must be created using 64275592a31fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 64285592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 64295592a31fSmrg ;; 64305592a31fSmrg icpc* | ecpc* ) 64315592a31fSmrg # Intel C++ 64325592a31fSmrg with_gnu_ld=yes 64335592a31fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 64345592a31fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 64355592a31fSmrg # earlier do not add the objects themselves. 64365592a31fSmrg case `$CC -V 2>&1` in 64375592a31fSmrg *"Version 7."*) 64385592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64395592a31fSmrg _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' 64405592a31fSmrg ;; 64415592a31fSmrg *) # Version 8.0 or newer 64425592a31fSmrg tmp_idyn= 64435592a31fSmrg case $host_cpu in 64445592a31fSmrg ia64*) tmp_idyn=' -i_dynamic';; 64455592a31fSmrg esac 64465592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 64475592a31fSmrg _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' 64485592a31fSmrg ;; 64495592a31fSmrg esac 64505592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 64515592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64525592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64535592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 64545592a31fSmrg ;; 64555592a31fSmrg pgCC* | pgcpp*) 64565592a31fSmrg # Portland Group C++ compiler 64575592a31fSmrg case `$CC -V` in 6458b40a6198Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 64595592a31fSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 64605592a31fSmrg rm -rf $tpldir~ 64615592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6462b40a6198Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 64635592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 64645592a31fSmrg rm -rf $tpldir~ 64655592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6466b40a6198Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 64675592a31fSmrg $RANLIB $oldlib' 64685592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 64695592a31fSmrg rm -rf $tpldir~ 64705592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6471b40a6198Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64725592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 64735592a31fSmrg rm -rf $tpldir~ 64745592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6475b40a6198Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 64765592a31fSmrg ;; 6477b40a6198Smrg *) # Version 6 and above use weak symbols 64785592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64795592a31fSmrg _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' 64805592a31fSmrg ;; 64815592a31fSmrg esac 648250f2e948Smrg 64835592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 64845592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6485b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 64865592a31fSmrg ;; 64875592a31fSmrg cxx*) 64885592a31fSmrg # Compaq C++ 64895592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64905592a31fSmrg _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' 649150f2e948Smrg 64925592a31fSmrg runpath_var=LD_RUN_PATH 64935592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 64945592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 649550f2e948Smrg 64965592a31fSmrg # Commands to make compiler produce verbose output that lists 64975592a31fSmrg # what "hidden" libraries, object files and flags are used when 64985592a31fSmrg # linking a shared library. 64995592a31fSmrg # 65005592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 65015592a31fSmrg # explicitly linking system object files so we need to strip them 65025592a31fSmrg # from the output so that they don't get included in the library 65035592a31fSmrg # dependencies. 6504b40a6198Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' 65055592a31fSmrg ;; 6506b40a6198Smrg xl* | mpixl* | bgxl*) 65075592a31fSmrg # IBM XL 8.0 on PPC, with GNU ld 65085592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65095592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 65105592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 65115592a31fSmrg if test "x$supports_anon_versioning" = xyes; then 65125592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 65135592a31fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 65145592a31fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 65155592a31fSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 65165592a31fSmrg fi 65175592a31fSmrg ;; 65185592a31fSmrg *) 65195592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 65205592a31fSmrg *Sun\ C*) 65215592a31fSmrg # Sun C++ 5.9 65225592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 65235592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 65245592a31fSmrg _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' 65255592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6526b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' 65275592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 65285592a31fSmrg 65295592a31fSmrg # Not sure whether something based on 65305592a31fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 65315592a31fSmrg # would be better. 6532b40a6198Smrg output_verbose_link_cmd='func_echo_all' 65335592a31fSmrg 65345592a31fSmrg # Archives containing C++ object files must be created using 65355592a31fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 65365592a31fSmrg # necessary to make sure instantiated templates are included 65375592a31fSmrg # in the archive. 65385592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 65395592a31fSmrg ;; 65405592a31fSmrg esac 65415592a31fSmrg ;; 65425592a31fSmrg esac 65435592a31fSmrg ;; 654450f2e948Smrg 65455592a31fSmrg lynxos*) 65465592a31fSmrg # FIXME: insert proper C++ library support 65475592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65485592a31fSmrg ;; 654950f2e948Smrg 65505592a31fSmrg m88k*) 65515592a31fSmrg # FIXME: insert proper C++ library support 65525592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65535592a31fSmrg ;; 655450f2e948Smrg 65555592a31fSmrg mvs*) 65565592a31fSmrg case $cc_basename in 65575592a31fSmrg cxx*) 65585592a31fSmrg # FIXME: insert proper C++ library support 65595592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65605592a31fSmrg ;; 65615592a31fSmrg *) 65625592a31fSmrg # FIXME: insert proper C++ library support 65635592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65645592a31fSmrg ;; 65655592a31fSmrg esac 65665592a31fSmrg ;; 656750f2e948Smrg 65685592a31fSmrg netbsd*) 65695592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 65705592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 65715592a31fSmrg wlarc= 65725592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65735592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65745592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65755592a31fSmrg fi 65765592a31fSmrg # Workaround some broken pre-1.5 toolchains 65775592a31fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 65785592a31fSmrg ;; 657950f2e948Smrg 65805592a31fSmrg *nto* | *qnx*) 65815592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 65825592a31fSmrg ;; 658350f2e948Smrg 65845592a31fSmrg openbsd2*) 65855592a31fSmrg # C++ shared libraries are fairly broken 65865592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65875592a31fSmrg ;; 658850f2e948Smrg 65895592a31fSmrg openbsd*) 65905592a31fSmrg if test -f /usr/libexec/ld.so; then 65915592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65925592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65935592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65945592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 65955592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65965592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 65975592a31fSmrg _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' 65985592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 65995592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 66005592a31fSmrg fi 6601b40a6198Smrg output_verbose_link_cmd=func_echo_all 66025592a31fSmrg else 66035592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66045592a31fSmrg fi 66055592a31fSmrg ;; 660650f2e948Smrg 66075592a31fSmrg osf3* | osf4* | osf5*) 66085592a31fSmrg case $cc_basename in 66095592a31fSmrg KCC*) 66105592a31fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 66115592a31fSmrg 66125592a31fSmrg # KCC will only create a shared library if the output file 66135592a31fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 66145592a31fSmrg # to its proper name (with version) after linking. 66155592a31fSmrg _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' 66165592a31fSmrg 66175592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66185592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66195592a31fSmrg 66205592a31fSmrg # Archives containing C++ object files must be created using 66215592a31fSmrg # the KAI C++ compiler. 66225592a31fSmrg case $host in 66235592a31fSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 66245592a31fSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 66255592a31fSmrg esac 66265592a31fSmrg ;; 66275592a31fSmrg RCC*) 66285592a31fSmrg # Rational C++ 2.4.1 66295592a31fSmrg # FIXME: insert proper C++ library support 66305592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66315592a31fSmrg ;; 66325592a31fSmrg cxx*) 66335592a31fSmrg case $host in 66345592a31fSmrg osf3*) 66355592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6636b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 66375592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66385592a31fSmrg ;; 66395592a31fSmrg *) 66405592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6641b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' 66425592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 66435592a31fSmrg echo "-hidden">> $lib.exp~ 6644b40a6198Smrg $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ 66455592a31fSmrg $RM $lib.exp' 66465592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 66475592a31fSmrg ;; 66485592a31fSmrg esac 664950f2e948Smrg 66505592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 665150f2e948Smrg 66525592a31fSmrg # Commands to make compiler produce verbose output that lists 66535592a31fSmrg # what "hidden" libraries, object files and flags are used when 66545592a31fSmrg # linking a shared library. 66555592a31fSmrg # 66565592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 66575592a31fSmrg # explicitly linking system object files so we need to strip them 66585592a31fSmrg # from the output so that they don't get included in the library 66595592a31fSmrg # dependencies. 6660b40a6198Smrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' 66615592a31fSmrg ;; 66625592a31fSmrg *) 66635592a31fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 66645592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66655592a31fSmrg case $host in 66665592a31fSmrg osf3*) 6667b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 66685592a31fSmrg ;; 66695592a31fSmrg *) 6670b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 66715592a31fSmrg ;; 66725592a31fSmrg esac 66735592a31fSmrg 66745592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66755592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66765592a31fSmrg 66775592a31fSmrg # Commands to make compiler produce verbose output that lists 66785592a31fSmrg # what "hidden" libraries, object files and flags are used when 66795592a31fSmrg # linking a shared library. 6680b40a6198Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 66815592a31fSmrg 66825592a31fSmrg else 66835592a31fSmrg # FIXME: insert proper C++ library support 66845592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66855592a31fSmrg fi 66865592a31fSmrg ;; 66875592a31fSmrg esac 66885592a31fSmrg ;; 668950f2e948Smrg 66905592a31fSmrg psos*) 66915592a31fSmrg # FIXME: insert proper C++ library support 66925592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66935592a31fSmrg ;; 669450f2e948Smrg 66955592a31fSmrg sunos4*) 66965592a31fSmrg case $cc_basename in 66975592a31fSmrg CC*) 66985592a31fSmrg # Sun C++ 4.x 66995592a31fSmrg # FIXME: insert proper C++ library support 67005592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67015592a31fSmrg ;; 67025592a31fSmrg lcc*) 67035592a31fSmrg # Lucid 67045592a31fSmrg # FIXME: insert proper C++ library support 67055592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67065592a31fSmrg ;; 67075592a31fSmrg *) 67085592a31fSmrg # FIXME: insert proper C++ library support 67095592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67105592a31fSmrg ;; 67115592a31fSmrg esac 67125592a31fSmrg ;; 671350f2e948Smrg 67145592a31fSmrg solaris*) 67155592a31fSmrg case $cc_basename in 6716b40a6198Smrg CC* | sunCC*) 67175592a31fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 67185592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 67195592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 67205592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 67215592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67225592a31fSmrg $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' 67235592a31fSmrg 67245592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 67255592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67265592a31fSmrg case $host_os in 67275592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67285592a31fSmrg *) 67295592a31fSmrg # The compiler driver will combine and reorder linker options, 67305592a31fSmrg # but understands `-z linker_flag'. 67315592a31fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 67325592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 67335592a31fSmrg ;; 67345592a31fSmrg esac 67355592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 673650f2e948Smrg 6737b40a6198Smrg output_verbose_link_cmd='func_echo_all' 673850f2e948Smrg 67395592a31fSmrg # Archives containing C++ object files must be created using 67405592a31fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 67415592a31fSmrg # necessary to make sure instantiated templates are included 67425592a31fSmrg # in the archive. 67435592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 67445592a31fSmrg ;; 67455592a31fSmrg gcx*) 67465592a31fSmrg # Green Hills C++ Compiler 67475592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 674850f2e948Smrg 67495592a31fSmrg # The C++ compiler must be used to create the archive. 67505592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 67515592a31fSmrg ;; 67525592a31fSmrg *) 67535592a31fSmrg # GNU C++ compiler with Solaris linker 67545592a31fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 67555592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 67565592a31fSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6757b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67585592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6759b40a6198Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67605592a31fSmrg 67615592a31fSmrg # Commands to make compiler produce verbose output that lists 67625592a31fSmrg # what "hidden" libraries, object files and flags are used when 67635592a31fSmrg # linking a shared library. 6764b40a6198Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67655592a31fSmrg else 67665592a31fSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 67675592a31fSmrg # platform. 67685592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67695592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67705592a31fSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67715592a31fSmrg 67725592a31fSmrg # Commands to make compiler produce verbose output that lists 67735592a31fSmrg # what "hidden" libraries, object files and flags are used when 67745592a31fSmrg # linking a shared library. 6775b40a6198Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67765592a31fSmrg fi 67775592a31fSmrg 67785592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 67795592a31fSmrg case $host_os in 67805592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67815592a31fSmrg *) 67825592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 67835592a31fSmrg ;; 67845592a31fSmrg esac 67855592a31fSmrg fi 67865592a31fSmrg ;; 67875592a31fSmrg esac 67885592a31fSmrg ;; 678950f2e948Smrg 67905592a31fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 67915592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 67925592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67935592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67945592a31fSmrg runpath_var='LD_RUN_PATH' 679550f2e948Smrg 67965592a31fSmrg case $cc_basename in 67975592a31fSmrg CC*) 67985592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67995592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68005592a31fSmrg ;; 68015592a31fSmrg *) 68025592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68035592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68045592a31fSmrg ;; 68055592a31fSmrg esac 68065592a31fSmrg ;; 680750f2e948Smrg 68085592a31fSmrg sysv5* | sco3.2v5* | sco5v6*) 68095592a31fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 68105592a31fSmrg # link with -lc, and that would cause any symbols used from libc to 68115592a31fSmrg # always be unresolved, which means just about no library would 68125592a31fSmrg # ever link correctly. If we're not using GNU ld we use -z text 68135592a31fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 68145592a31fSmrg # as -z defs. 68155592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68165592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 68175592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68185592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68195592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 68205592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 68215592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68225592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 68235592a31fSmrg runpath_var='LD_RUN_PATH' 682450f2e948Smrg 68255592a31fSmrg case $cc_basename in 68265592a31fSmrg CC*) 68275592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68285592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6829b40a6198Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6830b40a6198Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6831b40a6198Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6832b40a6198Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 68335592a31fSmrg ;; 68345592a31fSmrg *) 68355592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68365592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68375592a31fSmrg ;; 68385592a31fSmrg esac 68395592a31fSmrg ;; 684050f2e948Smrg 68415592a31fSmrg tandem*) 68425592a31fSmrg case $cc_basename in 68435592a31fSmrg NCC*) 68445592a31fSmrg # NonStop-UX NCC 3.20 68455592a31fSmrg # FIXME: insert proper C++ library support 68465592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68475592a31fSmrg ;; 68485592a31fSmrg *) 68495592a31fSmrg # FIXME: insert proper C++ library support 68505592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68515592a31fSmrg ;; 68525592a31fSmrg esac 68535592a31fSmrg ;; 685450f2e948Smrg 68555592a31fSmrg vxworks*) 68565592a31fSmrg # FIXME: insert proper C++ library support 68575592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68585592a31fSmrg ;; 68591ac89addSmrg 68605592a31fSmrg *) 68615592a31fSmrg # FIXME: insert proper C++ library support 68625592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68635592a31fSmrg ;; 68645592a31fSmrg esac 68651ac89addSmrg 68665592a31fSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 68675592a31fSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 68685592a31fSmrg 68695592a31fSmrg _LT_TAGVAR(GCC, $1)="$GXX" 68705592a31fSmrg _LT_TAGVAR(LD, $1)="$LD" 68715592a31fSmrg 68725592a31fSmrg ## CAVEAT EMPTOR: 68735592a31fSmrg ## There is no encapsulation within the following macros, do not change 68745592a31fSmrg ## the running order or otherwise move them around unless you know exactly 68755592a31fSmrg ## what you are doing... 68765592a31fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 68775592a31fSmrg _LT_COMPILER_PIC($1) 68785592a31fSmrg _LT_COMPILER_C_O($1) 68795592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 68805592a31fSmrg _LT_LINKER_SHLIBS($1) 68815592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 68825592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 68835592a31fSmrg 68845592a31fSmrg _LT_CONFIG($1) 68855592a31fSmrg fi # test -n "$compiler" 68865592a31fSmrg 68875592a31fSmrg CC=$lt_save_CC 6888b40a6198Smrg CFLAGS=$lt_save_CFLAGS 68895592a31fSmrg LDCXX=$LD 68905592a31fSmrg LD=$lt_save_LD 68915592a31fSmrg GCC=$lt_save_GCC 68925592a31fSmrg with_gnu_ld=$lt_save_with_gnu_ld 68935592a31fSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 68945592a31fSmrg lt_cv_path_LD=$lt_save_path_LD 68955592a31fSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 68965592a31fSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 68975592a31fSmrgfi # test "$_lt_caught_CXX_error" != yes 68981ac89addSmrg 68995592a31fSmrgAC_LANG_POP 69005592a31fSmrg])# _LT_LANG_CXX_CONFIG 69011ac89addSmrg 69021ac89addSmrg 6903b40a6198Smrg# _LT_FUNC_STRIPNAME_CNF 6904b40a6198Smrg# ---------------------- 6905b40a6198Smrg# func_stripname_cnf prefix suffix name 6906b40a6198Smrg# strip PREFIX and SUFFIX off of NAME. 6907b40a6198Smrg# PREFIX and SUFFIX must not contain globbing or regex special 6908b40a6198Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6909b40a6198Smrg# dot (in which case that matches only a dot). 6910b40a6198Smrg# 6911b40a6198Smrg# This function is identical to the (non-XSI) version of func_stripname, 6912b40a6198Smrg# except this one can be used by m4 code that may be executed by configure, 6913b40a6198Smrg# rather than the libtool script. 6914b40a6198Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6915b40a6198SmrgAC_REQUIRE([_LT_DECL_SED]) 6916b40a6198SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6917b40a6198Smrgfunc_stripname_cnf () 6918b40a6198Smrg{ 6919b40a6198Smrg case ${2} in 6920b40a6198Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6921b40a6198Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6922b40a6198Smrg esac 6923b40a6198Smrg} # func_stripname_cnf 6924b40a6198Smrg])# _LT_FUNC_STRIPNAME_CNF 6925b40a6198Smrg 69265592a31fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 69275592a31fSmrg# --------------------------------- 69285592a31fSmrg# Figure out "hidden" library dependencies from verbose 69295592a31fSmrg# compiler output when linking a shared library. 69305592a31fSmrg# Parse the compiler output and extract the necessary 69315592a31fSmrg# objects, libraries and library flags. 69325592a31fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 69335592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6934b40a6198SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 69355592a31fSmrg# Dependencies to place before and after the object being linked: 69365592a31fSmrg_LT_TAGVAR(predep_objects, $1)= 69375592a31fSmrg_LT_TAGVAR(postdep_objects, $1)= 69385592a31fSmrg_LT_TAGVAR(predeps, $1)= 69395592a31fSmrg_LT_TAGVAR(postdeps, $1)= 69405592a31fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 69411ac89addSmrg 69425592a31fSmrgdnl we can't use the lt_simple_compile_test_code here, 69435592a31fSmrgdnl because it contains code intended for an executable, 69445592a31fSmrgdnl not a library. It's possible we should let each 69455592a31fSmrgdnl tag define a new lt_????_link_test_code variable, 69465592a31fSmrgdnl but it's only used here... 69475592a31fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 69485592a31fSmrgint a; 69495592a31fSmrgvoid foo (void) { a = 0; } 69505592a31fSmrg_LT_EOF 69515592a31fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 69525592a31fSmrgclass Foo 69535592a31fSmrg{ 69545592a31fSmrgpublic: 69555592a31fSmrg Foo (void) { a = 0; } 69565592a31fSmrgprivate: 69575592a31fSmrg int a; 69585592a31fSmrg}; 69595592a31fSmrg_LT_EOF 69605592a31fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 69615592a31fSmrg subroutine foo 69625592a31fSmrg implicit none 69635592a31fSmrg integer*4 a 69645592a31fSmrg a=0 69655592a31fSmrg return 69665592a31fSmrg end 69675592a31fSmrg_LT_EOF 69685592a31fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 69695592a31fSmrg subroutine foo 69705592a31fSmrg implicit none 69715592a31fSmrg integer a 69725592a31fSmrg a=0 69735592a31fSmrg return 69745592a31fSmrg end 69755592a31fSmrg_LT_EOF 69765592a31fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 69775592a31fSmrgpublic class foo { 69785592a31fSmrg private int a; 69795592a31fSmrg public void bar (void) { 69805592a31fSmrg a = 0; 69815592a31fSmrg } 69825592a31fSmrg}; 69835592a31fSmrg_LT_EOF 6984b40a6198Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6985b40a6198Smrgpackage foo 6986b40a6198Smrgfunc foo() { 6987b40a6198Smrg} 6988b40a6198Smrg_LT_EOF 69895592a31fSmrg]) 6990b40a6198Smrg 6991b40a6198Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 6992b40a6198Smrgcase "$CC $CFLAGS " in #( 6993b40a6198Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6994b40a6198Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6995b40a6198Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 6996b40a6198Smrgesac 6997b40a6198Smrg 69985592a31fSmrgdnl Parse the compiler output and extract the necessary 69995592a31fSmrgdnl objects, libraries and library flags. 70005592a31fSmrgif AC_TRY_EVAL(ac_compile); then 70015592a31fSmrg # Parse the compiler output and extract the necessary 70025592a31fSmrg # objects, libraries and library flags. 700345bc899bSmrg 70045592a31fSmrg # Sentinel used to keep track of whether or not we are before 70055592a31fSmrg # the conftest object file. 70065592a31fSmrg pre_test_object_deps_done=no 700745bc899bSmrg 70085592a31fSmrg for p in `eval "$output_verbose_link_cmd"`; do 7009b40a6198Smrg case ${prev}${p} in 701045bc899bSmrg 70115592a31fSmrg -L* | -R* | -l*) 70125592a31fSmrg # Some compilers place space between "-{L,R}" and the path. 70135592a31fSmrg # Remove the space. 70145592a31fSmrg if test $p = "-L" || 70155592a31fSmrg test $p = "-R"; then 70165592a31fSmrg prev=$p 70175592a31fSmrg continue 70185592a31fSmrg fi 701950f2e948Smrg 7020b40a6198Smrg # Expand the sysroot to ease extracting the directories later. 7021b40a6198Smrg if test -z "$prev"; then 7022b40a6198Smrg case $p in 7023b40a6198Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7024b40a6198Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7025b40a6198Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7026b40a6198Smrg esac 7027b40a6198Smrg fi 7028b40a6198Smrg case $p in 7029b40a6198Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7030b40a6198Smrg esac 70315592a31fSmrg if test "$pre_test_object_deps_done" = no; then 7032b40a6198Smrg case ${prev} in 7033b40a6198Smrg -L | -R) 70345592a31fSmrg # Internal compiler library paths should come after those 70355592a31fSmrg # provided the user. The postdeps already come after the 70365592a31fSmrg # user supplied libs so there is no need to process them. 70375592a31fSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 70385592a31fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 70395592a31fSmrg else 70405592a31fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 70415592a31fSmrg fi 70425592a31fSmrg ;; 70435592a31fSmrg # The "-l" case would never come before the object being 70445592a31fSmrg # linked, so don't bother handling this case. 70455592a31fSmrg esac 70465592a31fSmrg else 70475592a31fSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 70485592a31fSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 70495592a31fSmrg else 70505592a31fSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 70515592a31fSmrg fi 70525592a31fSmrg fi 7053b40a6198Smrg prev= 70545592a31fSmrg ;; 705550f2e948Smrg 7056b40a6198Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 70575592a31fSmrg *.$objext) 70585592a31fSmrg # This assumes that the test object file only shows up 70595592a31fSmrg # once in the compiler output. 70605592a31fSmrg if test "$p" = "conftest.$objext"; then 70615592a31fSmrg pre_test_object_deps_done=yes 70625592a31fSmrg continue 70635592a31fSmrg fi 706450f2e948Smrg 70655592a31fSmrg if test "$pre_test_object_deps_done" = no; then 70665592a31fSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 70675592a31fSmrg _LT_TAGVAR(predep_objects, $1)="$p" 70685592a31fSmrg else 70695592a31fSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 70705592a31fSmrg fi 70715592a31fSmrg else 70725592a31fSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 70735592a31fSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 70745592a31fSmrg else 70755592a31fSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 70765592a31fSmrg fi 70775592a31fSmrg fi 70785592a31fSmrg ;; 707950f2e948Smrg 70805592a31fSmrg *) ;; # Ignore the rest. 708150f2e948Smrg 70825592a31fSmrg esac 70835592a31fSmrg done 70843a925b30Smrg 70855592a31fSmrg # Clean up. 70865592a31fSmrg rm -f a.out a.exe 708750f2e948Smrgelse 70885592a31fSmrg echo "libtool.m4: error: problem compiling $1 test program" 708950f2e948Smrgfi 709050f2e948Smrg 70915592a31fSmrg$RM -f confest.$objext 7092b40a6198SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 709350f2e948Smrg 70945592a31fSmrg# PORTME: override above test on systems where it is broken 70955592a31fSmrgm4_if([$1], [CXX], 70965592a31fSmrg[case $host_os in 70975592a31fSmrginterix[[3-9]]*) 70985592a31fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 70995592a31fSmrg # hack all around it, let's just trust "g++" to DTRT. 71005592a31fSmrg _LT_TAGVAR(predep_objects,$1)= 71015592a31fSmrg _LT_TAGVAR(postdep_objects,$1)= 71025592a31fSmrg _LT_TAGVAR(postdeps,$1)= 71035592a31fSmrg ;; 710450f2e948Smrg 71055592a31fSmrglinux*) 71065592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 71075592a31fSmrg *Sun\ C*) 71085592a31fSmrg # Sun C++ 5.9 710950f2e948Smrg 71105592a31fSmrg # The more standards-conforming stlport4 library is 71115592a31fSmrg # incompatible with the Cstd library. Avoid specifying 71125592a31fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 71135592a31fSmrg # -library=stlport4 depends on it. 71145592a31fSmrg case " $CXX $CXXFLAGS " in 71155592a31fSmrg *" -library=stlport4 "*) 71165592a31fSmrg solaris_use_stlport4=yes 71175592a31fSmrg ;; 71185592a31fSmrg esac 711950f2e948Smrg 71205592a31fSmrg if test "$solaris_use_stlport4" != yes; then 71215592a31fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71225592a31fSmrg fi 71235592a31fSmrg ;; 71245592a31fSmrg esac 71255592a31fSmrg ;; 71265592a31fSmrg 71275592a31fSmrgsolaris*) 71285592a31fSmrg case $cc_basename in 7129b40a6198Smrg CC* | sunCC*) 71305592a31fSmrg # The more standards-conforming stlport4 library is 71315592a31fSmrg # incompatible with the Cstd library. Avoid specifying 71325592a31fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 71335592a31fSmrg # -library=stlport4 depends on it. 71345592a31fSmrg case " $CXX $CXXFLAGS " in 71355592a31fSmrg *" -library=stlport4 "*) 71365592a31fSmrg solaris_use_stlport4=yes 71375592a31fSmrg ;; 71385592a31fSmrg esac 713950f2e948Smrg 71405592a31fSmrg # Adding this requires a known-good setup of shared libraries for 71415592a31fSmrg # Sun compiler versions before 5.6, else PIC objects from an old 71425592a31fSmrg # archive will be linked into the output, leading to subtle bugs. 71435592a31fSmrg if test "$solaris_use_stlport4" != yes; then 71445592a31fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71455592a31fSmrg fi 71465592a31fSmrg ;; 71475592a31fSmrg esac 71485592a31fSmrg ;; 71495592a31fSmrgesac 71505592a31fSmrg]) 715150f2e948Smrg 71525592a31fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 71535592a31fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 71545592a31fSmrgesac 71555592a31fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 71565592a31fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 71575592a31fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 71585592a31fSmrgfi 71595592a31fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 71605592a31fSmrg [The directories searched by this compiler when creating a shared library]) 71615592a31fSmrg_LT_TAGDECL([], [predep_objects], [1], 71625592a31fSmrg [Dependencies to place before and after the objects being linked to 71635592a31fSmrg create a shared library]) 71645592a31fSmrg_LT_TAGDECL([], [postdep_objects], [1]) 71655592a31fSmrg_LT_TAGDECL([], [predeps], [1]) 71665592a31fSmrg_LT_TAGDECL([], [postdeps], [1]) 71675592a31fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 71685592a31fSmrg [The library search path used internally by the compiler when linking 71695592a31fSmrg a shared library]) 71705592a31fSmrg])# _LT_SYS_HIDDEN_LIBDEPS 71715592a31fSmrg 71725592a31fSmrg 71735592a31fSmrg# _LT_LANG_F77_CONFIG([TAG]) 71745592a31fSmrg# -------------------------- 71755592a31fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 71765592a31fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 71775592a31fSmrg# to write the compiler configuration to `libtool'. 71785592a31fSmrgm4_defun([_LT_LANG_F77_CONFIG], 7179b40a6198Smrg[AC_LANG_PUSH(Fortran 77) 7180b40a6198Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 7181b40a6198Smrg _lt_disable_F77=yes 7182b40a6198Smrgfi 718350f2e948Smrg 71845592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 71855592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 71865592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 71875592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 71885592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 71895592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 71905592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 71915592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 71925592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 71935592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 71945592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 71955592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 71965592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 71975592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 71985592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 71995592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7200b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7201b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 72025592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 72035592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 72045592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 720550f2e948Smrg 72065592a31fSmrg# Source file extension for f77 test sources. 72075592a31fSmrgac_ext=f 720850f2e948Smrg 72095592a31fSmrg# Object file extension for compiled f77 test sources. 72105592a31fSmrgobjext=o 72115592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 72125592a31fSmrg 72135592a31fSmrg# No sense in running all these tests if we already determined that 72145592a31fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 72155592a31fSmrg# are currently assumed to apply to all compilers on this platform, 72165592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 72175592a31fSmrgif test "$_lt_disable_F77" != yes; then 72185592a31fSmrg # Code to be used in simple compile tests 72195592a31fSmrg lt_simple_compile_test_code="\ 72205592a31fSmrg subroutine t 72215592a31fSmrg return 72225592a31fSmrg end 72235592a31fSmrg" 722450f2e948Smrg 72255592a31fSmrg # Code to be used in simple link tests 72265592a31fSmrg lt_simple_link_test_code="\ 72275592a31fSmrg program t 72285592a31fSmrg end 72295592a31fSmrg" 723050f2e948Smrg 72315592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 72325592a31fSmrg _LT_TAG_COMPILER 723350f2e948Smrg 72345592a31fSmrg # save warnings/boilerplate of simple test code 72355592a31fSmrg _LT_COMPILER_BOILERPLATE 72365592a31fSmrg _LT_LINKER_BOILERPLATE 723750f2e948Smrg 72385592a31fSmrg # Allow CC to be a program name with arguments. 72395592a31fSmrg lt_save_CC="$CC" 72405592a31fSmrg lt_save_GCC=$GCC 7241b40a6198Smrg lt_save_CFLAGS=$CFLAGS 72425592a31fSmrg CC=${F77-"f77"} 7243b40a6198Smrg CFLAGS=$FFLAGS 72445592a31fSmrg compiler=$CC 72455592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 72465592a31fSmrg _LT_CC_BASENAME([$compiler]) 72475592a31fSmrg GCC=$G77 72485592a31fSmrg if test -n "$compiler"; then 72495592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 72505592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 725150f2e948Smrg 72525592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 72535592a31fSmrg test "$can_build_shared" = "no" && enable_shared=no 725450f2e948Smrg 72555592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 72565592a31fSmrg # are all built from PIC. 72575592a31fSmrg case $host_os in 72585592a31fSmrg aix3*) 72595592a31fSmrg test "$enable_shared" = yes && enable_static=no 72605592a31fSmrg if test -n "$RANLIB"; then 72615592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 72625592a31fSmrg postinstall_cmds='$RANLIB $lib' 72635592a31fSmrg fi 72645592a31fSmrg ;; 72655592a31fSmrg aix[[4-9]]*) 72665592a31fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 72675592a31fSmrg test "$enable_shared" = yes && enable_static=no 72685592a31fSmrg fi 72695592a31fSmrg ;; 72705592a31fSmrg esac 72715592a31fSmrg AC_MSG_RESULT([$enable_shared]) 72725592a31fSmrg 72735592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 72745592a31fSmrg # Make sure either enable_shared or enable_static is yes. 72755592a31fSmrg test "$enable_shared" = yes || enable_static=yes 72765592a31fSmrg AC_MSG_RESULT([$enable_static]) 72775592a31fSmrg 72785592a31fSmrg _LT_TAGVAR(GCC, $1)="$G77" 72795592a31fSmrg _LT_TAGVAR(LD, $1)="$LD" 72805592a31fSmrg 72815592a31fSmrg ## CAVEAT EMPTOR: 72825592a31fSmrg ## There is no encapsulation within the following macros, do not change 72835592a31fSmrg ## the running order or otherwise move them around unless you know exactly 72845592a31fSmrg ## what you are doing... 72855592a31fSmrg _LT_COMPILER_PIC($1) 72865592a31fSmrg _LT_COMPILER_C_O($1) 72875592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 72885592a31fSmrg _LT_LINKER_SHLIBS($1) 72895592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 72905592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 72915592a31fSmrg 72925592a31fSmrg _LT_CONFIG($1) 72935592a31fSmrg fi # test -n "$compiler" 72945592a31fSmrg 72955592a31fSmrg GCC=$lt_save_GCC 72965592a31fSmrg CC="$lt_save_CC" 7297b40a6198Smrg CFLAGS="$lt_save_CFLAGS" 72985592a31fSmrgfi # test "$_lt_disable_F77" != yes 729950f2e948Smrg 73005592a31fSmrgAC_LANG_POP 73015592a31fSmrg])# _LT_LANG_F77_CONFIG 730250f2e948Smrg 730350f2e948Smrg 73045592a31fSmrg# _LT_LANG_FC_CONFIG([TAG]) 73055592a31fSmrg# ------------------------- 73065592a31fSmrg# Ensure that the configuration variables for a Fortran compiler are 73075592a31fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 73085592a31fSmrg# to write the compiler configuration to `libtool'. 73095592a31fSmrgm4_defun([_LT_LANG_FC_CONFIG], 7310b40a6198Smrg[AC_LANG_PUSH(Fortran) 7311b40a6198Smrg 7312b40a6198Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 7313b40a6198Smrg _lt_disable_FC=yes 7314b40a6198Smrgfi 73155592a31fSmrg 73165592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 73175592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 73185592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 73195592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 73205592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 73215592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 73225592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 73235592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 73245592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 73255592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 73265592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 73275592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 73285592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 73295592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 73305592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 73315592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7332b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7333b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 73345592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 73355592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 73365592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 73375592a31fSmrg 73385592a31fSmrg# Source file extension for fc test sources. 73395592a31fSmrgac_ext=${ac_fc_srcext-f} 73405592a31fSmrg 73415592a31fSmrg# Object file extension for compiled fc test sources. 73425592a31fSmrgobjext=o 73435592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 73445592a31fSmrg 73455592a31fSmrg# No sense in running all these tests if we already determined that 73465592a31fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 73475592a31fSmrg# are currently assumed to apply to all compilers on this platform, 73485592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 73495592a31fSmrgif test "$_lt_disable_FC" != yes; then 73505592a31fSmrg # Code to be used in simple compile tests 73515592a31fSmrg lt_simple_compile_test_code="\ 73525592a31fSmrg subroutine t 73535592a31fSmrg return 73545592a31fSmrg end 73555592a31fSmrg" 735650f2e948Smrg 73575592a31fSmrg # Code to be used in simple link tests 73585592a31fSmrg lt_simple_link_test_code="\ 73595592a31fSmrg program t 73605592a31fSmrg end 73615592a31fSmrg" 736250f2e948Smrg 73635592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 73645592a31fSmrg _LT_TAG_COMPILER 736550f2e948Smrg 73665592a31fSmrg # save warnings/boilerplate of simple test code 73675592a31fSmrg _LT_COMPILER_BOILERPLATE 73685592a31fSmrg _LT_LINKER_BOILERPLATE 736950f2e948Smrg 73705592a31fSmrg # Allow CC to be a program name with arguments. 73715592a31fSmrg lt_save_CC="$CC" 73725592a31fSmrg lt_save_GCC=$GCC 7373b40a6198Smrg lt_save_CFLAGS=$CFLAGS 73745592a31fSmrg CC=${FC-"f95"} 7375b40a6198Smrg CFLAGS=$FCFLAGS 73765592a31fSmrg compiler=$CC 73775592a31fSmrg GCC=$ac_cv_fc_compiler_gnu 73785592a31fSmrg 73795592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 73805592a31fSmrg _LT_CC_BASENAME([$compiler]) 738150f2e948Smrg 73825592a31fSmrg if test -n "$compiler"; then 73835592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 73845592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 73855592a31fSmrg 73865592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 73875592a31fSmrg test "$can_build_shared" = "no" && enable_shared=no 73885592a31fSmrg 73895592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 73905592a31fSmrg # are all built from PIC. 73913a925b30Smrg case $host_os in 73925592a31fSmrg aix3*) 73935592a31fSmrg test "$enable_shared" = yes && enable_static=no 73945592a31fSmrg if test -n "$RANLIB"; then 73955592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 73965592a31fSmrg postinstall_cmds='$RANLIB $lib' 73975592a31fSmrg fi 73985592a31fSmrg ;; 73993a925b30Smrg aix[[4-9]]*) 74005592a31fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 74015592a31fSmrg test "$enable_shared" = yes && enable_static=no 74023a925b30Smrg fi 74035592a31fSmrg ;; 74043a925b30Smrg esac 74055592a31fSmrg AC_MSG_RESULT([$enable_shared]) 74065592a31fSmrg 74075592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 74085592a31fSmrg # Make sure either enable_shared or enable_static is yes. 74095592a31fSmrg test "$enable_shared" = yes || enable_static=yes 74105592a31fSmrg AC_MSG_RESULT([$enable_static]) 74115592a31fSmrg 74125592a31fSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 74135592a31fSmrg _LT_TAGVAR(LD, $1)="$LD" 74145592a31fSmrg 74155592a31fSmrg ## CAVEAT EMPTOR: 74165592a31fSmrg ## There is no encapsulation within the following macros, do not change 74175592a31fSmrg ## the running order or otherwise move them around unless you know exactly 74185592a31fSmrg ## what you are doing... 74195592a31fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 74205592a31fSmrg _LT_COMPILER_PIC($1) 74215592a31fSmrg _LT_COMPILER_C_O($1) 74225592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 74235592a31fSmrg _LT_LINKER_SHLIBS($1) 74245592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 74255592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 74265592a31fSmrg 74275592a31fSmrg _LT_CONFIG($1) 74285592a31fSmrg fi # test -n "$compiler" 74295592a31fSmrg 74305592a31fSmrg GCC=$lt_save_GCC 7431b40a6198Smrg CC=$lt_save_CC 7432b40a6198Smrg CFLAGS=$lt_save_CFLAGS 74335592a31fSmrgfi # test "$_lt_disable_FC" != yes 743450f2e948Smrg 74355592a31fSmrgAC_LANG_POP 74365592a31fSmrg])# _LT_LANG_FC_CONFIG 743750f2e948Smrg 743850f2e948Smrg 74395592a31fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 74405592a31fSmrg# -------------------------- 74415592a31fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 74425592a31fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 74435592a31fSmrg# to write the compiler configuration to `libtool'. 74445592a31fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 74455592a31fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 74465592a31fSmrgAC_LANG_SAVE 744750f2e948Smrg 74485592a31fSmrg# Source file extension for Java test sources. 74495592a31fSmrgac_ext=java 745050f2e948Smrg 74515592a31fSmrg# Object file extension for compiled Java test sources. 74525592a31fSmrgobjext=o 74535592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 745450f2e948Smrg 74555592a31fSmrg# Code to be used in simple compile tests 74565592a31fSmrglt_simple_compile_test_code="class foo {}" 745750f2e948Smrg 74585592a31fSmrg# Code to be used in simple link tests 74595592a31fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 746050f2e948Smrg 74615592a31fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 74625592a31fSmrg_LT_TAG_COMPILER 746345bc899bSmrg 74645592a31fSmrg# save warnings/boilerplate of simple test code 74655592a31fSmrg_LT_COMPILER_BOILERPLATE 74665592a31fSmrg_LT_LINKER_BOILERPLATE 746745bc899bSmrg 74685592a31fSmrg# Allow CC to be a program name with arguments. 7469b40a6198Smrglt_save_CC=$CC 7470b40a6198Smrglt_save_CFLAGS=$CFLAGS 74715592a31fSmrglt_save_GCC=$GCC 74725592a31fSmrgGCC=yes 74735592a31fSmrgCC=${GCJ-"gcj"} 7474b40a6198SmrgCFLAGS=$GCJFLAGS 74755592a31fSmrgcompiler=$CC 74765592a31fSmrg_LT_TAGVAR(compiler, $1)=$CC 74775592a31fSmrg_LT_TAGVAR(LD, $1)="$LD" 74785592a31fSmrg_LT_CC_BASENAME([$compiler]) 74795592a31fSmrg 74805592a31fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 74815592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 74825592a31fSmrg 74835592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7484b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7485b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 74865592a31fSmrg 74875592a31fSmrgif test -n "$compiler"; then 74885592a31fSmrg _LT_COMPILER_NO_RTTI($1) 74895592a31fSmrg _LT_COMPILER_PIC($1) 74905592a31fSmrg _LT_COMPILER_C_O($1) 74915592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 74925592a31fSmrg _LT_LINKER_SHLIBS($1) 74935592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 74945592a31fSmrg 74955592a31fSmrg _LT_CONFIG($1) 74965592a31fSmrgfi 74975592a31fSmrg 74985592a31fSmrgAC_LANG_RESTORE 74995592a31fSmrg 75005592a31fSmrgGCC=$lt_save_GCC 7501b40a6198SmrgCC=$lt_save_CC 7502b40a6198SmrgCFLAGS=$lt_save_CFLAGS 75035592a31fSmrg])# _LT_LANG_GCJ_CONFIG 75045592a31fSmrg 75055592a31fSmrg 7506b40a6198Smrg# _LT_LANG_GO_CONFIG([TAG]) 7507b40a6198Smrg# -------------------------- 7508b40a6198Smrg# Ensure that the configuration variables for the GNU Go compiler 75095592a31fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 75105592a31fSmrg# to write the compiler configuration to `libtool'. 7511b40a6198Smrgm4_defun([_LT_LANG_GO_CONFIG], 7512b40a6198Smrg[AC_REQUIRE([LT_PROG_GO])dnl 75135592a31fSmrgAC_LANG_SAVE 75145592a31fSmrg 7515b40a6198Smrg# Source file extension for Go test sources. 7516b40a6198Smrgac_ext=go 75175592a31fSmrg 7518b40a6198Smrg# Object file extension for compiled Go test sources. 75195592a31fSmrgobjext=o 75205592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 75215592a31fSmrg 75225592a31fSmrg# Code to be used in simple compile tests 7523b40a6198Smrglt_simple_compile_test_code="package main; func main() { }" 75245592a31fSmrg 75255592a31fSmrg# Code to be used in simple link tests 7526b40a6198Smrglt_simple_link_test_code='package main; func main() { }' 75275592a31fSmrg 75285592a31fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 75295592a31fSmrg_LT_TAG_COMPILER 75305592a31fSmrg 75315592a31fSmrg# save warnings/boilerplate of simple test code 75325592a31fSmrg_LT_COMPILER_BOILERPLATE 75335592a31fSmrg_LT_LINKER_BOILERPLATE 753445bc899bSmrg 75355592a31fSmrg# Allow CC to be a program name with arguments. 7536b40a6198Smrglt_save_CC=$CC 7537b40a6198Smrglt_save_CFLAGS=$CFLAGS 75385592a31fSmrglt_save_GCC=$GCC 7539b40a6198SmrgGCC=yes 7540b40a6198SmrgCC=${GOC-"gccgo"} 7541b40a6198SmrgCFLAGS=$GOFLAGS 75425592a31fSmrgcompiler=$CC 75435592a31fSmrg_LT_TAGVAR(compiler, $1)=$CC 7544b40a6198Smrg_LT_TAGVAR(LD, $1)="$LD" 75455592a31fSmrg_LT_CC_BASENAME([$compiler]) 7546b40a6198Smrg 7547b40a6198Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 7548b40a6198Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7549b40a6198Smrg 7550b40a6198Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7551b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7552b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 755345bc899bSmrg 75545592a31fSmrgif test -n "$compiler"; then 7555b40a6198Smrg _LT_COMPILER_NO_RTTI($1) 7556b40a6198Smrg _LT_COMPILER_PIC($1) 7557b40a6198Smrg _LT_COMPILER_C_O($1) 7558b40a6198Smrg _LT_COMPILER_FILE_LOCKS($1) 7559b40a6198Smrg _LT_LINKER_SHLIBS($1) 7560b40a6198Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7561b40a6198Smrg 75625592a31fSmrg _LT_CONFIG($1) 75635592a31fSmrgfi 756445bc899bSmrg 75655592a31fSmrgAC_LANG_RESTORE 756645bc899bSmrg 7567b40a6198SmrgGCC=$lt_save_GCC 7568b40a6198SmrgCC=$lt_save_CC 7569b40a6198SmrgCFLAGS=$lt_save_CFLAGS 7570b40a6198Smrg])# _LT_LANG_GO_CONFIG 757145bc899bSmrg 7572b40a6198Smrg 7573b40a6198Smrg# _LT_LANG_RC_CONFIG([TAG]) 7574b40a6198Smrg# ------------------------- 7575b40a6198Smrg# Ensure that the configuration variables for the Windows resource compiler 7576b40a6198Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7577b40a6198Smrg# to write the compiler configuration to `libtool'. 7578b40a6198Smrgm4_defun([_LT_LANG_RC_CONFIG], 7579b40a6198Smrg[AC_REQUIRE([LT_PROG_RC])dnl 7580b40a6198SmrgAC_LANG_SAVE 7581b40a6198Smrg 7582b40a6198Smrg# Source file extension for RC test sources. 7583b40a6198Smrgac_ext=rc 7584b40a6198Smrg 7585b40a6198Smrg# Object file extension for compiled RC test sources. 7586b40a6198Smrgobjext=o 7587b40a6198Smrg_LT_TAGVAR(objext, $1)=$objext 7588b40a6198Smrg 7589b40a6198Smrg# Code to be used in simple compile tests 7590b40a6198Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7591b40a6198Smrg 7592b40a6198Smrg# Code to be used in simple link tests 7593b40a6198Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 7594b40a6198Smrg 7595b40a6198Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7596b40a6198Smrg_LT_TAG_COMPILER 7597b40a6198Smrg 7598b40a6198Smrg# save warnings/boilerplate of simple test code 7599b40a6198Smrg_LT_COMPILER_BOILERPLATE 7600b40a6198Smrg_LT_LINKER_BOILERPLATE 7601b40a6198Smrg 7602b40a6198Smrg# Allow CC to be a program name with arguments. 7603b40a6198Smrglt_save_CC="$CC" 7604b40a6198Smrglt_save_CFLAGS=$CFLAGS 7605b40a6198Smrglt_save_GCC=$GCC 7606b40a6198SmrgGCC= 7607b40a6198SmrgCC=${RC-"windres"} 7608b40a6198SmrgCFLAGS= 7609b40a6198Smrgcompiler=$CC 7610b40a6198Smrg_LT_TAGVAR(compiler, $1)=$CC 7611b40a6198Smrg_LT_CC_BASENAME([$compiler]) 7612b40a6198Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7613b40a6198Smrg 7614b40a6198Smrgif test -n "$compiler"; then 7615b40a6198Smrg : 7616b40a6198Smrg _LT_CONFIG($1) 7617b40a6198Smrgfi 7618b40a6198Smrg 7619b40a6198SmrgGCC=$lt_save_GCC 7620b40a6198SmrgAC_LANG_RESTORE 7621b40a6198SmrgCC=$lt_save_CC 7622b40a6198SmrgCFLAGS=$lt_save_CFLAGS 7623b40a6198Smrg])# _LT_LANG_RC_CONFIG 7624b40a6198Smrg 7625b40a6198Smrg 7626b40a6198Smrg# LT_PROG_GCJ 7627b40a6198Smrg# ----------- 7628b40a6198SmrgAC_DEFUN([LT_PROG_GCJ], 76295592a31fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 76305592a31fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 76315592a31fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 76325592a31fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 76335592a31fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 76345592a31fSmrg]) 763545bc899bSmrg 76365592a31fSmrg# Old name: 76375592a31fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 76385592a31fSmrgdnl aclocal-1.4 backwards compatibility: 76395592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 764045bc899bSmrg 764145bc899bSmrg 7642b40a6198Smrg# LT_PROG_GO 7643b40a6198Smrg# ---------- 7644b40a6198SmrgAC_DEFUN([LT_PROG_GO], 7645b40a6198Smrg[AC_CHECK_TOOL(GOC, gccgo,) 7646b40a6198Smrg]) 7647b40a6198Smrg 7648b40a6198Smrg 76495592a31fSmrg# LT_PROG_RC 76505592a31fSmrg# ---------- 76515592a31fSmrgAC_DEFUN([LT_PROG_RC], 76525592a31fSmrg[AC_CHECK_TOOL(RC, windres,) 76535592a31fSmrg]) 76541ac89addSmrg 76555592a31fSmrg# Old name: 76565592a31fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 76575592a31fSmrgdnl aclocal-1.4 backwards compatibility: 76585592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 76591ac89addSmrg 76601ac89addSmrg 76615592a31fSmrg# _LT_DECL_EGREP 76625592a31fSmrg# -------------- 76635592a31fSmrg# If we don't have a new enough Autoconf to choose the best grep 76645592a31fSmrg# available, choose the one first in the user's PATH. 76655592a31fSmrgm4_defun([_LT_DECL_EGREP], 76665592a31fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 76675592a31fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 76685592a31fSmrgtest -z "$GREP" && GREP=grep 76695592a31fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 76705592a31fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 76715592a31fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 76725592a31fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 76735592a31fSmrgAC_SUBST([GREP]) 76745592a31fSmrg]) 7675226fade8Smrg 767650f2e948Smrg 76775592a31fSmrg# _LT_DECL_OBJDUMP 76785592a31fSmrg# -------------- 76795592a31fSmrg# If we don't have a new enough Autoconf to choose the best objdump 76805592a31fSmrg# available, choose the one first in the user's PATH. 76815592a31fSmrgm4_defun([_LT_DECL_OBJDUMP], 76825592a31fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 76835592a31fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 76845592a31fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 76855592a31fSmrgAC_SUBST([OBJDUMP]) 76865592a31fSmrg]) 768750f2e948Smrg 7688b40a6198Smrg# _LT_DECL_DLLTOOL 7689b40a6198Smrg# ---------------- 7690b40a6198Smrg# Ensure DLLTOOL variable is set. 7691b40a6198Smrgm4_defun([_LT_DECL_DLLTOOL], 7692b40a6198Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7693b40a6198Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7694b40a6198Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7695b40a6198SmrgAC_SUBST([DLLTOOL]) 7696b40a6198Smrg]) 769750f2e948Smrg 76985592a31fSmrg# _LT_DECL_SED 76995592a31fSmrg# ------------ 77005592a31fSmrg# Check for a fully-functional sed program, that truncates 77015592a31fSmrg# as few characters as possible. Prefer GNU sed if found. 77025592a31fSmrgm4_defun([_LT_DECL_SED], 77035592a31fSmrg[AC_PROG_SED 77045592a31fSmrgtest -z "$SED" && SED=sed 77055592a31fSmrgXsed="$SED -e 1s/^X//" 77065592a31fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 77075592a31fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 77085592a31fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 77095592a31fSmrg])# _LT_DECL_SED 77105592a31fSmrg 77115592a31fSmrgm4_ifndef([AC_PROG_SED], [ 77125592a31fSmrg# NOTE: This macro has been submitted for inclusion into # 77135592a31fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 77145592a31fSmrg# a released version of Autoconf we should remove this # 77155592a31fSmrg# macro and use it instead. # 77165592a31fSmrg 77175592a31fSmrgm4_defun([AC_PROG_SED], 77185592a31fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 77195592a31fSmrgAC_CACHE_VAL(lt_cv_path_SED, 77205592a31fSmrg[# Loop through the user's path and test for sed and gsed. 77215592a31fSmrg# Then use that list of sed's as ones to test for truncation. 77225592a31fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 77235592a31fSmrgfor as_dir in $PATH 77245592a31fSmrgdo 77255592a31fSmrg IFS=$as_save_IFS 77265592a31fSmrg test -z "$as_dir" && as_dir=. 77275592a31fSmrg for lt_ac_prog in sed gsed; do 77285592a31fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 77295592a31fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 77305592a31fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 77315592a31fSmrg fi 77325592a31fSmrg done 77335592a31fSmrg done 77345592a31fSmrgdone 77355592a31fSmrgIFS=$as_save_IFS 77365592a31fSmrglt_ac_max=0 77375592a31fSmrglt_ac_count=0 77385592a31fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 77395592a31fSmrg# along with /bin/sed that truncates output. 77405592a31fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 77415592a31fSmrg test ! -f $lt_ac_sed && continue 77425592a31fSmrg cat /dev/null > conftest.in 77435592a31fSmrg lt_ac_count=0 77445592a31fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 77455592a31fSmrg # Check for GNU sed and select it if it is found. 77465592a31fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 77475592a31fSmrg lt_cv_path_SED=$lt_ac_sed 77485592a31fSmrg break 774945bc899bSmrg fi 77505592a31fSmrg while true; do 77515592a31fSmrg cat conftest.in conftest.in >conftest.tmp 77525592a31fSmrg mv conftest.tmp conftest.in 77535592a31fSmrg cp conftest.in conftest.nl 77545592a31fSmrg echo >>conftest.nl 77555592a31fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 77565592a31fSmrg cmp -s conftest.out conftest.nl || break 77575592a31fSmrg # 10000 chars as input seems more than enough 77585592a31fSmrg test $lt_ac_count -gt 10 && break 77595592a31fSmrg lt_ac_count=`expr $lt_ac_count + 1` 77605592a31fSmrg if test $lt_ac_count -gt $lt_ac_max; then 77615592a31fSmrg lt_ac_max=$lt_ac_count 77625592a31fSmrg lt_cv_path_SED=$lt_ac_sed 77635592a31fSmrg fi 77645592a31fSmrg done 77655592a31fSmrgdone 776645bc899bSmrg]) 77675592a31fSmrgSED=$lt_cv_path_SED 77685592a31fSmrgAC_SUBST([SED]) 77695592a31fSmrgAC_MSG_RESULT([$SED]) 77705592a31fSmrg])#AC_PROG_SED 77715592a31fSmrg])#m4_ifndef 77721ac89addSmrg 77735592a31fSmrg# Old name: 77745592a31fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 77755592a31fSmrgdnl aclocal-1.4 backwards compatibility: 77765592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 77775592a31fSmrg 77785592a31fSmrg 77795592a31fSmrg# _LT_CHECK_SHELL_FEATURES 77805592a31fSmrg# ------------------------ 77815592a31fSmrg# Find out whether the shell is Bourne or XSI compatible, 77825592a31fSmrg# or has some other useful features. 77835592a31fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 77845592a31fSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 77855592a31fSmrg# Try some XSI features 77865592a31fSmrgxsi_shell=no 77875592a31fSmrg( _lt_dummy="a/b/c" 7788b40a6198Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7789b40a6198Smrg = c,a/b,b/c, \ 77905592a31fSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 77915592a31fSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 77925592a31fSmrg && xsi_shell=yes 77935592a31fSmrgAC_MSG_RESULT([$xsi_shell]) 77945592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 77955592a31fSmrg 77965592a31fSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 77975592a31fSmrglt_shell_append=no 77985592a31fSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 77995592a31fSmrg >/dev/null 2>&1 \ 78005592a31fSmrg && lt_shell_append=yes 78015592a31fSmrgAC_MSG_RESULT([$lt_shell_append]) 78025592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 78035592a31fSmrg 78045592a31fSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 78055592a31fSmrg lt_unset=unset 78065592a31fSmrgelse 78075592a31fSmrg lt_unset=false 780845bc899bSmrgfi 78095592a31fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 78105592a31fSmrg 78115592a31fSmrg# test EBCDIC or ASCII 78125592a31fSmrgcase `echo X|tr X '\101'` in 78135592a31fSmrg A) # ASCII based system 78145592a31fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 78155592a31fSmrg lt_SP2NL='tr \040 \012' 78165592a31fSmrg lt_NL2SP='tr \015\012 \040\040' 78175592a31fSmrg ;; 78185592a31fSmrg *) # EBCDIC based system 78195592a31fSmrg lt_SP2NL='tr \100 \n' 78205592a31fSmrg lt_NL2SP='tr \r\n \100\100' 78215592a31fSmrg ;; 782245bc899bSmrgesac 78235592a31fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 78245592a31fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 78255592a31fSmrg])# _LT_CHECK_SHELL_FEATURES 782650f2e948Smrg 782750f2e948Smrg 7828b40a6198Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7829b40a6198Smrg# ------------------------------------------------------ 7830b40a6198Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7831b40a6198Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7832b40a6198Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7833b40a6198Smrg[dnl { 7834b40a6198Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7835b40a6198Smrg$1 ()\ 7836b40a6198Smrg{\ 7837b40a6198Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7838b40a6198Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7839b40a6198Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7840b40a6198Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7841b40a6198Smrgtest 0 -eq $? || _lt_function_replace_fail=: 7842b40a6198Smrg]) 78435592a31fSmrg 78445592a31fSmrg 7845b40a6198Smrg# _LT_PROG_REPLACE_SHELLFNS 7846b40a6198Smrg# ------------------------- 7847b40a6198Smrg# Replace existing portable implementations of several shell functions with 7848b40a6198Smrg# equivalent extended shell implementations where those features are available.. 7849b40a6198Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7850b40a6198Smrg[if test x"$xsi_shell" = xyes; then 7851b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7852b40a6198Smrg case ${1} in 7853b40a6198Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7854b40a6198Smrg * ) func_dirname_result="${3}" ;; 7855b40a6198Smrg esac]) 7856b40a6198Smrg 7857b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7858b40a6198Smrg func_basename_result="${1##*/}"]) 7859b40a6198Smrg 7860b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7861b40a6198Smrg case ${1} in 7862b40a6198Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7863b40a6198Smrg * ) func_dirname_result="${3}" ;; 7864b40a6198Smrg esac 7865b40a6198Smrg func_basename_result="${1##*/}"]) 78665592a31fSmrg 7867b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7868b40a6198Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7869b40a6198Smrg # positional parameters, so assign one to ordinary parameter first. 7870b40a6198Smrg func_stripname_result=${3} 7871b40a6198Smrg func_stripname_result=${func_stripname_result#"${1}"} 7872b40a6198Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 78735592a31fSmrg 7874b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7875b40a6198Smrg func_split_long_opt_name=${1%%=*} 7876b40a6198Smrg func_split_long_opt_arg=${1#*=}]) 78775592a31fSmrg 7878b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7879b40a6198Smrg func_split_short_opt_arg=${1#??} 7880b40a6198Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 78815592a31fSmrg 7882b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7883b40a6198Smrg case ${1} in 7884b40a6198Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7885b40a6198Smrg *) func_lo2o_result=${1} ;; 7886b40a6198Smrg esac]) 788745bc899bSmrg 7888b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 788945bc899bSmrg 7890b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 789145bc899bSmrg 7892b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7893b40a6198Smrgfi 789445bc899bSmrg 7895b40a6198Smrgif test x"$lt_shell_append" = xyes; then 7896b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 789745bc899bSmrg 7898b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7899b40a6198Smrg func_quote_for_eval "${2}" 7900b40a6198Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7901b40a6198Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 790245bc899bSmrg 7903b40a6198Smrg # Save a `func_append' function call where possible by direct use of '+=' 7904b40a6198Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7905b40a6198Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7906b40a6198Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7907b40a6198Smrg test 0 -eq $? || _lt_function_replace_fail=: 7908b40a6198Smrgelse 7909b40a6198Smrg # Save a `func_append' function call even when '+=' is not available 7910b40a6198Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7911b40a6198Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7912b40a6198Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7913b40a6198Smrg test 0 -eq $? || _lt_function_replace_fail=: 7914b40a6198Smrgfi 791545bc899bSmrg 7916b40a6198Smrgif test x"$_lt_function_replace_fail" = x":"; then 7917b40a6198Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7918b40a6198Smrgfi 7919b40a6198Smrg]) 792045bc899bSmrg 7921b40a6198Smrg# _LT_PATH_CONVERSION_FUNCTIONS 7922b40a6198Smrg# ----------------------------- 7923b40a6198Smrg# Determine which file name conversion functions should be used by 7924b40a6198Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7925b40a6198Smrg# for certain cross-compile configurations and native mingw. 7926b40a6198Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7927b40a6198Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7928b40a6198SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7929b40a6198SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7930b40a6198SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7931b40a6198Smrg[case $host in 7932b40a6198Smrg *-*-mingw* ) 7933b40a6198Smrg case $build in 7934b40a6198Smrg *-*-mingw* ) # actually msys 7935b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7936b40a6198Smrg ;; 7937b40a6198Smrg *-*-cygwin* ) 7938b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7939b40a6198Smrg ;; 7940b40a6198Smrg * ) # otherwise, assume *nix 7941b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7942b40a6198Smrg ;; 7943b40a6198Smrg esac 79445592a31fSmrg ;; 7945b40a6198Smrg *-*-cygwin* ) 7946b40a6198Smrg case $build in 7947b40a6198Smrg *-*-mingw* ) # actually msys 7948b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7949b40a6198Smrg ;; 7950b40a6198Smrg *-*-cygwin* ) 7951b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7952b40a6198Smrg ;; 7953b40a6198Smrg * ) # otherwise, assume *nix 7954b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7955b40a6198Smrg ;; 7956b40a6198Smrg esac 79575592a31fSmrg ;; 7958b40a6198Smrg * ) # unhandled hosts (and "normal" native builds) 7959b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7960b40a6198Smrg ;; 7961b40a6198Smrgesac 79625592a31fSmrg]) 7963b40a6198Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7964b40a6198SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7965b40a6198Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7966b40a6198Smrg [0], [convert $build file names to $host format])dnl 7967b40a6198Smrg 7968b40a6198SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7969b40a6198SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7970b40a6198Smrg[#assume ordinary cross tools, or native build. 7971b40a6198Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 7972b40a6198Smrgcase $host in 7973b40a6198Smrg *-*-mingw* ) 7974b40a6198Smrg case $build in 7975b40a6198Smrg *-*-mingw* ) # actually msys 7976b40a6198Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7977b40a6198Smrg ;; 7978b40a6198Smrg esac 7979b40a6198Smrg ;; 7980b40a6198Smrgesac 7981b40a6198Smrg]) 7982b40a6198Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7983b40a6198SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7984b40a6198Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7985b40a6198Smrg [0], [convert $build files to toolchain format])dnl 7986b40a6198Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 798745bc899bSmrg 79885592a31fSmrg# Helper functions for option handling. -*- Autoconf -*- 79895592a31fSmrg# 7990b40a6198Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7991b40a6198Smrg# Inc. 79925592a31fSmrg# Written by Gary V. Vaughan, 2004 79935592a31fSmrg# 79945592a31fSmrg# This file is free software; the Free Software Foundation gives 79955592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 79965592a31fSmrg# modifications, as long as this notice is preserved. 799745bc899bSmrg 7998b40a6198Smrg# serial 7 ltoptions.m4 799945bc899bSmrg 80005592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 80015592a31fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 800245bc899bSmrg 800345bc899bSmrg 80045592a31fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 80055592a31fSmrg# ------------------------------------------ 80065592a31fSmrgm4_define([_LT_MANGLE_OPTION], 80075592a31fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 800845bc899bSmrg 80091ac89addSmrg 80105592a31fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 80115592a31fSmrg# --------------------------------------- 80125592a31fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 80135592a31fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 80145592a31fSmrg# saved as a flag. 80155592a31fSmrgm4_define([_LT_SET_OPTION], 80165592a31fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 80175592a31fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 80185592a31fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 80195592a31fSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 80205592a31fSmrg]) 80211ac89addSmrg 80221ac89addSmrg 80235592a31fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 80245592a31fSmrg# ------------------------------------------------------------ 80255592a31fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 80265592a31fSmrgm4_define([_LT_IF_OPTION], 80275592a31fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 80285592a31fSmrg 80295592a31fSmrg 80305592a31fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 80315592a31fSmrg# ------------------------------------------------------- 80325592a31fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 80335592a31fSmrg# are set. 80345592a31fSmrgm4_define([_LT_UNLESS_OPTIONS], 80355592a31fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80365592a31fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 80375592a31fSmrg [m4_define([$0_found])])])[]dnl 80385592a31fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 80395592a31fSmrg])[]dnl 80405592a31fSmrg]) 804145bc899bSmrg 804245bc899bSmrg 80435592a31fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 80445592a31fSmrg# ---------------------------------------- 80455592a31fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 80465592a31fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 80475592a31fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 80485592a31fSmrg# the unknown option and exit. 80495592a31fSmrgm4_defun([_LT_SET_OPTIONS], 80505592a31fSmrg[# Set options 80515592a31fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80525592a31fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 80535592a31fSmrg 80545592a31fSmrgm4_if([$1],[LT_INIT],[ 80555592a31fSmrg dnl 80565592a31fSmrg dnl Simply set some default values (i.e off) if boolean options were not 80575592a31fSmrg dnl specified: 80585592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 80595592a31fSmrg ]) 80605592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 80615592a31fSmrg ]) 80625592a31fSmrg dnl 80635592a31fSmrg dnl If no reference was made to various pairs of opposing options, then 80645592a31fSmrg dnl we run the default mode handler for the pair. For example, if neither 80655592a31fSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 80665592a31fSmrg dnl archives by default: 80675592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 80685592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 80695592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 80705592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 80715592a31fSmrg [_LT_ENABLE_FAST_INSTALL]) 80725592a31fSmrg ]) 80735592a31fSmrg])# _LT_SET_OPTIONS 807445bc899bSmrg 807545bc899bSmrg 807645bc899bSmrg 80775592a31fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 80785592a31fSmrg# ----------------------------------------- 80795592a31fSmrgm4_define([_LT_MANGLE_DEFUN], 80805592a31fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 808145bc899bSmrg 808250f2e948Smrg 80835592a31fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 80845592a31fSmrg# ----------------------------------------------- 80855592a31fSmrgm4_define([LT_OPTION_DEFINE], 80865592a31fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 80875592a31fSmrg])# LT_OPTION_DEFINE 808850f2e948Smrg 808950f2e948Smrg 80905592a31fSmrg# dlopen 80915592a31fSmrg# ------ 80925592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 80935592a31fSmrg]) 80945592a31fSmrg 80955592a31fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 80965592a31fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 80975592a31fSmrgAC_DIAGNOSE([obsolete], 80985592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 80995592a31fSmrgput the `dlopen' option into LT_INIT's first parameter.]) 81005592a31fSmrg]) 81015592a31fSmrg 81025592a31fSmrgdnl aclocal-1.4 backwards compatibility: 81035592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 81045592a31fSmrg 81055592a31fSmrg 81065592a31fSmrg# win32-dll 81075592a31fSmrg# --------- 81085592a31fSmrg# Declare package support for building win32 dll's. 81095592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 81105592a31fSmrg[enable_win32_dll=yes 81115592a31fSmrg 81125592a31fSmrgcase $host in 8113b40a6198Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 81145592a31fSmrg AC_CHECK_TOOL(AS, as, false) 81155592a31fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 81165592a31fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 81175592a31fSmrg ;; 81185592a31fSmrgesac 811945bc899bSmrg 81205592a31fSmrgtest -z "$AS" && AS=as 8121b40a6198Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 812245bc899bSmrg 81235592a31fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8124b40a6198Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 812545bc899bSmrg 81265592a31fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8127b40a6198Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 81285592a31fSmrg])# win32-dll 812945bc899bSmrg 81305592a31fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 81315592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 81325592a31fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 81335592a31fSmrgAC_DIAGNOSE([obsolete], 81345592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81355592a31fSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 81365592a31fSmrg]) 813745bc899bSmrg 81385592a31fSmrgdnl aclocal-1.4 backwards compatibility: 81395592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 814045bc899bSmrg 814145bc899bSmrg 81425592a31fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 81435592a31fSmrg# ---------------------------- 81445592a31fSmrg# implement the --enable-shared flag, and supports the `shared' and 81455592a31fSmrg# `disable-shared' LT_INIT options. 81465592a31fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 81475592a31fSmrgm4_define([_LT_ENABLE_SHARED], 81485592a31fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 81495592a31fSmrgAC_ARG_ENABLE([shared], 81505592a31fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 81515592a31fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 81525592a31fSmrg [p=${PACKAGE-default} 81535592a31fSmrg case $enableval in 81545592a31fSmrg yes) enable_shared=yes ;; 81555592a31fSmrg no) enable_shared=no ;; 81565592a31fSmrg *) 81575592a31fSmrg enable_shared=no 81585592a31fSmrg # Look at the argument we got. We use all the common list separators. 81595592a31fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 81605592a31fSmrg for pkg in $enableval; do 81615592a31fSmrg IFS="$lt_save_ifs" 81625592a31fSmrg if test "X$pkg" = "X$p"; then 81635592a31fSmrg enable_shared=yes 81645592a31fSmrg fi 81655592a31fSmrg done 81665592a31fSmrg IFS="$lt_save_ifs" 8167226fade8Smrg ;; 81685592a31fSmrg esac], 81695592a31fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 817045bc899bSmrg 81715592a31fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 81725592a31fSmrg [Whether or not to build shared libraries]) 81735592a31fSmrg])# _LT_ENABLE_SHARED 817445bc899bSmrg 81755592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 81765592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 817745bc899bSmrg 81785592a31fSmrg# Old names: 81795592a31fSmrgAC_DEFUN([AC_ENABLE_SHARED], 81805592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 81815592a31fSmrg]) 818245bc899bSmrg 81835592a31fSmrgAC_DEFUN([AC_DISABLE_SHARED], 81845592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 81855592a31fSmrg]) 818645bc899bSmrg 81875592a31fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 81885592a31fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 818945bc899bSmrg 81905592a31fSmrgdnl aclocal-1.4 backwards compatibility: 81915592a31fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 81925592a31fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 819345bc899bSmrg 819445bc899bSmrg 819545bc899bSmrg 81965592a31fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 81975592a31fSmrg# ---------------------------- 81985592a31fSmrg# implement the --enable-static flag, and support the `static' and 81995592a31fSmrg# `disable-static' LT_INIT options. 82005592a31fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82015592a31fSmrgm4_define([_LT_ENABLE_STATIC], 82025592a31fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 82035592a31fSmrgAC_ARG_ENABLE([static], 82045592a31fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 82055592a31fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 82065592a31fSmrg [p=${PACKAGE-default} 82075592a31fSmrg case $enableval in 82085592a31fSmrg yes) enable_static=yes ;; 82095592a31fSmrg no) enable_static=no ;; 82105592a31fSmrg *) 82115592a31fSmrg enable_static=no 82125592a31fSmrg # Look at the argument we got. We use all the common list separators. 82135592a31fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82145592a31fSmrg for pkg in $enableval; do 82155592a31fSmrg IFS="$lt_save_ifs" 82165592a31fSmrg if test "X$pkg" = "X$p"; then 82175592a31fSmrg enable_static=yes 82185592a31fSmrg fi 82195592a31fSmrg done 82205592a31fSmrg IFS="$lt_save_ifs" 8221226fade8Smrg ;; 82225592a31fSmrg esac], 82235592a31fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 822445bc899bSmrg 82255592a31fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 82265592a31fSmrg [Whether or not to build static libraries]) 82275592a31fSmrg])# _LT_ENABLE_STATIC 822845bc899bSmrg 82295592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 82305592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 823145bc899bSmrg 82325592a31fSmrg# Old names: 82335592a31fSmrgAC_DEFUN([AC_ENABLE_STATIC], 82345592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 82355592a31fSmrg]) 823645bc899bSmrg 82375592a31fSmrgAC_DEFUN([AC_DISABLE_STATIC], 82385592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 82395592a31fSmrg]) 824045bc899bSmrg 82415592a31fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 82425592a31fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 824345bc899bSmrg 82445592a31fSmrgdnl aclocal-1.4 backwards compatibility: 82455592a31fSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 82465592a31fSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 824745bc899bSmrg 824845bc899bSmrg 824945bc899bSmrg 82505592a31fSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 82515592a31fSmrg# ---------------------------------- 82525592a31fSmrg# implement the --enable-fast-install flag, and support the `fast-install' 82535592a31fSmrg# and `disable-fast-install' LT_INIT options. 82545592a31fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82555592a31fSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 82565592a31fSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 82575592a31fSmrgAC_ARG_ENABLE([fast-install], 82585592a31fSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 82595592a31fSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 82605592a31fSmrg [p=${PACKAGE-default} 82615592a31fSmrg case $enableval in 82625592a31fSmrg yes) enable_fast_install=yes ;; 82635592a31fSmrg no) enable_fast_install=no ;; 82645592a31fSmrg *) 82655592a31fSmrg enable_fast_install=no 82665592a31fSmrg # Look at the argument we got. We use all the common list separators. 82675592a31fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82685592a31fSmrg for pkg in $enableval; do 82695592a31fSmrg IFS="$lt_save_ifs" 82705592a31fSmrg if test "X$pkg" = "X$p"; then 82715592a31fSmrg enable_fast_install=yes 827250f2e948Smrg fi 82735592a31fSmrg done 82745592a31fSmrg IFS="$lt_save_ifs" 8275226fade8Smrg ;; 82765592a31fSmrg esac], 82775592a31fSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 827845bc899bSmrg 82795592a31fSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 82805592a31fSmrg [Whether or not to optimize for fast installation])dnl 82815592a31fSmrg])# _LT_ENABLE_FAST_INSTALL 828245bc899bSmrg 82835592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 82845592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 82851ac89addSmrg 82865592a31fSmrg# Old names: 82875592a31fSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 82885592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 82895592a31fSmrgAC_DIAGNOSE([obsolete], 82905592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 82915592a31fSmrgthe `fast-install' option into LT_INIT's first parameter.]) 82925592a31fSmrg]) 82931ac89addSmrg 82945592a31fSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 82955592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 82965592a31fSmrgAC_DIAGNOSE([obsolete], 82975592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 82985592a31fSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 82995592a31fSmrg]) 83001ac89addSmrg 83015592a31fSmrgdnl aclocal-1.4 backwards compatibility: 83025592a31fSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 83035592a31fSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 83041ac89addSmrg 830550f2e948Smrg 83065592a31fSmrg# _LT_WITH_PIC([MODE]) 83075592a31fSmrg# -------------------- 83085592a31fSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 83095592a31fSmrg# LT_INIT options. 83105592a31fSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 83115592a31fSmrgm4_define([_LT_WITH_PIC], 83125592a31fSmrg[AC_ARG_WITH([pic], 8313b40a6198Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 83145592a31fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8315b40a6198Smrg [lt_p=${PACKAGE-default} 8316b40a6198Smrg case $withval in 8317b40a6198Smrg yes|no) pic_mode=$withval ;; 8318b40a6198Smrg *) 8319b40a6198Smrg pic_mode=default 8320b40a6198Smrg # Look at the argument we got. We use all the common list separators. 8321b40a6198Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8322b40a6198Smrg for lt_pkg in $withval; do 8323b40a6198Smrg IFS="$lt_save_ifs" 8324b40a6198Smrg if test "X$lt_pkg" = "X$lt_p"; then 8325b40a6198Smrg pic_mode=yes 8326b40a6198Smrg fi 8327b40a6198Smrg done 8328b40a6198Smrg IFS="$lt_save_ifs" 8329b40a6198Smrg ;; 8330b40a6198Smrg esac], 83315592a31fSmrg [pic_mode=default]) 83325592a31fSmrg 83335592a31fSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 83341ac89addSmrg 83355592a31fSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 83365592a31fSmrg])# _LT_WITH_PIC 83371ac89addSmrg 83385592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 83395592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 834050f2e948Smrg 83415592a31fSmrg# Old name: 83425592a31fSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 83435592a31fSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 83445592a31fSmrgAC_DIAGNOSE([obsolete], 83455592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 83465592a31fSmrgput the `pic-only' option into LT_INIT's first parameter.]) 834750f2e948Smrg]) 834850f2e948Smrg 83495592a31fSmrgdnl aclocal-1.4 backwards compatibility: 83505592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 835150f2e948Smrg 835250f2e948Smrg 83535592a31fSmrgm4_define([_LTDL_MODE], []) 83545592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 83555592a31fSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 83565592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 83575592a31fSmrg [m4_define([_LTDL_MODE], [recursive])]) 83585592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 83595592a31fSmrg [m4_define([_LTDL_MODE], [subproject])]) 836050f2e948Smrg 83615592a31fSmrgm4_define([_LTDL_TYPE], []) 83625592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 83635592a31fSmrg [m4_define([_LTDL_TYPE], [installable])]) 83645592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 83655592a31fSmrg [m4_define([_LTDL_TYPE], [convenience])]) 836650f2e948Smrg 83675592a31fSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 836845bc899bSmrg# 83695592a31fSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 83705592a31fSmrg# Written by Gary V. Vaughan, 2004 8371226fade8Smrg# 83725592a31fSmrg# This file is free software; the Free Software Foundation gives 83735592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 83745592a31fSmrg# modifications, as long as this notice is preserved. 83755592a31fSmrg 83765592a31fSmrg# serial 6 ltsugar.m4 83775592a31fSmrg 83785592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 83795592a31fSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 83805592a31fSmrg 83815592a31fSmrg 83825592a31fSmrg# lt_join(SEP, ARG1, [ARG2...]) 83835592a31fSmrg# ----------------------------- 83845592a31fSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 83855592a31fSmrg# associated separator. 83865592a31fSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 83875592a31fSmrg# versions in m4sugar had bugs. 83885592a31fSmrgm4_define([lt_join], 83895592a31fSmrg[m4_if([$#], [1], [], 83905592a31fSmrg [$#], [2], [[$2]], 83915592a31fSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 83925592a31fSmrgm4_define([_lt_join], 83935592a31fSmrg[m4_if([$#$2], [2], [], 83945592a31fSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 83955592a31fSmrg 83965592a31fSmrg 83975592a31fSmrg# lt_car(LIST) 83985592a31fSmrg# lt_cdr(LIST) 83995592a31fSmrg# ------------ 84005592a31fSmrg# Manipulate m4 lists. 84015592a31fSmrg# These macros are necessary as long as will still need to support 84025592a31fSmrg# Autoconf-2.59 which quotes differently. 84035592a31fSmrgm4_define([lt_car], [[$1]]) 84045592a31fSmrgm4_define([lt_cdr], 84055592a31fSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 84065592a31fSmrg [$#], 1, [], 84075592a31fSmrg [m4_dquote(m4_shift($@))])]) 84085592a31fSmrgm4_define([lt_unquote], $1) 84095592a31fSmrg 84105592a31fSmrg 84115592a31fSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 84125592a31fSmrg# ------------------------------------------ 84135592a31fSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 84145592a31fSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 84155592a31fSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 84165592a31fSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 84175592a31fSmrg# than defined and empty). 84183a925b30Smrg# 84195592a31fSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 84205592a31fSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 84215592a31fSmrgm4_define([lt_append], 84225592a31fSmrg[m4_define([$1], 84235592a31fSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 84245592a31fSmrg 84255592a31fSmrg 84265592a31fSmrg 84275592a31fSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 84285592a31fSmrg# ---------------------------------------------------------- 84295592a31fSmrg# Produce a SEP delimited list of all paired combinations of elements of 84305592a31fSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 84315592a31fSmrg# has the form PREFIXmINFIXSUFFIXn. 84325592a31fSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 84335592a31fSmrgm4_define([lt_combine], 84345592a31fSmrg[m4_if(m4_eval([$# > 3]), [1], 84355592a31fSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 84365592a31fSmrg[[m4_foreach([_Lt_prefix], [$2], 84375592a31fSmrg [m4_foreach([_Lt_suffix], 84385592a31fSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 84395592a31fSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 84405592a31fSmrg 84415592a31fSmrg 84425592a31fSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 84435592a31fSmrg# ----------------------------------------------------------------------- 84445592a31fSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 84455592a31fSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 84465592a31fSmrgm4_define([lt_if_append_uniq], 84475592a31fSmrg[m4_ifdef([$1], 84485592a31fSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 84495592a31fSmrg [lt_append([$1], [$2], [$3])$4], 84505592a31fSmrg [$5])], 84515592a31fSmrg [lt_append([$1], [$2], [$3])$4])]) 84525592a31fSmrg 84535592a31fSmrg 84545592a31fSmrg# lt_dict_add(DICT, KEY, VALUE) 84555592a31fSmrg# ----------------------------- 84565592a31fSmrgm4_define([lt_dict_add], 84575592a31fSmrg[m4_define([$1($2)], [$3])]) 845845bc899bSmrg 845945bc899bSmrg 84605592a31fSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 84615592a31fSmrg# -------------------------------------------- 84625592a31fSmrgm4_define([lt_dict_add_subkey], 84635592a31fSmrg[m4_define([$1($2:$3)], [$4])]) 846445bc899bSmrg 846545bc899bSmrg 84665592a31fSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 84675592a31fSmrg# ---------------------------------- 84685592a31fSmrgm4_define([lt_dict_fetch], 84695592a31fSmrg[m4_ifval([$3], 84705592a31fSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 84715592a31fSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 847245bc899bSmrg 84731ac89addSmrg 84745592a31fSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 84755592a31fSmrg# ----------------------------------------------------------------- 84765592a31fSmrgm4_define([lt_if_dict_fetch], 84775592a31fSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 84785592a31fSmrg [$5], 84795592a31fSmrg [$6])]) 848045bc899bSmrg 84815592a31fSmrg 84825592a31fSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 84835592a31fSmrg# -------------------------------------------------------------- 84845592a31fSmrgm4_define([lt_dict_filter], 84855592a31fSmrg[m4_if([$5], [], [], 84865592a31fSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 84875592a31fSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 84885592a31fSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8489226fade8Smrg]) 849050f2e948Smrg 84915592a31fSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 84925592a31fSmrg# 84935592a31fSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 84945592a31fSmrg# Written by Scott James Remnant, 2004 84955592a31fSmrg# 84965592a31fSmrg# This file is free software; the Free Software Foundation gives 84975592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 84985592a31fSmrg# modifications, as long as this notice is preserved. 849950f2e948Smrg 8500b40a6198Smrg# @configure_input@ 850150f2e948Smrg 8502b40a6198Smrg# serial 3337 ltversion.m4 85035592a31fSmrg# This file is part of GNU Libtool 850450f2e948Smrg 8505b40a6198Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8506b40a6198Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 850750f2e948Smrg 85085592a31fSmrgAC_DEFUN([LTVERSION_VERSION], 8509b40a6198Smrg[macro_version='2.4.2' 8510b40a6198Smrgmacro_revision='1.3337' 85115592a31fSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 85125592a31fSmrg_LT_DECL(, macro_revision, 0) 8513226fade8Smrg]) 851450f2e948Smrg 85155592a31fSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 85165592a31fSmrg# 8517b40a6198Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 85185592a31fSmrg# Written by Scott James Remnant, 2004. 85195592a31fSmrg# 85205592a31fSmrg# This file is free software; the Free Software Foundation gives 85215592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 85225592a31fSmrg# modifications, as long as this notice is preserved. 85235592a31fSmrg 8524b40a6198Smrg# serial 5 lt~obsolete.m4 85255592a31fSmrg 85265592a31fSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 85275592a31fSmrg# 85285592a31fSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 85295592a31fSmrg# which have later been changed to m4_define as they aren't part of the 85305592a31fSmrg# exported API, or moved to Autoconf or Automake where they belong. 85315592a31fSmrg# 85325592a31fSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 85335592a31fSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 85345592a31fSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 85355592a31fSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 85365592a31fSmrg# and doesn't know about Autoconf macros at all.) 85375592a31fSmrg# 85385592a31fSmrg# So we provide this file, which has a silly filename so it's always 85395592a31fSmrg# included after everything else. This provides aclocal with the 85405592a31fSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 85415592a31fSmrg# because those macros already exist, or will be overwritten later. 85425592a31fSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 85435592a31fSmrg# 85445592a31fSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 85455592a31fSmrg# Yes, that means every name once taken will need to remain here until 85465592a31fSmrg# we give up compatibility with versions before 1.7, at which point 85475592a31fSmrg# we need to keep only those names which we still refer to. 85485592a31fSmrg 85495592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 85505592a31fSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 85515592a31fSmrg 85525592a31fSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 85535592a31fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 85545592a31fSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 85555592a31fSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 85565592a31fSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 85575592a31fSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 85585592a31fSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 85595592a31fSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 85605592a31fSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 85615592a31fSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 85625592a31fSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 85635592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 85645592a31fSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 85655592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 85665592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 85675592a31fSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 85685592a31fSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 85695592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 85705592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 85715592a31fSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 85725592a31fSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 85735592a31fSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 85745592a31fSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 85755592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 85765592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 85775592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 85785592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 85795592a31fSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 85805592a31fSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 85815592a31fSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 85825592a31fSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 85835592a31fSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 85845592a31fSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 85855592a31fSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 85865592a31fSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 85875592a31fSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 85885592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 85895592a31fSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 85905592a31fSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 85915592a31fSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 85925592a31fSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 85935592a31fSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 85945592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 85955592a31fSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 85965592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 85975592a31fSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 85985592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 85995592a31fSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 86005592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 86015592a31fSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 86025592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 86035592a31fSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 86045592a31fSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 86055592a31fSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8606b40a6198Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8607b40a6198Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8608b40a6198Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8609b40a6198Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8610b40a6198Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8611b40a6198Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8612b40a6198Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 86135592a31fSmrg 861445bc899bSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8615b40a6198Smrg# serial 1 (pkg-config-0.24) 861645bc899bSmrg# 861745bc899bSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 861845bc899bSmrg# 861945bc899bSmrg# This program is free software; you can redistribute it and/or modify 862045bc899bSmrg# it under the terms of the GNU General Public License as published by 862145bc899bSmrg# the Free Software Foundation; either version 2 of the License, or 862245bc899bSmrg# (at your option) any later version. 862345bc899bSmrg# 862445bc899bSmrg# This program is distributed in the hope that it will be useful, but 862545bc899bSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 862645bc899bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 862745bc899bSmrg# General Public License for more details. 862845bc899bSmrg# 862945bc899bSmrg# You should have received a copy of the GNU General Public License 863045bc899bSmrg# along with this program; if not, write to the Free Software 863145bc899bSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 863245bc899bSmrg# 863345bc899bSmrg# As a special exception to the GNU General Public License, if you 863445bc899bSmrg# distribute this file as part of a program that contains a 863545bc899bSmrg# configuration script generated by Autoconf, you may include it under 863645bc899bSmrg# the same distribution terms that you use for the rest of that program. 863745bc899bSmrg 863845bc899bSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 863945bc899bSmrg# ---------------------------------- 864045bc899bSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 864145bc899bSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 864245bc899bSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8643b40a6198SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8644b40a6198SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8645b40a6198SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8646b40a6198Smrg 864745bc899bSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 864845bc899bSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 864945bc899bSmrgfi 865045bc899bSmrgif test -n "$PKG_CONFIG"; then 865145bc899bSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 865245bc899bSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 865345bc899bSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 865445bc899bSmrg AC_MSG_RESULT([yes]) 865545bc899bSmrg else 865645bc899bSmrg AC_MSG_RESULT([no]) 865745bc899bSmrg PKG_CONFIG="" 865845bc899bSmrg fi 865945bc899bSmrgfi[]dnl 866045bc899bSmrg])# PKG_PROG_PKG_CONFIG 866145bc899bSmrg 866245bc899bSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 866345bc899bSmrg# 866445bc899bSmrg# Check to see whether a particular set of modules exists. Similar 866545bc899bSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 866645bc899bSmrg# 8667b40a6198Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8668b40a6198Smrg# only at the first occurence in configure.ac, so if the first place 8669b40a6198Smrg# it's called might be skipped (such as if it is within an "if", you 8670b40a6198Smrg# have to call PKG_CHECK_EXISTS manually 867145bc899bSmrg# -------------------------------------------------------------- 867245bc899bSmrgAC_DEFUN([PKG_CHECK_EXISTS], 867345bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 867445bc899bSmrgif test -n "$PKG_CONFIG" && \ 867545bc899bSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8676b40a6198Smrg m4_default([$2], [:]) 867745bc899bSmrgm4_ifvaln([$3], [else 867845bc899bSmrg $3])dnl 867945bc899bSmrgfi]) 868045bc899bSmrg 868145bc899bSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 868245bc899bSmrg# --------------------------------------------- 868345bc899bSmrgm4_define([_PKG_CONFIG], 868450f2e948Smrg[if test -n "$$1"; then 868550f2e948Smrg pkg_cv_[]$1="$$1" 868650f2e948Smrg elif test -n "$PKG_CONFIG"; then 868750f2e948Smrg PKG_CHECK_EXISTS([$3], 868850f2e948Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 868950f2e948Smrg [pkg_failed=yes]) 869050f2e948Smrg else 869150f2e948Smrg pkg_failed=untried 869245bc899bSmrgfi[]dnl 869345bc899bSmrg])# _PKG_CONFIG 869445bc899bSmrg 869545bc899bSmrg# _PKG_SHORT_ERRORS_SUPPORTED 869645bc899bSmrg# ----------------------------- 869745bc899bSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 869845bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 869945bc899bSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 870045bc899bSmrg _pkg_short_errors_supported=yes 870145bc899bSmrgelse 870245bc899bSmrg _pkg_short_errors_supported=no 870345bc899bSmrgfi[]dnl 870445bc899bSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 870545bc899bSmrg 870645bc899bSmrg 870745bc899bSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 870845bc899bSmrg# [ACTION-IF-NOT-FOUND]) 870945bc899bSmrg# 871045bc899bSmrg# 871145bc899bSmrg# Note that if there is a possibility the first call to 871245bc899bSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 871345bc899bSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 871445bc899bSmrg# 871545bc899bSmrg# 871645bc899bSmrg# -------------------------------------------------------------- 871745bc899bSmrgAC_DEFUN([PKG_CHECK_MODULES], 871845bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 871945bc899bSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 872045bc899bSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 872145bc899bSmrg 872245bc899bSmrgpkg_failed=no 872345bc899bSmrgAC_MSG_CHECKING([for $1]) 872445bc899bSmrg 872545bc899bSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 872645bc899bSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 872745bc899bSmrg 872845bc899bSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 872945bc899bSmrgand $1[]_LIBS to avoid the need to call pkg-config. 873045bc899bSmrgSee the pkg-config man page for more details.]) 873145bc899bSmrg 873245bc899bSmrgif test $pkg_failed = yes; then 8733b40a6198Smrg AC_MSG_RESULT([no]) 873445bc899bSmrg _PKG_SHORT_ERRORS_SUPPORTED 873545bc899bSmrg if test $_pkg_short_errors_supported = yes; then 873650f2e948Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 873745bc899bSmrg else 873850f2e948Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 873945bc899bSmrg fi 874045bc899bSmrg # Put the nasty error message in config.log where it belongs 874145bc899bSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 874245bc899bSmrg 8743b40a6198Smrg m4_default([$4], [AC_MSG_ERROR( 874445bc899bSmrg[Package requirements ($2) were not met: 874545bc899bSmrg 874645bc899bSmrg$$1_PKG_ERRORS 874745bc899bSmrg 874845bc899bSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 874945bc899bSmrginstalled software in a non-standard prefix. 875045bc899bSmrg 8751b40a6198Smrg_PKG_TEXT]) 8752b40a6198Smrg ]) 875345bc899bSmrgelif test $pkg_failed = untried; then 8754b40a6198Smrg AC_MSG_RESULT([no]) 8755b40a6198Smrg m4_default([$4], [AC_MSG_FAILURE( 875645bc899bSmrg[The pkg-config script could not be found or is too old. Make sure it 875745bc899bSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 875845bc899bSmrgpath to pkg-config. 875945bc899bSmrg 876045bc899bSmrg_PKG_TEXT 876145bc899bSmrg 8762b40a6198SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 8763b40a6198Smrg ]) 876445bc899bSmrgelse 876545bc899bSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 876645bc899bSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 876745bc899bSmrg AC_MSG_RESULT([yes]) 8768b40a6198Smrg $3 876945bc899bSmrgfi[]dnl 877045bc899bSmrg])# PKG_CHECK_MODULES 877145bc899bSmrg 877250f2e948Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 877345bc899bSmrgdnl 8774b40a6198Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 877545bc899bSmrgdnl 877645bc899bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 8777b40a6198Smrgdnl copy of this software and associated documentation files (the "Software"), 8778b40a6198Smrgdnl to deal in the Software without restriction, including without limitation 8779b40a6198Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 8780b40a6198Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 8781b40a6198Smrgdnl Software is furnished to do so, subject to the following conditions: 878245bc899bSmrgdnl 8783b40a6198Smrgdnl The above copyright notice and this permission notice (including the next 8784b40a6198Smrgdnl paragraph) shall be included in all copies or substantial portions of the 8785b40a6198Smrgdnl Software. 878645bc899bSmrgdnl 8787b40a6198Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8788b40a6198Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8789b40a6198Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8790b40a6198Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8791b40a6198Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 8792b40a6198Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 8793b40a6198Smrgdnl DEALINGS IN THE SOFTWARE. 879445bc899bSmrg 879545bc899bSmrg# XORG_MACROS_VERSION(required-version) 879645bc899bSmrg# ------------------------------------- 879745bc899bSmrg# Minimum version: 1.1.0 879845bc899bSmrg# 879945bc899bSmrg# If you're using a macro added in Version 1.1 or newer, include this in 880045bc899bSmrg# your configure.ac with the minimum required version, such as: 880145bc899bSmrg# XORG_MACROS_VERSION(1.1) 880245bc899bSmrg# 88035592a31fSmrg# To ensure that this macro is defined, also add: 88045592a31fSmrg# m4_ifndef([XORG_MACROS_VERSION], 88055592a31fSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 880645bc899bSmrg# 880745bc899bSmrg# 880845bc899bSmrg# See the "minimum version" comment for each macro you use to see what 880945bc899bSmrg# version you require. 88105592a31fSmrgm4_defun([XORG_MACROS_VERSION],[ 8811b40a6198Smrgm4_define([vers_have], [1.17]) 88125592a31fSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 88135592a31fSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 88145592a31fSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 88155592a31fSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 88165592a31fSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 88175592a31fSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 88185592a31fSmrgm4_undefine([vers_have]) 88195592a31fSmrgm4_undefine([maj_have]) 88205592a31fSmrgm4_undefine([maj_needed]) 882145bc899bSmrg]) # XORG_MACROS_VERSION 882245bc899bSmrg 882345bc899bSmrg# XORG_PROG_RAWCPP() 882445bc899bSmrg# ------------------ 882545bc899bSmrg# Minimum version: 1.0.0 882645bc899bSmrg# 882745bc899bSmrg# Find cpp program and necessary flags for use in pre-processing text files 882845bc899bSmrg# such as man pages and config files 882945bc899bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 883045bc899bSmrgAC_REQUIRE([AC_PROG_CPP]) 883145bc899bSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 883245bc899bSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 883345bc899bSmrg 883445bc899bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 883545bc899bSmrg# which is not the best choice for supporting other OS'es, but covers most 883645bc899bSmrg# of the ones we need for now. 883745bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8838b40a6198SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 883945bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 884045bc899bSmrg AC_MSG_RESULT([no]) 884145bc899bSmrgelse 884245bc899bSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 884345bc899bSmrg RAWCPPFLAGS=-undef 884445bc899bSmrg AC_MSG_RESULT([yes]) 884550f2e948Smrg # under Cygwin unix is still defined even with -undef 884650f2e948Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 884750f2e948Smrg RAWCPPFLAGS="-undef -ansi" 884850f2e948Smrg AC_MSG_RESULT([yes, with -ansi]) 884945bc899bSmrg else 885045bc899bSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 885145bc899bSmrg fi 885245bc899bSmrgfi 885345bc899bSmrgrm -f conftest.$ac_ext 885445bc899bSmrg 885545bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8856b40a6198SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 885745bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 885845bc899bSmrg AC_MSG_RESULT([no]) 885945bc899bSmrgelse 886045bc899bSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 886145bc899bSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 886245bc899bSmrg AC_MSG_RESULT([yes]) 886345bc899bSmrg else 886445bc899bSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 886545bc899bSmrg fi 886645bc899bSmrgfi 886745bc899bSmrgrm -f conftest.$ac_ext 886845bc899bSmrgAC_SUBST(RAWCPPFLAGS) 886945bc899bSmrg]) # XORG_PROG_RAWCPP 887045bc899bSmrg 887145bc899bSmrg# XORG_MANPAGE_SECTIONS() 887245bc899bSmrg# ----------------------- 887345bc899bSmrg# Minimum version: 1.0.0 887445bc899bSmrg# 887545bc899bSmrg# Determine which sections man pages go in for the different man page types 887645bc899bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 887745bc899bSmrg# Not sure if there's any better way than just hardcoding by OS name. 887845bc899bSmrg# Override default settings by setting environment variables 8879b40a6198Smrg# Added MAN_SUBSTS in version 1.8 8880b40a6198Smrg# Added AC_PROG_SED in version 1.8 888145bc899bSmrg 888245bc899bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 888345bc899bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8884b40a6198SmrgAC_REQUIRE([AC_PROG_SED]) 888545bc899bSmrg 888645bc899bSmrgif test x$APP_MAN_SUFFIX = x ; then 888745bc899bSmrg APP_MAN_SUFFIX=1 888845bc899bSmrgfi 888945bc899bSmrgif test x$APP_MAN_DIR = x ; then 889045bc899bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 889145bc899bSmrgfi 889245bc899bSmrg 889345bc899bSmrgif test x$LIB_MAN_SUFFIX = x ; then 889445bc899bSmrg LIB_MAN_SUFFIX=3 889545bc899bSmrgfi 889645bc899bSmrgif test x$LIB_MAN_DIR = x ; then 889745bc899bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 889845bc899bSmrgfi 889945bc899bSmrg 890045bc899bSmrgif test x$FILE_MAN_SUFFIX = x ; then 890145bc899bSmrg case $host_os in 890245bc899bSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 890345bc899bSmrg *) FILE_MAN_SUFFIX=5 ;; 890445bc899bSmrg esac 890545bc899bSmrgfi 890645bc899bSmrgif test x$FILE_MAN_DIR = x ; then 890745bc899bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 890845bc899bSmrgfi 890945bc899bSmrg 891045bc899bSmrgif test x$MISC_MAN_SUFFIX = x ; then 891145bc899bSmrg case $host_os in 891245bc899bSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 891345bc899bSmrg *) MISC_MAN_SUFFIX=7 ;; 891445bc899bSmrg esac 891545bc899bSmrgfi 891645bc899bSmrgif test x$MISC_MAN_DIR = x ; then 891745bc899bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 891845bc899bSmrgfi 891945bc899bSmrg 892045bc899bSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 892145bc899bSmrg case $host_os in 892245bc899bSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 892345bc899bSmrg *) DRIVER_MAN_SUFFIX=4 ;; 892445bc899bSmrg esac 892545bc899bSmrgfi 892645bc899bSmrgif test x$DRIVER_MAN_DIR = x ; then 892745bc899bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 892845bc899bSmrgfi 892945bc899bSmrg 893045bc899bSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 893145bc899bSmrg case $host_os in 893245bc899bSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 893345bc899bSmrg *) ADMIN_MAN_SUFFIX=8 ;; 893445bc899bSmrg esac 893545bc899bSmrgfi 893645bc899bSmrgif test x$ADMIN_MAN_DIR = x ; then 893745bc899bSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 893845bc899bSmrgfi 893945bc899bSmrg 894045bc899bSmrg 894145bc899bSmrgAC_SUBST([APP_MAN_SUFFIX]) 894245bc899bSmrgAC_SUBST([LIB_MAN_SUFFIX]) 894345bc899bSmrgAC_SUBST([FILE_MAN_SUFFIX]) 894445bc899bSmrgAC_SUBST([MISC_MAN_SUFFIX]) 894545bc899bSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 894645bc899bSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 894745bc899bSmrgAC_SUBST([APP_MAN_DIR]) 894845bc899bSmrgAC_SUBST([LIB_MAN_DIR]) 894945bc899bSmrgAC_SUBST([FILE_MAN_DIR]) 895045bc899bSmrgAC_SUBST([MISC_MAN_DIR]) 895145bc899bSmrgAC_SUBST([DRIVER_MAN_DIR]) 895245bc899bSmrgAC_SUBST([ADMIN_MAN_DIR]) 8953b40a6198Smrg 8954b40a6198SmrgXORG_MAN_PAGE="X Version 11" 8955b40a6198SmrgAC_SUBST([XORG_MAN_PAGE]) 8956b40a6198SmrgMAN_SUBSTS="\ 8957b40a6198Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8958b40a6198Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8959b40a6198Smrg -e 's|__xservername__|Xorg|g' \ 8960b40a6198Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 8961b40a6198Smrg -e 's|__projectroot__|\$(prefix)|g' \ 8962b40a6198Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 8963b40a6198Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 8964b40a6198Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 8965b40a6198Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 8966b40a6198Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 8967b40a6198Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 8968b40a6198Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 8969b40a6198SmrgAC_SUBST([MAN_SUBSTS]) 8970b40a6198Smrg 897145bc899bSmrg]) # XORG_MANPAGE_SECTIONS 897245bc899bSmrg 8973b40a6198Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 8974b40a6198Smrg# ------------------------ 8975b40a6198Smrg# Minimum version: 1.7.0 8976b40a6198Smrg# 8977b40a6198Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 8978b40a6198Smrg# provided by xorg-sgml-doctools, if installed. 8979b40a6198SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 8980b40a6198SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 8981b40a6198SmrgXORG_SGML_PATH= 8982b40a6198SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 8983b40a6198Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 8984b40a6198Smrg [m4_ifval([$1],[:], 8985b40a6198Smrg [if test x"$cross_compiling" != x"yes" ; then 8986b40a6198Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 8987b40a6198Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 8988b40a6198Smrg fi]) 8989b40a6198Smrg ]) 8990b40a6198Smrg 8991b40a6198Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 8992b40a6198Smrg# the path and the name of the doc stylesheet 8993b40a6198Smrgif test "x$XORG_SGML_PATH" != "x" ; then 8994b40a6198Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 8995b40a6198Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 8996b40a6198Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 8997b40a6198Smrgelse 8998b40a6198Smrg AC_MSG_RESULT([no]) 8999b40a6198Smrgfi 9000b40a6198Smrg 9001b40a6198SmrgAC_SUBST(XORG_SGML_PATH) 9002b40a6198SmrgAC_SUBST(STYLESHEET_SRCDIR) 9003b40a6198SmrgAC_SUBST(XSL_STYLESHEET) 9004b40a6198SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9005b40a6198Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9006b40a6198Smrg 900745bc899bSmrg# XORG_CHECK_LINUXDOC 900845bc899bSmrg# ------------------- 900945bc899bSmrg# Minimum version: 1.0.0 901045bc899bSmrg# 901145bc899bSmrg# Defines the variable MAKE_TEXT if the necessary tools and 901245bc899bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 901345bc899bSmrg# Whether or not the necessary tools and files are found can be checked 901445bc899bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 901545bc899bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9016b40a6198SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9017b40a6198SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 901845bc899bSmrg 901945bc899bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 902045bc899bSmrg 9021b40a6198SmrgAC_MSG_CHECKING([whether to build documentation]) 902245bc899bSmrg 9023b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 902445bc899bSmrg BUILDDOC=yes 902545bc899bSmrgelse 902645bc899bSmrg BUILDDOC=no 902745bc899bSmrgfi 902845bc899bSmrg 902945bc899bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 903045bc899bSmrg 903145bc899bSmrgAC_MSG_RESULT([$BUILDDOC]) 903245bc899bSmrg 9033b40a6198SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 903445bc899bSmrg 9035b40a6198Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 903645bc899bSmrg BUILDPDFDOC=yes 903745bc899bSmrgelse 903845bc899bSmrg BUILDPDFDOC=no 903945bc899bSmrgfi 904045bc899bSmrg 904145bc899bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 904245bc899bSmrg 904345bc899bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 904445bc899bSmrg 9045b40a6198SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 904650f2e948SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 904745bc899bSmrgMAKE_PDF="$PS2PDF" 904850f2e948SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 904945bc899bSmrg 905045bc899bSmrgAC_SUBST(MAKE_TEXT) 905145bc899bSmrgAC_SUBST(MAKE_PS) 905245bc899bSmrgAC_SUBST(MAKE_PDF) 905345bc899bSmrgAC_SUBST(MAKE_HTML) 905445bc899bSmrg]) # XORG_CHECK_LINUXDOC 905545bc899bSmrg 905650f2e948Smrg# XORG_CHECK_DOCBOOK 905750f2e948Smrg# ------------------- 905850f2e948Smrg# Minimum version: 1.0.0 905950f2e948Smrg# 906050f2e948Smrg# Checks for the ability to build output formats from SGML DocBook source. 906150f2e948Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 906250f2e948Smrg# indicates whether the necessary tools and files are found and, if set, 906350f2e948Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 906450f2e948SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9065b40a6198SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9066b40a6198Smrg 906750f2e948SmrgBUILDTXTDOC=no 906850f2e948SmrgBUILDPDFDOC=no 906950f2e948SmrgBUILDPSDOC=no 907050f2e948SmrgBUILDHTMLDOC=no 907150f2e948Smrg 907250f2e948SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 907350f2e948SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 907450f2e948SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 907550f2e948SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 907650f2e948Smrg 9077b40a6198SmrgAC_MSG_CHECKING([whether to build text documentation]) 9078b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 907950f2e948Smrg test x$BUILD_TXTDOC != xno; then 908050f2e948Smrg BUILDTXTDOC=yes 908150f2e948Smrgfi 908250f2e948SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 908350f2e948SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 908450f2e948Smrg 9085b40a6198SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9086b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 908750f2e948Smrg test x$BUILD_PDFDOC != xno; then 908850f2e948Smrg BUILDPDFDOC=yes 908950f2e948Smrgfi 909050f2e948SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 909150f2e948SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 909250f2e948Smrg 9093b40a6198SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9094b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 909550f2e948Smrg test x$BUILD_PSDOC != xno; then 909650f2e948Smrg BUILDPSDOC=yes 909750f2e948Smrgfi 909850f2e948SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 909950f2e948SmrgAC_MSG_RESULT([$BUILDPSDOC]) 910050f2e948Smrg 9101b40a6198SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9102b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 910350f2e948Smrg test x$BUILD_HTMLDOC != xno; then 910450f2e948Smrg BUILDHTMLDOC=yes 910550f2e948Smrgfi 910650f2e948SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 910750f2e948SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 910850f2e948Smrg 910950f2e948SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 911050f2e948SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 911150f2e948SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 911250f2e948SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 911350f2e948Smrg 911450f2e948SmrgAC_SUBST(MAKE_TEXT) 911550f2e948SmrgAC_SUBST(MAKE_PS) 911650f2e948SmrgAC_SUBST(MAKE_PDF) 911750f2e948SmrgAC_SUBST(MAKE_HTML) 911850f2e948Smrg]) # XORG_CHECK_DOCBOOK 911950f2e948Smrg 9120b40a6198Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9121b40a6198Smrg# ---------------- 9122b40a6198Smrg# Minimum version: 1.5.0 9123b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9124b40a6198Smrg# 9125b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9126b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9127b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9128b40a6198Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9129b40a6198Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9130b40a6198Smrg# --with-xmlto assumes 'auto'. 9131b40a6198Smrg# 9132b40a6198Smrg# Interface to module: 9133b40a6198Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9134b40a6198Smrg# XMLTO: returns the path of the xmlto program found 9135b40a6198Smrg# returns the path set by the user in the environment 9136b40a6198Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9137b40a6198Smrg# 'no' user instructs the module not to use xmlto 9138b40a6198Smrg# 9139b40a6198Smrg# Added in version 1.10.0 9140b40a6198Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9141b40a6198Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9142b40a6198Smrg# 9143b40a6198Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9144b40a6198Smrg# 9145b40a6198SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9146b40a6198SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9147b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9148b40a6198SmrgAC_ARG_WITH(xmlto, 9149b40a6198Smrg AS_HELP_STRING([--with-xmlto], 9150b40a6198Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9151b40a6198Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9152b40a6198Smrgm4_undefine([_defopt]) 9153b40a6198Smrg 9154b40a6198Smrgif test "x$use_xmlto" = x"auto"; then 9155b40a6198Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9156b40a6198Smrg if test "x$XMLTO" = "x"; then 9157b40a6198Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9158b40a6198Smrg have_xmlto=no 9159b40a6198Smrg else 9160b40a6198Smrg have_xmlto=yes 9161b40a6198Smrg fi 9162b40a6198Smrgelif test "x$use_xmlto" = x"yes" ; then 9163b40a6198Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9164b40a6198Smrg if test "x$XMLTO" = "x"; then 9165b40a6198Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9166b40a6198Smrg fi 9167b40a6198Smrg have_xmlto=yes 9168b40a6198Smrgelif test "x$use_xmlto" = x"no" ; then 9169b40a6198Smrg if test "x$XMLTO" != "x"; then 9170b40a6198Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9171b40a6198Smrg fi 9172b40a6198Smrg have_xmlto=no 9173b40a6198Smrgelse 9174b40a6198Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9175b40a6198Smrgfi 9176b40a6198Smrg 9177b40a6198Smrg# Test for a minimum version of xmlto, if provided. 9178b40a6198Smrgm4_ifval([$1], 9179b40a6198Smrg[if test "$have_xmlto" = yes; then 9180b40a6198Smrg # scrape the xmlto version 9181b40a6198Smrg AC_MSG_CHECKING([the xmlto version]) 9182b40a6198Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9183b40a6198Smrg AC_MSG_RESULT([$xmlto_version]) 9184b40a6198Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9185b40a6198Smrg [if test "x$use_xmlto" = xauto; then 9186b40a6198Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9187b40a6198Smrg have_xmlto=no 9188b40a6198Smrg else 9189b40a6198Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9190b40a6198Smrg fi]) 9191b40a6198Smrgfi]) 9192b40a6198Smrg 9193b40a6198Smrg# Test for the ability of xmlto to generate a text target 9194b40a6198Smrghave_xmlto_text=no 9195b40a6198Smrgcat > conftest.xml << "EOF" 9196b40a6198SmrgEOF 9197b40a6198SmrgAS_IF([test "$have_xmlto" = yes], 9198b40a6198Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9199b40a6198Smrg [have_xmlto_text=yes], 9200b40a6198Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9201b40a6198Smrgrm -f conftest.xml 9202b40a6198SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9203b40a6198SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9204b40a6198Smrg]) # XORG_WITH_XMLTO 9205b40a6198Smrg 9206b40a6198Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9207b40a6198Smrg# -------------------------------------------- 9208b40a6198Smrg# Minimum version: 1.12.0 9209b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9210b40a6198Smrg# 9211b40a6198Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9212b40a6198Smrg# XML-based language used for the transformation of XML documents. 9213b40a6198Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9214b40a6198Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9215b40a6198Smrg# The XSLT processor is often used as a standalone tool for transformations. 9216b40a6198Smrg# It should not be assumed that this tool is used only to work with documnetation. 9217b40a6198Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9218b40a6198Smrg# 9219b40a6198Smrg# Interface to module: 9220b40a6198Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9221b40a6198Smrg# XSLTPROC: returns the path of the xsltproc program found 9222b40a6198Smrg# returns the path set by the user in the environment 9223b40a6198Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9224b40a6198Smrg# 'no' user instructs the module not to use xsltproc 9225b40a6198Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9226b40a6198Smrg# 9227b40a6198Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9228b40a6198Smrg# 9229b40a6198SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9230b40a6198SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9231b40a6198Smrg# Preserves the interface, should it be implemented later 9232b40a6198Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9233b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9234b40a6198SmrgAC_ARG_WITH(xsltproc, 9235b40a6198Smrg AS_HELP_STRING([--with-xsltproc], 9236b40a6198Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9237b40a6198Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9238b40a6198Smrgm4_undefine([_defopt]) 9239b40a6198Smrg 9240b40a6198Smrgif test "x$use_xsltproc" = x"auto"; then 9241b40a6198Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9242b40a6198Smrg if test "x$XSLTPROC" = "x"; then 9243b40a6198Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9244b40a6198Smrg have_xsltproc=no 9245b40a6198Smrg else 9246b40a6198Smrg have_xsltproc=yes 9247b40a6198Smrg fi 9248b40a6198Smrgelif test "x$use_xsltproc" = x"yes" ; then 9249b40a6198Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9250b40a6198Smrg if test "x$XSLTPROC" = "x"; then 9251b40a6198Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9252b40a6198Smrg fi 9253b40a6198Smrg have_xsltproc=yes 9254b40a6198Smrgelif test "x$use_xsltproc" = x"no" ; then 9255b40a6198Smrg if test "x$XSLTPROC" != "x"; then 9256b40a6198Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9257b40a6198Smrg fi 9258b40a6198Smrg have_xsltproc=no 9259b40a6198Smrgelse 9260b40a6198Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9261b40a6198Smrgfi 9262b40a6198Smrg 9263b40a6198SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9264b40a6198Smrg]) # XORG_WITH_XSLTPROC 9265b40a6198Smrg 9266b40a6198Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9267b40a6198Smrg# ---------------------------------------- 9268b40a6198Smrg# Minimum version: 1.15.0 9269b40a6198Smrg# 9270b40a6198Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9271b40a6198Smrg# scanning arbitrary text files, extracting information from those text files, 9272b40a6198Smrg# and printing reports based on that information. 9273b40a6198Smrg# 9274b40a6198Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9275b40a6198Smrg# 9276b40a6198Smrg# Interface to module: 9277b40a6198Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9278b40a6198Smrg# PERL: returns the path of the perl program found 9279b40a6198Smrg# returns the path set by the user in the environment 9280b40a6198Smrg# --with-perl: 'yes' user instructs the module to use perl 9281b40a6198Smrg# 'no' user instructs the module not to use perl 9282b40a6198Smrg# have_perl: returns yes if perl found in PATH or no 9283b40a6198Smrg# 9284b40a6198Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9285b40a6198Smrg# 9286b40a6198SmrgAC_DEFUN([XORG_WITH_PERL],[ 9287b40a6198SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9288b40a6198Smrg# Preserves the interface, should it be implemented later 9289b40a6198Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9290b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9291b40a6198SmrgAC_ARG_WITH(perl, 9292b40a6198Smrg AS_HELP_STRING([--with-perl], 9293b40a6198Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9294b40a6198Smrg [use_perl=$withval], [use_perl=]_defopt) 9295b40a6198Smrgm4_undefine([_defopt]) 9296b40a6198Smrg 9297b40a6198Smrgif test "x$use_perl" = x"auto"; then 9298b40a6198Smrg AC_PATH_PROG([PERL], [perl]) 9299b40a6198Smrg if test "x$PERL" = "x"; then 9300b40a6198Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9301b40a6198Smrg have_perl=no 9302b40a6198Smrg else 9303b40a6198Smrg have_perl=yes 9304b40a6198Smrg fi 9305b40a6198Smrgelif test "x$use_perl" = x"yes" ; then 9306b40a6198Smrg AC_PATH_PROG([PERL], [perl]) 9307b40a6198Smrg if test "x$PERL" = "x"; then 9308b40a6198Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9309b40a6198Smrg fi 9310b40a6198Smrg have_perl=yes 9311b40a6198Smrgelif test "x$use_perl" = x"no" ; then 9312b40a6198Smrg if test "x$PERL" != "x"; then 9313b40a6198Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9314b40a6198Smrg fi 9315b40a6198Smrg have_perl=no 9316b40a6198Smrgelse 9317b40a6198Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9318b40a6198Smrgfi 9319b40a6198Smrg 9320b40a6198SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9321b40a6198Smrg]) # XORG_WITH_PERL 9322b40a6198Smrg 9323b40a6198Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9324b40a6198Smrg# ---------------- 9325b40a6198Smrg# Minimum version: 1.5.0 9326b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9327b40a6198Smrg# 9328b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9329b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9330b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9331b40a6198Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9332b40a6198Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9333b40a6198Smrg# --with-asciidoc assumes 'auto'. 9334b40a6198Smrg# 9335b40a6198Smrg# Interface to module: 9336b40a6198Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9337b40a6198Smrg# ASCIIDOC: returns the path of the asciidoc program found 9338b40a6198Smrg# returns the path set by the user in the environment 9339b40a6198Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9340b40a6198Smrg# 'no' user instructs the module not to use asciidoc 9341b40a6198Smrg# 9342b40a6198Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9343b40a6198Smrg# 9344b40a6198SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9345b40a6198SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9346b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9347b40a6198SmrgAC_ARG_WITH(asciidoc, 9348b40a6198Smrg AS_HELP_STRING([--with-asciidoc], 9349b40a6198Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9350b40a6198Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9351b40a6198Smrgm4_undefine([_defopt]) 9352b40a6198Smrg 9353b40a6198Smrgif test "x$use_asciidoc" = x"auto"; then 9354b40a6198Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9355b40a6198Smrg if test "x$ASCIIDOC" = "x"; then 9356b40a6198Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9357b40a6198Smrg have_asciidoc=no 9358b40a6198Smrg else 9359b40a6198Smrg have_asciidoc=yes 9360b40a6198Smrg fi 9361b40a6198Smrgelif test "x$use_asciidoc" = x"yes" ; then 9362b40a6198Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9363b40a6198Smrg if test "x$ASCIIDOC" = "x"; then 9364b40a6198Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9365b40a6198Smrg fi 9366b40a6198Smrg have_asciidoc=yes 9367b40a6198Smrgelif test "x$use_asciidoc" = x"no" ; then 9368b40a6198Smrg if test "x$ASCIIDOC" != "x"; then 9369b40a6198Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9370b40a6198Smrg fi 9371b40a6198Smrg have_asciidoc=no 9372b40a6198Smrgelse 9373b40a6198Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9374b40a6198Smrgfi 9375b40a6198Smrgm4_ifval([$1], 9376b40a6198Smrg[if test "$have_asciidoc" = yes; then 9377b40a6198Smrg # scrape the asciidoc version 9378b40a6198Smrg AC_MSG_CHECKING([the asciidoc version]) 9379b40a6198Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9380b40a6198Smrg AC_MSG_RESULT([$asciidoc_version]) 9381b40a6198Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9382b40a6198Smrg [if test "x$use_asciidoc" = xauto; then 9383b40a6198Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9384b40a6198Smrg have_asciidoc=no 9385b40a6198Smrg else 9386b40a6198Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9387b40a6198Smrg fi]) 9388b40a6198Smrgfi]) 9389b40a6198SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9390b40a6198Smrg]) # XORG_WITH_ASCIIDOC 9391b40a6198Smrg 9392b40a6198Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9393b40a6198Smrg# -------------------------------- 9394b40a6198Smrg# Minimum version: 1.5.0 9395b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9396b40a6198Smrg# 9397b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9398b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9399b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9400b40a6198Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9401b40a6198Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9402b40a6198Smrg# --with-doxygen assumes 'auto'. 9403b40a6198Smrg# 9404b40a6198Smrg# Interface to module: 9405b40a6198Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9406b40a6198Smrg# DOXYGEN: returns the path of the doxygen program found 9407b40a6198Smrg# returns the path set by the user in the environment 9408b40a6198Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9409b40a6198Smrg# 'no' user instructs the module not to use doxygen 9410b40a6198Smrg# 9411b40a6198Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9412b40a6198Smrg# 9413b40a6198SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9414b40a6198SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9415b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9416b40a6198SmrgAC_ARG_WITH(doxygen, 9417b40a6198Smrg AS_HELP_STRING([--with-doxygen], 9418b40a6198Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9419b40a6198Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9420b40a6198Smrgm4_undefine([_defopt]) 9421b40a6198Smrg 9422b40a6198Smrgif test "x$use_doxygen" = x"auto"; then 9423b40a6198Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9424b40a6198Smrg if test "x$DOXYGEN" = "x"; then 9425b40a6198Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9426b40a6198Smrg have_doxygen=no 9427b40a6198Smrg else 9428b40a6198Smrg have_doxygen=yes 9429b40a6198Smrg fi 9430b40a6198Smrgelif test "x$use_doxygen" = x"yes" ; then 9431b40a6198Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9432b40a6198Smrg if test "x$DOXYGEN" = "x"; then 9433b40a6198Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9434b40a6198Smrg fi 9435b40a6198Smrg have_doxygen=yes 9436b40a6198Smrgelif test "x$use_doxygen" = x"no" ; then 9437b40a6198Smrg if test "x$DOXYGEN" != "x"; then 9438b40a6198Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9439b40a6198Smrg fi 9440b40a6198Smrg have_doxygen=no 9441b40a6198Smrgelse 9442b40a6198Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9443b40a6198Smrgfi 9444b40a6198Smrgm4_ifval([$1], 9445b40a6198Smrg[if test "$have_doxygen" = yes; then 9446b40a6198Smrg # scrape the doxygen version 9447b40a6198Smrg AC_MSG_CHECKING([the doxygen version]) 9448b40a6198Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9449b40a6198Smrg AC_MSG_RESULT([$doxygen_version]) 9450b40a6198Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9451b40a6198Smrg [if test "x$use_doxygen" = xauto; then 9452b40a6198Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9453b40a6198Smrg have_doxygen=no 9454b40a6198Smrg else 9455b40a6198Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9456b40a6198Smrg fi]) 9457b40a6198Smrgfi]) 9458b40a6198SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9459b40a6198Smrg]) # XORG_WITH_DOXYGEN 9460b40a6198Smrg 9461b40a6198Smrg# XORG_WITH_GROFF([DEFAULT]) 9462b40a6198Smrg# ---------------- 9463b40a6198Smrg# Minimum version: 1.6.0 9464b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9465b40a6198Smrg# 9466b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9467b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9468b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9469b40a6198Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 9470b40a6198Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 9471b40a6198Smrg# --with-groff assumes 'auto'. 9472b40a6198Smrg# 9473b40a6198Smrg# Interface to module: 9474b40a6198Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 9475b40a6198Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 9476b40a6198Smrg# HAVE_GROFF_MS: the -ms macros package 9477b40a6198Smrg# GROFF: returns the path of the groff program found 9478b40a6198Smrg# returns the path set by the user in the environment 9479b40a6198Smrg# --with-groff: 'yes' user instructs the module to use groff 9480b40a6198Smrg# 'no' user instructs the module not to use groff 9481b40a6198Smrg# 9482b40a6198Smrg# Added in version 1.9.0: 9483b40a6198Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9484b40a6198Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9485b40a6198Smrg# psselect from the psutils package. 9486b40a6198Smrg# the ghostcript package. Refer to the grohtml man pages 9487b40a6198Smrg# 9488b40a6198Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9489b40a6198Smrg# 9490b40a6198Smrg# OS and distros often splits groff in a basic and full package, the former 9491b40a6198Smrg# having the groff program and the later having devices, fonts and macros 9492b40a6198Smrg# Checking for the groff executable is not enough. 9493b40a6198Smrg# 9494b40a6198Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 9495b40a6198Smrg# unset HAVE_GROFF or GROFF env variables. 9496b40a6198Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9497b40a6198Smrg# 9498b40a6198SmrgAC_DEFUN([XORG_WITH_GROFF],[ 9499b40a6198SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9500b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 9501b40a6198SmrgAC_ARG_WITH(groff, 9502b40a6198Smrg AS_HELP_STRING([--with-groff], 9503b40a6198Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 9504b40a6198Smrg [use_groff=$withval], [use_groff=]_defopt) 9505b40a6198Smrgm4_undefine([_defopt]) 9506b40a6198Smrg 9507b40a6198Smrgif test "x$use_groff" = x"auto"; then 9508b40a6198Smrg AC_PATH_PROG([GROFF], [groff]) 9509b40a6198Smrg if test "x$GROFF" = "x"; then 9510b40a6198Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9511b40a6198Smrg have_groff=no 9512b40a6198Smrg else 9513b40a6198Smrg have_groff=yes 9514b40a6198Smrg fi 9515b40a6198Smrgelif test "x$use_groff" = x"yes" ; then 9516b40a6198Smrg AC_PATH_PROG([GROFF], [groff]) 9517b40a6198Smrg if test "x$GROFF" = "x"; then 9518b40a6198Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9519b40a6198Smrg fi 9520b40a6198Smrg have_groff=yes 9521b40a6198Smrgelif test "x$use_groff" = x"no" ; then 9522b40a6198Smrg if test "x$GROFF" != "x"; then 9523b40a6198Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9524b40a6198Smrg fi 9525b40a6198Smrg have_groff=no 9526b40a6198Smrgelse 9527b40a6198Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 9528b40a6198Smrgfi 9529b40a6198Smrg 9530b40a6198Smrg# We have groff, test for the presence of the macro packages 9531b40a6198Smrgif test "x$have_groff" = x"yes"; then 9532b40a6198Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 9533b40a6198Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 9534b40a6198Smrg groff_ms_works=yes 9535b40a6198Smrg else 9536b40a6198Smrg groff_ms_works=no 9537b40a6198Smrg fi 9538b40a6198Smrg AC_MSG_RESULT([$groff_ms_works]) 9539b40a6198Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 9540b40a6198Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 9541b40a6198Smrg groff_mm_works=yes 9542b40a6198Smrg else 9543b40a6198Smrg groff_mm_works=no 9544b40a6198Smrg fi 9545b40a6198Smrg AC_MSG_RESULT([$groff_mm_works]) 9546b40a6198Smrgfi 9547b40a6198Smrg 9548b40a6198Smrg# We have groff, test for HTML dependencies, one command per package 9549b40a6198Smrgif test "x$have_groff" = x"yes"; then 9550b40a6198Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 9551b40a6198Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 9552b40a6198Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 9553b40a6198Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 9554b40a6198Smrg have_groff_html=yes 9555b40a6198Smrg else 9556b40a6198Smrg have_groff_html=no 9557b40a6198Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 9558b40a6198Smrg fi 9559b40a6198Smrgfi 9560b40a6198Smrg 9561b40a6198Smrg# Set Automake conditionals for Makefiles 9562b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 9563b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 9564b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 9565b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 9566b40a6198Smrg]) # XORG_WITH_GROFF 9567b40a6198Smrg 9568b40a6198Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9569b40a6198Smrg# --------------------------------------- 9570b40a6198Smrg# Minimum version: 1.6.0 9571b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9572b40a6198Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 9573b40a6198Smrg# 9574b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9575b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9576b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9577b40a6198Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 9578b40a6198Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 9579b40a6198Smrg# --with-fop assumes 'auto'. 9580b40a6198Smrg# 9581b40a6198Smrg# Interface to module: 9582b40a6198Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 9583b40a6198Smrg# FOP: returns the path of the fop program found 9584b40a6198Smrg# returns the path set by the user in the environment 9585b40a6198Smrg# --with-fop: 'yes' user instructs the module to use fop 9586b40a6198Smrg# 'no' user instructs the module not to use fop 9587b40a6198Smrg# 9588b40a6198Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 9589b40a6198Smrg# 9590b40a6198SmrgAC_DEFUN([XORG_WITH_FOP],[ 9591b40a6198SmrgAC_ARG_VAR([FOP], [Path to fop command]) 9592b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9593b40a6198SmrgAC_ARG_WITH(fop, 9594b40a6198Smrg AS_HELP_STRING([--with-fop], 9595b40a6198Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 9596b40a6198Smrg [use_fop=$withval], [use_fop=]_defopt) 9597b40a6198Smrgm4_undefine([_defopt]) 9598b40a6198Smrg 9599b40a6198Smrgif test "x$use_fop" = x"auto"; then 9600b40a6198Smrg AC_PATH_PROG([FOP], [fop]) 9601b40a6198Smrg if test "x$FOP" = "x"; then 9602b40a6198Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 9603b40a6198Smrg have_fop=no 9604b40a6198Smrg else 9605b40a6198Smrg have_fop=yes 9606b40a6198Smrg fi 9607b40a6198Smrgelif test "x$use_fop" = x"yes" ; then 9608b40a6198Smrg AC_PATH_PROG([FOP], [fop]) 9609b40a6198Smrg if test "x$FOP" = "x"; then 9610b40a6198Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 9611b40a6198Smrg fi 9612b40a6198Smrg have_fop=yes 9613b40a6198Smrgelif test "x$use_fop" = x"no" ; then 9614b40a6198Smrg if test "x$FOP" != "x"; then 9615b40a6198Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 9616b40a6198Smrg fi 9617b40a6198Smrg have_fop=no 9618b40a6198Smrgelse 9619b40a6198Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9620b40a6198Smrgfi 9621b40a6198Smrg 9622b40a6198Smrg# Test for a minimum version of fop, if provided. 9623b40a6198Smrgm4_ifval([$1], 9624b40a6198Smrg[if test "$have_fop" = yes; then 9625b40a6198Smrg # scrape the fop version 9626b40a6198Smrg AC_MSG_CHECKING([for fop minimum version]) 9627b40a6198Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9628b40a6198Smrg AC_MSG_RESULT([$fop_version]) 9629b40a6198Smrg AS_VERSION_COMPARE([$fop_version], [$1], 9630b40a6198Smrg [if test "x$use_fop" = xauto; then 9631b40a6198Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9632b40a6198Smrg have_fop=no 9633b40a6198Smrg else 9634b40a6198Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9635b40a6198Smrg fi]) 9636b40a6198Smrgfi]) 9637b40a6198SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 9638b40a6198Smrg]) # XORG_WITH_FOP 9639b40a6198Smrg 9640b40a6198Smrg# XORG_WITH_PS2PDF([DEFAULT]) 9641b40a6198Smrg# ---------------- 9642b40a6198Smrg# Minimum version: 1.6.0 9643b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9644b40a6198Smrg# 9645b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9646b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9647b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9648b40a6198Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9649b40a6198Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 9650b40a6198Smrg# --with-ps2pdf assumes 'auto'. 9651b40a6198Smrg# 9652b40a6198Smrg# Interface to module: 9653b40a6198Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 9654b40a6198Smrg# PS2PDF: returns the path of the ps2pdf program found 9655b40a6198Smrg# returns the path set by the user in the environment 9656b40a6198Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 9657b40a6198Smrg# 'no' user instructs the module not to use ps2pdf 9658b40a6198Smrg# 9659b40a6198Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 9660b40a6198Smrg# 9661b40a6198SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 9662b40a6198SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9663b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 9664b40a6198SmrgAC_ARG_WITH(ps2pdf, 9665b40a6198Smrg AS_HELP_STRING([--with-ps2pdf], 9666b40a6198Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 9667b40a6198Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 9668b40a6198Smrgm4_undefine([_defopt]) 9669b40a6198Smrg 9670b40a6198Smrgif test "x$use_ps2pdf" = x"auto"; then 9671b40a6198Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9672b40a6198Smrg if test "x$PS2PDF" = "x"; then 9673b40a6198Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 9674b40a6198Smrg have_ps2pdf=no 9675b40a6198Smrg else 9676b40a6198Smrg have_ps2pdf=yes 9677b40a6198Smrg fi 9678b40a6198Smrgelif test "x$use_ps2pdf" = x"yes" ; then 9679b40a6198Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9680b40a6198Smrg if test "x$PS2PDF" = "x"; then 9681b40a6198Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 9682b40a6198Smrg fi 9683b40a6198Smrg have_ps2pdf=yes 9684b40a6198Smrgelif test "x$use_ps2pdf" = x"no" ; then 9685b40a6198Smrg if test "x$PS2PDF" != "x"; then 9686b40a6198Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 9687b40a6198Smrg fi 9688b40a6198Smrg have_ps2pdf=no 9689b40a6198Smrgelse 9690b40a6198Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 9691b40a6198Smrgfi 9692b40a6198SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 9693b40a6198Smrg]) # XORG_WITH_PS2PDF 9694b40a6198Smrg 9695b40a6198Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 9696b40a6198Smrg# ---------------- 9697b40a6198Smrg# Minimum version: 1.6.0 9698b40a6198Smrg# 9699b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9700b40a6198Smrg# not at the appropriate level. This macro enables a builder to skip all 9701b40a6198Smrg# documentation targets except traditional man pages. 9702b40a6198Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9703b40a6198Smrg# maximum flexibilty in controlling documentation building. 9704b40a6198Smrg# Refer to: 9705b40a6198Smrg# XORG_WITH_XMLTO --with-xmlto 9706b40a6198Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9707b40a6198Smrg# XORG_WITH_DOXYGEN --with-doxygen 9708b40a6198Smrg# XORG_WITH_FOP --with-fop 9709b40a6198Smrg# XORG_WITH_GROFF --with-groff 9710b40a6198Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9711b40a6198Smrg# 9712b40a6198Smrg# Interface to module: 9713b40a6198Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 9714b40a6198Smrg# --enable-docs: 'yes' user instructs the module to generate docs 9715b40a6198Smrg# 'no' user instructs the module not to generate docs 9716b40a6198Smrg# parm1: specify the default value, yes or no. 9717b40a6198Smrg# 9718b40a6198SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 9719b40a6198Smrgm4_define([docs_default], m4_default([$1], [yes])) 9720b40a6198SmrgAC_ARG_ENABLE(docs, 9721b40a6198Smrg AS_HELP_STRING([--enable-docs], 9722b40a6198Smrg [Enable building the documentation (default: ]docs_default[)]), 9723b40a6198Smrg [build_docs=$enableval], [build_docs=]docs_default) 9724b40a6198Smrgm4_undefine([docs_default]) 9725b40a6198SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 9726b40a6198SmrgAC_MSG_CHECKING([whether to build documentation]) 9727b40a6198SmrgAC_MSG_RESULT([$build_docs]) 9728b40a6198Smrg]) # XORG_ENABLE_DOCS 9729b40a6198Smrg 9730b40a6198Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 9731b40a6198Smrg# ---------------- 9732b40a6198Smrg# Minimum version: 1.6.0 9733b40a6198Smrg# 9734b40a6198Smrg# This macro enables a builder to skip all developer documentation. 9735b40a6198Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9736b40a6198Smrg# maximum flexibilty in controlling documentation building. 9737b40a6198Smrg# Refer to: 9738b40a6198Smrg# XORG_WITH_XMLTO --with-xmlto 9739b40a6198Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9740b40a6198Smrg# XORG_WITH_DOXYGEN --with-doxygen 9741b40a6198Smrg# XORG_WITH_FOP --with-fop 9742b40a6198Smrg# XORG_WITH_GROFF --with-groff 9743b40a6198Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9744b40a6198Smrg# 9745b40a6198Smrg# Interface to module: 9746b40a6198Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 9747b40a6198Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 9748b40a6198Smrg# 'no' user instructs the module not to generate developer docs 9749b40a6198Smrg# parm1: specify the default value, yes or no. 9750b40a6198Smrg# 9751b40a6198SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 9752b40a6198Smrgm4_define([devel_default], m4_default([$1], [yes])) 9753b40a6198SmrgAC_ARG_ENABLE(devel-docs, 9754b40a6198Smrg AS_HELP_STRING([--enable-devel-docs], 9755b40a6198Smrg [Enable building the developer documentation (default: ]devel_default[)]), 9756b40a6198Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 9757b40a6198Smrgm4_undefine([devel_default]) 9758b40a6198SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 9759b40a6198SmrgAC_MSG_CHECKING([whether to build developer documentation]) 9760b40a6198SmrgAC_MSG_RESULT([$build_devel_docs]) 9761b40a6198Smrg]) # XORG_ENABLE_DEVEL_DOCS 9762b40a6198Smrg 9763b40a6198Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 9764b40a6198Smrg# ---------------- 9765b40a6198Smrg# Minimum version: 1.6.0 9766b40a6198Smrg# 9767b40a6198Smrg# This macro enables a builder to skip all functional specification targets. 9768b40a6198Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9769b40a6198Smrg# maximum flexibilty in controlling documentation building. 9770b40a6198Smrg# Refer to: 9771b40a6198Smrg# XORG_WITH_XMLTO --with-xmlto 9772b40a6198Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9773b40a6198Smrg# XORG_WITH_DOXYGEN --with-doxygen 9774b40a6198Smrg# XORG_WITH_FOP --with-fop 9775b40a6198Smrg# XORG_WITH_GROFF --with-groff 9776b40a6198Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9777b40a6198Smrg# 9778b40a6198Smrg# Interface to module: 9779b40a6198Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 9780b40a6198Smrg# --enable-specs: 'yes' user instructs the module to generate specs 9781b40a6198Smrg# 'no' user instructs the module not to generate specs 9782b40a6198Smrg# parm1: specify the default value, yes or no. 9783b40a6198Smrg# 9784b40a6198SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 9785b40a6198Smrgm4_define([spec_default], m4_default([$1], [yes])) 9786b40a6198SmrgAC_ARG_ENABLE(specs, 9787b40a6198Smrg AS_HELP_STRING([--enable-specs], 9788b40a6198Smrg [Enable building the specs (default: ]spec_default[)]), 9789b40a6198Smrg [build_specs=$enableval], [build_specs=]spec_default) 9790b40a6198Smrgm4_undefine([spec_default]) 9791b40a6198SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 9792b40a6198SmrgAC_MSG_CHECKING([whether to build functional specifications]) 9793b40a6198SmrgAC_MSG_RESULT([$build_specs]) 9794b40a6198Smrg]) # XORG_ENABLE_SPECS 9795b40a6198Smrg 9796b40a6198Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9797b40a6198Smrg# ---------------------------------------------- 9798b40a6198Smrg# Minimum version: 1.13.0 9799b40a6198Smrg# 9800b40a6198Smrg# This macro enables a builder to enable/disable unit testing 9801b40a6198Smrg# It makes no assumption about the test cases implementation 9802b40a6198Smrg# Test cases may or may not use Automake "Support for test suites" 9803b40a6198Smrg# They may or may not use the software utility library GLib 9804b40a6198Smrg# 9805b40a6198Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9806b40a6198Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9807b40a6198Smrg# The variable enable_unit_tests is used by other macros in this file. 9808b40a6198Smrg# 9809b40a6198Smrg# Interface to module: 9810b40a6198Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9811b40a6198Smrg# enable_unit_tests: used in configure.ac for additional configuration 9812b40a6198Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 9813b40a6198Smrg# 'no' user instructs the module not to build tests 9814b40a6198Smrg# parm1: specify the default value, yes or no. 9815b40a6198Smrg# 9816b40a6198SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9817b40a6198SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 9818b40a6198SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 9819b40a6198SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9820b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 9821b40a6198SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9822b40a6198Smrg [Enable building unit test cases (default: ]_defopt[)]), 9823b40a6198Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9824b40a6198Smrgm4_undefine([_defopt]) 9825b40a6198SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9826b40a6198SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9827b40a6198SmrgAC_MSG_RESULT([$enable_unit_tests]) 9828b40a6198Smrg]) # XORG_ENABLE_UNIT_TESTS 9829b40a6198Smrg 9830b40a6198Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9831b40a6198Smrg# ------------------------------------------------------ 9832b40a6198Smrg# Minimum version: 1.17.0 9833b40a6198Smrg# 9834b40a6198Smrg# This macro enables a builder to enable/disable integration testing 9835b40a6198Smrg# It makes no assumption about the test cases' implementation 9836b40a6198Smrg# Test cases may or may not use Automake "Support for test suites" 9837b40a6198Smrg# 9838b40a6198Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9839b40a6198Smrg# usually requires less dependencies and may be built and run under less 9840b40a6198Smrg# stringent environments than integration tests. 9841b40a6198Smrg# 9842b40a6198Smrg# Interface to module: 9843b40a6198Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9844b40a6198Smrg# enable_integration_tests: used in configure.ac for additional configuration 9845b40a6198Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 9846b40a6198Smrg# 'no' user instructs the module not to build tests 9847b40a6198Smrg# parm1: specify the default value, yes or no. 9848b40a6198Smrg# 9849b40a6198SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9850b40a6198SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9851b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 9852b40a6198SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9853b40a6198Smrg [Enable building integration test cases (default: ]_defopt[)]), 9854b40a6198Smrg [enable_integration_tests=$enableval], 9855b40a6198Smrg [enable_integration_tests=]_defopt) 9856b40a6198Smrgm4_undefine([_defopt]) 9857b40a6198SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9858b40a6198Smrg [test "x$enable_integration_tests" != xno]) 9859b40a6198SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9860b40a6198SmrgAC_MSG_RESULT([$enable_integration_tests]) 9861b40a6198Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 9862b40a6198Smrg 9863b40a6198Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9864b40a6198Smrg# ---------------------------------------- 9865b40a6198Smrg# Minimum version: 1.13.0 9866b40a6198Smrg# 9867b40a6198Smrg# GLib is a library which provides advanced data structures and functions. 9868b40a6198Smrg# This macro enables a module to test for the presence of Glib. 9869b40a6198Smrg# 9870b40a6198Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9871b40a6198Smrg# Otherwise the value of $enable_unit_tests is blank. 9872b40a6198Smrg# 9873b40a6198Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9874b40a6198Smrg# test support usually requires less dependencies and may be built and run under 9875b40a6198Smrg# less stringent environments than integration tests. 9876b40a6198Smrg# 9877b40a6198Smrg# Interface to module: 9878b40a6198Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 9879b40a6198Smrg# with_glib: used in configure.ac to know if GLib has been found 9880b40a6198Smrg# --with-glib: 'yes' user instructs the module to use glib 9881b40a6198Smrg# 'no' user instructs the module not to use glib 9882b40a6198Smrg# 9883b40a6198SmrgAC_DEFUN([XORG_WITH_GLIB],[ 9884b40a6198SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9885b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9886b40a6198SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9887b40a6198Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 9888b40a6198Smrg [with_glib=$withval], [with_glib=]_defopt) 9889b40a6198Smrgm4_undefine([_defopt]) 9890b40a6198Smrg 9891b40a6198Smrghave_glib=no 9892b40a6198Smrg# Do not probe GLib if user explicitly disabled unit testing 9893b40a6198Smrgif test "x$enable_unit_tests" != x"no"; then 9894b40a6198Smrg # Do not probe GLib if user explicitly disabled it 9895b40a6198Smrg if test "x$with_glib" != x"no"; then 9896b40a6198Smrg m4_ifval( 9897b40a6198Smrg [$1], 9898b40a6198Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 9899b40a6198Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 9900b40a6198Smrg ) 9901b40a6198Smrg fi 9902b40a6198Smrgfi 9903b40a6198Smrg 9904b40a6198Smrg# Not having GLib when unit testing has been explicitly requested is an error 9905b40a6198Smrgif test "x$enable_unit_tests" = x"yes"; then 9906b40a6198Smrg if test "x$have_glib" = x"no"; then 9907b40a6198Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9908b40a6198Smrg fi 9909b40a6198Smrgfi 9910b40a6198Smrg 9911b40a6198Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 9912b40a6198Smrgif test "x$enable_unit_tests" = x"no"; then 9913b40a6198Smrg if test "x$with_glib" = x"yes"; then 9914b40a6198Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9915b40a6198Smrg fi 9916b40a6198Smrgfi 9917b40a6198Smrg 9918b40a6198Smrg# Not having GLib when it has been explicitly requested is an error 9919b40a6198Smrgif test "x$with_glib" = x"yes"; then 9920b40a6198Smrg if test "x$have_glib" = x"no"; then 9921b40a6198Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 9922b40a6198Smrg fi 9923b40a6198Smrgfi 9924b40a6198Smrg 9925b40a6198SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 9926b40a6198Smrg]) # XORG_WITH_GLIB 9927b40a6198Smrg 9928b40a6198Smrg# XORG_LD_WRAP([required|optional]) 9929b40a6198Smrg# --------------------------------- 9930b40a6198Smrg# Minimum version: 1.13.0 9931b40a6198Smrg# 9932b40a6198Smrg# Check if linker supports -wrap, passed via compiler flags 9933b40a6198Smrg# 9934b40a6198Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 9935b40a6198Smrg# Otherwise the value of $enable_unit_tests is blank. 9936b40a6198Smrg# 9937b40a6198Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 9938b40a6198Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 9939b40a6198Smrg# available, an argument of "optional" allows use when some unit tests require 9940b40a6198Smrg# ld -wrap and others do not. 9941b40a6198Smrg# 9942b40a6198SmrgAC_DEFUN([XORG_LD_WRAP],[ 9943b40a6198SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 9944b40a6198Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 9945b40a6198Smrg void __wrap_exit(int status) { return; }], 9946b40a6198Smrg [exit(0);])]) 9947b40a6198Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 9948b40a6198Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 9949b40a6198Smrg if test "x$have_ld_wrap" = x"no"; then 9950b40a6198Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 9951b40a6198Smrg fi 9952b40a6198Smrgfi 9953b40a6198SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 9954b40a6198Smrg# 9955b40a6198Smrg]) # XORG_LD_WRAP 9956b40a6198Smrg 9957b40a6198Smrg# XORG_CHECK_LINKER_FLAGS 9958b40a6198Smrg# ----------------------- 9959b40a6198Smrg# SYNOPSIS 9960b40a6198Smrg# 9961b40a6198Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 9962b40a6198Smrg# 9963b40a6198Smrg# DESCRIPTION 9964b40a6198Smrg# 9965b40a6198Smrg# Check whether the given linker FLAGS work with the current language's 9966b40a6198Smrg# linker, or whether they give an error. 9967b40a6198Smrg# 9968b40a6198Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 9969b40a6198Smrg# success/failure. 9970b40a6198Smrg# 9971b40a6198Smrg# PROGRAM-SOURCE is the program source to link with, if needed 9972b40a6198Smrg# 9973b40a6198Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 9974b40a6198Smrg# 9975b40a6198Smrg# LICENSE 9976b40a6198Smrg# 9977b40a6198Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 9978b40a6198Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 9979b40a6198Smrg# Copyright (c) 2009 Matteo Frigo 9980b40a6198Smrg# 9981b40a6198Smrg# This program is free software: you can redistribute it and/or modify it 9982b40a6198Smrg# under the terms of the GNU General Public License as published by the 9983b40a6198Smrg# Free Software Foundation, either version 3 of the License, or (at your 9984b40a6198Smrg# option) any later version. 9985b40a6198Smrg# 9986b40a6198Smrg# This program is distributed in the hope that it will be useful, but 9987b40a6198Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9988b40a6198Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 9989b40a6198Smrg# Public License for more details. 9990b40a6198Smrg# 9991b40a6198Smrg# You should have received a copy of the GNU General Public License along 9992b40a6198Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 9993b40a6198Smrg# 9994b40a6198Smrg# As a special exception, the respective Autoconf Macro's copyright owner 9995b40a6198Smrg# gives unlimited permission to copy, distribute and modify the configure 9996b40a6198Smrg# scripts that are the output of Autoconf when processing the Macro. You 9997b40a6198Smrg# need not follow the terms of the GNU General Public License when using 9998b40a6198Smrg# or distributing such scripts, even though portions of the text of the 9999b40a6198Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10000b40a6198Smrg# all other use of the material that constitutes the Autoconf Macro. 10001b40a6198Smrg# 10002b40a6198Smrg# This special exception to the GPL applies to versions of the Autoconf 10003b40a6198Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10004b40a6198Smrg# modified version of the Autoconf Macro, you may extend this special 10005b40a6198Smrg# exception to the GPL to apply to your modified version as well.# 10006b40a6198SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10007b40a6198Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10008b40a6198Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10009b40a6198SmrgAS_LITERAL_IF([$1], 10010b40a6198Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10011b40a6198Smrg ax_save_FLAGS=$LDFLAGS 10012b40a6198Smrg LDFLAGS="$1" 10013b40a6198Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10014b40a6198Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10015b40a6198Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10016b40a6198Smrg LDFLAGS=$ax_save_FLAGS])], 10017b40a6198Smrg [ax_save_FLAGS=$LDFLAGS 10018b40a6198Smrg LDFLAGS="$1" 10019b40a6198Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10020b40a6198Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10021b40a6198Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10022b40a6198Smrg LDFLAGS=$ax_save_FLAGS]) 10023b40a6198Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10024b40a6198SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10025b40a6198Smrgif test "x$xorg_check_linker_flags" = xyes; then 10026b40a6198Smrg m4_default([$2], :) 10027b40a6198Smrgelse 10028b40a6198Smrg m4_default([$3], :) 10029b40a6198Smrgfi 10030b40a6198Smrg]) # XORG_CHECK_LINKER_FLAGS 10031b40a6198Smrg 10032b40a6198Smrg# XORG_MEMORY_CHECK_FLAGS 10033b40a6198Smrg# ----------------------- 10034b40a6198Smrg# Minimum version: 1.16.0 10035b40a6198Smrg# 10036b40a6198Smrg# This macro attempts to find appropriate memory checking functionality 10037b40a6198Smrg# for various platforms which unit testing code may use to catch various 10038b40a6198Smrg# forms of memory allocation and access errors in testing. 10039b40a6198Smrg# 10040b40a6198Smrg# Interface to module: 10041b40a6198Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10042b40a6198Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10043b40a6198Smrg# 10044b40a6198Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10045b40a6198Smrg# 10046b40a6198SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10047b40a6198Smrg 10048b40a6198SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10049b40a6198SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10050b40a6198Smrg [Environment variables to enable memory checking in tests]) 10051b40a6198Smrg 10052b40a6198Smrg# Check for different types of support on different platforms 10053b40a6198Smrgcase $host_os in 10054b40a6198Smrg solaris*) 10055b40a6198Smrg AC_CHECK_LIB([umem], [umem_alloc], 10056b40a6198Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10057b40a6198Smrg ;; 10058b40a6198Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10059b40a6198Smrg # both directly and inverted, so should not be 0 or 255. 10060b40a6198Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10061b40a6198Smrg ;; 10062b40a6198Smrg darwin*) 10063b40a6198Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10064b40a6198Smrg ;; 10065b40a6198Smrg *bsd*) 10066b40a6198Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10067b40a6198Smrg ;; 10068b40a6198Smrgesac 10069b40a6198Smrg 10070b40a6198Smrg# User supplied flags override default flags 10071b40a6198Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10072b40a6198Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10073b40a6198Smrgfi 10074b40a6198Smrg 10075b40a6198SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10076b40a6198Smrg]) # XORG_WITH_LINT 10077b40a6198Smrg 1007845bc899bSmrg# XORG_CHECK_MALLOC_ZERO 1007945bc899bSmrg# ---------------------- 1008045bc899bSmrg# Minimum version: 1.0.0 1008145bc899bSmrg# 1008245bc899bSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1008345bc899bSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1008445bc899bSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1008545bc899bSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1008645bc899bSmrgAC_ARG_ENABLE(malloc0returnsnull, 100875592a31fSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 1008845bc899bSmrg [malloc(0) returns NULL (default: auto)]), 1008945bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1009045bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1009145bc899bSmrg 1009245bc899bSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1009345bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10094b40a6198Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10095b40a6198Smrg#include <stdlib.h> 10096b40a6198Smrg],[ 1009745bc899bSmrg char *m0, *r0, *c0, *p; 1009845bc899bSmrg m0 = malloc(0); 1009945bc899bSmrg p = malloc(10); 1010045bc899bSmrg r0 = realloc(p,0); 10101b40a6198Smrg c0 = calloc(0,10); 10102b40a6198Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10103b40a6198Smrg])], 1010445bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 10105b40a6198Smrg [MALLOC_ZERO_RETURNS_NULL=no], 10106b40a6198Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1010745bc899bSmrgfi 1010845bc899bSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1010945bc899bSmrg 1011045bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1011145bc899bSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1011245bc899bSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1011345bc899bSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1011445bc899bSmrgelse 1011545bc899bSmrg MALLOC_ZERO_CFLAGS="" 1011645bc899bSmrg XMALLOC_ZERO_CFLAGS="" 1011745bc899bSmrg XTMALLOC_ZERO_CFLAGS="" 1011845bc899bSmrgfi 1011945bc899bSmrg 1012045bc899bSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1012145bc899bSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1012245bc899bSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1012345bc899bSmrg]) # XORG_CHECK_MALLOC_ZERO 1012445bc899bSmrg 1012545bc899bSmrg# XORG_WITH_LINT() 1012645bc899bSmrg# ---------------- 1012745bc899bSmrg# Minimum version: 1.1.0 1012845bc899bSmrg# 10129b40a6198Smrg# This macro enables the use of a tool that flags some suspicious and 10130b40a6198Smrg# non-portable constructs (likely to be bugs) in C language source code. 10131b40a6198Smrg# It will attempt to locate the tool and use appropriate options. 10132b40a6198Smrg# There are various lint type tools on different platforms. 10133b40a6198Smrg# 10134b40a6198Smrg# Interface to module: 10135b40a6198Smrg# LINT: returns the path to the tool found on the platform 10136b40a6198Smrg# or the value set to LINT on the configure cmd line 10137b40a6198Smrg# also an Automake conditional 10138b40a6198Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10139b40a6198Smrg# 10140b40a6198Smrg# --with-lint: 'yes' user instructs the module to use lint 10141b40a6198Smrg# 'no' user instructs the module not to use lint (default) 10142b40a6198Smrg# 10143b40a6198Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10144b40a6198Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1014545bc899bSmrg# 1014645bc899bSmrgAC_DEFUN([XORG_WITH_LINT],[ 1014745bc899bSmrg 10148b40a6198SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10149b40a6198SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 101505592a31fSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1015145bc899bSmrg [Use a lint-style source code checker (default: disabled)])], 1015245bc899bSmrg [use_lint=$withval], [use_lint=no]) 10153b40a6198Smrg 10154b40a6198Smrg# Obtain platform specific info like program name and options 10155b40a6198Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10156b40a6198Smrgcase $host_os in 10157b40a6198Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10158b40a6198Smrg lint_name=splint 10159b40a6198Smrg lint_options="-badflag" 10160b40a6198Smrg ;; 10161b40a6198Smrg *freebsd* | *netbsd*) 10162b40a6198Smrg lint_name=lint 10163b40a6198Smrg lint_options="-u -b" 10164b40a6198Smrg ;; 10165b40a6198Smrg *solaris*) 10166b40a6198Smrg lint_name=lint 10167b40a6198Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10168b40a6198Smrg ;; 10169b40a6198Smrgesac 10170b40a6198Smrg 10171b40a6198Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10172b40a6198Smrgif test "x$use_lint" = x"yes" ; then 10173b40a6198Smrg AC_PATH_PROG([LINT], [$lint_name]) 10174b40a6198Smrg if test "x$LINT" = "x"; then 10175b40a6198Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10176b40a6198Smrg fi 10177b40a6198Smrgelif test "x$use_lint" = x"no" ; then 10178b40a6198Smrg if test "x$LINT" != "x"; then 10179b40a6198Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10180b40a6198Smrg fi 1018145bc899bSmrgelse 10182b40a6198Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1018345bc899bSmrgfi 10184b40a6198Smrg 10185b40a6198Smrg# User supplied flags override default flags 10186b40a6198Smrgif test "x$LINT_FLAGS" != "x"; then 10187b40a6198Smrg lint_options=$LINT_FLAGS 1018845bc899bSmrgfi 1018945bc899bSmrg 10190b40a6198SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10191b40a6198SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1019245bc899bSmrg 1019345bc899bSmrg]) # XORG_WITH_LINT 1019445bc899bSmrg 1019545bc899bSmrg# XORG_LINT_LIBRARY(LIBNAME) 1019645bc899bSmrg# -------------------------- 1019745bc899bSmrg# Minimum version: 1.1.0 1019845bc899bSmrg# 1019945bc899bSmrg# Sets up flags for building lint libraries for checking programs that call 1020045bc899bSmrg# functions in the library. 1020145bc899bSmrg# 10202b40a6198Smrg# Interface to module: 10203b40a6198Smrg# LINTLIB - Automake variable with the name of lint library file to make 10204b40a6198Smrg# MAKE_LINT_LIB - Automake conditional 10205b40a6198Smrg# 10206b40a6198Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10207b40a6198Smrg# - 'no' user instructs the module not to create a lint library (default) 1020845bc899bSmrg 1020945bc899bSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1021045bc899bSmrgAC_REQUIRE([XORG_WITH_LINT]) 102115592a31fSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1021245bc899bSmrg [Create lint library (default: disabled)])], 1021345bc899bSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10214b40a6198Smrg 10215b40a6198Smrgif test "x$make_lint_lib" = x"yes" ; then 10216b40a6198Smrg LINTLIB=llib-l$1.ln 10217b40a6198Smrg if test "x$LINT" = "x"; then 10218b40a6198Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10219b40a6198Smrg fi 10220b40a6198Smrgelif test "x$make_lint_lib" != x"no" ; then 10221b40a6198Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1022245bc899bSmrgfi 10223b40a6198Smrg 1022445bc899bSmrgAC_SUBST(LINTLIB) 1022545bc899bSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1022645bc899bSmrg 1022745bc899bSmrg]) # XORG_LINT_LIBRARY 1022845bc899bSmrg 10229b40a6198Smrg# XORG_COMPILER_BRAND 10230b40a6198Smrg# ------------------- 10231b40a6198Smrg# Minimum version: 1.14.0 10232b40a6198Smrg# 10233b40a6198Smrg# Checks for various brands of compilers and sets flags as appropriate: 10234b40a6198Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10235b40a6198Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10236b40a6198Smrg# clang compiler - sets CLANGCC to "yes" 10237b40a6198Smrg# Intel compiler - sets INTELCC to "yes" 10238b40a6198Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10239b40a6198Smrg# 10240b40a6198SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10241b40a6198SmrgAC_LANG_CASE( 10242b40a6198Smrg [C], [ 10243b40a6198Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10244b40a6198Smrg ], 10245b40a6198Smrg [C++], [ 10246b40a6198Smrg AC_REQUIRE([AC_PROG_CXX]) 10247b40a6198Smrg ] 10248b40a6198Smrg) 10249b40a6198SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10250b40a6198SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10251b40a6198SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10252b40a6198Smrg]) # XORG_COMPILER_BRAND 10253b40a6198Smrg 10254b40a6198Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10255b40a6198Smrg# --------------- 10256b40a6198Smrg# Minimum version: 1.16.0 10257b40a6198Smrg# 10258b40a6198Smrg# Test if the compiler works when passed the given flag as a command line argument. 10259b40a6198Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10260b40a6198Smrg# next flag in the list until there are no more options. 10261b40a6198Smrg# 10262b40a6198Smrg# Note that this does not guarantee that the compiler supports the flag as some 10263b40a6198Smrg# compilers will simply ignore arguments that they do not understand, but we do 10264b40a6198Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10265b40a6198Smrg# -Werror=unused-command-line-argument 10266b40a6198Smrg# 10267b40a6198SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10268b40a6198Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10269b40a6198Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10270b40a6198Smrg 10271b40a6198SmrgAC_LANG_COMPILER_REQUIRE 10272b40a6198Smrg 10273b40a6198SmrgAC_LANG_CASE( 10274b40a6198Smrg [C], [ 10275b40a6198Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10276b40a6198Smrg define([PREFIX], [C]) 10277b40a6198Smrg define([CACHE_PREFIX], [cc]) 10278b40a6198Smrg define([COMPILER], [$CC]) 10279b40a6198Smrg ], 10280b40a6198Smrg [C++], [ 10281b40a6198Smrg define([PREFIX], [CXX]) 10282b40a6198Smrg define([CACHE_PREFIX], [cxx]) 10283b40a6198Smrg define([COMPILER], [$CXX]) 10284b40a6198Smrg ] 10285b40a6198Smrg) 10286b40a6198Smrg 10287b40a6198Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10288b40a6198Smrg 10289b40a6198Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10290b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10291b40a6198Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10292b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10293b40a6198Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10294b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10295b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10296b40a6198Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10297b40a6198Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10298b40a6198Smrgfi 10299b40a6198Smrg 10300b40a6198Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10301b40a6198Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10302b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10303b40a6198Smrg fi 10304b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10305b40a6198Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10306b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10307b40a6198Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10308b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10309b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10310b40a6198Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10311b40a6198Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10312b40a6198Smrgfi 10313b40a6198Smrg 10314b40a6198Smrgfound="no" 10315b40a6198Smrgm4_foreach([flag], m4_cdr($@), [ 10316b40a6198Smrg if test $found = "no" ; then 10317b40a6198Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 10318b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10319b40a6198Smrg fi 10320b40a6198Smrg 10321b40a6198Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 10322b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10323b40a6198Smrg fi 10324b40a6198Smrg 10325b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10326b40a6198Smrg 10327b40a6198Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10328b40a6198Smrg AC_MSG_CHECKING([if ]COMPILER[ supports]flag[]) 10329b40a6198Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10330b40a6198Smrg AC_CACHE_VAL($cacheid, 10331b40a6198Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10332b40a6198Smrg [eval $cacheid=yes], 10333b40a6198Smrg [eval $cacheid=no])]) 10334b40a6198Smrg 10335b40a6198Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10336b40a6198Smrg 10337b40a6198Smrg eval supported=\$$cacheid 10338b40a6198Smrg AC_MSG_RESULT([$supported]) 10339b40a6198Smrg if test "$supported" = "yes" ; then 10340b40a6198Smrg $1="$$1 ]flag[" 10341b40a6198Smrg found="yes" 10342b40a6198Smrg fi 10343b40a6198Smrg fi 10344b40a6198Smrg]) 10345b40a6198Smrg]) # XORG_TESTSET_CFLAG 10346b40a6198Smrg 10347b40a6198Smrg# XORG_COMPILER_FLAGS 10348b40a6198Smrg# --------------- 10349b40a6198Smrg# Minimum version: 1.16.0 10350b40a6198Smrg# 10351b40a6198Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10352b40a6198Smrg# arguments supported by the selected compiler which do NOT alter the generated 10353b40a6198Smrg# code. These arguments will cause the compiler to print various warnings 10354b40a6198Smrg# during compilation AND turn a conservative set of warnings into errors. 10355b40a6198Smrg# 10356b40a6198Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10357b40a6198Smrg# future versions of util-macros as options are added to new compilers. 10358b40a6198Smrg# 10359b40a6198SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10360b40a6198SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10361b40a6198Smrg 10362b40a6198SmrgAC_ARG_ENABLE(selective-werror, 10363b40a6198Smrg AS_HELP_STRING([--disable-selective-werror], 10364b40a6198Smrg [Turn off selective compiler errors. (default: enabled)]), 10365b40a6198Smrg [SELECTIVE_WERROR=$enableval], 10366b40a6198Smrg [SELECTIVE_WERROR=yes]) 10367b40a6198Smrg 10368b40a6198SmrgAC_LANG_CASE( 10369b40a6198Smrg [C], [ 10370b40a6198Smrg define([PREFIX], [C]) 10371b40a6198Smrg ], 10372b40a6198Smrg [C++], [ 10373b40a6198Smrg define([PREFIX], [CXX]) 10374b40a6198Smrg ] 10375b40a6198Smrg) 10376b40a6198Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10377b40a6198Smrgif test "x$SUNCC" = "xyes"; then 10378b40a6198Smrg [BASE_]PREFIX[FLAGS]="-v" 10379b40a6198Smrgelse 10380b40a6198Smrg [BASE_]PREFIX[FLAGS]="" 10381b40a6198Smrgfi 10382b40a6198Smrg 10383b40a6198Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10384b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10385b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10386b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10387b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10388b40a6198Smrg 10389b40a6198SmrgAC_LANG_CASE( 10390b40a6198Smrg [C], [ 10391b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10392b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10393b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10394b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10395b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 10396b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10397b40a6198Smrg ] 10398b40a6198Smrg) 10399b40a6198Smrg 10400b40a6198Smrg# This chunk adds additional warnings that could catch undesired effects. 10401b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10402b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10403b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10404b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10405b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10406b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10407b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10408b40a6198Smrg 10409b40a6198Smrg# These are currently disabled because they are noisy. They will be enabled 10410b40a6198Smrg# in the future once the codebase is sufficiently modernized to silence 10411b40a6198Smrg# them. For now, I don't want them to drown out the other warnings. 10412b40a6198Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10413b40a6198Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10414b40a6198Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10415b40a6198Smrg 10416b40a6198Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10417b40a6198Smrg# when there are problems that should be fixed. 10418b40a6198Smrg 10419b40a6198Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10420b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10421b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10422b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10423b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10424b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10425b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10426b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10427b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10428b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10429b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10430b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10431b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10432b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10433b40a6198Smrgelse 10434b40a6198SmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors. This should not be necessary. Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT]) 10435b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10436b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10437b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10438b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10439b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10440b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10441b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10442b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10443b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10444b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10445b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10446b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10447b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10448b40a6198Smrgfi 10449b40a6198Smrg 10450b40a6198SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10451b40a6198Smrg]) # XORG_COMPILER_FLAGS 10452b40a6198Smrg 1045350f2e948Smrg# XORG_CWARNFLAGS 1045450f2e948Smrg# --------------- 1045550f2e948Smrg# Minimum version: 1.2.0 10456b40a6198Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1045750f2e948Smrg# 1045850f2e948Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1045950f2e948Smrg# 10460b40a6198Smrg# This function is deprecated because it defines -fno-strict-aliasing 10461b40a6198Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10462b40a6198Smrg# is needed, then it should be added explicitly in the module when 10463b40a6198Smrg# it is updated to use BASE_CFLAGS. 10464b40a6198Smrg# 1046550f2e948SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10466b40a6198SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10467b40a6198SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10468b40a6198SmrgAC_LANG_CASE( 10469b40a6198Smrg [C], [ 10470b40a6198Smrg CWARNFLAGS="$BASE_CFLAGS" 10471b40a6198Smrg if test "x$GCC" = xyes ; then 10472b40a6198Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10473b40a6198Smrg fi 10474b40a6198Smrg AC_SUBST(CWARNFLAGS) 10475b40a6198Smrg ] 10476b40a6198Smrg) 1047750f2e948Smrg]) # XORG_CWARNFLAGS 104785592a31fSmrg 104795592a31fSmrg# XORG_STRICT_OPTION 104805592a31fSmrg# ----------------------- 104815592a31fSmrg# Minimum version: 1.3.0 104825592a31fSmrg# 10483b40a6198Smrg# Add configure option to enable strict compilation flags, such as treating 10484b40a6198Smrg# warnings as fatal errors. 10485b40a6198Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10486b40a6198Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10487b40a6198Smrg# 10488b40a6198Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10489b40a6198Smrg# when strict compilation is unconditionally desired. 104905592a31fSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 104915592a31fSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10492b40a6198SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 104935592a31fSmrg 104945592a31fSmrgAC_ARG_ENABLE(strict-compilation, 104955592a31fSmrg AS_HELP_STRING([--enable-strict-compilation], 104965592a31fSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 104975592a31fSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10498b40a6198Smrg 10499b40a6198SmrgAC_LANG_CASE( 10500b40a6198Smrg [C], [ 10501b40a6198Smrg define([PREFIX], [C]) 10502b40a6198Smrg ], 10503b40a6198Smrg [C++], [ 10504b40a6198Smrg define([PREFIX], [CXX]) 10505b40a6198Smrg ] 10506b40a6198Smrg) 10507b40a6198Smrg 10508b40a6198Smrg[STRICT_]PREFIX[FLAGS]="" 10509b40a6198SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10510b40a6198SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10511b40a6198Smrg 10512b40a6198Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10513b40a6198Smrg# activate it with -Werror, so we add it here explicitly. 10514b40a6198SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10515b40a6198Smrg 105165592a31fSmrgif test "x$STRICT_COMPILE" = "xyes"; then 10517b40a6198Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10518b40a6198Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 105195592a31fSmrgfi 10520b40a6198SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10521b40a6198SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10522b40a6198SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 105235592a31fSmrg]) # XORG_STRICT_OPTION 105245592a31fSmrg 105255592a31fSmrg# XORG_DEFAULT_OPTIONS 105265592a31fSmrg# -------------------- 105275592a31fSmrg# Minimum version: 1.3.0 105285592a31fSmrg# 105295592a31fSmrg# Defines default options for X.Org modules. 105305592a31fSmrg# 105315592a31fSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10532b40a6198SmrgAC_REQUIRE([AC_PROG_INSTALL]) 10533b40a6198SmrgXORG_COMPILER_FLAGS 105345592a31fSmrgXORG_CWARNFLAGS 105355592a31fSmrgXORG_STRICT_OPTION 105365592a31fSmrgXORG_RELEASE_VERSION 105375592a31fSmrgXORG_CHANGELOG 105385592a31fSmrgXORG_INSTALL 105395592a31fSmrgXORG_MANPAGE_SECTIONS 10540b40a6198Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10541b40a6198Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 105425592a31fSmrg]) # XORG_DEFAULT_OPTIONS 105435592a31fSmrg 105445592a31fSmrg# XORG_INSTALL() 105455592a31fSmrg# ---------------- 105465592a31fSmrg# Minimum version: 1.4.0 105475592a31fSmrg# 105485592a31fSmrg# Defines the variable INSTALL_CMD as the command to copy 10549b40a6198Smrg# INSTALL from $prefix/share/util-macros. 105505592a31fSmrg# 105515592a31fSmrgAC_DEFUN([XORG_INSTALL], [ 105525592a31fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10553b40a6198Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 10554b40a6198SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 105555592a31fSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 105565592a31fSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 10557b40a6198Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 105585592a31fSmrgAC_SUBST([INSTALL_CMD]) 105595592a31fSmrg]) # XORG_INSTALL 1056050f2e948Smrgdnl Copyright 2005 Red Hat, Inc 1056150f2e948Smrgdnl 1056250f2e948Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1056350f2e948Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1056450f2e948Smrgdnl the above copyright notice appear in all copies and that both that 1056550f2e948Smrgdnl copyright notice and this permission notice appear in supporting 1056650f2e948Smrgdnl documentation. 1056750f2e948Smrgdnl 1056850f2e948Smrgdnl The above copyright notice and this permission notice shall be included 1056950f2e948Smrgdnl in all copies or substantial portions of the Software. 1057050f2e948Smrgdnl 1057150f2e948Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1057250f2e948Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1057350f2e948Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1057450f2e948Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1057550f2e948Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1057650f2e948Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1057750f2e948Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1057850f2e948Smrgdnl 1057950f2e948Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1058050f2e948Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1058150f2e948Smrgdnl other dealings in this Software without prior written authorization 1058250f2e948Smrgdnl from the copyright holders. 1058350f2e948Smrgdnl 1058450f2e948Smrg 1058550f2e948Smrg# XORG_RELEASE_VERSION 1058650f2e948Smrg# -------------------- 10587b40a6198Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1058850f2e948Smrg 1058950f2e948SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1059050f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1059150f2e948Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1059250f2e948Smrg [Major version of this package]) 1059350f2e948Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1059450f2e948Smrg if test "x$PVM" = "x"; then 1059550f2e948Smrg PVM="0" 1059650f2e948Smrg fi 1059750f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1059850f2e948Smrg [$PVM], 1059950f2e948Smrg [Minor version of this package]) 1060050f2e948Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1060150f2e948Smrg if test "x$PVP" = "x"; then 1060250f2e948Smrg PVP="0" 1060350f2e948Smrg fi 1060450f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1060550f2e948Smrg [$PVP], 1060650f2e948Smrg [Patch version of this package]) 1060750f2e948Smrg]) 1060850f2e948Smrg 1060950f2e948Smrg# XORG_CHANGELOG() 1061050f2e948Smrg# ---------------- 1061150f2e948Smrg# Minimum version: 1.2.0 1061250f2e948Smrg# 1061350f2e948Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1061450f2e948Smrg# ChangeLog from git. 1061550f2e948Smrg# 1061650f2e948Smrg# 1061750f2e948SmrgAC_DEFUN([XORG_CHANGELOG], [ 106185592a31fSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 106195592a31fSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 106205592a31fSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1062150f2e948Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1062250f2e948SmrgAC_SUBST([CHANGELOG_CMD]) 1062350f2e948Smrg]) # XORG_CHANGELOG 1062450f2e948Smrg 106255592a31fSmrgdnl Copyright 2005 Red Hat, Inc 106265592a31fSmrgdnl 106275592a31fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 106285592a31fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 106295592a31fSmrgdnl the above copyright notice appear in all copies and that both that 106305592a31fSmrgdnl copyright notice and this permission notice appear in supporting 106315592a31fSmrgdnl documentation. 106325592a31fSmrgdnl 106335592a31fSmrgdnl The above copyright notice and this permission notice shall be included 106345592a31fSmrgdnl in all copies or substantial portions of the Software. 106355592a31fSmrgdnl 106365592a31fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 106375592a31fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 106385592a31fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 106395592a31fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 106405592a31fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 106415592a31fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 106425592a31fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 106435592a31fSmrgdnl 106445592a31fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 106455592a31fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 106465592a31fSmrgdnl other dealings in this Software without prior written authorization 106475592a31fSmrgdnl from the copyright holders. 106485592a31fSmrgdnl 106495592a31fSmrg 106505592a31fSmrg# XORG_DRIVER_CHECK_EXT() 106515592a31fSmrg# -------------------------- 106525592a31fSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 106535592a31fSmrg# is defined, then add $1 to $REQUIRED_MODULES. 106545592a31fSmrg 106555592a31fSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 10656b40a6198Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 106575592a31fSmrg SAVE_CFLAGS="$CFLAGS" 10658b40a6198Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 106595592a31fSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 106605592a31fSmrg#include "xorg-server.h" 106615592a31fSmrg#if !defined $1 106625592a31fSmrg#error $1 not defined 106635592a31fSmrg#endif 106645592a31fSmrg ]])], 106655592a31fSmrg [_EXT_CHECK=yes], 106665592a31fSmrg [_EXT_CHECK=no]) 106675592a31fSmrg CFLAGS="$SAVE_CFLAGS" 106685592a31fSmrg AC_MSG_CHECKING([if $1 is defined]) 106695592a31fSmrg AC_MSG_RESULT([$_EXT_CHECK]) 106705592a31fSmrg if test "$_EXT_CHECK" != no; then 106715592a31fSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 106725592a31fSmrg fi 106735592a31fSmrg]) 106745592a31fSmrg 10675b40a6198Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 10676b40a6198Smrg# Foundation, Inc. 1067745bc899bSmrg# 1067845bc899bSmrg# This file is free software; the Free Software Foundation 1067945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1068045bc899bSmrg# with or without modifications, as long as this notice is preserved. 1068145bc899bSmrg 10682b40a6198Smrg# serial 1 10683b40a6198Smrg 1068445bc899bSmrg# AM_AUTOMAKE_VERSION(VERSION) 1068545bc899bSmrg# ---------------------------- 1068645bc899bSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1068745bc899bSmrg# generated from the m4 files accompanying Automake X.Y. 1068850f2e948Smrg# (This private macro should not be called outside this file.) 1068950f2e948SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 106903a925b30Smrg[am__api_version='1.11' 1069150f2e948Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1069250f2e948Smrgdnl require some minimum version. Point them to the right macro. 10693b40a6198Smrgm4_if([$1], [1.11.3], [], 1069450f2e948Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1069550f2e948Smrg]) 1069650f2e948Smrg 1069750f2e948Smrg# _AM_AUTOCONF_VERSION(VERSION) 1069850f2e948Smrg# ----------------------------- 1069950f2e948Smrg# aclocal traces this macro to find the Autoconf version. 1070050f2e948Smrg# This is a private macro too. Using m4_define simplifies 1070150f2e948Smrg# the logic in aclocal, which can simply ignore this definition. 1070250f2e948Smrgm4_define([_AM_AUTOCONF_VERSION], []) 1070345bc899bSmrg 1070445bc899bSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1070545bc899bSmrg# ------------------------------- 1070650f2e948Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1070750f2e948Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1070845bc899bSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10709b40a6198Smrg[AM_AUTOMAKE_VERSION([1.11.3])dnl 1071050f2e948Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1071150f2e948Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1071250f2e948Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1071345bc899bSmrg 1071445bc899bSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1071545bc899bSmrg 10716b40a6198Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 1071745bc899bSmrg# 1071845bc899bSmrg# This file is free software; the Free Software Foundation 1071945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1072045bc899bSmrg# with or without modifications, as long as this notice is preserved. 1072145bc899bSmrg 10722b40a6198Smrg# serial 1 10723b40a6198Smrg 1072445bc899bSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1072545bc899bSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 1072645bc899bSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 1072745bc899bSmrg# 1072845bc899bSmrg# Of course, Automake must honor this variable whenever it calls a 1072945bc899bSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 1073045bc899bSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 1073145bc899bSmrg# depending on how configure is run. This is pretty annoying, since 1073245bc899bSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1073345bc899bSmrg# source directory, any form will work fine, but in subdirectories a 1073445bc899bSmrg# relative path needs to be adjusted first. 1073545bc899bSmrg# 1073645bc899bSmrg# $ac_aux_dir/missing 1073745bc899bSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 1073845bc899bSmrg# $top_srcdir/$ac_aux_dir/missing 1073945bc899bSmrg# fails if $ac_aux_dir is absolute, 1074045bc899bSmrg# fails when called from a subdirectory in a VPATH build with 1074145bc899bSmrg# a relative $ac_aux_dir 1074245bc899bSmrg# 1074345bc899bSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1074445bc899bSmrg# are both prefixed by $srcdir. In an in-source build this is usually 1074545bc899bSmrg# harmless because $srcdir is `.', but things will broke when you 1074645bc899bSmrg# start a VPATH build or use an absolute $srcdir. 1074745bc899bSmrg# 1074845bc899bSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1074945bc899bSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1075045bc899bSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1075145bc899bSmrg# and then we would define $MISSING as 1075245bc899bSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 1075345bc899bSmrg# This will work as long as MISSING is not called from configure, because 1075445bc899bSmrg# unfortunately $(top_srcdir) has no meaning in configure. 1075545bc899bSmrg# However there are other variables, like CC, which are often used in 1075645bc899bSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1075745bc899bSmrg# 1075845bc899bSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1075945bc899bSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1076045bc899bSmrg# configured tree to be moved without reconfiguration. 1076145bc899bSmrg 1076245bc899bSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1076345bc899bSmrg[dnl Rely on autoconf to set up CDPATH properly. 1076445bc899bSmrgAC_PREREQ([2.50])dnl 1076545bc899bSmrg# expand $ac_aux_dir to an absolute path 1076645bc899bSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 1076745bc899bSmrg]) 1076845bc899bSmrg 1076945bc899bSmrg# AM_CONDITIONAL -*- Autoconf -*- 1077045bc899bSmrg 107713a925b30Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 1077245bc899bSmrg# Free Software Foundation, Inc. 1077345bc899bSmrg# 1077445bc899bSmrg# This file is free software; the Free Software Foundation 1077545bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1077645bc899bSmrg# with or without modifications, as long as this notice is preserved. 1077745bc899bSmrg 107783a925b30Smrg# serial 9 1077945bc899bSmrg 1078045bc899bSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1078145bc899bSmrg# ------------------------------------- 1078245bc899bSmrg# Define a conditional. 1078345bc899bSmrgAC_DEFUN([AM_CONDITIONAL], 1078445bc899bSmrg[AC_PREREQ(2.52)dnl 1078545bc899bSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1078645bc899bSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1078750f2e948SmrgAC_SUBST([$1_TRUE])dnl 1078850f2e948SmrgAC_SUBST([$1_FALSE])dnl 1078950f2e948Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1079050f2e948Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 107913a925b30Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1079245bc899bSmrgif $2; then 1079345bc899bSmrg $1_TRUE= 1079445bc899bSmrg $1_FALSE='#' 1079545bc899bSmrgelse 1079645bc899bSmrg $1_TRUE='#' 1079745bc899bSmrg $1_FALSE= 1079845bc899bSmrgfi 1079945bc899bSmrgAC_CONFIG_COMMANDS_PRE( 1080045bc899bSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1080145bc899bSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1080245bc899bSmrgUsually this means the macro was only invoked conditionally.]]) 1080345bc899bSmrgfi])]) 1080445bc899bSmrg 10805b40a6198Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 10806b40a6198Smrg# 2010, 2011 Free Software Foundation, Inc. 1080745bc899bSmrg# 1080845bc899bSmrg# This file is free software; the Free Software Foundation 1080945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1081045bc899bSmrg# with or without modifications, as long as this notice is preserved. 1081145bc899bSmrg 10812b40a6198Smrg# serial 12 1081345bc899bSmrg 1081445bc899bSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 1081545bc899bSmrg# written in clear, in which case automake, when reading aclocal.m4, 1081645bc899bSmrg# will think it sees a *use*, and therefore will trigger all it's 1081745bc899bSmrg# C support machinery. Also note that it means that autoscan, seeing 1081845bc899bSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1081945bc899bSmrg 1082045bc899bSmrg 1082145bc899bSmrg# _AM_DEPENDENCIES(NAME) 1082245bc899bSmrg# ---------------------- 1082345bc899bSmrg# See how the compiler implements dependency checking. 1082445bc899bSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 1082545bc899bSmrg# We try a few techniques and use that to set a single cache variable. 1082645bc899bSmrg# 1082745bc899bSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1082845bc899bSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1082945bc899bSmrg# dependency, and given that the user is not expected to run this macro, 1083045bc899bSmrg# just rely on AC_PROG_CC. 1083145bc899bSmrgAC_DEFUN([_AM_DEPENDENCIES], 1083245bc899bSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1083345bc899bSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1083445bc899bSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1083545bc899bSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1083645bc899bSmrg 1083745bc899bSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 1083845bc899bSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 1083945bc899bSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1084050f2e948Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 1084145bc899bSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1084245bc899bSmrg [depcc="$$1" am_compiler_list=]) 1084345bc899bSmrg 1084445bc899bSmrgAC_CACHE_CHECK([dependency style of $depcc], 1084545bc899bSmrg [am_cv_$1_dependencies_compiler_type], 1084645bc899bSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1084745bc899bSmrg # We make a subdir and do the tests there. Otherwise we can end up 1084845bc899bSmrg # making bogus files that we don't know about and never remove. For 1084945bc899bSmrg # instance it was reported that on HP-UX the gcc test will end up 1085045bc899bSmrg # making a dummy file named `D' -- because `-MD' means `put the output 1085145bc899bSmrg # in D'. 10852b40a6198Smrg rm -rf conftest.dir 1085345bc899bSmrg mkdir conftest.dir 1085445bc899bSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 1085545bc899bSmrg # using a relative directory. 1085645bc899bSmrg cp "$am_depcomp" conftest.dir 1085745bc899bSmrg cd conftest.dir 1085845bc899bSmrg # We will build objects and dependencies in a subdirectory because 1085945bc899bSmrg # it helps to detect inapplicable dependency modes. For instance 1086045bc899bSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 1086145bc899bSmrg # side effect of compilation, but ICC will put the dependencies in 1086245bc899bSmrg # the current directory while Tru64 will put them in the object 1086345bc899bSmrg # directory. 1086445bc899bSmrg mkdir sub 1086545bc899bSmrg 1086645bc899bSmrg am_cv_$1_dependencies_compiler_type=none 1086745bc899bSmrg if test "$am_compiler_list" = ""; then 1086845bc899bSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1086945bc899bSmrg fi 108703a925b30Smrg am__universal=false 108713a925b30Smrg m4_case([$1], [CC], 108723a925b30Smrg [case " $depcc " in #( 108733a925b30Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 108743a925b30Smrg esac], 108753a925b30Smrg [CXX], 108763a925b30Smrg [case " $depcc " in #( 108773a925b30Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 108783a925b30Smrg esac]) 108793a925b30Smrg 1088045bc899bSmrg for depmode in $am_compiler_list; do 1088145bc899bSmrg # Setup a source with many dependencies, because some compilers 1088245bc899bSmrg # like to wrap large dependency lists on column 80 (with \), and 1088345bc899bSmrg # we should not choose a depcomp mode which is confused by this. 1088445bc899bSmrg # 1088545bc899bSmrg # We need to recreate these files for each test, as the compiler may 1088645bc899bSmrg # overwrite some of them when testing with obscure command lines. 1088745bc899bSmrg # This happens at least with the AIX C compiler. 1088845bc899bSmrg : > sub/conftest.c 1088945bc899bSmrg for i in 1 2 3 4 5 6; do 1089045bc899bSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 1089145bc899bSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 1089245bc899bSmrg # Solaris 8's {/usr,}/bin/sh. 1089345bc899bSmrg touch sub/conftst$i.h 1089445bc899bSmrg done 1089545bc899bSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1089645bc899bSmrg 108973a925b30Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 108983a925b30Smrg # mode. It turns out that the SunPro C++ compiler does not properly 108993a925b30Smrg # handle `-M -o', and we need to detect this. Also, some Intel 109003a925b30Smrg # versions had trouble with output in subdirs 109013a925b30Smrg am__obj=sub/conftest.${OBJEXT-o} 109023a925b30Smrg am__minus_obj="-o $am__obj" 1090345bc899bSmrg case $depmode in 109043a925b30Smrg gcc) 109053a925b30Smrg # This depmode causes a compiler race in universal mode. 109063a925b30Smrg test "$am__universal" = false || continue 109073a925b30Smrg ;; 1090845bc899bSmrg nosideeffect) 1090945bc899bSmrg # after this tag, mechanisms are not by side-effect, so they'll 1091045bc899bSmrg # only be used when explicitly requested 1091145bc899bSmrg if test "x$enable_dependency_tracking" = xyes; then 1091245bc899bSmrg continue 1091345bc899bSmrg else 1091445bc899bSmrg break 1091545bc899bSmrg fi 1091645bc899bSmrg ;; 10917b40a6198Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 109183a925b30Smrg # This compiler won't grok `-c -o', but also, the minuso test has 109193a925b30Smrg # not run yet. These depmodes are late enough in the game, and 109203a925b30Smrg # so weak that their functioning should not be impacted. 109213a925b30Smrg am__obj=conftest.${OBJEXT-o} 109223a925b30Smrg am__minus_obj= 109233a925b30Smrg ;; 1092445bc899bSmrg none) break ;; 1092545bc899bSmrg esac 1092645bc899bSmrg if depmode=$depmode \ 109273a925b30Smrg source=sub/conftest.c object=$am__obj \ 1092845bc899bSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 109293a925b30Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1093045bc899bSmrg >/dev/null 2>conftest.err && 1093150f2e948Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1093245bc899bSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 109333a925b30Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1093445bc899bSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1093545bc899bSmrg # icc doesn't choke on unknown options, it will just issue warnings 1093645bc899bSmrg # or remarks (even with -Werror). So we grep stderr for any message 1093745bc899bSmrg # that says an option was ignored or not supported. 1093845bc899bSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 1093945bc899bSmrg # icc: Command line warning: ignoring option '-M'; no argument required 1094045bc899bSmrg # The diagnosis changed in icc 8.0: 1094145bc899bSmrg # icc: Command line remark: option '-MP' not supported 1094245bc899bSmrg if (grep 'ignoring option' conftest.err || 1094345bc899bSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1094445bc899bSmrg am_cv_$1_dependencies_compiler_type=$depmode 1094545bc899bSmrg break 1094645bc899bSmrg fi 1094745bc899bSmrg fi 1094845bc899bSmrg done 1094945bc899bSmrg 1095045bc899bSmrg cd .. 1095145bc899bSmrg rm -rf conftest.dir 1095245bc899bSmrgelse 1095345bc899bSmrg am_cv_$1_dependencies_compiler_type=none 1095445bc899bSmrgfi 1095545bc899bSmrg]) 1095645bc899bSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1095745bc899bSmrgAM_CONDITIONAL([am__fastdep$1], [ 1095845bc899bSmrg test "x$enable_dependency_tracking" != xno \ 1095945bc899bSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1096045bc899bSmrg]) 1096145bc899bSmrg 1096245bc899bSmrg 1096345bc899bSmrg# AM_SET_DEPDIR 1096445bc899bSmrg# ------------- 1096545bc899bSmrg# Choose a directory name for dependency files. 1096645bc899bSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 1096745bc899bSmrgAC_DEFUN([AM_SET_DEPDIR], 1096845bc899bSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1096945bc899bSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1097045bc899bSmrg]) 1097145bc899bSmrg 1097245bc899bSmrg 1097345bc899bSmrg# AM_DEP_TRACK 1097445bc899bSmrg# ------------ 1097545bc899bSmrgAC_DEFUN([AM_DEP_TRACK], 1097645bc899bSmrg[AC_ARG_ENABLE(dependency-tracking, 1097745bc899bSmrg[ --disable-dependency-tracking speeds up one-time build 1097845bc899bSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 1097945bc899bSmrgif test "x$enable_dependency_tracking" != xno; then 1098045bc899bSmrg am_depcomp="$ac_aux_dir/depcomp" 1098145bc899bSmrg AMDEPBACKSLASH='\' 10982b40a6198Smrg am__nodep='_no' 1098345bc899bSmrgfi 1098445bc899bSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1098550f2e948SmrgAC_SUBST([AMDEPBACKSLASH])dnl 1098650f2e948Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 10987b40a6198SmrgAC_SUBST([am__nodep])dnl 10988b40a6198Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 1098945bc899bSmrg]) 1099045bc899bSmrg 1099145bc899bSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1099245bc899bSmrg 1099350f2e948Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 1099445bc899bSmrg# Free Software Foundation, Inc. 1099545bc899bSmrg# 1099645bc899bSmrg# This file is free software; the Free Software Foundation 1099745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1099845bc899bSmrg# with or without modifications, as long as this notice is preserved. 1099945bc899bSmrg 110003a925b30Smrg#serial 5 1100145bc899bSmrg 1100245bc899bSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 1100345bc899bSmrg# ------------------------------ 1100445bc899bSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 110053a925b30Smrg[{ 110063a925b30Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 110073a925b30Smrg # are listed without --file. Let's play safe and only enable the eval 110083a925b30Smrg # if we detect the quoting. 110093a925b30Smrg case $CONFIG_FILES in 110103a925b30Smrg *\'*) eval set x "$CONFIG_FILES" ;; 110113a925b30Smrg *) set x $CONFIG_FILES ;; 110123a925b30Smrg esac 110133a925b30Smrg shift 110143a925b30Smrg for mf 110153a925b30Smrg do 110163a925b30Smrg # Strip MF so we end up with the name of the file. 110173a925b30Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 110183a925b30Smrg # Check whether this is an Automake generated Makefile or not. 110193a925b30Smrg # We used to match only the files named `Makefile.in', but 110203a925b30Smrg # some people rename them; so instead we look at the file content. 110213a925b30Smrg # Grep'ing the first line is not enough: some people post-process 110223a925b30Smrg # each Makefile.in and add a new line on top of each file to say so. 110233a925b30Smrg # Grep'ing the whole file is not good either: AIX grep has a line 110243a925b30Smrg # limit of 2048, but all sed's we know have understand at least 4000. 110253a925b30Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 110263a925b30Smrg dirpart=`AS_DIRNAME("$mf")` 110273a925b30Smrg else 110283a925b30Smrg continue 110293a925b30Smrg fi 110303a925b30Smrg # Extract the definition of DEPDIR, am__include, and am__quote 110313a925b30Smrg # from the Makefile without running `make'. 110323a925b30Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 110333a925b30Smrg test -z "$DEPDIR" && continue 110343a925b30Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 110353a925b30Smrg test -z "am__include" && continue 110363a925b30Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 110373a925b30Smrg # When using ansi2knr, U may be empty or an underscore; expand it 110383a925b30Smrg U=`sed -n 's/^U = //p' < "$mf"` 110393a925b30Smrg # Find all dependency output files, they are included files with 110403a925b30Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 110413a925b30Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 110423a925b30Smrg # expansion. 110433a925b30Smrg for file in `sed -n " 110443a925b30Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 110453a925b30Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 110463a925b30Smrg # Make sure the directory exists. 110473a925b30Smrg test -f "$dirpart/$file" && continue 110483a925b30Smrg fdir=`AS_DIRNAME(["$file"])` 110493a925b30Smrg AS_MKDIR_P([$dirpart/$fdir]) 110503a925b30Smrg # echo "creating $dirpart/$file" 110513a925b30Smrg echo '# dummy' > "$dirpart/$file" 110523a925b30Smrg done 1105345bc899bSmrg done 110543a925b30Smrg} 1105545bc899bSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1105645bc899bSmrg 1105745bc899bSmrg 1105845bc899bSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 1105945bc899bSmrg# ----------------------------- 1106045bc899bSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 1106145bc899bSmrg# 1106245bc899bSmrg# This code is only required when automatic dependency tracking 1106345bc899bSmrg# is enabled. FIXME. This creates each `.P' file that we will 1106445bc899bSmrg# need in order to bootstrap the dependency handling code. 1106545bc899bSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1106645bc899bSmrg[AC_CONFIG_COMMANDS([depfiles], 1106745bc899bSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1106845bc899bSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1106945bc899bSmrg]) 1107045bc899bSmrg 1107145bc899bSmrg# Do all the work for Automake. -*- Autoconf -*- 1107245bc899bSmrg 1107350f2e948Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 110743a925b30Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 1107545bc899bSmrg# 1107645bc899bSmrg# This file is free software; the Free Software Foundation 1107745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1107845bc899bSmrg# with or without modifications, as long as this notice is preserved. 1107945bc899bSmrg 110803a925b30Smrg# serial 16 1108145bc899bSmrg 1108245bc899bSmrg# This macro actually does too much. Some checks are only needed if 1108345bc899bSmrg# your package does certain things. But this isn't really a big deal. 1108445bc899bSmrg 1108545bc899bSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1108645bc899bSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 1108745bc899bSmrg# ----------------------------------------------- 1108845bc899bSmrg# The call with PACKAGE and VERSION arguments is the old style 1108945bc899bSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 1109045bc899bSmrg# and VERSION should now be passed to AC_INIT and removed from 1109145bc899bSmrg# the call to AM_INIT_AUTOMAKE. 1109245bc899bSmrg# We support both call styles for the transition. After 1109345bc899bSmrg# the next Automake release, Autoconf can make the AC_INIT 1109445bc899bSmrg# arguments mandatory, and then we can depend on a new Autoconf 1109545bc899bSmrg# release and drop the old call support. 1109645bc899bSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 110973a925b30Smrg[AC_PREREQ([2.62])dnl 1109845bc899bSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 1109945bc899bSmrgdnl the ones we care about. 1110045bc899bSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1110145bc899bSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1110245bc899bSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 1110350f2e948Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 1110450f2e948Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1110550f2e948Smrg # is not polluted with repeated "-I." 1110650f2e948Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1110750f2e948Smrg # test to see if srcdir already configured 1110850f2e948Smrg if test -f $srcdir/config.status; then 1110950f2e948Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1111050f2e948Smrg fi 1111145bc899bSmrgfi 1111245bc899bSmrg 1111345bc899bSmrg# test whether we have cygpath 1111445bc899bSmrgif test -z "$CYGPATH_W"; then 1111545bc899bSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 1111645bc899bSmrg CYGPATH_W='cygpath -w' 1111745bc899bSmrg else 1111845bc899bSmrg CYGPATH_W=echo 1111945bc899bSmrg fi 1112045bc899bSmrgfi 1112145bc899bSmrgAC_SUBST([CYGPATH_W]) 1112245bc899bSmrg 1112345bc899bSmrg# Define the identity of the package. 1112445bc899bSmrgdnl Distinguish between old-style and new-style calls. 1112545bc899bSmrgm4_ifval([$2], 1112645bc899bSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1112745bc899bSmrg AC_SUBST([PACKAGE], [$1])dnl 1112845bc899bSmrg AC_SUBST([VERSION], [$2])], 1112945bc899bSmrg[_AM_SET_OPTIONS([$1])dnl 1113050f2e948Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1113150f2e948Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 1113250f2e948Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1113345bc899bSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1113445bc899bSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1113545bc899bSmrg 1113645bc899bSmrg_AM_IF_OPTION([no-define],, 1113745bc899bSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 1113845bc899bSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 1113945bc899bSmrg 1114045bc899bSmrg# Some tools Automake needs. 1114145bc899bSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 1114245bc899bSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 1114345bc899bSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 1114445bc899bSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 1114545bc899bSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 1114645bc899bSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 1114745bc899bSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 111483a925b30SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 111493a925b30SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1115045bc899bSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 1115145bc899bSmrg# We need awk for the "check" target. The system "awk" is bad on 1115245bc899bSmrg# some platforms. 1115345bc899bSmrgAC_REQUIRE([AC_PROG_AWK])dnl 1115445bc899bSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1115545bc899bSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1115645bc899bSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 111573a925b30Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 111583a925b30Smrg [_AM_PROG_TAR([v7])])]) 1115945bc899bSmrg_AM_IF_OPTION([no-dependencies],, 1116045bc899bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 111613a925b30Smrg [_AM_DEPENDENCIES(CC)], 111623a925b30Smrg [define([AC_PROG_CC], 111633a925b30Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 1116445bc899bSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 111653a925b30Smrg [_AM_DEPENDENCIES(CXX)], 111663a925b30Smrg [define([AC_PROG_CXX], 111673a925b30Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1116850f2e948SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 111693a925b30Smrg [_AM_DEPENDENCIES(OBJC)], 111703a925b30Smrg [define([AC_PROG_OBJC], 111713a925b30Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 1117245bc899bSmrg]) 111733a925b30Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 111743a925b30Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 111753a925b30Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 111763a925b30Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 111773a925b30SmrgAC_CONFIG_COMMANDS_PRE(dnl 111783a925b30Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 111793a925b30Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1118045bc899bSmrg]) 1118145bc899bSmrg 111823a925b30Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 111833a925b30Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 111843a925b30Smrgdnl mangled by Autoconf and run in a shell conditional statement. 111853a925b30Smrgm4_define([_AC_COMPILER_EXEEXT], 111863a925b30Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 111873a925b30Smrg 1118845bc899bSmrg 1118945bc899bSmrg# When config.status generates a header, we must update the stamp-h file. 1119045bc899bSmrg# This file resides in the same directory as the config header 1119145bc899bSmrg# that is generated. The stamp files are numbered to have different names. 1119245bc899bSmrg 1119345bc899bSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1119445bc899bSmrg# loop where config.status creates the headers, so we can generate 1119545bc899bSmrg# our stamp files there. 1119645bc899bSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1119745bc899bSmrg[# Compute $1's index in $config_headers. 1119850f2e948Smrg_am_arg=$1 1119945bc899bSmrg_am_stamp_count=1 1120045bc899bSmrgfor _am_header in $config_headers :; do 1120145bc899bSmrg case $_am_header in 1120250f2e948Smrg $_am_arg | $_am_arg:* ) 1120345bc899bSmrg break ;; 1120445bc899bSmrg * ) 1120545bc899bSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1120645bc899bSmrg esac 1120745bc899bSmrgdone 1120850f2e948Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1120945bc899bSmrg 11210b40a6198Smrg# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 11211b40a6198Smrg# Inc. 1121245bc899bSmrg# 1121345bc899bSmrg# This file is free software; the Free Software Foundation 1121445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1121545bc899bSmrg# with or without modifications, as long as this notice is preserved. 1121645bc899bSmrg 11217b40a6198Smrg# serial 1 11218b40a6198Smrg 1121945bc899bSmrg# AM_PROG_INSTALL_SH 1122045bc899bSmrg# ------------------ 1122145bc899bSmrg# Define $install_sh. 1122245bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 1122345bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 112243a925b30Smrgif test x"${install_sh}" != xset; then 112253a925b30Smrg case $am_aux_dir in 112263a925b30Smrg *\ * | *\ *) 112273a925b30Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 112283a925b30Smrg *) 112293a925b30Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 112303a925b30Smrg esac 112313a925b30Smrgfi 1123245bc899bSmrgAC_SUBST(install_sh)]) 1123345bc899bSmrg 1123445bc899bSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 1123545bc899bSmrg# 1123645bc899bSmrg# This file is free software; the Free Software Foundation 1123745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1123845bc899bSmrg# with or without modifications, as long as this notice is preserved. 1123945bc899bSmrg 1124045bc899bSmrg# serial 2 1124145bc899bSmrg 1124245bc899bSmrg# Check whether the underlying file-system supports filenames 1124345bc899bSmrg# with a leading dot. For instance MS-DOS doesn't. 1124445bc899bSmrgAC_DEFUN([AM_SET_LEADING_DOT], 1124545bc899bSmrg[rm -rf .tst 2>/dev/null 1124645bc899bSmrgmkdir .tst 2>/dev/null 1124745bc899bSmrgif test -d .tst; then 1124845bc899bSmrg am__leading_dot=. 1124945bc899bSmrgelse 1125045bc899bSmrg am__leading_dot=_ 1125145bc899bSmrgfi 1125245bc899bSmrgrmdir .tst 2>/dev/null 1125345bc899bSmrgAC_SUBST([am__leading_dot])]) 1125445bc899bSmrg 1125545bc899bSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 1125645bc899bSmrg# From Jim Meyering 1125745bc899bSmrg 11258b40a6198Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 11259b40a6198Smrg# 2011 Free Software Foundation, Inc. 1126045bc899bSmrg# 1126145bc899bSmrg# This file is free software; the Free Software Foundation 1126245bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1126345bc899bSmrg# with or without modifications, as long as this notice is preserved. 1126445bc899bSmrg 112653a925b30Smrg# serial 5 1126645bc899bSmrg 112673a925b30Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 112683a925b30Smrg# ---------------------------------- 112693a925b30Smrg# Control maintainer-specific portions of Makefiles. 112703a925b30Smrg# Default is to disable them, unless `enable' is passed literally. 112713a925b30Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 112723a925b30Smrg# can override the default with the --enable/--disable switch. 1127345bc899bSmrgAC_DEFUN([AM_MAINTAINER_MODE], 112743a925b30Smrg[m4_case(m4_default([$1], [disable]), 112753a925b30Smrg [enable], [m4_define([am_maintainer_other], [disable])], 112763a925b30Smrg [disable], [m4_define([am_maintainer_other], [enable])], 112773a925b30Smrg [m4_define([am_maintainer_other], [enable]) 112783a925b30Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11279b40a6198SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 112803a925b30Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 112813a925b30Smrg AC_ARG_ENABLE([maintainer-mode], 112823a925b30Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 1128345bc899bSmrg (and sometimes confusing) to the casual installer], 112843a925b30Smrg [USE_MAINTAINER_MODE=$enableval], 112853a925b30Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 1128645bc899bSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 112873a925b30Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 1128845bc899bSmrg MAINT=$MAINTAINER_MODE_TRUE 112893a925b30Smrg AC_SUBST([MAINT])dnl 1129045bc899bSmrg] 1129145bc899bSmrg) 1129245bc899bSmrg 1129345bc899bSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 1129445bc899bSmrg 1129545bc899bSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1129645bc899bSmrg 112973a925b30Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 1129845bc899bSmrg# 1129945bc899bSmrg# This file is free software; the Free Software Foundation 1130045bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1130145bc899bSmrg# with or without modifications, as long as this notice is preserved. 1130245bc899bSmrg 113033a925b30Smrg# serial 4 1130445bc899bSmrg 1130545bc899bSmrg# AM_MAKE_INCLUDE() 1130645bc899bSmrg# ----------------- 1130745bc899bSmrg# Check to see how make treats includes. 1130845bc899bSmrgAC_DEFUN([AM_MAKE_INCLUDE], 1130945bc899bSmrg[am_make=${MAKE-make} 1131045bc899bSmrgcat > confinc << 'END' 1131145bc899bSmrgam__doit: 113123a925b30Smrg @echo this is the am__doit target 1131345bc899bSmrg.PHONY: am__doit 1131445bc899bSmrgEND 1131545bc899bSmrg# If we don't find an include directive, just comment out the code. 1131645bc899bSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 1131745bc899bSmrgam__include="#" 1131845bc899bSmrgam__quote= 1131945bc899bSmrg_am_result=none 1132045bc899bSmrg# First try GNU make style include. 1132145bc899bSmrgecho "include confinc" > confmf 113223a925b30Smrg# Ignore all kinds of additional output from `make'. 113233a925b30Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 113243a925b30Smrg*the\ am__doit\ target*) 113253a925b30Smrg am__include=include 113263a925b30Smrg am__quote= 113273a925b30Smrg _am_result=GNU 113283a925b30Smrg ;; 113293a925b30Smrgesac 1133045bc899bSmrg# Now try BSD make style include. 1133145bc899bSmrgif test "$am__include" = "#"; then 1133245bc899bSmrg echo '.include "confinc"' > confmf 113333a925b30Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 113343a925b30Smrg *the\ am__doit\ target*) 113353a925b30Smrg am__include=.include 113363a925b30Smrg am__quote="\"" 113373a925b30Smrg _am_result=BSD 113383a925b30Smrg ;; 113393a925b30Smrg esac 1134045bc899bSmrgfi 1134145bc899bSmrgAC_SUBST([am__include]) 1134245bc899bSmrgAC_SUBST([am__quote]) 1134345bc899bSmrgAC_MSG_RESULT([$_am_result]) 1134445bc899bSmrgrm -f confinc confmf 1134545bc899bSmrg]) 1134645bc899bSmrg 1134745bc899bSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1134845bc899bSmrg 113493a925b30Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 1135045bc899bSmrg# Free Software Foundation, Inc. 1135145bc899bSmrg# 1135245bc899bSmrg# This file is free software; the Free Software Foundation 1135345bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1135445bc899bSmrg# with or without modifications, as long as this notice is preserved. 1135545bc899bSmrg 113563a925b30Smrg# serial 6 1135745bc899bSmrg 1135845bc899bSmrg# AM_MISSING_PROG(NAME, PROGRAM) 1135945bc899bSmrg# ------------------------------ 1136045bc899bSmrgAC_DEFUN([AM_MISSING_PROG], 1136145bc899bSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1136245bc899bSmrg$1=${$1-"${am_missing_run}$2"} 1136345bc899bSmrgAC_SUBST($1)]) 1136445bc899bSmrg 1136545bc899bSmrg 1136645bc899bSmrg# AM_MISSING_HAS_RUN 1136745bc899bSmrg# ------------------ 1136845bc899bSmrg# Define MISSING if not defined so far and test if it supports --run. 1136945bc899bSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 1137045bc899bSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1137145bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1137250f2e948SmrgAC_REQUIRE_AUX_FILE([missing])dnl 113733a925b30Smrgif test x"${MISSING+set}" != xset; then 113743a925b30Smrg case $am_aux_dir in 113753a925b30Smrg *\ * | *\ *) 113763a925b30Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 113773a925b30Smrg *) 113783a925b30Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 113793a925b30Smrg esac 113803a925b30Smrgfi 1138145bc899bSmrg# Use eval to expand $SHELL 1138245bc899bSmrgif eval "$MISSING --run true"; then 1138345bc899bSmrg am_missing_run="$MISSING --run " 1138445bc899bSmrgelse 1138545bc899bSmrg am_missing_run= 1138645bc899bSmrg AC_MSG_WARN([`missing' script is too old or missing]) 1138745bc899bSmrgfi 1138845bc899bSmrg]) 1138945bc899bSmrg 11390b40a6198Smrg# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 11391b40a6198Smrg# Inc. 1139245bc899bSmrg# 1139345bc899bSmrg# This file is free software; the Free Software Foundation 1139445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1139545bc899bSmrg# with or without modifications, as long as this notice is preserved. 1139645bc899bSmrg 11397b40a6198Smrg# serial 1 11398b40a6198Smrg 1139945bc899bSmrg# AM_PROG_MKDIR_P 1140045bc899bSmrg# --------------- 1140150f2e948Smrg# Check for `mkdir -p'. 1140245bc899bSmrgAC_DEFUN([AM_PROG_MKDIR_P], 1140350f2e948Smrg[AC_PREREQ([2.60])dnl 1140450f2e948SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1140550f2e948Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1140650f2e948Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 1140750f2e948Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1140850f2e948Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1140950f2e948Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 1141050f2e948Smrgdnl adjustment using top_builddir (which is defined more often than 1141150f2e948Smrgdnl MKDIR_P). 1141250f2e948SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1141350f2e948Smrgcase $mkdir_p in 1141450f2e948Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 1141550f2e948Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1141650f2e948Smrgesac 1141750f2e948Smrg]) 1141845bc899bSmrg 1141945bc899bSmrg# Helper functions for option handling. -*- Autoconf -*- 1142045bc899bSmrg 11421b40a6198Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 11422b40a6198Smrg# Foundation, Inc. 1142345bc899bSmrg# 1142445bc899bSmrg# This file is free software; the Free Software Foundation 1142545bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1142645bc899bSmrg# with or without modifications, as long as this notice is preserved. 1142745bc899bSmrg 11428b40a6198Smrg# serial 5 1142945bc899bSmrg 1143045bc899bSmrg# _AM_MANGLE_OPTION(NAME) 1143145bc899bSmrg# ----------------------- 1143245bc899bSmrgAC_DEFUN([_AM_MANGLE_OPTION], 1143345bc899bSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1143445bc899bSmrg 1143545bc899bSmrg# _AM_SET_OPTION(NAME) 11436b40a6198Smrg# -------------------- 1143745bc899bSmrg# Set option NAME. Presently that only means defining a flag for this option. 1143845bc899bSmrgAC_DEFUN([_AM_SET_OPTION], 1143945bc899bSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 1144045bc899bSmrg 1144145bc899bSmrg# _AM_SET_OPTIONS(OPTIONS) 11442b40a6198Smrg# ------------------------ 1144345bc899bSmrg# OPTIONS is a space-separated list of Automake options. 1144445bc899bSmrgAC_DEFUN([_AM_SET_OPTIONS], 1144550f2e948Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1144645bc899bSmrg 1144745bc899bSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1144845bc899bSmrg# ------------------------------------------- 1144945bc899bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1145045bc899bSmrgAC_DEFUN([_AM_IF_OPTION], 1145145bc899bSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1145245bc899bSmrg 1145345bc899bSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1145445bc899bSmrg 114553a925b30Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 1145645bc899bSmrg# Free Software Foundation, Inc. 1145745bc899bSmrg# 1145845bc899bSmrg# This file is free software; the Free Software Foundation 1145945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1146045bc899bSmrg# with or without modifications, as long as this notice is preserved. 1146145bc899bSmrg 114623a925b30Smrg# serial 5 1146345bc899bSmrg 1146445bc899bSmrg# AM_SANITY_CHECK 1146545bc899bSmrg# --------------- 1146645bc899bSmrgAC_DEFUN([AM_SANITY_CHECK], 1146745bc899bSmrg[AC_MSG_CHECKING([whether build environment is sane]) 1146845bc899bSmrg# Just in case 1146945bc899bSmrgsleep 1 1147045bc899bSmrgecho timestamp > conftest.file 114713a925b30Smrg# Reject unsafe characters in $srcdir or the absolute working directory 114723a925b30Smrg# name. Accept space and tab only in the latter. 114733a925b30Smrgam_lf=' 114743a925b30Smrg' 114753a925b30Smrgcase `pwd` in 114763a925b30Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 114773a925b30Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 114783a925b30Smrgesac 114793a925b30Smrgcase $srcdir in 114803a925b30Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 114813a925b30Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 114823a925b30Smrgesac 114833a925b30Smrg 1148445bc899bSmrg# Do `set' in a subshell so we don't clobber the current shell's 1148545bc899bSmrg# arguments. Must try -L first in case configure is actually a 1148645bc899bSmrg# symlink; some systems play weird games with the mod time of symlinks 1148745bc899bSmrg# (eg FreeBSD returns the mod time of the symlink's containing 1148845bc899bSmrg# directory). 1148945bc899bSmrgif ( 114903a925b30Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1149145bc899bSmrg if test "$[*]" = "X"; then 1149245bc899bSmrg # -L didn't work. 114933a925b30Smrg set X `ls -t "$srcdir/configure" conftest.file` 1149445bc899bSmrg fi 1149545bc899bSmrg rm -f conftest.file 1149645bc899bSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1149745bc899bSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1149845bc899bSmrg 1149945bc899bSmrg # If neither matched, then we have a broken ls. This can happen 1150045bc899bSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1150145bc899bSmrg # broken ls alias from the environment. This has actually 1150245bc899bSmrg # happened. Such a system could not be considered "sane". 1150345bc899bSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1150445bc899bSmrgalias in your environment]) 1150545bc899bSmrg fi 1150645bc899bSmrg 1150745bc899bSmrg test "$[2]" = conftest.file 1150845bc899bSmrg ) 1150945bc899bSmrgthen 1151045bc899bSmrg # Ok. 1151145bc899bSmrg : 1151245bc899bSmrgelse 1151345bc899bSmrg AC_MSG_ERROR([newly created file is older than distributed files! 1151445bc899bSmrgCheck your system clock]) 1151545bc899bSmrgfi 1151645bc899bSmrgAC_MSG_RESULT(yes)]) 1151745bc899bSmrg 11518b40a6198Smrg# Copyright (C) 2009, 2011 Free Software Foundation, Inc. 115195592a31fSmrg# 115205592a31fSmrg# This file is free software; the Free Software Foundation 115215592a31fSmrg# gives unlimited permission to copy and/or distribute it, 115225592a31fSmrg# with or without modifications, as long as this notice is preserved. 115235592a31fSmrg 11524b40a6198Smrg# serial 2 115255592a31fSmrg 115265592a31fSmrg# AM_SILENT_RULES([DEFAULT]) 115275592a31fSmrg# -------------------------- 115285592a31fSmrg# Enable less verbose build rules; with the default set to DEFAULT 115295592a31fSmrg# (`yes' being less verbose, `no' or empty being verbose). 115305592a31fSmrgAC_DEFUN([AM_SILENT_RULES], 115315592a31fSmrg[AC_ARG_ENABLE([silent-rules], 115325592a31fSmrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 115335592a31fSmrg --disable-silent-rules verbose build output (undo: `make V=0')]) 115345592a31fSmrgcase $enable_silent_rules in 115355592a31fSmrgyes) AM_DEFAULT_VERBOSITY=0;; 115365592a31fSmrgno) AM_DEFAULT_VERBOSITY=1;; 115375592a31fSmrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 115385592a31fSmrgesac 11539b40a6198Smrgdnl 11540b40a6198Smrgdnl A few `make' implementations (e.g., NonStop OS and NextStep) 11541b40a6198Smrgdnl do not support nested variable expansions. 11542b40a6198Smrgdnl See automake bug#9928 and bug#10237. 11543b40a6198Smrgam_make=${MAKE-make} 11544b40a6198SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11545b40a6198Smrg [am_cv_make_support_nested_variables], 11546b40a6198Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11547b40a6198SmrgBAR0=false 11548b40a6198SmrgBAR1=true 11549b40a6198SmrgV=1 11550b40a6198Smrgam__doit: 11551b40a6198Smrg @$(TRUE) 11552b40a6198Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11553b40a6198Smrg am_cv_make_support_nested_variables=yes 11554b40a6198Smrgelse 11555b40a6198Smrg am_cv_make_support_nested_variables=no 11556b40a6198Smrgfi]) 11557b40a6198Smrgif test $am_cv_make_support_nested_variables = yes; then 11558b40a6198Smrg dnl Using `$V' instead of `$(V)' breaks IRIX make. 11559b40a6198Smrg AM_V='$(V)' 11560b40a6198Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11561b40a6198Smrgelse 11562b40a6198Smrg AM_V=$AM_DEFAULT_VERBOSITY 11563b40a6198Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11564b40a6198Smrgfi 11565b40a6198SmrgAC_SUBST([AM_V])dnl 11566b40a6198SmrgAM_SUBST_NOTMAKE([AM_V])dnl 11567b40a6198SmrgAC_SUBST([AM_DEFAULT_V])dnl 11568b40a6198SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 115695592a31fSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 115705592a31fSmrgAM_BACKSLASH='\' 115715592a31fSmrgAC_SUBST([AM_BACKSLASH])dnl 115725592a31fSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 115735592a31fSmrg]) 115745592a31fSmrg 11575b40a6198Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 1157645bc899bSmrg# 1157745bc899bSmrg# This file is free software; the Free Software Foundation 1157845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1157945bc899bSmrg# with or without modifications, as long as this notice is preserved. 1158045bc899bSmrg 11581b40a6198Smrg# serial 1 11582b40a6198Smrg 1158345bc899bSmrg# AM_PROG_INSTALL_STRIP 1158445bc899bSmrg# --------------------- 1158545bc899bSmrg# One issue with vendor `install' (even GNU) is that you can't 1158645bc899bSmrg# specify the program used to strip binaries. This is especially 1158745bc899bSmrg# annoying in cross-compiling environments, where the build's strip 1158845bc899bSmrg# is unlikely to handle the host's binaries. 1158945bc899bSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1159045bc899bSmrg# always use install-sh in `make install-strip', and initialize 1159145bc899bSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 1159245bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1159345bc899bSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1159445bc899bSmrg# Installed binaries are usually stripped using `strip' when the user 1159545bc899bSmrg# run `make install-strip'. However `strip' might not be the right 1159645bc899bSmrg# tool to use in cross-compilation environments, therefore Automake 1159745bc899bSmrg# will honor the `STRIP' environment variable to overrule this program. 1159845bc899bSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 1159945bc899bSmrgif test "$cross_compiling" != no; then 1160045bc899bSmrg AC_CHECK_TOOL([STRIP], [strip], :) 1160145bc899bSmrgfi 1160250f2e948SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1160345bc899bSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1160445bc899bSmrg 11605b40a6198Smrg# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 1160650f2e948Smrg# 1160750f2e948Smrg# This file is free software; the Free Software Foundation 1160850f2e948Smrg# gives unlimited permission to copy and/or distribute it, 1160950f2e948Smrg# with or without modifications, as long as this notice is preserved. 1161050f2e948Smrg 11611b40a6198Smrg# serial 3 116123a925b30Smrg 1161350f2e948Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1161450f2e948Smrg# --------------------------- 1161550f2e948Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1161650f2e948Smrg# This macro is traced by Automake. 1161750f2e948SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1161850f2e948Smrg 116193a925b30Smrg# AM_SUBST_NOTMAKE(VARIABLE) 11620b40a6198Smrg# -------------------------- 116213a925b30Smrg# Public sister of _AM_SUBST_NOTMAKE. 116223a925b30SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 116233a925b30Smrg 1162445bc899bSmrg# Check how to create a tarball. -*- Autoconf -*- 1162545bc899bSmrg 11626b40a6198Smrg# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 1162745bc899bSmrg# 1162845bc899bSmrg# This file is free software; the Free Software Foundation 1162945bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1163045bc899bSmrg# with or without modifications, as long as this notice is preserved. 1163145bc899bSmrg 1163245bc899bSmrg# serial 2 1163345bc899bSmrg 1163445bc899bSmrg# _AM_PROG_TAR(FORMAT) 1163545bc899bSmrg# -------------------- 1163645bc899bSmrg# Check how to create a tarball in format FORMAT. 1163745bc899bSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 1163845bc899bSmrg# 1163945bc899bSmrg# Substitute a variable $(am__tar) that is a command 1164045bc899bSmrg# writing to stdout a FORMAT-tarball containing the directory 1164145bc899bSmrg# $tardir. 1164245bc899bSmrg# tardir=directory && $(am__tar) > result.tar 1164345bc899bSmrg# 1164445bc899bSmrg# Substitute a variable $(am__untar) that extract such 1164545bc899bSmrg# a tarball read from stdin. 1164645bc899bSmrg# $(am__untar) < result.tar 1164745bc899bSmrgAC_DEFUN([_AM_PROG_TAR], 11648b40a6198Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11649b40a6198Smrg# in the wild :-( We should find a proper way to deprecate it ... 11650b40a6198SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1165145bc899bSmrgm4_if([$1], [v7], 11652b40a6198Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1165345bc899bSmrg [m4_case([$1], [ustar],, [pax],, 1165445bc899bSmrg [m4_fatal([Unknown tar format])]) 1165545bc899bSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 1165645bc899bSmrg# Loop over all known methods to create a tar archive until one works. 1165745bc899bSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1165845bc899bSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 1165945bc899bSmrg# Do not fold the above two line into one, because Tru64 sh and 1166045bc899bSmrg# Solaris sh will not grok spaces in the rhs of `-'. 1166145bc899bSmrgfor _am_tool in $_am_tools 1166245bc899bSmrgdo 1166345bc899bSmrg case $_am_tool in 1166445bc899bSmrg gnutar) 1166545bc899bSmrg for _am_tar in tar gnutar gtar; 1166645bc899bSmrg do 1166745bc899bSmrg AM_RUN_LOG([$_am_tar --version]) && break 1166845bc899bSmrg done 1166945bc899bSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1167045bc899bSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1167145bc899bSmrg am__untar="$_am_tar -xf -" 1167245bc899bSmrg ;; 1167345bc899bSmrg plaintar) 1167445bc899bSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 1167545bc899bSmrg # ustar tarball either. 1167645bc899bSmrg (tar --version) >/dev/null 2>&1 && continue 1167745bc899bSmrg am__tar='tar chf - "$$tardir"' 1167845bc899bSmrg am__tar_='tar chf - "$tardir"' 1167945bc899bSmrg am__untar='tar xf -' 1168045bc899bSmrg ;; 1168145bc899bSmrg pax) 1168245bc899bSmrg am__tar='pax -L -x $1 -w "$$tardir"' 1168345bc899bSmrg am__tar_='pax -L -x $1 -w "$tardir"' 1168445bc899bSmrg am__untar='pax -r' 1168545bc899bSmrg ;; 1168645bc899bSmrg cpio) 1168745bc899bSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1168845bc899bSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1168945bc899bSmrg am__untar='cpio -i -H $1 -d' 1169045bc899bSmrg ;; 1169145bc899bSmrg none) 1169245bc899bSmrg am__tar=false 1169345bc899bSmrg am__tar_=false 1169445bc899bSmrg am__untar=false 1169545bc899bSmrg ;; 1169645bc899bSmrg esac 1169745bc899bSmrg 1169845bc899bSmrg # If the value was cached, stop now. We just wanted to have am__tar 1169945bc899bSmrg # and am__untar set. 1170045bc899bSmrg test -n "${am_cv_prog_tar_$1}" && break 1170145bc899bSmrg 1170245bc899bSmrg # tar/untar a dummy directory, and stop if the command works 1170345bc899bSmrg rm -rf conftest.dir 1170445bc899bSmrg mkdir conftest.dir 1170545bc899bSmrg echo GrepMe > conftest.dir/file 1170645bc899bSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1170745bc899bSmrg rm -rf conftest.dir 1170845bc899bSmrg if test -s conftest.tar; then 1170945bc899bSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 1171045bc899bSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1171145bc899bSmrg fi 1171245bc899bSmrgdone 1171345bc899bSmrgrm -rf conftest.dir 1171445bc899bSmrg 1171545bc899bSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1171645bc899bSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1171745bc899bSmrgAC_SUBST([am__tar]) 1171845bc899bSmrgAC_SUBST([am__untar]) 1171945bc899bSmrg]) # _AM_PROG_TAR 1172045bc899bSmrg 11721