aclocal.m4 revision 880c7e28
1880c7e28Smrg# generated automatically by aclocal 1.11.3 -*- Autoconf -*- 2bdcaa8d0Smrg 3bdcaa8d0Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4880c7e28Smrg# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 5880c7e28Smrg# Inc. 6bdcaa8d0Smrg# This file is free software; the Free Software Foundation 7bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 8bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 9bdcaa8d0Smrg 10bdcaa8d0Smrg# This program is distributed in the hope that it will be useful, 11bdcaa8d0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 12bdcaa8d0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 13bdcaa8d0Smrg# PARTICULAR PURPOSE. 14bdcaa8d0Smrg 1572313efbSmrgm4_ifndef([AC_AUTOCONF_VERSION], 1672313efbSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17880c7e28Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18880c7e28Smrg[m4_warning([this file was generated for autoconf 2.68. 1972313efbSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2072313efbSmrgIf you have problems, you may need to regenerate the build system entirely. 2172313efbSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 2272313efbSmrg 23bdcaa8d0Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 240b661123Smrg# 250b661123Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 26880c7e28Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 27880c7e28Smrg# Foundation, Inc. 280b661123Smrg# Written by Gordon Matzigkeit, 1996 290b661123Smrg# 300b661123Smrg# This file is free software; the Free Software Foundation gives 310b661123Smrg# unlimited permission to copy and/or distribute it, with or without 320b661123Smrg# modifications, as long as this notice is preserved. 330b661123Smrg 340b661123Smrgm4_define([_LT_COPYING], [dnl 350b661123Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 36880c7e28Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 37880c7e28Smrg# Foundation, Inc. 380b661123Smrg# Written by Gordon Matzigkeit, 1996 390b661123Smrg# 400b661123Smrg# This file is part of GNU Libtool. 410b661123Smrg# 420b661123Smrg# GNU Libtool is free software; you can redistribute it and/or 430b661123Smrg# modify it under the terms of the GNU General Public License as 440b661123Smrg# published by the Free Software Foundation; either version 2 of 450b661123Smrg# the License, or (at your option) any later version. 460b661123Smrg# 470b661123Smrg# As a special exception to the GNU General Public License, 480b661123Smrg# if you distribute this file as part of a program or library that 490b661123Smrg# is built using GNU Libtool, you may include this file under the 500b661123Smrg# same distribution terms that you use for the rest of that program. 510b661123Smrg# 520b661123Smrg# GNU Libtool is distributed in the hope that it will be useful, 530b661123Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 540b661123Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 550b661123Smrg# GNU General Public License for more details. 560b661123Smrg# 570b661123Smrg# You should have received a copy of the GNU General Public License 580b661123Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 590b661123Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 600b661123Smrg# obtained by writing to the Free Software Foundation, Inc., 610b661123Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 620b661123Smrg]) 63bdcaa8d0Smrg 64880c7e28Smrg# serial 57 LT_INIT 65bdcaa8d0Smrg 66bdcaa8d0Smrg 670b661123Smrg# LT_PREREQ(VERSION) 680b661123Smrg# ------------------ 690b661123Smrg# Complain and exit if this libtool version is less that VERSION. 700b661123Smrgm4_defun([LT_PREREQ], 710b661123Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 720b661123Smrg [m4_default([$3], 730b661123Smrg [m4_fatal([Libtool version $1 or higher is required], 740b661123Smrg 63)])], 750b661123Smrg [$2])]) 7672313efbSmrg 7772313efbSmrg 780b661123Smrg# _LT_CHECK_BUILDDIR 790b661123Smrg# ------------------ 800b661123Smrg# Complain if the absolute build directory name contains unusual characters 810b661123Smrgm4_defun([_LT_CHECK_BUILDDIR], 820b661123Smrg[case `pwd` in 830b661123Smrg *\ * | *\ *) 840b661123Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 850b661123Smrgesac 860b661123Smrg]) 870b661123Smrg 880b661123Smrg 890b661123Smrg# LT_INIT([OPTIONS]) 900b661123Smrg# ------------------ 910b661123SmrgAC_DEFUN([LT_INIT], 920b661123Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93880c7e28SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 940b661123SmrgAC_BEFORE([$0], [LT_LANG])dnl 950b661123SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 960b661123SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 970b661123Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 980b661123Smrg 990b661123Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 1000b661123Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 1010b661123Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 1020b661123Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 1030b661123Smrgdnl unless we require an AC_DEFUNed macro: 1040b661123SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 1050b661123SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 1060b661123SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 1070b661123SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1080b661123Smrgm4_require([_LT_PROG_LTMAIN])dnl 1090b661123Smrg 110880c7e28Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 111880c7e28Smrg 1120b661123Smrgdnl Parse OPTIONS 1130b661123Smrg_LT_SET_OPTIONS([$0], [$1]) 114bdcaa8d0Smrg 115bdcaa8d0Smrg# This can be used to rebuild libtool when needed 1160b661123SmrgLIBTOOL_DEPS="$ltmain" 117bdcaa8d0Smrg 118bdcaa8d0Smrg# Always use our own libtool. 119bdcaa8d0SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 120bdcaa8d0SmrgAC_SUBST(LIBTOOL)dnl 121bdcaa8d0Smrg 1220b661123Smrg_LT_SETUP 12372313efbSmrg 1240b661123Smrg# Only expand once: 1250b661123Smrgm4_define([LT_INIT]) 1260b661123Smrg])# LT_INIT 12772313efbSmrg 1280b661123Smrg# Old names: 1290b661123SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1300b661123SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1310b661123Smrgdnl aclocal-1.4 backwards compatibility: 1320b661123Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1330b661123Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1340b661123Smrg 1350b661123Smrg 1360b661123Smrg# _LT_CC_BASENAME(CC) 1370b661123Smrg# ------------------- 1380b661123Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1390b661123Smrgm4_defun([_LT_CC_BASENAME], 1400b661123Smrg[for cc_temp in $1""; do 1410b661123Smrg case $cc_temp in 1420b661123Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1430b661123Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1440b661123Smrg \-*) ;; 1450b661123Smrg *) break;; 1460b661123Smrg esac 1470b661123Smrgdone 148880c7e28Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1490b661123Smrg]) 1500b661123Smrg 1510b661123Smrg 1520b661123Smrg# _LT_FILEUTILS_DEFAULTS 1530b661123Smrg# ---------------------- 1540b661123Smrg# It is okay to use these file commands and assume they have been set 1550b661123Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 1560b661123Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1570b661123Smrg[: ${CP="cp -f"} 1580b661123Smrg: ${MV="mv -f"} 1590b661123Smrg: ${RM="rm -f"} 1600b661123Smrg])# _LT_FILEUTILS_DEFAULTS 1610b661123Smrg 1620b661123Smrg 1630b661123Smrg# _LT_SETUP 1640b661123Smrg# --------- 1650b661123Smrgm4_defun([_LT_SETUP], 1660b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 167bdcaa8d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 168880c7e28SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169880c7e28SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170880c7e28Smrg 171880c7e28Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 172880c7e28Smrgdnl 1730b661123Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1740b661123Smrg_LT_DECL([], [host], [0])dnl 1750b661123Smrg_LT_DECL([], [host_os], [0])dnl 1760b661123Smrgdnl 1770b661123Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1780b661123Smrg_LT_DECL([], [build], [0])dnl 1790b661123Smrg_LT_DECL([], [build_os], [0])dnl 1800b661123Smrgdnl 181bdcaa8d0SmrgAC_REQUIRE([AC_PROG_CC])dnl 1820b661123SmrgAC_REQUIRE([LT_PATH_LD])dnl 1830b661123SmrgAC_REQUIRE([LT_PATH_NM])dnl 1840b661123Smrgdnl 185bdcaa8d0SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1860b661123Smrgtest -z "$LN_S" && LN_S="ln -s" 1870b661123Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 188bdcaa8d0Smrgdnl 1890b661123SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1900b661123Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 1910b661123Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 1920b661123Smrgdnl 1930b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1940b661123Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195880c7e28Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 1960b661123Smrgm4_require([_LT_CMD_RELOAD])dnl 1970b661123Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198880c7e28Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 1990b661123Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2000b661123Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201880c7e28Smrgm4_require([_LT_WITH_SYSROOT])dnl 2020b661123Smrg 2030b661123Smrg_LT_CONFIG_LIBTOOL_INIT([ 2040b661123Smrg# See if we are running on zsh, and set the options which allow our 2050b661123Smrg# commands through without removal of \ escapes INIT. 2060b661123Smrgif test -n "\${ZSH_VERSION+set}" ; then 2070b661123Smrg setopt NO_GLOB_SUBST 2080b661123Smrgfi 2090b661123Smrg]) 2100b661123Smrgif test -n "${ZSH_VERSION+set}" ; then 2110b661123Smrg setopt NO_GLOB_SUBST 2120b661123Smrgfi 213bdcaa8d0Smrg 2140b661123Smrg_LT_CHECK_OBJDIR 2150b661123Smrg 2160b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 217bdcaa8d0Smrg 218bdcaa8d0Smrgcase $host_os in 219bdcaa8d0Smrgaix3*) 220bdcaa8d0Smrg # AIX sometimes has problems with the GCC collect2 program. For some 221bdcaa8d0Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 222bdcaa8d0Smrg # vanish in a puff of smoke. 223bdcaa8d0Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 224bdcaa8d0Smrg COLLECT_NAMES= 225bdcaa8d0Smrg export COLLECT_NAMES 226bdcaa8d0Smrg fi 227bdcaa8d0Smrg ;; 228bdcaa8d0Smrgesac 229bdcaa8d0Smrg 230bdcaa8d0Smrg# Global variables: 2310b661123Smrgofile=libtool 232bdcaa8d0Smrgcan_build_shared=yes 233bdcaa8d0Smrg 234bdcaa8d0Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 235bdcaa8d0Smrg# which needs '.lib'). 236bdcaa8d0Smrglibext=a 237bdcaa8d0Smrg 2380b661123Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 23996ce994aSmrg 240bdcaa8d0Smrgold_CC="$CC" 241bdcaa8d0Smrgold_CFLAGS="$CFLAGS" 242bdcaa8d0Smrg 243bdcaa8d0Smrg# Set sane defaults for various variables 244bdcaa8d0Smrgtest -z "$CC" && CC=cc 245bdcaa8d0Smrgtest -z "$LTCC" && LTCC=$CC 246bdcaa8d0Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 247bdcaa8d0Smrgtest -z "$LD" && LD=ld 248bdcaa8d0Smrgtest -z "$ac_objext" && ac_objext=o 249bdcaa8d0Smrg 250bdcaa8d0Smrg_LT_CC_BASENAME([$compiler]) 251bdcaa8d0Smrg 252bdcaa8d0Smrg# Only perform the check for file, if the check method requires it 2530b661123Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 254bdcaa8d0Smrgcase $deplibs_check_method in 255bdcaa8d0Smrgfile_magic*) 256bdcaa8d0Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2570b661123Smrg _LT_PATH_MAGIC 258bdcaa8d0Smrg fi 259bdcaa8d0Smrg ;; 260bdcaa8d0Smrgesac 261bdcaa8d0Smrg 2620b661123Smrg# Use C for the default configuration in the libtool script 2630b661123SmrgLT_SUPPORTED_TAG([CC]) 2640b661123Smrg_LT_LANG_C_CONFIG 2650b661123Smrg_LT_LANG_DEFAULT_CONFIG 2660b661123Smrg_LT_CONFIG_COMMANDS 2670b661123Smrg])# _LT_SETUP 26872313efbSmrg 26972313efbSmrg 270880c7e28Smrg# _LT_PREPARE_SED_QUOTE_VARS 271880c7e28Smrg# -------------------------- 272880c7e28Smrg# Define a few sed substitution that help us do robust quoting. 273880c7e28Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 274880c7e28Smrg[# Backslashify metacharacters that are still active within 275880c7e28Smrg# double-quoted strings. 276880c7e28Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277880c7e28Smrg 278880c7e28Smrg# Same as above, but do not quote variable references. 279880c7e28Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280880c7e28Smrg 281880c7e28Smrg# Sed substitution to delay expansion of an escaped shell variable in a 282880c7e28Smrg# double_quote_subst'ed string. 283880c7e28Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284880c7e28Smrg 285880c7e28Smrg# Sed substitution to delay expansion of an escaped single quote. 286880c7e28Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287880c7e28Smrg 288880c7e28Smrg# Sed substitution to avoid accidental globbing in evaled expressions 289880c7e28Smrgno_glob_subst='s/\*/\\\*/g' 290880c7e28Smrg]) 291880c7e28Smrg 2920b661123Smrg# _LT_PROG_LTMAIN 2930b661123Smrg# --------------- 2940b661123Smrg# Note that this code is called both from `configure', and `config.status' 2950b661123Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 2960b661123Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 2970b661123Smrg# so we pass a copy along to make sure it has a sensible value anyway. 2980b661123Smrgm4_defun([_LT_PROG_LTMAIN], 2990b661123Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3000b661123Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3010b661123Smrgltmain="$ac_aux_dir/ltmain.sh" 3020b661123Smrg])# _LT_PROG_LTMAIN 30372313efbSmrg 30472313efbSmrg 3050b661123Smrg 3060b661123Smrg# So that we can recreate a full libtool script including additional 3070b661123Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3080b661123Smrg# in macros and then make a single call at the end using the `libtool' 3090b661123Smrg# label. 3100b661123Smrg 3110b661123Smrg 3120b661123Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3130b661123Smrg# ---------------------------------------- 3140b661123Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3150b661123Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3160b661123Smrg[m4_ifval([$1], 3170b661123Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3180b661123Smrg [$1 3190b661123Smrg])])]) 3200b661123Smrg 3210b661123Smrg# Initialize. 3220b661123Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3230b661123Smrg 3240b661123Smrg 3250b661123Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3260b661123Smrg# ------------------------------ 3270b661123Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3280b661123Smrgm4_define([_LT_CONFIG_LIBTOOL], 3290b661123Smrg[m4_ifval([$1], 3300b661123Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3310b661123Smrg [$1 3320b661123Smrg])])]) 3330b661123Smrg 3340b661123Smrg# Initialize. 3350b661123Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3360b661123Smrg 3370b661123Smrg 3380b661123Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3390b661123Smrg# ----------------------------------------------------- 3400b661123Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3410b661123Smrg[_LT_CONFIG_LIBTOOL([$1]) 3420b661123Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3430b661123Smrg]) 3440b661123Smrg 3450b661123Smrg 3460b661123Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3470b661123Smrg# ----------------------------- 3480b661123Smrg# Add leading comment marks to the start of each line, and a trailing 3490b661123Smrg# full-stop to the whole comment if one is not present already. 3500b661123Smrgm4_define([_LT_FORMAT_COMMENT], 3510b661123Smrg[m4_ifval([$1], [ 3520b661123Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3530b661123Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3540b661123Smrg)]) 3550b661123Smrg 3560b661123Smrg 3570b661123Smrg 3580b661123Smrg 3590b661123Smrg 3600b661123Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3610b661123Smrg# ------------------------------------------------------------------- 3620b661123Smrg# CONFIGNAME is the name given to the value in the libtool script. 3630b661123Smrg# VARNAME is the (base) name used in the configure script. 3640b661123Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3650b661123Smrg# VARNAME. Any other value will be used directly. 3660b661123Smrgm4_define([_LT_DECL], 3670b661123Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3680b661123Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3690b661123Smrg [m4_ifval([$1], [$1], [$2])]) 3700b661123Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3710b661123Smrg m4_ifval([$4], 3720b661123Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3730b661123Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3740b661123Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3750b661123Smrg]) 3760b661123Smrg 3770b661123Smrg 3780b661123Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3790b661123Smrg# -------------------------------------------------------- 3800b661123Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3810b661123Smrg 3820b661123Smrg 3830b661123Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3840b661123Smrg# ------------------------------------------------ 3850b661123Smrgm4_define([lt_decl_tag_varnames], 3860b661123Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3870b661123Smrg 3880b661123Smrg 3890b661123Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 3900b661123Smrg# --------------------------------------------------------- 3910b661123Smrgm4_define([_lt_decl_filter], 3920b661123Smrg[m4_case([$#], 3930b661123Smrg [0], [m4_fatal([$0: too few arguments: $#])], 3940b661123Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 3950b661123Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 3960b661123Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 3970b661123Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 3980b661123Smrg]) 3990b661123Smrg 4000b661123Smrg 4010b661123Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4020b661123Smrg# -------------------------------------------------- 4030b661123Smrgm4_define([lt_decl_quote_varnames], 4040b661123Smrg[_lt_decl_filter([value], [1], $@)]) 4050b661123Smrg 4060b661123Smrg 4070b661123Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4080b661123Smrg# --------------------------------------------------- 4090b661123Smrgm4_define([lt_decl_dquote_varnames], 4100b661123Smrg[_lt_decl_filter([value], [2], $@)]) 4110b661123Smrg 4120b661123Smrg 4130b661123Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4140b661123Smrg# --------------------------------------------------- 4150b661123Smrgm4_define([lt_decl_varnames_tagged], 4160b661123Smrg[m4_assert([$# <= 2])dnl 4170b661123Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4180b661123Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4190b661123Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4200b661123Smrgm4_define([_lt_decl_varnames_tagged], 4210b661123Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4220b661123Smrg 4230b661123Smrg 4240b661123Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4250b661123Smrg# ------------------------------------------------ 4260b661123Smrgm4_define([lt_decl_all_varnames], 4270b661123Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4280b661123Smrg m4_if([$2], [], 4290b661123Smrg m4_quote(lt_decl_varnames), 4300b661123Smrg m4_quote(m4_shift($@))))[]dnl 4310b661123Smrg]) 4320b661123Smrgm4_define([_lt_decl_all_varnames], 4330b661123Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4340b661123Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4350b661123Smrg]) 4360b661123Smrg 4370b661123Smrg 4380b661123Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4390b661123Smrg# ------------------------------------ 4400b661123Smrg# Quote a variable value, and forward it to `config.status' so that its 4410b661123Smrg# declaration there will have the same value as in `configure'. VARNAME 4420b661123Smrg# must have a single quote delimited value for this to work. 4430b661123Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 444880c7e28Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4450b661123Smrg 4460b661123Smrg 4470b661123Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4480b661123Smrg# ------------------------------ 4490b661123Smrg# We delimit libtool config variables with single quotes, so when 4500b661123Smrg# we write them to config.status, we have to be sure to quote all 4510b661123Smrg# embedded single quotes properly. In configure, this macro expands 4520b661123Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4530b661123Smrg# 454880c7e28Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4550b661123Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4560b661123Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4570b661123Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4580b661123Smrg 4590b661123Smrg 4600b661123Smrg# _LT_LIBTOOL_TAGS 4610b661123Smrg# ---------------- 4620b661123Smrg# Output comment and list of tags supported by the script 4630b661123Smrgm4_defun([_LT_LIBTOOL_TAGS], 4640b661123Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4650b661123Smrgavailable_tags="_LT_TAGS"dnl 4660b661123Smrg]) 4670b661123Smrg 4680b661123Smrg 4690b661123Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4700b661123Smrg# ----------------------------------- 4710b661123Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4720b661123Smrg# expand to a commented shell variable setting: 4730b661123Smrg# 4740b661123Smrg# # Some comment about what VAR is for. 4750b661123Smrg# visible_name=$lt_internal_name 4760b661123Smrgm4_define([_LT_LIBTOOL_DECLARE], 4770b661123Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4780b661123Smrg [description])))[]dnl 4790b661123Smrgm4_pushdef([_libtool_name], 4800b661123Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4810b661123Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4820b661123Smrg [0], [_libtool_name=[$]$1], 4830b661123Smrg [1], [_libtool_name=$lt_[]$1], 4840b661123Smrg [2], [_libtool_name=$lt_[]$1], 4850b661123Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4860b661123Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4870b661123Smrg]) 4880b661123Smrg 4890b661123Smrg 4900b661123Smrg# _LT_LIBTOOL_CONFIG_VARS 4910b661123Smrg# ----------------------- 4920b661123Smrg# Produce commented declarations of non-tagged libtool config variables 4930b661123Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 4940b661123Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 4950b661123Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 4960b661123Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 4970b661123Smrg[m4_foreach([_lt_var], 4980b661123Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 4990b661123Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5000b661123Smrg 5010b661123Smrg 5020b661123Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 5030b661123Smrg# ------------------------- 5040b661123Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5050b661123Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5060b661123Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 50772313efbSmrg 50872313efbSmrg 5090b661123Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5100b661123Smrg# ------------------------------ 5110b661123Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5120b661123Smrg 5130b661123Smrg 5140b661123Smrg# _LT_CONFIG_COMMANDS 51572313efbSmrg# ------------------- 5160b661123Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5170b661123Smrg# variables for single and double quote escaping we saved from calls 5180b661123Smrg# to _LT_DECL, we can put quote escaped variables declarations 5190b661123Smrg# into `config.status', and then the shell code to quote escape them in 5200b661123Smrg# for loops in `config.status'. Finally, any additional code accumulated 5210b661123Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5220b661123Smrgm4_defun([_LT_CONFIG_COMMANDS], 5230b661123Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5240b661123Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5250b661123Smrg dnl instead of duplicating it all over again into config.status, 5260b661123Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5270b661123Smrg dnl needs to know what name is stored there: 5280b661123Smrg [AC_CONFIG_COMMANDS([libtool], 5290b661123Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5300b661123Smrg dnl If the libtool generation code is destined for config.status, 5310b661123Smrg dnl expand the accumulated commands and init code now: 5320b661123Smrg [AC_CONFIG_COMMANDS([libtool], 5330b661123Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5340b661123Smrg])#_LT_CONFIG_COMMANDS 5350b661123Smrg 5360b661123Smrg 5370b661123Smrg# Initialize. 5380b661123Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5390b661123Smrg[ 5400b661123Smrg 5410b661123Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5420b661123Smrg# if CDPATH is set. 5430b661123Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5440b661123Smrg 5450b661123Smrgsed_quote_subst='$sed_quote_subst' 5460b661123Smrgdouble_quote_subst='$double_quote_subst' 5470b661123Smrgdelay_variable_subst='$delay_variable_subst' 5480b661123Smrg_LT_CONFIG_STATUS_DECLARATIONS 5490b661123SmrgLTCC='$LTCC' 5500b661123SmrgLTCFLAGS='$LTCFLAGS' 5510b661123Smrgcompiler='$compiler_DEFAULT' 5520b661123Smrg 553880c7e28Smrg# A function that is used when there is no print builtin or printf. 554880c7e28Smrgfunc_fallback_echo () 555880c7e28Smrg{ 556880c7e28Smrg eval 'cat <<_LTECHO_EOF 557880c7e28Smrg\$[]1 558880c7e28Smrg_LTECHO_EOF' 559880c7e28Smrg} 560880c7e28Smrg 5610b661123Smrg# Quote evaled strings. 5620b661123Smrgfor var in lt_decl_all_varnames([[ \ 5630b661123Smrg]], lt_decl_quote_varnames); do 564880c7e28Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5650b661123Smrg *[[\\\\\\\`\\"\\\$]]*) 566880c7e28Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 5670b661123Smrg ;; 5680b661123Smrg *) 5690b661123Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5700b661123Smrg ;; 5710b661123Smrg esac 5720b661123Smrgdone 5730b661123Smrg 5740b661123Smrg# Double-quote double-evaled strings. 5750b661123Smrgfor var in lt_decl_all_varnames([[ \ 5760b661123Smrg]], lt_decl_dquote_varnames); do 577880c7e28Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5780b661123Smrg *[[\\\\\\\`\\"\\\$]]*) 579880c7e28Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 5800b661123Smrg ;; 5810b661123Smrg *) 5820b661123Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5830b661123Smrg ;; 5840b661123Smrg esac 5850b661123Smrgdone 5860b661123Smrg 5870b661123Smrg_LT_OUTPUT_LIBTOOL_INIT 5880b661123Smrg]) 5890b661123Smrg 590880c7e28Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 591880c7e28Smrg# ------------------------------------ 592880c7e28Smrg# Generate a child script FILE with all initialization necessary to 593880c7e28Smrg# reuse the environment learned by the parent script, and make the 594880c7e28Smrg# file executable. If COMMENT is supplied, it is inserted after the 595880c7e28Smrg# `#!' sequence but before initialization text begins. After this 596880c7e28Smrg# macro, additional text can be appended to FILE to form the body of 597880c7e28Smrg# the child script. The macro ends with non-zero status if the 598880c7e28Smrg# file could not be fully written (such as if the disk is full). 599880c7e28Smrgm4_ifdef([AS_INIT_GENERATED], 600880c7e28Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 601880c7e28Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 602880c7e28Smrg[m4_require([AS_PREPARE])]dnl 603880c7e28Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 604880c7e28Smrg[lt_write_fail=0 605880c7e28Smrgcat >$1 <<_ASEOF || lt_write_fail=1 606880c7e28Smrg#! $SHELL 607880c7e28Smrg# Generated by $as_me. 608880c7e28Smrg$2 609880c7e28SmrgSHELL=\${CONFIG_SHELL-$SHELL} 610880c7e28Smrgexport SHELL 611880c7e28Smrg_ASEOF 612880c7e28Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 613880c7e28SmrgAS_SHELL_SANITIZE 614880c7e28Smrg_AS_PREPARE 615880c7e28Smrgexec AS_MESSAGE_FD>&1 616880c7e28Smrg_ASEOF 617880c7e28Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 618880c7e28Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6190b661123Smrg 6200b661123Smrg# LT_OUTPUT 6210b661123Smrg# --------- 6220b661123Smrg# This macro allows early generation of the libtool script (before 6230b661123Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6240b661123Smrg# tests. 6250b661123SmrgAC_DEFUN([LT_OUTPUT], 6260b661123Smrg[: ${CONFIG_LT=./config.lt} 6270b661123SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 628880c7e28Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 629880c7e28Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6300b661123Smrg 6310b661123Smrgcat >>"$CONFIG_LT" <<\_LTEOF 632880c7e28Smrglt_cl_silent=false 6330b661123Smrgexec AS_MESSAGE_LOG_FD>>config.log 6340b661123Smrg{ 6350b661123Smrg echo 6360b661123Smrg AS_BOX([Running $as_me.]) 6370b661123Smrg} >&AS_MESSAGE_LOG_FD 6380b661123Smrg 6390b661123Smrglt_cl_help="\ 6400b661123Smrg\`$as_me' creates a local libtool stub from the current configuration, 6410b661123Smrgfor use in further configure time tests before the real libtool is 6420b661123Smrggenerated. 6430b661123Smrg 6440b661123SmrgUsage: $[0] [[OPTIONS]] 6450b661123Smrg 6460b661123Smrg -h, --help print this help, then exit 6470b661123Smrg -V, --version print version number, then exit 6480b661123Smrg -q, --quiet do not print progress messages 6490b661123Smrg -d, --debug don't remove temporary files 6500b661123Smrg 6510b661123SmrgReport bugs to <bug-libtool@gnu.org>." 6520b661123Smrg 6530b661123Smrglt_cl_version="\ 6540b661123Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6550b661123Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6560b661123Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6570b661123Smrg 658880c7e28SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6590b661123SmrgThis config.lt script is free software; the Free Software Foundation 6600b661123Smrggives unlimited permision to copy, distribute and modify it." 6610b661123Smrg 6620b661123Smrgwhile test $[#] != 0 6630b661123Smrgdo 6640b661123Smrg case $[1] in 6650b661123Smrg --version | --v* | -V ) 6660b661123Smrg echo "$lt_cl_version"; exit 0 ;; 6670b661123Smrg --help | --h* | -h ) 6680b661123Smrg echo "$lt_cl_help"; exit 0 ;; 6690b661123Smrg --debug | --d* | -d ) 6700b661123Smrg debug=: ;; 6710b661123Smrg --quiet | --q* | --silent | --s* | -q ) 6720b661123Smrg lt_cl_silent=: ;; 6730b661123Smrg 6740b661123Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6750b661123SmrgTry \`$[0] --help' for more information.]) ;; 6760b661123Smrg 6770b661123Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6780b661123SmrgTry \`$[0] --help' for more information.]) ;; 6790b661123Smrg esac 6800b661123Smrg shift 6810b661123Smrgdone 6820b661123Smrg 6830b661123Smrgif $lt_cl_silent; then 6840b661123Smrg exec AS_MESSAGE_FD>/dev/null 6850b661123Smrgfi 6860b661123Smrg_LTEOF 6870b661123Smrg 6880b661123Smrgcat >>"$CONFIG_LT" <<_LTEOF 6890b661123Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 6900b661123Smrg_LTEOF 6910b661123Smrg 6920b661123Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6930b661123SmrgAC_MSG_NOTICE([creating $ofile]) 6940b661123Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 6950b661123SmrgAS_EXIT(0) 6960b661123Smrg_LTEOF 6970b661123Smrgchmod +x "$CONFIG_LT" 6980b661123Smrg 6990b661123Smrg# configure is writing to config.log, but config.lt does its own redirection, 7000b661123Smrg# appending to config.log, which fails on DOS, as config.log is still kept 7010b661123Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7020b661123Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 703880c7e28Smrglt_cl_success=: 704880c7e28Smrgtest "$silent" = yes && 705880c7e28Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 706880c7e28Smrgexec AS_MESSAGE_LOG_FD>/dev/null 707880c7e28Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 708880c7e28Smrgexec AS_MESSAGE_LOG_FD>>config.log 709880c7e28Smrg$lt_cl_success || AS_EXIT(1) 7100b661123Smrg])# LT_OUTPUT 7110b661123Smrg 7120b661123Smrg 7130b661123Smrg# _LT_CONFIG(TAG) 7140b661123Smrg# --------------- 7150b661123Smrg# If TAG is the built-in tag, create an initial libtool script with a 7160b661123Smrg# default configuration from the untagged config vars. Otherwise add code 7170b661123Smrg# to config.status for appending the configuration named by TAG from the 7180b661123Smrg# matching tagged config vars. 7190b661123Smrgm4_defun([_LT_CONFIG], 7200b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7210b661123Smrg_LT_CONFIG_SAVE_COMMANDS([ 7220b661123Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7230b661123Smrg m4_if(_LT_TAG, [C], [ 7240b661123Smrg # See if we are running on zsh, and set the options which allow our 7250b661123Smrg # commands through without removal of \ escapes. 7260b661123Smrg if test -n "${ZSH_VERSION+set}" ; then 7270b661123Smrg setopt NO_GLOB_SUBST 7280b661123Smrg fi 7290b661123Smrg 7300b661123Smrg cfgfile="${ofile}T" 7310b661123Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7320b661123Smrg $RM "$cfgfile" 7330b661123Smrg 7340b661123Smrg cat <<_LT_EOF >> "$cfgfile" 7350b661123Smrg#! $SHELL 7360b661123Smrg 7370b661123Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 7380b661123Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 7390b661123Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7400b661123Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7410b661123Smrg# 7420b661123Smrg_LT_COPYING 7430b661123Smrg_LT_LIBTOOL_TAGS 7440b661123Smrg 7450b661123Smrg# ### BEGIN LIBTOOL CONFIG 7460b661123Smrg_LT_LIBTOOL_CONFIG_VARS 7470b661123Smrg_LT_LIBTOOL_TAG_VARS 7480b661123Smrg# ### END LIBTOOL CONFIG 7490b661123Smrg 7500b661123Smrg_LT_EOF 7510b661123Smrg 7520b661123Smrg case $host_os in 7530b661123Smrg aix3*) 7540b661123Smrg cat <<\_LT_EOF >> "$cfgfile" 7550b661123Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7560b661123Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7570b661123Smrg# vanish in a puff of smoke. 7580b661123Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 7590b661123Smrg COLLECT_NAMES= 7600b661123Smrg export COLLECT_NAMES 7610b661123Smrgfi 7620b661123Smrg_LT_EOF 7630b661123Smrg ;; 7640b661123Smrg esac 7650b661123Smrg 7660b661123Smrg _LT_PROG_LTMAIN 7670b661123Smrg 7680b661123Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7690b661123Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7700b661123Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7710b661123Smrg # is reportedly fixed, but why not run on old versions too? 772880c7e28Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 773880c7e28Smrg || (rm -f "$cfgfile"; exit 1) 7740b661123Smrg 775880c7e28Smrg _LT_PROG_REPLACE_SHELLFNS 7760b661123Smrg 777880c7e28Smrg mv -f "$cfgfile" "$ofile" || 7780b661123Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 7790b661123Smrg chmod +x "$ofile" 7800b661123Smrg], 7810b661123Smrg[cat <<_LT_EOF >> "$ofile" 7820b661123Smrg 7830b661123Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 7840b661123Smrgdnl in a comment (ie after a #). 7850b661123Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 7860b661123Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 7870b661123Smrg# ### END LIBTOOL TAG CONFIG: $1 7880b661123Smrg_LT_EOF 7890b661123Smrg])dnl /m4_if 7900b661123Smrg], 7910b661123Smrg[m4_if([$1], [], [ 7920b661123Smrg PACKAGE='$PACKAGE' 7930b661123Smrg VERSION='$VERSION' 7940b661123Smrg TIMESTAMP='$TIMESTAMP' 7950b661123Smrg RM='$RM' 7960b661123Smrg ofile='$ofile'], []) 7970b661123Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 7980b661123Smrg])# _LT_CONFIG 7990b661123Smrg 8000b661123Smrg 8010b661123Smrg# LT_SUPPORTED_TAG(TAG) 8020b661123Smrg# --------------------- 8030b661123Smrg# Trace this macro to discover what tags are supported by the libtool 8040b661123Smrg# --tag option, using: 8050b661123Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8060b661123SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8070b661123Smrg 8080b661123Smrg 8090b661123Smrg# C support is built-in for now 8100b661123Smrgm4_define([_LT_LANG_C_enabled], []) 8110b661123Smrgm4_define([_LT_TAGS], []) 8120b661123Smrg 8130b661123Smrg 8140b661123Smrg# LT_LANG(LANG) 8150b661123Smrg# ------------- 8160b661123Smrg# Enable libtool support for the given language if not already enabled. 8170b661123SmrgAC_DEFUN([LT_LANG], 8180b661123Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8190b661123Smrgm4_case([$1], 8200b661123Smrg [C], [_LT_LANG(C)], 8210b661123Smrg [C++], [_LT_LANG(CXX)], 822880c7e28Smrg [Go], [_LT_LANG(GO)], 8230b661123Smrg [Java], [_LT_LANG(GCJ)], 8240b661123Smrg [Fortran 77], [_LT_LANG(F77)], 8250b661123Smrg [Fortran], [_LT_LANG(FC)], 8260b661123Smrg [Windows Resource], [_LT_LANG(RC)], 8270b661123Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8280b661123Smrg [_LT_LANG($1)], 8290b661123Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8300b661123Smrg])# LT_LANG 8310b661123Smrg 8320b661123Smrg 8330b661123Smrg# _LT_LANG(LANGNAME) 8340b661123Smrg# ------------------ 8350b661123Smrgm4_defun([_LT_LANG], 8360b661123Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8370b661123Smrg [LT_SUPPORTED_TAG([$1])dnl 8380b661123Smrg m4_append([_LT_TAGS], [$1 ])dnl 8390b661123Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8400b661123Smrg _LT_LANG_$1_CONFIG($1)])dnl 8410b661123Smrg])# _LT_LANG 8420b661123Smrg 8430b661123Smrg 844880c7e28Smrgm4_ifndef([AC_PROG_GO], [ 845880c7e28Smrg# NOTE: This macro has been submitted for inclusion into # 846880c7e28Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 847880c7e28Smrg# a released version of Autoconf we should remove this # 848880c7e28Smrg# macro and use it instead. # 849880c7e28Smrgm4_defun([AC_PROG_GO], 850880c7e28Smrg[AC_LANG_PUSH(Go)dnl 851880c7e28SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 852880c7e28SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 853880c7e28Smrg_AC_ARG_VAR_LDFLAGS()dnl 854880c7e28SmrgAC_CHECK_TOOL(GOC, gccgo) 855880c7e28Smrgif test -z "$GOC"; then 856880c7e28Smrg if test -n "$ac_tool_prefix"; then 857880c7e28Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 858880c7e28Smrg fi 859880c7e28Smrgfi 860880c7e28Smrgif test -z "$GOC"; then 861880c7e28Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 862880c7e28Smrgfi 863880c7e28Smrg])#m4_defun 864880c7e28Smrg])#m4_ifndef 865880c7e28Smrg 866880c7e28Smrg 8670b661123Smrg# _LT_LANG_DEFAULT_CONFIG 8680b661123Smrg# ----------------------- 8690b661123Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8700b661123Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8710b661123Smrg [LT_LANG(CXX)], 8720b661123Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8730b661123Smrg 8740b661123SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8750b661123Smrg [LT_LANG(F77)], 8760b661123Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8770b661123Smrg 8780b661123SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 8790b661123Smrg [LT_LANG(FC)], 8800b661123Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 8810b661123Smrg 8820b661123Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 8830b661123Smrgdnl pulling things in needlessly. 8840b661123SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 8850b661123Smrg [LT_LANG(GCJ)], 8860b661123Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 8870b661123Smrg [LT_LANG(GCJ)], 8880b661123Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 8890b661123Smrg [LT_LANG(GCJ)], 8900b661123Smrg [m4_ifdef([AC_PROG_GCJ], 8910b661123Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 8920b661123Smrg m4_ifdef([A][M_PROG_GCJ], 8930b661123Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 8940b661123Smrg m4_ifdef([LT_PROG_GCJ], 8950b661123Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 8960b661123Smrg 897880c7e28SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 898880c7e28Smrg [LT_LANG(GO)], 899880c7e28Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 900880c7e28Smrg 9010b661123SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9020b661123Smrg [LT_LANG(RC)], 9030b661123Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9040b661123Smrg])# _LT_LANG_DEFAULT_CONFIG 9050b661123Smrg 9060b661123Smrg# Obsolete macros: 9070b661123SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9080b661123SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9090b661123SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9100b661123SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 911880c7e28SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9120b661123Smrgdnl aclocal-1.4 backwards compatibility: 9130b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9140b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9150b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9160b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 917880c7e28Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9180b661123Smrg 9190b661123Smrg 9200b661123Smrg# _LT_TAG_COMPILER 9210b661123Smrg# ---------------- 9220b661123Smrgm4_defun([_LT_TAG_COMPILER], 92372313efbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 924bdcaa8d0Smrg 9250b661123Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9260b661123Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9270b661123Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9280b661123Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9290b661123Smrg 93072313efbSmrg# If no C compiler was specified, use CC. 93172313efbSmrgLTCC=${LTCC-"$CC"} 932bdcaa8d0Smrg 93372313efbSmrg# If no C compiler flags were specified, use CFLAGS. 93472313efbSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 935bdcaa8d0Smrg 93672313efbSmrg# Allow CC to be a program name with arguments. 93772313efbSmrgcompiler=$CC 9380b661123Smrg])# _LT_TAG_COMPILER 939bdcaa8d0Smrg 940bdcaa8d0Smrg 94172313efbSmrg# _LT_COMPILER_BOILERPLATE 94272313efbSmrg# ------------------------ 94372313efbSmrg# Check for compiler boilerplate output or warnings with 94472313efbSmrg# the simple compiler test code. 9450b661123Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9460b661123Smrg[m4_require([_LT_DECL_SED])dnl 94772313efbSmrgac_outfile=conftest.$ac_objext 94872313efbSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 94972313efbSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 95072313efbSmrg_lt_compiler_boilerplate=`cat conftest.err` 9510b661123Smrg$RM conftest* 95272313efbSmrg])# _LT_COMPILER_BOILERPLATE 953bdcaa8d0Smrg 954bdcaa8d0Smrg 95572313efbSmrg# _LT_LINKER_BOILERPLATE 95672313efbSmrg# ---------------------- 95772313efbSmrg# Check for linker boilerplate output or warnings with 95872313efbSmrg# the simple link test code. 9590b661123Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9600b661123Smrg[m4_require([_LT_DECL_SED])dnl 96172313efbSmrgac_outfile=conftest.$ac_objext 96272313efbSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 96372313efbSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 96472313efbSmrg_lt_linker_boilerplate=`cat conftest.err` 9650b661123Smrg$RM -r conftest* 96672313efbSmrg])# _LT_LINKER_BOILERPLATE 967bdcaa8d0Smrg 96872313efbSmrg# _LT_REQUIRED_DARWIN_CHECKS 9690b661123Smrg# ------------------------- 9700b661123Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 97172313efbSmrg case $host_os in 97272313efbSmrg rhapsody* | darwin*) 97372313efbSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 97472313efbSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9750b661123Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9760b661123Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9770b661123Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 9780b661123Smrg _LT_DECL([], [DSYMUTIL], [1], 9790b661123Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 9800b661123Smrg _LT_DECL([], [NMEDIT], [1], 9810b661123Smrg [Tool to change global to local symbols on Mac OS X]) 9820b661123Smrg _LT_DECL([], [LIPO], [1], 9830b661123Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 9840b661123Smrg _LT_DECL([], [OTOOL], [1], 9850b661123Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 9860b661123Smrg _LT_DECL([], [OTOOL64], [1], 9870b661123Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 98872313efbSmrg 98972313efbSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 99072313efbSmrg [lt_cv_apple_cc_single_mod=no 99172313efbSmrg if test -z "${LT_MULTI_MODULE}"; then 9920b661123Smrg # By default we will add the -single_module flag. You can override 9930b661123Smrg # by either setting the environment variable LT_MULTI_MODULE 9940b661123Smrg # non-empty at configure time, or by adding -multi_module to the 9950b661123Smrg # link flags. 9960b661123Smrg rm -rf libconftest.dylib* 9970b661123Smrg echo "int foo(void){return 1;}" > conftest.c 9980b661123Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 9990b661123Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10000b661123Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10010b661123Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10020b661123Smrg _lt_result=$? 1003880c7e28Smrg # If there is a non-empty error log, and "single_module" 1004880c7e28Smrg # appears in it, assume the flag caused a linker warning 1005880c7e28Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1006880c7e28Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1007880c7e28Smrg # Otherwise, if the output was created with a 0 exit code from 1008880c7e28Smrg # the compiler, it worked. 1009880c7e28Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 10100b661123Smrg lt_cv_apple_cc_single_mod=yes 10110b661123Smrg else 10120b661123Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10130b661123Smrg fi 10140b661123Smrg rm -rf libconftest.dylib* 10150b661123Smrg rm -f conftest.* 101672313efbSmrg fi]) 1017880c7e28Smrg 101872313efbSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 101972313efbSmrg [lt_cv_ld_exported_symbols_list], 102072313efbSmrg [lt_cv_ld_exported_symbols_list=no 102172313efbSmrg save_LDFLAGS=$LDFLAGS 102272313efbSmrg echo "_main" > conftest.sym 102372313efbSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 102472313efbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10250b661123Smrg [lt_cv_ld_exported_symbols_list=yes], 10260b661123Smrg [lt_cv_ld_exported_symbols_list=no]) 10270b661123Smrg LDFLAGS="$save_LDFLAGS" 1028bdcaa8d0Smrg ]) 1029880c7e28Smrg 1030880c7e28Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1031880c7e28Smrg [lt_cv_ld_force_load=no 1032880c7e28Smrg cat > conftest.c << _LT_EOF 1033880c7e28Smrgint forced_loaded() { return 2;} 1034880c7e28Smrg_LT_EOF 1035880c7e28Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1036880c7e28Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1037880c7e28Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1038880c7e28Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1039880c7e28Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1040880c7e28Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1041880c7e28Smrg cat > conftest.c << _LT_EOF 1042880c7e28Smrgint main() { return 0;} 1043880c7e28Smrg_LT_EOF 1044880c7e28Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1045880c7e28Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1046880c7e28Smrg _lt_result=$? 1047880c7e28Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1048880c7e28Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1049880c7e28Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1050880c7e28Smrg lt_cv_ld_force_load=yes 1051880c7e28Smrg else 1052880c7e28Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1053880c7e28Smrg fi 1054880c7e28Smrg rm -f conftest.err libconftest.a conftest conftest.c 1055880c7e28Smrg rm -rf conftest.dSYM 1056880c7e28Smrg ]) 105772313efbSmrg case $host_os in 10580b661123Smrg rhapsody* | darwin1.[[012]]) 105972313efbSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 106072313efbSmrg darwin1.*) 10610b661123Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10620b661123Smrg darwin*) # darwin 5.x on 106372313efbSmrg # if running on 10.5 or later, the deployment target defaults 106472313efbSmrg # to the OS version, if on x86, and 10.4, the deployment 106572313efbSmrg # target defaults to 10.4. Don't you love it? 106672313efbSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10670b661123Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10680b661123Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10690b661123Smrg 10.[[012]]*) 10700b661123Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10710b661123Smrg 10.*) 10720b661123Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 107372313efbSmrg esac 107472313efbSmrg ;; 107572313efbSmrg esac 107672313efbSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 107772313efbSmrg _lt_dar_single_mod='$single_module' 107872313efbSmrg fi 107972313efbSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 108072313efbSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 108172313efbSmrg else 10820b661123Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 108372313efbSmrg fi 1084880c7e28Smrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 10850b661123Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 108672313efbSmrg else 108772313efbSmrg _lt_dsymutil= 1088bdcaa8d0Smrg fi 1089bdcaa8d0Smrg ;; 1090bdcaa8d0Smrg esac 109172313efbSmrg]) 1092bdcaa8d0Smrg 10930b661123Smrg 1094880c7e28Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1095880c7e28Smrg# --------------------------------- 10960b661123Smrg# Checks for linker and compiler features on darwin 10970b661123Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 10980b661123Smrg[ 10990b661123Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11000b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11010b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11020b661123Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11030b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1104880c7e28Smrg if test "$lt_cv_ld_force_load" = "yes"; then 1105880c7e28Smrg _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\"`' 1106880c7e28Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1107880c7e28Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1108880c7e28Smrg else 1109880c7e28Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1110880c7e28Smrg fi 11110b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11120b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 11130b661123Smrg case $cc_basename in 11140b661123Smrg ifort*) _lt_dar_can_shared=yes ;; 11150b661123Smrg *) _lt_dar_can_shared=$GCC ;; 11160b661123Smrg esac 11170b661123Smrg if test "$_lt_dar_can_shared" = "yes"; then 1118880c7e28Smrg output_verbose_link_cmd=func_echo_all 11190b661123Smrg _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}" 11200b661123Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 11210b661123Smrg _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}" 11220b661123Smrg _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}" 11230b661123Smrg m4_if([$1], [CXX], 11240b661123Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 11250b661123Smrg _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}" 11260b661123Smrg _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}" 11270b661123Smrg fi 11280b661123Smrg],[]) 11290b661123Smrg else 11300b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11310b661123Smrg fi 11320b661123Smrg]) 11330b661123Smrg 1134880c7e28Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135880c7e28Smrg# ---------------------------------- 113672313efbSmrg# Links a minimal program and checks the executable 113772313efbSmrg# for the system default hardcoded library path. In most cases, 113872313efbSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 113972313efbSmrg# the location of the communication and MPI libs are included too. 114072313efbSmrg# If we don't find anything, use the default library path according 114172313efbSmrg# to the aix ld manual. 1142880c7e28Smrg# Store the results from the different compilers for each TAGNAME. 1143880c7e28Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11440b661123Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11450b661123Smrg[m4_require([_LT_DECL_SED])dnl 1146880c7e28Smrgif test "${lt_cv_aix_libpath+set}" = set; then 1147880c7e28Smrg aix_libpath=$lt_cv_aix_libpath 1148880c7e28Smrgelse 1149880c7e28Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150880c7e28Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151880c7e28Smrg lt_aix_libpath_sed='[ 1152880c7e28Smrg /Import File Strings/,/^$/ { 1153880c7e28Smrg /^0/ { 1154880c7e28Smrg s/^0 *\([^ ]*\) *$/\1/ 1155880c7e28Smrg p 1156880c7e28Smrg } 1157880c7e28Smrg }]' 1158880c7e28Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159880c7e28Smrg # Check for a 64-bit object if we didn't find anything. 1160880c7e28Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161880c7e28Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162880c7e28Smrg fi],[]) 1163880c7e28Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164880c7e28Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165880c7e28Smrg fi 1166880c7e28Smrg ]) 1167880c7e28Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168880c7e28Smrgfi 11690b661123Smrg])# _LT_SYS_MODULE_PATH_AIX 1170bdcaa8d0Smrg 1171bdcaa8d0Smrg 11720b661123Smrg# _LT_SHELL_INIT(ARG) 11730b661123Smrg# ------------------- 11740b661123Smrgm4_define([_LT_SHELL_INIT], 1175880c7e28Smrg[m4_divert_text([M4SH-INIT], [$1 1176880c7e28Smrg])])# _LT_SHELL_INIT 1177880c7e28Smrg 1178bdcaa8d0Smrg 1179bdcaa8d0Smrg 11800b661123Smrg# _LT_PROG_ECHO_BACKSLASH 11810b661123Smrg# ----------------------- 1182880c7e28Smrg# Find how we can fake an echo command that does not interpret backslash. 1183880c7e28Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1184880c7e28Smrg# of the generated configure script which will find a shell with a builtin 1185880c7e28Smrg# printf (which we can use as an echo command). 11860b661123Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1187880c7e28Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1188880c7e28SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1189880c7e28SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1190880c7e28Smrg 1191880c7e28SmrgAC_MSG_CHECKING([how to print strings]) 1192880c7e28Smrg# Test print first, because it will be a builtin if present. 1193880c7e28Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1194880c7e28Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1195880c7e28Smrg ECHO='print -r --' 1196880c7e28Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1197880c7e28Smrg ECHO='printf %s\n' 1198bdcaa8d0Smrgelse 1199880c7e28Smrg # Use this function as a fallback that always works. 1200880c7e28Smrg func_fallback_echo () 1201880c7e28Smrg { 1202880c7e28Smrg eval 'cat <<_LTECHO_EOF 1203880c7e28Smrg$[]1 1204880c7e28Smrg_LTECHO_EOF' 1205880c7e28Smrg } 1206880c7e28Smrg ECHO='func_fallback_echo' 1207bdcaa8d0Smrgfi 1208bdcaa8d0Smrg 1209880c7e28Smrg# func_echo_all arg... 1210880c7e28Smrg# Invoke $ECHO with all args, space-separated. 1211880c7e28Smrgfunc_echo_all () 1212880c7e28Smrg{ 1213880c7e28Smrg $ECHO "$*" 1214880c7e28Smrg} 121596ce994aSmrg 1216880c7e28Smrgcase "$ECHO" in 1217880c7e28Smrg printf*) AC_MSG_RESULT([printf]) ;; 1218880c7e28Smrg print*) AC_MSG_RESULT([print -r]) ;; 1219880c7e28Smrg *) AC_MSG_RESULT([cat]) ;; 1220880c7e28Smrgesac 1221bdcaa8d0Smrg 1222880c7e28Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1223880c7e28Smrg[_AS_DETECT_SUGGESTED([ 1224880c7e28Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225880c7e28Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226880c7e28Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227880c7e28Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228880c7e28Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1229880c7e28Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1230880c7e28Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1231bdcaa8d0Smrg 12320b661123Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233880c7e28Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12340b661123Smrg])# _LT_PROG_ECHO_BACKSLASH 1235bdcaa8d0Smrg 1236bdcaa8d0Smrg 1237880c7e28Smrg# _LT_WITH_SYSROOT 1238880c7e28Smrg# ---------------- 1239880c7e28SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240880c7e28Smrg[AC_MSG_CHECKING([for sysroot]) 1241880c7e28SmrgAC_ARG_WITH([sysroot], 1242880c7e28Smrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243880c7e28Smrg (or the compiler's sysroot if not specified).], 1244880c7e28Smrg[], [with_sysroot=no]) 1245880c7e28Smrg 1246880c7e28Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1247880c7e28Smrgdnl in case the user passed a directory name. 1248880c7e28Smrglt_sysroot= 1249880c7e28Smrgcase ${with_sysroot} in #( 1250880c7e28Smrg yes) 1251880c7e28Smrg if test "$GCC" = yes; then 1252880c7e28Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253880c7e28Smrg fi 1254880c7e28Smrg ;; #( 1255880c7e28Smrg /*) 1256880c7e28Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257880c7e28Smrg ;; #( 1258880c7e28Smrg no|'') 1259880c7e28Smrg ;; #( 1260880c7e28Smrg *) 1261880c7e28Smrg AC_MSG_RESULT([${with_sysroot}]) 1262880c7e28Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263880c7e28Smrg ;; 1264880c7e28Smrgesac 1265880c7e28Smrg 1266880c7e28Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1267880c7e28Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268880c7e28Smrg[dependent libraries, and in which our libraries should be installed.])]) 1269880c7e28Smrg 12700b661123Smrg# _LT_ENABLE_LOCK 12710b661123Smrg# --------------- 12720b661123Smrgm4_defun([_LT_ENABLE_LOCK], 127372313efbSmrg[AC_ARG_ENABLE([libtool-lock], 12740b661123Smrg [AS_HELP_STRING([--disable-libtool-lock], 12750b661123Smrg [avoid locking (might break parallel builds)])]) 127672313efbSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 127772313efbSmrg 127872313efbSmrg# Some flags need to be propagated to the compiler or linker for good 127972313efbSmrg# libtool support. 128072313efbSmrgcase $host in 128172313efbSmrgia64-*-hpux*) 128272313efbSmrg # Find out which ABI we are using. 128372313efbSmrg echo 'int i;' > conftest.$ac_ext 128472313efbSmrg if AC_TRY_EVAL(ac_compile); then 128572313efbSmrg case `/usr/bin/file conftest.$ac_objext` in 12860b661123Smrg *ELF-32*) 12870b661123Smrg HPUX_IA64_MODE="32" 12880b661123Smrg ;; 12890b661123Smrg *ELF-64*) 12900b661123Smrg HPUX_IA64_MODE="64" 12910b661123Smrg ;; 1292bdcaa8d0Smrg esac 129372313efbSmrg fi 129472313efbSmrg rm -rf conftest* 129572313efbSmrg ;; 129672313efbSmrg*-*-irix6*) 129772313efbSmrg # Find out which ABI we are using. 1298880c7e28Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 129972313efbSmrg if AC_TRY_EVAL(ac_compile); then 13000b661123Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 13010b661123Smrg case `/usr/bin/file conftest.$ac_objext` in 13020b661123Smrg *32-bit*) 13030b661123Smrg LD="${LD-ld} -melf32bsmip" 13040b661123Smrg ;; 13050b661123Smrg *N32*) 13060b661123Smrg LD="${LD-ld} -melf32bmipn32" 13070b661123Smrg ;; 13080b661123Smrg *64-bit*) 13090b661123Smrg LD="${LD-ld} -melf64bmip" 13100b661123Smrg ;; 13110b661123Smrg esac 13120b661123Smrg else 13130b661123Smrg case `/usr/bin/file conftest.$ac_objext` in 13140b661123Smrg *32-bit*) 13150b661123Smrg LD="${LD-ld} -32" 13160b661123Smrg ;; 13170b661123Smrg *N32*) 13180b661123Smrg LD="${LD-ld} -n32" 13190b661123Smrg ;; 13200b661123Smrg *64-bit*) 13210b661123Smrg LD="${LD-ld} -64" 13220b661123Smrg ;; 13230b661123Smrg esac 13240b661123Smrg fi 1325bdcaa8d0Smrg fi 132672313efbSmrg rm -rf conftest* 1327bdcaa8d0Smrg ;; 1328bdcaa8d0Smrg 132972313efbSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 13300b661123Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 133172313efbSmrg # Find out which ABI we are using. 133272313efbSmrg echo 'int i;' > conftest.$ac_ext 133372313efbSmrg if AC_TRY_EVAL(ac_compile); then 133472313efbSmrg case `/usr/bin/file conftest.o` in 13350b661123Smrg *32-bit*) 13360b661123Smrg case $host in 13370b661123Smrg x86_64-*kfreebsd*-gnu) 13380b661123Smrg LD="${LD-ld} -m elf_i386_fbsd" 13390b661123Smrg ;; 13400b661123Smrg x86_64-*linux*) 13410b661123Smrg LD="${LD-ld} -m elf_i386" 13420b661123Smrg ;; 13430b661123Smrg ppc64-*linux*|powerpc64-*linux*) 13440b661123Smrg LD="${LD-ld} -m elf32ppclinux" 13450b661123Smrg ;; 13460b661123Smrg s390x-*linux*) 13470b661123Smrg LD="${LD-ld} -m elf_s390" 13480b661123Smrg ;; 13490b661123Smrg sparc64-*linux*) 13500b661123Smrg LD="${LD-ld} -m elf32_sparc" 13510b661123Smrg ;; 13520b661123Smrg esac 13530b661123Smrg ;; 13540b661123Smrg *64-bit*) 13550b661123Smrg case $host in 13560b661123Smrg x86_64-*kfreebsd*-gnu) 13570b661123Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 13580b661123Smrg ;; 13590b661123Smrg x86_64-*linux*) 13600b661123Smrg LD="${LD-ld} -m elf_x86_64" 13610b661123Smrg ;; 13620b661123Smrg ppc*-*linux*|powerpc*-*linux*) 13630b661123Smrg LD="${LD-ld} -m elf64ppc" 13640b661123Smrg ;; 13650b661123Smrg s390*-*linux*|s390*-*tpf*) 13660b661123Smrg LD="${LD-ld} -m elf64_s390" 13670b661123Smrg ;; 13680b661123Smrg sparc*-*linux*) 13690b661123Smrg LD="${LD-ld} -m elf64_sparc" 13700b661123Smrg ;; 13710b661123Smrg esac 13720b661123Smrg ;; 137372313efbSmrg esac 137472313efbSmrg fi 137572313efbSmrg rm -rf conftest* 1376bdcaa8d0Smrg ;; 1377bdcaa8d0Smrg 137872313efbSmrg*-*-sco3.2v5*) 137972313efbSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 138072313efbSmrg SAVE_CFLAGS="$CFLAGS" 138172313efbSmrg CFLAGS="$CFLAGS -belf" 138272313efbSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 138372313efbSmrg [AC_LANG_PUSH(C) 13840b661123Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 138572313efbSmrg AC_LANG_POP]) 138672313efbSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 138772313efbSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 138872313efbSmrg CFLAGS="$SAVE_CFLAGS" 138972313efbSmrg fi 1390bdcaa8d0Smrg ;; 1391880c7e28Smrg*-*solaris*) 139272313efbSmrg # Find out which ABI we are using. 139372313efbSmrg echo 'int i;' > conftest.$ac_ext 139472313efbSmrg if AC_TRY_EVAL(ac_compile); then 139572313efbSmrg case `/usr/bin/file conftest.o` in 139672313efbSmrg *64-bit*) 139772313efbSmrg case $lt_cv_prog_gnu_ld in 1398880c7e28Smrg yes*) 1399880c7e28Smrg case $host in 1400880c7e28Smrg i?86-*-solaris*) 1401880c7e28Smrg LD="${LD-ld} -m elf_x86_64" 1402880c7e28Smrg ;; 1403880c7e28Smrg sparc*-*-solaris*) 1404880c7e28Smrg LD="${LD-ld} -m elf64_sparc" 1405880c7e28Smrg ;; 1406880c7e28Smrg esac 1407880c7e28Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1408880c7e28Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1409880c7e28Smrg LD="${LD-ld}_sol2" 1410880c7e28Smrg fi 1411880c7e28Smrg ;; 141272313efbSmrg *) 14130b661123Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 141472313efbSmrg LD="${LD-ld} -64" 141572313efbSmrg fi 141672313efbSmrg ;; 141772313efbSmrg esac 141872313efbSmrg ;; 141972313efbSmrg esac 142072313efbSmrg fi 142172313efbSmrg rm -rf conftest* 1422bdcaa8d0Smrg ;; 142372313efbSmrgesac 1424bdcaa8d0Smrg 142572313efbSmrgneed_locks="$enable_libtool_lock" 14260b661123Smrg])# _LT_ENABLE_LOCK 14270b661123Smrg 14280b661123Smrg 1429880c7e28Smrg# _LT_PROG_AR 1430880c7e28Smrg# ----------- 1431880c7e28Smrgm4_defun([_LT_PROG_AR], 1432880c7e28Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1433880c7e28Smrg: ${AR=ar} 1434880c7e28Smrg: ${AR_FLAGS=cru} 1435880c7e28Smrg_LT_DECL([], [AR], [1], [The archiver]) 1436880c7e28Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1437880c7e28Smrg 1438880c7e28SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1439880c7e28Smrg [lt_cv_ar_at_file=no 1440880c7e28Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1441880c7e28Smrg [echo conftest.$ac_objext > conftest.lst 1442880c7e28Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1443880c7e28Smrg AC_TRY_EVAL([lt_ar_try]) 1444880c7e28Smrg if test "$ac_status" -eq 0; then 1445880c7e28Smrg # Ensure the archiver fails upon bogus file names. 1446880c7e28Smrg rm -f conftest.$ac_objext libconftest.a 1447880c7e28Smrg AC_TRY_EVAL([lt_ar_try]) 1448880c7e28Smrg if test "$ac_status" -ne 0; then 1449880c7e28Smrg lt_cv_ar_at_file=@ 1450880c7e28Smrg fi 1451880c7e28Smrg fi 1452880c7e28Smrg rm -f conftest.* libconftest.a 1453880c7e28Smrg ]) 1454880c7e28Smrg ]) 1455880c7e28Smrg 1456880c7e28Smrgif test "x$lt_cv_ar_at_file" = xno; then 1457880c7e28Smrg archiver_list_spec= 1458880c7e28Smrgelse 1459880c7e28Smrg archiver_list_spec=$lt_cv_ar_at_file 1460880c7e28Smrgfi 1461880c7e28Smrg_LT_DECL([], [archiver_list_spec], [1], 1462880c7e28Smrg [How to feed a file listing to the archiver]) 1463880c7e28Smrg])# _LT_PROG_AR 1464880c7e28Smrg 1465880c7e28Smrg 14660b661123Smrg# _LT_CMD_OLD_ARCHIVE 14670b661123Smrg# ------------------- 14680b661123Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1469880c7e28Smrg[_LT_PROG_AR 14700b661123Smrg 14710b661123SmrgAC_CHECK_TOOL(STRIP, strip, :) 14720b661123Smrgtest -z "$STRIP" && STRIP=: 14730b661123Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 14740b661123Smrg 14750b661123SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 14760b661123Smrgtest -z "$RANLIB" && RANLIB=: 14770b661123Smrg_LT_DECL([], [RANLIB], [1], 14780b661123Smrg [Commands used to install an old-style archive]) 14790b661123Smrg 14800b661123Smrg# Determine commands to create old-style static archives. 14810b661123Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 14820b661123Smrgold_postinstall_cmds='chmod 644 $oldlib' 14830b661123Smrgold_postuninstall_cmds= 148472313efbSmrg 14850b661123Smrgif test -n "$RANLIB"; then 14860b661123Smrg case $host_os in 14870b661123Smrg openbsd*) 1488880c7e28Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 14890b661123Smrg ;; 14900b661123Smrg *) 1491880c7e28Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 14920b661123Smrg ;; 14930b661123Smrg esac 1494880c7e28Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 14950b661123Smrgfi 1496880c7e28Smrg 1497880c7e28Smrgcase $host_os in 1498880c7e28Smrg darwin*) 1499880c7e28Smrg lock_old_archive_extraction=yes ;; 1500880c7e28Smrg *) 1501880c7e28Smrg lock_old_archive_extraction=no ;; 1502880c7e28Smrgesac 15030b661123Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15040b661123Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15050b661123Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15060b661123Smrg [Commands used to build an old-style archive]) 1507880c7e28Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1508880c7e28Smrg [Whether to use a lock for old archive extraction]) 15090b661123Smrg])# _LT_CMD_OLD_ARCHIVE 1510bdcaa8d0Smrg 1511bdcaa8d0Smrg 15120b661123Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 151372313efbSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 151472313efbSmrg# ---------------------------------------------------------------- 151572313efbSmrg# Check whether the given compiler option works 15160b661123SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15170b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15180b661123Smrgm4_require([_LT_DECL_SED])dnl 151972313efbSmrgAC_CACHE_CHECK([$1], [$2], 152072313efbSmrg [$2=no 15210b661123Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 152272313efbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 152372313efbSmrg lt_compiler_flag="$3" 152472313efbSmrg # Insert the option either (1) after the last *FLAGS variable, or 152572313efbSmrg # (2) before a word containing "conftest.", or (3) at the end. 152672313efbSmrg # Note that $ac_compile itself does not contain backslashes and begins 152772313efbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 152872313efbSmrg # The option is referenced via a variable to avoid confusing sed. 152972313efbSmrg lt_compile=`echo "$ac_compile" | $SED \ 153072313efbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 153172313efbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 153272313efbSmrg -e 's:$: $lt_compiler_flag:'` 1533880c7e28Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 153472313efbSmrg (eval "$lt_compile" 2>conftest.err) 153572313efbSmrg ac_status=$? 153672313efbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1537880c7e28Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 153872313efbSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 153972313efbSmrg # The compiler can only warn and ignore the option if not recognized 154072313efbSmrg # So say no if there are warnings other than the usual output. 1541880c7e28Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 154272313efbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 154372313efbSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 154472313efbSmrg $2=yes 154572313efbSmrg fi 154672313efbSmrg fi 15470b661123Smrg $RM conftest* 154872313efbSmrg]) 1549bdcaa8d0Smrg 155072313efbSmrgif test x"[$]$2" = xyes; then 15510b661123Smrg m4_if([$5], , :, [$5]) 155272313efbSmrgelse 15530b661123Smrg m4_if([$6], , :, [$6]) 155472313efbSmrgfi 15550b661123Smrg])# _LT_COMPILER_OPTION 155672313efbSmrg 15570b661123Smrg# Old name: 15580b661123SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 15590b661123Smrgdnl aclocal-1.4 backwards compatibility: 15600b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 156172313efbSmrg 15620b661123Smrg 15630b661123Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15640b661123Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 15650b661123Smrg# ---------------------------------------------------- 15660b661123Smrg# Check whether the given linker option works 15670b661123SmrgAC_DEFUN([_LT_LINKER_OPTION], 15680b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15690b661123Smrgm4_require([_LT_DECL_SED])dnl 157072313efbSmrgAC_CACHE_CHECK([$1], [$2], 157172313efbSmrg [$2=no 157272313efbSmrg save_LDFLAGS="$LDFLAGS" 157372313efbSmrg LDFLAGS="$LDFLAGS $3" 157472313efbSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 157572313efbSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 157672313efbSmrg # The linker can only warn and ignore the option if not recognized 157772313efbSmrg # So say no if there are warnings 157872313efbSmrg if test -s conftest.err; then 157972313efbSmrg # Append any errors to the config.log. 158072313efbSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1581880c7e28Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 158272313efbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 158372313efbSmrg if diff conftest.exp conftest.er2 >/dev/null; then 158472313efbSmrg $2=yes 158572313efbSmrg fi 158672313efbSmrg else 158772313efbSmrg $2=yes 158872313efbSmrg fi 158972313efbSmrg fi 15900b661123Smrg $RM -r conftest* 159172313efbSmrg LDFLAGS="$save_LDFLAGS" 159272313efbSmrg]) 159372313efbSmrg 159472313efbSmrgif test x"[$]$2" = xyes; then 15950b661123Smrg m4_if([$4], , :, [$4]) 159672313efbSmrgelse 15970b661123Smrg m4_if([$5], , :, [$5]) 159872313efbSmrgfi 15990b661123Smrg])# _LT_LINKER_OPTION 160072313efbSmrg 16010b661123Smrg# Old name: 16020b661123SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16030b661123Smrgdnl aclocal-1.4 backwards compatibility: 16040b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 160572313efbSmrg 16060b661123Smrg 16070b661123Smrg# LT_CMD_MAX_LEN 16080b661123Smrg#--------------- 16090b661123SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16100b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16110b661123Smrg# find the maximum length of command line arguments 161272313efbSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 161372313efbSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 161472313efbSmrg i=0 161572313efbSmrg teststring="ABCD" 161672313efbSmrg 161772313efbSmrg case $build_os in 161872313efbSmrg msdosdjgpp*) 161972313efbSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 162072313efbSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 162172313efbSmrg # during glob expansion). Even if it were fixed, the result of this 162272313efbSmrg # check would be larger than it should be. 162372313efbSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1624bdcaa8d0Smrg ;; 162572313efbSmrg 162672313efbSmrg gnu*) 162772313efbSmrg # Under GNU Hurd, this test is not required because there is 162872313efbSmrg # no limit to the length of command line arguments. 162972313efbSmrg # Libtool will interpret -1 as no limit whatsoever 163072313efbSmrg lt_cv_sys_max_cmd_len=-1; 1631bdcaa8d0Smrg ;; 163272313efbSmrg 16330b661123Smrg cygwin* | mingw* | cegcc*) 163472313efbSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 163572313efbSmrg # about 5 minutes as the teststring grows exponentially. 163672313efbSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 163772313efbSmrg # you end up with a "frozen" computer, even though with patience 163872313efbSmrg # the test eventually succeeds (with a max line length of 256k). 163972313efbSmrg # Instead, let's just punt: use the minimum linelength reported by 164072313efbSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 164172313efbSmrg lt_cv_sys_max_cmd_len=8192; 1642bdcaa8d0Smrg ;; 1643bdcaa8d0Smrg 1644880c7e28Smrg mint*) 1645880c7e28Smrg # On MiNT this can take a long time and run out of memory. 1646880c7e28Smrg lt_cv_sys_max_cmd_len=8192; 1647880c7e28Smrg ;; 1648880c7e28Smrg 164972313efbSmrg amigaos*) 165072313efbSmrg # On AmigaOS with pdksh, this test takes hours, literally. 165172313efbSmrg # So we just punt and use a minimum line length of 8192. 165272313efbSmrg lt_cv_sys_max_cmd_len=8192; 165372313efbSmrg ;; 1654bdcaa8d0Smrg 165572313efbSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 165672313efbSmrg # This has been around since 386BSD, at least. Likely further. 165772313efbSmrg if test -x /sbin/sysctl; then 165872313efbSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 165972313efbSmrg elif test -x /usr/sbin/sysctl; then 166072313efbSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1661bdcaa8d0Smrg else 166272313efbSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1663bdcaa8d0Smrg fi 166472313efbSmrg # And add a safety zone 166572313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 166672313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1667bdcaa8d0Smrg ;; 1668bdcaa8d0Smrg 166972313efbSmrg interix*) 167072313efbSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 167172313efbSmrg lt_cv_sys_max_cmd_len=196608 167272313efbSmrg ;; 1673bdcaa8d0Smrg 1674880c7e28Smrg os2*) 1675880c7e28Smrg # The test takes a long time on OS/2. 1676880c7e28Smrg lt_cv_sys_max_cmd_len=8192 1677880c7e28Smrg ;; 1678880c7e28Smrg 167972313efbSmrg osf*) 168072313efbSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 168172313efbSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 168272313efbSmrg # nice to cause kernel panics so lets avoid the loop below. 168372313efbSmrg # First set a reasonable default. 168472313efbSmrg lt_cv_sys_max_cmd_len=16384 168572313efbSmrg # 168672313efbSmrg if test -x /sbin/sysconfig; then 168772313efbSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 168872313efbSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 168972313efbSmrg esac 169072313efbSmrg fi 169172313efbSmrg ;; 169272313efbSmrg sco3.2v5*) 169372313efbSmrg lt_cv_sys_max_cmd_len=102400 169472313efbSmrg ;; 169572313efbSmrg sysv5* | sco5v6* | sysv4.2uw2*) 169672313efbSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 169772313efbSmrg if test -n "$kargmax"; then 16980b661123Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 169972313efbSmrg else 170072313efbSmrg lt_cv_sys_max_cmd_len=32768 170172313efbSmrg fi 1702bdcaa8d0Smrg ;; 1703bdcaa8d0Smrg *) 170472313efbSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 170572313efbSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 170672313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 170772313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 170872313efbSmrg else 17090b661123Smrg # Make teststring a little bigger before we do anything with it. 17100b661123Smrg # a 1K string should be a reasonable start. 17110b661123Smrg for i in 1 2 3 4 5 6 7 8 ; do 17120b661123Smrg teststring=$teststring$teststring 17130b661123Smrg done 171472313efbSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17150b661123Smrg # If test is not a shell built-in, we'll probably end up computing a 17160b661123Smrg # maximum length that is only half of the actual maximum length, but 17170b661123Smrg # we can't tell. 1718880c7e28Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1719880c7e28Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 172072313efbSmrg test $i != 17 # 1/2 MB should be enough 172172313efbSmrg do 172272313efbSmrg i=`expr $i + 1` 172372313efbSmrg teststring=$teststring$teststring 172472313efbSmrg done 17250b661123Smrg # Only check the string length outside the loop. 17260b661123Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 172772313efbSmrg teststring= 17280b661123Smrg # Add a significant safety factor because C++ compilers can tack on 17290b661123Smrg # massive amounts of additional arguments before passing them to the 17300b661123Smrg # linker. It appears as though 1/2 is a usable value. 173172313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 173272313efbSmrg fi 1733bdcaa8d0Smrg ;; 1734bdcaa8d0Smrg esac 173572313efbSmrg]) 173672313efbSmrgif test -n $lt_cv_sys_max_cmd_len ; then 173772313efbSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 173872313efbSmrgelse 173972313efbSmrg AC_MSG_RESULT(none) 174072313efbSmrgfi 17410b661123Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 17420b661123Smrg_LT_DECL([], [max_cmd_len], [0], 17430b661123Smrg [What is the maximum length of a command?]) 17440b661123Smrg])# LT_CMD_MAX_LEN 1745bdcaa8d0Smrg 17460b661123Smrg# Old name: 17470b661123SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 17480b661123Smrgdnl aclocal-1.4 backwards compatibility: 17490b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1750bdcaa8d0Smrg 17510b661123Smrg 17520b661123Smrg# _LT_HEADER_DLFCN 17530b661123Smrg# ---------------- 17540b661123Smrgm4_defun([_LT_HEADER_DLFCN], 17550b661123Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 17560b661123Smrg])# _LT_HEADER_DLFCN 1757bdcaa8d0Smrg 1758bdcaa8d0Smrg 17590b661123Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 17600b661123Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 17610b661123Smrg# ---------------------------------------------------------------- 17620b661123Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 17630b661123Smrg[m4_require([_LT_HEADER_DLFCN])dnl 176472313efbSmrgif test "$cross_compiling" = yes; then : 176572313efbSmrg [$4] 176672313efbSmrgelse 176772313efbSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 176872313efbSmrg lt_status=$lt_dlunknown 17690b661123Smrg cat > conftest.$ac_ext <<_LT_EOF 1770880c7e28Smrg[#line $LINENO "configure" 177172313efbSmrg#include "confdefs.h" 1772bdcaa8d0Smrg 177372313efbSmrg#if HAVE_DLFCN_H 177472313efbSmrg#include <dlfcn.h> 177572313efbSmrg#endif 1776bdcaa8d0Smrg 177772313efbSmrg#include <stdio.h> 1778bdcaa8d0Smrg 177972313efbSmrg#ifdef RTLD_GLOBAL 178072313efbSmrg# define LT_DLGLOBAL RTLD_GLOBAL 178172313efbSmrg#else 178272313efbSmrg# ifdef DL_GLOBAL 178372313efbSmrg# define LT_DLGLOBAL DL_GLOBAL 178472313efbSmrg# else 178572313efbSmrg# define LT_DLGLOBAL 0 178672313efbSmrg# endif 178772313efbSmrg#endif 1788bdcaa8d0Smrg 178972313efbSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 179072313efbSmrg find out it does not work in some platform. */ 179172313efbSmrg#ifndef LT_DLLAZY_OR_NOW 179272313efbSmrg# ifdef RTLD_LAZY 179372313efbSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 179472313efbSmrg# else 179572313efbSmrg# ifdef DL_LAZY 179672313efbSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 179772313efbSmrg# else 179872313efbSmrg# ifdef RTLD_NOW 179972313efbSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 180072313efbSmrg# else 180172313efbSmrg# ifdef DL_NOW 180272313efbSmrg# define LT_DLLAZY_OR_NOW DL_NOW 180372313efbSmrg# else 180472313efbSmrg# define LT_DLLAZY_OR_NOW 0 180572313efbSmrg# endif 180672313efbSmrg# endif 180772313efbSmrg# endif 180872313efbSmrg# endif 180972313efbSmrg#endif 181072313efbSmrg 1811880c7e28Smrg/* When -fvisbility=hidden is used, assume the code has been annotated 1812880c7e28Smrg correspondingly for the symbols needed. */ 1813880c7e28Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1814880c7e28Smrgint fnord () __attribute__((visibility("default"))); 1815880c7e28Smrg#endif 1816880c7e28Smrg 1817880c7e28Smrgint fnord () { return 42; } 181872313efbSmrgint main () 181972313efbSmrg{ 182072313efbSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 182172313efbSmrg int status = $lt_dlunknown; 182272313efbSmrg 182372313efbSmrg if (self) 182472313efbSmrg { 182572313efbSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1826880c7e28Smrg else 1827880c7e28Smrg { 1828880c7e28Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1829880c7e28Smrg else puts (dlerror ()); 1830880c7e28Smrg } 183172313efbSmrg /* dlclose (self); */ 183272313efbSmrg } 1833bdcaa8d0Smrg else 183472313efbSmrg puts (dlerror ()); 183572313efbSmrg 18360b661123Smrg return status; 183772313efbSmrg}] 18380b661123Smrg_LT_EOF 183972313efbSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 184072313efbSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 184172313efbSmrg lt_status=$? 184272313efbSmrg case x$lt_status in 184372313efbSmrg x$lt_dlno_uscore) $1 ;; 184472313efbSmrg x$lt_dlneed_uscore) $2 ;; 184572313efbSmrg x$lt_dlunknown|x*) $3 ;; 184672313efbSmrg esac 184772313efbSmrg else : 184872313efbSmrg # compilation failed 184972313efbSmrg $3 1850bdcaa8d0Smrg fi 185172313efbSmrgfi 185272313efbSmrgrm -fr conftest* 18530b661123Smrg])# _LT_TRY_DLOPEN_SELF 1854bdcaa8d0Smrg 1855bdcaa8d0Smrg 18560b661123Smrg# LT_SYS_DLOPEN_SELF 18570b661123Smrg# ------------------ 18580b661123SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 18590b661123Smrg[m4_require([_LT_HEADER_DLFCN])dnl 186072313efbSmrgif test "x$enable_dlopen" != xyes; then 186172313efbSmrg enable_dlopen=unknown 186272313efbSmrg enable_dlopen_self=unknown 186372313efbSmrg enable_dlopen_self_static=unknown 186472313efbSmrgelse 186572313efbSmrg lt_cv_dlopen=no 186672313efbSmrg lt_cv_dlopen_libs= 1867bdcaa8d0Smrg 186872313efbSmrg case $host_os in 186972313efbSmrg beos*) 187072313efbSmrg lt_cv_dlopen="load_add_on" 187172313efbSmrg lt_cv_dlopen_libs= 187272313efbSmrg lt_cv_dlopen_self=yes 187372313efbSmrg ;; 1874bdcaa8d0Smrg 18750b661123Smrg mingw* | pw32* | cegcc*) 187672313efbSmrg lt_cv_dlopen="LoadLibrary" 187772313efbSmrg lt_cv_dlopen_libs= 18780b661123Smrg ;; 1879bdcaa8d0Smrg 188072313efbSmrg cygwin*) 188172313efbSmrg lt_cv_dlopen="dlopen" 188272313efbSmrg lt_cv_dlopen_libs= 18830b661123Smrg ;; 1884bdcaa8d0Smrg 188572313efbSmrg darwin*) 188672313efbSmrg # if libdl is installed we need to link against it 188772313efbSmrg AC_CHECK_LIB([dl], [dlopen], 188872313efbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 188972313efbSmrg lt_cv_dlopen="dyld" 189072313efbSmrg lt_cv_dlopen_libs= 189172313efbSmrg lt_cv_dlopen_self=yes 189272313efbSmrg ]) 18930b661123Smrg ;; 1894bdcaa8d0Smrg 189572313efbSmrg *) 189672313efbSmrg AC_CHECK_FUNC([shl_load], 189772313efbSmrg [lt_cv_dlopen="shl_load"], 189872313efbSmrg [AC_CHECK_LIB([dld], [shl_load], 189972313efbSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 190072313efbSmrg [AC_CHECK_FUNC([dlopen], 190172313efbSmrg [lt_cv_dlopen="dlopen"], 190272313efbSmrg [AC_CHECK_LIB([dl], [dlopen], 190372313efbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 190472313efbSmrg [AC_CHECK_LIB([svld], [dlopen], 190572313efbSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 190672313efbSmrg [AC_CHECK_LIB([dld], [dld_link], 190772313efbSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 190872313efbSmrg ]) 190972313efbSmrg ]) 191072313efbSmrg ]) 191172313efbSmrg ]) 191272313efbSmrg ]) 191372313efbSmrg ;; 191472313efbSmrg esac 191572313efbSmrg 191672313efbSmrg if test "x$lt_cv_dlopen" != xno; then 191772313efbSmrg enable_dlopen=yes 1918bdcaa8d0Smrg else 191972313efbSmrg enable_dlopen=no 1920bdcaa8d0Smrg fi 1921bdcaa8d0Smrg 192272313efbSmrg case $lt_cv_dlopen in 192372313efbSmrg dlopen) 192472313efbSmrg save_CPPFLAGS="$CPPFLAGS" 192572313efbSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1926bdcaa8d0Smrg 192772313efbSmrg save_LDFLAGS="$LDFLAGS" 192872313efbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1929bdcaa8d0Smrg 193072313efbSmrg save_LIBS="$LIBS" 193172313efbSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1932bdcaa8d0Smrg 193372313efbSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 193472313efbSmrg lt_cv_dlopen_self, [dnl 19350b661123Smrg _LT_TRY_DLOPEN_SELF( 193672313efbSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 193772313efbSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 193872313efbSmrg ]) 1939bdcaa8d0Smrg 194072313efbSmrg if test "x$lt_cv_dlopen_self" = xyes; then 194172313efbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 194272313efbSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 19430b661123Smrg lt_cv_dlopen_self_static, [dnl 19440b661123Smrg _LT_TRY_DLOPEN_SELF( 194572313efbSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 194672313efbSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 194772313efbSmrg ]) 1948bdcaa8d0Smrg fi 1949bdcaa8d0Smrg 195072313efbSmrg CPPFLAGS="$save_CPPFLAGS" 195172313efbSmrg LDFLAGS="$save_LDFLAGS" 195272313efbSmrg LIBS="$save_LIBS" 195372313efbSmrg ;; 195472313efbSmrg esac 1955bdcaa8d0Smrg 195672313efbSmrg case $lt_cv_dlopen_self in 195772313efbSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 195872313efbSmrg *) enable_dlopen_self=unknown ;; 195972313efbSmrg esac 1960bdcaa8d0Smrg 196172313efbSmrg case $lt_cv_dlopen_self_static in 196272313efbSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 196372313efbSmrg *) enable_dlopen_self_static=unknown ;; 196472313efbSmrg esac 1965bdcaa8d0Smrgfi 19660b661123Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 19670b661123Smrg [Whether dlopen is supported]) 19680b661123Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 19690b661123Smrg [Whether dlopen of programs is supported]) 19700b661123Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 19710b661123Smrg [Whether dlopen of statically linked programs is supported]) 19720b661123Smrg])# LT_SYS_DLOPEN_SELF 1973bdcaa8d0Smrg 19740b661123Smrg# Old name: 19750b661123SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 19760b661123Smrgdnl aclocal-1.4 backwards compatibility: 19770b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1978bdcaa8d0Smrg 19790b661123Smrg 19800b661123Smrg# _LT_COMPILER_C_O([TAGNAME]) 19810b661123Smrg# --------------------------- 19820b661123Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 19830b661123Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 19840b661123Smrgm4_defun([_LT_COMPILER_C_O], 19850b661123Smrg[m4_require([_LT_DECL_SED])dnl 19860b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 19870b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 198872313efbSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 19890b661123Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 19900b661123Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 19910b661123Smrg $RM -r conftest 2>/dev/null 199272313efbSmrg mkdir conftest 199372313efbSmrg cd conftest 199472313efbSmrg mkdir out 199572313efbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1996bdcaa8d0Smrg 199772313efbSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 199872313efbSmrg # Insert the option either (1) after the last *FLAGS variable, or 199972313efbSmrg # (2) before a word containing "conftest.", or (3) at the end. 200072313efbSmrg # Note that $ac_compile itself does not contain backslashes and begins 200172313efbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 200272313efbSmrg lt_compile=`echo "$ac_compile" | $SED \ 200372313efbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 200472313efbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 200572313efbSmrg -e 's:$: $lt_compiler_flag:'` 2006880c7e28Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 200772313efbSmrg (eval "$lt_compile" 2>out/conftest.err) 200872313efbSmrg ac_status=$? 200972313efbSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2010880c7e28Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 201172313efbSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 201272313efbSmrg then 201372313efbSmrg # The compiler can only warn and ignore the option if not recognized 201472313efbSmrg # So say no if there are warnings 2015880c7e28Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 201672313efbSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 201772313efbSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 20180b661123Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 201972313efbSmrg fi 202072313efbSmrg fi 202172313efbSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 20220b661123Smrg $RM conftest* 202372313efbSmrg # SGI C++ compiler will create directory out/ii_files/ for 202472313efbSmrg # template instantiation 20250b661123Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 20260b661123Smrg $RM out/* && rmdir out 202772313efbSmrg cd .. 20280b661123Smrg $RM -r conftest 20290b661123Smrg $RM conftest* 203072313efbSmrg]) 20310b661123Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 20320b661123Smrg [Does compiler simultaneously support -c and -o options?]) 20330b661123Smrg])# _LT_COMPILER_C_O 2034bdcaa8d0Smrg 2035bdcaa8d0Smrg 20360b661123Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 20370b661123Smrg# ---------------------------------- 203872313efbSmrg# Check to see if we can do hard links to lock some files if needed 20390b661123Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 20400b661123Smrg[m4_require([_LT_ENABLE_LOCK])dnl 20410b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20420b661123Smrg_LT_COMPILER_C_O([$1]) 2043bdcaa8d0Smrg 204472313efbSmrghard_links="nottested" 20450b661123Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 204672313efbSmrg # do not overwrite the value of need_locks provided by the user 204772313efbSmrg AC_MSG_CHECKING([if we can lock with hard links]) 204872313efbSmrg hard_links=yes 20490b661123Smrg $RM conftest* 205072313efbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205172313efbSmrg touch conftest.a 205272313efbSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 205372313efbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 205472313efbSmrg AC_MSG_RESULT([$hard_links]) 205572313efbSmrg if test "$hard_links" = no; then 205672313efbSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 205772313efbSmrg need_locks=warn 205872313efbSmrg fi 205972313efbSmrgelse 206072313efbSmrg need_locks=no 206172313efbSmrgfi 20620b661123Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 20630b661123Smrg])# _LT_COMPILER_FILE_LOCKS 2064bdcaa8d0Smrg 2065bdcaa8d0Smrg 20660b661123Smrg# _LT_CHECK_OBJDIR 20670b661123Smrg# ---------------- 20680b661123Smrgm4_defun([_LT_CHECK_OBJDIR], 206972313efbSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 207072313efbSmrg[rm -f .libs 2>/dev/null 207172313efbSmrgmkdir .libs 2>/dev/null 207272313efbSmrgif test -d .libs; then 207372313efbSmrg lt_cv_objdir=.libs 207472313efbSmrgelse 207572313efbSmrg # MS-DOS does not allow filenames that begin with a dot. 207672313efbSmrg lt_cv_objdir=_libs 207772313efbSmrgfi 207872313efbSmrgrmdir .libs 2>/dev/null]) 207972313efbSmrgobjdir=$lt_cv_objdir 20800b661123Smrg_LT_DECL([], [objdir], [0], 20810b661123Smrg [The name of the directory that contains temporary libtool files])dnl 20820b661123Smrgm4_pattern_allow([LT_OBJDIR])dnl 20830b661123SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 20840b661123Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 20850b661123Smrg])# _LT_CHECK_OBJDIR 2086bdcaa8d0Smrg 2087bdcaa8d0Smrg 20880b661123Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 20890b661123Smrg# -------------------------------------- 209072313efbSmrg# Check hardcoding attributes. 20910b661123Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 209272313efbSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 20930b661123Smrg_LT_TAGVAR(hardcode_action, $1)= 20940b661123Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 20950b661123Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 20960b661123Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 2097bdcaa8d0Smrg 20980b661123Smrg # We can hardcode non-existent directories. 20990b661123Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 210072313efbSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 210172313efbSmrg # have to relink, otherwise we might link with an installed library 210272313efbSmrg # when we should be linking with a yet-to-be-installed one 21030b661123Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 21040b661123Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 210572313efbSmrg # Linking always hardcodes the temporary library directory. 21060b661123Smrg _LT_TAGVAR(hardcode_action, $1)=relink 210772313efbSmrg else 210872313efbSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21090b661123Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 211072313efbSmrg fi 211172313efbSmrgelse 211272313efbSmrg # We cannot hardcode anything, or else we can only hardcode existing 211372313efbSmrg # directories. 21140b661123Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 211572313efbSmrgfi 21160b661123SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2117bdcaa8d0Smrg 21180b661123Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 21190b661123Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 212072313efbSmrg # Fast installation is not supported 212172313efbSmrg enable_fast_install=no 212272313efbSmrgelif test "$shlibpath_overrides_runpath" = yes || 212372313efbSmrg test "$enable_shared" = no; then 212472313efbSmrg # Fast installation is not necessary 212572313efbSmrg enable_fast_install=needless 212672313efbSmrgfi 21270b661123Smrg_LT_TAGDECL([], [hardcode_action], [0], 21280b661123Smrg [How to hardcode a shared library path into an executable]) 21290b661123Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2130bdcaa8d0Smrg 2131bdcaa8d0Smrg 21320b661123Smrg# _LT_CMD_STRIPLIB 21330b661123Smrg# ---------------- 21340b661123Smrgm4_defun([_LT_CMD_STRIPLIB], 21350b661123Smrg[m4_require([_LT_DECL_EGREP]) 21360b661123Smrgstriplib= 213772313efbSmrgold_striplib= 213872313efbSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 21390b661123Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 214072313efbSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 214172313efbSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 214272313efbSmrg AC_MSG_RESULT([yes]) 214372313efbSmrgelse 214472313efbSmrg# FIXME - insert some real tests, host_os isn't really good enough 214572313efbSmrg case $host_os in 21460b661123Smrg darwin*) 21470b661123Smrg if test -n "$STRIP" ; then 21480b661123Smrg striplib="$STRIP -x" 21490b661123Smrg old_striplib="$STRIP -S" 21500b661123Smrg AC_MSG_RESULT([yes]) 21510b661123Smrg else 21520b661123Smrg AC_MSG_RESULT([no]) 21530b661123Smrg fi 21540b661123Smrg ;; 21550b661123Smrg *) 21560b661123Smrg AC_MSG_RESULT([no]) 215772313efbSmrg ;; 215872313efbSmrg esac 215972313efbSmrgfi 21600b661123Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 21610b661123Smrg_LT_DECL([], [striplib], [1]) 21620b661123Smrg])# _LT_CMD_STRIPLIB 2163bdcaa8d0Smrg 2164bdcaa8d0Smrg 21650b661123Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 216672313efbSmrg# ----------------------------- 216772313efbSmrg# PORTME Fill in your ld.so characteristics 21680b661123Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 21690b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 21700b661123Smrgm4_require([_LT_DECL_EGREP])dnl 21710b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21720b661123Smrgm4_require([_LT_DECL_OBJDUMP])dnl 21730b661123Smrgm4_require([_LT_DECL_SED])dnl 2174880c7e28Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 217572313efbSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 21760b661123Smrgm4_if([$1], 21770b661123Smrg [], [ 217872313efbSmrgif test "$GCC" = yes; then 217972313efbSmrg case $host_os in 218072313efbSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 218172313efbSmrg *) lt_awk_arg="/^libraries:/" ;; 218272313efbSmrg esac 2183880c7e28Smrg case $host_os in 2184880c7e28Smrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2185880c7e28Smrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2186880c7e28Smrg esac 2187880c7e28Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2188880c7e28Smrg case $lt_search_path_spec in 2189880c7e28Smrg *\;*) 219072313efbSmrg # if the path contains ";" then we assume it to be the separator 219172313efbSmrg # otherwise default to the standard path separator (i.e. ":") - it is 219272313efbSmrg # assumed that no part of a normal pathname contains ";" but that should 219372313efbSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2194880c7e28Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2195880c7e28Smrg ;; 2196880c7e28Smrg *) 2197880c7e28Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2198880c7e28Smrg ;; 2199880c7e28Smrg esac 220072313efbSmrg # Ok, now we have the path, separated by spaces, we can step through it 220172313efbSmrg # and add multilib dir if necessary. 220272313efbSmrg lt_tmp_lt_search_path_spec= 220372313efbSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 220472313efbSmrg for lt_sys_path in $lt_search_path_spec; do 220572313efbSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 220672313efbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 220772313efbSmrg else 220872313efbSmrg test -d "$lt_sys_path" && \ 220972313efbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2210bdcaa8d0Smrg fi 2211bdcaa8d0Smrg done 2212880c7e28Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 221372313efbSmrgBEGIN {RS=" "; FS="/|\n";} { 221472313efbSmrg lt_foo=""; 221572313efbSmrg lt_count=0; 221672313efbSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 221772313efbSmrg if ($lt_i != "" && $lt_i != ".") { 221872313efbSmrg if ($lt_i == "..") { 221972313efbSmrg lt_count++; 222072313efbSmrg } else { 222172313efbSmrg if (lt_count == 0) { 222272313efbSmrg lt_foo="/" $lt_i lt_foo; 222372313efbSmrg } else { 222472313efbSmrg lt_count--; 222572313efbSmrg } 222672313efbSmrg } 222772313efbSmrg } 222872313efbSmrg } 222972313efbSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 223072313efbSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 223172313efbSmrg}'` 2232880c7e28Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2233880c7e28Smrg # for these hosts. 2234880c7e28Smrg case $host_os in 2235880c7e28Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2236880c7e28Smrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2237880c7e28Smrg esac 2238880c7e28Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2239bdcaa8d0Smrgelse 224072313efbSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 224172313efbSmrgfi]) 22420b661123Smrglibrary_names_spec= 22430b661123Smrglibname_spec='lib$name' 22440b661123Smrgsoname_spec= 22450b661123Smrgshrext_cmds=".so" 22460b661123Smrgpostinstall_cmds= 22470b661123Smrgpostuninstall_cmds= 22480b661123Smrgfinish_cmds= 22490b661123Smrgfinish_eval= 22500b661123Smrgshlibpath_var= 22510b661123Smrgshlibpath_overrides_runpath=unknown 22520b661123Smrgversion_type=none 22530b661123Smrgdynamic_linker="$host_os ld.so" 22540b661123Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 225572313efbSmrgneed_lib_prefix=unknown 225672313efbSmrghardcode_into_libs=no 2257bdcaa8d0Smrg 225872313efbSmrg# when you set need_version to no, make sure it does not cause -set_version 225972313efbSmrg# flags to be left without arguments 226072313efbSmrgneed_version=unknown 2261bdcaa8d0Smrg 226272313efbSmrgcase $host_os in 226372313efbSmrgaix3*) 2264880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 226572313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 226672313efbSmrg shlibpath_var=LIBPATH 2267bdcaa8d0Smrg 226872313efbSmrg # AIX 3 has no versioning support, so we append a major version to the name. 226972313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 227072313efbSmrg ;; 2271bdcaa8d0Smrg 227272313efbSmrgaix[[4-9]]*) 2273880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 227472313efbSmrg need_lib_prefix=no 227572313efbSmrg need_version=no 227672313efbSmrg hardcode_into_libs=yes 227772313efbSmrg if test "$host_cpu" = ia64; then 227872313efbSmrg # AIX 5 supports IA64 227972313efbSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 228072313efbSmrg shlibpath_var=LD_LIBRARY_PATH 228172313efbSmrg else 228272313efbSmrg # With GCC up to 2.95.x, collect2 would create an import file 228372313efbSmrg # for dependence libraries. The import file would start with 228472313efbSmrg # the line `#! .'. This would cause the generated library to 228572313efbSmrg # depend on `.', always an invalid library. This was fixed in 228672313efbSmrg # development snapshots of GCC prior to 3.0. 228772313efbSmrg case $host_os in 228872313efbSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 228972313efbSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 229072313efbSmrg echo ' yes ' 22910b661123Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 229272313efbSmrg : 229372313efbSmrg else 229472313efbSmrg can_build_shared=no 229572313efbSmrg fi 2296bdcaa8d0Smrg ;; 229772313efbSmrg esac 229872313efbSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 229972313efbSmrg # soname into executable. Probably we can add versioning support to 230072313efbSmrg # collect2, so additional links can be useful in future. 230172313efbSmrg if test "$aix_use_runtimelinking" = yes; then 230272313efbSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 230372313efbSmrg # instead of lib<name>.a to let people know that these are not 230472313efbSmrg # typical AIX shared libraries. 230572313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 230672313efbSmrg else 230772313efbSmrg # We preserve .a as extension for shared libraries through AIX4.2 230872313efbSmrg # and later when we are not doing run time linking. 230972313efbSmrg library_names_spec='${libname}${release}.a $libname.a' 231072313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2311bdcaa8d0Smrg fi 231272313efbSmrg shlibpath_var=LIBPATH 231372313efbSmrg fi 2314bdcaa8d0Smrg ;; 2315bdcaa8d0Smrg 231672313efbSmrgamigaos*) 23170b661123Smrg case $host_cpu in 23180b661123Smrg powerpc) 23190b661123Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 23200b661123Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 23210b661123Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23220b661123Smrg ;; 23230b661123Smrg m68k) 23240b661123Smrg library_names_spec='$libname.ixlibrary $libname.a' 23250b661123Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2326880c7e28Smrg 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' 23270b661123Smrg ;; 23280b661123Smrg esac 2329bdcaa8d0Smrg ;; 2330bdcaa8d0Smrg 2331bdcaa8d0Smrgbeos*) 233272313efbSmrg library_names_spec='${libname}${shared_ext}' 233372313efbSmrg dynamic_linker="$host_os ld.so" 233472313efbSmrg shlibpath_var=LIBRARY_PATH 2335bdcaa8d0Smrg ;; 2336bdcaa8d0Smrg 2337bdcaa8d0Smrgbsdi[[45]]*) 2338880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 233972313efbSmrg need_version=no 234072313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 234172313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 234272313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 234372313efbSmrg shlibpath_var=LD_LIBRARY_PATH 234472313efbSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 234572313efbSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 234672313efbSmrg # the default ld.so.conf also contains /usr/contrib/lib and 234772313efbSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 234872313efbSmrg # libtool to hard-code these into programs 2349bdcaa8d0Smrg ;; 2350bdcaa8d0Smrg 23510b661123Smrgcygwin* | mingw* | pw32* | cegcc*) 235272313efbSmrg version_type=windows 235372313efbSmrg shrext_cmds=".dll" 235472313efbSmrg need_version=no 235572313efbSmrg need_lib_prefix=no 2356bdcaa8d0Smrg 2357880c7e28Smrg case $GCC,$cc_basename in 2358880c7e28Smrg yes,*) 2359880c7e28Smrg # gcc 236072313efbSmrg library_names_spec='$libname.dll.a' 236172313efbSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 236272313efbSmrg postinstall_cmds='base_file=`basename \${file}`~ 23630b661123Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 236472313efbSmrg dldir=$destdir/`dirname \$dlpath`~ 236572313efbSmrg test -d \$dldir || mkdir -p \$dldir~ 236672313efbSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 23670b661123Smrg chmod a+x \$dldir/$dlname~ 23680b661123Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 23690b661123Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 23700b661123Smrg fi' 237172313efbSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 237272313efbSmrg dlpath=$dir/\$dldll~ 23730b661123Smrg $RM \$dlpath' 237472313efbSmrg shlibpath_overrides_runpath=yes 2375bdcaa8d0Smrg 237672313efbSmrg case $host_os in 237772313efbSmrg cygwin*) 237872313efbSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 237972313efbSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2380880c7e28Smrgm4_if([$1], [],[ 2381880c7e28Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 238272313efbSmrg ;; 23830b661123Smrg mingw* | cegcc*) 238472313efbSmrg # MinGW DLLs use traditional 'lib' prefix 238572313efbSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 238672313efbSmrg ;; 238772313efbSmrg pw32*) 238872313efbSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 238972313efbSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2390bdcaa8d0Smrg ;; 2391bdcaa8d0Smrg esac 2392880c7e28Smrg dynamic_linker='Win32 ld.exe' 2393880c7e28Smrg ;; 2394880c7e28Smrg 2395880c7e28Smrg *,cl*) 2396880c7e28Smrg # Native MSVC 2397880c7e28Smrg libname_spec='$name' 2398880c7e28Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2399880c7e28Smrg library_names_spec='${libname}.dll.lib' 2400880c7e28Smrg 2401880c7e28Smrg case $build_os in 2402880c7e28Smrg mingw*) 2403880c7e28Smrg sys_lib_search_path_spec= 2404880c7e28Smrg lt_save_ifs=$IFS 2405880c7e28Smrg IFS=';' 2406880c7e28Smrg for lt_path in $LIB 2407880c7e28Smrg do 2408880c7e28Smrg IFS=$lt_save_ifs 2409880c7e28Smrg # Let DOS variable expansion print the short 8.3 style file name. 2410880c7e28Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2411880c7e28Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2412880c7e28Smrg done 2413880c7e28Smrg IFS=$lt_save_ifs 2414880c7e28Smrg # Convert to MSYS style. 2415880c7e28Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2416880c7e28Smrg ;; 2417880c7e28Smrg cygwin*) 2418880c7e28Smrg # Convert to unix form, then to dos form, then back to unix form 2419880c7e28Smrg # but this time dos style (no spaces!) so that the unix form looks 2420880c7e28Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2421880c7e28Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2422880c7e28Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2423880c7e28Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2424880c7e28Smrg ;; 2425880c7e28Smrg *) 2426880c7e28Smrg sys_lib_search_path_spec="$LIB" 2427880c7e28Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2428880c7e28Smrg # It is most probably a Windows format PATH. 2429880c7e28Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2430880c7e28Smrg else 2431880c7e28Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2432880c7e28Smrg fi 2433880c7e28Smrg # FIXME: find the short name or the path components, as spaces are 2434880c7e28Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2435880c7e28Smrg ;; 2436880c7e28Smrg esac 2437880c7e28Smrg 2438880c7e28Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2439880c7e28Smrg postinstall_cmds='base_file=`basename \${file}`~ 2440880c7e28Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2441880c7e28Smrg dldir=$destdir/`dirname \$dlpath`~ 2442880c7e28Smrg test -d \$dldir || mkdir -p \$dldir~ 2443880c7e28Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2444880c7e28Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2445880c7e28Smrg dlpath=$dir/\$dldll~ 2446880c7e28Smrg $RM \$dlpath' 2447880c7e28Smrg shlibpath_overrides_runpath=yes 2448880c7e28Smrg dynamic_linker='Win32 link.exe' 2449bdcaa8d0Smrg ;; 245072313efbSmrg 2451bdcaa8d0Smrg *) 2452880c7e28Smrg # Assume MSVC wrapper 245372313efbSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2454880c7e28Smrg dynamic_linker='Win32 ld.exe' 2455bdcaa8d0Smrg ;; 2456bdcaa8d0Smrg esac 245772313efbSmrg # FIXME: first we should search . and the directory the executable is in 245872313efbSmrg shlibpath_var=PATH 2459bdcaa8d0Smrg ;; 2460bdcaa8d0Smrg 246172313efbSmrgdarwin* | rhapsody*) 246272313efbSmrg dynamic_linker="$host_os dyld" 246372313efbSmrg version_type=darwin 246472313efbSmrg need_lib_prefix=no 246572313efbSmrg need_version=no 24660b661123Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 246772313efbSmrg soname_spec='${libname}${release}${major}$shared_ext' 246872313efbSmrg shlibpath_overrides_runpath=yes 246972313efbSmrg shlibpath_var=DYLD_LIBRARY_PATH 247072313efbSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 24710b661123Smrgm4_if([$1], [],[ 24720b661123Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 247372313efbSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2474bdcaa8d0Smrg ;; 2475bdcaa8d0Smrg 247672313efbSmrgdgux*) 2477880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 247872313efbSmrg need_lib_prefix=no 247972313efbSmrg need_version=no 248072313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 248172313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 248272313efbSmrg shlibpath_var=LD_LIBRARY_PATH 2483bdcaa8d0Smrg ;; 2484bdcaa8d0Smrg 248572313efbSmrgfreebsd* | dragonfly*) 248672313efbSmrg # DragonFly does not have aout. When/if they implement a new 248772313efbSmrg # versioning mechanism, adjust this. 248872313efbSmrg if test -x /usr/bin/objformat; then 248972313efbSmrg objformat=`/usr/bin/objformat` 2490bdcaa8d0Smrg else 249172313efbSmrg case $host_os in 2492880c7e28Smrg freebsd[[23]].*) objformat=aout ;; 249372313efbSmrg *) objformat=elf ;; 249472313efbSmrg esac 2495bdcaa8d0Smrg fi 249672313efbSmrg version_type=freebsd-$objformat 249772313efbSmrg case $version_type in 249872313efbSmrg freebsd-elf*) 249972313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 250072313efbSmrg need_version=no 250172313efbSmrg need_lib_prefix=no 250272313efbSmrg ;; 250372313efbSmrg freebsd-*) 250472313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 250572313efbSmrg need_version=yes 250672313efbSmrg ;; 250772313efbSmrg esac 250872313efbSmrg shlibpath_var=LD_LIBRARY_PATH 250972313efbSmrg case $host_os in 2510880c7e28Smrg freebsd2.*) 251172313efbSmrg shlibpath_overrides_runpath=yes 251272313efbSmrg ;; 251372313efbSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 251472313efbSmrg shlibpath_overrides_runpath=yes 251572313efbSmrg hardcode_into_libs=yes 251672313efbSmrg ;; 251772313efbSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 251872313efbSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 251972313efbSmrg shlibpath_overrides_runpath=no 252072313efbSmrg hardcode_into_libs=yes 252172313efbSmrg ;; 252272313efbSmrg *) # from 4.6 on, and DragonFly 252372313efbSmrg shlibpath_overrides_runpath=yes 252472313efbSmrg hardcode_into_libs=yes 252572313efbSmrg ;; 252672313efbSmrg esac 2527bdcaa8d0Smrg ;; 2528bdcaa8d0Smrg 252972313efbSmrggnu*) 2530880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 253172313efbSmrg need_lib_prefix=no 253272313efbSmrg need_version=no 253372313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 253472313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 253572313efbSmrg shlibpath_var=LD_LIBRARY_PATH 2536880c7e28Smrg shlibpath_overrides_runpath=no 2537880c7e28Smrg hardcode_into_libs=yes 2538880c7e28Smrg ;; 2539880c7e28Smrg 2540880c7e28Smrghaiku*) 2541880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 2542880c7e28Smrg need_lib_prefix=no 2543880c7e28Smrg need_version=no 2544880c7e28Smrg dynamic_linker="$host_os runtime_loader" 2545880c7e28Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2546880c7e28Smrg soname_spec='${libname}${release}${shared_ext}$major' 2547880c7e28Smrg shlibpath_var=LIBRARY_PATH 2548880c7e28Smrg shlibpath_overrides_runpath=yes 2549880c7e28Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 255072313efbSmrg hardcode_into_libs=yes 2551bdcaa8d0Smrg ;; 2552bdcaa8d0Smrg 255372313efbSmrghpux9* | hpux10* | hpux11*) 255472313efbSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 255572313efbSmrg # link against other versions. 255672313efbSmrg version_type=sunos 255772313efbSmrg need_lib_prefix=no 255872313efbSmrg need_version=no 255972313efbSmrg case $host_cpu in 256072313efbSmrg ia64*) 256172313efbSmrg shrext_cmds='.so' 256272313efbSmrg hardcode_into_libs=yes 256372313efbSmrg dynamic_linker="$host_os dld.so" 256472313efbSmrg shlibpath_var=LD_LIBRARY_PATH 256572313efbSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 256672313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 256772313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 256872313efbSmrg if test "X$HPUX_IA64_MODE" = X32; then 256972313efbSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 257072313efbSmrg else 257172313efbSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 257272313efbSmrg fi 257372313efbSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2574bdcaa8d0Smrg ;; 25750b661123Smrg hppa*64*) 25760b661123Smrg shrext_cmds='.sl' 25770b661123Smrg hardcode_into_libs=yes 25780b661123Smrg dynamic_linker="$host_os dld.sl" 25790b661123Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 25800b661123Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25810b661123Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25820b661123Smrg soname_spec='${libname}${release}${shared_ext}$major' 25830b661123Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 25840b661123Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25850b661123Smrg ;; 25860b661123Smrg *) 258772313efbSmrg shrext_cmds='.sl' 258872313efbSmrg dynamic_linker="$host_os dld.sl" 258972313efbSmrg shlibpath_var=SHLIB_PATH 259072313efbSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 259172313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 259272313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 2593bdcaa8d0Smrg ;; 259472313efbSmrg esac 2595880c7e28Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 259672313efbSmrg postinstall_cmds='chmod 555 $lib' 2597880c7e28Smrg # or fails outright, so override atomically: 2598880c7e28Smrg install_override_mode=555 259972313efbSmrg ;; 260072313efbSmrg 260172313efbSmrginterix[[3-9]]*) 2602880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 260372313efbSmrg need_lib_prefix=no 260472313efbSmrg need_version=no 260572313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 260672313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 260772313efbSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 260872313efbSmrg shlibpath_var=LD_LIBRARY_PATH 260972313efbSmrg shlibpath_overrides_runpath=no 261072313efbSmrg hardcode_into_libs=yes 261172313efbSmrg ;; 261272313efbSmrg 261372313efbSmrgirix5* | irix6* | nonstopux*) 261472313efbSmrg case $host_os in 261572313efbSmrg nonstopux*) version_type=nonstopux ;; 261672313efbSmrg *) 261772313efbSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2618880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 261972313efbSmrg else 262072313efbSmrg version_type=irix 262172313efbSmrg fi ;; 262272313efbSmrg esac 262372313efbSmrg need_lib_prefix=no 262472313efbSmrg need_version=no 262572313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 262672313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 262772313efbSmrg case $host_os in 262872313efbSmrg irix5* | nonstopux*) 262972313efbSmrg libsuff= shlibsuff= 2630bdcaa8d0Smrg ;; 263172313efbSmrg *) 263272313efbSmrg case $LD in # libtool.m4 will add one of these switches to LD 263372313efbSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 263472313efbSmrg libsuff= shlibsuff= libmagic=32-bit;; 263572313efbSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 263672313efbSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 263772313efbSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 263872313efbSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 263972313efbSmrg *) libsuff= shlibsuff= libmagic=never-match;; 264072313efbSmrg esac 2641bdcaa8d0Smrg ;; 2642bdcaa8d0Smrg esac 264372313efbSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 264472313efbSmrg shlibpath_overrides_runpath=no 264572313efbSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 264672313efbSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 264772313efbSmrg hardcode_into_libs=yes 2648bdcaa8d0Smrg ;; 2649bdcaa8d0Smrg 265072313efbSmrg# No shared lib support for Linux oldld, aout, or coff. 265172313efbSmrglinux*oldld* | linux*aout* | linux*coff*) 265272313efbSmrg dynamic_linker=no 2653bdcaa8d0Smrg ;; 2654bdcaa8d0Smrg 2655880c7e28Smrg# This must be glibc/ELF. 2656880c7e28Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 2657880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 265872313efbSmrg need_lib_prefix=no 265972313efbSmrg need_version=no 266072313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 266172313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 266272313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 266372313efbSmrg shlibpath_var=LD_LIBRARY_PATH 266472313efbSmrg shlibpath_overrides_runpath=no 2665880c7e28Smrg 26660b661123Smrg # Some binutils ld are patched to set DT_RUNPATH 2667880c7e28Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2668880c7e28Smrg [lt_cv_shlibpath_overrides_runpath=no 2669880c7e28Smrg save_LDFLAGS=$LDFLAGS 2670880c7e28Smrg save_libdir=$libdir 2671880c7e28Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2672880c7e28Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2673880c7e28Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2674880c7e28Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2675880c7e28Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2676880c7e28Smrg LDFLAGS=$save_LDFLAGS 2677880c7e28Smrg libdir=$save_libdir 2678880c7e28Smrg ]) 2679880c7e28Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 26800b661123Smrg 268172313efbSmrg # This implies no fast_install, which is unacceptable. 268272313efbSmrg # Some rework will be needed to allow for fast_install 268372313efbSmrg # before this can be enabled. 268472313efbSmrg hardcode_into_libs=yes 26850b661123Smrg 26860b661123Smrg # Add ABI-specific directories to the system library path. 26870b661123Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 268866c2ea32Smrg 268972313efbSmrg # Append ld.so.conf contents to the search path 269072313efbSmrg if test -f /etc/ld.so.conf; then 2691880c7e28Smrg 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' ' '` 269266c2ea32Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2693880c7e28Smrg 2694bdcaa8d0Smrg fi 2695bdcaa8d0Smrg 269672313efbSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 269772313efbSmrg # powerpc, because MkLinux only supported shared libraries with the 269872313efbSmrg # GNU dynamic linker. Since this was broken with cross compilers, 269972313efbSmrg # most powerpc-linux boxes support dynamic linking these days and 270072313efbSmrg # people can always --disable-shared, the test was removed, and we 270172313efbSmrg # assume the GNU/Linux dynamic linker is in use. 270272313efbSmrg dynamic_linker='GNU/Linux ld.so' 2703bdcaa8d0Smrg ;; 270472313efbSmrg 270572313efbSmrgnetbsd*) 270672313efbSmrg version_type=sunos 270772313efbSmrg need_lib_prefix=no 270872313efbSmrg need_version=no 27090b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 271072313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 271172313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 271272313efbSmrg dynamic_linker='NetBSD (a.out) ld.so' 271372313efbSmrg else 271472313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 271572313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 271672313efbSmrg dynamic_linker='NetBSD ld.elf_so' 271772313efbSmrg fi 271872313efbSmrg shlibpath_var=LD_LIBRARY_PATH 271972313efbSmrg shlibpath_overrides_runpath=yes 272072313efbSmrg hardcode_into_libs=yes 2721bdcaa8d0Smrg ;; 272272313efbSmrg 272372313efbSmrgnewsos6) 2724880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 272572313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 272672313efbSmrg shlibpath_var=LD_LIBRARY_PATH 272772313efbSmrg shlibpath_overrides_runpath=yes 2728bdcaa8d0Smrg ;; 2729bdcaa8d0Smrg 27300b661123Smrg*nto* | *qnx*) 27310b661123Smrg version_type=qnx 273272313efbSmrg need_lib_prefix=no 273372313efbSmrg need_version=no 273472313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 273572313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 273672313efbSmrg shlibpath_var=LD_LIBRARY_PATH 27370b661123Smrg shlibpath_overrides_runpath=no 27380b661123Smrg hardcode_into_libs=yes 27390b661123Smrg dynamic_linker='ldqnx.so' 274072313efbSmrg ;; 2741bdcaa8d0Smrg 274272313efbSmrgopenbsd*) 274372313efbSmrg version_type=sunos 274472313efbSmrg sys_lib_dlsearch_path_spec="/usr/lib" 274572313efbSmrg need_lib_prefix=no 274672313efbSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 274772313efbSmrg case $host_os in 27480b661123Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 27490b661123Smrg *) need_version=no ;; 2750bdcaa8d0Smrg esac 275172313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 275272313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 275372313efbSmrg shlibpath_var=LD_LIBRARY_PATH 27540b661123Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 275572313efbSmrg case $host_os in 275672313efbSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 275772313efbSmrg shlibpath_overrides_runpath=no 275872313efbSmrg ;; 275972313efbSmrg *) 276072313efbSmrg shlibpath_overrides_runpath=yes 276172313efbSmrg ;; 276272313efbSmrg esac 2763bdcaa8d0Smrg else 276472313efbSmrg shlibpath_overrides_runpath=yes 2765bdcaa8d0Smrg fi 276672313efbSmrg ;; 2767bdcaa8d0Smrg 276872313efbSmrgos2*) 276972313efbSmrg libname_spec='$name' 277072313efbSmrg shrext_cmds=".dll" 277172313efbSmrg need_lib_prefix=no 277272313efbSmrg library_names_spec='$libname${shared_ext} $libname.a' 277372313efbSmrg dynamic_linker='OS/2 ld.exe' 277472313efbSmrg shlibpath_var=LIBPATH 277572313efbSmrg ;; 2776bdcaa8d0Smrg 277772313efbSmrgosf3* | osf4* | osf5*) 277872313efbSmrg version_type=osf 277972313efbSmrg need_lib_prefix=no 278072313efbSmrg need_version=no 278172313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 278272313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 278372313efbSmrg shlibpath_var=LD_LIBRARY_PATH 278472313efbSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 278572313efbSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 278672313efbSmrg ;; 2787bdcaa8d0Smrg 278872313efbSmrgrdos*) 278972313efbSmrg dynamic_linker=no 279072313efbSmrg ;; 2791bdcaa8d0Smrg 279272313efbSmrgsolaris*) 2793880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 279472313efbSmrg need_lib_prefix=no 279572313efbSmrg need_version=no 279672313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 279772313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 279872313efbSmrg shlibpath_var=LD_LIBRARY_PATH 279972313efbSmrg shlibpath_overrides_runpath=yes 280072313efbSmrg hardcode_into_libs=yes 280172313efbSmrg # ldd complains unless libraries are executable 280272313efbSmrg postinstall_cmds='chmod +x $lib' 280372313efbSmrg ;; 2804bdcaa8d0Smrg 280572313efbSmrgsunos4*) 280672313efbSmrg version_type=sunos 280772313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 280872313efbSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 280972313efbSmrg shlibpath_var=LD_LIBRARY_PATH 281072313efbSmrg shlibpath_overrides_runpath=yes 281172313efbSmrg if test "$with_gnu_ld" = yes; then 281272313efbSmrg need_lib_prefix=no 281372313efbSmrg fi 281472313efbSmrg need_version=yes 281572313efbSmrg ;; 2816bdcaa8d0Smrg 281772313efbSmrgsysv4 | sysv4.3*) 2818880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 281972313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 282072313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 282172313efbSmrg shlibpath_var=LD_LIBRARY_PATH 282272313efbSmrg case $host_vendor in 282372313efbSmrg sni) 282472313efbSmrg shlibpath_overrides_runpath=no 282572313efbSmrg need_lib_prefix=no 282672313efbSmrg runpath_var=LD_RUN_PATH 282772313efbSmrg ;; 282872313efbSmrg siemens) 282972313efbSmrg need_lib_prefix=no 283072313efbSmrg ;; 283172313efbSmrg motorola) 283272313efbSmrg need_lib_prefix=no 283372313efbSmrg need_version=no 283472313efbSmrg shlibpath_overrides_runpath=no 283572313efbSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 283672313efbSmrg ;; 283772313efbSmrg esac 283872313efbSmrg ;; 2839bdcaa8d0Smrg 284072313efbSmrgsysv4*MP*) 284172313efbSmrg if test -d /usr/nec ;then 2842880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 284372313efbSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 284472313efbSmrg soname_spec='$libname${shared_ext}.$major' 284572313efbSmrg shlibpath_var=LD_LIBRARY_PATH 2846bdcaa8d0Smrg fi 2847bdcaa8d0Smrg ;; 2848bdcaa8d0Smrg 284972313efbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 285072313efbSmrg version_type=freebsd-elf 285172313efbSmrg need_lib_prefix=no 285272313efbSmrg need_version=no 285372313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 285472313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 285572313efbSmrg shlibpath_var=LD_LIBRARY_PATH 28560b661123Smrg shlibpath_overrides_runpath=yes 285772313efbSmrg hardcode_into_libs=yes 285872313efbSmrg if test "$with_gnu_ld" = yes; then 285972313efbSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 286072313efbSmrg else 286172313efbSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 286272313efbSmrg case $host_os in 286372313efbSmrg sco3.2v5*) 286472313efbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 286572313efbSmrg ;; 286672313efbSmrg esac 2867bdcaa8d0Smrg fi 286872313efbSmrg sys_lib_dlsearch_path_spec='/usr/lib' 286972313efbSmrg ;; 2870bdcaa8d0Smrg 28710b661123Smrgtpf*) 28720b661123Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2873880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 28740b661123Smrg need_lib_prefix=no 28750b661123Smrg need_version=no 28760b661123Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28770b661123Smrg shlibpath_var=LD_LIBRARY_PATH 28780b661123Smrg shlibpath_overrides_runpath=no 28790b661123Smrg hardcode_into_libs=yes 28800b661123Smrg ;; 28810b661123Smrg 288272313efbSmrguts4*) 2883880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 288472313efbSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 288572313efbSmrg soname_spec='${libname}${release}${shared_ext}$major' 288672313efbSmrg shlibpath_var=LD_LIBRARY_PATH 288772313efbSmrg ;; 2888bdcaa8d0Smrg 288972313efbSmrg*) 289072313efbSmrg dynamic_linker=no 289172313efbSmrg ;; 289272313efbSmrgesac 289372313efbSmrgAC_MSG_RESULT([$dynamic_linker]) 289472313efbSmrgtest "$dynamic_linker" = no && can_build_shared=no 2895bdcaa8d0Smrg 289672313efbSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 289772313efbSmrgif test "$GCC" = yes; then 289872313efbSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 289972313efbSmrgfi 2900bdcaa8d0Smrg 29010b661123Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 29020b661123Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 29030b661123Smrgfi 29040b661123Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 29050b661123Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 29060b661123Smrgfi 290796ce994aSmrg 29080b661123Smrg_LT_DECL([], [variables_saved_for_relink], [1], 29090b661123Smrg [Variables whose values should be saved in libtool wrapper scripts and 29100b661123Smrg restored at link time]) 29110b661123Smrg_LT_DECL([], [need_lib_prefix], [0], 29120b661123Smrg [Do we need the "lib" prefix for modules?]) 29130b661123Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 29140b661123Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 29150b661123Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 29160b661123Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 29170b661123Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 29180b661123Smrg [Is shlibpath searched before the hard-coded library search path?]) 29190b661123Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 29200b661123Smrg_LT_DECL([], [library_names_spec], [1], 29210b661123Smrg [[List of archive names. First name is the real one, the rest are links. 29220b661123Smrg The last name is the one that the linker finds with -lNAME]]) 29230b661123Smrg_LT_DECL([], [soname_spec], [1], 29240b661123Smrg [[The coded name of the library, if different from the real name]]) 2925880c7e28Smrg_LT_DECL([], [install_override_mode], [1], 2926880c7e28Smrg [Permission mode override for installation of shared libraries]) 29270b661123Smrg_LT_DECL([], [postinstall_cmds], [2], 29280b661123Smrg [Command to use after installation of a shared archive]) 29290b661123Smrg_LT_DECL([], [postuninstall_cmds], [2], 29300b661123Smrg [Command to use after uninstallation of a shared archive]) 29310b661123Smrg_LT_DECL([], [finish_cmds], [2], 29320b661123Smrg [Commands used to finish a libtool library installation in a directory]) 29330b661123Smrg_LT_DECL([], [finish_eval], [1], 29340b661123Smrg [[As "finish_cmds", except a single script fragment to be evaled but 29350b661123Smrg not shown]]) 29360b661123Smrg_LT_DECL([], [hardcode_into_libs], [0], 29370b661123Smrg [Whether we should hardcode library paths into libraries]) 29380b661123Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 29390b661123Smrg [Compile-time system search path for libraries]) 29400b661123Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 29410b661123Smrg [Run-time system search path for libraries]) 29420b661123Smrg])# _LT_SYS_DYNAMIC_LINKER 29430b661123Smrg 29440b661123Smrg 29450b661123Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 294696ce994aSmrg# -------------------------- 294796ce994aSmrg# find a file program which can recognize shared library 29480b661123SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 29490b661123Smrg[m4_require([_LT_DECL_EGREP])dnl 295096ce994aSmrgAC_MSG_CHECKING([for $1]) 295196ce994aSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 295296ce994aSmrg[case $MAGIC_CMD in 295372313efbSmrg[[\\/*] | ?:[\\/]*]) 295472313efbSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 295572313efbSmrg ;; 295672313efbSmrg*) 295772313efbSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 295872313efbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 295972313efbSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 296072313efbSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 296172313efbSmrgdnl not every word. This closes a longstanding sh security hole. 29620b661123Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 296372313efbSmrg for ac_dir in $ac_dummy; do 296472313efbSmrg IFS="$lt_save_ifs" 296572313efbSmrg test -z "$ac_dir" && ac_dir=. 296672313efbSmrg if test -f $ac_dir/$1; then 296772313efbSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 296872313efbSmrg if test -n "$file_magic_test_file"; then 296972313efbSmrg case $deplibs_check_method in 297072313efbSmrg "file_magic "*) 297172313efbSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 297272313efbSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 297372313efbSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 297472313efbSmrg $EGREP "$file_magic_regex" > /dev/null; then 297572313efbSmrg : 297672313efbSmrg else 29770b661123Smrg cat <<_LT_EOF 1>&2 2978bdcaa8d0Smrg 297972313efbSmrg*** Warning: the command libtool uses to detect shared libraries, 298072313efbSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 298172313efbSmrg*** The result is that libtool may fail to recognize shared libraries 298272313efbSmrg*** as such. This will affect the creation of libtool libraries that 298372313efbSmrg*** depend on shared libraries, but programs linked with such libtool 298472313efbSmrg*** libraries will work regardless of this problem. Nevertheless, you 298572313efbSmrg*** may want to report the problem to your system manager and/or to 298672313efbSmrg*** bug-libtool@gnu.org 2987bdcaa8d0Smrg 29880b661123Smrg_LT_EOF 298972313efbSmrg fi ;; 299072313efbSmrg esac 299172313efbSmrg fi 299272313efbSmrg break 299372313efbSmrg fi 299472313efbSmrg done 299572313efbSmrg IFS="$lt_save_ifs" 299672313efbSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 299772313efbSmrg ;; 299872313efbSmrgesac]) 299972313efbSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 300072313efbSmrgif test -n "$MAGIC_CMD"; then 300172313efbSmrg AC_MSG_RESULT($MAGIC_CMD) 300272313efbSmrgelse 300372313efbSmrg AC_MSG_RESULT(no) 300472313efbSmrgfi 30050b661123Smrg_LT_DECL([], [MAGIC_CMD], [0], 30060b661123Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 30070b661123Smrg])# _LT_PATH_TOOL_PREFIX 3008bdcaa8d0Smrg 30090b661123Smrg# Old name: 30100b661123SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 30110b661123Smrgdnl aclocal-1.4 backwards compatibility: 30120b661123Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3013bdcaa8d0Smrg 30140b661123Smrg 30150b661123Smrg# _LT_PATH_MAGIC 30160b661123Smrg# -------------- 301772313efbSmrg# find a file program which can recognize a shared library 30180b661123Smrgm4_defun([_LT_PATH_MAGIC], 30190b661123Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 302072313efbSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 302172313efbSmrg if test -n "$ac_tool_prefix"; then 30220b661123Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 302372313efbSmrg else 302472313efbSmrg MAGIC_CMD=: 302572313efbSmrg fi 302672313efbSmrgfi 30270b661123Smrg])# _LT_PATH_MAGIC 3028bdcaa8d0Smrg 302972313efbSmrg 30300b661123Smrg# LT_PATH_LD 303172313efbSmrg# ---------- 303272313efbSmrg# find the pathname to the GNU or non-GNU linker 30330b661123SmrgAC_DEFUN([LT_PATH_LD], 30340b661123Smrg[AC_REQUIRE([AC_PROG_CC])dnl 303596ce994aSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 303696ce994aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 30370b661123Smrgm4_require([_LT_DECL_SED])dnl 30380b661123Smrgm4_require([_LT_DECL_EGREP])dnl 3039880c7e28Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 30400b661123Smrg 30410b661123SmrgAC_ARG_WITH([gnu-ld], 30420b661123Smrg [AS_HELP_STRING([--with-gnu-ld], 30430b661123Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 30440b661123Smrg [test "$withval" = no || with_gnu_ld=yes], 30450b661123Smrg [with_gnu_ld=no])dnl 30460b661123Smrg 304772313efbSmrgac_prog=ld 304872313efbSmrgif test "$GCC" = yes; then 304972313efbSmrg # Check if gcc -print-prog-name=ld gives a path. 305072313efbSmrg AC_MSG_CHECKING([for ld used by $CC]) 305172313efbSmrg case $host in 305272313efbSmrg *-*-mingw*) 305372313efbSmrg # gcc leaves a trailing carriage return which upsets mingw 305472313efbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 305572313efbSmrg *) 305672313efbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 305772313efbSmrg esac 305872313efbSmrg case $ac_prog in 305972313efbSmrg # Accept absolute paths. 306072313efbSmrg [[\\/]]* | ?:[[\\/]]*) 306172313efbSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 306272313efbSmrg # Canonicalize the pathname of ld 30630b661123Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 30640b661123Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 30650b661123Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 306672313efbSmrg done 306772313efbSmrg test -z "$LD" && LD="$ac_prog" 306872313efbSmrg ;; 306972313efbSmrg "") 307072313efbSmrg # If it fails, then pretend we aren't using GCC. 307172313efbSmrg ac_prog=ld 307272313efbSmrg ;; 307372313efbSmrg *) 307472313efbSmrg # If it is relative, then search for the first ld in PATH. 307572313efbSmrg with_gnu_ld=unknown 307672313efbSmrg ;; 307772313efbSmrg esac 307872313efbSmrgelif test "$with_gnu_ld" = yes; then 307972313efbSmrg AC_MSG_CHECKING([for GNU ld]) 3080bdcaa8d0Smrgelse 308172313efbSmrg AC_MSG_CHECKING([for non-GNU ld]) 3082bdcaa8d0Smrgfi 308372313efbSmrgAC_CACHE_VAL(lt_cv_path_LD, 308472313efbSmrg[if test -z "$LD"; then 308572313efbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 308672313efbSmrg for ac_dir in $PATH; do 308772313efbSmrg IFS="$lt_save_ifs" 308872313efbSmrg test -z "$ac_dir" && ac_dir=. 308972313efbSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 309072313efbSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 309172313efbSmrg # Check to see if the program is GNU ld. I'd rather use --version, 309272313efbSmrg # but apparently some variants of GNU ld only accept -v. 309372313efbSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 309472313efbSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 309572313efbSmrg *GNU* | *'with BFD'*) 309672313efbSmrg test "$with_gnu_ld" != no && break 309772313efbSmrg ;; 309872313efbSmrg *) 309972313efbSmrg test "$with_gnu_ld" != yes && break 310072313efbSmrg ;; 310172313efbSmrg esac 310272313efbSmrg fi 310372313efbSmrg done 310472313efbSmrg IFS="$lt_save_ifs" 3105bdcaa8d0Smrgelse 310672313efbSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 310772313efbSmrgfi]) 310872313efbSmrgLD="$lt_cv_path_LD" 310972313efbSmrgif test -n "$LD"; then 311072313efbSmrg AC_MSG_RESULT($LD) 3111bdcaa8d0Smrgelse 311272313efbSmrg AC_MSG_RESULT(no) 3113bdcaa8d0Smrgfi 311472313efbSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 31150b661123Smrg_LT_PATH_LD_GNU 31160b661123SmrgAC_SUBST([LD]) 3117bdcaa8d0Smrg 31180b661123Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 31190b661123Smrg])# LT_PATH_LD 3120bdcaa8d0Smrg 31210b661123Smrg# Old names: 31220b661123SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 31230b661123SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 31240b661123Smrgdnl aclocal-1.4 backwards compatibility: 31250b661123Smrgdnl AC_DEFUN([AM_PROG_LD], []) 31260b661123Smrgdnl AC_DEFUN([AC_PROG_LD], []) 31270b661123Smrg 31280b661123Smrg 31290b661123Smrg# _LT_PATH_LD_GNU 31300b661123Smrg#- -------------- 31310b661123Smrgm4_defun([_LT_PATH_LD_GNU], 31320b661123Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 313372313efbSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 313472313efbSmrgcase `$LD -v 2>&1 </dev/null` in 313572313efbSmrg*GNU* | *'with BFD'*) 313672313efbSmrg lt_cv_prog_gnu_ld=yes 313772313efbSmrg ;; 313872313efbSmrg*) 313972313efbSmrg lt_cv_prog_gnu_ld=no 314072313efbSmrg ;; 314172313efbSmrgesac]) 314272313efbSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 31430b661123Smrg])# _LT_PATH_LD_GNU 3144bdcaa8d0Smrg 3145bdcaa8d0Smrg 31460b661123Smrg# _LT_CMD_RELOAD 31470b661123Smrg# -------------- 314872313efbSmrg# find reload flag for linker 314972313efbSmrg# -- PORTME Some linkers may need a different reload flag. 31500b661123Smrgm4_defun([_LT_CMD_RELOAD], 315172313efbSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 315272313efbSmrg lt_cv_ld_reload_flag, 315372313efbSmrg [lt_cv_ld_reload_flag='-r']) 315472313efbSmrgreload_flag=$lt_cv_ld_reload_flag 315572313efbSmrgcase $reload_flag in 315672313efbSmrg"" | " "*) ;; 315772313efbSmrg*) reload_flag=" $reload_flag" ;; 315872313efbSmrgesac 315972313efbSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 316072313efbSmrgcase $host_os in 3161880c7e28Smrg cygwin* | mingw* | pw32* | cegcc*) 3162880c7e28Smrg if test "$GCC" != yes; then 3163880c7e28Smrg reload_cmds=false 3164880c7e28Smrg fi 3165880c7e28Smrg ;; 316672313efbSmrg darwin*) 316772313efbSmrg if test "$GCC" = yes; then 316872313efbSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 3169bdcaa8d0Smrg else 317072313efbSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3171bdcaa8d0Smrg fi 317272313efbSmrg ;; 317372313efbSmrgesac 3174880c7e28Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3175880c7e28Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 31760b661123Smrg])# _LT_CMD_RELOAD 3177bdcaa8d0Smrg 3178bdcaa8d0Smrg 31790b661123Smrg# _LT_CHECK_MAGIC_METHOD 31800b661123Smrg# ---------------------- 318172313efbSmrg# how to check for library dependencies 318272313efbSmrg# -- PORTME fill in with the dynamic library characteristics 31830b661123Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 31840b661123Smrg[m4_require([_LT_DECL_EGREP]) 31850b661123Smrgm4_require([_LT_DECL_OBJDUMP]) 31860b661123SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 318772313efbSmrglt_cv_deplibs_check_method, 318872313efbSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 318972313efbSmrglt_cv_file_magic_test_file= 319072313efbSmrglt_cv_deplibs_check_method='unknown' 319172313efbSmrg# Need to set the preceding variable on all platforms that support 319272313efbSmrg# interlibrary dependencies. 319372313efbSmrg# 'none' -- dependencies not supported. 319472313efbSmrg# `unknown' -- same as none, but documents that we really don't know. 319572313efbSmrg# 'pass_all' -- all dependencies passed with no checks. 319672313efbSmrg# 'test_compile' -- check by making test program. 319772313efbSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 319872313efbSmrg# which responds to the $file_magic_cmd with a given extended regex. 319972313efbSmrg# If you have `file' or equivalent on your system and you're not sure 320072313efbSmrg# whether `pass_all' will *always* work, you probably want this one. 3201bdcaa8d0Smrg 3202bdcaa8d0Smrgcase $host_os in 320372313efbSmrgaix[[4-9]]*) 320472313efbSmrg lt_cv_deplibs_check_method=pass_all 320572313efbSmrg ;; 3206bdcaa8d0Smrg 320772313efbSmrgbeos*) 320872313efbSmrg lt_cv_deplibs_check_method=pass_all 320972313efbSmrg ;; 3210bdcaa8d0Smrg 321172313efbSmrgbsdi[[45]]*) 321272313efbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 321372313efbSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 321472313efbSmrg lt_cv_file_magic_test_file=/shlib/libc.so 321572313efbSmrg ;; 3216bdcaa8d0Smrg 321772313efbSmrgcygwin*) 321872313efbSmrg # func_win32_libid is a shell function defined in ltmain.sh 321972313efbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 322072313efbSmrg lt_cv_file_magic_cmd='func_win32_libid' 322172313efbSmrg ;; 3222bdcaa8d0Smrg 322372313efbSmrgmingw* | pw32*) 322472313efbSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 322572313efbSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 322672313efbSmrg # unless we find 'file', for example because we are cross-compiling. 3227880c7e28Smrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3228880c7e28Smrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 322972313efbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 323072313efbSmrg lt_cv_file_magic_cmd='func_win32_libid' 323172313efbSmrg else 3232880c7e28Smrg # Keep this pattern in sync with the one in func_win32_libid. 3233880c7e28Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 323472313efbSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 323572313efbSmrg fi 323672313efbSmrg ;; 3237bdcaa8d0Smrg 3238880c7e28Smrgcegcc*) 32390b661123Smrg # use the weaker test based on 'objdump'. See mingw*. 32400b661123Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 32410b661123Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 32420b661123Smrg ;; 32430b661123Smrg 324472313efbSmrgdarwin* | rhapsody*) 324572313efbSmrg lt_cv_deplibs_check_method=pass_all 324672313efbSmrg ;; 3247bdcaa8d0Smrg 324872313efbSmrgfreebsd* | dragonfly*) 32490b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3250bdcaa8d0Smrg case $host_cpu in 325172313efbSmrg i*86 ) 325272313efbSmrg # Not sure whether the presence of OpenBSD here was a mistake. 325372313efbSmrg # Let's accept both of them until this is cleared up. 325472313efbSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 325572313efbSmrg lt_cv_file_magic_cmd=/usr/bin/file 325672313efbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3257bdcaa8d0Smrg ;; 3258bdcaa8d0Smrg esac 325972313efbSmrg else 326072313efbSmrg lt_cv_deplibs_check_method=pass_all 326172313efbSmrg fi 326272313efbSmrg ;; 3263bdcaa8d0Smrg 326472313efbSmrggnu*) 326572313efbSmrg lt_cv_deplibs_check_method=pass_all 326672313efbSmrg ;; 3267bdcaa8d0Smrg 3268880c7e28Smrghaiku*) 3269880c7e28Smrg lt_cv_deplibs_check_method=pass_all 3270880c7e28Smrg ;; 3271880c7e28Smrg 327272313efbSmrghpux10.20* | hpux11*) 327372313efbSmrg lt_cv_file_magic_cmd=/usr/bin/file 327472313efbSmrg case $host_cpu in 327572313efbSmrg ia64*) 327672313efbSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 327772313efbSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3278bdcaa8d0Smrg ;; 327972313efbSmrg hppa*64*) 3280880c7e28Smrg [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]'] 328172313efbSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3282bdcaa8d0Smrg ;; 328372313efbSmrg *) 3284880c7e28Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 328572313efbSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3286bdcaa8d0Smrg ;; 328772313efbSmrg esac 328872313efbSmrg ;; 3289bdcaa8d0Smrg 329072313efbSmrginterix[[3-9]]*) 329172313efbSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 329272313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 329372313efbSmrg ;; 3294bdcaa8d0Smrg 329572313efbSmrgirix5* | irix6* | nonstopux*) 329672313efbSmrg case $LD in 329772313efbSmrg *-32|*"-32 ") libmagic=32-bit;; 329872313efbSmrg *-n32|*"-n32 ") libmagic=N32;; 329972313efbSmrg *-64|*"-64 ") libmagic=64-bit;; 330072313efbSmrg *) libmagic=never-match;; 330172313efbSmrg esac 330272313efbSmrg lt_cv_deplibs_check_method=pass_all 330372313efbSmrg ;; 3304bdcaa8d0Smrg 3305880c7e28Smrg# This must be glibc/ELF. 3306880c7e28Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 330772313efbSmrg lt_cv_deplibs_check_method=pass_all 330872313efbSmrg ;; 3309bdcaa8d0Smrg 331072313efbSmrgnetbsd*) 33110b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 331272313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 331372313efbSmrg else 331472313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 331572313efbSmrg fi 331672313efbSmrg ;; 3317bdcaa8d0Smrg 331872313efbSmrgnewos6*) 331972313efbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 332072313efbSmrg lt_cv_file_magic_cmd=/usr/bin/file 332172313efbSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 332272313efbSmrg ;; 3323bdcaa8d0Smrg 33240b661123Smrg*nto* | *qnx*) 33250b661123Smrg lt_cv_deplibs_check_method=pass_all 332672313efbSmrg ;; 3327bdcaa8d0Smrg 332872313efbSmrgopenbsd*) 33290b661123Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 333072313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 333172313efbSmrg else 333272313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 333372313efbSmrg fi 333472313efbSmrg ;; 3335bdcaa8d0Smrg 333672313efbSmrgosf3* | osf4* | osf5*) 333772313efbSmrg lt_cv_deplibs_check_method=pass_all 333872313efbSmrg ;; 3339bdcaa8d0Smrg 334072313efbSmrgrdos*) 334172313efbSmrg lt_cv_deplibs_check_method=pass_all 334272313efbSmrg ;; 3343bdcaa8d0Smrg 334472313efbSmrgsolaris*) 334572313efbSmrg lt_cv_deplibs_check_method=pass_all 334672313efbSmrg ;; 334772313efbSmrg 33480b661123Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 33490b661123Smrg lt_cv_deplibs_check_method=pass_all 33500b661123Smrg ;; 33510b661123Smrg 335272313efbSmrgsysv4 | sysv4.3*) 335372313efbSmrg case $host_vendor in 335472313efbSmrg motorola) 335572313efbSmrg 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]]' 335672313efbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 335772313efbSmrg ;; 335872313efbSmrg ncr) 335972313efbSmrg lt_cv_deplibs_check_method=pass_all 3360bdcaa8d0Smrg ;; 336172313efbSmrg sequent) 336272313efbSmrg lt_cv_file_magic_cmd='/bin/file' 336372313efbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3364bdcaa8d0Smrg ;; 336572313efbSmrg sni) 336672313efbSmrg lt_cv_file_magic_cmd='/bin/file' 336772313efbSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 336872313efbSmrg lt_cv_file_magic_test_file=/lib/libc.so 3369bdcaa8d0Smrg ;; 337072313efbSmrg siemens) 337172313efbSmrg lt_cv_deplibs_check_method=pass_all 337272313efbSmrg ;; 337372313efbSmrg pc) 337472313efbSmrg lt_cv_deplibs_check_method=pass_all 337572313efbSmrg ;; 337672313efbSmrg esac 337772313efbSmrg ;; 3378bdcaa8d0Smrg 33790b661123Smrgtpf*) 338072313efbSmrg lt_cv_deplibs_check_method=pass_all 338172313efbSmrg ;; 338272313efbSmrgesac 338372313efbSmrg]) 3384880c7e28Smrg 3385880c7e28Smrgfile_magic_glob= 3386880c7e28Smrgwant_nocaseglob=no 3387880c7e28Smrgif test "$build" = "$host"; then 3388880c7e28Smrg case $host_os in 3389880c7e28Smrg mingw* | pw32*) 3390880c7e28Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3391880c7e28Smrg want_nocaseglob=yes 3392880c7e28Smrg else 3393880c7e28Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3394880c7e28Smrg fi 3395880c7e28Smrg ;; 3396880c7e28Smrg esac 3397880c7e28Smrgfi 3398880c7e28Smrg 339972313efbSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 340072313efbSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 340172313efbSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3402bdcaa8d0Smrg 34030b661123Smrg_LT_DECL([], [deplibs_check_method], [1], 34040b661123Smrg [Method to check whether dependent libraries are shared objects]) 34050b661123Smrg_LT_DECL([], [file_magic_cmd], [1], 3406880c7e28Smrg [Command to use when deplibs_check_method = "file_magic"]) 3407880c7e28Smrg_LT_DECL([], [file_magic_glob], [1], 3408880c7e28Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3409880c7e28Smrg_LT_DECL([], [want_nocaseglob], [1], 3410880c7e28Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 34110b661123Smrg])# _LT_CHECK_MAGIC_METHOD 3412bdcaa8d0Smrg 34130b661123Smrg 34140b661123Smrg# LT_PATH_NM 341572313efbSmrg# ---------- 34160b661123Smrg# find the pathname to a BSD- or MS-compatible name lister 34170b661123SmrgAC_DEFUN([LT_PATH_NM], 34180b661123Smrg[AC_REQUIRE([AC_PROG_CC])dnl 34190b661123SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 342072313efbSmrg[if test -n "$NM"; then 342172313efbSmrg # Let the user override the test. 342272313efbSmrg lt_cv_path_NM="$NM" 342372313efbSmrgelse 342472313efbSmrg lt_nm_to_check="${ac_tool_prefix}nm" 342572313efbSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 342672313efbSmrg lt_nm_to_check="$lt_nm_to_check nm" 342772313efbSmrg fi 342872313efbSmrg for lt_tmp_nm in $lt_nm_to_check; do 342972313efbSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 343072313efbSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 343172313efbSmrg IFS="$lt_save_ifs" 343272313efbSmrg test -z "$ac_dir" && ac_dir=. 343372313efbSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 343472313efbSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 343572313efbSmrg # Check to see if the nm accepts a BSD-compat flag. 343672313efbSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 343772313efbSmrg # nm: unknown option "B" ignored 343872313efbSmrg # Tru64's nm complains that /dev/null is an invalid object file 343972313efbSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 344072313efbSmrg */dev/null* | *'Invalid file or object type'*) 344172313efbSmrg lt_cv_path_NM="$tmp_nm -B" 344272313efbSmrg break 344372313efbSmrg ;; 344472313efbSmrg *) 344572313efbSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 344672313efbSmrg */dev/null*) 344772313efbSmrg lt_cv_path_NM="$tmp_nm -p" 344872313efbSmrg break 344972313efbSmrg ;; 345072313efbSmrg *) 345172313efbSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 345272313efbSmrg continue # so that we can try to find one that supports BSD flags 345372313efbSmrg ;; 345472313efbSmrg esac 345572313efbSmrg ;; 345672313efbSmrg esac 345772313efbSmrg fi 345872313efbSmrg done 345972313efbSmrg IFS="$lt_save_ifs" 3460bdcaa8d0Smrg done 34610b661123Smrg : ${lt_cv_path_NM=no} 346272313efbSmrgfi]) 34630b661123Smrgif test "$lt_cv_path_NM" != "no"; then 34640b661123Smrg NM="$lt_cv_path_NM" 34650b661123Smrgelse 34660b661123Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3467880c7e28Smrg if test -n "$DUMPBIN"; then : 3468880c7e28Smrg # Let the user override the test. 3469880c7e28Smrg else 3470880c7e28Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3471880c7e28Smrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3472880c7e28Smrg *COFF*) 3473880c7e28Smrg DUMPBIN="$DUMPBIN -symbols" 3474880c7e28Smrg ;; 3475880c7e28Smrg *) 3476880c7e28Smrg DUMPBIN=: 3477880c7e28Smrg ;; 3478880c7e28Smrg esac 3479880c7e28Smrg fi 34800b661123Smrg AC_SUBST([DUMPBIN]) 34810b661123Smrg if test "$DUMPBIN" != ":"; then 34820b661123Smrg NM="$DUMPBIN" 34830b661123Smrg fi 34840b661123Smrgfi 34850b661123Smrgtest -z "$NM" && NM=nm 34860b661123SmrgAC_SUBST([NM]) 34870b661123Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 34880b661123Smrg 34890b661123SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 34900b661123Smrg [lt_cv_nm_interface="BSD nm" 34910b661123Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3492880c7e28Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 34930b661123Smrg (eval "$ac_compile" 2>conftest.err) 34940b661123Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3495880c7e28Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 34960b661123Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 34970b661123Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3498880c7e28Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 34990b661123Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 35000b661123Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 35010b661123Smrg lt_cv_nm_interface="MS dumpbin" 35020b661123Smrg fi 35030b661123Smrg rm -f conftest*]) 35040b661123Smrg])# LT_PATH_NM 3505bdcaa8d0Smrg 35060b661123Smrg# Old names: 35070b661123SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 35080b661123SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 35090b661123Smrgdnl aclocal-1.4 backwards compatibility: 35100b661123Smrgdnl AC_DEFUN([AM_PROG_NM], []) 35110b661123Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3512bdcaa8d0Smrg 3513880c7e28Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3514880c7e28Smrg# -------------------------------- 3515880c7e28Smrg# how to determine the name of the shared library 3516880c7e28Smrg# associated with a specific link library. 3517880c7e28Smrg# -- PORTME fill in with the dynamic library characteristics 3518880c7e28Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3519880c7e28Smrg[m4_require([_LT_DECL_EGREP]) 3520880c7e28Smrgm4_require([_LT_DECL_OBJDUMP]) 3521880c7e28Smrgm4_require([_LT_DECL_DLLTOOL]) 3522880c7e28SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3523880c7e28Smrglt_cv_sharedlib_from_linklib_cmd, 3524880c7e28Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3525880c7e28Smrg 3526880c7e28Smrgcase $host_os in 3527880c7e28Smrgcygwin* | mingw* | pw32* | cegcc*) 3528880c7e28Smrg # two different shell functions defined in ltmain.sh 3529880c7e28Smrg # decide which to use based on capabilities of $DLLTOOL 3530880c7e28Smrg case `$DLLTOOL --help 2>&1` in 3531880c7e28Smrg *--identify-strict*) 3532880c7e28Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3533880c7e28Smrg ;; 3534880c7e28Smrg *) 3535880c7e28Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3536880c7e28Smrg ;; 3537880c7e28Smrg esac 3538880c7e28Smrg ;; 3539880c7e28Smrg*) 3540880c7e28Smrg # fallback: assume linklib IS sharedlib 3541880c7e28Smrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3542880c7e28Smrg ;; 3543880c7e28Smrgesac 3544880c7e28Smrg]) 3545880c7e28Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3546880c7e28Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3547880c7e28Smrg 3548880c7e28Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3549880c7e28Smrg [Command to associate shared and link libraries]) 3550880c7e28Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3551880c7e28Smrg 3552880c7e28Smrg 3553880c7e28Smrg# _LT_PATH_MANIFEST_TOOL 3554880c7e28Smrg# ---------------------- 3555880c7e28Smrg# locate the manifest tool 3556880c7e28Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3557880c7e28Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3558880c7e28Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3559880c7e28SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3560880c7e28Smrg [lt_cv_path_mainfest_tool=no 3561880c7e28Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3562880c7e28Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3563880c7e28Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3564880c7e28Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3565880c7e28Smrg lt_cv_path_mainfest_tool=yes 3566880c7e28Smrg fi 3567880c7e28Smrg rm -f conftest*]) 3568880c7e28Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3569880c7e28Smrg MANIFEST_TOOL=: 3570880c7e28Smrgfi 3571880c7e28Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3572880c7e28Smrg])# _LT_PATH_MANIFEST_TOOL 3573880c7e28Smrg 35740b661123Smrg 35750b661123Smrg# LT_LIB_M 35760b661123Smrg# -------- 357772313efbSmrg# check for math library 35780b661123SmrgAC_DEFUN([LT_LIB_M], 357972313efbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 358072313efbSmrgLIBM= 358172313efbSmrgcase $host in 3582880c7e28Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 358372313efbSmrg # These system don't have libm, or don't need it 358472313efbSmrg ;; 358572313efbSmrg*-ncr-sysv4.3*) 358672313efbSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 358772313efbSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 358872313efbSmrg ;; 358972313efbSmrg*) 359072313efbSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3591bdcaa8d0Smrg ;; 3592bdcaa8d0Smrgesac 35930b661123SmrgAC_SUBST([LIBM]) 35940b661123Smrg])# LT_LIB_M 3595bdcaa8d0Smrg 35960b661123Smrg# Old name: 35970b661123SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 35980b661123Smrgdnl aclocal-1.4 backwards compatibility: 35990b661123Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3600bdcaa8d0Smrg 3601bdcaa8d0Smrg 36020b661123Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 36030b661123Smrg# ------------------------------- 36040b661123Smrgm4_defun([_LT_COMPILER_NO_RTTI], 36050b661123Smrg[m4_require([_LT_TAG_COMPILER])dnl 3606bdcaa8d0Smrg 36070b661123Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3608bdcaa8d0Smrg 36090b661123Smrgif test "$GCC" = yes; then 3610880c7e28Smrg case $cc_basename in 3611880c7e28Smrg nvcc*) 3612880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3613880c7e28Smrg *) 3614880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3615880c7e28Smrg esac 3616bdcaa8d0Smrg 36170b661123Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 36180b661123Smrg lt_cv_prog_compiler_rtti_exceptions, 36190b661123Smrg [-fno-rtti -fno-exceptions], [], 36200b661123Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 36210b661123Smrgfi 36220b661123Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 36230b661123Smrg [Compiler flag to turn off builtin functions]) 36240b661123Smrg])# _LT_COMPILER_NO_RTTI 3625bdcaa8d0Smrg 3626bdcaa8d0Smrg 36270b661123Smrg# _LT_CMD_GLOBAL_SYMBOLS 36280b661123Smrg# ---------------------- 36290b661123Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 36300b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 36310b661123SmrgAC_REQUIRE([AC_PROG_CC])dnl 3632880c7e28SmrgAC_REQUIRE([AC_PROG_AWK])dnl 36330b661123SmrgAC_REQUIRE([LT_PATH_NM])dnl 36340b661123SmrgAC_REQUIRE([LT_PATH_LD])dnl 36350b661123Smrgm4_require([_LT_DECL_SED])dnl 36360b661123Smrgm4_require([_LT_DECL_EGREP])dnl 36370b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 3638bdcaa8d0Smrg 36390b661123Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 36400b661123SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 36410b661123SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 364272313efbSmrg[ 36430b661123Smrg# These are sane defaults that work on at least a few old systems. 36440b661123Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3645bdcaa8d0Smrg 36460b661123Smrg# Character class describing NM global symbol codes. 36470b661123Smrgsymcode='[[BCDEGRST]]' 3648bdcaa8d0Smrg 36490b661123Smrg# Regexp to match symbols that can be accessed directly from C. 36500b661123Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3651bdcaa8d0Smrg 36520b661123Smrg# Define system-specific variables. 36530b661123Smrgcase $host_os in 36540b661123Smrgaix*) 36550b661123Smrg symcode='[[BCDT]]' 36560b661123Smrg ;; 36570b661123Smrgcygwin* | mingw* | pw32* | cegcc*) 36580b661123Smrg symcode='[[ABCDGISTW]]' 36590b661123Smrg ;; 36600b661123Smrghpux*) 36610b661123Smrg if test "$host_cpu" = ia64; then 36620b661123Smrg symcode='[[ABCDEGRST]]' 36630b661123Smrg fi 36640b661123Smrg ;; 36650b661123Smrgirix* | nonstopux*) 36660b661123Smrg symcode='[[BCDEGRST]]' 36670b661123Smrg ;; 36680b661123Smrgosf*) 36690b661123Smrg symcode='[[BCDEGQRST]]' 36700b661123Smrg ;; 36710b661123Smrgsolaris*) 36720b661123Smrg symcode='[[BDRT]]' 36730b661123Smrg ;; 36740b661123Smrgsco3.2v5*) 36750b661123Smrg symcode='[[DT]]' 36760b661123Smrg ;; 36770b661123Smrgsysv4.2uw2*) 36780b661123Smrg symcode='[[DT]]' 36790b661123Smrg ;; 36800b661123Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 36810b661123Smrg symcode='[[ABDT]]' 36820b661123Smrg ;; 36830b661123Smrgsysv4) 36840b661123Smrg symcode='[[DFNSTU]]' 36850b661123Smrg ;; 36860b661123Smrgesac 3687bdcaa8d0Smrg 36880b661123Smrg# If we're using GNU nm, then use its standard symbol codes. 36890b661123Smrgcase `$NM -V 2>&1` in 36900b661123Smrg*GNU* | *'with BFD'*) 36910b661123Smrg symcode='[[ABCDGIRSTW]]' ;; 36920b661123Smrgesac 3693bdcaa8d0Smrg 36940b661123Smrg# Transform an extracted symbol line into a proper C declaration. 36950b661123Smrg# Some systems (esp. on ia64) link data and code symbols differently, 36960b661123Smrg# so use this general approach. 36970b661123Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3698bdcaa8d0Smrg 36990b661123Smrg# Transform an extracted symbol line into symbol name and symbol address 3700880c7e28Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3701880c7e28Smrglt_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'" 3702bdcaa8d0Smrg 37030b661123Smrg# Handle CRLF in mingw tool chain 37040b661123Smrgopt_cr= 37050b661123Smrgcase $build_os in 37060b661123Smrgmingw*) 37070b661123Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 37080b661123Smrg ;; 37090b661123Smrgesac 3710bdcaa8d0Smrg 37110b661123Smrg# Try without a prefix underscore, then with it. 37120b661123Smrgfor ac_symprfx in "" "_"; do 3713bdcaa8d0Smrg 37140b661123Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 37150b661123Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3716bdcaa8d0Smrg 37170b661123Smrg # Write the raw and C identifiers. 37180b661123Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 37190b661123Smrg # Fake it for dumpbin and say T for any non-static function 37200b661123Smrg # and D for any global variable. 37210b661123Smrg # Also find C++ and __fastcall symbols from MSVC++, 37220b661123Smrg # which start with @ or ?. 37230b661123Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 37240b661123Smrg" {last_section=section; section=\$ 3};"\ 3725880c7e28Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 37260b661123Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 37270b661123Smrg" \$ 0!~/External *\|/{next};"\ 37280b661123Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 37290b661123Smrg" {if(hide[section]) next};"\ 37300b661123Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 37310b661123Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 37320b661123Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 37330b661123Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 37340b661123Smrg" ' prfx=^$ac_symprfx]" 37350b661123Smrg else 37360b661123Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 373796ce994aSmrg fi 3738880c7e28Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 373996ce994aSmrg 37400b661123Smrg # Check to see that the pipe works correctly. 37410b661123Smrg pipe_works=no 374296ce994aSmrg 37430b661123Smrg rm -f conftest* 37440b661123Smrg cat > conftest.$ac_ext <<_LT_EOF 37450b661123Smrg#ifdef __cplusplus 37460b661123Smrgextern "C" { 37470b661123Smrg#endif 37480b661123Smrgchar nm_test_var; 37490b661123Smrgvoid nm_test_func(void); 37500b661123Smrgvoid nm_test_func(void){} 37510b661123Smrg#ifdef __cplusplus 37520b661123Smrg} 37530b661123Smrg#endif 37540b661123Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 37550b661123Smrg_LT_EOF 375696ce994aSmrg 37570b661123Smrg if AC_TRY_EVAL(ac_compile); then 37580b661123Smrg # Now try to grab the symbols. 37590b661123Smrg nlist=conftest.nm 3760880c7e28Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 37610b661123Smrg # Try sorting and uniquifying the output. 37620b661123Smrg if sort "$nlist" | uniq > "$nlist"T; then 37630b661123Smrg mv -f "$nlist"T "$nlist" 37640b661123Smrg else 37650b661123Smrg rm -f "$nlist"T 37660b661123Smrg fi 376796ce994aSmrg 37680b661123Smrg # Make sure that we snagged all the symbols we need. 37690b661123Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 37700b661123Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 37710b661123Smrg cat <<_LT_EOF > conftest.$ac_ext 3772880c7e28Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3773880c7e28Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3774880c7e28Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3775880c7e28Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3776880c7e28Smrg# define LT@&t@_DLSYM_CONST 3777880c7e28Smrg#elif defined(__osf__) 3778880c7e28Smrg/* This system does not cope well with relocations in const data. */ 3779880c7e28Smrg# define LT@&t@_DLSYM_CONST 3780880c7e28Smrg#else 3781880c7e28Smrg# define LT@&t@_DLSYM_CONST const 3782880c7e28Smrg#endif 3783880c7e28Smrg 37840b661123Smrg#ifdef __cplusplus 37850b661123Smrgextern "C" { 37860b661123Smrg#endif 378796ce994aSmrg 37880b661123Smrg_LT_EOF 37890b661123Smrg # Now generate the symbol file. 37900b661123Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 379196ce994aSmrg 37920b661123Smrg cat <<_LT_EOF >> conftest.$ac_ext 379396ce994aSmrg 37940b661123Smrg/* The mapping between symbol names and symbols. */ 3795880c7e28SmrgLT@&t@_DLSYM_CONST struct { 37960b661123Smrg const char *name; 37970b661123Smrg void *address; 37980b661123Smrg} 37990b661123Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 38000b661123Smrg{ 38010b661123Smrg { "@PROGRAM@", (void *) 0 }, 38020b661123Smrg_LT_EOF 38030b661123Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 38040b661123Smrg cat <<\_LT_EOF >> conftest.$ac_ext 38050b661123Smrg {0, (void *) 0} 38060b661123Smrg}; 380796ce994aSmrg 38080b661123Smrg/* This works around a problem in FreeBSD linker */ 38090b661123Smrg#ifdef FREEBSD_WORKAROUND 38100b661123Smrgstatic const void *lt_preloaded_setup() { 38110b661123Smrg return lt__PROGRAM__LTX_preloaded_symbols; 38120b661123Smrg} 38130b661123Smrg#endif 381496ce994aSmrg 38150b661123Smrg#ifdef __cplusplus 38160b661123Smrg} 38170b661123Smrg#endif 38180b661123Smrg_LT_EOF 38190b661123Smrg # Now try linking the two files. 38200b661123Smrg mv conftest.$ac_objext conftstm.$ac_objext 3821880c7e28Smrg lt_globsym_save_LIBS=$LIBS 3822880c7e28Smrg lt_globsym_save_CFLAGS=$CFLAGS 38230b661123Smrg LIBS="conftstm.$ac_objext" 38240b661123Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 38250b661123Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 38260b661123Smrg pipe_works=yes 38270b661123Smrg fi 3828880c7e28Smrg LIBS=$lt_globsym_save_LIBS 3829880c7e28Smrg CFLAGS=$lt_globsym_save_CFLAGS 38300b661123Smrg else 38310b661123Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 38320b661123Smrg fi 38330b661123Smrg else 38340b661123Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 38350b661123Smrg fi 383672313efbSmrg else 38370b661123Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 383872313efbSmrg fi 383972313efbSmrg else 38400b661123Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 38410b661123Smrg cat conftest.$ac_ext >&5 384272313efbSmrg fi 38430b661123Smrg rm -rf conftest* conftst* 3844bdcaa8d0Smrg 38450b661123Smrg # Do not use the global_symbol_pipe unless it works. 38460b661123Smrg if test "$pipe_works" = yes; then 38470b661123Smrg break 38480b661123Smrg else 38490b661123Smrg lt_cv_sys_global_symbol_pipe= 38500b661123Smrg fi 38510b661123Smrgdone 38520b661123Smrg]) 38530b661123Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 38540b661123Smrg lt_cv_sys_global_symbol_to_cdecl= 38550b661123Smrgfi 38560b661123Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 38570b661123Smrg AC_MSG_RESULT(failed) 385872313efbSmrgelse 38590b661123Smrg AC_MSG_RESULT(ok) 386072313efbSmrgfi 3861bdcaa8d0Smrg 3862880c7e28Smrg# Response file support. 3863880c7e28Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3864880c7e28Smrg nm_file_list_spec='@' 3865880c7e28Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3866880c7e28Smrg nm_file_list_spec='@' 3867880c7e28Smrgfi 3868880c7e28Smrg 38690b661123Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 38700b661123Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 38710b661123Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 38720b661123Smrg [Transform the output of nm in a proper C declaration]) 38730b661123Smrg_LT_DECL([global_symbol_to_c_name_address], 38740b661123Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 38750b661123Smrg [Transform the output of nm in a C name address pair]) 38760b661123Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 38770b661123Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 38780b661123Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3879880c7e28Smrg_LT_DECL([], [nm_file_list_spec], [1], 3880880c7e28Smrg [Specify filename containing input files for $NM]) 38810b661123Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3882bdcaa8d0Smrg 3883bdcaa8d0Smrg 38840b661123Smrg# _LT_COMPILER_PIC([TAGNAME]) 38850b661123Smrg# --------------------------- 38860b661123Smrgm4_defun([_LT_COMPILER_PIC], 38870b661123Smrg[m4_require([_LT_TAG_COMPILER])dnl 38880b661123Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 38890b661123Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 38900b661123Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3891bdcaa8d0Smrg 38920b661123Smrgm4_if([$1], [CXX], [ 38930b661123Smrg # C++ specific cases for pic, static, wl, etc. 38940b661123Smrg if test "$GXX" = yes; then 38950b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 38960b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 389796ce994aSmrg 38980b661123Smrg case $host_os in 38990b661123Smrg aix*) 39000b661123Smrg # All AIX code is PIC. 390196ce994aSmrg if test "$host_cpu" = ia64; then 39020b661123Smrg # AIX 5 now supports IA64 processor 39030b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 390472313efbSmrg fi 390572313efbSmrg ;; 3906bdcaa8d0Smrg 39070b661123Smrg amigaos*) 390872313efbSmrg case $host_cpu in 39090b661123Smrg powerpc) 39100b661123Smrg # see comment about AmigaOS4 .so support 39110b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39120b661123Smrg ;; 39130b661123Smrg m68k) 39140b661123Smrg # FIXME: we need at least 68020 code to build shared libraries, but 39150b661123Smrg # adding the `-m68020' flag to GCC prevents building anything better, 39160b661123Smrg # like `-m68040'. 39170b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 391872313efbSmrg ;; 391972313efbSmrg esac 392072313efbSmrg ;; 3921bdcaa8d0Smrg 39220b661123Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 39230b661123Smrg # PIC is the default for these OSes. 39240b661123Smrg ;; 39250b661123Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 39260b661123Smrg # This hack is so that the source file can tell whether it is being 39270b661123Smrg # built for inclusion in a dll (and should export symbols for example). 39280b661123Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 39290b661123Smrg # (--disable-auto-import) libraries 39300b661123Smrg m4_if([$1], [GCJ], [], 39310b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 39320b661123Smrg ;; 39330b661123Smrg darwin* | rhapsody*) 39340b661123Smrg # PIC is the default on this platform 39350b661123Smrg # Common symbols not allowed in MH_DYLIB files 39360b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 39370b661123Smrg ;; 39380b661123Smrg *djgpp*) 39390b661123Smrg # DJGPP does not support shared libraries at all 39400b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 39410b661123Smrg ;; 3942880c7e28Smrg haiku*) 3943880c7e28Smrg # PIC is the default for Haiku. 3944880c7e28Smrg # The "-static" flag exists, but is broken. 3945880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3946880c7e28Smrg ;; 39470b661123Smrg interix[[3-9]]*) 39480b661123Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 39490b661123Smrg # Instead, we relocate shared libraries at runtime. 39500b661123Smrg ;; 39510b661123Smrg sysv4*MP*) 39520b661123Smrg if test -d /usr/nec; then 39530b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 39540b661123Smrg fi 39550b661123Smrg ;; 39560b661123Smrg hpux*) 39570b661123Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 39580b661123Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 39590b661123Smrg # sets the default TLS model and affects inlining. 39600b661123Smrg case $host_cpu in 39610b661123Smrg hppa*64*) 396272313efbSmrg ;; 396396ce994aSmrg *) 39640b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 396572313efbSmrg ;; 39660b661123Smrg esac 39670b661123Smrg ;; 39680b661123Smrg *qnx* | *nto*) 39690b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 39700b661123Smrg # it will coredump. 39710b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 39720b661123Smrg ;; 39730b661123Smrg *) 39740b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39750b661123Smrg ;; 397696ce994aSmrg esac 39770b661123Smrg else 39780b661123Smrg case $host_os in 39790b661123Smrg aix[[4-9]]*) 39800b661123Smrg # All AIX code is PIC. 39810b661123Smrg if test "$host_cpu" = ia64; then 39820b661123Smrg # AIX 5 now supports IA64 processor 39830b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39840b661123Smrg else 39850b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 398696ce994aSmrg fi 398796ce994aSmrg ;; 39880b661123Smrg chorus*) 39890b661123Smrg case $cc_basename in 39900b661123Smrg cxch68*) 39910b661123Smrg # Green Hills C++ Compiler 39920b661123Smrg # _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" 399396ce994aSmrg ;; 399472313efbSmrg esac 399596ce994aSmrg ;; 3996880c7e28Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3997880c7e28Smrg # This hack is so that the source file can tell whether it is being 3998880c7e28Smrg # built for inclusion in a dll (and should export symbols for example). 3999880c7e28Smrg m4_if([$1], [GCJ], [], 4000880c7e28Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4001880c7e28Smrg ;; 40020b661123Smrg dgux*) 40030b661123Smrg case $cc_basename in 40040b661123Smrg ec++*) 40050b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40060b661123Smrg ;; 40070b661123Smrg ghcx*) 40080b661123Smrg # Green Hills C++ Compiler 40090b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 40100b661123Smrg ;; 40110b661123Smrg *) 40120b661123Smrg ;; 401372313efbSmrg esac 401472313efbSmrg ;; 40150b661123Smrg freebsd* | dragonfly*) 40160b661123Smrg # FreeBSD uses GNU C++ 401772313efbSmrg ;; 40180b661123Smrg hpux9* | hpux10* | hpux11*) 40190b661123Smrg case $cc_basename in 40200b661123Smrg CC*) 40210b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40220b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40230b661123Smrg if test "$host_cpu" != ia64; then 40240b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40250b661123Smrg fi 40260b661123Smrg ;; 40270b661123Smrg aCC*) 40280b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40290b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 40300b661123Smrg case $host_cpu in 40310b661123Smrg hppa*64*|ia64*) 40320b661123Smrg # +Z the default 40330b661123Smrg ;; 40340b661123Smrg *) 40350b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 40360b661123Smrg ;; 40370b661123Smrg esac 40380b661123Smrg ;; 40390b661123Smrg *) 40400b661123Smrg ;; 40410b661123Smrg esac 404272313efbSmrg ;; 40430b661123Smrg interix*) 40440b661123Smrg # This is c89, which is MS Visual C++ (no shared libs) 40450b661123Smrg # Anyone wants to do a port? 404672313efbSmrg ;; 40470b661123Smrg irix5* | irix6* | nonstopux*) 40480b661123Smrg case $cc_basename in 40490b661123Smrg CC*) 40500b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40510b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40520b661123Smrg # CC pic flag -KPIC is the default. 40530b661123Smrg ;; 40540b661123Smrg *) 40550b661123Smrg ;; 40560b661123Smrg esac 405772313efbSmrg ;; 4058880c7e28Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 40590b661123Smrg case $cc_basename in 40600b661123Smrg KCC*) 40610b661123Smrg # KAI C++ Compiler 40620b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 40630b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40640b661123Smrg ;; 40650b661123Smrg ecpc* ) 40660b661123Smrg # old Intel C++ for x86_64 which still supported -KPIC. 40670b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40680b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 40690b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40700b661123Smrg ;; 40710b661123Smrg icpc* ) 40720b661123Smrg # Intel C++, used to be incompatible with GCC. 40730b661123Smrg # ICC 10 doesn't accept -KPIC any more. 40740b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40750b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 40760b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 40770b661123Smrg ;; 40780b661123Smrg pgCC* | pgcpp*) 40790b661123Smrg # Portland Group C++ compiler 40800b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40810b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 40820b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 40830b661123Smrg ;; 40840b661123Smrg cxx*) 40850b661123Smrg # Compaq C++ 40860b661123Smrg # Make sure the PIC flag is empty. It appears that all Alpha 40870b661123Smrg # Linux and Compaq Tru64 Unix objects are PIC. 40880b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 40890b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 40900b661123Smrg ;; 4091880c7e28Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4092880c7e28Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 40930b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 40940b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 40950b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 40960b661123Smrg ;; 40970b661123Smrg *) 40980b661123Smrg case `$CC -V 2>&1 | sed 5q` in 40990b661123Smrg *Sun\ C*) 41000b661123Smrg # Sun C++ 5.9 41010b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41020b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41030b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41040b661123Smrg ;; 41050b661123Smrg esac 41060b661123Smrg ;; 41070b661123Smrg esac 410872313efbSmrg ;; 41090b661123Smrg lynxos*) 411072313efbSmrg ;; 41110b661123Smrg m88k*) 411272313efbSmrg ;; 41130b661123Smrg mvs*) 41140b661123Smrg case $cc_basename in 41150b661123Smrg cxx*) 41160b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 41170b661123Smrg ;; 41180b661123Smrg *) 41190b661123Smrg ;; 41200b661123Smrg esac 412172313efbSmrg ;; 41220b661123Smrg netbsd*) 412396ce994aSmrg ;; 41240b661123Smrg *qnx* | *nto*) 41250b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 41260b661123Smrg # it will coredump. 41270b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 41280b661123Smrg ;; 41290b661123Smrg osf3* | osf4* | osf5*) 41300b661123Smrg case $cc_basename in 41310b661123Smrg KCC*) 41320b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 41330b661123Smrg ;; 41340b661123Smrg RCC*) 41350b661123Smrg # Rational C++ 2.4.1 41360b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41370b661123Smrg ;; 41380b661123Smrg cxx*) 41390b661123Smrg # Digital/Compaq C++ 41400b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41410b661123Smrg # Make sure the PIC flag is empty. It appears that all Alpha 41420b661123Smrg # Linux and Compaq Tru64 Unix objects are PIC. 41430b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 41440b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 41450b661123Smrg ;; 41460b661123Smrg *) 41470b661123Smrg ;; 41480b661123Smrg esac 414996ce994aSmrg ;; 41500b661123Smrg psos*) 415196ce994aSmrg ;; 41520b661123Smrg solaris*) 41530b661123Smrg case $cc_basename in 4154880c7e28Smrg CC* | sunCC*) 41550b661123Smrg # Sun C++ 4.2, 5.x and Centerline C++ 41560b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41570b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41580b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 41590b661123Smrg ;; 41600b661123Smrg gcx*) 41610b661123Smrg # Green Hills C++ Compiler 41620b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 41630b661123Smrg ;; 41640b661123Smrg *) 41650b661123Smrg ;; 41660b661123Smrg esac 416796ce994aSmrg ;; 41680b661123Smrg sunos4*) 41690b661123Smrg case $cc_basename in 41700b661123Smrg CC*) 41710b661123Smrg # Sun C++ 4.x 41720b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41730b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41740b661123Smrg ;; 41750b661123Smrg lcc*) 41760b661123Smrg # Lucid 41770b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 41780b661123Smrg ;; 417972313efbSmrg *) 418072313efbSmrg ;; 418172313efbSmrg esac 418272313efbSmrg ;; 41830b661123Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 41840b661123Smrg case $cc_basename in 41850b661123Smrg CC*) 41860b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 41870b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41880b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 41890b661123Smrg ;; 41900b661123Smrg esac 419172313efbSmrg ;; 41920b661123Smrg tandem*) 41930b661123Smrg case $cc_basename in 41940b661123Smrg NCC*) 41950b661123Smrg # NonStop-UX NCC 3.20 41960b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 41970b661123Smrg ;; 419896ce994aSmrg *) 419996ce994aSmrg ;; 42000b661123Smrg esac 420196ce994aSmrg ;; 42020b661123Smrg vxworks*) 420372313efbSmrg ;; 420472313efbSmrg *) 42050b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 420672313efbSmrg ;; 420772313efbSmrg esac 42080b661123Smrg fi 42090b661123Smrg], 42100b661123Smrg[ 42110b661123Smrg if test "$GCC" = yes; then 42120b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42130b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42140b661123Smrg 42150b661123Smrg case $host_os in 42160b661123Smrg aix*) 42170b661123Smrg # All AIX code is PIC. 42180b661123Smrg if test "$host_cpu" = ia64; then 42190b661123Smrg # AIX 5 now supports IA64 processor 42200b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42210b661123Smrg fi 42220b661123Smrg ;; 42230b661123Smrg 42240b661123Smrg amigaos*) 42250b661123Smrg case $host_cpu in 42260b661123Smrg powerpc) 42270b661123Smrg # see comment about AmigaOS4 .so support 42280b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42290b661123Smrg ;; 42300b661123Smrg m68k) 42310b661123Smrg # FIXME: we need at least 68020 code to build shared libraries, but 42320b661123Smrg # adding the `-m68020' flag to GCC prevents building anything better, 42330b661123Smrg # like `-m68040'. 42340b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42350b661123Smrg ;; 42360b661123Smrg esac 42370b661123Smrg ;; 42380b661123Smrg 42390b661123Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42400b661123Smrg # PIC is the default for these OSes. 42410b661123Smrg ;; 42420b661123Smrg 42430b661123Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 42440b661123Smrg # This hack is so that the source file can tell whether it is being 42450b661123Smrg # built for inclusion in a dll (and should export symbols for example). 42460b661123Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42470b661123Smrg # (--disable-auto-import) libraries 42480b661123Smrg m4_if([$1], [GCJ], [], 42490b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42500b661123Smrg ;; 42510b661123Smrg 42520b661123Smrg darwin* | rhapsody*) 42530b661123Smrg # PIC is the default on this platform 42540b661123Smrg # Common symbols not allowed in MH_DYLIB files 42550b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42560b661123Smrg ;; 42570b661123Smrg 4258880c7e28Smrg haiku*) 4259880c7e28Smrg # PIC is the default for Haiku. 4260880c7e28Smrg # The "-static" flag exists, but is broken. 4261880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4262880c7e28Smrg ;; 4263880c7e28Smrg 42640b661123Smrg hpux*) 42650b661123Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42660b661123Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42670b661123Smrg # sets the default TLS model and affects inlining. 42680b661123Smrg case $host_cpu in 42690b661123Smrg hppa*64*) 42700b661123Smrg # +Z the default 427172313efbSmrg ;; 427272313efbSmrg *) 42730b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 427472313efbSmrg ;; 42750b661123Smrg esac 42760b661123Smrg ;; 42770b661123Smrg 42780b661123Smrg interix[[3-9]]*) 42790b661123Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42800b661123Smrg # Instead, we relocate shared libraries at runtime. 42810b661123Smrg ;; 42820b661123Smrg 42830b661123Smrg msdosdjgpp*) 42840b661123Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 42850b661123Smrg # on systems that don't support them. 42860b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42870b661123Smrg enable_shared=no 42880b661123Smrg ;; 42890b661123Smrg 42900b661123Smrg *nto* | *qnx*) 42910b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42920b661123Smrg # it will coredump. 42930b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 42940b661123Smrg ;; 42950b661123Smrg 42960b661123Smrg sysv4*MP*) 42970b661123Smrg if test -d /usr/nec; then 42980b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42990b661123Smrg fi 43000b661123Smrg ;; 43010b661123Smrg 43020b661123Smrg *) 43030b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43040b661123Smrg ;; 430596ce994aSmrg esac 4306880c7e28Smrg 4307880c7e28Smrg case $cc_basename in 4308880c7e28Smrg nvcc*) # Cuda Compiler Driver 2.2 4309880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4310880c7e28Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4311880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4312880c7e28Smrg fi 4313880c7e28Smrg ;; 4314880c7e28Smrg esac 43150b661123Smrg else 43160b661123Smrg # PORTME Check for flag to pass linker flags through the system compiler. 43170b661123Smrg case $host_os in 43180b661123Smrg aix*) 43190b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43200b661123Smrg if test "$host_cpu" = ia64; then 43210b661123Smrg # AIX 5 now supports IA64 processor 43220b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43230b661123Smrg else 43240b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43250b661123Smrg fi 43260b661123Smrg ;; 43270b661123Smrg 43280b661123Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 43290b661123Smrg # This hack is so that the source file can tell whether it is being 43300b661123Smrg # built for inclusion in a dll (and should export symbols for example). 43310b661123Smrg m4_if([$1], [GCJ], [], 43320b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43330b661123Smrg ;; 43340b661123Smrg 43350b661123Smrg hpux9* | hpux10* | hpux11*) 43360b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43370b661123Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 43380b661123Smrg # not for PA HP-UX. 43390b661123Smrg case $host_cpu in 43400b661123Smrg hppa*64*|ia64*) 43410b661123Smrg # +Z the default 434272313efbSmrg ;; 434372313efbSmrg *) 43440b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 434572313efbSmrg ;; 43460b661123Smrg esac 43470b661123Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 43480b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 43490b661123Smrg ;; 4350bdcaa8d0Smrg 43510b661123Smrg irix5* | irix6* | nonstopux*) 43520b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43530b661123Smrg # PIC (with -KPIC) is the default. 43540b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43550b661123Smrg ;; 4356bdcaa8d0Smrg 4357880c7e28Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 43580b661123Smrg case $cc_basename in 43590b661123Smrg # old Intel for x86_64 which still supported -KPIC. 43600b661123Smrg ecc*) 43610b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43620b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43630b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43640b661123Smrg ;; 43650b661123Smrg # icc used to be incompatible with GCC. 43660b661123Smrg # ICC 10 doesn't accept -KPIC any more. 43670b661123Smrg icc* | ifort*) 43680b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43690b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43700b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43710b661123Smrg ;; 43720b661123Smrg # Lahey Fortran 8.1. 43730b661123Smrg lf95*) 43740b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43750b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 43760b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 43770b661123Smrg ;; 4378880c7e28Smrg nagfor*) 4379880c7e28Smrg # NAG Fortran compiler 4380880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4381880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4382880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4383880c7e28Smrg ;; 4384880c7e28Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 43850b661123Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 43860b661123Smrg # which looks to be a dead project) 43870b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43880b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 43890b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43900b661123Smrg ;; 43910b661123Smrg ccc*) 43920b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43930b661123Smrg # All Alpha code is PIC. 43940b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43950b661123Smrg ;; 4396880c7e28Smrg xl* | bgxl* | bgf* | mpixl*) 4397880c7e28Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 43980b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43990b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44000b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44010b661123Smrg ;; 44020b661123Smrg *) 44030b661123Smrg case `$CC -V 2>&1 | sed 5q` in 4404880c7e28Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4405880c7e28Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4406880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4407880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4409880c7e28Smrg ;; 4410880c7e28Smrg *Sun\ F* | *Sun*Fortran*) 4411880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4412880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4413880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4414880c7e28Smrg ;; 44150b661123Smrg *Sun\ C*) 44160b661123Smrg # Sun C 5.9 44170b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44180b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44190b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44200b661123Smrg ;; 4421880c7e28Smrg *Intel*\ [[CF]]*Compiler*) 4422880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4423880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4424880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4425880c7e28Smrg ;; 4426880c7e28Smrg *Portland\ Group*) 4427880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4428880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44290b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44300b661123Smrg ;; 44310b661123Smrg esac 44320b661123Smrg ;; 44330b661123Smrg esac 44340b661123Smrg ;; 4435bdcaa8d0Smrg 44360b661123Smrg newsos6) 44370b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44380b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44390b661123Smrg ;; 4440bdcaa8d0Smrg 44410b661123Smrg *nto* | *qnx*) 44420b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44430b661123Smrg # it will coredump. 44440b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44450b661123Smrg ;; 4446bdcaa8d0Smrg 44470b661123Smrg osf3* | osf4* | osf5*) 44480b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44490b661123Smrg # All OSF/1 code is PIC. 44500b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44510b661123Smrg ;; 4452bdcaa8d0Smrg 44530b661123Smrg rdos*) 44540b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44550b661123Smrg ;; 4456bdcaa8d0Smrg 44570b661123Smrg solaris*) 44580b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44590b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44600b661123Smrg case $cc_basename in 4461880c7e28Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 44620b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 44630b661123Smrg *) 44640b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 44650b661123Smrg esac 44660b661123Smrg ;; 4467bdcaa8d0Smrg 44680b661123Smrg sunos4*) 44690b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44700b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44710b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44720b661123Smrg ;; 4473bdcaa8d0Smrg 44740b661123Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 44750b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44760b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44770b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44780b661123Smrg ;; 4479bdcaa8d0Smrg 44800b661123Smrg sysv4*MP*) 44810b661123Smrg if test -d /usr/nec ;then 44820b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 44830b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44840b661123Smrg fi 44850b661123Smrg ;; 448696ce994aSmrg 44870b661123Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 44880b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44890b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44900b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44910b661123Smrg ;; 4492bdcaa8d0Smrg 44930b661123Smrg unicos*) 44940b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44950b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 44960b661123Smrg ;; 4497bdcaa8d0Smrg 44980b661123Smrg uts4*) 44990b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45000b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45010b661123Smrg ;; 4502bdcaa8d0Smrg 45030b661123Smrg *) 45040b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45050b661123Smrg ;; 45060b661123Smrg esac 45070b661123Smrg fi 45080b661123Smrg]) 45090b661123Smrgcase $host_os in 45100b661123Smrg # For platforms which do not support PIC, -DPIC is meaningless: 45110b661123Smrg *djgpp*) 45120b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 45130b661123Smrg ;; 45140b661123Smrg *) 45150b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 45160b661123Smrg ;; 45170b661123Smrgesac 4518880c7e28Smrg 4519880c7e28SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4520880c7e28Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4521880c7e28Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4522880c7e28Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4523bdcaa8d0Smrg 45240b661123Smrg# 45250b661123Smrg# Check to make sure the PIC flag actually works. 45260b661123Smrg# 45270b661123Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 45280b661123Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 45290b661123Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 45300b661123Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 45310b661123Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 45320b661123Smrg "" | " "*) ;; 45330b661123Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 45340b661123Smrg esac], 45350b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 45360b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 453796ce994aSmrgfi 45380b661123Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 45390b661123Smrg [Additional compiler flags for building library objects]) 4540bdcaa8d0Smrg 4541880c7e28Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4542880c7e28Smrg [How to pass a linker flag through the compiler]) 45430b661123Smrg# 45440b661123Smrg# Check to make sure the static flag actually works. 45450b661123Smrg# 45460b661123Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 45470b661123Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 45480b661123Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 45490b661123Smrg $lt_tmp_static_flag, 45500b661123Smrg [], 45510b661123Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 45520b661123Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 45530b661123Smrg [Compiler flag to prevent dynamic linking]) 45540b661123Smrg])# _LT_COMPILER_PIC 455596ce994aSmrg 45560b661123Smrg 45570b661123Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 45580b661123Smrg# ---------------------------- 45590b661123Smrg# See if the linker supports building shared libraries. 45600b661123Smrgm4_defun([_LT_LINKER_SHLIBS], 45610b661123Smrg[AC_REQUIRE([LT_PATH_LD])dnl 45620b661123SmrgAC_REQUIRE([LT_PATH_NM])dnl 4563880c7e28Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 45640b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 45650b661123Smrgm4_require([_LT_DECL_EGREP])dnl 45660b661123Smrgm4_require([_LT_DECL_SED])dnl 45670b661123Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 45680b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 45690b661123SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 45700b661123Smrgm4_if([$1], [CXX], [ 45710b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4572880c7e28Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 45730b661123Smrg case $host_os in 45740b661123Smrg aix[[4-9]]*) 45750b661123Smrg # If we're using GNU nm, then we don't want the "-C" option. 45760b661123Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4577880c7e28Smrg # Also, AIX nm treats weak defined symbols like other global defined 4578880c7e28Smrg # symbols, whereas GNU nm marks them as "W". 45790b661123Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4580880c7e28Smrg _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' 45810b661123Smrg else 45820b661123Smrg _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' 458372313efbSmrg fi 458472313efbSmrg ;; 45850b661123Smrg pw32*) 45860b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4587880c7e28Smrg ;; 45880b661123Smrg cygwin* | mingw* | cegcc*) 4589880c7e28Smrg case $cc_basename in 4590880c7e28Smrg cl*) 4591880c7e28Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4592880c7e28Smrg ;; 4593880c7e28Smrg *) 4594880c7e28Smrg _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' 4595880c7e28Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4596880c7e28Smrg ;; 4597880c7e28Smrg esac 4598880c7e28Smrg ;; 45990b661123Smrg *) 46000b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4601880c7e28Smrg ;; 46020b661123Smrg esac 46030b661123Smrg], [ 46040b661123Smrg runpath_var= 46050b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 46060b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=no 46070b661123Smrg _LT_TAGVAR(archive_cmds, $1)= 46080b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 46090b661123Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 46100b661123Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 46110b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 46120b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 46130b661123Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 46140b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 46150b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 46160b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 46170b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 46180b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 46190b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 46200b661123Smrg _LT_TAGVAR(inherit_rpath, $1)=no 46210b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 46220b661123Smrg _LT_TAGVAR(module_cmds, $1)= 46230b661123Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 46240b661123Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 46250b661123Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 46260b661123Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 46270b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 46280b661123Smrg # include_expsyms should be a list of space-separated symbols to be *always* 46290b661123Smrg # included in the symbol list 46300b661123Smrg _LT_TAGVAR(include_expsyms, $1)= 46310b661123Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 46320b661123Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 46330b661123Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 46340b661123Smrg # as well as any symbol that contains `d'. 46350b661123Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 46360b661123Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 46370b661123Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 46380b661123Smrg # the symbol is explicitly referenced. Since portable code cannot 46390b661123Smrg # rely on this symbol name, it's probably fine to never include it in 46400b661123Smrg # preloaded symbol tables. 46410b661123Smrg # Exclude shared library initialization/finalization symbols. 46420b661123Smrgdnl Note also adjust exclude_expsyms for C++ above. 46430b661123Smrg extract_expsyms_cmds= 4644bdcaa8d0Smrg 46450b661123Smrg case $host_os in 46460b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 46470b661123Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 46480b661123Smrg # When not using gcc, we currently assume that we are using 46490b661123Smrg # Microsoft Visual C++. 46500b661123Smrg if test "$GCC" != yes; then 46510b661123Smrg with_gnu_ld=no 465272313efbSmrg fi 465372313efbSmrg ;; 46540b661123Smrg interix*) 46550b661123Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 46560b661123Smrg with_gnu_ld=yes 46570b661123Smrg ;; 46580b661123Smrg openbsd*) 46590b661123Smrg with_gnu_ld=no 46600b661123Smrg ;; 466172313efbSmrg esac 4662bdcaa8d0Smrg 46630b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4664880c7e28Smrg 4665880c7e28Smrg # On some targets, GNU ld is compatible enough with the native linker 4666880c7e28Smrg # that we're better off using the native interface for both. 4667880c7e28Smrg lt_use_gnu_ld_interface=no 46680b661123Smrg if test "$with_gnu_ld" = yes; then 4669880c7e28Smrg case $host_os in 4670880c7e28Smrg aix*) 4671880c7e28Smrg # The AIX port of GNU ld has always aspired to compatibility 4672880c7e28Smrg # with the native linker. However, as the warning in the GNU ld 4673880c7e28Smrg # block says, versions before 2.19.5* couldn't really create working 4674880c7e28Smrg # shared libraries, regardless of the interface used. 4675880c7e28Smrg case `$LD -v 2>&1` in 4676880c7e28Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4677880c7e28Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4678880c7e28Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4679880c7e28Smrg *) 4680880c7e28Smrg lt_use_gnu_ld_interface=yes 4681880c7e28Smrg ;; 4682880c7e28Smrg esac 4683880c7e28Smrg ;; 4684880c7e28Smrg *) 4685880c7e28Smrg lt_use_gnu_ld_interface=yes 4686880c7e28Smrg ;; 4687880c7e28Smrg esac 4688880c7e28Smrg fi 4689880c7e28Smrg 4690880c7e28Smrg if test "$lt_use_gnu_ld_interface" = yes; then 46910b661123Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 46920b661123Smrg wlarc='${wl}' 4693bdcaa8d0Smrg 46940b661123Smrg # Set some defaults for GNU ld with shared library support. These 46950b661123Smrg # are reset later if shared libraries are not supported. Putting them 46960b661123Smrg # here allows them to be overridden if necessary. 46970b661123Smrg runpath_var=LD_RUN_PATH 46980b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 46990b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 47000b661123Smrg # ancient GNU ld didn't support --whole-archive et. al. 47010b661123Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 47020b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 47030b661123Smrg else 47040b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 47050b661123Smrg fi 47060b661123Smrg supports_anon_versioning=no 47070b661123Smrg case `$LD -v 2>&1` in 4708880c7e28Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 47090b661123Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 47100b661123Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 47110b661123Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 47120b661123Smrg *\ 2.11.*) ;; # other 2.11 versions 47130b661123Smrg *) supports_anon_versioning=yes ;; 47140b661123Smrg esac 4715bdcaa8d0Smrg 47160b661123Smrg # See if GNU ld supports shared libraries. 47170b661123Smrg case $host_os in 47180b661123Smrg aix[[3-9]]*) 47190b661123Smrg # On AIX/PPC, the GNU linker is very broken 47200b661123Smrg if test "$host_cpu" != ia64; then 47210b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47220b661123Smrg cat <<_LT_EOF 1>&2 4723bdcaa8d0Smrg 4724880c7e28Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 47250b661123Smrg*** to be unable to reliably create shared libraries on AIX. 47260b661123Smrg*** Therefore, libtool is disabling shared libraries support. If you 4727880c7e28Smrg*** really care for shared libraries, you may want to install binutils 4728880c7e28Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4729880c7e28Smrg*** You will then need to restart the configuration process. 4730bdcaa8d0Smrg 47310b661123Smrg_LT_EOF 47320b661123Smrg fi 47330b661123Smrg ;; 4734bdcaa8d0Smrg 47350b661123Smrg amigaos*) 47360b661123Smrg case $host_cpu in 47370b661123Smrg powerpc) 47380b661123Smrg # see comment about AmigaOS4 .so support 47390b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47400b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 47410b661123Smrg ;; 47420b661123Smrg m68k) 47430b661123Smrg _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)' 47440b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 47450b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 47460b661123Smrg ;; 47470b661123Smrg esac 47480b661123Smrg ;; 4749bdcaa8d0Smrg 47500b661123Smrg beos*) 47510b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 47520b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47530b661123Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 47540b661123Smrg # support --undefined. This deserves some investigation. FIXME 47550b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 47560b661123Smrg else 47570b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47580b661123Smrg fi 47590b661123Smrg ;; 4760bdcaa8d0Smrg 47610b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 47620b661123Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 47630b661123Smrg # as there is no search path for DLLs. 47640b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4765880c7e28Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 47660b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 47670b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=no 47680b661123Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4769880c7e28Smrg _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' 4770880c7e28Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 47710b661123Smrg 47720b661123Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 47730b661123Smrg _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' 47740b661123Smrg # If the export-symbols file already is a .def file (1st line 47750b661123Smrg # is EXPORTS), use it as is; otherwise, prepend... 47760b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 47770b661123Smrg cp $export_symbols $output_objdir/$soname.def; 47780b661123Smrg else 47790b661123Smrg echo EXPORTS > $output_objdir/$soname.def; 47800b661123Smrg cat $export_symbols >> $output_objdir/$soname.def; 47810b661123Smrg fi~ 47820b661123Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 47830b661123Smrg else 47840b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 47850b661123Smrg fi 47860b661123Smrg ;; 4787bdcaa8d0Smrg 4788880c7e28Smrg haiku*) 4789880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4790880c7e28Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4791880c7e28Smrg ;; 4792880c7e28Smrg 47930b661123Smrg interix[[3-9]]*) 47940b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 47950b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 47960b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 47970b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 47980b661123Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 47990b661123Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 48000b661123Smrg # default) and relocated if they conflict, which is a slow very memory 48010b661123Smrg # consuming and fragmenting process. To avoid this, we pick a random, 48020b661123Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 48030b661123Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 48040b661123Smrg _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' 48050b661123Smrg _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' 48060b661123Smrg ;; 4807bdcaa8d0Smrg 4808880c7e28Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 48090b661123Smrg tmp_diet=no 48100b661123Smrg if test "$host_os" = linux-dietlibc; then 48110b661123Smrg case $cc_basename in 48120b661123Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 48130b661123Smrg esac 48140b661123Smrg fi 48150b661123Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 48160b661123Smrg && test "$tmp_diet" = no 48170b661123Smrg then 4818880c7e28Smrg tmp_addflag=' $pic_flag' 48190b661123Smrg tmp_sharedflag='-shared' 48200b661123Smrg case $cc_basename,$host_cpu in 48210b661123Smrg pgcc*) # Portland Group C compiler 4822880c7e28Smrg _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' 48230b661123Smrg tmp_addflag=' $pic_flag' 48240b661123Smrg ;; 4825880c7e28Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 4826880c7e28Smrg # Portland Group f77 and f90 compilers 4827880c7e28Smrg _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' 48280b661123Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 48290b661123Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 48300b661123Smrg tmp_addflag=' -i_dynamic' ;; 48310b661123Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 48320b661123Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 48330b661123Smrg ifc* | ifort*) # Intel Fortran compiler 48340b661123Smrg tmp_addflag=' -nofor_main' ;; 48350b661123Smrg lf95*) # Lahey Fortran 8.1 48360b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 48370b661123Smrg tmp_sharedflag='--shared' ;; 4838880c7e28Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 48390b661123Smrg tmp_sharedflag='-qmkshrobj' 48400b661123Smrg tmp_addflag= ;; 4841880c7e28Smrg nvcc*) # Cuda Compiler Driver 2.2 4842880c7e28Smrg _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' 4843880c7e28Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4844880c7e28Smrg ;; 48450b661123Smrg esac 48460b661123Smrg case `$CC -V 2>&1 | sed 5q` in 48470b661123Smrg *Sun\ C*) # Sun C 5.9 4848880c7e28Smrg _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' 48490b661123Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 48500b661123Smrg tmp_sharedflag='-G' ;; 48510b661123Smrg *Sun\ F*) # Sun Fortran 8.3 48520b661123Smrg tmp_sharedflag='-G' ;; 48530b661123Smrg esac 48540b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4855bdcaa8d0Smrg 48560b661123Smrg if test "x$supports_anon_versioning" = xyes; then 48570b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48580b661123Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48590b661123Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 48600b661123Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 48610b661123Smrg fi 4862bdcaa8d0Smrg 48630b661123Smrg case $cc_basename in 4864880c7e28Smrg xlf* | bgf* | bgxlf* | mpixlf*) 48650b661123Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 48660b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4867880c7e28Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4868880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 48690b661123Smrg if test "x$supports_anon_versioning" = xyes; then 48700b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 48710b661123Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 48720b661123Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4873880c7e28Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 48740b661123Smrg fi 48750b661123Smrg ;; 48760b661123Smrg esac 48770b661123Smrg else 48780b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 48790b661123Smrg fi 48800b661123Smrg ;; 4881bdcaa8d0Smrg 48820b661123Smrg netbsd*) 48830b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 48840b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 48850b661123Smrg wlarc= 48860b661123Smrg else 4887880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4888880c7e28Smrg _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' 48890b661123Smrg fi 48900b661123Smrg ;; 4891bdcaa8d0Smrg 48920b661123Smrg solaris*) 48930b661123Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 48940b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 48950b661123Smrg cat <<_LT_EOF 1>&2 4896bdcaa8d0Smrg 48970b661123Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 48980b661123Smrg*** create shared libraries on Solaris systems. Therefore, libtool 48990b661123Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 49000b661123Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 49010b661123Smrg*** your PATH or compiler configuration so that the native linker is 49020b661123Smrg*** used, and then restart. 4903bdcaa8d0Smrg 49040b661123Smrg_LT_EOF 49050b661123Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4906880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4907880c7e28Smrg _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' 49080b661123Smrg else 49090b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49100b661123Smrg fi 49110b661123Smrg ;; 4912bdcaa8d0Smrg 49130b661123Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 49140b661123Smrg case `$LD -v 2>&1` in 49150b661123Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 49160b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49170b661123Smrg cat <<_LT_EOF 1>&2 4918bdcaa8d0Smrg 49190b661123Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 49200b661123Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 49210b661123Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 49220b661123Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 49230b661123Smrg*** your PATH or compiler configuration so that the native linker is 49240b661123Smrg*** used, and then restart. 4925bdcaa8d0Smrg 49260b661123Smrg_LT_EOF 49270b661123Smrg ;; 49280b661123Smrg *) 49290b661123Smrg # For security reasons, it is highly recommended that you always 49300b661123Smrg # use absolute paths for naming shared libraries, and exclude the 49310b661123Smrg # DT_RUNPATH tag from executables and libraries. But doing so 49320b661123Smrg # requires that you compile everything twice, which is a pain. 49330b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 49340b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 49350b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 49360b661123Smrg _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' 49370b661123Smrg else 49380b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49390b661123Smrg fi 49400b661123Smrg ;; 49410b661123Smrg esac 49420b661123Smrg ;; 4943bdcaa8d0Smrg 49440b661123Smrg sunos4*) 49450b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 49460b661123Smrg wlarc= 49470b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 49480b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 49490b661123Smrg ;; 4950bdcaa8d0Smrg 49510b661123Smrg *) 49520b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4953880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4954880c7e28Smrg _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' 49550b661123Smrg else 49560b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 49570b661123Smrg fi 49580b661123Smrg ;; 49590b661123Smrg esac 4960bdcaa8d0Smrg 49610b661123Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 49620b661123Smrg runpath_var= 49630b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49640b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49650b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49660b661123Smrg fi 49670b661123Smrg else 49680b661123Smrg # PORTME fill in a description of your system's linker (not GNU ld) 49690b661123Smrg case $host_os in 49700b661123Smrg aix3*) 49710b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 49720b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 49730b661123Smrg _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' 49740b661123Smrg # Note: this linker hardcodes the directories in LIBPATH if there 49750b661123Smrg # are no directories specified by -L. 49760b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 49770b661123Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 49780b661123Smrg # Neither direct hardcoding nor static linking is supported with a 49790b661123Smrg # broken collect2. 49800b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 49810b661123Smrg fi 49820b661123Smrg ;; 4983bdcaa8d0Smrg 49840b661123Smrg aix[[4-9]]*) 49850b661123Smrg if test "$host_cpu" = ia64; then 49860b661123Smrg # On IA64, the linker does run time linking by default, so we don't 49870b661123Smrg # have to do anything special. 49880b661123Smrg aix_use_runtimelinking=no 49890b661123Smrg exp_sym_flag='-Bexport' 49900b661123Smrg no_entry_flag="" 49910b661123Smrg else 49920b661123Smrg # If we're using GNU nm, then we don't want the "-C" option. 49930b661123Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4994880c7e28Smrg # Also, AIX nm treats weak defined symbols like other global 4995880c7e28Smrg # defined symbols, whereas GNU nm marks them as "W". 49960b661123Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4997880c7e28Smrg _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' 49980b661123Smrg else 49990b661123Smrg _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' 50000b661123Smrg fi 50010b661123Smrg aix_use_runtimelinking=no 5002bdcaa8d0Smrg 50030b661123Smrg # Test if we are trying to use run time linking or normal 50040b661123Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 50050b661123Smrg # need to do runtime linking. 50060b661123Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 50070b661123Smrg for ld_flag in $LDFLAGS; do 50080b661123Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 50090b661123Smrg aix_use_runtimelinking=yes 50100b661123Smrg break 50110b661123Smrg fi 50120b661123Smrg done 50130b661123Smrg ;; 50140b661123Smrg esac 5015bdcaa8d0Smrg 50160b661123Smrg exp_sym_flag='-bexport' 50170b661123Smrg no_entry_flag='-bnoentry' 50180b661123Smrg fi 5019bdcaa8d0Smrg 50200b661123Smrg # When large executables or shared objects are built, AIX ld can 50210b661123Smrg # have problems creating the table of contents. If linking a library 50220b661123Smrg # or program results in "error TOC overflow" add -mminimal-toc to 50230b661123Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 50240b661123Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5025bdcaa8d0Smrg 50260b661123Smrg _LT_TAGVAR(archive_cmds, $1)='' 50270b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 50280b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 50290b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 50300b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 50310b661123Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5032bdcaa8d0Smrg 50330b661123Smrg if test "$GCC" = yes; then 50340b661123Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 50350b661123Smrg # We only want to do this on AIX 4.2 and lower, the check 50360b661123Smrg # below for broken collect2 doesn't work under 4.3+ 50370b661123Smrg collect2name=`${CC} -print-prog-name=collect2` 50380b661123Smrg if test -f "$collect2name" && 50390b661123Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 50400b661123Smrg then 50410b661123Smrg # We have reworked collect2 50420b661123Smrg : 50430b661123Smrg else 50440b661123Smrg # We have old collect2 50450b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 50460b661123Smrg # It fails to find uninstalled libraries when the uninstalled 50470b661123Smrg # path is not listed in the libpath. Setting hardcode_minus_L 50480b661123Smrg # to unsupported forces relinking 50490b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 50500b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 50510b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 50520b661123Smrg fi 50530b661123Smrg ;; 50540b661123Smrg esac 50550b661123Smrg shared_flag='-shared' 50560b661123Smrg if test "$aix_use_runtimelinking" = yes; then 50570b661123Smrg shared_flag="$shared_flag "'${wl}-G' 50580b661123Smrg fi 50590b661123Smrg else 50600b661123Smrg # not using gcc 50610b661123Smrg if test "$host_cpu" = ia64; then 50620b661123Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 50630b661123Smrg # chokes on -Wl,-G. The following line is correct: 50640b661123Smrg shared_flag='-G' 50650b661123Smrg else 50660b661123Smrg if test "$aix_use_runtimelinking" = yes; then 50670b661123Smrg shared_flag='${wl}-G' 50680b661123Smrg else 50690b661123Smrg shared_flag='${wl}-bM:SRE' 50700b661123Smrg fi 50710b661123Smrg fi 50720b661123Smrg fi 5073bdcaa8d0Smrg 50740b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 50750b661123Smrg # It seems that -bexpall does not export symbols beginning with 50760b661123Smrg # underscore (_), so it is better to generate a list of symbols to export. 50770b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 50780b661123Smrg if test "$aix_use_runtimelinking" = yes; then 50790b661123Smrg # Warning - without using the other runtime loading flags (-brtl), 50800b661123Smrg # -berok will link without error, but may produce a broken library. 50810b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 50820b661123Smrg # Determine the default libpath from the value encoded in an 50830b661123Smrg # empty executable. 5084880c7e28Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50850b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5086880c7e28Smrg _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" 50870b661123Smrg else 50880b661123Smrg if test "$host_cpu" = ia64; then 50890b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 50900b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 50910b661123Smrg _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" 50920b661123Smrg else 50930b661123Smrg # Determine the default libpath from the value encoded in an 50940b661123Smrg # empty executable. 5095880c7e28Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 50960b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 50970b661123Smrg # Warning - without using the other run time loading flags, 50980b661123Smrg # -berok will link without error, but may produce a broken library. 50990b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 51000b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5101880c7e28Smrg if test "$with_gnu_ld" = yes; then 5102880c7e28Smrg # We only use this code for GNU lds that support --whole-archive. 5103880c7e28Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5104880c7e28Smrg else 5105880c7e28Smrg # Exported symbols can be pulled into shared objects from archives 5106880c7e28Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5107880c7e28Smrg fi 51080b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 51090b661123Smrg # This is similar to how AIX traditionally builds its shared libraries. 51100b661123Smrg _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' 51110b661123Smrg fi 51120b661123Smrg fi 51130b661123Smrg ;; 5114bdcaa8d0Smrg 51150b661123Smrg amigaos*) 51160b661123Smrg case $host_cpu in 51170b661123Smrg powerpc) 51180b661123Smrg # see comment about AmigaOS4 .so support 51190b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 51200b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51210b661123Smrg ;; 51220b661123Smrg m68k) 51230b661123Smrg _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)' 51240b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51250b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51260b661123Smrg ;; 51270b661123Smrg esac 51280b661123Smrg ;; 5129bdcaa8d0Smrg 51300b661123Smrg bsdi[[45]]*) 51310b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 51320b661123Smrg ;; 5133bdcaa8d0Smrg 51340b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 51350b661123Smrg # When not using gcc, we currently assume that we are using 51360b661123Smrg # Microsoft Visual C++. 51370b661123Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 51380b661123Smrg # no search path for DLLs. 5139880c7e28Smrg case $cc_basename in 5140880c7e28Smrg cl*) 5141880c7e28Smrg # Native MSVC 5142880c7e28Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5143880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5144880c7e28Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5145880c7e28Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5146880c7e28Smrg # Tell ltmain to make .lib files, not .a files. 5147880c7e28Smrg libext=lib 5148880c7e28Smrg # Tell ltmain to make .dll files, not .so files. 5149880c7e28Smrg shrext_cmds=".dll" 5150880c7e28Smrg # FIXME: Setting linknames here is a bad hack. 5151880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5152880c7e28Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5153880c7e28Smrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5154880c7e28Smrg else 5155880c7e28Smrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5156880c7e28Smrg fi~ 5157880c7e28Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5158880c7e28Smrg linknames=' 5159880c7e28Smrg # The linker will not automatically build a static lib if we build a DLL. 5160880c7e28Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5161880c7e28Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5162880c7e28Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5163880c7e28Smrg _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' 5164880c7e28Smrg # Don't use ranlib 5165880c7e28Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5166880c7e28Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5167880c7e28Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5168880c7e28Smrg case $lt_outputfile in 5169880c7e28Smrg *.exe|*.EXE) ;; 5170880c7e28Smrg *) 5171880c7e28Smrg lt_outputfile="$lt_outputfile.exe" 5172880c7e28Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5173880c7e28Smrg ;; 5174880c7e28Smrg esac~ 5175880c7e28Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5176880c7e28Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5177880c7e28Smrg $RM "$lt_outputfile.manifest"; 5178880c7e28Smrg fi' 5179880c7e28Smrg ;; 5180880c7e28Smrg *) 5181880c7e28Smrg # Assume MSVC wrapper 5182880c7e28Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5183880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5184880c7e28Smrg # Tell ltmain to make .lib files, not .a files. 5185880c7e28Smrg libext=lib 5186880c7e28Smrg # Tell ltmain to make .dll files, not .so files. 5187880c7e28Smrg shrext_cmds=".dll" 5188880c7e28Smrg # FIXME: Setting linknames here is a bad hack. 5189880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5190880c7e28Smrg # The linker will automatically build a .lib file if we build a DLL. 5191880c7e28Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5192880c7e28Smrg # FIXME: Should let the user specify the lib program. 5193880c7e28Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5194880c7e28Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5195880c7e28Smrg ;; 5196880c7e28Smrg esac 51970b661123Smrg ;; 5198bdcaa8d0Smrg 51990b661123Smrg darwin* | rhapsody*) 52000b661123Smrg _LT_DARWIN_LINKER_FEATURES($1) 52010b661123Smrg ;; 5202bdcaa8d0Smrg 52030b661123Smrg dgux*) 52040b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 52050b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 52060b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52070b661123Smrg ;; 5208bdcaa8d0Smrg 52090b661123Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 52100b661123Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 52110b661123Smrg # does not break anything, and helps significantly (at the cost of a little 52120b661123Smrg # extra space). 52130b661123Smrg freebsd2.2*) 52140b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 52150b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52160b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52170b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52180b661123Smrg ;; 5219bdcaa8d0Smrg 52200b661123Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5221880c7e28Smrg freebsd2.*) 52220b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 52230b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52240b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52250b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52260b661123Smrg ;; 5227bdcaa8d0Smrg 52280b661123Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 52290b661123Smrg freebsd* | dragonfly*) 5230880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 52310b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 52320b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52330b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 52340b661123Smrg ;; 5235bdcaa8d0Smrg 52360b661123Smrg hpux9*) 52370b661123Smrg if test "$GCC" = yes; then 5238880c7e28Smrg _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' 52390b661123Smrg else 52400b661123Smrg _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' 52410b661123Smrg fi 52420b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52430b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52440b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5245bdcaa8d0Smrg 52460b661123Smrg # hardcode_minus_L: Not really in the search PATH, 52470b661123Smrg # but as the default location of the library. 52480b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52490b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52500b661123Smrg ;; 5251bdcaa8d0Smrg 52520b661123Smrg hpux10*) 5253880c7e28Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5254880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52550b661123Smrg else 52560b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 52570b661123Smrg fi 52580b661123Smrg if test "$with_gnu_ld" = no; then 52590b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 52600b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 52610b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52620b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 52630b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 52640b661123Smrg # hardcode_minus_L: Not really in the search PATH, 52650b661123Smrg # but as the default location of the library. 52660b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 52670b661123Smrg fi 526872313efbSmrg ;; 52690b661123Smrg 52700b661123Smrg hpux11*) 5271880c7e28Smrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 52720b661123Smrg case $host_cpu in 52730b661123Smrg hppa*64*) 52740b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52750b661123Smrg ;; 52760b661123Smrg ia64*) 5277880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52780b661123Smrg ;; 52790b661123Smrg *) 5280880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 52810b661123Smrg ;; 52820b661123Smrg esac 52830b661123Smrg else 52840b661123Smrg case $host_cpu in 52850b661123Smrg hppa*64*) 52860b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 52870b661123Smrg ;; 52880b661123Smrg ia64*) 52890b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 52900b661123Smrg ;; 52910b661123Smrg *) 5292880c7e28Smrg m4_if($1, [], [ 5293880c7e28Smrg # Older versions of the 11.00 compiler do not understand -b yet 5294880c7e28Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5295880c7e28Smrg _LT_LINKER_OPTION([if $CC understands -b], 5296880c7e28Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5297880c7e28Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5298880c7e28Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5299880c7e28Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 53000b661123Smrg ;; 53010b661123Smrg esac 53020b661123Smrg fi 53030b661123Smrg if test "$with_gnu_ld" = no; then 53040b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 53050b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53060b661123Smrg 53070b661123Smrg case $host_cpu in 53080b661123Smrg hppa*64*|ia64*) 53090b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 53100b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53110b661123Smrg ;; 53120b661123Smrg *) 53130b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53140b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53150b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 53160b661123Smrg 53170b661123Smrg # hardcode_minus_L: Not really in the search PATH, 53180b661123Smrg # but as the default location of the library. 53190b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53200b661123Smrg ;; 53210b661123Smrg esac 53220b661123Smrg fi 532372313efbSmrg ;; 5324bdcaa8d0Smrg 53250b661123Smrg irix5* | irix6* | nonstopux*) 53260b661123Smrg if test "$GCC" = yes; then 5327880c7e28Smrg _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' 53280b661123Smrg # Try to use the -exported_symbol ld option, if it does not 53290b661123Smrg # work, assume that -exports_file does not work either and 53300b661123Smrg # implicitly export all symbols. 5331880c7e28Smrg # This should be the same for all languages, so no per-tag cache variable. 5332880c7e28Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5333880c7e28Smrg [lt_cv_irix_exported_symbol], 5334880c7e28Smrg [save_LDFLAGS="$LDFLAGS" 5335880c7e28Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5336880c7e28Smrg AC_LINK_IFELSE( 5337880c7e28Smrg [AC_LANG_SOURCE( 5338880c7e28Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5339880c7e28Smrg [C++], [[int foo (void) { return 0; }]], 5340880c7e28Smrg [Fortran 77], [[ 5341880c7e28Smrg subroutine foo 5342880c7e28Smrg end]], 5343880c7e28Smrg [Fortran], [[ 5344880c7e28Smrg subroutine foo 5345880c7e28Smrg end]])])], 5346880c7e28Smrg [lt_cv_irix_exported_symbol=yes], 5347880c7e28Smrg [lt_cv_irix_exported_symbol=no]) 5348880c7e28Smrg LDFLAGS="$save_LDFLAGS"]) 5349880c7e28Smrg if test "$lt_cv_irix_exported_symbol" = yes; then 5350880c7e28Smrg _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' 5351880c7e28Smrg fi 53520b661123Smrg else 5353880c7e28Smrg _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' 5354880c7e28Smrg _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' 53550b661123Smrg fi 53560b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 53570b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53580b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53590b661123Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 53600b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 53610b661123Smrg ;; 5362bdcaa8d0Smrg 53630b661123Smrg netbsd*) 53640b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 53650b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 53660b661123Smrg else 53670b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 53680b661123Smrg fi 53690b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 53700b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53710b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53720b661123Smrg ;; 5373bdcaa8d0Smrg 53740b661123Smrg newsos6) 53750b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 53760b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53770b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 53780b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53790b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53800b661123Smrg ;; 5381bdcaa8d0Smrg 53820b661123Smrg *nto* | *qnx*) 53830b661123Smrg ;; 5384bdcaa8d0Smrg 53850b661123Smrg openbsd*) 53860b661123Smrg if test -f /usr/libexec/ld.so; then 53870b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53880b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53890b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 53900b661123Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 53910b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 53920b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 53930b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 53940b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 53950b661123Smrg else 53960b661123Smrg case $host_os in 53970b661123Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 53980b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53990b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54000b661123Smrg ;; 54010b661123Smrg *) 54020b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 54030b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 54040b661123Smrg ;; 54050b661123Smrg esac 54060b661123Smrg fi 54070b661123Smrg else 54080b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 54090b661123Smrg fi 54100b661123Smrg ;; 5411bdcaa8d0Smrg 54120b661123Smrg os2*) 54130b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54140b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54150b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5416880c7e28Smrg _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' 54170b661123Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 54180b661123Smrg ;; 5419bdcaa8d0Smrg 54200b661123Smrg osf3*) 54210b661123Smrg if test "$GCC" = yes; then 54220b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5423880c7e28Smrg _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' 54240b661123Smrg else 54250b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5426880c7e28Smrg _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' 54270b661123Smrg fi 54280b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54290b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54300b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54310b661123Smrg ;; 5432bdcaa8d0Smrg 54330b661123Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 54340b661123Smrg if test "$GCC" = yes; then 54350b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5436880c7e28Smrg _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' 54370b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 54380b661123Smrg else 54390b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5440880c7e28Smrg _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' 54410b661123Smrg _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~ 5442880c7e28Smrg $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' 5443bdcaa8d0Smrg 54440b661123Smrg # Both c and cxx compiler support -rpath directly 54450b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 54460b661123Smrg fi 54470b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 54480b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 54490b661123Smrg ;; 5450bdcaa8d0Smrg 54510b661123Smrg solaris*) 54520b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 54530b661123Smrg if test "$GCC" = yes; then 54540b661123Smrg wlarc='${wl}' 5455880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 54560b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5457880c7e28Smrg $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' 54580b661123Smrg else 54590b661123Smrg case `$CC -V 2>&1` in 54600b661123Smrg *"Compilers 5.0"*) 54610b661123Smrg wlarc='' 54620b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 54630b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54640b661123Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 54650b661123Smrg ;; 54660b661123Smrg *) 54670b661123Smrg wlarc='${wl}' 54680b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 54690b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 54700b661123Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 54710b661123Smrg ;; 54720b661123Smrg esac 54730b661123Smrg fi 54740b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 54750b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 54760b661123Smrg case $host_os in 54770b661123Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 54780b661123Smrg *) 54790b661123Smrg # The compiler driver will combine and reorder linker options, 54800b661123Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 54810b661123Smrg # but is careful enough not to reorder. 54820b661123Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 54830b661123Smrg if test "$GCC" = yes; then 54840b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 54850b661123Smrg else 54860b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 54870b661123Smrg fi 54880b661123Smrg ;; 54890b661123Smrg esac 54900b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54910b661123Smrg ;; 5492bdcaa8d0Smrg 54930b661123Smrg sunos4*) 54940b661123Smrg if test "x$host_vendor" = xsequent; then 54950b661123Smrg # Use $CC to link under sequent, because it throws in some extra .o 54960b661123Smrg # files that make .init and .fini sections work. 54970b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 54980b661123Smrg else 54990b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 55000b661123Smrg fi 55010b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55020b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 55030b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55040b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55050b661123Smrg ;; 5506bdcaa8d0Smrg 55070b661123Smrg sysv4) 55080b661123Smrg case $host_vendor in 55090b661123Smrg sni) 55100b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55110b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 55120b661123Smrg ;; 55130b661123Smrg siemens) 55140b661123Smrg ## LD is ld it makes a PLAMLIB 55150b661123Smrg ## CC just makes a GrossModule. 55160b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 55170b661123Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 55180b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 55190b661123Smrg ;; 55200b661123Smrg motorola) 55210b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55220b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 55230b661123Smrg ;; 55240b661123Smrg esac 55250b661123Smrg runpath_var='LD_RUN_PATH' 55260b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55270b661123Smrg ;; 5528bdcaa8d0Smrg 55290b661123Smrg sysv4.3*) 55300b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55310b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55320b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 55330b661123Smrg ;; 5534bdcaa8d0Smrg 55350b661123Smrg sysv4*MP*) 55360b661123Smrg if test -d /usr/nec; then 55370b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55380b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55390b661123Smrg runpath_var=LD_RUN_PATH 55400b661123Smrg hardcode_runpath_var=yes 55410b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 55420b661123Smrg fi 55430b661123Smrg ;; 5544bdcaa8d0Smrg 55450b661123Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 55460b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55470b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55480b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55490b661123Smrg runpath_var='LD_RUN_PATH' 5550bdcaa8d0Smrg 55510b661123Smrg if test "$GCC" = yes; then 55520b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55530b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55540b661123Smrg else 55550b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55560b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55570b661123Smrg fi 55580b661123Smrg ;; 5559bdcaa8d0Smrg 55600b661123Smrg sysv5* | sco3.2v5* | sco5v6*) 55610b661123Smrg # Note: We can NOT use -z defs as we might desire, because we do not 55620b661123Smrg # link with -lc, and that would cause any symbols used from libc to 55630b661123Smrg # always be unresolved, which means just about no library would 55640b661123Smrg # ever link correctly. If we're not using GNU ld we use -z text 55650b661123Smrg # though, which does catch some bad symbols but isn't as heavy-handed 55660b661123Smrg # as -z defs. 55670b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 55680b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 55690b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 55700b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55710b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 55720b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 55730b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 55740b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 55750b661123Smrg runpath_var='LD_RUN_PATH' 5576bdcaa8d0Smrg 55770b661123Smrg if test "$GCC" = yes; then 55780b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55790b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55800b661123Smrg else 55810b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55820b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 55830b661123Smrg fi 55840b661123Smrg ;; 5585bdcaa8d0Smrg 55860b661123Smrg uts4*) 55870b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 55880b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55890b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 55900b661123Smrg ;; 5591bdcaa8d0Smrg 55920b661123Smrg *) 55930b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 55940b661123Smrg ;; 55950b661123Smrg esac 5596bdcaa8d0Smrg 55970b661123Smrg if test x$host_vendor = xsni; then 55980b661123Smrg case $host in 55990b661123Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 56000b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 56010b661123Smrg ;; 56020b661123Smrg esac 56030b661123Smrg fi 56040b661123Smrg fi 56050b661123Smrg]) 56060b661123SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 56070b661123Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5608bdcaa8d0Smrg 56090b661123Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5610bdcaa8d0Smrg 56110b661123Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 56120b661123Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 56130b661123Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 56140b661123Smrg [The commands to extract the exported symbol list from a shared archive]) 5615bdcaa8d0Smrg 56160b661123Smrg# 56170b661123Smrg# Do we need to explicitly link libc? 56180b661123Smrg# 56190b661123Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 56200b661123Smrgx|xyes) 56210b661123Smrg # Assume -lc should be added 56220b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 562372313efbSmrg 56240b661123Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 56250b661123Smrg case $_LT_TAGVAR(archive_cmds, $1) in 56260b661123Smrg *'~'*) 56270b661123Smrg # FIXME: we may have to deal with multi-command sequences. 56280b661123Smrg ;; 56290b661123Smrg '$CC '*) 56300b661123Smrg # Test whether the compiler implicitly links with -lc since on some 56310b661123Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 56320b661123Smrg # to ld, don't add -lc before -lgcc. 5633880c7e28Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5634880c7e28Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5635880c7e28Smrg [$RM conftest* 5636880c7e28Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5637880c7e28Smrg 5638880c7e28Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5639880c7e28Smrg soname=conftest 5640880c7e28Smrg lib=conftest 5641880c7e28Smrg libobjs=conftest.$ac_objext 5642880c7e28Smrg deplibs= 5643880c7e28Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5644880c7e28Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5645880c7e28Smrg compiler_flags=-v 5646880c7e28Smrg linker_flags=-v 5647880c7e28Smrg verstring= 5648880c7e28Smrg output_objdir=. 5649880c7e28Smrg libname=conftest 5650880c7e28Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5651880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5652880c7e28Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5653880c7e28Smrg then 5654880c7e28Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5655880c7e28Smrg else 5656880c7e28Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5657880c7e28Smrg fi 5658880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5659880c7e28Smrg else 5660880c7e28Smrg cat conftest.err 1>&5 5661880c7e28Smrg fi 5662880c7e28Smrg $RM conftest* 5663880c7e28Smrg ]) 5664880c7e28Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 56650b661123Smrg ;; 56660b661123Smrg esac 56670b661123Smrg fi 56680b661123Smrg ;; 56690b661123Smrgesac 5670bdcaa8d0Smrg 56710b661123Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 56720b661123Smrg [Whether or not to add -lc for building shared libraries]) 56730b661123Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 56740b661123Smrg [enable_shared_with_static_runtimes], [0], 56750b661123Smrg [Whether or not to disallow shared libs when runtime libs are static]) 56760b661123Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 56770b661123Smrg [Compiler flag to allow reflexive dlopens]) 56780b661123Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 56790b661123Smrg [Compiler flag to generate shared objects directly from archives]) 56800b661123Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 56810b661123Smrg [Whether the compiler copes with passing no objects directly]) 56820b661123Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 56830b661123Smrg [Create an old-style archive from a shared archive]) 56840b661123Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 56850b661123Smrg [Create a temporary old-style archive to link instead of a shared archive]) 56860b661123Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 56870b661123Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 56880b661123Smrg_LT_TAGDECL([], [module_cmds], [2], 56890b661123Smrg [Commands used to build a loadable module if different from building 56900b661123Smrg a shared archive.]) 56910b661123Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 56920b661123Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 56930b661123Smrg [Whether we are building with GNU ld or not]) 56940b661123Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 56950b661123Smrg [Flag that allows shared libraries with undefined symbols to be built]) 56960b661123Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 56970b661123Smrg [Flag that enforces no undefined symbols]) 56980b661123Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 56990b661123Smrg [Flag to hardcode $libdir into a binary during linking. 57000b661123Smrg This must work even if $libdir does not exist]) 57010b661123Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 57020b661123Smrg [Whether we need a single "-rpath" flag with a separated argument]) 57030b661123Smrg_LT_TAGDECL([], [hardcode_direct], [0], 57040b661123Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57050b661123Smrg DIR into the resulting binary]) 57060b661123Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 57070b661123Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 57080b661123Smrg DIR into the resulting binary and the resulting library dependency is 57090b661123Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 57100b661123Smrg library is relocated]) 57110b661123Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 57120b661123Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 57130b661123Smrg into the resulting binary]) 57140b661123Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 57150b661123Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 57160b661123Smrg into the resulting binary]) 57170b661123Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 57180b661123Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 57190b661123Smrg into the library and all subsequent libraries and executables linked 57200b661123Smrg against it]) 57210b661123Smrg_LT_TAGDECL([], [inherit_rpath], [0], 57220b661123Smrg [Set to yes if linker adds runtime paths of dependent libraries 57230b661123Smrg to runtime path list]) 57240b661123Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 57250b661123Smrg [Whether libtool must link a program against all its dependency libraries]) 57260b661123Smrg_LT_TAGDECL([], [always_export_symbols], [0], 57270b661123Smrg [Set to "yes" if exported symbols are required]) 57280b661123Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 57290b661123Smrg [The commands to list exported symbols]) 57300b661123Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 57310b661123Smrg [Symbols that should not be listed in the preloaded symbols]) 57320b661123Smrg_LT_TAGDECL([], [include_expsyms], [1], 57330b661123Smrg [Symbols that must always be exported]) 57340b661123Smrg_LT_TAGDECL([], [prelink_cmds], [2], 57350b661123Smrg [Commands necessary for linking programs (against libraries) with templates]) 5736880c7e28Smrg_LT_TAGDECL([], [postlink_cmds], [2], 5737880c7e28Smrg [Commands necessary for finishing linking programs]) 57380b661123Smrg_LT_TAGDECL([], [file_list_spec], [1], 57390b661123Smrg [Specify filename containing input files]) 57400b661123Smrgdnl FIXME: Not yet implemented 57410b661123Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 57420b661123Smrgdnl [Compiler flag to generate thread safe objects]) 57430b661123Smrg])# _LT_LINKER_SHLIBS 57440b661123Smrg 57450b661123Smrg 57460b661123Smrg# _LT_LANG_C_CONFIG([TAG]) 57470b661123Smrg# ------------------------ 57480b661123Smrg# Ensure that the configuration variables for a C compiler are suitably 57490b661123Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 57500b661123Smrg# the compiler configuration to `libtool'. 57510b661123Smrgm4_defun([_LT_LANG_C_CONFIG], 57520b661123Smrg[m4_require([_LT_DECL_EGREP])dnl 57530b661123Smrglt_save_CC="$CC" 57540b661123SmrgAC_LANG_PUSH(C) 5755bdcaa8d0Smrg 57560b661123Smrg# Source file extension for C test sources. 57570b661123Smrgac_ext=c 5758bdcaa8d0Smrg 57590b661123Smrg# Object file extension for compiled C test sources. 57600b661123Smrgobjext=o 57610b661123Smrg_LT_TAGVAR(objext, $1)=$objext 5762bdcaa8d0Smrg 57630b661123Smrg# Code to be used in simple compile tests 57640b661123Smrglt_simple_compile_test_code="int some_variable = 0;" 5765bdcaa8d0Smrg 57660b661123Smrg# Code to be used in simple link tests 57670b661123Smrglt_simple_link_test_code='int main(){return(0);}' 5768bdcaa8d0Smrg 57690b661123Smrg_LT_TAG_COMPILER 57700b661123Smrg# Save the default compiler, since it gets overwritten when the other 57710b661123Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 57720b661123Smrgcompiler_DEFAULT=$CC 5773bdcaa8d0Smrg 57740b661123Smrg# save warnings/boilerplate of simple test code 57750b661123Smrg_LT_COMPILER_BOILERPLATE 57760b661123Smrg_LT_LINKER_BOILERPLATE 5777bdcaa8d0Smrg 57780b661123Smrgif test -n "$compiler"; then 57790b661123Smrg _LT_COMPILER_NO_RTTI($1) 57800b661123Smrg _LT_COMPILER_PIC($1) 57810b661123Smrg _LT_COMPILER_C_O($1) 57820b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 57830b661123Smrg _LT_LINKER_SHLIBS($1) 57840b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 57850b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 57860b661123Smrg LT_SYS_DLOPEN_SELF 57870b661123Smrg _LT_CMD_STRIPLIB 57880b661123Smrg 57890b661123Smrg # Report which library types will actually be built 57900b661123Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 57910b661123Smrg AC_MSG_RESULT([$can_build_shared]) 57920b661123Smrg 57930b661123Smrg AC_MSG_CHECKING([whether to build shared libraries]) 57940b661123Smrg test "$can_build_shared" = "no" && enable_shared=no 57950b661123Smrg 57960b661123Smrg # On AIX, shared libraries and static libraries use the same namespace, and 57970b661123Smrg # are all built from PIC. 57980b661123Smrg case $host_os in 57990b661123Smrg aix3*) 58000b661123Smrg test "$enable_shared" = yes && enable_static=no 58010b661123Smrg if test -n "$RANLIB"; then 58020b661123Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 58030b661123Smrg postinstall_cmds='$RANLIB $lib' 58040b661123Smrg fi 58050b661123Smrg ;; 5806bdcaa8d0Smrg 58070b661123Smrg aix[[4-9]]*) 58080b661123Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 58090b661123Smrg test "$enable_shared" = yes && enable_static=no 58100b661123Smrg fi 58110b661123Smrg ;; 58120b661123Smrg esac 58130b661123Smrg AC_MSG_RESULT([$enable_shared]) 5814bdcaa8d0Smrg 58150b661123Smrg AC_MSG_CHECKING([whether to build static libraries]) 58160b661123Smrg # Make sure either enable_shared or enable_static is yes. 58170b661123Smrg test "$enable_shared" = yes || enable_static=yes 58180b661123Smrg AC_MSG_RESULT([$enable_static]) 5819bdcaa8d0Smrg 58200b661123Smrg _LT_CONFIG($1) 58210b661123Smrgfi 58220b661123SmrgAC_LANG_POP 58230b661123SmrgCC="$lt_save_CC" 58240b661123Smrg])# _LT_LANG_C_CONFIG 5825bdcaa8d0Smrg 582672313efbSmrg 58270b661123Smrg# _LT_LANG_CXX_CONFIG([TAG]) 58280b661123Smrg# -------------------------- 58290b661123Smrg# Ensure that the configuration variables for a C++ compiler are suitably 58300b661123Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 58310b661123Smrg# the compiler configuration to `libtool'. 58320b661123Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5833880c7e28Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 58340b661123Smrgm4_require([_LT_DECL_EGREP])dnl 5835880c7e28Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5836880c7e28Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5837880c7e28Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5838880c7e28Smrg (test "X$CXX" != "Xg++"))) ; then 5839880c7e28Smrg AC_PROG_CXXCPP 5840880c7e28Smrgelse 5841880c7e28Smrg _lt_caught_CXX_error=yes 5842880c7e28Smrgfi 58430b661123Smrg 58440b661123SmrgAC_LANG_PUSH(C++) 58450b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 58460b661123Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 58470b661123Smrg_LT_TAGVAR(always_export_symbols, $1)=no 58480b661123Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 58490b661123Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 58500b661123Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 58510b661123Smrg_LT_TAGVAR(hardcode_direct, $1)=no 58520b661123Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 58530b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 58540b661123Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 58550b661123Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 58560b661123Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 58570b661123Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 58580b661123Smrg_LT_TAGVAR(inherit_rpath, $1)=no 58590b661123Smrg_LT_TAGVAR(module_cmds, $1)= 58600b661123Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 58610b661123Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 58620b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5863880c7e28Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5864880c7e28Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 58650b661123Smrg_LT_TAGVAR(no_undefined_flag, $1)= 58660b661123Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 58670b661123Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 586872313efbSmrg 58690b661123Smrg# Source file extension for C++ test sources. 58700b661123Smrgac_ext=cpp 5871bdcaa8d0Smrg 58720b661123Smrg# Object file extension for compiled C++ test sources. 58730b661123Smrgobjext=o 58740b661123Smrg_LT_TAGVAR(objext, $1)=$objext 58750b661123Smrg 58760b661123Smrg# No sense in running all these tests if we already determined that 58770b661123Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 58780b661123Smrg# are currently assumed to apply to all compilers on this platform, 58790b661123Smrg# and will be corrupted by setting them based on a non-working compiler. 58800b661123Smrgif test "$_lt_caught_CXX_error" != yes; then 58810b661123Smrg # Code to be used in simple compile tests 58820b661123Smrg lt_simple_compile_test_code="int some_variable = 0;" 58830b661123Smrg 58840b661123Smrg # Code to be used in simple link tests 58850b661123Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 58860b661123Smrg 58870b661123Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 58880b661123Smrg _LT_TAG_COMPILER 58890b661123Smrg 58900b661123Smrg # save warnings/boilerplate of simple test code 58910b661123Smrg _LT_COMPILER_BOILERPLATE 58920b661123Smrg _LT_LINKER_BOILERPLATE 58930b661123Smrg 58940b661123Smrg # Allow CC to be a program name with arguments. 58950b661123Smrg lt_save_CC=$CC 5896880c7e28Smrg lt_save_CFLAGS=$CFLAGS 58970b661123Smrg lt_save_LD=$LD 58980b661123Smrg lt_save_GCC=$GCC 58990b661123Smrg GCC=$GXX 59000b661123Smrg lt_save_with_gnu_ld=$with_gnu_ld 59010b661123Smrg lt_save_path_LD=$lt_cv_path_LD 59020b661123Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 59030b661123Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 59040b661123Smrg else 59050b661123Smrg $as_unset lt_cv_prog_gnu_ld 59060b661123Smrg fi 59070b661123Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 59080b661123Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 59090b661123Smrg else 59100b661123Smrg $as_unset lt_cv_path_LD 59110b661123Smrg fi 59120b661123Smrg test -z "${LDCXX+set}" || LD=$LDCXX 59130b661123Smrg CC=${CXX-"c++"} 5914880c7e28Smrg CFLAGS=$CXXFLAGS 59150b661123Smrg compiler=$CC 59160b661123Smrg _LT_TAGVAR(compiler, $1)=$CC 59170b661123Smrg _LT_CC_BASENAME([$compiler]) 5918bdcaa8d0Smrg 59190b661123Smrg if test -n "$compiler"; then 59200b661123Smrg # We don't want -fno-exception when compiling C++ code, so set the 59210b661123Smrg # no_builtin_flag separately 59220b661123Smrg if test "$GXX" = yes; then 59230b661123Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 59240b661123Smrg else 59250b661123Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 59260b661123Smrg fi 5927bdcaa8d0Smrg 59280b661123Smrg if test "$GXX" = yes; then 59290b661123Smrg # Set up default GNU C++ configuration 5930bdcaa8d0Smrg 59310b661123Smrg LT_PATH_LD 593272313efbSmrg 59330b661123Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 59340b661123Smrg # archiving commands below assume that GNU ld is being used. 59350b661123Smrg if test "$with_gnu_ld" = yes; then 5936880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5937880c7e28Smrg _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' 593872313efbSmrg 59390b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 59400b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 594172313efbSmrg 59420b661123Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 59430b661123Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 59440b661123Smrg # investigate it a little bit more. (MM) 59450b661123Smrg wlarc='${wl}' 594672313efbSmrg 59470b661123Smrg # ancient GNU ld didn't support --whole-archive et. al. 59480b661123Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 59490b661123Smrg $GREP 'no-whole-archive' > /dev/null; then 59500b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 59510b661123Smrg else 59520b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 59530b661123Smrg fi 59540b661123Smrg else 59550b661123Smrg with_gnu_ld=no 59560b661123Smrg wlarc= 59570b661123Smrg 59580b661123Smrg # A generic and very simple default shared library creation 59590b661123Smrg # command for GNU C++ for the case where it uses the native 59600b661123Smrg # linker, instead of GNU ld. If possible, this setting should 59610b661123Smrg # overridden to take advantage of the native linker features on 59620b661123Smrg # the platform it is being used on. 59630b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 59640b661123Smrg fi 596572313efbSmrg 59660b661123Smrg # Commands to make compiler produce verbose output that lists 59670b661123Smrg # what "hidden" libraries, object files and flags are used when 59680b661123Smrg # linking a shared library. 5969880c7e28Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 597072313efbSmrg 59710b661123Smrg else 59720b661123Smrg GXX=no 59730b661123Smrg with_gnu_ld=no 59740b661123Smrg wlarc= 59750b661123Smrg fi 597672313efbSmrg 59770b661123Smrg # PORTME: fill in a description of your system's C++ link characteristics 59780b661123Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 59790b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 59800b661123Smrg case $host_os in 59810b661123Smrg aix3*) 59820b661123Smrg # FIXME: insert proper C++ library support 59830b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 59840b661123Smrg ;; 59850b661123Smrg aix[[4-9]]*) 59860b661123Smrg if test "$host_cpu" = ia64; then 59870b661123Smrg # On IA64, the linker does run time linking by default, so we don't 59880b661123Smrg # have to do anything special. 59890b661123Smrg aix_use_runtimelinking=no 59900b661123Smrg exp_sym_flag='-Bexport' 59910b661123Smrg no_entry_flag="" 59920b661123Smrg else 59930b661123Smrg aix_use_runtimelinking=no 59940b661123Smrg 59950b661123Smrg # Test if we are trying to use run time linking or normal 59960b661123Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 59970b661123Smrg # need to do runtime linking. 59980b661123Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 59990b661123Smrg for ld_flag in $LDFLAGS; do 60000b661123Smrg case $ld_flag in 60010b661123Smrg *-brtl*) 60020b661123Smrg aix_use_runtimelinking=yes 60030b661123Smrg break 60040b661123Smrg ;; 60050b661123Smrg esac 60060b661123Smrg done 60070b661123Smrg ;; 60080b661123Smrg esac 600972313efbSmrg 60100b661123Smrg exp_sym_flag='-bexport' 60110b661123Smrg no_entry_flag='-bnoentry' 60120b661123Smrg fi 601372313efbSmrg 60140b661123Smrg # When large executables or shared objects are built, AIX ld can 60150b661123Smrg # have problems creating the table of contents. If linking a library 60160b661123Smrg # or program results in "error TOC overflow" add -mminimal-toc to 60170b661123Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 60180b661123Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 60190b661123Smrg 60200b661123Smrg _LT_TAGVAR(archive_cmds, $1)='' 60210b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 60220b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 60230b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60240b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60250b661123Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 60260b661123Smrg 60270b661123Smrg if test "$GXX" = yes; then 60280b661123Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 60290b661123Smrg # We only want to do this on AIX 4.2 and lower, the check 60300b661123Smrg # below for broken collect2 doesn't work under 4.3+ 60310b661123Smrg collect2name=`${CC} -print-prog-name=collect2` 60320b661123Smrg if test -f "$collect2name" && 60330b661123Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 60340b661123Smrg then 60350b661123Smrg # We have reworked collect2 60360b661123Smrg : 60370b661123Smrg else 60380b661123Smrg # We have old collect2 60390b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 60400b661123Smrg # It fails to find uninstalled libraries when the uninstalled 60410b661123Smrg # path is not listed in the libpath. Setting hardcode_minus_L 60420b661123Smrg # to unsupported forces relinking 60430b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 60440b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60450b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 60460b661123Smrg fi 60470b661123Smrg esac 60480b661123Smrg shared_flag='-shared' 60490b661123Smrg if test "$aix_use_runtimelinking" = yes; then 60500b661123Smrg shared_flag="$shared_flag "'${wl}-G' 60510b661123Smrg fi 60520b661123Smrg else 60530b661123Smrg # not using gcc 60540b661123Smrg if test "$host_cpu" = ia64; then 60550b661123Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 60560b661123Smrg # chokes on -Wl,-G. The following line is correct: 60570b661123Smrg shared_flag='-G' 60580b661123Smrg else 60590b661123Smrg if test "$aix_use_runtimelinking" = yes; then 60600b661123Smrg shared_flag='${wl}-G' 60610b661123Smrg else 60620b661123Smrg shared_flag='${wl}-bM:SRE' 60630b661123Smrg fi 60640b661123Smrg fi 60650b661123Smrg fi 606672313efbSmrg 60670b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 60680b661123Smrg # It seems that -bexpall does not export symbols beginning with 60690b661123Smrg # underscore (_), so it is better to generate a list of symbols to 60700b661123Smrg # export. 60710b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 60720b661123Smrg if test "$aix_use_runtimelinking" = yes; then 60730b661123Smrg # Warning - without using the other runtime loading flags (-brtl), 60740b661123Smrg # -berok will link without error, but may produce a broken library. 60750b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 60760b661123Smrg # Determine the default libpath from the value encoded in an empty 60770b661123Smrg # executable. 6078880c7e28Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60790b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60800b661123Smrg 6081880c7e28Smrg _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" 60820b661123Smrg else 60830b661123Smrg if test "$host_cpu" = ia64; then 60840b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 60850b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 60860b661123Smrg _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" 60870b661123Smrg else 60880b661123Smrg # Determine the default libpath from the value encoded in an 60890b661123Smrg # empty executable. 6090880c7e28Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 60910b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 60920b661123Smrg # Warning - without using the other run time loading flags, 60930b661123Smrg # -berok will link without error, but may produce a broken library. 60940b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 60950b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6096880c7e28Smrg if test "$with_gnu_ld" = yes; then 6097880c7e28Smrg # We only use this code for GNU lds that support --whole-archive. 6098880c7e28Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6099880c7e28Smrg else 6100880c7e28Smrg # Exported symbols can be pulled into shared objects from archives 6101880c7e28Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6102880c7e28Smrg fi 61030b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61040b661123Smrg # This is similar to how AIX traditionally builds its shared 61050b661123Smrg # libraries. 61060b661123Smrg _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' 61070b661123Smrg fi 61080b661123Smrg fi 61090b661123Smrg ;; 611072313efbSmrg 61110b661123Smrg beos*) 61120b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 61130b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 61140b661123Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 61150b661123Smrg # support --undefined. This deserves some investigation. FIXME 61160b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 61170b661123Smrg else 61180b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61190b661123Smrg fi 61200b661123Smrg ;; 612172313efbSmrg 61220b661123Smrg chorus*) 61230b661123Smrg case $cc_basename in 61240b661123Smrg *) 61250b661123Smrg # FIXME: insert proper C++ library support 61260b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 61270b661123Smrg ;; 61280b661123Smrg esac 61290b661123Smrg ;; 613072313efbSmrg 61310b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 6132880c7e28Smrg case $GXX,$cc_basename in 6133880c7e28Smrg ,cl* | no,cl*) 6134880c7e28Smrg # Native MSVC 6135880c7e28Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6136880c7e28Smrg # no search path for DLLs. 6137880c7e28Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6138880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6139880c7e28Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6140880c7e28Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6141880c7e28Smrg # Tell ltmain to make .lib files, not .a files. 6142880c7e28Smrg libext=lib 6143880c7e28Smrg # Tell ltmain to make .dll files, not .so files. 6144880c7e28Smrg shrext_cmds=".dll" 6145880c7e28Smrg # FIXME: Setting linknames here is a bad hack. 6146880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6147880c7e28Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6148880c7e28Smrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6149880c7e28Smrg else 6150880c7e28Smrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6151880c7e28Smrg fi~ 6152880c7e28Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6153880c7e28Smrg linknames=' 6154880c7e28Smrg # The linker will not automatically build a static lib if we build a DLL. 6155880c7e28Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6156880c7e28Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6157880c7e28Smrg # Don't use ranlib 6158880c7e28Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6159880c7e28Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6160880c7e28Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6161880c7e28Smrg case $lt_outputfile in 6162880c7e28Smrg *.exe|*.EXE) ;; 6163880c7e28Smrg *) 6164880c7e28Smrg lt_outputfile="$lt_outputfile.exe" 6165880c7e28Smrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6166880c7e28Smrg ;; 6167880c7e28Smrg esac~ 6168880c7e28Smrg func_to_tool_file "$lt_outputfile"~ 6169880c7e28Smrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6170880c7e28Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6171880c7e28Smrg $RM "$lt_outputfile.manifest"; 6172880c7e28Smrg fi' 6173880c7e28Smrg ;; 6174880c7e28Smrg *) 6175880c7e28Smrg # g++ 6176880c7e28Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6177880c7e28Smrg # as there is no search path for DLLs. 6178880c7e28Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6179880c7e28Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6180880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6181880c7e28Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6182880c7e28Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6183880c7e28Smrg 6184880c7e28Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6185880c7e28Smrg _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' 6186880c7e28Smrg # If the export-symbols file already is a .def file (1st line 6187880c7e28Smrg # is EXPORTS), use it as is; otherwise, prepend... 6188880c7e28Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6189880c7e28Smrg cp $export_symbols $output_objdir/$soname.def; 6190880c7e28Smrg else 6191880c7e28Smrg echo EXPORTS > $output_objdir/$soname.def; 6192880c7e28Smrg cat $export_symbols >> $output_objdir/$soname.def; 6193880c7e28Smrg fi~ 6194880c7e28Smrg $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' 6195880c7e28Smrg else 6196880c7e28Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6197880c7e28Smrg fi 6198880c7e28Smrg ;; 6199880c7e28Smrg esac 6200880c7e28Smrg ;; 62010b661123Smrg darwin* | rhapsody*) 62020b661123Smrg _LT_DARWIN_LINKER_FEATURES($1) 62030b661123Smrg ;; 620472313efbSmrg 62050b661123Smrg dgux*) 62060b661123Smrg case $cc_basename in 62070b661123Smrg ec++*) 62080b661123Smrg # FIXME: insert proper C++ library support 62090b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62100b661123Smrg ;; 62110b661123Smrg ghcx*) 62120b661123Smrg # Green Hills C++ Compiler 62130b661123Smrg # FIXME: insert proper C++ library support 62140b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62150b661123Smrg ;; 62160b661123Smrg *) 62170b661123Smrg # FIXME: insert proper C++ library support 62180b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62190b661123Smrg ;; 62200b661123Smrg esac 62210b661123Smrg ;; 622272313efbSmrg 6223880c7e28Smrg freebsd2.*) 62240b661123Smrg # C++ shared libraries reported to be fairly broken before 62250b661123Smrg # switch to ELF 62260b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62270b661123Smrg ;; 622872313efbSmrg 62290b661123Smrg freebsd-elf*) 62300b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 62310b661123Smrg ;; 623272313efbSmrg 62330b661123Smrg freebsd* | dragonfly*) 62340b661123Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 62350b661123Smrg # conventions 62360b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 62370b661123Smrg ;; 623872313efbSmrg 62390b661123Smrg gnu*) 62400b661123Smrg ;; 624172313efbSmrg 6242880c7e28Smrg haiku*) 6243880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6244880c7e28Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6245880c7e28Smrg ;; 6246880c7e28Smrg 62470b661123Smrg hpux9*) 62480b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62490b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62500b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62510b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 62520b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 62530b661123Smrg # but as the default 62540b661123Smrg # location of the library. 62550b661123Smrg 62560b661123Smrg case $cc_basename in 62570b661123Smrg CC*) 62580b661123Smrg # FIXME: insert proper C++ library support 62590b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62600b661123Smrg ;; 62610b661123Smrg aCC*) 62620b661123Smrg _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' 62630b661123Smrg # Commands to make compiler produce verbose output that lists 62640b661123Smrg # what "hidden" libraries, object files and flags are used when 62650b661123Smrg # linking a shared library. 62660b661123Smrg # 62670b661123Smrg # There doesn't appear to be a way to prevent this compiler from 62680b661123Smrg # explicitly linking system object files so we need to strip them 62690b661123Smrg # from the output so that they don't get included in the library 62700b661123Smrg # dependencies. 6271880c7e28Smrg 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"' 62720b661123Smrg ;; 62730b661123Smrg *) 62740b661123Smrg if test "$GXX" = yes; then 6275880c7e28Smrg _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' 62760b661123Smrg else 62770b661123Smrg # FIXME: insert proper C++ library support 62780b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 62790b661123Smrg fi 62800b661123Smrg ;; 62810b661123Smrg esac 62820b661123Smrg ;; 628372313efbSmrg 62840b661123Smrg hpux10*|hpux11*) 62850b661123Smrg if test $with_gnu_ld = no; then 62860b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 62870b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 62880b661123Smrg 62890b661123Smrg case $host_cpu in 62900b661123Smrg hppa*64*|ia64*) 62910b661123Smrg ;; 62920b661123Smrg *) 62930b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 62940b661123Smrg ;; 62950b661123Smrg esac 62960b661123Smrg fi 62970b661123Smrg case $host_cpu in 62980b661123Smrg hppa*64*|ia64*) 62990b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63000b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63010b661123Smrg ;; 63020b661123Smrg *) 63030b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 63040b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 63050b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 63060b661123Smrg # but as the default 63070b661123Smrg # location of the library. 63080b661123Smrg ;; 63090b661123Smrg esac 63100b661123Smrg 63110b661123Smrg case $cc_basename in 63120b661123Smrg CC*) 63130b661123Smrg # FIXME: insert proper C++ library support 63140b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63150b661123Smrg ;; 63160b661123Smrg aCC*) 63170b661123Smrg case $host_cpu in 63180b661123Smrg hppa*64*) 63190b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63200b661123Smrg ;; 63210b661123Smrg ia64*) 63220b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63230b661123Smrg ;; 63240b661123Smrg *) 63250b661123Smrg _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' 63260b661123Smrg ;; 63270b661123Smrg esac 63280b661123Smrg # Commands to make compiler produce verbose output that lists 63290b661123Smrg # what "hidden" libraries, object files and flags are used when 63300b661123Smrg # linking a shared library. 63310b661123Smrg # 63320b661123Smrg # There doesn't appear to be a way to prevent this compiler from 63330b661123Smrg # explicitly linking system object files so we need to strip them 63340b661123Smrg # from the output so that they don't get included in the library 63350b661123Smrg # dependencies. 6336880c7e28Smrg 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"' 63370b661123Smrg ;; 63380b661123Smrg *) 63390b661123Smrg if test "$GXX" = yes; then 63400b661123Smrg if test $with_gnu_ld = no; then 63410b661123Smrg case $host_cpu in 63420b661123Smrg hppa*64*) 63430b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 63440b661123Smrg ;; 63450b661123Smrg ia64*) 6346880c7e28Smrg _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' 63470b661123Smrg ;; 63480b661123Smrg *) 6349880c7e28Smrg _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' 63500b661123Smrg ;; 63510b661123Smrg esac 63520b661123Smrg fi 63530b661123Smrg else 63540b661123Smrg # FIXME: insert proper C++ library support 63550b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 63560b661123Smrg fi 63570b661123Smrg ;; 63580b661123Smrg esac 63590b661123Smrg ;; 636072313efbSmrg 63610b661123Smrg interix[[3-9]]*) 63620b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 63630b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 63640b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 63650b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 63660b661123Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 63670b661123Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 63680b661123Smrg # default) and relocated if they conflict, which is a slow very memory 63690b661123Smrg # consuming and fragmenting process. To avoid this, we pick a random, 63700b661123Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 63710b661123Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 63720b661123Smrg _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' 63730b661123Smrg _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' 63740b661123Smrg ;; 63750b661123Smrg irix5* | irix6*) 63760b661123Smrg case $cc_basename in 63770b661123Smrg CC*) 63780b661123Smrg # SGI C++ 6379880c7e28Smrg _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' 63800b661123Smrg 63810b661123Smrg # Archives containing C++ object files must be created using 63820b661123Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 63830b661123Smrg # necessary to make sure instantiated templates are included 63840b661123Smrg # in the archive. 63850b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 63860b661123Smrg ;; 63870b661123Smrg *) 63880b661123Smrg if test "$GXX" = yes; then 63890b661123Smrg if test "$with_gnu_ld" = no; then 6390880c7e28Smrg _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' 63910b661123Smrg else 6392880c7e28Smrg _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' 63930b661123Smrg fi 63940b661123Smrg fi 63950b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 63960b661123Smrg ;; 63970b661123Smrg esac 63980b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 63990b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64000b661123Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 64010b661123Smrg ;; 640272313efbSmrg 6403880c7e28Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 64040b661123Smrg case $cc_basename in 64050b661123Smrg KCC*) 64060b661123Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 64070b661123Smrg 64080b661123Smrg # KCC will only create a shared library if the output file 64090b661123Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 64100b661123Smrg # to its proper name (with version) after linking. 64110b661123Smrg _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' 64120b661123Smrg _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' 64130b661123Smrg # Commands to make compiler produce verbose output that lists 64140b661123Smrg # what "hidden" libraries, object files and flags are used when 64150b661123Smrg # linking a shared library. 64160b661123Smrg # 64170b661123Smrg # There doesn't appear to be a way to prevent this compiler from 64180b661123Smrg # explicitly linking system object files so we need to strip them 64190b661123Smrg # from the output so that they don't get included in the library 64200b661123Smrg # dependencies. 6421880c7e28Smrg 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"' 64220b661123Smrg 64230b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64240b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64250b661123Smrg 64260b661123Smrg # Archives containing C++ object files must be created using 64270b661123Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 64280b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 64290b661123Smrg ;; 64300b661123Smrg icpc* | ecpc* ) 64310b661123Smrg # Intel C++ 64320b661123Smrg with_gnu_ld=yes 64330b661123Smrg # version 8.0 and above of icpc choke on multiply defined symbols 64340b661123Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 64350b661123Smrg # earlier do not add the objects themselves. 64360b661123Smrg case `$CC -V 2>&1` in 64370b661123Smrg *"Version 7."*) 64380b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64390b661123Smrg _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' 64400b661123Smrg ;; 64410b661123Smrg *) # Version 8.0 or newer 64420b661123Smrg tmp_idyn= 64430b661123Smrg case $host_cpu in 64440b661123Smrg ia64*) tmp_idyn=' -i_dynamic';; 64450b661123Smrg esac 64460b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 64470b661123Smrg _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' 64480b661123Smrg ;; 64490b661123Smrg esac 64500b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 64510b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 64520b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 64530b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 64540b661123Smrg ;; 64550b661123Smrg pgCC* | pgcpp*) 64560b661123Smrg # Portland Group C++ compiler 64570b661123Smrg case `$CC -V` in 6458880c7e28Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 64590b661123Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 64600b661123Smrg rm -rf $tpldir~ 64610b661123Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6462880c7e28Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 64630b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 64640b661123Smrg rm -rf $tpldir~ 64650b661123Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6466880c7e28Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 64670b661123Smrg $RANLIB $oldlib' 64680b661123Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 64690b661123Smrg rm -rf $tpldir~ 64700b661123Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6471880c7e28Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64720b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 64730b661123Smrg rm -rf $tpldir~ 64740b661123Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6475880c7e28Smrg $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' 64760b661123Smrg ;; 6477880c7e28Smrg *) # Version 6 and above use weak symbols 64780b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 64790b661123Smrg _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' 64800b661123Smrg ;; 64810b661123Smrg esac 648272313efbSmrg 64830b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 64840b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6485880c7e28Smrg _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' 64860b661123Smrg ;; 64870b661123Smrg cxx*) 64880b661123Smrg # Compaq C++ 64890b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 64900b661123Smrg _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' 649172313efbSmrg 64920b661123Smrg runpath_var=LD_RUN_PATH 64930b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 64940b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 649572313efbSmrg 64960b661123Smrg # Commands to make compiler produce verbose output that lists 64970b661123Smrg # what "hidden" libraries, object files and flags are used when 64980b661123Smrg # linking a shared library. 64990b661123Smrg # 65000b661123Smrg # There doesn't appear to be a way to prevent this compiler from 65010b661123Smrg # explicitly linking system object files so we need to strip them 65020b661123Smrg # from the output so that they don't get included in the library 65030b661123Smrg # dependencies. 6504880c7e28Smrg 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' 65050b661123Smrg ;; 6506880c7e28Smrg xl* | mpixl* | bgxl*) 65070b661123Smrg # IBM XL 8.0 on PPC, with GNU ld 65080b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 65090b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 65100b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 65110b661123Smrg if test "x$supports_anon_versioning" = xyes; then 65120b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 65130b661123Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 65140b661123Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 65150b661123Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 65160b661123Smrg fi 65170b661123Smrg ;; 65180b661123Smrg *) 65190b661123Smrg case `$CC -V 2>&1 | sed 5q` in 65200b661123Smrg *Sun\ C*) 65210b661123Smrg # Sun C++ 5.9 65220b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 65230b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 65240b661123Smrg _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' 65250b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6526880c7e28Smrg _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' 65270b661123Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 65280b661123Smrg 65290b661123Smrg # Not sure whether something based on 65300b661123Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 65310b661123Smrg # would be better. 6532880c7e28Smrg output_verbose_link_cmd='func_echo_all' 65330b661123Smrg 65340b661123Smrg # Archives containing C++ object files must be created using 65350b661123Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 65360b661123Smrg # necessary to make sure instantiated templates are included 65370b661123Smrg # in the archive. 65380b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 65390b661123Smrg ;; 65400b661123Smrg esac 65410b661123Smrg ;; 65420b661123Smrg esac 65430b661123Smrg ;; 654472313efbSmrg 65450b661123Smrg lynxos*) 65460b661123Smrg # FIXME: insert proper C++ library support 65470b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65480b661123Smrg ;; 654972313efbSmrg 65500b661123Smrg m88k*) 65510b661123Smrg # FIXME: insert proper C++ library support 65520b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65530b661123Smrg ;; 655472313efbSmrg 65550b661123Smrg mvs*) 65560b661123Smrg case $cc_basename in 65570b661123Smrg cxx*) 65580b661123Smrg # FIXME: insert proper C++ library support 65590b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65600b661123Smrg ;; 65610b661123Smrg *) 65620b661123Smrg # FIXME: insert proper C++ library support 65630b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65640b661123Smrg ;; 65650b661123Smrg esac 65660b661123Smrg ;; 656772313efbSmrg 65680b661123Smrg netbsd*) 65690b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 65700b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 65710b661123Smrg wlarc= 65720b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 65730b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65740b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65750b661123Smrg fi 65760b661123Smrg # Workaround some broken pre-1.5 toolchains 65770b661123Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 65780b661123Smrg ;; 657972313efbSmrg 65800b661123Smrg *nto* | *qnx*) 65810b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 65820b661123Smrg ;; 658372313efbSmrg 65840b661123Smrg openbsd2*) 65850b661123Smrg # C++ shared libraries are fairly broken 65860b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 65870b661123Smrg ;; 658872313efbSmrg 65890b661123Smrg openbsd*) 65900b661123Smrg if test -f /usr/libexec/ld.so; then 65910b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65920b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 65930b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65940b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 65950b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 65960b661123Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 65970b661123Smrg _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' 65980b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 65990b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 66000b661123Smrg fi 6601880c7e28Smrg output_verbose_link_cmd=func_echo_all 66020b661123Smrg else 66030b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66040b661123Smrg fi 66050b661123Smrg ;; 660672313efbSmrg 66070b661123Smrg osf3* | osf4* | osf5*) 66080b661123Smrg case $cc_basename in 66090b661123Smrg KCC*) 66100b661123Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 66110b661123Smrg 66120b661123Smrg # KCC will only create a shared library if the output file 66130b661123Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 66140b661123Smrg # to its proper name (with version) after linking. 66150b661123Smrg _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' 66160b661123Smrg 66170b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 66180b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66190b661123Smrg 66200b661123Smrg # Archives containing C++ object files must be created using 66210b661123Smrg # the KAI C++ compiler. 66220b661123Smrg case $host in 66230b661123Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 66240b661123Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 66250b661123Smrg esac 66260b661123Smrg ;; 66270b661123Smrg RCC*) 66280b661123Smrg # Rational C++ 2.4.1 66290b661123Smrg # FIXME: insert proper C++ library support 66300b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66310b661123Smrg ;; 66320b661123Smrg cxx*) 66330b661123Smrg case $host in 66340b661123Smrg osf3*) 66350b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6636880c7e28Smrg _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' 66370b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66380b661123Smrg ;; 66390b661123Smrg *) 66400b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6641880c7e28Smrg _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' 66420b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 66430b661123Smrg echo "-hidden">> $lib.exp~ 6644880c7e28Smrg $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~ 66450b661123Smrg $RM $lib.exp' 66460b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 66470b661123Smrg ;; 66480b661123Smrg esac 664972313efbSmrg 66500b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 665172313efbSmrg 66520b661123Smrg # Commands to make compiler produce verbose output that lists 66530b661123Smrg # what "hidden" libraries, object files and flags are used when 66540b661123Smrg # linking a shared library. 66550b661123Smrg # 66560b661123Smrg # There doesn't appear to be a way to prevent this compiler from 66570b661123Smrg # explicitly linking system object files so we need to strip them 66580b661123Smrg # from the output so that they don't get included in the library 66590b661123Smrg # dependencies. 6660880c7e28Smrg 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"' 66610b661123Smrg ;; 66620b661123Smrg *) 66630b661123Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 66640b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 66650b661123Smrg case $host in 66660b661123Smrg osf3*) 6667880c7e28Smrg _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' 66680b661123Smrg ;; 66690b661123Smrg *) 6670880c7e28Smrg _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' 66710b661123Smrg ;; 66720b661123Smrg esac 66730b661123Smrg 66740b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 66750b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66760b661123Smrg 66770b661123Smrg # Commands to make compiler produce verbose output that lists 66780b661123Smrg # what "hidden" libraries, object files and flags are used when 66790b661123Smrg # linking a shared library. 6680880c7e28Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 66810b661123Smrg 66820b661123Smrg else 66830b661123Smrg # FIXME: insert proper C++ library support 66840b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66850b661123Smrg fi 66860b661123Smrg ;; 66870b661123Smrg esac 66880b661123Smrg ;; 668972313efbSmrg 66900b661123Smrg psos*) 66910b661123Smrg # FIXME: insert proper C++ library support 66920b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66930b661123Smrg ;; 669472313efbSmrg 66950b661123Smrg sunos4*) 66960b661123Smrg case $cc_basename in 66970b661123Smrg CC*) 66980b661123Smrg # Sun C++ 4.x 66990b661123Smrg # FIXME: insert proper C++ library support 67000b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67010b661123Smrg ;; 67020b661123Smrg lcc*) 67030b661123Smrg # Lucid 67040b661123Smrg # FIXME: insert proper C++ library support 67050b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67060b661123Smrg ;; 67070b661123Smrg *) 67080b661123Smrg # FIXME: insert proper C++ library support 67090b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67100b661123Smrg ;; 67110b661123Smrg esac 67120b661123Smrg ;; 671372313efbSmrg 67140b661123Smrg solaris*) 67150b661123Smrg case $cc_basename in 6716880c7e28Smrg CC* | sunCC*) 67170b661123Smrg # Sun C++ 4.2, 5.x and Centerline C++ 67180b661123Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 67190b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 67200b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 67210b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67220b661123Smrg $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' 67230b661123Smrg 67240b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 67250b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67260b661123Smrg case $host_os in 67270b661123Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67280b661123Smrg *) 67290b661123Smrg # The compiler driver will combine and reorder linker options, 67300b661123Smrg # but understands `-z linker_flag'. 67310b661123Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 67320b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 67330b661123Smrg ;; 67340b661123Smrg esac 67350b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 673672313efbSmrg 6737880c7e28Smrg output_verbose_link_cmd='func_echo_all' 673872313efbSmrg 67390b661123Smrg # Archives containing C++ object files must be created using 67400b661123Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 67410b661123Smrg # necessary to make sure instantiated templates are included 67420b661123Smrg # in the archive. 67430b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 67440b661123Smrg ;; 67450b661123Smrg gcx*) 67460b661123Smrg # Green Hills C++ Compiler 67470b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 674872313efbSmrg 67490b661123Smrg # The C++ compiler must be used to create the archive. 67500b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 67510b661123Smrg ;; 67520b661123Smrg *) 67530b661123Smrg # GNU C++ compiler with Solaris linker 67540b661123Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 67550b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 67560b661123Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6757880c7e28Smrg _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' 67580b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6759880c7e28Smrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67600b661123Smrg 67610b661123Smrg # Commands to make compiler produce verbose output that lists 67620b661123Smrg # what "hidden" libraries, object files and flags are used when 67630b661123Smrg # linking a shared library. 6764880c7e28Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67650b661123Smrg else 67660b661123Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 67670b661123Smrg # platform. 67680b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67690b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 67700b661123Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 67710b661123Smrg 67720b661123Smrg # Commands to make compiler produce verbose output that lists 67730b661123Smrg # what "hidden" libraries, object files and flags are used when 67740b661123Smrg # linking a shared library. 6775880c7e28Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 67760b661123Smrg fi 67770b661123Smrg 67780b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 67790b661123Smrg case $host_os in 67800b661123Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 67810b661123Smrg *) 67820b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 67830b661123Smrg ;; 67840b661123Smrg esac 67850b661123Smrg fi 67860b661123Smrg ;; 67870b661123Smrg esac 67880b661123Smrg ;; 678972313efbSmrg 67900b661123Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 67910b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 67920b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67930b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 67940b661123Smrg runpath_var='LD_RUN_PATH' 679572313efbSmrg 67960b661123Smrg case $cc_basename in 67970b661123Smrg CC*) 67980b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 67990b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68000b661123Smrg ;; 68010b661123Smrg *) 68020b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68030b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68040b661123Smrg ;; 68050b661123Smrg esac 68060b661123Smrg ;; 680772313efbSmrg 68080b661123Smrg sysv5* | sco3.2v5* | sco5v6*) 68090b661123Smrg # Note: We can NOT use -z defs as we might desire, because we do not 68100b661123Smrg # link with -lc, and that would cause any symbols used from libc to 68110b661123Smrg # always be unresolved, which means just about no library would 68120b661123Smrg # ever link correctly. If we're not using GNU ld we use -z text 68130b661123Smrg # though, which does catch some bad symbols but isn't as heavy-handed 68140b661123Smrg # as -z defs. 68150b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 68160b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 68170b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 68180b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68190b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 68200b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 68210b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 68220b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 68230b661123Smrg runpath_var='LD_RUN_PATH' 682472313efbSmrg 68250b661123Smrg case $cc_basename in 68260b661123Smrg CC*) 68270b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68280b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6829880c7e28Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6830880c7e28Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6831880c7e28Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6832880c7e28Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 68330b661123Smrg ;; 68340b661123Smrg *) 68350b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68360b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 68370b661123Smrg ;; 68380b661123Smrg esac 68390b661123Smrg ;; 6840bdcaa8d0Smrg 68410b661123Smrg tandem*) 68420b661123Smrg case $cc_basename in 68430b661123Smrg NCC*) 68440b661123Smrg # NonStop-UX NCC 3.20 68450b661123Smrg # FIXME: insert proper C++ library support 68460b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68470b661123Smrg ;; 68480b661123Smrg *) 68490b661123Smrg # FIXME: insert proper C++ library support 68500b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68510b661123Smrg ;; 68520b661123Smrg esac 68530b661123Smrg ;; 6854bdcaa8d0Smrg 68550b661123Smrg vxworks*) 68560b661123Smrg # FIXME: insert proper C++ library support 68570b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68580b661123Smrg ;; 6859bdcaa8d0Smrg 68600b661123Smrg *) 68610b661123Smrg # FIXME: insert proper C++ library support 68620b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68630b661123Smrg ;; 68640b661123Smrg esac 6865bdcaa8d0Smrg 68660b661123Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 68670b661123Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 68680b661123Smrg 68690b661123Smrg _LT_TAGVAR(GCC, $1)="$GXX" 68700b661123Smrg _LT_TAGVAR(LD, $1)="$LD" 68710b661123Smrg 68720b661123Smrg ## CAVEAT EMPTOR: 68730b661123Smrg ## There is no encapsulation within the following macros, do not change 68740b661123Smrg ## the running order or otherwise move them around unless you know exactly 68750b661123Smrg ## what you are doing... 68760b661123Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 68770b661123Smrg _LT_COMPILER_PIC($1) 68780b661123Smrg _LT_COMPILER_C_O($1) 68790b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 68800b661123Smrg _LT_LINKER_SHLIBS($1) 68810b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 68820b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 68830b661123Smrg 68840b661123Smrg _LT_CONFIG($1) 68850b661123Smrg fi # test -n "$compiler" 68860b661123Smrg 68870b661123Smrg CC=$lt_save_CC 6888880c7e28Smrg CFLAGS=$lt_save_CFLAGS 68890b661123Smrg LDCXX=$LD 68900b661123Smrg LD=$lt_save_LD 68910b661123Smrg GCC=$lt_save_GCC 68920b661123Smrg with_gnu_ld=$lt_save_with_gnu_ld 68930b661123Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 68940b661123Smrg lt_cv_path_LD=$lt_save_path_LD 68950b661123Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 68960b661123Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 68970b661123Smrgfi # test "$_lt_caught_CXX_error" != yes 6898bdcaa8d0Smrg 68990b661123SmrgAC_LANG_POP 69000b661123Smrg])# _LT_LANG_CXX_CONFIG 6901bdcaa8d0Smrg 6902bdcaa8d0Smrg 6903880c7e28Smrg# _LT_FUNC_STRIPNAME_CNF 6904880c7e28Smrg# ---------------------- 6905880c7e28Smrg# func_stripname_cnf prefix suffix name 6906880c7e28Smrg# strip PREFIX and SUFFIX off of NAME. 6907880c7e28Smrg# PREFIX and SUFFIX must not contain globbing or regex special 6908880c7e28Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6909880c7e28Smrg# dot (in which case that matches only a dot). 6910880c7e28Smrg# 6911880c7e28Smrg# This function is identical to the (non-XSI) version of func_stripname, 6912880c7e28Smrg# except this one can be used by m4 code that may be executed by configure, 6913880c7e28Smrg# rather than the libtool script. 6914880c7e28Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6915880c7e28SmrgAC_REQUIRE([_LT_DECL_SED]) 6916880c7e28SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6917880c7e28Smrgfunc_stripname_cnf () 6918880c7e28Smrg{ 6919880c7e28Smrg case ${2} in 6920880c7e28Smrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6921880c7e28Smrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6922880c7e28Smrg esac 6923880c7e28Smrg} # func_stripname_cnf 6924880c7e28Smrg])# _LT_FUNC_STRIPNAME_CNF 6925880c7e28Smrg 69260b661123Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 69270b661123Smrg# --------------------------------- 69280b661123Smrg# Figure out "hidden" library dependencies from verbose 69290b661123Smrg# compiler output when linking a shared library. 69300b661123Smrg# Parse the compiler output and extract the necessary 69310b661123Smrg# objects, libraries and library flags. 69320b661123Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 69330b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6934880c7e28SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 69350b661123Smrg# Dependencies to place before and after the object being linked: 69360b661123Smrg_LT_TAGVAR(predep_objects, $1)= 69370b661123Smrg_LT_TAGVAR(postdep_objects, $1)= 69380b661123Smrg_LT_TAGVAR(predeps, $1)= 69390b661123Smrg_LT_TAGVAR(postdeps, $1)= 69400b661123Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6941bdcaa8d0Smrg 69420b661123Smrgdnl we can't use the lt_simple_compile_test_code here, 69430b661123Smrgdnl because it contains code intended for an executable, 69440b661123Smrgdnl not a library. It's possible we should let each 69450b661123Smrgdnl tag define a new lt_????_link_test_code variable, 69460b661123Smrgdnl but it's only used here... 69470b661123Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 69480b661123Smrgint a; 69490b661123Smrgvoid foo (void) { a = 0; } 69500b661123Smrg_LT_EOF 69510b661123Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 69520b661123Smrgclass Foo 69530b661123Smrg{ 69540b661123Smrgpublic: 69550b661123Smrg Foo (void) { a = 0; } 69560b661123Smrgprivate: 69570b661123Smrg int a; 69580b661123Smrg}; 69590b661123Smrg_LT_EOF 69600b661123Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 69610b661123Smrg subroutine foo 69620b661123Smrg implicit none 69630b661123Smrg integer*4 a 69640b661123Smrg a=0 69650b661123Smrg return 69660b661123Smrg end 69670b661123Smrg_LT_EOF 69680b661123Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 69690b661123Smrg subroutine foo 69700b661123Smrg implicit none 69710b661123Smrg integer a 69720b661123Smrg a=0 69730b661123Smrg return 69740b661123Smrg end 69750b661123Smrg_LT_EOF 69760b661123Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 69770b661123Smrgpublic class foo { 69780b661123Smrg private int a; 69790b661123Smrg public void bar (void) { 69800b661123Smrg a = 0; 69810b661123Smrg } 69820b661123Smrg}; 69830b661123Smrg_LT_EOF 6984880c7e28Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 6985880c7e28Smrgpackage foo 6986880c7e28Smrgfunc foo() { 6987880c7e28Smrg} 6988880c7e28Smrg_LT_EOF 69890b661123Smrg]) 6990880c7e28Smrg 6991880c7e28Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 6992880c7e28Smrgcase "$CC $CFLAGS " in #( 6993880c7e28Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6994880c7e28Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 6995880c7e28Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 6996880c7e28Smrgesac 6997880c7e28Smrg 69980b661123Smrgdnl Parse the compiler output and extract the necessary 69990b661123Smrgdnl objects, libraries and library flags. 70000b661123Smrgif AC_TRY_EVAL(ac_compile); then 70010b661123Smrg # Parse the compiler output and extract the necessary 70020b661123Smrg # objects, libraries and library flags. 7003bdcaa8d0Smrg 70040b661123Smrg # Sentinel used to keep track of whether or not we are before 70050b661123Smrg # the conftest object file. 70060b661123Smrg pre_test_object_deps_done=no 700772313efbSmrg 70080b661123Smrg for p in `eval "$output_verbose_link_cmd"`; do 7009880c7e28Smrg case ${prev}${p} in 701072313efbSmrg 70110b661123Smrg -L* | -R* | -l*) 70120b661123Smrg # Some compilers place space between "-{L,R}" and the path. 70130b661123Smrg # Remove the space. 70140b661123Smrg if test $p = "-L" || 70150b661123Smrg test $p = "-R"; then 70160b661123Smrg prev=$p 70170b661123Smrg continue 70180b661123Smrg fi 701972313efbSmrg 7020880c7e28Smrg # Expand the sysroot to ease extracting the directories later. 7021880c7e28Smrg if test -z "$prev"; then 7022880c7e28Smrg case $p in 7023880c7e28Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7024880c7e28Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7025880c7e28Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7026880c7e28Smrg esac 7027880c7e28Smrg fi 7028880c7e28Smrg case $p in 7029880c7e28Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7030880c7e28Smrg esac 70310b661123Smrg if test "$pre_test_object_deps_done" = no; then 7032880c7e28Smrg case ${prev} in 7033880c7e28Smrg -L | -R) 70340b661123Smrg # Internal compiler library paths should come after those 70350b661123Smrg # provided the user. The postdeps already come after the 70360b661123Smrg # user supplied libs so there is no need to process them. 70370b661123Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 70380b661123Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 70390b661123Smrg else 70400b661123Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 70410b661123Smrg fi 70420b661123Smrg ;; 70430b661123Smrg # The "-l" case would never come before the object being 70440b661123Smrg # linked, so don't bother handling this case. 70450b661123Smrg esac 70460b661123Smrg else 70470b661123Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 70480b661123Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 70490b661123Smrg else 70500b661123Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 70510b661123Smrg fi 70520b661123Smrg fi 7053880c7e28Smrg prev= 70540b661123Smrg ;; 705572313efbSmrg 7056880c7e28Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 70570b661123Smrg *.$objext) 70580b661123Smrg # This assumes that the test object file only shows up 70590b661123Smrg # once in the compiler output. 70600b661123Smrg if test "$p" = "conftest.$objext"; then 70610b661123Smrg pre_test_object_deps_done=yes 70620b661123Smrg continue 70630b661123Smrg fi 706472313efbSmrg 70650b661123Smrg if test "$pre_test_object_deps_done" = no; then 70660b661123Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 70670b661123Smrg _LT_TAGVAR(predep_objects, $1)="$p" 70680b661123Smrg else 70690b661123Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 70700b661123Smrg fi 70710b661123Smrg else 70720b661123Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 70730b661123Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 70740b661123Smrg else 70750b661123Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 70760b661123Smrg fi 70770b661123Smrg fi 70780b661123Smrg ;; 707972313efbSmrg 70800b661123Smrg *) ;; # Ignore the rest. 708172313efbSmrg 70820b661123Smrg esac 70830b661123Smrg done 708472313efbSmrg 70850b661123Smrg # Clean up. 70860b661123Smrg rm -f a.out a.exe 70870b661123Smrgelse 70880b661123Smrg echo "libtool.m4: error: problem compiling $1 test program" 708972313efbSmrgfi 709072313efbSmrg 70910b661123Smrg$RM -f confest.$objext 7092880c7e28SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 709372313efbSmrg 70940b661123Smrg# PORTME: override above test on systems where it is broken 70950b661123Smrgm4_if([$1], [CXX], 70960b661123Smrg[case $host_os in 70970b661123Smrginterix[[3-9]]*) 70980b661123Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 70990b661123Smrg # hack all around it, let's just trust "g++" to DTRT. 71000b661123Smrg _LT_TAGVAR(predep_objects,$1)= 71010b661123Smrg _LT_TAGVAR(postdep_objects,$1)= 71020b661123Smrg _LT_TAGVAR(postdeps,$1)= 71030b661123Smrg ;; 710472313efbSmrg 71050b661123Smrglinux*) 71060b661123Smrg case `$CC -V 2>&1 | sed 5q` in 71070b661123Smrg *Sun\ C*) 71080b661123Smrg # Sun C++ 5.9 710972313efbSmrg 71100b661123Smrg # The more standards-conforming stlport4 library is 71110b661123Smrg # incompatible with the Cstd library. Avoid specifying 71120b661123Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71130b661123Smrg # -library=stlport4 depends on it. 71140b661123Smrg case " $CXX $CXXFLAGS " in 71150b661123Smrg *" -library=stlport4 "*) 71160b661123Smrg solaris_use_stlport4=yes 71170b661123Smrg ;; 71180b661123Smrg esac 711972313efbSmrg 71200b661123Smrg if test "$solaris_use_stlport4" != yes; then 71210b661123Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71220b661123Smrg fi 71230b661123Smrg ;; 71240b661123Smrg esac 712596ce994aSmrg ;; 71260b661123Smrg 712796ce994aSmrgsolaris*) 71280b661123Smrg case $cc_basename in 7129880c7e28Smrg CC* | sunCC*) 71300b661123Smrg # The more standards-conforming stlport4 library is 71310b661123Smrg # incompatible with the Cstd library. Avoid specifying 71320b661123Smrg # it if it's in CXXFLAGS. Ignore libCrun as 71330b661123Smrg # -library=stlport4 depends on it. 71340b661123Smrg case " $CXX $CXXFLAGS " in 71350b661123Smrg *" -library=stlport4 "*) 71360b661123Smrg solaris_use_stlport4=yes 71370b661123Smrg ;; 71380b661123Smrg esac 713972313efbSmrg 71400b661123Smrg # Adding this requires a known-good setup of shared libraries for 71410b661123Smrg # Sun compiler versions before 5.6, else PIC objects from an old 71420b661123Smrg # archive will be linked into the output, leading to subtle bugs. 71430b661123Smrg if test "$solaris_use_stlport4" != yes; then 71440b661123Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 71450b661123Smrg fi 71460b661123Smrg ;; 71470b661123Smrg esac 714896ce994aSmrg ;; 714996ce994aSmrgesac 71500b661123Smrg]) 715172313efbSmrg 71520b661123Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 71530b661123Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 715496ce994aSmrgesac 71550b661123Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 71560b661123Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 71570b661123Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 71580b661123Smrgfi 71590b661123Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 71600b661123Smrg [The directories searched by this compiler when creating a shared library]) 71610b661123Smrg_LT_TAGDECL([], [predep_objects], [1], 71620b661123Smrg [Dependencies to place before and after the objects being linked to 71630b661123Smrg create a shared library]) 71640b661123Smrg_LT_TAGDECL([], [postdep_objects], [1]) 71650b661123Smrg_LT_TAGDECL([], [predeps], [1]) 71660b661123Smrg_LT_TAGDECL([], [postdeps], [1]) 71670b661123Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 71680b661123Smrg [The library search path used internally by the compiler when linking 71690b661123Smrg a shared library]) 71700b661123Smrg])# _LT_SYS_HIDDEN_LIBDEPS 71710b661123Smrg 71720b661123Smrg 71730b661123Smrg# _LT_LANG_F77_CONFIG([TAG]) 71740b661123Smrg# -------------------------- 71750b661123Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 71760b661123Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 71770b661123Smrg# to write the compiler configuration to `libtool'. 71780b661123Smrgm4_defun([_LT_LANG_F77_CONFIG], 7179880c7e28Smrg[AC_LANG_PUSH(Fortran 77) 7180880c7e28Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 7181880c7e28Smrg _lt_disable_F77=yes 7182880c7e28Smrgfi 718372313efbSmrg 71840b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 71850b661123Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 71860b661123Smrg_LT_TAGVAR(always_export_symbols, $1)=no 71870b661123Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 71880b661123Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 71890b661123Smrg_LT_TAGVAR(hardcode_direct, $1)=no 71900b661123Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 71910b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 71920b661123Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 71930b661123Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 71940b661123Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 71950b661123Smrg_LT_TAGVAR(inherit_rpath, $1)=no 71960b661123Smrg_LT_TAGVAR(module_cmds, $1)= 71970b661123Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 71980b661123Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 71990b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7200880c7e28Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7201880c7e28Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 72020b661123Smrg_LT_TAGVAR(no_undefined_flag, $1)= 72030b661123Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 72040b661123Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 720572313efbSmrg 72060b661123Smrg# Source file extension for f77 test sources. 72070b661123Smrgac_ext=f 720872313efbSmrg 72090b661123Smrg# Object file extension for compiled f77 test sources. 72100b661123Smrgobjext=o 72110b661123Smrg_LT_TAGVAR(objext, $1)=$objext 72120b661123Smrg 72130b661123Smrg# No sense in running all these tests if we already determined that 72140b661123Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 72150b661123Smrg# are currently assumed to apply to all compilers on this platform, 72160b661123Smrg# and will be corrupted by setting them based on a non-working compiler. 72170b661123Smrgif test "$_lt_disable_F77" != yes; then 72180b661123Smrg # Code to be used in simple compile tests 72190b661123Smrg lt_simple_compile_test_code="\ 72200b661123Smrg subroutine t 72210b661123Smrg return 72220b661123Smrg end 72230b661123Smrg" 722472313efbSmrg 72250b661123Smrg # Code to be used in simple link tests 72260b661123Smrg lt_simple_link_test_code="\ 72270b661123Smrg program t 72280b661123Smrg end 72290b661123Smrg" 723072313efbSmrg 72310b661123Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 72320b661123Smrg _LT_TAG_COMPILER 723372313efbSmrg 72340b661123Smrg # save warnings/boilerplate of simple test code 72350b661123Smrg _LT_COMPILER_BOILERPLATE 72360b661123Smrg _LT_LINKER_BOILERPLATE 723772313efbSmrg 72380b661123Smrg # Allow CC to be a program name with arguments. 72390b661123Smrg lt_save_CC="$CC" 72400b661123Smrg lt_save_GCC=$GCC 7241880c7e28Smrg lt_save_CFLAGS=$CFLAGS 72420b661123Smrg CC=${F77-"f77"} 7243880c7e28Smrg CFLAGS=$FFLAGS 72440b661123Smrg compiler=$CC 72450b661123Smrg _LT_TAGVAR(compiler, $1)=$CC 72460b661123Smrg _LT_CC_BASENAME([$compiler]) 72470b661123Smrg GCC=$G77 72480b661123Smrg if test -n "$compiler"; then 72490b661123Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 72500b661123Smrg AC_MSG_RESULT([$can_build_shared]) 725172313efbSmrg 72520b661123Smrg AC_MSG_CHECKING([whether to build shared libraries]) 72530b661123Smrg test "$can_build_shared" = "no" && enable_shared=no 72540b661123Smrg 72550b661123Smrg # On AIX, shared libraries and static libraries use the same namespace, and 72560b661123Smrg # are all built from PIC. 72570b661123Smrg case $host_os in 72580b661123Smrg aix3*) 72590b661123Smrg test "$enable_shared" = yes && enable_static=no 72600b661123Smrg if test -n "$RANLIB"; then 72610b661123Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 72620b661123Smrg postinstall_cmds='$RANLIB $lib' 72630b661123Smrg fi 72640b661123Smrg ;; 72650b661123Smrg aix[[4-9]]*) 72660b661123Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 72670b661123Smrg test "$enable_shared" = yes && enable_static=no 726872313efbSmrg fi 72690b661123Smrg ;; 72700b661123Smrg esac 72710b661123Smrg AC_MSG_RESULT([$enable_shared]) 72720b661123Smrg 72730b661123Smrg AC_MSG_CHECKING([whether to build static libraries]) 72740b661123Smrg # Make sure either enable_shared or enable_static is yes. 72750b661123Smrg test "$enable_shared" = yes || enable_static=yes 72760b661123Smrg AC_MSG_RESULT([$enable_static]) 72770b661123Smrg 72780b661123Smrg _LT_TAGVAR(GCC, $1)="$G77" 72790b661123Smrg _LT_TAGVAR(LD, $1)="$LD" 72800b661123Smrg 72810b661123Smrg ## CAVEAT EMPTOR: 72820b661123Smrg ## There is no encapsulation within the following macros, do not change 72830b661123Smrg ## the running order or otherwise move them around unless you know exactly 72840b661123Smrg ## what you are doing... 72850b661123Smrg _LT_COMPILER_PIC($1) 72860b661123Smrg _LT_COMPILER_C_O($1) 72870b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 72880b661123Smrg _LT_LINKER_SHLIBS($1) 72890b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 72900b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 72910b661123Smrg 72920b661123Smrg _LT_CONFIG($1) 72930b661123Smrg fi # test -n "$compiler" 72940b661123Smrg 72950b661123Smrg GCC=$lt_save_GCC 72960b661123Smrg CC="$lt_save_CC" 7297880c7e28Smrg CFLAGS="$lt_save_CFLAGS" 72980b661123Smrgfi # test "$_lt_disable_F77" != yes 729972313efbSmrg 73000b661123SmrgAC_LANG_POP 73010b661123Smrg])# _LT_LANG_F77_CONFIG 73020b661123Smrg 73030b661123Smrg 73040b661123Smrg# _LT_LANG_FC_CONFIG([TAG]) 73050b661123Smrg# ------------------------- 73060b661123Smrg# Ensure that the configuration variables for a Fortran compiler are 73070b661123Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 73080b661123Smrg# to write the compiler configuration to `libtool'. 73090b661123Smrgm4_defun([_LT_LANG_FC_CONFIG], 7310880c7e28Smrg[AC_LANG_PUSH(Fortran) 7311880c7e28Smrg 7312880c7e28Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 7313880c7e28Smrg _lt_disable_FC=yes 7314880c7e28Smrgfi 73150b661123Smrg 73160b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 73170b661123Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 73180b661123Smrg_LT_TAGVAR(always_export_symbols, $1)=no 73190b661123Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 73200b661123Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 73210b661123Smrg_LT_TAGVAR(hardcode_direct, $1)=no 73220b661123Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 73230b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 73240b661123Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 73250b661123Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 73260b661123Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 73270b661123Smrg_LT_TAGVAR(inherit_rpath, $1)=no 73280b661123Smrg_LT_TAGVAR(module_cmds, $1)= 73290b661123Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 73300b661123Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 73310b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7332880c7e28Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7333880c7e28Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 73340b661123Smrg_LT_TAGVAR(no_undefined_flag, $1)= 73350b661123Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 73360b661123Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 73370b661123Smrg 73380b661123Smrg# Source file extension for fc test sources. 73390b661123Smrgac_ext=${ac_fc_srcext-f} 73400b661123Smrg 73410b661123Smrg# Object file extension for compiled fc test sources. 73420b661123Smrgobjext=o 73430b661123Smrg_LT_TAGVAR(objext, $1)=$objext 73440b661123Smrg 73450b661123Smrg# No sense in running all these tests if we already determined that 73460b661123Smrg# the FC compiler isn't working. Some variables (like enable_shared) 73470b661123Smrg# are currently assumed to apply to all compilers on this platform, 73480b661123Smrg# and will be corrupted by setting them based on a non-working compiler. 73490b661123Smrgif test "$_lt_disable_FC" != yes; then 73500b661123Smrg # Code to be used in simple compile tests 73510b661123Smrg lt_simple_compile_test_code="\ 73520b661123Smrg subroutine t 73530b661123Smrg return 73540b661123Smrg end 73550b661123Smrg" 73560b661123Smrg 73570b661123Smrg # Code to be used in simple link tests 73580b661123Smrg lt_simple_link_test_code="\ 73590b661123Smrg program t 73600b661123Smrg end 73610b661123Smrg" 73620b661123Smrg 73630b661123Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 73640b661123Smrg _LT_TAG_COMPILER 736572313efbSmrg 73660b661123Smrg # save warnings/boilerplate of simple test code 73670b661123Smrg _LT_COMPILER_BOILERPLATE 73680b661123Smrg _LT_LINKER_BOILERPLATE 73690b661123Smrg 73700b661123Smrg # Allow CC to be a program name with arguments. 73710b661123Smrg lt_save_CC="$CC" 73720b661123Smrg lt_save_GCC=$GCC 7373880c7e28Smrg lt_save_CFLAGS=$CFLAGS 73740b661123Smrg CC=${FC-"f95"} 7375880c7e28Smrg CFLAGS=$FCFLAGS 73760b661123Smrg compiler=$CC 73770b661123Smrg GCC=$ac_cv_fc_compiler_gnu 73780b661123Smrg 73790b661123Smrg _LT_TAGVAR(compiler, $1)=$CC 73800b661123Smrg _LT_CC_BASENAME([$compiler]) 73810b661123Smrg 73820b661123Smrg if test -n "$compiler"; then 73830b661123Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 73840b661123Smrg AC_MSG_RESULT([$can_build_shared]) 73850b661123Smrg 73860b661123Smrg AC_MSG_CHECKING([whether to build shared libraries]) 73870b661123Smrg test "$can_build_shared" = "no" && enable_shared=no 73880b661123Smrg 73890b661123Smrg # On AIX, shared libraries and static libraries use the same namespace, and 73900b661123Smrg # are all built from PIC. 739196ce994aSmrg case $host_os in 73920b661123Smrg aix3*) 73930b661123Smrg test "$enable_shared" = yes && enable_static=no 73940b661123Smrg if test -n "$RANLIB"; then 73950b661123Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 73960b661123Smrg postinstall_cmds='$RANLIB $lib' 73970b661123Smrg fi 73980b661123Smrg ;; 739996ce994aSmrg aix[[4-9]]*) 74000b661123Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 74010b661123Smrg test "$enable_shared" = yes && enable_static=no 740296ce994aSmrg fi 74030b661123Smrg ;; 740496ce994aSmrg esac 74050b661123Smrg AC_MSG_RESULT([$enable_shared]) 74060b661123Smrg 74070b661123Smrg AC_MSG_CHECKING([whether to build static libraries]) 74080b661123Smrg # Make sure either enable_shared or enable_static is yes. 74090b661123Smrg test "$enable_shared" = yes || enable_static=yes 74100b661123Smrg AC_MSG_RESULT([$enable_static]) 74110b661123Smrg 74120b661123Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 74130b661123Smrg _LT_TAGVAR(LD, $1)="$LD" 74140b661123Smrg 74150b661123Smrg ## CAVEAT EMPTOR: 74160b661123Smrg ## There is no encapsulation within the following macros, do not change 74170b661123Smrg ## the running order or otherwise move them around unless you know exactly 74180b661123Smrg ## what you are doing... 74190b661123Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74200b661123Smrg _LT_COMPILER_PIC($1) 74210b661123Smrg _LT_COMPILER_C_O($1) 74220b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 74230b661123Smrg _LT_LINKER_SHLIBS($1) 74240b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 74250b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74260b661123Smrg 74270b661123Smrg _LT_CONFIG($1) 74280b661123Smrg fi # test -n "$compiler" 74290b661123Smrg 74300b661123Smrg GCC=$lt_save_GCC 7431880c7e28Smrg CC=$lt_save_CC 7432880c7e28Smrg CFLAGS=$lt_save_CFLAGS 74330b661123Smrgfi # test "$_lt_disable_FC" != yes 743472313efbSmrg 74350b661123SmrgAC_LANG_POP 74360b661123Smrg])# _LT_LANG_FC_CONFIG 743772313efbSmrg 743872313efbSmrg 74390b661123Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 74400b661123Smrg# -------------------------- 74410b661123Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 74420b661123Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 74430b661123Smrg# to write the compiler configuration to `libtool'. 74440b661123Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 74450b661123Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 74460b661123SmrgAC_LANG_SAVE 744772313efbSmrg 74480b661123Smrg# Source file extension for Java test sources. 74490b661123Smrgac_ext=java 745072313efbSmrg 74510b661123Smrg# Object file extension for compiled Java test sources. 74520b661123Smrgobjext=o 74530b661123Smrg_LT_TAGVAR(objext, $1)=$objext 745472313efbSmrg 74550b661123Smrg# Code to be used in simple compile tests 74560b661123Smrglt_simple_compile_test_code="class foo {}" 745772313efbSmrg 74580b661123Smrg# Code to be used in simple link tests 74590b661123Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 746072313efbSmrg 74610b661123Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 74620b661123Smrg_LT_TAG_COMPILER 746372313efbSmrg 74640b661123Smrg# save warnings/boilerplate of simple test code 74650b661123Smrg_LT_COMPILER_BOILERPLATE 74660b661123Smrg_LT_LINKER_BOILERPLATE 7467bdcaa8d0Smrg 74680b661123Smrg# Allow CC to be a program name with arguments. 7469880c7e28Smrglt_save_CC=$CC 7470880c7e28Smrglt_save_CFLAGS=$CFLAGS 74710b661123Smrglt_save_GCC=$GCC 74720b661123SmrgGCC=yes 74730b661123SmrgCC=${GCJ-"gcj"} 7474880c7e28SmrgCFLAGS=$GCJFLAGS 74750b661123Smrgcompiler=$CC 74760b661123Smrg_LT_TAGVAR(compiler, $1)=$CC 74770b661123Smrg_LT_TAGVAR(LD, $1)="$LD" 74780b661123Smrg_LT_CC_BASENAME([$compiler]) 7479bdcaa8d0Smrg 74800b661123Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 74810b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7482bdcaa8d0Smrg 74830b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7484880c7e28Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7485880c7e28Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7486bdcaa8d0Smrg 74870b661123Smrgif test -n "$compiler"; then 74880b661123Smrg _LT_COMPILER_NO_RTTI($1) 74890b661123Smrg _LT_COMPILER_PIC($1) 74900b661123Smrg _LT_COMPILER_C_O($1) 74910b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 74920b661123Smrg _LT_LINKER_SHLIBS($1) 74930b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7494bdcaa8d0Smrg 74950b661123Smrg _LT_CONFIG($1) 74960b661123Smrgfi 7497bdcaa8d0Smrg 74980b661123SmrgAC_LANG_RESTORE 7499bdcaa8d0Smrg 75000b661123SmrgGCC=$lt_save_GCC 7501880c7e28SmrgCC=$lt_save_CC 7502880c7e28SmrgCFLAGS=$lt_save_CFLAGS 75030b661123Smrg])# _LT_LANG_GCJ_CONFIG 7504bdcaa8d0Smrg 7505bdcaa8d0Smrg 7506880c7e28Smrg# _LT_LANG_GO_CONFIG([TAG]) 7507880c7e28Smrg# -------------------------- 7508880c7e28Smrg# Ensure that the configuration variables for the GNU Go compiler 75090b661123Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 75100b661123Smrg# to write the compiler configuration to `libtool'. 7511880c7e28Smrgm4_defun([_LT_LANG_GO_CONFIG], 7512880c7e28Smrg[AC_REQUIRE([LT_PROG_GO])dnl 75130b661123SmrgAC_LANG_SAVE 75140b661123Smrg 7515880c7e28Smrg# Source file extension for Go test sources. 7516880c7e28Smrgac_ext=go 75170b661123Smrg 7518880c7e28Smrg# Object file extension for compiled Go test sources. 75190b661123Smrgobjext=o 75200b661123Smrg_LT_TAGVAR(objext, $1)=$objext 75210b661123Smrg 75220b661123Smrg# Code to be used in simple compile tests 7523880c7e28Smrglt_simple_compile_test_code="package main; func main() { }" 75240b661123Smrg 75250b661123Smrg# Code to be used in simple link tests 7526880c7e28Smrglt_simple_link_test_code='package main; func main() { }' 75270b661123Smrg 75280b661123Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 75290b661123Smrg_LT_TAG_COMPILER 75300b661123Smrg 75310b661123Smrg# save warnings/boilerplate of simple test code 75320b661123Smrg_LT_COMPILER_BOILERPLATE 75330b661123Smrg_LT_LINKER_BOILERPLATE 75340b661123Smrg 75350b661123Smrg# Allow CC to be a program name with arguments. 7536880c7e28Smrglt_save_CC=$CC 7537880c7e28Smrglt_save_CFLAGS=$CFLAGS 75380b661123Smrglt_save_GCC=$GCC 7539880c7e28SmrgGCC=yes 7540880c7e28SmrgCC=${GOC-"gccgo"} 7541880c7e28SmrgCFLAGS=$GOFLAGS 75420b661123Smrgcompiler=$CC 75430b661123Smrg_LT_TAGVAR(compiler, $1)=$CC 7544880c7e28Smrg_LT_TAGVAR(LD, $1)="$LD" 75450b661123Smrg_LT_CC_BASENAME([$compiler]) 7546880c7e28Smrg 7547880c7e28Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 7548880c7e28Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7549880c7e28Smrg 7550880c7e28Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7551880c7e28Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7552880c7e28Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 75530b661123Smrg 75540b661123Smrgif test -n "$compiler"; then 7555880c7e28Smrg _LT_COMPILER_NO_RTTI($1) 7556880c7e28Smrg _LT_COMPILER_PIC($1) 7557880c7e28Smrg _LT_COMPILER_C_O($1) 7558880c7e28Smrg _LT_COMPILER_FILE_LOCKS($1) 7559880c7e28Smrg _LT_LINKER_SHLIBS($1) 7560880c7e28Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7561880c7e28Smrg 75620b661123Smrg _LT_CONFIG($1) 75630b661123Smrgfi 75640b661123Smrg 75650b661123SmrgAC_LANG_RESTORE 75660b661123Smrg 7567880c7e28SmrgGCC=$lt_save_GCC 7568880c7e28SmrgCC=$lt_save_CC 7569880c7e28SmrgCFLAGS=$lt_save_CFLAGS 7570880c7e28Smrg])# _LT_LANG_GO_CONFIG 75710b661123Smrg 7572880c7e28Smrg 7573880c7e28Smrg# _LT_LANG_RC_CONFIG([TAG]) 7574880c7e28Smrg# ------------------------- 7575880c7e28Smrg# Ensure that the configuration variables for the Windows resource compiler 7576880c7e28Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7577880c7e28Smrg# to write the compiler configuration to `libtool'. 7578880c7e28Smrgm4_defun([_LT_LANG_RC_CONFIG], 7579880c7e28Smrg[AC_REQUIRE([LT_PROG_RC])dnl 7580880c7e28SmrgAC_LANG_SAVE 7581880c7e28Smrg 7582880c7e28Smrg# Source file extension for RC test sources. 7583880c7e28Smrgac_ext=rc 7584880c7e28Smrg 7585880c7e28Smrg# Object file extension for compiled RC test sources. 7586880c7e28Smrgobjext=o 7587880c7e28Smrg_LT_TAGVAR(objext, $1)=$objext 7588880c7e28Smrg 7589880c7e28Smrg# Code to be used in simple compile tests 7590880c7e28Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 7591880c7e28Smrg 7592880c7e28Smrg# Code to be used in simple link tests 7593880c7e28Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 7594880c7e28Smrg 7595880c7e28Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7596880c7e28Smrg_LT_TAG_COMPILER 7597880c7e28Smrg 7598880c7e28Smrg# save warnings/boilerplate of simple test code 7599880c7e28Smrg_LT_COMPILER_BOILERPLATE 7600880c7e28Smrg_LT_LINKER_BOILERPLATE 7601880c7e28Smrg 7602880c7e28Smrg# Allow CC to be a program name with arguments. 7603880c7e28Smrglt_save_CC="$CC" 7604880c7e28Smrglt_save_CFLAGS=$CFLAGS 7605880c7e28Smrglt_save_GCC=$GCC 7606880c7e28SmrgGCC= 7607880c7e28SmrgCC=${RC-"windres"} 7608880c7e28SmrgCFLAGS= 7609880c7e28Smrgcompiler=$CC 7610880c7e28Smrg_LT_TAGVAR(compiler, $1)=$CC 7611880c7e28Smrg_LT_CC_BASENAME([$compiler]) 7612880c7e28Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 7613880c7e28Smrg 7614880c7e28Smrgif test -n "$compiler"; then 7615880c7e28Smrg : 7616880c7e28Smrg _LT_CONFIG($1) 7617880c7e28Smrgfi 7618880c7e28Smrg 7619880c7e28SmrgGCC=$lt_save_GCC 7620880c7e28SmrgAC_LANG_RESTORE 7621880c7e28SmrgCC=$lt_save_CC 7622880c7e28SmrgCFLAGS=$lt_save_CFLAGS 7623880c7e28Smrg])# _LT_LANG_RC_CONFIG 7624880c7e28Smrg 7625880c7e28Smrg 7626880c7e28Smrg# LT_PROG_GCJ 7627880c7e28Smrg# ----------- 7628880c7e28SmrgAC_DEFUN([LT_PROG_GCJ], 7629880c7e28Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 76300b661123Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 76310b661123Smrg [AC_CHECK_TOOL(GCJ, gcj,) 76320b661123Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 76330b661123Smrg AC_SUBST(GCJFLAGS)])])[]dnl 76340b661123Smrg]) 76350b661123Smrg 76360b661123Smrg# Old name: 76370b661123SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 76380b661123Smrgdnl aclocal-1.4 backwards compatibility: 76390b661123Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 76400b661123Smrg 76410b661123Smrg 7642880c7e28Smrg# LT_PROG_GO 7643880c7e28Smrg# ---------- 7644880c7e28SmrgAC_DEFUN([LT_PROG_GO], 7645880c7e28Smrg[AC_CHECK_TOOL(GOC, gccgo,) 7646880c7e28Smrg]) 7647880c7e28Smrg 7648880c7e28Smrg 76490b661123Smrg# LT_PROG_RC 76500b661123Smrg# ---------- 76510b661123SmrgAC_DEFUN([LT_PROG_RC], 76520b661123Smrg[AC_CHECK_TOOL(RC, windres,) 76530b661123Smrg]) 76540b661123Smrg 76550b661123Smrg# Old name: 76560b661123SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 76570b661123Smrgdnl aclocal-1.4 backwards compatibility: 76580b661123Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 76590b661123Smrg 76600b661123Smrg 76610b661123Smrg# _LT_DECL_EGREP 76620b661123Smrg# -------------- 76630b661123Smrg# If we don't have a new enough Autoconf to choose the best grep 76640b661123Smrg# available, choose the one first in the user's PATH. 76650b661123Smrgm4_defun([_LT_DECL_EGREP], 76660b661123Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 76670b661123SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 76680b661123Smrgtest -z "$GREP" && GREP=grep 76690b661123Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 76700b661123Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 76710b661123Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 76720b661123Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 76730b661123SmrgAC_SUBST([GREP]) 76740b661123Smrg]) 76750b661123Smrg 76760b661123Smrg 76770b661123Smrg# _LT_DECL_OBJDUMP 76780b661123Smrg# -------------- 76790b661123Smrg# If we don't have a new enough Autoconf to choose the best objdump 76800b661123Smrg# available, choose the one first in the user's PATH. 76810b661123Smrgm4_defun([_LT_DECL_OBJDUMP], 76820b661123Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 76830b661123Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 76840b661123Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 76850b661123SmrgAC_SUBST([OBJDUMP]) 76860b661123Smrg]) 76870b661123Smrg 7688880c7e28Smrg# _LT_DECL_DLLTOOL 7689880c7e28Smrg# ---------------- 7690880c7e28Smrg# Ensure DLLTOOL variable is set. 7691880c7e28Smrgm4_defun([_LT_DECL_DLLTOOL], 7692880c7e28Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7693880c7e28Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7694880c7e28Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7695880c7e28SmrgAC_SUBST([DLLTOOL]) 7696880c7e28Smrg]) 76970b661123Smrg 76980b661123Smrg# _LT_DECL_SED 76990b661123Smrg# ------------ 77000b661123Smrg# Check for a fully-functional sed program, that truncates 77010b661123Smrg# as few characters as possible. Prefer GNU sed if found. 77020b661123Smrgm4_defun([_LT_DECL_SED], 77030b661123Smrg[AC_PROG_SED 77040b661123Smrgtest -z "$SED" && SED=sed 77050b661123SmrgXsed="$SED -e 1s/^X//" 77060b661123Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 77070b661123Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 77080b661123Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 77090b661123Smrg])# _LT_DECL_SED 77100b661123Smrg 77110b661123Smrgm4_ifndef([AC_PROG_SED], [ 77120b661123Smrg# NOTE: This macro has been submitted for inclusion into # 77130b661123Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 77140b661123Smrg# a released version of Autoconf we should remove this # 77150b661123Smrg# macro and use it instead. # 77160b661123Smrg 77170b661123Smrgm4_defun([AC_PROG_SED], 77180b661123Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 77190b661123SmrgAC_CACHE_VAL(lt_cv_path_SED, 77200b661123Smrg[# Loop through the user's path and test for sed and gsed. 77210b661123Smrg# Then use that list of sed's as ones to test for truncation. 77220b661123Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 77230b661123Smrgfor as_dir in $PATH 77240b661123Smrgdo 77250b661123Smrg IFS=$as_save_IFS 77260b661123Smrg test -z "$as_dir" && as_dir=. 77270b661123Smrg for lt_ac_prog in sed gsed; do 77280b661123Smrg for ac_exec_ext in '' $ac_executable_extensions; do 77290b661123Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 77300b661123Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 77310b661123Smrg fi 77320b661123Smrg done 77330b661123Smrg done 77340b661123Smrgdone 77350b661123SmrgIFS=$as_save_IFS 77360b661123Smrglt_ac_max=0 77370b661123Smrglt_ac_count=0 77380b661123Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 77390b661123Smrg# along with /bin/sed that truncates output. 77400b661123Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 77410b661123Smrg test ! -f $lt_ac_sed && continue 77420b661123Smrg cat /dev/null > conftest.in 77430b661123Smrg lt_ac_count=0 77440b661123Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 77450b661123Smrg # Check for GNU sed and select it if it is found. 77460b661123Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 77470b661123Smrg lt_cv_path_SED=$lt_ac_sed 77480b661123Smrg break 77490b661123Smrg fi 77500b661123Smrg while true; do 77510b661123Smrg cat conftest.in conftest.in >conftest.tmp 77520b661123Smrg mv conftest.tmp conftest.in 77530b661123Smrg cp conftest.in conftest.nl 77540b661123Smrg echo >>conftest.nl 77550b661123Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 77560b661123Smrg cmp -s conftest.out conftest.nl || break 77570b661123Smrg # 10000 chars as input seems more than enough 77580b661123Smrg test $lt_ac_count -gt 10 && break 77590b661123Smrg lt_ac_count=`expr $lt_ac_count + 1` 77600b661123Smrg if test $lt_ac_count -gt $lt_ac_max; then 77610b661123Smrg lt_ac_max=$lt_ac_count 77620b661123Smrg lt_cv_path_SED=$lt_ac_sed 77630b661123Smrg fi 77640b661123Smrg done 77650b661123Smrgdone 77660b661123Smrg]) 77670b661123SmrgSED=$lt_cv_path_SED 77680b661123SmrgAC_SUBST([SED]) 77690b661123SmrgAC_MSG_RESULT([$SED]) 77700b661123Smrg])#AC_PROG_SED 77710b661123Smrg])#m4_ifndef 77720b661123Smrg 77730b661123Smrg# Old name: 77740b661123SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 77750b661123Smrgdnl aclocal-1.4 backwards compatibility: 77760b661123Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 77770b661123Smrg 77780b661123Smrg 77790b661123Smrg# _LT_CHECK_SHELL_FEATURES 77800b661123Smrg# ------------------------ 77810b661123Smrg# Find out whether the shell is Bourne or XSI compatible, 77820b661123Smrg# or has some other useful features. 77830b661123Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 77840b661123Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 77850b661123Smrg# Try some XSI features 77860b661123Smrgxsi_shell=no 77870b661123Smrg( _lt_dummy="a/b/c" 7788880c7e28Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7789880c7e28Smrg = c,a/b,b/c, \ 77900b661123Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 77910b661123Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 77920b661123Smrg && xsi_shell=yes 77930b661123SmrgAC_MSG_RESULT([$xsi_shell]) 77940b661123Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 77950b661123Smrg 77960b661123SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 77970b661123Smrglt_shell_append=no 77980b661123Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 77990b661123Smrg >/dev/null 2>&1 \ 78000b661123Smrg && lt_shell_append=yes 78010b661123SmrgAC_MSG_RESULT([$lt_shell_append]) 78020b661123Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 78030b661123Smrg 78040b661123Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 78050b661123Smrg lt_unset=unset 78060b661123Smrgelse 78070b661123Smrg lt_unset=false 78080b661123Smrgfi 78090b661123Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 78100b661123Smrg 78110b661123Smrg# test EBCDIC or ASCII 78120b661123Smrgcase `echo X|tr X '\101'` in 78130b661123Smrg A) # ASCII based system 78140b661123Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 78150b661123Smrg lt_SP2NL='tr \040 \012' 78160b661123Smrg lt_NL2SP='tr \015\012 \040\040' 78170b661123Smrg ;; 78180b661123Smrg *) # EBCDIC based system 78190b661123Smrg lt_SP2NL='tr \100 \n' 78200b661123Smrg lt_NL2SP='tr \r\n \100\100' 78210b661123Smrg ;; 78220b661123Smrgesac 78230b661123Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 78240b661123Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 78250b661123Smrg])# _LT_CHECK_SHELL_FEATURES 78260b661123Smrg 78270b661123Smrg 7828880c7e28Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7829880c7e28Smrg# ------------------------------------------------------ 7830880c7e28Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7831880c7e28Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7832880c7e28Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7833880c7e28Smrg[dnl { 7834880c7e28Smrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7835880c7e28Smrg$1 ()\ 7836880c7e28Smrg{\ 7837880c7e28Smrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7838880c7e28Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7839880c7e28Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7840880c7e28Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7841880c7e28Smrgtest 0 -eq $? || _lt_function_replace_fail=: 7842880c7e28Smrg]) 7843bdcaa8d0Smrg 784472313efbSmrg 7845880c7e28Smrg# _LT_PROG_REPLACE_SHELLFNS 7846880c7e28Smrg# ------------------------- 7847880c7e28Smrg# Replace existing portable implementations of several shell functions with 7848880c7e28Smrg# equivalent extended shell implementations where those features are available.. 7849880c7e28Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7850880c7e28Smrg[if test x"$xsi_shell" = xyes; then 7851880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7852880c7e28Smrg case ${1} in 7853880c7e28Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7854880c7e28Smrg * ) func_dirname_result="${3}" ;; 7855880c7e28Smrg esac]) 7856880c7e28Smrg 7857880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7858880c7e28Smrg func_basename_result="${1##*/}"]) 7859880c7e28Smrg 7860880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7861880c7e28Smrg case ${1} in 7862880c7e28Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7863880c7e28Smrg * ) func_dirname_result="${3}" ;; 7864880c7e28Smrg esac 7865880c7e28Smrg func_basename_result="${1##*/}"]) 786672313efbSmrg 7867880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7868880c7e28Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7869880c7e28Smrg # positional parameters, so assign one to ordinary parameter first. 7870880c7e28Smrg func_stripname_result=${3} 7871880c7e28Smrg func_stripname_result=${func_stripname_result#"${1}"} 7872880c7e28Smrg func_stripname_result=${func_stripname_result%"${2}"}]) 787372313efbSmrg 7874880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7875880c7e28Smrg func_split_long_opt_name=${1%%=*} 7876880c7e28Smrg func_split_long_opt_arg=${1#*=}]) 78770b661123Smrg 7878880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7879880c7e28Smrg func_split_short_opt_arg=${1#??} 7880880c7e28Smrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 7881bdcaa8d0Smrg 7882880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7883880c7e28Smrg case ${1} in 7884880c7e28Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7885880c7e28Smrg *) func_lo2o_result=${1} ;; 7886880c7e28Smrg esac]) 7887bdcaa8d0Smrg 7888880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 7889bdcaa8d0Smrg 7890880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 7891bdcaa8d0Smrg 7892880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7893880c7e28Smrgfi 7894bdcaa8d0Smrg 7895880c7e28Smrgif test x"$lt_shell_append" = xyes; then 7896880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 7897bdcaa8d0Smrg 7898880c7e28Smrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7899880c7e28Smrg func_quote_for_eval "${2}" 7900880c7e28Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7901880c7e28Smrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 7902bdcaa8d0Smrg 7903880c7e28Smrg # Save a `func_append' function call where possible by direct use of '+=' 7904880c7e28Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7905880c7e28Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7906880c7e28Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7907880c7e28Smrg test 0 -eq $? || _lt_function_replace_fail=: 7908880c7e28Smrgelse 7909880c7e28Smrg # Save a `func_append' function call even when '+=' is not available 7910880c7e28Smrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7911880c7e28Smrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7912880c7e28Smrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7913880c7e28Smrg test 0 -eq $? || _lt_function_replace_fail=: 7914880c7e28Smrgfi 7915bdcaa8d0Smrg 7916880c7e28Smrgif test x"$_lt_function_replace_fail" = x":"; then 7917880c7e28Smrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7918880c7e28Smrgfi 7919880c7e28Smrg]) 7920bdcaa8d0Smrg 7921880c7e28Smrg# _LT_PATH_CONVERSION_FUNCTIONS 7922880c7e28Smrg# ----------------------------- 7923880c7e28Smrg# Determine which file name conversion functions should be used by 7924880c7e28Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7925880c7e28Smrg# for certain cross-compile configurations and native mingw. 7926880c7e28Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7927880c7e28Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7928880c7e28SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7929880c7e28SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7930880c7e28SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7931880c7e28Smrg[case $host in 7932880c7e28Smrg *-*-mingw* ) 7933880c7e28Smrg case $build in 7934880c7e28Smrg *-*-mingw* ) # actually msys 7935880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7936880c7e28Smrg ;; 7937880c7e28Smrg *-*-cygwin* ) 7938880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7939880c7e28Smrg ;; 7940880c7e28Smrg * ) # otherwise, assume *nix 7941880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7942880c7e28Smrg ;; 7943880c7e28Smrg esac 79440b661123Smrg ;; 7945880c7e28Smrg *-*-cygwin* ) 7946880c7e28Smrg case $build in 7947880c7e28Smrg *-*-mingw* ) # actually msys 7948880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7949880c7e28Smrg ;; 7950880c7e28Smrg *-*-cygwin* ) 7951880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7952880c7e28Smrg ;; 7953880c7e28Smrg * ) # otherwise, assume *nix 7954880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7955880c7e28Smrg ;; 7956880c7e28Smrg esac 79570b661123Smrg ;; 7958880c7e28Smrg * ) # unhandled hosts (and "normal" native builds) 7959880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 7960880c7e28Smrg ;; 7961880c7e28Smrgesac 79620b661123Smrg]) 7963880c7e28Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7964880c7e28SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7965880c7e28Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7966880c7e28Smrg [0], [convert $build file names to $host format])dnl 7967880c7e28Smrg 7968880c7e28SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7969880c7e28SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7970880c7e28Smrg[#assume ordinary cross tools, or native build. 7971880c7e28Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 7972880c7e28Smrgcase $host in 7973880c7e28Smrg *-*-mingw* ) 7974880c7e28Smrg case $build in 7975880c7e28Smrg *-*-mingw* ) # actually msys 7976880c7e28Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7977880c7e28Smrg ;; 7978880c7e28Smrg esac 7979880c7e28Smrg ;; 7980880c7e28Smrgesac 7981880c7e28Smrg]) 7982880c7e28Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7983880c7e28SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7984880c7e28Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7985880c7e28Smrg [0], [convert $build files to toolchain format])dnl 7986880c7e28Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 7987bdcaa8d0Smrg 79880b661123Smrg# Helper functions for option handling. -*- Autoconf -*- 79890b661123Smrg# 7990880c7e28Smrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7991880c7e28Smrg# Inc. 79920b661123Smrg# Written by Gary V. Vaughan, 2004 79930b661123Smrg# 79940b661123Smrg# This file is free software; the Free Software Foundation gives 79950b661123Smrg# unlimited permission to copy and/or distribute it, with or without 79960b661123Smrg# modifications, as long as this notice is preserved. 7997bdcaa8d0Smrg 7998880c7e28Smrg# serial 7 ltoptions.m4 7999bdcaa8d0Smrg 80000b661123Smrg# This is to help aclocal find these macros, as it can't see m4_define. 80010b661123SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8002bdcaa8d0Smrg 8003bdcaa8d0Smrg 80040b661123Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 80050b661123Smrg# ------------------------------------------ 80060b661123Smrgm4_define([_LT_MANGLE_OPTION], 80070b661123Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8008bdcaa8d0Smrg 8009bdcaa8d0Smrg 80100b661123Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 80110b661123Smrg# --------------------------------------- 80120b661123Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 80130b661123Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 80140b661123Smrg# saved as a flag. 80150b661123Smrgm4_define([_LT_SET_OPTION], 80160b661123Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 80170b661123Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 80180b661123Smrg _LT_MANGLE_DEFUN([$1], [$2]), 80190b661123Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 80200b661123Smrg]) 80210b661123Smrg 80220b661123Smrg 80230b661123Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 80240b661123Smrg# ------------------------------------------------------------ 80250b661123Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 80260b661123Smrgm4_define([_LT_IF_OPTION], 80270b661123Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 80280b661123Smrg 80290b661123Smrg 80300b661123Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 80310b661123Smrg# ------------------------------------------------------- 80320b661123Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 80330b661123Smrg# are set. 80340b661123Smrgm4_define([_LT_UNLESS_OPTIONS], 80350b661123Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80360b661123Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 80370b661123Smrg [m4_define([$0_found])])])[]dnl 80380b661123Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 80390b661123Smrg])[]dnl 80400b661123Smrg]) 80410b661123Smrg 8042bdcaa8d0Smrg 80430b661123Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 80440b661123Smrg# ---------------------------------------- 80450b661123Smrg# OPTION-LIST is a space-separated list of Libtool options associated 80460b661123Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 80470b661123Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 80480b661123Smrg# the unknown option and exit. 80490b661123Smrgm4_defun([_LT_SET_OPTIONS], 80500b661123Smrg[# Set options 80510b661123Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 80520b661123Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 80530b661123Smrg 80540b661123Smrgm4_if([$1],[LT_INIT],[ 80550b661123Smrg dnl 80560b661123Smrg dnl Simply set some default values (i.e off) if boolean options were not 80570b661123Smrg dnl specified: 80580b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 80590b661123Smrg ]) 80600b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 80610b661123Smrg ]) 80620b661123Smrg dnl 80630b661123Smrg dnl If no reference was made to various pairs of opposing options, then 80640b661123Smrg dnl we run the default mode handler for the pair. For example, if neither 80650b661123Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 80660b661123Smrg dnl archives by default: 80670b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 80680b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 80690b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 80700b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 80710b661123Smrg [_LT_ENABLE_FAST_INSTALL]) 80720b661123Smrg ]) 80730b661123Smrg])# _LT_SET_OPTIONS 8074bdcaa8d0Smrg 8075bdcaa8d0Smrg 8076bdcaa8d0Smrg 80770b661123Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 80780b661123Smrg# ----------------------------------------- 80790b661123Smrgm4_define([_LT_MANGLE_DEFUN], 80800b661123Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8081bdcaa8d0Smrg 8082bdcaa8d0Smrg 80830b661123Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 80840b661123Smrg# ----------------------------------------------- 80850b661123Smrgm4_define([LT_OPTION_DEFINE], 80860b661123Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 80870b661123Smrg])# LT_OPTION_DEFINE 8088bdcaa8d0Smrg 8089bdcaa8d0Smrg 80900b661123Smrg# dlopen 80910b661123Smrg# ------ 80920b661123SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 80930b661123Smrg]) 8094bdcaa8d0Smrg 80950b661123SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 80960b661123Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 80970b661123SmrgAC_DIAGNOSE([obsolete], 80980b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 80990b661123Smrgput the `dlopen' option into LT_INIT's first parameter.]) 81000b661123Smrg]) 8101bdcaa8d0Smrg 81020b661123Smrgdnl aclocal-1.4 backwards compatibility: 81030b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 810472313efbSmrg 8105bdcaa8d0Smrg 81060b661123Smrg# win32-dll 81070b661123Smrg# --------- 81080b661123Smrg# Declare package support for building win32 dll's. 81090b661123SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 81100b661123Smrg[enable_win32_dll=yes 8111bdcaa8d0Smrg 81120b661123Smrgcase $host in 8113880c7e28Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 81140b661123Smrg AC_CHECK_TOOL(AS, as, false) 81150b661123Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 81160b661123Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 81170b661123Smrg ;; 81180b661123Smrgesac 8119bdcaa8d0Smrg 81200b661123Smrgtest -z "$AS" && AS=as 8121880c7e28Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8122bdcaa8d0Smrg 81230b661123Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8124880c7e28Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8125bdcaa8d0Smrg 81260b661123Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8127880c7e28Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 81280b661123Smrg])# win32-dll 8129bdcaa8d0Smrg 81300b661123SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 81310b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 81320b661123Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 81330b661123SmrgAC_DIAGNOSE([obsolete], 81340b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 81350b661123Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 81360b661123Smrg]) 8137bdcaa8d0Smrg 81380b661123Smrgdnl aclocal-1.4 backwards compatibility: 81390b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8140bdcaa8d0Smrg 81410b661123Smrg 81420b661123Smrg# _LT_ENABLE_SHARED([DEFAULT]) 81430b661123Smrg# ---------------------------- 81440b661123Smrg# implement the --enable-shared flag, and supports the `shared' and 81450b661123Smrg# `disable-shared' LT_INIT options. 81460b661123Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 81470b661123Smrgm4_define([_LT_ENABLE_SHARED], 81480b661123Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 81490b661123SmrgAC_ARG_ENABLE([shared], 81500b661123Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 81510b661123Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 81520b661123Smrg [p=${PACKAGE-default} 81530b661123Smrg case $enableval in 81540b661123Smrg yes) enable_shared=yes ;; 81550b661123Smrg no) enable_shared=no ;; 81560b661123Smrg *) 81570b661123Smrg enable_shared=no 81580b661123Smrg # Look at the argument we got. We use all the common list separators. 81590b661123Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 81600b661123Smrg for pkg in $enableval; do 81610b661123Smrg IFS="$lt_save_ifs" 81620b661123Smrg if test "X$pkg" = "X$p"; then 81630b661123Smrg enable_shared=yes 81640b661123Smrg fi 81650b661123Smrg done 81660b661123Smrg IFS="$lt_save_ifs" 816796ce994aSmrg ;; 81680b661123Smrg esac], 81690b661123Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8170bdcaa8d0Smrg 81710b661123Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 81720b661123Smrg [Whether or not to build shared libraries]) 81730b661123Smrg])# _LT_ENABLE_SHARED 8174bdcaa8d0Smrg 81750b661123SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 81760b661123SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8177bdcaa8d0Smrg 81780b661123Smrg# Old names: 81790b661123SmrgAC_DEFUN([AC_ENABLE_SHARED], 81800b661123Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 81810b661123Smrg]) 81820b661123Smrg 81830b661123SmrgAC_DEFUN([AC_DISABLE_SHARED], 81840b661123Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 81850b661123Smrg]) 8186bdcaa8d0Smrg 81870b661123SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 81880b661123SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8189bdcaa8d0Smrg 81900b661123Smrgdnl aclocal-1.4 backwards compatibility: 81910b661123Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 81920b661123Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8193bdcaa8d0Smrg 8194bdcaa8d0Smrg 8195bdcaa8d0Smrg 81960b661123Smrg# _LT_ENABLE_STATIC([DEFAULT]) 81970b661123Smrg# ---------------------------- 81980b661123Smrg# implement the --enable-static flag, and support the `static' and 81990b661123Smrg# `disable-static' LT_INIT options. 82000b661123Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82010b661123Smrgm4_define([_LT_ENABLE_STATIC], 82020b661123Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 82030b661123SmrgAC_ARG_ENABLE([static], 82040b661123Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 82050b661123Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 82060b661123Smrg [p=${PACKAGE-default} 82070b661123Smrg case $enableval in 82080b661123Smrg yes) enable_static=yes ;; 82090b661123Smrg no) enable_static=no ;; 82100b661123Smrg *) 82110b661123Smrg enable_static=no 82120b661123Smrg # Look at the argument we got. We use all the common list separators. 82130b661123Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82140b661123Smrg for pkg in $enableval; do 82150b661123Smrg IFS="$lt_save_ifs" 82160b661123Smrg if test "X$pkg" = "X$p"; then 82170b661123Smrg enable_static=yes 82180b661123Smrg fi 82190b661123Smrg done 82200b661123Smrg IFS="$lt_save_ifs" 8221bdcaa8d0Smrg ;; 82220b661123Smrg esac], 82230b661123Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8224bdcaa8d0Smrg 82250b661123Smrg _LT_DECL([build_old_libs], [enable_static], [0], 82260b661123Smrg [Whether or not to build static libraries]) 82270b661123Smrg])# _LT_ENABLE_STATIC 8228bdcaa8d0Smrg 82290b661123SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 82300b661123SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8231bdcaa8d0Smrg 82320b661123Smrg# Old names: 82330b661123SmrgAC_DEFUN([AC_ENABLE_STATIC], 82340b661123Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 82350b661123Smrg]) 8236bdcaa8d0Smrg 82370b661123SmrgAC_DEFUN([AC_DISABLE_STATIC], 82380b661123Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 82390b661123Smrg]) 8240bdcaa8d0Smrg 82410b661123SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 82420b661123SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8243bdcaa8d0Smrg 82440b661123Smrgdnl aclocal-1.4 backwards compatibility: 82450b661123Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 82460b661123Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8247bdcaa8d0Smrg 8248bdcaa8d0Smrg 8249bdcaa8d0Smrg 82500b661123Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 82510b661123Smrg# ---------------------------------- 82520b661123Smrg# implement the --enable-fast-install flag, and support the `fast-install' 82530b661123Smrg# and `disable-fast-install' LT_INIT options. 82540b661123Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 82550b661123Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 82560b661123Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 82570b661123SmrgAC_ARG_ENABLE([fast-install], 82580b661123Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 82590b661123Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 82600b661123Smrg [p=${PACKAGE-default} 82610b661123Smrg case $enableval in 82620b661123Smrg yes) enable_fast_install=yes ;; 82630b661123Smrg no) enable_fast_install=no ;; 82640b661123Smrg *) 82650b661123Smrg enable_fast_install=no 82660b661123Smrg # Look at the argument we got. We use all the common list separators. 82670b661123Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 82680b661123Smrg for pkg in $enableval; do 82690b661123Smrg IFS="$lt_save_ifs" 82700b661123Smrg if test "X$pkg" = "X$p"; then 82710b661123Smrg enable_fast_install=yes 827272313efbSmrg fi 82730b661123Smrg done 82740b661123Smrg IFS="$lt_save_ifs" 8275bdcaa8d0Smrg ;; 82760b661123Smrg esac], 82770b661123Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8278bdcaa8d0Smrg 82790b661123Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 82800b661123Smrg [Whether or not to optimize for fast installation])dnl 82810b661123Smrg])# _LT_ENABLE_FAST_INSTALL 8282bdcaa8d0Smrg 82830b661123SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 82840b661123SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8285bdcaa8d0Smrg 82860b661123Smrg# Old names: 82870b661123SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 82880b661123Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 82890b661123SmrgAC_DIAGNOSE([obsolete], 82900b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 82910b661123Smrgthe `fast-install' option into LT_INIT's first parameter.]) 82920b661123Smrg]) 8293bdcaa8d0Smrg 82940b661123SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 82950b661123Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 82960b661123SmrgAC_DIAGNOSE([obsolete], 82970b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 82980b661123Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 82990b661123Smrg]) 8300bdcaa8d0Smrg 83010b661123Smrgdnl aclocal-1.4 backwards compatibility: 83020b661123Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 83030b661123Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8304bdcaa8d0Smrg 830572313efbSmrg 83060b661123Smrg# _LT_WITH_PIC([MODE]) 83070b661123Smrg# -------------------- 83080b661123Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 83090b661123Smrg# LT_INIT options. 83100b661123Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 83110b661123Smrgm4_define([_LT_WITH_PIC], 83120b661123Smrg[AC_ARG_WITH([pic], 8313880c7e28Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 83140b661123Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8315880c7e28Smrg [lt_p=${PACKAGE-default} 8316880c7e28Smrg case $withval in 8317880c7e28Smrg yes|no) pic_mode=$withval ;; 8318880c7e28Smrg *) 8319880c7e28Smrg pic_mode=default 8320880c7e28Smrg # Look at the argument we got. We use all the common list separators. 8321880c7e28Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8322880c7e28Smrg for lt_pkg in $withval; do 8323880c7e28Smrg IFS="$lt_save_ifs" 8324880c7e28Smrg if test "X$lt_pkg" = "X$lt_p"; then 8325880c7e28Smrg pic_mode=yes 8326880c7e28Smrg fi 8327880c7e28Smrg done 8328880c7e28Smrg IFS="$lt_save_ifs" 8329880c7e28Smrg ;; 8330880c7e28Smrg esac], 83310b661123Smrg [pic_mode=default]) 833272313efbSmrg 83330b661123Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 833472313efbSmrg 83350b661123Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 83360b661123Smrg])# _LT_WITH_PIC 833772313efbSmrg 83380b661123SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 83390b661123SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 83400b661123Smrg 83410b661123Smrg# Old name: 83420b661123SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 83430b661123Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 83440b661123SmrgAC_DIAGNOSE([obsolete], 83450b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 83460b661123Smrgput the `pic-only' option into LT_INIT's first parameter.]) 834772313efbSmrg]) 8348bdcaa8d0Smrg 83490b661123Smrgdnl aclocal-1.4 backwards compatibility: 83500b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 83510b661123Smrg 83520b661123Smrg 83530b661123Smrgm4_define([_LTDL_MODE], []) 83540b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 83550b661123Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 83560b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 83570b661123Smrg [m4_define([_LTDL_MODE], [recursive])]) 83580b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 83590b661123Smrg [m4_define([_LTDL_MODE], [subproject])]) 83600b661123Smrg 83610b661123Smrgm4_define([_LTDL_TYPE], []) 83620b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 83630b661123Smrg [m4_define([_LTDL_TYPE], [installable])]) 83640b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 83650b661123Smrg [m4_define([_LTDL_TYPE], [convenience])]) 83660b661123Smrg 83670b661123Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 836896ce994aSmrg# 83690b661123Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 83700b661123Smrg# Written by Gary V. Vaughan, 2004 837196ce994aSmrg# 83720b661123Smrg# This file is free software; the Free Software Foundation gives 83730b661123Smrg# unlimited permission to copy and/or distribute it, with or without 83740b661123Smrg# modifications, as long as this notice is preserved. 8375bdcaa8d0Smrg 83760b661123Smrg# serial 6 ltsugar.m4 837772313efbSmrg 83780b661123Smrg# This is to help aclocal find these macros, as it can't see m4_define. 83790b661123SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 838072313efbSmrg 838172313efbSmrg 83820b661123Smrg# lt_join(SEP, ARG1, [ARG2...]) 83830b661123Smrg# ----------------------------- 83840b661123Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 83850b661123Smrg# associated separator. 83860b661123Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 83870b661123Smrg# versions in m4sugar had bugs. 83880b661123Smrgm4_define([lt_join], 83890b661123Smrg[m4_if([$#], [1], [], 83900b661123Smrg [$#], [2], [[$2]], 83910b661123Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 83920b661123Smrgm4_define([_lt_join], 83930b661123Smrg[m4_if([$#$2], [2], [], 83940b661123Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 83950b661123Smrg 83960b661123Smrg 83970b661123Smrg# lt_car(LIST) 83980b661123Smrg# lt_cdr(LIST) 83990b661123Smrg# ------------ 84000b661123Smrg# Manipulate m4 lists. 84010b661123Smrg# These macros are necessary as long as will still need to support 84020b661123Smrg# Autoconf-2.59 which quotes differently. 84030b661123Smrgm4_define([lt_car], [[$1]]) 84040b661123Smrgm4_define([lt_cdr], 84050b661123Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 84060b661123Smrg [$#], 1, [], 84070b661123Smrg [m4_dquote(m4_shift($@))])]) 84080b661123Smrgm4_define([lt_unquote], $1) 84090b661123Smrg 84100b661123Smrg 84110b661123Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 84120b661123Smrg# ------------------------------------------ 84130b661123Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 84140b661123Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 84150b661123Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 84160b661123Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 84170b661123Smrg# than defined and empty). 84180b661123Smrg# 84190b661123Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 84200b661123Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 84210b661123Smrgm4_define([lt_append], 84220b661123Smrg[m4_define([$1], 84230b661123Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 84240b661123Smrg 84250b661123Smrg 84260b661123Smrg 84270b661123Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 84280b661123Smrg# ---------------------------------------------------------- 84290b661123Smrg# Produce a SEP delimited list of all paired combinations of elements of 84300b661123Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 84310b661123Smrg# has the form PREFIXmINFIXSUFFIXn. 84320b661123Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 84330b661123Smrgm4_define([lt_combine], 84340b661123Smrg[m4_if(m4_eval([$# > 3]), [1], 84350b661123Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 84360b661123Smrg[[m4_foreach([_Lt_prefix], [$2], 84370b661123Smrg [m4_foreach([_Lt_suffix], 84380b661123Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 84390b661123Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 84400b661123Smrg 84410b661123Smrg 84420b661123Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 84430b661123Smrg# ----------------------------------------------------------------------- 84440b661123Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 84450b661123Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 84460b661123Smrgm4_define([lt_if_append_uniq], 84470b661123Smrg[m4_ifdef([$1], 84480b661123Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 84490b661123Smrg [lt_append([$1], [$2], [$3])$4], 84500b661123Smrg [$5])], 84510b661123Smrg [lt_append([$1], [$2], [$3])$4])]) 84520b661123Smrg 84530b661123Smrg 84540b661123Smrg# lt_dict_add(DICT, KEY, VALUE) 84550b661123Smrg# ----------------------------- 84560b661123Smrgm4_define([lt_dict_add], 84570b661123Smrg[m4_define([$1($2)], [$3])]) 8458bdcaa8d0Smrg 8459bdcaa8d0Smrg 84600b661123Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 84610b661123Smrg# -------------------------------------------- 84620b661123Smrgm4_define([lt_dict_add_subkey], 84630b661123Smrg[m4_define([$1($2:$3)], [$4])]) 8464bdcaa8d0Smrg 8465bdcaa8d0Smrg 84660b661123Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 84670b661123Smrg# ---------------------------------- 84680b661123Smrgm4_define([lt_dict_fetch], 84690b661123Smrg[m4_ifval([$3], 84700b661123Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 84710b661123Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 84720b661123Smrg 8473bdcaa8d0Smrg 84740b661123Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 84750b661123Smrg# ----------------------------------------------------------------- 84760b661123Smrgm4_define([lt_if_dict_fetch], 84770b661123Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 84780b661123Smrg [$5], 84790b661123Smrg [$6])]) 84800b661123Smrg 84810b661123Smrg 84820b661123Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 84830b661123Smrg# -------------------------------------------------------------- 84840b661123Smrgm4_define([lt_dict_filter], 84850b661123Smrg[m4_if([$5], [], [], 84860b661123Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 84870b661123Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 84880b661123Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8489bdcaa8d0Smrg]) 849072313efbSmrg 84910b661123Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 84920b661123Smrg# 84930b661123Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 84940b661123Smrg# Written by Scott James Remnant, 2004 84950b661123Smrg# 84960b661123Smrg# This file is free software; the Free Software Foundation gives 84970b661123Smrg# unlimited permission to copy and/or distribute it, with or without 84980b661123Smrg# modifications, as long as this notice is preserved. 849972313efbSmrg 8500880c7e28Smrg# @configure_input@ 850172313efbSmrg 8502880c7e28Smrg# serial 3337 ltversion.m4 85030b661123Smrg# This file is part of GNU Libtool 850472313efbSmrg 8505880c7e28Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 8506880c7e28Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 850772313efbSmrg 85080b661123SmrgAC_DEFUN([LTVERSION_VERSION], 8509880c7e28Smrg[macro_version='2.4.2' 8510880c7e28Smrgmacro_revision='1.3337' 85110b661123Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 85120b661123Smrg_LT_DECL(, macro_revision, 0) 8513bdcaa8d0Smrg]) 851472313efbSmrg 85150b661123Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 85160b661123Smrg# 8517880c7e28Smrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 85180b661123Smrg# Written by Scott James Remnant, 2004. 85190b661123Smrg# 85200b661123Smrg# This file is free software; the Free Software Foundation gives 85210b661123Smrg# unlimited permission to copy and/or distribute it, with or without 85220b661123Smrg# modifications, as long as this notice is preserved. 85230b661123Smrg 8524880c7e28Smrg# serial 5 lt~obsolete.m4 85250b661123Smrg 85260b661123Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 85270b661123Smrg# 85280b661123Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 85290b661123Smrg# which have later been changed to m4_define as they aren't part of the 85300b661123Smrg# exported API, or moved to Autoconf or Automake where they belong. 85310b661123Smrg# 85320b661123Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 85330b661123Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 85340b661123Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 85350b661123Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 85360b661123Smrg# and doesn't know about Autoconf macros at all.) 85370b661123Smrg# 85380b661123Smrg# So we provide this file, which has a silly filename so it's always 85390b661123Smrg# included after everything else. This provides aclocal with the 85400b661123Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 85410b661123Smrg# because those macros already exist, or will be overwritten later. 85420b661123Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 85430b661123Smrg# 85440b661123Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 85450b661123Smrg# Yes, that means every name once taken will need to remain here until 85460b661123Smrg# we give up compatibility with versions before 1.7, at which point 85470b661123Smrg# we need to keep only those names which we still refer to. 85480b661123Smrg 85490b661123Smrg# This is to help aclocal find these macros, as it can't see m4_define. 85500b661123SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 85510b661123Smrg 85520b661123Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 85530b661123Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 85540b661123Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 85550b661123Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 85560b661123Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 85570b661123Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 85580b661123Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 85590b661123Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 85600b661123Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 85610b661123Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 85620b661123Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 85630b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 85640b661123Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 85650b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 85660b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 85670b661123Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 85680b661123Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 85690b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 85700b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 85710b661123Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 85720b661123Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 85730b661123Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 85740b661123Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 85750b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 85760b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 85770b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 85780b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 85790b661123Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 85800b661123Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 85810b661123Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 85820b661123Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 85830b661123Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 85840b661123Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 85850b661123Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 85860b661123Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 85870b661123Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 85880b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 85890b661123Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 85900b661123Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 85910b661123Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 85920b661123Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 85930b661123Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 85940b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 85950b661123Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 85960b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 85970b661123Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 85980b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 85990b661123Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 86000b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 86010b661123Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 86020b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 86030b661123Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 86040b661123Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 86050b661123Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8606880c7e28Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8607880c7e28Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8608880c7e28Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8609880c7e28Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8610880c7e28Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8611880c7e28Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8612880c7e28Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 86130b661123Smrg 8614bdcaa8d0Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8615880c7e28Smrg# serial 1 (pkg-config-0.24) 8616bdcaa8d0Smrg# 8617bdcaa8d0Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 8618bdcaa8d0Smrg# 8619bdcaa8d0Smrg# This program is free software; you can redistribute it and/or modify 8620bdcaa8d0Smrg# it under the terms of the GNU General Public License as published by 8621bdcaa8d0Smrg# the Free Software Foundation; either version 2 of the License, or 8622bdcaa8d0Smrg# (at your option) any later version. 8623bdcaa8d0Smrg# 8624bdcaa8d0Smrg# This program is distributed in the hope that it will be useful, but 8625bdcaa8d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 8626bdcaa8d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 8627bdcaa8d0Smrg# General Public License for more details. 8628bdcaa8d0Smrg# 8629bdcaa8d0Smrg# You should have received a copy of the GNU General Public License 8630bdcaa8d0Smrg# along with this program; if not, write to the Free Software 8631bdcaa8d0Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 8632bdcaa8d0Smrg# 8633bdcaa8d0Smrg# As a special exception to the GNU General Public License, if you 8634bdcaa8d0Smrg# distribute this file as part of a program that contains a 8635bdcaa8d0Smrg# configuration script generated by Autoconf, you may include it under 8636bdcaa8d0Smrg# the same distribution terms that you use for the rest of that program. 8637bdcaa8d0Smrg 8638bdcaa8d0Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 8639bdcaa8d0Smrg# ---------------------------------- 8640bdcaa8d0SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 8641bdcaa8d0Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 8642bdcaa8d0Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8643880c7e28SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8644880c7e28SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8645880c7e28SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8646880c7e28Smrg 8647bdcaa8d0Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8648bdcaa8d0Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8649bdcaa8d0Smrgfi 8650bdcaa8d0Smrgif test -n "$PKG_CONFIG"; then 8651bdcaa8d0Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 8652bdcaa8d0Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8653bdcaa8d0Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8654bdcaa8d0Smrg AC_MSG_RESULT([yes]) 8655bdcaa8d0Smrg else 8656bdcaa8d0Smrg AC_MSG_RESULT([no]) 8657bdcaa8d0Smrg PKG_CONFIG="" 8658bdcaa8d0Smrg fi 8659bdcaa8d0Smrgfi[]dnl 8660bdcaa8d0Smrg])# PKG_PROG_PKG_CONFIG 8661bdcaa8d0Smrg 8662bdcaa8d0Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8663bdcaa8d0Smrg# 8664bdcaa8d0Smrg# Check to see whether a particular set of modules exists. Similar 8665bdcaa8d0Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8666bdcaa8d0Smrg# 8667880c7e28Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8668880c7e28Smrg# only at the first occurence in configure.ac, so if the first place 8669880c7e28Smrg# it's called might be skipped (such as if it is within an "if", you 8670880c7e28Smrg# have to call PKG_CHECK_EXISTS manually 8671bdcaa8d0Smrg# -------------------------------------------------------------- 8672bdcaa8d0SmrgAC_DEFUN([PKG_CHECK_EXISTS], 8673bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8674bdcaa8d0Smrgif test -n "$PKG_CONFIG" && \ 8675bdcaa8d0Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8676880c7e28Smrg m4_default([$2], [:]) 8677bdcaa8d0Smrgm4_ifvaln([$3], [else 8678bdcaa8d0Smrg $3])dnl 8679bdcaa8d0Smrgfi]) 8680bdcaa8d0Smrg 8681bdcaa8d0Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8682bdcaa8d0Smrg# --------------------------------------------- 8683bdcaa8d0Smrgm4_define([_PKG_CONFIG], 868472313efbSmrg[if test -n "$$1"; then 868572313efbSmrg pkg_cv_[]$1="$$1" 868672313efbSmrg elif test -n "$PKG_CONFIG"; then 868772313efbSmrg PKG_CHECK_EXISTS([$3], 868872313efbSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 868972313efbSmrg [pkg_failed=yes]) 869072313efbSmrg else 869172313efbSmrg pkg_failed=untried 8692bdcaa8d0Smrgfi[]dnl 8693bdcaa8d0Smrg])# _PKG_CONFIG 8694bdcaa8d0Smrg 8695bdcaa8d0Smrg# _PKG_SHORT_ERRORS_SUPPORTED 8696bdcaa8d0Smrg# ----------------------------- 8697bdcaa8d0SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8698bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8699bdcaa8d0Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8700bdcaa8d0Smrg _pkg_short_errors_supported=yes 8701bdcaa8d0Smrgelse 8702bdcaa8d0Smrg _pkg_short_errors_supported=no 8703bdcaa8d0Smrgfi[]dnl 8704bdcaa8d0Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 8705bdcaa8d0Smrg 8706bdcaa8d0Smrg 8707bdcaa8d0Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8708bdcaa8d0Smrg# [ACTION-IF-NOT-FOUND]) 8709bdcaa8d0Smrg# 8710bdcaa8d0Smrg# 8711bdcaa8d0Smrg# Note that if there is a possibility the first call to 8712bdcaa8d0Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8713bdcaa8d0Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8714bdcaa8d0Smrg# 8715bdcaa8d0Smrg# 8716bdcaa8d0Smrg# -------------------------------------------------------------- 8717bdcaa8d0SmrgAC_DEFUN([PKG_CHECK_MODULES], 8718bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8719bdcaa8d0SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8720bdcaa8d0SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8721bdcaa8d0Smrg 8722bdcaa8d0Smrgpkg_failed=no 8723bdcaa8d0SmrgAC_MSG_CHECKING([for $1]) 8724bdcaa8d0Smrg 8725bdcaa8d0Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8726bdcaa8d0Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8727bdcaa8d0Smrg 8728bdcaa8d0Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8729bdcaa8d0Smrgand $1[]_LIBS to avoid the need to call pkg-config. 8730bdcaa8d0SmrgSee the pkg-config man page for more details.]) 8731bdcaa8d0Smrg 8732bdcaa8d0Smrgif test $pkg_failed = yes; then 8733880c7e28Smrg AC_MSG_RESULT([no]) 8734bdcaa8d0Smrg _PKG_SHORT_ERRORS_SUPPORTED 8735bdcaa8d0Smrg if test $_pkg_short_errors_supported = yes; then 873672313efbSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8737bdcaa8d0Smrg else 873872313efbSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8739bdcaa8d0Smrg fi 8740bdcaa8d0Smrg # Put the nasty error message in config.log where it belongs 8741bdcaa8d0Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8742bdcaa8d0Smrg 8743880c7e28Smrg m4_default([$4], [AC_MSG_ERROR( 8744bdcaa8d0Smrg[Package requirements ($2) were not met: 8745bdcaa8d0Smrg 8746bdcaa8d0Smrg$$1_PKG_ERRORS 8747bdcaa8d0Smrg 8748bdcaa8d0SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8749bdcaa8d0Smrginstalled software in a non-standard prefix. 8750bdcaa8d0Smrg 8751880c7e28Smrg_PKG_TEXT]) 8752880c7e28Smrg ]) 8753bdcaa8d0Smrgelif test $pkg_failed = untried; then 8754880c7e28Smrg AC_MSG_RESULT([no]) 8755880c7e28Smrg m4_default([$4], [AC_MSG_FAILURE( 8756bdcaa8d0Smrg[The pkg-config script could not be found or is too old. Make sure it 8757bdcaa8d0Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 8758bdcaa8d0Smrgpath to pkg-config. 8759bdcaa8d0Smrg 8760bdcaa8d0Smrg_PKG_TEXT 8761bdcaa8d0Smrg 8762880c7e28SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 8763880c7e28Smrg ]) 8764bdcaa8d0Smrgelse 8765bdcaa8d0Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8766bdcaa8d0Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8767bdcaa8d0Smrg AC_MSG_RESULT([yes]) 8768880c7e28Smrg $3 8769bdcaa8d0Smrgfi[]dnl 8770bdcaa8d0Smrg])# PKG_CHECK_MODULES 8771bdcaa8d0Smrg 877272313efbSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 8773bdcaa8d0Smrgdnl 8774880c7e28Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 8775bdcaa8d0Smrgdnl 8776bdcaa8d0Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 87770b661123Smrgdnl copy of this software and associated documentation files (the "Software"), 87780b661123Smrgdnl to deal in the Software without restriction, including without limitation 87790b661123Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 87800b661123Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 87810b661123Smrgdnl Software is furnished to do so, subject to the following conditions: 8782bdcaa8d0Smrgdnl 87830b661123Smrgdnl The above copyright notice and this permission notice (including the next 87840b661123Smrgdnl paragraph) shall be included in all copies or substantial portions of the 87850b661123Smrgdnl Software. 8786bdcaa8d0Smrgdnl 87870b661123Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 87880b661123Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 87890b661123Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 87900b661123Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 87910b661123Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 87920b661123Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 87930b661123Smrgdnl DEALINGS IN THE SOFTWARE. 8794bdcaa8d0Smrg 8795bdcaa8d0Smrg# XORG_MACROS_VERSION(required-version) 8796bdcaa8d0Smrg# ------------------------------------- 8797bdcaa8d0Smrg# Minimum version: 1.1.0 8798bdcaa8d0Smrg# 8799bdcaa8d0Smrg# If you're using a macro added in Version 1.1 or newer, include this in 8800bdcaa8d0Smrg# your configure.ac with the minimum required version, such as: 8801bdcaa8d0Smrg# XORG_MACROS_VERSION(1.1) 8802bdcaa8d0Smrg# 88030b661123Smrg# To ensure that this macro is defined, also add: 88040b661123Smrg# m4_ifndef([XORG_MACROS_VERSION], 88050b661123Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8806bdcaa8d0Smrg# 8807bdcaa8d0Smrg# 8808bdcaa8d0Smrg# See the "minimum version" comment for each macro you use to see what 8809bdcaa8d0Smrg# version you require. 88100b661123Smrgm4_defun([XORG_MACROS_VERSION],[ 8811880c7e28Smrgm4_define([vers_have], [1.17]) 88120b661123Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 88130b661123Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 88140b661123Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 88150b661123Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 88160b661123Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 88170b661123Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 88180b661123Smrgm4_undefine([vers_have]) 88190b661123Smrgm4_undefine([maj_have]) 88200b661123Smrgm4_undefine([maj_needed]) 8821bdcaa8d0Smrg]) # XORG_MACROS_VERSION 8822bdcaa8d0Smrg 8823bdcaa8d0Smrg# XORG_PROG_RAWCPP() 8824bdcaa8d0Smrg# ------------------ 8825bdcaa8d0Smrg# Minimum version: 1.0.0 8826bdcaa8d0Smrg# 8827bdcaa8d0Smrg# Find cpp program and necessary flags for use in pre-processing text files 8828bdcaa8d0Smrg# such as man pages and config files 8829bdcaa8d0SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 8830bdcaa8d0SmrgAC_REQUIRE([AC_PROG_CPP]) 8831bdcaa8d0SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8832bdcaa8d0Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8833bdcaa8d0Smrg 8834bdcaa8d0Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 8835bdcaa8d0Smrg# which is not the best choice for supporting other OS'es, but covers most 8836bdcaa8d0Smrg# of the ones we need for now. 8837bdcaa8d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8838880c7e28SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 8839bdcaa8d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8840bdcaa8d0Smrg AC_MSG_RESULT([no]) 8841bdcaa8d0Smrgelse 8842bdcaa8d0Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8843bdcaa8d0Smrg RAWCPPFLAGS=-undef 8844bdcaa8d0Smrg AC_MSG_RESULT([yes]) 884572313efbSmrg # under Cygwin unix is still defined even with -undef 884672313efbSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 884772313efbSmrg RAWCPPFLAGS="-undef -ansi" 884872313efbSmrg AC_MSG_RESULT([yes, with -ansi]) 8849bdcaa8d0Smrg else 8850bdcaa8d0Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8851bdcaa8d0Smrg fi 8852bdcaa8d0Smrgfi 8853bdcaa8d0Smrgrm -f conftest.$ac_ext 8854bdcaa8d0Smrg 8855bdcaa8d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8856880c7e28SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 8857bdcaa8d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8858bdcaa8d0Smrg AC_MSG_RESULT([no]) 8859bdcaa8d0Smrgelse 8860bdcaa8d0Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8861bdcaa8d0Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8862bdcaa8d0Smrg AC_MSG_RESULT([yes]) 8863bdcaa8d0Smrg else 8864bdcaa8d0Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8865bdcaa8d0Smrg fi 8866bdcaa8d0Smrgfi 8867bdcaa8d0Smrgrm -f conftest.$ac_ext 8868bdcaa8d0SmrgAC_SUBST(RAWCPPFLAGS) 8869bdcaa8d0Smrg]) # XORG_PROG_RAWCPP 8870bdcaa8d0Smrg 8871bdcaa8d0Smrg# XORG_MANPAGE_SECTIONS() 8872bdcaa8d0Smrg# ----------------------- 8873bdcaa8d0Smrg# Minimum version: 1.0.0 8874bdcaa8d0Smrg# 8875bdcaa8d0Smrg# Determine which sections man pages go in for the different man page types 8876bdcaa8d0Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8877bdcaa8d0Smrg# Not sure if there's any better way than just hardcoding by OS name. 8878bdcaa8d0Smrg# Override default settings by setting environment variables 88790b661123Smrg# Added MAN_SUBSTS in version 1.8 88800b661123Smrg# Added AC_PROG_SED in version 1.8 8881bdcaa8d0Smrg 8882bdcaa8d0SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8883bdcaa8d0SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 88840b661123SmrgAC_REQUIRE([AC_PROG_SED]) 8885bdcaa8d0Smrg 8886bdcaa8d0Smrgif test x$APP_MAN_SUFFIX = x ; then 8887bdcaa8d0Smrg APP_MAN_SUFFIX=1 8888bdcaa8d0Smrgfi 8889bdcaa8d0Smrgif test x$APP_MAN_DIR = x ; then 8890bdcaa8d0Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8891bdcaa8d0Smrgfi 8892bdcaa8d0Smrg 8893bdcaa8d0Smrgif test x$LIB_MAN_SUFFIX = x ; then 8894bdcaa8d0Smrg LIB_MAN_SUFFIX=3 8895bdcaa8d0Smrgfi 8896bdcaa8d0Smrgif test x$LIB_MAN_DIR = x ; then 8897bdcaa8d0Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8898bdcaa8d0Smrgfi 8899bdcaa8d0Smrg 8900bdcaa8d0Smrgif test x$FILE_MAN_SUFFIX = x ; then 8901bdcaa8d0Smrg case $host_os in 8902bdcaa8d0Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 8903bdcaa8d0Smrg *) FILE_MAN_SUFFIX=5 ;; 8904bdcaa8d0Smrg esac 8905bdcaa8d0Smrgfi 8906bdcaa8d0Smrgif test x$FILE_MAN_DIR = x ; then 8907bdcaa8d0Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8908bdcaa8d0Smrgfi 8909bdcaa8d0Smrg 8910bdcaa8d0Smrgif test x$MISC_MAN_SUFFIX = x ; then 8911bdcaa8d0Smrg case $host_os in 8912bdcaa8d0Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 8913bdcaa8d0Smrg *) MISC_MAN_SUFFIX=7 ;; 8914bdcaa8d0Smrg esac 8915bdcaa8d0Smrgfi 8916bdcaa8d0Smrgif test x$MISC_MAN_DIR = x ; then 8917bdcaa8d0Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8918bdcaa8d0Smrgfi 8919bdcaa8d0Smrg 8920bdcaa8d0Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 8921bdcaa8d0Smrg case $host_os in 8922bdcaa8d0Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 8923bdcaa8d0Smrg *) DRIVER_MAN_SUFFIX=4 ;; 8924bdcaa8d0Smrg esac 8925bdcaa8d0Smrgfi 8926bdcaa8d0Smrgif test x$DRIVER_MAN_DIR = x ; then 8927bdcaa8d0Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8928bdcaa8d0Smrgfi 8929bdcaa8d0Smrg 8930bdcaa8d0Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 8931bdcaa8d0Smrg case $host_os in 8932bdcaa8d0Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 8933bdcaa8d0Smrg *) ADMIN_MAN_SUFFIX=8 ;; 8934bdcaa8d0Smrg esac 8935bdcaa8d0Smrgfi 8936bdcaa8d0Smrgif test x$ADMIN_MAN_DIR = x ; then 8937bdcaa8d0Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 8938bdcaa8d0Smrgfi 8939bdcaa8d0Smrg 8940bdcaa8d0Smrg 8941bdcaa8d0SmrgAC_SUBST([APP_MAN_SUFFIX]) 8942bdcaa8d0SmrgAC_SUBST([LIB_MAN_SUFFIX]) 8943bdcaa8d0SmrgAC_SUBST([FILE_MAN_SUFFIX]) 8944bdcaa8d0SmrgAC_SUBST([MISC_MAN_SUFFIX]) 8945bdcaa8d0SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 8946bdcaa8d0SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 8947bdcaa8d0SmrgAC_SUBST([APP_MAN_DIR]) 8948bdcaa8d0SmrgAC_SUBST([LIB_MAN_DIR]) 8949bdcaa8d0SmrgAC_SUBST([FILE_MAN_DIR]) 8950bdcaa8d0SmrgAC_SUBST([MISC_MAN_DIR]) 8951bdcaa8d0SmrgAC_SUBST([DRIVER_MAN_DIR]) 8952bdcaa8d0SmrgAC_SUBST([ADMIN_MAN_DIR]) 89530b661123Smrg 89540b661123SmrgXORG_MAN_PAGE="X Version 11" 89550b661123SmrgAC_SUBST([XORG_MAN_PAGE]) 89560b661123SmrgMAN_SUBSTS="\ 89570b661123Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 89580b661123Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 89590b661123Smrg -e 's|__xservername__|Xorg|g' \ 89600b661123Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 89610b661123Smrg -e 's|__projectroot__|\$(prefix)|g' \ 8962880c7e28Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 89630b661123Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 89640b661123Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 89650b661123Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 89660b661123Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 89670b661123Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 89680b661123Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 89690b661123SmrgAC_SUBST([MAN_SUBSTS]) 89700b661123Smrg 8971bdcaa8d0Smrg]) # XORG_MANPAGE_SECTIONS 8972bdcaa8d0Smrg 89730b661123Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 89740b661123Smrg# ------------------------ 89750b661123Smrg# Minimum version: 1.7.0 89760b661123Smrg# 89770b661123Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 89780b661123Smrg# provided by xorg-sgml-doctools, if installed. 89790b661123SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 89800b661123SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 89810b661123SmrgXORG_SGML_PATH= 89820b661123SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 89830b661123Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 89840b661123Smrg [m4_ifval([$1],[:], 89850b661123Smrg [if test x"$cross_compiling" != x"yes" ; then 89860b661123Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 89870b661123Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 89880b661123Smrg fi]) 89890b661123Smrg ]) 89900b661123Smrg 8991880c7e28Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 8992880c7e28Smrg# the path and the name of the doc stylesheet 89930b661123Smrgif test "x$XORG_SGML_PATH" != "x" ; then 89940b661123Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 8995880c7e28Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 8996880c7e28Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 89970b661123Smrgelse 89980b661123Smrg AC_MSG_RESULT([no]) 89990b661123Smrgfi 90000b661123Smrg 90010b661123SmrgAC_SUBST(XORG_SGML_PATH) 9002880c7e28SmrgAC_SUBST(STYLESHEET_SRCDIR) 9003880c7e28SmrgAC_SUBST(XSL_STYLESHEET) 9004880c7e28SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 90050b661123Smrg]) # XORG_CHECK_SGML_DOCTOOLS 90060b661123Smrg 9007bdcaa8d0Smrg# XORG_CHECK_LINUXDOC 9008bdcaa8d0Smrg# ------------------- 9009bdcaa8d0Smrg# Minimum version: 1.0.0 9010bdcaa8d0Smrg# 9011bdcaa8d0Smrg# Defines the variable MAKE_TEXT if the necessary tools and 9012bdcaa8d0Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9013bdcaa8d0Smrg# Whether or not the necessary tools and files are found can be checked 9014bdcaa8d0Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9015bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 90160b661123SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 90170b661123SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9018bdcaa8d0Smrg 9019bdcaa8d0SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9020bdcaa8d0Smrg 90210b661123SmrgAC_MSG_CHECKING([whether to build documentation]) 9022bdcaa8d0Smrg 90230b661123Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9024bdcaa8d0Smrg BUILDDOC=yes 9025bdcaa8d0Smrgelse 9026bdcaa8d0Smrg BUILDDOC=no 9027bdcaa8d0Smrgfi 9028bdcaa8d0Smrg 9029bdcaa8d0SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9030bdcaa8d0Smrg 9031bdcaa8d0SmrgAC_MSG_RESULT([$BUILDDOC]) 9032bdcaa8d0Smrg 90330b661123SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9034bdcaa8d0Smrg 90350b661123Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9036bdcaa8d0Smrg BUILDPDFDOC=yes 9037bdcaa8d0Smrgelse 9038bdcaa8d0Smrg BUILDPDFDOC=no 9039bdcaa8d0Smrgfi 9040bdcaa8d0Smrg 9041bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9042bdcaa8d0Smrg 9043bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9044bdcaa8d0Smrg 90450b661123SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9046bdcaa8d0SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9047bdcaa8d0SmrgMAKE_PDF="$PS2PDF" 9048bdcaa8d0SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9049bdcaa8d0Smrg 9050bdcaa8d0SmrgAC_SUBST(MAKE_TEXT) 9051bdcaa8d0SmrgAC_SUBST(MAKE_PS) 9052bdcaa8d0SmrgAC_SUBST(MAKE_PDF) 9053bdcaa8d0SmrgAC_SUBST(MAKE_HTML) 9054bdcaa8d0Smrg]) # XORG_CHECK_LINUXDOC 9055bdcaa8d0Smrg 9056bdcaa8d0Smrg# XORG_CHECK_DOCBOOK 9057bdcaa8d0Smrg# ------------------- 9058bdcaa8d0Smrg# Minimum version: 1.0.0 9059bdcaa8d0Smrg# 9060bdcaa8d0Smrg# Checks for the ability to build output formats from SGML DocBook source. 9061bdcaa8d0Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9062bdcaa8d0Smrg# indicates whether the necessary tools and files are found and, if set, 9063bdcaa8d0Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9064bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 90650b661123SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 90660b661123Smrg 9067bdcaa8d0SmrgBUILDTXTDOC=no 9068bdcaa8d0SmrgBUILDPDFDOC=no 9069bdcaa8d0SmrgBUILDPSDOC=no 9070bdcaa8d0SmrgBUILDHTMLDOC=no 9071bdcaa8d0Smrg 9072bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9073bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9074bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9075bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9076bdcaa8d0Smrg 90770b661123SmrgAC_MSG_CHECKING([whether to build text documentation]) 90780b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9079bdcaa8d0Smrg test x$BUILD_TXTDOC != xno; then 9080bdcaa8d0Smrg BUILDTXTDOC=yes 9081bdcaa8d0Smrgfi 9082bdcaa8d0SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9083bdcaa8d0SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9084bdcaa8d0Smrg 90850b661123SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 90860b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9087bdcaa8d0Smrg test x$BUILD_PDFDOC != xno; then 9088bdcaa8d0Smrg BUILDPDFDOC=yes 9089bdcaa8d0Smrgfi 9090bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9091bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9092bdcaa8d0Smrg 90930b661123SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 90940b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9095bdcaa8d0Smrg test x$BUILD_PSDOC != xno; then 9096bdcaa8d0Smrg BUILDPSDOC=yes 9097bdcaa8d0Smrgfi 9098bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9099bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9100bdcaa8d0Smrg 91010b661123SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 91020b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9103bdcaa8d0Smrg test x$BUILD_HTMLDOC != xno; then 9104bdcaa8d0Smrg BUILDHTMLDOC=yes 9105bdcaa8d0Smrgfi 9106bdcaa8d0SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9107bdcaa8d0SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9108bdcaa8d0Smrg 9109bdcaa8d0SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9110bdcaa8d0SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9111bdcaa8d0SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9112bdcaa8d0SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9113bdcaa8d0Smrg 9114bdcaa8d0SmrgAC_SUBST(MAKE_TEXT) 9115bdcaa8d0SmrgAC_SUBST(MAKE_PS) 9116bdcaa8d0SmrgAC_SUBST(MAKE_PDF) 9117bdcaa8d0SmrgAC_SUBST(MAKE_HTML) 9118bdcaa8d0Smrg]) # XORG_CHECK_DOCBOOK 9119bdcaa8d0Smrg 9120880c7e28Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 91210b661123Smrg# ---------------- 91220b661123Smrg# Minimum version: 1.5.0 9123880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 91240b661123Smrg# 91250b661123Smrg# Documentation tools are not always available on all platforms and sometimes 91260b661123Smrg# not at the appropriate level. This macro enables a module to test for the 91270b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 91280b661123Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9129880c7e28Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9130880c7e28Smrg# --with-xmlto assumes 'auto'. 91310b661123Smrg# 91320b661123Smrg# Interface to module: 91330b661123Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 91340b661123Smrg# XMLTO: returns the path of the xmlto program found 91350b661123Smrg# returns the path set by the user in the environment 91360b661123Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 91370b661123Smrg# 'no' user instructs the module not to use xmlto 91380b661123Smrg# 9139880c7e28Smrg# Added in version 1.10.0 9140880c7e28Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9141880c7e28Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9142880c7e28Smrg# 91430b661123Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 91440b661123Smrg# 91450b661123SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 91460b661123SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9147880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 91480b661123SmrgAC_ARG_WITH(xmlto, 91490b661123Smrg AS_HELP_STRING([--with-xmlto], 9150880c7e28Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9151880c7e28Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9152880c7e28Smrgm4_undefine([_defopt]) 91530b661123Smrg 91540b661123Smrgif test "x$use_xmlto" = x"auto"; then 91550b661123Smrg AC_PATH_PROG([XMLTO], [xmlto]) 91560b661123Smrg if test "x$XMLTO" = "x"; then 91570b661123Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 91580b661123Smrg have_xmlto=no 91590b661123Smrg else 91600b661123Smrg have_xmlto=yes 91610b661123Smrg fi 91620b661123Smrgelif test "x$use_xmlto" = x"yes" ; then 91630b661123Smrg AC_PATH_PROG([XMLTO], [xmlto]) 91640b661123Smrg if test "x$XMLTO" = "x"; then 91650b661123Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 91660b661123Smrg fi 91670b661123Smrg have_xmlto=yes 91680b661123Smrgelif test "x$use_xmlto" = x"no" ; then 91690b661123Smrg if test "x$XMLTO" != "x"; then 91700b661123Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 91710b661123Smrg fi 91720b661123Smrg have_xmlto=no 91730b661123Smrgelse 91740b661123Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 91750b661123Smrgfi 9176880c7e28Smrg 9177880c7e28Smrg# Test for a minimum version of xmlto, if provided. 91780b661123Smrgm4_ifval([$1], 91790b661123Smrg[if test "$have_xmlto" = yes; then 91800b661123Smrg # scrape the xmlto version 91810b661123Smrg AC_MSG_CHECKING([the xmlto version]) 91820b661123Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 91830b661123Smrg AC_MSG_RESULT([$xmlto_version]) 91840b661123Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 91850b661123Smrg [if test "x$use_xmlto" = xauto; then 91860b661123Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 91870b661123Smrg have_xmlto=no 91880b661123Smrg else 91890b661123Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 91900b661123Smrg fi]) 91910b661123Smrgfi]) 9192880c7e28Smrg 9193880c7e28Smrg# Test for the ability of xmlto to generate a text target 9194880c7e28Smrghave_xmlto_text=no 9195880c7e28Smrgcat > conftest.xml << "EOF" 9196880c7e28SmrgEOF 9197880c7e28SmrgAS_IF([test "$have_xmlto" = yes], 9198880c7e28Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9199880c7e28Smrg [have_xmlto_text=yes], 9200880c7e28Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9201880c7e28Smrgrm -f conftest.xml 9202880c7e28SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 92030b661123SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 92040b661123Smrg]) # XORG_WITH_XMLTO 92050b661123Smrg 9206880c7e28Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9207880c7e28Smrg# -------------------------------------------- 9208880c7e28Smrg# Minimum version: 1.12.0 9209880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9210880c7e28Smrg# 9211880c7e28Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9212880c7e28Smrg# XML-based language used for the transformation of XML documents. 9213880c7e28Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9214880c7e28Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9215880c7e28Smrg# The XSLT processor is often used as a standalone tool for transformations. 9216880c7e28Smrg# It should not be assumed that this tool is used only to work with documnetation. 9217880c7e28Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9218880c7e28Smrg# 9219880c7e28Smrg# Interface to module: 9220880c7e28Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9221880c7e28Smrg# XSLTPROC: returns the path of the xsltproc program found 9222880c7e28Smrg# returns the path set by the user in the environment 9223880c7e28Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9224880c7e28Smrg# 'no' user instructs the module not to use xsltproc 9225880c7e28Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9226880c7e28Smrg# 9227880c7e28Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9228880c7e28Smrg# 9229880c7e28SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9230880c7e28SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9231880c7e28Smrg# Preserves the interface, should it be implemented later 9232880c7e28Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9233880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 9234880c7e28SmrgAC_ARG_WITH(xsltproc, 9235880c7e28Smrg AS_HELP_STRING([--with-xsltproc], 9236880c7e28Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9237880c7e28Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9238880c7e28Smrgm4_undefine([_defopt]) 9239880c7e28Smrg 9240880c7e28Smrgif test "x$use_xsltproc" = x"auto"; then 9241880c7e28Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9242880c7e28Smrg if test "x$XSLTPROC" = "x"; then 9243880c7e28Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9244880c7e28Smrg have_xsltproc=no 9245880c7e28Smrg else 9246880c7e28Smrg have_xsltproc=yes 9247880c7e28Smrg fi 9248880c7e28Smrgelif test "x$use_xsltproc" = x"yes" ; then 9249880c7e28Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9250880c7e28Smrg if test "x$XSLTPROC" = "x"; then 9251880c7e28Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9252880c7e28Smrg fi 9253880c7e28Smrg have_xsltproc=yes 9254880c7e28Smrgelif test "x$use_xsltproc" = x"no" ; then 9255880c7e28Smrg if test "x$XSLTPROC" != "x"; then 9256880c7e28Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9257880c7e28Smrg fi 9258880c7e28Smrg have_xsltproc=no 9259880c7e28Smrgelse 9260880c7e28Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9261880c7e28Smrgfi 9262880c7e28Smrg 9263880c7e28SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9264880c7e28Smrg]) # XORG_WITH_XSLTPROC 9265880c7e28Smrg 9266880c7e28Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9267880c7e28Smrg# ---------------------------------------- 9268880c7e28Smrg# Minimum version: 1.15.0 9269880c7e28Smrg# 9270880c7e28Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9271880c7e28Smrg# scanning arbitrary text files, extracting information from those text files, 9272880c7e28Smrg# and printing reports based on that information. 9273880c7e28Smrg# 9274880c7e28Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9275880c7e28Smrg# 9276880c7e28Smrg# Interface to module: 9277880c7e28Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9278880c7e28Smrg# PERL: returns the path of the perl program found 9279880c7e28Smrg# returns the path set by the user in the environment 9280880c7e28Smrg# --with-perl: 'yes' user instructs the module to use perl 9281880c7e28Smrg# 'no' user instructs the module not to use perl 9282880c7e28Smrg# have_perl: returns yes if perl found in PATH or no 9283880c7e28Smrg# 9284880c7e28Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9285880c7e28Smrg# 9286880c7e28SmrgAC_DEFUN([XORG_WITH_PERL],[ 9287880c7e28SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9288880c7e28Smrg# Preserves the interface, should it be implemented later 9289880c7e28Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9290880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 9291880c7e28SmrgAC_ARG_WITH(perl, 9292880c7e28Smrg AS_HELP_STRING([--with-perl], 9293880c7e28Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9294880c7e28Smrg [use_perl=$withval], [use_perl=]_defopt) 9295880c7e28Smrgm4_undefine([_defopt]) 9296880c7e28Smrg 9297880c7e28Smrgif test "x$use_perl" = x"auto"; then 9298880c7e28Smrg AC_PATH_PROG([PERL], [perl]) 9299880c7e28Smrg if test "x$PERL" = "x"; then 9300880c7e28Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9301880c7e28Smrg have_perl=no 9302880c7e28Smrg else 9303880c7e28Smrg have_perl=yes 9304880c7e28Smrg fi 9305880c7e28Smrgelif test "x$use_perl" = x"yes" ; then 9306880c7e28Smrg AC_PATH_PROG([PERL], [perl]) 9307880c7e28Smrg if test "x$PERL" = "x"; then 9308880c7e28Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9309880c7e28Smrg fi 9310880c7e28Smrg have_perl=yes 9311880c7e28Smrgelif test "x$use_perl" = x"no" ; then 9312880c7e28Smrg if test "x$PERL" != "x"; then 9313880c7e28Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9314880c7e28Smrg fi 9315880c7e28Smrg have_perl=no 9316880c7e28Smrgelse 9317880c7e28Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9318880c7e28Smrgfi 9319880c7e28Smrg 9320880c7e28SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9321880c7e28Smrg]) # XORG_WITH_PERL 9322880c7e28Smrg 9323880c7e28Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 93240b661123Smrg# ---------------- 93250b661123Smrg# Minimum version: 1.5.0 9326880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 93270b661123Smrg# 93280b661123Smrg# Documentation tools are not always available on all platforms and sometimes 93290b661123Smrg# not at the appropriate level. This macro enables a module to test for the 93300b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 93310b661123Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9332880c7e28Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9333880c7e28Smrg# --with-asciidoc assumes 'auto'. 93340b661123Smrg# 93350b661123Smrg# Interface to module: 93360b661123Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 93370b661123Smrg# ASCIIDOC: returns the path of the asciidoc program found 93380b661123Smrg# returns the path set by the user in the environment 93390b661123Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 93400b661123Smrg# 'no' user instructs the module not to use asciidoc 93410b661123Smrg# 93420b661123Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 93430b661123Smrg# 93440b661123SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 93450b661123SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9346880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 93470b661123SmrgAC_ARG_WITH(asciidoc, 93480b661123Smrg AS_HELP_STRING([--with-asciidoc], 9349880c7e28Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9350880c7e28Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9351880c7e28Smrgm4_undefine([_defopt]) 93520b661123Smrg 93530b661123Smrgif test "x$use_asciidoc" = x"auto"; then 93540b661123Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 93550b661123Smrg if test "x$ASCIIDOC" = "x"; then 93560b661123Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 93570b661123Smrg have_asciidoc=no 93580b661123Smrg else 93590b661123Smrg have_asciidoc=yes 93600b661123Smrg fi 93610b661123Smrgelif test "x$use_asciidoc" = x"yes" ; then 93620b661123Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 93630b661123Smrg if test "x$ASCIIDOC" = "x"; then 93640b661123Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 93650b661123Smrg fi 93660b661123Smrg have_asciidoc=yes 93670b661123Smrgelif test "x$use_asciidoc" = x"no" ; then 93680b661123Smrg if test "x$ASCIIDOC" != "x"; then 93690b661123Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 93700b661123Smrg fi 93710b661123Smrg have_asciidoc=no 93720b661123Smrgelse 93730b661123Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 93740b661123Smrgfi 93750b661123Smrgm4_ifval([$1], 93760b661123Smrg[if test "$have_asciidoc" = yes; then 93770b661123Smrg # scrape the asciidoc version 93780b661123Smrg AC_MSG_CHECKING([the asciidoc version]) 93790b661123Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 93800b661123Smrg AC_MSG_RESULT([$asciidoc_version]) 93810b661123Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 93820b661123Smrg [if test "x$use_asciidoc" = xauto; then 93830b661123Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 93840b661123Smrg have_asciidoc=no 93850b661123Smrg else 93860b661123Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 93870b661123Smrg fi]) 93880b661123Smrgfi]) 93890b661123SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 93900b661123Smrg]) # XORG_WITH_ASCIIDOC 93910b661123Smrg 9392880c7e28Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 93930b661123Smrg# -------------------------------- 93940b661123Smrg# Minimum version: 1.5.0 9395880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 93960b661123Smrg# 93970b661123Smrg# Documentation tools are not always available on all platforms and sometimes 93980b661123Smrg# not at the appropriate level. This macro enables a module to test for the 93990b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 94000b661123Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9401880c7e28Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9402880c7e28Smrg# --with-doxygen assumes 'auto'. 94030b661123Smrg# 94040b661123Smrg# Interface to module: 94050b661123Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 94060b661123Smrg# DOXYGEN: returns the path of the doxygen program found 94070b661123Smrg# returns the path set by the user in the environment 94080b661123Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 94090b661123Smrg# 'no' user instructs the module not to use doxygen 94100b661123Smrg# 94110b661123Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 94120b661123Smrg# 94130b661123SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 94140b661123SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 9415880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 94160b661123SmrgAC_ARG_WITH(doxygen, 94170b661123Smrg AS_HELP_STRING([--with-doxygen], 9418880c7e28Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9419880c7e28Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9420880c7e28Smrgm4_undefine([_defopt]) 94210b661123Smrg 94220b661123Smrgif test "x$use_doxygen" = x"auto"; then 94230b661123Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 94240b661123Smrg if test "x$DOXYGEN" = "x"; then 94250b661123Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 94260b661123Smrg have_doxygen=no 94270b661123Smrg else 94280b661123Smrg have_doxygen=yes 94290b661123Smrg fi 94300b661123Smrgelif test "x$use_doxygen" = x"yes" ; then 94310b661123Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 94320b661123Smrg if test "x$DOXYGEN" = "x"; then 94330b661123Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 94340b661123Smrg fi 94350b661123Smrg have_doxygen=yes 94360b661123Smrgelif test "x$use_doxygen" = x"no" ; then 94370b661123Smrg if test "x$DOXYGEN" != "x"; then 94380b661123Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 94390b661123Smrg fi 94400b661123Smrg have_doxygen=no 94410b661123Smrgelse 94420b661123Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 94430b661123Smrgfi 94440b661123Smrgm4_ifval([$1], 94450b661123Smrg[if test "$have_doxygen" = yes; then 94460b661123Smrg # scrape the doxygen version 94470b661123Smrg AC_MSG_CHECKING([the doxygen version]) 94480b661123Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 94490b661123Smrg AC_MSG_RESULT([$doxygen_version]) 94500b661123Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 94510b661123Smrg [if test "x$use_doxygen" = xauto; then 94520b661123Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 94530b661123Smrg have_doxygen=no 94540b661123Smrg else 94550b661123Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 94560b661123Smrg fi]) 94570b661123Smrgfi]) 94580b661123SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 94590b661123Smrg]) # XORG_WITH_DOXYGEN 94600b661123Smrg 9461880c7e28Smrg# XORG_WITH_GROFF([DEFAULT]) 94620b661123Smrg# ---------------- 94630b661123Smrg# Minimum version: 1.6.0 9464880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 94650b661123Smrg# 94660b661123Smrg# Documentation tools are not always available on all platforms and sometimes 94670b661123Smrg# not at the appropriate level. This macro enables a module to test for the 94680b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 94690b661123Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 9470880c7e28Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 9471880c7e28Smrg# --with-groff assumes 'auto'. 94720b661123Smrg# 94730b661123Smrg# Interface to module: 94740b661123Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 94750b661123Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 94760b661123Smrg# HAVE_GROFF_MS: the -ms macros package 94770b661123Smrg# GROFF: returns the path of the groff program found 94780b661123Smrg# returns the path set by the user in the environment 94790b661123Smrg# --with-groff: 'yes' user instructs the module to use groff 94800b661123Smrg# 'no' user instructs the module not to use groff 94810b661123Smrg# 9482880c7e28Smrg# Added in version 1.9.0: 9483880c7e28Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 9484880c7e28Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 9485880c7e28Smrg# psselect from the psutils package. 9486880c7e28Smrg# the ghostcript package. Refer to the grohtml man pages 9487880c7e28Smrg# 94880b661123Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 94890b661123Smrg# 94900b661123Smrg# OS and distros often splits groff in a basic and full package, the former 94910b661123Smrg# having the groff program and the later having devices, fonts and macros 94920b661123Smrg# Checking for the groff executable is not enough. 94930b661123Smrg# 94940b661123Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 94950b661123Smrg# unset HAVE_GROFF or GROFF env variables. 94960b661123Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 94970b661123Smrg# 94980b661123SmrgAC_DEFUN([XORG_WITH_GROFF],[ 94990b661123SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 9500880c7e28Smrgm4_define([_defopt], m4_default([$1], [auto])) 95010b661123SmrgAC_ARG_WITH(groff, 95020b661123Smrg AS_HELP_STRING([--with-groff], 9503880c7e28Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 9504880c7e28Smrg [use_groff=$withval], [use_groff=]_defopt) 9505880c7e28Smrgm4_undefine([_defopt]) 95060b661123Smrg 95070b661123Smrgif test "x$use_groff" = x"auto"; then 95080b661123Smrg AC_PATH_PROG([GROFF], [groff]) 95090b661123Smrg if test "x$GROFF" = "x"; then 95100b661123Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 95110b661123Smrg have_groff=no 95120b661123Smrg else 95130b661123Smrg have_groff=yes 95140b661123Smrg fi 95150b661123Smrgelif test "x$use_groff" = x"yes" ; then 95160b661123Smrg AC_PATH_PROG([GROFF], [groff]) 95170b661123Smrg if test "x$GROFF" = "x"; then 95180b661123Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 95190b661123Smrg fi 95200b661123Smrg have_groff=yes 95210b661123Smrgelif test "x$use_groff" = x"no" ; then 95220b661123Smrg if test "x$GROFF" != "x"; then 95230b661123Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 95240b661123Smrg fi 95250b661123Smrg have_groff=no 95260b661123Smrgelse 95270b661123Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 95280b661123Smrgfi 9529880c7e28Smrg 95300b661123Smrg# We have groff, test for the presence of the macro packages 95310b661123Smrgif test "x$have_groff" = x"yes"; then 95320b661123Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 95330b661123Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 95340b661123Smrg groff_ms_works=yes 95350b661123Smrg else 95360b661123Smrg groff_ms_works=no 95370b661123Smrg fi 95380b661123Smrg AC_MSG_RESULT([$groff_ms_works]) 95390b661123Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 95400b661123Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 95410b661123Smrg groff_mm_works=yes 95420b661123Smrg else 95430b661123Smrg groff_mm_works=no 95440b661123Smrg fi 95450b661123Smrg AC_MSG_RESULT([$groff_mm_works]) 95460b661123Smrgfi 9547880c7e28Smrg 9548880c7e28Smrg# We have groff, test for HTML dependencies, one command per package 9549880c7e28Smrgif test "x$have_groff" = x"yes"; then 9550880c7e28Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 9551880c7e28Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 9552880c7e28Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 9553880c7e28Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 9554880c7e28Smrg have_groff_html=yes 9555880c7e28Smrg else 9556880c7e28Smrg have_groff_html=no 9557880c7e28Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 9558880c7e28Smrg fi 9559880c7e28Smrgfi 9560880c7e28Smrg 9561880c7e28Smrg# Set Automake conditionals for Makefiles 95620b661123SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 95630b661123SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 95640b661123SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 9565880c7e28SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 95660b661123Smrg]) # XORG_WITH_GROFF 95670b661123Smrg 9568880c7e28Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 9569880c7e28Smrg# --------------------------------------- 95700b661123Smrg# Minimum version: 1.6.0 9571880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9572880c7e28Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 95730b661123Smrg# 95740b661123Smrg# Documentation tools are not always available on all platforms and sometimes 95750b661123Smrg# not at the appropriate level. This macro enables a module to test for the 95760b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 95770b661123Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 9578880c7e28Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 9579880c7e28Smrg# --with-fop assumes 'auto'. 95800b661123Smrg# 95810b661123Smrg# Interface to module: 95820b661123Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 95830b661123Smrg# FOP: returns the path of the fop program found 95840b661123Smrg# returns the path set by the user in the environment 95850b661123Smrg# --with-fop: 'yes' user instructs the module to use fop 95860b661123Smrg# 'no' user instructs the module not to use fop 95870b661123Smrg# 95880b661123Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 95890b661123Smrg# 95900b661123SmrgAC_DEFUN([XORG_WITH_FOP],[ 95910b661123SmrgAC_ARG_VAR([FOP], [Path to fop command]) 9592880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 95930b661123SmrgAC_ARG_WITH(fop, 95940b661123Smrg AS_HELP_STRING([--with-fop], 9595880c7e28Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 9596880c7e28Smrg [use_fop=$withval], [use_fop=]_defopt) 9597880c7e28Smrgm4_undefine([_defopt]) 95980b661123Smrg 95990b661123Smrgif test "x$use_fop" = x"auto"; then 96000b661123Smrg AC_PATH_PROG([FOP], [fop]) 96010b661123Smrg if test "x$FOP" = "x"; then 96020b661123Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 96030b661123Smrg have_fop=no 96040b661123Smrg else 96050b661123Smrg have_fop=yes 96060b661123Smrg fi 96070b661123Smrgelif test "x$use_fop" = x"yes" ; then 96080b661123Smrg AC_PATH_PROG([FOP], [fop]) 96090b661123Smrg if test "x$FOP" = "x"; then 96100b661123Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 96110b661123Smrg fi 96120b661123Smrg have_fop=yes 96130b661123Smrgelif test "x$use_fop" = x"no" ; then 96140b661123Smrg if test "x$FOP" != "x"; then 96150b661123Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 96160b661123Smrg fi 96170b661123Smrg have_fop=no 96180b661123Smrgelse 96190b661123Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 96200b661123Smrgfi 9621880c7e28Smrg 9622880c7e28Smrg# Test for a minimum version of fop, if provided. 9623880c7e28Smrgm4_ifval([$1], 9624880c7e28Smrg[if test "$have_fop" = yes; then 9625880c7e28Smrg # scrape the fop version 9626880c7e28Smrg AC_MSG_CHECKING([for fop minimum version]) 9627880c7e28Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 9628880c7e28Smrg AC_MSG_RESULT([$fop_version]) 9629880c7e28Smrg AS_VERSION_COMPARE([$fop_version], [$1], 9630880c7e28Smrg [if test "x$use_fop" = xauto; then 9631880c7e28Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 9632880c7e28Smrg have_fop=no 9633880c7e28Smrg else 9634880c7e28Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 9635880c7e28Smrg fi]) 9636880c7e28Smrgfi]) 96370b661123SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 96380b661123Smrg]) # XORG_WITH_FOP 96390b661123Smrg 9640880c7e28Smrg# XORG_WITH_PS2PDF([DEFAULT]) 96410b661123Smrg# ---------------- 96420b661123Smrg# Minimum version: 1.6.0 9643880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 96440b661123Smrg# 96450b661123Smrg# Documentation tools are not always available on all platforms and sometimes 96460b661123Smrg# not at the appropriate level. This macro enables a module to test for the 96470b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 96480b661123Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 9649880c7e28Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 9650880c7e28Smrg# --with-ps2pdf assumes 'auto'. 96510b661123Smrg# 96520b661123Smrg# Interface to module: 96530b661123Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 96540b661123Smrg# PS2PDF: returns the path of the ps2pdf program found 96550b661123Smrg# returns the path set by the user in the environment 96560b661123Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 96570b661123Smrg# 'no' user instructs the module not to use ps2pdf 96580b661123Smrg# 96590b661123Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 96600b661123Smrg# 96610b661123SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 96620b661123SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 9663880c7e28Smrgm4_define([_defopt], m4_default([$1], [auto])) 96640b661123SmrgAC_ARG_WITH(ps2pdf, 96650b661123Smrg AS_HELP_STRING([--with-ps2pdf], 9666880c7e28Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 9667880c7e28Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 9668880c7e28Smrgm4_undefine([_defopt]) 96690b661123Smrg 96700b661123Smrgif test "x$use_ps2pdf" = x"auto"; then 96710b661123Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 96720b661123Smrg if test "x$PS2PDF" = "x"; then 96730b661123Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 96740b661123Smrg have_ps2pdf=no 96750b661123Smrg else 96760b661123Smrg have_ps2pdf=yes 96770b661123Smrg fi 96780b661123Smrgelif test "x$use_ps2pdf" = x"yes" ; then 96790b661123Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 96800b661123Smrg if test "x$PS2PDF" = "x"; then 96810b661123Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 96820b661123Smrg fi 96830b661123Smrg have_ps2pdf=yes 96840b661123Smrgelif test "x$use_ps2pdf" = x"no" ; then 96850b661123Smrg if test "x$PS2PDF" != "x"; then 96860b661123Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 96870b661123Smrg fi 96880b661123Smrg have_ps2pdf=no 96890b661123Smrgelse 96900b661123Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 96910b661123Smrgfi 96920b661123SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 96930b661123Smrg]) # XORG_WITH_PS2PDF 96940b661123Smrg 96950b661123Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 96960b661123Smrg# ---------------- 96970b661123Smrg# Minimum version: 1.6.0 96980b661123Smrg# 96990b661123Smrg# Documentation tools are not always available on all platforms and sometimes 97000b661123Smrg# not at the appropriate level. This macro enables a builder to skip all 97010b661123Smrg# documentation targets except traditional man pages. 97020b661123Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 97030b661123Smrg# maximum flexibilty in controlling documentation building. 97040b661123Smrg# Refer to: 97050b661123Smrg# XORG_WITH_XMLTO --with-xmlto 97060b661123Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 97070b661123Smrg# XORG_WITH_DOXYGEN --with-doxygen 97080b661123Smrg# XORG_WITH_FOP --with-fop 97090b661123Smrg# XORG_WITH_GROFF --with-groff 97100b661123Smrg# XORG_WITH_PS2PDF --with-ps2pdf 97110b661123Smrg# 97120b661123Smrg# Interface to module: 97130b661123Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 97140b661123Smrg# --enable-docs: 'yes' user instructs the module to generate docs 97150b661123Smrg# 'no' user instructs the module not to generate docs 97160b661123Smrg# parm1: specify the default value, yes or no. 97170b661123Smrg# 97180b661123SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 9719880c7e28Smrgm4_define([docs_default], m4_default([$1], [yes])) 97200b661123SmrgAC_ARG_ENABLE(docs, 97210b661123Smrg AS_HELP_STRING([--enable-docs], 9722880c7e28Smrg [Enable building the documentation (default: ]docs_default[)]), 9723880c7e28Smrg [build_docs=$enableval], [build_docs=]docs_default) 9724880c7e28Smrgm4_undefine([docs_default]) 97250b661123SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 97260b661123SmrgAC_MSG_CHECKING([whether to build documentation]) 97270b661123SmrgAC_MSG_RESULT([$build_docs]) 97280b661123Smrg]) # XORG_ENABLE_DOCS 97290b661123Smrg 97300b661123Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 97310b661123Smrg# ---------------- 97320b661123Smrg# Minimum version: 1.6.0 97330b661123Smrg# 97340b661123Smrg# This macro enables a builder to skip all developer documentation. 97350b661123Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 97360b661123Smrg# maximum flexibilty in controlling documentation building. 97370b661123Smrg# Refer to: 97380b661123Smrg# XORG_WITH_XMLTO --with-xmlto 97390b661123Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 97400b661123Smrg# XORG_WITH_DOXYGEN --with-doxygen 97410b661123Smrg# XORG_WITH_FOP --with-fop 97420b661123Smrg# XORG_WITH_GROFF --with-groff 97430b661123Smrg# XORG_WITH_PS2PDF --with-ps2pdf 97440b661123Smrg# 97450b661123Smrg# Interface to module: 97460b661123Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 97470b661123Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 97480b661123Smrg# 'no' user instructs the module not to generate developer docs 97490b661123Smrg# parm1: specify the default value, yes or no. 97500b661123Smrg# 97510b661123SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 9752880c7e28Smrgm4_define([devel_default], m4_default([$1], [yes])) 97530b661123SmrgAC_ARG_ENABLE(devel-docs, 97540b661123Smrg AS_HELP_STRING([--enable-devel-docs], 9755880c7e28Smrg [Enable building the developer documentation (default: ]devel_default[)]), 9756880c7e28Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 9757880c7e28Smrgm4_undefine([devel_default]) 97580b661123SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 97590b661123SmrgAC_MSG_CHECKING([whether to build developer documentation]) 97600b661123SmrgAC_MSG_RESULT([$build_devel_docs]) 97610b661123Smrg]) # XORG_ENABLE_DEVEL_DOCS 97620b661123Smrg 97630b661123Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 97640b661123Smrg# ---------------- 97650b661123Smrg# Minimum version: 1.6.0 97660b661123Smrg# 97670b661123Smrg# This macro enables a builder to skip all functional specification targets. 97680b661123Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 97690b661123Smrg# maximum flexibilty in controlling documentation building. 97700b661123Smrg# Refer to: 97710b661123Smrg# XORG_WITH_XMLTO --with-xmlto 97720b661123Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 97730b661123Smrg# XORG_WITH_DOXYGEN --with-doxygen 97740b661123Smrg# XORG_WITH_FOP --with-fop 97750b661123Smrg# XORG_WITH_GROFF --with-groff 97760b661123Smrg# XORG_WITH_PS2PDF --with-ps2pdf 97770b661123Smrg# 97780b661123Smrg# Interface to module: 97790b661123Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 97800b661123Smrg# --enable-specs: 'yes' user instructs the module to generate specs 97810b661123Smrg# 'no' user instructs the module not to generate specs 97820b661123Smrg# parm1: specify the default value, yes or no. 97830b661123Smrg# 97840b661123SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 9785880c7e28Smrgm4_define([spec_default], m4_default([$1], [yes])) 97860b661123SmrgAC_ARG_ENABLE(specs, 97870b661123Smrg AS_HELP_STRING([--enable-specs], 9788880c7e28Smrg [Enable building the specs (default: ]spec_default[)]), 9789880c7e28Smrg [build_specs=$enableval], [build_specs=]spec_default) 9790880c7e28Smrgm4_undefine([spec_default]) 97910b661123SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 97920b661123SmrgAC_MSG_CHECKING([whether to build functional specifications]) 97930b661123SmrgAC_MSG_RESULT([$build_specs]) 97940b661123Smrg]) # XORG_ENABLE_SPECS 97950b661123Smrg 9796880c7e28Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 9797880c7e28Smrg# ---------------------------------------------- 9798880c7e28Smrg# Minimum version: 1.13.0 9799880c7e28Smrg# 9800880c7e28Smrg# This macro enables a builder to enable/disable unit testing 9801880c7e28Smrg# It makes no assumption about the test cases implementation 9802880c7e28Smrg# Test cases may or may not use Automake "Support for test suites" 9803880c7e28Smrg# They may or may not use the software utility library GLib 9804880c7e28Smrg# 9805880c7e28Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 9806880c7e28Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 9807880c7e28Smrg# The variable enable_unit_tests is used by other macros in this file. 9808880c7e28Smrg# 9809880c7e28Smrg# Interface to module: 9810880c7e28Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 9811880c7e28Smrg# enable_unit_tests: used in configure.ac for additional configuration 9812880c7e28Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 9813880c7e28Smrg# 'no' user instructs the module not to build tests 9814880c7e28Smrg# parm1: specify the default value, yes or no. 9815880c7e28Smrg# 9816880c7e28SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 9817880c7e28SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 9818880c7e28SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 9819880c7e28SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9820880c7e28Smrgm4_define([_defopt], m4_default([$1], [auto])) 9821880c7e28SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 9822880c7e28Smrg [Enable building unit test cases (default: ]_defopt[)]), 9823880c7e28Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 9824880c7e28Smrgm4_undefine([_defopt]) 9825880c7e28SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 9826880c7e28SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9827880c7e28SmrgAC_MSG_RESULT([$enable_unit_tests]) 9828880c7e28Smrg]) # XORG_ENABLE_UNIT_TESTS 9829880c7e28Smrg 9830880c7e28Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 9831880c7e28Smrg# ------------------------------------------------------ 9832880c7e28Smrg# Minimum version: 1.17.0 9833880c7e28Smrg# 9834880c7e28Smrg# This macro enables a builder to enable/disable integration testing 9835880c7e28Smrg# It makes no assumption about the test cases' implementation 9836880c7e28Smrg# Test cases may or may not use Automake "Support for test suites" 9837880c7e28Smrg# 9838880c7e28Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 9839880c7e28Smrg# usually requires less dependencies and may be built and run under less 9840880c7e28Smrg# stringent environments than integration tests. 9841880c7e28Smrg# 9842880c7e28Smrg# Interface to module: 9843880c7e28Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 9844880c7e28Smrg# enable_integration_tests: used in configure.ac for additional configuration 9845880c7e28Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 9846880c7e28Smrg# 'no' user instructs the module not to build tests 9847880c7e28Smrg# parm1: specify the default value, yes or no. 9848880c7e28Smrg# 9849880c7e28SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 9850880c7e28SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 9851880c7e28Smrgm4_define([_defopt], m4_default([$1], [auto])) 9852880c7e28SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 9853880c7e28Smrg [Enable building integration test cases (default: ]_defopt[)]), 9854880c7e28Smrg [enable_integration_tests=$enableval], 9855880c7e28Smrg [enable_integration_tests=]_defopt) 9856880c7e28Smrgm4_undefine([_defopt]) 9857880c7e28SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 9858880c7e28Smrg [test "x$enable_integration_tests" != xno]) 9859880c7e28SmrgAC_MSG_CHECKING([whether to build unit test cases]) 9860880c7e28SmrgAC_MSG_RESULT([$enable_integration_tests]) 9861880c7e28Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 9862880c7e28Smrg 9863880c7e28Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 9864880c7e28Smrg# ---------------------------------------- 9865880c7e28Smrg# Minimum version: 1.13.0 9866880c7e28Smrg# 9867880c7e28Smrg# GLib is a library which provides advanced data structures and functions. 9868880c7e28Smrg# This macro enables a module to test for the presence of Glib. 9869880c7e28Smrg# 9870880c7e28Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 9871880c7e28Smrg# Otherwise the value of $enable_unit_tests is blank. 9872880c7e28Smrg# 9873880c7e28Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 9874880c7e28Smrg# test support usually requires less dependencies and may be built and run under 9875880c7e28Smrg# less stringent environments than integration tests. 9876880c7e28Smrg# 9877880c7e28Smrg# Interface to module: 9878880c7e28Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 9879880c7e28Smrg# with_glib: used in configure.ac to know if GLib has been found 9880880c7e28Smrg# --with-glib: 'yes' user instructs the module to use glib 9881880c7e28Smrg# 'no' user instructs the module not to use glib 9882880c7e28Smrg# 9883880c7e28SmrgAC_DEFUN([XORG_WITH_GLIB],[ 9884880c7e28SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9885880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 9886880c7e28SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 9887880c7e28Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 9888880c7e28Smrg [with_glib=$withval], [with_glib=]_defopt) 9889880c7e28Smrgm4_undefine([_defopt]) 9890880c7e28Smrg 9891880c7e28Smrghave_glib=no 9892880c7e28Smrg# Do not probe GLib if user explicitly disabled unit testing 9893880c7e28Smrgif test "x$enable_unit_tests" != x"no"; then 9894880c7e28Smrg # Do not probe GLib if user explicitly disabled it 9895880c7e28Smrg if test "x$with_glib" != x"no"; then 9896880c7e28Smrg m4_ifval( 9897880c7e28Smrg [$1], 9898880c7e28Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 9899880c7e28Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 9900880c7e28Smrg ) 9901880c7e28Smrg fi 9902880c7e28Smrgfi 9903880c7e28Smrg 9904880c7e28Smrg# Not having GLib when unit testing has been explicitly requested is an error 9905880c7e28Smrgif test "x$enable_unit_tests" = x"yes"; then 9906880c7e28Smrg if test "x$have_glib" = x"no"; then 9907880c7e28Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9908880c7e28Smrg fi 9909880c7e28Smrgfi 9910880c7e28Smrg 9911880c7e28Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 9912880c7e28Smrgif test "x$enable_unit_tests" = x"no"; then 9913880c7e28Smrg if test "x$with_glib" = x"yes"; then 9914880c7e28Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 9915880c7e28Smrg fi 9916880c7e28Smrgfi 9917880c7e28Smrg 9918880c7e28Smrg# Not having GLib when it has been explicitly requested is an error 9919880c7e28Smrgif test "x$with_glib" = x"yes"; then 9920880c7e28Smrg if test "x$have_glib" = x"no"; then 9921880c7e28Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 9922880c7e28Smrg fi 9923880c7e28Smrgfi 9924880c7e28Smrg 9925880c7e28SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 9926880c7e28Smrg]) # XORG_WITH_GLIB 9927880c7e28Smrg 9928880c7e28Smrg# XORG_LD_WRAP([required|optional]) 9929880c7e28Smrg# --------------------------------- 9930880c7e28Smrg# Minimum version: 1.13.0 9931880c7e28Smrg# 9932880c7e28Smrg# Check if linker supports -wrap, passed via compiler flags 9933880c7e28Smrg# 9934880c7e28Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 9935880c7e28Smrg# Otherwise the value of $enable_unit_tests is blank. 9936880c7e28Smrg# 9937880c7e28Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 9938880c7e28Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 9939880c7e28Smrg# available, an argument of "optional" allows use when some unit tests require 9940880c7e28Smrg# ld -wrap and others do not. 9941880c7e28Smrg# 9942880c7e28SmrgAC_DEFUN([XORG_LD_WRAP],[ 9943880c7e28SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 9944880c7e28Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 9945880c7e28Smrg void __wrap_exit(int status) { return; }], 9946880c7e28Smrg [exit(0);])]) 9947880c7e28Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 9948880c7e28Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 9949880c7e28Smrg if test "x$have_ld_wrap" = x"no"; then 9950880c7e28Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 9951880c7e28Smrg fi 9952880c7e28Smrgfi 9953880c7e28SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 9954880c7e28Smrg# 9955880c7e28Smrg]) # XORG_LD_WRAP 9956880c7e28Smrg 9957880c7e28Smrg# XORG_CHECK_LINKER_FLAGS 9958880c7e28Smrg# ----------------------- 9959880c7e28Smrg# SYNOPSIS 9960880c7e28Smrg# 9961880c7e28Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 9962880c7e28Smrg# 9963880c7e28Smrg# DESCRIPTION 9964880c7e28Smrg# 9965880c7e28Smrg# Check whether the given linker FLAGS work with the current language's 9966880c7e28Smrg# linker, or whether they give an error. 9967880c7e28Smrg# 9968880c7e28Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 9969880c7e28Smrg# success/failure. 9970880c7e28Smrg# 9971880c7e28Smrg# PROGRAM-SOURCE is the program source to link with, if needed 9972880c7e28Smrg# 9973880c7e28Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 9974880c7e28Smrg# 9975880c7e28Smrg# LICENSE 9976880c7e28Smrg# 9977880c7e28Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 9978880c7e28Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 9979880c7e28Smrg# Copyright (c) 2009 Matteo Frigo 9980880c7e28Smrg# 9981880c7e28Smrg# This program is free software: you can redistribute it and/or modify it 9982880c7e28Smrg# under the terms of the GNU General Public License as published by the 9983880c7e28Smrg# Free Software Foundation, either version 3 of the License, or (at your 9984880c7e28Smrg# option) any later version. 9985880c7e28Smrg# 9986880c7e28Smrg# This program is distributed in the hope that it will be useful, but 9987880c7e28Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9988880c7e28Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 9989880c7e28Smrg# Public License for more details. 9990880c7e28Smrg# 9991880c7e28Smrg# You should have received a copy of the GNU General Public License along 9992880c7e28Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 9993880c7e28Smrg# 9994880c7e28Smrg# As a special exception, the respective Autoconf Macro's copyright owner 9995880c7e28Smrg# gives unlimited permission to copy, distribute and modify the configure 9996880c7e28Smrg# scripts that are the output of Autoconf when processing the Macro. You 9997880c7e28Smrg# need not follow the terms of the GNU General Public License when using 9998880c7e28Smrg# or distributing such scripts, even though portions of the text of the 9999880c7e28Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10000880c7e28Smrg# all other use of the material that constitutes the Autoconf Macro. 10001880c7e28Smrg# 10002880c7e28Smrg# This special exception to the GPL applies to versions of the Autoconf 10003880c7e28Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10004880c7e28Smrg# modified version of the Autoconf Macro, you may extend this special 10005880c7e28Smrg# exception to the GPL to apply to your modified version as well.# 10006880c7e28SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10007880c7e28Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10008880c7e28Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10009880c7e28SmrgAS_LITERAL_IF([$1], 10010880c7e28Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10011880c7e28Smrg ax_save_FLAGS=$LDFLAGS 10012880c7e28Smrg LDFLAGS="$1" 10013880c7e28Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10014880c7e28Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10015880c7e28Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10016880c7e28Smrg LDFLAGS=$ax_save_FLAGS])], 10017880c7e28Smrg [ax_save_FLAGS=$LDFLAGS 10018880c7e28Smrg LDFLAGS="$1" 10019880c7e28Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10020880c7e28Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10021880c7e28Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10022880c7e28Smrg LDFLAGS=$ax_save_FLAGS]) 10023880c7e28Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10024880c7e28SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10025880c7e28Smrgif test "x$xorg_check_linker_flags" = xyes; then 10026880c7e28Smrg m4_default([$2], :) 10027880c7e28Smrgelse 10028880c7e28Smrg m4_default([$3], :) 10029880c7e28Smrgfi 10030880c7e28Smrg]) # XORG_CHECK_LINKER_FLAGS 10031880c7e28Smrg 10032880c7e28Smrg# XORG_MEMORY_CHECK_FLAGS 10033880c7e28Smrg# ----------------------- 10034880c7e28Smrg# Minimum version: 1.16.0 10035880c7e28Smrg# 10036880c7e28Smrg# This macro attempts to find appropriate memory checking functionality 10037880c7e28Smrg# for various platforms which unit testing code may use to catch various 10038880c7e28Smrg# forms of memory allocation and access errors in testing. 10039880c7e28Smrg# 10040880c7e28Smrg# Interface to module: 10041880c7e28Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10042880c7e28Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10043880c7e28Smrg# 10044880c7e28Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10045880c7e28Smrg# 10046880c7e28SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10047880c7e28Smrg 10048880c7e28SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10049880c7e28SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10050880c7e28Smrg [Environment variables to enable memory checking in tests]) 10051880c7e28Smrg 10052880c7e28Smrg# Check for different types of support on different platforms 10053880c7e28Smrgcase $host_os in 10054880c7e28Smrg solaris*) 10055880c7e28Smrg AC_CHECK_LIB([umem], [umem_alloc], 10056880c7e28Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10057880c7e28Smrg ;; 10058880c7e28Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10059880c7e28Smrg # both directly and inverted, so should not be 0 or 255. 10060880c7e28Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10061880c7e28Smrg ;; 10062880c7e28Smrg darwin*) 10063880c7e28Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10064880c7e28Smrg ;; 10065880c7e28Smrg *bsd*) 10066880c7e28Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10067880c7e28Smrg ;; 10068880c7e28Smrgesac 10069880c7e28Smrg 10070880c7e28Smrg# User supplied flags override default flags 10071880c7e28Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10072880c7e28Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10073880c7e28Smrgfi 10074880c7e28Smrg 10075880c7e28SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10076880c7e28Smrg]) # XORG_WITH_LINT 10077880c7e28Smrg 10078bdcaa8d0Smrg# XORG_CHECK_MALLOC_ZERO 10079bdcaa8d0Smrg# ---------------------- 10080bdcaa8d0Smrg# Minimum version: 1.0.0 10081bdcaa8d0Smrg# 10082bdcaa8d0Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10083bdcaa8d0Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 10084bdcaa8d0Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10085bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10086bdcaa8d0SmrgAC_ARG_ENABLE(malloc0returnsnull, 100870b661123Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 10088bdcaa8d0Smrg [malloc(0) returns NULL (default: auto)]), 10089bdcaa8d0Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10090bdcaa8d0Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10091bdcaa8d0Smrg 10092bdcaa8d0SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10093bdcaa8d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10094880c7e28Smrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10095880c7e28Smrg#include <stdlib.h> 10096880c7e28Smrg],[ 10097bdcaa8d0Smrg char *m0, *r0, *c0, *p; 10098bdcaa8d0Smrg m0 = malloc(0); 10099bdcaa8d0Smrg p = malloc(10); 10100bdcaa8d0Smrg r0 = realloc(p,0); 10101880c7e28Smrg c0 = calloc(0,10); 10102880c7e28Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10103880c7e28Smrg])], 10104bdcaa8d0Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 101050b661123Smrg [MALLOC_ZERO_RETURNS_NULL=no], 101060b661123Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 10107bdcaa8d0Smrgfi 10108bdcaa8d0SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10109bdcaa8d0Smrg 10110bdcaa8d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10111bdcaa8d0Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10112bdcaa8d0Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10113bdcaa8d0Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10114bdcaa8d0Smrgelse 10115bdcaa8d0Smrg MALLOC_ZERO_CFLAGS="" 10116bdcaa8d0Smrg XMALLOC_ZERO_CFLAGS="" 10117bdcaa8d0Smrg XTMALLOC_ZERO_CFLAGS="" 10118bdcaa8d0Smrgfi 10119bdcaa8d0Smrg 10120bdcaa8d0SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10121bdcaa8d0SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10122bdcaa8d0SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10123bdcaa8d0Smrg]) # XORG_CHECK_MALLOC_ZERO 10124bdcaa8d0Smrg 10125bdcaa8d0Smrg# XORG_WITH_LINT() 10126bdcaa8d0Smrg# ---------------- 10127bdcaa8d0Smrg# Minimum version: 1.1.0 10128bdcaa8d0Smrg# 101290b661123Smrg# This macro enables the use of a tool that flags some suspicious and 101300b661123Smrg# non-portable constructs (likely to be bugs) in C language source code. 101310b661123Smrg# It will attempt to locate the tool and use appropriate options. 101320b661123Smrg# There are various lint type tools on different platforms. 101330b661123Smrg# 101340b661123Smrg# Interface to module: 101350b661123Smrg# LINT: returns the path to the tool found on the platform 101360b661123Smrg# or the value set to LINT on the configure cmd line 101370b661123Smrg# also an Automake conditional 101380b661123Smrg# LINT_FLAGS: an Automake variable with appropriate flags 101390b661123Smrg# 101400b661123Smrg# --with-lint: 'yes' user instructs the module to use lint 101410b661123Smrg# 'no' user instructs the module not to use lint (default) 101420b661123Smrg# 101430b661123Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 101440b661123Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10145bdcaa8d0Smrg# 10146bdcaa8d0SmrgAC_DEFUN([XORG_WITH_LINT],[ 10147bdcaa8d0Smrg 101480b661123SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 101490b661123SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 101500b661123SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10151bdcaa8d0Smrg [Use a lint-style source code checker (default: disabled)])], 10152bdcaa8d0Smrg [use_lint=$withval], [use_lint=no]) 101530b661123Smrg 101540b661123Smrg# Obtain platform specific info like program name and options 101550b661123Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 101560b661123Smrgcase $host_os in 101570b661123Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 101580b661123Smrg lint_name=splint 101590b661123Smrg lint_options="-badflag" 101600b661123Smrg ;; 101610b661123Smrg *freebsd* | *netbsd*) 101620b661123Smrg lint_name=lint 101630b661123Smrg lint_options="-u -b" 101640b661123Smrg ;; 101650b661123Smrg *solaris*) 101660b661123Smrg lint_name=lint 101670b661123Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 101680b661123Smrg ;; 101690b661123Smrgesac 101700b661123Smrg 101710b661123Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 101720b661123Smrgif test "x$use_lint" = x"yes" ; then 101730b661123Smrg AC_PATH_PROG([LINT], [$lint_name]) 101740b661123Smrg if test "x$LINT" = "x"; then 101750b661123Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 101760b661123Smrg fi 101770b661123Smrgelif test "x$use_lint" = x"no" ; then 101780b661123Smrg if test "x$LINT" != "x"; then 101790b661123Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 101800b661123Smrg fi 10181bdcaa8d0Smrgelse 101820b661123Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10183bdcaa8d0Smrgfi 101840b661123Smrg 101850b661123Smrg# User supplied flags override default flags 101860b661123Smrgif test "x$LINT_FLAGS" != "x"; then 101870b661123Smrg lint_options=$LINT_FLAGS 10188bdcaa8d0Smrgfi 10189bdcaa8d0Smrg 101900b661123SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 101910b661123SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10192bdcaa8d0Smrg 10193bdcaa8d0Smrg]) # XORG_WITH_LINT 10194bdcaa8d0Smrg 10195bdcaa8d0Smrg# XORG_LINT_LIBRARY(LIBNAME) 10196bdcaa8d0Smrg# -------------------------- 10197bdcaa8d0Smrg# Minimum version: 1.1.0 10198bdcaa8d0Smrg# 10199bdcaa8d0Smrg# Sets up flags for building lint libraries for checking programs that call 10200bdcaa8d0Smrg# functions in the library. 10201bdcaa8d0Smrg# 102020b661123Smrg# Interface to module: 102030b661123Smrg# LINTLIB - Automake variable with the name of lint library file to make 102040b661123Smrg# MAKE_LINT_LIB - Automake conditional 102050b661123Smrg# 102060b661123Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 102070b661123Smrg# - 'no' user instructs the module not to create a lint library (default) 10208bdcaa8d0Smrg 10209bdcaa8d0SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10210bdcaa8d0SmrgAC_REQUIRE([XORG_WITH_LINT]) 102110b661123SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10212bdcaa8d0Smrg [Create lint library (default: disabled)])], 10213bdcaa8d0Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 102140b661123Smrg 102150b661123Smrgif test "x$make_lint_lib" = x"yes" ; then 102160b661123Smrg LINTLIB=llib-l$1.ln 102170b661123Smrg if test "x$LINT" = "x"; then 102180b661123Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 102190b661123Smrg fi 102200b661123Smrgelif test "x$make_lint_lib" != x"no" ; then 102210b661123Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10222bdcaa8d0Smrgfi 102230b661123Smrg 10224bdcaa8d0SmrgAC_SUBST(LINTLIB) 10225bdcaa8d0SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10226bdcaa8d0Smrg 10227bdcaa8d0Smrg]) # XORG_LINT_LIBRARY 10228bdcaa8d0Smrg 10229880c7e28Smrg# XORG_COMPILER_BRAND 10230880c7e28Smrg# ------------------- 10231880c7e28Smrg# Minimum version: 1.14.0 10232880c7e28Smrg# 10233880c7e28Smrg# Checks for various brands of compilers and sets flags as appropriate: 10234880c7e28Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10235880c7e28Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10236880c7e28Smrg# clang compiler - sets CLANGCC to "yes" 10237880c7e28Smrg# Intel compiler - sets INTELCC to "yes" 10238880c7e28Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10239880c7e28Smrg# 10240880c7e28SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10241880c7e28SmrgAC_LANG_CASE( 10242880c7e28Smrg [C], [ 10243880c7e28Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10244880c7e28Smrg ], 10245880c7e28Smrg [C++], [ 10246880c7e28Smrg AC_REQUIRE([AC_PROG_CXX]) 10247880c7e28Smrg ] 10248880c7e28Smrg) 10249880c7e28SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10250880c7e28SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10251880c7e28SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10252880c7e28Smrg]) # XORG_COMPILER_BRAND 10253880c7e28Smrg 10254880c7e28Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10255880c7e28Smrg# --------------- 10256880c7e28Smrg# Minimum version: 1.16.0 10257880c7e28Smrg# 10258880c7e28Smrg# Test if the compiler works when passed the given flag as a command line argument. 10259880c7e28Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10260880c7e28Smrg# next flag in the list until there are no more options. 10261880c7e28Smrg# 10262880c7e28Smrg# Note that this does not guarantee that the compiler supports the flag as some 10263880c7e28Smrg# compilers will simply ignore arguments that they do not understand, but we do 10264880c7e28Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10265880c7e28Smrg# -Werror=unused-command-line-argument 10266880c7e28Smrg# 10267880c7e28SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10268880c7e28Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10269880c7e28Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10270880c7e28Smrg 10271880c7e28SmrgAC_LANG_COMPILER_REQUIRE 10272880c7e28Smrg 10273880c7e28SmrgAC_LANG_CASE( 10274880c7e28Smrg [C], [ 10275880c7e28Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10276880c7e28Smrg define([PREFIX], [C]) 10277880c7e28Smrg define([CACHE_PREFIX], [cc]) 10278880c7e28Smrg define([COMPILER], [$CC]) 10279880c7e28Smrg ], 10280880c7e28Smrg [C++], [ 10281880c7e28Smrg define([PREFIX], [CXX]) 10282880c7e28Smrg define([CACHE_PREFIX], [cxx]) 10283880c7e28Smrg define([COMPILER], [$CXX]) 10284880c7e28Smrg ] 10285880c7e28Smrg) 10286880c7e28Smrg 10287880c7e28Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10288880c7e28Smrg 10289880c7e28Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10290880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10291880c7e28Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10292880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10293880c7e28Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10294880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10295880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10296880c7e28Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10297880c7e28Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10298880c7e28Smrgfi 10299880c7e28Smrg 10300880c7e28Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10301880c7e28Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10302880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10303880c7e28Smrg fi 10304880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10305880c7e28Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10306880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10307880c7e28Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10308880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10309880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10310880c7e28Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10311880c7e28Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10312880c7e28Smrgfi 10313880c7e28Smrg 10314880c7e28Smrgfound="no" 10315880c7e28Smrgm4_foreach([flag], m4_cdr($@), [ 10316880c7e28Smrg if test $found = "no" ; then 10317880c7e28Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 10318880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10319880c7e28Smrg fi 10320880c7e28Smrg 10321880c7e28Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 10322880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10323880c7e28Smrg fi 10324880c7e28Smrg 10325880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10326880c7e28Smrg 10327880c7e28Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10328880c7e28Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10329880c7e28Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10330880c7e28Smrg AC_CACHE_VAL($cacheid, 10331880c7e28Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10332880c7e28Smrg [eval $cacheid=yes], 10333880c7e28Smrg [eval $cacheid=no])]) 10334880c7e28Smrg 10335880c7e28Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10336880c7e28Smrg 10337880c7e28Smrg eval supported=\$$cacheid 10338880c7e28Smrg AC_MSG_RESULT([$supported]) 10339880c7e28Smrg if test "$supported" = "yes" ; then 10340880c7e28Smrg $1="$$1 ]flag[" 10341880c7e28Smrg found="yes" 10342880c7e28Smrg fi 10343880c7e28Smrg fi 10344880c7e28Smrg]) 10345880c7e28Smrg]) # XORG_TESTSET_CFLAG 10346880c7e28Smrg 10347880c7e28Smrg# XORG_COMPILER_FLAGS 10348880c7e28Smrg# --------------- 10349880c7e28Smrg# Minimum version: 1.16.0 10350880c7e28Smrg# 10351880c7e28Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10352880c7e28Smrg# arguments supported by the selected compiler which do NOT alter the generated 10353880c7e28Smrg# code. These arguments will cause the compiler to print various warnings 10354880c7e28Smrg# during compilation AND turn a conservative set of warnings into errors. 10355880c7e28Smrg# 10356880c7e28Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10357880c7e28Smrg# future versions of util-macros as options are added to new compilers. 10358880c7e28Smrg# 10359880c7e28SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10360880c7e28SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10361880c7e28Smrg 10362880c7e28SmrgAC_ARG_ENABLE(selective-werror, 10363880c7e28Smrg AS_HELP_STRING([--disable-selective-werror], 10364880c7e28Smrg [Turn off selective compiler errors. (default: enabled)]), 10365880c7e28Smrg [SELECTIVE_WERROR=$enableval], 10366880c7e28Smrg [SELECTIVE_WERROR=yes]) 10367880c7e28Smrg 10368880c7e28SmrgAC_LANG_CASE( 10369880c7e28Smrg [C], [ 10370880c7e28Smrg define([PREFIX], [C]) 10371880c7e28Smrg ], 10372880c7e28Smrg [C++], [ 10373880c7e28Smrg define([PREFIX], [CXX]) 10374880c7e28Smrg ] 10375880c7e28Smrg) 10376880c7e28Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10377880c7e28Smrgif test "x$SUNCC" = "xyes"; then 10378880c7e28Smrg [BASE_]PREFIX[FLAGS]="-v" 10379880c7e28Smrgelse 10380880c7e28Smrg [BASE_]PREFIX[FLAGS]="" 10381880c7e28Smrgfi 10382880c7e28Smrg 10383880c7e28Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10384880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10385880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10386880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10387880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10388880c7e28Smrg 10389880c7e28SmrgAC_LANG_CASE( 10390880c7e28Smrg [C], [ 10391880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10392880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10393880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10394880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 10395880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 10396880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10397880c7e28Smrg ] 10398880c7e28Smrg) 10399880c7e28Smrg 10400880c7e28Smrg# This chunk adds additional warnings that could catch undesired effects. 10401880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10402880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10403880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10404880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10405880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10406880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10407880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 10408880c7e28Smrg 10409880c7e28Smrg# These are currently disabled because they are noisy. They will be enabled 10410880c7e28Smrg# in the future once the codebase is sufficiently modernized to silence 10411880c7e28Smrg# them. For now, I don't want them to drown out the other warnings. 10412880c7e28Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10413880c7e28Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10414880c7e28Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 10415880c7e28Smrg 10416880c7e28Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10417880c7e28Smrg# when there are problems that should be fixed. 10418880c7e28Smrg 10419880c7e28Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10420880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10421880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10422880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10423880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10424880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10425880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10426880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10427880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10428880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10429880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10430880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10431880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10432880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10433880c7e28Smrgelse 10434880c7e28SmrgAC_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]) 10435880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10436880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10437880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10438880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10439880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10440880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10441880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10442880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10443880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10444880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10445880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10446880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10447880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10448880c7e28Smrgfi 10449880c7e28Smrg 10450880c7e28SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10451880c7e28Smrg]) # XORG_COMPILER_FLAGS 10452880c7e28Smrg 1045372313efbSmrg# XORG_CWARNFLAGS 1045472313efbSmrg# --------------- 1045572313efbSmrg# Minimum version: 1.2.0 10456880c7e28Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1045772313efbSmrg# 1045872313efbSmrg# Defines CWARNFLAGS to enable C compiler warnings. 1045972313efbSmrg# 10460880c7e28Smrg# This function is deprecated because it defines -fno-strict-aliasing 10461880c7e28Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 10462880c7e28Smrg# is needed, then it should be added explicitly in the module when 10463880c7e28Smrg# it is updated to use BASE_CFLAGS. 10464880c7e28Smrg# 1046572313efbSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 10466880c7e28SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 10467880c7e28SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10468880c7e28SmrgAC_LANG_CASE( 10469880c7e28Smrg [C], [ 10470880c7e28Smrg CWARNFLAGS="$BASE_CFLAGS" 10471880c7e28Smrg if test "x$GCC" = xyes ; then 10472880c7e28Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 10473880c7e28Smrg fi 10474880c7e28Smrg AC_SUBST(CWARNFLAGS) 10475880c7e28Smrg ] 10476880c7e28Smrg) 1047772313efbSmrg]) # XORG_CWARNFLAGS 104780b661123Smrg 104790b661123Smrg# XORG_STRICT_OPTION 104800b661123Smrg# ----------------------- 104810b661123Smrg# Minimum version: 1.3.0 104820b661123Smrg# 10483880c7e28Smrg# Add configure option to enable strict compilation flags, such as treating 10484880c7e28Smrg# warnings as fatal errors. 10485880c7e28Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 10486880c7e28Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 10487880c7e28Smrg# 10488880c7e28Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 10489880c7e28Smrg# when strict compilation is unconditionally desired. 104900b661123SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 104910b661123SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 10492880c7e28SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 104930b661123Smrg 104940b661123SmrgAC_ARG_ENABLE(strict-compilation, 104950b661123Smrg AS_HELP_STRING([--enable-strict-compilation], 104960b661123Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 104970b661123Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 10498880c7e28Smrg 10499880c7e28SmrgAC_LANG_CASE( 10500880c7e28Smrg [C], [ 10501880c7e28Smrg define([PREFIX], [C]) 10502880c7e28Smrg ], 10503880c7e28Smrg [C++], [ 10504880c7e28Smrg define([PREFIX], [CXX]) 10505880c7e28Smrg ] 10506880c7e28Smrg) 10507880c7e28Smrg 10508880c7e28Smrg[STRICT_]PREFIX[FLAGS]="" 10509880c7e28SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 10510880c7e28SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 10511880c7e28Smrg 10512880c7e28Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 10513880c7e28Smrg# activate it with -Werror, so we add it here explicitly. 10514880c7e28SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 10515880c7e28Smrg 105160b661123Smrgif test "x$STRICT_COMPILE" = "xyes"; then 10517880c7e28Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 10518880c7e28Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 105190b661123Smrgfi 10520880c7e28SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 10521880c7e28SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10522880c7e28SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 105230b661123Smrg]) # XORG_STRICT_OPTION 105240b661123Smrg 105250b661123Smrg# XORG_DEFAULT_OPTIONS 105260b661123Smrg# -------------------- 105270b661123Smrg# Minimum version: 1.3.0 105280b661123Smrg# 105290b661123Smrg# Defines default options for X.Org modules. 105300b661123Smrg# 105310b661123SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 105320b661123SmrgAC_REQUIRE([AC_PROG_INSTALL]) 10533880c7e28SmrgXORG_COMPILER_FLAGS 105340b661123SmrgXORG_CWARNFLAGS 105350b661123SmrgXORG_STRICT_OPTION 105360b661123SmrgXORG_RELEASE_VERSION 105370b661123SmrgXORG_CHANGELOG 105380b661123SmrgXORG_INSTALL 105390b661123SmrgXORG_MANPAGE_SECTIONS 105400b661123Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 105410b661123Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 105420b661123Smrg]) # XORG_DEFAULT_OPTIONS 105430b661123Smrg 105440b661123Smrg# XORG_INSTALL() 105450b661123Smrg# ---------------- 105460b661123Smrg# Minimum version: 1.4.0 105470b661123Smrg# 105480b661123Smrg# Defines the variable INSTALL_CMD as the command to copy 105490b661123Smrg# INSTALL from $prefix/share/util-macros. 105500b661123Smrg# 105510b661123SmrgAC_DEFUN([XORG_INSTALL], [ 105520b661123SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 105530b661123Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 105540b661123SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 105550b661123Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 105560b661123Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 105570b661123Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 105580b661123SmrgAC_SUBST([INSTALL_CMD]) 105590b661123Smrg]) # XORG_INSTALL 10560bdcaa8d0Smrgdnl Copyright 2005 Red Hat, Inc 10561bdcaa8d0Smrgdnl 10562bdcaa8d0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10563bdcaa8d0Smrgdnl documentation for any purpose is hereby granted without fee, provided that 10564bdcaa8d0Smrgdnl the above copyright notice appear in all copies and that both that 10565bdcaa8d0Smrgdnl copyright notice and this permission notice appear in supporting 10566bdcaa8d0Smrgdnl documentation. 10567bdcaa8d0Smrgdnl 10568bdcaa8d0Smrgdnl The above copyright notice and this permission notice shall be included 10569bdcaa8d0Smrgdnl in all copies or substantial portions of the Software. 10570bdcaa8d0Smrgdnl 10571bdcaa8d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10572bdcaa8d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10573bdcaa8d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10574bdcaa8d0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10575bdcaa8d0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10576bdcaa8d0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10577bdcaa8d0Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 10578bdcaa8d0Smrgdnl 10579bdcaa8d0Smrgdnl Except as contained in this notice, the name of the copyright holders shall 10580bdcaa8d0Smrgdnl not be used in advertising or otherwise to promote the sale, use or 10581bdcaa8d0Smrgdnl other dealings in this Software without prior written authorization 10582bdcaa8d0Smrgdnl from the copyright holders. 10583bdcaa8d0Smrgdnl 10584bdcaa8d0Smrg 10585bdcaa8d0Smrg# XORG_RELEASE_VERSION 10586bdcaa8d0Smrg# -------------------- 105870b661123Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 10588bdcaa8d0Smrg 10589bdcaa8d0SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 10590bdcaa8d0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1059172313efbSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 10592bdcaa8d0Smrg [Major version of this package]) 1059372313efbSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 10594bdcaa8d0Smrg if test "x$PVM" = "x"; then 10595bdcaa8d0Smrg PVM="0" 10596bdcaa8d0Smrg fi 10597bdcaa8d0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 10598bdcaa8d0Smrg [$PVM], 10599bdcaa8d0Smrg [Minor version of this package]) 1060072313efbSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 10601bdcaa8d0Smrg if test "x$PVP" = "x"; then 10602bdcaa8d0Smrg PVP="0" 10603bdcaa8d0Smrg fi 10604bdcaa8d0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 10605bdcaa8d0Smrg [$PVP], 10606bdcaa8d0Smrg [Patch version of this package]) 10607bdcaa8d0Smrg]) 10608bdcaa8d0Smrg 1060972313efbSmrg# XORG_CHANGELOG() 1061072313efbSmrg# ---------------- 1061172313efbSmrg# Minimum version: 1.2.0 1061272313efbSmrg# 1061372313efbSmrg# Defines the variable CHANGELOG_CMD as the command to generate 1061472313efbSmrg# ChangeLog from git. 1061572313efbSmrg# 1061672313efbSmrg# 1061772313efbSmrgAC_DEFUN([XORG_CHANGELOG], [ 106180b661123SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 106190b661123Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 106200b661123Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1062172313efbSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1062272313efbSmrgAC_SUBST([CHANGELOG_CMD]) 1062372313efbSmrg]) # XORG_CHANGELOG 1062472313efbSmrg 106250b661123Smrgdnl Copyright 2005 Red Hat, Inc 106260b661123Smrgdnl 106270b661123Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 106280b661123Smrgdnl documentation for any purpose is hereby granted without fee, provided that 106290b661123Smrgdnl the above copyright notice appear in all copies and that both that 106300b661123Smrgdnl copyright notice and this permission notice appear in supporting 106310b661123Smrgdnl documentation. 106320b661123Smrgdnl 106330b661123Smrgdnl The above copyright notice and this permission notice shall be included 106340b661123Smrgdnl in all copies or substantial portions of the Software. 106350b661123Smrgdnl 106360b661123Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 106370b661123Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 106380b661123Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 106390b661123Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 106400b661123Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 106410b661123Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 106420b661123Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 106430b661123Smrgdnl 106440b661123Smrgdnl Except as contained in this notice, the name of the copyright holders shall 106450b661123Smrgdnl not be used in advertising or otherwise to promote the sale, use or 106460b661123Smrgdnl other dealings in this Software without prior written authorization 106470b661123Smrgdnl from the copyright holders. 106480b661123Smrgdnl 106490b661123Smrg 106500b661123Smrg# XORG_DRIVER_CHECK_EXT() 106510b661123Smrg# -------------------------- 106520b661123Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 106530b661123Smrg# is defined, then add $1 to $REQUIRED_MODULES. 106540b661123Smrg 106550b661123SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 106560b661123Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 106570b661123Smrg SAVE_CFLAGS="$CFLAGS" 106580b661123Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 106590b661123Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 106600b661123Smrg#include "xorg-server.h" 106610b661123Smrg#if !defined $1 106620b661123Smrg#error $1 not defined 106630b661123Smrg#endif 106640b661123Smrg ]])], 106650b661123Smrg [_EXT_CHECK=yes], 106660b661123Smrg [_EXT_CHECK=no]) 106670b661123Smrg CFLAGS="$SAVE_CFLAGS" 106680b661123Smrg AC_MSG_CHECKING([if $1 is defined]) 106690b661123Smrg AC_MSG_RESULT([$_EXT_CHECK]) 106700b661123Smrg if test "$_EXT_CHECK" != no; then 106710b661123Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 106720b661123Smrg fi 106730b661123Smrg]) 106740b661123Smrg 10675880c7e28Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 10676880c7e28Smrg# Foundation, Inc. 10677bdcaa8d0Smrg# 10678bdcaa8d0Smrg# This file is free software; the Free Software Foundation 10679bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 10680bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 10681bdcaa8d0Smrg 10682880c7e28Smrg# serial 1 10683880c7e28Smrg 10684bdcaa8d0Smrg# AM_AUTOMAKE_VERSION(VERSION) 10685bdcaa8d0Smrg# ---------------------------- 10686bdcaa8d0Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 10687bdcaa8d0Smrg# generated from the m4 files accompanying Automake X.Y. 1068872313efbSmrg# (This private macro should not be called outside this file.) 1068972313efbSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 1069096ce994aSmrg[am__api_version='1.11' 1069172313efbSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1069272313efbSmrgdnl require some minimum version. Point them to the right macro. 10693880c7e28Smrgm4_if([$1], [1.11.3], [], 1069472313efbSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1069572313efbSmrg]) 1069672313efbSmrg 1069772313efbSmrg# _AM_AUTOCONF_VERSION(VERSION) 1069872313efbSmrg# ----------------------------- 1069972313efbSmrg# aclocal traces this macro to find the Autoconf version. 1070072313efbSmrg# This is a private macro too. Using m4_define simplifies 1070172313efbSmrg# the logic in aclocal, which can simply ignore this definition. 1070272313efbSmrgm4_define([_AM_AUTOCONF_VERSION], []) 10703bdcaa8d0Smrg 10704bdcaa8d0Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 10705bdcaa8d0Smrg# ------------------------------- 1070672313efbSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1070772313efbSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 10708bdcaa8d0SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 10709880c7e28Smrg[AM_AUTOMAKE_VERSION([1.11.3])dnl 1071072313efbSmrgm4_ifndef([AC_AUTOCONF_VERSION], 1071172313efbSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1071272313efbSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 10713bdcaa8d0Smrg 10714bdcaa8d0Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 10715bdcaa8d0Smrg 10716880c7e28Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 10717bdcaa8d0Smrg# 10718bdcaa8d0Smrg# This file is free software; the Free Software Foundation 10719bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 10720bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 10721bdcaa8d0Smrg 10722880c7e28Smrg# serial 1 10723880c7e28Smrg 10724bdcaa8d0Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 10725bdcaa8d0Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 10726bdcaa8d0Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 10727bdcaa8d0Smrg# 10728bdcaa8d0Smrg# Of course, Automake must honor this variable whenever it calls a 10729bdcaa8d0Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 10730bdcaa8d0Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 10731bdcaa8d0Smrg# depending on how configure is run. This is pretty annoying, since 10732bdcaa8d0Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 10733bdcaa8d0Smrg# source directory, any form will work fine, but in subdirectories a 10734bdcaa8d0Smrg# relative path needs to be adjusted first. 10735bdcaa8d0Smrg# 10736bdcaa8d0Smrg# $ac_aux_dir/missing 10737bdcaa8d0Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 10738bdcaa8d0Smrg# $top_srcdir/$ac_aux_dir/missing 10739bdcaa8d0Smrg# fails if $ac_aux_dir is absolute, 10740bdcaa8d0Smrg# fails when called from a subdirectory in a VPATH build with 10741bdcaa8d0Smrg# a relative $ac_aux_dir 10742bdcaa8d0Smrg# 10743bdcaa8d0Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 10744bdcaa8d0Smrg# are both prefixed by $srcdir. In an in-source build this is usually 10745bdcaa8d0Smrg# harmless because $srcdir is `.', but things will broke when you 10746bdcaa8d0Smrg# start a VPATH build or use an absolute $srcdir. 10747bdcaa8d0Smrg# 10748bdcaa8d0Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 10749bdcaa8d0Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 10750bdcaa8d0Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 10751bdcaa8d0Smrg# and then we would define $MISSING as 10752bdcaa8d0Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 10753bdcaa8d0Smrg# This will work as long as MISSING is not called from configure, because 10754bdcaa8d0Smrg# unfortunately $(top_srcdir) has no meaning in configure. 10755bdcaa8d0Smrg# However there are other variables, like CC, which are often used in 10756bdcaa8d0Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 10757bdcaa8d0Smrg# 10758bdcaa8d0Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 10759bdcaa8d0Smrg# absolute PATH. The drawback is that using absolute paths prevent a 10760bdcaa8d0Smrg# configured tree to be moved without reconfiguration. 10761bdcaa8d0Smrg 10762bdcaa8d0SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 10763bdcaa8d0Smrg[dnl Rely on autoconf to set up CDPATH properly. 10764bdcaa8d0SmrgAC_PREREQ([2.50])dnl 10765bdcaa8d0Smrg# expand $ac_aux_dir to an absolute path 10766bdcaa8d0Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 10767bdcaa8d0Smrg]) 10768bdcaa8d0Smrg 10769bdcaa8d0Smrg# AM_CONDITIONAL -*- Autoconf -*- 10770bdcaa8d0Smrg 1077196ce994aSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 10772bdcaa8d0Smrg# Free Software Foundation, Inc. 10773bdcaa8d0Smrg# 10774bdcaa8d0Smrg# This file is free software; the Free Software Foundation 10775bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 10776bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 10777bdcaa8d0Smrg 1077896ce994aSmrg# serial 9 10779bdcaa8d0Smrg 10780bdcaa8d0Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 10781bdcaa8d0Smrg# ------------------------------------- 10782bdcaa8d0Smrg# Define a conditional. 10783bdcaa8d0SmrgAC_DEFUN([AM_CONDITIONAL], 10784bdcaa8d0Smrg[AC_PREREQ(2.52)dnl 10785bdcaa8d0Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 10786bdcaa8d0Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1078772313efbSmrgAC_SUBST([$1_TRUE])dnl 1078872313efbSmrgAC_SUBST([$1_FALSE])dnl 1078972313efbSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1079072313efbSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1079196ce994aSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 10792bdcaa8d0Smrgif $2; then 10793bdcaa8d0Smrg $1_TRUE= 10794bdcaa8d0Smrg $1_FALSE='#' 10795bdcaa8d0Smrgelse 10796bdcaa8d0Smrg $1_TRUE='#' 10797bdcaa8d0Smrg $1_FALSE= 10798bdcaa8d0Smrgfi 10799bdcaa8d0SmrgAC_CONFIG_COMMANDS_PRE( 10800bdcaa8d0Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 10801bdcaa8d0Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 10802bdcaa8d0SmrgUsually this means the macro was only invoked conditionally.]]) 10803bdcaa8d0Smrgfi])]) 10804bdcaa8d0Smrg 10805880c7e28Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 10806880c7e28Smrg# 2010, 2011 Free Software Foundation, Inc. 10807bdcaa8d0Smrg# 10808bdcaa8d0Smrg# This file is free software; the Free Software Foundation 10809bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 10810bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 10811bdcaa8d0Smrg 10812880c7e28Smrg# serial 12 10813bdcaa8d0Smrg 10814bdcaa8d0Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 10815bdcaa8d0Smrg# written in clear, in which case automake, when reading aclocal.m4, 10816bdcaa8d0Smrg# will think it sees a *use*, and therefore will trigger all it's 10817bdcaa8d0Smrg# C support machinery. Also note that it means that autoscan, seeing 10818bdcaa8d0Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 10819bdcaa8d0Smrg 10820bdcaa8d0Smrg 10821bdcaa8d0Smrg# _AM_DEPENDENCIES(NAME) 10822bdcaa8d0Smrg# ---------------------- 10823bdcaa8d0Smrg# See how the compiler implements dependency checking. 10824bdcaa8d0Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 10825bdcaa8d0Smrg# We try a few techniques and use that to set a single cache variable. 10826bdcaa8d0Smrg# 10827bdcaa8d0Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 10828bdcaa8d0Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 10829bdcaa8d0Smrg# dependency, and given that the user is not expected to run this macro, 10830bdcaa8d0Smrg# just rely on AC_PROG_CC. 10831bdcaa8d0SmrgAC_DEFUN([_AM_DEPENDENCIES], 10832bdcaa8d0Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 10833bdcaa8d0SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 10834bdcaa8d0SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 10835bdcaa8d0SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 10836bdcaa8d0Smrg 10837bdcaa8d0Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 10838bdcaa8d0Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 10839bdcaa8d0Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1084072313efbSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 10841bdcaa8d0Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 10842bdcaa8d0Smrg [depcc="$$1" am_compiler_list=]) 10843bdcaa8d0Smrg 10844bdcaa8d0SmrgAC_CACHE_CHECK([dependency style of $depcc], 10845bdcaa8d0Smrg [am_cv_$1_dependencies_compiler_type], 10846bdcaa8d0Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 10847bdcaa8d0Smrg # We make a subdir and do the tests there. Otherwise we can end up 10848bdcaa8d0Smrg # making bogus files that we don't know about and never remove. For 10849bdcaa8d0Smrg # instance it was reported that on HP-UX the gcc test will end up 10850bdcaa8d0Smrg # making a dummy file named `D' -- because `-MD' means `put the output 10851bdcaa8d0Smrg # in D'. 10852880c7e28Smrg rm -rf conftest.dir 10853bdcaa8d0Smrg mkdir conftest.dir 10854bdcaa8d0Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 10855bdcaa8d0Smrg # using a relative directory. 10856bdcaa8d0Smrg cp "$am_depcomp" conftest.dir 10857bdcaa8d0Smrg cd conftest.dir 10858bdcaa8d0Smrg # We will build objects and dependencies in a subdirectory because 10859bdcaa8d0Smrg # it helps to detect inapplicable dependency modes. For instance 10860bdcaa8d0Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 10861bdcaa8d0Smrg # side effect of compilation, but ICC will put the dependencies in 10862bdcaa8d0Smrg # the current directory while Tru64 will put them in the object 10863bdcaa8d0Smrg # directory. 10864bdcaa8d0Smrg mkdir sub 10865bdcaa8d0Smrg 10866bdcaa8d0Smrg am_cv_$1_dependencies_compiler_type=none 10867bdcaa8d0Smrg if test "$am_compiler_list" = ""; then 10868bdcaa8d0Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 10869bdcaa8d0Smrg fi 1087096ce994aSmrg am__universal=false 1087196ce994aSmrg m4_case([$1], [CC], 1087296ce994aSmrg [case " $depcc " in #( 1087396ce994aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 1087496ce994aSmrg esac], 1087596ce994aSmrg [CXX], 1087696ce994aSmrg [case " $depcc " in #( 1087796ce994aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 1087896ce994aSmrg esac]) 1087996ce994aSmrg 10880bdcaa8d0Smrg for depmode in $am_compiler_list; do 10881bdcaa8d0Smrg # Setup a source with many dependencies, because some compilers 10882bdcaa8d0Smrg # like to wrap large dependency lists on column 80 (with \), and 10883bdcaa8d0Smrg # we should not choose a depcomp mode which is confused by this. 10884bdcaa8d0Smrg # 10885bdcaa8d0Smrg # We need to recreate these files for each test, as the compiler may 10886bdcaa8d0Smrg # overwrite some of them when testing with obscure command lines. 10887bdcaa8d0Smrg # This happens at least with the AIX C compiler. 10888bdcaa8d0Smrg : > sub/conftest.c 10889bdcaa8d0Smrg for i in 1 2 3 4 5 6; do 10890bdcaa8d0Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 10891bdcaa8d0Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 10892bdcaa8d0Smrg # Solaris 8's {/usr,}/bin/sh. 10893bdcaa8d0Smrg touch sub/conftst$i.h 10894bdcaa8d0Smrg done 10895bdcaa8d0Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 10896bdcaa8d0Smrg 1089796ce994aSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 1089896ce994aSmrg # mode. It turns out that the SunPro C++ compiler does not properly 1089996ce994aSmrg # handle `-M -o', and we need to detect this. Also, some Intel 1090096ce994aSmrg # versions had trouble with output in subdirs 1090196ce994aSmrg am__obj=sub/conftest.${OBJEXT-o} 1090296ce994aSmrg am__minus_obj="-o $am__obj" 10903bdcaa8d0Smrg case $depmode in 1090496ce994aSmrg gcc) 1090596ce994aSmrg # This depmode causes a compiler race in universal mode. 1090696ce994aSmrg test "$am__universal" = false || continue 1090796ce994aSmrg ;; 10908bdcaa8d0Smrg nosideeffect) 10909bdcaa8d0Smrg # after this tag, mechanisms are not by side-effect, so they'll 10910bdcaa8d0Smrg # only be used when explicitly requested 10911bdcaa8d0Smrg if test "x$enable_dependency_tracking" = xyes; then 10912bdcaa8d0Smrg continue 10913bdcaa8d0Smrg else 10914bdcaa8d0Smrg break 10915bdcaa8d0Smrg fi 10916bdcaa8d0Smrg ;; 10917880c7e28Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1091896ce994aSmrg # This compiler won't grok `-c -o', but also, the minuso test has 1091996ce994aSmrg # not run yet. These depmodes are late enough in the game, and 1092096ce994aSmrg # so weak that their functioning should not be impacted. 1092196ce994aSmrg am__obj=conftest.${OBJEXT-o} 1092296ce994aSmrg am__minus_obj= 1092396ce994aSmrg ;; 10924bdcaa8d0Smrg none) break ;; 10925bdcaa8d0Smrg esac 10926bdcaa8d0Smrg if depmode=$depmode \ 1092796ce994aSmrg source=sub/conftest.c object=$am__obj \ 10928bdcaa8d0Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1092996ce994aSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 10930bdcaa8d0Smrg >/dev/null 2>conftest.err && 1093172313efbSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 10932bdcaa8d0Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1093396ce994aSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 10934bdcaa8d0Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 10935bdcaa8d0Smrg # icc doesn't choke on unknown options, it will just issue warnings 10936bdcaa8d0Smrg # or remarks (even with -Werror). So we grep stderr for any message 10937bdcaa8d0Smrg # that says an option was ignored or not supported. 10938bdcaa8d0Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 10939bdcaa8d0Smrg # icc: Command line warning: ignoring option '-M'; no argument required 10940bdcaa8d0Smrg # The diagnosis changed in icc 8.0: 10941bdcaa8d0Smrg # icc: Command line remark: option '-MP' not supported 10942bdcaa8d0Smrg if (grep 'ignoring option' conftest.err || 10943bdcaa8d0Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 10944bdcaa8d0Smrg am_cv_$1_dependencies_compiler_type=$depmode 10945bdcaa8d0Smrg break 10946bdcaa8d0Smrg fi 10947bdcaa8d0Smrg fi 10948bdcaa8d0Smrg done 10949bdcaa8d0Smrg 10950bdcaa8d0Smrg cd .. 10951bdcaa8d0Smrg rm -rf conftest.dir 10952bdcaa8d0Smrgelse 10953bdcaa8d0Smrg am_cv_$1_dependencies_compiler_type=none 10954bdcaa8d0Smrgfi 10955bdcaa8d0Smrg]) 10956bdcaa8d0SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 10957bdcaa8d0SmrgAM_CONDITIONAL([am__fastdep$1], [ 10958bdcaa8d0Smrg test "x$enable_dependency_tracking" != xno \ 10959bdcaa8d0Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 10960bdcaa8d0Smrg]) 10961bdcaa8d0Smrg 10962bdcaa8d0Smrg 10963bdcaa8d0Smrg# AM_SET_DEPDIR 10964bdcaa8d0Smrg# ------------- 10965bdcaa8d0Smrg# Choose a directory name for dependency files. 10966bdcaa8d0Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 10967bdcaa8d0SmrgAC_DEFUN([AM_SET_DEPDIR], 10968bdcaa8d0Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 10969bdcaa8d0SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 10970bdcaa8d0Smrg]) 10971bdcaa8d0Smrg 10972bdcaa8d0Smrg 10973bdcaa8d0Smrg# AM_DEP_TRACK 10974bdcaa8d0Smrg# ------------ 10975bdcaa8d0SmrgAC_DEFUN([AM_DEP_TRACK], 10976bdcaa8d0Smrg[AC_ARG_ENABLE(dependency-tracking, 10977bdcaa8d0Smrg[ --disable-dependency-tracking speeds up one-time build 10978bdcaa8d0Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 10979bdcaa8d0Smrgif test "x$enable_dependency_tracking" != xno; then 10980bdcaa8d0Smrg am_depcomp="$ac_aux_dir/depcomp" 10981bdcaa8d0Smrg AMDEPBACKSLASH='\' 10982880c7e28Smrg am__nodep='_no' 10983bdcaa8d0Smrgfi 10984bdcaa8d0SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1098572313efbSmrgAC_SUBST([AMDEPBACKSLASH])dnl 1098672313efbSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 10987880c7e28SmrgAC_SUBST([am__nodep])dnl 10988880c7e28Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 10989bdcaa8d0Smrg]) 10990bdcaa8d0Smrg 10991bdcaa8d0Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 10992bdcaa8d0Smrg 1099372313efbSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 10994bdcaa8d0Smrg# Free Software Foundation, Inc. 10995bdcaa8d0Smrg# 10996bdcaa8d0Smrg# This file is free software; the Free Software Foundation 10997bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 10998bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 10999bdcaa8d0Smrg 1100096ce994aSmrg#serial 5 11001bdcaa8d0Smrg 11002bdcaa8d0Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11003bdcaa8d0Smrg# ------------------------------ 11004bdcaa8d0SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1100596ce994aSmrg[{ 1100696ce994aSmrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 1100796ce994aSmrg # are listed without --file. Let's play safe and only enable the eval 1100896ce994aSmrg # if we detect the quoting. 1100996ce994aSmrg case $CONFIG_FILES in 1101096ce994aSmrg *\'*) eval set x "$CONFIG_FILES" ;; 1101196ce994aSmrg *) set x $CONFIG_FILES ;; 1101296ce994aSmrg esac 1101396ce994aSmrg shift 1101496ce994aSmrg for mf 1101596ce994aSmrg do 1101696ce994aSmrg # Strip MF so we end up with the name of the file. 1101796ce994aSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 1101896ce994aSmrg # Check whether this is an Automake generated Makefile or not. 1101996ce994aSmrg # We used to match only the files named `Makefile.in', but 1102096ce994aSmrg # some people rename them; so instead we look at the file content. 1102196ce994aSmrg # Grep'ing the first line is not enough: some people post-process 1102296ce994aSmrg # each Makefile.in and add a new line on top of each file to say so. 1102396ce994aSmrg # Grep'ing the whole file is not good either: AIX grep has a line 1102496ce994aSmrg # limit of 2048, but all sed's we know have understand at least 4000. 1102596ce994aSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 1102696ce994aSmrg dirpart=`AS_DIRNAME("$mf")` 1102796ce994aSmrg else 1102896ce994aSmrg continue 1102996ce994aSmrg fi 1103096ce994aSmrg # Extract the definition of DEPDIR, am__include, and am__quote 1103196ce994aSmrg # from the Makefile without running `make'. 1103296ce994aSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 1103396ce994aSmrg test -z "$DEPDIR" && continue 1103496ce994aSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 1103596ce994aSmrg test -z "am__include" && continue 1103696ce994aSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 1103796ce994aSmrg # When using ansi2knr, U may be empty or an underscore; expand it 1103896ce994aSmrg U=`sed -n 's/^U = //p' < "$mf"` 1103996ce994aSmrg # Find all dependency output files, they are included files with 1104096ce994aSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 1104196ce994aSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 1104296ce994aSmrg # expansion. 1104396ce994aSmrg for file in `sed -n " 1104496ce994aSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 1104596ce994aSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 1104696ce994aSmrg # Make sure the directory exists. 1104796ce994aSmrg test -f "$dirpart/$file" && continue 1104896ce994aSmrg fdir=`AS_DIRNAME(["$file"])` 1104996ce994aSmrg AS_MKDIR_P([$dirpart/$fdir]) 1105096ce994aSmrg # echo "creating $dirpart/$file" 1105196ce994aSmrg echo '# dummy' > "$dirpart/$file" 1105296ce994aSmrg done 11053bdcaa8d0Smrg done 1105496ce994aSmrg} 11055bdcaa8d0Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11056bdcaa8d0Smrg 11057bdcaa8d0Smrg 11058bdcaa8d0Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11059bdcaa8d0Smrg# ----------------------------- 11060bdcaa8d0Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 11061bdcaa8d0Smrg# 11062bdcaa8d0Smrg# This code is only required when automatic dependency tracking 11063bdcaa8d0Smrg# is enabled. FIXME. This creates each `.P' file that we will 11064bdcaa8d0Smrg# need in order to bootstrap the dependency handling code. 11065bdcaa8d0SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11066bdcaa8d0Smrg[AC_CONFIG_COMMANDS([depfiles], 11067bdcaa8d0Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11068bdcaa8d0Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11069bdcaa8d0Smrg]) 11070bdcaa8d0Smrg 11071bdcaa8d0Smrg# Do all the work for Automake. -*- Autoconf -*- 11072bdcaa8d0Smrg 1107372313efbSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 1107496ce994aSmrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 11075bdcaa8d0Smrg# 11076bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11077bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11078bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11079bdcaa8d0Smrg 1108096ce994aSmrg# serial 16 11081bdcaa8d0Smrg 11082bdcaa8d0Smrg# This macro actually does too much. Some checks are only needed if 11083bdcaa8d0Smrg# your package does certain things. But this isn't really a big deal. 11084bdcaa8d0Smrg 11085bdcaa8d0Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11086bdcaa8d0Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 11087bdcaa8d0Smrg# ----------------------------------------------- 11088bdcaa8d0Smrg# The call with PACKAGE and VERSION arguments is the old style 11089bdcaa8d0Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11090bdcaa8d0Smrg# and VERSION should now be passed to AC_INIT and removed from 11091bdcaa8d0Smrg# the call to AM_INIT_AUTOMAKE. 11092bdcaa8d0Smrg# We support both call styles for the transition. After 11093bdcaa8d0Smrg# the next Automake release, Autoconf can make the AC_INIT 11094bdcaa8d0Smrg# arguments mandatory, and then we can depend on a new Autoconf 11095bdcaa8d0Smrg# release and drop the old call support. 11096bdcaa8d0SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 1109796ce994aSmrg[AC_PREREQ([2.62])dnl 11098bdcaa8d0Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11099bdcaa8d0Smrgdnl the ones we care about. 11100bdcaa8d0Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11101bdcaa8d0SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11102bdcaa8d0SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 1110372313efbSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 1110472313efbSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1110572313efbSmrg # is not polluted with repeated "-I." 1110672313efbSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1110772313efbSmrg # test to see if srcdir already configured 1110872313efbSmrg if test -f $srcdir/config.status; then 1110972313efbSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1111072313efbSmrg fi 11111bdcaa8d0Smrgfi 11112bdcaa8d0Smrg 11113bdcaa8d0Smrg# test whether we have cygpath 11114bdcaa8d0Smrgif test -z "$CYGPATH_W"; then 11115bdcaa8d0Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 11116bdcaa8d0Smrg CYGPATH_W='cygpath -w' 11117bdcaa8d0Smrg else 11118bdcaa8d0Smrg CYGPATH_W=echo 11119bdcaa8d0Smrg fi 11120bdcaa8d0Smrgfi 11121bdcaa8d0SmrgAC_SUBST([CYGPATH_W]) 11122bdcaa8d0Smrg 11123bdcaa8d0Smrg# Define the identity of the package. 11124bdcaa8d0Smrgdnl Distinguish between old-style and new-style calls. 11125bdcaa8d0Smrgm4_ifval([$2], 11126bdcaa8d0Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11127bdcaa8d0Smrg AC_SUBST([PACKAGE], [$1])dnl 11128bdcaa8d0Smrg AC_SUBST([VERSION], [$2])], 11129bdcaa8d0Smrg[_AM_SET_OPTIONS([$1])dnl 1113072313efbSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1113172313efbSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 1113272313efbSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11133bdcaa8d0Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11134bdcaa8d0Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11135bdcaa8d0Smrg 11136bdcaa8d0Smrg_AM_IF_OPTION([no-define],, 11137bdcaa8d0Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 11138bdcaa8d0Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 11139bdcaa8d0Smrg 11140bdcaa8d0Smrg# Some tools Automake needs. 11141bdcaa8d0SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11142bdcaa8d0SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11143bdcaa8d0SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 11144bdcaa8d0SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 11145bdcaa8d0SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 11146bdcaa8d0SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 11147bdcaa8d0SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 1114896ce994aSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1114996ce994aSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11150bdcaa8d0SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 11151bdcaa8d0Smrg# We need awk for the "check" target. The system "awk" is bad on 11152bdcaa8d0Smrg# some platforms. 11153bdcaa8d0SmrgAC_REQUIRE([AC_PROG_AWK])dnl 11154bdcaa8d0SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11155bdcaa8d0SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11156bdcaa8d0Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1115796ce994aSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1115896ce994aSmrg [_AM_PROG_TAR([v7])])]) 11159bdcaa8d0Smrg_AM_IF_OPTION([no-dependencies],, 11160bdcaa8d0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1116196ce994aSmrg [_AM_DEPENDENCIES(CC)], 1116296ce994aSmrg [define([AC_PROG_CC], 1116396ce994aSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 11164bdcaa8d0SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1116596ce994aSmrg [_AM_DEPENDENCIES(CXX)], 1116696ce994aSmrg [define([AC_PROG_CXX], 1116796ce994aSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 1116872313efbSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 1116996ce994aSmrg [_AM_DEPENDENCIES(OBJC)], 1117096ce994aSmrg [define([AC_PROG_OBJC], 1117196ce994aSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 11172bdcaa8d0Smrg]) 1117396ce994aSmrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 1117496ce994aSmrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 1117596ce994aSmrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 1117696ce994aSmrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 1117796ce994aSmrgAC_CONFIG_COMMANDS_PRE(dnl 1117896ce994aSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 1117996ce994aSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11180bdcaa8d0Smrg]) 11181bdcaa8d0Smrg 1118296ce994aSmrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1118396ce994aSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1118496ce994aSmrgdnl mangled by Autoconf and run in a shell conditional statement. 1118596ce994aSmrgm4_define([_AC_COMPILER_EXEEXT], 1118696ce994aSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1118796ce994aSmrg 11188bdcaa8d0Smrg 11189bdcaa8d0Smrg# When config.status generates a header, we must update the stamp-h file. 11190bdcaa8d0Smrg# This file resides in the same directory as the config header 11191bdcaa8d0Smrg# that is generated. The stamp files are numbered to have different names. 11192bdcaa8d0Smrg 11193bdcaa8d0Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11194bdcaa8d0Smrg# loop where config.status creates the headers, so we can generate 11195bdcaa8d0Smrg# our stamp files there. 11196bdcaa8d0SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11197bdcaa8d0Smrg[# Compute $1's index in $config_headers. 1119872313efbSmrg_am_arg=$1 11199bdcaa8d0Smrg_am_stamp_count=1 11200bdcaa8d0Smrgfor _am_header in $config_headers :; do 11201bdcaa8d0Smrg case $_am_header in 1120272313efbSmrg $_am_arg | $_am_arg:* ) 11203bdcaa8d0Smrg break ;; 11204bdcaa8d0Smrg * ) 11205bdcaa8d0Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11206bdcaa8d0Smrg esac 11207bdcaa8d0Smrgdone 1120872313efbSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11209bdcaa8d0Smrg 11210880c7e28Smrg# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 11211880c7e28Smrg# Inc. 11212bdcaa8d0Smrg# 11213bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11214bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11215bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11216bdcaa8d0Smrg 11217880c7e28Smrg# serial 1 11218880c7e28Smrg 11219bdcaa8d0Smrg# AM_PROG_INSTALL_SH 11220bdcaa8d0Smrg# ------------------ 11221bdcaa8d0Smrg# Define $install_sh. 11222bdcaa8d0SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11223bdcaa8d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1122496ce994aSmrgif test x"${install_sh}" != xset; then 1122596ce994aSmrg case $am_aux_dir in 1122696ce994aSmrg *\ * | *\ *) 1122796ce994aSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1122896ce994aSmrg *) 1122996ce994aSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 1123096ce994aSmrg esac 1123196ce994aSmrgfi 11232bdcaa8d0SmrgAC_SUBST(install_sh)]) 11233bdcaa8d0Smrg 11234bdcaa8d0Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 11235bdcaa8d0Smrg# 11236bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11237bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11238bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11239bdcaa8d0Smrg 11240bdcaa8d0Smrg# serial 2 11241bdcaa8d0Smrg 11242bdcaa8d0Smrg# Check whether the underlying file-system supports filenames 11243bdcaa8d0Smrg# with a leading dot. For instance MS-DOS doesn't. 11244bdcaa8d0SmrgAC_DEFUN([AM_SET_LEADING_DOT], 11245bdcaa8d0Smrg[rm -rf .tst 2>/dev/null 11246bdcaa8d0Smrgmkdir .tst 2>/dev/null 11247bdcaa8d0Smrgif test -d .tst; then 11248bdcaa8d0Smrg am__leading_dot=. 11249bdcaa8d0Smrgelse 11250bdcaa8d0Smrg am__leading_dot=_ 11251bdcaa8d0Smrgfi 11252bdcaa8d0Smrgrmdir .tst 2>/dev/null 11253bdcaa8d0SmrgAC_SUBST([am__leading_dot])]) 11254bdcaa8d0Smrg 11255bdcaa8d0Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11256bdcaa8d0Smrg# From Jim Meyering 11257bdcaa8d0Smrg 11258880c7e28Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 11259880c7e28Smrg# 2011 Free Software Foundation, Inc. 11260bdcaa8d0Smrg# 11261bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11262bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11263bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11264bdcaa8d0Smrg 1126596ce994aSmrg# serial 5 11266bdcaa8d0Smrg 1126796ce994aSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 1126896ce994aSmrg# ---------------------------------- 1126996ce994aSmrg# Control maintainer-specific portions of Makefiles. 1127096ce994aSmrg# Default is to disable them, unless `enable' is passed literally. 1127196ce994aSmrg# For symmetry, `disable' may be passed as well. Anyway, the user 1127296ce994aSmrg# can override the default with the --enable/--disable switch. 11273bdcaa8d0SmrgAC_DEFUN([AM_MAINTAINER_MODE], 1127496ce994aSmrg[m4_case(m4_default([$1], [disable]), 1127596ce994aSmrg [enable], [m4_define([am_maintainer_other], [disable])], 1127696ce994aSmrg [disable], [m4_define([am_maintainer_other], [enable])], 1127796ce994aSmrg [m4_define([am_maintainer_other], [enable]) 1127896ce994aSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11279880c7e28SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 1128096ce994aSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 1128196ce994aSmrg AC_ARG_ENABLE([maintainer-mode], 1128296ce994aSmrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 11283bdcaa8d0Smrg (and sometimes confusing) to the casual installer], 1128496ce994aSmrg [USE_MAINTAINER_MODE=$enableval], 1128596ce994aSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11286bdcaa8d0Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1128796ce994aSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11288bdcaa8d0Smrg MAINT=$MAINTAINER_MODE_TRUE 1128996ce994aSmrg AC_SUBST([MAINT])dnl 11290bdcaa8d0Smrg] 11291bdcaa8d0Smrg) 11292bdcaa8d0Smrg 11293bdcaa8d0SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 11294bdcaa8d0Smrg 11295bdcaa8d0Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11296bdcaa8d0Smrg 1129796ce994aSmrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 11298bdcaa8d0Smrg# 11299bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11300bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11301bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11302bdcaa8d0Smrg 1130396ce994aSmrg# serial 4 11304bdcaa8d0Smrg 11305bdcaa8d0Smrg# AM_MAKE_INCLUDE() 11306bdcaa8d0Smrg# ----------------- 11307bdcaa8d0Smrg# Check to see how make treats includes. 11308bdcaa8d0SmrgAC_DEFUN([AM_MAKE_INCLUDE], 11309bdcaa8d0Smrg[am_make=${MAKE-make} 11310bdcaa8d0Smrgcat > confinc << 'END' 11311bdcaa8d0Smrgam__doit: 1131296ce994aSmrg @echo this is the am__doit target 11313bdcaa8d0Smrg.PHONY: am__doit 11314bdcaa8d0SmrgEND 11315bdcaa8d0Smrg# If we don't find an include directive, just comment out the code. 11316bdcaa8d0SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11317bdcaa8d0Smrgam__include="#" 11318bdcaa8d0Smrgam__quote= 11319bdcaa8d0Smrg_am_result=none 11320bdcaa8d0Smrg# First try GNU make style include. 11321bdcaa8d0Smrgecho "include confinc" > confmf 1132296ce994aSmrg# Ignore all kinds of additional output from `make'. 1132396ce994aSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 1132496ce994aSmrg*the\ am__doit\ target*) 1132596ce994aSmrg am__include=include 1132696ce994aSmrg am__quote= 1132796ce994aSmrg _am_result=GNU 1132896ce994aSmrg ;; 1132996ce994aSmrgesac 11330bdcaa8d0Smrg# Now try BSD make style include. 11331bdcaa8d0Smrgif test "$am__include" = "#"; then 11332bdcaa8d0Smrg echo '.include "confinc"' > confmf 1133396ce994aSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 1133496ce994aSmrg *the\ am__doit\ target*) 1133596ce994aSmrg am__include=.include 1133696ce994aSmrg am__quote="\"" 1133796ce994aSmrg _am_result=BSD 1133896ce994aSmrg ;; 1133996ce994aSmrg esac 11340bdcaa8d0Smrgfi 11341bdcaa8d0SmrgAC_SUBST([am__include]) 11342bdcaa8d0SmrgAC_SUBST([am__quote]) 11343bdcaa8d0SmrgAC_MSG_RESULT([$_am_result]) 11344bdcaa8d0Smrgrm -f confinc confmf 11345bdcaa8d0Smrg]) 11346bdcaa8d0Smrg 11347bdcaa8d0Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11348bdcaa8d0Smrg 1134996ce994aSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 11350bdcaa8d0Smrg# Free Software Foundation, Inc. 11351bdcaa8d0Smrg# 11352bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11353bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11354bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11355bdcaa8d0Smrg 1135696ce994aSmrg# serial 6 11357bdcaa8d0Smrg 11358bdcaa8d0Smrg# AM_MISSING_PROG(NAME, PROGRAM) 11359bdcaa8d0Smrg# ------------------------------ 11360bdcaa8d0SmrgAC_DEFUN([AM_MISSING_PROG], 11361bdcaa8d0Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11362bdcaa8d0Smrg$1=${$1-"${am_missing_run}$2"} 11363bdcaa8d0SmrgAC_SUBST($1)]) 11364bdcaa8d0Smrg 11365bdcaa8d0Smrg 11366bdcaa8d0Smrg# AM_MISSING_HAS_RUN 11367bdcaa8d0Smrg# ------------------ 11368bdcaa8d0Smrg# Define MISSING if not defined so far and test if it supports --run. 11369bdcaa8d0Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 11370bdcaa8d0SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11371bdcaa8d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1137272313efbSmrgAC_REQUIRE_AUX_FILE([missing])dnl 1137396ce994aSmrgif test x"${MISSING+set}" != xset; then 1137496ce994aSmrg case $am_aux_dir in 1137596ce994aSmrg *\ * | *\ *) 1137696ce994aSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1137796ce994aSmrg *) 1137896ce994aSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 1137996ce994aSmrg esac 1138096ce994aSmrgfi 11381bdcaa8d0Smrg# Use eval to expand $SHELL 11382bdcaa8d0Smrgif eval "$MISSING --run true"; then 11383bdcaa8d0Smrg am_missing_run="$MISSING --run " 11384bdcaa8d0Smrgelse 11385bdcaa8d0Smrg am_missing_run= 11386bdcaa8d0Smrg AC_MSG_WARN([`missing' script is too old or missing]) 11387bdcaa8d0Smrgfi 11388bdcaa8d0Smrg]) 11389bdcaa8d0Smrg 11390880c7e28Smrg# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 11391880c7e28Smrg# Inc. 11392bdcaa8d0Smrg# 11393bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11394bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11395bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11396bdcaa8d0Smrg 11397880c7e28Smrg# serial 1 11398880c7e28Smrg 11399bdcaa8d0Smrg# AM_PROG_MKDIR_P 11400bdcaa8d0Smrg# --------------- 1140172313efbSmrg# Check for `mkdir -p'. 11402bdcaa8d0SmrgAC_DEFUN([AM_PROG_MKDIR_P], 1140372313efbSmrg[AC_PREREQ([2.60])dnl 1140472313efbSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1140572313efbSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 1140672313efbSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 1140772313efbSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 1140872313efbSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 1140972313efbSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 1141072313efbSmrgdnl adjustment using top_builddir (which is defined more often than 1141172313efbSmrgdnl MKDIR_P). 1141272313efbSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 1141372313efbSmrgcase $mkdir_p in 1141472313efbSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 1141572313efbSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 1141672313efbSmrgesac 1141772313efbSmrg]) 11418bdcaa8d0Smrg 11419bdcaa8d0Smrg# Helper functions for option handling. -*- Autoconf -*- 11420bdcaa8d0Smrg 11421880c7e28Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 11422880c7e28Smrg# Foundation, Inc. 11423bdcaa8d0Smrg# 11424bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11425bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11426bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11427bdcaa8d0Smrg 11428880c7e28Smrg# serial 5 11429bdcaa8d0Smrg 11430bdcaa8d0Smrg# _AM_MANGLE_OPTION(NAME) 11431bdcaa8d0Smrg# ----------------------- 11432bdcaa8d0SmrgAC_DEFUN([_AM_MANGLE_OPTION], 11433bdcaa8d0Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11434bdcaa8d0Smrg 11435bdcaa8d0Smrg# _AM_SET_OPTION(NAME) 11436880c7e28Smrg# -------------------- 11437bdcaa8d0Smrg# Set option NAME. Presently that only means defining a flag for this option. 11438bdcaa8d0SmrgAC_DEFUN([_AM_SET_OPTION], 11439bdcaa8d0Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 11440bdcaa8d0Smrg 11441bdcaa8d0Smrg# _AM_SET_OPTIONS(OPTIONS) 11442880c7e28Smrg# ------------------------ 11443bdcaa8d0Smrg# OPTIONS is a space-separated list of Automake options. 11444bdcaa8d0SmrgAC_DEFUN([_AM_SET_OPTIONS], 1144572313efbSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11446bdcaa8d0Smrg 11447bdcaa8d0Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11448bdcaa8d0Smrg# ------------------------------------------- 11449bdcaa8d0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11450bdcaa8d0SmrgAC_DEFUN([_AM_IF_OPTION], 11451bdcaa8d0Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11452bdcaa8d0Smrg 11453bdcaa8d0Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 11454bdcaa8d0Smrg 1145596ce994aSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 11456bdcaa8d0Smrg# Free Software Foundation, Inc. 11457bdcaa8d0Smrg# 11458bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11459bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11460bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11461bdcaa8d0Smrg 1146296ce994aSmrg# serial 5 11463bdcaa8d0Smrg 11464bdcaa8d0Smrg# AM_SANITY_CHECK 11465bdcaa8d0Smrg# --------------- 11466bdcaa8d0SmrgAC_DEFUN([AM_SANITY_CHECK], 11467bdcaa8d0Smrg[AC_MSG_CHECKING([whether build environment is sane]) 11468bdcaa8d0Smrg# Just in case 11469bdcaa8d0Smrgsleep 1 11470bdcaa8d0Smrgecho timestamp > conftest.file 1147196ce994aSmrg# Reject unsafe characters in $srcdir or the absolute working directory 1147296ce994aSmrg# name. Accept space and tab only in the latter. 1147396ce994aSmrgam_lf=' 1147496ce994aSmrg' 1147596ce994aSmrgcase `pwd` in 1147696ce994aSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 1147796ce994aSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 1147896ce994aSmrgesac 1147996ce994aSmrgcase $srcdir in 1148096ce994aSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1148196ce994aSmrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 1148296ce994aSmrgesac 1148396ce994aSmrg 11484bdcaa8d0Smrg# Do `set' in a subshell so we don't clobber the current shell's 11485bdcaa8d0Smrg# arguments. Must try -L first in case configure is actually a 11486bdcaa8d0Smrg# symlink; some systems play weird games with the mod time of symlinks 11487bdcaa8d0Smrg# (eg FreeBSD returns the mod time of the symlink's containing 11488bdcaa8d0Smrg# directory). 11489bdcaa8d0Smrgif ( 1149096ce994aSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 11491bdcaa8d0Smrg if test "$[*]" = "X"; then 11492bdcaa8d0Smrg # -L didn't work. 1149396ce994aSmrg set X `ls -t "$srcdir/configure" conftest.file` 11494bdcaa8d0Smrg fi 11495bdcaa8d0Smrg rm -f conftest.file 11496bdcaa8d0Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 11497bdcaa8d0Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 11498bdcaa8d0Smrg 11499bdcaa8d0Smrg # If neither matched, then we have a broken ls. This can happen 11500bdcaa8d0Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 11501bdcaa8d0Smrg # broken ls alias from the environment. This has actually 11502bdcaa8d0Smrg # happened. Such a system could not be considered "sane". 11503bdcaa8d0Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 11504bdcaa8d0Smrgalias in your environment]) 11505bdcaa8d0Smrg fi 11506bdcaa8d0Smrg 11507bdcaa8d0Smrg test "$[2]" = conftest.file 11508bdcaa8d0Smrg ) 11509bdcaa8d0Smrgthen 11510bdcaa8d0Smrg # Ok. 11511bdcaa8d0Smrg : 11512bdcaa8d0Smrgelse 11513bdcaa8d0Smrg AC_MSG_ERROR([newly created file is older than distributed files! 11514bdcaa8d0SmrgCheck your system clock]) 11515bdcaa8d0Smrgfi 11516bdcaa8d0SmrgAC_MSG_RESULT(yes)]) 11517bdcaa8d0Smrg 11518880c7e28Smrg# Copyright (C) 2009, 2011 Free Software Foundation, Inc. 115190b661123Smrg# 115200b661123Smrg# This file is free software; the Free Software Foundation 115210b661123Smrg# gives unlimited permission to copy and/or distribute it, 115220b661123Smrg# with or without modifications, as long as this notice is preserved. 115230b661123Smrg 11524880c7e28Smrg# serial 2 115250b661123Smrg 115260b661123Smrg# AM_SILENT_RULES([DEFAULT]) 115270b661123Smrg# -------------------------- 115280b661123Smrg# Enable less verbose build rules; with the default set to DEFAULT 115290b661123Smrg# (`yes' being less verbose, `no' or empty being verbose). 115300b661123SmrgAC_DEFUN([AM_SILENT_RULES], 115310b661123Smrg[AC_ARG_ENABLE([silent-rules], 115320b661123Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 115330b661123Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 115340b661123Smrgcase $enable_silent_rules in 115350b661123Smrgyes) AM_DEFAULT_VERBOSITY=0;; 115360b661123Smrgno) AM_DEFAULT_VERBOSITY=1;; 115370b661123Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 115380b661123Smrgesac 11539880c7e28Smrgdnl 11540880c7e28Smrgdnl A few `make' implementations (e.g., NonStop OS and NextStep) 11541880c7e28Smrgdnl do not support nested variable expansions. 11542880c7e28Smrgdnl See automake bug#9928 and bug#10237. 11543880c7e28Smrgam_make=${MAKE-make} 11544880c7e28SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 11545880c7e28Smrg [am_cv_make_support_nested_variables], 11546880c7e28Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 11547880c7e28SmrgBAR0=false 11548880c7e28SmrgBAR1=true 11549880c7e28SmrgV=1 11550880c7e28Smrgam__doit: 11551880c7e28Smrg @$(TRUE) 11552880c7e28Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 11553880c7e28Smrg am_cv_make_support_nested_variables=yes 11554880c7e28Smrgelse 11555880c7e28Smrg am_cv_make_support_nested_variables=no 11556880c7e28Smrgfi]) 11557880c7e28Smrgif test $am_cv_make_support_nested_variables = yes; then 11558880c7e28Smrg dnl Using `$V' instead of `$(V)' breaks IRIX make. 11559880c7e28Smrg AM_V='$(V)' 11560880c7e28Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 11561880c7e28Smrgelse 11562880c7e28Smrg AM_V=$AM_DEFAULT_VERBOSITY 11563880c7e28Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 11564880c7e28Smrgfi 11565880c7e28SmrgAC_SUBST([AM_V])dnl 11566880c7e28SmrgAM_SUBST_NOTMAKE([AM_V])dnl 11567880c7e28SmrgAC_SUBST([AM_DEFAULT_V])dnl 11568880c7e28SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 115690b661123SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 115700b661123SmrgAM_BACKSLASH='\' 115710b661123SmrgAC_SUBST([AM_BACKSLASH])dnl 115720b661123Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 115730b661123Smrg]) 115740b661123Smrg 11575880c7e28Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 11576bdcaa8d0Smrg# 11577bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11578bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11579bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11580bdcaa8d0Smrg 11581880c7e28Smrg# serial 1 11582880c7e28Smrg 11583bdcaa8d0Smrg# AM_PROG_INSTALL_STRIP 11584bdcaa8d0Smrg# --------------------- 11585bdcaa8d0Smrg# One issue with vendor `install' (even GNU) is that you can't 11586bdcaa8d0Smrg# specify the program used to strip binaries. This is especially 11587bdcaa8d0Smrg# annoying in cross-compiling environments, where the build's strip 11588bdcaa8d0Smrg# is unlikely to handle the host's binaries. 11589bdcaa8d0Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 11590bdcaa8d0Smrg# always use install-sh in `make install-strip', and initialize 11591bdcaa8d0Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 11592bdcaa8d0SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 11593bdcaa8d0Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11594bdcaa8d0Smrg# Installed binaries are usually stripped using `strip' when the user 11595bdcaa8d0Smrg# run `make install-strip'. However `strip' might not be the right 11596bdcaa8d0Smrg# tool to use in cross-compilation environments, therefore Automake 11597bdcaa8d0Smrg# will honor the `STRIP' environment variable to overrule this program. 11598bdcaa8d0Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 11599bdcaa8d0Smrgif test "$cross_compiling" != no; then 11600bdcaa8d0Smrg AC_CHECK_TOOL([STRIP], [strip], :) 11601bdcaa8d0Smrgfi 1160272313efbSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 11603bdcaa8d0SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 11604bdcaa8d0Smrg 11605880c7e28Smrg# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 1160672313efbSmrg# 1160772313efbSmrg# This file is free software; the Free Software Foundation 1160872313efbSmrg# gives unlimited permission to copy and/or distribute it, 1160972313efbSmrg# with or without modifications, as long as this notice is preserved. 1161072313efbSmrg 11611880c7e28Smrg# serial 3 1161296ce994aSmrg 1161372313efbSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1161472313efbSmrg# --------------------------- 1161572313efbSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1161672313efbSmrg# This macro is traced by Automake. 1161772313efbSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1161872313efbSmrg 1161996ce994aSmrg# AM_SUBST_NOTMAKE(VARIABLE) 11620880c7e28Smrg# -------------------------- 1162196ce994aSmrg# Public sister of _AM_SUBST_NOTMAKE. 1162296ce994aSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1162396ce994aSmrg 11624bdcaa8d0Smrg# Check how to create a tarball. -*- Autoconf -*- 11625bdcaa8d0Smrg 11626880c7e28Smrg# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 11627bdcaa8d0Smrg# 11628bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11629bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11630bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11631bdcaa8d0Smrg 11632bdcaa8d0Smrg# serial 2 11633bdcaa8d0Smrg 11634bdcaa8d0Smrg# _AM_PROG_TAR(FORMAT) 11635bdcaa8d0Smrg# -------------------- 11636bdcaa8d0Smrg# Check how to create a tarball in format FORMAT. 11637bdcaa8d0Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 11638bdcaa8d0Smrg# 11639bdcaa8d0Smrg# Substitute a variable $(am__tar) that is a command 11640bdcaa8d0Smrg# writing to stdout a FORMAT-tarball containing the directory 11641bdcaa8d0Smrg# $tardir. 11642bdcaa8d0Smrg# tardir=directory && $(am__tar) > result.tar 11643bdcaa8d0Smrg# 11644bdcaa8d0Smrg# Substitute a variable $(am__untar) that extract such 11645bdcaa8d0Smrg# a tarball read from stdin. 11646bdcaa8d0Smrg# $(am__untar) < result.tar 11647bdcaa8d0SmrgAC_DEFUN([_AM_PROG_TAR], 11648880c7e28Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 11649880c7e28Smrg# in the wild :-( We should find a proper way to deprecate it ... 11650880c7e28SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 11651bdcaa8d0Smrgm4_if([$1], [v7], 11652880c7e28Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 11653bdcaa8d0Smrg [m4_case([$1], [ustar],, [pax],, 11654bdcaa8d0Smrg [m4_fatal([Unknown tar format])]) 11655bdcaa8d0SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 11656bdcaa8d0Smrg# Loop over all known methods to create a tar archive until one works. 11657bdcaa8d0Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 11658bdcaa8d0Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 11659bdcaa8d0Smrg# Do not fold the above two line into one, because Tru64 sh and 11660bdcaa8d0Smrg# Solaris sh will not grok spaces in the rhs of `-'. 11661bdcaa8d0Smrgfor _am_tool in $_am_tools 11662bdcaa8d0Smrgdo 11663bdcaa8d0Smrg case $_am_tool in 11664bdcaa8d0Smrg gnutar) 11665bdcaa8d0Smrg for _am_tar in tar gnutar gtar; 11666bdcaa8d0Smrg do 11667bdcaa8d0Smrg AM_RUN_LOG([$_am_tar --version]) && break 11668bdcaa8d0Smrg done 11669bdcaa8d0Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 11670bdcaa8d0Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 11671bdcaa8d0Smrg am__untar="$_am_tar -xf -" 11672bdcaa8d0Smrg ;; 11673bdcaa8d0Smrg plaintar) 11674bdcaa8d0Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 11675bdcaa8d0Smrg # ustar tarball either. 11676bdcaa8d0Smrg (tar --version) >/dev/null 2>&1 && continue 11677bdcaa8d0Smrg am__tar='tar chf - "$$tardir"' 11678bdcaa8d0Smrg am__tar_='tar chf - "$tardir"' 11679bdcaa8d0Smrg am__untar='tar xf -' 11680bdcaa8d0Smrg ;; 11681bdcaa8d0Smrg pax) 11682bdcaa8d0Smrg am__tar='pax -L -x $1 -w "$$tardir"' 11683bdcaa8d0Smrg am__tar_='pax -L -x $1 -w "$tardir"' 11684bdcaa8d0Smrg am__untar='pax -r' 11685bdcaa8d0Smrg ;; 11686bdcaa8d0Smrg cpio) 11687bdcaa8d0Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 11688bdcaa8d0Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 11689bdcaa8d0Smrg am__untar='cpio -i -H $1 -d' 11690bdcaa8d0Smrg ;; 11691bdcaa8d0Smrg none) 11692bdcaa8d0Smrg am__tar=false 11693bdcaa8d0Smrg am__tar_=false 11694bdcaa8d0Smrg am__untar=false 11695bdcaa8d0Smrg ;; 11696bdcaa8d0Smrg esac 11697bdcaa8d0Smrg 11698bdcaa8d0Smrg # If the value was cached, stop now. We just wanted to have am__tar 11699bdcaa8d0Smrg # and am__untar set. 11700bdcaa8d0Smrg test -n "${am_cv_prog_tar_$1}" && break 11701bdcaa8d0Smrg 11702bdcaa8d0Smrg # tar/untar a dummy directory, and stop if the command works 11703bdcaa8d0Smrg rm -rf conftest.dir 11704bdcaa8d0Smrg mkdir conftest.dir 11705bdcaa8d0Smrg echo GrepMe > conftest.dir/file 11706bdcaa8d0Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 11707bdcaa8d0Smrg rm -rf conftest.dir 11708bdcaa8d0Smrg if test -s conftest.tar; then 11709bdcaa8d0Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 11710bdcaa8d0Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 11711bdcaa8d0Smrg fi 11712bdcaa8d0Smrgdone 11713bdcaa8d0Smrgrm -rf conftest.dir 11714bdcaa8d0Smrg 11715bdcaa8d0SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 11716bdcaa8d0SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 11717bdcaa8d0SmrgAC_SUBST([am__tar]) 11718bdcaa8d0SmrgAC_SUBST([am__untar]) 11719bdcaa8d0Smrg]) # _AM_PROG_TAR 11720bdcaa8d0Smrg 11721