aclocal.m4 revision c97b1c41
1c97b1c41Smrg# generated automatically by aclocal 1.13.3 -*- Autoconf -*- 2c97b1c41Smrg 3c97b1c41Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 445bc899bSmrg 545bc899bSmrg# This file is free software; the Free Software Foundation 645bc899bSmrg# gives unlimited permission to copy and/or distribute it, 745bc899bSmrg# with or without modifications, as long as this notice is preserved. 845bc899bSmrg 945bc899bSmrg# This program is distributed in the hope that it will be useful, 1045bc899bSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1145bc899bSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1245bc899bSmrg# PARTICULAR PURPOSE. 1345bc899bSmrg 14c97b1c41Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1550f2e948Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1650f2e948Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17c97b1c41Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18c97b1c41Smrg[m4_warning([this file was generated for autoconf 2.69. 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. 21c97b1c41SmrgTo 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*) 1341c97b1c41Smrg case `/usr/bin/file conftest.o` in 1342c97b1c41Smrg *x86-64*) 1343c97b1c41Smrg LD="${LD-ld} -m elf32_x86_64" 1344c97b1c41Smrg ;; 1345c97b1c41Smrg *) 1346c97b1c41Smrg LD="${LD-ld} -m elf_i386" 1347c97b1c41Smrg ;; 1348c97b1c41Smrg esac 13495592a31fSmrg ;; 13505592a31fSmrg ppc64-*linux*|powerpc64-*linux*) 13515592a31fSmrg LD="${LD-ld} -m elf32ppclinux" 13525592a31fSmrg ;; 13535592a31fSmrg s390x-*linux*) 13545592a31fSmrg LD="${LD-ld} -m elf_s390" 13555592a31fSmrg ;; 13565592a31fSmrg sparc64-*linux*) 13575592a31fSmrg LD="${LD-ld} -m elf32_sparc" 13585592a31fSmrg ;; 13595592a31fSmrg esac 13605592a31fSmrg ;; 13615592a31fSmrg *64-bit*) 13625592a31fSmrg case $host in 13635592a31fSmrg x86_64-*kfreebsd*-gnu) 13645592a31fSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 13655592a31fSmrg ;; 13665592a31fSmrg x86_64-*linux*) 13675592a31fSmrg LD="${LD-ld} -m elf_x86_64" 13685592a31fSmrg ;; 13695592a31fSmrg ppc*-*linux*|powerpc*-*linux*) 13705592a31fSmrg LD="${LD-ld} -m elf64ppc" 13715592a31fSmrg ;; 13725592a31fSmrg s390*-*linux*|s390*-*tpf*) 13735592a31fSmrg LD="${LD-ld} -m elf64_s390" 13745592a31fSmrg ;; 13755592a31fSmrg sparc*-*linux*) 13765592a31fSmrg LD="${LD-ld} -m elf64_sparc" 13775592a31fSmrg ;; 13785592a31fSmrg esac 13795592a31fSmrg ;; 138050f2e948Smrg esac 138150f2e948Smrg fi 138250f2e948Smrg rm -rf conftest* 1383226fade8Smrg ;; 138445bc899bSmrg 138550f2e948Smrg*-*-sco3.2v5*) 138650f2e948Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 138750f2e948Smrg SAVE_CFLAGS="$CFLAGS" 138850f2e948Smrg CFLAGS="$CFLAGS -belf" 138950f2e948Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 139050f2e948Smrg [AC_LANG_PUSH(C) 13915592a31fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 139250f2e948Smrg AC_LANG_POP]) 139350f2e948Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 139450f2e948Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 139550f2e948Smrg CFLAGS="$SAVE_CFLAGS" 139650f2e948Smrg fi 1397226fade8Smrg ;; 1398b40a6198Smrg*-*solaris*) 139950f2e948Smrg # Find out which ABI we are using. 140050f2e948Smrg echo 'int i;' > conftest.$ac_ext 140150f2e948Smrg if AC_TRY_EVAL(ac_compile); then 140250f2e948Smrg case `/usr/bin/file conftest.o` in 140350f2e948Smrg *64-bit*) 140450f2e948Smrg case $lt_cv_prog_gnu_ld in 1405b40a6198Smrg yes*) 1406b40a6198Smrg case $host in 1407b40a6198Smrg i?86-*-solaris*) 1408b40a6198Smrg LD="${LD-ld} -m elf_x86_64" 1409b40a6198Smrg ;; 1410b40a6198Smrg sparc*-*-solaris*) 1411b40a6198Smrg LD="${LD-ld} -m elf64_sparc" 1412b40a6198Smrg ;; 1413b40a6198Smrg esac 1414b40a6198Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1415b40a6198Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1416b40a6198Smrg LD="${LD-ld}_sol2" 1417b40a6198Smrg fi 1418b40a6198Smrg ;; 141950f2e948Smrg *) 14205592a31fSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 142150f2e948Smrg LD="${LD-ld} -64" 142250f2e948Smrg fi 142350f2e948Smrg ;; 142450f2e948Smrg esac 142550f2e948Smrg ;; 142650f2e948Smrg esac 142750f2e948Smrg fi 142850f2e948Smrg rm -rf conftest* 1429226fade8Smrg ;; 143050f2e948Smrgesac 143145bc899bSmrg 143250f2e948Smrgneed_locks="$enable_libtool_lock" 14335592a31fSmrg])# _LT_ENABLE_LOCK 14345592a31fSmrg 14355592a31fSmrg 1436b40a6198Smrg# _LT_PROG_AR 1437b40a6198Smrg# ----------- 1438b40a6198Smrgm4_defun([_LT_PROG_AR], 1439b40a6198Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1440b40a6198Smrg: ${AR=ar} 1441b40a6198Smrg: ${AR_FLAGS=cru} 1442b40a6198Smrg_LT_DECL([], [AR], [1], [The archiver]) 1443b40a6198Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1444b40a6198Smrg 1445b40a6198SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1446b40a6198Smrg [lt_cv_ar_at_file=no 1447b40a6198Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1448b40a6198Smrg [echo conftest.$ac_objext > conftest.lst 1449b40a6198Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1450b40a6198Smrg AC_TRY_EVAL([lt_ar_try]) 1451b40a6198Smrg if test "$ac_status" -eq 0; then 1452b40a6198Smrg # Ensure the archiver fails upon bogus file names. 1453b40a6198Smrg rm -f conftest.$ac_objext libconftest.a 1454b40a6198Smrg AC_TRY_EVAL([lt_ar_try]) 1455b40a6198Smrg if test "$ac_status" -ne 0; then 1456b40a6198Smrg lt_cv_ar_at_file=@ 1457b40a6198Smrg fi 1458b40a6198Smrg fi 1459b40a6198Smrg rm -f conftest.* libconftest.a 1460b40a6198Smrg ]) 1461b40a6198Smrg ]) 1462b40a6198Smrg 1463b40a6198Smrgif test "x$lt_cv_ar_at_file" = xno; then 1464b40a6198Smrg archiver_list_spec= 1465b40a6198Smrgelse 1466b40a6198Smrg archiver_list_spec=$lt_cv_ar_at_file 1467b40a6198Smrgfi 1468b40a6198Smrg_LT_DECL([], [archiver_list_spec], [1], 1469b40a6198Smrg [How to feed a file listing to the archiver]) 1470b40a6198Smrg])# _LT_PROG_AR 1471b40a6198Smrg 1472b40a6198Smrg 14735592a31fSmrg# _LT_CMD_OLD_ARCHIVE 14745592a31fSmrg# ------------------- 14755592a31fSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1476b40a6198Smrg[_LT_PROG_AR 14775592a31fSmrg 14785592a31fSmrgAC_CHECK_TOOL(STRIP, strip, :) 14795592a31fSmrgtest -z "$STRIP" && STRIP=: 14805592a31fSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 148150f2e948Smrg 14825592a31fSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 14835592a31fSmrgtest -z "$RANLIB" && RANLIB=: 14845592a31fSmrg_LT_DECL([], [RANLIB], [1], 14855592a31fSmrg [Commands used to install an old-style archive]) 14865592a31fSmrg 14875592a31fSmrg# Determine commands to create old-style static archives. 14885592a31fSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 14895592a31fSmrgold_postinstall_cmds='chmod 644 $oldlib' 14905592a31fSmrgold_postuninstall_cmds= 14915592a31fSmrg 14925592a31fSmrgif test -n "$RANLIB"; then 14935592a31fSmrg case $host_os in 14945592a31fSmrg openbsd*) 1495b40a6198Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 14965592a31fSmrg ;; 14975592a31fSmrg *) 1498b40a6198Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 14995592a31fSmrg ;; 15005592a31fSmrg esac 1501b40a6198Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15025592a31fSmrgfi 1503b40a6198Smrg 1504b40a6198Smrgcase $host_os in 1505b40a6198Smrg darwin*) 1506b40a6198Smrg lock_old_archive_extraction=yes ;; 1507b40a6198Smrg *) 1508b40a6198Smrg lock_old_archive_extraction=no ;; 1509b40a6198Smrgesac 15105592a31fSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 15115592a31fSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15125592a31fSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 15135592a31fSmrg [Commands used to build an old-style archive]) 1514b40a6198Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1515b40a6198Smrg [Whether to use a lock for old archive extraction]) 15165592a31fSmrg])# _LT_CMD_OLD_ARCHIVE 151745bc899bSmrg 151845bc899bSmrg 15195592a31fSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 152050f2e948Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 152150f2e948Smrg# ---------------------------------------------------------------- 152250f2e948Smrg# Check whether the given compiler option works 15235592a31fSmrgAC_DEFUN([_LT_COMPILER_OPTION], 15245592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15255592a31fSmrgm4_require([_LT_DECL_SED])dnl 152650f2e948SmrgAC_CACHE_CHECK([$1], [$2], 152750f2e948Smrg [$2=no 15285592a31fSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 152950f2e948Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 153050f2e948Smrg lt_compiler_flag="$3" 153150f2e948Smrg # Insert the option either (1) after the last *FLAGS variable, or 153250f2e948Smrg # (2) before a word containing "conftest.", or (3) at the end. 153350f2e948Smrg # Note that $ac_compile itself does not contain backslashes and begins 153450f2e948Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 153550f2e948Smrg # The option is referenced via a variable to avoid confusing sed. 153650f2e948Smrg lt_compile=`echo "$ac_compile" | $SED \ 153750f2e948Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 153850f2e948Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 153950f2e948Smrg -e 's:$: $lt_compiler_flag:'` 1540b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 154150f2e948Smrg (eval "$lt_compile" 2>conftest.err) 154250f2e948Smrg ac_status=$? 154350f2e948Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1544b40a6198Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 154550f2e948Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 154650f2e948Smrg # The compiler can only warn and ignore the option if not recognized 154750f2e948Smrg # So say no if there are warnings other than the usual output. 1548b40a6198Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 154950f2e948Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 155050f2e948Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 155150f2e948Smrg $2=yes 155250f2e948Smrg fi 155350f2e948Smrg fi 15545592a31fSmrg $RM conftest* 155550f2e948Smrg]) 155645bc899bSmrg 155750f2e948Smrgif test x"[$]$2" = xyes; then 15585592a31fSmrg m4_if([$5], , :, [$5]) 155950f2e948Smrgelse 15605592a31fSmrg m4_if([$6], , :, [$6]) 156150f2e948Smrgfi 15625592a31fSmrg])# _LT_COMPILER_OPTION 156345bc899bSmrg 15645592a31fSmrg# Old name: 15655592a31fSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 15665592a31fSmrgdnl aclocal-1.4 backwards compatibility: 15675592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 156850f2e948Smrg 15695592a31fSmrg 15705592a31fSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15715592a31fSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 15725592a31fSmrg# ---------------------------------------------------- 15735592a31fSmrg# Check whether the given linker option works 15745592a31fSmrgAC_DEFUN([_LT_LINKER_OPTION], 15755592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15765592a31fSmrgm4_require([_LT_DECL_SED])dnl 157750f2e948SmrgAC_CACHE_CHECK([$1], [$2], 157850f2e948Smrg [$2=no 157950f2e948Smrg save_LDFLAGS="$LDFLAGS" 158050f2e948Smrg LDFLAGS="$LDFLAGS $3" 158150f2e948Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 158250f2e948Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 158350f2e948Smrg # The linker can only warn and ignore the option if not recognized 158450f2e948Smrg # So say no if there are warnings 158550f2e948Smrg if test -s conftest.err; then 158650f2e948Smrg # Append any errors to the config.log. 158750f2e948Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1588b40a6198Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 158950f2e948Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 159050f2e948Smrg if diff conftest.exp conftest.er2 >/dev/null; then 159150f2e948Smrg $2=yes 159250f2e948Smrg fi 159350f2e948Smrg else 159450f2e948Smrg $2=yes 159550f2e948Smrg fi 159650f2e948Smrg fi 15975592a31fSmrg $RM -r conftest* 159850f2e948Smrg LDFLAGS="$save_LDFLAGS" 159950f2e948Smrg]) 160050f2e948Smrg 160150f2e948Smrgif test x"[$]$2" = xyes; then 16025592a31fSmrg m4_if([$4], , :, [$4]) 160350f2e948Smrgelse 16045592a31fSmrg m4_if([$5], , :, [$5]) 160550f2e948Smrgfi 16065592a31fSmrg])# _LT_LINKER_OPTION 160750f2e948Smrg 16085592a31fSmrg# Old name: 16095592a31fSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16105592a31fSmrgdnl aclocal-1.4 backwards compatibility: 16115592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 161250f2e948Smrg 16135592a31fSmrg 16145592a31fSmrg# LT_CMD_MAX_LEN 16155592a31fSmrg#--------------- 16165592a31fSmrgAC_DEFUN([LT_CMD_MAX_LEN], 16175592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16185592a31fSmrg# find the maximum length of command line arguments 161950f2e948SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 162050f2e948SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 162150f2e948Smrg i=0 162250f2e948Smrg teststring="ABCD" 162350f2e948Smrg 162450f2e948Smrg case $build_os in 162550f2e948Smrg msdosdjgpp*) 162650f2e948Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 162750f2e948Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 162850f2e948Smrg # during glob expansion). Even if it were fixed, the result of this 162950f2e948Smrg # check would be larger than it should be. 163050f2e948Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 16311ac89addSmrg ;; 163250f2e948Smrg 163350f2e948Smrg gnu*) 163450f2e948Smrg # Under GNU Hurd, this test is not required because there is 163550f2e948Smrg # no limit to the length of command line arguments. 163650f2e948Smrg # Libtool will interpret -1 as no limit whatsoever 163750f2e948Smrg lt_cv_sys_max_cmd_len=-1; 16381ac89addSmrg ;; 163950f2e948Smrg 16405592a31fSmrg cygwin* | mingw* | cegcc*) 164150f2e948Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 164250f2e948Smrg # about 5 minutes as the teststring grows exponentially. 164350f2e948Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 164450f2e948Smrg # you end up with a "frozen" computer, even though with patience 164550f2e948Smrg # the test eventually succeeds (with a max line length of 256k). 164650f2e948Smrg # Instead, let's just punt: use the minimum linelength reported by 164750f2e948Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 164850f2e948Smrg lt_cv_sys_max_cmd_len=8192; 16491ac89addSmrg ;; 165050f2e948Smrg 1651b40a6198Smrg mint*) 1652b40a6198Smrg # On MiNT this can take a long time and run out of memory. 1653b40a6198Smrg lt_cv_sys_max_cmd_len=8192; 1654b40a6198Smrg ;; 1655b40a6198Smrg 165650f2e948Smrg amigaos*) 165750f2e948Smrg # On AmigaOS with pdksh, this test takes hours, literally. 165850f2e948Smrg # So we just punt and use a minimum line length of 8192. 165950f2e948Smrg lt_cv_sys_max_cmd_len=8192; 16601ac89addSmrg ;; 166145bc899bSmrg 166250f2e948Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 166350f2e948Smrg # This has been around since 386BSD, at least. Likely further. 166450f2e948Smrg if test -x /sbin/sysctl; then 166550f2e948Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 166650f2e948Smrg elif test -x /usr/sbin/sysctl; then 166750f2e948Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 166850f2e948Smrg else 166950f2e948Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 167050f2e948Smrg fi 167150f2e948Smrg # And add a safety zone 167250f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 167350f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 167450f2e948Smrg ;; 167545bc899bSmrg 167650f2e948Smrg interix*) 167750f2e948Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 167850f2e948Smrg lt_cv_sys_max_cmd_len=196608 167950f2e948Smrg ;; 168050f2e948Smrg 1681b40a6198Smrg os2*) 1682b40a6198Smrg # The test takes a long time on OS/2. 1683b40a6198Smrg lt_cv_sys_max_cmd_len=8192 1684b40a6198Smrg ;; 1685b40a6198Smrg 168650f2e948Smrg osf*) 168750f2e948Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 168850f2e948Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 168950f2e948Smrg # nice to cause kernel panics so lets avoid the loop below. 169050f2e948Smrg # First set a reasonable default. 169150f2e948Smrg lt_cv_sys_max_cmd_len=16384 169250f2e948Smrg # 169350f2e948Smrg if test -x /sbin/sysconfig; then 169450f2e948Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 169550f2e948Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 169650f2e948Smrg esac 169745bc899bSmrg fi 1698226fade8Smrg ;; 169950f2e948Smrg sco3.2v5*) 170050f2e948Smrg lt_cv_sys_max_cmd_len=102400 17011ac89addSmrg ;; 170250f2e948Smrg sysv5* | sco5v6* | sysv4.2uw2*) 170350f2e948Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 170450f2e948Smrg if test -n "$kargmax"; then 17055592a31fSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 170650f2e948Smrg else 170750f2e948Smrg lt_cv_sys_max_cmd_len=32768 170850f2e948Smrg fi 17091ac89addSmrg ;; 17101ac89addSmrg *) 171150f2e948Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1712c97b1c41Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1713c97b1c41Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 171450f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 171550f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 171650f2e948Smrg else 17175592a31fSmrg # Make teststring a little bigger before we do anything with it. 17185592a31fSmrg # a 1K string should be a reasonable start. 17195592a31fSmrg for i in 1 2 3 4 5 6 7 8 ; do 17205592a31fSmrg teststring=$teststring$teststring 17215592a31fSmrg done 172250f2e948Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17235592a31fSmrg # If test is not a shell built-in, we'll probably end up computing a 17245592a31fSmrg # maximum length that is only half of the actual maximum length, but 17255592a31fSmrg # we can't tell. 1726b40a6198Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1727b40a6198Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 172850f2e948Smrg test $i != 17 # 1/2 MB should be enough 172950f2e948Smrg do 173050f2e948Smrg i=`expr $i + 1` 173150f2e948Smrg teststring=$teststring$teststring 173250f2e948Smrg done 17335592a31fSmrg # Only check the string length outside the loop. 17345592a31fSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 173550f2e948Smrg teststring= 17365592a31fSmrg # Add a significant safety factor because C++ compilers can tack on 17375592a31fSmrg # massive amounts of additional arguments before passing them to the 17385592a31fSmrg # linker. It appears as though 1/2 is a usable value. 173950f2e948Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 174050f2e948Smrg fi 17411ac89addSmrg ;; 17421ac89addSmrg esac 174350f2e948Smrg]) 174450f2e948Smrgif test -n $lt_cv_sys_max_cmd_len ; then 174550f2e948Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 174650f2e948Smrgelse 174750f2e948Smrg AC_MSG_RESULT(none) 174850f2e948Smrgfi 17495592a31fSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 17505592a31fSmrg_LT_DECL([], [max_cmd_len], [0], 17515592a31fSmrg [What is the maximum length of a command?]) 17525592a31fSmrg])# LT_CMD_MAX_LEN 175345bc899bSmrg 17545592a31fSmrg# Old name: 17555592a31fSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 17565592a31fSmrgdnl aclocal-1.4 backwards compatibility: 17575592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 175845bc899bSmrg 17595592a31fSmrg 17605592a31fSmrg# _LT_HEADER_DLFCN 17615592a31fSmrg# ---------------- 17625592a31fSmrgm4_defun([_LT_HEADER_DLFCN], 17635592a31fSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 17645592a31fSmrg])# _LT_HEADER_DLFCN 176545bc899bSmrg 1766226fade8Smrg 17675592a31fSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 17685592a31fSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 17695592a31fSmrg# ---------------------------------------------------------------- 17705592a31fSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 17715592a31fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 177250f2e948Smrgif test "$cross_compiling" = yes; then : 177350f2e948Smrg [$4] 177450f2e948Smrgelse 177550f2e948Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 177650f2e948Smrg lt_status=$lt_dlunknown 17775592a31fSmrg cat > conftest.$ac_ext <<_LT_EOF 1778b40a6198Smrg[#line $LINENO "configure" 177950f2e948Smrg#include "confdefs.h" 178045bc899bSmrg 178150f2e948Smrg#if HAVE_DLFCN_H 178250f2e948Smrg#include <dlfcn.h> 178350f2e948Smrg#endif 178445bc899bSmrg 178550f2e948Smrg#include <stdio.h> 178645bc899bSmrg 178750f2e948Smrg#ifdef RTLD_GLOBAL 178850f2e948Smrg# define LT_DLGLOBAL RTLD_GLOBAL 178950f2e948Smrg#else 179050f2e948Smrg# ifdef DL_GLOBAL 179150f2e948Smrg# define LT_DLGLOBAL DL_GLOBAL 179250f2e948Smrg# else 179350f2e948Smrg# define LT_DLGLOBAL 0 179450f2e948Smrg# endif 179550f2e948Smrg#endif 179645bc899bSmrg 179750f2e948Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 179850f2e948Smrg find out it does not work in some platform. */ 179950f2e948Smrg#ifndef LT_DLLAZY_OR_NOW 180050f2e948Smrg# ifdef RTLD_LAZY 180150f2e948Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 180250f2e948Smrg# else 180350f2e948Smrg# ifdef DL_LAZY 180450f2e948Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 180550f2e948Smrg# else 180650f2e948Smrg# ifdef RTLD_NOW 180750f2e948Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 180850f2e948Smrg# else 180950f2e948Smrg# ifdef DL_NOW 181050f2e948Smrg# define LT_DLLAZY_OR_NOW DL_NOW 181150f2e948Smrg# else 181250f2e948Smrg# define LT_DLLAZY_OR_NOW 0 181350f2e948Smrg# endif 181450f2e948Smrg# endif 181550f2e948Smrg# endif 181650f2e948Smrg# endif 181750f2e948Smrg#endif 181845bc899bSmrg 1819b40a6198Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 1820b40a6198Smrg correspondingly for the symbols needed. */ 1821b40a6198Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1822b40a6198Smrgint fnord () __attribute__((visibility("default"))); 1823b40a6198Smrg#endif 1824b40a6198Smrg 1825b40a6198Smrgint fnord () { return 42; } 182650f2e948Smrgint main () 182750f2e948Smrg{ 182850f2e948Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 182950f2e948Smrg int status = $lt_dlunknown; 183050f2e948Smrg 183150f2e948Smrg if (self) 183250f2e948Smrg { 183350f2e948Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1834b40a6198Smrg else 1835b40a6198Smrg { 1836b40a6198Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1837b40a6198Smrg else puts (dlerror ()); 1838b40a6198Smrg } 183950f2e948Smrg /* dlclose (self); */ 184050f2e948Smrg } 184145bc899bSmrg else 184250f2e948Smrg puts (dlerror ()); 184345bc899bSmrg 18445592a31fSmrg return status; 184550f2e948Smrg}] 18465592a31fSmrg_LT_EOF 184750f2e948Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 184850f2e948Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 184950f2e948Smrg lt_status=$? 185050f2e948Smrg case x$lt_status in 185150f2e948Smrg x$lt_dlno_uscore) $1 ;; 185250f2e948Smrg x$lt_dlneed_uscore) $2 ;; 185350f2e948Smrg x$lt_dlunknown|x*) $3 ;; 18541ac89addSmrg esac 185550f2e948Smrg else : 185650f2e948Smrg # compilation failed 185750f2e948Smrg $3 185845bc899bSmrg fi 185945bc899bSmrgfi 186050f2e948Smrgrm -fr conftest* 18615592a31fSmrg])# _LT_TRY_DLOPEN_SELF 186245bc899bSmrg 1863226fade8Smrg 18645592a31fSmrg# LT_SYS_DLOPEN_SELF 18655592a31fSmrg# ------------------ 18665592a31fSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 18675592a31fSmrg[m4_require([_LT_HEADER_DLFCN])dnl 186850f2e948Smrgif test "x$enable_dlopen" != xyes; then 186950f2e948Smrg enable_dlopen=unknown 187050f2e948Smrg enable_dlopen_self=unknown 187150f2e948Smrg enable_dlopen_self_static=unknown 187250f2e948Smrgelse 187350f2e948Smrg lt_cv_dlopen=no 187450f2e948Smrg lt_cv_dlopen_libs= 1875226fade8Smrg 187650f2e948Smrg case $host_os in 187750f2e948Smrg beos*) 187850f2e948Smrg lt_cv_dlopen="load_add_on" 187950f2e948Smrg lt_cv_dlopen_libs= 188050f2e948Smrg lt_cv_dlopen_self=yes 188150f2e948Smrg ;; 1882226fade8Smrg 18835592a31fSmrg mingw* | pw32* | cegcc*) 188450f2e948Smrg lt_cv_dlopen="LoadLibrary" 188550f2e948Smrg lt_cv_dlopen_libs= 18865592a31fSmrg ;; 1887226fade8Smrg 188850f2e948Smrg cygwin*) 188950f2e948Smrg lt_cv_dlopen="dlopen" 189050f2e948Smrg lt_cv_dlopen_libs= 18915592a31fSmrg ;; 1892226fade8Smrg 189350f2e948Smrg darwin*) 189450f2e948Smrg # if libdl is installed we need to link against it 189550f2e948Smrg AC_CHECK_LIB([dl], [dlopen], 189650f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 189750f2e948Smrg lt_cv_dlopen="dyld" 189850f2e948Smrg lt_cv_dlopen_libs= 189950f2e948Smrg lt_cv_dlopen_self=yes 190050f2e948Smrg ]) 19015592a31fSmrg ;; 1902226fade8Smrg 190350f2e948Smrg *) 190450f2e948Smrg AC_CHECK_FUNC([shl_load], 190550f2e948Smrg [lt_cv_dlopen="shl_load"], 190650f2e948Smrg [AC_CHECK_LIB([dld], [shl_load], 190750f2e948Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 190850f2e948Smrg [AC_CHECK_FUNC([dlopen], 190950f2e948Smrg [lt_cv_dlopen="dlopen"], 191050f2e948Smrg [AC_CHECK_LIB([dl], [dlopen], 191150f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 191250f2e948Smrg [AC_CHECK_LIB([svld], [dlopen], 191350f2e948Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 191450f2e948Smrg [AC_CHECK_LIB([dld], [dld_link], 191550f2e948Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 191650f2e948Smrg ]) 191750f2e948Smrg ]) 191850f2e948Smrg ]) 191950f2e948Smrg ]) 192050f2e948Smrg ]) 192150f2e948Smrg ;; 192250f2e948Smrg esac 1923226fade8Smrg 192450f2e948Smrg if test "x$lt_cv_dlopen" != xno; then 192550f2e948Smrg enable_dlopen=yes 192650f2e948Smrg else 192750f2e948Smrg enable_dlopen=no 192850f2e948Smrg fi 1929226fade8Smrg 193050f2e948Smrg case $lt_cv_dlopen in 193150f2e948Smrg dlopen) 193250f2e948Smrg save_CPPFLAGS="$CPPFLAGS" 193350f2e948Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1934226fade8Smrg 193550f2e948Smrg save_LDFLAGS="$LDFLAGS" 193650f2e948Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1937226fade8Smrg 193850f2e948Smrg save_LIBS="$LIBS" 193950f2e948Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1940226fade8Smrg 194150f2e948Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 194250f2e948Smrg lt_cv_dlopen_self, [dnl 19435592a31fSmrg _LT_TRY_DLOPEN_SELF( 194450f2e948Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 194550f2e948Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 194650f2e948Smrg ]) 1947226fade8Smrg 194850f2e948Smrg if test "x$lt_cv_dlopen_self" = xyes; then 194950f2e948Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 195050f2e948Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 19515592a31fSmrg lt_cv_dlopen_self_static, [dnl 19525592a31fSmrg _LT_TRY_DLOPEN_SELF( 195350f2e948Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 195450f2e948Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 195550f2e948Smrg ]) 1956226fade8Smrg fi 1957226fade8Smrg 195850f2e948Smrg CPPFLAGS="$save_CPPFLAGS" 195950f2e948Smrg LDFLAGS="$save_LDFLAGS" 196050f2e948Smrg LIBS="$save_LIBS" 196150f2e948Smrg ;; 196250f2e948Smrg esac 1963226fade8Smrg 196450f2e948Smrg case $lt_cv_dlopen_self in 196550f2e948Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 196650f2e948Smrg *) enable_dlopen_self=unknown ;; 196750f2e948Smrg esac 1968226fade8Smrg 196950f2e948Smrg case $lt_cv_dlopen_self_static in 197050f2e948Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 197150f2e948Smrg *) enable_dlopen_self_static=unknown ;; 197250f2e948Smrg esac 197350f2e948Smrgfi 19745592a31fSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 19755592a31fSmrg [Whether dlopen is supported]) 19765592a31fSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 19775592a31fSmrg [Whether dlopen of programs is supported]) 19785592a31fSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 19795592a31fSmrg [Whether dlopen of statically linked programs is supported]) 19805592a31fSmrg])# LT_SYS_DLOPEN_SELF 1981226fade8Smrg 19825592a31fSmrg# Old name: 19835592a31fSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 19845592a31fSmrgdnl aclocal-1.4 backwards compatibility: 19855592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1986226fade8Smrg 19875592a31fSmrg 19885592a31fSmrg# _LT_COMPILER_C_O([TAGNAME]) 19895592a31fSmrg# --------------------------- 19905592a31fSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 19915592a31fSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 19925592a31fSmrgm4_defun([_LT_COMPILER_C_O], 19935592a31fSmrg[m4_require([_LT_DECL_SED])dnl 19945592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19955592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 199650f2e948SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 19975592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 19985592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 19995592a31fSmrg $RM -r conftest 2>/dev/null 200050f2e948Smrg mkdir conftest 200150f2e948Smrg cd conftest 200250f2e948Smrg mkdir out 200350f2e948Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2004226fade8Smrg 200550f2e948Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 200650f2e948Smrg # Insert the option either (1) after the last *FLAGS variable, or 200750f2e948Smrg # (2) before a word containing "conftest.", or (3) at the end. 200850f2e948Smrg # Note that $ac_compile itself does not contain backslashes and begins 200950f2e948Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 201050f2e948Smrg lt_compile=`echo "$ac_compile" | $SED \ 201150f2e948Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 201250f2e948Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 201350f2e948Smrg -e 's:$: $lt_compiler_flag:'` 2014b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 201550f2e948Smrg (eval "$lt_compile" 2>out/conftest.err) 201650f2e948Smrg ac_status=$? 201750f2e948Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2018b40a6198Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 201950f2e948Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 202050f2e948Smrg then 202150f2e948Smrg # The compiler can only warn and ignore the option if not recognized 202250f2e948Smrg # So say no if there are warnings 2023b40a6198Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 202450f2e948Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 202550f2e948Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20265592a31fSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 202750f2e948Smrg fi 202850f2e948Smrg fi 202950f2e948Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 20305592a31fSmrg $RM conftest* 203150f2e948Smrg # SGI C++ compiler will create directory out/ii_files/ for 203250f2e948Smrg # template instantiation 20335592a31fSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 20345592a31fSmrg $RM out/* && rmdir out 203550f2e948Smrg cd .. 20365592a31fSmrg $RM -r conftest 20375592a31fSmrg $RM conftest* 203850f2e948Smrg]) 20395592a31fSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 20405592a31fSmrg [Does compiler simultaneously support -c and -o options?]) 20415592a31fSmrg])# _LT_COMPILER_C_O 2042226fade8Smrg 2043226fade8Smrg 20445592a31fSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 20455592a31fSmrg# ---------------------------------- 204650f2e948Smrg# Check to see if we can do hard links to lock some files if needed 20475592a31fSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 20485592a31fSmrg[m4_require([_LT_ENABLE_LOCK])dnl 20495592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20505592a31fSmrg_LT_COMPILER_C_O([$1]) 2051226fade8Smrg 205250f2e948Smrghard_links="nottested" 20535592a31fSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 205450f2e948Smrg # do not overwrite the value of need_locks provided by the user 205550f2e948Smrg AC_MSG_CHECKING([if we can lock with hard links]) 205650f2e948Smrg hard_links=yes 20575592a31fSmrg $RM conftest* 205850f2e948Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205950f2e948Smrg touch conftest.a 206050f2e948Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 206150f2e948Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 206250f2e948Smrg AC_MSG_RESULT([$hard_links]) 206350f2e948Smrg if test "$hard_links" = no; then 206450f2e948Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 206550f2e948Smrg need_locks=warn 206650f2e948Smrg fi 206750f2e948Smrgelse 206850f2e948Smrg need_locks=no 206950f2e948Smrgfi 20705592a31fSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 20715592a31fSmrg])# _LT_COMPILER_FILE_LOCKS 2072226fade8Smrg 2073226fade8Smrg 20745592a31fSmrg# _LT_CHECK_OBJDIR 20755592a31fSmrg# ---------------- 20765592a31fSmrgm4_defun([_LT_CHECK_OBJDIR], 207750f2e948Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 207850f2e948Smrg[rm -f .libs 2>/dev/null 207950f2e948Smrgmkdir .libs 2>/dev/null 208050f2e948Smrgif test -d .libs; then 208150f2e948Smrg lt_cv_objdir=.libs 208250f2e948Smrgelse 208350f2e948Smrg # MS-DOS does not allow filenames that begin with a dot. 208450f2e948Smrg lt_cv_objdir=_libs 208550f2e948Smrgfi 208650f2e948Smrgrmdir .libs 2>/dev/null]) 208750f2e948Smrgobjdir=$lt_cv_objdir 20885592a31fSmrg_LT_DECL([], [objdir], [0], 20895592a31fSmrg [The name of the directory that contains temporary libtool files])dnl 20905592a31fSmrgm4_pattern_allow([LT_OBJDIR])dnl 20915592a31fSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 20925592a31fSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 20935592a31fSmrg])# _LT_CHECK_OBJDIR 2094226fade8Smrg 2095226fade8Smrg 20965592a31fSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 20975592a31fSmrg# -------------------------------------- 209850f2e948Smrg# Check hardcoding attributes. 20995592a31fSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 210050f2e948Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21015592a31fSmrg_LT_TAGVAR(hardcode_action, $1)= 21025592a31fSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21035592a31fSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21045592a31fSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 210545bc899bSmrg 21065592a31fSmrg # We can hardcode non-existent directories. 21075592a31fSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 210850f2e948Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 210950f2e948Smrg # have to relink, otherwise we might link with an installed library 211050f2e948Smrg # when we should be linking with a yet-to-be-installed one 21115592a31fSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 21125592a31fSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 211350f2e948Smrg # Linking always hardcodes the temporary library directory. 21145592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=relink 211550f2e948Smrg else 211650f2e948Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21175592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 211850f2e948Smrg fi 211950f2e948Smrgelse 212050f2e948Smrg # We cannot hardcode anything, or else we can only hardcode existing 212150f2e948Smrg # directories. 21225592a31fSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 212350f2e948Smrgfi 21245592a31fSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2125226fade8Smrg 21265592a31fSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 21275592a31fSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 212850f2e948Smrg # Fast installation is not supported 212950f2e948Smrg enable_fast_install=no 213050f2e948Smrgelif test "$shlibpath_overrides_runpath" = yes || 213150f2e948Smrg test "$enable_shared" = no; then 213250f2e948Smrg # Fast installation is not necessary 213350f2e948Smrg enable_fast_install=needless 213450f2e948Smrgfi 21355592a31fSmrg_LT_TAGDECL([], [hardcode_action], [0], 21365592a31fSmrg [How to hardcode a shared library path into an executable]) 21375592a31fSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2138226fade8Smrg 2139226fade8Smrg 21405592a31fSmrg# _LT_CMD_STRIPLIB 21415592a31fSmrg# ---------------- 21425592a31fSmrgm4_defun([_LT_CMD_STRIPLIB], 21435592a31fSmrg[m4_require([_LT_DECL_EGREP]) 21445592a31fSmrgstriplib= 214550f2e948Smrgold_striplib= 214650f2e948SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 21475592a31fSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 214850f2e948Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 214950f2e948Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 215050f2e948Smrg AC_MSG_RESULT([yes]) 215150f2e948Smrgelse 215250f2e948Smrg# FIXME - insert some real tests, host_os isn't really good enough 215350f2e948Smrg case $host_os in 21545592a31fSmrg darwin*) 21555592a31fSmrg if test -n "$STRIP" ; then 21565592a31fSmrg striplib="$STRIP -x" 21575592a31fSmrg old_striplib="$STRIP -S" 21585592a31fSmrg AC_MSG_RESULT([yes]) 21595592a31fSmrg else 21605592a31fSmrg AC_MSG_RESULT([no]) 21615592a31fSmrg fi 21625592a31fSmrg ;; 21635592a31fSmrg *) 21645592a31fSmrg AC_MSG_RESULT([no]) 216550f2e948Smrg ;; 216650f2e948Smrg esac 216750f2e948Smrgfi 21685592a31fSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 21695592a31fSmrg_LT_DECL([], [striplib], [1]) 21705592a31fSmrg])# _LT_CMD_STRIPLIB 217145bc899bSmrg 217245bc899bSmrg 21735592a31fSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 217450f2e948Smrg# ----------------------------- 217550f2e948Smrg# PORTME Fill in your ld.so characteristics 21765592a31fSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 21775592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 21785592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 21795592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21805592a31fSmrgm4_require([_LT_DECL_OBJDUMP])dnl 21815592a31fSmrgm4_require([_LT_DECL_SED])dnl 2182b40a6198Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 218350f2e948SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 21845592a31fSmrgm4_if([$1], 21855592a31fSmrg [], [ 218650f2e948Smrgif test "$GCC" = yes; then 218750f2e948Smrg case $host_os in 218850f2e948Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 218950f2e948Smrg *) lt_awk_arg="/^libraries:/" ;; 219050f2e948Smrg esac 2191b40a6198Smrg case $host_os in 2192b40a6198Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2193b40a6198Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2194b40a6198Smrg esac 2195b40a6198Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2196b40a6198Smrg case $lt_search_path_spec in 2197b40a6198Smrg *\;*) 219850f2e948Smrg # if the path contains ";" then we assume it to be the separator 219950f2e948Smrg # otherwise default to the standard path separator (i.e. ":") - it is 220050f2e948Smrg # assumed that no part of a normal pathname contains ";" but that should 220150f2e948Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2202b40a6198Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2203b40a6198Smrg ;; 2204b40a6198Smrg *) 2205b40a6198Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2206b40a6198Smrg ;; 2207b40a6198Smrg esac 220850f2e948Smrg # Ok, now we have the path, separated by spaces, we can step through it 220950f2e948Smrg # and add multilib dir if necessary. 221050f2e948Smrg lt_tmp_lt_search_path_spec= 221150f2e948Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 221250f2e948Smrg for lt_sys_path in $lt_search_path_spec; do 221350f2e948Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 221450f2e948Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 221550f2e948Smrg else 221650f2e948Smrg test -d "$lt_sys_path" && \ 221750f2e948Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 22181ac89addSmrg fi 22191ac89addSmrg done 2220b40a6198Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 222150f2e948SmrgBEGIN {RS=" "; FS="/|\n";} { 222250f2e948Smrg lt_foo=""; 222350f2e948Smrg lt_count=0; 222450f2e948Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 222550f2e948Smrg if ($lt_i != "" && $lt_i != ".") { 222650f2e948Smrg if ($lt_i == "..") { 222750f2e948Smrg lt_count++; 222850f2e948Smrg } else { 222950f2e948Smrg if (lt_count == 0) { 223050f2e948Smrg lt_foo="/" $lt_i lt_foo; 223150f2e948Smrg } else { 223250f2e948Smrg lt_count--; 223350f2e948Smrg } 223450f2e948Smrg } 223550f2e948Smrg } 223650f2e948Smrg } 223750f2e948Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 223850f2e948Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 223950f2e948Smrg}'` 2240b40a6198Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2241b40a6198Smrg # for these hosts. 2242b40a6198Smrg case $host_os in 2243b40a6198Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2244b40a6198Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2245b40a6198Smrg esac 2246b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 22471ac89addSmrgelse 224850f2e948Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 224950f2e948Smrgfi]) 22505592a31fSmrglibrary_names_spec= 22515592a31fSmrglibname_spec='lib$name' 22525592a31fSmrgsoname_spec= 22535592a31fSmrgshrext_cmds=".so" 22545592a31fSmrgpostinstall_cmds= 22555592a31fSmrgpostuninstall_cmds= 22565592a31fSmrgfinish_cmds= 22575592a31fSmrgfinish_eval= 22585592a31fSmrgshlibpath_var= 22595592a31fSmrgshlibpath_overrides_runpath=unknown 22605592a31fSmrgversion_type=none 22615592a31fSmrgdynamic_linker="$host_os ld.so" 22625592a31fSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 226350f2e948Smrgneed_lib_prefix=unknown 226450f2e948Smrghardcode_into_libs=no 226545bc899bSmrg 226650f2e948Smrg# when you set need_version to no, make sure it does not cause -set_version 226750f2e948Smrg# flags to be left without arguments 226850f2e948Smrgneed_version=unknown 226945bc899bSmrg 227050f2e948Smrgcase $host_os in 227150f2e948Smrgaix3*) 2272b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 227350f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 227450f2e948Smrg shlibpath_var=LIBPATH 227545bc899bSmrg 227650f2e948Smrg # AIX 3 has no versioning support, so we append a major version to the name. 227750f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 227850f2e948Smrg ;; 227945bc899bSmrg 228050f2e948Smrgaix[[4-9]]*) 2281b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 228250f2e948Smrg need_lib_prefix=no 228350f2e948Smrg need_version=no 228450f2e948Smrg hardcode_into_libs=yes 228550f2e948Smrg if test "$host_cpu" = ia64; then 228650f2e948Smrg # AIX 5 supports IA64 228750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 228850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 228950f2e948Smrg else 229050f2e948Smrg # With GCC up to 2.95.x, collect2 would create an import file 229150f2e948Smrg # for dependence libraries. The import file would start with 229250f2e948Smrg # the line `#! .'. This would cause the generated library to 229350f2e948Smrg # depend on `.', always an invalid library. This was fixed in 229450f2e948Smrg # development snapshots of GCC prior to 3.0. 229550f2e948Smrg case $host_os in 229650f2e948Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 229750f2e948Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 229850f2e948Smrg echo ' yes ' 22995592a31fSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 230050f2e948Smrg : 230150f2e948Smrg else 230250f2e948Smrg can_build_shared=no 230350f2e948Smrg fi 23041ac89addSmrg ;; 230550f2e948Smrg esac 230650f2e948Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 230750f2e948Smrg # soname into executable. Probably we can add versioning support to 230850f2e948Smrg # collect2, so additional links can be useful in future. 230950f2e948Smrg if test "$aix_use_runtimelinking" = yes; then 231050f2e948Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 231150f2e948Smrg # instead of lib<name>.a to let people know that these are not 231250f2e948Smrg # typical AIX shared libraries. 231350f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 231450f2e948Smrg else 231550f2e948Smrg # We preserve .a as extension for shared libraries through AIX4.2 231650f2e948Smrg # and later when we are not doing run time linking. 231750f2e948Smrg library_names_spec='${libname}${release}.a $libname.a' 231850f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 23191ac89addSmrg fi 232050f2e948Smrg shlibpath_var=LIBPATH 232150f2e948Smrg fi 23221ac89addSmrg ;; 232345bc899bSmrg 232450f2e948Smrgamigaos*) 23255592a31fSmrg case $host_cpu in 23265592a31fSmrg powerpc) 23275592a31fSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 23285592a31fSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 23295592a31fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23305592a31fSmrg ;; 23315592a31fSmrg m68k) 23325592a31fSmrg library_names_spec='$libname.ixlibrary $libname.a' 23335592a31fSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2334b40a6198Smrg 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' 23355592a31fSmrg ;; 23365592a31fSmrg esac 23371ac89addSmrg ;; 233845bc899bSmrg 23391ac89addSmrgbeos*) 234050f2e948Smrg library_names_spec='${libname}${shared_ext}' 234150f2e948Smrg dynamic_linker="$host_os ld.so" 234250f2e948Smrg shlibpath_var=LIBRARY_PATH 23431ac89addSmrg ;; 234445bc899bSmrg 23451ac89addSmrgbsdi[[45]]*) 2346b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 234750f2e948Smrg need_version=no 234850f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 234950f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 235050f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 235150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 235250f2e948Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 235350f2e948Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 235450f2e948Smrg # the default ld.so.conf also contains /usr/contrib/lib and 235550f2e948Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 235650f2e948Smrg # libtool to hard-code these into programs 23571ac89addSmrg ;; 235845bc899bSmrg 23595592a31fSmrgcygwin* | mingw* | pw32* | cegcc*) 236050f2e948Smrg version_type=windows 236150f2e948Smrg shrext_cmds=".dll" 236250f2e948Smrg need_version=no 236350f2e948Smrg need_lib_prefix=no 236445bc899bSmrg 2365b40a6198Smrg case $GCC,$cc_basename in 2366b40a6198Smrg yes,*) 2367b40a6198Smrg # gcc 236850f2e948Smrg library_names_spec='$libname.dll.a' 236950f2e948Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 237050f2e948Smrg postinstall_cmds='base_file=`basename \${file}`~ 23715592a31fSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 237250f2e948Smrg dldir=$destdir/`dirname \$dlpath`~ 237350f2e948Smrg test -d \$dldir || mkdir -p \$dldir~ 237450f2e948Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 23755592a31fSmrg chmod a+x \$dldir/$dlname~ 23765592a31fSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 23775592a31fSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 23785592a31fSmrg fi' 237950f2e948Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 238050f2e948Smrg dlpath=$dir/\$dldll~ 23815592a31fSmrg $RM \$dlpath' 238250f2e948Smrg shlibpath_overrides_runpath=yes 238345bc899bSmrg 238450f2e948Smrg case $host_os in 238550f2e948Smrg cygwin*) 238650f2e948Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 238750f2e948Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2388b40a6198Smrgm4_if([$1], [],[ 2389b40a6198Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 239050f2e948Smrg ;; 23915592a31fSmrg mingw* | cegcc*) 239250f2e948Smrg # MinGW DLLs use traditional 'lib' prefix 239350f2e948Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 239450f2e948Smrg ;; 239550f2e948Smrg pw32*) 239650f2e948Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 239750f2e948Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 239845bc899bSmrg ;; 239945bc899bSmrg esac 2400b40a6198Smrg dynamic_linker='Win32 ld.exe' 2401b40a6198Smrg ;; 2402b40a6198Smrg 2403b40a6198Smrg *,cl*) 2404b40a6198Smrg # Native MSVC 2405b40a6198Smrg libname_spec='$name' 2406b40a6198Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2407b40a6198Smrg library_names_spec='${libname}.dll.lib' 2408b40a6198Smrg 2409b40a6198Smrg case $build_os in 2410b40a6198Smrg mingw*) 2411b40a6198Smrg sys_lib_search_path_spec= 2412b40a6198Smrg lt_save_ifs=$IFS 2413b40a6198Smrg IFS=';' 2414b40a6198Smrg for lt_path in $LIB 2415b40a6198Smrg do 2416b40a6198Smrg IFS=$lt_save_ifs 2417b40a6198Smrg # Let DOS variable expansion print the short 8.3 style file name. 2418b40a6198Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2419b40a6198Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2420b40a6198Smrg done 2421b40a6198Smrg IFS=$lt_save_ifs 2422b40a6198Smrg # Convert to MSYS style. 2423b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2424b40a6198Smrg ;; 2425b40a6198Smrg cygwin*) 2426b40a6198Smrg # Convert to unix form, then to dos form, then back to unix form 2427b40a6198Smrg # but this time dos style (no spaces!) so that the unix form looks 2428b40a6198Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2429b40a6198Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2430b40a6198Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2431b40a6198Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2432b40a6198Smrg ;; 2433b40a6198Smrg *) 2434b40a6198Smrg sys_lib_search_path_spec="$LIB" 2435b40a6198Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2436b40a6198Smrg # It is most probably a Windows format PATH. 2437b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2438b40a6198Smrg else 2439b40a6198Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2440b40a6198Smrg fi 2441b40a6198Smrg # FIXME: find the short name or the path components, as spaces are 2442b40a6198Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2443b40a6198Smrg ;; 2444b40a6198Smrg esac 2445b40a6198Smrg 2446b40a6198Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2447b40a6198Smrg postinstall_cmds='base_file=`basename \${file}`~ 2448b40a6198Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2449b40a6198Smrg dldir=$destdir/`dirname \$dlpath`~ 2450b40a6198Smrg test -d \$dldir || mkdir -p \$dldir~ 2451b40a6198Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2452b40a6198Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2453b40a6198Smrg dlpath=$dir/\$dldll~ 2454b40a6198Smrg $RM \$dlpath' 2455b40a6198Smrg shlibpath_overrides_runpath=yes 2456b40a6198Smrg dynamic_linker='Win32 link.exe' 245750f2e948Smrg ;; 245845bc899bSmrg 245950f2e948Smrg *) 2460b40a6198Smrg # Assume MSVC wrapper 246150f2e948Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2462b40a6198Smrg dynamic_linker='Win32 ld.exe' 246350f2e948Smrg ;; 246450f2e948Smrg esac 246550f2e948Smrg # FIXME: first we should search . and the directory the executable is in 246650f2e948Smrg shlibpath_var=PATH 24671ac89addSmrg ;; 246845bc899bSmrg 246950f2e948Smrgdarwin* | rhapsody*) 247050f2e948Smrg dynamic_linker="$host_os dyld" 247150f2e948Smrg version_type=darwin 247250f2e948Smrg need_lib_prefix=no 247350f2e948Smrg need_version=no 24745592a31fSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 247550f2e948Smrg soname_spec='${libname}${release}${major}$shared_ext' 247650f2e948Smrg shlibpath_overrides_runpath=yes 247750f2e948Smrg shlibpath_var=DYLD_LIBRARY_PATH 247850f2e948Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 24795592a31fSmrgm4_if([$1], [],[ 24805592a31fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 248150f2e948Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 248250f2e948Smrg ;; 248350f2e948Smrg 248450f2e948Smrgdgux*) 2485b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 248650f2e948Smrg need_lib_prefix=no 248750f2e948Smrg need_version=no 248850f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 248950f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 249050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 249150f2e948Smrg ;; 249250f2e948Smrg 249350f2e948Smrgfreebsd* | dragonfly*) 249450f2e948Smrg # DragonFly does not have aout. When/if they implement a new 249550f2e948Smrg # versioning mechanism, adjust this. 249650f2e948Smrg if test -x /usr/bin/objformat; then 249750f2e948Smrg objformat=`/usr/bin/objformat` 249850f2e948Smrg else 249950f2e948Smrg case $host_os in 2500b40a6198Smrg freebsd[[23]].*) objformat=aout ;; 250150f2e948Smrg *) objformat=elf ;; 250250f2e948Smrg esac 250350f2e948Smrg fi 250450f2e948Smrg version_type=freebsd-$objformat 250550f2e948Smrg case $version_type in 250650f2e948Smrg freebsd-elf*) 250750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 250850f2e948Smrg need_version=no 250950f2e948Smrg need_lib_prefix=no 251050f2e948Smrg ;; 251150f2e948Smrg freebsd-*) 251250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 251350f2e948Smrg need_version=yes 251450f2e948Smrg ;; 251550f2e948Smrg esac 251650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 251750f2e948Smrg case $host_os in 2518b40a6198Smrg freebsd2.*) 251950f2e948Smrg shlibpath_overrides_runpath=yes 252050f2e948Smrg ;; 252150f2e948Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 252250f2e948Smrg shlibpath_overrides_runpath=yes 252350f2e948Smrg hardcode_into_libs=yes 252450f2e948Smrg ;; 252550f2e948Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 252650f2e948Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 252750f2e948Smrg shlibpath_overrides_runpath=no 252850f2e948Smrg hardcode_into_libs=yes 252950f2e948Smrg ;; 253050f2e948Smrg *) # from 4.6 on, and DragonFly 253150f2e948Smrg shlibpath_overrides_runpath=yes 253250f2e948Smrg hardcode_into_libs=yes 253350f2e948Smrg ;; 253450f2e948Smrg esac 253550f2e948Smrg ;; 253650f2e948Smrg 2537b40a6198Smrghaiku*) 2538b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 2539b40a6198Smrg need_lib_prefix=no 2540b40a6198Smrg need_version=no 2541b40a6198Smrg dynamic_linker="$host_os runtime_loader" 2542b40a6198Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2543b40a6198Smrg soname_spec='${libname}${release}${shared_ext}$major' 2544b40a6198Smrg shlibpath_var=LIBRARY_PATH 2545b40a6198Smrg shlibpath_overrides_runpath=yes 2546b40a6198Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 254750f2e948Smrg hardcode_into_libs=yes 254850f2e948Smrg ;; 254950f2e948Smrg 255050f2e948Smrghpux9* | hpux10* | hpux11*) 255150f2e948Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 255250f2e948Smrg # link against other versions. 255350f2e948Smrg version_type=sunos 255450f2e948Smrg need_lib_prefix=no 255550f2e948Smrg need_version=no 255650f2e948Smrg case $host_cpu in 25571ac89addSmrg ia64*) 255850f2e948Smrg shrext_cmds='.so' 255950f2e948Smrg hardcode_into_libs=yes 256050f2e948Smrg dynamic_linker="$host_os dld.so" 256150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 256250f2e948Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 256350f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 256450f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 256550f2e948Smrg if test "X$HPUX_IA64_MODE" = X32; then 256650f2e948Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 256750f2e948Smrg else 256850f2e948Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 256950f2e948Smrg fi 257050f2e948Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 257145bc899bSmrg ;; 25725592a31fSmrg hppa*64*) 25735592a31fSmrg shrext_cmds='.sl' 25745592a31fSmrg hardcode_into_libs=yes 25755592a31fSmrg dynamic_linker="$host_os dld.sl" 25765592a31fSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 25775592a31fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25785592a31fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25795592a31fSmrg soname_spec='${libname}${release}${shared_ext}$major' 25805592a31fSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 25815592a31fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25825592a31fSmrg ;; 25835592a31fSmrg *) 258450f2e948Smrg shrext_cmds='.sl' 258550f2e948Smrg dynamic_linker="$host_os dld.sl" 258650f2e948Smrg shlibpath_var=SHLIB_PATH 258750f2e948Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 258850f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 258950f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 259045bc899bSmrg ;; 25911ac89addSmrg esac 2592b40a6198Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 259350f2e948Smrg postinstall_cmds='chmod 555 $lib' 2594b40a6198Smrg # or fails outright, so override atomically: 2595b40a6198Smrg install_override_mode=555 25961ac89addSmrg ;; 259745bc899bSmrg 259850f2e948Smrginterix[[3-9]]*) 2599b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 260050f2e948Smrg need_lib_prefix=no 260150f2e948Smrg need_version=no 260250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 260350f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 260450f2e948Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 260550f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 260650f2e948Smrg shlibpath_overrides_runpath=no 260750f2e948Smrg hardcode_into_libs=yes 26081ac89addSmrg ;; 260945bc899bSmrg 26101ac89addSmrgirix5* | irix6* | nonstopux*) 261150f2e948Smrg case $host_os in 261250f2e948Smrg nonstopux*) version_type=nonstopux ;; 261350f2e948Smrg *) 261450f2e948Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2615b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 261650f2e948Smrg else 261750f2e948Smrg version_type=irix 261850f2e948Smrg fi ;; 26191ac89addSmrg esac 262050f2e948Smrg need_lib_prefix=no 262150f2e948Smrg need_version=no 262250f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 262350f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 262450f2e948Smrg case $host_os in 262550f2e948Smrg irix5* | nonstopux*) 262650f2e948Smrg libsuff= shlibsuff= 262750f2e948Smrg ;; 262850f2e948Smrg *) 262950f2e948Smrg case $LD in # libtool.m4 will add one of these switches to LD 263050f2e948Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 263150f2e948Smrg libsuff= shlibsuff= libmagic=32-bit;; 263250f2e948Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 263350f2e948Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 263450f2e948Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 263550f2e948Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 263650f2e948Smrg *) libsuff= shlibsuff= libmagic=never-match;; 263750f2e948Smrg esac 263850f2e948Smrg ;; 263950f2e948Smrg esac 264050f2e948Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 264150f2e948Smrg shlibpath_overrides_runpath=no 264250f2e948Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 264350f2e948Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 264450f2e948Smrg hardcode_into_libs=yes 264550f2e948Smrg ;; 264650f2e948Smrg 264750f2e948Smrg# No shared lib support for Linux oldld, aout, or coff. 264850f2e948Smrglinux*oldld* | linux*aout* | linux*coff*) 264950f2e948Smrg dynamic_linker=no 26501ac89addSmrg ;; 265145bc899bSmrg 2652b40a6198Smrg# This must be glibc/ELF. 2653c97b1c41Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2654b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 265550f2e948Smrg need_lib_prefix=no 265650f2e948Smrg need_version=no 265750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 265850f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 265950f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 266050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 266150f2e948Smrg shlibpath_overrides_runpath=no 2662b40a6198Smrg 26635592a31fSmrg # Some binutils ld are patched to set DT_RUNPATH 2664b40a6198Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2665b40a6198Smrg [lt_cv_shlibpath_overrides_runpath=no 2666b40a6198Smrg save_LDFLAGS=$LDFLAGS 2667b40a6198Smrg save_libdir=$libdir 2668b40a6198Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2669b40a6198Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2670b40a6198Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2671b40a6198Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2672b40a6198Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2673b40a6198Smrg LDFLAGS=$save_LDFLAGS 2674b40a6198Smrg libdir=$save_libdir 2675b40a6198Smrg ]) 2676b40a6198Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 26775592a31fSmrg 267850f2e948Smrg # This implies no fast_install, which is unacceptable. 267950f2e948Smrg # Some rework will be needed to allow for fast_install 268050f2e948Smrg # before this can be enabled. 268150f2e948Smrg hardcode_into_libs=yes 26825592a31fSmrg 268350f2e948Smrg # Append ld.so.conf contents to the search path 268450f2e948Smrg if test -f /etc/ld.so.conf; then 2685b40a6198Smrg 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' ' '` 2686c97b1c41Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 268750f2e948Smrg fi 268850f2e948Smrg 268950f2e948Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 269050f2e948Smrg # powerpc, because MkLinux only supported shared libraries with the 269150f2e948Smrg # GNU dynamic linker. Since this was broken with cross compilers, 269250f2e948Smrg # most powerpc-linux boxes support dynamic linking these days and 269350f2e948Smrg # people can always --disable-shared, the test was removed, and we 269450f2e948Smrg # assume the GNU/Linux dynamic linker is in use. 269550f2e948Smrg dynamic_linker='GNU/Linux ld.so' 26961ac89addSmrg ;; 269745bc899bSmrg 2698c97b1c41Smrgnetbsdelf*-gnu) 2699c97b1c41Smrg version_type=linux 2700c97b1c41Smrg need_lib_prefix=no 2701c97b1c41Smrg need_version=no 2702c97b1c41Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2703c97b1c41Smrg soname_spec='${libname}${release}${shared_ext}$major' 2704c97b1c41Smrg shlibpath_var=LD_LIBRARY_PATH 2705c97b1c41Smrg shlibpath_overrides_runpath=no 2706c97b1c41Smrg hardcode_into_libs=yes 2707c97b1c41Smrg dynamic_linker='NetBSD ld.elf_so' 2708c97b1c41Smrg ;; 2709c97b1c41Smrg 27101ac89addSmrgnetbsd*) 271150f2e948Smrg version_type=sunos 271250f2e948Smrg need_lib_prefix=no 271350f2e948Smrg need_version=no 27145592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 271550f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 271650f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 271750f2e948Smrg dynamic_linker='NetBSD (a.out) ld.so' 27181ac89addSmrg else 271950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 272050f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 272150f2e948Smrg dynamic_linker='NetBSD ld.elf_so' 27221ac89addSmrg fi 272350f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 272450f2e948Smrg shlibpath_overrides_runpath=yes 272550f2e948Smrg hardcode_into_libs=yes 27261ac89addSmrg ;; 272745bc899bSmrg 272850f2e948Smrgnewsos6) 2729b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 273050f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 273150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 273250f2e948Smrg shlibpath_overrides_runpath=yes 27331ac89addSmrg ;; 273445bc899bSmrg 27355592a31fSmrg*nto* | *qnx*) 27365592a31fSmrg version_type=qnx 273750f2e948Smrg need_lib_prefix=no 273850f2e948Smrg need_version=no 273950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 274050f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 274150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 27425592a31fSmrg shlibpath_overrides_runpath=no 27435592a31fSmrg hardcode_into_libs=yes 27445592a31fSmrg dynamic_linker='ldqnx.so' 27451ac89addSmrg ;; 274645bc899bSmrg 27471ac89addSmrgopenbsd*) 274850f2e948Smrg version_type=sunos 274950f2e948Smrg sys_lib_dlsearch_path_spec="/usr/lib" 275050f2e948Smrg need_lib_prefix=no 275150f2e948Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 275250f2e948Smrg case $host_os in 27535592a31fSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 27545592a31fSmrg *) need_version=no ;; 275550f2e948Smrg esac 275650f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 275750f2e948Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 275850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 27595592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 276050f2e948Smrg case $host_os in 276150f2e948Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 276250f2e948Smrg shlibpath_overrides_runpath=no 276350f2e948Smrg ;; 276450f2e948Smrg *) 276550f2e948Smrg shlibpath_overrides_runpath=yes 276650f2e948Smrg ;; 276750f2e948Smrg esac 27681ac89addSmrg else 276950f2e948Smrg shlibpath_overrides_runpath=yes 27701ac89addSmrg fi 27711ac89addSmrg ;; 277245bc899bSmrg 277350f2e948Smrgos2*) 277450f2e948Smrg libname_spec='$name' 277550f2e948Smrg shrext_cmds=".dll" 277650f2e948Smrg need_lib_prefix=no 277750f2e948Smrg library_names_spec='$libname${shared_ext} $libname.a' 277850f2e948Smrg dynamic_linker='OS/2 ld.exe' 277950f2e948Smrg shlibpath_var=LIBPATH 27801ac89addSmrg ;; 27811ac89addSmrg 278250f2e948Smrgosf3* | osf4* | osf5*) 278350f2e948Smrg version_type=osf 278450f2e948Smrg need_lib_prefix=no 278550f2e948Smrg need_version=no 278650f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 278750f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 278850f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 278950f2e948Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 279050f2e948Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 27911ac89addSmrg ;; 279245bc899bSmrg 279350f2e948Smrgrdos*) 279450f2e948Smrg dynamic_linker=no 27951ac89addSmrg ;; 279645bc899bSmrg 279750f2e948Smrgsolaris*) 2798b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 279950f2e948Smrg need_lib_prefix=no 280050f2e948Smrg need_version=no 280150f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 280250f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 280350f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 280450f2e948Smrg shlibpath_overrides_runpath=yes 280550f2e948Smrg hardcode_into_libs=yes 280650f2e948Smrg # ldd complains unless libraries are executable 280750f2e948Smrg postinstall_cmds='chmod +x $lib' 280850f2e948Smrg ;; 280945bc899bSmrg 281050f2e948Smrgsunos4*) 281150f2e948Smrg version_type=sunos 281250f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 281350f2e948Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 281450f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 281550f2e948Smrg shlibpath_overrides_runpath=yes 281650f2e948Smrg if test "$with_gnu_ld" = yes; then 281750f2e948Smrg need_lib_prefix=no 28181ac89addSmrg fi 281950f2e948Smrg need_version=yes 282045bc899bSmrg ;; 282145bc899bSmrg 282250f2e948Smrgsysv4 | sysv4.3*) 2823b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 282450f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 282550f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 282650f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 282750f2e948Smrg case $host_vendor in 282850f2e948Smrg sni) 282950f2e948Smrg shlibpath_overrides_runpath=no 283050f2e948Smrg need_lib_prefix=no 283150f2e948Smrg runpath_var=LD_RUN_PATH 283250f2e948Smrg ;; 283350f2e948Smrg siemens) 283450f2e948Smrg need_lib_prefix=no 283550f2e948Smrg ;; 283650f2e948Smrg motorola) 283750f2e948Smrg need_lib_prefix=no 283850f2e948Smrg need_version=no 283950f2e948Smrg shlibpath_overrides_runpath=no 284050f2e948Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 284150f2e948Smrg ;; 2842226fade8Smrg esac 284350f2e948Smrg ;; 284445bc899bSmrg 284550f2e948Smrgsysv4*MP*) 284650f2e948Smrg if test -d /usr/nec ;then 2847b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 284850f2e948Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 284950f2e948Smrg soname_spec='$libname${shared_ext}.$major' 285050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 285150f2e948Smrg fi 285250f2e948Smrg ;; 285345bc899bSmrg 285450f2e948Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 285550f2e948Smrg version_type=freebsd-elf 285650f2e948Smrg need_lib_prefix=no 285750f2e948Smrg need_version=no 285850f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 285950f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 286050f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 28615592a31fSmrg shlibpath_overrides_runpath=yes 286250f2e948Smrg hardcode_into_libs=yes 286350f2e948Smrg if test "$with_gnu_ld" = yes; then 286450f2e948Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2865226fade8Smrg else 286650f2e948Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 286750f2e948Smrg case $host_os in 286850f2e948Smrg sco3.2v5*) 286950f2e948Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 287050f2e948Smrg ;; 287150f2e948Smrg esac 2872226fade8Smrg fi 287350f2e948Smrg sys_lib_dlsearch_path_spec='/usr/lib' 287450f2e948Smrg ;; 287545bc899bSmrg 28765592a31fSmrgtpf*) 28775592a31fSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2878b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 28795592a31fSmrg need_lib_prefix=no 28805592a31fSmrg need_version=no 28815592a31fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28825592a31fSmrg shlibpath_var=LD_LIBRARY_PATH 28835592a31fSmrg shlibpath_overrides_runpath=no 28845592a31fSmrg hardcode_into_libs=yes 28855592a31fSmrg ;; 28865592a31fSmrg 288750f2e948Smrguts4*) 2888b40a6198Smrg version_type=linux # correct to gnu/linux during the next big refactor 288950f2e948Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 289050f2e948Smrg soname_spec='${libname}${release}${shared_ext}$major' 289150f2e948Smrg shlibpath_var=LD_LIBRARY_PATH 289250f2e948Smrg ;; 2893226fade8Smrg 289450f2e948Smrg*) 289550f2e948Smrg dynamic_linker=no 289650f2e948Smrg ;; 289750f2e948Smrgesac 289850f2e948SmrgAC_MSG_RESULT([$dynamic_linker]) 289950f2e948Smrgtest "$dynamic_linker" = no && can_build_shared=no 2900226fade8Smrg 290150f2e948Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 290250f2e948Smrgif test "$GCC" = yes; then 290350f2e948Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 29041ac89addSmrgfi 290545bc899bSmrg 29065592a31fSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 29075592a31fSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 29085592a31fSmrgfi 29095592a31fSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 29105592a31fSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 29115592a31fSmrgfi 291245bc899bSmrg 29135592a31fSmrg_LT_DECL([], [variables_saved_for_relink], [1], 29145592a31fSmrg [Variables whose values should be saved in libtool wrapper scripts and 29155592a31fSmrg restored at link time]) 29165592a31fSmrg_LT_DECL([], [need_lib_prefix], [0], 29175592a31fSmrg [Do we need the "lib" prefix for modules?]) 29185592a31fSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 29195592a31fSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 29205592a31fSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 29215592a31fSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 29225592a31fSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 29235592a31fSmrg [Is shlibpath searched before the hard-coded library search path?]) 29245592a31fSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 29255592a31fSmrg_LT_DECL([], [library_names_spec], [1], 29265592a31fSmrg [[List of archive names. First name is the real one, the rest are links. 29275592a31fSmrg The last name is the one that the linker finds with -lNAME]]) 29285592a31fSmrg_LT_DECL([], [soname_spec], [1], 29295592a31fSmrg [[The coded name of the library, if different from the real name]]) 2930b40a6198Smrg_LT_DECL([], [install_override_mode], [1], 2931b40a6198Smrg [Permission mode override for installation of shared libraries]) 29325592a31fSmrg_LT_DECL([], [postinstall_cmds], [2], 29335592a31fSmrg [Command to use after installation of a shared archive]) 29345592a31fSmrg_LT_DECL([], [postuninstall_cmds], [2], 29355592a31fSmrg [Command to use after uninstallation of a shared archive]) 29365592a31fSmrg_LT_DECL([], [finish_cmds], [2], 29375592a31fSmrg [Commands used to finish a libtool library installation in a directory]) 29385592a31fSmrg_LT_DECL([], [finish_eval], [1], 29395592a31fSmrg [[As "finish_cmds", except a single script fragment to be evaled but 29405592a31fSmrg not shown]]) 29415592a31fSmrg_LT_DECL([], [hardcode_into_libs], [0], 29425592a31fSmrg [Whether we should hardcode library paths into libraries]) 29435592a31fSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 29445592a31fSmrg [Compile-time system search path for libraries]) 29455592a31fSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 29465592a31fSmrg [Run-time system search path for libraries]) 29475592a31fSmrg])# _LT_SYS_DYNAMIC_LINKER 29485592a31fSmrg 29495592a31fSmrg 29505592a31fSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 29513a925b30Smrg# -------------------------- 29523a925b30Smrg# find a file program which can recognize shared library 29535592a31fSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 29545592a31fSmrg[m4_require([_LT_DECL_EGREP])dnl 29553a925b30SmrgAC_MSG_CHECKING([for $1]) 29563a925b30SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 29573a925b30Smrg[case $MAGIC_CMD in 29583a925b30Smrg[[\\/*] | ?:[\\/]*]) 295950f2e948Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 296050f2e948Smrg ;; 296150f2e948Smrg*) 296250f2e948Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 296350f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 296450f2e948Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 296550f2e948Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 296650f2e948Smrgdnl not every word. This closes a longstanding sh security hole. 29675592a31fSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 296850f2e948Smrg for ac_dir in $ac_dummy; do 296950f2e948Smrg IFS="$lt_save_ifs" 297050f2e948Smrg test -z "$ac_dir" && ac_dir=. 297150f2e948Smrg if test -f $ac_dir/$1; then 297250f2e948Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 297350f2e948Smrg if test -n "$file_magic_test_file"; then 297450f2e948Smrg case $deplibs_check_method in 297550f2e948Smrg "file_magic "*) 297650f2e948Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 297750f2e948Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 297850f2e948Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 297950f2e948Smrg $EGREP "$file_magic_regex" > /dev/null; then 298050f2e948Smrg : 298150f2e948Smrg else 29825592a31fSmrg cat <<_LT_EOF 1>&2 298345bc899bSmrg 298450f2e948Smrg*** Warning: the command libtool uses to detect shared libraries, 298550f2e948Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 298650f2e948Smrg*** The result is that libtool may fail to recognize shared libraries 298750f2e948Smrg*** as such. This will affect the creation of libtool libraries that 298850f2e948Smrg*** depend on shared libraries, but programs linked with such libtool 298950f2e948Smrg*** libraries will work regardless of this problem. Nevertheless, you 299050f2e948Smrg*** may want to report the problem to your system manager and/or to 299150f2e948Smrg*** bug-libtool@gnu.org 299245bc899bSmrg 29935592a31fSmrg_LT_EOF 299450f2e948Smrg fi ;; 299550f2e948Smrg esac 299650f2e948Smrg fi 299750f2e948Smrg break 299850f2e948Smrg fi 299950f2e948Smrg done 300050f2e948Smrg IFS="$lt_save_ifs" 300150f2e948Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 300245bc899bSmrg ;; 300350f2e948Smrgesac]) 300450f2e948SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 300550f2e948Smrgif test -n "$MAGIC_CMD"; then 300650f2e948Smrg AC_MSG_RESULT($MAGIC_CMD) 300750f2e948Smrgelse 300850f2e948Smrg AC_MSG_RESULT(no) 300950f2e948Smrgfi 30105592a31fSmrg_LT_DECL([], [MAGIC_CMD], [0], 30115592a31fSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 30125592a31fSmrg])# _LT_PATH_TOOL_PREFIX 301345bc899bSmrg 30145592a31fSmrg# Old name: 30155592a31fSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 30165592a31fSmrgdnl aclocal-1.4 backwards compatibility: 30175592a31fSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 301845bc899bSmrg 30195592a31fSmrg 30205592a31fSmrg# _LT_PATH_MAGIC 30215592a31fSmrg# -------------- 302250f2e948Smrg# find a file program which can recognize a shared library 30235592a31fSmrgm4_defun([_LT_PATH_MAGIC], 30245592a31fSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 302550f2e948Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 302650f2e948Smrg if test -n "$ac_tool_prefix"; then 30275592a31fSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 302850f2e948Smrg else 302950f2e948Smrg MAGIC_CMD=: 303050f2e948Smrg fi 303150f2e948Smrgfi 30325592a31fSmrg])# _LT_PATH_MAGIC 303345bc899bSmrg 303445bc899bSmrg 30355592a31fSmrg# LT_PATH_LD 303650f2e948Smrg# ---------- 303750f2e948Smrg# find the pathname to the GNU or non-GNU linker 30385592a31fSmrgAC_DEFUN([LT_PATH_LD], 30395592a31fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 30403a925b30SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 30413a925b30SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 30425592a31fSmrgm4_require([_LT_DECL_SED])dnl 30435592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 3044b40a6198Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 30455592a31fSmrg 30465592a31fSmrgAC_ARG_WITH([gnu-ld], 30475592a31fSmrg [AS_HELP_STRING([--with-gnu-ld], 30485592a31fSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 30495592a31fSmrg [test "$withval" = no || with_gnu_ld=yes], 30505592a31fSmrg [with_gnu_ld=no])dnl 30515592a31fSmrg 305250f2e948Smrgac_prog=ld 305350f2e948Smrgif test "$GCC" = yes; then 305450f2e948Smrg # Check if gcc -print-prog-name=ld gives a path. 305550f2e948Smrg AC_MSG_CHECKING([for ld used by $CC]) 305650f2e948Smrg case $host in 305750f2e948Smrg *-*-mingw*) 305850f2e948Smrg # gcc leaves a trailing carriage return which upsets mingw 305950f2e948Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 306050f2e948Smrg *) 306150f2e948Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 306250f2e948Smrg esac 306350f2e948Smrg case $ac_prog in 306450f2e948Smrg # Accept absolute paths. 306550f2e948Smrg [[\\/]]* | ?:[[\\/]]*) 306650f2e948Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 306750f2e948Smrg # Canonicalize the pathname of ld 30685592a31fSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 30695592a31fSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 30705592a31fSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 307150f2e948Smrg done 307250f2e948Smrg test -z "$LD" && LD="$ac_prog" 307350f2e948Smrg ;; 307450f2e948Smrg "") 307550f2e948Smrg # If it fails, then pretend we aren't using GCC. 307650f2e948Smrg ac_prog=ld 307750f2e948Smrg ;; 307850f2e948Smrg *) 307950f2e948Smrg # If it is relative, then search for the first ld in PATH. 308050f2e948Smrg with_gnu_ld=unknown 308150f2e948Smrg ;; 308250f2e948Smrg esac 308350f2e948Smrgelif test "$with_gnu_ld" = yes; then 308450f2e948Smrg AC_MSG_CHECKING([for GNU ld]) 3085226fade8Smrgelse 308650f2e948Smrg AC_MSG_CHECKING([for non-GNU ld]) 3087226fade8Smrgfi 308850f2e948SmrgAC_CACHE_VAL(lt_cv_path_LD, 308950f2e948Smrg[if test -z "$LD"; then 309050f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 309150f2e948Smrg for ac_dir in $PATH; do 309250f2e948Smrg IFS="$lt_save_ifs" 309350f2e948Smrg test -z "$ac_dir" && ac_dir=. 309450f2e948Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 309550f2e948Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 309650f2e948Smrg # Check to see if the program is GNU ld. I'd rather use --version, 309750f2e948Smrg # but apparently some variants of GNU ld only accept -v. 309850f2e948Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 309950f2e948Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 310050f2e948Smrg *GNU* | *'with BFD'*) 310150f2e948Smrg test "$with_gnu_ld" != no && break 310250f2e948Smrg ;; 310350f2e948Smrg *) 310450f2e948Smrg test "$with_gnu_ld" != yes && break 310550f2e948Smrg ;; 310650f2e948Smrg esac 310750f2e948Smrg fi 310850f2e948Smrg done 310950f2e948Smrg IFS="$lt_save_ifs" 3110226fade8Smrgelse 311150f2e948Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 311250f2e948Smrgfi]) 311350f2e948SmrgLD="$lt_cv_path_LD" 311450f2e948Smrgif test -n "$LD"; then 311550f2e948Smrg AC_MSG_RESULT($LD) 3116226fade8Smrgelse 311750f2e948Smrg AC_MSG_RESULT(no) 3118226fade8Smrgfi 311950f2e948Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 31205592a31fSmrg_LT_PATH_LD_GNU 31215592a31fSmrgAC_SUBST([LD]) 3122226fade8Smrg 31235592a31fSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 31245592a31fSmrg])# LT_PATH_LD 3125226fade8Smrg 31265592a31fSmrg# Old names: 31275592a31fSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 31285592a31fSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 31295592a31fSmrgdnl aclocal-1.4 backwards compatibility: 31305592a31fSmrgdnl AC_DEFUN([AM_PROG_LD], []) 31315592a31fSmrgdnl AC_DEFUN([AC_PROG_LD], []) 31325592a31fSmrg 31335592a31fSmrg 31345592a31fSmrg# _LT_PATH_LD_GNU 31355592a31fSmrg#- -------------- 31365592a31fSmrgm4_defun([_LT_PATH_LD_GNU], 31375592a31fSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 313850f2e948Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 313950f2e948Smrgcase `$LD -v 2>&1 </dev/null` in 314050f2e948Smrg*GNU* | *'with BFD'*) 314150f2e948Smrg lt_cv_prog_gnu_ld=yes 314250f2e948Smrg ;; 314350f2e948Smrg*) 314450f2e948Smrg lt_cv_prog_gnu_ld=no 314550f2e948Smrg ;; 314650f2e948Smrgesac]) 314750f2e948Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 31485592a31fSmrg])# _LT_PATH_LD_GNU 3149226fade8Smrg 3150226fade8Smrg 31515592a31fSmrg# _LT_CMD_RELOAD 31525592a31fSmrg# -------------- 315350f2e948Smrg# find reload flag for linker 315450f2e948Smrg# -- PORTME Some linkers may need a different reload flag. 31555592a31fSmrgm4_defun([_LT_CMD_RELOAD], 315650f2e948Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 315750f2e948Smrg lt_cv_ld_reload_flag, 315850f2e948Smrg [lt_cv_ld_reload_flag='-r']) 315950f2e948Smrgreload_flag=$lt_cv_ld_reload_flag 316050f2e948Smrgcase $reload_flag in 316150f2e948Smrg"" | " "*) ;; 316250f2e948Smrg*) reload_flag=" $reload_flag" ;; 316350f2e948Smrgesac 316450f2e948Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 316550f2e948Smrgcase $host_os in 3166b40a6198Smrg cygwin* | mingw* | pw32* | cegcc*) 3167b40a6198Smrg if test "$GCC" != yes; then 3168b40a6198Smrg reload_cmds=false 3169b40a6198Smrg fi 3170b40a6198Smrg ;; 317150f2e948Smrg darwin*) 317250f2e948Smrg if test "$GCC" = yes; then 317350f2e948Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 31741ac89addSmrg else 317550f2e948Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 31761ac89addSmrg fi 317750f2e948Smrg ;; 317850f2e948Smrgesac 3179b40a6198Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3180b40a6198Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 31815592a31fSmrg])# _LT_CMD_RELOAD 318245bc899bSmrg 3183226fade8Smrg 31845592a31fSmrg# _LT_CHECK_MAGIC_METHOD 31855592a31fSmrg# ---------------------- 318650f2e948Smrg# how to check for library dependencies 318750f2e948Smrg# -- PORTME fill in with the dynamic library characteristics 31885592a31fSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 31895592a31fSmrg[m4_require([_LT_DECL_EGREP]) 31905592a31fSmrgm4_require([_LT_DECL_OBJDUMP]) 31915592a31fSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 319250f2e948Smrglt_cv_deplibs_check_method, 319350f2e948Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 319450f2e948Smrglt_cv_file_magic_test_file= 319550f2e948Smrglt_cv_deplibs_check_method='unknown' 319650f2e948Smrg# Need to set the preceding variable on all platforms that support 319750f2e948Smrg# interlibrary dependencies. 319850f2e948Smrg# 'none' -- dependencies not supported. 319950f2e948Smrg# `unknown' -- same as none, but documents that we really don't know. 320050f2e948Smrg# 'pass_all' -- all dependencies passed with no checks. 320150f2e948Smrg# 'test_compile' -- check by making test program. 320250f2e948Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 320350f2e948Smrg# which responds to the $file_magic_cmd with a given extended regex. 320450f2e948Smrg# If you have `file' or equivalent on your system and you're not sure 320550f2e948Smrg# whether `pass_all' will *always* work, you probably want this one. 320645bc899bSmrg 3207226fade8Smrgcase $host_os in 320850f2e948Smrgaix[[4-9]]*) 320950f2e948Smrg lt_cv_deplibs_check_method=pass_all 321050f2e948Smrg ;; 321145bc899bSmrg 321250f2e948Smrgbeos*) 321350f2e948Smrg lt_cv_deplibs_check_method=pass_all 321450f2e948Smrg ;; 321545bc899bSmrg 321650f2e948Smrgbsdi[[45]]*) 321750f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 321850f2e948Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 321950f2e948Smrg lt_cv_file_magic_test_file=/shlib/libc.so 322050f2e948Smrg ;; 322145bc899bSmrg 322250f2e948Smrgcygwin*) 322350f2e948Smrg # func_win32_libid is a shell function defined in ltmain.sh 322450f2e948Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 322550f2e948Smrg lt_cv_file_magic_cmd='func_win32_libid' 322650f2e948Smrg ;; 322745bc899bSmrg 322850f2e948Smrgmingw* | pw32*) 322950f2e948Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 323050f2e948Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 323150f2e948Smrg # unless we find 'file', for example because we are cross-compiling. 3232b40a6198Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3233b40a6198Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 323450f2e948Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 323550f2e948Smrg lt_cv_file_magic_cmd='func_win32_libid' 323650f2e948Smrg else 3237b40a6198Smrg # Keep this pattern in sync with the one in func_win32_libid. 3238b40a6198Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 323950f2e948Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 324050f2e948Smrg fi 324150f2e948Smrg ;; 324245bc899bSmrg 3243b40a6198Smrgcegcc*) 32445592a31fSmrg # use the weaker test based on 'objdump'. See mingw*. 32455592a31fSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 32465592a31fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32475592a31fSmrg ;; 32485592a31fSmrg 324950f2e948Smrgdarwin* | rhapsody*) 325050f2e948Smrg lt_cv_deplibs_check_method=pass_all 325150f2e948Smrg ;; 3252226fade8Smrg 325350f2e948Smrgfreebsd* | dragonfly*) 32545592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3255226fade8Smrg case $host_cpu in 325650f2e948Smrg i*86 ) 325750f2e948Smrg # Not sure whether the presence of OpenBSD here was a mistake. 325850f2e948Smrg # Let's accept both of them until this is cleared up. 325950f2e948Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 326050f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 326150f2e948Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3262226fade8Smrg ;; 3263226fade8Smrg esac 326450f2e948Smrg else 326550f2e948Smrg lt_cv_deplibs_check_method=pass_all 326650f2e948Smrg fi 326750f2e948Smrg ;; 3268226fade8Smrg 3269b40a6198Smrghaiku*) 3270b40a6198Smrg lt_cv_deplibs_check_method=pass_all 3271b40a6198Smrg ;; 3272b40a6198Smrg 327350f2e948Smrghpux10.20* | hpux11*) 327450f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 327550f2e948Smrg case $host_cpu in 327650f2e948Smrg ia64*) 327750f2e948Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 327850f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3279226fade8Smrg ;; 328050f2e948Smrg hppa*64*) 3281b40a6198Smrg [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]'] 328250f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3283226fade8Smrg ;; 328450f2e948Smrg *) 3285b40a6198Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 328650f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3287226fade8Smrg ;; 328850f2e948Smrg esac 328950f2e948Smrg ;; 3290226fade8Smrg 329150f2e948Smrginterix[[3-9]]*) 329250f2e948Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 329350f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 329450f2e948Smrg ;; 3295226fade8Smrg 329650f2e948Smrgirix5* | irix6* | nonstopux*) 329750f2e948Smrg case $LD in 329850f2e948Smrg *-32|*"-32 ") libmagic=32-bit;; 329950f2e948Smrg *-n32|*"-n32 ") libmagic=N32;; 330050f2e948Smrg *-64|*"-64 ") libmagic=64-bit;; 330150f2e948Smrg *) libmagic=never-match;; 330250f2e948Smrg esac 330350f2e948Smrg lt_cv_deplibs_check_method=pass_all 330450f2e948Smrg ;; 3305226fade8Smrg 3306b40a6198Smrg# This must be glibc/ELF. 3307c97b1c41Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 330850f2e948Smrg lt_cv_deplibs_check_method=pass_all 330950f2e948Smrg ;; 3310226fade8Smrg 3311c97b1c41Smrgnetbsd* | netbsdelf*-gnu) 33125592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 331350f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 331450f2e948Smrg else 331550f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 331650f2e948Smrg fi 331750f2e948Smrg ;; 3318226fade8Smrg 331950f2e948Smrgnewos6*) 332050f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 332150f2e948Smrg lt_cv_file_magic_cmd=/usr/bin/file 332250f2e948Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 332350f2e948Smrg ;; 3324226fade8Smrg 33255592a31fSmrg*nto* | *qnx*) 33265592a31fSmrg lt_cv_deplibs_check_method=pass_all 332750f2e948Smrg ;; 3328226fade8Smrg 332950f2e948Smrgopenbsd*) 33305592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 333150f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 333250f2e948Smrg else 333350f2e948Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 333450f2e948Smrg fi 333550f2e948Smrg ;; 3336226fade8Smrg 333750f2e948Smrgosf3* | osf4* | osf5*) 333850f2e948Smrg lt_cv_deplibs_check_method=pass_all 333950f2e948Smrg ;; 3340226fade8Smrg 334150f2e948Smrgrdos*) 334250f2e948Smrg lt_cv_deplibs_check_method=pass_all 334350f2e948Smrg ;; 3344226fade8Smrg 334550f2e948Smrgsolaris*) 334650f2e948Smrg lt_cv_deplibs_check_method=pass_all 334750f2e948Smrg ;; 334850f2e948Smrg 33495592a31fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 33505592a31fSmrg lt_cv_deplibs_check_method=pass_all 33515592a31fSmrg ;; 33525592a31fSmrg 335350f2e948Smrgsysv4 | sysv4.3*) 335450f2e948Smrg case $host_vendor in 335550f2e948Smrg motorola) 335650f2e948Smrg 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]]' 335750f2e948Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3358226fade8Smrg ;; 335950f2e948Smrg ncr) 336050f2e948Smrg lt_cv_deplibs_check_method=pass_all 3361226fade8Smrg ;; 336250f2e948Smrg sequent) 336350f2e948Smrg lt_cv_file_magic_cmd='/bin/file' 336450f2e948Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3365226fade8Smrg ;; 336650f2e948Smrg sni) 336750f2e948Smrg lt_cv_file_magic_cmd='/bin/file' 336850f2e948Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 336950f2e948Smrg lt_cv_file_magic_test_file=/lib/libc.so 337050f2e948Smrg ;; 337150f2e948Smrg siemens) 337250f2e948Smrg lt_cv_deplibs_check_method=pass_all 337350f2e948Smrg ;; 337450f2e948Smrg pc) 337550f2e948Smrg lt_cv_deplibs_check_method=pass_all 337650f2e948Smrg ;; 337750f2e948Smrg esac 337850f2e948Smrg ;; 337945bc899bSmrg 33805592a31fSmrgtpf*) 338150f2e948Smrg lt_cv_deplibs_check_method=pass_all 338250f2e948Smrg ;; 3383226fade8Smrgesac 3384226fade8Smrg]) 3385b40a6198Smrg 3386b40a6198Smrgfile_magic_glob= 3387b40a6198Smrgwant_nocaseglob=no 3388b40a6198Smrgif test "$build" = "$host"; then 3389b40a6198Smrg case $host_os in 3390b40a6198Smrg mingw* | pw32*) 3391b40a6198Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3392b40a6198Smrg want_nocaseglob=yes 3393b40a6198Smrg else 3394b40a6198Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3395b40a6198Smrg fi 3396b40a6198Smrg ;; 3397b40a6198Smrg esac 3398b40a6198Smrgfi 3399b40a6198Smrg 340050f2e948Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 340150f2e948Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 340250f2e948Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 34035592a31fSmrg 34045592a31fSmrg_LT_DECL([], [deplibs_check_method], [1], 34055592a31fSmrg [Method to check whether dependent libraries are shared objects]) 34065592a31fSmrg_LT_DECL([], [file_magic_cmd], [1], 3407b40a6198Smrg [Command to use when deplibs_check_method = "file_magic"]) 3408b40a6198Smrg_LT_DECL([], [file_magic_glob], [1], 3409b40a6198Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3410b40a6198Smrg_LT_DECL([], [want_nocaseglob], [1], 3411b40a6198Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 34125592a31fSmrg])# _LT_CHECK_MAGIC_METHOD 3413226fade8Smrg 341445bc899bSmrg 34155592a31fSmrg# LT_PATH_NM 341650f2e948Smrg# ---------- 34175592a31fSmrg# find the pathname to a BSD- or MS-compatible name lister 34185592a31fSmrgAC_DEFUN([LT_PATH_NM], 34195592a31fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 34205592a31fSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 342150f2e948Smrg[if test -n "$NM"; then 342250f2e948Smrg # Let the user override the test. 342350f2e948Smrg lt_cv_path_NM="$NM" 342450f2e948Smrgelse 342550f2e948Smrg lt_nm_to_check="${ac_tool_prefix}nm" 342650f2e948Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 342750f2e948Smrg lt_nm_to_check="$lt_nm_to_check nm" 342850f2e948Smrg fi 342950f2e948Smrg for lt_tmp_nm in $lt_nm_to_check; do 343050f2e948Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 343150f2e948Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 343250f2e948Smrg IFS="$lt_save_ifs" 343350f2e948Smrg test -z "$ac_dir" && ac_dir=. 343450f2e948Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 343550f2e948Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 343650f2e948Smrg # Check to see if the nm accepts a BSD-compat flag. 343750f2e948Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 343850f2e948Smrg # nm: unknown option "B" ignored 343950f2e948Smrg # Tru64's nm complains that /dev/null is an invalid object file 344050f2e948Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 344150f2e948Smrg */dev/null* | *'Invalid file or object type'*) 344250f2e948Smrg lt_cv_path_NM="$tmp_nm -B" 344350f2e948Smrg break 344450f2e948Smrg ;; 344550f2e948Smrg *) 344650f2e948Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 344750f2e948Smrg */dev/null*) 344850f2e948Smrg lt_cv_path_NM="$tmp_nm -p" 344950f2e948Smrg break 345050f2e948Smrg ;; 345150f2e948Smrg *) 345250f2e948Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 345350f2e948Smrg continue # so that we can try to find one that supports BSD flags 345450f2e948Smrg ;; 345550f2e948Smrg esac 345650f2e948Smrg ;; 345750f2e948Smrg esac 345850f2e948Smrg fi 345950f2e948Smrg done 346050f2e948Smrg IFS="$lt_save_ifs" 3461226fade8Smrg done 34625592a31fSmrg : ${lt_cv_path_NM=no} 346350f2e948Smrgfi]) 34645592a31fSmrgif test "$lt_cv_path_NM" != "no"; then 34655592a31fSmrg NM="$lt_cv_path_NM" 34665592a31fSmrgelse 34675592a31fSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3468b40a6198Smrg if test -n "$DUMPBIN"; then : 3469b40a6198Smrg # Let the user override the test. 3470b40a6198Smrg else 3471b40a6198Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3472b40a6198Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3473b40a6198Smrg *COFF*) 3474b40a6198Smrg DUMPBIN="$DUMPBIN -symbols" 3475b40a6198Smrg ;; 3476b40a6198Smrg *) 3477b40a6198Smrg DUMPBIN=: 3478b40a6198Smrg ;; 3479b40a6198Smrg esac 3480b40a6198Smrg fi 34815592a31fSmrg AC_SUBST([DUMPBIN]) 34825592a31fSmrg if test "$DUMPBIN" != ":"; then 34835592a31fSmrg NM="$DUMPBIN" 34845592a31fSmrg fi 34855592a31fSmrgfi 34865592a31fSmrgtest -z "$NM" && NM=nm 34875592a31fSmrgAC_SUBST([NM]) 34885592a31fSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 34895592a31fSmrg 34905592a31fSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 34915592a31fSmrg [lt_cv_nm_interface="BSD nm" 34925592a31fSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3493b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 34945592a31fSmrg (eval "$ac_compile" 2>conftest.err) 34955592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3496b40a6198Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 34975592a31fSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 34985592a31fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3499b40a6198Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 35005592a31fSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 35015592a31fSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 35025592a31fSmrg lt_cv_nm_interface="MS dumpbin" 35035592a31fSmrg fi 35045592a31fSmrg rm -f conftest*]) 35055592a31fSmrg])# LT_PATH_NM 350645bc899bSmrg 35075592a31fSmrg# Old names: 35085592a31fSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 35095592a31fSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 35105592a31fSmrgdnl aclocal-1.4 backwards compatibility: 35115592a31fSmrgdnl AC_DEFUN([AM_PROG_NM], []) 35125592a31fSmrgdnl AC_DEFUN([AC_PROG_NM], []) 351345bc899bSmrg 3514b40a6198Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3515b40a6198Smrg# -------------------------------- 3516b40a6198Smrg# how to determine the name of the shared library 3517b40a6198Smrg# associated with a specific link library. 3518b40a6198Smrg# -- PORTME fill in with the dynamic library characteristics 3519b40a6198Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3520b40a6198Smrg[m4_require([_LT_DECL_EGREP]) 3521b40a6198Smrgm4_require([_LT_DECL_OBJDUMP]) 3522b40a6198Smrgm4_require([_LT_DECL_DLLTOOL]) 3523b40a6198SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3524b40a6198Smrglt_cv_sharedlib_from_linklib_cmd, 3525b40a6198Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 35265592a31fSmrg 3527b40a6198Smrgcase $host_os in 3528b40a6198Smrgcygwin* | mingw* | pw32* | cegcc*) 3529b40a6198Smrg # two different shell functions defined in ltmain.sh 3530b40a6198Smrg # decide which to use based on capabilities of $DLLTOOL 3531b40a6198Smrg case `$DLLTOOL --help 2>&1` in 3532b40a6198Smrg *--identify-strict*) 3533b40a6198Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3534b40a6198Smrg ;; 3535b40a6198Smrg *) 3536b40a6198Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3537b40a6198Smrg ;; 3538b40a6198Smrg esac 3539b40a6198Smrg ;; 3540b40a6198Smrg*) 3541b40a6198Smrg # fallback: assume linklib IS sharedlib 3542b40a6198Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3543b40a6198Smrg ;; 3544b40a6198Smrgesac 3545b40a6198Smrg]) 3546b40a6198Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3547b40a6198Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3548b40a6198Smrg 3549b40a6198Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3550b40a6198Smrg [Command to associate shared and link libraries]) 3551b40a6198Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3552b40a6198Smrg 3553b40a6198Smrg 3554b40a6198Smrg# _LT_PATH_MANIFEST_TOOL 3555b40a6198Smrg# ---------------------- 3556b40a6198Smrg# locate the manifest tool 3557b40a6198Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3558b40a6198Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3559b40a6198Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3560b40a6198SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3561b40a6198Smrg [lt_cv_path_mainfest_tool=no 3562b40a6198Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3563b40a6198Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3564b40a6198Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3565b40a6198Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3566b40a6198Smrg lt_cv_path_mainfest_tool=yes 3567b40a6198Smrg fi 3568b40a6198Smrg rm -f conftest*]) 3569b40a6198Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3570b40a6198Smrg MANIFEST_TOOL=: 3571b40a6198Smrgfi 3572b40a6198Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3573b40a6198Smrg])# _LT_PATH_MANIFEST_TOOL 3574b40a6198Smrg 3575b40a6198Smrg 3576b40a6198Smrg# LT_LIB_M 35775592a31fSmrg# -------- 357850f2e948Smrg# check for math library 35795592a31fSmrgAC_DEFUN([LT_LIB_M], 358050f2e948Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 358150f2e948SmrgLIBM= 358250f2e948Smrgcase $host in 3583b40a6198Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 358450f2e948Smrg # These system don't have libm, or don't need it 358550f2e948Smrg ;; 358650f2e948Smrg*-ncr-sysv4.3*) 358750f2e948Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 358850f2e948Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 358950f2e948Smrg ;; 359050f2e948Smrg*) 359150f2e948Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3592226fade8Smrg ;; 3593226fade8Smrgesac 35945592a31fSmrgAC_SUBST([LIBM]) 35955592a31fSmrg])# LT_LIB_M 359645bc899bSmrg 35975592a31fSmrg# Old name: 35985592a31fSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 35995592a31fSmrgdnl aclocal-1.4 backwards compatibility: 36005592a31fSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 360145bc899bSmrg 360245bc899bSmrg 36035592a31fSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 36045592a31fSmrg# ------------------------------- 36055592a31fSmrgm4_defun([_LT_COMPILER_NO_RTTI], 36065592a31fSmrg[m4_require([_LT_TAG_COMPILER])dnl 360745bc899bSmrg 36085592a31fSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 360945bc899bSmrg 36105592a31fSmrgif test "$GCC" = yes; then 3611b40a6198Smrg case $cc_basename in 3612b40a6198Smrg nvcc*) 3613b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3614b40a6198Smrg *) 3615b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3616b40a6198Smrg esac 361745bc899bSmrg 36185592a31fSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 36195592a31fSmrg lt_cv_prog_compiler_rtti_exceptions, 36205592a31fSmrg [-fno-rtti -fno-exceptions], [], 36215592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 36225592a31fSmrgfi 36235592a31fSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 36245592a31fSmrg [Compiler flag to turn off builtin functions]) 36255592a31fSmrg])# _LT_COMPILER_NO_RTTI 362645bc899bSmrg 362745bc899bSmrg 36285592a31fSmrg# _LT_CMD_GLOBAL_SYMBOLS 36295592a31fSmrg# ---------------------- 36305592a31fSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 36315592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 36325592a31fSmrgAC_REQUIRE([AC_PROG_CC])dnl 3633b40a6198SmrgAC_REQUIRE([AC_PROG_AWK])dnl 36345592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 36355592a31fSmrgAC_REQUIRE([LT_PATH_LD])dnl 36365592a31fSmrgm4_require([_LT_DECL_SED])dnl 36375592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 36385592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 363945bc899bSmrg 36405592a31fSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 36415592a31fSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 36425592a31fSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 364350f2e948Smrg[ 36445592a31fSmrg# These are sane defaults that work on at least a few old systems. 36455592a31fSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 364645bc899bSmrg 36475592a31fSmrg# Character class describing NM global symbol codes. 36485592a31fSmrgsymcode='[[BCDEGRST]]' 364945bc899bSmrg 36505592a31fSmrg# Regexp to match symbols that can be accessed directly from C. 36515592a31fSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 365245bc899bSmrg 36535592a31fSmrg# Define system-specific variables. 36545592a31fSmrgcase $host_os in 36555592a31fSmrgaix*) 36565592a31fSmrg symcode='[[BCDT]]' 36575592a31fSmrg ;; 36585592a31fSmrgcygwin* | mingw* | pw32* | cegcc*) 36595592a31fSmrg symcode='[[ABCDGISTW]]' 36605592a31fSmrg ;; 36615592a31fSmrghpux*) 36625592a31fSmrg if test "$host_cpu" = ia64; then 36635592a31fSmrg symcode='[[ABCDEGRST]]' 36645592a31fSmrg fi 36655592a31fSmrg ;; 36665592a31fSmrgirix* | nonstopux*) 36675592a31fSmrg symcode='[[BCDEGRST]]' 36685592a31fSmrg ;; 36695592a31fSmrgosf*) 36705592a31fSmrg symcode='[[BCDEGQRST]]' 36715592a31fSmrg ;; 36725592a31fSmrgsolaris*) 36735592a31fSmrg symcode='[[BDRT]]' 36745592a31fSmrg ;; 36755592a31fSmrgsco3.2v5*) 36765592a31fSmrg symcode='[[DT]]' 36775592a31fSmrg ;; 36785592a31fSmrgsysv4.2uw2*) 36795592a31fSmrg symcode='[[DT]]' 36805592a31fSmrg ;; 36815592a31fSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 36825592a31fSmrg symcode='[[ABDT]]' 36835592a31fSmrg ;; 36845592a31fSmrgsysv4) 36855592a31fSmrg symcode='[[DFNSTU]]' 36865592a31fSmrg ;; 36875592a31fSmrgesac 368845bc899bSmrg 36895592a31fSmrg# If we're using GNU nm, then use its standard symbol codes. 36905592a31fSmrgcase `$NM -V 2>&1` in 36915592a31fSmrg*GNU* | *'with BFD'*) 36925592a31fSmrg symcode='[[ABCDGIRSTW]]' ;; 36935592a31fSmrgesac 369445bc899bSmrg 36955592a31fSmrg# Transform an extracted symbol line into a proper C declaration. 36965592a31fSmrg# Some systems (esp. on ia64) link data and code symbols differently, 36975592a31fSmrg# so use this general approach. 36985592a31fSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 369945bc899bSmrg 37005592a31fSmrg# Transform an extracted symbol line into symbol name and symbol address 3701b40a6198Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3702b40a6198Smrglt_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'" 370345bc899bSmrg 37045592a31fSmrg# Handle CRLF in mingw tool chain 37055592a31fSmrgopt_cr= 37065592a31fSmrgcase $build_os in 37075592a31fSmrgmingw*) 37085592a31fSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 37095592a31fSmrg ;; 37105592a31fSmrgesac 37113a925b30Smrg 37125592a31fSmrg# Try without a prefix underscore, then with it. 37135592a31fSmrgfor ac_symprfx in "" "_"; do 37143a925b30Smrg 37155592a31fSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 37165592a31fSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 37173a925b30Smrg 37185592a31fSmrg # Write the raw and C identifiers. 37195592a31fSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 37205592a31fSmrg # Fake it for dumpbin and say T for any non-static function 37215592a31fSmrg # and D for any global variable. 37225592a31fSmrg # Also find C++ and __fastcall symbols from MSVC++, 37235592a31fSmrg # which start with @ or ?. 37245592a31fSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 37255592a31fSmrg" {last_section=section; section=\$ 3};"\ 3726b40a6198Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 37275592a31fSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 37285592a31fSmrg" \$ 0!~/External *\|/{next};"\ 37295592a31fSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 37305592a31fSmrg" {if(hide[section]) next};"\ 37315592a31fSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 37325592a31fSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 37335592a31fSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 37345592a31fSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 37355592a31fSmrg" ' prfx=^$ac_symprfx]" 37365592a31fSmrg else 37375592a31fSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 37383a925b30Smrg fi 3739b40a6198Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 374045bc899bSmrg 37415592a31fSmrg # Check to see that the pipe works correctly. 37425592a31fSmrg pipe_works=no 374345bc899bSmrg 37445592a31fSmrg rm -f conftest* 37455592a31fSmrg cat > conftest.$ac_ext <<_LT_EOF 37465592a31fSmrg#ifdef __cplusplus 37475592a31fSmrgextern "C" { 37485592a31fSmrg#endif 37495592a31fSmrgchar nm_test_var; 37505592a31fSmrgvoid nm_test_func(void); 37515592a31fSmrgvoid nm_test_func(void){} 37525592a31fSmrg#ifdef __cplusplus 37535592a31fSmrg} 37545592a31fSmrg#endif 37555592a31fSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 37565592a31fSmrg_LT_EOF 37573a925b30Smrg 37585592a31fSmrg if AC_TRY_EVAL(ac_compile); then 37595592a31fSmrg # Now try to grab the symbols. 37605592a31fSmrg nlist=conftest.nm 3761b40a6198Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 37625592a31fSmrg # Try sorting and uniquifying the output. 37635592a31fSmrg if sort "$nlist" | uniq > "$nlist"T; then 37645592a31fSmrg mv -f "$nlist"T "$nlist" 37655592a31fSmrg else 37665592a31fSmrg rm -f "$nlist"T 37675592a31fSmrg fi 37683a925b30Smrg 37695592a31fSmrg # Make sure that we snagged all the symbols we need. 37705592a31fSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 37715592a31fSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 37725592a31fSmrg cat <<_LT_EOF > conftest.$ac_ext 3773b40a6198Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3774b40a6198Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3775b40a6198Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3776b40a6198Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3777b40a6198Smrg# define LT@&t@_DLSYM_CONST 3778b40a6198Smrg#elif defined(__osf__) 3779b40a6198Smrg/* This system does not cope well with relocations in const data. */ 3780b40a6198Smrg# define LT@&t@_DLSYM_CONST 3781b40a6198Smrg#else 3782b40a6198Smrg# define LT@&t@_DLSYM_CONST const 3783b40a6198Smrg#endif 3784b40a6198Smrg 37855592a31fSmrg#ifdef __cplusplus 37865592a31fSmrgextern "C" { 37875592a31fSmrg#endif 37883a925b30Smrg 37895592a31fSmrg_LT_EOF 37905592a31fSmrg # Now generate the symbol file. 37915592a31fSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 37923a925b30Smrg 37935592a31fSmrg cat <<_LT_EOF >> conftest.$ac_ext 37943a925b30Smrg 37955592a31fSmrg/* The mapping between symbol names and symbols. */ 3796b40a6198SmrgLT@&t@_DLSYM_CONST struct { 37975592a31fSmrg const char *name; 37985592a31fSmrg void *address; 37995592a31fSmrg} 38005592a31fSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 38015592a31fSmrg{ 38025592a31fSmrg { "@PROGRAM@", (void *) 0 }, 38035592a31fSmrg_LT_EOF 38045592a31fSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 38055592a31fSmrg cat <<\_LT_EOF >> conftest.$ac_ext 38065592a31fSmrg {0, (void *) 0} 38075592a31fSmrg}; 38083a925b30Smrg 38095592a31fSmrg/* This works around a problem in FreeBSD linker */ 38105592a31fSmrg#ifdef FREEBSD_WORKAROUND 38115592a31fSmrgstatic const void *lt_preloaded_setup() { 38125592a31fSmrg return lt__PROGRAM__LTX_preloaded_symbols; 38135592a31fSmrg} 38145592a31fSmrg#endif 38153a925b30Smrg 38165592a31fSmrg#ifdef __cplusplus 38175592a31fSmrg} 38185592a31fSmrg#endif 38195592a31fSmrg_LT_EOF 38205592a31fSmrg # Now try linking the two files. 38215592a31fSmrg mv conftest.$ac_objext conftstm.$ac_objext 3822b40a6198Smrg lt_globsym_save_LIBS=$LIBS 3823b40a6198Smrg lt_globsym_save_CFLAGS=$CFLAGS 38245592a31fSmrg LIBS="conftstm.$ac_objext" 38255592a31fSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 38265592a31fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 38275592a31fSmrg pipe_works=yes 38285592a31fSmrg fi 3829b40a6198Smrg LIBS=$lt_globsym_save_LIBS 3830b40a6198Smrg CFLAGS=$lt_globsym_save_CFLAGS 38315592a31fSmrg else 38325592a31fSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 38335592a31fSmrg fi 38345592a31fSmrg else 38355592a31fSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 38365592a31fSmrg fi 383750f2e948Smrg else 38385592a31fSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 383950f2e948Smrg fi 384050f2e948Smrg else 38415592a31fSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 38425592a31fSmrg cat conftest.$ac_ext >&5 384350f2e948Smrg fi 38445592a31fSmrg rm -rf conftest* conftst* 384545bc899bSmrg 38465592a31fSmrg # Do not use the global_symbol_pipe unless it works. 38475592a31fSmrg if test "$pipe_works" = yes; then 38485592a31fSmrg break 38495592a31fSmrg else 38505592a31fSmrg lt_cv_sys_global_symbol_pipe= 38515592a31fSmrg fi 38525592a31fSmrgdone 38535592a31fSmrg]) 38545592a31fSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 38555592a31fSmrg lt_cv_sys_global_symbol_to_cdecl= 38565592a31fSmrgfi 38575592a31fSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 38585592a31fSmrg AC_MSG_RESULT(failed) 385950f2e948Smrgelse 38605592a31fSmrg AC_MSG_RESULT(ok) 386150f2e948Smrgfi 386245bc899bSmrg 3863b40a6198Smrg# Response file support. 3864b40a6198Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3865b40a6198Smrg nm_file_list_spec='@' 3866b40a6198Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3867b40a6198Smrg nm_file_list_spec='@' 3868b40a6198Smrgfi 3869b40a6198Smrg 38705592a31fSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 38715592a31fSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 38725592a31fSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 38735592a31fSmrg [Transform the output of nm in a proper C declaration]) 38745592a31fSmrg_LT_DECL([global_symbol_to_c_name_address], 38755592a31fSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 38765592a31fSmrg [Transform the output of nm in a C name address pair]) 38775592a31fSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 38785592a31fSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 38795592a31fSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3880b40a6198Smrg_LT_DECL([], [nm_file_list_spec], [1], 3881b40a6198Smrg [Specify filename containing input files for $NM]) 38825592a31fSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 388345bc899bSmrg 388445bc899bSmrg 38855592a31fSmrg# _LT_COMPILER_PIC([TAGNAME]) 38865592a31fSmrg# --------------------------- 38875592a31fSmrgm4_defun([_LT_COMPILER_PIC], 38885592a31fSmrg[m4_require([_LT_TAG_COMPILER])dnl 38895592a31fSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 38905592a31fSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 38915592a31fSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 389245bc899bSmrg 38935592a31fSmrgm4_if([$1], [CXX], [ 38945592a31fSmrg # C++ specific cases for pic, static, wl, etc. 38955592a31fSmrg if test "$GXX" = yes; then 38965592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38975592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 38983a925b30Smrg 38995592a31fSmrg case $host_os in 39005592a31fSmrg aix*) 39015592a31fSmrg # All AIX code is PIC. 39023a925b30Smrg if test "$host_cpu" = ia64; then 39035592a31fSmrg # AIX 5 now supports IA64 processor 39045592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39053a925b30Smrg fi 39063a925b30Smrg ;; 390745bc899bSmrg 39085592a31fSmrg amigaos*) 390950f2e948Smrg case $host_cpu in 39105592a31fSmrg powerpc) 39115592a31fSmrg # see comment about AmigaOS4 .so support 39125592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39135592a31fSmrg ;; 39145592a31fSmrg m68k) 39155592a31fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 39165592a31fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 39175592a31fSmrg # like `-m68040'. 39185592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 391950f2e948Smrg ;; 392050f2e948Smrg esac 392150f2e948Smrg ;; 39223a925b30Smrg 39235592a31fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39245592a31fSmrg # PIC is the default for these OSes. 39255592a31fSmrg ;; 39265592a31fSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39275592a31fSmrg # This hack is so that the source file can tell whether it is being 39285592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 39295592a31fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39305592a31fSmrg # (--disable-auto-import) libraries 39315592a31fSmrg m4_if([$1], [GCJ], [], 39325592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39335592a31fSmrg ;; 39345592a31fSmrg darwin* | rhapsody*) 39355592a31fSmrg # PIC is the default on this platform 39365592a31fSmrg # Common symbols not allowed in MH_DYLIB files 39375592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39385592a31fSmrg ;; 39395592a31fSmrg *djgpp*) 39405592a31fSmrg # DJGPP does not support shared libraries at all 39415592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 39425592a31fSmrg ;; 3943b40a6198Smrg haiku*) 3944b40a6198Smrg # PIC is the default for Haiku. 3945b40a6198Smrg # The "-static" flag exists, but is broken. 3946b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3947b40a6198Smrg ;; 39485592a31fSmrg interix[[3-9]]*) 39495592a31fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39505592a31fSmrg # Instead, we relocate shared libraries at runtime. 39515592a31fSmrg ;; 39525592a31fSmrg sysv4*MP*) 39535592a31fSmrg if test -d /usr/nec; then 39545592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39555592a31fSmrg fi 39565592a31fSmrg ;; 39575592a31fSmrg hpux*) 39585592a31fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39595592a31fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39605592a31fSmrg # sets the default TLS model and affects inlining. 39615592a31fSmrg case $host_cpu in 39625592a31fSmrg hppa*64*) 396350f2e948Smrg ;; 39643a925b30Smrg *) 39655592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 396650f2e948Smrg ;; 39675592a31fSmrg esac 39685592a31fSmrg ;; 39695592a31fSmrg *qnx* | *nto*) 39705592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39715592a31fSmrg # it will coredump. 39725592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39735592a31fSmrg ;; 39745592a31fSmrg *) 39755592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39765592a31fSmrg ;; 39773a925b30Smrg esac 39785592a31fSmrg else 39795592a31fSmrg case $host_os in 39805592a31fSmrg aix[[4-9]]*) 39815592a31fSmrg # All AIX code is PIC. 39825592a31fSmrg if test "$host_cpu" = ia64; then 39835592a31fSmrg # AIX 5 now supports IA64 processor 39845592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39855592a31fSmrg else 39865592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39873a925b30Smrg fi 398850f2e948Smrg ;; 39895592a31fSmrg chorus*) 39905592a31fSmrg case $cc_basename in 39915592a31fSmrg cxch68*) 39925592a31fSmrg # Green Hills C++ Compiler 39935592a31fSmrg # _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" 39943a925b30Smrg ;; 399550f2e948Smrg esac 399650f2e948Smrg ;; 3997b40a6198Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3998b40a6198Smrg # This hack is so that the source file can tell whether it is being 3999b40a6198Smrg # built for inclusion in a dll (and should export symbols for example). 4000b40a6198Smrg m4_if([$1], [GCJ], [], 4001b40a6198Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4002b40a6198Smrg ;; 40035592a31fSmrg dgux*) 40045592a31fSmrg case $cc_basename in 40055592a31fSmrg ec++*) 40065592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40075592a31fSmrg ;; 40085592a31fSmrg ghcx*) 40095592a31fSmrg # Green Hills C++ Compiler 40105592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 40115592a31fSmrg ;; 40125592a31fSmrg *) 40135592a31fSmrg ;; 401450f2e948Smrg esac 401550f2e948Smrg ;; 40165592a31fSmrg freebsd* | dragonfly*) 40175592a31fSmrg # FreeBSD uses GNU C++ 401850f2e948Smrg ;; 40195592a31fSmrg hpux9* | hpux10* | hpux11*) 40205592a31fSmrg case $cc_basename in 40215592a31fSmrg CC*) 40225592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40235592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40245592a31fSmrg if test "$host_cpu" != ia64; then 40255592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40265592a31fSmrg fi 40275592a31fSmrg ;; 40285592a31fSmrg aCC*) 40295592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40305592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40315592a31fSmrg case $host_cpu in 40325592a31fSmrg hppa*64*|ia64*) 40335592a31fSmrg # +Z the default 40345592a31fSmrg ;; 40355592a31fSmrg *) 40365592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40375592a31fSmrg ;; 40385592a31fSmrg esac 40395592a31fSmrg ;; 40405592a31fSmrg *) 40415592a31fSmrg ;; 40425592a31fSmrg esac 404350f2e948Smrg ;; 40445592a31fSmrg interix*) 40455592a31fSmrg # This is c89, which is MS Visual C++ (no shared libs) 40465592a31fSmrg # Anyone wants to do a port? 404750f2e948Smrg ;; 40485592a31fSmrg irix5* | irix6* | nonstopux*) 40495592a31fSmrg case $cc_basename in 40505592a31fSmrg CC*) 40515592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40525592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40535592a31fSmrg # CC pic flag -KPIC is the default. 40545592a31fSmrg ;; 40555592a31fSmrg *) 40565592a31fSmrg ;; 40575592a31fSmrg esac 40583a925b30Smrg ;; 4059c97b1c41Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 40605592a31fSmrg case $cc_basename in 40615592a31fSmrg KCC*) 40625592a31fSmrg # KAI C++ Compiler 40635592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 40645592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40655592a31fSmrg ;; 40665592a31fSmrg ecpc* ) 40675592a31fSmrg # old Intel C++ for x86_64 which still supported -KPIC. 40685592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40695592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40705592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40715592a31fSmrg ;; 40725592a31fSmrg icpc* ) 40735592a31fSmrg # Intel C++, used to be incompatible with GCC. 40745592a31fSmrg # ICC 10 doesn't accept -KPIC any more. 40755592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40765592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40775592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40785592a31fSmrg ;; 40795592a31fSmrg pgCC* | pgcpp*) 40805592a31fSmrg # Portland Group C++ compiler 40815592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40825592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40835592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40845592a31fSmrg ;; 40855592a31fSmrg cxx*) 40865592a31fSmrg # Compaq C++ 40875592a31fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 40885592a31fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 40895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 40905592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40915592a31fSmrg ;; 4092b40a6198Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4093b40a6198Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 40945592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40955592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 40965592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 40975592a31fSmrg ;; 40985592a31fSmrg *) 40995592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 41005592a31fSmrg *Sun\ C*) 41015592a31fSmrg # Sun C++ 5.9 41025592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41035592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41045592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41055592a31fSmrg ;; 41065592a31fSmrg esac 41075592a31fSmrg ;; 41085592a31fSmrg esac 41093a925b30Smrg ;; 41105592a31fSmrg lynxos*) 41113a925b30Smrg ;; 41125592a31fSmrg m88k*) 41133a925b30Smrg ;; 41145592a31fSmrg mvs*) 41155592a31fSmrg case $cc_basename in 41165592a31fSmrg cxx*) 41175592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 41185592a31fSmrg ;; 41195592a31fSmrg *) 41205592a31fSmrg ;; 41215592a31fSmrg esac 41223a925b30Smrg ;; 4123c97b1c41Smrg netbsd* | netbsdelf*-gnu) 41243a925b30Smrg ;; 41255592a31fSmrg *qnx* | *nto*) 41265592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 41275592a31fSmrg # it will coredump. 41285592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 41295592a31fSmrg ;; 41305592a31fSmrg osf3* | osf4* | osf5*) 41315592a31fSmrg case $cc_basename in 41325592a31fSmrg KCC*) 41335592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 41345592a31fSmrg ;; 41355592a31fSmrg RCC*) 41365592a31fSmrg # Rational C++ 2.4.1 41375592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41385592a31fSmrg ;; 41395592a31fSmrg cxx*) 41405592a31fSmrg # Digital/Compaq C++ 41415592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41425592a31fSmrg # Make sure the PIC flag is empty. It appears that all Alpha 41435592a31fSmrg # Linux and Compaq Tru64 Unix objects are PIC. 41445592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41455592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 41465592a31fSmrg ;; 41475592a31fSmrg *) 41485592a31fSmrg ;; 41495592a31fSmrg esac 41503a925b30Smrg ;; 41515592a31fSmrg psos*) 41523a925b30Smrg ;; 41535592a31fSmrg solaris*) 41545592a31fSmrg case $cc_basename in 4155b40a6198Smrg CC* | sunCC*) 41565592a31fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 41575592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41585592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41595592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41605592a31fSmrg ;; 41615592a31fSmrg gcx*) 41625592a31fSmrg # Green Hills C++ Compiler 41635592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41645592a31fSmrg ;; 41655592a31fSmrg *) 41665592a31fSmrg ;; 41675592a31fSmrg esac 41683a925b30Smrg ;; 41695592a31fSmrg sunos4*) 41705592a31fSmrg case $cc_basename in 41715592a31fSmrg CC*) 41725592a31fSmrg # Sun C++ 4.x 41735592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41745592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41755592a31fSmrg ;; 41765592a31fSmrg lcc*) 41775592a31fSmrg # Lucid 41785592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41795592a31fSmrg ;; 41803a925b30Smrg *) 41813a925b30Smrg ;; 41823a925b30Smrg esac 418350f2e948Smrg ;; 41845592a31fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41855592a31fSmrg case $cc_basename in 41865592a31fSmrg CC*) 41875592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41885592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41905592a31fSmrg ;; 41915592a31fSmrg esac 419250f2e948Smrg ;; 41935592a31fSmrg tandem*) 41945592a31fSmrg case $cc_basename in 41955592a31fSmrg NCC*) 41965592a31fSmrg # NonStop-UX NCC 3.20 41975592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41985592a31fSmrg ;; 41993a925b30Smrg *) 42003a925b30Smrg ;; 42015592a31fSmrg esac 420250f2e948Smrg ;; 42035592a31fSmrg vxworks*) 420450f2e948Smrg ;; 420550f2e948Smrg *) 42065592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 420750f2e948Smrg ;; 42083a925b30Smrg esac 42095592a31fSmrg fi 42105592a31fSmrg], 42115592a31fSmrg[ 42125592a31fSmrg if test "$GCC" = yes; then 42135592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42145592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42155592a31fSmrg 42165592a31fSmrg case $host_os in 42175592a31fSmrg aix*) 42185592a31fSmrg # All AIX code is PIC. 42195592a31fSmrg if test "$host_cpu" = ia64; then 42205592a31fSmrg # AIX 5 now supports IA64 processor 42215592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42225592a31fSmrg fi 42235592a31fSmrg ;; 42245592a31fSmrg 42255592a31fSmrg amigaos*) 42265592a31fSmrg case $host_cpu in 42275592a31fSmrg powerpc) 42285592a31fSmrg # see comment about AmigaOS4 .so support 42295592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42305592a31fSmrg ;; 42315592a31fSmrg m68k) 42325592a31fSmrg # FIXME: we need at least 68020 code to build shared libraries, but 42335592a31fSmrg # adding the `-m68020' flag to GCC prevents building anything better, 42345592a31fSmrg # like `-m68040'. 42355592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42365592a31fSmrg ;; 42375592a31fSmrg esac 42385592a31fSmrg ;; 42395592a31fSmrg 42405592a31fSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42415592a31fSmrg # PIC is the default for these OSes. 42425592a31fSmrg ;; 42435592a31fSmrg 42445592a31fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 42455592a31fSmrg # This hack is so that the source file can tell whether it is being 42465592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 42475592a31fSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42485592a31fSmrg # (--disable-auto-import) libraries 42495592a31fSmrg m4_if([$1], [GCJ], [], 42505592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42515592a31fSmrg ;; 42525592a31fSmrg 42535592a31fSmrg darwin* | rhapsody*) 42545592a31fSmrg # PIC is the default on this platform 42555592a31fSmrg # Common symbols not allowed in MH_DYLIB files 42565592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42575592a31fSmrg ;; 42585592a31fSmrg 4259b40a6198Smrg haiku*) 4260b40a6198Smrg # PIC is the default for Haiku. 4261b40a6198Smrg # The "-static" flag exists, but is broken. 4262b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4263b40a6198Smrg ;; 4264b40a6198Smrg 42655592a31fSmrg hpux*) 42665592a31fSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42675592a31fSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42685592a31fSmrg # sets the default TLS model and affects inlining. 42695592a31fSmrg case $host_cpu in 42705592a31fSmrg hppa*64*) 42715592a31fSmrg # +Z the default 42723a925b30Smrg ;; 42733a925b30Smrg *) 42745592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42753a925b30Smrg ;; 42765592a31fSmrg esac 42775592a31fSmrg ;; 42785592a31fSmrg 42795592a31fSmrg interix[[3-9]]*) 42805592a31fSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42815592a31fSmrg # Instead, we relocate shared libraries at runtime. 42825592a31fSmrg ;; 42835592a31fSmrg 42845592a31fSmrg msdosdjgpp*) 42855592a31fSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 42865592a31fSmrg # on systems that don't support them. 42875592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42885592a31fSmrg enable_shared=no 42895592a31fSmrg ;; 42905592a31fSmrg 42915592a31fSmrg *nto* | *qnx*) 42925592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42935592a31fSmrg # it will coredump. 42945592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 42955592a31fSmrg ;; 42965592a31fSmrg 42975592a31fSmrg sysv4*MP*) 42985592a31fSmrg if test -d /usr/nec; then 42995592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 43005592a31fSmrg fi 43015592a31fSmrg ;; 43025592a31fSmrg 43035592a31fSmrg *) 43045592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43055592a31fSmrg ;; 43063a925b30Smrg esac 4307b40a6198Smrg 4308b40a6198Smrg case $cc_basename in 4309b40a6198Smrg nvcc*) # Cuda Compiler Driver 2.2 4310b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4311b40a6198Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4312b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4313b40a6198Smrg fi 4314b40a6198Smrg ;; 4315b40a6198Smrg esac 43165592a31fSmrg else 43175592a31fSmrg # PORTME Check for flag to pass linker flags through the system compiler. 43185592a31fSmrg case $host_os in 43195592a31fSmrg aix*) 43205592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43215592a31fSmrg if test "$host_cpu" = ia64; then 43225592a31fSmrg # AIX 5 now supports IA64 processor 43235592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43245592a31fSmrg else 43255592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43265592a31fSmrg fi 43275592a31fSmrg ;; 43285592a31fSmrg 43295592a31fSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 43305592a31fSmrg # This hack is so that the source file can tell whether it is being 43315592a31fSmrg # built for inclusion in a dll (and should export symbols for example). 43325592a31fSmrg m4_if([$1], [GCJ], [], 43335592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43345592a31fSmrg ;; 43355592a31fSmrg 43365592a31fSmrg hpux9* | hpux10* | hpux11*) 43375592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43385592a31fSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 43395592a31fSmrg # not for PA HP-UX. 43405592a31fSmrg case $host_cpu in 43415592a31fSmrg hppa*64*|ia64*) 43425592a31fSmrg # +Z the default 43433a925b30Smrg ;; 43443a925b30Smrg *) 43455592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43463a925b30Smrg ;; 43475592a31fSmrg esac 43485592a31fSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 43495592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 43505592a31fSmrg ;; 435145bc899bSmrg 43525592a31fSmrg irix5* | irix6* | nonstopux*) 43535592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43545592a31fSmrg # PIC (with -KPIC) is the default. 43555592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43565592a31fSmrg ;; 435745bc899bSmrg 4358c97b1c41Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43595592a31fSmrg case $cc_basename in 43605592a31fSmrg # old Intel for x86_64 which still supported -KPIC. 43615592a31fSmrg ecc*) 43625592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43635592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43645592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43655592a31fSmrg ;; 43665592a31fSmrg # icc used to be incompatible with GCC. 43675592a31fSmrg # ICC 10 doesn't accept -KPIC any more. 43685592a31fSmrg icc* | ifort*) 43695592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43705592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43715592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43725592a31fSmrg ;; 43735592a31fSmrg # Lahey Fortran 8.1. 43745592a31fSmrg lf95*) 43755592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43765592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43775592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 43785592a31fSmrg ;; 4379b40a6198Smrg nagfor*) 4380b40a6198Smrg # NAG Fortran compiler 4381b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4382b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4383b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4384b40a6198Smrg ;; 4385b40a6198Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 43865592a31fSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 43875592a31fSmrg # which looks to be a dead project) 43885592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43905592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43915592a31fSmrg ;; 43925592a31fSmrg ccc*) 43935592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43945592a31fSmrg # All Alpha code is PIC. 43955592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43965592a31fSmrg ;; 4397b40a6198Smrg xl* | bgxl* | bgf* | mpixl*) 4398b40a6198Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 43995592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44005592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44015592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44025592a31fSmrg ;; 44035592a31fSmrg *) 44045592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 4405b40a6198Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4406b40a6198Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4407b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4408b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4409b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4410b40a6198Smrg ;; 4411b40a6198Smrg *Sun\ F* | *Sun*Fortran*) 4412b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4413b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4414b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4415b40a6198Smrg ;; 44165592a31fSmrg *Sun\ C*) 44175592a31fSmrg # Sun C 5.9 44185592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44195592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44205592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44215592a31fSmrg ;; 4422b40a6198Smrg *Intel*\ [[CF]]*Compiler*) 4423b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4424b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4425b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4426b40a6198Smrg ;; 4427b40a6198Smrg *Portland\ Group*) 4428b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4429b40a6198Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44305592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44315592a31fSmrg ;; 44325592a31fSmrg esac 44335592a31fSmrg ;; 44345592a31fSmrg esac 44355592a31fSmrg ;; 443645bc899bSmrg 44375592a31fSmrg newsos6) 44385592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44395592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44405592a31fSmrg ;; 44411ac89addSmrg 44425592a31fSmrg *nto* | *qnx*) 44435592a31fSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44445592a31fSmrg # it will coredump. 44455592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44465592a31fSmrg ;; 44471ac89addSmrg 44485592a31fSmrg osf3* | osf4* | osf5*) 44495592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44505592a31fSmrg # All OSF/1 code is PIC. 44515592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44525592a31fSmrg ;; 44531ac89addSmrg 44545592a31fSmrg rdos*) 44555592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44565592a31fSmrg ;; 44571ac89addSmrg 44585592a31fSmrg solaris*) 44595592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44605592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44615592a31fSmrg case $cc_basename in 4462b40a6198Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 44635592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 44645592a31fSmrg *) 44655592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 44665592a31fSmrg esac 44675592a31fSmrg ;; 446845bc899bSmrg 44695592a31fSmrg sunos4*) 44705592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44715592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44725592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44735592a31fSmrg ;; 447445bc899bSmrg 44755592a31fSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 44765592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44775592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44785592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44795592a31fSmrg ;; 448045bc899bSmrg 44815592a31fSmrg sysv4*MP*) 44825592a31fSmrg if test -d /usr/nec ;then 44835592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 44845592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44855592a31fSmrg fi 44865592a31fSmrg ;; 448745bc899bSmrg 44885592a31fSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44895592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44905592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44915592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44925592a31fSmrg ;; 44933a925b30Smrg 44945592a31fSmrg unicos*) 44955592a31fSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44965592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 44975592a31fSmrg ;; 44981ac89addSmrg 44995592a31fSmrg uts4*) 45005592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45015592a31fSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45025592a31fSmrg ;; 45035592a31fSmrg 45045592a31fSmrg *) 45055592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45065592a31fSmrg ;; 450750f2e948Smrg esac 45085592a31fSmrg fi 45095592a31fSmrg]) 45105592a31fSmrgcase $host_os in 45115592a31fSmrg # For platforms which do not support PIC, -DPIC is meaningless: 45125592a31fSmrg *djgpp*) 45135592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45145592a31fSmrg ;; 45155592a31fSmrg *) 45165592a31fSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 45175592a31fSmrg ;; 45185592a31fSmrgesac 4519b40a6198Smrg 4520b40a6198SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4521b40a6198Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4522b40a6198Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4523b40a6198Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 45241ac89addSmrg 45255592a31fSmrg# 45265592a31fSmrg# Check to make sure the PIC flag actually works. 45275592a31fSmrg# 45285592a31fSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 45295592a31fSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 45305592a31fSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 45315592a31fSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 45325592a31fSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 45335592a31fSmrg "" | " "*) ;; 45345592a31fSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 45355592a31fSmrg esac], 45365592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 45375592a31fSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 453850f2e948Smrgfi 45395592a31fSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 45405592a31fSmrg [Additional compiler flags for building library objects]) 45411ac89addSmrg 4542b40a6198Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4543b40a6198Smrg [How to pass a linker flag through the compiler]) 45445592a31fSmrg# 45455592a31fSmrg# Check to make sure the static flag actually works. 45465592a31fSmrg# 45475592a31fSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 45485592a31fSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 45495592a31fSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 45505592a31fSmrg $lt_tmp_static_flag, 45515592a31fSmrg [], 45525592a31fSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 45535592a31fSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 45545592a31fSmrg [Compiler flag to prevent dynamic linking]) 45555592a31fSmrg])# _LT_COMPILER_PIC 45561ac89addSmrg 45571ac89addSmrg 45585592a31fSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 45595592a31fSmrg# ---------------------------- 45605592a31fSmrg# See if the linker supports building shared libraries. 45615592a31fSmrgm4_defun([_LT_LINKER_SHLIBS], 45625592a31fSmrg[AC_REQUIRE([LT_PATH_LD])dnl 45635592a31fSmrgAC_REQUIRE([LT_PATH_NM])dnl 4564b40a6198Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 45655592a31fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 45665592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 45675592a31fSmrgm4_require([_LT_DECL_SED])dnl 45685592a31fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 45695592a31fSmrgm4_require([_LT_TAG_COMPILER])dnl 45705592a31fSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 45715592a31fSmrgm4_if([$1], [CXX], [ 45725592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4573b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 45745592a31fSmrg case $host_os in 45755592a31fSmrg aix[[4-9]]*) 45765592a31fSmrg # If we're using GNU nm, then we don't want the "-C" option. 45775592a31fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4578b40a6198Smrg # Also, AIX nm treats weak defined symbols like other global defined 4579b40a6198Smrg # symbols, whereas GNU nm marks them as "W". 45805592a31fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4581b40a6198Smrg _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' 45825592a31fSmrg else 45835592a31fSmrg _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' 458450f2e948Smrg fi 458550f2e948Smrg ;; 45865592a31fSmrg pw32*) 45875592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4588b40a6198Smrg ;; 45895592a31fSmrg cygwin* | mingw* | cegcc*) 4590b40a6198Smrg case $cc_basename in 4591b40a6198Smrg cl*) 4592b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4593b40a6198Smrg ;; 4594b40a6198Smrg *) 4595b40a6198Smrg _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' 4596b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4597b40a6198Smrg ;; 4598b40a6198Smrg esac 4599b40a6198Smrg ;; 4600c97b1c41Smrg linux* | k*bsd*-gnu | gnu*) 4601c97b1c41Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 4602c97b1c41Smrg ;; 46035592a31fSmrg *) 46045592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4605b40a6198Smrg ;; 46065592a31fSmrg esac 46075592a31fSmrg], [ 46085592a31fSmrg runpath_var= 46095592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 46105592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 46115592a31fSmrg _LT_TAGVAR(archive_cmds, $1)= 46125592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 46135592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 46145592a31fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46155592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 46165592a31fSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46175592a31fSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 46185592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 46195592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 46205592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 46215592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46225592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 46235592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46245592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=no 46255592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 46265592a31fSmrg _LT_TAGVAR(module_cmds, $1)= 46275592a31fSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 46285592a31fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 46295592a31fSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 46305592a31fSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 46315592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 46325592a31fSmrg # include_expsyms should be a list of space-separated symbols to be *always* 46335592a31fSmrg # included in the symbol list 46345592a31fSmrg _LT_TAGVAR(include_expsyms, $1)= 46355592a31fSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 46365592a31fSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 46375592a31fSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 46385592a31fSmrg # as well as any symbol that contains `d'. 46395592a31fSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 46405592a31fSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 46415592a31fSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 46425592a31fSmrg # the symbol is explicitly referenced. Since portable code cannot 46435592a31fSmrg # rely on this symbol name, it's probably fine to never include it in 46445592a31fSmrg # preloaded symbol tables. 46455592a31fSmrg # Exclude shared library initialization/finalization symbols. 46465592a31fSmrgdnl Note also adjust exclude_expsyms for C++ above. 46475592a31fSmrg extract_expsyms_cmds= 46481ac89addSmrg 46495592a31fSmrg case $host_os in 46505592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 46515592a31fSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 46525592a31fSmrg # When not using gcc, we currently assume that we are using 46535592a31fSmrg # Microsoft Visual C++. 46545592a31fSmrg if test "$GCC" != yes; then 46555592a31fSmrg with_gnu_ld=no 465650f2e948Smrg fi 46573a925b30Smrg ;; 46585592a31fSmrg interix*) 46595592a31fSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 46605592a31fSmrg with_gnu_ld=yes 46615592a31fSmrg ;; 46625592a31fSmrg openbsd*) 46635592a31fSmrg with_gnu_ld=no 46645592a31fSmrg ;; 4665c97b1c41Smrg linux* | k*bsd*-gnu | gnu*) 4666c97b1c41Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 4667c97b1c41Smrg ;; 46683a925b30Smrg esac 46691ac89addSmrg 46705592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 4671b40a6198Smrg 4672b40a6198Smrg # On some targets, GNU ld is compatible enough with the native linker 4673b40a6198Smrg # that we're better off using the native interface for both. 4674b40a6198Smrg lt_use_gnu_ld_interface=no 46755592a31fSmrg if test "$with_gnu_ld" = yes; then 4676b40a6198Smrg case $host_os in 4677b40a6198Smrg aix*) 4678b40a6198Smrg # The AIX port of GNU ld has always aspired to compatibility 4679b40a6198Smrg # with the native linker. However, as the warning in the GNU ld 4680b40a6198Smrg # block says, versions before 2.19.5* couldn't really create working 4681b40a6198Smrg # shared libraries, regardless of the interface used. 4682b40a6198Smrg case `$LD -v 2>&1` in 4683b40a6198Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4684b40a6198Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4685b40a6198Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4686b40a6198Smrg *) 4687b40a6198Smrg lt_use_gnu_ld_interface=yes 4688b40a6198Smrg ;; 4689b40a6198Smrg esac 4690b40a6198Smrg ;; 4691b40a6198Smrg *) 4692b40a6198Smrg lt_use_gnu_ld_interface=yes 4693b40a6198Smrg ;; 4694b40a6198Smrg esac 4695b40a6198Smrg fi 4696b40a6198Smrg 4697b40a6198Smrg if test "$lt_use_gnu_ld_interface" = yes; then 46985592a31fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 46995592a31fSmrg wlarc='${wl}' 47001ac89addSmrg 47015592a31fSmrg # Set some defaults for GNU ld with shared library support. These 47025592a31fSmrg # are reset later if shared libraries are not supported. Putting them 47035592a31fSmrg # here allows them to be overridden if necessary. 47045592a31fSmrg runpath_var=LD_RUN_PATH 47055592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 47065592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 47075592a31fSmrg # ancient GNU ld didn't support --whole-archive et. al. 47085592a31fSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 47095592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 47105592a31fSmrg else 47115592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 47125592a31fSmrg fi 47135592a31fSmrg supports_anon_versioning=no 47145592a31fSmrg case `$LD -v 2>&1` in 4715b40a6198Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 47165592a31fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 47175592a31fSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 47185592a31fSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 47195592a31fSmrg *\ 2.11.*) ;; # other 2.11 versions 47205592a31fSmrg *) supports_anon_versioning=yes ;; 47215592a31fSmrg esac 47221ac89addSmrg 47235592a31fSmrg # See if GNU ld supports shared libraries. 47245592a31fSmrg case $host_os in 47255592a31fSmrg aix[[3-9]]*) 47265592a31fSmrg # On AIX/PPC, the GNU linker is very broken 47275592a31fSmrg if test "$host_cpu" != ia64; then 47285592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47295592a31fSmrg cat <<_LT_EOF 1>&2 47301ac89addSmrg 4731b40a6198Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 47325592a31fSmrg*** to be unable to reliably create shared libraries on AIX. 47335592a31fSmrg*** Therefore, libtool is disabling shared libraries support. If you 4734b40a6198Smrg*** really care for shared libraries, you may want to install binutils 4735b40a6198Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4736b40a6198Smrg*** You will then need to restart the configuration process. 47371ac89addSmrg 47385592a31fSmrg_LT_EOF 47395592a31fSmrg fi 47405592a31fSmrg ;; 47411ac89addSmrg 47425592a31fSmrg amigaos*) 47435592a31fSmrg case $host_cpu in 47445592a31fSmrg powerpc) 47455592a31fSmrg # see comment about AmigaOS4 .so support 47465592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47475592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 47485592a31fSmrg ;; 47495592a31fSmrg m68k) 47505592a31fSmrg _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)' 47515592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47525592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47535592a31fSmrg ;; 47545592a31fSmrg esac 47555592a31fSmrg ;; 47561ac89addSmrg 47575592a31fSmrg beos*) 47585592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 47595592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47605592a31fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 47615592a31fSmrg # support --undefined. This deserves some investigation. FIXME 47625592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47635592a31fSmrg else 47645592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47655592a31fSmrg fi 47665592a31fSmrg ;; 47671ac89addSmrg 47685592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 47695592a31fSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 47705592a31fSmrg # as there is no search path for DLLs. 47715592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4772b40a6198Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 47735592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47745592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=no 47755592a31fSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4776b40a6198Smrg _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' 4777b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 47785592a31fSmrg 47795592a31fSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 47805592a31fSmrg _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' 47815592a31fSmrg # If the export-symbols file already is a .def file (1st line 47825592a31fSmrg # is EXPORTS), use it as is; otherwise, prepend... 47835592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 47845592a31fSmrg cp $export_symbols $output_objdir/$soname.def; 47855592a31fSmrg else 47865592a31fSmrg echo EXPORTS > $output_objdir/$soname.def; 47875592a31fSmrg cat $export_symbols >> $output_objdir/$soname.def; 47885592a31fSmrg fi~ 47895592a31fSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 47905592a31fSmrg else 47915592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 47925592a31fSmrg fi 47935592a31fSmrg ;; 47941ac89addSmrg 4795b40a6198Smrg haiku*) 4796b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4797b40a6198Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4798b40a6198Smrg ;; 4799b40a6198Smrg 48005592a31fSmrg interix[[3-9]]*) 48015592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 48025592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 48035592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 48045592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 48055592a31fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 48065592a31fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 48075592a31fSmrg # default) and relocated if they conflict, which is a slow very memory 48085592a31fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 48095592a31fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 48105592a31fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 48115592a31fSmrg _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' 48125592a31fSmrg _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' 48135592a31fSmrg ;; 48141ac89addSmrg 4815b40a6198Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 48165592a31fSmrg tmp_diet=no 48175592a31fSmrg if test "$host_os" = linux-dietlibc; then 48185592a31fSmrg case $cc_basename in 48195592a31fSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 48205592a31fSmrg esac 48215592a31fSmrg fi 48225592a31fSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 48235592a31fSmrg && test "$tmp_diet" = no 48245592a31fSmrg then 4825b40a6198Smrg tmp_addflag=' $pic_flag' 48265592a31fSmrg tmp_sharedflag='-shared' 48275592a31fSmrg case $cc_basename,$host_cpu in 48285592a31fSmrg pgcc*) # Portland Group C compiler 4829b40a6198Smrg _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' 48305592a31fSmrg tmp_addflag=' $pic_flag' 48315592a31fSmrg ;; 4832b40a6198Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 4833b40a6198Smrg # Portland Group f77 and f90 compilers 4834b40a6198Smrg _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' 48355592a31fSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 48365592a31fSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 48375592a31fSmrg tmp_addflag=' -i_dynamic' ;; 48385592a31fSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 48395592a31fSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 48405592a31fSmrg ifc* | ifort*) # Intel Fortran compiler 48415592a31fSmrg tmp_addflag=' -nofor_main' ;; 48425592a31fSmrg lf95*) # Lahey Fortran 8.1 48435592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48445592a31fSmrg tmp_sharedflag='--shared' ;; 4845b40a6198Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 48465592a31fSmrg tmp_sharedflag='-qmkshrobj' 48475592a31fSmrg tmp_addflag= ;; 4848b40a6198Smrg nvcc*) # Cuda Compiler Driver 2.2 4849b40a6198Smrg _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' 4850b40a6198Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4851b40a6198Smrg ;; 48525592a31fSmrg esac 48535592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 48545592a31fSmrg *Sun\ C*) # Sun C 5.9 4855b40a6198Smrg _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' 48565592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48575592a31fSmrg tmp_sharedflag='-G' ;; 48585592a31fSmrg *Sun\ F*) # Sun Fortran 8.3 48595592a31fSmrg tmp_sharedflag='-G' ;; 48605592a31fSmrg esac 48615592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48621ac89addSmrg 48635592a31fSmrg if test "x$supports_anon_versioning" = xyes; then 48645592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48655592a31fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48665592a31fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48675592a31fSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 48685592a31fSmrg fi 48691ac89addSmrg 48705592a31fSmrg case $cc_basename in 4871b40a6198Smrg xlf* | bgf* | bgxlf* | mpixlf*) 48725592a31fSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 48735592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4874b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4875b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 48765592a31fSmrg if test "x$supports_anon_versioning" = xyes; then 48775592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48785592a31fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48795592a31fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4880b40a6198Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 48815592a31fSmrg fi 48825592a31fSmrg ;; 48835592a31fSmrg esac 48845592a31fSmrg else 48855592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 48865592a31fSmrg fi 48875592a31fSmrg ;; 48881ac89addSmrg 4889c97b1c41Smrg netbsd* | netbsdelf*-gnu) 48905592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48915592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 48925592a31fSmrg wlarc= 48935592a31fSmrg else 4894b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4895b40a6198Smrg _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' 48965592a31fSmrg fi 48975592a31fSmrg ;; 48981ac89addSmrg 48995592a31fSmrg solaris*) 49005592a31fSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 49015592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49025592a31fSmrg cat <<_LT_EOF 1>&2 49031ac89addSmrg 49045592a31fSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 49055592a31fSmrg*** create shared libraries on Solaris systems. Therefore, libtool 49065592a31fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 49075592a31fSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 49085592a31fSmrg*** your PATH or compiler configuration so that the native linker is 49095592a31fSmrg*** used, and then restart. 49101ac89addSmrg 49115592a31fSmrg_LT_EOF 49125592a31fSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4913b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4914b40a6198Smrg _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' 49155592a31fSmrg else 49165592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49175592a31fSmrg fi 49185592a31fSmrg ;; 49191ac89addSmrg 49205592a31fSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 49215592a31fSmrg case `$LD -v 2>&1` in 49225592a31fSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 49235592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49245592a31fSmrg cat <<_LT_EOF 1>&2 49251ac89addSmrg 49265592a31fSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 49275592a31fSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 49285592a31fSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 49295592a31fSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 49305592a31fSmrg*** your PATH or compiler configuration so that the native linker is 49315592a31fSmrg*** used, and then restart. 49321ac89addSmrg 49335592a31fSmrg_LT_EOF 49345592a31fSmrg ;; 49355592a31fSmrg *) 49365592a31fSmrg # For security reasons, it is highly recommended that you always 49375592a31fSmrg # use absolute paths for naming shared libraries, and exclude the 49385592a31fSmrg # DT_RUNPATH tag from executables and libraries. But doing so 49395592a31fSmrg # requires that you compile everything twice, which is a pain. 49405592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49415592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49425592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49435592a31fSmrg _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' 49445592a31fSmrg else 49455592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49465592a31fSmrg fi 49475592a31fSmrg ;; 49485592a31fSmrg esac 49495592a31fSmrg ;; 49501ac89addSmrg 49515592a31fSmrg sunos4*) 49525592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49535592a31fSmrg wlarc= 49545592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 49555592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49565592a31fSmrg ;; 49571ac89addSmrg 49585592a31fSmrg *) 49595592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4960b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4961b40a6198Smrg _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' 49625592a31fSmrg else 49635592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 49645592a31fSmrg fi 49655592a31fSmrg ;; 49665592a31fSmrg esac 49671ac89addSmrg 49685592a31fSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 49695592a31fSmrg runpath_var= 49705592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49715592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49725592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49735592a31fSmrg fi 49745592a31fSmrg else 49755592a31fSmrg # PORTME fill in a description of your system's linker (not GNU ld) 49765592a31fSmrg case $host_os in 49775592a31fSmrg aix3*) 49785592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49795592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 49805592a31fSmrg _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' 49815592a31fSmrg # Note: this linker hardcodes the directories in LIBPATH if there 49825592a31fSmrg # are no directories specified by -L. 49835592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49845592a31fSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 49855592a31fSmrg # Neither direct hardcoding nor static linking is supported with a 49865592a31fSmrg # broken collect2. 49875592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 49885592a31fSmrg fi 49895592a31fSmrg ;; 49901ac89addSmrg 49915592a31fSmrg aix[[4-9]]*) 49925592a31fSmrg if test "$host_cpu" = ia64; then 49935592a31fSmrg # On IA64, the linker does run time linking by default, so we don't 49945592a31fSmrg # have to do anything special. 49955592a31fSmrg aix_use_runtimelinking=no 49965592a31fSmrg exp_sym_flag='-Bexport' 49975592a31fSmrg no_entry_flag="" 49985592a31fSmrg else 49995592a31fSmrg # If we're using GNU nm, then we don't want the "-C" option. 50005592a31fSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 5001b40a6198Smrg # Also, AIX nm treats weak defined symbols like other global 5002b40a6198Smrg # defined symbols, whereas GNU nm marks them as "W". 50035592a31fSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5004b40a6198Smrg _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' 50055592a31fSmrg else 50065592a31fSmrg _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' 50075592a31fSmrg fi 50085592a31fSmrg aix_use_runtimelinking=no 50091ac89addSmrg 50105592a31fSmrg # Test if we are trying to use run time linking or normal 50115592a31fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 50125592a31fSmrg # need to do runtime linking. 50135592a31fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 50145592a31fSmrg for ld_flag in $LDFLAGS; do 50155592a31fSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 50165592a31fSmrg aix_use_runtimelinking=yes 50175592a31fSmrg break 50185592a31fSmrg fi 50195592a31fSmrg done 50205592a31fSmrg ;; 50215592a31fSmrg esac 50221ac89addSmrg 50235592a31fSmrg exp_sym_flag='-bexport' 50245592a31fSmrg no_entry_flag='-bnoentry' 50255592a31fSmrg fi 50261ac89addSmrg 50275592a31fSmrg # When large executables or shared objects are built, AIX ld can 50285592a31fSmrg # have problems creating the table of contents. If linking a library 50295592a31fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 50305592a31fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 50315592a31fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 50325592a31fSmrg 50335592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='' 50345592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 50355592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 50365592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50375592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50385592a31fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 50391ac89addSmrg 50405592a31fSmrg if test "$GCC" = yes; then 50415592a31fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 50425592a31fSmrg # We only want to do this on AIX 4.2 and lower, the check 50435592a31fSmrg # below for broken collect2 doesn't work under 4.3+ 50445592a31fSmrg collect2name=`${CC} -print-prog-name=collect2` 50455592a31fSmrg if test -f "$collect2name" && 50465592a31fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 50475592a31fSmrg then 50485592a31fSmrg # We have reworked collect2 50495592a31fSmrg : 50505592a31fSmrg else 50515592a31fSmrg # We have old collect2 50525592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 50535592a31fSmrg # It fails to find uninstalled libraries when the uninstalled 50545592a31fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 50555592a31fSmrg # to unsupported forces relinking 50565592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50575592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50585592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50595592a31fSmrg fi 50605592a31fSmrg ;; 50615592a31fSmrg esac 50625592a31fSmrg shared_flag='-shared' 50635592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 50645592a31fSmrg shared_flag="$shared_flag "'${wl}-G' 50655592a31fSmrg fi 5066c97b1c41Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 50675592a31fSmrg else 50685592a31fSmrg # not using gcc 50695592a31fSmrg if test "$host_cpu" = ia64; then 50705592a31fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 50715592a31fSmrg # chokes on -Wl,-G. The following line is correct: 50725592a31fSmrg shared_flag='-G' 50735592a31fSmrg else 50745592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 50755592a31fSmrg shared_flag='${wl}-G' 50765592a31fSmrg else 50775592a31fSmrg shared_flag='${wl}-bM:SRE' 50785592a31fSmrg fi 50795592a31fSmrg fi 50805592a31fSmrg fi 50811ac89addSmrg 50825592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 50835592a31fSmrg # It seems that -bexpall does not export symbols beginning with 50845592a31fSmrg # underscore (_), so it is better to generate a list of symbols to export. 50855592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 50865592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 50875592a31fSmrg # Warning - without using the other runtime loading flags (-brtl), 50885592a31fSmrg # -berok will link without error, but may produce a broken library. 50895592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 50905592a31fSmrg # Determine the default libpath from the value encoded in an 50915592a31fSmrg # empty executable. 5092b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50935592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5094b40a6198Smrg _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" 50955592a31fSmrg else 50965592a31fSmrg if test "$host_cpu" = ia64; then 50975592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 50985592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 50995592a31fSmrg _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" 51005592a31fSmrg else 51015592a31fSmrg # Determine the default libpath from the value encoded in an 51025592a31fSmrg # empty executable. 5103b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 51045592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 51055592a31fSmrg # Warning - without using the other run time loading flags, 51065592a31fSmrg # -berok will link without error, but may produce a broken library. 51075592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 51085592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5109b40a6198Smrg if test "$with_gnu_ld" = yes; then 5110b40a6198Smrg # We only use this code for GNU lds that support --whole-archive. 5111b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5112b40a6198Smrg else 5113b40a6198Smrg # Exported symbols can be pulled into shared objects from archives 5114b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5115b40a6198Smrg fi 51165592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51175592a31fSmrg # This is similar to how AIX traditionally builds its shared libraries. 51185592a31fSmrg _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' 51195592a31fSmrg fi 51205592a31fSmrg fi 51215592a31fSmrg ;; 51221ac89addSmrg 51235592a31fSmrg amigaos*) 51245592a31fSmrg case $host_cpu in 51255592a31fSmrg powerpc) 51265592a31fSmrg # see comment about AmigaOS4 .so support 51275592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51285592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51295592a31fSmrg ;; 51305592a31fSmrg m68k) 51315592a31fSmrg _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)' 51325592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51335592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51345592a31fSmrg ;; 51355592a31fSmrg esac 51365592a31fSmrg ;; 51371ac89addSmrg 51385592a31fSmrg bsdi[[45]]*) 51395592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 51405592a31fSmrg ;; 51411ac89addSmrg 51425592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 51435592a31fSmrg # When not using gcc, we currently assume that we are using 51445592a31fSmrg # Microsoft Visual C++. 51455592a31fSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 51465592a31fSmrg # no search path for DLLs. 5147b40a6198Smrg case $cc_basename in 5148b40a6198Smrg cl*) 5149b40a6198Smrg # Native MSVC 5150b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5151b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5152b40a6198Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5153b40a6198Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5154b40a6198Smrg # Tell ltmain to make .lib files, not .a files. 5155b40a6198Smrg libext=lib 5156b40a6198Smrg # Tell ltmain to make .dll files, not .so files. 5157b40a6198Smrg shrext_cmds=".dll" 5158b40a6198Smrg # FIXME: Setting linknames here is a bad hack. 5159b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5160b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5161b40a6198Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5162b40a6198Smrg else 5163b40a6198Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5164b40a6198Smrg fi~ 5165b40a6198Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5166b40a6198Smrg linknames=' 5167b40a6198Smrg # The linker will not automatically build a static lib if we build a DLL. 5168b40a6198Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5169b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5170b40a6198Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5171b40a6198Smrg _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' 5172b40a6198Smrg # Don't use ranlib 5173b40a6198Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5174b40a6198Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5175b40a6198Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5176b40a6198Smrg case $lt_outputfile in 5177b40a6198Smrg *.exe|*.EXE) ;; 5178b40a6198Smrg *) 5179b40a6198Smrg lt_outputfile="$lt_outputfile.exe" 5180b40a6198Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5181b40a6198Smrg ;; 5182b40a6198Smrg esac~ 5183b40a6198Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5184b40a6198Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5185b40a6198Smrg $RM "$lt_outputfile.manifest"; 5186b40a6198Smrg fi' 5187b40a6198Smrg ;; 5188b40a6198Smrg *) 5189b40a6198Smrg # Assume MSVC wrapper 5190b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5191b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5192b40a6198Smrg # Tell ltmain to make .lib files, not .a files. 5193b40a6198Smrg libext=lib 5194b40a6198Smrg # Tell ltmain to make .dll files, not .so files. 5195b40a6198Smrg shrext_cmds=".dll" 5196b40a6198Smrg # FIXME: Setting linknames here is a bad hack. 5197b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5198b40a6198Smrg # The linker will automatically build a .lib file if we build a DLL. 5199b40a6198Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5200b40a6198Smrg # FIXME: Should let the user specify the lib program. 5201b40a6198Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5202b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5203b40a6198Smrg ;; 5204b40a6198Smrg esac 52055592a31fSmrg ;; 52061ac89addSmrg 52075592a31fSmrg darwin* | rhapsody*) 52085592a31fSmrg _LT_DARWIN_LINKER_FEATURES($1) 52095592a31fSmrg ;; 52101ac89addSmrg 52115592a31fSmrg dgux*) 52125592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 52135592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52145592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52155592a31fSmrg ;; 52161ac89addSmrg 52175592a31fSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 52185592a31fSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 52195592a31fSmrg # does not break anything, and helps significantly (at the cost of a little 52205592a31fSmrg # extra space). 52215592a31fSmrg freebsd2.2*) 52225592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 52235592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52245592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52255592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52265592a31fSmrg ;; 522745bc899bSmrg 52285592a31fSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5229b40a6198Smrg freebsd2.*) 52305592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 52315592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52325592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52335592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52345592a31fSmrg ;; 523545bc899bSmrg 52365592a31fSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 52375592a31fSmrg freebsd* | dragonfly*) 5238b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 52395592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52405592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52415592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52425592a31fSmrg ;; 524345bc899bSmrg 52445592a31fSmrg hpux9*) 52455592a31fSmrg if test "$GCC" = yes; then 5246b40a6198Smrg _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' 52475592a31fSmrg else 52485592a31fSmrg _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' 52495592a31fSmrg fi 52505592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52515592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52525592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 525345bc899bSmrg 52545592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 52555592a31fSmrg # but as the default location of the library. 52565592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52575592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52585592a31fSmrg ;; 525945bc899bSmrg 52605592a31fSmrg hpux10*) 5261b40a6198Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5262b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52635592a31fSmrg else 52645592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 52655592a31fSmrg fi 52665592a31fSmrg if test "$with_gnu_ld" = no; then 52675592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52685592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52695592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 52705592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 52715592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52725592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 52735592a31fSmrg # but as the default location of the library. 52745592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52755592a31fSmrg fi 52765592a31fSmrg ;; 527745bc899bSmrg 52785592a31fSmrg hpux11*) 5279b40a6198Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52805592a31fSmrg case $host_cpu in 52815592a31fSmrg hppa*64*) 52825592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52835592a31fSmrg ;; 52845592a31fSmrg ia64*) 5285b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52865592a31fSmrg ;; 52875592a31fSmrg *) 5288b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52895592a31fSmrg ;; 52905592a31fSmrg esac 52915592a31fSmrg else 52925592a31fSmrg case $host_cpu in 52935592a31fSmrg hppa*64*) 52945592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52955592a31fSmrg ;; 52965592a31fSmrg ia64*) 52975592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52985592a31fSmrg ;; 52995592a31fSmrg *) 5300b40a6198Smrg m4_if($1, [], [ 5301b40a6198Smrg # Older versions of the 11.00 compiler do not understand -b yet 5302b40a6198Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5303b40a6198Smrg _LT_LINKER_OPTION([if $CC understands -b], 5304b40a6198Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5305b40a6198Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5306b40a6198Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5307b40a6198Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 53085592a31fSmrg ;; 53095592a31fSmrg esac 53105592a31fSmrg fi 53115592a31fSmrg if test "$with_gnu_ld" = no; then 53125592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 53135592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 531445bc899bSmrg 53155592a31fSmrg case $host_cpu in 53165592a31fSmrg hppa*64*|ia64*) 53175592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 53185592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53195592a31fSmrg ;; 53205592a31fSmrg *) 53215592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53225592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53235592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 532445bc899bSmrg 53255592a31fSmrg # hardcode_minus_L: Not really in the search PATH, 53265592a31fSmrg # but as the default location of the library. 53275592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53285592a31fSmrg ;; 53295592a31fSmrg esac 53305592a31fSmrg fi 533150f2e948Smrg ;; 53325592a31fSmrg 53335592a31fSmrg irix5* | irix6* | nonstopux*) 53345592a31fSmrg if test "$GCC" = yes; then 5335b40a6198Smrg _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' 53365592a31fSmrg # Try to use the -exported_symbol ld option, if it does not 53375592a31fSmrg # work, assume that -exports_file does not work either and 53385592a31fSmrg # implicitly export all symbols. 5339b40a6198Smrg # This should be the same for all languages, so no per-tag cache variable. 5340b40a6198Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5341b40a6198Smrg [lt_cv_irix_exported_symbol], 5342b40a6198Smrg [save_LDFLAGS="$LDFLAGS" 5343b40a6198Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5344b40a6198Smrg AC_LINK_IFELSE( 5345b40a6198Smrg [AC_LANG_SOURCE( 5346b40a6198Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5347b40a6198Smrg [C++], [[int foo (void) { return 0; }]], 5348b40a6198Smrg [Fortran 77], [[ 5349b40a6198Smrg subroutine foo 5350b40a6198Smrg end]], 5351b40a6198Smrg [Fortran], [[ 5352b40a6198Smrg subroutine foo 5353b40a6198Smrg end]])])], 5354b40a6198Smrg [lt_cv_irix_exported_symbol=yes], 5355b40a6198Smrg [lt_cv_irix_exported_symbol=no]) 5356b40a6198Smrg LDFLAGS="$save_LDFLAGS"]) 5357b40a6198Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 5358b40a6198Smrg _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' 5359b40a6198Smrg fi 53605592a31fSmrg else 5361b40a6198Smrg _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' 5362b40a6198Smrg _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' 53635592a31fSmrg fi 53645592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 53655592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53665592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53675592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 53685592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 536950f2e948Smrg ;; 53701ac89addSmrg 5371c97b1c41Smrg netbsd* | netbsdelf*-gnu) 53725592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53735592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 53745592a31fSmrg else 53755592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 53765592a31fSmrg fi 53775592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53785592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53795592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53805592a31fSmrg ;; 53811ac89addSmrg 53825592a31fSmrg newsos6) 53835592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 53845592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53855592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53865592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53875592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53885592a31fSmrg ;; 53891ac89addSmrg 53905592a31fSmrg *nto* | *qnx*) 53915592a31fSmrg ;; 53921ac89addSmrg 53935592a31fSmrg openbsd*) 53945592a31fSmrg if test -f /usr/libexec/ld.so; then 53955592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53965592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53975592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53985592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 53995592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54005592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 54015592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54025592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 54035592a31fSmrg else 54045592a31fSmrg case $host_os in 54055592a31fSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 54065592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 54075592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54085592a31fSmrg ;; 54095592a31fSmrg *) 54105592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54115592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54125592a31fSmrg ;; 54135592a31fSmrg esac 54145592a31fSmrg fi 54155592a31fSmrg else 54165592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 54175592a31fSmrg fi 54185592a31fSmrg ;; 54191ac89addSmrg 54205592a31fSmrg os2*) 54215592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54225592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54235592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5424b40a6198Smrg _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' 54255592a31fSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 54265592a31fSmrg ;; 54271ac89addSmrg 54285592a31fSmrg osf3*) 54295592a31fSmrg if test "$GCC" = yes; then 54305592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5431b40a6198Smrg _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' 54325592a31fSmrg else 54335592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5434b40a6198Smrg _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' 54355592a31fSmrg fi 54365592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54375592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54385592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54395592a31fSmrg ;; 54401ac89addSmrg 54415592a31fSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 54425592a31fSmrg if test "$GCC" = yes; then 54435592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5444b40a6198Smrg _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' 54455592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54465592a31fSmrg else 54475592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5448b40a6198Smrg _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' 54495592a31fSmrg _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~ 5450b40a6198Smrg $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' 54511ac89addSmrg 54525592a31fSmrg # Both c and cxx compiler support -rpath directly 54535592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 54545592a31fSmrg fi 54555592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54565592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54575592a31fSmrg ;; 54581ac89addSmrg 54595592a31fSmrg solaris*) 54605592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 54615592a31fSmrg if test "$GCC" = yes; then 54625592a31fSmrg wlarc='${wl}' 5463b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 54645592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5465b40a6198Smrg $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' 54665592a31fSmrg else 54675592a31fSmrg case `$CC -V 2>&1` in 54685592a31fSmrg *"Compilers 5.0"*) 54695592a31fSmrg wlarc='' 54705592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 54715592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54725592a31fSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 54735592a31fSmrg ;; 54745592a31fSmrg *) 54755592a31fSmrg wlarc='${wl}' 54765592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 54775592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54785592a31fSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54795592a31fSmrg ;; 54805592a31fSmrg esac 54815592a31fSmrg fi 54825592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54835592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54845592a31fSmrg case $host_os in 54855592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54865592a31fSmrg *) 54875592a31fSmrg # The compiler driver will combine and reorder linker options, 54885592a31fSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 54895592a31fSmrg # but is careful enough not to reorder. 54905592a31fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 54915592a31fSmrg if test "$GCC" = yes; then 54925592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 54935592a31fSmrg else 54945592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 54955592a31fSmrg fi 54965592a31fSmrg ;; 54975592a31fSmrg esac 54985592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54995592a31fSmrg ;; 55001ac89addSmrg 55015592a31fSmrg sunos4*) 55025592a31fSmrg if test "x$host_vendor" = xsequent; then 55035592a31fSmrg # Use $CC to link under sequent, because it throws in some extra .o 55045592a31fSmrg # files that make .init and .fini sections work. 55055592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 55065592a31fSmrg else 55075592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 55085592a31fSmrg fi 55095592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55105592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 55115592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55125592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55135592a31fSmrg ;; 55141ac89addSmrg 55155592a31fSmrg sysv4) 55165592a31fSmrg case $host_vendor in 55175592a31fSmrg sni) 55185592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55195592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 55205592a31fSmrg ;; 55215592a31fSmrg siemens) 55225592a31fSmrg ## LD is ld it makes a PLAMLIB 55235592a31fSmrg ## CC just makes a GrossModule. 55245592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 55255592a31fSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 55265592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 55275592a31fSmrg ;; 55285592a31fSmrg motorola) 55295592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55305592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 55315592a31fSmrg ;; 55325592a31fSmrg esac 55335592a31fSmrg runpath_var='LD_RUN_PATH' 55345592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55355592a31fSmrg ;; 55361ac89addSmrg 55375592a31fSmrg sysv4.3*) 55385592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55395592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55405592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 55415592a31fSmrg ;; 55421ac89addSmrg 55435592a31fSmrg sysv4*MP*) 55445592a31fSmrg if test -d /usr/nec; then 55455592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55465592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55475592a31fSmrg runpath_var=LD_RUN_PATH 55485592a31fSmrg hardcode_runpath_var=yes 55495592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 55505592a31fSmrg fi 55515592a31fSmrg ;; 55521ac89addSmrg 55535592a31fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 55545592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55555592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55565592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55575592a31fSmrg runpath_var='LD_RUN_PATH' 55581ac89addSmrg 55595592a31fSmrg if test "$GCC" = yes; then 55605592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55615592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55625592a31fSmrg else 55635592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55645592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55655592a31fSmrg fi 55665592a31fSmrg ;; 55671ac89addSmrg 55685592a31fSmrg sysv5* | sco3.2v5* | sco5v6*) 55695592a31fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 55705592a31fSmrg # link with -lc, and that would cause any symbols used from libc to 55715592a31fSmrg # always be unresolved, which means just about no library would 55725592a31fSmrg # ever link correctly. If we're not using GNU ld we use -z text 55735592a31fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 55745592a31fSmrg # as -z defs. 55755592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55765592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55775592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55785592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55795592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 55805592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55815592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55825592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55835592a31fSmrg runpath_var='LD_RUN_PATH' 55841ac89addSmrg 55855592a31fSmrg if test "$GCC" = yes; then 55865592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55875592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55885592a31fSmrg else 55895592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55905592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55915592a31fSmrg fi 55925592a31fSmrg ;; 55931ac89addSmrg 55945592a31fSmrg uts4*) 55955592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55965592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55975592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55985592a31fSmrg ;; 559950f2e948Smrg 56005592a31fSmrg *) 56015592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 56025592a31fSmrg ;; 56035592a31fSmrg esac 560450f2e948Smrg 56055592a31fSmrg if test x$host_vendor = xsni; then 56065592a31fSmrg case $host in 56075592a31fSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 56085592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 56095592a31fSmrg ;; 56105592a31fSmrg esac 56115592a31fSmrg fi 56125592a31fSmrg fi 56135592a31fSmrg]) 56145592a31fSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 56155592a31fSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 561650f2e948Smrg 56175592a31fSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 561850f2e948Smrg 56195592a31fSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 56205592a31fSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 56215592a31fSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 56225592a31fSmrg [The commands to extract the exported symbol list from a shared archive]) 562350f2e948Smrg 56245592a31fSmrg# 56255592a31fSmrg# Do we need to explicitly link libc? 56265592a31fSmrg# 56275592a31fSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 56285592a31fSmrgx|xyes) 56295592a31fSmrg # Assume -lc should be added 56305592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56311ac89addSmrg 56325592a31fSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 56335592a31fSmrg case $_LT_TAGVAR(archive_cmds, $1) in 56345592a31fSmrg *'~'*) 56355592a31fSmrg # FIXME: we may have to deal with multi-command sequences. 56365592a31fSmrg ;; 56375592a31fSmrg '$CC '*) 56385592a31fSmrg # Test whether the compiler implicitly links with -lc since on some 56395592a31fSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 56405592a31fSmrg # to ld, don't add -lc before -lgcc. 5641b40a6198Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5642b40a6198Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5643b40a6198Smrg [$RM conftest* 5644b40a6198Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5645b40a6198Smrg 5646b40a6198Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5647b40a6198Smrg soname=conftest 5648b40a6198Smrg lib=conftest 5649b40a6198Smrg libobjs=conftest.$ac_objext 5650b40a6198Smrg deplibs= 5651b40a6198Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5652b40a6198Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5653b40a6198Smrg compiler_flags=-v 5654b40a6198Smrg linker_flags=-v 5655b40a6198Smrg verstring= 5656b40a6198Smrg output_objdir=. 5657b40a6198Smrg libname=conftest 5658b40a6198Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5659b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5660b40a6198Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5661b40a6198Smrg then 5662b40a6198Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5663b40a6198Smrg else 5664b40a6198Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5665b40a6198Smrg fi 5666b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5667b40a6198Smrg else 5668b40a6198Smrg cat conftest.err 1>&5 5669b40a6198Smrg fi 5670b40a6198Smrg $RM conftest* 5671b40a6198Smrg ]) 5672b40a6198Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 56735592a31fSmrg ;; 56745592a31fSmrg esac 56755592a31fSmrg fi 56765592a31fSmrg ;; 56775592a31fSmrgesac 56781ac89addSmrg 56795592a31fSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 56805592a31fSmrg [Whether or not to add -lc for building shared libraries]) 56815592a31fSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 56825592a31fSmrg [enable_shared_with_static_runtimes], [0], 56835592a31fSmrg [Whether or not to disallow shared libs when runtime libs are static]) 56845592a31fSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 56855592a31fSmrg [Compiler flag to allow reflexive dlopens]) 56865592a31fSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 56875592a31fSmrg [Compiler flag to generate shared objects directly from archives]) 56885592a31fSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 56895592a31fSmrg [Whether the compiler copes with passing no objects directly]) 56905592a31fSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 56915592a31fSmrg [Create an old-style archive from a shared archive]) 56925592a31fSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 56935592a31fSmrg [Create a temporary old-style archive to link instead of a shared archive]) 56945592a31fSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 56955592a31fSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 56965592a31fSmrg_LT_TAGDECL([], [module_cmds], [2], 56975592a31fSmrg [Commands used to build a loadable module if different from building 56985592a31fSmrg a shared archive.]) 56995592a31fSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 57005592a31fSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 57015592a31fSmrg [Whether we are building with GNU ld or not]) 57025592a31fSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 57035592a31fSmrg [Flag that allows shared libraries with undefined symbols to be built]) 57045592a31fSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 57055592a31fSmrg [Flag that enforces no undefined symbols]) 57065592a31fSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 57075592a31fSmrg [Flag to hardcode $libdir into a binary during linking. 57085592a31fSmrg This must work even if $libdir does not exist]) 57095592a31fSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 57105592a31fSmrg [Whether we need a single "-rpath" flag with a separated argument]) 57115592a31fSmrg_LT_TAGDECL([], [hardcode_direct], [0], 57125592a31fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57135592a31fSmrg DIR into the resulting binary]) 57145592a31fSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 57155592a31fSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57165592a31fSmrg DIR into the resulting binary and the resulting library dependency is 57175592a31fSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 57185592a31fSmrg library is relocated]) 57195592a31fSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 57205592a31fSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 57215592a31fSmrg into the resulting binary]) 57225592a31fSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 57235592a31fSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 57245592a31fSmrg into the resulting binary]) 57255592a31fSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 57265592a31fSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 57275592a31fSmrg into the library and all subsequent libraries and executables linked 57285592a31fSmrg against it]) 57295592a31fSmrg_LT_TAGDECL([], [inherit_rpath], [0], 57305592a31fSmrg [Set to yes if linker adds runtime paths of dependent libraries 57315592a31fSmrg to runtime path list]) 57325592a31fSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 57335592a31fSmrg [Whether libtool must link a program against all its dependency libraries]) 57345592a31fSmrg_LT_TAGDECL([], [always_export_symbols], [0], 57355592a31fSmrg [Set to "yes" if exported symbols are required]) 57365592a31fSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 57375592a31fSmrg [The commands to list exported symbols]) 57385592a31fSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 57395592a31fSmrg [Symbols that should not be listed in the preloaded symbols]) 57405592a31fSmrg_LT_TAGDECL([], [include_expsyms], [1], 57415592a31fSmrg [Symbols that must always be exported]) 57425592a31fSmrg_LT_TAGDECL([], [prelink_cmds], [2], 57435592a31fSmrg [Commands necessary for linking programs (against libraries) with templates]) 5744b40a6198Smrg_LT_TAGDECL([], [postlink_cmds], [2], 5745b40a6198Smrg [Commands necessary for finishing linking programs]) 57465592a31fSmrg_LT_TAGDECL([], [file_list_spec], [1], 57475592a31fSmrg [Specify filename containing input files]) 57485592a31fSmrgdnl FIXME: Not yet implemented 57495592a31fSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 57505592a31fSmrgdnl [Compiler flag to generate thread safe objects]) 57515592a31fSmrg])# _LT_LINKER_SHLIBS 57525592a31fSmrg 57535592a31fSmrg 57545592a31fSmrg# _LT_LANG_C_CONFIG([TAG]) 57555592a31fSmrg# ------------------------ 57565592a31fSmrg# Ensure that the configuration variables for a C compiler are suitably 57575592a31fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 57585592a31fSmrg# the compiler configuration to `libtool'. 57595592a31fSmrgm4_defun([_LT_LANG_C_CONFIG], 57605592a31fSmrg[m4_require([_LT_DECL_EGREP])dnl 57615592a31fSmrglt_save_CC="$CC" 57625592a31fSmrgAC_LANG_PUSH(C) 57631ac89addSmrg 57645592a31fSmrg# Source file extension for C test sources. 57655592a31fSmrgac_ext=c 57661ac89addSmrg 57675592a31fSmrg# Object file extension for compiled C test sources. 57685592a31fSmrgobjext=o 57695592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 57701ac89addSmrg 57715592a31fSmrg# Code to be used in simple compile tests 57725592a31fSmrglt_simple_compile_test_code="int some_variable = 0;" 57731ac89addSmrg 57745592a31fSmrg# Code to be used in simple link tests 57755592a31fSmrglt_simple_link_test_code='int main(){return(0);}' 57761ac89addSmrg 57775592a31fSmrg_LT_TAG_COMPILER 57785592a31fSmrg# Save the default compiler, since it gets overwritten when the other 57795592a31fSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 57805592a31fSmrgcompiler_DEFAULT=$CC 57811ac89addSmrg 57825592a31fSmrg# save warnings/boilerplate of simple test code 57835592a31fSmrg_LT_COMPILER_BOILERPLATE 57845592a31fSmrg_LT_LINKER_BOILERPLATE 57851ac89addSmrg 57865592a31fSmrgif test -n "$compiler"; then 57875592a31fSmrg _LT_COMPILER_NO_RTTI($1) 57885592a31fSmrg _LT_COMPILER_PIC($1) 57895592a31fSmrg _LT_COMPILER_C_O($1) 57905592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 57915592a31fSmrg _LT_LINKER_SHLIBS($1) 57925592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 57935592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 57945592a31fSmrg LT_SYS_DLOPEN_SELF 57955592a31fSmrg _LT_CMD_STRIPLIB 57965592a31fSmrg 57975592a31fSmrg # Report which library types will actually be built 57985592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 57995592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 58005592a31fSmrg 58015592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 58025592a31fSmrg test "$can_build_shared" = "no" && enable_shared=no 58035592a31fSmrg 58045592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 58055592a31fSmrg # are all built from PIC. 58065592a31fSmrg case $host_os in 58075592a31fSmrg aix3*) 58085592a31fSmrg test "$enable_shared" = yes && enable_static=no 58095592a31fSmrg if test -n "$RANLIB"; then 58105592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 58115592a31fSmrg postinstall_cmds='$RANLIB $lib' 58125592a31fSmrg fi 58135592a31fSmrg ;; 58141ac89addSmrg 58155592a31fSmrg aix[[4-9]]*) 58165592a31fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58175592a31fSmrg test "$enable_shared" = yes && enable_static=no 58185592a31fSmrg fi 58195592a31fSmrg ;; 58205592a31fSmrg esac 58215592a31fSmrg AC_MSG_RESULT([$enable_shared]) 58221ac89addSmrg 58235592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 58245592a31fSmrg # Make sure either enable_shared or enable_static is yes. 58255592a31fSmrg test "$enable_shared" = yes || enable_static=yes 58265592a31fSmrg AC_MSG_RESULT([$enable_static]) 58271ac89addSmrg 58285592a31fSmrg _LT_CONFIG($1) 58295592a31fSmrgfi 58305592a31fSmrgAC_LANG_POP 58315592a31fSmrgCC="$lt_save_CC" 58325592a31fSmrg])# _LT_LANG_C_CONFIG 583350f2e948Smrg 583450f2e948Smrg 58355592a31fSmrg# _LT_LANG_CXX_CONFIG([TAG]) 58365592a31fSmrg# -------------------------- 58375592a31fSmrg# Ensure that the configuration variables for a C++ compiler are suitably 58385592a31fSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 58395592a31fSmrg# the compiler configuration to `libtool'. 58405592a31fSmrgm4_defun([_LT_LANG_CXX_CONFIG], 5841b40a6198Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 58425592a31fSmrgm4_require([_LT_DECL_EGREP])dnl 5843b40a6198Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5844b40a6198Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5845b40a6198Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5846b40a6198Smrg (test "X$CXX" != "Xg++"))) ; then 5847b40a6198Smrg AC_PROG_CXXCPP 5848b40a6198Smrgelse 5849b40a6198Smrg _lt_caught_CXX_error=yes 5850b40a6198Smrgfi 58515592a31fSmrg 58525592a31fSmrgAC_LANG_PUSH(C++) 58535592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 58545592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 58555592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 58565592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 58575592a31fSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 58585592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 58595592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 58605592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 58615592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 58625592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 58635592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 58645592a31fSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 58655592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 58665592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 58675592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 58685592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 58695592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 58705592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5871b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5872b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 58735592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 58745592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 58755592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 58761ac89addSmrg 58775592a31fSmrg# Source file extension for C++ test sources. 58785592a31fSmrgac_ext=cpp 58791ac89addSmrg 58805592a31fSmrg# Object file extension for compiled C++ test sources. 58815592a31fSmrgobjext=o 58825592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 58835592a31fSmrg 58845592a31fSmrg# No sense in running all these tests if we already determined that 58855592a31fSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 58865592a31fSmrg# are currently assumed to apply to all compilers on this platform, 58875592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 58885592a31fSmrgif test "$_lt_caught_CXX_error" != yes; then 58895592a31fSmrg # Code to be used in simple compile tests 58905592a31fSmrg lt_simple_compile_test_code="int some_variable = 0;" 58915592a31fSmrg 58925592a31fSmrg # Code to be used in simple link tests 58935592a31fSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 58945592a31fSmrg 58955592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 58965592a31fSmrg _LT_TAG_COMPILER 58975592a31fSmrg 58985592a31fSmrg # save warnings/boilerplate of simple test code 58995592a31fSmrg _LT_COMPILER_BOILERPLATE 59005592a31fSmrg _LT_LINKER_BOILERPLATE 59015592a31fSmrg 59025592a31fSmrg # Allow CC to be a program name with arguments. 59035592a31fSmrg lt_save_CC=$CC 5904b40a6198Smrg lt_save_CFLAGS=$CFLAGS 59055592a31fSmrg lt_save_LD=$LD 59065592a31fSmrg lt_save_GCC=$GCC 59075592a31fSmrg GCC=$GXX 59085592a31fSmrg lt_save_with_gnu_ld=$with_gnu_ld 59095592a31fSmrg lt_save_path_LD=$lt_cv_path_LD 59105592a31fSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 59115592a31fSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 59125592a31fSmrg else 59135592a31fSmrg $as_unset lt_cv_prog_gnu_ld 59145592a31fSmrg fi 59155592a31fSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 59165592a31fSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 59175592a31fSmrg else 59185592a31fSmrg $as_unset lt_cv_path_LD 59195592a31fSmrg fi 59205592a31fSmrg test -z "${LDCXX+set}" || LD=$LDCXX 59215592a31fSmrg CC=${CXX-"c++"} 5922b40a6198Smrg CFLAGS=$CXXFLAGS 59235592a31fSmrg compiler=$CC 59245592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 59255592a31fSmrg _LT_CC_BASENAME([$compiler]) 59261ac89addSmrg 59275592a31fSmrg if test -n "$compiler"; then 59285592a31fSmrg # We don't want -fno-exception when compiling C++ code, so set the 59295592a31fSmrg # no_builtin_flag separately 59305592a31fSmrg if test "$GXX" = yes; then 59315592a31fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 59325592a31fSmrg else 59335592a31fSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 59345592a31fSmrg fi 59351ac89addSmrg 59365592a31fSmrg if test "$GXX" = yes; then 59375592a31fSmrg # Set up default GNU C++ configuration 593850f2e948Smrg 59395592a31fSmrg LT_PATH_LD 594050f2e948Smrg 59415592a31fSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 59425592a31fSmrg # archiving commands below assume that GNU ld is being used. 59435592a31fSmrg if test "$with_gnu_ld" = yes; then 5944b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5945b40a6198Smrg _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' 594650f2e948Smrg 59475592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59485592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 594950f2e948Smrg 59505592a31fSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 59515592a31fSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 59525592a31fSmrg # investigate it a little bit more. (MM) 59535592a31fSmrg wlarc='${wl}' 595450f2e948Smrg 59555592a31fSmrg # ancient GNU ld didn't support --whole-archive et. al. 59565592a31fSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 59575592a31fSmrg $GREP 'no-whole-archive' > /dev/null; then 59585592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 59595592a31fSmrg else 59605592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59615592a31fSmrg fi 59625592a31fSmrg else 59635592a31fSmrg with_gnu_ld=no 59645592a31fSmrg wlarc= 59655592a31fSmrg 59665592a31fSmrg # A generic and very simple default shared library creation 59675592a31fSmrg # command for GNU C++ for the case where it uses the native 59685592a31fSmrg # linker, instead of GNU ld. If possible, this setting should 59695592a31fSmrg # overridden to take advantage of the native linker features on 59705592a31fSmrg # the platform it is being used on. 59715592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 59725592a31fSmrg fi 597350f2e948Smrg 59745592a31fSmrg # Commands to make compiler produce verbose output that lists 59755592a31fSmrg # what "hidden" libraries, object files and flags are used when 59765592a31fSmrg # linking a shared library. 5977b40a6198Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 597850f2e948Smrg 59795592a31fSmrg else 59805592a31fSmrg GXX=no 59815592a31fSmrg with_gnu_ld=no 59825592a31fSmrg wlarc= 59835592a31fSmrg fi 598450f2e948Smrg 59855592a31fSmrg # PORTME: fill in a description of your system's C++ link characteristics 59865592a31fSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 59875592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 59885592a31fSmrg case $host_os in 59895592a31fSmrg aix3*) 59905592a31fSmrg # FIXME: insert proper C++ library support 59915592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 59925592a31fSmrg ;; 59935592a31fSmrg aix[[4-9]]*) 59945592a31fSmrg if test "$host_cpu" = ia64; then 59955592a31fSmrg # On IA64, the linker does run time linking by default, so we don't 59965592a31fSmrg # have to do anything special. 59975592a31fSmrg aix_use_runtimelinking=no 59985592a31fSmrg exp_sym_flag='-Bexport' 59995592a31fSmrg no_entry_flag="" 60005592a31fSmrg else 60015592a31fSmrg aix_use_runtimelinking=no 60025592a31fSmrg 60035592a31fSmrg # Test if we are trying to use run time linking or normal 60045592a31fSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 60055592a31fSmrg # need to do runtime linking. 60065592a31fSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 60075592a31fSmrg for ld_flag in $LDFLAGS; do 60085592a31fSmrg case $ld_flag in 60095592a31fSmrg *-brtl*) 60105592a31fSmrg aix_use_runtimelinking=yes 60115592a31fSmrg break 60125592a31fSmrg ;; 60135592a31fSmrg esac 60145592a31fSmrg done 60155592a31fSmrg ;; 60165592a31fSmrg esac 601750f2e948Smrg 60185592a31fSmrg exp_sym_flag='-bexport' 60195592a31fSmrg no_entry_flag='-bnoentry' 60205592a31fSmrg fi 602150f2e948Smrg 60225592a31fSmrg # When large executables or shared objects are built, AIX ld can 60235592a31fSmrg # have problems creating the table of contents. If linking a library 60245592a31fSmrg # or program results in "error TOC overflow" add -mminimal-toc to 60255592a31fSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60265592a31fSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60275592a31fSmrg 60285592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='' 60295592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 60305592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60315592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60325592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60335592a31fSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60345592a31fSmrg 60355592a31fSmrg if test "$GXX" = yes; then 60365592a31fSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60375592a31fSmrg # We only want to do this on AIX 4.2 and lower, the check 60385592a31fSmrg # below for broken collect2 doesn't work under 4.3+ 60395592a31fSmrg collect2name=`${CC} -print-prog-name=collect2` 60405592a31fSmrg if test -f "$collect2name" && 60415592a31fSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60425592a31fSmrg then 60435592a31fSmrg # We have reworked collect2 60445592a31fSmrg : 60455592a31fSmrg else 60465592a31fSmrg # We have old collect2 60475592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60485592a31fSmrg # It fails to find uninstalled libraries when the uninstalled 60495592a31fSmrg # path is not listed in the libpath. Setting hardcode_minus_L 60505592a31fSmrg # to unsupported forces relinking 60515592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60525592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60535592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60545592a31fSmrg fi 60555592a31fSmrg esac 60565592a31fSmrg shared_flag='-shared' 60575592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 60585592a31fSmrg shared_flag="$shared_flag "'${wl}-G' 60595592a31fSmrg fi 60605592a31fSmrg else 60615592a31fSmrg # not using gcc 60625592a31fSmrg if test "$host_cpu" = ia64; then 60635592a31fSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60645592a31fSmrg # chokes on -Wl,-G. The following line is correct: 60655592a31fSmrg shared_flag='-G' 60665592a31fSmrg else 60675592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 60685592a31fSmrg shared_flag='${wl}-G' 60695592a31fSmrg else 60705592a31fSmrg shared_flag='${wl}-bM:SRE' 60715592a31fSmrg fi 60725592a31fSmrg fi 60735592a31fSmrg fi 607450f2e948Smrg 60755592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60765592a31fSmrg # It seems that -bexpall does not export symbols beginning with 60775592a31fSmrg # underscore (_), so it is better to generate a list of symbols to 60785592a31fSmrg # export. 60795592a31fSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 60805592a31fSmrg if test "$aix_use_runtimelinking" = yes; then 60815592a31fSmrg # Warning - without using the other runtime loading flags (-brtl), 60825592a31fSmrg # -berok will link without error, but may produce a broken library. 60835592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60845592a31fSmrg # Determine the default libpath from the value encoded in an empty 60855592a31fSmrg # executable. 6086b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60875592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60885592a31fSmrg 6089b40a6198Smrg _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" 60905592a31fSmrg else 60915592a31fSmrg if test "$host_cpu" = ia64; then 60925592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60935592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 60945592a31fSmrg _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" 60955592a31fSmrg else 60965592a31fSmrg # Determine the default libpath from the value encoded in an 60975592a31fSmrg # empty executable. 6098b40a6198Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60995592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 61005592a31fSmrg # Warning - without using the other run time loading flags, 61015592a31fSmrg # -berok will link without error, but may produce a broken library. 61025592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 61035592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6104b40a6198Smrg if test "$with_gnu_ld" = yes; then 6105b40a6198Smrg # We only use this code for GNU lds that support --whole-archive. 6106b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6107b40a6198Smrg else 6108b40a6198Smrg # Exported symbols can be pulled into shared objects from archives 6109b40a6198Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6110b40a6198Smrg fi 61115592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61125592a31fSmrg # This is similar to how AIX traditionally builds its shared 61135592a31fSmrg # libraries. 61145592a31fSmrg _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' 61155592a31fSmrg fi 61165592a31fSmrg fi 61175592a31fSmrg ;; 611850f2e948Smrg 61195592a31fSmrg beos*) 61205592a31fSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 61215592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61225592a31fSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 61235592a31fSmrg # support --undefined. This deserves some investigation. FIXME 61245592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61255592a31fSmrg else 61265592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61275592a31fSmrg fi 61285592a31fSmrg ;; 612950f2e948Smrg 61305592a31fSmrg chorus*) 61315592a31fSmrg case $cc_basename in 61325592a31fSmrg *) 61335592a31fSmrg # FIXME: insert proper C++ library support 61345592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 61355592a31fSmrg ;; 61365592a31fSmrg esac 61375592a31fSmrg ;; 613850f2e948Smrg 61395592a31fSmrg cygwin* | mingw* | pw32* | cegcc*) 6140b40a6198Smrg case $GXX,$cc_basename in 6141b40a6198Smrg ,cl* | no,cl*) 6142b40a6198Smrg # Native MSVC 6143b40a6198Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6144b40a6198Smrg # no search path for DLLs. 6145b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6146b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6147b40a6198Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6148b40a6198Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6149b40a6198Smrg # Tell ltmain to make .lib files, not .a files. 6150b40a6198Smrg libext=lib 6151b40a6198Smrg # Tell ltmain to make .dll files, not .so files. 6152b40a6198Smrg shrext_cmds=".dll" 6153b40a6198Smrg # FIXME: Setting linknames here is a bad hack. 6154b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6155b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6156b40a6198Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6157b40a6198Smrg else 6158b40a6198Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6159b40a6198Smrg fi~ 6160b40a6198Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6161b40a6198Smrg linknames=' 6162b40a6198Smrg # The linker will not automatically build a static lib if we build a DLL. 6163b40a6198Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6164b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6165b40a6198Smrg # Don't use ranlib 6166b40a6198Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6167b40a6198Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6168b40a6198Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6169b40a6198Smrg case $lt_outputfile in 6170b40a6198Smrg *.exe|*.EXE) ;; 6171b40a6198Smrg *) 6172b40a6198Smrg lt_outputfile="$lt_outputfile.exe" 6173b40a6198Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6174b40a6198Smrg ;; 6175b40a6198Smrg esac~ 6176b40a6198Smrg func_to_tool_file "$lt_outputfile"~ 6177b40a6198Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6178b40a6198Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6179b40a6198Smrg $RM "$lt_outputfile.manifest"; 6180b40a6198Smrg fi' 6181b40a6198Smrg ;; 6182b40a6198Smrg *) 6183b40a6198Smrg # g++ 6184b40a6198Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6185b40a6198Smrg # as there is no search path for DLLs. 6186b40a6198Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6187b40a6198Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6188b40a6198Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6189b40a6198Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6190b40a6198Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6191b40a6198Smrg 6192b40a6198Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6193b40a6198Smrg _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' 6194b40a6198Smrg # If the export-symbols file already is a .def file (1st line 6195b40a6198Smrg # is EXPORTS), use it as is; otherwise, prepend... 6196b40a6198Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6197b40a6198Smrg cp $export_symbols $output_objdir/$soname.def; 6198b40a6198Smrg else 6199b40a6198Smrg echo EXPORTS > $output_objdir/$soname.def; 6200b40a6198Smrg cat $export_symbols >> $output_objdir/$soname.def; 6201b40a6198Smrg fi~ 6202b40a6198Smrg $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' 6203b40a6198Smrg else 6204b40a6198Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6205b40a6198Smrg fi 6206b40a6198Smrg ;; 6207b40a6198Smrg esac 6208b40a6198Smrg ;; 62095592a31fSmrg darwin* | rhapsody*) 62105592a31fSmrg _LT_DARWIN_LINKER_FEATURES($1) 62115592a31fSmrg ;; 621250f2e948Smrg 62135592a31fSmrg dgux*) 62145592a31fSmrg case $cc_basename in 62155592a31fSmrg ec++*) 62165592a31fSmrg # FIXME: insert proper C++ library support 62175592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62185592a31fSmrg ;; 62195592a31fSmrg ghcx*) 62205592a31fSmrg # Green Hills C++ Compiler 62215592a31fSmrg # FIXME: insert proper C++ library support 62225592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62235592a31fSmrg ;; 62245592a31fSmrg *) 62255592a31fSmrg # FIXME: insert proper C++ library support 62265592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62275592a31fSmrg ;; 62285592a31fSmrg esac 62295592a31fSmrg ;; 623050f2e948Smrg 6231b40a6198Smrg freebsd2.*) 62325592a31fSmrg # C++ shared libraries reported to be fairly broken before 62335592a31fSmrg # switch to ELF 62345592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62355592a31fSmrg ;; 623650f2e948Smrg 62375592a31fSmrg freebsd-elf*) 62385592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62395592a31fSmrg ;; 62405592a31fSmrg 62415592a31fSmrg freebsd* | dragonfly*) 62425592a31fSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 62435592a31fSmrg # conventions 62445592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 62455592a31fSmrg ;; 624650f2e948Smrg 6247b40a6198Smrg haiku*) 6248b40a6198Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6249b40a6198Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6250b40a6198Smrg ;; 6251b40a6198Smrg 62525592a31fSmrg hpux9*) 62535592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62545592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62555592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62565592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 62575592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 62585592a31fSmrg # but as the default 62595592a31fSmrg # location of the library. 62605592a31fSmrg 62615592a31fSmrg case $cc_basename in 62625592a31fSmrg CC*) 62635592a31fSmrg # FIXME: insert proper C++ library support 62645592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62655592a31fSmrg ;; 62665592a31fSmrg aCC*) 62675592a31fSmrg _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' 62685592a31fSmrg # Commands to make compiler produce verbose output that lists 62695592a31fSmrg # what "hidden" libraries, object files and flags are used when 62705592a31fSmrg # linking a shared library. 62715592a31fSmrg # 62725592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 62735592a31fSmrg # explicitly linking system object files so we need to strip them 62745592a31fSmrg # from the output so that they don't get included in the library 62755592a31fSmrg # dependencies. 6276b40a6198Smrg 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"' 62775592a31fSmrg ;; 62785592a31fSmrg *) 62795592a31fSmrg if test "$GXX" = yes; then 6280b40a6198Smrg _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' 62815592a31fSmrg else 62825592a31fSmrg # FIXME: insert proper C++ library support 62835592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 62845592a31fSmrg fi 62855592a31fSmrg ;; 62865592a31fSmrg esac 62875592a31fSmrg ;; 628850f2e948Smrg 62895592a31fSmrg hpux10*|hpux11*) 62905592a31fSmrg if test $with_gnu_ld = no; then 62915592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62925592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62935592a31fSmrg 62945592a31fSmrg case $host_cpu in 62955592a31fSmrg hppa*64*|ia64*) 62965592a31fSmrg ;; 62975592a31fSmrg *) 62985592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62995592a31fSmrg ;; 63005592a31fSmrg esac 63015592a31fSmrg fi 63025592a31fSmrg case $host_cpu in 63035592a31fSmrg hppa*64*|ia64*) 63045592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63055592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63065592a31fSmrg ;; 63075592a31fSmrg *) 63085592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 63095592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63105592a31fSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 63115592a31fSmrg # but as the default 63125592a31fSmrg # location of the library. 63135592a31fSmrg ;; 63145592a31fSmrg esac 63155592a31fSmrg 63165592a31fSmrg case $cc_basename in 63175592a31fSmrg CC*) 63185592a31fSmrg # FIXME: insert proper C++ library support 63195592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63205592a31fSmrg ;; 63215592a31fSmrg aCC*) 63225592a31fSmrg case $host_cpu in 63235592a31fSmrg hppa*64*) 63245592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63255592a31fSmrg ;; 63265592a31fSmrg ia64*) 63275592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63285592a31fSmrg ;; 63295592a31fSmrg *) 63305592a31fSmrg _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' 63315592a31fSmrg ;; 63325592a31fSmrg esac 63335592a31fSmrg # Commands to make compiler produce verbose output that lists 63345592a31fSmrg # what "hidden" libraries, object files and flags are used when 63355592a31fSmrg # linking a shared library. 63365592a31fSmrg # 63375592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 63385592a31fSmrg # explicitly linking system object files so we need to strip them 63395592a31fSmrg # from the output so that they don't get included in the library 63405592a31fSmrg # dependencies. 6341b40a6198Smrg 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"' 63425592a31fSmrg ;; 63435592a31fSmrg *) 63445592a31fSmrg if test "$GXX" = yes; then 63455592a31fSmrg if test $with_gnu_ld = no; then 63465592a31fSmrg case $host_cpu in 63475592a31fSmrg hppa*64*) 63485592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63495592a31fSmrg ;; 63505592a31fSmrg ia64*) 6351b40a6198Smrg _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' 63525592a31fSmrg ;; 63535592a31fSmrg *) 6354b40a6198Smrg _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' 63555592a31fSmrg ;; 63565592a31fSmrg esac 63575592a31fSmrg fi 63585592a31fSmrg else 63595592a31fSmrg # FIXME: insert proper C++ library support 63605592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 63615592a31fSmrg fi 63625592a31fSmrg ;; 63635592a31fSmrg esac 63645592a31fSmrg ;; 636550f2e948Smrg 63665592a31fSmrg interix[[3-9]]*) 63675592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 63685592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63695592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 63705592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63715592a31fSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 63725592a31fSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 63735592a31fSmrg # default) and relocated if they conflict, which is a slow very memory 63745592a31fSmrg # consuming and fragmenting process. To avoid this, we pick a random, 63755592a31fSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 63765592a31fSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 63775592a31fSmrg _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' 63785592a31fSmrg _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' 63795592a31fSmrg ;; 63805592a31fSmrg irix5* | irix6*) 63815592a31fSmrg case $cc_basename in 63825592a31fSmrg CC*) 63835592a31fSmrg # SGI C++ 6384b40a6198Smrg _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' 63855592a31fSmrg 63865592a31fSmrg # Archives containing C++ object files must be created using 63875592a31fSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 63885592a31fSmrg # necessary to make sure instantiated templates are included 63895592a31fSmrg # in the archive. 63905592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 63915592a31fSmrg ;; 63925592a31fSmrg *) 63935592a31fSmrg if test "$GXX" = yes; then 63945592a31fSmrg if test "$with_gnu_ld" = no; then 6395b40a6198Smrg _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' 63965592a31fSmrg else 6397b40a6198Smrg _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' 63985592a31fSmrg fi 63995592a31fSmrg fi 64005592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 64015592a31fSmrg ;; 64025592a31fSmrg esac 64035592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 64045592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64055592a31fSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 64065592a31fSmrg ;; 640750f2e948Smrg 6408c97b1c41Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 64095592a31fSmrg case $cc_basename in 64105592a31fSmrg KCC*) 64115592a31fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 64125592a31fSmrg 64135592a31fSmrg # KCC will only create a shared library if the output file 64145592a31fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 64155592a31fSmrg # to its proper name (with version) after linking. 64165592a31fSmrg _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' 64175592a31fSmrg _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' 64185592a31fSmrg # Commands to make compiler produce verbose output that lists 64195592a31fSmrg # what "hidden" libraries, object files and flags are used when 64205592a31fSmrg # linking a shared library. 64215592a31fSmrg # 64225592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 64235592a31fSmrg # explicitly linking system object files so we need to strip them 64245592a31fSmrg # from the output so that they don't get included in the library 64255592a31fSmrg # dependencies. 6426b40a6198Smrg 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"' 64275592a31fSmrg 64285592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64295592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64305592a31fSmrg 64315592a31fSmrg # Archives containing C++ object files must be created using 64325592a31fSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 64335592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 64345592a31fSmrg ;; 64355592a31fSmrg icpc* | ecpc* ) 64365592a31fSmrg # Intel C++ 64375592a31fSmrg with_gnu_ld=yes 64385592a31fSmrg # version 8.0 and above of icpc choke on multiply defined symbols 64395592a31fSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 64405592a31fSmrg # earlier do not add the objects themselves. 64415592a31fSmrg case `$CC -V 2>&1` in 64425592a31fSmrg *"Version 7."*) 64435592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64445592a31fSmrg _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' 64455592a31fSmrg ;; 64465592a31fSmrg *) # Version 8.0 or newer 64475592a31fSmrg tmp_idyn= 64485592a31fSmrg case $host_cpu in 64495592a31fSmrg ia64*) tmp_idyn=' -i_dynamic';; 64505592a31fSmrg esac 64515592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 64525592a31fSmrg _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' 64535592a31fSmrg ;; 64545592a31fSmrg esac 64555592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 64565592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64575592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64585592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 64595592a31fSmrg ;; 64605592a31fSmrg pgCC* | pgcpp*) 64615592a31fSmrg # Portland Group C++ compiler 64625592a31fSmrg case `$CC -V` in 6463b40a6198Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 64645592a31fSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 64655592a31fSmrg rm -rf $tpldir~ 64665592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6467b40a6198Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 64685592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 64695592a31fSmrg rm -rf $tpldir~ 64705592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6471b40a6198Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 64725592a31fSmrg $RANLIB $oldlib' 64735592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 64745592a31fSmrg rm -rf $tpldir~ 64755592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6476b40a6198Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64775592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 64785592a31fSmrg rm -rf $tpldir~ 64795592a31fSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6480b40a6198Smrg $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' 64815592a31fSmrg ;; 6482b40a6198Smrg *) # Version 6 and above use weak symbols 64835592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64845592a31fSmrg _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' 64855592a31fSmrg ;; 64865592a31fSmrg esac 648750f2e948Smrg 64885592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 64895592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6490b40a6198Smrg _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' 64915592a31fSmrg ;; 64925592a31fSmrg cxx*) 64935592a31fSmrg # Compaq C++ 64945592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64955592a31fSmrg _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' 649650f2e948Smrg 64975592a31fSmrg runpath_var=LD_RUN_PATH 64985592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 64995592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 650050f2e948Smrg 65015592a31fSmrg # Commands to make compiler produce verbose output that lists 65025592a31fSmrg # what "hidden" libraries, object files and flags are used when 65035592a31fSmrg # linking a shared library. 65045592a31fSmrg # 65055592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 65065592a31fSmrg # explicitly linking system object files so we need to strip them 65075592a31fSmrg # from the output so that they don't get included in the library 65085592a31fSmrg # dependencies. 6509b40a6198Smrg 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' 65105592a31fSmrg ;; 6511b40a6198Smrg xl* | mpixl* | bgxl*) 65125592a31fSmrg # IBM XL 8.0 on PPC, with GNU ld 65135592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65145592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 65155592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 65165592a31fSmrg if test "x$supports_anon_versioning" = xyes; then 65175592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 65185592a31fSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 65195592a31fSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 65205592a31fSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 65215592a31fSmrg fi 65225592a31fSmrg ;; 65235592a31fSmrg *) 65245592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 65255592a31fSmrg *Sun\ C*) 65265592a31fSmrg # Sun C++ 5.9 65275592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 65285592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 65295592a31fSmrg _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' 65305592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6531b40a6198Smrg _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' 65325592a31fSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 65335592a31fSmrg 65345592a31fSmrg # Not sure whether something based on 65355592a31fSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 65365592a31fSmrg # would be better. 6537b40a6198Smrg output_verbose_link_cmd='func_echo_all' 65385592a31fSmrg 65395592a31fSmrg # Archives containing C++ object files must be created using 65405592a31fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 65415592a31fSmrg # necessary to make sure instantiated templates are included 65425592a31fSmrg # in the archive. 65435592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 65445592a31fSmrg ;; 65455592a31fSmrg esac 65465592a31fSmrg ;; 65475592a31fSmrg esac 65485592a31fSmrg ;; 654950f2e948Smrg 65505592a31fSmrg lynxos*) 65515592a31fSmrg # FIXME: insert proper C++ library support 65525592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65535592a31fSmrg ;; 655450f2e948Smrg 65555592a31fSmrg m88k*) 65565592a31fSmrg # FIXME: insert proper C++ library support 65575592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65585592a31fSmrg ;; 655950f2e948Smrg 65605592a31fSmrg mvs*) 65615592a31fSmrg case $cc_basename in 65625592a31fSmrg cxx*) 65635592a31fSmrg # FIXME: insert proper C++ library support 65645592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65655592a31fSmrg ;; 65665592a31fSmrg *) 65675592a31fSmrg # FIXME: insert proper C++ library support 65685592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65695592a31fSmrg ;; 65705592a31fSmrg esac 65715592a31fSmrg ;; 657250f2e948Smrg 65735592a31fSmrg netbsd*) 65745592a31fSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 65755592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 65765592a31fSmrg wlarc= 65775592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65785592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65795592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65805592a31fSmrg fi 65815592a31fSmrg # Workaround some broken pre-1.5 toolchains 65825592a31fSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 65835592a31fSmrg ;; 658450f2e948Smrg 65855592a31fSmrg *nto* | *qnx*) 65865592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 65875592a31fSmrg ;; 658850f2e948Smrg 65895592a31fSmrg openbsd2*) 65905592a31fSmrg # C++ shared libraries are fairly broken 65915592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 65925592a31fSmrg ;; 659350f2e948Smrg 65945592a31fSmrg openbsd*) 65955592a31fSmrg if test -f /usr/libexec/ld.so; then 65965592a31fSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65975592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65985592a31fSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65995592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 66005592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66015592a31fSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 66025592a31fSmrg _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' 66035592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 66045592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 66055592a31fSmrg fi 6606b40a6198Smrg output_verbose_link_cmd=func_echo_all 66075592a31fSmrg else 66085592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66095592a31fSmrg fi 66105592a31fSmrg ;; 661150f2e948Smrg 66125592a31fSmrg osf3* | osf4* | osf5*) 66135592a31fSmrg case $cc_basename in 66145592a31fSmrg KCC*) 66155592a31fSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 66165592a31fSmrg 66175592a31fSmrg # KCC will only create a shared library if the output file 66185592a31fSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 66195592a31fSmrg # to its proper name (with version) after linking. 66205592a31fSmrg _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' 66215592a31fSmrg 66225592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66235592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66245592a31fSmrg 66255592a31fSmrg # Archives containing C++ object files must be created using 66265592a31fSmrg # the KAI C++ compiler. 66275592a31fSmrg case $host in 66285592a31fSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 66295592a31fSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 66305592a31fSmrg esac 66315592a31fSmrg ;; 66325592a31fSmrg RCC*) 66335592a31fSmrg # Rational C++ 2.4.1 66345592a31fSmrg # FIXME: insert proper C++ library support 66355592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66365592a31fSmrg ;; 66375592a31fSmrg cxx*) 66385592a31fSmrg case $host in 66395592a31fSmrg osf3*) 66405592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6641b40a6198Smrg _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' 66425592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66435592a31fSmrg ;; 66445592a31fSmrg *) 66455592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6646b40a6198Smrg _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' 66475592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 66485592a31fSmrg echo "-hidden">> $lib.exp~ 6649b40a6198Smrg $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~ 66505592a31fSmrg $RM $lib.exp' 66515592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 66525592a31fSmrg ;; 66535592a31fSmrg esac 665450f2e948Smrg 66555592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 665650f2e948Smrg 66575592a31fSmrg # Commands to make compiler produce verbose output that lists 66585592a31fSmrg # what "hidden" libraries, object files and flags are used when 66595592a31fSmrg # linking a shared library. 66605592a31fSmrg # 66615592a31fSmrg # There doesn't appear to be a way to prevent this compiler from 66625592a31fSmrg # explicitly linking system object files so we need to strip them 66635592a31fSmrg # from the output so that they don't get included in the library 66645592a31fSmrg # dependencies. 6665b40a6198Smrg 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"' 66665592a31fSmrg ;; 66675592a31fSmrg *) 66685592a31fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 66695592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66705592a31fSmrg case $host in 66715592a31fSmrg osf3*) 6672b40a6198Smrg _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' 66735592a31fSmrg ;; 66745592a31fSmrg *) 6675b40a6198Smrg _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' 66765592a31fSmrg ;; 66775592a31fSmrg esac 66785592a31fSmrg 66795592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66805592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66815592a31fSmrg 66825592a31fSmrg # Commands to make compiler produce verbose output that lists 66835592a31fSmrg # what "hidden" libraries, object files and flags are used when 66845592a31fSmrg # linking a shared library. 6685b40a6198Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 66865592a31fSmrg 66875592a31fSmrg else 66885592a31fSmrg # FIXME: insert proper C++ library support 66895592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66905592a31fSmrg fi 66915592a31fSmrg ;; 66925592a31fSmrg esac 66935592a31fSmrg ;; 669450f2e948Smrg 66955592a31fSmrg psos*) 66965592a31fSmrg # FIXME: insert proper C++ library support 66975592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66985592a31fSmrg ;; 669950f2e948Smrg 67005592a31fSmrg sunos4*) 67015592a31fSmrg case $cc_basename in 67025592a31fSmrg CC*) 67035592a31fSmrg # Sun C++ 4.x 67045592a31fSmrg # FIXME: insert proper C++ library support 67055592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67065592a31fSmrg ;; 67075592a31fSmrg lcc*) 67085592a31fSmrg # Lucid 67095592a31fSmrg # FIXME: insert proper C++ library support 67105592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67115592a31fSmrg ;; 67125592a31fSmrg *) 67135592a31fSmrg # FIXME: insert proper C++ library support 67145592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67155592a31fSmrg ;; 67165592a31fSmrg esac 67175592a31fSmrg ;; 671850f2e948Smrg 67195592a31fSmrg solaris*) 67205592a31fSmrg case $cc_basename in 6721b40a6198Smrg CC* | sunCC*) 67225592a31fSmrg # Sun C++ 4.2, 5.x and Centerline C++ 67235592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 67245592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 67255592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 67265592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67275592a31fSmrg $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' 67285592a31fSmrg 67295592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 67305592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67315592a31fSmrg case $host_os in 67325592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67335592a31fSmrg *) 67345592a31fSmrg # The compiler driver will combine and reorder linker options, 67355592a31fSmrg # but understands `-z linker_flag'. 67365592a31fSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 67375592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 67385592a31fSmrg ;; 67395592a31fSmrg esac 67405592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 674150f2e948Smrg 6742b40a6198Smrg output_verbose_link_cmd='func_echo_all' 674350f2e948Smrg 67445592a31fSmrg # Archives containing C++ object files must be created using 67455592a31fSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 67465592a31fSmrg # necessary to make sure instantiated templates are included 67475592a31fSmrg # in the archive. 67485592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 67495592a31fSmrg ;; 67505592a31fSmrg gcx*) 67515592a31fSmrg # Green Hills C++ Compiler 67525592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 675350f2e948Smrg 67545592a31fSmrg # The C++ compiler must be used to create the archive. 67555592a31fSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 67565592a31fSmrg ;; 67575592a31fSmrg *) 67585592a31fSmrg # GNU C++ compiler with Solaris linker 67595592a31fSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 67605592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 67615592a31fSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6762b40a6198Smrg _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' 67635592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6764b40a6198Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67655592a31fSmrg 67665592a31fSmrg # Commands to make compiler produce verbose output that lists 67675592a31fSmrg # what "hidden" libraries, object files and flags are used when 67685592a31fSmrg # linking a shared library. 6769b40a6198Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67705592a31fSmrg else 67715592a31fSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 67725592a31fSmrg # platform. 67735592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67745592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67755592a31fSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67765592a31fSmrg 67775592a31fSmrg # Commands to make compiler produce verbose output that lists 67785592a31fSmrg # what "hidden" libraries, object files and flags are used when 67795592a31fSmrg # linking a shared library. 6780b40a6198Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67815592a31fSmrg fi 67825592a31fSmrg 67835592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 67845592a31fSmrg case $host_os in 67855592a31fSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67865592a31fSmrg *) 67875592a31fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 67885592a31fSmrg ;; 67895592a31fSmrg esac 67905592a31fSmrg fi 67915592a31fSmrg ;; 67925592a31fSmrg esac 67935592a31fSmrg ;; 679450f2e948Smrg 67955592a31fSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 67965592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 67975592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67985592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67995592a31fSmrg runpath_var='LD_RUN_PATH' 680050f2e948Smrg 68015592a31fSmrg case $cc_basename in 68025592a31fSmrg CC*) 68035592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68045592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68055592a31fSmrg ;; 68065592a31fSmrg *) 68075592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68085592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68095592a31fSmrg ;; 68105592a31fSmrg esac 68115592a31fSmrg ;; 681250f2e948Smrg 68135592a31fSmrg sysv5* | sco3.2v5* | sco5v6*) 68145592a31fSmrg # Note: We can NOT use -z defs as we might desire, because we do not 68155592a31fSmrg # link with -lc, and that would cause any symbols used from libc to 68165592a31fSmrg # always be unresolved, which means just about no library would 68175592a31fSmrg # ever link correctly. If we're not using GNU ld we use -z text 68185592a31fSmrg # though, which does catch some bad symbols but isn't as heavy-handed 68195592a31fSmrg # as -z defs. 68205592a31fSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68215592a31fSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 68225592a31fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68235592a31fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68245592a31fSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 68255592a31fSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 68265592a31fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68275592a31fSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 68285592a31fSmrg runpath_var='LD_RUN_PATH' 682950f2e948Smrg 68305592a31fSmrg case $cc_basename in 68315592a31fSmrg CC*) 68325592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68335592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6834b40a6198Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6835b40a6198Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6836b40a6198Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6837b40a6198Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 68385592a31fSmrg ;; 68395592a31fSmrg *) 68405592a31fSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68415592a31fSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68425592a31fSmrg ;; 68435592a31fSmrg esac 68445592a31fSmrg ;; 684550f2e948Smrg 68465592a31fSmrg tandem*) 68475592a31fSmrg case $cc_basename in 68485592a31fSmrg NCC*) 68495592a31fSmrg # NonStop-UX NCC 3.20 68505592a31fSmrg # FIXME: insert proper C++ library support 68515592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68525592a31fSmrg ;; 68535592a31fSmrg *) 68545592a31fSmrg # FIXME: insert proper C++ library support 68555592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68565592a31fSmrg ;; 68575592a31fSmrg esac 68585592a31fSmrg ;; 685950f2e948Smrg 68605592a31fSmrg vxworks*) 68615592a31fSmrg # FIXME: insert proper C++ library support 68625592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68635592a31fSmrg ;; 68641ac89addSmrg 68655592a31fSmrg *) 68665592a31fSmrg # FIXME: insert proper C++ library support 68675592a31fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68685592a31fSmrg ;; 68695592a31fSmrg esac 68701ac89addSmrg 68715592a31fSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 68725592a31fSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 68735592a31fSmrg 68745592a31fSmrg _LT_TAGVAR(GCC, $1)="$GXX" 68755592a31fSmrg _LT_TAGVAR(LD, $1)="$LD" 68765592a31fSmrg 68775592a31fSmrg ## CAVEAT EMPTOR: 68785592a31fSmrg ## There is no encapsulation within the following macros, do not change 68795592a31fSmrg ## the running order or otherwise move them around unless you know exactly 68805592a31fSmrg ## what you are doing... 68815592a31fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 68825592a31fSmrg _LT_COMPILER_PIC($1) 68835592a31fSmrg _LT_COMPILER_C_O($1) 68845592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 68855592a31fSmrg _LT_LINKER_SHLIBS($1) 68865592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 68875592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 68885592a31fSmrg 68895592a31fSmrg _LT_CONFIG($1) 68905592a31fSmrg fi # test -n "$compiler" 68915592a31fSmrg 68925592a31fSmrg CC=$lt_save_CC 6893b40a6198Smrg CFLAGS=$lt_save_CFLAGS 68945592a31fSmrg LDCXX=$LD 68955592a31fSmrg LD=$lt_save_LD 68965592a31fSmrg GCC=$lt_save_GCC 68975592a31fSmrg with_gnu_ld=$lt_save_with_gnu_ld 68985592a31fSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 68995592a31fSmrg lt_cv_path_LD=$lt_save_path_LD 69005592a31fSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 69015592a31fSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 69025592a31fSmrgfi # test "$_lt_caught_CXX_error" != yes 69031ac89addSmrg 69045592a31fSmrgAC_LANG_POP 69055592a31fSmrg])# _LT_LANG_CXX_CONFIG 69061ac89addSmrg 69071ac89addSmrg 6908b40a6198Smrg# _LT_FUNC_STRIPNAME_CNF 6909b40a6198Smrg# ---------------------- 6910b40a6198Smrg# func_stripname_cnf prefix suffix name 6911b40a6198Smrg# strip PREFIX and SUFFIX off of NAME. 6912b40a6198Smrg# PREFIX and SUFFIX must not contain globbing or regex special 6913b40a6198Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6914b40a6198Smrg# dot (in which case that matches only a dot). 6915b40a6198Smrg# 6916b40a6198Smrg# This function is identical to the (non-XSI) version of func_stripname, 6917b40a6198Smrg# except this one can be used by m4 code that may be executed by configure, 6918b40a6198Smrg# rather than the libtool script. 6919b40a6198Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6920b40a6198SmrgAC_REQUIRE([_LT_DECL_SED]) 6921b40a6198SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6922b40a6198Smrgfunc_stripname_cnf () 6923b40a6198Smrg{ 6924b40a6198Smrg case ${2} in 6925b40a6198Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6926b40a6198Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6927b40a6198Smrg esac 6928b40a6198Smrg} # func_stripname_cnf 6929b40a6198Smrg])# _LT_FUNC_STRIPNAME_CNF 6930b40a6198Smrg 69315592a31fSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 69325592a31fSmrg# --------------------------------- 69335592a31fSmrg# Figure out "hidden" library dependencies from verbose 69345592a31fSmrg# compiler output when linking a shared library. 69355592a31fSmrg# Parse the compiler output and extract the necessary 69365592a31fSmrg# objects, libraries and library flags. 69375592a31fSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 69385592a31fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6939b40a6198SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 69405592a31fSmrg# Dependencies to place before and after the object being linked: 69415592a31fSmrg_LT_TAGVAR(predep_objects, $1)= 69425592a31fSmrg_LT_TAGVAR(postdep_objects, $1)= 69435592a31fSmrg_LT_TAGVAR(predeps, $1)= 69445592a31fSmrg_LT_TAGVAR(postdeps, $1)= 69455592a31fSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 69461ac89addSmrg 69475592a31fSmrgdnl we can't use the lt_simple_compile_test_code here, 69485592a31fSmrgdnl because it contains code intended for an executable, 69495592a31fSmrgdnl not a library. It's possible we should let each 69505592a31fSmrgdnl tag define a new lt_????_link_test_code variable, 69515592a31fSmrgdnl but it's only used here... 69525592a31fSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 69535592a31fSmrgint a; 69545592a31fSmrgvoid foo (void) { a = 0; } 69555592a31fSmrg_LT_EOF 69565592a31fSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 69575592a31fSmrgclass Foo 69585592a31fSmrg{ 69595592a31fSmrgpublic: 69605592a31fSmrg Foo (void) { a = 0; } 69615592a31fSmrgprivate: 69625592a31fSmrg int a; 69635592a31fSmrg}; 69645592a31fSmrg_LT_EOF 69655592a31fSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 69665592a31fSmrg subroutine foo 69675592a31fSmrg implicit none 69685592a31fSmrg integer*4 a 69695592a31fSmrg a=0 69705592a31fSmrg return 69715592a31fSmrg end 69725592a31fSmrg_LT_EOF 69735592a31fSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 69745592a31fSmrg subroutine foo 69755592a31fSmrg implicit none 69765592a31fSmrg integer a 69775592a31fSmrg a=0 69785592a31fSmrg return 69795592a31fSmrg end 69805592a31fSmrg_LT_EOF 69815592a31fSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 69825592a31fSmrgpublic class foo { 69835592a31fSmrg private int a; 69845592a31fSmrg public void bar (void) { 69855592a31fSmrg a = 0; 69865592a31fSmrg } 69875592a31fSmrg}; 69885592a31fSmrg_LT_EOF 6989b40a6198Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6990b40a6198Smrgpackage foo 6991b40a6198Smrgfunc foo() { 6992b40a6198Smrg} 6993b40a6198Smrg_LT_EOF 69945592a31fSmrg]) 6995b40a6198Smrg 6996b40a6198Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 6997b40a6198Smrgcase "$CC $CFLAGS " in #( 6998b40a6198Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6999b40a6198Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7000b40a6198Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7001b40a6198Smrgesac 7002b40a6198Smrg 70035592a31fSmrgdnl Parse the compiler output and extract the necessary 70045592a31fSmrgdnl objects, libraries and library flags. 70055592a31fSmrgif AC_TRY_EVAL(ac_compile); then 70065592a31fSmrg # Parse the compiler output and extract the necessary 70075592a31fSmrg # objects, libraries and library flags. 700845bc899bSmrg 70095592a31fSmrg # Sentinel used to keep track of whether or not we are before 70105592a31fSmrg # the conftest object file. 70115592a31fSmrg pre_test_object_deps_done=no 701245bc899bSmrg 70135592a31fSmrg for p in `eval "$output_verbose_link_cmd"`; do 7014b40a6198Smrg case ${prev}${p} in 701545bc899bSmrg 70165592a31fSmrg -L* | -R* | -l*) 70175592a31fSmrg # Some compilers place space between "-{L,R}" and the path. 70185592a31fSmrg # Remove the space. 70195592a31fSmrg if test $p = "-L" || 70205592a31fSmrg test $p = "-R"; then 70215592a31fSmrg prev=$p 70225592a31fSmrg continue 70235592a31fSmrg fi 702450f2e948Smrg 7025b40a6198Smrg # Expand the sysroot to ease extracting the directories later. 7026b40a6198Smrg if test -z "$prev"; then 7027b40a6198Smrg case $p in 7028b40a6198Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7029b40a6198Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7030b40a6198Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7031b40a6198Smrg esac 7032b40a6198Smrg fi 7033b40a6198Smrg case $p in 7034b40a6198Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7035b40a6198Smrg esac 70365592a31fSmrg if test "$pre_test_object_deps_done" = no; then 7037b40a6198Smrg case ${prev} in 7038b40a6198Smrg -L | -R) 70395592a31fSmrg # Internal compiler library paths should come after those 70405592a31fSmrg # provided the user. The postdeps already come after the 70415592a31fSmrg # user supplied libs so there is no need to process them. 70425592a31fSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 70435592a31fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 70445592a31fSmrg else 70455592a31fSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 70465592a31fSmrg fi 70475592a31fSmrg ;; 70485592a31fSmrg # The "-l" case would never come before the object being 70495592a31fSmrg # linked, so don't bother handling this case. 70505592a31fSmrg esac 70515592a31fSmrg else 70525592a31fSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 70535592a31fSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 70545592a31fSmrg else 70555592a31fSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 70565592a31fSmrg fi 70575592a31fSmrg fi 7058b40a6198Smrg prev= 70595592a31fSmrg ;; 706050f2e948Smrg 7061b40a6198Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 70625592a31fSmrg *.$objext) 70635592a31fSmrg # This assumes that the test object file only shows up 70645592a31fSmrg # once in the compiler output. 70655592a31fSmrg if test "$p" = "conftest.$objext"; then 70665592a31fSmrg pre_test_object_deps_done=yes 70675592a31fSmrg continue 70685592a31fSmrg fi 706950f2e948Smrg 70705592a31fSmrg if test "$pre_test_object_deps_done" = no; then 70715592a31fSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 70725592a31fSmrg _LT_TAGVAR(predep_objects, $1)="$p" 70735592a31fSmrg else 70745592a31fSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 70755592a31fSmrg fi 70765592a31fSmrg else 70775592a31fSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 70785592a31fSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 70795592a31fSmrg else 70805592a31fSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 70815592a31fSmrg fi 70825592a31fSmrg fi 70835592a31fSmrg ;; 708450f2e948Smrg 70855592a31fSmrg *) ;; # Ignore the rest. 708650f2e948Smrg 70875592a31fSmrg esac 70885592a31fSmrg done 70893a925b30Smrg 70905592a31fSmrg # Clean up. 70915592a31fSmrg rm -f a.out a.exe 709250f2e948Smrgelse 70935592a31fSmrg echo "libtool.m4: error: problem compiling $1 test program" 709450f2e948Smrgfi 709550f2e948Smrg 70965592a31fSmrg$RM -f confest.$objext 7097b40a6198SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 709850f2e948Smrg 70995592a31fSmrg# PORTME: override above test on systems where it is broken 71005592a31fSmrgm4_if([$1], [CXX], 71015592a31fSmrg[case $host_os in 71025592a31fSmrginterix[[3-9]]*) 71035592a31fSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 71045592a31fSmrg # hack all around it, let's just trust "g++" to DTRT. 71055592a31fSmrg _LT_TAGVAR(predep_objects,$1)= 71065592a31fSmrg _LT_TAGVAR(postdep_objects,$1)= 71075592a31fSmrg _LT_TAGVAR(postdeps,$1)= 71085592a31fSmrg ;; 710950f2e948Smrg 71105592a31fSmrglinux*) 71115592a31fSmrg case `$CC -V 2>&1 | sed 5q` in 71125592a31fSmrg *Sun\ C*) 71135592a31fSmrg # Sun C++ 5.9 711450f2e948Smrg 71155592a31fSmrg # The more standards-conforming stlport4 library is 71165592a31fSmrg # incompatible with the Cstd library. Avoid specifying 71175592a31fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 71185592a31fSmrg # -library=stlport4 depends on it. 71195592a31fSmrg case " $CXX $CXXFLAGS " in 71205592a31fSmrg *" -library=stlport4 "*) 71215592a31fSmrg solaris_use_stlport4=yes 71225592a31fSmrg ;; 71235592a31fSmrg esac 712450f2e948Smrg 71255592a31fSmrg if test "$solaris_use_stlport4" != yes; then 71265592a31fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71275592a31fSmrg fi 71285592a31fSmrg ;; 71295592a31fSmrg esac 71305592a31fSmrg ;; 71315592a31fSmrg 71325592a31fSmrgsolaris*) 71335592a31fSmrg case $cc_basename in 7134b40a6198Smrg CC* | sunCC*) 71355592a31fSmrg # The more standards-conforming stlport4 library is 71365592a31fSmrg # incompatible with the Cstd library. Avoid specifying 71375592a31fSmrg # it if it's in CXXFLAGS. Ignore libCrun as 71385592a31fSmrg # -library=stlport4 depends on it. 71395592a31fSmrg case " $CXX $CXXFLAGS " in 71405592a31fSmrg *" -library=stlport4 "*) 71415592a31fSmrg solaris_use_stlport4=yes 71425592a31fSmrg ;; 71435592a31fSmrg esac 714450f2e948Smrg 71455592a31fSmrg # Adding this requires a known-good setup of shared libraries for 71465592a31fSmrg # Sun compiler versions before 5.6, else PIC objects from an old 71475592a31fSmrg # archive will be linked into the output, leading to subtle bugs. 71485592a31fSmrg if test "$solaris_use_stlport4" != yes; then 71495592a31fSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71505592a31fSmrg fi 71515592a31fSmrg ;; 71525592a31fSmrg esac 71535592a31fSmrg ;; 71545592a31fSmrgesac 71555592a31fSmrg]) 715650f2e948Smrg 71575592a31fSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 71585592a31fSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 71595592a31fSmrgesac 71605592a31fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 71615592a31fSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 71625592a31fSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 71635592a31fSmrgfi 71645592a31fSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 71655592a31fSmrg [The directories searched by this compiler when creating a shared library]) 71665592a31fSmrg_LT_TAGDECL([], [predep_objects], [1], 71675592a31fSmrg [Dependencies to place before and after the objects being linked to 71685592a31fSmrg create a shared library]) 71695592a31fSmrg_LT_TAGDECL([], [postdep_objects], [1]) 71705592a31fSmrg_LT_TAGDECL([], [predeps], [1]) 71715592a31fSmrg_LT_TAGDECL([], [postdeps], [1]) 71725592a31fSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 71735592a31fSmrg [The library search path used internally by the compiler when linking 71745592a31fSmrg a shared library]) 71755592a31fSmrg])# _LT_SYS_HIDDEN_LIBDEPS 71765592a31fSmrg 71775592a31fSmrg 71785592a31fSmrg# _LT_LANG_F77_CONFIG([TAG]) 71795592a31fSmrg# -------------------------- 71805592a31fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 71815592a31fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 71825592a31fSmrg# to write the compiler configuration to `libtool'. 71835592a31fSmrgm4_defun([_LT_LANG_F77_CONFIG], 7184b40a6198Smrg[AC_LANG_PUSH(Fortran 77) 7185b40a6198Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 7186b40a6198Smrg _lt_disable_F77=yes 7187b40a6198Smrgfi 718850f2e948Smrg 71895592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 71905592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 71915592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 71925592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 71935592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 71945592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 71955592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 71965592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 71975592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 71985592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 71995592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 72005592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 72015592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 72025592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 72035592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 72045592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7205b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7206b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 72075592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 72085592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 72095592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 721050f2e948Smrg 72115592a31fSmrg# Source file extension for f77 test sources. 72125592a31fSmrgac_ext=f 721350f2e948Smrg 72145592a31fSmrg# Object file extension for compiled f77 test sources. 72155592a31fSmrgobjext=o 72165592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 72175592a31fSmrg 72185592a31fSmrg# No sense in running all these tests if we already determined that 72195592a31fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 72205592a31fSmrg# are currently assumed to apply to all compilers on this platform, 72215592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 72225592a31fSmrgif test "$_lt_disable_F77" != yes; then 72235592a31fSmrg # Code to be used in simple compile tests 72245592a31fSmrg lt_simple_compile_test_code="\ 72255592a31fSmrg subroutine t 72265592a31fSmrg return 72275592a31fSmrg end 72285592a31fSmrg" 722950f2e948Smrg 72305592a31fSmrg # Code to be used in simple link tests 72315592a31fSmrg lt_simple_link_test_code="\ 72325592a31fSmrg program t 72335592a31fSmrg end 72345592a31fSmrg" 723550f2e948Smrg 72365592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 72375592a31fSmrg _LT_TAG_COMPILER 723850f2e948Smrg 72395592a31fSmrg # save warnings/boilerplate of simple test code 72405592a31fSmrg _LT_COMPILER_BOILERPLATE 72415592a31fSmrg _LT_LINKER_BOILERPLATE 724250f2e948Smrg 72435592a31fSmrg # Allow CC to be a program name with arguments. 72445592a31fSmrg lt_save_CC="$CC" 72455592a31fSmrg lt_save_GCC=$GCC 7246b40a6198Smrg lt_save_CFLAGS=$CFLAGS 72475592a31fSmrg CC=${F77-"f77"} 7248b40a6198Smrg CFLAGS=$FFLAGS 72495592a31fSmrg compiler=$CC 72505592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 72515592a31fSmrg _LT_CC_BASENAME([$compiler]) 72525592a31fSmrg GCC=$G77 72535592a31fSmrg if test -n "$compiler"; then 72545592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 72555592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 725650f2e948Smrg 72575592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 72585592a31fSmrg test "$can_build_shared" = "no" && enable_shared=no 725950f2e948Smrg 72605592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 72615592a31fSmrg # are all built from PIC. 72625592a31fSmrg case $host_os in 72635592a31fSmrg aix3*) 72645592a31fSmrg test "$enable_shared" = yes && enable_static=no 72655592a31fSmrg if test -n "$RANLIB"; then 72665592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 72675592a31fSmrg postinstall_cmds='$RANLIB $lib' 72685592a31fSmrg fi 72695592a31fSmrg ;; 72705592a31fSmrg aix[[4-9]]*) 72715592a31fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 72725592a31fSmrg test "$enable_shared" = yes && enable_static=no 72735592a31fSmrg fi 72745592a31fSmrg ;; 72755592a31fSmrg esac 72765592a31fSmrg AC_MSG_RESULT([$enable_shared]) 72775592a31fSmrg 72785592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 72795592a31fSmrg # Make sure either enable_shared or enable_static is yes. 72805592a31fSmrg test "$enable_shared" = yes || enable_static=yes 72815592a31fSmrg AC_MSG_RESULT([$enable_static]) 72825592a31fSmrg 72835592a31fSmrg _LT_TAGVAR(GCC, $1)="$G77" 72845592a31fSmrg _LT_TAGVAR(LD, $1)="$LD" 72855592a31fSmrg 72865592a31fSmrg ## CAVEAT EMPTOR: 72875592a31fSmrg ## There is no encapsulation within the following macros, do not change 72885592a31fSmrg ## the running order or otherwise move them around unless you know exactly 72895592a31fSmrg ## what you are doing... 72905592a31fSmrg _LT_COMPILER_PIC($1) 72915592a31fSmrg _LT_COMPILER_C_O($1) 72925592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 72935592a31fSmrg _LT_LINKER_SHLIBS($1) 72945592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 72955592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 72965592a31fSmrg 72975592a31fSmrg _LT_CONFIG($1) 72985592a31fSmrg fi # test -n "$compiler" 72995592a31fSmrg 73005592a31fSmrg GCC=$lt_save_GCC 73015592a31fSmrg CC="$lt_save_CC" 7302b40a6198Smrg CFLAGS="$lt_save_CFLAGS" 73035592a31fSmrgfi # test "$_lt_disable_F77" != yes 730450f2e948Smrg 73055592a31fSmrgAC_LANG_POP 73065592a31fSmrg])# _LT_LANG_F77_CONFIG 730750f2e948Smrg 730850f2e948Smrg 73095592a31fSmrg# _LT_LANG_FC_CONFIG([TAG]) 73105592a31fSmrg# ------------------------- 73115592a31fSmrg# Ensure that the configuration variables for a Fortran compiler are 73125592a31fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 73135592a31fSmrg# to write the compiler configuration to `libtool'. 73145592a31fSmrgm4_defun([_LT_LANG_FC_CONFIG], 7315b40a6198Smrg[AC_LANG_PUSH(Fortran) 7316b40a6198Smrg 7317b40a6198Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 7318b40a6198Smrg _lt_disable_FC=yes 7319b40a6198Smrgfi 73205592a31fSmrg 73215592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 73225592a31fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 73235592a31fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 73245592a31fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 73255592a31fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 73265592a31fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 73275592a31fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 73285592a31fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 73295592a31fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 73305592a31fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 73315592a31fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 73325592a31fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 73335592a31fSmrg_LT_TAGVAR(module_cmds, $1)= 73345592a31fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 73355592a31fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 73365592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7337b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7338b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 73395592a31fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 73405592a31fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 73415592a31fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 73425592a31fSmrg 73435592a31fSmrg# Source file extension for fc test sources. 73445592a31fSmrgac_ext=${ac_fc_srcext-f} 73455592a31fSmrg 73465592a31fSmrg# Object file extension for compiled fc test sources. 73475592a31fSmrgobjext=o 73485592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 73495592a31fSmrg 73505592a31fSmrg# No sense in running all these tests if we already determined that 73515592a31fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 73525592a31fSmrg# are currently assumed to apply to all compilers on this platform, 73535592a31fSmrg# and will be corrupted by setting them based on a non-working compiler. 73545592a31fSmrgif test "$_lt_disable_FC" != yes; then 73555592a31fSmrg # Code to be used in simple compile tests 73565592a31fSmrg lt_simple_compile_test_code="\ 73575592a31fSmrg subroutine t 73585592a31fSmrg return 73595592a31fSmrg end 73605592a31fSmrg" 736150f2e948Smrg 73625592a31fSmrg # Code to be used in simple link tests 73635592a31fSmrg lt_simple_link_test_code="\ 73645592a31fSmrg program t 73655592a31fSmrg end 73665592a31fSmrg" 736750f2e948Smrg 73685592a31fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 73695592a31fSmrg _LT_TAG_COMPILER 737050f2e948Smrg 73715592a31fSmrg # save warnings/boilerplate of simple test code 73725592a31fSmrg _LT_COMPILER_BOILERPLATE 73735592a31fSmrg _LT_LINKER_BOILERPLATE 737450f2e948Smrg 73755592a31fSmrg # Allow CC to be a program name with arguments. 73765592a31fSmrg lt_save_CC="$CC" 73775592a31fSmrg lt_save_GCC=$GCC 7378b40a6198Smrg lt_save_CFLAGS=$CFLAGS 73795592a31fSmrg CC=${FC-"f95"} 7380b40a6198Smrg CFLAGS=$FCFLAGS 73815592a31fSmrg compiler=$CC 73825592a31fSmrg GCC=$ac_cv_fc_compiler_gnu 73835592a31fSmrg 73845592a31fSmrg _LT_TAGVAR(compiler, $1)=$CC 73855592a31fSmrg _LT_CC_BASENAME([$compiler]) 738650f2e948Smrg 73875592a31fSmrg if test -n "$compiler"; then 73885592a31fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 73895592a31fSmrg AC_MSG_RESULT([$can_build_shared]) 73905592a31fSmrg 73915592a31fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 73925592a31fSmrg test "$can_build_shared" = "no" && enable_shared=no 73935592a31fSmrg 73945592a31fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 73955592a31fSmrg # are all built from PIC. 73963a925b30Smrg case $host_os in 73975592a31fSmrg aix3*) 73985592a31fSmrg test "$enable_shared" = yes && enable_static=no 73995592a31fSmrg if test -n "$RANLIB"; then 74005592a31fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 74015592a31fSmrg postinstall_cmds='$RANLIB $lib' 74025592a31fSmrg fi 74035592a31fSmrg ;; 74043a925b30Smrg aix[[4-9]]*) 74055592a31fSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 74065592a31fSmrg test "$enable_shared" = yes && enable_static=no 74073a925b30Smrg fi 74085592a31fSmrg ;; 74093a925b30Smrg esac 74105592a31fSmrg AC_MSG_RESULT([$enable_shared]) 74115592a31fSmrg 74125592a31fSmrg AC_MSG_CHECKING([whether to build static libraries]) 74135592a31fSmrg # Make sure either enable_shared or enable_static is yes. 74145592a31fSmrg test "$enable_shared" = yes || enable_static=yes 74155592a31fSmrg AC_MSG_RESULT([$enable_static]) 74165592a31fSmrg 74175592a31fSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 74185592a31fSmrg _LT_TAGVAR(LD, $1)="$LD" 74195592a31fSmrg 74205592a31fSmrg ## CAVEAT EMPTOR: 74215592a31fSmrg ## There is no encapsulation within the following macros, do not change 74225592a31fSmrg ## the running order or otherwise move them around unless you know exactly 74235592a31fSmrg ## what you are doing... 74245592a31fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 74255592a31fSmrg _LT_COMPILER_PIC($1) 74265592a31fSmrg _LT_COMPILER_C_O($1) 74275592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 74285592a31fSmrg _LT_LINKER_SHLIBS($1) 74295592a31fSmrg _LT_SYS_DYNAMIC_LINKER($1) 74305592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 74315592a31fSmrg 74325592a31fSmrg _LT_CONFIG($1) 74335592a31fSmrg fi # test -n "$compiler" 74345592a31fSmrg 74355592a31fSmrg GCC=$lt_save_GCC 7436b40a6198Smrg CC=$lt_save_CC 7437b40a6198Smrg CFLAGS=$lt_save_CFLAGS 74385592a31fSmrgfi # test "$_lt_disable_FC" != yes 743950f2e948Smrg 74405592a31fSmrgAC_LANG_POP 74415592a31fSmrg])# _LT_LANG_FC_CONFIG 744250f2e948Smrg 744350f2e948Smrg 74445592a31fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 74455592a31fSmrg# -------------------------- 74465592a31fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 74475592a31fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 74485592a31fSmrg# to write the compiler configuration to `libtool'. 74495592a31fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 74505592a31fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 74515592a31fSmrgAC_LANG_SAVE 745250f2e948Smrg 74535592a31fSmrg# Source file extension for Java test sources. 74545592a31fSmrgac_ext=java 745550f2e948Smrg 74565592a31fSmrg# Object file extension for compiled Java test sources. 74575592a31fSmrgobjext=o 74585592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 745950f2e948Smrg 74605592a31fSmrg# Code to be used in simple compile tests 74615592a31fSmrglt_simple_compile_test_code="class foo {}" 746250f2e948Smrg 74635592a31fSmrg# Code to be used in simple link tests 74645592a31fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 746550f2e948Smrg 74665592a31fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 74675592a31fSmrg_LT_TAG_COMPILER 746845bc899bSmrg 74695592a31fSmrg# save warnings/boilerplate of simple test code 74705592a31fSmrg_LT_COMPILER_BOILERPLATE 74715592a31fSmrg_LT_LINKER_BOILERPLATE 747245bc899bSmrg 74735592a31fSmrg# Allow CC to be a program name with arguments. 7474b40a6198Smrglt_save_CC=$CC 7475b40a6198Smrglt_save_CFLAGS=$CFLAGS 74765592a31fSmrglt_save_GCC=$GCC 74775592a31fSmrgGCC=yes 74785592a31fSmrgCC=${GCJ-"gcj"} 7479b40a6198SmrgCFLAGS=$GCJFLAGS 74805592a31fSmrgcompiler=$CC 74815592a31fSmrg_LT_TAGVAR(compiler, $1)=$CC 74825592a31fSmrg_LT_TAGVAR(LD, $1)="$LD" 74835592a31fSmrg_LT_CC_BASENAME([$compiler]) 74845592a31fSmrg 74855592a31fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 74865592a31fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 74875592a31fSmrg 74885592a31fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7489b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7490b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 74915592a31fSmrg 74925592a31fSmrgif test -n "$compiler"; then 74935592a31fSmrg _LT_COMPILER_NO_RTTI($1) 74945592a31fSmrg _LT_COMPILER_PIC($1) 74955592a31fSmrg _LT_COMPILER_C_O($1) 74965592a31fSmrg _LT_COMPILER_FILE_LOCKS($1) 74975592a31fSmrg _LT_LINKER_SHLIBS($1) 74985592a31fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 74995592a31fSmrg 75005592a31fSmrg _LT_CONFIG($1) 75015592a31fSmrgfi 75025592a31fSmrg 75035592a31fSmrgAC_LANG_RESTORE 75045592a31fSmrg 75055592a31fSmrgGCC=$lt_save_GCC 7506b40a6198SmrgCC=$lt_save_CC 7507b40a6198SmrgCFLAGS=$lt_save_CFLAGS 75085592a31fSmrg])# _LT_LANG_GCJ_CONFIG 75095592a31fSmrg 75105592a31fSmrg 7511b40a6198Smrg# _LT_LANG_GO_CONFIG([TAG]) 7512b40a6198Smrg# -------------------------- 7513b40a6198Smrg# Ensure that the configuration variables for the GNU Go compiler 75145592a31fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 75155592a31fSmrg# to write the compiler configuration to `libtool'. 7516b40a6198Smrgm4_defun([_LT_LANG_GO_CONFIG], 7517b40a6198Smrg[AC_REQUIRE([LT_PROG_GO])dnl 75185592a31fSmrgAC_LANG_SAVE 75195592a31fSmrg 7520b40a6198Smrg# Source file extension for Go test sources. 7521b40a6198Smrgac_ext=go 75225592a31fSmrg 7523b40a6198Smrg# Object file extension for compiled Go test sources. 75245592a31fSmrgobjext=o 75255592a31fSmrg_LT_TAGVAR(objext, $1)=$objext 75265592a31fSmrg 75275592a31fSmrg# Code to be used in simple compile tests 7528b40a6198Smrglt_simple_compile_test_code="package main; func main() { }" 75295592a31fSmrg 75305592a31fSmrg# Code to be used in simple link tests 7531b40a6198Smrglt_simple_link_test_code='package main; func main() { }' 75325592a31fSmrg 75335592a31fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 75345592a31fSmrg_LT_TAG_COMPILER 75355592a31fSmrg 75365592a31fSmrg# save warnings/boilerplate of simple test code 75375592a31fSmrg_LT_COMPILER_BOILERPLATE 75385592a31fSmrg_LT_LINKER_BOILERPLATE 753945bc899bSmrg 75405592a31fSmrg# Allow CC to be a program name with arguments. 7541b40a6198Smrglt_save_CC=$CC 7542b40a6198Smrglt_save_CFLAGS=$CFLAGS 75435592a31fSmrglt_save_GCC=$GCC 7544b40a6198SmrgGCC=yes 7545b40a6198SmrgCC=${GOC-"gccgo"} 7546b40a6198SmrgCFLAGS=$GOFLAGS 75475592a31fSmrgcompiler=$CC 75485592a31fSmrg_LT_TAGVAR(compiler, $1)=$CC 7549b40a6198Smrg_LT_TAGVAR(LD, $1)="$LD" 75505592a31fSmrg_LT_CC_BASENAME([$compiler]) 7551b40a6198Smrg 7552b40a6198Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 7553b40a6198Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7554b40a6198Smrg 7555b40a6198Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7556b40a6198Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7557b40a6198Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 755845bc899bSmrg 75595592a31fSmrgif test -n "$compiler"; then 7560b40a6198Smrg _LT_COMPILER_NO_RTTI($1) 7561b40a6198Smrg _LT_COMPILER_PIC($1) 7562b40a6198Smrg _LT_COMPILER_C_O($1) 7563b40a6198Smrg _LT_COMPILER_FILE_LOCKS($1) 7564b40a6198Smrg _LT_LINKER_SHLIBS($1) 7565b40a6198Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7566b40a6198Smrg 75675592a31fSmrg _LT_CONFIG($1) 75685592a31fSmrgfi 756945bc899bSmrg 75705592a31fSmrgAC_LANG_RESTORE 757145bc899bSmrg 7572b40a6198SmrgGCC=$lt_save_GCC 7573b40a6198SmrgCC=$lt_save_CC 7574b40a6198SmrgCFLAGS=$lt_save_CFLAGS 7575b40a6198Smrg])# _LT_LANG_GO_CONFIG 757645bc899bSmrg 7577b40a6198Smrg 7578b40a6198Smrg# _LT_LANG_RC_CONFIG([TAG]) 7579b40a6198Smrg# ------------------------- 7580b40a6198Smrg# Ensure that the configuration variables for the Windows resource compiler 7581b40a6198Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7582b40a6198Smrg# to write the compiler configuration to `libtool'. 7583b40a6198Smrgm4_defun([_LT_LANG_RC_CONFIG], 7584b40a6198Smrg[AC_REQUIRE([LT_PROG_RC])dnl 7585b40a6198SmrgAC_LANG_SAVE 7586b40a6198Smrg 7587b40a6198Smrg# Source file extension for RC test sources. 7588b40a6198Smrgac_ext=rc 7589b40a6198Smrg 7590b40a6198Smrg# Object file extension for compiled RC test sources. 7591b40a6198Smrgobjext=o 7592b40a6198Smrg_LT_TAGVAR(objext, $1)=$objext 7593b40a6198Smrg 7594b40a6198Smrg# Code to be used in simple compile tests 7595b40a6198Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7596b40a6198Smrg 7597b40a6198Smrg# Code to be used in simple link tests 7598b40a6198Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 7599b40a6198Smrg 7600b40a6198Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7601b40a6198Smrg_LT_TAG_COMPILER 7602b40a6198Smrg 7603b40a6198Smrg# save warnings/boilerplate of simple test code 7604b40a6198Smrg_LT_COMPILER_BOILERPLATE 7605b40a6198Smrg_LT_LINKER_BOILERPLATE 7606b40a6198Smrg 7607b40a6198Smrg# Allow CC to be a program name with arguments. 7608b40a6198Smrglt_save_CC="$CC" 7609b40a6198Smrglt_save_CFLAGS=$CFLAGS 7610b40a6198Smrglt_save_GCC=$GCC 7611b40a6198SmrgGCC= 7612b40a6198SmrgCC=${RC-"windres"} 7613b40a6198SmrgCFLAGS= 7614b40a6198Smrgcompiler=$CC 7615b40a6198Smrg_LT_TAGVAR(compiler, $1)=$CC 7616b40a6198Smrg_LT_CC_BASENAME([$compiler]) 7617b40a6198Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7618b40a6198Smrg 7619b40a6198Smrgif test -n "$compiler"; then 7620b40a6198Smrg : 7621b40a6198Smrg _LT_CONFIG($1) 7622b40a6198Smrgfi 7623b40a6198Smrg 7624b40a6198SmrgGCC=$lt_save_GCC 7625b40a6198SmrgAC_LANG_RESTORE 7626b40a6198SmrgCC=$lt_save_CC 7627b40a6198SmrgCFLAGS=$lt_save_CFLAGS 7628b40a6198Smrg])# _LT_LANG_RC_CONFIG 7629b40a6198Smrg 7630b40a6198Smrg 7631b40a6198Smrg# LT_PROG_GCJ 7632b40a6198Smrg# ----------- 7633b40a6198SmrgAC_DEFUN([LT_PROG_GCJ], 76345592a31fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 76355592a31fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 76365592a31fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 76375592a31fSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 76385592a31fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 76395592a31fSmrg]) 764045bc899bSmrg 76415592a31fSmrg# Old name: 76425592a31fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 76435592a31fSmrgdnl aclocal-1.4 backwards compatibility: 76445592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 764545bc899bSmrg 764645bc899bSmrg 7647b40a6198Smrg# LT_PROG_GO 7648b40a6198Smrg# ---------- 7649b40a6198SmrgAC_DEFUN([LT_PROG_GO], 7650b40a6198Smrg[AC_CHECK_TOOL(GOC, gccgo,) 7651b40a6198Smrg]) 7652b40a6198Smrg 7653b40a6198Smrg 76545592a31fSmrg# LT_PROG_RC 76555592a31fSmrg# ---------- 76565592a31fSmrgAC_DEFUN([LT_PROG_RC], 76575592a31fSmrg[AC_CHECK_TOOL(RC, windres,) 76585592a31fSmrg]) 76591ac89addSmrg 76605592a31fSmrg# Old name: 76615592a31fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 76625592a31fSmrgdnl aclocal-1.4 backwards compatibility: 76635592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 76641ac89addSmrg 76651ac89addSmrg 76665592a31fSmrg# _LT_DECL_EGREP 76675592a31fSmrg# -------------- 76685592a31fSmrg# If we don't have a new enough Autoconf to choose the best grep 76695592a31fSmrg# available, choose the one first in the user's PATH. 76705592a31fSmrgm4_defun([_LT_DECL_EGREP], 76715592a31fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 76725592a31fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 76735592a31fSmrgtest -z "$GREP" && GREP=grep 76745592a31fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 76755592a31fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 76765592a31fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 76775592a31fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 76785592a31fSmrgAC_SUBST([GREP]) 76795592a31fSmrg]) 7680226fade8Smrg 768150f2e948Smrg 76825592a31fSmrg# _LT_DECL_OBJDUMP 76835592a31fSmrg# -------------- 76845592a31fSmrg# If we don't have a new enough Autoconf to choose the best objdump 76855592a31fSmrg# available, choose the one first in the user's PATH. 76865592a31fSmrgm4_defun([_LT_DECL_OBJDUMP], 76875592a31fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 76885592a31fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 76895592a31fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 76905592a31fSmrgAC_SUBST([OBJDUMP]) 76915592a31fSmrg]) 769250f2e948Smrg 7693b40a6198Smrg# _LT_DECL_DLLTOOL 7694b40a6198Smrg# ---------------- 7695b40a6198Smrg# Ensure DLLTOOL variable is set. 7696b40a6198Smrgm4_defun([_LT_DECL_DLLTOOL], 7697b40a6198Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7698b40a6198Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7699b40a6198Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7700b40a6198SmrgAC_SUBST([DLLTOOL]) 7701b40a6198Smrg]) 770250f2e948Smrg 77035592a31fSmrg# _LT_DECL_SED 77045592a31fSmrg# ------------ 77055592a31fSmrg# Check for a fully-functional sed program, that truncates 77065592a31fSmrg# as few characters as possible. Prefer GNU sed if found. 77075592a31fSmrgm4_defun([_LT_DECL_SED], 77085592a31fSmrg[AC_PROG_SED 77095592a31fSmrgtest -z "$SED" && SED=sed 77105592a31fSmrgXsed="$SED -e 1s/^X//" 77115592a31fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 77125592a31fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 77135592a31fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 77145592a31fSmrg])# _LT_DECL_SED 77155592a31fSmrg 77165592a31fSmrgm4_ifndef([AC_PROG_SED], [ 77175592a31fSmrg# NOTE: This macro has been submitted for inclusion into # 77185592a31fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 77195592a31fSmrg# a released version of Autoconf we should remove this # 77205592a31fSmrg# macro and use it instead. # 77215592a31fSmrg 77225592a31fSmrgm4_defun([AC_PROG_SED], 77235592a31fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 77245592a31fSmrgAC_CACHE_VAL(lt_cv_path_SED, 77255592a31fSmrg[# Loop through the user's path and test for sed and gsed. 77265592a31fSmrg# Then use that list of sed's as ones to test for truncation. 77275592a31fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 77285592a31fSmrgfor as_dir in $PATH 77295592a31fSmrgdo 77305592a31fSmrg IFS=$as_save_IFS 77315592a31fSmrg test -z "$as_dir" && as_dir=. 77325592a31fSmrg for lt_ac_prog in sed gsed; do 77335592a31fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 77345592a31fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 77355592a31fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 77365592a31fSmrg fi 77375592a31fSmrg done 77385592a31fSmrg done 77395592a31fSmrgdone 77405592a31fSmrgIFS=$as_save_IFS 77415592a31fSmrglt_ac_max=0 77425592a31fSmrglt_ac_count=0 77435592a31fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 77445592a31fSmrg# along with /bin/sed that truncates output. 77455592a31fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 77465592a31fSmrg test ! -f $lt_ac_sed && continue 77475592a31fSmrg cat /dev/null > conftest.in 77485592a31fSmrg lt_ac_count=0 77495592a31fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 77505592a31fSmrg # Check for GNU sed and select it if it is found. 77515592a31fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 77525592a31fSmrg lt_cv_path_SED=$lt_ac_sed 77535592a31fSmrg break 775445bc899bSmrg fi 77555592a31fSmrg while true; do 77565592a31fSmrg cat conftest.in conftest.in >conftest.tmp 77575592a31fSmrg mv conftest.tmp conftest.in 77585592a31fSmrg cp conftest.in conftest.nl 77595592a31fSmrg echo >>conftest.nl 77605592a31fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 77615592a31fSmrg cmp -s conftest.out conftest.nl || break 77625592a31fSmrg # 10000 chars as input seems more than enough 77635592a31fSmrg test $lt_ac_count -gt 10 && break 77645592a31fSmrg lt_ac_count=`expr $lt_ac_count + 1` 77655592a31fSmrg if test $lt_ac_count -gt $lt_ac_max; then 77665592a31fSmrg lt_ac_max=$lt_ac_count 77675592a31fSmrg lt_cv_path_SED=$lt_ac_sed 77685592a31fSmrg fi 77695592a31fSmrg done 77705592a31fSmrgdone 777145bc899bSmrg]) 77725592a31fSmrgSED=$lt_cv_path_SED 77735592a31fSmrgAC_SUBST([SED]) 77745592a31fSmrgAC_MSG_RESULT([$SED]) 77755592a31fSmrg])#AC_PROG_SED 77765592a31fSmrg])#m4_ifndef 77771ac89addSmrg 77785592a31fSmrg# Old name: 77795592a31fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 77805592a31fSmrgdnl aclocal-1.4 backwards compatibility: 77815592a31fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 77825592a31fSmrg 77835592a31fSmrg 77845592a31fSmrg# _LT_CHECK_SHELL_FEATURES 77855592a31fSmrg# ------------------------ 77865592a31fSmrg# Find out whether the shell is Bourne or XSI compatible, 77875592a31fSmrg# or has some other useful features. 77885592a31fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 77895592a31fSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 77905592a31fSmrg# Try some XSI features 77915592a31fSmrgxsi_shell=no 77925592a31fSmrg( _lt_dummy="a/b/c" 7793b40a6198Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7794b40a6198Smrg = c,a/b,b/c, \ 77955592a31fSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 77965592a31fSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 77975592a31fSmrg && xsi_shell=yes 77985592a31fSmrgAC_MSG_RESULT([$xsi_shell]) 77995592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 78005592a31fSmrg 78015592a31fSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 78025592a31fSmrglt_shell_append=no 78035592a31fSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 78045592a31fSmrg >/dev/null 2>&1 \ 78055592a31fSmrg && lt_shell_append=yes 78065592a31fSmrgAC_MSG_RESULT([$lt_shell_append]) 78075592a31fSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 78085592a31fSmrg 78095592a31fSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 78105592a31fSmrg lt_unset=unset 78115592a31fSmrgelse 78125592a31fSmrg lt_unset=false 781345bc899bSmrgfi 78145592a31fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 78155592a31fSmrg 78165592a31fSmrg# test EBCDIC or ASCII 78175592a31fSmrgcase `echo X|tr X '\101'` in 78185592a31fSmrg A) # ASCII based system 78195592a31fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 78205592a31fSmrg lt_SP2NL='tr \040 \012' 78215592a31fSmrg lt_NL2SP='tr \015\012 \040\040' 78225592a31fSmrg ;; 78235592a31fSmrg *) # EBCDIC based system 78245592a31fSmrg lt_SP2NL='tr \100 \n' 78255592a31fSmrg lt_NL2SP='tr \r\n \100\100' 78265592a31fSmrg ;; 782745bc899bSmrgesac 78285592a31fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 78295592a31fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 78305592a31fSmrg])# _LT_CHECK_SHELL_FEATURES 783150f2e948Smrg 783250f2e948Smrg 7833b40a6198Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7834b40a6198Smrg# ------------------------------------------------------ 7835b40a6198Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7836b40a6198Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7837b40a6198Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7838b40a6198Smrg[dnl { 7839b40a6198Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7840b40a6198Smrg$1 ()\ 7841b40a6198Smrg{\ 7842b40a6198Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7843b40a6198Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7844b40a6198Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7845b40a6198Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7846b40a6198Smrgtest 0 -eq $? || _lt_function_replace_fail=: 7847b40a6198Smrg]) 78485592a31fSmrg 78495592a31fSmrg 7850b40a6198Smrg# _LT_PROG_REPLACE_SHELLFNS 7851b40a6198Smrg# ------------------------- 7852b40a6198Smrg# Replace existing portable implementations of several shell functions with 7853b40a6198Smrg# equivalent extended shell implementations where those features are available.. 7854b40a6198Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7855b40a6198Smrg[if test x"$xsi_shell" = xyes; then 7856b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7857b40a6198Smrg case ${1} in 7858b40a6198Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7859b40a6198Smrg * ) func_dirname_result="${3}" ;; 7860b40a6198Smrg esac]) 7861b40a6198Smrg 7862b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7863b40a6198Smrg func_basename_result="${1##*/}"]) 7864b40a6198Smrg 7865b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7866b40a6198Smrg case ${1} in 7867b40a6198Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7868b40a6198Smrg * ) func_dirname_result="${3}" ;; 7869b40a6198Smrg esac 7870b40a6198Smrg func_basename_result="${1##*/}"]) 78715592a31fSmrg 7872b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7873b40a6198Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7874b40a6198Smrg # positional parameters, so assign one to ordinary parameter first. 7875b40a6198Smrg func_stripname_result=${3} 7876b40a6198Smrg func_stripname_result=${func_stripname_result#"${1}"} 7877b40a6198Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 78785592a31fSmrg 7879b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7880b40a6198Smrg func_split_long_opt_name=${1%%=*} 7881b40a6198Smrg func_split_long_opt_arg=${1#*=}]) 78825592a31fSmrg 7883b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7884b40a6198Smrg func_split_short_opt_arg=${1#??} 7885b40a6198Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 78865592a31fSmrg 7887b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7888b40a6198Smrg case ${1} in 7889b40a6198Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7890b40a6198Smrg *) func_lo2o_result=${1} ;; 7891b40a6198Smrg esac]) 789245bc899bSmrg 7893b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 789445bc899bSmrg 7895b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 789645bc899bSmrg 7897b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7898b40a6198Smrgfi 789945bc899bSmrg 7900b40a6198Smrgif test x"$lt_shell_append" = xyes; then 7901b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 790245bc899bSmrg 7903b40a6198Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7904b40a6198Smrg func_quote_for_eval "${2}" 7905b40a6198Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7906b40a6198Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 790745bc899bSmrg 7908b40a6198Smrg # Save a `func_append' function call where possible by direct use of '+=' 7909b40a6198Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7910b40a6198Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7911b40a6198Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7912b40a6198Smrg test 0 -eq $? || _lt_function_replace_fail=: 7913b40a6198Smrgelse 7914b40a6198Smrg # Save a `func_append' function call even when '+=' is not available 7915b40a6198Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7916b40a6198Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7917b40a6198Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7918b40a6198Smrg test 0 -eq $? || _lt_function_replace_fail=: 7919b40a6198Smrgfi 792045bc899bSmrg 7921b40a6198Smrgif test x"$_lt_function_replace_fail" = x":"; then 7922b40a6198Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7923b40a6198Smrgfi 7924b40a6198Smrg]) 792545bc899bSmrg 7926b40a6198Smrg# _LT_PATH_CONVERSION_FUNCTIONS 7927b40a6198Smrg# ----------------------------- 7928b40a6198Smrg# Determine which file name conversion functions should be used by 7929b40a6198Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7930b40a6198Smrg# for certain cross-compile configurations and native mingw. 7931b40a6198Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7932b40a6198Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7933b40a6198SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7934b40a6198SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7935b40a6198SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7936b40a6198Smrg[case $host in 7937b40a6198Smrg *-*-mingw* ) 7938b40a6198Smrg case $build in 7939b40a6198Smrg *-*-mingw* ) # actually msys 7940b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7941b40a6198Smrg ;; 7942b40a6198Smrg *-*-cygwin* ) 7943b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7944b40a6198Smrg ;; 7945b40a6198Smrg * ) # otherwise, assume *nix 7946b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7947b40a6198Smrg ;; 7948b40a6198Smrg esac 79495592a31fSmrg ;; 7950b40a6198Smrg *-*-cygwin* ) 7951b40a6198Smrg case $build in 7952b40a6198Smrg *-*-mingw* ) # actually msys 7953b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7954b40a6198Smrg ;; 7955b40a6198Smrg *-*-cygwin* ) 7956b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7957b40a6198Smrg ;; 7958b40a6198Smrg * ) # otherwise, assume *nix 7959b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7960b40a6198Smrg ;; 7961b40a6198Smrg esac 79625592a31fSmrg ;; 7963b40a6198Smrg * ) # unhandled hosts (and "normal" native builds) 7964b40a6198Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7965b40a6198Smrg ;; 7966b40a6198Smrgesac 79675592a31fSmrg]) 7968b40a6198Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7969b40a6198SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7970b40a6198Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7971b40a6198Smrg [0], [convert $build file names to $host format])dnl 7972b40a6198Smrg 7973b40a6198SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7974b40a6198SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7975b40a6198Smrg[#assume ordinary cross tools, or native build. 7976b40a6198Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 7977b40a6198Smrgcase $host in 7978b40a6198Smrg *-*-mingw* ) 7979b40a6198Smrg case $build in 7980b40a6198Smrg *-*-mingw* ) # actually msys 7981b40a6198Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7982b40a6198Smrg ;; 7983b40a6198Smrg esac 7984b40a6198Smrg ;; 7985b40a6198Smrgesac 7986b40a6198Smrg]) 7987b40a6198Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7988b40a6198SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7989b40a6198Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7990b40a6198Smrg [0], [convert $build files to toolchain format])dnl 7991b40a6198Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 799245bc899bSmrg 79935592a31fSmrg# Helper functions for option handling. -*- Autoconf -*- 79945592a31fSmrg# 7995b40a6198Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7996b40a6198Smrg# Inc. 79975592a31fSmrg# Written by Gary V. Vaughan, 2004 79985592a31fSmrg# 79995592a31fSmrg# This file is free software; the Free Software Foundation gives 80005592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 80015592a31fSmrg# modifications, as long as this notice is preserved. 800245bc899bSmrg 8003b40a6198Smrg# serial 7 ltoptions.m4 800445bc899bSmrg 80055592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 80065592a31fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 800745bc899bSmrg 800845bc899bSmrg 80095592a31fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 80105592a31fSmrg# ------------------------------------------ 80115592a31fSmrgm4_define([_LT_MANGLE_OPTION], 80125592a31fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 801345bc899bSmrg 80141ac89addSmrg 80155592a31fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 80165592a31fSmrg# --------------------------------------- 80175592a31fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 80185592a31fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 80195592a31fSmrg# saved as a flag. 80205592a31fSmrgm4_define([_LT_SET_OPTION], 80215592a31fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 80225592a31fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 80235592a31fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 80245592a31fSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 80255592a31fSmrg]) 80261ac89addSmrg 80271ac89addSmrg 80285592a31fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 80295592a31fSmrg# ------------------------------------------------------------ 80305592a31fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 80315592a31fSmrgm4_define([_LT_IF_OPTION], 80325592a31fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 80335592a31fSmrg 80345592a31fSmrg 80355592a31fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 80365592a31fSmrg# ------------------------------------------------------- 80375592a31fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 80385592a31fSmrg# are set. 80395592a31fSmrgm4_define([_LT_UNLESS_OPTIONS], 80405592a31fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80415592a31fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 80425592a31fSmrg [m4_define([$0_found])])])[]dnl 80435592a31fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 80445592a31fSmrg])[]dnl 80455592a31fSmrg]) 804645bc899bSmrg 804745bc899bSmrg 80485592a31fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 80495592a31fSmrg# ---------------------------------------- 80505592a31fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 80515592a31fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 80525592a31fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 80535592a31fSmrg# the unknown option and exit. 80545592a31fSmrgm4_defun([_LT_SET_OPTIONS], 80555592a31fSmrg[# Set options 80565592a31fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80575592a31fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 80585592a31fSmrg 80595592a31fSmrgm4_if([$1],[LT_INIT],[ 80605592a31fSmrg dnl 80615592a31fSmrg dnl Simply set some default values (i.e off) if boolean options were not 80625592a31fSmrg dnl specified: 80635592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 80645592a31fSmrg ]) 80655592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 80665592a31fSmrg ]) 80675592a31fSmrg dnl 80685592a31fSmrg dnl If no reference was made to various pairs of opposing options, then 80695592a31fSmrg dnl we run the default mode handler for the pair. For example, if neither 80705592a31fSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 80715592a31fSmrg dnl archives by default: 80725592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 80735592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 80745592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 80755592a31fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 80765592a31fSmrg [_LT_ENABLE_FAST_INSTALL]) 80775592a31fSmrg ]) 80785592a31fSmrg])# _LT_SET_OPTIONS 807945bc899bSmrg 808045bc899bSmrg 808145bc899bSmrg 80825592a31fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 80835592a31fSmrg# ----------------------------------------- 80845592a31fSmrgm4_define([_LT_MANGLE_DEFUN], 80855592a31fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 808645bc899bSmrg 808750f2e948Smrg 80885592a31fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 80895592a31fSmrg# ----------------------------------------------- 80905592a31fSmrgm4_define([LT_OPTION_DEFINE], 80915592a31fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 80925592a31fSmrg])# LT_OPTION_DEFINE 809350f2e948Smrg 809450f2e948Smrg 80955592a31fSmrg# dlopen 80965592a31fSmrg# ------ 80975592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 80985592a31fSmrg]) 80995592a31fSmrg 81005592a31fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 81015592a31fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 81025592a31fSmrgAC_DIAGNOSE([obsolete], 81035592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81045592a31fSmrgput the `dlopen' option into LT_INIT's first parameter.]) 81055592a31fSmrg]) 81065592a31fSmrg 81075592a31fSmrgdnl aclocal-1.4 backwards compatibility: 81085592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 81095592a31fSmrg 81105592a31fSmrg 81115592a31fSmrg# win32-dll 81125592a31fSmrg# --------- 81135592a31fSmrg# Declare package support for building win32 dll's. 81145592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 81155592a31fSmrg[enable_win32_dll=yes 81165592a31fSmrg 81175592a31fSmrgcase $host in 8118b40a6198Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 81195592a31fSmrg AC_CHECK_TOOL(AS, as, false) 81205592a31fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 81215592a31fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 81225592a31fSmrg ;; 81235592a31fSmrgesac 812445bc899bSmrg 81255592a31fSmrgtest -z "$AS" && AS=as 8126b40a6198Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 812745bc899bSmrg 81285592a31fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8129b40a6198Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 813045bc899bSmrg 81315592a31fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8132b40a6198Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 81335592a31fSmrg])# win32-dll 813445bc899bSmrg 81355592a31fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 81365592a31fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 81375592a31fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 81385592a31fSmrgAC_DIAGNOSE([obsolete], 81395592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81405592a31fSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 81415592a31fSmrg]) 814245bc899bSmrg 81435592a31fSmrgdnl aclocal-1.4 backwards compatibility: 81445592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 814545bc899bSmrg 814645bc899bSmrg 81475592a31fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 81485592a31fSmrg# ---------------------------- 81495592a31fSmrg# implement the --enable-shared flag, and supports the `shared' and 81505592a31fSmrg# `disable-shared' LT_INIT options. 81515592a31fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 81525592a31fSmrgm4_define([_LT_ENABLE_SHARED], 81535592a31fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 81545592a31fSmrgAC_ARG_ENABLE([shared], 81555592a31fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 81565592a31fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 81575592a31fSmrg [p=${PACKAGE-default} 81585592a31fSmrg case $enableval in 81595592a31fSmrg yes) enable_shared=yes ;; 81605592a31fSmrg no) enable_shared=no ;; 81615592a31fSmrg *) 81625592a31fSmrg enable_shared=no 81635592a31fSmrg # Look at the argument we got. We use all the common list separators. 81645592a31fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 81655592a31fSmrg for pkg in $enableval; do 81665592a31fSmrg IFS="$lt_save_ifs" 81675592a31fSmrg if test "X$pkg" = "X$p"; then 81685592a31fSmrg enable_shared=yes 81695592a31fSmrg fi 81705592a31fSmrg done 81715592a31fSmrg IFS="$lt_save_ifs" 8172226fade8Smrg ;; 81735592a31fSmrg esac], 81745592a31fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 817545bc899bSmrg 81765592a31fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 81775592a31fSmrg [Whether or not to build shared libraries]) 81785592a31fSmrg])# _LT_ENABLE_SHARED 817945bc899bSmrg 81805592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 81815592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 818245bc899bSmrg 81835592a31fSmrg# Old names: 81845592a31fSmrgAC_DEFUN([AC_ENABLE_SHARED], 81855592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 81865592a31fSmrg]) 818745bc899bSmrg 81885592a31fSmrgAC_DEFUN([AC_DISABLE_SHARED], 81895592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 81905592a31fSmrg]) 819145bc899bSmrg 81925592a31fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 81935592a31fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 819445bc899bSmrg 81955592a31fSmrgdnl aclocal-1.4 backwards compatibility: 81965592a31fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 81975592a31fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 819845bc899bSmrg 819945bc899bSmrg 820045bc899bSmrg 82015592a31fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 82025592a31fSmrg# ---------------------------- 82035592a31fSmrg# implement the --enable-static flag, and support the `static' and 82045592a31fSmrg# `disable-static' LT_INIT options. 82055592a31fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82065592a31fSmrgm4_define([_LT_ENABLE_STATIC], 82075592a31fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 82085592a31fSmrgAC_ARG_ENABLE([static], 82095592a31fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 82105592a31fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 82115592a31fSmrg [p=${PACKAGE-default} 82125592a31fSmrg case $enableval in 82135592a31fSmrg yes) enable_static=yes ;; 82145592a31fSmrg no) enable_static=no ;; 82155592a31fSmrg *) 82165592a31fSmrg enable_static=no 82175592a31fSmrg # Look at the argument we got. We use all the common list separators. 82185592a31fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82195592a31fSmrg for pkg in $enableval; do 82205592a31fSmrg IFS="$lt_save_ifs" 82215592a31fSmrg if test "X$pkg" = "X$p"; then 82225592a31fSmrg enable_static=yes 82235592a31fSmrg fi 82245592a31fSmrg done 82255592a31fSmrg IFS="$lt_save_ifs" 8226226fade8Smrg ;; 82275592a31fSmrg esac], 82285592a31fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 822945bc899bSmrg 82305592a31fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 82315592a31fSmrg [Whether or not to build static libraries]) 82325592a31fSmrg])# _LT_ENABLE_STATIC 823345bc899bSmrg 82345592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 82355592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 823645bc899bSmrg 82375592a31fSmrg# Old names: 82385592a31fSmrgAC_DEFUN([AC_ENABLE_STATIC], 82395592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 82405592a31fSmrg]) 824145bc899bSmrg 82425592a31fSmrgAC_DEFUN([AC_DISABLE_STATIC], 82435592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 82445592a31fSmrg]) 824545bc899bSmrg 82465592a31fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 82475592a31fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 824845bc899bSmrg 82495592a31fSmrgdnl aclocal-1.4 backwards compatibility: 82505592a31fSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 82515592a31fSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 825245bc899bSmrg 825345bc899bSmrg 825445bc899bSmrg 82555592a31fSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 82565592a31fSmrg# ---------------------------------- 82575592a31fSmrg# implement the --enable-fast-install flag, and support the `fast-install' 82585592a31fSmrg# and `disable-fast-install' LT_INIT options. 82595592a31fSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82605592a31fSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 82615592a31fSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 82625592a31fSmrgAC_ARG_ENABLE([fast-install], 82635592a31fSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 82645592a31fSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 82655592a31fSmrg [p=${PACKAGE-default} 82665592a31fSmrg case $enableval in 82675592a31fSmrg yes) enable_fast_install=yes ;; 82685592a31fSmrg no) enable_fast_install=no ;; 82695592a31fSmrg *) 82705592a31fSmrg enable_fast_install=no 82715592a31fSmrg # Look at the argument we got. We use all the common list separators. 82725592a31fSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82735592a31fSmrg for pkg in $enableval; do 82745592a31fSmrg IFS="$lt_save_ifs" 82755592a31fSmrg if test "X$pkg" = "X$p"; then 82765592a31fSmrg enable_fast_install=yes 827750f2e948Smrg fi 82785592a31fSmrg done 82795592a31fSmrg IFS="$lt_save_ifs" 8280226fade8Smrg ;; 82815592a31fSmrg esac], 82825592a31fSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 828345bc899bSmrg 82845592a31fSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 82855592a31fSmrg [Whether or not to optimize for fast installation])dnl 82865592a31fSmrg])# _LT_ENABLE_FAST_INSTALL 828745bc899bSmrg 82885592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 82895592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 82901ac89addSmrg 82915592a31fSmrg# Old names: 82925592a31fSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 82935592a31fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 82945592a31fSmrgAC_DIAGNOSE([obsolete], 82955592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 82965592a31fSmrgthe `fast-install' option into LT_INIT's first parameter.]) 82975592a31fSmrg]) 82981ac89addSmrg 82995592a31fSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 83005592a31fSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 83015592a31fSmrgAC_DIAGNOSE([obsolete], 83025592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 83035592a31fSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 83045592a31fSmrg]) 83051ac89addSmrg 83065592a31fSmrgdnl aclocal-1.4 backwards compatibility: 83075592a31fSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 83085592a31fSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 83091ac89addSmrg 831050f2e948Smrg 83115592a31fSmrg# _LT_WITH_PIC([MODE]) 83125592a31fSmrg# -------------------- 83135592a31fSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 83145592a31fSmrg# LT_INIT options. 83155592a31fSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 83165592a31fSmrgm4_define([_LT_WITH_PIC], 83175592a31fSmrg[AC_ARG_WITH([pic], 8318b40a6198Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 83195592a31fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8320b40a6198Smrg [lt_p=${PACKAGE-default} 8321b40a6198Smrg case $withval in 8322b40a6198Smrg yes|no) pic_mode=$withval ;; 8323b40a6198Smrg *) 8324b40a6198Smrg pic_mode=default 8325b40a6198Smrg # Look at the argument we got. We use all the common list separators. 8326b40a6198Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8327b40a6198Smrg for lt_pkg in $withval; do 8328b40a6198Smrg IFS="$lt_save_ifs" 8329b40a6198Smrg if test "X$lt_pkg" = "X$lt_p"; then 8330b40a6198Smrg pic_mode=yes 8331b40a6198Smrg fi 8332b40a6198Smrg done 8333b40a6198Smrg IFS="$lt_save_ifs" 8334b40a6198Smrg ;; 8335b40a6198Smrg esac], 83365592a31fSmrg [pic_mode=default]) 83375592a31fSmrg 83385592a31fSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 83391ac89addSmrg 83405592a31fSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 83415592a31fSmrg])# _LT_WITH_PIC 83421ac89addSmrg 83435592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 83445592a31fSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 834550f2e948Smrg 83465592a31fSmrg# Old name: 83475592a31fSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 83485592a31fSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 83495592a31fSmrgAC_DIAGNOSE([obsolete], 83505592a31fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 83515592a31fSmrgput the `pic-only' option into LT_INIT's first parameter.]) 835250f2e948Smrg]) 835350f2e948Smrg 83545592a31fSmrgdnl aclocal-1.4 backwards compatibility: 83555592a31fSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 835650f2e948Smrg 835750f2e948Smrg 83585592a31fSmrgm4_define([_LTDL_MODE], []) 83595592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 83605592a31fSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 83615592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 83625592a31fSmrg [m4_define([_LTDL_MODE], [recursive])]) 83635592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 83645592a31fSmrg [m4_define([_LTDL_MODE], [subproject])]) 836550f2e948Smrg 83665592a31fSmrgm4_define([_LTDL_TYPE], []) 83675592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 83685592a31fSmrg [m4_define([_LTDL_TYPE], [installable])]) 83695592a31fSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 83705592a31fSmrg [m4_define([_LTDL_TYPE], [convenience])]) 837150f2e948Smrg 83725592a31fSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 837345bc899bSmrg# 83745592a31fSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 83755592a31fSmrg# Written by Gary V. Vaughan, 2004 8376226fade8Smrg# 83775592a31fSmrg# This file is free software; the Free Software Foundation gives 83785592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 83795592a31fSmrg# modifications, as long as this notice is preserved. 83805592a31fSmrg 83815592a31fSmrg# serial 6 ltsugar.m4 83825592a31fSmrg 83835592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 83845592a31fSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 83855592a31fSmrg 83865592a31fSmrg 83875592a31fSmrg# lt_join(SEP, ARG1, [ARG2...]) 83885592a31fSmrg# ----------------------------- 83895592a31fSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 83905592a31fSmrg# associated separator. 83915592a31fSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 83925592a31fSmrg# versions in m4sugar had bugs. 83935592a31fSmrgm4_define([lt_join], 83945592a31fSmrg[m4_if([$#], [1], [], 83955592a31fSmrg [$#], [2], [[$2]], 83965592a31fSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 83975592a31fSmrgm4_define([_lt_join], 83985592a31fSmrg[m4_if([$#$2], [2], [], 83995592a31fSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 84005592a31fSmrg 84015592a31fSmrg 84025592a31fSmrg# lt_car(LIST) 84035592a31fSmrg# lt_cdr(LIST) 84045592a31fSmrg# ------------ 84055592a31fSmrg# Manipulate m4 lists. 84065592a31fSmrg# These macros are necessary as long as will still need to support 84075592a31fSmrg# Autoconf-2.59 which quotes differently. 84085592a31fSmrgm4_define([lt_car], [[$1]]) 84095592a31fSmrgm4_define([lt_cdr], 84105592a31fSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 84115592a31fSmrg [$#], 1, [], 84125592a31fSmrg [m4_dquote(m4_shift($@))])]) 84135592a31fSmrgm4_define([lt_unquote], $1) 84145592a31fSmrg 84155592a31fSmrg 84165592a31fSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 84175592a31fSmrg# ------------------------------------------ 84185592a31fSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 84195592a31fSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 84205592a31fSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 84215592a31fSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 84225592a31fSmrg# than defined and empty). 84233a925b30Smrg# 84245592a31fSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 84255592a31fSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 84265592a31fSmrgm4_define([lt_append], 84275592a31fSmrg[m4_define([$1], 84285592a31fSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 84295592a31fSmrg 84305592a31fSmrg 84315592a31fSmrg 84325592a31fSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 84335592a31fSmrg# ---------------------------------------------------------- 84345592a31fSmrg# Produce a SEP delimited list of all paired combinations of elements of 84355592a31fSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 84365592a31fSmrg# has the form PREFIXmINFIXSUFFIXn. 84375592a31fSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 84385592a31fSmrgm4_define([lt_combine], 84395592a31fSmrg[m4_if(m4_eval([$# > 3]), [1], 84405592a31fSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 84415592a31fSmrg[[m4_foreach([_Lt_prefix], [$2], 84425592a31fSmrg [m4_foreach([_Lt_suffix], 84435592a31fSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 84445592a31fSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 84455592a31fSmrg 84465592a31fSmrg 84475592a31fSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 84485592a31fSmrg# ----------------------------------------------------------------------- 84495592a31fSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 84505592a31fSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 84515592a31fSmrgm4_define([lt_if_append_uniq], 84525592a31fSmrg[m4_ifdef([$1], 84535592a31fSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 84545592a31fSmrg [lt_append([$1], [$2], [$3])$4], 84555592a31fSmrg [$5])], 84565592a31fSmrg [lt_append([$1], [$2], [$3])$4])]) 84575592a31fSmrg 84585592a31fSmrg 84595592a31fSmrg# lt_dict_add(DICT, KEY, VALUE) 84605592a31fSmrg# ----------------------------- 84615592a31fSmrgm4_define([lt_dict_add], 84625592a31fSmrg[m4_define([$1($2)], [$3])]) 846345bc899bSmrg 846445bc899bSmrg 84655592a31fSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 84665592a31fSmrg# -------------------------------------------- 84675592a31fSmrgm4_define([lt_dict_add_subkey], 84685592a31fSmrg[m4_define([$1($2:$3)], [$4])]) 846945bc899bSmrg 847045bc899bSmrg 84715592a31fSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 84725592a31fSmrg# ---------------------------------- 84735592a31fSmrgm4_define([lt_dict_fetch], 84745592a31fSmrg[m4_ifval([$3], 84755592a31fSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 84765592a31fSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 847745bc899bSmrg 84781ac89addSmrg 84795592a31fSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 84805592a31fSmrg# ----------------------------------------------------------------- 84815592a31fSmrgm4_define([lt_if_dict_fetch], 84825592a31fSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 84835592a31fSmrg [$5], 84845592a31fSmrg [$6])]) 848545bc899bSmrg 84865592a31fSmrg 84875592a31fSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 84885592a31fSmrg# -------------------------------------------------------------- 84895592a31fSmrgm4_define([lt_dict_filter], 84905592a31fSmrg[m4_if([$5], [], [], 84915592a31fSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 84925592a31fSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 84935592a31fSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8494226fade8Smrg]) 849550f2e948Smrg 84965592a31fSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 84975592a31fSmrg# 84985592a31fSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 84995592a31fSmrg# Written by Scott James Remnant, 2004 85005592a31fSmrg# 85015592a31fSmrg# This file is free software; the Free Software Foundation gives 85025592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 85035592a31fSmrg# modifications, as long as this notice is preserved. 850450f2e948Smrg 8505b40a6198Smrg# @configure_input@ 850650f2e948Smrg 8507b40a6198Smrg# serial 3337 ltversion.m4 85085592a31fSmrg# This file is part of GNU Libtool 850950f2e948Smrg 8510b40a6198Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8511b40a6198Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 851250f2e948Smrg 85135592a31fSmrgAC_DEFUN([LTVERSION_VERSION], 8514b40a6198Smrg[macro_version='2.4.2' 8515b40a6198Smrgmacro_revision='1.3337' 85165592a31fSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 85175592a31fSmrg_LT_DECL(, macro_revision, 0) 8518226fade8Smrg]) 851950f2e948Smrg 85205592a31fSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 85215592a31fSmrg# 8522b40a6198Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 85235592a31fSmrg# Written by Scott James Remnant, 2004. 85245592a31fSmrg# 85255592a31fSmrg# This file is free software; the Free Software Foundation gives 85265592a31fSmrg# unlimited permission to copy and/or distribute it, with or without 85275592a31fSmrg# modifications, as long as this notice is preserved. 85285592a31fSmrg 8529b40a6198Smrg# serial 5 lt~obsolete.m4 85305592a31fSmrg 85315592a31fSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 85325592a31fSmrg# 85335592a31fSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 85345592a31fSmrg# which have later been changed to m4_define as they aren't part of the 85355592a31fSmrg# exported API, or moved to Autoconf or Automake where they belong. 85365592a31fSmrg# 85375592a31fSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 85385592a31fSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 85395592a31fSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 85405592a31fSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 85415592a31fSmrg# and doesn't know about Autoconf macros at all.) 85425592a31fSmrg# 85435592a31fSmrg# So we provide this file, which has a silly filename so it's always 85445592a31fSmrg# included after everything else. This provides aclocal with the 85455592a31fSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 85465592a31fSmrg# because those macros already exist, or will be overwritten later. 85475592a31fSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 85485592a31fSmrg# 85495592a31fSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 85505592a31fSmrg# Yes, that means every name once taken will need to remain here until 85515592a31fSmrg# we give up compatibility with versions before 1.7, at which point 85525592a31fSmrg# we need to keep only those names which we still refer to. 85535592a31fSmrg 85545592a31fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 85555592a31fSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 85565592a31fSmrg 85575592a31fSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 85585592a31fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 85595592a31fSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 85605592a31fSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 85615592a31fSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 85625592a31fSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 85635592a31fSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 85645592a31fSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 85655592a31fSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 85665592a31fSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 85675592a31fSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 85685592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 85695592a31fSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 85705592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 85715592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 85725592a31fSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 85735592a31fSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 85745592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 85755592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 85765592a31fSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 85775592a31fSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 85785592a31fSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 85795592a31fSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 85805592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 85815592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 85825592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 85835592a31fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 85845592a31fSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 85855592a31fSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 85865592a31fSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 85875592a31fSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 85885592a31fSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 85895592a31fSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 85905592a31fSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 85915592a31fSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 85925592a31fSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 85935592a31fSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 85945592a31fSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 85955592a31fSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 85965592a31fSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 85975592a31fSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 85985592a31fSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 85995592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 86005592a31fSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 86015592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 86025592a31fSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 86035592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 86045592a31fSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 86055592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 86065592a31fSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 86075592a31fSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 86085592a31fSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 86095592a31fSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 86105592a31fSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8611b40a6198Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8612b40a6198Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8613b40a6198Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8614b40a6198Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8615b40a6198Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8616b40a6198Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8617b40a6198Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 86185592a31fSmrg 861945bc899bSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8620b40a6198Smrg# serial 1 (pkg-config-0.24) 862145bc899bSmrg# 862245bc899bSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 862345bc899bSmrg# 862445bc899bSmrg# This program is free software; you can redistribute it and/or modify 862545bc899bSmrg# it under the terms of the GNU General Public License as published by 862645bc899bSmrg# the Free Software Foundation; either version 2 of the License, or 862745bc899bSmrg# (at your option) any later version. 862845bc899bSmrg# 862945bc899bSmrg# This program is distributed in the hope that it will be useful, but 863045bc899bSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 863145bc899bSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 863245bc899bSmrg# General Public License for more details. 863345bc899bSmrg# 863445bc899bSmrg# You should have received a copy of the GNU General Public License 863545bc899bSmrg# along with this program; if not, write to the Free Software 863645bc899bSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 863745bc899bSmrg# 863845bc899bSmrg# As a special exception to the GNU General Public License, if you 863945bc899bSmrg# distribute this file as part of a program that contains a 864045bc899bSmrg# configuration script generated by Autoconf, you may include it under 864145bc899bSmrg# the same distribution terms that you use for the rest of that program. 864245bc899bSmrg 864345bc899bSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 864445bc899bSmrg# ---------------------------------- 864545bc899bSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 864645bc899bSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8647c97b1c41Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 8648c97b1c41Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 8649b40a6198SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8650b40a6198SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8651b40a6198SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8652b40a6198Smrg 865345bc899bSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 865445bc899bSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 865545bc899bSmrgfi 865645bc899bSmrgif test -n "$PKG_CONFIG"; then 865745bc899bSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 865845bc899bSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 865945bc899bSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 866045bc899bSmrg AC_MSG_RESULT([yes]) 866145bc899bSmrg else 866245bc899bSmrg AC_MSG_RESULT([no]) 866345bc899bSmrg PKG_CONFIG="" 866445bc899bSmrg fi 866545bc899bSmrgfi[]dnl 866645bc899bSmrg])# PKG_PROG_PKG_CONFIG 866745bc899bSmrg 866845bc899bSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 866945bc899bSmrg# 867045bc899bSmrg# Check to see whether a particular set of modules exists. Similar 867145bc899bSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 867245bc899bSmrg# 8673b40a6198Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8674b40a6198Smrg# only at the first occurence in configure.ac, so if the first place 8675b40a6198Smrg# it's called might be skipped (such as if it is within an "if", you 8676b40a6198Smrg# have to call PKG_CHECK_EXISTS manually 867745bc899bSmrg# -------------------------------------------------------------- 867845bc899bSmrgAC_DEFUN([PKG_CHECK_EXISTS], 867945bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 868045bc899bSmrgif test -n "$PKG_CONFIG" && \ 868145bc899bSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8682b40a6198Smrg m4_default([$2], [:]) 868345bc899bSmrgm4_ifvaln([$3], [else 868445bc899bSmrg $3])dnl 868545bc899bSmrgfi]) 868645bc899bSmrg 868745bc899bSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 868845bc899bSmrg# --------------------------------------------- 868945bc899bSmrgm4_define([_PKG_CONFIG], 869050f2e948Smrg[if test -n "$$1"; then 869150f2e948Smrg pkg_cv_[]$1="$$1" 869250f2e948Smrg elif test -n "$PKG_CONFIG"; then 869350f2e948Smrg PKG_CHECK_EXISTS([$3], 8694c97b1c41Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 8695c97b1c41Smrg test "x$?" != "x0" && pkg_failed=yes ], 869650f2e948Smrg [pkg_failed=yes]) 869750f2e948Smrg else 869850f2e948Smrg pkg_failed=untried 869945bc899bSmrgfi[]dnl 870045bc899bSmrg])# _PKG_CONFIG 870145bc899bSmrg 870245bc899bSmrg# _PKG_SHORT_ERRORS_SUPPORTED 870345bc899bSmrg# ----------------------------- 870445bc899bSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 870545bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 870645bc899bSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 870745bc899bSmrg _pkg_short_errors_supported=yes 870845bc899bSmrgelse 870945bc899bSmrg _pkg_short_errors_supported=no 871045bc899bSmrgfi[]dnl 871145bc899bSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 871245bc899bSmrg 871345bc899bSmrg 871445bc899bSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 871545bc899bSmrg# [ACTION-IF-NOT-FOUND]) 871645bc899bSmrg# 871745bc899bSmrg# 871845bc899bSmrg# Note that if there is a possibility the first call to 871945bc899bSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 872045bc899bSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 872145bc899bSmrg# 872245bc899bSmrg# 872345bc899bSmrg# -------------------------------------------------------------- 872445bc899bSmrgAC_DEFUN([PKG_CHECK_MODULES], 872545bc899bSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 872645bc899bSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 872745bc899bSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 872845bc899bSmrg 872945bc899bSmrgpkg_failed=no 873045bc899bSmrgAC_MSG_CHECKING([for $1]) 873145bc899bSmrg 873245bc899bSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 873345bc899bSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 873445bc899bSmrg 873545bc899bSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 873645bc899bSmrgand $1[]_LIBS to avoid the need to call pkg-config. 873745bc899bSmrgSee the pkg-config man page for more details.]) 873845bc899bSmrg 873945bc899bSmrgif test $pkg_failed = yes; then 8740b40a6198Smrg AC_MSG_RESULT([no]) 874145bc899bSmrg _PKG_SHORT_ERRORS_SUPPORTED 874245bc899bSmrg if test $_pkg_short_errors_supported = yes; then 8743c97b1c41Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 874445bc899bSmrg else 8745c97b1c41Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 874645bc899bSmrg fi 874745bc899bSmrg # Put the nasty error message in config.log where it belongs 874845bc899bSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 874945bc899bSmrg 8750b40a6198Smrg m4_default([$4], [AC_MSG_ERROR( 875145bc899bSmrg[Package requirements ($2) were not met: 875245bc899bSmrg 875345bc899bSmrg$$1_PKG_ERRORS 875445bc899bSmrg 875545bc899bSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 875645bc899bSmrginstalled software in a non-standard prefix. 875745bc899bSmrg 8758c97b1c41Smrg_PKG_TEXT])[]dnl 8759b40a6198Smrg ]) 876045bc899bSmrgelif test $pkg_failed = untried; then 8761b40a6198Smrg AC_MSG_RESULT([no]) 8762b40a6198Smrg m4_default([$4], [AC_MSG_FAILURE( 876345bc899bSmrg[The pkg-config script could not be found or is too old. Make sure it 876445bc899bSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 876545bc899bSmrgpath to pkg-config. 876645bc899bSmrg 876745bc899bSmrg_PKG_TEXT 876845bc899bSmrg 8769c97b1c41SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 8770b40a6198Smrg ]) 877145bc899bSmrgelse 877245bc899bSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 877345bc899bSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 877445bc899bSmrg AC_MSG_RESULT([yes]) 8775b40a6198Smrg $3 877645bc899bSmrgfi[]dnl 877745bc899bSmrg])# PKG_CHECK_MODULES 877845bc899bSmrg 877950f2e948Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 878045bc899bSmrgdnl 8781b40a6198Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 8782c97b1c41Smrgdnl 878345bc899bSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 8784b40a6198Smrgdnl copy of this software and associated documentation files (the "Software"), 8785b40a6198Smrgdnl to deal in the Software without restriction, including without limitation 8786b40a6198Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 8787b40a6198Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 8788b40a6198Smrgdnl Software is furnished to do so, subject to the following conditions: 878945bc899bSmrgdnl 8790b40a6198Smrgdnl The above copyright notice and this permission notice (including the next 8791b40a6198Smrgdnl paragraph) shall be included in all copies or substantial portions of the 8792b40a6198Smrgdnl Software. 879345bc899bSmrgdnl 8794b40a6198Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 8795b40a6198Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 8796b40a6198Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 8797b40a6198Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 8798b40a6198Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 8799b40a6198Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 8800b40a6198Smrgdnl DEALINGS IN THE SOFTWARE. 880145bc899bSmrg 880245bc899bSmrg# XORG_MACROS_VERSION(required-version) 880345bc899bSmrg# ------------------------------------- 880445bc899bSmrg# Minimum version: 1.1.0 880545bc899bSmrg# 880645bc899bSmrg# If you're using a macro added in Version 1.1 or newer, include this in 880745bc899bSmrg# your configure.ac with the minimum required version, such as: 880845bc899bSmrg# XORG_MACROS_VERSION(1.1) 880945bc899bSmrg# 88105592a31fSmrg# To ensure that this macro is defined, also add: 88115592a31fSmrg# m4_ifndef([XORG_MACROS_VERSION], 88125592a31fSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 881345bc899bSmrg# 881445bc899bSmrg# 8815c97b1c41Smrg# See the "minimum version" comment for each macro you use to see what 881645bc899bSmrg# version you require. 88175592a31fSmrgm4_defun([XORG_MACROS_VERSION],[ 8818c97b1c41Smrgm4_define([vers_have], [1.17.1]) 88195592a31fSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 88205592a31fSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 88215592a31fSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 88225592a31fSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 88235592a31fSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 88245592a31fSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 88255592a31fSmrgm4_undefine([vers_have]) 88265592a31fSmrgm4_undefine([maj_have]) 88275592a31fSmrgm4_undefine([maj_needed]) 882845bc899bSmrg]) # XORG_MACROS_VERSION 882945bc899bSmrg 883045bc899bSmrg# XORG_PROG_RAWCPP() 883145bc899bSmrg# ------------------ 883245bc899bSmrg# Minimum version: 1.0.0 883345bc899bSmrg# 883445bc899bSmrg# Find cpp program and necessary flags for use in pre-processing text files 883545bc899bSmrg# such as man pages and config files 883645bc899bSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 883745bc899bSmrgAC_REQUIRE([AC_PROG_CPP]) 8838c97b1c41SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 883945bc899bSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 884045bc899bSmrg 884145bc899bSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 884245bc899bSmrg# which is not the best choice for supporting other OS'es, but covers most 884345bc899bSmrg# of the ones we need for now. 884445bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8845b40a6198SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 884645bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 884745bc899bSmrg AC_MSG_RESULT([no]) 884845bc899bSmrgelse 884945bc899bSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 885045bc899bSmrg RAWCPPFLAGS=-undef 885145bc899bSmrg AC_MSG_RESULT([yes]) 885250f2e948Smrg # under Cygwin unix is still defined even with -undef 885350f2e948Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 885450f2e948Smrg RAWCPPFLAGS="-undef -ansi" 885550f2e948Smrg AC_MSG_RESULT([yes, with -ansi]) 885645bc899bSmrg else 885745bc899bSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 885845bc899bSmrg fi 885945bc899bSmrgfi 886045bc899bSmrgrm -f conftest.$ac_ext 886145bc899bSmrg 886245bc899bSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8863b40a6198SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 886445bc899bSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 886545bc899bSmrg AC_MSG_RESULT([no]) 886645bc899bSmrgelse 886745bc899bSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 886845bc899bSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 886945bc899bSmrg AC_MSG_RESULT([yes]) 887045bc899bSmrg else 887145bc899bSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 887245bc899bSmrg fi 887345bc899bSmrgfi 887445bc899bSmrgrm -f conftest.$ac_ext 887545bc899bSmrgAC_SUBST(RAWCPPFLAGS) 887645bc899bSmrg]) # XORG_PROG_RAWCPP 887745bc899bSmrg 887845bc899bSmrg# XORG_MANPAGE_SECTIONS() 887945bc899bSmrg# ----------------------- 888045bc899bSmrg# Minimum version: 1.0.0 888145bc899bSmrg# 888245bc899bSmrg# Determine which sections man pages go in for the different man page types 888345bc899bSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 888445bc899bSmrg# Not sure if there's any better way than just hardcoding by OS name. 888545bc899bSmrg# Override default settings by setting environment variables 8886b40a6198Smrg# Added MAN_SUBSTS in version 1.8 8887b40a6198Smrg# Added AC_PROG_SED in version 1.8 888845bc899bSmrg 888945bc899bSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 889045bc899bSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8891b40a6198SmrgAC_REQUIRE([AC_PROG_SED]) 889245bc899bSmrg 889345bc899bSmrgif test x$APP_MAN_SUFFIX = x ; then 889445bc899bSmrg APP_MAN_SUFFIX=1 889545bc899bSmrgfi 889645bc899bSmrgif test x$APP_MAN_DIR = x ; then 889745bc899bSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 889845bc899bSmrgfi 889945bc899bSmrg 890045bc899bSmrgif test x$LIB_MAN_SUFFIX = x ; then 890145bc899bSmrg LIB_MAN_SUFFIX=3 890245bc899bSmrgfi 890345bc899bSmrgif test x$LIB_MAN_DIR = x ; then 890445bc899bSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 890545bc899bSmrgfi 890645bc899bSmrg 890745bc899bSmrgif test x$FILE_MAN_SUFFIX = x ; then 890845bc899bSmrg case $host_os in 890945bc899bSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 891045bc899bSmrg *) FILE_MAN_SUFFIX=5 ;; 891145bc899bSmrg esac 891245bc899bSmrgfi 891345bc899bSmrgif test x$FILE_MAN_DIR = x ; then 891445bc899bSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 891545bc899bSmrgfi 891645bc899bSmrg 891745bc899bSmrgif test x$MISC_MAN_SUFFIX = x ; then 891845bc899bSmrg case $host_os in 891945bc899bSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 892045bc899bSmrg *) MISC_MAN_SUFFIX=7 ;; 892145bc899bSmrg esac 892245bc899bSmrgfi 892345bc899bSmrgif test x$MISC_MAN_DIR = x ; then 892445bc899bSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 892545bc899bSmrgfi 892645bc899bSmrg 892745bc899bSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 892845bc899bSmrg case $host_os in 892945bc899bSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 893045bc899bSmrg *) DRIVER_MAN_SUFFIX=4 ;; 893145bc899bSmrg esac 893245bc899bSmrgfi 893345bc899bSmrgif test x$DRIVER_MAN_DIR = x ; then 893445bc899bSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 893545bc899bSmrgfi 893645bc899bSmrg 893745bc899bSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 893845bc899bSmrg case $host_os in 893945bc899bSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 894045bc899bSmrg *) ADMIN_MAN_SUFFIX=8 ;; 894145bc899bSmrg esac 894245bc899bSmrgfi 894345bc899bSmrgif test x$ADMIN_MAN_DIR = x ; then 894445bc899bSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 894545bc899bSmrgfi 894645bc899bSmrg 894745bc899bSmrg 894845bc899bSmrgAC_SUBST([APP_MAN_SUFFIX]) 894945bc899bSmrgAC_SUBST([LIB_MAN_SUFFIX]) 895045bc899bSmrgAC_SUBST([FILE_MAN_SUFFIX]) 895145bc899bSmrgAC_SUBST([MISC_MAN_SUFFIX]) 895245bc899bSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 895345bc899bSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 895445bc899bSmrgAC_SUBST([APP_MAN_DIR]) 895545bc899bSmrgAC_SUBST([LIB_MAN_DIR]) 895645bc899bSmrgAC_SUBST([FILE_MAN_DIR]) 895745bc899bSmrgAC_SUBST([MISC_MAN_DIR]) 895845bc899bSmrgAC_SUBST([DRIVER_MAN_DIR]) 895945bc899bSmrgAC_SUBST([ADMIN_MAN_DIR]) 8960b40a6198Smrg 8961b40a6198SmrgXORG_MAN_PAGE="X Version 11" 8962b40a6198SmrgAC_SUBST([XORG_MAN_PAGE]) 8963b40a6198SmrgMAN_SUBSTS="\ 8964b40a6198Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8965b40a6198Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 8966b40a6198Smrg -e 's|__xservername__|Xorg|g' \ 8967b40a6198Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 8968b40a6198Smrg -e 's|__projectroot__|\$(prefix)|g' \ 8969b40a6198Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 8970b40a6198Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 8971b40a6198Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 8972b40a6198Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 8973b40a6198Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 8974b40a6198Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 8975b40a6198Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 8976b40a6198SmrgAC_SUBST([MAN_SUBSTS]) 8977b40a6198Smrg 897845bc899bSmrg]) # XORG_MANPAGE_SECTIONS 897945bc899bSmrg 8980b40a6198Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 8981b40a6198Smrg# ------------------------ 8982b40a6198Smrg# Minimum version: 1.7.0 8983b40a6198Smrg# 8984b40a6198Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 8985b40a6198Smrg# provided by xorg-sgml-doctools, if installed. 8986b40a6198SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 8987b40a6198SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 8988b40a6198SmrgXORG_SGML_PATH= 8989b40a6198SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 8990b40a6198Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 8991b40a6198Smrg [m4_ifval([$1],[:], 8992b40a6198Smrg [if test x"$cross_compiling" != x"yes" ; then 8993b40a6198Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 8994b40a6198Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 8995b40a6198Smrg fi]) 8996b40a6198Smrg ]) 8997b40a6198Smrg 8998b40a6198Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 8999b40a6198Smrg# the path and the name of the doc stylesheet 9000b40a6198Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9001b40a6198Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9002b40a6198Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9003b40a6198Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9004b40a6198Smrgelse 9005b40a6198Smrg AC_MSG_RESULT([no]) 9006b40a6198Smrgfi 9007b40a6198Smrg 9008b40a6198SmrgAC_SUBST(XORG_SGML_PATH) 9009b40a6198SmrgAC_SUBST(STYLESHEET_SRCDIR) 9010b40a6198SmrgAC_SUBST(XSL_STYLESHEET) 9011b40a6198SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9012b40a6198Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9013b40a6198Smrg 901445bc899bSmrg# XORG_CHECK_LINUXDOC 901545bc899bSmrg# ------------------- 901645bc899bSmrg# Minimum version: 1.0.0 901745bc899bSmrg# 901845bc899bSmrg# Defines the variable MAKE_TEXT if the necessary tools and 901945bc899bSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 902045bc899bSmrg# Whether or not the necessary tools and files are found can be checked 902145bc899bSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 902245bc899bSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9023b40a6198SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9024b40a6198SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 902545bc899bSmrg 902645bc899bSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 902745bc899bSmrg 9028b40a6198SmrgAC_MSG_CHECKING([whether to build documentation]) 902945bc899bSmrg 9030b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 903145bc899bSmrg BUILDDOC=yes 903245bc899bSmrgelse 903345bc899bSmrg BUILDDOC=no 903445bc899bSmrgfi 903545bc899bSmrg 903645bc899bSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 903745bc899bSmrg 903845bc899bSmrgAC_MSG_RESULT([$BUILDDOC]) 903945bc899bSmrg 9040b40a6198SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 904145bc899bSmrg 9042b40a6198Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 904345bc899bSmrg BUILDPDFDOC=yes 904445bc899bSmrgelse 904545bc899bSmrg BUILDPDFDOC=no 904645bc899bSmrgfi 904745bc899bSmrg 904845bc899bSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 904945bc899bSmrg 905045bc899bSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 905145bc899bSmrg 9052b40a6198SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 905350f2e948SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 905445bc899bSmrgMAKE_PDF="$PS2PDF" 905550f2e948SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 905645bc899bSmrg 905745bc899bSmrgAC_SUBST(MAKE_TEXT) 905845bc899bSmrgAC_SUBST(MAKE_PS) 905945bc899bSmrgAC_SUBST(MAKE_PDF) 906045bc899bSmrgAC_SUBST(MAKE_HTML) 906145bc899bSmrg]) # XORG_CHECK_LINUXDOC 906245bc899bSmrg 906350f2e948Smrg# XORG_CHECK_DOCBOOK 906450f2e948Smrg# ------------------- 906550f2e948Smrg# Minimum version: 1.0.0 906650f2e948Smrg# 906750f2e948Smrg# Checks for the ability to build output formats from SGML DocBook source. 906850f2e948Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 906950f2e948Smrg# indicates whether the necessary tools and files are found and, if set, 907050f2e948Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 907150f2e948SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9072b40a6198SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9073b40a6198Smrg 907450f2e948SmrgBUILDTXTDOC=no 907550f2e948SmrgBUILDPDFDOC=no 907650f2e948SmrgBUILDPSDOC=no 907750f2e948SmrgBUILDHTMLDOC=no 907850f2e948Smrg 907950f2e948SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 908050f2e948SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 908150f2e948SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 908250f2e948SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 908350f2e948Smrg 9084b40a6198SmrgAC_MSG_CHECKING([whether to build text documentation]) 9085b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 908650f2e948Smrg test x$BUILD_TXTDOC != xno; then 908750f2e948Smrg BUILDTXTDOC=yes 908850f2e948Smrgfi 908950f2e948SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 909050f2e948SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 909150f2e948Smrg 9092b40a6198SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9093b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 909450f2e948Smrg test x$BUILD_PDFDOC != xno; then 909550f2e948Smrg BUILDPDFDOC=yes 909650f2e948Smrgfi 909750f2e948SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 909850f2e948SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 909950f2e948Smrg 9100b40a6198SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9101b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 910250f2e948Smrg test x$BUILD_PSDOC != xno; then 910350f2e948Smrg BUILDPSDOC=yes 910450f2e948Smrgfi 910550f2e948SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 910650f2e948SmrgAC_MSG_RESULT([$BUILDPSDOC]) 910750f2e948Smrg 9108b40a6198SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9109b40a6198Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 911050f2e948Smrg test x$BUILD_HTMLDOC != xno; then 911150f2e948Smrg BUILDHTMLDOC=yes 911250f2e948Smrgfi 911350f2e948SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 911450f2e948SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 911550f2e948Smrg 911650f2e948SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 911750f2e948SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 911850f2e948SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 911950f2e948SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 912050f2e948Smrg 912150f2e948SmrgAC_SUBST(MAKE_TEXT) 912250f2e948SmrgAC_SUBST(MAKE_PS) 912350f2e948SmrgAC_SUBST(MAKE_PDF) 912450f2e948SmrgAC_SUBST(MAKE_HTML) 912550f2e948Smrg]) # XORG_CHECK_DOCBOOK 912650f2e948Smrg 9127b40a6198Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9128b40a6198Smrg# ---------------- 9129b40a6198Smrg# Minimum version: 1.5.0 9130b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9131b40a6198Smrg# 9132b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9133b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9134b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9135b40a6198Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9136b40a6198Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9137b40a6198Smrg# --with-xmlto assumes 'auto'. 9138b40a6198Smrg# 9139b40a6198Smrg# Interface to module: 9140b40a6198Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9141b40a6198Smrg# XMLTO: returns the path of the xmlto program found 9142b40a6198Smrg# returns the path set by the user in the environment 9143b40a6198Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9144b40a6198Smrg# 'no' user instructs the module not to use xmlto 9145b40a6198Smrg# 9146b40a6198Smrg# Added in version 1.10.0 9147b40a6198Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9148b40a6198Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9149b40a6198Smrg# 9150b40a6198Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9151b40a6198Smrg# 9152b40a6198SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9153b40a6198SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9154b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9155b40a6198SmrgAC_ARG_WITH(xmlto, 9156b40a6198Smrg AS_HELP_STRING([--with-xmlto], 9157b40a6198Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9158b40a6198Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9159b40a6198Smrgm4_undefine([_defopt]) 9160b40a6198Smrg 9161b40a6198Smrgif test "x$use_xmlto" = x"auto"; then 9162b40a6198Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9163b40a6198Smrg if test "x$XMLTO" = "x"; then 9164b40a6198Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9165b40a6198Smrg have_xmlto=no 9166b40a6198Smrg else 9167b40a6198Smrg have_xmlto=yes 9168b40a6198Smrg fi 9169b40a6198Smrgelif test "x$use_xmlto" = x"yes" ; then 9170b40a6198Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9171b40a6198Smrg if test "x$XMLTO" = "x"; then 9172b40a6198Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9173b40a6198Smrg fi 9174b40a6198Smrg have_xmlto=yes 9175b40a6198Smrgelif test "x$use_xmlto" = x"no" ; then 9176b40a6198Smrg if test "x$XMLTO" != "x"; then 9177b40a6198Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9178b40a6198Smrg fi 9179b40a6198Smrg have_xmlto=no 9180b40a6198Smrgelse 9181b40a6198Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9182b40a6198Smrgfi 9183b40a6198Smrg 9184b40a6198Smrg# Test for a minimum version of xmlto, if provided. 9185b40a6198Smrgm4_ifval([$1], 9186b40a6198Smrg[if test "$have_xmlto" = yes; then 9187b40a6198Smrg # scrape the xmlto version 9188b40a6198Smrg AC_MSG_CHECKING([the xmlto version]) 9189b40a6198Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9190b40a6198Smrg AC_MSG_RESULT([$xmlto_version]) 9191b40a6198Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9192b40a6198Smrg [if test "x$use_xmlto" = xauto; then 9193b40a6198Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9194b40a6198Smrg have_xmlto=no 9195b40a6198Smrg else 9196b40a6198Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9197b40a6198Smrg fi]) 9198b40a6198Smrgfi]) 9199b40a6198Smrg 9200b40a6198Smrg# Test for the ability of xmlto to generate a text target 9201b40a6198Smrghave_xmlto_text=no 9202b40a6198Smrgcat > conftest.xml << "EOF" 9203b40a6198SmrgEOF 9204b40a6198SmrgAS_IF([test "$have_xmlto" = yes], 9205b40a6198Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9206b40a6198Smrg [have_xmlto_text=yes], 9207b40a6198Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9208b40a6198Smrgrm -f conftest.xml 9209b40a6198SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9210b40a6198SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9211b40a6198Smrg]) # XORG_WITH_XMLTO 9212b40a6198Smrg 9213b40a6198Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9214b40a6198Smrg# -------------------------------------------- 9215b40a6198Smrg# Minimum version: 1.12.0 9216b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9217b40a6198Smrg# 9218b40a6198Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9219b40a6198Smrg# XML-based language used for the transformation of XML documents. 9220b40a6198Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9221b40a6198Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9222b40a6198Smrg# The XSLT processor is often used as a standalone tool for transformations. 9223b40a6198Smrg# It should not be assumed that this tool is used only to work with documnetation. 9224b40a6198Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9225b40a6198Smrg# 9226b40a6198Smrg# Interface to module: 9227b40a6198Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9228b40a6198Smrg# XSLTPROC: returns the path of the xsltproc program found 9229b40a6198Smrg# returns the path set by the user in the environment 9230b40a6198Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9231b40a6198Smrg# 'no' user instructs the module not to use xsltproc 9232b40a6198Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9233b40a6198Smrg# 9234b40a6198Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9235b40a6198Smrg# 9236b40a6198SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9237b40a6198SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9238b40a6198Smrg# Preserves the interface, should it be implemented later 9239b40a6198Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9240b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9241b40a6198SmrgAC_ARG_WITH(xsltproc, 9242b40a6198Smrg AS_HELP_STRING([--with-xsltproc], 9243b40a6198Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9244b40a6198Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9245b40a6198Smrgm4_undefine([_defopt]) 9246b40a6198Smrg 9247b40a6198Smrgif test "x$use_xsltproc" = x"auto"; then 9248b40a6198Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9249b40a6198Smrg if test "x$XSLTPROC" = "x"; then 9250b40a6198Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9251b40a6198Smrg have_xsltproc=no 9252b40a6198Smrg else 9253b40a6198Smrg have_xsltproc=yes 9254b40a6198Smrg fi 9255b40a6198Smrgelif test "x$use_xsltproc" = x"yes" ; then 9256b40a6198Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9257b40a6198Smrg if test "x$XSLTPROC" = "x"; then 9258b40a6198Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9259b40a6198Smrg fi 9260b40a6198Smrg have_xsltproc=yes 9261b40a6198Smrgelif test "x$use_xsltproc" = x"no" ; then 9262b40a6198Smrg if test "x$XSLTPROC" != "x"; then 9263b40a6198Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9264b40a6198Smrg fi 9265b40a6198Smrg have_xsltproc=no 9266b40a6198Smrgelse 9267b40a6198Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9268b40a6198Smrgfi 9269b40a6198Smrg 9270b40a6198SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9271b40a6198Smrg]) # XORG_WITH_XSLTPROC 9272b40a6198Smrg 9273b40a6198Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9274b40a6198Smrg# ---------------------------------------- 9275b40a6198Smrg# Minimum version: 1.15.0 9276b40a6198Smrg# 9277b40a6198Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9278b40a6198Smrg# scanning arbitrary text files, extracting information from those text files, 9279b40a6198Smrg# and printing reports based on that information. 9280b40a6198Smrg# 9281b40a6198Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9282b40a6198Smrg# 9283b40a6198Smrg# Interface to module: 9284b40a6198Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9285b40a6198Smrg# PERL: returns the path of the perl program found 9286b40a6198Smrg# returns the path set by the user in the environment 9287b40a6198Smrg# --with-perl: 'yes' user instructs the module to use perl 9288b40a6198Smrg# 'no' user instructs the module not to use perl 9289b40a6198Smrg# have_perl: returns yes if perl found in PATH or no 9290b40a6198Smrg# 9291b40a6198Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9292b40a6198Smrg# 9293b40a6198SmrgAC_DEFUN([XORG_WITH_PERL],[ 9294b40a6198SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9295b40a6198Smrg# Preserves the interface, should it be implemented later 9296b40a6198Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9297b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9298b40a6198SmrgAC_ARG_WITH(perl, 9299b40a6198Smrg AS_HELP_STRING([--with-perl], 9300b40a6198Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9301b40a6198Smrg [use_perl=$withval], [use_perl=]_defopt) 9302b40a6198Smrgm4_undefine([_defopt]) 9303b40a6198Smrg 9304b40a6198Smrgif test "x$use_perl" = x"auto"; then 9305b40a6198Smrg AC_PATH_PROG([PERL], [perl]) 9306b40a6198Smrg if test "x$PERL" = "x"; then 9307b40a6198Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9308b40a6198Smrg have_perl=no 9309b40a6198Smrg else 9310b40a6198Smrg have_perl=yes 9311b40a6198Smrg fi 9312b40a6198Smrgelif test "x$use_perl" = x"yes" ; then 9313b40a6198Smrg AC_PATH_PROG([PERL], [perl]) 9314b40a6198Smrg if test "x$PERL" = "x"; then 9315b40a6198Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9316b40a6198Smrg fi 9317b40a6198Smrg have_perl=yes 9318b40a6198Smrgelif test "x$use_perl" = x"no" ; then 9319b40a6198Smrg if test "x$PERL" != "x"; then 9320b40a6198Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9321b40a6198Smrg fi 9322b40a6198Smrg have_perl=no 9323b40a6198Smrgelse 9324b40a6198Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9325b40a6198Smrgfi 9326b40a6198Smrg 9327b40a6198SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9328b40a6198Smrg]) # XORG_WITH_PERL 9329b40a6198Smrg 9330b40a6198Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9331b40a6198Smrg# ---------------- 9332b40a6198Smrg# Minimum version: 1.5.0 9333b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9334b40a6198Smrg# 9335b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9336b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9337b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9338b40a6198Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9339b40a6198Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9340b40a6198Smrg# --with-asciidoc assumes 'auto'. 9341b40a6198Smrg# 9342b40a6198Smrg# Interface to module: 9343b40a6198Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9344b40a6198Smrg# ASCIIDOC: returns the path of the asciidoc program found 9345b40a6198Smrg# returns the path set by the user in the environment 9346b40a6198Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9347b40a6198Smrg# 'no' user instructs the module not to use asciidoc 9348b40a6198Smrg# 9349b40a6198Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9350b40a6198Smrg# 9351b40a6198SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9352b40a6198SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9353b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9354b40a6198SmrgAC_ARG_WITH(asciidoc, 9355b40a6198Smrg AS_HELP_STRING([--with-asciidoc], 9356b40a6198Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9357b40a6198Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9358b40a6198Smrgm4_undefine([_defopt]) 9359b40a6198Smrg 9360b40a6198Smrgif test "x$use_asciidoc" = x"auto"; then 9361b40a6198Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9362b40a6198Smrg if test "x$ASCIIDOC" = "x"; then 9363b40a6198Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9364b40a6198Smrg have_asciidoc=no 9365b40a6198Smrg else 9366b40a6198Smrg have_asciidoc=yes 9367b40a6198Smrg fi 9368b40a6198Smrgelif test "x$use_asciidoc" = x"yes" ; then 9369b40a6198Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9370b40a6198Smrg if test "x$ASCIIDOC" = "x"; then 9371b40a6198Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9372b40a6198Smrg fi 9373b40a6198Smrg have_asciidoc=yes 9374b40a6198Smrgelif test "x$use_asciidoc" = x"no" ; then 9375b40a6198Smrg if test "x$ASCIIDOC" != "x"; then 9376b40a6198Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9377b40a6198Smrg fi 9378b40a6198Smrg have_asciidoc=no 9379b40a6198Smrgelse 9380b40a6198Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9381b40a6198Smrgfi 9382b40a6198Smrgm4_ifval([$1], 9383b40a6198Smrg[if test "$have_asciidoc" = yes; then 9384b40a6198Smrg # scrape the asciidoc version 9385b40a6198Smrg AC_MSG_CHECKING([the asciidoc version]) 9386b40a6198Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9387b40a6198Smrg AC_MSG_RESULT([$asciidoc_version]) 9388b40a6198Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9389b40a6198Smrg [if test "x$use_asciidoc" = xauto; then 9390b40a6198Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9391b40a6198Smrg have_asciidoc=no 9392b40a6198Smrg else 9393b40a6198Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9394b40a6198Smrg fi]) 9395b40a6198Smrgfi]) 9396b40a6198SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9397b40a6198Smrg]) # XORG_WITH_ASCIIDOC 9398b40a6198Smrg 9399b40a6198Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9400b40a6198Smrg# -------------------------------- 9401b40a6198Smrg# Minimum version: 1.5.0 9402b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9403b40a6198Smrg# 9404b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9405b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9406b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9407b40a6198Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9408b40a6198Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9409b40a6198Smrg# --with-doxygen assumes 'auto'. 9410b40a6198Smrg# 9411b40a6198Smrg# Interface to module: 9412b40a6198Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9413b40a6198Smrg# DOXYGEN: returns the path of the doxygen program found 9414b40a6198Smrg# returns the path set by the user in the environment 9415b40a6198Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9416b40a6198Smrg# 'no' user instructs the module not to use doxygen 9417b40a6198Smrg# 9418b40a6198Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9419b40a6198Smrg# 9420b40a6198SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9421b40a6198SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9422b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9423b40a6198SmrgAC_ARG_WITH(doxygen, 9424b40a6198Smrg AS_HELP_STRING([--with-doxygen], 9425b40a6198Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9426b40a6198Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9427b40a6198Smrgm4_undefine([_defopt]) 9428b40a6198Smrg 9429b40a6198Smrgif test "x$use_doxygen" = x"auto"; then 9430b40a6198Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9431b40a6198Smrg if test "x$DOXYGEN" = "x"; then 9432b40a6198Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9433b40a6198Smrg have_doxygen=no 9434b40a6198Smrg else 9435b40a6198Smrg have_doxygen=yes 9436b40a6198Smrg fi 9437b40a6198Smrgelif test "x$use_doxygen" = x"yes" ; then 9438b40a6198Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9439b40a6198Smrg if test "x$DOXYGEN" = "x"; then 9440b40a6198Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9441b40a6198Smrg fi 9442b40a6198Smrg have_doxygen=yes 9443b40a6198Smrgelif test "x$use_doxygen" = x"no" ; then 9444b40a6198Smrg if test "x$DOXYGEN" != "x"; then 9445b40a6198Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9446b40a6198Smrg fi 9447b40a6198Smrg have_doxygen=no 9448b40a6198Smrgelse 9449b40a6198Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9450b40a6198Smrgfi 9451b40a6198Smrgm4_ifval([$1], 9452b40a6198Smrg[if test "$have_doxygen" = yes; then 9453b40a6198Smrg # scrape the doxygen version 9454b40a6198Smrg AC_MSG_CHECKING([the doxygen version]) 9455b40a6198Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9456b40a6198Smrg AC_MSG_RESULT([$doxygen_version]) 9457b40a6198Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9458b40a6198Smrg [if test "x$use_doxygen" = xauto; then 9459b40a6198Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9460b40a6198Smrg have_doxygen=no 9461b40a6198Smrg else 9462b40a6198Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9463b40a6198Smrg fi]) 9464b40a6198Smrgfi]) 9465b40a6198SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9466b40a6198Smrg]) # XORG_WITH_DOXYGEN 9467b40a6198Smrg 9468b40a6198Smrg# XORG_WITH_GROFF([DEFAULT]) 9469b40a6198Smrg# ---------------- 9470b40a6198Smrg# Minimum version: 1.6.0 9471b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9472b40a6198Smrg# 9473b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9474b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9475b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9476b40a6198Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 9477b40a6198Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 9478b40a6198Smrg# --with-groff assumes 'auto'. 9479b40a6198Smrg# 9480b40a6198Smrg# Interface to module: 9481b40a6198Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 9482b40a6198Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 9483b40a6198Smrg# HAVE_GROFF_MS: the -ms macros package 9484b40a6198Smrg# GROFF: returns the path of the groff program found 9485b40a6198Smrg# returns the path set by the user in the environment 9486b40a6198Smrg# --with-groff: 'yes' user instructs the module to use groff 9487b40a6198Smrg# 'no' user instructs the module not to use groff 9488b40a6198Smrg# 9489b40a6198Smrg# Added in version 1.9.0: 9490b40a6198Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9491b40a6198Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9492b40a6198Smrg# psselect from the psutils package. 9493b40a6198Smrg# the ghostcript package. Refer to the grohtml man pages 9494b40a6198Smrg# 9495b40a6198Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 9496b40a6198Smrg# 9497b40a6198Smrg# OS and distros often splits groff in a basic and full package, the former 9498b40a6198Smrg# having the groff program and the later having devices, fonts and macros 9499b40a6198Smrg# Checking for the groff executable is not enough. 9500b40a6198Smrg# 9501b40a6198Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 9502b40a6198Smrg# unset HAVE_GROFF or GROFF env variables. 9503b40a6198Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 9504b40a6198Smrg# 9505b40a6198SmrgAC_DEFUN([XORG_WITH_GROFF],[ 9506b40a6198SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9507b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 9508b40a6198SmrgAC_ARG_WITH(groff, 9509b40a6198Smrg AS_HELP_STRING([--with-groff], 9510b40a6198Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 9511b40a6198Smrg [use_groff=$withval], [use_groff=]_defopt) 9512b40a6198Smrgm4_undefine([_defopt]) 9513b40a6198Smrg 9514b40a6198Smrgif test "x$use_groff" = x"auto"; then 9515b40a6198Smrg AC_PATH_PROG([GROFF], [groff]) 9516b40a6198Smrg if test "x$GROFF" = "x"; then 9517b40a6198Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 9518b40a6198Smrg have_groff=no 9519b40a6198Smrg else 9520b40a6198Smrg have_groff=yes 9521b40a6198Smrg fi 9522b40a6198Smrgelif test "x$use_groff" = x"yes" ; then 9523b40a6198Smrg AC_PATH_PROG([GROFF], [groff]) 9524b40a6198Smrg if test "x$GROFF" = "x"; then 9525b40a6198Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 9526b40a6198Smrg fi 9527b40a6198Smrg have_groff=yes 9528b40a6198Smrgelif test "x$use_groff" = x"no" ; then 9529b40a6198Smrg if test "x$GROFF" != "x"; then 9530b40a6198Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 9531b40a6198Smrg fi 9532b40a6198Smrg have_groff=no 9533b40a6198Smrgelse 9534b40a6198Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 9535b40a6198Smrgfi 9536b40a6198Smrg 9537b40a6198Smrg# We have groff, test for the presence of the macro packages 9538b40a6198Smrgif test "x$have_groff" = x"yes"; then 9539b40a6198Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 9540b40a6198Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 9541b40a6198Smrg groff_ms_works=yes 9542b40a6198Smrg else 9543b40a6198Smrg groff_ms_works=no 9544b40a6198Smrg fi 9545b40a6198Smrg AC_MSG_RESULT([$groff_ms_works]) 9546b40a6198Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 9547b40a6198Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 9548b40a6198Smrg groff_mm_works=yes 9549b40a6198Smrg else 9550b40a6198Smrg groff_mm_works=no 9551b40a6198Smrg fi 9552b40a6198Smrg AC_MSG_RESULT([$groff_mm_works]) 9553b40a6198Smrgfi 9554b40a6198Smrg 9555b40a6198Smrg# We have groff, test for HTML dependencies, one command per package 9556b40a6198Smrgif test "x$have_groff" = x"yes"; then 9557b40a6198Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 9558b40a6198Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 9559b40a6198Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 9560b40a6198Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 9561b40a6198Smrg have_groff_html=yes 9562b40a6198Smrg else 9563b40a6198Smrg have_groff_html=no 9564b40a6198Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 9565b40a6198Smrg fi 9566b40a6198Smrgfi 9567b40a6198Smrg 9568b40a6198Smrg# Set Automake conditionals for Makefiles 9569b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 9570b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 9571b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 9572b40a6198SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 9573b40a6198Smrg]) # XORG_WITH_GROFF 9574b40a6198Smrg 9575b40a6198Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9576b40a6198Smrg# --------------------------------------- 9577b40a6198Smrg# Minimum version: 1.6.0 9578b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9579b40a6198Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 9580b40a6198Smrg# 9581b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9582b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9583b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9584b40a6198Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 9585b40a6198Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 9586b40a6198Smrg# --with-fop assumes 'auto'. 9587b40a6198Smrg# 9588b40a6198Smrg# Interface to module: 9589b40a6198Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 9590b40a6198Smrg# FOP: returns the path of the fop program found 9591b40a6198Smrg# returns the path set by the user in the environment 9592b40a6198Smrg# --with-fop: 'yes' user instructs the module to use fop 9593b40a6198Smrg# 'no' user instructs the module not to use fop 9594b40a6198Smrg# 9595b40a6198Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 9596b40a6198Smrg# 9597b40a6198SmrgAC_DEFUN([XORG_WITH_FOP],[ 9598b40a6198SmrgAC_ARG_VAR([FOP], [Path to fop command]) 9599b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9600b40a6198SmrgAC_ARG_WITH(fop, 9601b40a6198Smrg AS_HELP_STRING([--with-fop], 9602b40a6198Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 9603b40a6198Smrg [use_fop=$withval], [use_fop=]_defopt) 9604b40a6198Smrgm4_undefine([_defopt]) 9605b40a6198Smrg 9606b40a6198Smrgif test "x$use_fop" = x"auto"; then 9607b40a6198Smrg AC_PATH_PROG([FOP], [fop]) 9608b40a6198Smrg if test "x$FOP" = "x"; then 9609b40a6198Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 9610b40a6198Smrg have_fop=no 9611b40a6198Smrg else 9612b40a6198Smrg have_fop=yes 9613b40a6198Smrg fi 9614b40a6198Smrgelif test "x$use_fop" = x"yes" ; then 9615b40a6198Smrg AC_PATH_PROG([FOP], [fop]) 9616b40a6198Smrg if test "x$FOP" = "x"; then 9617b40a6198Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 9618b40a6198Smrg fi 9619b40a6198Smrg have_fop=yes 9620b40a6198Smrgelif test "x$use_fop" = x"no" ; then 9621b40a6198Smrg if test "x$FOP" != "x"; then 9622b40a6198Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 9623b40a6198Smrg fi 9624b40a6198Smrg have_fop=no 9625b40a6198Smrgelse 9626b40a6198Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 9627b40a6198Smrgfi 9628b40a6198Smrg 9629b40a6198Smrg# Test for a minimum version of fop, if provided. 9630b40a6198Smrgm4_ifval([$1], 9631b40a6198Smrg[if test "$have_fop" = yes; then 9632b40a6198Smrg # scrape the fop version 9633b40a6198Smrg AC_MSG_CHECKING([for fop minimum version]) 9634b40a6198Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9635b40a6198Smrg AC_MSG_RESULT([$fop_version]) 9636b40a6198Smrg AS_VERSION_COMPARE([$fop_version], [$1], 9637b40a6198Smrg [if test "x$use_fop" = xauto; then 9638b40a6198Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9639b40a6198Smrg have_fop=no 9640b40a6198Smrg else 9641b40a6198Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9642b40a6198Smrg fi]) 9643b40a6198Smrgfi]) 9644b40a6198SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 9645b40a6198Smrg]) # XORG_WITH_FOP 9646b40a6198Smrg 9647b40a6198Smrg# XORG_WITH_PS2PDF([DEFAULT]) 9648b40a6198Smrg# ---------------- 9649b40a6198Smrg# Minimum version: 1.6.0 9650b40a6198Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9651b40a6198Smrg# 9652b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9653b40a6198Smrg# not at the appropriate level. This macro enables a module to test for the 9654b40a6198Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9655b40a6198Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9656b40a6198Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 9657b40a6198Smrg# --with-ps2pdf assumes 'auto'. 9658b40a6198Smrg# 9659b40a6198Smrg# Interface to module: 9660b40a6198Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 9661b40a6198Smrg# PS2PDF: returns the path of the ps2pdf program found 9662b40a6198Smrg# returns the path set by the user in the environment 9663b40a6198Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 9664b40a6198Smrg# 'no' user instructs the module not to use ps2pdf 9665b40a6198Smrg# 9666b40a6198Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 9667b40a6198Smrg# 9668b40a6198SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 9669b40a6198SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9670b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 9671b40a6198SmrgAC_ARG_WITH(ps2pdf, 9672b40a6198Smrg AS_HELP_STRING([--with-ps2pdf], 9673b40a6198Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 9674b40a6198Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 9675b40a6198Smrgm4_undefine([_defopt]) 9676b40a6198Smrg 9677b40a6198Smrgif test "x$use_ps2pdf" = x"auto"; then 9678b40a6198Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9679b40a6198Smrg if test "x$PS2PDF" = "x"; then 9680b40a6198Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 9681b40a6198Smrg have_ps2pdf=no 9682b40a6198Smrg else 9683b40a6198Smrg have_ps2pdf=yes 9684b40a6198Smrg fi 9685b40a6198Smrgelif test "x$use_ps2pdf" = x"yes" ; then 9686b40a6198Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 9687b40a6198Smrg if test "x$PS2PDF" = "x"; then 9688b40a6198Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 9689b40a6198Smrg fi 9690b40a6198Smrg have_ps2pdf=yes 9691b40a6198Smrgelif test "x$use_ps2pdf" = x"no" ; then 9692b40a6198Smrg if test "x$PS2PDF" != "x"; then 9693b40a6198Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 9694b40a6198Smrg fi 9695b40a6198Smrg have_ps2pdf=no 9696b40a6198Smrgelse 9697b40a6198Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 9698b40a6198Smrgfi 9699b40a6198SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 9700b40a6198Smrg]) # XORG_WITH_PS2PDF 9701b40a6198Smrg 9702b40a6198Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 9703b40a6198Smrg# ---------------- 9704b40a6198Smrg# Minimum version: 1.6.0 9705b40a6198Smrg# 9706b40a6198Smrg# Documentation tools are not always available on all platforms and sometimes 9707b40a6198Smrg# not at the appropriate level. This macro enables a builder to skip all 9708b40a6198Smrg# documentation targets except traditional man pages. 9709b40a6198Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9710b40a6198Smrg# maximum flexibilty in controlling documentation building. 9711b40a6198Smrg# Refer to: 9712b40a6198Smrg# XORG_WITH_XMLTO --with-xmlto 9713b40a6198Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9714b40a6198Smrg# XORG_WITH_DOXYGEN --with-doxygen 9715b40a6198Smrg# XORG_WITH_FOP --with-fop 9716b40a6198Smrg# XORG_WITH_GROFF --with-groff 9717b40a6198Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9718b40a6198Smrg# 9719b40a6198Smrg# Interface to module: 9720b40a6198Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 9721b40a6198Smrg# --enable-docs: 'yes' user instructs the module to generate docs 9722b40a6198Smrg# 'no' user instructs the module not to generate docs 9723b40a6198Smrg# parm1: specify the default value, yes or no. 9724b40a6198Smrg# 9725b40a6198SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 9726b40a6198Smrgm4_define([docs_default], m4_default([$1], [yes])) 9727b40a6198SmrgAC_ARG_ENABLE(docs, 9728b40a6198Smrg AS_HELP_STRING([--enable-docs], 9729b40a6198Smrg [Enable building the documentation (default: ]docs_default[)]), 9730b40a6198Smrg [build_docs=$enableval], [build_docs=]docs_default) 9731b40a6198Smrgm4_undefine([docs_default]) 9732b40a6198SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 9733b40a6198SmrgAC_MSG_CHECKING([whether to build documentation]) 9734b40a6198SmrgAC_MSG_RESULT([$build_docs]) 9735b40a6198Smrg]) # XORG_ENABLE_DOCS 9736b40a6198Smrg 9737b40a6198Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 9738b40a6198Smrg# ---------------- 9739b40a6198Smrg# Minimum version: 1.6.0 9740b40a6198Smrg# 9741b40a6198Smrg# This macro enables a builder to skip all developer documentation. 9742b40a6198Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9743b40a6198Smrg# maximum flexibilty in controlling documentation building. 9744b40a6198Smrg# Refer to: 9745b40a6198Smrg# XORG_WITH_XMLTO --with-xmlto 9746b40a6198Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9747b40a6198Smrg# XORG_WITH_DOXYGEN --with-doxygen 9748b40a6198Smrg# XORG_WITH_FOP --with-fop 9749b40a6198Smrg# XORG_WITH_GROFF --with-groff 9750b40a6198Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9751b40a6198Smrg# 9752b40a6198Smrg# Interface to module: 9753b40a6198Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 9754b40a6198Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 9755b40a6198Smrg# 'no' user instructs the module not to generate developer docs 9756b40a6198Smrg# parm1: specify the default value, yes or no. 9757b40a6198Smrg# 9758b40a6198SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 9759b40a6198Smrgm4_define([devel_default], m4_default([$1], [yes])) 9760b40a6198SmrgAC_ARG_ENABLE(devel-docs, 9761b40a6198Smrg AS_HELP_STRING([--enable-devel-docs], 9762b40a6198Smrg [Enable building the developer documentation (default: ]devel_default[)]), 9763b40a6198Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 9764b40a6198Smrgm4_undefine([devel_default]) 9765b40a6198SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 9766b40a6198SmrgAC_MSG_CHECKING([whether to build developer documentation]) 9767b40a6198SmrgAC_MSG_RESULT([$build_devel_docs]) 9768b40a6198Smrg]) # XORG_ENABLE_DEVEL_DOCS 9769b40a6198Smrg 9770b40a6198Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 9771b40a6198Smrg# ---------------- 9772b40a6198Smrg# Minimum version: 1.6.0 9773b40a6198Smrg# 9774b40a6198Smrg# This macro enables a builder to skip all functional specification targets. 9775b40a6198Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 9776b40a6198Smrg# maximum flexibilty in controlling documentation building. 9777b40a6198Smrg# Refer to: 9778b40a6198Smrg# XORG_WITH_XMLTO --with-xmlto 9779b40a6198Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 9780b40a6198Smrg# XORG_WITH_DOXYGEN --with-doxygen 9781b40a6198Smrg# XORG_WITH_FOP --with-fop 9782b40a6198Smrg# XORG_WITH_GROFF --with-groff 9783b40a6198Smrg# XORG_WITH_PS2PDF --with-ps2pdf 9784b40a6198Smrg# 9785b40a6198Smrg# Interface to module: 9786b40a6198Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 9787b40a6198Smrg# --enable-specs: 'yes' user instructs the module to generate specs 9788b40a6198Smrg# 'no' user instructs the module not to generate specs 9789b40a6198Smrg# parm1: specify the default value, yes or no. 9790b40a6198Smrg# 9791b40a6198SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 9792b40a6198Smrgm4_define([spec_default], m4_default([$1], [yes])) 9793b40a6198SmrgAC_ARG_ENABLE(specs, 9794b40a6198Smrg AS_HELP_STRING([--enable-specs], 9795b40a6198Smrg [Enable building the specs (default: ]spec_default[)]), 9796b40a6198Smrg [build_specs=$enableval], [build_specs=]spec_default) 9797b40a6198Smrgm4_undefine([spec_default]) 9798b40a6198SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 9799b40a6198SmrgAC_MSG_CHECKING([whether to build functional specifications]) 9800b40a6198SmrgAC_MSG_RESULT([$build_specs]) 9801b40a6198Smrg]) # XORG_ENABLE_SPECS 9802b40a6198Smrg 9803b40a6198Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9804b40a6198Smrg# ---------------------------------------------- 9805b40a6198Smrg# Minimum version: 1.13.0 9806b40a6198Smrg# 9807b40a6198Smrg# This macro enables a builder to enable/disable unit testing 9808b40a6198Smrg# It makes no assumption about the test cases implementation 9809b40a6198Smrg# Test cases may or may not use Automake "Support for test suites" 9810b40a6198Smrg# They may or may not use the software utility library GLib 9811b40a6198Smrg# 9812b40a6198Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9813b40a6198Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9814b40a6198Smrg# The variable enable_unit_tests is used by other macros in this file. 9815b40a6198Smrg# 9816b40a6198Smrg# Interface to module: 9817b40a6198Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9818b40a6198Smrg# enable_unit_tests: used in configure.ac for additional configuration 9819b40a6198Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 9820b40a6198Smrg# 'no' user instructs the module not to build tests 9821b40a6198Smrg# parm1: specify the default value, yes or no. 9822b40a6198Smrg# 9823b40a6198SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9824b40a6198SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 9825b40a6198SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 9826b40a6198SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9827b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 9828b40a6198SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9829b40a6198Smrg [Enable building unit test cases (default: ]_defopt[)]), 9830b40a6198Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9831b40a6198Smrgm4_undefine([_defopt]) 9832b40a6198SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9833b40a6198SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9834b40a6198SmrgAC_MSG_RESULT([$enable_unit_tests]) 9835b40a6198Smrg]) # XORG_ENABLE_UNIT_TESTS 9836b40a6198Smrg 9837b40a6198Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9838b40a6198Smrg# ------------------------------------------------------ 9839b40a6198Smrg# Minimum version: 1.17.0 9840b40a6198Smrg# 9841b40a6198Smrg# This macro enables a builder to enable/disable integration testing 9842b40a6198Smrg# It makes no assumption about the test cases' implementation 9843b40a6198Smrg# Test cases may or may not use Automake "Support for test suites" 9844b40a6198Smrg# 9845b40a6198Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9846b40a6198Smrg# usually requires less dependencies and may be built and run under less 9847b40a6198Smrg# stringent environments than integration tests. 9848b40a6198Smrg# 9849b40a6198Smrg# Interface to module: 9850b40a6198Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9851b40a6198Smrg# enable_integration_tests: used in configure.ac for additional configuration 9852b40a6198Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 9853b40a6198Smrg# 'no' user instructs the module not to build tests 9854b40a6198Smrg# parm1: specify the default value, yes or no. 9855b40a6198Smrg# 9856b40a6198SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9857b40a6198SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9858b40a6198Smrgm4_define([_defopt], m4_default([$1], [auto])) 9859b40a6198SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9860b40a6198Smrg [Enable building integration test cases (default: ]_defopt[)]), 9861b40a6198Smrg [enable_integration_tests=$enableval], 9862b40a6198Smrg [enable_integration_tests=]_defopt) 9863b40a6198Smrgm4_undefine([_defopt]) 9864b40a6198SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9865b40a6198Smrg [test "x$enable_integration_tests" != xno]) 9866b40a6198SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9867b40a6198SmrgAC_MSG_RESULT([$enable_integration_tests]) 9868b40a6198Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 9869b40a6198Smrg 9870b40a6198Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9871b40a6198Smrg# ---------------------------------------- 9872b40a6198Smrg# Minimum version: 1.13.0 9873b40a6198Smrg# 9874b40a6198Smrg# GLib is a library which provides advanced data structures and functions. 9875b40a6198Smrg# This macro enables a module to test for the presence of Glib. 9876b40a6198Smrg# 9877b40a6198Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9878b40a6198Smrg# Otherwise the value of $enable_unit_tests is blank. 9879b40a6198Smrg# 9880b40a6198Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9881b40a6198Smrg# test support usually requires less dependencies and may be built and run under 9882b40a6198Smrg# less stringent environments than integration tests. 9883b40a6198Smrg# 9884b40a6198Smrg# Interface to module: 9885b40a6198Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 9886b40a6198Smrg# with_glib: used in configure.ac to know if GLib has been found 9887b40a6198Smrg# --with-glib: 'yes' user instructs the module to use glib 9888b40a6198Smrg# 'no' user instructs the module not to use glib 9889b40a6198Smrg# 9890b40a6198SmrgAC_DEFUN([XORG_WITH_GLIB],[ 9891b40a6198SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9892b40a6198Smrgm4_define([_defopt], m4_default([$2], [auto])) 9893b40a6198SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9894b40a6198Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 9895b40a6198Smrg [with_glib=$withval], [with_glib=]_defopt) 9896b40a6198Smrgm4_undefine([_defopt]) 9897b40a6198Smrg 9898b40a6198Smrghave_glib=no 9899b40a6198Smrg# Do not probe GLib if user explicitly disabled unit testing 9900b40a6198Smrgif test "x$enable_unit_tests" != x"no"; then 9901b40a6198Smrg # Do not probe GLib if user explicitly disabled it 9902b40a6198Smrg if test "x$with_glib" != x"no"; then 9903b40a6198Smrg m4_ifval( 9904b40a6198Smrg [$1], 9905b40a6198Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 9906b40a6198Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 9907b40a6198Smrg ) 9908b40a6198Smrg fi 9909b40a6198Smrgfi 9910b40a6198Smrg 9911b40a6198Smrg# Not having GLib when unit testing has been explicitly requested is an error 9912b40a6198Smrgif test "x$enable_unit_tests" = x"yes"; then 9913b40a6198Smrg if test "x$have_glib" = x"no"; then 9914b40a6198Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9915b40a6198Smrg fi 9916b40a6198Smrgfi 9917b40a6198Smrg 9918b40a6198Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 9919b40a6198Smrgif test "x$enable_unit_tests" = x"no"; then 9920b40a6198Smrg if test "x$with_glib" = x"yes"; then 9921b40a6198Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9922b40a6198Smrg fi 9923b40a6198Smrgfi 9924b40a6198Smrg 9925b40a6198Smrg# Not having GLib when it has been explicitly requested is an error 9926b40a6198Smrgif test "x$with_glib" = x"yes"; then 9927b40a6198Smrg if test "x$have_glib" = x"no"; then 9928b40a6198Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 9929b40a6198Smrg fi 9930b40a6198Smrgfi 9931b40a6198Smrg 9932b40a6198SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 9933b40a6198Smrg]) # XORG_WITH_GLIB 9934b40a6198Smrg 9935b40a6198Smrg# XORG_LD_WRAP([required|optional]) 9936b40a6198Smrg# --------------------------------- 9937b40a6198Smrg# Minimum version: 1.13.0 9938b40a6198Smrg# 9939b40a6198Smrg# Check if linker supports -wrap, passed via compiler flags 9940b40a6198Smrg# 9941b40a6198Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 9942b40a6198Smrg# Otherwise the value of $enable_unit_tests is blank. 9943b40a6198Smrg# 9944b40a6198Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 9945b40a6198Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 9946b40a6198Smrg# available, an argument of "optional" allows use when some unit tests require 9947b40a6198Smrg# ld -wrap and others do not. 9948b40a6198Smrg# 9949b40a6198SmrgAC_DEFUN([XORG_LD_WRAP],[ 9950b40a6198SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 9951b40a6198Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 9952b40a6198Smrg void __wrap_exit(int status) { return; }], 9953b40a6198Smrg [exit(0);])]) 9954b40a6198Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 9955b40a6198Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 9956b40a6198Smrg if test "x$have_ld_wrap" = x"no"; then 9957b40a6198Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 9958b40a6198Smrg fi 9959b40a6198Smrgfi 9960b40a6198SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 9961b40a6198Smrg# 9962b40a6198Smrg]) # XORG_LD_WRAP 9963b40a6198Smrg 9964b40a6198Smrg# XORG_CHECK_LINKER_FLAGS 9965b40a6198Smrg# ----------------------- 9966b40a6198Smrg# SYNOPSIS 9967b40a6198Smrg# 9968b40a6198Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 9969b40a6198Smrg# 9970b40a6198Smrg# DESCRIPTION 9971b40a6198Smrg# 9972b40a6198Smrg# Check whether the given linker FLAGS work with the current language's 9973b40a6198Smrg# linker, or whether they give an error. 9974b40a6198Smrg# 9975b40a6198Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 9976b40a6198Smrg# success/failure. 9977b40a6198Smrg# 9978b40a6198Smrg# PROGRAM-SOURCE is the program source to link with, if needed 9979b40a6198Smrg# 9980b40a6198Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 9981b40a6198Smrg# 9982b40a6198Smrg# LICENSE 9983b40a6198Smrg# 9984b40a6198Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 9985b40a6198Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 9986b40a6198Smrg# Copyright (c) 2009 Matteo Frigo 9987b40a6198Smrg# 9988b40a6198Smrg# This program is free software: you can redistribute it and/or modify it 9989b40a6198Smrg# under the terms of the GNU General Public License as published by the 9990b40a6198Smrg# Free Software Foundation, either version 3 of the License, or (at your 9991b40a6198Smrg# option) any later version. 9992b40a6198Smrg# 9993b40a6198Smrg# This program is distributed in the hope that it will be useful, but 9994b40a6198Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9995b40a6198Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 9996b40a6198Smrg# Public License for more details. 9997b40a6198Smrg# 9998b40a6198Smrg# You should have received a copy of the GNU General Public License along 9999b40a6198Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10000b40a6198Smrg# 10001b40a6198Smrg# As a special exception, the respective Autoconf Macro's copyright owner 10002b40a6198Smrg# gives unlimited permission to copy, distribute and modify the configure 10003b40a6198Smrg# scripts that are the output of Autoconf when processing the Macro. You 10004b40a6198Smrg# need not follow the terms of the GNU General Public License when using 10005b40a6198Smrg# or distributing such scripts, even though portions of the text of the 10006b40a6198Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10007b40a6198Smrg# all other use of the material that constitutes the Autoconf Macro. 10008b40a6198Smrg# 10009b40a6198Smrg# This special exception to the GPL applies to versions of the Autoconf 10010b40a6198Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10011b40a6198Smrg# modified version of the Autoconf Macro, you may extend this special 10012b40a6198Smrg# exception to the GPL to apply to your modified version as well.# 10013b40a6198SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10014b40a6198Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10015b40a6198Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10016b40a6198SmrgAS_LITERAL_IF([$1], 10017b40a6198Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10018b40a6198Smrg ax_save_FLAGS=$LDFLAGS 10019b40a6198Smrg LDFLAGS="$1" 10020b40a6198Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10021b40a6198Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10022b40a6198Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10023b40a6198Smrg LDFLAGS=$ax_save_FLAGS])], 10024b40a6198Smrg [ax_save_FLAGS=$LDFLAGS 10025b40a6198Smrg LDFLAGS="$1" 10026b40a6198Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10027b40a6198Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10028b40a6198Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10029b40a6198Smrg LDFLAGS=$ax_save_FLAGS]) 10030b40a6198Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10031b40a6198SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10032b40a6198Smrgif test "x$xorg_check_linker_flags" = xyes; then 10033b40a6198Smrg m4_default([$2], :) 10034b40a6198Smrgelse 10035b40a6198Smrg m4_default([$3], :) 10036b40a6198Smrgfi 10037b40a6198Smrg]) # XORG_CHECK_LINKER_FLAGS 10038b40a6198Smrg 10039b40a6198Smrg# XORG_MEMORY_CHECK_FLAGS 10040b40a6198Smrg# ----------------------- 10041b40a6198Smrg# Minimum version: 1.16.0 10042b40a6198Smrg# 10043b40a6198Smrg# This macro attempts to find appropriate memory checking functionality 10044b40a6198Smrg# for various platforms which unit testing code may use to catch various 10045b40a6198Smrg# forms of memory allocation and access errors in testing. 10046b40a6198Smrg# 10047b40a6198Smrg# Interface to module: 10048b40a6198Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10049b40a6198Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10050b40a6198Smrg# 10051b40a6198Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10052b40a6198Smrg# 10053b40a6198SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10054b40a6198Smrg 10055b40a6198SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10056b40a6198SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10057b40a6198Smrg [Environment variables to enable memory checking in tests]) 10058b40a6198Smrg 10059b40a6198Smrg# Check for different types of support on different platforms 10060b40a6198Smrgcase $host_os in 10061b40a6198Smrg solaris*) 10062b40a6198Smrg AC_CHECK_LIB([umem], [umem_alloc], 10063b40a6198Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10064b40a6198Smrg ;; 10065b40a6198Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10066b40a6198Smrg # both directly and inverted, so should not be 0 or 255. 10067b40a6198Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10068b40a6198Smrg ;; 10069b40a6198Smrg darwin*) 10070b40a6198Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10071b40a6198Smrg ;; 10072b40a6198Smrg *bsd*) 10073b40a6198Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10074b40a6198Smrg ;; 10075b40a6198Smrgesac 10076b40a6198Smrg 10077b40a6198Smrg# User supplied flags override default flags 10078b40a6198Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10079b40a6198Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10080b40a6198Smrgfi 10081b40a6198Smrg 10082b40a6198SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10083b40a6198Smrg]) # XORG_WITH_LINT 10084b40a6198Smrg 1008545bc899bSmrg# XORG_CHECK_MALLOC_ZERO 1008645bc899bSmrg# ---------------------- 1008745bc899bSmrg# Minimum version: 1.0.0 1008845bc899bSmrg# 1008945bc899bSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1009045bc899bSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 1009145bc899bSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1009245bc899bSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1009345bc899bSmrgAC_ARG_ENABLE(malloc0returnsnull, 100945592a31fSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 1009545bc899bSmrg [malloc(0) returns NULL (default: auto)]), 1009645bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1009745bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1009845bc899bSmrg 1009945bc899bSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1010045bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10101b40a6198Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10102b40a6198Smrg#include <stdlib.h> 10103b40a6198Smrg],[ 1010445bc899bSmrg char *m0, *r0, *c0, *p; 1010545bc899bSmrg m0 = malloc(0); 1010645bc899bSmrg p = malloc(10); 1010745bc899bSmrg r0 = realloc(p,0); 10108b40a6198Smrg c0 = calloc(0,10); 10109b40a6198Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10110b40a6198Smrg])], 1011145bc899bSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 10112b40a6198Smrg [MALLOC_ZERO_RETURNS_NULL=no], 10113b40a6198Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 1011445bc899bSmrgfi 1011545bc899bSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1011645bc899bSmrg 1011745bc899bSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1011845bc899bSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1011945bc899bSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1012045bc899bSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1012145bc899bSmrgelse 1012245bc899bSmrg MALLOC_ZERO_CFLAGS="" 1012345bc899bSmrg XMALLOC_ZERO_CFLAGS="" 1012445bc899bSmrg XTMALLOC_ZERO_CFLAGS="" 1012545bc899bSmrgfi 1012645bc899bSmrg 1012745bc899bSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1012845bc899bSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1012945bc899bSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1013045bc899bSmrg]) # XORG_CHECK_MALLOC_ZERO 1013145bc899bSmrg 1013245bc899bSmrg# XORG_WITH_LINT() 1013345bc899bSmrg# ---------------- 1013445bc899bSmrg# Minimum version: 1.1.0 1013545bc899bSmrg# 10136b40a6198Smrg# This macro enables the use of a tool that flags some suspicious and 10137b40a6198Smrg# non-portable constructs (likely to be bugs) in C language source code. 10138b40a6198Smrg# It will attempt to locate the tool and use appropriate options. 10139b40a6198Smrg# There are various lint type tools on different platforms. 10140b40a6198Smrg# 10141b40a6198Smrg# Interface to module: 10142b40a6198Smrg# LINT: returns the path to the tool found on the platform 10143b40a6198Smrg# or the value set to LINT on the configure cmd line 10144b40a6198Smrg# also an Automake conditional 10145b40a6198Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10146b40a6198Smrg# 10147b40a6198Smrg# --with-lint: 'yes' user instructs the module to use lint 10148b40a6198Smrg# 'no' user instructs the module not to use lint (default) 10149b40a6198Smrg# 10150b40a6198Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10151b40a6198Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1015245bc899bSmrg# 1015345bc899bSmrgAC_DEFUN([XORG_WITH_LINT],[ 1015445bc899bSmrg 10155b40a6198SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10156b40a6198SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 101575592a31fSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1015845bc899bSmrg [Use a lint-style source code checker (default: disabled)])], 1015945bc899bSmrg [use_lint=$withval], [use_lint=no]) 10160b40a6198Smrg 10161b40a6198Smrg# Obtain platform specific info like program name and options 10162b40a6198Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10163b40a6198Smrgcase $host_os in 10164b40a6198Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10165b40a6198Smrg lint_name=splint 10166b40a6198Smrg lint_options="-badflag" 10167b40a6198Smrg ;; 10168b40a6198Smrg *freebsd* | *netbsd*) 10169b40a6198Smrg lint_name=lint 10170b40a6198Smrg lint_options="-u -b" 10171b40a6198Smrg ;; 10172b40a6198Smrg *solaris*) 10173b40a6198Smrg lint_name=lint 10174b40a6198Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10175b40a6198Smrg ;; 10176b40a6198Smrgesac 10177b40a6198Smrg 10178b40a6198Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10179b40a6198Smrgif test "x$use_lint" = x"yes" ; then 10180b40a6198Smrg AC_PATH_PROG([LINT], [$lint_name]) 10181b40a6198Smrg if test "x$LINT" = "x"; then 10182b40a6198Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10183b40a6198Smrg fi 10184b40a6198Smrgelif test "x$use_lint" = x"no" ; then 10185b40a6198Smrg if test "x$LINT" != "x"; then 10186b40a6198Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10187b40a6198Smrg fi 1018845bc899bSmrgelse 10189b40a6198Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1019045bc899bSmrgfi 10191b40a6198Smrg 10192b40a6198Smrg# User supplied flags override default flags 10193b40a6198Smrgif test "x$LINT_FLAGS" != "x"; then 10194b40a6198Smrg lint_options=$LINT_FLAGS 1019545bc899bSmrgfi 1019645bc899bSmrg 10197b40a6198SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10198b40a6198SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1019945bc899bSmrg 1020045bc899bSmrg]) # XORG_WITH_LINT 1020145bc899bSmrg 1020245bc899bSmrg# XORG_LINT_LIBRARY(LIBNAME) 1020345bc899bSmrg# -------------------------- 1020445bc899bSmrg# Minimum version: 1.1.0 1020545bc899bSmrg# 1020645bc899bSmrg# Sets up flags for building lint libraries for checking programs that call 1020745bc899bSmrg# functions in the library. 1020845bc899bSmrg# 10209b40a6198Smrg# Interface to module: 10210b40a6198Smrg# LINTLIB - Automake variable with the name of lint library file to make 10211b40a6198Smrg# MAKE_LINT_LIB - Automake conditional 10212b40a6198Smrg# 10213b40a6198Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10214b40a6198Smrg# - 'no' user instructs the module not to create a lint library (default) 1021545bc899bSmrg 1021645bc899bSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1021745bc899bSmrgAC_REQUIRE([XORG_WITH_LINT]) 102185592a31fSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1021945bc899bSmrg [Create lint library (default: disabled)])], 1022045bc899bSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10221b40a6198Smrg 10222b40a6198Smrgif test "x$make_lint_lib" = x"yes" ; then 10223b40a6198Smrg LINTLIB=llib-l$1.ln 10224b40a6198Smrg if test "x$LINT" = "x"; then 10225b40a6198Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10226b40a6198Smrg fi 10227b40a6198Smrgelif test "x$make_lint_lib" != x"no" ; then 10228b40a6198Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1022945bc899bSmrgfi 10230b40a6198Smrg 1023145bc899bSmrgAC_SUBST(LINTLIB) 1023245bc899bSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1023345bc899bSmrg 1023445bc899bSmrg]) # XORG_LINT_LIBRARY 1023545bc899bSmrg 10236b40a6198Smrg# XORG_COMPILER_BRAND 10237b40a6198Smrg# ------------------- 10238b40a6198Smrg# Minimum version: 1.14.0 10239b40a6198Smrg# 10240b40a6198Smrg# Checks for various brands of compilers and sets flags as appropriate: 10241b40a6198Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10242b40a6198Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10243b40a6198Smrg# clang compiler - sets CLANGCC to "yes" 10244b40a6198Smrg# Intel compiler - sets INTELCC to "yes" 10245b40a6198Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10246b40a6198Smrg# 10247b40a6198SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10248b40a6198SmrgAC_LANG_CASE( 10249b40a6198Smrg [C], [ 10250b40a6198Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10251b40a6198Smrg ], 10252b40a6198Smrg [C++], [ 10253b40a6198Smrg AC_REQUIRE([AC_PROG_CXX]) 10254b40a6198Smrg ] 10255b40a6198Smrg) 10256b40a6198SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10257b40a6198SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10258b40a6198SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10259b40a6198Smrg]) # XORG_COMPILER_BRAND 10260b40a6198Smrg 10261b40a6198Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10262b40a6198Smrg# --------------- 10263b40a6198Smrg# Minimum version: 1.16.0 10264b40a6198Smrg# 10265b40a6198Smrg# Test if the compiler works when passed the given flag as a command line argument. 10266b40a6198Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10267b40a6198Smrg# next flag in the list until there are no more options. 10268b40a6198Smrg# 10269b40a6198Smrg# Note that this does not guarantee that the compiler supports the flag as some 10270b40a6198Smrg# compilers will simply ignore arguments that they do not understand, but we do 10271b40a6198Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10272b40a6198Smrg# -Werror=unused-command-line-argument 10273b40a6198Smrg# 10274b40a6198SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10275b40a6198Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10276b40a6198Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10277b40a6198Smrg 10278b40a6198SmrgAC_LANG_COMPILER_REQUIRE 10279b40a6198Smrg 10280b40a6198SmrgAC_LANG_CASE( 10281b40a6198Smrg [C], [ 10282b40a6198Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10283b40a6198Smrg define([PREFIX], [C]) 10284b40a6198Smrg define([CACHE_PREFIX], [cc]) 10285b40a6198Smrg define([COMPILER], [$CC]) 10286b40a6198Smrg ], 10287b40a6198Smrg [C++], [ 10288b40a6198Smrg define([PREFIX], [CXX]) 10289b40a6198Smrg define([CACHE_PREFIX], [cxx]) 10290b40a6198Smrg define([COMPILER], [$CXX]) 10291b40a6198Smrg ] 10292b40a6198Smrg) 10293b40a6198Smrg 10294b40a6198Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10295b40a6198Smrg 10296b40a6198Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10297b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10298b40a6198Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10299b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10300b40a6198Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10301b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10302b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10303b40a6198Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10304b40a6198Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10305b40a6198Smrgfi 10306b40a6198Smrg 10307b40a6198Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10308b40a6198Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10309b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10310b40a6198Smrg fi 10311b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10312b40a6198Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10313b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10314b40a6198Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10315b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10316b40a6198Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10317b40a6198Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10318b40a6198Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10319b40a6198Smrgfi 10320b40a6198Smrg 10321b40a6198Smrgfound="no" 10322b40a6198Smrgm4_foreach([flag], m4_cdr($@), [ 10323b40a6198Smrg if test $found = "no" ; then 10324c97b1c41Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10325b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10326b40a6198Smrg fi 10327b40a6198Smrg 10328c97b1c41Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10329b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10330b40a6198Smrg fi 10331b40a6198Smrg 10332b40a6198Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10333b40a6198Smrg 10334b40a6198Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10335c97b1c41Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10336b40a6198Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10337b40a6198Smrg AC_CACHE_VAL($cacheid, 10338b40a6198Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10339b40a6198Smrg [eval $cacheid=yes], 10340b40a6198Smrg [eval $cacheid=no])]) 10341b40a6198Smrg 10342b40a6198Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10343b40a6198Smrg 10344b40a6198Smrg eval supported=\$$cacheid 10345b40a6198Smrg AC_MSG_RESULT([$supported]) 10346b40a6198Smrg if test "$supported" = "yes" ; then 10347b40a6198Smrg $1="$$1 ]flag[" 10348b40a6198Smrg found="yes" 10349b40a6198Smrg fi 10350b40a6198Smrg fi 10351b40a6198Smrg]) 10352b40a6198Smrg]) # XORG_TESTSET_CFLAG 10353b40a6198Smrg 10354b40a6198Smrg# XORG_COMPILER_FLAGS 10355b40a6198Smrg# --------------- 10356b40a6198Smrg# Minimum version: 1.16.0 10357b40a6198Smrg# 10358b40a6198Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10359b40a6198Smrg# arguments supported by the selected compiler which do NOT alter the generated 10360b40a6198Smrg# code. These arguments will cause the compiler to print various warnings 10361b40a6198Smrg# during compilation AND turn a conservative set of warnings into errors. 10362b40a6198Smrg# 10363b40a6198Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10364b40a6198Smrg# future versions of util-macros as options are added to new compilers. 10365b40a6198Smrg# 10366b40a6198SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10367b40a6198SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10368b40a6198Smrg 10369b40a6198SmrgAC_ARG_ENABLE(selective-werror, 10370b40a6198Smrg AS_HELP_STRING([--disable-selective-werror], 10371b40a6198Smrg [Turn off selective compiler errors. (default: enabled)]), 10372b40a6198Smrg [SELECTIVE_WERROR=$enableval], 10373b40a6198Smrg [SELECTIVE_WERROR=yes]) 10374b40a6198Smrg 10375b40a6198SmrgAC_LANG_CASE( 10376b40a6198Smrg [C], [ 10377b40a6198Smrg define([PREFIX], [C]) 10378b40a6198Smrg ], 10379b40a6198Smrg [C++], [ 10380b40a6198Smrg define([PREFIX], [CXX]) 10381b40a6198Smrg ] 10382b40a6198Smrg) 10383b40a6198Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10384b40a6198Smrgif test "x$SUNCC" = "xyes"; then 10385b40a6198Smrg [BASE_]PREFIX[FLAGS]="-v" 10386b40a6198Smrgelse 10387b40a6198Smrg [BASE_]PREFIX[FLAGS]="" 10388b40a6198Smrgfi 10389b40a6198Smrg 10390b40a6198Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10391b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10392b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10393b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10394b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10395b40a6198Smrg 10396b40a6198SmrgAC_LANG_CASE( 10397b40a6198Smrg [C], [ 10398b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10399b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10400b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10401b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10402b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 10403b40a6198Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10404b40a6198Smrg ] 10405b40a6198Smrg) 10406b40a6198Smrg 10407b40a6198Smrg# This chunk adds additional warnings that could catch undesired effects. 10408b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10409b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10410b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10411b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10412b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10413b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10414b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10415b40a6198Smrg 10416b40a6198Smrg# These are currently disabled because they are noisy. They will be enabled 10417b40a6198Smrg# in the future once the codebase is sufficiently modernized to silence 10418b40a6198Smrg# them. For now, I don't want them to drown out the other warnings. 10419b40a6198Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10420b40a6198Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10421b40a6198Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10422b40a6198Smrg 10423b40a6198Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10424b40a6198Smrg# when there are problems that should be fixed. 10425b40a6198Smrg 10426b40a6198Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10427b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10428b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10429b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10430b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10431b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10432b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10433b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10434b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10435b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10436b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10437b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10438b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10439b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10440b40a6198Smrgelse 10441b40a6198SmrgAC_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]) 10442b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10443b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10444b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10445b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10446b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10447b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10448b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10449b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10450b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10451b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10452b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10453b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10454b40a6198SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10455b40a6198Smrgfi 10456b40a6198Smrg 10457b40a6198SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10458b40a6198Smrg]) # XORG_COMPILER_FLAGS 10459b40a6198Smrg 1046050f2e948Smrg# XORG_CWARNFLAGS 1046150f2e948Smrg# --------------- 1046250f2e948Smrg# Minimum version: 1.2.0 10463b40a6198Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1046450f2e948Smrg# 1046550f2e948Smrg# Defines CWARNFLAGS to enable C compiler warnings. 1046650f2e948Smrg# 10467b40a6198Smrg# This function is deprecated because it defines -fno-strict-aliasing 10468b40a6198Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10469b40a6198Smrg# is needed, then it should be added explicitly in the module when 10470b40a6198Smrg# it is updated to use BASE_CFLAGS. 10471b40a6198Smrg# 1047250f2e948SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10473b40a6198SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10474b40a6198SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10475b40a6198SmrgAC_LANG_CASE( 10476b40a6198Smrg [C], [ 10477b40a6198Smrg CWARNFLAGS="$BASE_CFLAGS" 10478b40a6198Smrg if test "x$GCC" = xyes ; then 10479b40a6198Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10480b40a6198Smrg fi 10481b40a6198Smrg AC_SUBST(CWARNFLAGS) 10482b40a6198Smrg ] 10483b40a6198Smrg) 1048450f2e948Smrg]) # XORG_CWARNFLAGS 104855592a31fSmrg 104865592a31fSmrg# XORG_STRICT_OPTION 104875592a31fSmrg# ----------------------- 104885592a31fSmrg# Minimum version: 1.3.0 104895592a31fSmrg# 10490b40a6198Smrg# Add configure option to enable strict compilation flags, such as treating 10491b40a6198Smrg# warnings as fatal errors. 10492b40a6198Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10493b40a6198Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10494b40a6198Smrg# 10495b40a6198Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10496b40a6198Smrg# when strict compilation is unconditionally desired. 104975592a31fSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 104985592a31fSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10499b40a6198SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 105005592a31fSmrg 105015592a31fSmrgAC_ARG_ENABLE(strict-compilation, 105025592a31fSmrg AS_HELP_STRING([--enable-strict-compilation], 105035592a31fSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 105045592a31fSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10505b40a6198Smrg 10506b40a6198SmrgAC_LANG_CASE( 10507b40a6198Smrg [C], [ 10508b40a6198Smrg define([PREFIX], [C]) 10509b40a6198Smrg ], 10510b40a6198Smrg [C++], [ 10511b40a6198Smrg define([PREFIX], [CXX]) 10512b40a6198Smrg ] 10513b40a6198Smrg) 10514b40a6198Smrg 10515b40a6198Smrg[STRICT_]PREFIX[FLAGS]="" 10516b40a6198SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10517b40a6198SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10518b40a6198Smrg 10519b40a6198Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10520b40a6198Smrg# activate it with -Werror, so we add it here explicitly. 10521b40a6198SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10522b40a6198Smrg 105235592a31fSmrgif test "x$STRICT_COMPILE" = "xyes"; then 10524b40a6198Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10525b40a6198Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 105265592a31fSmrgfi 10527b40a6198SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10528b40a6198SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10529b40a6198SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 105305592a31fSmrg]) # XORG_STRICT_OPTION 105315592a31fSmrg 105325592a31fSmrg# XORG_DEFAULT_OPTIONS 105335592a31fSmrg# -------------------- 105345592a31fSmrg# Minimum version: 1.3.0 105355592a31fSmrg# 105365592a31fSmrg# Defines default options for X.Org modules. 105375592a31fSmrg# 105385592a31fSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 10539b40a6198SmrgAC_REQUIRE([AC_PROG_INSTALL]) 10540b40a6198SmrgXORG_COMPILER_FLAGS 105415592a31fSmrgXORG_CWARNFLAGS 105425592a31fSmrgXORG_STRICT_OPTION 105435592a31fSmrgXORG_RELEASE_VERSION 105445592a31fSmrgXORG_CHANGELOG 105455592a31fSmrgXORG_INSTALL 105465592a31fSmrgXORG_MANPAGE_SECTIONS 10547b40a6198Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 10548b40a6198Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 105495592a31fSmrg]) # XORG_DEFAULT_OPTIONS 105505592a31fSmrg 105515592a31fSmrg# XORG_INSTALL() 105525592a31fSmrg# ---------------- 105535592a31fSmrg# Minimum version: 1.4.0 105545592a31fSmrg# 105555592a31fSmrg# Defines the variable INSTALL_CMD as the command to copy 10556b40a6198Smrg# INSTALL from $prefix/share/util-macros. 105575592a31fSmrg# 105585592a31fSmrgAC_DEFUN([XORG_INSTALL], [ 105595592a31fSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10560b40a6198Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 10561b40a6198SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 105625592a31fSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 105635592a31fSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 10564b40a6198Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 105655592a31fSmrgAC_SUBST([INSTALL_CMD]) 105665592a31fSmrg]) # XORG_INSTALL 1056750f2e948Smrgdnl Copyright 2005 Red Hat, Inc 1056850f2e948Smrgdnl 1056950f2e948Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1057050f2e948Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1057150f2e948Smrgdnl the above copyright notice appear in all copies and that both that 1057250f2e948Smrgdnl copyright notice and this permission notice appear in supporting 1057350f2e948Smrgdnl documentation. 1057450f2e948Smrgdnl 1057550f2e948Smrgdnl The above copyright notice and this permission notice shall be included 1057650f2e948Smrgdnl in all copies or substantial portions of the Software. 1057750f2e948Smrgdnl 1057850f2e948Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1057950f2e948Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1058050f2e948Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1058150f2e948Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1058250f2e948Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1058350f2e948Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1058450f2e948Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1058550f2e948Smrgdnl 1058650f2e948Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1058750f2e948Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1058850f2e948Smrgdnl other dealings in this Software without prior written authorization 1058950f2e948Smrgdnl from the copyright holders. 1059050f2e948Smrgdnl 1059150f2e948Smrg 1059250f2e948Smrg# XORG_RELEASE_VERSION 1059350f2e948Smrg# -------------------- 10594b40a6198Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 10595c97b1c41Smrg 1059650f2e948SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1059750f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1059850f2e948Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1059950f2e948Smrg [Major version of this package]) 1060050f2e948Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1060150f2e948Smrg if test "x$PVM" = "x"; then 1060250f2e948Smrg PVM="0" 1060350f2e948Smrg fi 1060450f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1060550f2e948Smrg [$PVM], 1060650f2e948Smrg [Minor version of this package]) 1060750f2e948Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1060850f2e948Smrg if test "x$PVP" = "x"; then 1060950f2e948Smrg PVP="0" 1061050f2e948Smrg fi 1061150f2e948Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1061250f2e948Smrg [$PVP], 1061350f2e948Smrg [Patch version of this package]) 1061450f2e948Smrg]) 1061550f2e948Smrg 1061650f2e948Smrg# XORG_CHANGELOG() 1061750f2e948Smrg# ---------------- 1061850f2e948Smrg# Minimum version: 1.2.0 1061950f2e948Smrg# 1062050f2e948Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1062150f2e948Smrg# ChangeLog from git. 1062250f2e948Smrg# 1062350f2e948Smrg# 1062450f2e948SmrgAC_DEFUN([XORG_CHANGELOG], [ 106255592a31fSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 106265592a31fSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 106275592a31fSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1062850f2e948Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1062950f2e948SmrgAC_SUBST([CHANGELOG_CMD]) 1063050f2e948Smrg]) # XORG_CHANGELOG 1063150f2e948Smrg 106325592a31fSmrgdnl Copyright 2005 Red Hat, Inc 106335592a31fSmrgdnl 106345592a31fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 106355592a31fSmrgdnl documentation for any purpose is hereby granted without fee, provided that 106365592a31fSmrgdnl the above copyright notice appear in all copies and that both that 106375592a31fSmrgdnl copyright notice and this permission notice appear in supporting 106385592a31fSmrgdnl documentation. 106395592a31fSmrgdnl 106405592a31fSmrgdnl The above copyright notice and this permission notice shall be included 106415592a31fSmrgdnl in all copies or substantial portions of the Software. 106425592a31fSmrgdnl 106435592a31fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 106445592a31fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 106455592a31fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 106465592a31fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 106475592a31fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 106485592a31fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 106495592a31fSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 106505592a31fSmrgdnl 106515592a31fSmrgdnl Except as contained in this notice, the name of the copyright holders shall 106525592a31fSmrgdnl not be used in advertising or otherwise to promote the sale, use or 106535592a31fSmrgdnl other dealings in this Software without prior written authorization 106545592a31fSmrgdnl from the copyright holders. 106555592a31fSmrgdnl 106565592a31fSmrg 10657c97b1c41Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 106585592a31fSmrg# -------------------------- 10659c97b1c41Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 10660c97b1c41Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 106615592a31fSmrg 106625592a31fSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 10663b40a6198Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 106645592a31fSmrg SAVE_CFLAGS="$CFLAGS" 10665b40a6198Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 106665592a31fSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 106675592a31fSmrg#include "xorg-server.h" 106685592a31fSmrg#if !defined $1 106695592a31fSmrg#error $1 not defined 106705592a31fSmrg#endif 106715592a31fSmrg ]])], 106725592a31fSmrg [_EXT_CHECK=yes], 106735592a31fSmrg [_EXT_CHECK=no]) 106745592a31fSmrg CFLAGS="$SAVE_CFLAGS" 106755592a31fSmrg AC_MSG_CHECKING([if $1 is defined]) 106765592a31fSmrg AC_MSG_RESULT([$_EXT_CHECK]) 106775592a31fSmrg if test "$_EXT_CHECK" != no; then 106785592a31fSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 106795592a31fSmrg fi 106805592a31fSmrg]) 106815592a31fSmrg 10682c97b1c41Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc. 1068345bc899bSmrg# 1068445bc899bSmrg# This file is free software; the Free Software Foundation 1068545bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1068645bc899bSmrg# with or without modifications, as long as this notice is preserved. 1068745bc899bSmrg 1068845bc899bSmrg# AM_AUTOMAKE_VERSION(VERSION) 1068945bc899bSmrg# ---------------------------- 1069045bc899bSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1069145bc899bSmrg# generated from the m4 files accompanying Automake X.Y. 1069250f2e948Smrg# (This private macro should not be called outside this file.) 1069350f2e948SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 10694c97b1c41Smrg[am__api_version='1.13' 1069550f2e948Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1069650f2e948Smrgdnl require some minimum version. Point them to the right macro. 10697c97b1c41Smrgm4_if([$1], [1.13.3], [], 1069850f2e948Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1069950f2e948Smrg]) 1070050f2e948Smrg 1070150f2e948Smrg# _AM_AUTOCONF_VERSION(VERSION) 1070250f2e948Smrg# ----------------------------- 1070350f2e948Smrg# aclocal traces this macro to find the Autoconf version. 1070450f2e948Smrg# This is a private macro too. Using m4_define simplifies 1070550f2e948Smrg# the logic in aclocal, which can simply ignore this definition. 1070650f2e948Smrgm4_define([_AM_AUTOCONF_VERSION], []) 1070745bc899bSmrg 1070845bc899bSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1070945bc899bSmrg# ------------------------------- 1071050f2e948Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1071150f2e948Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1071245bc899bSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10713c97b1c41Smrg[AM_AUTOMAKE_VERSION([1.13.3])dnl 1071450f2e948Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1071550f2e948Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1071650f2e948Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1071745bc899bSmrg 1071845bc899bSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1071945bc899bSmrg 10720c97b1c41Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1072145bc899bSmrg# 1072245bc899bSmrg# This file is free software; the Free Software Foundation 1072345bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1072445bc899bSmrg# with or without modifications, as long as this notice is preserved. 1072545bc899bSmrg 1072645bc899bSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 10727c97b1c41Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 10728c97b1c41Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 1072945bc899bSmrg# 1073045bc899bSmrg# Of course, Automake must honor this variable whenever it calls a 1073145bc899bSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 1073245bc899bSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 1073345bc899bSmrg# depending on how configure is run. This is pretty annoying, since 1073445bc899bSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1073545bc899bSmrg# source directory, any form will work fine, but in subdirectories a 1073645bc899bSmrg# relative path needs to be adjusted first. 1073745bc899bSmrg# 1073845bc899bSmrg# $ac_aux_dir/missing 1073945bc899bSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 1074045bc899bSmrg# $top_srcdir/$ac_aux_dir/missing 1074145bc899bSmrg# fails if $ac_aux_dir is absolute, 1074245bc899bSmrg# fails when called from a subdirectory in a VPATH build with 1074345bc899bSmrg# a relative $ac_aux_dir 1074445bc899bSmrg# 1074545bc899bSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1074645bc899bSmrg# are both prefixed by $srcdir. In an in-source build this is usually 10747c97b1c41Smrg# harmless because $srcdir is '.', but things will broke when you 1074845bc899bSmrg# start a VPATH build or use an absolute $srcdir. 1074945bc899bSmrg# 1075045bc899bSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1075145bc899bSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1075245bc899bSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1075345bc899bSmrg# and then we would define $MISSING as 1075445bc899bSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 1075545bc899bSmrg# This will work as long as MISSING is not called from configure, because 1075645bc899bSmrg# unfortunately $(top_srcdir) has no meaning in configure. 1075745bc899bSmrg# However there are other variables, like CC, which are often used in 1075845bc899bSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1075945bc899bSmrg# 1076045bc899bSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 1076145bc899bSmrg# absolute PATH. The drawback is that using absolute paths prevent a 1076245bc899bSmrg# configured tree to be moved without reconfiguration. 1076345bc899bSmrg 1076445bc899bSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1076545bc899bSmrg[dnl Rely on autoconf to set up CDPATH properly. 1076645bc899bSmrgAC_PREREQ([2.50])dnl 1076745bc899bSmrg# expand $ac_aux_dir to an absolute path 1076845bc899bSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 1076945bc899bSmrg]) 1077045bc899bSmrg 1077145bc899bSmrg# AM_CONDITIONAL -*- Autoconf -*- 1077245bc899bSmrg 10773c97b1c41Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 1077445bc899bSmrg# 1077545bc899bSmrg# This file is free software; the Free Software Foundation 1077645bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1077745bc899bSmrg# with or without modifications, as long as this notice is preserved. 1077845bc899bSmrg 1077945bc899bSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1078045bc899bSmrg# ------------------------------------- 1078145bc899bSmrg# Define a conditional. 1078245bc899bSmrgAC_DEFUN([AM_CONDITIONAL], 10783c97b1c41Smrg[AC_PREREQ([2.52])dnl 10784c97b1c41Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 10785c97b1c41Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1078650f2e948SmrgAC_SUBST([$1_TRUE])dnl 1078750f2e948SmrgAC_SUBST([$1_FALSE])dnl 1078850f2e948Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1078950f2e948Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 107903a925b30Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1079145bc899bSmrgif $2; then 1079245bc899bSmrg $1_TRUE= 1079345bc899bSmrg $1_FALSE='#' 1079445bc899bSmrgelse 1079545bc899bSmrg $1_TRUE='#' 1079645bc899bSmrg $1_FALSE= 1079745bc899bSmrgfi 1079845bc899bSmrgAC_CONFIG_COMMANDS_PRE( 1079945bc899bSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1080045bc899bSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 1080145bc899bSmrgUsually this means the macro was only invoked conditionally.]]) 1080245bc899bSmrgfi])]) 1080345bc899bSmrg 10804c97b1c41Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 1080545bc899bSmrg# 1080645bc899bSmrg# This file is free software; the Free Software Foundation 1080745bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1080845bc899bSmrg# with or without modifications, as long as this notice is preserved. 1080945bc899bSmrg 1081045bc899bSmrg 10811c97b1c41Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1081245bc899bSmrg# written in clear, in which case automake, when reading aclocal.m4, 1081345bc899bSmrg# will think it sees a *use*, and therefore will trigger all it's 1081445bc899bSmrg# C support machinery. Also note that it means that autoscan, seeing 1081545bc899bSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1081645bc899bSmrg 1081745bc899bSmrg 1081845bc899bSmrg# _AM_DEPENDENCIES(NAME) 1081945bc899bSmrg# ---------------------- 1082045bc899bSmrg# See how the compiler implements dependency checking. 10821c97b1c41Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1082245bc899bSmrg# We try a few techniques and use that to set a single cache variable. 1082345bc899bSmrg# 1082445bc899bSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1082545bc899bSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1082645bc899bSmrg# dependency, and given that the user is not expected to run this macro, 1082745bc899bSmrg# just rely on AC_PROG_CC. 1082845bc899bSmrgAC_DEFUN([_AM_DEPENDENCIES], 1082945bc899bSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1083045bc899bSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1083145bc899bSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1083245bc899bSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1083345bc899bSmrg 10834c97b1c41Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 10835c97b1c41Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 10836c97b1c41Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 10837c97b1c41Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 10838c97b1c41Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 10839c97b1c41Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 10840c97b1c41Smrg [depcc="$$1" am_compiler_list=]) 1084145bc899bSmrg 1084245bc899bSmrgAC_CACHE_CHECK([dependency style of $depcc], 1084345bc899bSmrg [am_cv_$1_dependencies_compiler_type], 1084445bc899bSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1084545bc899bSmrg # We make a subdir and do the tests there. Otherwise we can end up 1084645bc899bSmrg # making bogus files that we don't know about and never remove. For 1084745bc899bSmrg # instance it was reported that on HP-UX the gcc test will end up 10848c97b1c41Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 10849c97b1c41Smrg # in D". 10850b40a6198Smrg rm -rf conftest.dir 1085145bc899bSmrg mkdir conftest.dir 1085245bc899bSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 1085345bc899bSmrg # using a relative directory. 1085445bc899bSmrg cp "$am_depcomp" conftest.dir 1085545bc899bSmrg cd conftest.dir 1085645bc899bSmrg # We will build objects and dependencies in a subdirectory because 1085745bc899bSmrg # it helps to detect inapplicable dependency modes. For instance 1085845bc899bSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 1085945bc899bSmrg # side effect of compilation, but ICC will put the dependencies in 1086045bc899bSmrg # the current directory while Tru64 will put them in the object 1086145bc899bSmrg # directory. 1086245bc899bSmrg mkdir sub 1086345bc899bSmrg 1086445bc899bSmrg am_cv_$1_dependencies_compiler_type=none 1086545bc899bSmrg if test "$am_compiler_list" = ""; then 1086645bc899bSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1086745bc899bSmrg fi 108683a925b30Smrg am__universal=false 108693a925b30Smrg m4_case([$1], [CC], 108703a925b30Smrg [case " $depcc " in #( 108713a925b30Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 108723a925b30Smrg esac], 108733a925b30Smrg [CXX], 108743a925b30Smrg [case " $depcc " in #( 108753a925b30Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 108763a925b30Smrg esac]) 108773a925b30Smrg 1087845bc899bSmrg for depmode in $am_compiler_list; do 1087945bc899bSmrg # Setup a source with many dependencies, because some compilers 1088045bc899bSmrg # like to wrap large dependency lists on column 80 (with \), and 1088145bc899bSmrg # we should not choose a depcomp mode which is confused by this. 1088245bc899bSmrg # 1088345bc899bSmrg # We need to recreate these files for each test, as the compiler may 1088445bc899bSmrg # overwrite some of them when testing with obscure command lines. 1088545bc899bSmrg # This happens at least with the AIX C compiler. 1088645bc899bSmrg : > sub/conftest.c 1088745bc899bSmrg for i in 1 2 3 4 5 6; do 1088845bc899bSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 10889c97b1c41Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 10890c97b1c41Smrg # Solaris 10 /bin/sh. 10891c97b1c41Smrg echo '/* dummy */' > sub/conftst$i.h 1089245bc899bSmrg done 1089345bc899bSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1089445bc899bSmrg 10895c97b1c41Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 108963a925b30Smrg # mode. It turns out that the SunPro C++ compiler does not properly 10897c97b1c41Smrg # handle '-M -o', and we need to detect this. Also, some Intel 10898c97b1c41Smrg # versions had trouble with output in subdirs. 108993a925b30Smrg am__obj=sub/conftest.${OBJEXT-o} 109003a925b30Smrg am__minus_obj="-o $am__obj" 1090145bc899bSmrg case $depmode in 109023a925b30Smrg gcc) 109033a925b30Smrg # This depmode causes a compiler race in universal mode. 109043a925b30Smrg test "$am__universal" = false || continue 109053a925b30Smrg ;; 1090645bc899bSmrg nosideeffect) 10907c97b1c41Smrg # After this tag, mechanisms are not by side-effect, so they'll 10908c97b1c41Smrg # only be used when explicitly requested. 1090945bc899bSmrg if test "x$enable_dependency_tracking" = xyes; then 1091045bc899bSmrg continue 1091145bc899bSmrg else 1091245bc899bSmrg break 1091345bc899bSmrg fi 1091445bc899bSmrg ;; 10915b40a6198Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 10916c97b1c41Smrg # This compiler won't grok '-c -o', but also, the minuso test has 109173a925b30Smrg # not run yet. These depmodes are late enough in the game, and 109183a925b30Smrg # so weak that their functioning should not be impacted. 109193a925b30Smrg am__obj=conftest.${OBJEXT-o} 109203a925b30Smrg am__minus_obj= 109213a925b30Smrg ;; 1092245bc899bSmrg none) break ;; 1092345bc899bSmrg esac 1092445bc899bSmrg if depmode=$depmode \ 109253a925b30Smrg source=sub/conftest.c object=$am__obj \ 1092645bc899bSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 109273a925b30Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1092845bc899bSmrg >/dev/null 2>conftest.err && 1092950f2e948Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1093045bc899bSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 109313a925b30Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1093245bc899bSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1093345bc899bSmrg # icc doesn't choke on unknown options, it will just issue warnings 1093445bc899bSmrg # or remarks (even with -Werror). So we grep stderr for any message 1093545bc899bSmrg # that says an option was ignored or not supported. 1093645bc899bSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 1093745bc899bSmrg # icc: Command line warning: ignoring option '-M'; no argument required 1093845bc899bSmrg # The diagnosis changed in icc 8.0: 1093945bc899bSmrg # icc: Command line remark: option '-MP' not supported 1094045bc899bSmrg if (grep 'ignoring option' conftest.err || 1094145bc899bSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1094245bc899bSmrg am_cv_$1_dependencies_compiler_type=$depmode 1094345bc899bSmrg break 1094445bc899bSmrg fi 1094545bc899bSmrg fi 1094645bc899bSmrg done 1094745bc899bSmrg 1094845bc899bSmrg cd .. 1094945bc899bSmrg rm -rf conftest.dir 1095045bc899bSmrgelse 1095145bc899bSmrg am_cv_$1_dependencies_compiler_type=none 1095245bc899bSmrgfi 1095345bc899bSmrg]) 1095445bc899bSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1095545bc899bSmrgAM_CONDITIONAL([am__fastdep$1], [ 1095645bc899bSmrg test "x$enable_dependency_tracking" != xno \ 1095745bc899bSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1095845bc899bSmrg]) 1095945bc899bSmrg 1096045bc899bSmrg 1096145bc899bSmrg# AM_SET_DEPDIR 1096245bc899bSmrg# ------------- 1096345bc899bSmrg# Choose a directory name for dependency files. 10964c97b1c41Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 1096545bc899bSmrgAC_DEFUN([AM_SET_DEPDIR], 1096645bc899bSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1096745bc899bSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1096845bc899bSmrg]) 1096945bc899bSmrg 1097045bc899bSmrg 1097145bc899bSmrg# AM_DEP_TRACK 1097245bc899bSmrg# ------------ 1097345bc899bSmrgAC_DEFUN([AM_DEP_TRACK], 10974c97b1c41Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 10975c97b1c41SmrgAS_HELP_STRING( 10976c97b1c41Smrg [--enable-dependency-tracking], 10977c97b1c41Smrg [do not reject slow dependency extractors]) 10978c97b1c41SmrgAS_HELP_STRING( 10979c97b1c41Smrg [--disable-dependency-tracking], 10980c97b1c41Smrg [speeds up one-time build])]) 1098145bc899bSmrgif test "x$enable_dependency_tracking" != xno; then 1098245bc899bSmrg am_depcomp="$ac_aux_dir/depcomp" 1098345bc899bSmrg AMDEPBACKSLASH='\' 10984b40a6198Smrg am__nodep='_no' 1098545bc899bSmrgfi 1098645bc899bSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1098750f2e948SmrgAC_SUBST([AMDEPBACKSLASH])dnl 1098850f2e948Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 10989b40a6198SmrgAC_SUBST([am__nodep])dnl 10990b40a6198Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 1099145bc899bSmrg]) 1099245bc899bSmrg 1099345bc899bSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1099445bc899bSmrg 10995c97b1c41Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc. 1099645bc899bSmrg# 1099745bc899bSmrg# This file is free software; the Free Software Foundation 1099845bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1099945bc899bSmrg# with or without modifications, as long as this notice is preserved. 1100045bc899bSmrg 1100145bc899bSmrg 1100245bc899bSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 1100345bc899bSmrg# ------------------------------ 1100445bc899bSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 110053a925b30Smrg[{ 11006c97b1c41Smrg # Older Autoconf 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. 11019c97b1c41Smrg # 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 11031c97b1c41Smrg # 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"` 11035c97b1c41Smrg test -z "$am__include" && continue 110363a925b30Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 110373a925b30Smrg # Find all dependency output files, they are included files with 110383a925b30Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 110393a925b30Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 110403a925b30Smrg # expansion. 110413a925b30Smrg for file in `sed -n " 110423a925b30Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11043c97b1c41Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 110443a925b30Smrg # Make sure the directory exists. 110453a925b30Smrg test -f "$dirpart/$file" && continue 110463a925b30Smrg fdir=`AS_DIRNAME(["$file"])` 110473a925b30Smrg AS_MKDIR_P([$dirpart/$fdir]) 110483a925b30Smrg # echo "creating $dirpart/$file" 110493a925b30Smrg echo '# dummy' > "$dirpart/$file" 110503a925b30Smrg done 1105145bc899bSmrg done 110523a925b30Smrg} 1105345bc899bSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1105445bc899bSmrg 1105545bc899bSmrg 1105645bc899bSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 1105745bc899bSmrg# ----------------------------- 1105845bc899bSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 1105945bc899bSmrg# 1106045bc899bSmrg# This code is only required when automatic dependency tracking 11061c97b1c41Smrg# is enabled. FIXME. This creates each '.P' file that we will 1106245bc899bSmrg# need in order to bootstrap the dependency handling code. 1106345bc899bSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1106445bc899bSmrg[AC_CONFIG_COMMANDS([depfiles], 1106545bc899bSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1106645bc899bSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1106745bc899bSmrg]) 1106845bc899bSmrg 1106945bc899bSmrg# Do all the work for Automake. -*- Autoconf -*- 1107045bc899bSmrg 11071c97b1c41Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 1107245bc899bSmrg# 1107345bc899bSmrg# This file is free software; the Free Software Foundation 1107445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1107545bc899bSmrg# with or without modifications, as long as this notice is preserved. 1107645bc899bSmrg 1107745bc899bSmrg# This macro actually does too much. Some checks are only needed if 1107845bc899bSmrg# your package does certain things. But this isn't really a big deal. 1107945bc899bSmrg 1108045bc899bSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1108145bc899bSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 1108245bc899bSmrg# ----------------------------------------------- 1108345bc899bSmrg# The call with PACKAGE and VERSION arguments is the old style 1108445bc899bSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 1108545bc899bSmrg# and VERSION should now be passed to AC_INIT and removed from 1108645bc899bSmrg# the call to AM_INIT_AUTOMAKE. 1108745bc899bSmrg# We support both call styles for the transition. After 1108845bc899bSmrg# the next Automake release, Autoconf can make the AC_INIT 1108945bc899bSmrg# arguments mandatory, and then we can depend on a new Autoconf 1109045bc899bSmrg# release and drop the old call support. 1109145bc899bSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11092c97b1c41Smrg[AC_PREREQ([2.65])dnl 1109345bc899bSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 1109445bc899bSmrgdnl the ones we care about. 1109545bc899bSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1109645bc899bSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1109745bc899bSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 1109850f2e948Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 1109950f2e948Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1110050f2e948Smrg # is not polluted with repeated "-I." 1110150f2e948Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1110250f2e948Smrg # test to see if srcdir already configured 1110350f2e948Smrg if test -f $srcdir/config.status; then 1110450f2e948Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1110550f2e948Smrg fi 1110645bc899bSmrgfi 1110745bc899bSmrg 1110845bc899bSmrg# test whether we have cygpath 1110945bc899bSmrgif test -z "$CYGPATH_W"; then 1111045bc899bSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 1111145bc899bSmrg CYGPATH_W='cygpath -w' 1111245bc899bSmrg else 1111345bc899bSmrg CYGPATH_W=echo 1111445bc899bSmrg fi 1111545bc899bSmrgfi 1111645bc899bSmrgAC_SUBST([CYGPATH_W]) 1111745bc899bSmrg 1111845bc899bSmrg# Define the identity of the package. 1111945bc899bSmrgdnl Distinguish between old-style and new-style calls. 1112045bc899bSmrgm4_ifval([$2], 11121c97b1c41Smrg[AC_DIAGNOSE([obsolete], 11122c97b1c41Smrg [$0: two- and three-arguments forms are deprecated.]) 11123c97b1c41Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1112445bc899bSmrg AC_SUBST([PACKAGE], [$1])dnl 1112545bc899bSmrg AC_SUBST([VERSION], [$2])], 1112645bc899bSmrg[_AM_SET_OPTIONS([$1])dnl 1112750f2e948Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11128c97b1c41Smrgm4_if( 11129c97b1c41Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11130c97b1c41Smrg [ok:ok],, 1113150f2e948Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1113245bc899bSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1113345bc899bSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1113445bc899bSmrg 1113545bc899bSmrg_AM_IF_OPTION([no-define],, 11136c97b1c41Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11137c97b1c41Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 1113845bc899bSmrg 1113945bc899bSmrg# Some tools Automake needs. 1114045bc899bSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 1114145bc899bSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11142c97b1c41SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11143c97b1c41SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11144c97b1c41SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11145c97b1c41SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11146c97b1c41SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 111473a925b30SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 111483a925b30SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11149c97b1c41SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11150c97b1c41Smrg# For better backward compatibility. To be removed once Automake 1.9.x 11151c97b1c41Smrg# dies out for good. For more background, see: 11152c97b1c41Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11153c97b1c41Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11154c97b1c41SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1115545bc899bSmrg# We need awk for the "check" target. The system "awk" is bad on 1115645bc899bSmrg# some platforms. 1115745bc899bSmrgAC_REQUIRE([AC_PROG_AWK])dnl 1115845bc899bSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1115945bc899bSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1116045bc899bSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 111613a925b30Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 111623a925b30Smrg [_AM_PROG_TAR([v7])])]) 1116345bc899bSmrg_AM_IF_OPTION([no-dependencies],, 1116445bc899bSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11165c97b1c41Smrg [_AM_DEPENDENCIES([CC])], 11166c97b1c41Smrg [m4_define([AC_PROG_CC], 11167c97b1c41Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 1116845bc899bSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11169c97b1c41Smrg [_AM_DEPENDENCIES([CXX])], 11170c97b1c41Smrg [m4_define([AC_PROG_CXX], 11171c97b1c41Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 1117250f2e948SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11173c97b1c41Smrg [_AM_DEPENDENCIES([OBJC])], 11174c97b1c41Smrg [m4_define([AC_PROG_OBJC], 11175c97b1c41Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11176c97b1c41SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11177c97b1c41Smrg [_AM_DEPENDENCIES([OBJCXX])], 11178c97b1c41Smrg [m4_define([AC_PROG_OBJCXX], 11179c97b1c41Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1118045bc899bSmrg]) 11181c97b1c41SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11182c97b1c41Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 11183c97b1c41Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11184c97b1c41Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 111853a925b30SmrgAC_CONFIG_COMMANDS_PRE(dnl 111863a925b30Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 111873a925b30Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1118845bc899bSmrg]) 1118945bc899bSmrg 11190c97b1c41Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 111913a925b30Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 111923a925b30Smrgdnl mangled by Autoconf and run in a shell conditional statement. 111933a925b30Smrgm4_define([_AC_COMPILER_EXEEXT], 111943a925b30Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 111953a925b30Smrg 1119645bc899bSmrg 1119745bc899bSmrg# When config.status generates a header, we must update the stamp-h file. 1119845bc899bSmrg# This file resides in the same directory as the config header 1119945bc899bSmrg# that is generated. The stamp files are numbered to have different names. 1120045bc899bSmrg 1120145bc899bSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1120245bc899bSmrg# loop where config.status creates the headers, so we can generate 1120345bc899bSmrg# our stamp files there. 1120445bc899bSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1120545bc899bSmrg[# Compute $1's index in $config_headers. 1120650f2e948Smrg_am_arg=$1 1120745bc899bSmrg_am_stamp_count=1 1120845bc899bSmrgfor _am_header in $config_headers :; do 1120945bc899bSmrg case $_am_header in 1121050f2e948Smrg $_am_arg | $_am_arg:* ) 1121145bc899bSmrg break ;; 1121245bc899bSmrg * ) 1121345bc899bSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1121445bc899bSmrg esac 1121545bc899bSmrgdone 1121650f2e948Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1121745bc899bSmrg 11218c97b1c41Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1121945bc899bSmrg# 1122045bc899bSmrg# This file is free software; the Free Software Foundation 1122145bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1122245bc899bSmrg# with or without modifications, as long as this notice is preserved. 1122345bc899bSmrg 1122445bc899bSmrg# AM_PROG_INSTALL_SH 1122545bc899bSmrg# ------------------ 1122645bc899bSmrg# Define $install_sh. 1122745bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 1122845bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 112293a925b30Smrgif test x"${install_sh}" != xset; then 112303a925b30Smrg case $am_aux_dir in 112313a925b30Smrg *\ * | *\ *) 112323a925b30Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 112333a925b30Smrg *) 112343a925b30Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 112353a925b30Smrg esac 112363a925b30Smrgfi 11237c97b1c41SmrgAC_SUBST([install_sh])]) 1123845bc899bSmrg 11239c97b1c41Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc. 1124045bc899bSmrg# 1124145bc899bSmrg# This file is free software; the Free Software Foundation 1124245bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1124345bc899bSmrg# with or without modifications, as long as this notice is preserved. 1124445bc899bSmrg 1124545bc899bSmrg# Check whether the underlying file-system supports filenames 1124645bc899bSmrg# with a leading dot. For instance MS-DOS doesn't. 1124745bc899bSmrgAC_DEFUN([AM_SET_LEADING_DOT], 1124845bc899bSmrg[rm -rf .tst 2>/dev/null 1124945bc899bSmrgmkdir .tst 2>/dev/null 1125045bc899bSmrgif test -d .tst; then 1125145bc899bSmrg am__leading_dot=. 1125245bc899bSmrgelse 1125345bc899bSmrg am__leading_dot=_ 1125445bc899bSmrgfi 1125545bc899bSmrgrmdir .tst 2>/dev/null 1125645bc899bSmrgAC_SUBST([am__leading_dot])]) 1125745bc899bSmrg 1125845bc899bSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1125945bc899bSmrg 11260c97b1c41Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1126145bc899bSmrg# 1126245bc899bSmrg# This file is free software; the Free Software Foundation 1126345bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1126445bc899bSmrg# with or without modifications, as long as this notice is preserved. 1126545bc899bSmrg 1126645bc899bSmrg# AM_MAKE_INCLUDE() 1126745bc899bSmrg# ----------------- 1126845bc899bSmrg# Check to see how make treats includes. 1126945bc899bSmrgAC_DEFUN([AM_MAKE_INCLUDE], 1127045bc899bSmrg[am_make=${MAKE-make} 1127145bc899bSmrgcat > confinc << 'END' 1127245bc899bSmrgam__doit: 112733a925b30Smrg @echo this is the am__doit target 1127445bc899bSmrg.PHONY: am__doit 1127545bc899bSmrgEND 1127645bc899bSmrg# If we don't find an include directive, just comment out the code. 1127745bc899bSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 1127845bc899bSmrgam__include="#" 1127945bc899bSmrgam__quote= 1128045bc899bSmrg_am_result=none 1128145bc899bSmrg# First try GNU make style include. 1128245bc899bSmrgecho "include confinc" > confmf 11283c97b1c41Smrg# Ignore all kinds of additional output from 'make'. 112843a925b30Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 112853a925b30Smrg*the\ am__doit\ target*) 112863a925b30Smrg am__include=include 112873a925b30Smrg am__quote= 112883a925b30Smrg _am_result=GNU 112893a925b30Smrg ;; 112903a925b30Smrgesac 1129145bc899bSmrg# Now try BSD make style include. 1129245bc899bSmrgif test "$am__include" = "#"; then 1129345bc899bSmrg echo '.include "confinc"' > confmf 112943a925b30Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 112953a925b30Smrg *the\ am__doit\ target*) 112963a925b30Smrg am__include=.include 112973a925b30Smrg am__quote="\"" 112983a925b30Smrg _am_result=BSD 112993a925b30Smrg ;; 113003a925b30Smrg esac 1130145bc899bSmrgfi 1130245bc899bSmrgAC_SUBST([am__include]) 1130345bc899bSmrgAC_SUBST([am__quote]) 1130445bc899bSmrgAC_MSG_RESULT([$_am_result]) 1130545bc899bSmrgrm -f confinc confmf 1130645bc899bSmrg]) 1130745bc899bSmrg 1130845bc899bSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1130945bc899bSmrg 11310c97b1c41Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc. 1131145bc899bSmrg# 1131245bc899bSmrg# This file is free software; the Free Software Foundation 1131345bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1131445bc899bSmrg# with or without modifications, as long as this notice is preserved. 1131545bc899bSmrg 1131645bc899bSmrg# AM_MISSING_PROG(NAME, PROGRAM) 1131745bc899bSmrg# ------------------------------ 1131845bc899bSmrgAC_DEFUN([AM_MISSING_PROG], 1131945bc899bSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1132045bc899bSmrg$1=${$1-"${am_missing_run}$2"} 1132145bc899bSmrgAC_SUBST($1)]) 1132245bc899bSmrg 1132345bc899bSmrg# AM_MISSING_HAS_RUN 1132445bc899bSmrg# ------------------ 11325c97b1c41Smrg# Define MISSING if not defined so far and test if it is modern enough. 11326c97b1c41Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 1132745bc899bSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1132845bc899bSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1132950f2e948SmrgAC_REQUIRE_AUX_FILE([missing])dnl 113303a925b30Smrgif test x"${MISSING+set}" != xset; then 113313a925b30Smrg case $am_aux_dir in 113323a925b30Smrg *\ * | *\ *) 113333a925b30Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 113343a925b30Smrg *) 113353a925b30Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 113363a925b30Smrg esac 113373a925b30Smrgfi 1133845bc899bSmrg# Use eval to expand $SHELL 11339c97b1c41Smrgif eval "$MISSING --is-lightweight"; then 11340c97b1c41Smrg am_missing_run="$MISSING " 1134145bc899bSmrgelse 1134245bc899bSmrg am_missing_run= 11343c97b1c41Smrg AC_MSG_WARN(['missing' script is too old or missing]) 1134445bc899bSmrgfi 1134545bc899bSmrg]) 1134645bc899bSmrg 1134745bc899bSmrg# Helper functions for option handling. -*- Autoconf -*- 1134845bc899bSmrg 11349c97b1c41Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1135045bc899bSmrg# 1135145bc899bSmrg# This file is free software; the Free Software Foundation 1135245bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1135345bc899bSmrg# with or without modifications, as long as this notice is preserved. 1135445bc899bSmrg 1135545bc899bSmrg# _AM_MANGLE_OPTION(NAME) 1135645bc899bSmrg# ----------------------- 1135745bc899bSmrgAC_DEFUN([_AM_MANGLE_OPTION], 1135845bc899bSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1135945bc899bSmrg 1136045bc899bSmrg# _AM_SET_OPTION(NAME) 11361b40a6198Smrg# -------------------- 1136245bc899bSmrg# Set option NAME. Presently that only means defining a flag for this option. 1136345bc899bSmrgAC_DEFUN([_AM_SET_OPTION], 11364c97b1c41Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 1136545bc899bSmrg 1136645bc899bSmrg# _AM_SET_OPTIONS(OPTIONS) 11367b40a6198Smrg# ------------------------ 1136845bc899bSmrg# OPTIONS is a space-separated list of Automake options. 1136945bc899bSmrgAC_DEFUN([_AM_SET_OPTIONS], 1137050f2e948Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1137145bc899bSmrg 1137245bc899bSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1137345bc899bSmrg# ------------------------------------------- 1137445bc899bSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1137545bc899bSmrgAC_DEFUN([_AM_IF_OPTION], 1137645bc899bSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1137745bc899bSmrg 1137845bc899bSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1137945bc899bSmrg 11380c97b1c41Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc. 1138145bc899bSmrg# 1138245bc899bSmrg# This file is free software; the Free Software Foundation 1138345bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1138445bc899bSmrg# with or without modifications, as long as this notice is preserved. 1138545bc899bSmrg 1138645bc899bSmrg# AM_SANITY_CHECK 1138745bc899bSmrg# --------------- 1138845bc899bSmrgAC_DEFUN([AM_SANITY_CHECK], 1138945bc899bSmrg[AC_MSG_CHECKING([whether build environment is sane]) 113903a925b30Smrg# Reject unsafe characters in $srcdir or the absolute working directory 113913a925b30Smrg# name. Accept space and tab only in the latter. 113923a925b30Smrgam_lf=' 113933a925b30Smrg' 113943a925b30Smrgcase `pwd` in 113953a925b30Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 113963a925b30Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 113973a925b30Smrgesac 113983a925b30Smrgcase $srcdir in 113993a925b30Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 11400c97b1c41Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 114013a925b30Smrgesac 114023a925b30Smrg 11403c97b1c41Smrg# Do 'set' in a subshell so we don't clobber the current shell's 1140445bc899bSmrg# arguments. Must try -L first in case configure is actually a 1140545bc899bSmrg# symlink; some systems play weird games with the mod time of symlinks 1140645bc899bSmrg# (eg FreeBSD returns the mod time of the symlink's containing 1140745bc899bSmrg# directory). 1140845bc899bSmrgif ( 11409c97b1c41Smrg am_has_slept=no 11410c97b1c41Smrg for am_try in 1 2; do 11411c97b1c41Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 11412c97b1c41Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 11413c97b1c41Smrg if test "$[*]" = "X"; then 11414c97b1c41Smrg # -L didn't work. 11415c97b1c41Smrg set X `ls -t "$srcdir/configure" conftest.file` 11416c97b1c41Smrg fi 11417c97b1c41Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 11418c97b1c41Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 11419c97b1c41Smrg 11420c97b1c41Smrg # If neither matched, then we have a broken ls. This can happen 11421c97b1c41Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 11422c97b1c41Smrg # broken ls alias from the environment. This has actually 11423c97b1c41Smrg # happened. Such a system could not be considered "sane". 11424c97b1c41Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 11425c97b1c41Smrg alias in your environment]) 11426c97b1c41Smrg fi 11427c97b1c41Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 11428c97b1c41Smrg break 11429c97b1c41Smrg fi 11430c97b1c41Smrg # Just in case. 11431c97b1c41Smrg sleep 1 11432c97b1c41Smrg am_has_slept=yes 11433c97b1c41Smrg done 1143445bc899bSmrg test "$[2]" = conftest.file 1143545bc899bSmrg ) 1143645bc899bSmrgthen 1143745bc899bSmrg # Ok. 1143845bc899bSmrg : 1143945bc899bSmrgelse 1144045bc899bSmrg AC_MSG_ERROR([newly created file is older than distributed files! 1144145bc899bSmrgCheck your system clock]) 1144245bc899bSmrgfi 11443c97b1c41SmrgAC_MSG_RESULT([yes]) 11444c97b1c41Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 11445c97b1c41Smrg# generated files are strictly newer. 11446c97b1c41Smrgam_sleep_pid= 11447c97b1c41Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 11448c97b1c41Smrg ( sleep 1 ) & 11449c97b1c41Smrg am_sleep_pid=$! 11450c97b1c41Smrgfi 11451c97b1c41SmrgAC_CONFIG_COMMANDS_PRE( 11452c97b1c41Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 11453c97b1c41Smrg if test -n "$am_sleep_pid"; then 11454c97b1c41Smrg # Hide warnings about reused PIDs. 11455c97b1c41Smrg wait $am_sleep_pid 2>/dev/null 11456c97b1c41Smrg fi 11457c97b1c41Smrg AC_MSG_RESULT([done])]) 11458c97b1c41Smrgrm -f conftest.file 11459c97b1c41Smrg]) 1146045bc899bSmrg 11461c97b1c41Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc. 114625592a31fSmrg# 114635592a31fSmrg# This file is free software; the Free Software Foundation 114645592a31fSmrg# gives unlimited permission to copy and/or distribute it, 114655592a31fSmrg# with or without modifications, as long as this notice is preserved. 114665592a31fSmrg 114675592a31fSmrg# AM_SILENT_RULES([DEFAULT]) 114685592a31fSmrg# -------------------------- 114695592a31fSmrg# Enable less verbose build rules; with the default set to DEFAULT 11470c97b1c41Smrg# ("yes" being less verbose, "no" or empty being verbose). 114715592a31fSmrgAC_DEFUN([AM_SILENT_RULES], 11472c97b1c41Smrg[AC_ARG_ENABLE([silent-rules], [dnl 11473c97b1c41SmrgAS_HELP_STRING( 11474c97b1c41Smrg [--enable-silent-rules], 11475c97b1c41Smrg [less verbose build output (undo: "make V=1")]) 11476c97b1c41SmrgAS_HELP_STRING( 11477c97b1c41Smrg [--disable-silent-rules], 11478c97b1c41Smrg [verbose build output (undo: "make V=0")])dnl 11479c97b1c41Smrg]) 11480c97b1c41Smrgcase $enable_silent_rules in @%:@ ((( 11481c97b1c41Smrg yes) AM_DEFAULT_VERBOSITY=0;; 11482c97b1c41Smrg no) AM_DEFAULT_VERBOSITY=1;; 11483c97b1c41Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 114845592a31fSmrgesac 11485b40a6198Smrgdnl 11486c97b1c41Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 11487b40a6198Smrgdnl do not support nested variable expansions. 11488b40a6198Smrgdnl See automake bug#9928 and bug#10237. 11489b40a6198Smrgam_make=${MAKE-make} 11490b40a6198SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11491b40a6198Smrg [am_cv_make_support_nested_variables], 11492b40a6198Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11493b40a6198SmrgBAR0=false 11494b40a6198SmrgBAR1=true 11495b40a6198SmrgV=1 11496b40a6198Smrgam__doit: 11497b40a6198Smrg @$(TRUE) 11498b40a6198Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11499b40a6198Smrg am_cv_make_support_nested_variables=yes 11500b40a6198Smrgelse 11501b40a6198Smrg am_cv_make_support_nested_variables=no 11502b40a6198Smrgfi]) 11503b40a6198Smrgif test $am_cv_make_support_nested_variables = yes; then 11504c97b1c41Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 11505b40a6198Smrg AM_V='$(V)' 11506b40a6198Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11507b40a6198Smrgelse 11508b40a6198Smrg AM_V=$AM_DEFAULT_VERBOSITY 11509b40a6198Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11510b40a6198Smrgfi 11511b40a6198SmrgAC_SUBST([AM_V])dnl 11512b40a6198SmrgAM_SUBST_NOTMAKE([AM_V])dnl 11513b40a6198SmrgAC_SUBST([AM_DEFAULT_V])dnl 11514b40a6198SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 115155592a31fSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 115165592a31fSmrgAM_BACKSLASH='\' 115175592a31fSmrgAC_SUBST([AM_BACKSLASH])dnl 115185592a31fSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 115195592a31fSmrg]) 115205592a31fSmrg 11521c97b1c41Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc. 1152245bc899bSmrg# 1152345bc899bSmrg# This file is free software; the Free Software Foundation 1152445bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1152545bc899bSmrg# with or without modifications, as long as this notice is preserved. 1152645bc899bSmrg 1152745bc899bSmrg# AM_PROG_INSTALL_STRIP 1152845bc899bSmrg# --------------------- 11529c97b1c41Smrg# One issue with vendor 'install' (even GNU) is that you can't 1153045bc899bSmrg# specify the program used to strip binaries. This is especially 1153145bc899bSmrg# annoying in cross-compiling environments, where the build's strip 1153245bc899bSmrg# is unlikely to handle the host's binaries. 1153345bc899bSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 11534c97b1c41Smrg# always use install-sh in "make install-strip", and initialize 1153545bc899bSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 1153645bc899bSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1153745bc899bSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11538c97b1c41Smrg# Installed binaries are usually stripped using 'strip' when the user 11539c97b1c41Smrg# run "make install-strip". However 'strip' might not be the right 1154045bc899bSmrg# tool to use in cross-compilation environments, therefore Automake 11541c97b1c41Smrg# will honor the 'STRIP' environment variable to overrule this program. 11542c97b1c41Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1154345bc899bSmrgif test "$cross_compiling" != no; then 1154445bc899bSmrg AC_CHECK_TOOL([STRIP], [strip], :) 1154545bc899bSmrgfi 1154650f2e948SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1154745bc899bSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1154845bc899bSmrg 11549c97b1c41Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc. 1155050f2e948Smrg# 1155150f2e948Smrg# This file is free software; the Free Software Foundation 1155250f2e948Smrg# gives unlimited permission to copy and/or distribute it, 1155350f2e948Smrg# with or without modifications, as long as this notice is preserved. 1155450f2e948Smrg 1155550f2e948Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1155650f2e948Smrg# --------------------------- 1155750f2e948Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1155850f2e948Smrg# This macro is traced by Automake. 1155950f2e948SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1156050f2e948Smrg 115613a925b30Smrg# AM_SUBST_NOTMAKE(VARIABLE) 11562b40a6198Smrg# -------------------------- 115633a925b30Smrg# Public sister of _AM_SUBST_NOTMAKE. 115643a925b30SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 115653a925b30Smrg 1156645bc899bSmrg# Check how to create a tarball. -*- Autoconf -*- 1156745bc899bSmrg 11568c97b1c41Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc. 1156945bc899bSmrg# 1157045bc899bSmrg# This file is free software; the Free Software Foundation 1157145bc899bSmrg# gives unlimited permission to copy and/or distribute it, 1157245bc899bSmrg# with or without modifications, as long as this notice is preserved. 1157345bc899bSmrg 1157445bc899bSmrg# _AM_PROG_TAR(FORMAT) 1157545bc899bSmrg# -------------------- 1157645bc899bSmrg# Check how to create a tarball in format FORMAT. 11577c97b1c41Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1157845bc899bSmrg# 1157945bc899bSmrg# Substitute a variable $(am__tar) that is a command 1158045bc899bSmrg# writing to stdout a FORMAT-tarball containing the directory 1158145bc899bSmrg# $tardir. 1158245bc899bSmrg# tardir=directory && $(am__tar) > result.tar 1158345bc899bSmrg# 1158445bc899bSmrg# Substitute a variable $(am__untar) that extract such 1158545bc899bSmrg# a tarball read from stdin. 1158645bc899bSmrg# $(am__untar) < result.tar 11587c97b1c41Smrg# 1158845bc899bSmrgAC_DEFUN([_AM_PROG_TAR], 11589b40a6198Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11590b40a6198Smrg# in the wild :-( We should find a proper way to deprecate it ... 11591b40a6198SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 11592c97b1c41Smrg 11593c97b1c41Smrg# We'll loop over all known methods to create a tar archive until one works. 1159445bc899bSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1159545bc899bSmrg 11596c97b1c41Smrgm4_if([$1], [v7], 11597c97b1c41Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11598c97b1c41Smrg 11599c97b1c41Smrg [m4_case([$1], 11600c97b1c41Smrg [ustar], 11601c97b1c41Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 11602c97b1c41Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 11603c97b1c41Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 11604c97b1c41Smrg # and bug#13588). 11605c97b1c41Smrg am_max_uid=2097151 # 2^21 - 1 11606c97b1c41Smrg am_max_gid=$am_max_uid 11607c97b1c41Smrg # The $UID and $GID variables are not portable, so we need to resort 11608c97b1c41Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 11609c97b1c41Smrg # below are definitely unexpected, so allow the users to see them 11610c97b1c41Smrg # (that is, avoid stderr redirection). 11611c97b1c41Smrg am_uid=`id -u || echo unknown` 11612c97b1c41Smrg am_gid=`id -g || echo unknown` 11613c97b1c41Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 11614c97b1c41Smrg if test $am_uid -le $am_max_uid; then 11615c97b1c41Smrg AC_MSG_RESULT([yes]) 11616c97b1c41Smrg else 11617c97b1c41Smrg AC_MSG_RESULT([no]) 11618c97b1c41Smrg _am_tools=none 11619c97b1c41Smrg fi 11620c97b1c41Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 11621c97b1c41Smrg if test $am_gid -le $am_max_gid; then 11622c97b1c41Smrg AC_MSG_RESULT([yes]) 11623c97b1c41Smrg else 11624c97b1c41Smrg AC_MSG_RESULT([no]) 11625c97b1c41Smrg _am_tools=none 11626c97b1c41Smrg fi], 1162745bc899bSmrg 11628c97b1c41Smrg [pax], 11629c97b1c41Smrg [], 11630c97b1c41Smrg 11631c97b1c41Smrg [m4_fatal([Unknown tar format])]) 11632c97b1c41Smrg 11633c97b1c41Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 11634c97b1c41Smrg 11635c97b1c41Smrg # Go ahead even if we have the value already cached. We do so because we 11636c97b1c41Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 11637c97b1c41Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 11638c97b1c41Smrg 11639c97b1c41Smrg for _am_tool in $_am_tools; do 11640c97b1c41Smrg case $_am_tool in 11641c97b1c41Smrg gnutar) 11642c97b1c41Smrg for _am_tar in tar gnutar gtar; do 11643c97b1c41Smrg AM_RUN_LOG([$_am_tar --version]) && break 11644c97b1c41Smrg done 11645c97b1c41Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11646c97b1c41Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11647c97b1c41Smrg am__untar="$_am_tar -xf -" 11648c97b1c41Smrg ;; 11649c97b1c41Smrg plaintar) 11650c97b1c41Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 11651c97b1c41Smrg # ustar tarball either. 11652c97b1c41Smrg (tar --version) >/dev/null 2>&1 && continue 11653c97b1c41Smrg am__tar='tar chf - "$$tardir"' 11654c97b1c41Smrg am__tar_='tar chf - "$tardir"' 11655c97b1c41Smrg am__untar='tar xf -' 11656c97b1c41Smrg ;; 11657c97b1c41Smrg pax) 11658c97b1c41Smrg am__tar='pax -L -x $1 -w "$$tardir"' 11659c97b1c41Smrg am__tar_='pax -L -x $1 -w "$tardir"' 11660c97b1c41Smrg am__untar='pax -r' 11661c97b1c41Smrg ;; 11662c97b1c41Smrg cpio) 11663c97b1c41Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11664c97b1c41Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11665c97b1c41Smrg am__untar='cpio -i -H $1 -d' 11666c97b1c41Smrg ;; 11667c97b1c41Smrg none) 11668c97b1c41Smrg am__tar=false 11669c97b1c41Smrg am__tar_=false 11670c97b1c41Smrg am__untar=false 11671c97b1c41Smrg ;; 11672c97b1c41Smrg esac 11673c97b1c41Smrg 11674c97b1c41Smrg # If the value was cached, stop now. We just wanted to have am__tar 11675c97b1c41Smrg # and am__untar set. 11676c97b1c41Smrg test -n "${am_cv_prog_tar_$1}" && break 11677c97b1c41Smrg 11678c97b1c41Smrg # tar/untar a dummy directory, and stop if the command works. 11679c97b1c41Smrg rm -rf conftest.dir 11680c97b1c41Smrg mkdir conftest.dir 11681c97b1c41Smrg echo GrepMe > conftest.dir/file 11682c97b1c41Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11683c97b1c41Smrg rm -rf conftest.dir 11684c97b1c41Smrg if test -s conftest.tar; then 11685c97b1c41Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 11686c97b1c41Smrg AM_RUN_LOG([cat conftest.dir/file]) 11687c97b1c41Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11688c97b1c41Smrg fi 11689c97b1c41Smrg done 1169045bc899bSmrg rm -rf conftest.dir 1169145bc899bSmrg 11692c97b1c41Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11693c97b1c41Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11694c97b1c41Smrg 1169545bc899bSmrgAC_SUBST([am__tar]) 1169645bc899bSmrgAC_SUBST([am__untar]) 1169745bc899bSmrg]) # _AM_PROG_TAR 1169845bc899bSmrg 11699