aclocal.m4 revision 4f00d7e1
14f00d7e1Smrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 24f00d7e1Smrg 34f00d7e1Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4bdcaa8d0Smrg 5bdcaa8d0Smrg# This file is free software; the Free Software Foundation 6bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 7bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 8bdcaa8d0Smrg 9bdcaa8d0Smrg# This program is distributed in the hope that it will be useful, 10bdcaa8d0Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11bdcaa8d0Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12bdcaa8d0Smrg# PARTICULAR PURPOSE. 13bdcaa8d0Smrg 144f00d7e1Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1572313efbSmrgm4_ifndef([AC_AUTOCONF_VERSION], 1672313efbSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 174f00d7e1Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 184f00d7e1Smrg[m4_warning([this file was generated for autoconf 2.69. 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. 214f00d7e1SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 2272313efbSmrg 23bdcaa8d0Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 240b661123Smrg# 254f00d7e1Smrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 260b661123Smrg# Written by Gordon Matzigkeit, 1996 270b661123Smrg# 280b661123Smrg# This file is free software; the Free Software Foundation gives 290b661123Smrg# unlimited permission to copy and/or distribute it, with or without 300b661123Smrg# modifications, as long as this notice is preserved. 310b661123Smrg 320b661123Smrgm4_define([_LT_COPYING], [dnl 334f00d7e1Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 344f00d7e1Smrg# This is free software; see the source for copying conditions. There is NO 354f00d7e1Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 364f00d7e1Smrg 374f00d7e1Smrg# GNU Libtool is free software; you can redistribute it and/or modify 384f00d7e1Smrg# it under the terms of the GNU General Public License as published by 394f00d7e1Smrg# the Free Software Foundation; either version 2 of of the License, or 404f00d7e1Smrg# (at your option) any later version. 410b661123Smrg# 424f00d7e1Smrg# As a special exception to the GNU General Public License, if you 434f00d7e1Smrg# distribute this file as part of a program or library that is built 444f00d7e1Smrg# using GNU Libtool, you may include this file under the same 454f00d7e1Smrg# distribution terms that you use for the rest of that program. 460b661123Smrg# 474f00d7e1Smrg# GNU Libtool is distributed in the hope that it will be useful, but 484f00d7e1Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 490b661123Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 500b661123Smrg# GNU General Public License for more details. 510b661123Smrg# 520b661123Smrg# You should have received a copy of the GNU General Public License 534f00d7e1Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 540b661123Smrg]) 55bdcaa8d0Smrg 564f00d7e1Smrg# serial 58 LT_INIT 57bdcaa8d0Smrg 58bdcaa8d0Smrg 590b661123Smrg# LT_PREREQ(VERSION) 600b661123Smrg# ------------------ 610b661123Smrg# Complain and exit if this libtool version is less that VERSION. 620b661123Smrgm4_defun([LT_PREREQ], 630b661123Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 640b661123Smrg [m4_default([$3], 650b661123Smrg [m4_fatal([Libtool version $1 or higher is required], 660b661123Smrg 63)])], 670b661123Smrg [$2])]) 6872313efbSmrg 6972313efbSmrg 700b661123Smrg# _LT_CHECK_BUILDDIR 710b661123Smrg# ------------------ 720b661123Smrg# Complain if the absolute build directory name contains unusual characters 730b661123Smrgm4_defun([_LT_CHECK_BUILDDIR], 740b661123Smrg[case `pwd` in 750b661123Smrg *\ * | *\ *) 760b661123Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 770b661123Smrgesac 780b661123Smrg]) 790b661123Smrg 800b661123Smrg 810b661123Smrg# LT_INIT([OPTIONS]) 820b661123Smrg# ------------------ 830b661123SmrgAC_DEFUN([LT_INIT], 844f00d7e1Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85880c7e28SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 860b661123SmrgAC_BEFORE([$0], [LT_LANG])dnl 870b661123SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 880b661123SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 890b661123Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 900b661123Smrg 910b661123Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 920b661123Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 930b661123Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 940b661123Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 950b661123Smrgdnl unless we require an AC_DEFUNed macro: 960b661123SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 970b661123SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 980b661123SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 990b661123SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1000b661123Smrgm4_require([_LT_PROG_LTMAIN])dnl 1010b661123Smrg 102880c7e28Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 103880c7e28Smrg 1040b661123Smrgdnl Parse OPTIONS 1050b661123Smrg_LT_SET_OPTIONS([$0], [$1]) 106bdcaa8d0Smrg 107bdcaa8d0Smrg# This can be used to rebuild libtool when needed 1084f00d7e1SmrgLIBTOOL_DEPS=$ltmain 109bdcaa8d0Smrg 110bdcaa8d0Smrg# Always use our own libtool. 111bdcaa8d0SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112bdcaa8d0SmrgAC_SUBST(LIBTOOL)dnl 113bdcaa8d0Smrg 1140b661123Smrg_LT_SETUP 11572313efbSmrg 1160b661123Smrg# Only expand once: 1170b661123Smrgm4_define([LT_INIT]) 1180b661123Smrg])# LT_INIT 11972313efbSmrg 1200b661123Smrg# Old names: 1210b661123SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1220b661123SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1230b661123Smrgdnl aclocal-1.4 backwards compatibility: 1240b661123Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1250b661123Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1260b661123Smrg 1270b661123Smrg 1284f00d7e1Smrg# _LT_PREPARE_CC_BASENAME 1294f00d7e1Smrg# ----------------------- 1304f00d7e1Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 1314f00d7e1Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 1324f00d7e1Smrgfunc_cc_basename () 1334f00d7e1Smrg{ 1344f00d7e1Smrg for cc_temp in @S|@*""; do 1354f00d7e1Smrg case $cc_temp in 1364f00d7e1Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 1374f00d7e1Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 1384f00d7e1Smrg \-*) ;; 1394f00d7e1Smrg *) break;; 1404f00d7e1Smrg esac 1414f00d7e1Smrg done 1424f00d7e1Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 1434f00d7e1Smrg} 1444f00d7e1Smrg])# _LT_PREPARE_CC_BASENAME 1454f00d7e1Smrg 1464f00d7e1Smrg 1470b661123Smrg# _LT_CC_BASENAME(CC) 1480b661123Smrg# ------------------- 1494f00d7e1Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 1504f00d7e1Smrg# but that macro is also expanded into generated libtool script, which 1514f00d7e1Smrg# arranges for $SED and $ECHO to be set by different means. 1520b661123Smrgm4_defun([_LT_CC_BASENAME], 1534f00d7e1Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 1544f00d7e1SmrgAC_REQUIRE([_LT_DECL_SED])dnl 1554f00d7e1SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1564f00d7e1Smrgfunc_cc_basename $1 1574f00d7e1Smrgcc_basename=$func_cc_basename_result 1580b661123Smrg]) 1590b661123Smrg 1600b661123Smrg 1610b661123Smrg# _LT_FILEUTILS_DEFAULTS 1620b661123Smrg# ---------------------- 1630b661123Smrg# It is okay to use these file commands and assume they have been set 1644f00d7e1Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1650b661123Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1660b661123Smrg[: ${CP="cp -f"} 1670b661123Smrg: ${MV="mv -f"} 1680b661123Smrg: ${RM="rm -f"} 1690b661123Smrg])# _LT_FILEUTILS_DEFAULTS 1700b661123Smrg 1710b661123Smrg 1720b661123Smrg# _LT_SETUP 1730b661123Smrg# --------- 1740b661123Smrgm4_defun([_LT_SETUP], 1750b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176bdcaa8d0SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 177880c7e28SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178880c7e28SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179880c7e28Smrg 180880c7e28Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181880c7e28Smrgdnl 1820b661123Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1830b661123Smrg_LT_DECL([], [host], [0])dnl 1840b661123Smrg_LT_DECL([], [host_os], [0])dnl 1850b661123Smrgdnl 1860b661123Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1870b661123Smrg_LT_DECL([], [build], [0])dnl 1880b661123Smrg_LT_DECL([], [build_os], [0])dnl 1890b661123Smrgdnl 190bdcaa8d0SmrgAC_REQUIRE([AC_PROG_CC])dnl 1910b661123SmrgAC_REQUIRE([LT_PATH_LD])dnl 1920b661123SmrgAC_REQUIRE([LT_PATH_NM])dnl 1930b661123Smrgdnl 194bdcaa8d0SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1950b661123Smrgtest -z "$LN_S" && LN_S="ln -s" 1960b661123Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197bdcaa8d0Smrgdnl 1980b661123SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1990b661123Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2000b661123Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2010b661123Smrgdnl 2020b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2030b661123Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 204880c7e28Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 2050b661123Smrgm4_require([_LT_CMD_RELOAD])dnl 2060b661123Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 207880c7e28Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 2080b661123Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2090b661123Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210880c7e28Smrgm4_require([_LT_WITH_SYSROOT])dnl 2114f00d7e1Smrgm4_require([_LT_CMD_TRUNCATE])dnl 2120b661123Smrg 2130b661123Smrg_LT_CONFIG_LIBTOOL_INIT([ 2144f00d7e1Smrg# See if we are running on zsh, and set the options that allow our 2150b661123Smrg# commands through without removal of \ escapes INIT. 2164f00d7e1Smrgif test -n "\${ZSH_VERSION+set}"; then 2170b661123Smrg setopt NO_GLOB_SUBST 2180b661123Smrgfi 2190b661123Smrg]) 2204f00d7e1Smrgif test -n "${ZSH_VERSION+set}"; then 2210b661123Smrg setopt NO_GLOB_SUBST 2220b661123Smrgfi 223bdcaa8d0Smrg 2240b661123Smrg_LT_CHECK_OBJDIR 2250b661123Smrg 2260b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 227bdcaa8d0Smrg 228bdcaa8d0Smrgcase $host_os in 229bdcaa8d0Smrgaix3*) 230bdcaa8d0Smrg # AIX sometimes has problems with the GCC collect2 program. For some 231bdcaa8d0Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 232bdcaa8d0Smrg # vanish in a puff of smoke. 2334f00d7e1Smrg if test set != "${COLLECT_NAMES+set}"; then 234bdcaa8d0Smrg COLLECT_NAMES= 235bdcaa8d0Smrg export COLLECT_NAMES 236bdcaa8d0Smrg fi 237bdcaa8d0Smrg ;; 238bdcaa8d0Smrgesac 239bdcaa8d0Smrg 240bdcaa8d0Smrg# Global variables: 2410b661123Smrgofile=libtool 242bdcaa8d0Smrgcan_build_shared=yes 243bdcaa8d0Smrg 2444f00d7e1Smrg# All known linkers require a '.a' archive for static linking (except MSVC, 245bdcaa8d0Smrg# which needs '.lib'). 246bdcaa8d0Smrglibext=a 247bdcaa8d0Smrg 2484f00d7e1Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 24996ce994aSmrg 2504f00d7e1Smrgold_CC=$CC 2514f00d7e1Smrgold_CFLAGS=$CFLAGS 252bdcaa8d0Smrg 253bdcaa8d0Smrg# Set sane defaults for various variables 254bdcaa8d0Smrgtest -z "$CC" && CC=cc 255bdcaa8d0Smrgtest -z "$LTCC" && LTCC=$CC 256bdcaa8d0Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257bdcaa8d0Smrgtest -z "$LD" && LD=ld 258bdcaa8d0Smrgtest -z "$ac_objext" && ac_objext=o 259bdcaa8d0Smrg 260bdcaa8d0Smrg_LT_CC_BASENAME([$compiler]) 261bdcaa8d0Smrg 262bdcaa8d0Smrg# Only perform the check for file, if the check method requires it 2630b661123Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 264bdcaa8d0Smrgcase $deplibs_check_method in 265bdcaa8d0Smrgfile_magic*) 266bdcaa8d0Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2670b661123Smrg _LT_PATH_MAGIC 268bdcaa8d0Smrg fi 269bdcaa8d0Smrg ;; 270bdcaa8d0Smrgesac 271bdcaa8d0Smrg 2720b661123Smrg# Use C for the default configuration in the libtool script 2730b661123SmrgLT_SUPPORTED_TAG([CC]) 2740b661123Smrg_LT_LANG_C_CONFIG 2750b661123Smrg_LT_LANG_DEFAULT_CONFIG 2760b661123Smrg_LT_CONFIG_COMMANDS 2770b661123Smrg])# _LT_SETUP 27872313efbSmrg 27972313efbSmrg 280880c7e28Smrg# _LT_PREPARE_SED_QUOTE_VARS 281880c7e28Smrg# -------------------------- 282880c7e28Smrg# Define a few sed substitution that help us do robust quoting. 283880c7e28Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284880c7e28Smrg[# Backslashify metacharacters that are still active within 285880c7e28Smrg# double-quoted strings. 286880c7e28Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287880c7e28Smrg 288880c7e28Smrg# Same as above, but do not quote variable references. 289880c7e28Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 290880c7e28Smrg 291880c7e28Smrg# Sed substitution to delay expansion of an escaped shell variable in a 292880c7e28Smrg# double_quote_subst'ed string. 293880c7e28Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294880c7e28Smrg 295880c7e28Smrg# Sed substitution to delay expansion of an escaped single quote. 296880c7e28Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297880c7e28Smrg 298880c7e28Smrg# Sed substitution to avoid accidental globbing in evaled expressions 299880c7e28Smrgno_glob_subst='s/\*/\\\*/g' 300880c7e28Smrg]) 301880c7e28Smrg 3020b661123Smrg# _LT_PROG_LTMAIN 3030b661123Smrg# --------------- 3044f00d7e1Smrg# Note that this code is called both from 'configure', and 'config.status' 3050b661123Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 3064f00d7e1Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3070b661123Smrg# so we pass a copy along to make sure it has a sensible value anyway. 3080b661123Smrgm4_defun([_LT_PROG_LTMAIN], 3090b661123Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3100b661123Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 3114f00d7e1Smrgltmain=$ac_aux_dir/ltmain.sh 3120b661123Smrg])# _LT_PROG_LTMAIN 31372313efbSmrg 31472313efbSmrg 3150b661123Smrg 3160b661123Smrg# So that we can recreate a full libtool script including additional 3170b661123Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 3184f00d7e1Smrg# in macros and then make a single call at the end using the 'libtool' 3190b661123Smrg# label. 3200b661123Smrg 3210b661123Smrg 3220b661123Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3230b661123Smrg# ---------------------------------------- 3240b661123Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3250b661123Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3260b661123Smrg[m4_ifval([$1], 3270b661123Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3280b661123Smrg [$1 3290b661123Smrg])])]) 3300b661123Smrg 3310b661123Smrg# Initialize. 3320b661123Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 3330b661123Smrg 3340b661123Smrg 3350b661123Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3360b661123Smrg# ------------------------------ 3370b661123Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3380b661123Smrgm4_define([_LT_CONFIG_LIBTOOL], 3390b661123Smrg[m4_ifval([$1], 3400b661123Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3410b661123Smrg [$1 3420b661123Smrg])])]) 3430b661123Smrg 3440b661123Smrg# Initialize. 3450b661123Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3460b661123Smrg 3470b661123Smrg 3480b661123Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3490b661123Smrg# ----------------------------------------------------- 3500b661123Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3510b661123Smrg[_LT_CONFIG_LIBTOOL([$1]) 3520b661123Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3530b661123Smrg]) 3540b661123Smrg 3550b661123Smrg 3560b661123Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3570b661123Smrg# ----------------------------- 3580b661123Smrg# Add leading comment marks to the start of each line, and a trailing 3590b661123Smrg# full-stop to the whole comment if one is not present already. 3600b661123Smrgm4_define([_LT_FORMAT_COMMENT], 3610b661123Smrg[m4_ifval([$1], [ 3620b661123Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3630b661123Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3640b661123Smrg)]) 3650b661123Smrg 3660b661123Smrg 3670b661123Smrg 3680b661123Smrg 3690b661123Smrg 3700b661123Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3710b661123Smrg# ------------------------------------------------------------------- 3720b661123Smrg# CONFIGNAME is the name given to the value in the libtool script. 3730b661123Smrg# VARNAME is the (base) name used in the configure script. 3740b661123Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3750b661123Smrg# VARNAME. Any other value will be used directly. 3760b661123Smrgm4_define([_LT_DECL], 3770b661123Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3780b661123Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3790b661123Smrg [m4_ifval([$1], [$1], [$2])]) 3800b661123Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3810b661123Smrg m4_ifval([$4], 3820b661123Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3830b661123Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3840b661123Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3850b661123Smrg]) 3860b661123Smrg 3870b661123Smrg 3880b661123Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3890b661123Smrg# -------------------------------------------------------- 3900b661123Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 3910b661123Smrg 3920b661123Smrg 3930b661123Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3940b661123Smrg# ------------------------------------------------ 3950b661123Smrgm4_define([lt_decl_tag_varnames], 3960b661123Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 3970b661123Smrg 3980b661123Smrg 3990b661123Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 4000b661123Smrg# --------------------------------------------------------- 4010b661123Smrgm4_define([_lt_decl_filter], 4020b661123Smrg[m4_case([$#], 4030b661123Smrg [0], [m4_fatal([$0: too few arguments: $#])], 4040b661123Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 4050b661123Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 4060b661123Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 4070b661123Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 4080b661123Smrg]) 4090b661123Smrg 4100b661123Smrg 4110b661123Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4120b661123Smrg# -------------------------------------------------- 4130b661123Smrgm4_define([lt_decl_quote_varnames], 4140b661123Smrg[_lt_decl_filter([value], [1], $@)]) 4150b661123Smrg 4160b661123Smrg 4170b661123Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4180b661123Smrg# --------------------------------------------------- 4190b661123Smrgm4_define([lt_decl_dquote_varnames], 4200b661123Smrg[_lt_decl_filter([value], [2], $@)]) 4210b661123Smrg 4220b661123Smrg 4230b661123Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4240b661123Smrg# --------------------------------------------------- 4250b661123Smrgm4_define([lt_decl_varnames_tagged], 4260b661123Smrg[m4_assert([$# <= 2])dnl 4270b661123Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4280b661123Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4290b661123Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4300b661123Smrgm4_define([_lt_decl_varnames_tagged], 4310b661123Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 4320b661123Smrg 4330b661123Smrg 4340b661123Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4350b661123Smrg# ------------------------------------------------ 4360b661123Smrgm4_define([lt_decl_all_varnames], 4370b661123Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4380b661123Smrg m4_if([$2], [], 4390b661123Smrg m4_quote(lt_decl_varnames), 4400b661123Smrg m4_quote(m4_shift($@))))[]dnl 4410b661123Smrg]) 4420b661123Smrgm4_define([_lt_decl_all_varnames], 4430b661123Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4440b661123Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4450b661123Smrg]) 4460b661123Smrg 4470b661123Smrg 4480b661123Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4490b661123Smrg# ------------------------------------ 4504f00d7e1Smrg# Quote a variable value, and forward it to 'config.status' so that its 4514f00d7e1Smrg# declaration there will have the same value as in 'configure'. VARNAME 4520b661123Smrg# must have a single quote delimited value for this to work. 4530b661123Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 454880c7e28Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 4550b661123Smrg 4560b661123Smrg 4570b661123Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4580b661123Smrg# ------------------------------ 4590b661123Smrg# We delimit libtool config variables with single quotes, so when 4600b661123Smrg# we write them to config.status, we have to be sure to quote all 4610b661123Smrg# embedded single quotes properly. In configure, this macro expands 4620b661123Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4630b661123Smrg# 464880c7e28Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4650b661123Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4660b661123Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4670b661123Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 4680b661123Smrg 4690b661123Smrg 4700b661123Smrg# _LT_LIBTOOL_TAGS 4710b661123Smrg# ---------------- 4720b661123Smrg# Output comment and list of tags supported by the script 4730b661123Smrgm4_defun([_LT_LIBTOOL_TAGS], 4740b661123Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 4754f00d7e1Smrgavailable_tags='_LT_TAGS'dnl 4760b661123Smrg]) 4770b661123Smrg 4780b661123Smrg 4790b661123Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4800b661123Smrg# ----------------------------------- 4810b661123Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4820b661123Smrg# expand to a commented shell variable setting: 4830b661123Smrg# 4840b661123Smrg# # Some comment about what VAR is for. 4850b661123Smrg# visible_name=$lt_internal_name 4860b661123Smrgm4_define([_LT_LIBTOOL_DECLARE], 4870b661123Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4880b661123Smrg [description])))[]dnl 4890b661123Smrgm4_pushdef([_libtool_name], 4900b661123Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4910b661123Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4920b661123Smrg [0], [_libtool_name=[$]$1], 4930b661123Smrg [1], [_libtool_name=$lt_[]$1], 4940b661123Smrg [2], [_libtool_name=$lt_[]$1], 4950b661123Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4960b661123Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4970b661123Smrg]) 4980b661123Smrg 4990b661123Smrg 5000b661123Smrg# _LT_LIBTOOL_CONFIG_VARS 5010b661123Smrg# ----------------------- 5020b661123Smrg# Produce commented declarations of non-tagged libtool config variables 5034f00d7e1Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 5040b661123Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 5050b661123Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 5060b661123Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 5070b661123Smrg[m4_foreach([_lt_var], 5080b661123Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 5090b661123Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5100b661123Smrg 5110b661123Smrg 5120b661123Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 5130b661123Smrg# ------------------------- 5140b661123Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5150b661123Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5160b661123Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 51772313efbSmrg 51872313efbSmrg 5190b661123Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5200b661123Smrg# ------------------------------ 5210b661123Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5220b661123Smrg 5230b661123Smrg 5240b661123Smrg# _LT_CONFIG_COMMANDS 52572313efbSmrg# ------------------- 5260b661123Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5270b661123Smrg# variables for single and double quote escaping we saved from calls 5280b661123Smrg# to _LT_DECL, we can put quote escaped variables declarations 5294f00d7e1Smrg# into 'config.status', and then the shell code to quote escape them in 5304f00d7e1Smrg# for loops in 'config.status'. Finally, any additional code accumulated 5310b661123Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5320b661123Smrgm4_defun([_LT_CONFIG_COMMANDS], 5330b661123Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5340b661123Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5350b661123Smrg dnl instead of duplicating it all over again into config.status, 5360b661123Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5370b661123Smrg dnl needs to know what name is stored there: 5380b661123Smrg [AC_CONFIG_COMMANDS([libtool], 5390b661123Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5400b661123Smrg dnl If the libtool generation code is destined for config.status, 5410b661123Smrg dnl expand the accumulated commands and init code now: 5420b661123Smrg [AC_CONFIG_COMMANDS([libtool], 5430b661123Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5440b661123Smrg])#_LT_CONFIG_COMMANDS 5450b661123Smrg 5460b661123Smrg 5470b661123Smrg# Initialize. 5480b661123Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5490b661123Smrg[ 5500b661123Smrg 5510b661123Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5520b661123Smrg# if CDPATH is set. 5530b661123Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5540b661123Smrg 5550b661123Smrgsed_quote_subst='$sed_quote_subst' 5560b661123Smrgdouble_quote_subst='$double_quote_subst' 5570b661123Smrgdelay_variable_subst='$delay_variable_subst' 5580b661123Smrg_LT_CONFIG_STATUS_DECLARATIONS 5590b661123SmrgLTCC='$LTCC' 5600b661123SmrgLTCFLAGS='$LTCFLAGS' 5610b661123Smrgcompiler='$compiler_DEFAULT' 5620b661123Smrg 563880c7e28Smrg# A function that is used when there is no print builtin or printf. 564880c7e28Smrgfunc_fallback_echo () 565880c7e28Smrg{ 566880c7e28Smrg eval 'cat <<_LTECHO_EOF 567880c7e28Smrg\$[]1 568880c7e28Smrg_LTECHO_EOF' 569880c7e28Smrg} 570880c7e28Smrg 5710b661123Smrg# Quote evaled strings. 5720b661123Smrgfor var in lt_decl_all_varnames([[ \ 5730b661123Smrg]], lt_decl_quote_varnames); do 574880c7e28Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5750b661123Smrg *[[\\\\\\\`\\"\\\$]]*) 5764f00d7e1Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5770b661123Smrg ;; 5780b661123Smrg *) 5790b661123Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5800b661123Smrg ;; 5810b661123Smrg esac 5820b661123Smrgdone 5830b661123Smrg 5840b661123Smrg# Double-quote double-evaled strings. 5850b661123Smrgfor var in lt_decl_all_varnames([[ \ 5860b661123Smrg]], lt_decl_dquote_varnames); do 587880c7e28Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5880b661123Smrg *[[\\\\\\\`\\"\\\$]]*) 5894f00d7e1Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5900b661123Smrg ;; 5910b661123Smrg *) 5920b661123Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5930b661123Smrg ;; 5940b661123Smrg esac 5950b661123Smrgdone 5960b661123Smrg 5970b661123Smrg_LT_OUTPUT_LIBTOOL_INIT 5980b661123Smrg]) 5990b661123Smrg 600880c7e28Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601880c7e28Smrg# ------------------------------------ 602880c7e28Smrg# Generate a child script FILE with all initialization necessary to 603880c7e28Smrg# reuse the environment learned by the parent script, and make the 604880c7e28Smrg# file executable. If COMMENT is supplied, it is inserted after the 6054f00d7e1Smrg# '#!' sequence but before initialization text begins. After this 606880c7e28Smrg# macro, additional text can be appended to FILE to form the body of 607880c7e28Smrg# the child script. The macro ends with non-zero status if the 608880c7e28Smrg# file could not be fully written (such as if the disk is full). 609880c7e28Smrgm4_ifdef([AS_INIT_GENERATED], 610880c7e28Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611880c7e28Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 612880c7e28Smrg[m4_require([AS_PREPARE])]dnl 613880c7e28Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614880c7e28Smrg[lt_write_fail=0 615880c7e28Smrgcat >$1 <<_ASEOF || lt_write_fail=1 616880c7e28Smrg#! $SHELL 617880c7e28Smrg# Generated by $as_me. 618880c7e28Smrg$2 619880c7e28SmrgSHELL=\${CONFIG_SHELL-$SHELL} 620880c7e28Smrgexport SHELL 621880c7e28Smrg_ASEOF 622880c7e28Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 623880c7e28SmrgAS_SHELL_SANITIZE 624880c7e28Smrg_AS_PREPARE 625880c7e28Smrgexec AS_MESSAGE_FD>&1 626880c7e28Smrg_ASEOF 6274f00d7e1Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 628880c7e28Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6290b661123Smrg 6300b661123Smrg# LT_OUTPUT 6310b661123Smrg# --------- 6320b661123Smrg# This macro allows early generation of the libtool script (before 6330b661123Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6340b661123Smrg# tests. 6350b661123SmrgAC_DEFUN([LT_OUTPUT], 6360b661123Smrg[: ${CONFIG_LT=./config.lt} 6370b661123SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 638880c7e28Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639880c7e28Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6400b661123Smrg 6410b661123Smrgcat >>"$CONFIG_LT" <<\_LTEOF 642880c7e28Smrglt_cl_silent=false 6430b661123Smrgexec AS_MESSAGE_LOG_FD>>config.log 6440b661123Smrg{ 6450b661123Smrg echo 6460b661123Smrg AS_BOX([Running $as_me.]) 6470b661123Smrg} >&AS_MESSAGE_LOG_FD 6480b661123Smrg 6490b661123Smrglt_cl_help="\ 6504f00d7e1Smrg'$as_me' creates a local libtool stub from the current configuration, 6510b661123Smrgfor use in further configure time tests before the real libtool is 6520b661123Smrggenerated. 6530b661123Smrg 6540b661123SmrgUsage: $[0] [[OPTIONS]] 6550b661123Smrg 6560b661123Smrg -h, --help print this help, then exit 6570b661123Smrg -V, --version print version number, then exit 6580b661123Smrg -q, --quiet do not print progress messages 6590b661123Smrg -d, --debug don't remove temporary files 6600b661123Smrg 6610b661123SmrgReport bugs to <bug-libtool@gnu.org>." 6620b661123Smrg 6630b661123Smrglt_cl_version="\ 6640b661123Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6650b661123Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6660b661123Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 6670b661123Smrg 668880c7e28SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6690b661123SmrgThis config.lt script is free software; the Free Software Foundation 6700b661123Smrggives unlimited permision to copy, distribute and modify it." 6710b661123Smrg 6724f00d7e1Smrgwhile test 0 != $[#] 6730b661123Smrgdo 6740b661123Smrg case $[1] in 6750b661123Smrg --version | --v* | -V ) 6760b661123Smrg echo "$lt_cl_version"; exit 0 ;; 6770b661123Smrg --help | --h* | -h ) 6780b661123Smrg echo "$lt_cl_help"; exit 0 ;; 6790b661123Smrg --debug | --d* | -d ) 6800b661123Smrg debug=: ;; 6810b661123Smrg --quiet | --q* | --silent | --s* | -q ) 6820b661123Smrg lt_cl_silent=: ;; 6830b661123Smrg 6840b661123Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 6854f00d7e1SmrgTry '$[0] --help' for more information.]) ;; 6860b661123Smrg 6870b661123Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 6884f00d7e1SmrgTry '$[0] --help' for more information.]) ;; 6890b661123Smrg esac 6900b661123Smrg shift 6910b661123Smrgdone 6920b661123Smrg 6930b661123Smrgif $lt_cl_silent; then 6940b661123Smrg exec AS_MESSAGE_FD>/dev/null 6950b661123Smrgfi 6960b661123Smrg_LTEOF 6970b661123Smrg 6980b661123Smrgcat >>"$CONFIG_LT" <<_LTEOF 6990b661123Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 7000b661123Smrg_LTEOF 7010b661123Smrg 7020b661123Smrgcat >>"$CONFIG_LT" <<\_LTEOF 7030b661123SmrgAC_MSG_NOTICE([creating $ofile]) 7040b661123Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 7050b661123SmrgAS_EXIT(0) 7060b661123Smrg_LTEOF 7070b661123Smrgchmod +x "$CONFIG_LT" 7080b661123Smrg 7090b661123Smrg# configure is writing to config.log, but config.lt does its own redirection, 7100b661123Smrg# appending to config.log, which fails on DOS, as config.log is still kept 7110b661123Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7120b661123Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 713880c7e28Smrglt_cl_success=: 7144f00d7e1Smrgtest yes = "$silent" && 715880c7e28Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 716880c7e28Smrgexec AS_MESSAGE_LOG_FD>/dev/null 717880c7e28Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718880c7e28Smrgexec AS_MESSAGE_LOG_FD>>config.log 719880c7e28Smrg$lt_cl_success || AS_EXIT(1) 7200b661123Smrg])# LT_OUTPUT 7210b661123Smrg 7220b661123Smrg 7230b661123Smrg# _LT_CONFIG(TAG) 7240b661123Smrg# --------------- 7250b661123Smrg# If TAG is the built-in tag, create an initial libtool script with a 7260b661123Smrg# default configuration from the untagged config vars. Otherwise add code 7270b661123Smrg# to config.status for appending the configuration named by TAG from the 7280b661123Smrg# matching tagged config vars. 7290b661123Smrgm4_defun([_LT_CONFIG], 7300b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7310b661123Smrg_LT_CONFIG_SAVE_COMMANDS([ 7320b661123Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7330b661123Smrg m4_if(_LT_TAG, [C], [ 7344f00d7e1Smrg # See if we are running on zsh, and set the options that allow our 7350b661123Smrg # commands through without removal of \ escapes. 7364f00d7e1Smrg if test -n "${ZSH_VERSION+set}"; then 7370b661123Smrg setopt NO_GLOB_SUBST 7380b661123Smrg fi 7390b661123Smrg 7404f00d7e1Smrg cfgfile=${ofile}T 7410b661123Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7420b661123Smrg $RM "$cfgfile" 7430b661123Smrg 7440b661123Smrg cat <<_LT_EOF >> "$cfgfile" 7450b661123Smrg#! $SHELL 7464f00d7e1Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7470b661123Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7480b661123Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 7494f00d7e1Smrg 7504f00d7e1Smrg# Provide generalized library-building support services. 7514f00d7e1Smrg# Written by Gordon Matzigkeit, 1996 7524f00d7e1Smrg 7530b661123Smrg_LT_COPYING 7540b661123Smrg_LT_LIBTOOL_TAGS 7550b661123Smrg 7564f00d7e1Smrg# Configured defaults for sys_lib_dlsearch_path munging. 7574f00d7e1Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 7584f00d7e1Smrg 7590b661123Smrg# ### BEGIN LIBTOOL CONFIG 7600b661123Smrg_LT_LIBTOOL_CONFIG_VARS 7610b661123Smrg_LT_LIBTOOL_TAG_VARS 7620b661123Smrg# ### END LIBTOOL CONFIG 7630b661123Smrg 7644f00d7e1Smrg_LT_EOF 7654f00d7e1Smrg 7664f00d7e1Smrg cat <<'_LT_EOF' >> "$cfgfile" 7674f00d7e1Smrg 7684f00d7e1Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 7694f00d7e1Smrg 7704f00d7e1Smrg_LT_PREPARE_MUNGE_PATH_LIST 7714f00d7e1Smrg_LT_PREPARE_CC_BASENAME 7724f00d7e1Smrg 7734f00d7e1Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 7744f00d7e1Smrg 7750b661123Smrg_LT_EOF 7760b661123Smrg 7770b661123Smrg case $host_os in 7780b661123Smrg aix3*) 7790b661123Smrg cat <<\_LT_EOF >> "$cfgfile" 7800b661123Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7810b661123Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7820b661123Smrg# vanish in a puff of smoke. 7834f00d7e1Smrgif test set != "${COLLECT_NAMES+set}"; then 7840b661123Smrg COLLECT_NAMES= 7850b661123Smrg export COLLECT_NAMES 7860b661123Smrgfi 7870b661123Smrg_LT_EOF 7880b661123Smrg ;; 7890b661123Smrg esac 7900b661123Smrg 7910b661123Smrg _LT_PROG_LTMAIN 7920b661123Smrg 7930b661123Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7940b661123Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7950b661123Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7960b661123Smrg # is reportedly fixed, but why not run on old versions too? 797880c7e28Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 798880c7e28Smrg || (rm -f "$cfgfile"; exit 1) 7990b661123Smrg 800880c7e28Smrg mv -f "$cfgfile" "$ofile" || 8010b661123Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 8020b661123Smrg chmod +x "$ofile" 8030b661123Smrg], 8040b661123Smrg[cat <<_LT_EOF >> "$ofile" 8050b661123Smrg 8060b661123Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 8070b661123Smrgdnl in a comment (ie after a #). 8080b661123Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 8090b661123Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 8100b661123Smrg# ### END LIBTOOL TAG CONFIG: $1 8110b661123Smrg_LT_EOF 8120b661123Smrg])dnl /m4_if 8130b661123Smrg], 8140b661123Smrg[m4_if([$1], [], [ 8150b661123Smrg PACKAGE='$PACKAGE' 8160b661123Smrg VERSION='$VERSION' 8170b661123Smrg RM='$RM' 8180b661123Smrg ofile='$ofile'], []) 8190b661123Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8200b661123Smrg])# _LT_CONFIG 8210b661123Smrg 8220b661123Smrg 8230b661123Smrg# LT_SUPPORTED_TAG(TAG) 8240b661123Smrg# --------------------- 8250b661123Smrg# Trace this macro to discover what tags are supported by the libtool 8260b661123Smrg# --tag option, using: 8270b661123Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8280b661123SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 8290b661123Smrg 8300b661123Smrg 8310b661123Smrg# C support is built-in for now 8320b661123Smrgm4_define([_LT_LANG_C_enabled], []) 8330b661123Smrgm4_define([_LT_TAGS], []) 8340b661123Smrg 8350b661123Smrg 8360b661123Smrg# LT_LANG(LANG) 8370b661123Smrg# ------------- 8380b661123Smrg# Enable libtool support for the given language if not already enabled. 8390b661123SmrgAC_DEFUN([LT_LANG], 8400b661123Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8410b661123Smrgm4_case([$1], 8420b661123Smrg [C], [_LT_LANG(C)], 8430b661123Smrg [C++], [_LT_LANG(CXX)], 844880c7e28Smrg [Go], [_LT_LANG(GO)], 8450b661123Smrg [Java], [_LT_LANG(GCJ)], 8460b661123Smrg [Fortran 77], [_LT_LANG(F77)], 8470b661123Smrg [Fortran], [_LT_LANG(FC)], 8480b661123Smrg [Windows Resource], [_LT_LANG(RC)], 8490b661123Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8500b661123Smrg [_LT_LANG($1)], 8510b661123Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8520b661123Smrg])# LT_LANG 8530b661123Smrg 8540b661123Smrg 8550b661123Smrg# _LT_LANG(LANGNAME) 8560b661123Smrg# ------------------ 8570b661123Smrgm4_defun([_LT_LANG], 8580b661123Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8590b661123Smrg [LT_SUPPORTED_TAG([$1])dnl 8600b661123Smrg m4_append([_LT_TAGS], [$1 ])dnl 8610b661123Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8620b661123Smrg _LT_LANG_$1_CONFIG($1)])dnl 8630b661123Smrg])# _LT_LANG 8640b661123Smrg 8650b661123Smrg 866880c7e28Smrgm4_ifndef([AC_PROG_GO], [ 867880c7e28Smrg# NOTE: This macro has been submitted for inclusion into # 868880c7e28Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 869880c7e28Smrg# a released version of Autoconf we should remove this # 870880c7e28Smrg# macro and use it instead. # 871880c7e28Smrgm4_defun([AC_PROG_GO], 872880c7e28Smrg[AC_LANG_PUSH(Go)dnl 873880c7e28SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 874880c7e28SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875880c7e28Smrg_AC_ARG_VAR_LDFLAGS()dnl 876880c7e28SmrgAC_CHECK_TOOL(GOC, gccgo) 877880c7e28Smrgif test -z "$GOC"; then 878880c7e28Smrg if test -n "$ac_tool_prefix"; then 879880c7e28Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880880c7e28Smrg fi 881880c7e28Smrgfi 882880c7e28Smrgif test -z "$GOC"; then 883880c7e28Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884880c7e28Smrgfi 885880c7e28Smrg])#m4_defun 886880c7e28Smrg])#m4_ifndef 887880c7e28Smrg 888880c7e28Smrg 8890b661123Smrg# _LT_LANG_DEFAULT_CONFIG 8900b661123Smrg# ----------------------- 8910b661123Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8920b661123Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8930b661123Smrg [LT_LANG(CXX)], 8940b661123Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8950b661123Smrg 8960b661123SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8970b661123Smrg [LT_LANG(F77)], 8980b661123Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8990b661123Smrg 9000b661123SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 9010b661123Smrg [LT_LANG(FC)], 9020b661123Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 9030b661123Smrg 9040b661123Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 9050b661123Smrgdnl pulling things in needlessly. 9060b661123SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 9070b661123Smrg [LT_LANG(GCJ)], 9080b661123Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 9090b661123Smrg [LT_LANG(GCJ)], 9100b661123Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 9110b661123Smrg [LT_LANG(GCJ)], 9120b661123Smrg [m4_ifdef([AC_PROG_GCJ], 9130b661123Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9140b661123Smrg m4_ifdef([A][M_PROG_GCJ], 9150b661123Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9160b661123Smrg m4_ifdef([LT_PROG_GCJ], 9170b661123Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9180b661123Smrg 919880c7e28SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 920880c7e28Smrg [LT_LANG(GO)], 921880c7e28Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 922880c7e28Smrg 9230b661123SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9240b661123Smrg [LT_LANG(RC)], 9250b661123Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9260b661123Smrg])# _LT_LANG_DEFAULT_CONFIG 9270b661123Smrg 9280b661123Smrg# Obsolete macros: 9290b661123SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9300b661123SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9310b661123SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9320b661123SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933880c7e28SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9340b661123Smrgdnl aclocal-1.4 backwards compatibility: 9350b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9360b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9370b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9380b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939880c7e28Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9400b661123Smrg 9410b661123Smrg 9420b661123Smrg# _LT_TAG_COMPILER 9430b661123Smrg# ---------------- 9440b661123Smrgm4_defun([_LT_TAG_COMPILER], 94572313efbSmrg[AC_REQUIRE([AC_PROG_CC])dnl 946bdcaa8d0Smrg 9470b661123Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9480b661123Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9490b661123Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9500b661123Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 9510b661123Smrg 95272313efbSmrg# If no C compiler was specified, use CC. 95372313efbSmrgLTCC=${LTCC-"$CC"} 954bdcaa8d0Smrg 95572313efbSmrg# If no C compiler flags were specified, use CFLAGS. 95672313efbSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957bdcaa8d0Smrg 95872313efbSmrg# Allow CC to be a program name with arguments. 95972313efbSmrgcompiler=$CC 9600b661123Smrg])# _LT_TAG_COMPILER 961bdcaa8d0Smrg 962bdcaa8d0Smrg 96372313efbSmrg# _LT_COMPILER_BOILERPLATE 96472313efbSmrg# ------------------------ 96572313efbSmrg# Check for compiler boilerplate output or warnings with 96672313efbSmrg# the simple compiler test code. 9670b661123Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9680b661123Smrg[m4_require([_LT_DECL_SED])dnl 96972313efbSmrgac_outfile=conftest.$ac_objext 97072313efbSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 97172313efbSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 97272313efbSmrg_lt_compiler_boilerplate=`cat conftest.err` 9730b661123Smrg$RM conftest* 97472313efbSmrg])# _LT_COMPILER_BOILERPLATE 975bdcaa8d0Smrg 976bdcaa8d0Smrg 97772313efbSmrg# _LT_LINKER_BOILERPLATE 97872313efbSmrg# ---------------------- 97972313efbSmrg# Check for linker boilerplate output or warnings with 98072313efbSmrg# the simple link test code. 9810b661123Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9820b661123Smrg[m4_require([_LT_DECL_SED])dnl 98372313efbSmrgac_outfile=conftest.$ac_objext 98472313efbSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 98572313efbSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 98672313efbSmrg_lt_linker_boilerplate=`cat conftest.err` 9870b661123Smrg$RM -r conftest* 98872313efbSmrg])# _LT_LINKER_BOILERPLATE 989bdcaa8d0Smrg 99072313efbSmrg# _LT_REQUIRED_DARWIN_CHECKS 9910b661123Smrg# ------------------------- 9920b661123Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 99372313efbSmrg case $host_os in 99472313efbSmrg rhapsody* | darwin*) 99572313efbSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 99672313efbSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9970b661123Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9980b661123Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9990b661123Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 10000b661123Smrg _LT_DECL([], [DSYMUTIL], [1], 10010b661123Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 10020b661123Smrg _LT_DECL([], [NMEDIT], [1], 10030b661123Smrg [Tool to change global to local symbols on Mac OS X]) 10040b661123Smrg _LT_DECL([], [LIPO], [1], 10050b661123Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 10060b661123Smrg _LT_DECL([], [OTOOL], [1], 10070b661123Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 10080b661123Smrg _LT_DECL([], [OTOOL64], [1], 10090b661123Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 101072313efbSmrg 101172313efbSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 101272313efbSmrg [lt_cv_apple_cc_single_mod=no 10134f00d7e1Smrg if test -z "$LT_MULTI_MODULE"; then 10140b661123Smrg # By default we will add the -single_module flag. You can override 10150b661123Smrg # by either setting the environment variable LT_MULTI_MODULE 10160b661123Smrg # non-empty at configure time, or by adding -multi_module to the 10170b661123Smrg # link flags. 10180b661123Smrg rm -rf libconftest.dylib* 10190b661123Smrg echo "int foo(void){return 1;}" > conftest.c 10200b661123Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10210b661123Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10220b661123Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10230b661123Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10240b661123Smrg _lt_result=$? 1025880c7e28Smrg # If there is a non-empty error log, and "single_module" 1026880c7e28Smrg # appears in it, assume the flag caused a linker warning 1027880c7e28Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1028880c7e28Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1029880c7e28Smrg # Otherwise, if the output was created with a 0 exit code from 1030880c7e28Smrg # the compiler, it worked. 10314f00d7e1Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10320b661123Smrg lt_cv_apple_cc_single_mod=yes 10330b661123Smrg else 10340b661123Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10350b661123Smrg fi 10360b661123Smrg rm -rf libconftest.dylib* 10370b661123Smrg rm -f conftest.* 103872313efbSmrg fi]) 1039880c7e28Smrg 104072313efbSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 104172313efbSmrg [lt_cv_ld_exported_symbols_list], 104272313efbSmrg [lt_cv_ld_exported_symbols_list=no 104372313efbSmrg save_LDFLAGS=$LDFLAGS 104472313efbSmrg echo "_main" > conftest.sym 104572313efbSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 104672313efbSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10470b661123Smrg [lt_cv_ld_exported_symbols_list=yes], 10480b661123Smrg [lt_cv_ld_exported_symbols_list=no]) 10494f00d7e1Smrg LDFLAGS=$save_LDFLAGS 1050bdcaa8d0Smrg ]) 1051880c7e28Smrg 1052880c7e28Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053880c7e28Smrg [lt_cv_ld_force_load=no 1054880c7e28Smrg cat > conftest.c << _LT_EOF 1055880c7e28Smrgint forced_loaded() { return 2;} 1056880c7e28Smrg_LT_EOF 1057880c7e28Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058880c7e28Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059880c7e28Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060880c7e28Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061880c7e28Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062880c7e28Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063880c7e28Smrg cat > conftest.c << _LT_EOF 1064880c7e28Smrgint main() { return 0;} 1065880c7e28Smrg_LT_EOF 1066880c7e28Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067880c7e28Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068880c7e28Smrg _lt_result=$? 1069880c7e28Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1070880c7e28Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10714f00d7e1Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072880c7e28Smrg lt_cv_ld_force_load=yes 1073880c7e28Smrg else 1074880c7e28Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1075880c7e28Smrg fi 1076880c7e28Smrg rm -f conftest.err libconftest.a conftest conftest.c 1077880c7e28Smrg rm -rf conftest.dSYM 1078880c7e28Smrg ]) 107972313efbSmrg case $host_os in 10800b661123Smrg rhapsody* | darwin1.[[012]]) 10814f00d7e1Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 108272313efbSmrg darwin1.*) 10834f00d7e1Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10840b661123Smrg darwin*) # darwin 5.x on 108572313efbSmrg # if running on 10.5 or later, the deployment target defaults 108672313efbSmrg # to the OS version, if on x86, and 10.4, the deployment 108772313efbSmrg # target defaults to 10.4. Don't you love it? 108872313efbSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10890b661123Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 10904f00d7e1Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10914f00d7e1Smrg 10.[[012]][[,.]]*) 10924f00d7e1Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10930b661123Smrg 10.*) 10944f00d7e1Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 109572313efbSmrg esac 109672313efbSmrg ;; 109772313efbSmrg esac 10984f00d7e1Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 109972313efbSmrg _lt_dar_single_mod='$single_module' 110072313efbSmrg fi 11014f00d7e1Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 11024f00d7e1Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 110372313efbSmrg else 11044f00d7e1Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 110572313efbSmrg fi 11064f00d7e1Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 11070b661123Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 110872313efbSmrg else 110972313efbSmrg _lt_dsymutil= 1110bdcaa8d0Smrg fi 1111bdcaa8d0Smrg ;; 1112bdcaa8d0Smrg esac 111372313efbSmrg]) 1114bdcaa8d0Smrg 11150b661123Smrg 1116880c7e28Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117880c7e28Smrg# --------------------------------- 11180b661123Smrg# Checks for linker and compiler features on darwin 11190b661123Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11200b661123Smrg[ 11210b661123Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11220b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11230b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11240b661123Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11250b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 11264f00d7e1Smrg if test yes = "$lt_cv_ld_force_load"; then 11274f00d7e1Smrg _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\"`' 1128880c7e28Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129880c7e28Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130880c7e28Smrg else 1131880c7e28Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132880c7e28Smrg fi 11330b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 11344f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11350b661123Smrg case $cc_basename in 11364f00d7e1Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11370b661123Smrg *) _lt_dar_can_shared=$GCC ;; 11380b661123Smrg esac 11394f00d7e1Smrg if test yes = "$_lt_dar_can_shared"; then 1140880c7e28Smrg output_verbose_link_cmd=func_echo_all 11414f00d7e1Smrg _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" 11424f00d7e1Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 11434f00d7e1Smrg _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" 11444f00d7e1Smrg _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" 11450b661123Smrg m4_if([$1], [CXX], 11464f00d7e1Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 11474f00d7e1Smrg _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" 11484f00d7e1Smrg _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" 11490b661123Smrg fi 11500b661123Smrg],[]) 11510b661123Smrg else 11520b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11530b661123Smrg fi 11540b661123Smrg]) 11550b661123Smrg 1156880c7e28Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157880c7e28Smrg# ---------------------------------- 115872313efbSmrg# Links a minimal program and checks the executable 115972313efbSmrg# for the system default hardcoded library path. In most cases, 116072313efbSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 116172313efbSmrg# the location of the communication and MPI libs are included too. 116272313efbSmrg# If we don't find anything, use the default library path according 116372313efbSmrg# to the aix ld manual. 1164880c7e28Smrg# Store the results from the different compilers for each TAGNAME. 1165880c7e28Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11660b661123Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11670b661123Smrg[m4_require([_LT_DECL_SED])dnl 11684f00d7e1Smrgif test set = "${lt_cv_aix_libpath+set}"; then 1169880c7e28Smrg aix_libpath=$lt_cv_aix_libpath 1170880c7e28Smrgelse 1171880c7e28Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172880c7e28Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173880c7e28Smrg lt_aix_libpath_sed='[ 1174880c7e28Smrg /Import File Strings/,/^$/ { 1175880c7e28Smrg /^0/ { 1176880c7e28Smrg s/^0 *\([^ ]*\) *$/\1/ 1177880c7e28Smrg p 1178880c7e28Smrg } 1179880c7e28Smrg }]' 1180880c7e28Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181880c7e28Smrg # Check for a 64-bit object if we didn't find anything. 1182880c7e28Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183880c7e28Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184880c7e28Smrg fi],[]) 1185880c7e28Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 11864f00d7e1Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187880c7e28Smrg fi 1188880c7e28Smrg ]) 1189880c7e28Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190880c7e28Smrgfi 11910b661123Smrg])# _LT_SYS_MODULE_PATH_AIX 1192bdcaa8d0Smrg 1193bdcaa8d0Smrg 11940b661123Smrg# _LT_SHELL_INIT(ARG) 11950b661123Smrg# ------------------- 11960b661123Smrgm4_define([_LT_SHELL_INIT], 1197880c7e28Smrg[m4_divert_text([M4SH-INIT], [$1 1198880c7e28Smrg])])# _LT_SHELL_INIT 1199880c7e28Smrg 1200bdcaa8d0Smrg 1201bdcaa8d0Smrg 12020b661123Smrg# _LT_PROG_ECHO_BACKSLASH 12030b661123Smrg# ----------------------- 1204880c7e28Smrg# Find how we can fake an echo command that does not interpret backslash. 1205880c7e28Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 12064f00d7e1Smrg# of the generated configure script that will find a shell with a builtin 12074f00d7e1Smrg# printf (that we can use as an echo command). 12080b661123Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1209880c7e28Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210880c7e28SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211880c7e28SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212880c7e28Smrg 1213880c7e28SmrgAC_MSG_CHECKING([how to print strings]) 1214880c7e28Smrg# Test print first, because it will be a builtin if present. 1215880c7e28Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216880c7e28Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217880c7e28Smrg ECHO='print -r --' 1218880c7e28Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219880c7e28Smrg ECHO='printf %s\n' 1220bdcaa8d0Smrgelse 1221880c7e28Smrg # Use this function as a fallback that always works. 1222880c7e28Smrg func_fallback_echo () 1223880c7e28Smrg { 1224880c7e28Smrg eval 'cat <<_LTECHO_EOF 1225880c7e28Smrg$[]1 1226880c7e28Smrg_LTECHO_EOF' 1227880c7e28Smrg } 1228880c7e28Smrg ECHO='func_fallback_echo' 1229bdcaa8d0Smrgfi 1230bdcaa8d0Smrg 1231880c7e28Smrg# func_echo_all arg... 1232880c7e28Smrg# Invoke $ECHO with all args, space-separated. 1233880c7e28Smrgfunc_echo_all () 1234880c7e28Smrg{ 12354f00d7e1Smrg $ECHO "$*" 1236880c7e28Smrg} 123796ce994aSmrg 12384f00d7e1Smrgcase $ECHO in 1239880c7e28Smrg printf*) AC_MSG_RESULT([printf]) ;; 1240880c7e28Smrg print*) AC_MSG_RESULT([print -r]) ;; 1241880c7e28Smrg *) AC_MSG_RESULT([cat]) ;; 1242880c7e28Smrgesac 1243bdcaa8d0Smrg 1244880c7e28Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 1245880c7e28Smrg[_AS_DETECT_SUGGESTED([ 1246880c7e28Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247880c7e28Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248880c7e28Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249880c7e28Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250880c7e28Smrg PATH=/empty FPATH=/empty; export PATH FPATH 1251880c7e28Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1252880c7e28Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253bdcaa8d0Smrg 12540b661123Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255880c7e28Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12560b661123Smrg])# _LT_PROG_ECHO_BACKSLASH 1257bdcaa8d0Smrg 1258bdcaa8d0Smrg 1259880c7e28Smrg# _LT_WITH_SYSROOT 1260880c7e28Smrg# ---------------- 1261880c7e28SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1262880c7e28Smrg[AC_MSG_CHECKING([for sysroot]) 1263880c7e28SmrgAC_ARG_WITH([sysroot], 12644f00d7e1Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 12654f00d7e1Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 12664f00d7e1Smrg if not specified).])], 1267880c7e28Smrg[], [with_sysroot=no]) 1268880c7e28Smrg 1269880c7e28Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1270880c7e28Smrgdnl in case the user passed a directory name. 1271880c7e28Smrglt_sysroot= 12724f00d7e1Smrgcase $with_sysroot in #( 1273880c7e28Smrg yes) 12744f00d7e1Smrg if test yes = "$GCC"; then 1275880c7e28Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276880c7e28Smrg fi 1277880c7e28Smrg ;; #( 1278880c7e28Smrg /*) 1279880c7e28Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280880c7e28Smrg ;; #( 1281880c7e28Smrg no|'') 1282880c7e28Smrg ;; #( 1283880c7e28Smrg *) 12844f00d7e1Smrg AC_MSG_RESULT([$with_sysroot]) 1285880c7e28Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286880c7e28Smrg ;; 1287880c7e28Smrgesac 1288880c7e28Smrg 1289880c7e28Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1290880c7e28Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 12914f00d7e1Smrg[dependent libraries, and where our libraries should be installed.])]) 1292880c7e28Smrg 12930b661123Smrg# _LT_ENABLE_LOCK 12940b661123Smrg# --------------- 12950b661123Smrgm4_defun([_LT_ENABLE_LOCK], 129672313efbSmrg[AC_ARG_ENABLE([libtool-lock], 12970b661123Smrg [AS_HELP_STRING([--disable-libtool-lock], 12980b661123Smrg [avoid locking (might break parallel builds)])]) 12994f00d7e1Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 130072313efbSmrg 130172313efbSmrg# Some flags need to be propagated to the compiler or linker for good 130272313efbSmrg# libtool support. 130372313efbSmrgcase $host in 130472313efbSmrgia64-*-hpux*) 13054f00d7e1Smrg # Find out what ABI is being produced by ac_compile, and set mode 13064f00d7e1Smrg # options accordingly. 130772313efbSmrg echo 'int i;' > conftest.$ac_ext 130872313efbSmrg if AC_TRY_EVAL(ac_compile); then 130972313efbSmrg case `/usr/bin/file conftest.$ac_objext` in 13100b661123Smrg *ELF-32*) 13114f00d7e1Smrg HPUX_IA64_MODE=32 13120b661123Smrg ;; 13130b661123Smrg *ELF-64*) 13144f00d7e1Smrg HPUX_IA64_MODE=64 13150b661123Smrg ;; 1316bdcaa8d0Smrg esac 131772313efbSmrg fi 131872313efbSmrg rm -rf conftest* 131972313efbSmrg ;; 132072313efbSmrg*-*-irix6*) 13214f00d7e1Smrg # Find out what ABI is being produced by ac_compile, and set linker 13224f00d7e1Smrg # options accordingly. 1323880c7e28Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 132472313efbSmrg if AC_TRY_EVAL(ac_compile); then 13254f00d7e1Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 13260b661123Smrg case `/usr/bin/file conftest.$ac_objext` in 13270b661123Smrg *32-bit*) 13280b661123Smrg LD="${LD-ld} -melf32bsmip" 13290b661123Smrg ;; 13300b661123Smrg *N32*) 13310b661123Smrg LD="${LD-ld} -melf32bmipn32" 13320b661123Smrg ;; 13330b661123Smrg *64-bit*) 13340b661123Smrg LD="${LD-ld} -melf64bmip" 13350b661123Smrg ;; 13360b661123Smrg esac 13370b661123Smrg else 13380b661123Smrg case `/usr/bin/file conftest.$ac_objext` in 13390b661123Smrg *32-bit*) 13400b661123Smrg LD="${LD-ld} -32" 13410b661123Smrg ;; 13420b661123Smrg *N32*) 13430b661123Smrg LD="${LD-ld} -n32" 13440b661123Smrg ;; 13450b661123Smrg *64-bit*) 13460b661123Smrg LD="${LD-ld} -64" 13470b661123Smrg ;; 13480b661123Smrg esac 13490b661123Smrg fi 1350bdcaa8d0Smrg fi 135172313efbSmrg rm -rf conftest* 1352bdcaa8d0Smrg ;; 1353bdcaa8d0Smrg 13544f00d7e1Smrgmips64*-*linux*) 13554f00d7e1Smrg # Find out what ABI is being produced by ac_compile, and set linker 13564f00d7e1Smrg # options accordingly. 13574f00d7e1Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13584f00d7e1Smrg if AC_TRY_EVAL(ac_compile); then 13594f00d7e1Smrg emul=elf 13604f00d7e1Smrg case `/usr/bin/file conftest.$ac_objext` in 13614f00d7e1Smrg *32-bit*) 13624f00d7e1Smrg emul="${emul}32" 13634f00d7e1Smrg ;; 13644f00d7e1Smrg *64-bit*) 13654f00d7e1Smrg emul="${emul}64" 13664f00d7e1Smrg ;; 13674f00d7e1Smrg esac 13684f00d7e1Smrg case `/usr/bin/file conftest.$ac_objext` in 13694f00d7e1Smrg *MSB*) 13704f00d7e1Smrg emul="${emul}btsmip" 13714f00d7e1Smrg ;; 13724f00d7e1Smrg *LSB*) 13734f00d7e1Smrg emul="${emul}ltsmip" 13744f00d7e1Smrg ;; 13754f00d7e1Smrg esac 13764f00d7e1Smrg case `/usr/bin/file conftest.$ac_objext` in 13774f00d7e1Smrg *N32*) 13784f00d7e1Smrg emul="${emul}n32" 13794f00d7e1Smrg ;; 13804f00d7e1Smrg esac 13814f00d7e1Smrg LD="${LD-ld} -m $emul" 13824f00d7e1Smrg fi 13834f00d7e1Smrg rm -rf conftest* 13844f00d7e1Smrg ;; 13854f00d7e1Smrg 13864f00d7e1Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13870b661123Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13884f00d7e1Smrg # Find out what ABI is being produced by ac_compile, and set linker 13894f00d7e1Smrg # options accordingly. Note that the listed cases only cover the 13904f00d7e1Smrg # situations where additional linker options are needed (such as when 13914f00d7e1Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 13924f00d7e1Smrg # vice versa); the common cases where no linker options are needed do 13934f00d7e1Smrg # not appear in the list. 139472313efbSmrg echo 'int i;' > conftest.$ac_ext 139572313efbSmrg if AC_TRY_EVAL(ac_compile); then 139672313efbSmrg case `/usr/bin/file conftest.o` in 13970b661123Smrg *32-bit*) 13980b661123Smrg case $host in 13990b661123Smrg x86_64-*kfreebsd*-gnu) 14000b661123Smrg LD="${LD-ld} -m elf_i386_fbsd" 14010b661123Smrg ;; 14020b661123Smrg x86_64-*linux*) 14034f00d7e1Smrg case `/usr/bin/file conftest.o` in 14044f00d7e1Smrg *x86-64*) 14054f00d7e1Smrg LD="${LD-ld} -m elf32_x86_64" 14064f00d7e1Smrg ;; 14074f00d7e1Smrg *) 14084f00d7e1Smrg LD="${LD-ld} -m elf_i386" 14094f00d7e1Smrg ;; 14104f00d7e1Smrg esac 14114f00d7e1Smrg ;; 14124f00d7e1Smrg powerpc64le-*linux*) 14134f00d7e1Smrg LD="${LD-ld} -m elf32lppclinux" 14140b661123Smrg ;; 14154f00d7e1Smrg powerpc64-*linux*) 14160b661123Smrg LD="${LD-ld} -m elf32ppclinux" 14170b661123Smrg ;; 14180b661123Smrg s390x-*linux*) 14190b661123Smrg LD="${LD-ld} -m elf_s390" 14200b661123Smrg ;; 14210b661123Smrg sparc64-*linux*) 14220b661123Smrg LD="${LD-ld} -m elf32_sparc" 14230b661123Smrg ;; 14240b661123Smrg esac 14250b661123Smrg ;; 14260b661123Smrg *64-bit*) 14270b661123Smrg case $host in 14280b661123Smrg x86_64-*kfreebsd*-gnu) 14290b661123Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 14300b661123Smrg ;; 14310b661123Smrg x86_64-*linux*) 14320b661123Smrg LD="${LD-ld} -m elf_x86_64" 14330b661123Smrg ;; 14344f00d7e1Smrg powerpcle-*linux*) 14354f00d7e1Smrg LD="${LD-ld} -m elf64lppc" 14364f00d7e1Smrg ;; 14374f00d7e1Smrg powerpc-*linux*) 14380b661123Smrg LD="${LD-ld} -m elf64ppc" 14390b661123Smrg ;; 14400b661123Smrg s390*-*linux*|s390*-*tpf*) 14410b661123Smrg LD="${LD-ld} -m elf64_s390" 14420b661123Smrg ;; 14430b661123Smrg sparc*-*linux*) 14440b661123Smrg LD="${LD-ld} -m elf64_sparc" 14450b661123Smrg ;; 14460b661123Smrg esac 14470b661123Smrg ;; 144872313efbSmrg esac 144972313efbSmrg fi 145072313efbSmrg rm -rf conftest* 1451bdcaa8d0Smrg ;; 1452bdcaa8d0Smrg 145372313efbSmrg*-*-sco3.2v5*) 145472313efbSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 14554f00d7e1Smrg SAVE_CFLAGS=$CFLAGS 145672313efbSmrg CFLAGS="$CFLAGS -belf" 145772313efbSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 145872313efbSmrg [AC_LANG_PUSH(C) 14590b661123Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 146072313efbSmrg AC_LANG_POP]) 14614f00d7e1Smrg if test yes != "$lt_cv_cc_needs_belf"; then 146272313efbSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 14634f00d7e1Smrg CFLAGS=$SAVE_CFLAGS 146472313efbSmrg fi 1465bdcaa8d0Smrg ;; 1466880c7e28Smrg*-*solaris*) 14674f00d7e1Smrg # Find out what ABI is being produced by ac_compile, and set linker 14684f00d7e1Smrg # options accordingly. 146972313efbSmrg echo 'int i;' > conftest.$ac_ext 147072313efbSmrg if AC_TRY_EVAL(ac_compile); then 147172313efbSmrg case `/usr/bin/file conftest.o` in 147272313efbSmrg *64-bit*) 147372313efbSmrg case $lt_cv_prog_gnu_ld in 1474880c7e28Smrg yes*) 1475880c7e28Smrg case $host in 14764f00d7e1Smrg i?86-*-solaris*|x86_64-*-solaris*) 1477880c7e28Smrg LD="${LD-ld} -m elf_x86_64" 1478880c7e28Smrg ;; 1479880c7e28Smrg sparc*-*-solaris*) 1480880c7e28Smrg LD="${LD-ld} -m elf64_sparc" 1481880c7e28Smrg ;; 1482880c7e28Smrg esac 1483880c7e28Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484880c7e28Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 14854f00d7e1Smrg LD=${LD-ld}_sol2 1486880c7e28Smrg fi 1487880c7e28Smrg ;; 148872313efbSmrg *) 14890b661123Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 149072313efbSmrg LD="${LD-ld} -64" 149172313efbSmrg fi 149272313efbSmrg ;; 149372313efbSmrg esac 149472313efbSmrg ;; 149572313efbSmrg esac 149672313efbSmrg fi 149772313efbSmrg rm -rf conftest* 1498bdcaa8d0Smrg ;; 149972313efbSmrgesac 1500bdcaa8d0Smrg 15014f00d7e1Smrgneed_locks=$enable_libtool_lock 15020b661123Smrg])# _LT_ENABLE_LOCK 15030b661123Smrg 15040b661123Smrg 1505880c7e28Smrg# _LT_PROG_AR 1506880c7e28Smrg# ----------- 1507880c7e28Smrgm4_defun([_LT_PROG_AR], 1508880c7e28Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1509880c7e28Smrg: ${AR=ar} 1510880c7e28Smrg: ${AR_FLAGS=cru} 1511880c7e28Smrg_LT_DECL([], [AR], [1], [The archiver]) 1512880c7e28Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1513880c7e28Smrg 1514880c7e28SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1515880c7e28Smrg [lt_cv_ar_at_file=no 1516880c7e28Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1517880c7e28Smrg [echo conftest.$ac_objext > conftest.lst 1518880c7e28Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1519880c7e28Smrg AC_TRY_EVAL([lt_ar_try]) 15204f00d7e1Smrg if test 0 -eq "$ac_status"; then 1521880c7e28Smrg # Ensure the archiver fails upon bogus file names. 1522880c7e28Smrg rm -f conftest.$ac_objext libconftest.a 1523880c7e28Smrg AC_TRY_EVAL([lt_ar_try]) 15244f00d7e1Smrg if test 0 -ne "$ac_status"; then 1525880c7e28Smrg lt_cv_ar_at_file=@ 1526880c7e28Smrg fi 1527880c7e28Smrg fi 1528880c7e28Smrg rm -f conftest.* libconftest.a 1529880c7e28Smrg ]) 1530880c7e28Smrg ]) 1531880c7e28Smrg 15324f00d7e1Smrgif test no = "$lt_cv_ar_at_file"; then 1533880c7e28Smrg archiver_list_spec= 1534880c7e28Smrgelse 1535880c7e28Smrg archiver_list_spec=$lt_cv_ar_at_file 1536880c7e28Smrgfi 1537880c7e28Smrg_LT_DECL([], [archiver_list_spec], [1], 1538880c7e28Smrg [How to feed a file listing to the archiver]) 1539880c7e28Smrg])# _LT_PROG_AR 1540880c7e28Smrg 1541880c7e28Smrg 15420b661123Smrg# _LT_CMD_OLD_ARCHIVE 15430b661123Smrg# ------------------- 15440b661123Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1545880c7e28Smrg[_LT_PROG_AR 15460b661123Smrg 15470b661123SmrgAC_CHECK_TOOL(STRIP, strip, :) 15480b661123Smrgtest -z "$STRIP" && STRIP=: 15490b661123Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15500b661123Smrg 15510b661123SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15520b661123Smrgtest -z "$RANLIB" && RANLIB=: 15530b661123Smrg_LT_DECL([], [RANLIB], [1], 15540b661123Smrg [Commands used to install an old-style archive]) 15550b661123Smrg 15560b661123Smrg# Determine commands to create old-style static archives. 15570b661123Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15580b661123Smrgold_postinstall_cmds='chmod 644 $oldlib' 15590b661123Smrgold_postuninstall_cmds= 156072313efbSmrg 15610b661123Smrgif test -n "$RANLIB"; then 15620b661123Smrg case $host_os in 15634f00d7e1Smrg bitrig* | openbsd*) 1564880c7e28Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15650b661123Smrg ;; 15660b661123Smrg *) 1567880c7e28Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15680b661123Smrg ;; 15690b661123Smrg esac 1570880c7e28Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15710b661123Smrgfi 1572880c7e28Smrg 1573880c7e28Smrgcase $host_os in 1574880c7e28Smrg darwin*) 1575880c7e28Smrg lock_old_archive_extraction=yes ;; 1576880c7e28Smrg *) 1577880c7e28Smrg lock_old_archive_extraction=no ;; 1578880c7e28Smrgesac 15790b661123Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15800b661123Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15810b661123Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15820b661123Smrg [Commands used to build an old-style archive]) 1583880c7e28Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 1584880c7e28Smrg [Whether to use a lock for old archive extraction]) 15850b661123Smrg])# _LT_CMD_OLD_ARCHIVE 1586bdcaa8d0Smrg 1587bdcaa8d0Smrg 15880b661123Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 158972313efbSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 159072313efbSmrg# ---------------------------------------------------------------- 159172313efbSmrg# Check whether the given compiler option works 15920b661123SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15930b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15940b661123Smrgm4_require([_LT_DECL_SED])dnl 159572313efbSmrgAC_CACHE_CHECK([$1], [$2], 159672313efbSmrg [$2=no 15970b661123Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 159872313efbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15994f00d7e1Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 160072313efbSmrg # Insert the option either (1) after the last *FLAGS variable, or 160172313efbSmrg # (2) before a word containing "conftest.", or (3) at the end. 160272313efbSmrg # Note that $ac_compile itself does not contain backslashes and begins 160372313efbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 160472313efbSmrg # The option is referenced via a variable to avoid confusing sed. 160572313efbSmrg lt_compile=`echo "$ac_compile" | $SED \ 160672313efbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 160772313efbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 160872313efbSmrg -e 's:$: $lt_compiler_flag:'` 1609880c7e28Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 161072313efbSmrg (eval "$lt_compile" 2>conftest.err) 161172313efbSmrg ac_status=$? 161272313efbSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1613880c7e28Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 161472313efbSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 161572313efbSmrg # The compiler can only warn and ignore the option if not recognized 161672313efbSmrg # So say no if there are warnings other than the usual output. 1617880c7e28Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 161872313efbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 161972313efbSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 162072313efbSmrg $2=yes 162172313efbSmrg fi 162272313efbSmrg fi 16230b661123Smrg $RM conftest* 162472313efbSmrg]) 1625bdcaa8d0Smrg 16264f00d7e1Smrgif test yes = "[$]$2"; then 16270b661123Smrg m4_if([$5], , :, [$5]) 162872313efbSmrgelse 16290b661123Smrg m4_if([$6], , :, [$6]) 163072313efbSmrgfi 16310b661123Smrg])# _LT_COMPILER_OPTION 163272313efbSmrg 16330b661123Smrg# Old name: 16340b661123SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16350b661123Smrgdnl aclocal-1.4 backwards compatibility: 16360b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 163772313efbSmrg 16380b661123Smrg 16390b661123Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16400b661123Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16410b661123Smrg# ---------------------------------------------------- 16420b661123Smrg# Check whether the given linker option works 16430b661123SmrgAC_DEFUN([_LT_LINKER_OPTION], 16440b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16450b661123Smrgm4_require([_LT_DECL_SED])dnl 164672313efbSmrgAC_CACHE_CHECK([$1], [$2], 164772313efbSmrg [$2=no 16484f00d7e1Smrg save_LDFLAGS=$LDFLAGS 164972313efbSmrg LDFLAGS="$LDFLAGS $3" 165072313efbSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 165172313efbSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 165272313efbSmrg # The linker can only warn and ignore the option if not recognized 165372313efbSmrg # So say no if there are warnings 165472313efbSmrg if test -s conftest.err; then 165572313efbSmrg # Append any errors to the config.log. 165672313efbSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1657880c7e28Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 165872313efbSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 165972313efbSmrg if diff conftest.exp conftest.er2 >/dev/null; then 166072313efbSmrg $2=yes 166172313efbSmrg fi 166272313efbSmrg else 166372313efbSmrg $2=yes 166472313efbSmrg fi 166572313efbSmrg fi 16660b661123Smrg $RM -r conftest* 16674f00d7e1Smrg LDFLAGS=$save_LDFLAGS 166872313efbSmrg]) 166972313efbSmrg 16704f00d7e1Smrgif test yes = "[$]$2"; then 16710b661123Smrg m4_if([$4], , :, [$4]) 167272313efbSmrgelse 16730b661123Smrg m4_if([$5], , :, [$5]) 167472313efbSmrgfi 16750b661123Smrg])# _LT_LINKER_OPTION 167672313efbSmrg 16770b661123Smrg# Old name: 16780b661123SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16790b661123Smrgdnl aclocal-1.4 backwards compatibility: 16800b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 168172313efbSmrg 16820b661123Smrg 16830b661123Smrg# LT_CMD_MAX_LEN 16840b661123Smrg#--------------- 16850b661123SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16860b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16870b661123Smrg# find the maximum length of command line arguments 168872313efbSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 168972313efbSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 169072313efbSmrg i=0 16914f00d7e1Smrg teststring=ABCD 169272313efbSmrg 169372313efbSmrg case $build_os in 169472313efbSmrg msdosdjgpp*) 169572313efbSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 169672313efbSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 169772313efbSmrg # during glob expansion). Even if it were fixed, the result of this 169872313efbSmrg # check would be larger than it should be. 169972313efbSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1700bdcaa8d0Smrg ;; 170172313efbSmrg 170272313efbSmrg gnu*) 170372313efbSmrg # Under GNU Hurd, this test is not required because there is 170472313efbSmrg # no limit to the length of command line arguments. 170572313efbSmrg # Libtool will interpret -1 as no limit whatsoever 170672313efbSmrg lt_cv_sys_max_cmd_len=-1; 1707bdcaa8d0Smrg ;; 170872313efbSmrg 17090b661123Smrg cygwin* | mingw* | cegcc*) 171072313efbSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 171172313efbSmrg # about 5 minutes as the teststring grows exponentially. 171272313efbSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 171372313efbSmrg # you end up with a "frozen" computer, even though with patience 171472313efbSmrg # the test eventually succeeds (with a max line length of 256k). 171572313efbSmrg # Instead, let's just punt: use the minimum linelength reported by 171672313efbSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 171772313efbSmrg lt_cv_sys_max_cmd_len=8192; 1718bdcaa8d0Smrg ;; 1719bdcaa8d0Smrg 1720880c7e28Smrg mint*) 1721880c7e28Smrg # On MiNT this can take a long time and run out of memory. 1722880c7e28Smrg lt_cv_sys_max_cmd_len=8192; 1723880c7e28Smrg ;; 1724880c7e28Smrg 172572313efbSmrg amigaos*) 172672313efbSmrg # On AmigaOS with pdksh, this test takes hours, literally. 172772313efbSmrg # So we just punt and use a minimum line length of 8192. 172872313efbSmrg lt_cv_sys_max_cmd_len=8192; 172972313efbSmrg ;; 1730bdcaa8d0Smrg 17314f00d7e1Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 173272313efbSmrg # This has been around since 386BSD, at least. Likely further. 173372313efbSmrg if test -x /sbin/sysctl; then 173472313efbSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 173572313efbSmrg elif test -x /usr/sbin/sysctl; then 173672313efbSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1737bdcaa8d0Smrg else 173872313efbSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1739bdcaa8d0Smrg fi 174072313efbSmrg # And add a safety zone 174172313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 174272313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1743bdcaa8d0Smrg ;; 1744bdcaa8d0Smrg 174572313efbSmrg interix*) 174672313efbSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 174772313efbSmrg lt_cv_sys_max_cmd_len=196608 174872313efbSmrg ;; 1749bdcaa8d0Smrg 1750880c7e28Smrg os2*) 1751880c7e28Smrg # The test takes a long time on OS/2. 1752880c7e28Smrg lt_cv_sys_max_cmd_len=8192 1753880c7e28Smrg ;; 1754880c7e28Smrg 175572313efbSmrg osf*) 175672313efbSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 175772313efbSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 175872313efbSmrg # nice to cause kernel panics so lets avoid the loop below. 175972313efbSmrg # First set a reasonable default. 176072313efbSmrg lt_cv_sys_max_cmd_len=16384 176172313efbSmrg # 176272313efbSmrg if test -x /sbin/sysconfig; then 176372313efbSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 176472313efbSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 176572313efbSmrg esac 176672313efbSmrg fi 176772313efbSmrg ;; 176872313efbSmrg sco3.2v5*) 176972313efbSmrg lt_cv_sys_max_cmd_len=102400 177072313efbSmrg ;; 177172313efbSmrg sysv5* | sco5v6* | sysv4.2uw2*) 177272313efbSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 177372313efbSmrg if test -n "$kargmax"; then 17740b661123Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 177572313efbSmrg else 177672313efbSmrg lt_cv_sys_max_cmd_len=32768 177772313efbSmrg fi 1778bdcaa8d0Smrg ;; 1779bdcaa8d0Smrg *) 178072313efbSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17814f00d7e1Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 17824f00d7e1Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 178372313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 178472313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 178572313efbSmrg else 17860b661123Smrg # Make teststring a little bigger before we do anything with it. 17870b661123Smrg # a 1K string should be a reasonable start. 17884f00d7e1Smrg for i in 1 2 3 4 5 6 7 8; do 17890b661123Smrg teststring=$teststring$teststring 17900b661123Smrg done 179172313efbSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17920b661123Smrg # If test is not a shell built-in, we'll probably end up computing a 17930b661123Smrg # maximum length that is only half of the actual maximum length, but 17940b661123Smrg # we can't tell. 17954f00d7e1Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1796880c7e28Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17974f00d7e1Smrg test 17 != "$i" # 1/2 MB should be enough 179872313efbSmrg do 179972313efbSmrg i=`expr $i + 1` 180072313efbSmrg teststring=$teststring$teststring 180172313efbSmrg done 18020b661123Smrg # Only check the string length outside the loop. 18030b661123Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 180472313efbSmrg teststring= 18050b661123Smrg # Add a significant safety factor because C++ compilers can tack on 18060b661123Smrg # massive amounts of additional arguments before passing them to the 18070b661123Smrg # linker. It appears as though 1/2 is a usable value. 180872313efbSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 180972313efbSmrg fi 1810bdcaa8d0Smrg ;; 1811bdcaa8d0Smrg esac 181272313efbSmrg]) 18134f00d7e1Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 181472313efbSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 181572313efbSmrgelse 181672313efbSmrg AC_MSG_RESULT(none) 181772313efbSmrgfi 18180b661123Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18190b661123Smrg_LT_DECL([], [max_cmd_len], [0], 18200b661123Smrg [What is the maximum length of a command?]) 18210b661123Smrg])# LT_CMD_MAX_LEN 1822bdcaa8d0Smrg 18230b661123Smrg# Old name: 18240b661123SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18250b661123Smrgdnl aclocal-1.4 backwards compatibility: 18260b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827bdcaa8d0Smrg 18280b661123Smrg 18290b661123Smrg# _LT_HEADER_DLFCN 18300b661123Smrg# ---------------- 18310b661123Smrgm4_defun([_LT_HEADER_DLFCN], 18320b661123Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18330b661123Smrg])# _LT_HEADER_DLFCN 1834bdcaa8d0Smrg 1835bdcaa8d0Smrg 18360b661123Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18370b661123Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18380b661123Smrg# ---------------------------------------------------------------- 18390b661123Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 18400b661123Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18414f00d7e1Smrgif test yes = "$cross_compiling"; then : 184272313efbSmrg [$4] 184372313efbSmrgelse 184472313efbSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 184572313efbSmrg lt_status=$lt_dlunknown 18460b661123Smrg cat > conftest.$ac_ext <<_LT_EOF 1847880c7e28Smrg[#line $LINENO "configure" 184872313efbSmrg#include "confdefs.h" 1849bdcaa8d0Smrg 185072313efbSmrg#if HAVE_DLFCN_H 185172313efbSmrg#include <dlfcn.h> 185272313efbSmrg#endif 1853bdcaa8d0Smrg 185472313efbSmrg#include <stdio.h> 1855bdcaa8d0Smrg 185672313efbSmrg#ifdef RTLD_GLOBAL 185772313efbSmrg# define LT_DLGLOBAL RTLD_GLOBAL 185872313efbSmrg#else 185972313efbSmrg# ifdef DL_GLOBAL 186072313efbSmrg# define LT_DLGLOBAL DL_GLOBAL 186172313efbSmrg# else 186272313efbSmrg# define LT_DLGLOBAL 0 186372313efbSmrg# endif 186472313efbSmrg#endif 1865bdcaa8d0Smrg 186672313efbSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 186772313efbSmrg find out it does not work in some platform. */ 186872313efbSmrg#ifndef LT_DLLAZY_OR_NOW 186972313efbSmrg# ifdef RTLD_LAZY 187072313efbSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 187172313efbSmrg# else 187272313efbSmrg# ifdef DL_LAZY 187372313efbSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 187472313efbSmrg# else 187572313efbSmrg# ifdef RTLD_NOW 187672313efbSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 187772313efbSmrg# else 187872313efbSmrg# ifdef DL_NOW 187972313efbSmrg# define LT_DLLAZY_OR_NOW DL_NOW 188072313efbSmrg# else 188172313efbSmrg# define LT_DLLAZY_OR_NOW 0 188272313efbSmrg# endif 188372313efbSmrg# endif 188472313efbSmrg# endif 188572313efbSmrg# endif 188672313efbSmrg#endif 188772313efbSmrg 18884f00d7e1Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 1889880c7e28Smrg correspondingly for the symbols needed. */ 18904f00d7e1Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1891880c7e28Smrgint fnord () __attribute__((visibility("default"))); 1892880c7e28Smrg#endif 1893880c7e28Smrg 1894880c7e28Smrgint fnord () { return 42; } 189572313efbSmrgint main () 189672313efbSmrg{ 189772313efbSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 189872313efbSmrg int status = $lt_dlunknown; 189972313efbSmrg 190072313efbSmrg if (self) 190172313efbSmrg { 190272313efbSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1903880c7e28Smrg else 1904880c7e28Smrg { 1905880c7e28Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1906880c7e28Smrg else puts (dlerror ()); 1907880c7e28Smrg } 190872313efbSmrg /* dlclose (self); */ 190972313efbSmrg } 1910bdcaa8d0Smrg else 191172313efbSmrg puts (dlerror ()); 191272313efbSmrg 19130b661123Smrg return status; 191472313efbSmrg}] 19150b661123Smrg_LT_EOF 19164f00d7e1Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 191772313efbSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 191872313efbSmrg lt_status=$? 191972313efbSmrg case x$lt_status in 192072313efbSmrg x$lt_dlno_uscore) $1 ;; 192172313efbSmrg x$lt_dlneed_uscore) $2 ;; 192272313efbSmrg x$lt_dlunknown|x*) $3 ;; 192372313efbSmrg esac 192472313efbSmrg else : 192572313efbSmrg # compilation failed 192672313efbSmrg $3 1927bdcaa8d0Smrg fi 192872313efbSmrgfi 192972313efbSmrgrm -fr conftest* 19300b661123Smrg])# _LT_TRY_DLOPEN_SELF 1931bdcaa8d0Smrg 1932bdcaa8d0Smrg 19330b661123Smrg# LT_SYS_DLOPEN_SELF 19340b661123Smrg# ------------------ 19350b661123SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19360b661123Smrg[m4_require([_LT_HEADER_DLFCN])dnl 19374f00d7e1Smrgif test yes != "$enable_dlopen"; then 193872313efbSmrg enable_dlopen=unknown 193972313efbSmrg enable_dlopen_self=unknown 194072313efbSmrg enable_dlopen_self_static=unknown 194172313efbSmrgelse 194272313efbSmrg lt_cv_dlopen=no 194372313efbSmrg lt_cv_dlopen_libs= 1944bdcaa8d0Smrg 194572313efbSmrg case $host_os in 194672313efbSmrg beos*) 19474f00d7e1Smrg lt_cv_dlopen=load_add_on 194872313efbSmrg lt_cv_dlopen_libs= 194972313efbSmrg lt_cv_dlopen_self=yes 195072313efbSmrg ;; 1951bdcaa8d0Smrg 19520b661123Smrg mingw* | pw32* | cegcc*) 19534f00d7e1Smrg lt_cv_dlopen=LoadLibrary 195472313efbSmrg lt_cv_dlopen_libs= 19550b661123Smrg ;; 1956bdcaa8d0Smrg 195772313efbSmrg cygwin*) 19584f00d7e1Smrg lt_cv_dlopen=dlopen 195972313efbSmrg lt_cv_dlopen_libs= 19600b661123Smrg ;; 1961bdcaa8d0Smrg 196272313efbSmrg darwin*) 19634f00d7e1Smrg # if libdl is installed we need to link against it 196472313efbSmrg AC_CHECK_LIB([dl], [dlopen], 19654f00d7e1Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 19664f00d7e1Smrg lt_cv_dlopen=dyld 196772313efbSmrg lt_cv_dlopen_libs= 196872313efbSmrg lt_cv_dlopen_self=yes 196972313efbSmrg ]) 19700b661123Smrg ;; 1971bdcaa8d0Smrg 19724f00d7e1Smrg tpf*) 19734f00d7e1Smrg # Don't try to run any link tests for TPF. We know it's impossible 19744f00d7e1Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 19754f00d7e1Smrg lt_cv_dlopen=dlopen 19764f00d7e1Smrg lt_cv_dlopen_libs= 19774f00d7e1Smrg lt_cv_dlopen_self=no 19784f00d7e1Smrg ;; 19794f00d7e1Smrg 198072313efbSmrg *) 198172313efbSmrg AC_CHECK_FUNC([shl_load], 19824f00d7e1Smrg [lt_cv_dlopen=shl_load], 198372313efbSmrg [AC_CHECK_LIB([dld], [shl_load], 19844f00d7e1Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 198572313efbSmrg [AC_CHECK_FUNC([dlopen], 19864f00d7e1Smrg [lt_cv_dlopen=dlopen], 198772313efbSmrg [AC_CHECK_LIB([dl], [dlopen], 19884f00d7e1Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 198972313efbSmrg [AC_CHECK_LIB([svld], [dlopen], 19904f00d7e1Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 199172313efbSmrg [AC_CHECK_LIB([dld], [dld_link], 19924f00d7e1Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 199372313efbSmrg ]) 199472313efbSmrg ]) 199572313efbSmrg ]) 199672313efbSmrg ]) 199772313efbSmrg ]) 199872313efbSmrg ;; 199972313efbSmrg esac 200072313efbSmrg 20014f00d7e1Smrg if test no = "$lt_cv_dlopen"; then 200272313efbSmrg enable_dlopen=no 20034f00d7e1Smrg else 20044f00d7e1Smrg enable_dlopen=yes 2005bdcaa8d0Smrg fi 2006bdcaa8d0Smrg 200772313efbSmrg case $lt_cv_dlopen in 200872313efbSmrg dlopen) 20094f00d7e1Smrg save_CPPFLAGS=$CPPFLAGS 20104f00d7e1Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011bdcaa8d0Smrg 20124f00d7e1Smrg save_LDFLAGS=$LDFLAGS 201372313efbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014bdcaa8d0Smrg 20154f00d7e1Smrg save_LIBS=$LIBS 201672313efbSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2017bdcaa8d0Smrg 201872313efbSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 201972313efbSmrg lt_cv_dlopen_self, [dnl 20200b661123Smrg _LT_TRY_DLOPEN_SELF( 202172313efbSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 202272313efbSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 202372313efbSmrg ]) 2024bdcaa8d0Smrg 20254f00d7e1Smrg if test yes = "$lt_cv_dlopen_self"; then 202672313efbSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 202772313efbSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20280b661123Smrg lt_cv_dlopen_self_static, [dnl 20290b661123Smrg _LT_TRY_DLOPEN_SELF( 203072313efbSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 203172313efbSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 203272313efbSmrg ]) 2033bdcaa8d0Smrg fi 2034bdcaa8d0Smrg 20354f00d7e1Smrg CPPFLAGS=$save_CPPFLAGS 20364f00d7e1Smrg LDFLAGS=$save_LDFLAGS 20374f00d7e1Smrg LIBS=$save_LIBS 203872313efbSmrg ;; 203972313efbSmrg esac 2040bdcaa8d0Smrg 204172313efbSmrg case $lt_cv_dlopen_self in 204272313efbSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 204372313efbSmrg *) enable_dlopen_self=unknown ;; 204472313efbSmrg esac 2045bdcaa8d0Smrg 204672313efbSmrg case $lt_cv_dlopen_self_static in 204772313efbSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 204872313efbSmrg *) enable_dlopen_self_static=unknown ;; 204972313efbSmrg esac 2050bdcaa8d0Smrgfi 20510b661123Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20520b661123Smrg [Whether dlopen is supported]) 20530b661123Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20540b661123Smrg [Whether dlopen of programs is supported]) 20550b661123Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20560b661123Smrg [Whether dlopen of statically linked programs is supported]) 20570b661123Smrg])# LT_SYS_DLOPEN_SELF 2058bdcaa8d0Smrg 20590b661123Smrg# Old name: 20600b661123SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20610b661123Smrgdnl aclocal-1.4 backwards compatibility: 20620b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063bdcaa8d0Smrg 20640b661123Smrg 20650b661123Smrg# _LT_COMPILER_C_O([TAGNAME]) 20660b661123Smrg# --------------------------- 20670b661123Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 20680b661123Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20690b661123Smrgm4_defun([_LT_COMPILER_C_O], 20700b661123Smrg[m4_require([_LT_DECL_SED])dnl 20710b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20720b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 207372313efbSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20740b661123Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20750b661123Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20760b661123Smrg $RM -r conftest 2>/dev/null 207772313efbSmrg mkdir conftest 207872313efbSmrg cd conftest 207972313efbSmrg mkdir out 208072313efbSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081bdcaa8d0Smrg 208272313efbSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 208372313efbSmrg # Insert the option either (1) after the last *FLAGS variable, or 208472313efbSmrg # (2) before a word containing "conftest.", or (3) at the end. 208572313efbSmrg # Note that $ac_compile itself does not contain backslashes and begins 208672313efbSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 208772313efbSmrg lt_compile=`echo "$ac_compile" | $SED \ 208872313efbSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 208972313efbSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 209072313efbSmrg -e 's:$: $lt_compiler_flag:'` 2091880c7e28Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 209272313efbSmrg (eval "$lt_compile" 2>out/conftest.err) 209372313efbSmrg ac_status=$? 209472313efbSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2095880c7e28Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 209672313efbSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 209772313efbSmrg then 209872313efbSmrg # The compiler can only warn and ignore the option if not recognized 209972313efbSmrg # So say no if there are warnings 2100880c7e28Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 210172313efbSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 210272313efbSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21030b661123Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 210472313efbSmrg fi 210572313efbSmrg fi 210672313efbSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21070b661123Smrg $RM conftest* 210872313efbSmrg # SGI C++ compiler will create directory out/ii_files/ for 210972313efbSmrg # template instantiation 21100b661123Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21110b661123Smrg $RM out/* && rmdir out 211272313efbSmrg cd .. 21130b661123Smrg $RM -r conftest 21140b661123Smrg $RM conftest* 211572313efbSmrg]) 21160b661123Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21170b661123Smrg [Does compiler simultaneously support -c and -o options?]) 21180b661123Smrg])# _LT_COMPILER_C_O 2119bdcaa8d0Smrg 2120bdcaa8d0Smrg 21210b661123Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21220b661123Smrg# ---------------------------------- 212372313efbSmrg# Check to see if we can do hard links to lock some files if needed 21240b661123Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21250b661123Smrg[m4_require([_LT_ENABLE_LOCK])dnl 21260b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21270b661123Smrg_LT_COMPILER_C_O([$1]) 2128bdcaa8d0Smrg 21294f00d7e1Smrghard_links=nottested 21304f00d7e1Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 213172313efbSmrg # do not overwrite the value of need_locks provided by the user 213272313efbSmrg AC_MSG_CHECKING([if we can lock with hard links]) 213372313efbSmrg hard_links=yes 21340b661123Smrg $RM conftest* 213572313efbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213672313efbSmrg touch conftest.a 213772313efbSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 213872313efbSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213972313efbSmrg AC_MSG_RESULT([$hard_links]) 21404f00d7e1Smrg if test no = "$hard_links"; then 21414f00d7e1Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 214272313efbSmrg need_locks=warn 214372313efbSmrg fi 214472313efbSmrgelse 214572313efbSmrg need_locks=no 214672313efbSmrgfi 21470b661123Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21480b661123Smrg])# _LT_COMPILER_FILE_LOCKS 2149bdcaa8d0Smrg 2150bdcaa8d0Smrg 21510b661123Smrg# _LT_CHECK_OBJDIR 21520b661123Smrg# ---------------- 21530b661123Smrgm4_defun([_LT_CHECK_OBJDIR], 215472313efbSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 215572313efbSmrg[rm -f .libs 2>/dev/null 215672313efbSmrgmkdir .libs 2>/dev/null 215772313efbSmrgif test -d .libs; then 215872313efbSmrg lt_cv_objdir=.libs 215972313efbSmrgelse 216072313efbSmrg # MS-DOS does not allow filenames that begin with a dot. 216172313efbSmrg lt_cv_objdir=_libs 216272313efbSmrgfi 216372313efbSmrgrmdir .libs 2>/dev/null]) 216472313efbSmrgobjdir=$lt_cv_objdir 21650b661123Smrg_LT_DECL([], [objdir], [0], 21660b661123Smrg [The name of the directory that contains temporary libtool files])dnl 21670b661123Smrgm4_pattern_allow([LT_OBJDIR])dnl 21684f00d7e1SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 21694f00d7e1Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21700b661123Smrg])# _LT_CHECK_OBJDIR 2171bdcaa8d0Smrg 2172bdcaa8d0Smrg 21730b661123Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21740b661123Smrg# -------------------------------------- 217572313efbSmrg# Check hardcoding attributes. 21760b661123Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 217772313efbSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21780b661123Smrg_LT_TAGVAR(hardcode_action, $1)= 21790b661123Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21800b661123Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 21814f00d7e1Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2182bdcaa8d0Smrg 21830b661123Smrg # We can hardcode non-existent directories. 21844f00d7e1Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 218572313efbSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 218672313efbSmrg # have to relink, otherwise we might link with an installed library 218772313efbSmrg # when we should be linking with a yet-to-be-installed one 21884f00d7e1Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 21894f00d7e1Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 219072313efbSmrg # Linking always hardcodes the temporary library directory. 21910b661123Smrg _LT_TAGVAR(hardcode_action, $1)=relink 219272313efbSmrg else 219372313efbSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21940b661123Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 219572313efbSmrg fi 219672313efbSmrgelse 219772313efbSmrg # We cannot hardcode anything, or else we can only hardcode existing 219872313efbSmrg # directories. 21990b661123Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 220072313efbSmrgfi 22010b661123SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202bdcaa8d0Smrg 22034f00d7e1Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 22044f00d7e1Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 220572313efbSmrg # Fast installation is not supported 220672313efbSmrg enable_fast_install=no 22074f00d7e1Smrgelif test yes = "$shlibpath_overrides_runpath" || 22084f00d7e1Smrg test no = "$enable_shared"; then 220972313efbSmrg # Fast installation is not necessary 221072313efbSmrg enable_fast_install=needless 221172313efbSmrgfi 22120b661123Smrg_LT_TAGDECL([], [hardcode_action], [0], 22130b661123Smrg [How to hardcode a shared library path into an executable]) 22140b661123Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2215bdcaa8d0Smrg 2216bdcaa8d0Smrg 22170b661123Smrg# _LT_CMD_STRIPLIB 22180b661123Smrg# ---------------- 22190b661123Smrgm4_defun([_LT_CMD_STRIPLIB], 22200b661123Smrg[m4_require([_LT_DECL_EGREP]) 22210b661123Smrgstriplib= 222272313efbSmrgold_striplib= 222372313efbSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 22240b661123Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 222572313efbSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 222672313efbSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 222772313efbSmrg AC_MSG_RESULT([yes]) 222872313efbSmrgelse 222972313efbSmrg# FIXME - insert some real tests, host_os isn't really good enough 223072313efbSmrg case $host_os in 22310b661123Smrg darwin*) 22324f00d7e1Smrg if test -n "$STRIP"; then 22330b661123Smrg striplib="$STRIP -x" 22340b661123Smrg old_striplib="$STRIP -S" 22350b661123Smrg AC_MSG_RESULT([yes]) 22360b661123Smrg else 22370b661123Smrg AC_MSG_RESULT([no]) 22380b661123Smrg fi 22390b661123Smrg ;; 22400b661123Smrg *) 22410b661123Smrg AC_MSG_RESULT([no]) 224272313efbSmrg ;; 224372313efbSmrg esac 224472313efbSmrgfi 22450b661123Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22460b661123Smrg_LT_DECL([], [striplib], [1]) 22470b661123Smrg])# _LT_CMD_STRIPLIB 2248bdcaa8d0Smrg 2249bdcaa8d0Smrg 22504f00d7e1Smrg# _LT_PREPARE_MUNGE_PATH_LIST 22514f00d7e1Smrg# --------------------------- 22524f00d7e1Smrg# Make sure func_munge_path_list() is defined correctly. 22534f00d7e1Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 22544f00d7e1Smrg[[# func_munge_path_list VARIABLE PATH 22554f00d7e1Smrg# ----------------------------------- 22564f00d7e1Smrg# VARIABLE is name of variable containing _space_ separated list of 22574f00d7e1Smrg# directories to be munged by the contents of PATH, which is string 22584f00d7e1Smrg# having a format: 22594f00d7e1Smrg# "DIR[:DIR]:" 22604f00d7e1Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 22614f00d7e1Smrg# ":DIR[:DIR]" 22624f00d7e1Smrg# string "DIR[ DIR]" will be appended to VARIABLE 22634f00d7e1Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 22644f00d7e1Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 22654f00d7e1Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 22664f00d7e1Smrg# "DIR[:DIR]" 22674f00d7e1Smrg# VARIABLE will be replaced by "DIR[ DIR]" 22684f00d7e1Smrgfunc_munge_path_list () 22694f00d7e1Smrg{ 22704f00d7e1Smrg case x@S|@2 in 22714f00d7e1Smrg x) 22724f00d7e1Smrg ;; 22734f00d7e1Smrg *:) 22744f00d7e1Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 22754f00d7e1Smrg ;; 22764f00d7e1Smrg x:*) 22774f00d7e1Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 22784f00d7e1Smrg ;; 22794f00d7e1Smrg *::*) 22804f00d7e1Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 22814f00d7e1Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 22824f00d7e1Smrg ;; 22834f00d7e1Smrg *) 22844f00d7e1Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 22854f00d7e1Smrg ;; 22864f00d7e1Smrg esac 22874f00d7e1Smrg} 22884f00d7e1Smrg]])# _LT_PREPARE_PATH_LIST 22894f00d7e1Smrg 22904f00d7e1Smrg 22910b661123Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 229272313efbSmrg# ----------------------------- 229372313efbSmrg# PORTME Fill in your ld.so characteristics 22940b661123Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 22950b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 22960b661123Smrgm4_require([_LT_DECL_EGREP])dnl 22970b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 22980b661123Smrgm4_require([_LT_DECL_OBJDUMP])dnl 22990b661123Smrgm4_require([_LT_DECL_SED])dnl 2300880c7e28Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 23014f00d7e1Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 230272313efbSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23030b661123Smrgm4_if([$1], 23040b661123Smrg [], [ 23054f00d7e1Smrgif test yes = "$GCC"; then 230672313efbSmrg case $host_os in 23074f00d7e1Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 23084f00d7e1Smrg *) lt_awk_arg='/^libraries:/' ;; 230972313efbSmrg esac 2310880c7e28Smrg case $host_os in 23114f00d7e1Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 23124f00d7e1Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2313880c7e28Smrg esac 2314880c7e28Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2315880c7e28Smrg case $lt_search_path_spec in 2316880c7e28Smrg *\;*) 231772313efbSmrg # if the path contains ";" then we assume it to be the separator 231872313efbSmrg # otherwise default to the standard path separator (i.e. ":") - it is 231972313efbSmrg # assumed that no part of a normal pathname contains ";" but that should 232072313efbSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2321880c7e28Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2322880c7e28Smrg ;; 2323880c7e28Smrg *) 2324880c7e28Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2325880c7e28Smrg ;; 2326880c7e28Smrg esac 232772313efbSmrg # Ok, now we have the path, separated by spaces, we can step through it 23284f00d7e1Smrg # and add multilib dir if necessary... 232972313efbSmrg lt_tmp_lt_search_path_spec= 23304f00d7e1Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 23314f00d7e1Smrg # ...but if some path component already ends with the multilib dir we assume 23324f00d7e1Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 23334f00d7e1Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 23344f00d7e1Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 23354f00d7e1Smrg lt_multi_os_dir= 23364f00d7e1Smrg ;; 23374f00d7e1Smrg esac 233872313efbSmrg for lt_sys_path in $lt_search_path_spec; do 23394f00d7e1Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 23404f00d7e1Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 23414f00d7e1Smrg elif test -n "$lt_multi_os_dir"; then 234272313efbSmrg test -d "$lt_sys_path" && \ 234372313efbSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2344bdcaa8d0Smrg fi 2345bdcaa8d0Smrg done 2346880c7e28Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 23474f00d7e1SmrgBEGIN {RS = " "; FS = "/|\n";} { 23484f00d7e1Smrg lt_foo = ""; 23494f00d7e1Smrg lt_count = 0; 235072313efbSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 235172313efbSmrg if ($lt_i != "" && $lt_i != ".") { 235272313efbSmrg if ($lt_i == "..") { 235372313efbSmrg lt_count++; 235472313efbSmrg } else { 235572313efbSmrg if (lt_count == 0) { 23564f00d7e1Smrg lt_foo = "/" $lt_i lt_foo; 235772313efbSmrg } else { 235872313efbSmrg lt_count--; 235972313efbSmrg } 236072313efbSmrg } 236172313efbSmrg } 236272313efbSmrg } 236372313efbSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 236472313efbSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 236572313efbSmrg}'` 2366880c7e28Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 2367880c7e28Smrg # for these hosts. 2368880c7e28Smrg case $host_os in 2369880c7e28Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 23704f00d7e1Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2371880c7e28Smrg esac 2372880c7e28Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2373bdcaa8d0Smrgelse 237472313efbSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 237572313efbSmrgfi]) 23760b661123Smrglibrary_names_spec= 23770b661123Smrglibname_spec='lib$name' 23780b661123Smrgsoname_spec= 23794f00d7e1Smrgshrext_cmds=.so 23800b661123Smrgpostinstall_cmds= 23810b661123Smrgpostuninstall_cmds= 23820b661123Smrgfinish_cmds= 23830b661123Smrgfinish_eval= 23840b661123Smrgshlibpath_var= 23850b661123Smrgshlibpath_overrides_runpath=unknown 23860b661123Smrgversion_type=none 23870b661123Smrgdynamic_linker="$host_os ld.so" 23880b661123Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 238972313efbSmrgneed_lib_prefix=unknown 239072313efbSmrghardcode_into_libs=no 2391bdcaa8d0Smrg 239272313efbSmrg# when you set need_version to no, make sure it does not cause -set_version 239372313efbSmrg# flags to be left without arguments 239472313efbSmrgneed_version=unknown 2395bdcaa8d0Smrg 23964f00d7e1SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 23974f00d7e1Smrg[User-defined run-time library search path.]) 23984f00d7e1Smrg 239972313efbSmrgcase $host_os in 240072313efbSmrgaix3*) 2401880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 24024f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 240372313efbSmrg shlibpath_var=LIBPATH 2404bdcaa8d0Smrg 240572313efbSmrg # AIX 3 has no versioning support, so we append a major version to the name. 24064f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 240772313efbSmrg ;; 2408bdcaa8d0Smrg 240972313efbSmrgaix[[4-9]]*) 2410880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 241172313efbSmrg need_lib_prefix=no 241272313efbSmrg need_version=no 241372313efbSmrg hardcode_into_libs=yes 24144f00d7e1Smrg if test ia64 = "$host_cpu"; then 241572313efbSmrg # AIX 5 supports IA64 24164f00d7e1Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 241772313efbSmrg shlibpath_var=LD_LIBRARY_PATH 241872313efbSmrg else 241972313efbSmrg # With GCC up to 2.95.x, collect2 would create an import file 242072313efbSmrg # for dependence libraries. The import file would start with 24214f00d7e1Smrg # the line '#! .'. This would cause the generated library to 24224f00d7e1Smrg # depend on '.', always an invalid library. This was fixed in 242372313efbSmrg # development snapshots of GCC prior to 3.0. 242472313efbSmrg case $host_os in 242572313efbSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 242672313efbSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 242772313efbSmrg echo ' yes ' 24284f00d7e1Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 242972313efbSmrg : 243072313efbSmrg else 243172313efbSmrg can_build_shared=no 243272313efbSmrg fi 2433bdcaa8d0Smrg ;; 243472313efbSmrg esac 24354f00d7e1Smrg # Using Import Files as archive members, it is possible to support 24364f00d7e1Smrg # filename-based versioning of shared library archives on AIX. While 24374f00d7e1Smrg # this would work for both with and without runtime linking, it will 24384f00d7e1Smrg # prevent static linking of such archives. So we do filename-based 24394f00d7e1Smrg # shared library versioning with .so extension only, which is used 24404f00d7e1Smrg # when both runtime linking and shared linking is enabled. 24414f00d7e1Smrg # Unfortunately, runtime linking may impact performance, so we do 24424f00d7e1Smrg # not want this to be the default eventually. Also, we use the 24434f00d7e1Smrg # versioned .so libs for executables only if there is the -brtl 24444f00d7e1Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 24454f00d7e1Smrg # To allow for filename-based versioning support, we need to create 24464f00d7e1Smrg # libNAME.so.V as an archive file, containing: 24474f00d7e1Smrg # *) an Import File, referring to the versioned filename of the 24484f00d7e1Smrg # archive as well as the shared archive member, telling the 24494f00d7e1Smrg # bitwidth (32 or 64) of that shared object, and providing the 24504f00d7e1Smrg # list of exported symbols of that shared object, eventually 24514f00d7e1Smrg # decorated with the 'weak' keyword 24524f00d7e1Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 24534f00d7e1Smrg # it being seen by the linker. 24544f00d7e1Smrg # At run time we better use the real file rather than another symlink, 24554f00d7e1Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 24564f00d7e1Smrg 24574f00d7e1Smrg case $with_aix_soname,$aix_use_runtimelinking in 24584f00d7e1Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 245972313efbSmrg # soname into executable. Probably we can add versioning support to 246072313efbSmrg # collect2, so additional links can be useful in future. 24614f00d7e1Smrg aix,yes) # traditional libtool 24624f00d7e1Smrg dynamic_linker='AIX unversionable lib.so' 246372313efbSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 246472313efbSmrg # instead of lib<name>.a to let people know that these are not 246572313efbSmrg # typical AIX shared libraries. 24664f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 24674f00d7e1Smrg ;; 24684f00d7e1Smrg aix,no) # traditional AIX only 24694f00d7e1Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 247072313efbSmrg # We preserve .a as extension for shared libraries through AIX4.2 247172313efbSmrg # and later when we are not doing run time linking. 24724f00d7e1Smrg library_names_spec='$libname$release.a $libname.a' 24734f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 24744f00d7e1Smrg ;; 24754f00d7e1Smrg svr4,*) # full svr4 only 24764f00d7e1Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 24774f00d7e1Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24784f00d7e1Smrg # We do not specify a path in Import Files, so LIBPATH fires. 24794f00d7e1Smrg shlibpath_overrides_runpath=yes 24804f00d7e1Smrg ;; 24814f00d7e1Smrg *,yes) # both, prefer svr4 24824f00d7e1Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 24834f00d7e1Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 24844f00d7e1Smrg # unpreferred sharedlib libNAME.a needs extra handling 24854f00d7e1Smrg postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' 24864f00d7e1Smrg postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' 24874f00d7e1Smrg # We do not specify a path in Import Files, so LIBPATH fires. 24884f00d7e1Smrg shlibpath_overrides_runpath=yes 24894f00d7e1Smrg ;; 24904f00d7e1Smrg *,no) # both, prefer aix 24914f00d7e1Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 24924f00d7e1Smrg library_names_spec='$libname$release.a $libname.a' 24934f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 24944f00d7e1Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 24954f00d7e1Smrg postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' 24964f00d7e1Smrg postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' 24974f00d7e1Smrg ;; 24984f00d7e1Smrg esac 249972313efbSmrg shlibpath_var=LIBPATH 250072313efbSmrg fi 2501bdcaa8d0Smrg ;; 2502bdcaa8d0Smrg 250372313efbSmrgamigaos*) 25040b661123Smrg case $host_cpu in 25050b661123Smrg powerpc) 25060b661123Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25070b661123Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 25084f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25090b661123Smrg ;; 25100b661123Smrg m68k) 25110b661123Smrg library_names_spec='$libname.ixlibrary $libname.a' 25120b661123Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 25134f00d7e1Smrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $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' 25140b661123Smrg ;; 25150b661123Smrg esac 2516bdcaa8d0Smrg ;; 2517bdcaa8d0Smrg 2518bdcaa8d0Smrgbeos*) 25194f00d7e1Smrg library_names_spec='$libname$shared_ext' 252072313efbSmrg dynamic_linker="$host_os ld.so" 252172313efbSmrg shlibpath_var=LIBRARY_PATH 2522bdcaa8d0Smrg ;; 2523bdcaa8d0Smrg 2524bdcaa8d0Smrgbsdi[[45]]*) 2525880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 252672313efbSmrg need_version=no 25274f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25284f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 252972313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 253072313efbSmrg shlibpath_var=LD_LIBRARY_PATH 253172313efbSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 253272313efbSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 253372313efbSmrg # the default ld.so.conf also contains /usr/contrib/lib and 253472313efbSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 253572313efbSmrg # libtool to hard-code these into programs 2536bdcaa8d0Smrg ;; 2537bdcaa8d0Smrg 25380b661123Smrgcygwin* | mingw* | pw32* | cegcc*) 253972313efbSmrg version_type=windows 25404f00d7e1Smrg shrext_cmds=.dll 254172313efbSmrg need_version=no 254272313efbSmrg need_lib_prefix=no 2543bdcaa8d0Smrg 2544880c7e28Smrg case $GCC,$cc_basename in 2545880c7e28Smrg yes,*) 2546880c7e28Smrg # gcc 254772313efbSmrg library_names_spec='$libname.dll.a' 254872313efbSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 25494f00d7e1Smrg postinstall_cmds='base_file=`basename \$file`~ 25504f00d7e1Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 255172313efbSmrg dldir=$destdir/`dirname \$dlpath`~ 255272313efbSmrg test -d \$dldir || mkdir -p \$dldir~ 255372313efbSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 25540b661123Smrg chmod a+x \$dldir/$dlname~ 25550b661123Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25560b661123Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25570b661123Smrg fi' 255872313efbSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 255972313efbSmrg dlpath=$dir/\$dldll~ 25600b661123Smrg $RM \$dlpath' 256172313efbSmrg shlibpath_overrides_runpath=yes 2562bdcaa8d0Smrg 256372313efbSmrg case $host_os in 256472313efbSmrg cygwin*) 256572313efbSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 25664f00d7e1Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2567880c7e28Smrgm4_if([$1], [],[ 2568880c7e28Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 256972313efbSmrg ;; 25700b661123Smrg mingw* | cegcc*) 257172313efbSmrg # MinGW DLLs use traditional 'lib' prefix 25724f00d7e1Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257372313efbSmrg ;; 257472313efbSmrg pw32*) 257572313efbSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 25764f00d7e1Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2577bdcaa8d0Smrg ;; 2578bdcaa8d0Smrg esac 2579880c7e28Smrg dynamic_linker='Win32 ld.exe' 2580880c7e28Smrg ;; 2581880c7e28Smrg 2582880c7e28Smrg *,cl*) 2583880c7e28Smrg # Native MSVC 2584880c7e28Smrg libname_spec='$name' 25854f00d7e1Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25864f00d7e1Smrg library_names_spec='$libname.dll.lib' 2587880c7e28Smrg 2588880c7e28Smrg case $build_os in 2589880c7e28Smrg mingw*) 2590880c7e28Smrg sys_lib_search_path_spec= 2591880c7e28Smrg lt_save_ifs=$IFS 2592880c7e28Smrg IFS=';' 2593880c7e28Smrg for lt_path in $LIB 2594880c7e28Smrg do 2595880c7e28Smrg IFS=$lt_save_ifs 2596880c7e28Smrg # Let DOS variable expansion print the short 8.3 style file name. 2597880c7e28Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2598880c7e28Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2599880c7e28Smrg done 2600880c7e28Smrg IFS=$lt_save_ifs 2601880c7e28Smrg # Convert to MSYS style. 2602880c7e28Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2603880c7e28Smrg ;; 2604880c7e28Smrg cygwin*) 2605880c7e28Smrg # Convert to unix form, then to dos form, then back to unix form 2606880c7e28Smrg # but this time dos style (no spaces!) so that the unix form looks 2607880c7e28Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2608880c7e28Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2609880c7e28Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2610880c7e28Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2611880c7e28Smrg ;; 2612880c7e28Smrg *) 26134f00d7e1Smrg sys_lib_search_path_spec=$LIB 2614880c7e28Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2615880c7e28Smrg # It is most probably a Windows format PATH. 2616880c7e28Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2617880c7e28Smrg else 2618880c7e28Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2619880c7e28Smrg fi 2620880c7e28Smrg # FIXME: find the short name or the path components, as spaces are 2621880c7e28Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2622880c7e28Smrg ;; 2623880c7e28Smrg esac 2624880c7e28Smrg 2625880c7e28Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 26264f00d7e1Smrg postinstall_cmds='base_file=`basename \$file`~ 26274f00d7e1Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2628880c7e28Smrg dldir=$destdir/`dirname \$dlpath`~ 2629880c7e28Smrg test -d \$dldir || mkdir -p \$dldir~ 2630880c7e28Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2631880c7e28Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2632880c7e28Smrg dlpath=$dir/\$dldll~ 2633880c7e28Smrg $RM \$dlpath' 2634880c7e28Smrg shlibpath_overrides_runpath=yes 2635880c7e28Smrg dynamic_linker='Win32 link.exe' 2636bdcaa8d0Smrg ;; 263772313efbSmrg 2638bdcaa8d0Smrg *) 2639880c7e28Smrg # Assume MSVC wrapper 26404f00d7e1Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2641880c7e28Smrg dynamic_linker='Win32 ld.exe' 2642bdcaa8d0Smrg ;; 2643bdcaa8d0Smrg esac 264472313efbSmrg # FIXME: first we should search . and the directory the executable is in 264572313efbSmrg shlibpath_var=PATH 2646bdcaa8d0Smrg ;; 2647bdcaa8d0Smrg 264872313efbSmrgdarwin* | rhapsody*) 264972313efbSmrg dynamic_linker="$host_os dyld" 265072313efbSmrg version_type=darwin 265172313efbSmrg need_lib_prefix=no 265272313efbSmrg need_version=no 26534f00d7e1Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 26544f00d7e1Smrg soname_spec='$libname$release$major$shared_ext' 265572313efbSmrg shlibpath_overrides_runpath=yes 265672313efbSmrg shlibpath_var=DYLD_LIBRARY_PATH 265772313efbSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 26580b661123Smrgm4_if([$1], [],[ 26590b661123Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 266072313efbSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2661bdcaa8d0Smrg ;; 2662bdcaa8d0Smrg 266372313efbSmrgdgux*) 2664880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 266572313efbSmrg need_lib_prefix=no 266672313efbSmrg need_version=no 26674f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26684f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 266972313efbSmrg shlibpath_var=LD_LIBRARY_PATH 2670bdcaa8d0Smrg ;; 2671bdcaa8d0Smrg 267272313efbSmrgfreebsd* | dragonfly*) 267372313efbSmrg # DragonFly does not have aout. When/if they implement a new 267472313efbSmrg # versioning mechanism, adjust this. 267572313efbSmrg if test -x /usr/bin/objformat; then 267672313efbSmrg objformat=`/usr/bin/objformat` 2677bdcaa8d0Smrg else 267872313efbSmrg case $host_os in 2679880c7e28Smrg freebsd[[23]].*) objformat=aout ;; 268072313efbSmrg *) objformat=elf ;; 268172313efbSmrg esac 2682bdcaa8d0Smrg fi 268372313efbSmrg version_type=freebsd-$objformat 268472313efbSmrg case $version_type in 268572313efbSmrg freebsd-elf*) 26864f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 26874f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 268872313efbSmrg need_version=no 268972313efbSmrg need_lib_prefix=no 269072313efbSmrg ;; 269172313efbSmrg freebsd-*) 26924f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 269372313efbSmrg need_version=yes 269472313efbSmrg ;; 269572313efbSmrg esac 269672313efbSmrg shlibpath_var=LD_LIBRARY_PATH 269772313efbSmrg case $host_os in 2698880c7e28Smrg freebsd2.*) 269972313efbSmrg shlibpath_overrides_runpath=yes 270072313efbSmrg ;; 270172313efbSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 270272313efbSmrg shlibpath_overrides_runpath=yes 270372313efbSmrg hardcode_into_libs=yes 270472313efbSmrg ;; 270572313efbSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 270672313efbSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 270772313efbSmrg shlibpath_overrides_runpath=no 270872313efbSmrg hardcode_into_libs=yes 270972313efbSmrg ;; 271072313efbSmrg *) # from 4.6 on, and DragonFly 271172313efbSmrg shlibpath_overrides_runpath=yes 271272313efbSmrg hardcode_into_libs=yes 271372313efbSmrg ;; 271472313efbSmrg esac 2715bdcaa8d0Smrg ;; 2716bdcaa8d0Smrg 2717880c7e28Smrghaiku*) 2718880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 2719880c7e28Smrg need_lib_prefix=no 2720880c7e28Smrg need_version=no 2721880c7e28Smrg dynamic_linker="$host_os runtime_loader" 27224f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27234f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 2724880c7e28Smrg shlibpath_var=LIBRARY_PATH 27254f00d7e1Smrg shlibpath_overrides_runpath=no 2726880c7e28Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 272772313efbSmrg hardcode_into_libs=yes 2728bdcaa8d0Smrg ;; 2729bdcaa8d0Smrg 273072313efbSmrghpux9* | hpux10* | hpux11*) 273172313efbSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 273272313efbSmrg # link against other versions. 273372313efbSmrg version_type=sunos 273472313efbSmrg need_lib_prefix=no 273572313efbSmrg need_version=no 273672313efbSmrg case $host_cpu in 273772313efbSmrg ia64*) 273872313efbSmrg shrext_cmds='.so' 273972313efbSmrg hardcode_into_libs=yes 274072313efbSmrg dynamic_linker="$host_os dld.so" 274172313efbSmrg shlibpath_var=LD_LIBRARY_PATH 274272313efbSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27434f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27444f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 27454f00d7e1Smrg if test 32 = "$HPUX_IA64_MODE"; then 274672313efbSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 27474f00d7e1Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 274872313efbSmrg else 274972313efbSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 27504f00d7e1Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 275172313efbSmrg fi 2752bdcaa8d0Smrg ;; 27530b661123Smrg hppa*64*) 27540b661123Smrg shrext_cmds='.sl' 27550b661123Smrg hardcode_into_libs=yes 27560b661123Smrg dynamic_linker="$host_os dld.sl" 27570b661123Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27580b661123Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 27594f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27604f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 27610b661123Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27620b661123Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27630b661123Smrg ;; 27640b661123Smrg *) 276572313efbSmrg shrext_cmds='.sl' 276672313efbSmrg dynamic_linker="$host_os dld.sl" 276772313efbSmrg shlibpath_var=SHLIB_PATH 276872313efbSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 27694f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27704f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 2771bdcaa8d0Smrg ;; 277272313efbSmrg esac 2773880c7e28Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 277472313efbSmrg postinstall_cmds='chmod 555 $lib' 2775880c7e28Smrg # or fails outright, so override atomically: 2776880c7e28Smrg install_override_mode=555 277772313efbSmrg ;; 277872313efbSmrg 277972313efbSmrginterix[[3-9]]*) 2780880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 278172313efbSmrg need_lib_prefix=no 278272313efbSmrg need_version=no 27834f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 27844f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 278572313efbSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 278672313efbSmrg shlibpath_var=LD_LIBRARY_PATH 278772313efbSmrg shlibpath_overrides_runpath=no 278872313efbSmrg hardcode_into_libs=yes 278972313efbSmrg ;; 279072313efbSmrg 279172313efbSmrgirix5* | irix6* | nonstopux*) 279272313efbSmrg case $host_os in 279372313efbSmrg nonstopux*) version_type=nonstopux ;; 279472313efbSmrg *) 27954f00d7e1Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 2796880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 279772313efbSmrg else 279872313efbSmrg version_type=irix 279972313efbSmrg fi ;; 280072313efbSmrg esac 280172313efbSmrg need_lib_prefix=no 280272313efbSmrg need_version=no 28034f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 28044f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 280572313efbSmrg case $host_os in 280672313efbSmrg irix5* | nonstopux*) 280772313efbSmrg libsuff= shlibsuff= 2808bdcaa8d0Smrg ;; 280972313efbSmrg *) 281072313efbSmrg case $LD in # libtool.m4 will add one of these switches to LD 281172313efbSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 281272313efbSmrg libsuff= shlibsuff= libmagic=32-bit;; 281372313efbSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 281472313efbSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 281572313efbSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 281672313efbSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 281772313efbSmrg *) libsuff= shlibsuff= libmagic=never-match;; 281872313efbSmrg esac 2819bdcaa8d0Smrg ;; 2820bdcaa8d0Smrg esac 282172313efbSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 282272313efbSmrg shlibpath_overrides_runpath=no 28234f00d7e1Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 28244f00d7e1Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 282572313efbSmrg hardcode_into_libs=yes 2826bdcaa8d0Smrg ;; 2827bdcaa8d0Smrg 282872313efbSmrg# No shared lib support for Linux oldld, aout, or coff. 282972313efbSmrglinux*oldld* | linux*aout* | linux*coff*) 283072313efbSmrg dynamic_linker=no 2831bdcaa8d0Smrg ;; 2832bdcaa8d0Smrg 28334f00d7e1Smrglinux*android*) 28344f00d7e1Smrg version_type=none # Android doesn't support versioned libraries. 28354f00d7e1Smrg need_lib_prefix=no 28364f00d7e1Smrg need_version=no 28374f00d7e1Smrg library_names_spec='$libname$release$shared_ext' 28384f00d7e1Smrg soname_spec='$libname$release$shared_ext' 28394f00d7e1Smrg finish_cmds= 28404f00d7e1Smrg shlibpath_var=LD_LIBRARY_PATH 28414f00d7e1Smrg shlibpath_overrides_runpath=yes 28424f00d7e1Smrg 28434f00d7e1Smrg # This implies no fast_install, which is unacceptable. 28444f00d7e1Smrg # Some rework will be needed to allow for fast_install 28454f00d7e1Smrg # before this can be enabled. 28464f00d7e1Smrg hardcode_into_libs=yes 28474f00d7e1Smrg 28484f00d7e1Smrg dynamic_linker='Android linker' 28494f00d7e1Smrg # Don't embed -rpath directories since the linker doesn't support them. 28504f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 28514f00d7e1Smrg ;; 28524f00d7e1Smrg 2853880c7e28Smrg# This must be glibc/ELF. 28544f00d7e1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2855880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 285672313efbSmrg need_lib_prefix=no 285772313efbSmrg need_version=no 28584f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 28594f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 286072313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 286172313efbSmrg shlibpath_var=LD_LIBRARY_PATH 286272313efbSmrg shlibpath_overrides_runpath=no 2863880c7e28Smrg 28640b661123Smrg # Some binutils ld are patched to set DT_RUNPATH 2865880c7e28Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2866880c7e28Smrg [lt_cv_shlibpath_overrides_runpath=no 2867880c7e28Smrg save_LDFLAGS=$LDFLAGS 2868880c7e28Smrg save_libdir=$libdir 2869880c7e28Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2870880c7e28Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2871880c7e28Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2872880c7e28Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2873880c7e28Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2874880c7e28Smrg LDFLAGS=$save_LDFLAGS 2875880c7e28Smrg libdir=$save_libdir 2876880c7e28Smrg ]) 2877880c7e28Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 28780b661123Smrg 287972313efbSmrg # This implies no fast_install, which is unacceptable. 288072313efbSmrg # Some rework will be needed to allow for fast_install 288172313efbSmrg # before this can be enabled. 288272313efbSmrg hardcode_into_libs=yes 28830b661123Smrg 28840b661123Smrg # Add ABI-specific directories to the system library path. 28850b661123Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 288666c2ea32Smrg 28874f00d7e1Smrg # Ideally, we could use ldconfig to report *all* directores which are 28884f00d7e1Smrg # searched for libraries, however this is still not possible. Aside from not 28894f00d7e1Smrg # being certain /sbin/ldconfig is available, command 28904f00d7e1Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 28914f00d7e1Smrg # even though it is searched at run-time. Try to do the best guess by 28924f00d7e1Smrg # appending ld.so.conf contents (and includes) to the search path. 289372313efbSmrg if test -f /etc/ld.so.conf; then 2894880c7e28Smrg 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' ' '` 289566c2ea32Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2896bdcaa8d0Smrg fi 2897bdcaa8d0Smrg 289872313efbSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 289972313efbSmrg # powerpc, because MkLinux only supported shared libraries with the 290072313efbSmrg # GNU dynamic linker. Since this was broken with cross compilers, 290172313efbSmrg # most powerpc-linux boxes support dynamic linking these days and 290272313efbSmrg # people can always --disable-shared, the test was removed, and we 290372313efbSmrg # assume the GNU/Linux dynamic linker is in use. 290472313efbSmrg dynamic_linker='GNU/Linux ld.so' 2905bdcaa8d0Smrg ;; 290672313efbSmrg 290772313efbSmrgnetbsd*) 290872313efbSmrg version_type=sunos 290972313efbSmrg need_lib_prefix=no 291072313efbSmrg need_version=no 29110b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 29124f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 291372313efbSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 291472313efbSmrg dynamic_linker='NetBSD (a.out) ld.so' 291572313efbSmrg else 29164f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29174f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 291872313efbSmrg dynamic_linker='NetBSD ld.elf_so' 291972313efbSmrg fi 292072313efbSmrg shlibpath_var=LD_LIBRARY_PATH 292172313efbSmrg shlibpath_overrides_runpath=yes 292272313efbSmrg hardcode_into_libs=yes 2923bdcaa8d0Smrg ;; 292472313efbSmrg 292572313efbSmrgnewsos6) 2926880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 29274f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 292872313efbSmrg shlibpath_var=LD_LIBRARY_PATH 292972313efbSmrg shlibpath_overrides_runpath=yes 2930bdcaa8d0Smrg ;; 2931bdcaa8d0Smrg 29320b661123Smrg*nto* | *qnx*) 29330b661123Smrg version_type=qnx 293472313efbSmrg need_lib_prefix=no 293572313efbSmrg need_version=no 29364f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29374f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 293872313efbSmrg shlibpath_var=LD_LIBRARY_PATH 29390b661123Smrg shlibpath_overrides_runpath=no 29400b661123Smrg hardcode_into_libs=yes 29410b661123Smrg dynamic_linker='ldqnx.so' 294272313efbSmrg ;; 2943bdcaa8d0Smrg 29444f00d7e1Smrgopenbsd* | bitrig*) 294572313efbSmrg version_type=sunos 29464f00d7e1Smrg sys_lib_dlsearch_path_spec=/usr/lib 294772313efbSmrg need_lib_prefix=no 29484f00d7e1Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 29494f00d7e1Smrg need_version=no 2950bdcaa8d0Smrg else 29514f00d7e1Smrg need_version=yes 2952bdcaa8d0Smrg fi 29534f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29544f00d7e1Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29554f00d7e1Smrg shlibpath_var=LD_LIBRARY_PATH 29564f00d7e1Smrg shlibpath_overrides_runpath=yes 295772313efbSmrg ;; 2958bdcaa8d0Smrg 295972313efbSmrgos2*) 296072313efbSmrg libname_spec='$name' 29614f00d7e1Smrg version_type=windows 29624f00d7e1Smrg shrext_cmds=.dll 29634f00d7e1Smrg need_version=no 296472313efbSmrg need_lib_prefix=no 29654f00d7e1Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 29664f00d7e1Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 29674f00d7e1Smrg v=$($ECHO $release$versuffix | tr -d .-); 29684f00d7e1Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 29694f00d7e1Smrg $ECHO $n$v`$shared_ext' 29704f00d7e1Smrg library_names_spec='${libname}_dll.$libext' 297172313efbSmrg dynamic_linker='OS/2 ld.exe' 29724f00d7e1Smrg shlibpath_var=BEGINLIBPATH 29734f00d7e1Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 29744f00d7e1Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29754f00d7e1Smrg postinstall_cmds='base_file=`basename \$file`~ 29764f00d7e1Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 29774f00d7e1Smrg dldir=$destdir/`dirname \$dlpath`~ 29784f00d7e1Smrg test -d \$dldir || mkdir -p \$dldir~ 29794f00d7e1Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 29804f00d7e1Smrg chmod a+x \$dldir/$dlname~ 29814f00d7e1Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 29824f00d7e1Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 29834f00d7e1Smrg fi' 29844f00d7e1Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 29854f00d7e1Smrg dlpath=$dir/\$dldll~ 29864f00d7e1Smrg $RM \$dlpath' 298772313efbSmrg ;; 2988bdcaa8d0Smrg 298972313efbSmrgosf3* | osf4* | osf5*) 299072313efbSmrg version_type=osf 299172313efbSmrg need_lib_prefix=no 299272313efbSmrg need_version=no 29934f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 29944f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 299572313efbSmrg shlibpath_var=LD_LIBRARY_PATH 299672313efbSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 29974f00d7e1Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 299872313efbSmrg ;; 2999bdcaa8d0Smrg 300072313efbSmrgrdos*) 300172313efbSmrg dynamic_linker=no 300272313efbSmrg ;; 3003bdcaa8d0Smrg 300472313efbSmrgsolaris*) 3005880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 300672313efbSmrg need_lib_prefix=no 300772313efbSmrg need_version=no 30084f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30094f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 301072313efbSmrg shlibpath_var=LD_LIBRARY_PATH 301172313efbSmrg shlibpath_overrides_runpath=yes 301272313efbSmrg hardcode_into_libs=yes 301372313efbSmrg # ldd complains unless libraries are executable 301472313efbSmrg postinstall_cmds='chmod +x $lib' 301572313efbSmrg ;; 3016bdcaa8d0Smrg 301772313efbSmrgsunos4*) 301872313efbSmrg version_type=sunos 30194f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 302072313efbSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 302172313efbSmrg shlibpath_var=LD_LIBRARY_PATH 302272313efbSmrg shlibpath_overrides_runpath=yes 30234f00d7e1Smrg if test yes = "$with_gnu_ld"; then 302472313efbSmrg need_lib_prefix=no 302572313efbSmrg fi 302672313efbSmrg need_version=yes 302772313efbSmrg ;; 3028bdcaa8d0Smrg 302972313efbSmrgsysv4 | sysv4.3*) 3030880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 30314f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30324f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 303372313efbSmrg shlibpath_var=LD_LIBRARY_PATH 303472313efbSmrg case $host_vendor in 303572313efbSmrg sni) 303672313efbSmrg shlibpath_overrides_runpath=no 303772313efbSmrg need_lib_prefix=no 303872313efbSmrg runpath_var=LD_RUN_PATH 303972313efbSmrg ;; 304072313efbSmrg siemens) 304172313efbSmrg need_lib_prefix=no 304272313efbSmrg ;; 304372313efbSmrg motorola) 304472313efbSmrg need_lib_prefix=no 304572313efbSmrg need_version=no 304672313efbSmrg shlibpath_overrides_runpath=no 304772313efbSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 304872313efbSmrg ;; 304972313efbSmrg esac 305072313efbSmrg ;; 3051bdcaa8d0Smrg 305272313efbSmrgsysv4*MP*) 30534f00d7e1Smrg if test -d /usr/nec; then 3054880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 30554f00d7e1Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 30564f00d7e1Smrg soname_spec='$libname$shared_ext.$major' 305772313efbSmrg shlibpath_var=LD_LIBRARY_PATH 3058bdcaa8d0Smrg fi 3059bdcaa8d0Smrg ;; 3060bdcaa8d0Smrg 306172313efbSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 30624f00d7e1Smrg version_type=sco 306372313efbSmrg need_lib_prefix=no 306472313efbSmrg need_version=no 30654f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 30664f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 306772313efbSmrg shlibpath_var=LD_LIBRARY_PATH 30680b661123Smrg shlibpath_overrides_runpath=yes 306972313efbSmrg hardcode_into_libs=yes 30704f00d7e1Smrg if test yes = "$with_gnu_ld"; then 307172313efbSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 307272313efbSmrg else 307372313efbSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 307472313efbSmrg case $host_os in 307572313efbSmrg sco3.2v5*) 307672313efbSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 307772313efbSmrg ;; 307872313efbSmrg esac 3079bdcaa8d0Smrg fi 308072313efbSmrg sys_lib_dlsearch_path_spec='/usr/lib' 308172313efbSmrg ;; 3082bdcaa8d0Smrg 30830b661123Smrgtpf*) 30840b661123Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3085880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 30860b661123Smrg need_lib_prefix=no 30870b661123Smrg need_version=no 30884f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30890b661123Smrg shlibpath_var=LD_LIBRARY_PATH 30900b661123Smrg shlibpath_overrides_runpath=no 30910b661123Smrg hardcode_into_libs=yes 30920b661123Smrg ;; 30930b661123Smrg 309472313efbSmrguts4*) 3095880c7e28Smrg version_type=linux # correct to gnu/linux during the next big refactor 30964f00d7e1Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30974f00d7e1Smrg soname_spec='$libname$release$shared_ext$major' 309872313efbSmrg shlibpath_var=LD_LIBRARY_PATH 309972313efbSmrg ;; 3100bdcaa8d0Smrg 310172313efbSmrg*) 310272313efbSmrg dynamic_linker=no 310372313efbSmrg ;; 310472313efbSmrgesac 310572313efbSmrgAC_MSG_RESULT([$dynamic_linker]) 31064f00d7e1Smrgtest no = "$dynamic_linker" && can_build_shared=no 3107bdcaa8d0Smrg 310872313efbSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 31094f00d7e1Smrgif test yes = "$GCC"; then 311072313efbSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 311172313efbSmrgfi 3112bdcaa8d0Smrg 31134f00d7e1Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 31144f00d7e1Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31150b661123Smrgfi 31164f00d7e1Smrg 31174f00d7e1Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 31184f00d7e1Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31190b661123Smrgfi 312096ce994aSmrg 31214f00d7e1Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 31224f00d7e1Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 31234f00d7e1Smrg 31244f00d7e1Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 31254f00d7e1Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 31264f00d7e1Smrg 31274f00d7e1Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 31284f00d7e1Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 31294f00d7e1Smrg 31300b661123Smrg_LT_DECL([], [variables_saved_for_relink], [1], 31310b661123Smrg [Variables whose values should be saved in libtool wrapper scripts and 31320b661123Smrg restored at link time]) 31330b661123Smrg_LT_DECL([], [need_lib_prefix], [0], 31340b661123Smrg [Do we need the "lib" prefix for modules?]) 31350b661123Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31360b661123Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31370b661123Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31380b661123Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31390b661123Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31400b661123Smrg [Is shlibpath searched before the hard-coded library search path?]) 31410b661123Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31420b661123Smrg_LT_DECL([], [library_names_spec], [1], 31430b661123Smrg [[List of archive names. First name is the real one, the rest are links. 31440b661123Smrg The last name is the one that the linker finds with -lNAME]]) 31450b661123Smrg_LT_DECL([], [soname_spec], [1], 31460b661123Smrg [[The coded name of the library, if different from the real name]]) 3147880c7e28Smrg_LT_DECL([], [install_override_mode], [1], 3148880c7e28Smrg [Permission mode override for installation of shared libraries]) 31490b661123Smrg_LT_DECL([], [postinstall_cmds], [2], 31500b661123Smrg [Command to use after installation of a shared archive]) 31510b661123Smrg_LT_DECL([], [postuninstall_cmds], [2], 31520b661123Smrg [Command to use after uninstallation of a shared archive]) 31530b661123Smrg_LT_DECL([], [finish_cmds], [2], 31540b661123Smrg [Commands used to finish a libtool library installation in a directory]) 31550b661123Smrg_LT_DECL([], [finish_eval], [1], 31560b661123Smrg [[As "finish_cmds", except a single script fragment to be evaled but 31570b661123Smrg not shown]]) 31580b661123Smrg_LT_DECL([], [hardcode_into_libs], [0], 31590b661123Smrg [Whether we should hardcode library paths into libraries]) 31600b661123Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31610b661123Smrg [Compile-time system search path for libraries]) 31624f00d7e1Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 31634f00d7e1Smrg [Detected run-time system search path for libraries]) 31644f00d7e1Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 31654f00d7e1Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31660b661123Smrg])# _LT_SYS_DYNAMIC_LINKER 31670b661123Smrg 31680b661123Smrg 31690b661123Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 317096ce994aSmrg# -------------------------- 31714f00d7e1Smrg# find a file program that can recognize shared library 31720b661123SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31730b661123Smrg[m4_require([_LT_DECL_EGREP])dnl 317496ce994aSmrgAC_MSG_CHECKING([for $1]) 317596ce994aSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 317696ce994aSmrg[case $MAGIC_CMD in 317772313efbSmrg[[\\/*] | ?:[\\/]*]) 31784f00d7e1Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 317972313efbSmrg ;; 318072313efbSmrg*) 31814f00d7e1Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 31824f00d7e1Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 318372313efbSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 318472313efbSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 318572313efbSmrgdnl not every word. This closes a longstanding sh security hole. 31860b661123Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 318772313efbSmrg for ac_dir in $ac_dummy; do 31884f00d7e1Smrg IFS=$lt_save_ifs 318972313efbSmrg test -z "$ac_dir" && ac_dir=. 31904f00d7e1Smrg if test -f "$ac_dir/$1"; then 31914f00d7e1Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 319272313efbSmrg if test -n "$file_magic_test_file"; then 319372313efbSmrg case $deplibs_check_method in 319472313efbSmrg "file_magic "*) 319572313efbSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 31964f00d7e1Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 319772313efbSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 319872313efbSmrg $EGREP "$file_magic_regex" > /dev/null; then 319972313efbSmrg : 320072313efbSmrg else 32010b661123Smrg cat <<_LT_EOF 1>&2 3202bdcaa8d0Smrg 320372313efbSmrg*** Warning: the command libtool uses to detect shared libraries, 320472313efbSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 320572313efbSmrg*** The result is that libtool may fail to recognize shared libraries 320672313efbSmrg*** as such. This will affect the creation of libtool libraries that 320772313efbSmrg*** depend on shared libraries, but programs linked with such libtool 320872313efbSmrg*** libraries will work regardless of this problem. Nevertheless, you 320972313efbSmrg*** may want to report the problem to your system manager and/or to 321072313efbSmrg*** bug-libtool@gnu.org 3211bdcaa8d0Smrg 32120b661123Smrg_LT_EOF 321372313efbSmrg fi ;; 321472313efbSmrg esac 321572313efbSmrg fi 321672313efbSmrg break 321772313efbSmrg fi 321872313efbSmrg done 32194f00d7e1Smrg IFS=$lt_save_ifs 32204f00d7e1Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 322172313efbSmrg ;; 322272313efbSmrgesac]) 32234f00d7e1SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 322472313efbSmrgif test -n "$MAGIC_CMD"; then 322572313efbSmrg AC_MSG_RESULT($MAGIC_CMD) 322672313efbSmrgelse 322772313efbSmrg AC_MSG_RESULT(no) 322872313efbSmrgfi 32290b661123Smrg_LT_DECL([], [MAGIC_CMD], [0], 32300b661123Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32310b661123Smrg])# _LT_PATH_TOOL_PREFIX 3232bdcaa8d0Smrg 32330b661123Smrg# Old name: 32340b661123SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32350b661123Smrgdnl aclocal-1.4 backwards compatibility: 32360b661123Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3237bdcaa8d0Smrg 32380b661123Smrg 32390b661123Smrg# _LT_PATH_MAGIC 32400b661123Smrg# -------------- 32414f00d7e1Smrg# find a file program that can recognize a shared library 32420b661123Smrgm4_defun([_LT_PATH_MAGIC], 32430b661123Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 324472313efbSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 324572313efbSmrg if test -n "$ac_tool_prefix"; then 32460b661123Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 324772313efbSmrg else 324872313efbSmrg MAGIC_CMD=: 324972313efbSmrg fi 325072313efbSmrgfi 32510b661123Smrg])# _LT_PATH_MAGIC 3252bdcaa8d0Smrg 325372313efbSmrg 32540b661123Smrg# LT_PATH_LD 325572313efbSmrg# ---------- 325672313efbSmrg# find the pathname to the GNU or non-GNU linker 32570b661123SmrgAC_DEFUN([LT_PATH_LD], 32580b661123Smrg[AC_REQUIRE([AC_PROG_CC])dnl 325996ce994aSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 326096ce994aSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32610b661123Smrgm4_require([_LT_DECL_SED])dnl 32620b661123Smrgm4_require([_LT_DECL_EGREP])dnl 3263880c7e28Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32640b661123Smrg 32650b661123SmrgAC_ARG_WITH([gnu-ld], 32660b661123Smrg [AS_HELP_STRING([--with-gnu-ld], 32670b661123Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 32684f00d7e1Smrg [test no = "$withval" || with_gnu_ld=yes], 32690b661123Smrg [with_gnu_ld=no])dnl 32700b661123Smrg 327172313efbSmrgac_prog=ld 32724f00d7e1Smrgif test yes = "$GCC"; then 327372313efbSmrg # Check if gcc -print-prog-name=ld gives a path. 327472313efbSmrg AC_MSG_CHECKING([for ld used by $CC]) 327572313efbSmrg case $host in 327672313efbSmrg *-*-mingw*) 32774f00d7e1Smrg # gcc leaves a trailing carriage return, which upsets mingw 327872313efbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 327972313efbSmrg *) 328072313efbSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 328172313efbSmrg esac 328272313efbSmrg case $ac_prog in 328372313efbSmrg # Accept absolute paths. 328472313efbSmrg [[\\/]]* | ?:[[\\/]]*) 328572313efbSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 328672313efbSmrg # Canonicalize the pathname of ld 32870b661123Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 32880b661123Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 32890b661123Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 329072313efbSmrg done 32914f00d7e1Smrg test -z "$LD" && LD=$ac_prog 329272313efbSmrg ;; 329372313efbSmrg "") 329472313efbSmrg # If it fails, then pretend we aren't using GCC. 329572313efbSmrg ac_prog=ld 329672313efbSmrg ;; 329772313efbSmrg *) 329872313efbSmrg # If it is relative, then search for the first ld in PATH. 329972313efbSmrg with_gnu_ld=unknown 330072313efbSmrg ;; 330172313efbSmrg esac 33024f00d7e1Smrgelif test yes = "$with_gnu_ld"; then 330372313efbSmrg AC_MSG_CHECKING([for GNU ld]) 3304bdcaa8d0Smrgelse 330572313efbSmrg AC_MSG_CHECKING([for non-GNU ld]) 3306bdcaa8d0Smrgfi 330772313efbSmrgAC_CACHE_VAL(lt_cv_path_LD, 330872313efbSmrg[if test -z "$LD"; then 33094f00d7e1Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 331072313efbSmrg for ac_dir in $PATH; do 33114f00d7e1Smrg IFS=$lt_save_ifs 331272313efbSmrg test -z "$ac_dir" && ac_dir=. 331372313efbSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 33144f00d7e1Smrg lt_cv_path_LD=$ac_dir/$ac_prog 331572313efbSmrg # Check to see if the program is GNU ld. I'd rather use --version, 331672313efbSmrg # but apparently some variants of GNU ld only accept -v. 331772313efbSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 331872313efbSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 331972313efbSmrg *GNU* | *'with BFD'*) 33204f00d7e1Smrg test no != "$with_gnu_ld" && break 332172313efbSmrg ;; 332272313efbSmrg *) 33234f00d7e1Smrg test yes != "$with_gnu_ld" && break 332472313efbSmrg ;; 332572313efbSmrg esac 332672313efbSmrg fi 332772313efbSmrg done 33284f00d7e1Smrg IFS=$lt_save_ifs 3329bdcaa8d0Smrgelse 33304f00d7e1Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 333172313efbSmrgfi]) 33324f00d7e1SmrgLD=$lt_cv_path_LD 333372313efbSmrgif test -n "$LD"; then 333472313efbSmrg AC_MSG_RESULT($LD) 3335bdcaa8d0Smrgelse 333672313efbSmrg AC_MSG_RESULT(no) 3337bdcaa8d0Smrgfi 333872313efbSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33390b661123Smrg_LT_PATH_LD_GNU 33400b661123SmrgAC_SUBST([LD]) 3341bdcaa8d0Smrg 33420b661123Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33430b661123Smrg])# LT_PATH_LD 3344bdcaa8d0Smrg 33450b661123Smrg# Old names: 33460b661123SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33470b661123SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33480b661123Smrgdnl aclocal-1.4 backwards compatibility: 33490b661123Smrgdnl AC_DEFUN([AM_PROG_LD], []) 33500b661123Smrgdnl AC_DEFUN([AC_PROG_LD], []) 33510b661123Smrg 33520b661123Smrg 33530b661123Smrg# _LT_PATH_LD_GNU 33540b661123Smrg#- -------------- 33550b661123Smrgm4_defun([_LT_PATH_LD_GNU], 33560b661123Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 335772313efbSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 335872313efbSmrgcase `$LD -v 2>&1 </dev/null` in 335972313efbSmrg*GNU* | *'with BFD'*) 336072313efbSmrg lt_cv_prog_gnu_ld=yes 336172313efbSmrg ;; 336272313efbSmrg*) 336372313efbSmrg lt_cv_prog_gnu_ld=no 336472313efbSmrg ;; 336572313efbSmrgesac]) 336672313efbSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 33670b661123Smrg])# _LT_PATH_LD_GNU 3368bdcaa8d0Smrg 3369bdcaa8d0Smrg 33700b661123Smrg# _LT_CMD_RELOAD 33710b661123Smrg# -------------- 337272313efbSmrg# find reload flag for linker 337372313efbSmrg# -- PORTME Some linkers may need a different reload flag. 33740b661123Smrgm4_defun([_LT_CMD_RELOAD], 337572313efbSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 337672313efbSmrg lt_cv_ld_reload_flag, 337772313efbSmrg [lt_cv_ld_reload_flag='-r']) 337872313efbSmrgreload_flag=$lt_cv_ld_reload_flag 337972313efbSmrgcase $reload_flag in 338072313efbSmrg"" | " "*) ;; 338172313efbSmrg*) reload_flag=" $reload_flag" ;; 338272313efbSmrgesac 338372313efbSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 338472313efbSmrgcase $host_os in 3385880c7e28Smrg cygwin* | mingw* | pw32* | cegcc*) 33864f00d7e1Smrg if test yes != "$GCC"; then 3387880c7e28Smrg reload_cmds=false 3388880c7e28Smrg fi 3389880c7e28Smrg ;; 339072313efbSmrg darwin*) 33914f00d7e1Smrg if test yes = "$GCC"; then 33924f00d7e1Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3393bdcaa8d0Smrg else 339472313efbSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3395bdcaa8d0Smrg fi 339672313efbSmrg ;; 339772313efbSmrgesac 3398880c7e28Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3399880c7e28Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34000b661123Smrg])# _LT_CMD_RELOAD 3401bdcaa8d0Smrg 3402bdcaa8d0Smrg 34034f00d7e1Smrg# _LT_PATH_DD 34044f00d7e1Smrg# ----------- 34054f00d7e1Smrg# find a working dd 34064f00d7e1Smrgm4_defun([_LT_PATH_DD], 34074f00d7e1Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 34084f00d7e1Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34094f00d7e1Smrgcat conftest.i conftest.i >conftest2.i 34104f00d7e1Smrg: ${lt_DD:=$DD} 34114f00d7e1SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 34124f00d7e1Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34134f00d7e1Smrg cmp -s conftest.i conftest.out \ 34144f00d7e1Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 34154f00d7e1Smrgfi]) 34164f00d7e1Smrgrm -f conftest.i conftest2.i conftest.out]) 34174f00d7e1Smrg])# _LT_PATH_DD 34184f00d7e1Smrg 34194f00d7e1Smrg 34204f00d7e1Smrg# _LT_CMD_TRUNCATE 34214f00d7e1Smrg# ---------------- 34224f00d7e1Smrg# find command to truncate a binary pipe 34234f00d7e1Smrgm4_defun([_LT_CMD_TRUNCATE], 34244f00d7e1Smrg[m4_require([_LT_PATH_DD]) 34254f00d7e1SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 34264f00d7e1Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 34274f00d7e1Smrgcat conftest.i conftest.i >conftest2.i 34284f00d7e1Smrglt_cv_truncate_bin= 34294f00d7e1Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 34304f00d7e1Smrg cmp -s conftest.i conftest.out \ 34314f00d7e1Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 34324f00d7e1Smrgfi 34334f00d7e1Smrgrm -f conftest.i conftest2.i conftest.out 34344f00d7e1Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 34354f00d7e1Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 34364f00d7e1Smrg [Command to truncate a binary pipe]) 34374f00d7e1Smrg])# _LT_CMD_TRUNCATE 34384f00d7e1Smrg 34394f00d7e1Smrg 34400b661123Smrg# _LT_CHECK_MAGIC_METHOD 34410b661123Smrg# ---------------------- 344272313efbSmrg# how to check for library dependencies 344372313efbSmrg# -- PORTME fill in with the dynamic library characteristics 34440b661123Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34450b661123Smrg[m4_require([_LT_DECL_EGREP]) 34460b661123Smrgm4_require([_LT_DECL_OBJDUMP]) 34470b661123SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 344872313efbSmrglt_cv_deplibs_check_method, 344972313efbSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 345072313efbSmrglt_cv_file_magic_test_file= 345172313efbSmrglt_cv_deplibs_check_method='unknown' 345272313efbSmrg# Need to set the preceding variable on all platforms that support 345372313efbSmrg# interlibrary dependencies. 345472313efbSmrg# 'none' -- dependencies not supported. 34554f00d7e1Smrg# 'unknown' -- same as none, but documents that we really don't know. 345672313efbSmrg# 'pass_all' -- all dependencies passed with no checks. 345772313efbSmrg# 'test_compile' -- check by making test program. 345872313efbSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 34594f00d7e1Smrg# that responds to the $file_magic_cmd with a given extended regex. 34604f00d7e1Smrg# If you have 'file' or equivalent on your system and you're not sure 34614f00d7e1Smrg# whether 'pass_all' will *always* work, you probably want this one. 3462bdcaa8d0Smrg 3463bdcaa8d0Smrgcase $host_os in 346472313efbSmrgaix[[4-9]]*) 346572313efbSmrg lt_cv_deplibs_check_method=pass_all 346672313efbSmrg ;; 3467bdcaa8d0Smrg 346872313efbSmrgbeos*) 346972313efbSmrg lt_cv_deplibs_check_method=pass_all 347072313efbSmrg ;; 3471bdcaa8d0Smrg 347272313efbSmrgbsdi[[45]]*) 347372313efbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 347472313efbSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 347572313efbSmrg lt_cv_file_magic_test_file=/shlib/libc.so 347672313efbSmrg ;; 3477bdcaa8d0Smrg 347872313efbSmrgcygwin*) 347972313efbSmrg # func_win32_libid is a shell function defined in ltmain.sh 348072313efbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 348172313efbSmrg lt_cv_file_magic_cmd='func_win32_libid' 348272313efbSmrg ;; 3483bdcaa8d0Smrg 348472313efbSmrgmingw* | pw32*) 348572313efbSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 348672313efbSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 348772313efbSmrg # unless we find 'file', for example because we are cross-compiling. 34884f00d7e1Smrg if ( file / ) >/dev/null 2>&1; then 348972313efbSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 349072313efbSmrg lt_cv_file_magic_cmd='func_win32_libid' 349172313efbSmrg else 3492880c7e28Smrg # Keep this pattern in sync with the one in func_win32_libid. 3493880c7e28Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 349472313efbSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 349572313efbSmrg fi 349672313efbSmrg ;; 3497bdcaa8d0Smrg 3498880c7e28Smrgcegcc*) 34990b661123Smrg # use the weaker test based on 'objdump'. See mingw*. 35000b661123Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35010b661123Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35020b661123Smrg ;; 35030b661123Smrg 350472313efbSmrgdarwin* | rhapsody*) 350572313efbSmrg lt_cv_deplibs_check_method=pass_all 350672313efbSmrg ;; 3507bdcaa8d0Smrg 350872313efbSmrgfreebsd* | dragonfly*) 35090b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3510bdcaa8d0Smrg case $host_cpu in 351172313efbSmrg i*86 ) 351272313efbSmrg # Not sure whether the presence of OpenBSD here was a mistake. 351372313efbSmrg # Let's accept both of them until this is cleared up. 351472313efbSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 351572313efbSmrg lt_cv_file_magic_cmd=/usr/bin/file 351672313efbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3517bdcaa8d0Smrg ;; 3518bdcaa8d0Smrg esac 351972313efbSmrg else 352072313efbSmrg lt_cv_deplibs_check_method=pass_all 352172313efbSmrg fi 352272313efbSmrg ;; 3523bdcaa8d0Smrg 3524880c7e28Smrghaiku*) 3525880c7e28Smrg lt_cv_deplibs_check_method=pass_all 3526880c7e28Smrg ;; 3527880c7e28Smrg 352872313efbSmrghpux10.20* | hpux11*) 352972313efbSmrg lt_cv_file_magic_cmd=/usr/bin/file 353072313efbSmrg case $host_cpu in 353172313efbSmrg ia64*) 353272313efbSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 353372313efbSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3534bdcaa8d0Smrg ;; 353572313efbSmrg hppa*64*) 3536880c7e28Smrg [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]'] 353772313efbSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3538bdcaa8d0Smrg ;; 353972313efbSmrg *) 3540880c7e28Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 354172313efbSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3542bdcaa8d0Smrg ;; 354372313efbSmrg esac 354472313efbSmrg ;; 3545bdcaa8d0Smrg 354672313efbSmrginterix[[3-9]]*) 354772313efbSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 354872313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 354972313efbSmrg ;; 3550bdcaa8d0Smrg 355172313efbSmrgirix5* | irix6* | nonstopux*) 355272313efbSmrg case $LD in 355372313efbSmrg *-32|*"-32 ") libmagic=32-bit;; 355472313efbSmrg *-n32|*"-n32 ") libmagic=N32;; 355572313efbSmrg *-64|*"-64 ") libmagic=64-bit;; 355672313efbSmrg *) libmagic=never-match;; 355772313efbSmrg esac 355872313efbSmrg lt_cv_deplibs_check_method=pass_all 355972313efbSmrg ;; 3560bdcaa8d0Smrg 3561880c7e28Smrg# This must be glibc/ELF. 35624f00d7e1Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 356372313efbSmrg lt_cv_deplibs_check_method=pass_all 356472313efbSmrg ;; 3565bdcaa8d0Smrg 356672313efbSmrgnetbsd*) 35670b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 356872313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 356972313efbSmrg else 357072313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 357172313efbSmrg fi 357272313efbSmrg ;; 3573bdcaa8d0Smrg 357472313efbSmrgnewos6*) 357572313efbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 357672313efbSmrg lt_cv_file_magic_cmd=/usr/bin/file 357772313efbSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 357872313efbSmrg ;; 3579bdcaa8d0Smrg 35800b661123Smrg*nto* | *qnx*) 35810b661123Smrg lt_cv_deplibs_check_method=pass_all 358272313efbSmrg ;; 3583bdcaa8d0Smrg 35844f00d7e1Smrgopenbsd* | bitrig*) 35854f00d7e1Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 358672313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 358772313efbSmrg else 358872313efbSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 358972313efbSmrg fi 359072313efbSmrg ;; 3591bdcaa8d0Smrg 359272313efbSmrgosf3* | osf4* | osf5*) 359372313efbSmrg lt_cv_deplibs_check_method=pass_all 359472313efbSmrg ;; 3595bdcaa8d0Smrg 359672313efbSmrgrdos*) 359772313efbSmrg lt_cv_deplibs_check_method=pass_all 359872313efbSmrg ;; 3599bdcaa8d0Smrg 360072313efbSmrgsolaris*) 360172313efbSmrg lt_cv_deplibs_check_method=pass_all 360272313efbSmrg ;; 360372313efbSmrg 36040b661123Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36050b661123Smrg lt_cv_deplibs_check_method=pass_all 36060b661123Smrg ;; 36070b661123Smrg 360872313efbSmrgsysv4 | sysv4.3*) 360972313efbSmrg case $host_vendor in 361072313efbSmrg motorola) 361172313efbSmrg 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]]' 361272313efbSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 361372313efbSmrg ;; 361472313efbSmrg ncr) 361572313efbSmrg lt_cv_deplibs_check_method=pass_all 3616bdcaa8d0Smrg ;; 361772313efbSmrg sequent) 361872313efbSmrg lt_cv_file_magic_cmd='/bin/file' 361972313efbSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3620bdcaa8d0Smrg ;; 362172313efbSmrg sni) 362272313efbSmrg lt_cv_file_magic_cmd='/bin/file' 362372313efbSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 362472313efbSmrg lt_cv_file_magic_test_file=/lib/libc.so 3625bdcaa8d0Smrg ;; 362672313efbSmrg siemens) 362772313efbSmrg lt_cv_deplibs_check_method=pass_all 362872313efbSmrg ;; 362972313efbSmrg pc) 363072313efbSmrg lt_cv_deplibs_check_method=pass_all 363172313efbSmrg ;; 363272313efbSmrg esac 363372313efbSmrg ;; 3634bdcaa8d0Smrg 36350b661123Smrgtpf*) 363672313efbSmrg lt_cv_deplibs_check_method=pass_all 363772313efbSmrg ;; 36384f00d7e1Smrgos2*) 36394f00d7e1Smrg lt_cv_deplibs_check_method=pass_all 36404f00d7e1Smrg ;; 364172313efbSmrgesac 364272313efbSmrg]) 3643880c7e28Smrg 3644880c7e28Smrgfile_magic_glob= 3645880c7e28Smrgwant_nocaseglob=no 3646880c7e28Smrgif test "$build" = "$host"; then 3647880c7e28Smrg case $host_os in 3648880c7e28Smrg mingw* | pw32*) 3649880c7e28Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3650880c7e28Smrg want_nocaseglob=yes 3651880c7e28Smrg else 3652880c7e28Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3653880c7e28Smrg fi 3654880c7e28Smrg ;; 3655880c7e28Smrg esac 3656880c7e28Smrgfi 3657880c7e28Smrg 365872313efbSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 365972313efbSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 366072313efbSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3661bdcaa8d0Smrg 36620b661123Smrg_LT_DECL([], [deplibs_check_method], [1], 36630b661123Smrg [Method to check whether dependent libraries are shared objects]) 36640b661123Smrg_LT_DECL([], [file_magic_cmd], [1], 3665880c7e28Smrg [Command to use when deplibs_check_method = "file_magic"]) 3666880c7e28Smrg_LT_DECL([], [file_magic_glob], [1], 3667880c7e28Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3668880c7e28Smrg_LT_DECL([], [want_nocaseglob], [1], 3669880c7e28Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36700b661123Smrg])# _LT_CHECK_MAGIC_METHOD 3671bdcaa8d0Smrg 36720b661123Smrg 36730b661123Smrg# LT_PATH_NM 367472313efbSmrg# ---------- 36750b661123Smrg# find the pathname to a BSD- or MS-compatible name lister 36760b661123SmrgAC_DEFUN([LT_PATH_NM], 36770b661123Smrg[AC_REQUIRE([AC_PROG_CC])dnl 36780b661123SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 367972313efbSmrg[if test -n "$NM"; then 368072313efbSmrg # Let the user override the test. 36814f00d7e1Smrg lt_cv_path_NM=$NM 368272313efbSmrgelse 36834f00d7e1Smrg lt_nm_to_check=${ac_tool_prefix}nm 368472313efbSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 368572313efbSmrg lt_nm_to_check="$lt_nm_to_check nm" 368672313efbSmrg fi 368772313efbSmrg for lt_tmp_nm in $lt_nm_to_check; do 36884f00d7e1Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 368972313efbSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 36904f00d7e1Smrg IFS=$lt_save_ifs 369172313efbSmrg test -z "$ac_dir" && ac_dir=. 36924f00d7e1Smrg tmp_nm=$ac_dir/$lt_tmp_nm 36934f00d7e1Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 369472313efbSmrg # Check to see if the nm accepts a BSD-compat flag. 36954f00d7e1Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 369672313efbSmrg # nm: unknown option "B" ignored 369772313efbSmrg # Tru64's nm complains that /dev/null is an invalid object file 36984f00d7e1Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 36994f00d7e1Smrg case $build_os in 37004f00d7e1Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 37014f00d7e1Smrg *) lt_bad_file=/dev/null ;; 37024f00d7e1Smrg esac 37034f00d7e1Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 37044f00d7e1Smrg *$lt_bad_file* | *'Invalid file or object type'*) 370572313efbSmrg lt_cv_path_NM="$tmp_nm -B" 37064f00d7e1Smrg break 2 370772313efbSmrg ;; 370872313efbSmrg *) 370972313efbSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 371072313efbSmrg */dev/null*) 371172313efbSmrg lt_cv_path_NM="$tmp_nm -p" 37124f00d7e1Smrg break 2 371372313efbSmrg ;; 371472313efbSmrg *) 371572313efbSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 371672313efbSmrg continue # so that we can try to find one that supports BSD flags 371772313efbSmrg ;; 371872313efbSmrg esac 371972313efbSmrg ;; 372072313efbSmrg esac 372172313efbSmrg fi 372272313efbSmrg done 37234f00d7e1Smrg IFS=$lt_save_ifs 3724bdcaa8d0Smrg done 37250b661123Smrg : ${lt_cv_path_NM=no} 372672313efbSmrgfi]) 37274f00d7e1Smrgif test no != "$lt_cv_path_NM"; then 37284f00d7e1Smrg NM=$lt_cv_path_NM 37290b661123Smrgelse 37300b661123Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3731880c7e28Smrg if test -n "$DUMPBIN"; then : 3732880c7e28Smrg # Let the user override the test. 3733880c7e28Smrg else 3734880c7e28Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 37354f00d7e1Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3736880c7e28Smrg *COFF*) 37374f00d7e1Smrg DUMPBIN="$DUMPBIN -symbols -headers" 3738880c7e28Smrg ;; 3739880c7e28Smrg *) 3740880c7e28Smrg DUMPBIN=: 3741880c7e28Smrg ;; 3742880c7e28Smrg esac 3743880c7e28Smrg fi 37440b661123Smrg AC_SUBST([DUMPBIN]) 37454f00d7e1Smrg if test : != "$DUMPBIN"; then 37464f00d7e1Smrg NM=$DUMPBIN 37470b661123Smrg fi 37480b661123Smrgfi 37490b661123Smrgtest -z "$NM" && NM=nm 37500b661123SmrgAC_SUBST([NM]) 37510b661123Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37520b661123Smrg 37530b661123SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37540b661123Smrg [lt_cv_nm_interface="BSD nm" 37550b661123Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3756880c7e28Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37570b661123Smrg (eval "$ac_compile" 2>conftest.err) 37580b661123Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3759880c7e28Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37600b661123Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37610b661123Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3762880c7e28Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37630b661123Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 37640b661123Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37650b661123Smrg lt_cv_nm_interface="MS dumpbin" 37660b661123Smrg fi 37670b661123Smrg rm -f conftest*]) 37680b661123Smrg])# LT_PATH_NM 3769bdcaa8d0Smrg 37700b661123Smrg# Old names: 37710b661123SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37720b661123SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37730b661123Smrgdnl aclocal-1.4 backwards compatibility: 37740b661123Smrgdnl AC_DEFUN([AM_PROG_NM], []) 37750b661123Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3776bdcaa8d0Smrg 3777880c7e28Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3778880c7e28Smrg# -------------------------------- 3779880c7e28Smrg# how to determine the name of the shared library 3780880c7e28Smrg# associated with a specific link library. 3781880c7e28Smrg# -- PORTME fill in with the dynamic library characteristics 3782880c7e28Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3783880c7e28Smrg[m4_require([_LT_DECL_EGREP]) 3784880c7e28Smrgm4_require([_LT_DECL_OBJDUMP]) 3785880c7e28Smrgm4_require([_LT_DECL_DLLTOOL]) 3786880c7e28SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3787880c7e28Smrglt_cv_sharedlib_from_linklib_cmd, 3788880c7e28Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3789880c7e28Smrg 3790880c7e28Smrgcase $host_os in 3791880c7e28Smrgcygwin* | mingw* | pw32* | cegcc*) 37924f00d7e1Smrg # two different shell functions defined in ltmain.sh; 37934f00d7e1Smrg # decide which one to use based on capabilities of $DLLTOOL 3794880c7e28Smrg case `$DLLTOOL --help 2>&1` in 3795880c7e28Smrg *--identify-strict*) 3796880c7e28Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3797880c7e28Smrg ;; 3798880c7e28Smrg *) 3799880c7e28Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3800880c7e28Smrg ;; 3801880c7e28Smrg esac 3802880c7e28Smrg ;; 3803880c7e28Smrg*) 3804880c7e28Smrg # fallback: assume linklib IS sharedlib 38054f00d7e1Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 3806880c7e28Smrg ;; 3807880c7e28Smrgesac 3808880c7e28Smrg]) 3809880c7e28Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3810880c7e28Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3811880c7e28Smrg 3812880c7e28Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3813880c7e28Smrg [Command to associate shared and link libraries]) 3814880c7e28Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3815880c7e28Smrg 3816880c7e28Smrg 3817880c7e28Smrg# _LT_PATH_MANIFEST_TOOL 3818880c7e28Smrg# ---------------------- 3819880c7e28Smrg# locate the manifest tool 3820880c7e28Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3821880c7e28Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3822880c7e28Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3823880c7e28SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3824880c7e28Smrg [lt_cv_path_mainfest_tool=no 3825880c7e28Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3826880c7e28Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3827880c7e28Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3828880c7e28Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3829880c7e28Smrg lt_cv_path_mainfest_tool=yes 3830880c7e28Smrg fi 3831880c7e28Smrg rm -f conftest*]) 38324f00d7e1Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 3833880c7e28Smrg MANIFEST_TOOL=: 3834880c7e28Smrgfi 3835880c7e28Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3836880c7e28Smrg])# _LT_PATH_MANIFEST_TOOL 3837880c7e28Smrg 38380b661123Smrg 38394f00d7e1Smrg# _LT_DLL_DEF_P([FILE]) 38404f00d7e1Smrg# --------------------- 38414f00d7e1Smrg# True iff FILE is a Windows DLL '.def' file. 38424f00d7e1Smrg# Keep in sync with func_dll_def_p in the libtool script 38434f00d7e1SmrgAC_DEFUN([_LT_DLL_DEF_P], 38444f00d7e1Smrg[dnl 38454f00d7e1Smrg test DEF = "`$SED -n dnl 38464f00d7e1Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 38474f00d7e1Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 38484f00d7e1Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 38494f00d7e1Smrg -e q dnl Only consider the first "real" line 38504f00d7e1Smrg $1`" dnl 38514f00d7e1Smrg])# _LT_DLL_DEF_P 38524f00d7e1Smrg 38534f00d7e1Smrg 38540b661123Smrg# LT_LIB_M 38550b661123Smrg# -------- 385672313efbSmrg# check for math library 38570b661123SmrgAC_DEFUN([LT_LIB_M], 385872313efbSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 385972313efbSmrgLIBM= 386072313efbSmrgcase $host in 3861880c7e28Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 386272313efbSmrg # These system don't have libm, or don't need it 386372313efbSmrg ;; 386472313efbSmrg*-ncr-sysv4.3*) 38654f00d7e1Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 386672313efbSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 386772313efbSmrg ;; 386872313efbSmrg*) 38694f00d7e1Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 3870bdcaa8d0Smrg ;; 3871bdcaa8d0Smrgesac 38720b661123SmrgAC_SUBST([LIBM]) 38730b661123Smrg])# LT_LIB_M 3874bdcaa8d0Smrg 38750b661123Smrg# Old name: 38760b661123SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38770b661123Smrgdnl aclocal-1.4 backwards compatibility: 38780b661123Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3879bdcaa8d0Smrg 3880bdcaa8d0Smrg 38810b661123Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 38820b661123Smrg# ------------------------------- 38830b661123Smrgm4_defun([_LT_COMPILER_NO_RTTI], 38840b661123Smrg[m4_require([_LT_TAG_COMPILER])dnl 3885bdcaa8d0Smrg 38860b661123Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3887bdcaa8d0Smrg 38884f00d7e1Smrgif test yes = "$GCC"; then 3889880c7e28Smrg case $cc_basename in 3890880c7e28Smrg nvcc*) 3891880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3892880c7e28Smrg *) 3893880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3894880c7e28Smrg esac 3895bdcaa8d0Smrg 38960b661123Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 38970b661123Smrg lt_cv_prog_compiler_rtti_exceptions, 38980b661123Smrg [-fno-rtti -fno-exceptions], [], 38990b661123Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39000b661123Smrgfi 39010b661123Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39020b661123Smrg [Compiler flag to turn off builtin functions]) 39030b661123Smrg])# _LT_COMPILER_NO_RTTI 3904bdcaa8d0Smrg 3905bdcaa8d0Smrg 39060b661123Smrg# _LT_CMD_GLOBAL_SYMBOLS 39070b661123Smrg# ---------------------- 39080b661123Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39090b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39100b661123SmrgAC_REQUIRE([AC_PROG_CC])dnl 3911880c7e28SmrgAC_REQUIRE([AC_PROG_AWK])dnl 39120b661123SmrgAC_REQUIRE([LT_PATH_NM])dnl 39130b661123SmrgAC_REQUIRE([LT_PATH_LD])dnl 39140b661123Smrgm4_require([_LT_DECL_SED])dnl 39150b661123Smrgm4_require([_LT_DECL_EGREP])dnl 39160b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 3917bdcaa8d0Smrg 39180b661123Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39190b661123SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39200b661123SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 392172313efbSmrg[ 39220b661123Smrg# These are sane defaults that work on at least a few old systems. 39230b661123Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3924bdcaa8d0Smrg 39250b661123Smrg# Character class describing NM global symbol codes. 39260b661123Smrgsymcode='[[BCDEGRST]]' 3927bdcaa8d0Smrg 39280b661123Smrg# Regexp to match symbols that can be accessed directly from C. 39290b661123Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3930bdcaa8d0Smrg 39310b661123Smrg# Define system-specific variables. 39320b661123Smrgcase $host_os in 39330b661123Smrgaix*) 39340b661123Smrg symcode='[[BCDT]]' 39350b661123Smrg ;; 39360b661123Smrgcygwin* | mingw* | pw32* | cegcc*) 39370b661123Smrg symcode='[[ABCDGISTW]]' 39380b661123Smrg ;; 39390b661123Smrghpux*) 39404f00d7e1Smrg if test ia64 = "$host_cpu"; then 39410b661123Smrg symcode='[[ABCDEGRST]]' 39420b661123Smrg fi 39430b661123Smrg ;; 39440b661123Smrgirix* | nonstopux*) 39450b661123Smrg symcode='[[BCDEGRST]]' 39460b661123Smrg ;; 39470b661123Smrgosf*) 39480b661123Smrg symcode='[[BCDEGQRST]]' 39490b661123Smrg ;; 39500b661123Smrgsolaris*) 39510b661123Smrg symcode='[[BDRT]]' 39520b661123Smrg ;; 39530b661123Smrgsco3.2v5*) 39540b661123Smrg symcode='[[DT]]' 39550b661123Smrg ;; 39560b661123Smrgsysv4.2uw2*) 39570b661123Smrg symcode='[[DT]]' 39580b661123Smrg ;; 39590b661123Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39600b661123Smrg symcode='[[ABDT]]' 39610b661123Smrg ;; 39620b661123Smrgsysv4) 39630b661123Smrg symcode='[[DFNSTU]]' 39640b661123Smrg ;; 39650b661123Smrgesac 3966bdcaa8d0Smrg 39670b661123Smrg# If we're using GNU nm, then use its standard symbol codes. 39680b661123Smrgcase `$NM -V 2>&1` in 39690b661123Smrg*GNU* | *'with BFD'*) 39700b661123Smrg symcode='[[ABCDGIRSTW]]' ;; 39710b661123Smrgesac 3972bdcaa8d0Smrg 39734f00d7e1Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 39744f00d7e1Smrg # Gets list of data symbols to import. 39754f00d7e1Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 39764f00d7e1Smrg # Adjust the below global symbol transforms to fixup imported variables. 39774f00d7e1Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 39784f00d7e1Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 39794f00d7e1Smrg lt_c_name_lib_hook="\ 39804f00d7e1Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 39814f00d7e1Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 39824f00d7e1Smrgelse 39834f00d7e1Smrg # Disable hooks by default. 39844f00d7e1Smrg lt_cv_sys_global_symbol_to_import= 39854f00d7e1Smrg lt_cdecl_hook= 39864f00d7e1Smrg lt_c_name_hook= 39874f00d7e1Smrg lt_c_name_lib_hook= 39884f00d7e1Smrgfi 39894f00d7e1Smrg 39900b661123Smrg# Transform an extracted symbol line into a proper C declaration. 39910b661123Smrg# Some systems (esp. on ia64) link data and code symbols differently, 39920b661123Smrg# so use this general approach. 39934f00d7e1Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 39944f00d7e1Smrg$lt_cdecl_hook\ 39954f00d7e1Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 39964f00d7e1Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 3997bdcaa8d0Smrg 39980b661123Smrg# Transform an extracted symbol line into symbol name and symbol address 39994f00d7e1Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 40004f00d7e1Smrg$lt_c_name_hook\ 40014f00d7e1Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40024f00d7e1Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 40034f00d7e1Smrg 40044f00d7e1Smrg# Transform an extracted symbol line into symbol name with lib prefix and 40054f00d7e1Smrg# symbol address. 40064f00d7e1Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 40074f00d7e1Smrg$lt_c_name_lib_hook\ 40084f00d7e1Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 40094f00d7e1Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 40104f00d7e1Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4011bdcaa8d0Smrg 40120b661123Smrg# Handle CRLF in mingw tool chain 40130b661123Smrgopt_cr= 40140b661123Smrgcase $build_os in 40150b661123Smrgmingw*) 40160b661123Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40170b661123Smrg ;; 40180b661123Smrgesac 4019bdcaa8d0Smrg 40200b661123Smrg# Try without a prefix underscore, then with it. 40210b661123Smrgfor ac_symprfx in "" "_"; do 4022bdcaa8d0Smrg 40230b661123Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40240b661123Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4025bdcaa8d0Smrg 40260b661123Smrg # Write the raw and C identifiers. 40270b661123Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 40284f00d7e1Smrg # Fake it for dumpbin and say T for any non-static function, 40294f00d7e1Smrg # D for any global variable and I for any imported variable. 40300b661123Smrg # Also find C++ and __fastcall symbols from MSVC++, 40310b661123Smrg # which start with @ or ?. 40320b661123Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40330b661123Smrg" {last_section=section; section=\$ 3};"\ 4034880c7e28Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40350b661123Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 40364f00d7e1Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 40374f00d7e1Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 40384f00d7e1Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40390b661123Smrg" \$ 0!~/External *\|/{next};"\ 40400b661123Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40410b661123Smrg" {if(hide[section]) next};"\ 40424f00d7e1Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 40434f00d7e1Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 40444f00d7e1Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 40454f00d7e1Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40460b661123Smrg" ' prfx=^$ac_symprfx]" 40470b661123Smrg else 40480b661123Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 404996ce994aSmrg fi 4050880c7e28Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 405196ce994aSmrg 40520b661123Smrg # Check to see that the pipe works correctly. 40530b661123Smrg pipe_works=no 405496ce994aSmrg 40550b661123Smrg rm -f conftest* 40560b661123Smrg cat > conftest.$ac_ext <<_LT_EOF 40570b661123Smrg#ifdef __cplusplus 40580b661123Smrgextern "C" { 40590b661123Smrg#endif 40600b661123Smrgchar nm_test_var; 40610b661123Smrgvoid nm_test_func(void); 40620b661123Smrgvoid nm_test_func(void){} 40630b661123Smrg#ifdef __cplusplus 40640b661123Smrg} 40650b661123Smrg#endif 40660b661123Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 40670b661123Smrg_LT_EOF 406896ce994aSmrg 40690b661123Smrg if AC_TRY_EVAL(ac_compile); then 40700b661123Smrg # Now try to grab the symbols. 40710b661123Smrg nlist=conftest.nm 4072880c7e28Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40730b661123Smrg # Try sorting and uniquifying the output. 40740b661123Smrg if sort "$nlist" | uniq > "$nlist"T; then 40750b661123Smrg mv -f "$nlist"T "$nlist" 40760b661123Smrg else 40770b661123Smrg rm -f "$nlist"T 40780b661123Smrg fi 407996ce994aSmrg 40800b661123Smrg # Make sure that we snagged all the symbols we need. 40810b661123Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40820b661123Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40830b661123Smrg cat <<_LT_EOF > conftest.$ac_ext 4084880c7e28Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 40854f00d7e1Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 40864f00d7e1Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4087880c7e28Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4088880c7e28Smrg# define LT@&t@_DLSYM_CONST 40894f00d7e1Smrg#elif defined __osf__ 4090880c7e28Smrg/* This system does not cope well with relocations in const data. */ 4091880c7e28Smrg# define LT@&t@_DLSYM_CONST 4092880c7e28Smrg#else 4093880c7e28Smrg# define LT@&t@_DLSYM_CONST const 4094880c7e28Smrg#endif 4095880c7e28Smrg 40960b661123Smrg#ifdef __cplusplus 40970b661123Smrgextern "C" { 40980b661123Smrg#endif 409996ce994aSmrg 41000b661123Smrg_LT_EOF 41010b661123Smrg # Now generate the symbol file. 41020b661123Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 410396ce994aSmrg 41040b661123Smrg cat <<_LT_EOF >> conftest.$ac_ext 410596ce994aSmrg 41060b661123Smrg/* The mapping between symbol names and symbols. */ 4107880c7e28SmrgLT@&t@_DLSYM_CONST struct { 41080b661123Smrg const char *name; 41090b661123Smrg void *address; 41100b661123Smrg} 41110b661123Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41120b661123Smrg{ 41130b661123Smrg { "@PROGRAM@", (void *) 0 }, 41140b661123Smrg_LT_EOF 41154f00d7e1Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41160b661123Smrg cat <<\_LT_EOF >> conftest.$ac_ext 41170b661123Smrg {0, (void *) 0} 41180b661123Smrg}; 411996ce994aSmrg 41200b661123Smrg/* This works around a problem in FreeBSD linker */ 41210b661123Smrg#ifdef FREEBSD_WORKAROUND 41220b661123Smrgstatic const void *lt_preloaded_setup() { 41230b661123Smrg return lt__PROGRAM__LTX_preloaded_symbols; 41240b661123Smrg} 41250b661123Smrg#endif 412696ce994aSmrg 41270b661123Smrg#ifdef __cplusplus 41280b661123Smrg} 41290b661123Smrg#endif 41300b661123Smrg_LT_EOF 41310b661123Smrg # Now try linking the two files. 41320b661123Smrg mv conftest.$ac_objext conftstm.$ac_objext 4133880c7e28Smrg lt_globsym_save_LIBS=$LIBS 4134880c7e28Smrg lt_globsym_save_CFLAGS=$CFLAGS 41354f00d7e1Smrg LIBS=conftstm.$ac_objext 41360b661123Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 41374f00d7e1Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41380b661123Smrg pipe_works=yes 41390b661123Smrg fi 4140880c7e28Smrg LIBS=$lt_globsym_save_LIBS 4141880c7e28Smrg CFLAGS=$lt_globsym_save_CFLAGS 41420b661123Smrg else 41430b661123Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 41440b661123Smrg fi 41450b661123Smrg else 41460b661123Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41470b661123Smrg fi 414872313efbSmrg else 41490b661123Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 415072313efbSmrg fi 415172313efbSmrg else 41520b661123Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41530b661123Smrg cat conftest.$ac_ext >&5 415472313efbSmrg fi 41550b661123Smrg rm -rf conftest* conftst* 4156bdcaa8d0Smrg 41570b661123Smrg # Do not use the global_symbol_pipe unless it works. 41584f00d7e1Smrg if test yes = "$pipe_works"; then 41590b661123Smrg break 41600b661123Smrg else 41610b661123Smrg lt_cv_sys_global_symbol_pipe= 41620b661123Smrg fi 41630b661123Smrgdone 41640b661123Smrg]) 41650b661123Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41660b661123Smrg lt_cv_sys_global_symbol_to_cdecl= 41670b661123Smrgfi 41680b661123Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41690b661123Smrg AC_MSG_RESULT(failed) 417072313efbSmrgelse 41710b661123Smrg AC_MSG_RESULT(ok) 417272313efbSmrgfi 4173bdcaa8d0Smrg 4174880c7e28Smrg# Response file support. 4175880c7e28Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4176880c7e28Smrg nm_file_list_spec='@' 4177880c7e28Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4178880c7e28Smrg nm_file_list_spec='@' 4179880c7e28Smrgfi 4180880c7e28Smrg 41810b661123Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41820b661123Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 41830b661123Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 41840b661123Smrg [Transform the output of nm in a proper C declaration]) 41854f00d7e1Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 41864f00d7e1Smrg [Transform the output of nm into a list of symbols to manually relocate]) 41870b661123Smrg_LT_DECL([global_symbol_to_c_name_address], 41880b661123Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 41890b661123Smrg [Transform the output of nm in a C name address pair]) 41900b661123Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 41910b661123Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 41920b661123Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 41934f00d7e1Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 41944f00d7e1Smrg [The name lister interface]) 4195880c7e28Smrg_LT_DECL([], [nm_file_list_spec], [1], 4196880c7e28Smrg [Specify filename containing input files for $NM]) 41970b661123Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4198bdcaa8d0Smrg 4199bdcaa8d0Smrg 42000b661123Smrg# _LT_COMPILER_PIC([TAGNAME]) 42010b661123Smrg# --------------------------- 42020b661123Smrgm4_defun([_LT_COMPILER_PIC], 42030b661123Smrg[m4_require([_LT_TAG_COMPILER])dnl 42040b661123Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42050b661123Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42060b661123Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4207bdcaa8d0Smrg 42080b661123Smrgm4_if([$1], [CXX], [ 42090b661123Smrg # C++ specific cases for pic, static, wl, etc. 42104f00d7e1Smrg if test yes = "$GXX"; then 42110b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42120b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 421396ce994aSmrg 42140b661123Smrg case $host_os in 42150b661123Smrg aix*) 42160b661123Smrg # All AIX code is PIC. 42174f00d7e1Smrg if test ia64 = "$host_cpu"; then 42180b661123Smrg # AIX 5 now supports IA64 processor 42190b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 422072313efbSmrg fi 42214f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 422272313efbSmrg ;; 4223bdcaa8d0Smrg 42240b661123Smrg amigaos*) 422572313efbSmrg 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 42324f00d7e1Smrg # adding the '-m68020' flag to GCC prevents building anything better, 42334f00d7e1Smrg # like '-m68040'. 42340b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 423572313efbSmrg ;; 423672313efbSmrg esac 423772313efbSmrg ;; 4238bdcaa8d0Smrg 42390b661123Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42400b661123Smrg # PIC is the default for these OSes. 42410b661123Smrg ;; 42420b661123Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42430b661123Smrg # This hack is so that the source file can tell whether it is being 42440b661123Smrg # built for inclusion in a dll (and should export symbols for example). 42450b661123Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42460b661123Smrg # (--disable-auto-import) libraries 42470b661123Smrg m4_if([$1], [GCJ], [], 42480b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 42494f00d7e1Smrg case $host_os in 42504f00d7e1Smrg os2*) 42514f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 42524f00d7e1Smrg ;; 42534f00d7e1Smrg esac 42540b661123Smrg ;; 42550b661123Smrg darwin* | rhapsody*) 42560b661123Smrg # PIC is the default on this platform 42570b661123Smrg # Common symbols not allowed in MH_DYLIB files 42580b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42590b661123Smrg ;; 42600b661123Smrg *djgpp*) 42610b661123Smrg # DJGPP does not support shared libraries at all 42620b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42630b661123Smrg ;; 4264880c7e28Smrg haiku*) 4265880c7e28Smrg # PIC is the default for Haiku. 4266880c7e28Smrg # The "-static" flag exists, but is broken. 4267880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4268880c7e28Smrg ;; 42690b661123Smrg interix[[3-9]]*) 42700b661123Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42710b661123Smrg # Instead, we relocate shared libraries at runtime. 42720b661123Smrg ;; 42730b661123Smrg sysv4*MP*) 42740b661123Smrg if test -d /usr/nec; then 42750b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42760b661123Smrg fi 42770b661123Smrg ;; 42780b661123Smrg hpux*) 42790b661123Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42800b661123Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42810b661123Smrg # sets the default TLS model and affects inlining. 42820b661123Smrg case $host_cpu in 42830b661123Smrg hppa*64*) 428472313efbSmrg ;; 428596ce994aSmrg *) 42860b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 428772313efbSmrg ;; 42880b661123Smrg esac 42890b661123Smrg ;; 42900b661123Smrg *qnx* | *nto*) 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 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42970b661123Smrg ;; 429896ce994aSmrg esac 42990b661123Smrg else 43000b661123Smrg case $host_os in 43010b661123Smrg aix[[4-9]]*) 43020b661123Smrg # All AIX code is PIC. 43034f00d7e1Smrg if test ia64 = "$host_cpu"; then 43040b661123Smrg # AIX 5 now supports IA64 processor 43050b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43060b661123Smrg else 43070b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 430896ce994aSmrg fi 430996ce994aSmrg ;; 43100b661123Smrg chorus*) 43110b661123Smrg case $cc_basename in 43120b661123Smrg cxch68*) 43130b661123Smrg # Green Hills C++ Compiler 43140b661123Smrg # _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" 431596ce994aSmrg ;; 431672313efbSmrg esac 431796ce994aSmrg ;; 4318880c7e28Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4319880c7e28Smrg # This hack is so that the source file can tell whether it is being 4320880c7e28Smrg # built for inclusion in a dll (and should export symbols for example). 4321880c7e28Smrg m4_if([$1], [GCJ], [], 4322880c7e28Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4323880c7e28Smrg ;; 43240b661123Smrg dgux*) 43250b661123Smrg case $cc_basename in 43260b661123Smrg ec++*) 43270b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43280b661123Smrg ;; 43290b661123Smrg ghcx*) 43300b661123Smrg # Green Hills C++ Compiler 43310b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43320b661123Smrg ;; 43330b661123Smrg *) 43340b661123Smrg ;; 433572313efbSmrg esac 433672313efbSmrg ;; 43370b661123Smrg freebsd* | dragonfly*) 43380b661123Smrg # FreeBSD uses GNU C++ 433972313efbSmrg ;; 43400b661123Smrg hpux9* | hpux10* | hpux11*) 43410b661123Smrg case $cc_basename in 43420b661123Smrg CC*) 43430b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43444f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43454f00d7e1Smrg if test ia64 != "$host_cpu"; then 43460b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43470b661123Smrg fi 43480b661123Smrg ;; 43490b661123Smrg aCC*) 43500b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43514f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43520b661123Smrg case $host_cpu in 43530b661123Smrg hppa*64*|ia64*) 43540b661123Smrg # +Z the default 43550b661123Smrg ;; 43560b661123Smrg *) 43570b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43580b661123Smrg ;; 43590b661123Smrg esac 43600b661123Smrg ;; 43610b661123Smrg *) 43620b661123Smrg ;; 43630b661123Smrg esac 436472313efbSmrg ;; 43650b661123Smrg interix*) 43660b661123Smrg # This is c89, which is MS Visual C++ (no shared libs) 43670b661123Smrg # Anyone wants to do a port? 436872313efbSmrg ;; 43690b661123Smrg irix5* | irix6* | nonstopux*) 43700b661123Smrg case $cc_basename in 43710b661123Smrg CC*) 43720b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43730b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43740b661123Smrg # CC pic flag -KPIC is the default. 43750b661123Smrg ;; 43760b661123Smrg *) 43770b661123Smrg ;; 43780b661123Smrg esac 437972313efbSmrg ;; 43804f00d7e1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43810b661123Smrg case $cc_basename in 43820b661123Smrg KCC*) 43830b661123Smrg # KAI C++ Compiler 43840b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 43850b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43860b661123Smrg ;; 43870b661123Smrg ecpc* ) 43884f00d7e1Smrg # old Intel C++ for x86_64, which still supported -KPIC. 43890b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43900b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43910b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43920b661123Smrg ;; 43930b661123Smrg icpc* ) 43940b661123Smrg # Intel C++, used to be incompatible with GCC. 43950b661123Smrg # ICC 10 doesn't accept -KPIC any more. 43960b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43970b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43980b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43990b661123Smrg ;; 44000b661123Smrg pgCC* | pgcpp*) 44010b661123Smrg # Portland Group C++ compiler 44020b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44030b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44040b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44050b661123Smrg ;; 44060b661123Smrg cxx*) 44070b661123Smrg # Compaq C++ 44080b661123Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44090b661123Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44100b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44110b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44120b661123Smrg ;; 4413880c7e28Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4414880c7e28Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44150b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44160b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44170b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44180b661123Smrg ;; 44190b661123Smrg *) 44200b661123Smrg case `$CC -V 2>&1 | sed 5q` in 44210b661123Smrg *Sun\ C*) 44220b661123Smrg # Sun C++ 5.9 44230b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44240b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44250b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44260b661123Smrg ;; 44270b661123Smrg esac 44280b661123Smrg ;; 44290b661123Smrg esac 443072313efbSmrg ;; 44310b661123Smrg lynxos*) 443272313efbSmrg ;; 44330b661123Smrg m88k*) 443472313efbSmrg ;; 44350b661123Smrg mvs*) 44360b661123Smrg case $cc_basename in 44370b661123Smrg cxx*) 44380b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44390b661123Smrg ;; 44400b661123Smrg *) 44410b661123Smrg ;; 44420b661123Smrg esac 444372313efbSmrg ;; 44440b661123Smrg netbsd*) 444596ce994aSmrg ;; 44460b661123Smrg *qnx* | *nto*) 44470b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44480b661123Smrg # it will coredump. 44490b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44500b661123Smrg ;; 44510b661123Smrg osf3* | osf4* | osf5*) 44520b661123Smrg case $cc_basename in 44530b661123Smrg KCC*) 44540b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44550b661123Smrg ;; 44560b661123Smrg RCC*) 44570b661123Smrg # Rational C++ 2.4.1 44580b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44590b661123Smrg ;; 44600b661123Smrg cxx*) 44610b661123Smrg # Digital/Compaq C++ 44620b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44630b661123Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44640b661123Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44650b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44660b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44670b661123Smrg ;; 44680b661123Smrg *) 44690b661123Smrg ;; 44700b661123Smrg esac 447196ce994aSmrg ;; 44720b661123Smrg psos*) 447396ce994aSmrg ;; 44740b661123Smrg solaris*) 44750b661123Smrg case $cc_basename in 4476880c7e28Smrg CC* | sunCC*) 44770b661123Smrg # Sun C++ 4.2, 5.x and Centerline C++ 44780b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44790b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44800b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44810b661123Smrg ;; 44820b661123Smrg gcx*) 44830b661123Smrg # Green Hills C++ Compiler 44840b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44850b661123Smrg ;; 44860b661123Smrg *) 44870b661123Smrg ;; 44880b661123Smrg esac 448996ce994aSmrg ;; 44900b661123Smrg sunos4*) 44910b661123Smrg case $cc_basename in 44920b661123Smrg CC*) 44930b661123Smrg # Sun C++ 4.x 44940b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44950b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44960b661123Smrg ;; 44970b661123Smrg lcc*) 44980b661123Smrg # Lucid 44990b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45000b661123Smrg ;; 450172313efbSmrg *) 450272313efbSmrg ;; 450372313efbSmrg esac 450472313efbSmrg ;; 45050b661123Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45060b661123Smrg case $cc_basename in 45070b661123Smrg CC*) 45080b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45090b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45100b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45110b661123Smrg ;; 45120b661123Smrg esac 451372313efbSmrg ;; 45140b661123Smrg tandem*) 45150b661123Smrg case $cc_basename in 45160b661123Smrg NCC*) 45170b661123Smrg # NonStop-UX NCC 3.20 45180b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45190b661123Smrg ;; 452096ce994aSmrg *) 452196ce994aSmrg ;; 45220b661123Smrg esac 452396ce994aSmrg ;; 45240b661123Smrg vxworks*) 452572313efbSmrg ;; 452672313efbSmrg *) 45270b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 452872313efbSmrg ;; 452972313efbSmrg esac 45300b661123Smrg fi 45310b661123Smrg], 45320b661123Smrg[ 45334f00d7e1Smrg if test yes = "$GCC"; then 45340b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45350b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45360b661123Smrg 45370b661123Smrg case $host_os in 45380b661123Smrg aix*) 45390b661123Smrg # All AIX code is PIC. 45404f00d7e1Smrg if test ia64 = "$host_cpu"; then 45410b661123Smrg # AIX 5 now supports IA64 processor 45420b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45430b661123Smrg fi 45444f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45450b661123Smrg ;; 45460b661123Smrg 45470b661123Smrg amigaos*) 45480b661123Smrg case $host_cpu in 45490b661123Smrg powerpc) 45500b661123Smrg # see comment about AmigaOS4 .so support 45510b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45520b661123Smrg ;; 45530b661123Smrg m68k) 45540b661123Smrg # FIXME: we need at least 68020 code to build shared libraries, but 45554f00d7e1Smrg # adding the '-m68020' flag to GCC prevents building anything better, 45564f00d7e1Smrg # like '-m68040'. 45570b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45580b661123Smrg ;; 45590b661123Smrg esac 45600b661123Smrg ;; 45610b661123Smrg 45620b661123Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45630b661123Smrg # PIC is the default for these OSes. 45640b661123Smrg ;; 45650b661123Smrg 45660b661123Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45670b661123Smrg # This hack is so that the source file can tell whether it is being 45680b661123Smrg # built for inclusion in a dll (and should export symbols for example). 45690b661123Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45700b661123Smrg # (--disable-auto-import) libraries 45710b661123Smrg m4_if([$1], [GCJ], [], 45720b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 45734f00d7e1Smrg case $host_os in 45744f00d7e1Smrg os2*) 45754f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 45764f00d7e1Smrg ;; 45774f00d7e1Smrg esac 45780b661123Smrg ;; 45790b661123Smrg 45800b661123Smrg darwin* | rhapsody*) 45810b661123Smrg # PIC is the default on this platform 45820b661123Smrg # Common symbols not allowed in MH_DYLIB files 45830b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 45840b661123Smrg ;; 45850b661123Smrg 4586880c7e28Smrg haiku*) 4587880c7e28Smrg # PIC is the default for Haiku. 4588880c7e28Smrg # The "-static" flag exists, but is broken. 4589880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4590880c7e28Smrg ;; 4591880c7e28Smrg 45920b661123Smrg hpux*) 45930b661123Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 45940b661123Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 45950b661123Smrg # sets the default TLS model and affects inlining. 45960b661123Smrg case $host_cpu in 45970b661123Smrg hppa*64*) 45980b661123Smrg # +Z the default 459972313efbSmrg ;; 460072313efbSmrg *) 46010b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 460272313efbSmrg ;; 46030b661123Smrg esac 46040b661123Smrg ;; 46050b661123Smrg 46060b661123Smrg interix[[3-9]]*) 46070b661123Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46080b661123Smrg # Instead, we relocate shared libraries at runtime. 46090b661123Smrg ;; 46100b661123Smrg 46110b661123Smrg msdosdjgpp*) 46120b661123Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46130b661123Smrg # on systems that don't support them. 46140b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46150b661123Smrg enable_shared=no 46160b661123Smrg ;; 46170b661123Smrg 46180b661123Smrg *nto* | *qnx*) 46190b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46200b661123Smrg # it will coredump. 46210b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46220b661123Smrg ;; 46230b661123Smrg 46240b661123Smrg sysv4*MP*) 46250b661123Smrg if test -d /usr/nec; then 46260b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46270b661123Smrg fi 46280b661123Smrg ;; 46290b661123Smrg 46300b661123Smrg *) 46310b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46320b661123Smrg ;; 463396ce994aSmrg esac 4634880c7e28Smrg 4635880c7e28Smrg case $cc_basename in 4636880c7e28Smrg nvcc*) # Cuda Compiler Driver 2.2 4637880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4638880c7e28Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4639880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4640880c7e28Smrg fi 4641880c7e28Smrg ;; 4642880c7e28Smrg esac 46430b661123Smrg else 46440b661123Smrg # PORTME Check for flag to pass linker flags through the system compiler. 46450b661123Smrg case $host_os in 46460b661123Smrg aix*) 46470b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46484f00d7e1Smrg if test ia64 = "$host_cpu"; then 46490b661123Smrg # AIX 5 now supports IA64 processor 46500b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46510b661123Smrg else 46520b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46530b661123Smrg fi 46540b661123Smrg ;; 46550b661123Smrg 46564f00d7e1Smrg darwin* | rhapsody*) 46574f00d7e1Smrg # PIC is the default on this platform 46584f00d7e1Smrg # Common symbols not allowed in MH_DYLIB files 46594f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 46604f00d7e1Smrg case $cc_basename in 46614f00d7e1Smrg nagfor*) 46624f00d7e1Smrg # NAG Fortran compiler 46634f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 46644f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 46654f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46664f00d7e1Smrg ;; 46674f00d7e1Smrg esac 46684f00d7e1Smrg ;; 46694f00d7e1Smrg 46700b661123Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46710b661123Smrg # This hack is so that the source file can tell whether it is being 46720b661123Smrg # built for inclusion in a dll (and should export symbols for example). 46730b661123Smrg m4_if([$1], [GCJ], [], 46740b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 46754f00d7e1Smrg case $host_os in 46764f00d7e1Smrg os2*) 46774f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 46784f00d7e1Smrg ;; 46794f00d7e1Smrg esac 46800b661123Smrg ;; 46810b661123Smrg 46820b661123Smrg hpux9* | hpux10* | hpux11*) 46830b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46840b661123Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 46850b661123Smrg # not for PA HP-UX. 46860b661123Smrg case $host_cpu in 46870b661123Smrg hppa*64*|ia64*) 46880b661123Smrg # +Z the default 468972313efbSmrg ;; 469072313efbSmrg *) 46910b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 469272313efbSmrg ;; 46930b661123Smrg esac 46940b661123Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 46954f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 46960b661123Smrg ;; 4697bdcaa8d0Smrg 46980b661123Smrg irix5* | irix6* | nonstopux*) 46990b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47000b661123Smrg # PIC (with -KPIC) is the default. 47010b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47020b661123Smrg ;; 4703bdcaa8d0Smrg 47044f00d7e1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47050b661123Smrg case $cc_basename in 47064f00d7e1Smrg # old Intel for x86_64, which still supported -KPIC. 47070b661123Smrg ecc*) 47080b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47090b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47100b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47110b661123Smrg ;; 47120b661123Smrg # icc used to be incompatible with GCC. 47130b661123Smrg # ICC 10 doesn't accept -KPIC any more. 47140b661123Smrg icc* | ifort*) 47150b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47160b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47170b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47180b661123Smrg ;; 47190b661123Smrg # Lahey Fortran 8.1. 47200b661123Smrg lf95*) 47210b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47220b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47230b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47240b661123Smrg ;; 4725880c7e28Smrg nagfor*) 4726880c7e28Smrg # NAG Fortran compiler 4727880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4728880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4729880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4730880c7e28Smrg ;; 47314f00d7e1Smrg tcc*) 47324f00d7e1Smrg # Fabrice Bellard et al's Tiny C Compiler 47334f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47344f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47354f00d7e1Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47364f00d7e1Smrg ;; 4737880c7e28Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47380b661123Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 47390b661123Smrg # which looks to be a dead project) 47400b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47410b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47420b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47430b661123Smrg ;; 47440b661123Smrg ccc*) 47450b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47460b661123Smrg # All Alpha code is PIC. 47470b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47480b661123Smrg ;; 4749880c7e28Smrg xl* | bgxl* | bgf* | mpixl*) 4750880c7e28Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47510b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47520b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47530b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47540b661123Smrg ;; 47550b661123Smrg *) 47560b661123Smrg case `$CC -V 2>&1 | sed 5q` in 4757880c7e28Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4758880c7e28Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4759880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4760880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4761880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4762880c7e28Smrg ;; 4763880c7e28Smrg *Sun\ F* | *Sun*Fortran*) 4764880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4765880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4766880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4767880c7e28Smrg ;; 47680b661123Smrg *Sun\ C*) 47690b661123Smrg # Sun C 5.9 47700b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47710b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47720b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47730b661123Smrg ;; 4774880c7e28Smrg *Intel*\ [[CF]]*Compiler*) 4775880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4776880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4777880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4778880c7e28Smrg ;; 4779880c7e28Smrg *Portland\ Group*) 4780880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4781880c7e28Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47820b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47830b661123Smrg ;; 47840b661123Smrg esac 47850b661123Smrg ;; 47860b661123Smrg esac 47870b661123Smrg ;; 4788bdcaa8d0Smrg 47890b661123Smrg newsos6) 47900b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47910b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47920b661123Smrg ;; 4793bdcaa8d0Smrg 47940b661123Smrg *nto* | *qnx*) 47950b661123Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 47960b661123Smrg # it will coredump. 47970b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 47980b661123Smrg ;; 4799bdcaa8d0Smrg 48000b661123Smrg osf3* | osf4* | osf5*) 48010b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48020b661123Smrg # All OSF/1 code is PIC. 48030b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48040b661123Smrg ;; 4805bdcaa8d0Smrg 48060b661123Smrg rdos*) 48070b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48080b661123Smrg ;; 4809bdcaa8d0Smrg 48100b661123Smrg solaris*) 48110b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48120b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48130b661123Smrg case $cc_basename in 4814880c7e28Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48150b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48160b661123Smrg *) 48170b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48180b661123Smrg esac 48190b661123Smrg ;; 4820bdcaa8d0Smrg 48210b661123Smrg sunos4*) 48220b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48230b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48240b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48250b661123Smrg ;; 4826bdcaa8d0Smrg 48270b661123Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 48280b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48290b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48300b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48310b661123Smrg ;; 4832bdcaa8d0Smrg 48330b661123Smrg sysv4*MP*) 48344f00d7e1Smrg if test -d /usr/nec; then 48350b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48360b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48370b661123Smrg fi 48380b661123Smrg ;; 483996ce994aSmrg 48400b661123Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48410b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48420b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48430b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48440b661123Smrg ;; 4845bdcaa8d0Smrg 48460b661123Smrg unicos*) 48470b661123Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48480b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48490b661123Smrg ;; 4850bdcaa8d0Smrg 48510b661123Smrg uts4*) 48520b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48530b661123Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48540b661123Smrg ;; 4855bdcaa8d0Smrg 48560b661123Smrg *) 48570b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48580b661123Smrg ;; 48590b661123Smrg esac 48600b661123Smrg fi 48610b661123Smrg]) 48620b661123Smrgcase $host_os in 48634f00d7e1Smrg # For platforms that do not support PIC, -DPIC is meaningless: 48640b661123Smrg *djgpp*) 48650b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48660b661123Smrg ;; 48670b661123Smrg *) 48680b661123Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48690b661123Smrg ;; 48700b661123Smrgesac 4871880c7e28Smrg 4872880c7e28SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4873880c7e28Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4874880c7e28Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4875880c7e28Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4876bdcaa8d0Smrg 48770b661123Smrg# 48780b661123Smrg# Check to make sure the PIC flag actually works. 48790b661123Smrg# 48800b661123Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 48810b661123Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 48820b661123Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 48830b661123Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 48840b661123Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 48850b661123Smrg "" | " "*) ;; 48860b661123Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 48870b661123Smrg esac], 48880b661123Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 48890b661123Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 489096ce994aSmrgfi 48910b661123Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 48920b661123Smrg [Additional compiler flags for building library objects]) 4893bdcaa8d0Smrg 4894880c7e28Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4895880c7e28Smrg [How to pass a linker flag through the compiler]) 48960b661123Smrg# 48970b661123Smrg# Check to make sure the static flag actually works. 48980b661123Smrg# 48990b661123Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49000b661123Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49010b661123Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49020b661123Smrg $lt_tmp_static_flag, 49030b661123Smrg [], 49040b661123Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49050b661123Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49060b661123Smrg [Compiler flag to prevent dynamic linking]) 49070b661123Smrg])# _LT_COMPILER_PIC 490896ce994aSmrg 49090b661123Smrg 49100b661123Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 49110b661123Smrg# ---------------------------- 49120b661123Smrg# See if the linker supports building shared libraries. 49130b661123Smrgm4_defun([_LT_LINKER_SHLIBS], 49140b661123Smrg[AC_REQUIRE([LT_PATH_LD])dnl 49150b661123SmrgAC_REQUIRE([LT_PATH_NM])dnl 4916880c7e28Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49170b661123Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49180b661123Smrgm4_require([_LT_DECL_EGREP])dnl 49190b661123Smrgm4_require([_LT_DECL_SED])dnl 49200b661123Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49210b661123Smrgm4_require([_LT_TAG_COMPILER])dnl 49220b661123SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49230b661123Smrgm4_if([$1], [CXX], [ 49240b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4925880c7e28Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49260b661123Smrg case $host_os in 49270b661123Smrg aix[[4-9]]*) 49280b661123Smrg # If we're using GNU nm, then we don't want the "-C" option. 49294f00d7e1Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 49304f00d7e1Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 49314f00d7e1Smrg # weak defined symbols like other global defined symbols, whereas 49324f00d7e1Smrg # GNU nm marks them as "W". 49334f00d7e1Smrg # While the 'weak' keyword is ignored in the Export File, we need 49344f00d7e1Smrg # it in the Import File for the 'aix-soname' feature, so we have 49354f00d7e1Smrg # to replace the "-B" option with "-P" for AIX nm. 49360b661123Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 49374f00d7e1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 49380b661123Smrg else 49394f00d7e1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 494072313efbSmrg fi 494172313efbSmrg ;; 49420b661123Smrg pw32*) 49434f00d7e1Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4944880c7e28Smrg ;; 49450b661123Smrg cygwin* | mingw* | cegcc*) 4946880c7e28Smrg case $cc_basename in 4947880c7e28Smrg cl*) 4948880c7e28Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4949880c7e28Smrg ;; 4950880c7e28Smrg *) 4951880c7e28Smrg _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' 4952880c7e28Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4953880c7e28Smrg ;; 4954880c7e28Smrg esac 4955880c7e28Smrg ;; 49560b661123Smrg *) 49570b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4958880c7e28Smrg ;; 49590b661123Smrg esac 49600b661123Smrg], [ 49610b661123Smrg runpath_var= 49620b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 49630b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=no 49640b661123Smrg _LT_TAGVAR(archive_cmds, $1)= 49650b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49660b661123Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 49670b661123Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49680b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49690b661123Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49700b661123Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 49710b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 49720b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49730b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49740b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49750b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 49760b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49770b661123Smrg _LT_TAGVAR(inherit_rpath, $1)=no 49780b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 49790b661123Smrg _LT_TAGVAR(module_cmds, $1)= 49800b661123Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 49810b661123Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 49820b661123Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 49830b661123Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 49840b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49850b661123Smrg # include_expsyms should be a list of space-separated symbols to be *always* 49860b661123Smrg # included in the symbol list 49870b661123Smrg _LT_TAGVAR(include_expsyms, $1)= 49880b661123Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 49894f00d7e1Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 49904f00d7e1Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 49914f00d7e1Smrg # as well as any symbol that contains 'd'. 49920b661123Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49930b661123Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 49940b661123Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 49950b661123Smrg # the symbol is explicitly referenced. Since portable code cannot 49960b661123Smrg # rely on this symbol name, it's probably fine to never include it in 49970b661123Smrg # preloaded symbol tables. 49980b661123Smrg # Exclude shared library initialization/finalization symbols. 49990b661123Smrgdnl Note also adjust exclude_expsyms for C++ above. 50000b661123Smrg extract_expsyms_cmds= 5001bdcaa8d0Smrg 50020b661123Smrg case $host_os in 50030b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 50040b661123Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 50050b661123Smrg # When not using gcc, we currently assume that we are using 50060b661123Smrg # Microsoft Visual C++. 50074f00d7e1Smrg if test yes != "$GCC"; then 50080b661123Smrg with_gnu_ld=no 500972313efbSmrg fi 501072313efbSmrg ;; 50110b661123Smrg interix*) 50120b661123Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 50130b661123Smrg with_gnu_ld=yes 50140b661123Smrg ;; 50154f00d7e1Smrg openbsd* | bitrig*) 50160b661123Smrg with_gnu_ld=no 50170b661123Smrg ;; 501872313efbSmrg esac 5019bdcaa8d0Smrg 50200b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5021880c7e28Smrg 5022880c7e28Smrg # On some targets, GNU ld is compatible enough with the native linker 5023880c7e28Smrg # that we're better off using the native interface for both. 5024880c7e28Smrg lt_use_gnu_ld_interface=no 50254f00d7e1Smrg if test yes = "$with_gnu_ld"; then 5026880c7e28Smrg case $host_os in 5027880c7e28Smrg aix*) 5028880c7e28Smrg # The AIX port of GNU ld has always aspired to compatibility 5029880c7e28Smrg # with the native linker. However, as the warning in the GNU ld 5030880c7e28Smrg # block says, versions before 2.19.5* couldn't really create working 5031880c7e28Smrg # shared libraries, regardless of the interface used. 5032880c7e28Smrg case `$LD -v 2>&1` in 5033880c7e28Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5034880c7e28Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5035880c7e28Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5036880c7e28Smrg *) 5037880c7e28Smrg lt_use_gnu_ld_interface=yes 5038880c7e28Smrg ;; 5039880c7e28Smrg esac 5040880c7e28Smrg ;; 5041880c7e28Smrg *) 5042880c7e28Smrg lt_use_gnu_ld_interface=yes 5043880c7e28Smrg ;; 5044880c7e28Smrg esac 5045880c7e28Smrg fi 5046880c7e28Smrg 50474f00d7e1Smrg if test yes = "$lt_use_gnu_ld_interface"; then 50480b661123Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 50494f00d7e1Smrg wlarc='$wl' 5050bdcaa8d0Smrg 50510b661123Smrg # Set some defaults for GNU ld with shared library support. These 50520b661123Smrg # are reset later if shared libraries are not supported. Putting them 50530b661123Smrg # here allows them to be overridden if necessary. 50540b661123Smrg runpath_var=LD_RUN_PATH 50554f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 50564f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50570b661123Smrg # ancient GNU ld didn't support --whole-archive et. al. 50580b661123Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 50594f00d7e1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50600b661123Smrg else 50610b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50620b661123Smrg fi 50630b661123Smrg supports_anon_versioning=no 50644f00d7e1Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5065880c7e28Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 50660b661123Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50670b661123Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50680b661123Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50690b661123Smrg *\ 2.11.*) ;; # other 2.11 versions 50700b661123Smrg *) supports_anon_versioning=yes ;; 50710b661123Smrg esac 5072bdcaa8d0Smrg 50730b661123Smrg # See if GNU ld supports shared libraries. 50740b661123Smrg case $host_os in 50750b661123Smrg aix[[3-9]]*) 50760b661123Smrg # On AIX/PPC, the GNU linker is very broken 50774f00d7e1Smrg if test ia64 != "$host_cpu"; then 50780b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 50790b661123Smrg cat <<_LT_EOF 1>&2 5080bdcaa8d0Smrg 5081880c7e28Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 50820b661123Smrg*** to be unable to reliably create shared libraries on AIX. 50830b661123Smrg*** Therefore, libtool is disabling shared libraries support. If you 5084880c7e28Smrg*** really care for shared libraries, you may want to install binutils 5085880c7e28Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5086880c7e28Smrg*** You will then need to restart the configuration process. 5087bdcaa8d0Smrg 50880b661123Smrg_LT_EOF 50890b661123Smrg fi 50900b661123Smrg ;; 5091bdcaa8d0Smrg 50920b661123Smrg amigaos*) 50930b661123Smrg case $host_cpu in 50940b661123Smrg powerpc) 50950b661123Smrg # see comment about AmigaOS4 .so support 50964f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 50970b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 50980b661123Smrg ;; 50990b661123Smrg m68k) 51000b661123Smrg _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)' 51010b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51020b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51030b661123Smrg ;; 51040b661123Smrg esac 51050b661123Smrg ;; 5106bdcaa8d0Smrg 51070b661123Smrg beos*) 51080b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51090b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51100b661123Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51110b661123Smrg # support --undefined. This deserves some investigation. FIXME 51124f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51130b661123Smrg else 51140b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51150b661123Smrg fi 51160b661123Smrg ;; 5117bdcaa8d0Smrg 51180b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 51190b661123Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51200b661123Smrg # as there is no search path for DLLs. 51210b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51224f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51230b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51240b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=no 51250b661123Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5126880c7e28Smrg _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' 5127880c7e28Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51280b661123Smrg 51290b661123Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 51304f00d7e1Smrg _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' 51314f00d7e1Smrg # If the export-symbols file already is a .def file, use it as 51324f00d7e1Smrg # is; otherwise, prepend EXPORTS... 51334f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 51344f00d7e1Smrg cp $export_symbols $output_objdir/$soname.def; 51354f00d7e1Smrg else 51364f00d7e1Smrg echo EXPORTS > $output_objdir/$soname.def; 51374f00d7e1Smrg cat $export_symbols >> $output_objdir/$soname.def; 51384f00d7e1Smrg fi~ 51394f00d7e1Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51400b661123Smrg else 51410b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51420b661123Smrg fi 51430b661123Smrg ;; 5144bdcaa8d0Smrg 5145880c7e28Smrg haiku*) 51464f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5147880c7e28Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5148880c7e28Smrg ;; 5149880c7e28Smrg 51504f00d7e1Smrg os2*) 51514f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51524f00d7e1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51534f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51544f00d7e1Smrg shrext_cmds=.dll 51554f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51564f00d7e1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51574f00d7e1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51584f00d7e1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51594f00d7e1Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 51604f00d7e1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51614f00d7e1Smrg emximp -o $lib $output_objdir/$libname.def' 51624f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 51634f00d7e1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 51644f00d7e1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 51654f00d7e1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 51664f00d7e1Smrg prefix_cmds="$SED"~ 51674f00d7e1Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 51684f00d7e1Smrg prefix_cmds="$prefix_cmds -e 1d"; 51694f00d7e1Smrg fi~ 51704f00d7e1Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 51714f00d7e1Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 51724f00d7e1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 51734f00d7e1Smrg emximp -o $lib $output_objdir/$libname.def' 51744f00d7e1Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 51754f00d7e1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51764f00d7e1Smrg ;; 51774f00d7e1Smrg 51780b661123Smrg interix[[3-9]]*) 51790b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 51800b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 51814f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 51824f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 51830b661123Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 51840b661123Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 51850b661123Smrg # default) and relocated if they conflict, which is a slow very memory 51860b661123Smrg # consuming and fragmenting process. To avoid this, we pick a random, 51870b661123Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 51880b661123Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 51894f00d7e1Smrg _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' 51904f00d7e1Smrg _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' 51910b661123Smrg ;; 5192bdcaa8d0Smrg 5193880c7e28Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 51940b661123Smrg tmp_diet=no 51954f00d7e1Smrg if test linux-dietlibc = "$host_os"; then 51960b661123Smrg case $cc_basename in 51970b661123Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 51980b661123Smrg esac 51990b661123Smrg fi 52000b661123Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 52014f00d7e1Smrg && test no = "$tmp_diet" 52020b661123Smrg then 5203880c7e28Smrg tmp_addflag=' $pic_flag' 52040b661123Smrg tmp_sharedflag='-shared' 52050b661123Smrg case $cc_basename,$host_cpu in 52060b661123Smrg pgcc*) # Portland Group C compiler 52074f00d7e1Smrg _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' 52080b661123Smrg tmp_addflag=' $pic_flag' 52090b661123Smrg ;; 5210880c7e28Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 5211880c7e28Smrg # Portland Group f77 and f90 compilers 52124f00d7e1Smrg _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' 52130b661123Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 52140b661123Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52150b661123Smrg tmp_addflag=' -i_dynamic' ;; 52160b661123Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52170b661123Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52180b661123Smrg ifc* | ifort*) # Intel Fortran compiler 52190b661123Smrg tmp_addflag=' -nofor_main' ;; 52200b661123Smrg lf95*) # Lahey Fortran 8.1 52210b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52220b661123Smrg tmp_sharedflag='--shared' ;; 52234f00d7e1Smrg nagfor*) # NAGFOR 5.3 52244f00d7e1Smrg tmp_sharedflag='-Wl,-shared' ;; 5225880c7e28Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52260b661123Smrg tmp_sharedflag='-qmkshrobj' 52270b661123Smrg tmp_addflag= ;; 5228880c7e28Smrg nvcc*) # Cuda Compiler Driver 2.2 52294f00d7e1Smrg _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' 5230880c7e28Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5231880c7e28Smrg ;; 52320b661123Smrg esac 52330b661123Smrg case `$CC -V 2>&1 | sed 5q` in 52340b661123Smrg *Sun\ C*) # Sun C 5.9 52354f00d7e1Smrg _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' 52360b661123Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52370b661123Smrg tmp_sharedflag='-G' ;; 52380b661123Smrg *Sun\ F*) # Sun Fortran 8.3 52390b661123Smrg tmp_sharedflag='-G' ;; 52400b661123Smrg esac 52414f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5242bdcaa8d0Smrg 52434f00d7e1Smrg if test yes = "$supports_anon_versioning"; then 52440b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52454f00d7e1Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52464f00d7e1Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52474f00d7e1Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52480b661123Smrg fi 5249bdcaa8d0Smrg 52500b661123Smrg case $cc_basename in 52514f00d7e1Smrg tcc*) 52524f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 52534f00d7e1Smrg ;; 5254880c7e28Smrg xlf* | bgf* | bgxlf* | mpixlf*) 52550b661123Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52560b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 52574f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5258880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 52594f00d7e1Smrg if test yes = "$supports_anon_versioning"; then 52600b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 52614f00d7e1Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 52624f00d7e1Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 52634f00d7e1Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52640b661123Smrg fi 52650b661123Smrg ;; 52660b661123Smrg esac 52670b661123Smrg else 52680b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52690b661123Smrg fi 52700b661123Smrg ;; 5271bdcaa8d0Smrg 52720b661123Smrg netbsd*) 52730b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52740b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52750b661123Smrg wlarc= 52760b661123Smrg else 52774f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52784f00d7e1Smrg _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' 52790b661123Smrg fi 52800b661123Smrg ;; 5281bdcaa8d0Smrg 52820b661123Smrg solaris*) 52830b661123Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 52840b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52850b661123Smrg cat <<_LT_EOF 1>&2 5286bdcaa8d0Smrg 52870b661123Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 52880b661123Smrg*** create shared libraries on Solaris systems. Therefore, libtool 52890b661123Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 52900b661123Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 52910b661123Smrg*** your PATH or compiler configuration so that the native linker is 52920b661123Smrg*** used, and then restart. 5293bdcaa8d0Smrg 52940b661123Smrg_LT_EOF 52950b661123Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 52964f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 52974f00d7e1Smrg _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' 52980b661123Smrg else 52990b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53000b661123Smrg fi 53010b661123Smrg ;; 5302bdcaa8d0Smrg 53030b661123Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53040b661123Smrg case `$LD -v 2>&1` in 53050b661123Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53060b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53070b661123Smrg cat <<_LT_EOF 1>&2 5308bdcaa8d0Smrg 53094f00d7e1Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53100b661123Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53110b661123Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53120b661123Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53130b661123Smrg*** your PATH or compiler configuration so that the native linker is 53140b661123Smrg*** used, and then restart. 5315bdcaa8d0Smrg 53160b661123Smrg_LT_EOF 53170b661123Smrg ;; 53180b661123Smrg *) 53190b661123Smrg # For security reasons, it is highly recommended that you always 53200b661123Smrg # use absolute paths for naming shared libraries, and exclude the 53210b661123Smrg # DT_RUNPATH tag from executables and libraries. But doing so 53220b661123Smrg # requires that you compile everything twice, which is a pain. 53230b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53244f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 53254f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53264f00d7e1Smrg _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' 53270b661123Smrg else 53280b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53290b661123Smrg fi 53300b661123Smrg ;; 53310b661123Smrg esac 53320b661123Smrg ;; 5333bdcaa8d0Smrg 53340b661123Smrg sunos4*) 53350b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53360b661123Smrg wlarc= 53370b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53380b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53390b661123Smrg ;; 5340bdcaa8d0Smrg 53410b661123Smrg *) 53420b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 53434f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 53444f00d7e1Smrg _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' 53450b661123Smrg else 53460b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53470b661123Smrg fi 53480b661123Smrg ;; 53490b661123Smrg esac 5350bdcaa8d0Smrg 53514f00d7e1Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53520b661123Smrg runpath_var= 53530b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53540b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53550b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53560b661123Smrg fi 53570b661123Smrg else 53580b661123Smrg # PORTME fill in a description of your system's linker (not GNU ld) 53590b661123Smrg case $host_os in 53600b661123Smrg aix3*) 53610b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53620b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 53630b661123Smrg _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' 53640b661123Smrg # Note: this linker hardcodes the directories in LIBPATH if there 53650b661123Smrg # are no directories specified by -L. 53660b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 53674f00d7e1Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53680b661123Smrg # Neither direct hardcoding nor static linking is supported with a 53690b661123Smrg # broken collect2. 53700b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 53710b661123Smrg fi 53720b661123Smrg ;; 5373bdcaa8d0Smrg 53740b661123Smrg aix[[4-9]]*) 53754f00d7e1Smrg if test ia64 = "$host_cpu"; then 53760b661123Smrg # On IA64, the linker does run time linking by default, so we don't 53770b661123Smrg # have to do anything special. 53780b661123Smrg aix_use_runtimelinking=no 53790b661123Smrg exp_sym_flag='-Bexport' 53804f00d7e1Smrg no_entry_flag= 53810b661123Smrg else 53820b661123Smrg # If we're using GNU nm, then we don't want the "-C" option. 53834f00d7e1Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 53844f00d7e1Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 53854f00d7e1Smrg # weak defined symbols like other global defined symbols, whereas 53864f00d7e1Smrg # GNU nm marks them as "W". 53874f00d7e1Smrg # While the 'weak' keyword is ignored in the Export File, we need 53884f00d7e1Smrg # it in the Import File for the 'aix-soname' feature, so we have 53894f00d7e1Smrg # to replace the "-B" option with "-P" for AIX nm. 53900b661123Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 53914f00d7e1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' 53920b661123Smrg else 53934f00d7e1Smrg _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' 53940b661123Smrg fi 53950b661123Smrg aix_use_runtimelinking=no 5396bdcaa8d0Smrg 53970b661123Smrg # Test if we are trying to use run time linking or normal 53980b661123Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 53994f00d7e1Smrg # have runtime linking enabled, and use it for executables. 54004f00d7e1Smrg # For shared libraries, we enable/disable runtime linking 54014f00d7e1Smrg # depending on the kind of the shared library created - 54024f00d7e1Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 54034f00d7e1Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 54044f00d7e1Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 54054f00d7e1Smrg # lib.a static archive 54064f00d7e1Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 54074f00d7e1Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 54084f00d7e1Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 54094f00d7e1Smrg # lib.a(lib.so.V) shared, rtl:no 54104f00d7e1Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 54114f00d7e1Smrg # lib.a static archive 54120b661123Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54130b661123Smrg for ld_flag in $LDFLAGS; do 54144f00d7e1Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54150b661123Smrg aix_use_runtimelinking=yes 54160b661123Smrg break 54170b661123Smrg fi 54180b661123Smrg done 54194f00d7e1Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 54204f00d7e1Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 54214f00d7e1Smrg # so we don't have lib.a shared libs to link our executables. 54224f00d7e1Smrg # We have to force runtime linking in this case. 54234f00d7e1Smrg aix_use_runtimelinking=yes 54244f00d7e1Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 54254f00d7e1Smrg fi 54260b661123Smrg ;; 54270b661123Smrg esac 5428bdcaa8d0Smrg 54290b661123Smrg exp_sym_flag='-bexport' 54300b661123Smrg no_entry_flag='-bnoentry' 54310b661123Smrg fi 5432bdcaa8d0Smrg 54330b661123Smrg # When large executables or shared objects are built, AIX ld can 54340b661123Smrg # have problems creating the table of contents. If linking a library 54350b661123Smrg # or program results in "error TOC overflow" add -mminimal-toc to 54360b661123Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54370b661123Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5438bdcaa8d0Smrg 54390b661123Smrg _LT_TAGVAR(archive_cmds, $1)='' 54400b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54410b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54420b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54430b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 54444f00d7e1Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 54454f00d7e1Smrg case $with_aix_soname,$aix_use_runtimelinking in 54464f00d7e1Smrg aix,*) ;; # traditional, no import file 54474f00d7e1Smrg svr4,* | *,yes) # use import file 54484f00d7e1Smrg # The Import File defines what to hardcode. 54494f00d7e1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 54504f00d7e1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 54514f00d7e1Smrg ;; 54524f00d7e1Smrg esac 5453bdcaa8d0Smrg 54544f00d7e1Smrg if test yes = "$GCC"; then 54550b661123Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54560b661123Smrg # We only want to do this on AIX 4.2 and lower, the check 54570b661123Smrg # below for broken collect2 doesn't work under 4.3+ 54584f00d7e1Smrg collect2name=`$CC -print-prog-name=collect2` 54590b661123Smrg if test -f "$collect2name" && 54600b661123Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54610b661123Smrg then 54620b661123Smrg # We have reworked collect2 54630b661123Smrg : 54640b661123Smrg else 54650b661123Smrg # We have old collect2 54660b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54670b661123Smrg # It fails to find uninstalled libraries when the uninstalled 54680b661123Smrg # path is not listed in the libpath. Setting hardcode_minus_L 54690b661123Smrg # to unsupported forces relinking 54700b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54710b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54720b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 54730b661123Smrg fi 54740b661123Smrg ;; 54750b661123Smrg esac 54760b661123Smrg shared_flag='-shared' 54774f00d7e1Smrg if test yes = "$aix_use_runtimelinking"; then 54784f00d7e1Smrg shared_flag="$shared_flag "'$wl-G' 54790b661123Smrg fi 54804f00d7e1Smrg # Need to ensure runtime linking is disabled for the traditional 54814f00d7e1Smrg # shared library, or the linker may eventually find shared libraries 54824f00d7e1Smrg # /with/ Import File - we do not want to mix them. 54834f00d7e1Smrg shared_flag_aix='-shared' 54844f00d7e1Smrg shared_flag_svr4='-shared $wl-G' 54850b661123Smrg else 54860b661123Smrg # not using gcc 54874f00d7e1Smrg if test ia64 = "$host_cpu"; then 54880b661123Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 54890b661123Smrg # chokes on -Wl,-G. The following line is correct: 54900b661123Smrg shared_flag='-G' 54910b661123Smrg else 54924f00d7e1Smrg if test yes = "$aix_use_runtimelinking"; then 54934f00d7e1Smrg shared_flag='$wl-G' 54940b661123Smrg else 54954f00d7e1Smrg shared_flag='$wl-bM:SRE' 54960b661123Smrg fi 54974f00d7e1Smrg shared_flag_aix='$wl-bM:SRE' 54984f00d7e1Smrg shared_flag_svr4='$wl-G' 54990b661123Smrg fi 55000b661123Smrg fi 5501bdcaa8d0Smrg 55024f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55030b661123Smrg # It seems that -bexpall does not export symbols beginning with 55040b661123Smrg # underscore (_), so it is better to generate a list of symbols to export. 55050b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 55064f00d7e1Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55070b661123Smrg # Warning - without using the other runtime loading flags (-brtl), 55080b661123Smrg # -berok will link without error, but may produce a broken library. 55090b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55100b661123Smrg # Determine the default libpath from the value encoded in an 55110b661123Smrg # empty executable. 5512880c7e28Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55134f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55144f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 55150b661123Smrg else 55164f00d7e1Smrg if test ia64 = "$host_cpu"; then 55174f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55180b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 55194f00d7e1Smrg _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" 55200b661123Smrg else 55210b661123Smrg # Determine the default libpath from the value encoded in an 55220b661123Smrg # empty executable. 5523880c7e28Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 55244f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55250b661123Smrg # Warning - without using the other run time loading flags, 55260b661123Smrg # -berok will link without error, but may produce a broken library. 55274f00d7e1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 55284f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 55294f00d7e1Smrg if test yes = "$with_gnu_ld"; then 5530880c7e28Smrg # We only use this code for GNU lds that support --whole-archive. 55314f00d7e1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5532880c7e28Smrg else 5533880c7e28Smrg # Exported symbols can be pulled into shared objects from archives 5534880c7e28Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5535880c7e28Smrg fi 55360b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 55374f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 55384f00d7e1Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 55394f00d7e1Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 55404f00d7e1Smrg if test svr4 != "$with_aix_soname"; then 55414f00d7e1Smrg # This is similar to how AIX traditionally builds its shared libraries. 55424f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 55434f00d7e1Smrg fi 55444f00d7e1Smrg if test aix != "$with_aix_soname"; then 55454f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 55464f00d7e1Smrg else 55474f00d7e1Smrg # used by -dlpreopen to get the symbols 55484f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 55494f00d7e1Smrg fi 55504f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55510b661123Smrg fi 55520b661123Smrg fi 55530b661123Smrg ;; 5554bdcaa8d0Smrg 55550b661123Smrg amigaos*) 55560b661123Smrg case $host_cpu in 55570b661123Smrg powerpc) 55580b661123Smrg # see comment about AmigaOS4 .so support 55594f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55600b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55610b661123Smrg ;; 55620b661123Smrg m68k) 55630b661123Smrg _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)' 55640b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55650b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55660b661123Smrg ;; 55670b661123Smrg esac 55680b661123Smrg ;; 5569bdcaa8d0Smrg 55700b661123Smrg bsdi[[45]]*) 55710b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55720b661123Smrg ;; 5573bdcaa8d0Smrg 55740b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 55750b661123Smrg # When not using gcc, we currently assume that we are using 55760b661123Smrg # Microsoft Visual C++. 55770b661123Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 55780b661123Smrg # no search path for DLLs. 5579880c7e28Smrg case $cc_basename in 5580880c7e28Smrg cl*) 5581880c7e28Smrg # Native MSVC 5582880c7e28Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5583880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5584880c7e28Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5585880c7e28Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5586880c7e28Smrg # Tell ltmain to make .lib files, not .a files. 5587880c7e28Smrg libext=lib 5588880c7e28Smrg # Tell ltmain to make .dll files, not .so files. 55894f00d7e1Smrg shrext_cmds=.dll 5590880c7e28Smrg # FIXME: Setting linknames here is a bad hack. 55914f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 55924f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 55934f00d7e1Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 55944f00d7e1Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 55954f00d7e1Smrg else 55964f00d7e1Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 55974f00d7e1Smrg fi~ 55984f00d7e1Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 55994f00d7e1Smrg linknames=' 5600880c7e28Smrg # The linker will not automatically build a static lib if we build a DLL. 5601880c7e28Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5602880c7e28Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5603880c7e28Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5604880c7e28Smrg _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' 5605880c7e28Smrg # Don't use ranlib 5606880c7e28Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5607880c7e28Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 56084f00d7e1Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 56094f00d7e1Smrg case $lt_outputfile in 56104f00d7e1Smrg *.exe|*.EXE) ;; 56114f00d7e1Smrg *) 56124f00d7e1Smrg lt_outputfile=$lt_outputfile.exe 56134f00d7e1Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 56144f00d7e1Smrg ;; 56154f00d7e1Smrg esac~ 56164f00d7e1Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 56174f00d7e1Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 56184f00d7e1Smrg $RM "$lt_outputfile.manifest"; 56194f00d7e1Smrg fi' 5620880c7e28Smrg ;; 5621880c7e28Smrg *) 5622880c7e28Smrg # Assume MSVC wrapper 5623880c7e28Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5624880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5625880c7e28Smrg # Tell ltmain to make .lib files, not .a files. 5626880c7e28Smrg libext=lib 5627880c7e28Smrg # Tell ltmain to make .dll files, not .so files. 56284f00d7e1Smrg shrext_cmds=.dll 5629880c7e28Smrg # FIXME: Setting linknames here is a bad hack. 5630880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5631880c7e28Smrg # The linker will automatically build a .lib file if we build a DLL. 5632880c7e28Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5633880c7e28Smrg # FIXME: Should let the user specify the lib program. 5634880c7e28Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5635880c7e28Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5636880c7e28Smrg ;; 5637880c7e28Smrg esac 56380b661123Smrg ;; 5639bdcaa8d0Smrg 56400b661123Smrg darwin* | rhapsody*) 56410b661123Smrg _LT_DARWIN_LINKER_FEATURES($1) 56420b661123Smrg ;; 5643bdcaa8d0Smrg 56440b661123Smrg dgux*) 56450b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56460b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56470b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56480b661123Smrg ;; 5649bdcaa8d0Smrg 56500b661123Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56510b661123Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 56520b661123Smrg # does not break anything, and helps significantly (at the cost of a little 56530b661123Smrg # extra space). 56540b661123Smrg freebsd2.2*) 56550b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56560b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56570b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56580b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56590b661123Smrg ;; 5660bdcaa8d0Smrg 56610b661123Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5662880c7e28Smrg freebsd2.*) 56630b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56640b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56650b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56660b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56670b661123Smrg ;; 5668bdcaa8d0Smrg 56690b661123Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 56700b661123Smrg freebsd* | dragonfly*) 5671880c7e28Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56720b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56730b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56740b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56750b661123Smrg ;; 5676bdcaa8d0Smrg 56770b661123Smrg hpux9*) 56784f00d7e1Smrg if test yes = "$GCC"; then 56794f00d7e1Smrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 56800b661123Smrg else 56814f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 56820b661123Smrg fi 56834f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56840b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56850b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5686bdcaa8d0Smrg 56870b661123Smrg # hardcode_minus_L: Not really in the search PATH, 56880b661123Smrg # but as the default location of the library. 56890b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56904f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 56910b661123Smrg ;; 5692bdcaa8d0Smrg 56930b661123Smrg hpux10*) 56944f00d7e1Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 56954f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 56960b661123Smrg else 56970b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 56980b661123Smrg fi 56994f00d7e1Smrg if test no = "$with_gnu_ld"; then 57004f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57010b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57020b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57030b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57044f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57050b661123Smrg # hardcode_minus_L: Not really in the search PATH, 57060b661123Smrg # but as the default location of the library. 57070b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57080b661123Smrg fi 570972313efbSmrg ;; 57100b661123Smrg 57110b661123Smrg hpux11*) 57124f00d7e1Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 57130b661123Smrg case $host_cpu in 57140b661123Smrg hppa*64*) 57154f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57160b661123Smrg ;; 57170b661123Smrg ia64*) 57184f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57190b661123Smrg ;; 57200b661123Smrg *) 57214f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57220b661123Smrg ;; 57230b661123Smrg esac 57240b661123Smrg else 57250b661123Smrg case $host_cpu in 57260b661123Smrg hppa*64*) 57274f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57280b661123Smrg ;; 57290b661123Smrg ia64*) 57304f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57310b661123Smrg ;; 57320b661123Smrg *) 5733880c7e28Smrg m4_if($1, [], [ 5734880c7e28Smrg # Older versions of the 11.00 compiler do not understand -b yet 5735880c7e28Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5736880c7e28Smrg _LT_LINKER_OPTION([if $CC understands -b], 5737880c7e28Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 57384f00d7e1Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5739880c7e28Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 57404f00d7e1Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57410b661123Smrg ;; 57420b661123Smrg esac 57430b661123Smrg fi 57444f00d7e1Smrg if test no = "$with_gnu_ld"; then 57454f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57460b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57470b661123Smrg 57480b661123Smrg case $host_cpu in 57490b661123Smrg hppa*64*|ia64*) 57500b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57510b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57520b661123Smrg ;; 57530b661123Smrg *) 57540b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57550b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 57564f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57570b661123Smrg 57580b661123Smrg # hardcode_minus_L: Not really in the search PATH, 57590b661123Smrg # but as the default location of the library. 57600b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57610b661123Smrg ;; 57620b661123Smrg esac 57630b661123Smrg fi 576472313efbSmrg ;; 5765bdcaa8d0Smrg 57660b661123Smrg irix5* | irix6* | nonstopux*) 57674f00d7e1Smrg if test yes = "$GCC"; then 57684f00d7e1Smrg _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' 57690b661123Smrg # Try to use the -exported_symbol ld option, if it does not 57700b661123Smrg # work, assume that -exports_file does not work either and 57710b661123Smrg # implicitly export all symbols. 5772880c7e28Smrg # This should be the same for all languages, so no per-tag cache variable. 5773880c7e28Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5774880c7e28Smrg [lt_cv_irix_exported_symbol], 57754f00d7e1Smrg [save_LDFLAGS=$LDFLAGS 57764f00d7e1Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5777880c7e28Smrg AC_LINK_IFELSE( 5778880c7e28Smrg [AC_LANG_SOURCE( 5779880c7e28Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5780880c7e28Smrg [C++], [[int foo (void) { return 0; }]], 5781880c7e28Smrg [Fortran 77], [[ 5782880c7e28Smrg subroutine foo 5783880c7e28Smrg end]], 5784880c7e28Smrg [Fortran], [[ 5785880c7e28Smrg subroutine foo 5786880c7e28Smrg end]])])], 5787880c7e28Smrg [lt_cv_irix_exported_symbol=yes], 5788880c7e28Smrg [lt_cv_irix_exported_symbol=no]) 57894f00d7e1Smrg LDFLAGS=$save_LDFLAGS]) 57904f00d7e1Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 57914f00d7e1Smrg _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' 5792880c7e28Smrg fi 57930b661123Smrg else 57944f00d7e1Smrg _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' 57954f00d7e1Smrg _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' 57960b661123Smrg fi 57970b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 57984f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 57990b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58000b661123Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 58010b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58020b661123Smrg ;; 5803bdcaa8d0Smrg 58044f00d7e1Smrg linux*) 58054f00d7e1Smrg case $cc_basename in 58064f00d7e1Smrg tcc*) 58074f00d7e1Smrg # Fabrice Bellard et al's Tiny C Compiler 58084f00d7e1Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 58094f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58104f00d7e1Smrg ;; 58114f00d7e1Smrg esac 58124f00d7e1Smrg ;; 58134f00d7e1Smrg 58140b661123Smrg netbsd*) 58150b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58160b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58170b661123Smrg else 58180b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58190b661123Smrg fi 58200b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58210b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58220b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58230b661123Smrg ;; 5824bdcaa8d0Smrg 58250b661123Smrg newsos6) 58260b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58270b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58284f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58290b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58300b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58310b661123Smrg ;; 5832bdcaa8d0Smrg 58330b661123Smrg *nto* | *qnx*) 58340b661123Smrg ;; 5835bdcaa8d0Smrg 58364f00d7e1Smrg openbsd* | bitrig*) 58370b661123Smrg if test -f /usr/libexec/ld.so; then 58380b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58390b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58400b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 58414f00d7e1Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58420b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58434f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 58444f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58454f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58460b661123Smrg else 58474f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 58484f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58490b661123Smrg fi 58500b661123Smrg else 58510b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58520b661123Smrg fi 58530b661123Smrg ;; 5854bdcaa8d0Smrg 58550b661123Smrg os2*) 58560b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58570b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58580b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 58594f00d7e1Smrg shrext_cmds=.dll 58604f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58614f00d7e1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58624f00d7e1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58634f00d7e1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58644f00d7e1Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 58654f00d7e1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58664f00d7e1Smrg emximp -o $lib $output_objdir/$libname.def' 58674f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 58684f00d7e1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 58694f00d7e1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 58704f00d7e1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 58714f00d7e1Smrg prefix_cmds="$SED"~ 58724f00d7e1Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 58734f00d7e1Smrg prefix_cmds="$prefix_cmds -e 1d"; 58744f00d7e1Smrg fi~ 58754f00d7e1Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 58764f00d7e1Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 58774f00d7e1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 58784f00d7e1Smrg emximp -o $lib $output_objdir/$libname.def' 58794f00d7e1Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 58804f00d7e1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58810b661123Smrg ;; 5882bdcaa8d0Smrg 58830b661123Smrg osf3*) 58844f00d7e1Smrg if test yes = "$GCC"; then 58854f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 58864f00d7e1Smrg _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' 58870b661123Smrg else 58880b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 58894f00d7e1Smrg _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' 58900b661123Smrg fi 58910b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 58924f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58930b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58940b661123Smrg ;; 5895bdcaa8d0Smrg 58960b661123Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 58974f00d7e1Smrg if test yes = "$GCC"; then 58984f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 58994f00d7e1Smrg _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' 59004f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59010b661123Smrg else 59020b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 59034f00d7e1Smrg _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' 59040b661123Smrg _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~ 59054f00d7e1Smrg $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' 5906bdcaa8d0Smrg 59070b661123Smrg # Both c and cxx compiler support -rpath directly 59080b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59090b661123Smrg fi 59100b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59110b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59120b661123Smrg ;; 5913bdcaa8d0Smrg 59140b661123Smrg solaris*) 59150b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 59164f00d7e1Smrg if test yes = "$GCC"; then 59174f00d7e1Smrg wlarc='$wl' 59184f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59190b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59204f00d7e1Smrg $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' 59210b661123Smrg else 59220b661123Smrg case `$CC -V 2>&1` in 59230b661123Smrg *"Compilers 5.0"*) 59240b661123Smrg wlarc='' 59254f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59260b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59274f00d7e1Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59280b661123Smrg ;; 59290b661123Smrg *) 59304f00d7e1Smrg wlarc='$wl' 59314f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59320b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 59334f00d7e1Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59340b661123Smrg ;; 59350b661123Smrg esac 59360b661123Smrg fi 59370b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59380b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59390b661123Smrg case $host_os in 59400b661123Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59410b661123Smrg *) 59420b661123Smrg # The compiler driver will combine and reorder linker options, 59434f00d7e1Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59440b661123Smrg # but is careful enough not to reorder. 59450b661123Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 59464f00d7e1Smrg if test yes = "$GCC"; then 59474f00d7e1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59480b661123Smrg else 59490b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59500b661123Smrg fi 59510b661123Smrg ;; 59520b661123Smrg esac 59530b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59540b661123Smrg ;; 5955bdcaa8d0Smrg 59560b661123Smrg sunos4*) 59574f00d7e1Smrg if test sequent = "$host_vendor"; then 59580b661123Smrg # Use $CC to link under sequent, because it throws in some extra .o 59590b661123Smrg # files that make .init and .fini sections work. 59604f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59610b661123Smrg else 59620b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59630b661123Smrg fi 59640b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59650b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 59660b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59670b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59680b661123Smrg ;; 5969bdcaa8d0Smrg 59700b661123Smrg sysv4) 59710b661123Smrg case $host_vendor in 59720b661123Smrg sni) 59730b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59740b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59750b661123Smrg ;; 59760b661123Smrg siemens) 59770b661123Smrg ## LD is ld it makes a PLAMLIB 59780b661123Smrg ## CC just makes a GrossModule. 59790b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 59800b661123Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 59810b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 59820b661123Smrg ;; 59830b661123Smrg motorola) 59840b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59850b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 59860b661123Smrg ;; 59870b661123Smrg esac 59880b661123Smrg runpath_var='LD_RUN_PATH' 59890b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59900b661123Smrg ;; 5991bdcaa8d0Smrg 59920b661123Smrg sysv4.3*) 59930b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59940b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59950b661123Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 59960b661123Smrg ;; 5997bdcaa8d0Smrg 59980b661123Smrg sysv4*MP*) 59990b661123Smrg if test -d /usr/nec; then 60000b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60010b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60020b661123Smrg runpath_var=LD_RUN_PATH 60030b661123Smrg hardcode_runpath_var=yes 60040b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 60050b661123Smrg fi 60060b661123Smrg ;; 6007bdcaa8d0Smrg 60080b661123Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 60094f00d7e1Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60100b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60110b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60120b661123Smrg runpath_var='LD_RUN_PATH' 6013bdcaa8d0Smrg 60144f00d7e1Smrg if test yes = "$GCC"; then 60154f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60164f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60170b661123Smrg else 60184f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60194f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60200b661123Smrg fi 60210b661123Smrg ;; 6022bdcaa8d0Smrg 60230b661123Smrg sysv5* | sco3.2v5* | sco5v6*) 60244f00d7e1Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 60250b661123Smrg # link with -lc, and that would cause any symbols used from libc to 60260b661123Smrg # always be unresolved, which means just about no library would 60270b661123Smrg # ever link correctly. If we're not using GNU ld we use -z text 60280b661123Smrg # though, which does catch some bad symbols but isn't as heavy-handed 60290b661123Smrg # as -z defs. 60304f00d7e1Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60314f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60320b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60330b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60344f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60350b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60360b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 60374f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60380b661123Smrg runpath_var='LD_RUN_PATH' 6039bdcaa8d0Smrg 60404f00d7e1Smrg if test yes = "$GCC"; then 60414f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60424f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60430b661123Smrg else 60444f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60454f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60460b661123Smrg fi 60470b661123Smrg ;; 6048bdcaa8d0Smrg 60490b661123Smrg uts4*) 60500b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60510b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60520b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60530b661123Smrg ;; 6054bdcaa8d0Smrg 60550b661123Smrg *) 60560b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60570b661123Smrg ;; 60580b661123Smrg esac 6059bdcaa8d0Smrg 60604f00d7e1Smrg if test sni = "$host_vendor"; then 60610b661123Smrg case $host in 60620b661123Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 60634f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60640b661123Smrg ;; 60650b661123Smrg esac 60660b661123Smrg fi 60670b661123Smrg fi 60680b661123Smrg]) 60690b661123SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 60704f00d7e1Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6071bdcaa8d0Smrg 60720b661123Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6073bdcaa8d0Smrg 60740b661123Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60750b661123Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60760b661123Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 60770b661123Smrg [The commands to extract the exported symbol list from a shared archive]) 6078bdcaa8d0Smrg 60790b661123Smrg# 60800b661123Smrg# Do we need to explicitly link libc? 60810b661123Smrg# 60820b661123Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 60830b661123Smrgx|xyes) 60840b661123Smrg # Assume -lc should be added 60850b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 608672313efbSmrg 60874f00d7e1Smrg if test yes,yes = "$GCC,$enable_shared"; then 60880b661123Smrg case $_LT_TAGVAR(archive_cmds, $1) in 60890b661123Smrg *'~'*) 60900b661123Smrg # FIXME: we may have to deal with multi-command sequences. 60910b661123Smrg ;; 60920b661123Smrg '$CC '*) 60930b661123Smrg # Test whether the compiler implicitly links with -lc since on some 60940b661123Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 60950b661123Smrg # to ld, don't add -lc before -lgcc. 6096880c7e28Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6097880c7e28Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6098880c7e28Smrg [$RM conftest* 6099880c7e28Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6100880c7e28Smrg 6101880c7e28Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6102880c7e28Smrg soname=conftest 6103880c7e28Smrg lib=conftest 6104880c7e28Smrg libobjs=conftest.$ac_objext 6105880c7e28Smrg deplibs= 6106880c7e28Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6107880c7e28Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6108880c7e28Smrg compiler_flags=-v 6109880c7e28Smrg linker_flags=-v 6110880c7e28Smrg verstring= 6111880c7e28Smrg output_objdir=. 6112880c7e28Smrg libname=conftest 6113880c7e28Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6114880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 6115880c7e28Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6116880c7e28Smrg then 6117880c7e28Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6118880c7e28Smrg else 6119880c7e28Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6120880c7e28Smrg fi 6121880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6122880c7e28Smrg else 6123880c7e28Smrg cat conftest.err 1>&5 6124880c7e28Smrg fi 6125880c7e28Smrg $RM conftest* 6126880c7e28Smrg ]) 6127880c7e28Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61280b661123Smrg ;; 61290b661123Smrg esac 61300b661123Smrg fi 61310b661123Smrg ;; 61320b661123Smrgesac 6133bdcaa8d0Smrg 61340b661123Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61350b661123Smrg [Whether or not to add -lc for building shared libraries]) 61360b661123Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61370b661123Smrg [enable_shared_with_static_runtimes], [0], 61380b661123Smrg [Whether or not to disallow shared libs when runtime libs are static]) 61390b661123Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61400b661123Smrg [Compiler flag to allow reflexive dlopens]) 61410b661123Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61420b661123Smrg [Compiler flag to generate shared objects directly from archives]) 61430b661123Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 61440b661123Smrg [Whether the compiler copes with passing no objects directly]) 61450b661123Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61460b661123Smrg [Create an old-style archive from a shared archive]) 61470b661123Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61480b661123Smrg [Create a temporary old-style archive to link instead of a shared archive]) 61490b661123Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61500b661123Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61510b661123Smrg_LT_TAGDECL([], [module_cmds], [2], 61520b661123Smrg [Commands used to build a loadable module if different from building 61530b661123Smrg a shared archive.]) 61540b661123Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61550b661123Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 61560b661123Smrg [Whether we are building with GNU ld or not]) 61570b661123Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61580b661123Smrg [Flag that allows shared libraries with undefined symbols to be built]) 61590b661123Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 61600b661123Smrg [Flag that enforces no undefined symbols]) 61610b661123Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61620b661123Smrg [Flag to hardcode $libdir into a binary during linking. 61630b661123Smrg This must work even if $libdir does not exist]) 61640b661123Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61650b661123Smrg [Whether we need a single "-rpath" flag with a separated argument]) 61660b661123Smrg_LT_TAGDECL([], [hardcode_direct], [0], 61674f00d7e1Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61680b661123Smrg DIR into the resulting binary]) 61690b661123Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 61704f00d7e1Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61710b661123Smrg DIR into the resulting binary and the resulting library dependency is 61724f00d7e1Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 61730b661123Smrg library is relocated]) 61740b661123Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 61750b661123Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61760b661123Smrg into the resulting binary]) 61770b661123Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 61780b661123Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 61790b661123Smrg into the resulting binary]) 61800b661123Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 61810b661123Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 61820b661123Smrg into the library and all subsequent libraries and executables linked 61830b661123Smrg against it]) 61840b661123Smrg_LT_TAGDECL([], [inherit_rpath], [0], 61850b661123Smrg [Set to yes if linker adds runtime paths of dependent libraries 61860b661123Smrg to runtime path list]) 61870b661123Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 61880b661123Smrg [Whether libtool must link a program against all its dependency libraries]) 61890b661123Smrg_LT_TAGDECL([], [always_export_symbols], [0], 61900b661123Smrg [Set to "yes" if exported symbols are required]) 61910b661123Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 61920b661123Smrg [The commands to list exported symbols]) 61930b661123Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 61940b661123Smrg [Symbols that should not be listed in the preloaded symbols]) 61950b661123Smrg_LT_TAGDECL([], [include_expsyms], [1], 61960b661123Smrg [Symbols that must always be exported]) 61970b661123Smrg_LT_TAGDECL([], [prelink_cmds], [2], 61980b661123Smrg [Commands necessary for linking programs (against libraries) with templates]) 6199880c7e28Smrg_LT_TAGDECL([], [postlink_cmds], [2], 6200880c7e28Smrg [Commands necessary for finishing linking programs]) 62010b661123Smrg_LT_TAGDECL([], [file_list_spec], [1], 62020b661123Smrg [Specify filename containing input files]) 62030b661123Smrgdnl FIXME: Not yet implemented 62040b661123Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62050b661123Smrgdnl [Compiler flag to generate thread safe objects]) 62060b661123Smrg])# _LT_LINKER_SHLIBS 62070b661123Smrg 62080b661123Smrg 62090b661123Smrg# _LT_LANG_C_CONFIG([TAG]) 62100b661123Smrg# ------------------------ 62110b661123Smrg# Ensure that the configuration variables for a C compiler are suitably 62120b661123Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 62134f00d7e1Smrg# the compiler configuration to 'libtool'. 62140b661123Smrgm4_defun([_LT_LANG_C_CONFIG], 62150b661123Smrg[m4_require([_LT_DECL_EGREP])dnl 62164f00d7e1Smrglt_save_CC=$CC 62170b661123SmrgAC_LANG_PUSH(C) 6218bdcaa8d0Smrg 62190b661123Smrg# Source file extension for C test sources. 62200b661123Smrgac_ext=c 6221bdcaa8d0Smrg 62220b661123Smrg# Object file extension for compiled C test sources. 62230b661123Smrgobjext=o 62240b661123Smrg_LT_TAGVAR(objext, $1)=$objext 6225bdcaa8d0Smrg 62260b661123Smrg# Code to be used in simple compile tests 62270b661123Smrglt_simple_compile_test_code="int some_variable = 0;" 6228bdcaa8d0Smrg 62290b661123Smrg# Code to be used in simple link tests 62300b661123Smrglt_simple_link_test_code='int main(){return(0);}' 6231bdcaa8d0Smrg 62320b661123Smrg_LT_TAG_COMPILER 62330b661123Smrg# Save the default compiler, since it gets overwritten when the other 62340b661123Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62350b661123Smrgcompiler_DEFAULT=$CC 6236bdcaa8d0Smrg 62370b661123Smrg# save warnings/boilerplate of simple test code 62380b661123Smrg_LT_COMPILER_BOILERPLATE 62390b661123Smrg_LT_LINKER_BOILERPLATE 6240bdcaa8d0Smrg 62410b661123Smrgif test -n "$compiler"; then 62420b661123Smrg _LT_COMPILER_NO_RTTI($1) 62430b661123Smrg _LT_COMPILER_PIC($1) 62440b661123Smrg _LT_COMPILER_C_O($1) 62450b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 62460b661123Smrg _LT_LINKER_SHLIBS($1) 62470b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 62480b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 62490b661123Smrg LT_SYS_DLOPEN_SELF 62500b661123Smrg _LT_CMD_STRIPLIB 62510b661123Smrg 62524f00d7e1Smrg # Report what library types will actually be built 62530b661123Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62540b661123Smrg AC_MSG_RESULT([$can_build_shared]) 62550b661123Smrg 62560b661123Smrg AC_MSG_CHECKING([whether to build shared libraries]) 62574f00d7e1Smrg test no = "$can_build_shared" && enable_shared=no 62580b661123Smrg 62590b661123Smrg # On AIX, shared libraries and static libraries use the same namespace, and 62600b661123Smrg # are all built from PIC. 62610b661123Smrg case $host_os in 62620b661123Smrg aix3*) 62634f00d7e1Smrg test yes = "$enable_shared" && enable_static=no 62640b661123Smrg if test -n "$RANLIB"; then 62650b661123Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 62660b661123Smrg postinstall_cmds='$RANLIB $lib' 62670b661123Smrg fi 62680b661123Smrg ;; 6269bdcaa8d0Smrg 62700b661123Smrg aix[[4-9]]*) 62714f00d7e1Smrg if test ia64 != "$host_cpu"; then 62724f00d7e1Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 62734f00d7e1Smrg yes,aix,yes) ;; # shared object as lib.so file only 62744f00d7e1Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 62754f00d7e1Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 62764f00d7e1Smrg esac 62770b661123Smrg fi 62780b661123Smrg ;; 62790b661123Smrg esac 62800b661123Smrg AC_MSG_RESULT([$enable_shared]) 6281bdcaa8d0Smrg 62820b661123Smrg AC_MSG_CHECKING([whether to build static libraries]) 62830b661123Smrg # Make sure either enable_shared or enable_static is yes. 62844f00d7e1Smrg test yes = "$enable_shared" || enable_static=yes 62850b661123Smrg AC_MSG_RESULT([$enable_static]) 6286bdcaa8d0Smrg 62870b661123Smrg _LT_CONFIG($1) 62880b661123Smrgfi 62890b661123SmrgAC_LANG_POP 62904f00d7e1SmrgCC=$lt_save_CC 62910b661123Smrg])# _LT_LANG_C_CONFIG 6292bdcaa8d0Smrg 629372313efbSmrg 62940b661123Smrg# _LT_LANG_CXX_CONFIG([TAG]) 62950b661123Smrg# -------------------------- 62960b661123Smrg# Ensure that the configuration variables for a C++ compiler are suitably 62970b661123Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 62984f00d7e1Smrg# the compiler configuration to 'libtool'. 62990b661123Smrgm4_defun([_LT_LANG_CXX_CONFIG], 6300880c7e28Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63010b661123Smrgm4_require([_LT_DECL_EGREP])dnl 6302880c7e28Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 63034f00d7e1Smrgif test -n "$CXX" && ( test no != "$CXX" && 63044f00d7e1Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 63054f00d7e1Smrg (test g++ != "$CXX"))); then 6306880c7e28Smrg AC_PROG_CXXCPP 6307880c7e28Smrgelse 6308880c7e28Smrg _lt_caught_CXX_error=yes 6309880c7e28Smrgfi 63100b661123Smrg 63110b661123SmrgAC_LANG_PUSH(C++) 63120b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63130b661123Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 63140b661123Smrg_LT_TAGVAR(always_export_symbols, $1)=no 63150b661123Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63160b661123Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 63170b661123Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63180b661123Smrg_LT_TAGVAR(hardcode_direct, $1)=no 63190b661123Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63200b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63210b661123Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 63220b661123Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63230b661123Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63240b661123Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 63250b661123Smrg_LT_TAGVAR(inherit_rpath, $1)=no 63260b661123Smrg_LT_TAGVAR(module_cmds, $1)= 63270b661123Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 63280b661123Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 63290b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6330880c7e28Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6331880c7e28Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63320b661123Smrg_LT_TAGVAR(no_undefined_flag, $1)= 63330b661123Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 63340b661123Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 633572313efbSmrg 63360b661123Smrg# Source file extension for C++ test sources. 63370b661123Smrgac_ext=cpp 6338bdcaa8d0Smrg 63390b661123Smrg# Object file extension for compiled C++ test sources. 63400b661123Smrgobjext=o 63410b661123Smrg_LT_TAGVAR(objext, $1)=$objext 63420b661123Smrg 63430b661123Smrg# No sense in running all these tests if we already determined that 63440b661123Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 63450b661123Smrg# are currently assumed to apply to all compilers on this platform, 63460b661123Smrg# and will be corrupted by setting them based on a non-working compiler. 63474f00d7e1Smrgif test yes != "$_lt_caught_CXX_error"; then 63480b661123Smrg # Code to be used in simple compile tests 63490b661123Smrg lt_simple_compile_test_code="int some_variable = 0;" 63500b661123Smrg 63510b661123Smrg # Code to be used in simple link tests 63520b661123Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63530b661123Smrg 63540b661123Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63550b661123Smrg _LT_TAG_COMPILER 63560b661123Smrg 63570b661123Smrg # save warnings/boilerplate of simple test code 63580b661123Smrg _LT_COMPILER_BOILERPLATE 63590b661123Smrg _LT_LINKER_BOILERPLATE 63600b661123Smrg 63610b661123Smrg # Allow CC to be a program name with arguments. 63620b661123Smrg lt_save_CC=$CC 6363880c7e28Smrg lt_save_CFLAGS=$CFLAGS 63640b661123Smrg lt_save_LD=$LD 63650b661123Smrg lt_save_GCC=$GCC 63660b661123Smrg GCC=$GXX 63670b661123Smrg lt_save_with_gnu_ld=$with_gnu_ld 63680b661123Smrg lt_save_path_LD=$lt_cv_path_LD 63690b661123Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63700b661123Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63710b661123Smrg else 63720b661123Smrg $as_unset lt_cv_prog_gnu_ld 63730b661123Smrg fi 63740b661123Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 63750b661123Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 63760b661123Smrg else 63770b661123Smrg $as_unset lt_cv_path_LD 63780b661123Smrg fi 63790b661123Smrg test -z "${LDCXX+set}" || LD=$LDCXX 63800b661123Smrg CC=${CXX-"c++"} 6381880c7e28Smrg CFLAGS=$CXXFLAGS 63820b661123Smrg compiler=$CC 63830b661123Smrg _LT_TAGVAR(compiler, $1)=$CC 63840b661123Smrg _LT_CC_BASENAME([$compiler]) 6385bdcaa8d0Smrg 63860b661123Smrg if test -n "$compiler"; then 63870b661123Smrg # We don't want -fno-exception when compiling C++ code, so set the 63880b661123Smrg # no_builtin_flag separately 63894f00d7e1Smrg if test yes = "$GXX"; then 63900b661123Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 63910b661123Smrg else 63920b661123Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 63930b661123Smrg fi 6394bdcaa8d0Smrg 63954f00d7e1Smrg if test yes = "$GXX"; then 63960b661123Smrg # Set up default GNU C++ configuration 6397bdcaa8d0Smrg 63980b661123Smrg LT_PATH_LD 639972313efbSmrg 64000b661123Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64010b661123Smrg # archiving commands below assume that GNU ld is being used. 64024f00d7e1Smrg if test yes = "$with_gnu_ld"; then 64034f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 64044f00d7e1Smrg _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' 640572313efbSmrg 64064f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 64074f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 640872313efbSmrg 64090b661123Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 64100b661123Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64110b661123Smrg # investigate it a little bit more. (MM) 64124f00d7e1Smrg wlarc='$wl' 641372313efbSmrg 64140b661123Smrg # ancient GNU ld didn't support --whole-archive et. al. 64150b661123Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64160b661123Smrg $GREP 'no-whole-archive' > /dev/null; then 64174f00d7e1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64180b661123Smrg else 64190b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64200b661123Smrg fi 64210b661123Smrg else 64220b661123Smrg with_gnu_ld=no 64230b661123Smrg wlarc= 64240b661123Smrg 64250b661123Smrg # A generic and very simple default shared library creation 64260b661123Smrg # command for GNU C++ for the case where it uses the native 64270b661123Smrg # linker, instead of GNU ld. If possible, this setting should 64280b661123Smrg # overridden to take advantage of the native linker features on 64290b661123Smrg # the platform it is being used on. 64300b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64310b661123Smrg fi 643272313efbSmrg 64330b661123Smrg # Commands to make compiler produce verbose output that lists 64340b661123Smrg # what "hidden" libraries, object files and flags are used when 64350b661123Smrg # linking a shared library. 6436880c7e28Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 643772313efbSmrg 64380b661123Smrg else 64390b661123Smrg GXX=no 64400b661123Smrg with_gnu_ld=no 64410b661123Smrg wlarc= 64420b661123Smrg fi 644372313efbSmrg 64440b661123Smrg # PORTME: fill in a description of your system's C++ link characteristics 64450b661123Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64460b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 64470b661123Smrg case $host_os in 64480b661123Smrg aix3*) 64490b661123Smrg # FIXME: insert proper C++ library support 64500b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 64510b661123Smrg ;; 64520b661123Smrg aix[[4-9]]*) 64534f00d7e1Smrg if test ia64 = "$host_cpu"; then 64540b661123Smrg # On IA64, the linker does run time linking by default, so we don't 64550b661123Smrg # have to do anything special. 64560b661123Smrg aix_use_runtimelinking=no 64570b661123Smrg exp_sym_flag='-Bexport' 64584f00d7e1Smrg no_entry_flag= 64590b661123Smrg else 64600b661123Smrg aix_use_runtimelinking=no 64610b661123Smrg 64620b661123Smrg # Test if we are trying to use run time linking or normal 64630b661123Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 64644f00d7e1Smrg # have runtime linking enabled, and use it for executables. 64654f00d7e1Smrg # For shared libraries, we enable/disable runtime linking 64664f00d7e1Smrg # depending on the kind of the shared library created - 64674f00d7e1Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 64684f00d7e1Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 64694f00d7e1Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 64704f00d7e1Smrg # lib.a static archive 64714f00d7e1Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 64724f00d7e1Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 64734f00d7e1Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 64744f00d7e1Smrg # lib.a(lib.so.V) shared, rtl:no 64754f00d7e1Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 64764f00d7e1Smrg # lib.a static archive 64770b661123Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 64780b661123Smrg for ld_flag in $LDFLAGS; do 64790b661123Smrg case $ld_flag in 64800b661123Smrg *-brtl*) 64810b661123Smrg aix_use_runtimelinking=yes 64820b661123Smrg break 64830b661123Smrg ;; 64840b661123Smrg esac 64850b661123Smrg done 64864f00d7e1Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 64874f00d7e1Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 64884f00d7e1Smrg # so we don't have lib.a shared libs to link our executables. 64894f00d7e1Smrg # We have to force runtime linking in this case. 64904f00d7e1Smrg aix_use_runtimelinking=yes 64914f00d7e1Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 64924f00d7e1Smrg fi 64930b661123Smrg ;; 64940b661123Smrg esac 649572313efbSmrg 64960b661123Smrg exp_sym_flag='-bexport' 64970b661123Smrg no_entry_flag='-bnoentry' 64980b661123Smrg fi 649972313efbSmrg 65000b661123Smrg # When large executables or shared objects are built, AIX ld can 65010b661123Smrg # have problems creating the table of contents. If linking a library 65020b661123Smrg # or program results in "error TOC overflow" add -mminimal-toc to 65030b661123Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65040b661123Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65050b661123Smrg 65060b661123Smrg _LT_TAGVAR(archive_cmds, $1)='' 65070b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65080b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65090b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65100b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 65114f00d7e1Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 65124f00d7e1Smrg case $with_aix_soname,$aix_use_runtimelinking in 65134f00d7e1Smrg aix,*) ;; # no import file 65144f00d7e1Smrg svr4,* | *,yes) # use import file 65154f00d7e1Smrg # The Import File defines what to hardcode. 65164f00d7e1Smrg _LT_TAGVAR(hardcode_direct, $1)=no 65174f00d7e1Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 65184f00d7e1Smrg ;; 65194f00d7e1Smrg esac 65200b661123Smrg 65214f00d7e1Smrg if test yes = "$GXX"; then 65220b661123Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65230b661123Smrg # We only want to do this on AIX 4.2 and lower, the check 65240b661123Smrg # below for broken collect2 doesn't work under 4.3+ 65254f00d7e1Smrg collect2name=`$CC -print-prog-name=collect2` 65260b661123Smrg if test -f "$collect2name" && 65270b661123Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65280b661123Smrg then 65290b661123Smrg # We have reworked collect2 65300b661123Smrg : 65310b661123Smrg else 65320b661123Smrg # We have old collect2 65330b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65340b661123Smrg # It fails to find uninstalled libraries when the uninstalled 65350b661123Smrg # path is not listed in the libpath. Setting hardcode_minus_L 65360b661123Smrg # to unsupported forces relinking 65370b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65380b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65390b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65400b661123Smrg fi 65410b661123Smrg esac 65420b661123Smrg shared_flag='-shared' 65434f00d7e1Smrg if test yes = "$aix_use_runtimelinking"; then 65444f00d7e1Smrg shared_flag=$shared_flag' $wl-G' 65450b661123Smrg fi 65464f00d7e1Smrg # Need to ensure runtime linking is disabled for the traditional 65474f00d7e1Smrg # shared library, or the linker may eventually find shared libraries 65484f00d7e1Smrg # /with/ Import File - we do not want to mix them. 65494f00d7e1Smrg shared_flag_aix='-shared' 65504f00d7e1Smrg shared_flag_svr4='-shared $wl-G' 65510b661123Smrg else 65520b661123Smrg # not using gcc 65534f00d7e1Smrg if test ia64 = "$host_cpu"; then 65540b661123Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65550b661123Smrg # chokes on -Wl,-G. The following line is correct: 65560b661123Smrg shared_flag='-G' 65570b661123Smrg else 65584f00d7e1Smrg if test yes = "$aix_use_runtimelinking"; then 65594f00d7e1Smrg shared_flag='$wl-G' 65600b661123Smrg else 65614f00d7e1Smrg shared_flag='$wl-bM:SRE' 65620b661123Smrg fi 65634f00d7e1Smrg shared_flag_aix='$wl-bM:SRE' 65644f00d7e1Smrg shared_flag_svr4='$wl-G' 65650b661123Smrg fi 65660b661123Smrg fi 656772313efbSmrg 65684f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65690b661123Smrg # It seems that -bexpall does not export symbols beginning with 65700b661123Smrg # underscore (_), so it is better to generate a list of symbols to 65710b661123Smrg # export. 65720b661123Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 65734f00d7e1Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 65740b661123Smrg # Warning - without using the other runtime loading flags (-brtl), 65750b661123Smrg # -berok will link without error, but may produce a broken library. 65764f00d7e1Smrg # The "-G" linker flag allows undefined symbols. 65774f00d7e1Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 65780b661123Smrg # Determine the default libpath from the value encoded in an empty 65790b661123Smrg # executable. 6580880c7e28Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 65814f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65820b661123Smrg 65834f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag 65840b661123Smrg else 65854f00d7e1Smrg if test ia64 = "$host_cpu"; then 65864f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 65870b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 65884f00d7e1Smrg _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" 65890b661123Smrg else 65900b661123Smrg # Determine the default libpath from the value encoded in an 65910b661123Smrg # empty executable. 6592880c7e28Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 65934f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65940b661123Smrg # Warning - without using the other run time loading flags, 65950b661123Smrg # -berok will link without error, but may produce a broken library. 65964f00d7e1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 65974f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 65984f00d7e1Smrg if test yes = "$with_gnu_ld"; then 6599880c7e28Smrg # We only use this code for GNU lds that support --whole-archive. 66004f00d7e1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6601880c7e28Smrg else 6602880c7e28Smrg # Exported symbols can be pulled into shared objects from archives 6603880c7e28Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6604880c7e28Smrg fi 66050b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 66064f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 66074f00d7e1Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 66084f00d7e1Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 66094f00d7e1Smrg if test svr4 != "$with_aix_soname"; then 66104f00d7e1Smrg # This is similar to how AIX traditionally builds its shared 66114f00d7e1Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 66124f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' 66134f00d7e1Smrg fi 66144f00d7e1Smrg if test aix != "$with_aix_soname"; then 66154f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' 66164f00d7e1Smrg else 66174f00d7e1Smrg # used by -dlpreopen to get the symbols 66184f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 66194f00d7e1Smrg fi 66204f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66210b661123Smrg fi 66220b661123Smrg fi 66230b661123Smrg ;; 662472313efbSmrg 66250b661123Smrg beos*) 66260b661123Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66270b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66280b661123Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66290b661123Smrg # support --undefined. This deserves some investigation. FIXME 66304f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66310b661123Smrg else 66320b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66330b661123Smrg fi 66340b661123Smrg ;; 663572313efbSmrg 66360b661123Smrg chorus*) 66370b661123Smrg case $cc_basename in 66380b661123Smrg *) 66390b661123Smrg # FIXME: insert proper C++ library support 66400b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66410b661123Smrg ;; 66420b661123Smrg esac 66430b661123Smrg ;; 664472313efbSmrg 66450b661123Smrg cygwin* | mingw* | pw32* | cegcc*) 6646880c7e28Smrg case $GXX,$cc_basename in 6647880c7e28Smrg ,cl* | no,cl*) 6648880c7e28Smrg # Native MSVC 6649880c7e28Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6650880c7e28Smrg # no search path for DLLs. 6651880c7e28Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6652880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6653880c7e28Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6654880c7e28Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6655880c7e28Smrg # Tell ltmain to make .lib files, not .a files. 6656880c7e28Smrg libext=lib 6657880c7e28Smrg # Tell ltmain to make .dll files, not .so files. 66584f00d7e1Smrg shrext_cmds=.dll 6659880c7e28Smrg # FIXME: Setting linknames here is a bad hack. 66604f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 66614f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 66624f00d7e1Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 66634f00d7e1Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 66644f00d7e1Smrg else 66654f00d7e1Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 66664f00d7e1Smrg fi~ 66674f00d7e1Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 66684f00d7e1Smrg linknames=' 6669880c7e28Smrg # The linker will not automatically build a static lib if we build a DLL. 6670880c7e28Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6671880c7e28Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6672880c7e28Smrg # Don't use ranlib 6673880c7e28Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6674880c7e28Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 66754f00d7e1Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 66764f00d7e1Smrg case $lt_outputfile in 66774f00d7e1Smrg *.exe|*.EXE) ;; 66784f00d7e1Smrg *) 66794f00d7e1Smrg lt_outputfile=$lt_outputfile.exe 66804f00d7e1Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 66814f00d7e1Smrg ;; 66824f00d7e1Smrg esac~ 66834f00d7e1Smrg func_to_tool_file "$lt_outputfile"~ 66844f00d7e1Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 66854f00d7e1Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 66864f00d7e1Smrg $RM "$lt_outputfile.manifest"; 66874f00d7e1Smrg fi' 6688880c7e28Smrg ;; 6689880c7e28Smrg *) 6690880c7e28Smrg # g++ 6691880c7e28Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6692880c7e28Smrg # as there is no search path for DLLs. 6693880c7e28Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 66944f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6695880c7e28Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6696880c7e28Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6697880c7e28Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6698880c7e28Smrg 6699880c7e28Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 67004f00d7e1Smrg _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' 67014f00d7e1Smrg # If the export-symbols file already is a .def file, use it as 67024f00d7e1Smrg # is; otherwise, prepend EXPORTS... 67034f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 67044f00d7e1Smrg cp $export_symbols $output_objdir/$soname.def; 67054f00d7e1Smrg else 67064f00d7e1Smrg echo EXPORTS > $output_objdir/$soname.def; 67074f00d7e1Smrg cat $export_symbols >> $output_objdir/$soname.def; 67084f00d7e1Smrg fi~ 67094f00d7e1Smrg $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' 6710880c7e28Smrg else 6711880c7e28Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6712880c7e28Smrg fi 6713880c7e28Smrg ;; 6714880c7e28Smrg esac 6715880c7e28Smrg ;; 67160b661123Smrg darwin* | rhapsody*) 67170b661123Smrg _LT_DARWIN_LINKER_FEATURES($1) 67180b661123Smrg ;; 671972313efbSmrg 67204f00d7e1Smrg os2*) 67214f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 67224f00d7e1Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 67234f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 67244f00d7e1Smrg shrext_cmds=.dll 67254f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67264f00d7e1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67274f00d7e1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67284f00d7e1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67294f00d7e1Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 67304f00d7e1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67314f00d7e1Smrg emximp -o $lib $output_objdir/$libname.def' 67324f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 67334f00d7e1Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 67344f00d7e1Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 67354f00d7e1Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 67364f00d7e1Smrg prefix_cmds="$SED"~ 67374f00d7e1Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 67384f00d7e1Smrg prefix_cmds="$prefix_cmds -e 1d"; 67394f00d7e1Smrg fi~ 67404f00d7e1Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 67414f00d7e1Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 67424f00d7e1Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 67434f00d7e1Smrg emximp -o $lib $output_objdir/$libname.def' 67444f00d7e1Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 67454f00d7e1Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 67464f00d7e1Smrg ;; 67474f00d7e1Smrg 67480b661123Smrg dgux*) 67490b661123Smrg case $cc_basename in 67500b661123Smrg ec++*) 67510b661123Smrg # FIXME: insert proper C++ library support 67520b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67530b661123Smrg ;; 67540b661123Smrg ghcx*) 67550b661123Smrg # Green Hills C++ Compiler 67560b661123Smrg # FIXME: insert proper C++ library support 67570b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67580b661123Smrg ;; 67590b661123Smrg *) 67600b661123Smrg # FIXME: insert proper C++ library support 67610b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67620b661123Smrg ;; 67630b661123Smrg esac 67640b661123Smrg ;; 676572313efbSmrg 6766880c7e28Smrg freebsd2.*) 67670b661123Smrg # C++ shared libraries reported to be fairly broken before 67680b661123Smrg # switch to ELF 67690b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67700b661123Smrg ;; 677172313efbSmrg 67720b661123Smrg freebsd-elf*) 67730b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67740b661123Smrg ;; 677572313efbSmrg 67760b661123Smrg freebsd* | dragonfly*) 67770b661123Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 67780b661123Smrg # conventions 67790b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 67800b661123Smrg ;; 678172313efbSmrg 6782880c7e28Smrg haiku*) 67834f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6784880c7e28Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6785880c7e28Smrg ;; 6786880c7e28Smrg 67870b661123Smrg hpux9*) 67884f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 67890b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 67904f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 67910b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 67920b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 67930b661123Smrg # but as the default 67940b661123Smrg # location of the library. 67950b661123Smrg 67960b661123Smrg case $cc_basename in 67970b661123Smrg CC*) 67980b661123Smrg # FIXME: insert proper C++ library support 67990b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68000b661123Smrg ;; 68010b661123Smrg aCC*) 68024f00d7e1Smrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 68030b661123Smrg # Commands to make compiler produce verbose output that lists 68040b661123Smrg # what "hidden" libraries, object files and flags are used when 68050b661123Smrg # linking a shared library. 68060b661123Smrg # 68070b661123Smrg # There doesn't appear to be a way to prevent this compiler from 68080b661123Smrg # explicitly linking system object files so we need to strip them 68090b661123Smrg # from the output so that they don't get included in the library 68100b661123Smrg # dependencies. 68114f00d7e1Smrg 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"' 68120b661123Smrg ;; 68130b661123Smrg *) 68144f00d7e1Smrg if test yes = "$GXX"; then 68154f00d7e1Smrg _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 "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' 68160b661123Smrg else 68170b661123Smrg # FIXME: insert proper C++ library support 68180b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68190b661123Smrg fi 68200b661123Smrg ;; 68210b661123Smrg esac 68220b661123Smrg ;; 682372313efbSmrg 68240b661123Smrg hpux10*|hpux11*) 68254f00d7e1Smrg if test no = "$with_gnu_ld"; then 68264f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68270b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68280b661123Smrg 68290b661123Smrg case $host_cpu in 68300b661123Smrg hppa*64*|ia64*) 68310b661123Smrg ;; 68320b661123Smrg *) 68334f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68340b661123Smrg ;; 68350b661123Smrg esac 68360b661123Smrg fi 68370b661123Smrg case $host_cpu in 68380b661123Smrg hppa*64*|ia64*) 68390b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 68400b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68410b661123Smrg ;; 68420b661123Smrg *) 68430b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68440b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68450b661123Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68460b661123Smrg # but as the default 68470b661123Smrg # location of the library. 68480b661123Smrg ;; 68490b661123Smrg esac 68500b661123Smrg 68510b661123Smrg case $cc_basename in 68520b661123Smrg CC*) 68530b661123Smrg # FIXME: insert proper C++ library support 68540b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68550b661123Smrg ;; 68560b661123Smrg aCC*) 68570b661123Smrg case $host_cpu in 68580b661123Smrg hppa*64*) 68594f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68600b661123Smrg ;; 68610b661123Smrg ia64*) 68624f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68630b661123Smrg ;; 68640b661123Smrg *) 68654f00d7e1Smrg _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' 68660b661123Smrg ;; 68670b661123Smrg esac 68680b661123Smrg # Commands to make compiler produce verbose output that lists 68690b661123Smrg # what "hidden" libraries, object files and flags are used when 68700b661123Smrg # linking a shared library. 68710b661123Smrg # 68720b661123Smrg # There doesn't appear to be a way to prevent this compiler from 68730b661123Smrg # explicitly linking system object files so we need to strip them 68740b661123Smrg # from the output so that they don't get included in the library 68750b661123Smrg # dependencies. 68764f00d7e1Smrg 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"' 68770b661123Smrg ;; 68780b661123Smrg *) 68794f00d7e1Smrg if test yes = "$GXX"; then 68804f00d7e1Smrg if test no = "$with_gnu_ld"; then 68810b661123Smrg case $host_cpu in 68820b661123Smrg hppa*64*) 68834f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68840b661123Smrg ;; 68850b661123Smrg ia64*) 68864f00d7e1Smrg _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' 68870b661123Smrg ;; 68880b661123Smrg *) 68894f00d7e1Smrg _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' 68900b661123Smrg ;; 68910b661123Smrg esac 68920b661123Smrg fi 68930b661123Smrg else 68940b661123Smrg # FIXME: insert proper C++ library support 68950b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68960b661123Smrg fi 68970b661123Smrg ;; 68980b661123Smrg esac 68990b661123Smrg ;; 690072313efbSmrg 69010b661123Smrg interix[[3-9]]*) 69020b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=no 69030b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 69044f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69054f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69060b661123Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69070b661123Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69080b661123Smrg # default) and relocated if they conflict, which is a slow very memory 69090b661123Smrg # consuming and fragmenting process. To avoid this, we pick a random, 69100b661123Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69110b661123Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 69124f00d7e1Smrg _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' 69134f00d7e1Smrg _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' 69140b661123Smrg ;; 69150b661123Smrg irix5* | irix6*) 69160b661123Smrg case $cc_basename in 69170b661123Smrg CC*) 69180b661123Smrg # SGI C++ 69194f00d7e1Smrg _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' 69200b661123Smrg 69210b661123Smrg # Archives containing C++ object files must be created using 69220b661123Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69230b661123Smrg # necessary to make sure instantiated templates are included 69240b661123Smrg # in the archive. 69250b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69260b661123Smrg ;; 69270b661123Smrg *) 69284f00d7e1Smrg if test yes = "$GXX"; then 69294f00d7e1Smrg if test no = "$with_gnu_ld"; then 69304f00d7e1Smrg _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' 69310b661123Smrg else 69324f00d7e1Smrg _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' 69330b661123Smrg fi 69340b661123Smrg fi 69350b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69360b661123Smrg ;; 69370b661123Smrg esac 69384f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69390b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69400b661123Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 69410b661123Smrg ;; 694272313efbSmrg 69434f00d7e1Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69440b661123Smrg case $cc_basename in 69450b661123Smrg KCC*) 69460b661123Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 69470b661123Smrg 69480b661123Smrg # KCC will only create a shared library if the output file 69490b661123Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69500b661123Smrg # to its proper name (with version) after linking. 69514f00d7e1Smrg _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' 69524f00d7e1Smrg _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' 69530b661123Smrg # Commands to make compiler produce verbose output that lists 69540b661123Smrg # what "hidden" libraries, object files and flags are used when 69550b661123Smrg # linking a shared library. 69560b661123Smrg # 69570b661123Smrg # There doesn't appear to be a way to prevent this compiler from 69580b661123Smrg # explicitly linking system object files so we need to strip them 69590b661123Smrg # from the output so that they don't get included in the library 69600b661123Smrg # dependencies. 69614f00d7e1Smrg 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"' 69620b661123Smrg 69634f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69644f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 69650b661123Smrg 69660b661123Smrg # Archives containing C++ object files must be created using 69670b661123Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69680b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69690b661123Smrg ;; 69700b661123Smrg icpc* | ecpc* ) 69710b661123Smrg # Intel C++ 69720b661123Smrg with_gnu_ld=yes 69730b661123Smrg # version 8.0 and above of icpc choke on multiply defined symbols 69740b661123Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 69750b661123Smrg # earlier do not add the objects themselves. 69760b661123Smrg case `$CC -V 2>&1` in 69770b661123Smrg *"Version 7."*) 69784f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 69794f00d7e1Smrg _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' 69800b661123Smrg ;; 69810b661123Smrg *) # Version 8.0 or newer 69820b661123Smrg tmp_idyn= 69830b661123Smrg case $host_cpu in 69840b661123Smrg ia64*) tmp_idyn=' -i_dynamic';; 69850b661123Smrg esac 69864f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 69874f00d7e1Smrg _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' 69880b661123Smrg ;; 69890b661123Smrg esac 69900b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 69914f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 69924f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 69934f00d7e1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 69940b661123Smrg ;; 69950b661123Smrg pgCC* | pgcpp*) 69960b661123Smrg # Portland Group C++ compiler 69970b661123Smrg case `$CC -V` in 6998880c7e28Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 69990b661123Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 70004f00d7e1Smrg rm -rf $tpldir~ 70014f00d7e1Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 70024f00d7e1Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70030b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 70044f00d7e1Smrg rm -rf $tpldir~ 70054f00d7e1Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 70064f00d7e1Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 70074f00d7e1Smrg $RANLIB $oldlib' 70080b661123Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 70094f00d7e1Smrg rm -rf $tpldir~ 70104f00d7e1Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70114f00d7e1Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70120b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 70134f00d7e1Smrg rm -rf $tpldir~ 70144f00d7e1Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 70154f00d7e1Smrg $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' 70160b661123Smrg ;; 7017880c7e28Smrg *) # Version 6 and above use weak symbols 70184f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70194f00d7e1Smrg _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' 70200b661123Smrg ;; 70210b661123Smrg esac 702272313efbSmrg 70234f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 70244f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70254f00d7e1Smrg _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' 70260b661123Smrg ;; 70270b661123Smrg cxx*) 70280b661123Smrg # Compaq C++ 70294f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70304f00d7e1Smrg _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' 703172313efbSmrg 70320b661123Smrg runpath_var=LD_RUN_PATH 70330b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70340b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 703572313efbSmrg 70360b661123Smrg # Commands to make compiler produce verbose output that lists 70370b661123Smrg # what "hidden" libraries, object files and flags are used when 70380b661123Smrg # linking a shared library. 70390b661123Smrg # 70400b661123Smrg # There doesn't appear to be a way to prevent this compiler from 70410b661123Smrg # explicitly linking system object files so we need to strip them 70420b661123Smrg # from the output so that they don't get included in the library 70430b661123Smrg # dependencies. 70444f00d7e1Smrg 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' 70450b661123Smrg ;; 7046880c7e28Smrg xl* | mpixl* | bgxl*) 70470b661123Smrg # IBM XL 8.0 on PPC, with GNU ld 70484f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 70494f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 70504f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 70514f00d7e1Smrg if test yes = "$supports_anon_versioning"; then 70520b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 70534f00d7e1Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 70544f00d7e1Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 70554f00d7e1Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70560b661123Smrg fi 70570b661123Smrg ;; 70580b661123Smrg *) 70590b661123Smrg case `$CC -V 2>&1 | sed 5q` in 70600b661123Smrg *Sun\ C*) 70610b661123Smrg # Sun C++ 5.9 70620b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 70634f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 70644f00d7e1Smrg _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' 70650b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 70664f00d7e1Smrg _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' 70670b661123Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 70680b661123Smrg 70690b661123Smrg # Not sure whether something based on 70700b661123Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70710b661123Smrg # would be better. 7072880c7e28Smrg output_verbose_link_cmd='func_echo_all' 70730b661123Smrg 70740b661123Smrg # Archives containing C++ object files must be created using 70750b661123Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 70760b661123Smrg # necessary to make sure instantiated templates are included 70770b661123Smrg # in the archive. 70780b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 70790b661123Smrg ;; 70800b661123Smrg esac 70810b661123Smrg ;; 70820b661123Smrg esac 70830b661123Smrg ;; 708472313efbSmrg 70850b661123Smrg lynxos*) 70860b661123Smrg # FIXME: insert proper C++ library support 70870b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70880b661123Smrg ;; 708972313efbSmrg 70900b661123Smrg m88k*) 70910b661123Smrg # FIXME: insert proper C++ library support 70920b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70930b661123Smrg ;; 709472313efbSmrg 70950b661123Smrg mvs*) 70960b661123Smrg case $cc_basename in 70970b661123Smrg cxx*) 70980b661123Smrg # FIXME: insert proper C++ library support 70990b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71000b661123Smrg ;; 71010b661123Smrg *) 71020b661123Smrg # FIXME: insert proper C++ library support 71030b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71040b661123Smrg ;; 71050b661123Smrg esac 71060b661123Smrg ;; 710772313efbSmrg 71080b661123Smrg netbsd*) 71090b661123Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71100b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71110b661123Smrg wlarc= 71120b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71130b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71140b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71150b661123Smrg fi 71160b661123Smrg # Workaround some broken pre-1.5 toolchains 71170b661123Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71180b661123Smrg ;; 711972313efbSmrg 71200b661123Smrg *nto* | *qnx*) 71210b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71220b661123Smrg ;; 712372313efbSmrg 71244f00d7e1Smrg openbsd* | bitrig*) 71250b661123Smrg if test -f /usr/libexec/ld.so; then 71260b661123Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71270b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71280b661123Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71290b661123Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 71304f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71314f00d7e1Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 71324f00d7e1Smrg _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' 71334f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 71344f00d7e1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71350b661123Smrg fi 7136880c7e28Smrg output_verbose_link_cmd=func_echo_all 71370b661123Smrg else 71380b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71390b661123Smrg fi 71400b661123Smrg ;; 714172313efbSmrg 71420b661123Smrg osf3* | osf4* | osf5*) 71430b661123Smrg case $cc_basename in 71440b661123Smrg KCC*) 71450b661123Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71460b661123Smrg 71470b661123Smrg # KCC will only create a shared library if the output file 71480b661123Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71490b661123Smrg # to its proper name (with version) after linking. 71504f00d7e1Smrg _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' 71510b661123Smrg 71524f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71530b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71540b661123Smrg 71550b661123Smrg # Archives containing C++ object files must be created using 71560b661123Smrg # the KAI C++ compiler. 71570b661123Smrg case $host in 71580b661123Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71590b661123Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71600b661123Smrg esac 71610b661123Smrg ;; 71620b661123Smrg RCC*) 71630b661123Smrg # Rational C++ 2.4.1 71640b661123Smrg # FIXME: insert proper C++ library support 71650b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71660b661123Smrg ;; 71670b661123Smrg cxx*) 71680b661123Smrg case $host in 71690b661123Smrg osf3*) 71704f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 71714f00d7e1Smrg _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' 71724f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71730b661123Smrg ;; 71740b661123Smrg *) 71750b661123Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 71764f00d7e1Smrg _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' 71770b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 71784f00d7e1Smrg echo "-hidden">> $lib.exp~ 71794f00d7e1Smrg $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~ 71804f00d7e1Smrg $RM $lib.exp' 71810b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 71820b661123Smrg ;; 71830b661123Smrg esac 718472313efbSmrg 71850b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 718672313efbSmrg 71870b661123Smrg # Commands to make compiler produce verbose output that lists 71880b661123Smrg # what "hidden" libraries, object files and flags are used when 71890b661123Smrg # linking a shared library. 71900b661123Smrg # 71910b661123Smrg # There doesn't appear to be a way to prevent this compiler from 71920b661123Smrg # explicitly linking system object files so we need to strip them 71930b661123Smrg # from the output so that they don't get included in the library 71940b661123Smrg # dependencies. 71954f00d7e1Smrg 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"' 71960b661123Smrg ;; 71970b661123Smrg *) 71984f00d7e1Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 71994f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72000b661123Smrg case $host in 72010b661123Smrg osf3*) 72024f00d7e1Smrg _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' 72030b661123Smrg ;; 72040b661123Smrg *) 72054f00d7e1Smrg _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' 72060b661123Smrg ;; 72070b661123Smrg esac 72080b661123Smrg 72094f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72100b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72110b661123Smrg 72120b661123Smrg # Commands to make compiler produce verbose output that lists 72130b661123Smrg # what "hidden" libraries, object files and flags are used when 72140b661123Smrg # linking a shared library. 7215880c7e28Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72160b661123Smrg 72170b661123Smrg else 72180b661123Smrg # FIXME: insert proper C++ library support 72190b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72200b661123Smrg fi 72210b661123Smrg ;; 72220b661123Smrg esac 72230b661123Smrg ;; 722472313efbSmrg 72250b661123Smrg psos*) 72260b661123Smrg # FIXME: insert proper C++ library support 72270b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72280b661123Smrg ;; 722972313efbSmrg 72300b661123Smrg sunos4*) 72310b661123Smrg case $cc_basename in 72320b661123Smrg CC*) 72330b661123Smrg # Sun C++ 4.x 72340b661123Smrg # FIXME: insert proper C++ library support 72350b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72360b661123Smrg ;; 72370b661123Smrg lcc*) 72380b661123Smrg # Lucid 72390b661123Smrg # FIXME: insert proper C++ library support 72400b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72410b661123Smrg ;; 72420b661123Smrg *) 72430b661123Smrg # FIXME: insert proper C++ library support 72440b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72450b661123Smrg ;; 72460b661123Smrg esac 72470b661123Smrg ;; 724872313efbSmrg 72490b661123Smrg solaris*) 72500b661123Smrg case $cc_basename in 7251880c7e28Smrg CC* | sunCC*) 72520b661123Smrg # Sun C++ 4.2, 5.x and Centerline C++ 72530b661123Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72540b661123Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 72554f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72560b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 72574f00d7e1Smrg $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' 72580b661123Smrg 72590b661123Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72600b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72610b661123Smrg case $host_os in 72620b661123Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72630b661123Smrg *) 72640b661123Smrg # The compiler driver will combine and reorder linker options, 72654f00d7e1Smrg # but understands '-z linker_flag'. 72660b661123Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 72670b661123Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72680b661123Smrg ;; 72690b661123Smrg esac 72700b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 727172313efbSmrg 7272880c7e28Smrg output_verbose_link_cmd='func_echo_all' 727372313efbSmrg 72740b661123Smrg # Archives containing C++ object files must be created using 72750b661123Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 72760b661123Smrg # necessary to make sure instantiated templates are included 72770b661123Smrg # in the archive. 72780b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 72790b661123Smrg ;; 72800b661123Smrg gcx*) 72810b661123Smrg # Green Hills C++ Compiler 72824f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 728372313efbSmrg 72840b661123Smrg # The C++ compiler must be used to create the archive. 72850b661123Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 72860b661123Smrg ;; 72870b661123Smrg *) 72880b661123Smrg # GNU C++ compiler with Solaris linker 72894f00d7e1Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 72904f00d7e1Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 72910b661123Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 72924f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72930b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 72944f00d7e1Smrg $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 72950b661123Smrg 72960b661123Smrg # Commands to make compiler produce verbose output that lists 72970b661123Smrg # what "hidden" libraries, object files and flags are used when 72980b661123Smrg # linking a shared library. 7299880c7e28Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73000b661123Smrg else 73014f00d7e1Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73020b661123Smrg # platform. 73034f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73040b661123Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 73054f00d7e1Smrg $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 73060b661123Smrg 73070b661123Smrg # Commands to make compiler produce verbose output that lists 73080b661123Smrg # what "hidden" libraries, object files and flags are used when 73090b661123Smrg # linking a shared library. 7310880c7e28Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73110b661123Smrg fi 73120b661123Smrg 73134f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73140b661123Smrg case $host_os in 73150b661123Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73160b661123Smrg *) 73174f00d7e1Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73180b661123Smrg ;; 73190b661123Smrg esac 73200b661123Smrg fi 73210b661123Smrg ;; 73220b661123Smrg esac 73230b661123Smrg ;; 732472313efbSmrg 73250b661123Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 73264f00d7e1Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73270b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73280b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73290b661123Smrg runpath_var='LD_RUN_PATH' 733072313efbSmrg 73310b661123Smrg case $cc_basename in 73320b661123Smrg CC*) 73334f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73344f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73350b661123Smrg ;; 73360b661123Smrg *) 73374f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73384f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73390b661123Smrg ;; 73400b661123Smrg esac 73410b661123Smrg ;; 734272313efbSmrg 73430b661123Smrg sysv5* | sco3.2v5* | sco5v6*) 73444f00d7e1Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 73450b661123Smrg # link with -lc, and that would cause any symbols used from libc to 73460b661123Smrg # always be unresolved, which means just about no library would 73470b661123Smrg # ever link correctly. If we're not using GNU ld we use -z text 73480b661123Smrg # though, which does catch some bad symbols but isn't as heavy-handed 73490b661123Smrg # as -z defs. 73504f00d7e1Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73514f00d7e1Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73520b661123Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73530b661123Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73544f00d7e1Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73550b661123Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73560b661123Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 73574f00d7e1Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73580b661123Smrg runpath_var='LD_RUN_PATH' 735972313efbSmrg 73600b661123Smrg case $cc_basename in 73610b661123Smrg CC*) 73624f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73634f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7364880c7e28Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 73654f00d7e1Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7366880c7e28Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 73674f00d7e1Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 73680b661123Smrg ;; 73690b661123Smrg *) 73704f00d7e1Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73714f00d7e1Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73720b661123Smrg ;; 73730b661123Smrg esac 73740b661123Smrg ;; 7375bdcaa8d0Smrg 73760b661123Smrg tandem*) 73770b661123Smrg case $cc_basename in 73780b661123Smrg NCC*) 73790b661123Smrg # NonStop-UX NCC 3.20 73800b661123Smrg # FIXME: insert proper C++ library support 73810b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73820b661123Smrg ;; 73830b661123Smrg *) 73840b661123Smrg # FIXME: insert proper C++ library support 73850b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73860b661123Smrg ;; 73870b661123Smrg esac 73880b661123Smrg ;; 7389bdcaa8d0Smrg 73900b661123Smrg vxworks*) 73910b661123Smrg # FIXME: insert proper C++ library support 73920b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73930b661123Smrg ;; 7394bdcaa8d0Smrg 73950b661123Smrg *) 73960b661123Smrg # FIXME: insert proper C++ library support 73970b661123Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73980b661123Smrg ;; 73990b661123Smrg esac 7400bdcaa8d0Smrg 74010b661123Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 74024f00d7e1Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74030b661123Smrg 74044f00d7e1Smrg _LT_TAGVAR(GCC, $1)=$GXX 74054f00d7e1Smrg _LT_TAGVAR(LD, $1)=$LD 74060b661123Smrg 74070b661123Smrg ## CAVEAT EMPTOR: 74080b661123Smrg ## There is no encapsulation within the following macros, do not change 74090b661123Smrg ## the running order or otherwise move them around unless you know exactly 74100b661123Smrg ## what you are doing... 74110b661123Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74120b661123Smrg _LT_COMPILER_PIC($1) 74130b661123Smrg _LT_COMPILER_C_O($1) 74140b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 74150b661123Smrg _LT_LINKER_SHLIBS($1) 74160b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 74170b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74180b661123Smrg 74190b661123Smrg _LT_CONFIG($1) 74200b661123Smrg fi # test -n "$compiler" 74210b661123Smrg 74220b661123Smrg CC=$lt_save_CC 7423880c7e28Smrg CFLAGS=$lt_save_CFLAGS 74240b661123Smrg LDCXX=$LD 74250b661123Smrg LD=$lt_save_LD 74260b661123Smrg GCC=$lt_save_GCC 74270b661123Smrg with_gnu_ld=$lt_save_with_gnu_ld 74280b661123Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 74290b661123Smrg lt_cv_path_LD=$lt_save_path_LD 74300b661123Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74310b661123Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 74324f00d7e1Smrgfi # test yes != "$_lt_caught_CXX_error" 7433bdcaa8d0Smrg 74340b661123SmrgAC_LANG_POP 74350b661123Smrg])# _LT_LANG_CXX_CONFIG 7436bdcaa8d0Smrg 7437bdcaa8d0Smrg 7438880c7e28Smrg# _LT_FUNC_STRIPNAME_CNF 7439880c7e28Smrg# ---------------------- 7440880c7e28Smrg# func_stripname_cnf prefix suffix name 7441880c7e28Smrg# strip PREFIX and SUFFIX off of NAME. 7442880c7e28Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7443880c7e28Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7444880c7e28Smrg# dot (in which case that matches only a dot). 7445880c7e28Smrg# 7446880c7e28Smrg# This function is identical to the (non-XSI) version of func_stripname, 7447880c7e28Smrg# except this one can be used by m4 code that may be executed by configure, 7448880c7e28Smrg# rather than the libtool script. 7449880c7e28Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7450880c7e28SmrgAC_REQUIRE([_LT_DECL_SED]) 7451880c7e28SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7452880c7e28Smrgfunc_stripname_cnf () 7453880c7e28Smrg{ 74544f00d7e1Smrg case @S|@2 in 74554f00d7e1Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 74564f00d7e1Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7457880c7e28Smrg esac 7458880c7e28Smrg} # func_stripname_cnf 7459880c7e28Smrg])# _LT_FUNC_STRIPNAME_CNF 7460880c7e28Smrg 74614f00d7e1Smrg 74620b661123Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74630b661123Smrg# --------------------------------- 74640b661123Smrg# Figure out "hidden" library dependencies from verbose 74650b661123Smrg# compiler output when linking a shared library. 74660b661123Smrg# Parse the compiler output and extract the necessary 74670b661123Smrg# objects, libraries and library flags. 74680b661123Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74690b661123Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7470880c7e28SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74710b661123Smrg# Dependencies to place before and after the object being linked: 74720b661123Smrg_LT_TAGVAR(predep_objects, $1)= 74730b661123Smrg_LT_TAGVAR(postdep_objects, $1)= 74740b661123Smrg_LT_TAGVAR(predeps, $1)= 74750b661123Smrg_LT_TAGVAR(postdeps, $1)= 74760b661123Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7477bdcaa8d0Smrg 74780b661123Smrgdnl we can't use the lt_simple_compile_test_code here, 74790b661123Smrgdnl because it contains code intended for an executable, 74800b661123Smrgdnl not a library. It's possible we should let each 74810b661123Smrgdnl tag define a new lt_????_link_test_code variable, 74820b661123Smrgdnl but it's only used here... 74830b661123Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 74840b661123Smrgint a; 74850b661123Smrgvoid foo (void) { a = 0; } 74860b661123Smrg_LT_EOF 74870b661123Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 74880b661123Smrgclass Foo 74890b661123Smrg{ 74900b661123Smrgpublic: 74910b661123Smrg Foo (void) { a = 0; } 74920b661123Smrgprivate: 74930b661123Smrg int a; 74940b661123Smrg}; 74950b661123Smrg_LT_EOF 74960b661123Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 74970b661123Smrg subroutine foo 74980b661123Smrg implicit none 74990b661123Smrg integer*4 a 75000b661123Smrg a=0 75010b661123Smrg return 75020b661123Smrg end 75030b661123Smrg_LT_EOF 75040b661123Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75050b661123Smrg subroutine foo 75060b661123Smrg implicit none 75070b661123Smrg integer a 75080b661123Smrg a=0 75090b661123Smrg return 75100b661123Smrg end 75110b661123Smrg_LT_EOF 75120b661123Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75130b661123Smrgpublic class foo { 75140b661123Smrg private int a; 75150b661123Smrg public void bar (void) { 75160b661123Smrg a = 0; 75170b661123Smrg } 75180b661123Smrg}; 75190b661123Smrg_LT_EOF 7520880c7e28Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7521880c7e28Smrgpackage foo 7522880c7e28Smrgfunc foo() { 7523880c7e28Smrg} 7524880c7e28Smrg_LT_EOF 75250b661123Smrg]) 7526880c7e28Smrg 7527880c7e28Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 7528880c7e28Smrgcase "$CC $CFLAGS " in #( 7529880c7e28Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7530880c7e28Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7531880c7e28Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7532880c7e28Smrgesac 7533880c7e28Smrg 75340b661123Smrgdnl Parse the compiler output and extract the necessary 75350b661123Smrgdnl objects, libraries and library flags. 75360b661123Smrgif AC_TRY_EVAL(ac_compile); then 75370b661123Smrg # Parse the compiler output and extract the necessary 75380b661123Smrg # objects, libraries and library flags. 7539bdcaa8d0Smrg 75400b661123Smrg # Sentinel used to keep track of whether or not we are before 75410b661123Smrg # the conftest object file. 75420b661123Smrg pre_test_object_deps_done=no 754372313efbSmrg 75440b661123Smrg for p in `eval "$output_verbose_link_cmd"`; do 75454f00d7e1Smrg case $prev$p in 754672313efbSmrg 75470b661123Smrg -L* | -R* | -l*) 75480b661123Smrg # Some compilers place space between "-{L,R}" and the path. 75490b661123Smrg # Remove the space. 75504f00d7e1Smrg if test x-L = "$p" || 75514f00d7e1Smrg test x-R = "$p"; then 75520b661123Smrg prev=$p 75530b661123Smrg continue 75540b661123Smrg fi 755572313efbSmrg 7556880c7e28Smrg # Expand the sysroot to ease extracting the directories later. 7557880c7e28Smrg if test -z "$prev"; then 7558880c7e28Smrg case $p in 7559880c7e28Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7560880c7e28Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7561880c7e28Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7562880c7e28Smrg esac 7563880c7e28Smrg fi 7564880c7e28Smrg case $p in 7565880c7e28Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7566880c7e28Smrg esac 75674f00d7e1Smrg if test no = "$pre_test_object_deps_done"; then 75684f00d7e1Smrg case $prev in 7569880c7e28Smrg -L | -R) 75700b661123Smrg # Internal compiler library paths should come after those 75710b661123Smrg # provided the user. The postdeps already come after the 75720b661123Smrg # user supplied libs so there is no need to process them. 75730b661123Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 75744f00d7e1Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 75750b661123Smrg else 75764f00d7e1Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 75770b661123Smrg fi 75780b661123Smrg ;; 75790b661123Smrg # The "-l" case would never come before the object being 75800b661123Smrg # linked, so don't bother handling this case. 75810b661123Smrg esac 75820b661123Smrg else 75830b661123Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 75844f00d7e1Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 75850b661123Smrg else 75864f00d7e1Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 75870b661123Smrg fi 75880b661123Smrg fi 7589880c7e28Smrg prev= 75900b661123Smrg ;; 759172313efbSmrg 7592880c7e28Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 75930b661123Smrg *.$objext) 75940b661123Smrg # This assumes that the test object file only shows up 75950b661123Smrg # once in the compiler output. 75960b661123Smrg if test "$p" = "conftest.$objext"; then 75970b661123Smrg pre_test_object_deps_done=yes 75980b661123Smrg continue 75990b661123Smrg fi 760072313efbSmrg 76014f00d7e1Smrg if test no = "$pre_test_object_deps_done"; then 76020b661123Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 76034f00d7e1Smrg _LT_TAGVAR(predep_objects, $1)=$p 76040b661123Smrg else 76050b661123Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76060b661123Smrg fi 76070b661123Smrg else 76080b661123Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 76094f00d7e1Smrg _LT_TAGVAR(postdep_objects, $1)=$p 76100b661123Smrg else 76110b661123Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76120b661123Smrg fi 76130b661123Smrg fi 76140b661123Smrg ;; 761572313efbSmrg 76160b661123Smrg *) ;; # Ignore the rest. 761772313efbSmrg 76180b661123Smrg esac 76190b661123Smrg done 762072313efbSmrg 76210b661123Smrg # Clean up. 76220b661123Smrg rm -f a.out a.exe 76230b661123Smrgelse 76240b661123Smrg echo "libtool.m4: error: problem compiling $1 test program" 762572313efbSmrgfi 762672313efbSmrg 76270b661123Smrg$RM -f confest.$objext 7628880c7e28SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 762972313efbSmrg 76300b661123Smrg# PORTME: override above test on systems where it is broken 76310b661123Smrgm4_if([$1], [CXX], 76320b661123Smrg[case $host_os in 76330b661123Smrginterix[[3-9]]*) 76340b661123Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76350b661123Smrg # hack all around it, let's just trust "g++" to DTRT. 76360b661123Smrg _LT_TAGVAR(predep_objects,$1)= 76370b661123Smrg _LT_TAGVAR(postdep_objects,$1)= 76380b661123Smrg _LT_TAGVAR(postdeps,$1)= 76390b661123Smrg ;; 764096ce994aSmrgesac 76410b661123Smrg]) 764272313efbSmrg 76430b661123Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 76440b661123Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 764596ce994aSmrgesac 76460b661123Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76470b661123Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 76484f00d7e1Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76490b661123Smrgfi 76500b661123Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76510b661123Smrg [The directories searched by this compiler when creating a shared library]) 76520b661123Smrg_LT_TAGDECL([], [predep_objects], [1], 76530b661123Smrg [Dependencies to place before and after the objects being linked to 76540b661123Smrg create a shared library]) 76550b661123Smrg_LT_TAGDECL([], [postdep_objects], [1]) 76560b661123Smrg_LT_TAGDECL([], [predeps], [1]) 76570b661123Smrg_LT_TAGDECL([], [postdeps], [1]) 76580b661123Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76590b661123Smrg [The library search path used internally by the compiler when linking 76600b661123Smrg a shared library]) 76610b661123Smrg])# _LT_SYS_HIDDEN_LIBDEPS 76620b661123Smrg 76630b661123Smrg 76640b661123Smrg# _LT_LANG_F77_CONFIG([TAG]) 76650b661123Smrg# -------------------------- 76660b661123Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 76670b661123Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 76684f00d7e1Smrg# to write the compiler configuration to 'libtool'. 76690b661123Smrgm4_defun([_LT_LANG_F77_CONFIG], 7670880c7e28Smrg[AC_LANG_PUSH(Fortran 77) 76714f00d7e1Smrgif test -z "$F77" || test no = "$F77"; then 7672880c7e28Smrg _lt_disable_F77=yes 7673880c7e28Smrgfi 767472313efbSmrg 76750b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 76760b661123Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 76770b661123Smrg_LT_TAGVAR(always_export_symbols, $1)=no 76780b661123Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 76790b661123Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 76800b661123Smrg_LT_TAGVAR(hardcode_direct, $1)=no 76810b661123Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 76820b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 76830b661123Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 76840b661123Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 76850b661123Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 76860b661123Smrg_LT_TAGVAR(inherit_rpath, $1)=no 76870b661123Smrg_LT_TAGVAR(module_cmds, $1)= 76880b661123Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 76890b661123Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 76900b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7691880c7e28Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7692880c7e28Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 76930b661123Smrg_LT_TAGVAR(no_undefined_flag, $1)= 76940b661123Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 76950b661123Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 769672313efbSmrg 76970b661123Smrg# Source file extension for f77 test sources. 76980b661123Smrgac_ext=f 769972313efbSmrg 77000b661123Smrg# Object file extension for compiled f77 test sources. 77010b661123Smrgobjext=o 77020b661123Smrg_LT_TAGVAR(objext, $1)=$objext 77030b661123Smrg 77040b661123Smrg# No sense in running all these tests if we already determined that 77050b661123Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 77060b661123Smrg# are currently assumed to apply to all compilers on this platform, 77070b661123Smrg# and will be corrupted by setting them based on a non-working compiler. 77084f00d7e1Smrgif test yes != "$_lt_disable_F77"; then 77090b661123Smrg # Code to be used in simple compile tests 77100b661123Smrg lt_simple_compile_test_code="\ 77110b661123Smrg subroutine t 77120b661123Smrg return 77130b661123Smrg end 77140b661123Smrg" 771572313efbSmrg 77160b661123Smrg # Code to be used in simple link tests 77170b661123Smrg lt_simple_link_test_code="\ 77180b661123Smrg program t 77190b661123Smrg end 77200b661123Smrg" 772172313efbSmrg 77220b661123Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77230b661123Smrg _LT_TAG_COMPILER 772472313efbSmrg 77250b661123Smrg # save warnings/boilerplate of simple test code 77260b661123Smrg _LT_COMPILER_BOILERPLATE 77270b661123Smrg _LT_LINKER_BOILERPLATE 772872313efbSmrg 77290b661123Smrg # Allow CC to be a program name with arguments. 77304f00d7e1Smrg lt_save_CC=$CC 77310b661123Smrg lt_save_GCC=$GCC 7732880c7e28Smrg lt_save_CFLAGS=$CFLAGS 77330b661123Smrg CC=${F77-"f77"} 7734880c7e28Smrg CFLAGS=$FFLAGS 77350b661123Smrg compiler=$CC 77360b661123Smrg _LT_TAGVAR(compiler, $1)=$CC 77370b661123Smrg _LT_CC_BASENAME([$compiler]) 77380b661123Smrg GCC=$G77 77390b661123Smrg if test -n "$compiler"; then 77400b661123Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77410b661123Smrg AC_MSG_RESULT([$can_build_shared]) 774272313efbSmrg 77430b661123Smrg AC_MSG_CHECKING([whether to build shared libraries]) 77444f00d7e1Smrg test no = "$can_build_shared" && enable_shared=no 77450b661123Smrg 77460b661123Smrg # On AIX, shared libraries and static libraries use the same namespace, and 77470b661123Smrg # are all built from PIC. 77480b661123Smrg case $host_os in 77490b661123Smrg aix3*) 77504f00d7e1Smrg test yes = "$enable_shared" && enable_static=no 77510b661123Smrg if test -n "$RANLIB"; then 77520b661123Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77530b661123Smrg postinstall_cmds='$RANLIB $lib' 77540b661123Smrg fi 77550b661123Smrg ;; 77560b661123Smrg aix[[4-9]]*) 77574f00d7e1Smrg if test ia64 != "$host_cpu"; then 77584f00d7e1Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 77594f00d7e1Smrg yes,aix,yes) ;; # shared object as lib.so file only 77604f00d7e1Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 77614f00d7e1Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 77624f00d7e1Smrg esac 776372313efbSmrg fi 77640b661123Smrg ;; 77650b661123Smrg esac 77660b661123Smrg AC_MSG_RESULT([$enable_shared]) 77670b661123Smrg 77680b661123Smrg AC_MSG_CHECKING([whether to build static libraries]) 77690b661123Smrg # Make sure either enable_shared or enable_static is yes. 77704f00d7e1Smrg test yes = "$enable_shared" || enable_static=yes 77710b661123Smrg AC_MSG_RESULT([$enable_static]) 77720b661123Smrg 77734f00d7e1Smrg _LT_TAGVAR(GCC, $1)=$G77 77744f00d7e1Smrg _LT_TAGVAR(LD, $1)=$LD 77750b661123Smrg 77760b661123Smrg ## CAVEAT EMPTOR: 77770b661123Smrg ## There is no encapsulation within the following macros, do not change 77780b661123Smrg ## the running order or otherwise move them around unless you know exactly 77790b661123Smrg ## what you are doing... 77800b661123Smrg _LT_COMPILER_PIC($1) 77810b661123Smrg _LT_COMPILER_C_O($1) 77820b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 77830b661123Smrg _LT_LINKER_SHLIBS($1) 77840b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 77850b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 77860b661123Smrg 77870b661123Smrg _LT_CONFIG($1) 77880b661123Smrg fi # test -n "$compiler" 77890b661123Smrg 77900b661123Smrg GCC=$lt_save_GCC 77914f00d7e1Smrg CC=$lt_save_CC 77924f00d7e1Smrg CFLAGS=$lt_save_CFLAGS 77934f00d7e1Smrgfi # test yes != "$_lt_disable_F77" 779472313efbSmrg 77950b661123SmrgAC_LANG_POP 77960b661123Smrg])# _LT_LANG_F77_CONFIG 77970b661123Smrg 77980b661123Smrg 77990b661123Smrg# _LT_LANG_FC_CONFIG([TAG]) 78000b661123Smrg# ------------------------- 78010b661123Smrg# Ensure that the configuration variables for a Fortran compiler are 78020b661123Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 78034f00d7e1Smrg# to write the compiler configuration to 'libtool'. 78040b661123Smrgm4_defun([_LT_LANG_FC_CONFIG], 7805880c7e28Smrg[AC_LANG_PUSH(Fortran) 7806880c7e28Smrg 78074f00d7e1Smrgif test -z "$FC" || test no = "$FC"; then 7808880c7e28Smrg _lt_disable_FC=yes 7809880c7e28Smrgfi 78100b661123Smrg 78110b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78120b661123Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 78130b661123Smrg_LT_TAGVAR(always_export_symbols, $1)=no 78140b661123Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78150b661123Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78160b661123Smrg_LT_TAGVAR(hardcode_direct, $1)=no 78170b661123Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78180b661123Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78190b661123Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78200b661123Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78210b661123Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 78220b661123Smrg_LT_TAGVAR(inherit_rpath, $1)=no 78230b661123Smrg_LT_TAGVAR(module_cmds, $1)= 78240b661123Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 78250b661123Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78260b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7827880c7e28Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7828880c7e28Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78290b661123Smrg_LT_TAGVAR(no_undefined_flag, $1)= 78300b661123Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78310b661123Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78320b661123Smrg 78330b661123Smrg# Source file extension for fc test sources. 78340b661123Smrgac_ext=${ac_fc_srcext-f} 78350b661123Smrg 78360b661123Smrg# Object file extension for compiled fc test sources. 78370b661123Smrgobjext=o 78380b661123Smrg_LT_TAGVAR(objext, $1)=$objext 78390b661123Smrg 78400b661123Smrg# No sense in running all these tests if we already determined that 78410b661123Smrg# the FC compiler isn't working. Some variables (like enable_shared) 78420b661123Smrg# are currently assumed to apply to all compilers on this platform, 78430b661123Smrg# and will be corrupted by setting them based on a non-working compiler. 78444f00d7e1Smrgif test yes != "$_lt_disable_FC"; then 78450b661123Smrg # Code to be used in simple compile tests 78460b661123Smrg lt_simple_compile_test_code="\ 78470b661123Smrg subroutine t 78480b661123Smrg return 78490b661123Smrg end 78500b661123Smrg" 78510b661123Smrg 78520b661123Smrg # Code to be used in simple link tests 78530b661123Smrg lt_simple_link_test_code="\ 78540b661123Smrg program t 78550b661123Smrg end 78560b661123Smrg" 78570b661123Smrg 78580b661123Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78590b661123Smrg _LT_TAG_COMPILER 786072313efbSmrg 78610b661123Smrg # save warnings/boilerplate of simple test code 78620b661123Smrg _LT_COMPILER_BOILERPLATE 78630b661123Smrg _LT_LINKER_BOILERPLATE 78640b661123Smrg 78650b661123Smrg # Allow CC to be a program name with arguments. 78664f00d7e1Smrg lt_save_CC=$CC 78670b661123Smrg lt_save_GCC=$GCC 7868880c7e28Smrg lt_save_CFLAGS=$CFLAGS 78690b661123Smrg CC=${FC-"f95"} 7870880c7e28Smrg CFLAGS=$FCFLAGS 78710b661123Smrg compiler=$CC 78720b661123Smrg GCC=$ac_cv_fc_compiler_gnu 78730b661123Smrg 78740b661123Smrg _LT_TAGVAR(compiler, $1)=$CC 78750b661123Smrg _LT_CC_BASENAME([$compiler]) 78760b661123Smrg 78770b661123Smrg if test -n "$compiler"; then 78780b661123Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 78790b661123Smrg AC_MSG_RESULT([$can_build_shared]) 78800b661123Smrg 78810b661123Smrg AC_MSG_CHECKING([whether to build shared libraries]) 78824f00d7e1Smrg test no = "$can_build_shared" && enable_shared=no 78830b661123Smrg 78840b661123Smrg # On AIX, shared libraries and static libraries use the same namespace, and 78850b661123Smrg # are all built from PIC. 788696ce994aSmrg case $host_os in 78870b661123Smrg aix3*) 78884f00d7e1Smrg test yes = "$enable_shared" && enable_static=no 78890b661123Smrg if test -n "$RANLIB"; then 78900b661123Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 78910b661123Smrg postinstall_cmds='$RANLIB $lib' 78920b661123Smrg fi 78930b661123Smrg ;; 789496ce994aSmrg aix[[4-9]]*) 78954f00d7e1Smrg if test ia64 != "$host_cpu"; then 78964f00d7e1Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 78974f00d7e1Smrg yes,aix,yes) ;; # shared object as lib.so file only 78984f00d7e1Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 78994f00d7e1Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 79004f00d7e1Smrg esac 790196ce994aSmrg fi 79020b661123Smrg ;; 790396ce994aSmrg esac 79040b661123Smrg AC_MSG_RESULT([$enable_shared]) 79050b661123Smrg 79060b661123Smrg AC_MSG_CHECKING([whether to build static libraries]) 79070b661123Smrg # Make sure either enable_shared or enable_static is yes. 79084f00d7e1Smrg test yes = "$enable_shared" || enable_static=yes 79090b661123Smrg AC_MSG_RESULT([$enable_static]) 79100b661123Smrg 79114f00d7e1Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 79124f00d7e1Smrg _LT_TAGVAR(LD, $1)=$LD 79130b661123Smrg 79140b661123Smrg ## CAVEAT EMPTOR: 79150b661123Smrg ## There is no encapsulation within the following macros, do not change 79160b661123Smrg ## the running order or otherwise move them around unless you know exactly 79170b661123Smrg ## what you are doing... 79180b661123Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 79190b661123Smrg _LT_COMPILER_PIC($1) 79200b661123Smrg _LT_COMPILER_C_O($1) 79210b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 79220b661123Smrg _LT_LINKER_SHLIBS($1) 79230b661123Smrg _LT_SYS_DYNAMIC_LINKER($1) 79240b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 79250b661123Smrg 79260b661123Smrg _LT_CONFIG($1) 79270b661123Smrg fi # test -n "$compiler" 79280b661123Smrg 79290b661123Smrg GCC=$lt_save_GCC 7930880c7e28Smrg CC=$lt_save_CC 7931880c7e28Smrg CFLAGS=$lt_save_CFLAGS 79324f00d7e1Smrgfi # test yes != "$_lt_disable_FC" 793372313efbSmrg 79340b661123SmrgAC_LANG_POP 79350b661123Smrg])# _LT_LANG_FC_CONFIG 793672313efbSmrg 793772313efbSmrg 79380b661123Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 79390b661123Smrg# -------------------------- 79400b661123Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79410b661123Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 79424f00d7e1Smrg# to write the compiler configuration to 'libtool'. 79430b661123Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 79440b661123Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79450b661123SmrgAC_LANG_SAVE 794672313efbSmrg 79470b661123Smrg# Source file extension for Java test sources. 79480b661123Smrgac_ext=java 794972313efbSmrg 79500b661123Smrg# Object file extension for compiled Java test sources. 79510b661123Smrgobjext=o 79520b661123Smrg_LT_TAGVAR(objext, $1)=$objext 795372313efbSmrg 79540b661123Smrg# Code to be used in simple compile tests 79550b661123Smrglt_simple_compile_test_code="class foo {}" 795672313efbSmrg 79570b661123Smrg# Code to be used in simple link tests 79580b661123Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 795972313efbSmrg 79600b661123Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79610b661123Smrg_LT_TAG_COMPILER 796272313efbSmrg 79630b661123Smrg# save warnings/boilerplate of simple test code 79640b661123Smrg_LT_COMPILER_BOILERPLATE 79650b661123Smrg_LT_LINKER_BOILERPLATE 7966bdcaa8d0Smrg 79670b661123Smrg# Allow CC to be a program name with arguments. 7968880c7e28Smrglt_save_CC=$CC 7969880c7e28Smrglt_save_CFLAGS=$CFLAGS 79700b661123Smrglt_save_GCC=$GCC 79710b661123SmrgGCC=yes 79720b661123SmrgCC=${GCJ-"gcj"} 7973880c7e28SmrgCFLAGS=$GCJFLAGS 79740b661123Smrgcompiler=$CC 79750b661123Smrg_LT_TAGVAR(compiler, $1)=$CC 79764f00d7e1Smrg_LT_TAGVAR(LD, $1)=$LD 79770b661123Smrg_LT_CC_BASENAME([$compiler]) 7978bdcaa8d0Smrg 79790b661123Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 79800b661123Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7981bdcaa8d0Smrg 79820b661123Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7983880c7e28Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7984880c7e28Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7985bdcaa8d0Smrg 79860b661123Smrgif test -n "$compiler"; then 79870b661123Smrg _LT_COMPILER_NO_RTTI($1) 79880b661123Smrg _LT_COMPILER_PIC($1) 79890b661123Smrg _LT_COMPILER_C_O($1) 79900b661123Smrg _LT_COMPILER_FILE_LOCKS($1) 79910b661123Smrg _LT_LINKER_SHLIBS($1) 79920b661123Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7993bdcaa8d0Smrg 79940b661123Smrg _LT_CONFIG($1) 79950b661123Smrgfi 7996bdcaa8d0Smrg 79970b661123SmrgAC_LANG_RESTORE 7998bdcaa8d0Smrg 79990b661123SmrgGCC=$lt_save_GCC 8000880c7e28SmrgCC=$lt_save_CC 8001880c7e28SmrgCFLAGS=$lt_save_CFLAGS 80020b661123Smrg])# _LT_LANG_GCJ_CONFIG 8003bdcaa8d0Smrg 8004bdcaa8d0Smrg 8005880c7e28Smrg# _LT_LANG_GO_CONFIG([TAG]) 8006880c7e28Smrg# -------------------------- 8007880c7e28Smrg# Ensure that the configuration variables for the GNU Go compiler 80080b661123Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80094f00d7e1Smrg# to write the compiler configuration to 'libtool'. 8010880c7e28Smrgm4_defun([_LT_LANG_GO_CONFIG], 8011880c7e28Smrg[AC_REQUIRE([LT_PROG_GO])dnl 80120b661123SmrgAC_LANG_SAVE 80130b661123Smrg 8014880c7e28Smrg# Source file extension for Go test sources. 8015880c7e28Smrgac_ext=go 80160b661123Smrg 8017880c7e28Smrg# Object file extension for compiled Go test sources. 80180b661123Smrgobjext=o 80190b661123Smrg_LT_TAGVAR(objext, $1)=$objext 80200b661123Smrg 80210b661123Smrg# Code to be used in simple compile tests 8022880c7e28Smrglt_simple_compile_test_code="package main; func main() { }" 80230b661123Smrg 80240b661123Smrg# Code to be used in simple link tests 8025880c7e28Smrglt_simple_link_test_code='package main; func main() { }' 80260b661123Smrg 80270b661123Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 80280b661123Smrg_LT_TAG_COMPILER 80290b661123Smrg 80300b661123Smrg# save warnings/boilerplate of simple test code 80310b661123Smrg_LT_COMPILER_BOILERPLATE 80320b661123Smrg_LT_LINKER_BOILERPLATE 80330b661123Smrg 80340b661123Smrg# Allow CC to be a program name with arguments. 8035880c7e28Smrglt_save_CC=$CC 8036880c7e28Smrglt_save_CFLAGS=$CFLAGS 80370b661123Smrglt_save_GCC=$GCC 8038880c7e28SmrgGCC=yes 8039880c7e28SmrgCC=${GOC-"gccgo"} 8040880c7e28SmrgCFLAGS=$GOFLAGS 80410b661123Smrgcompiler=$CC 80420b661123Smrg_LT_TAGVAR(compiler, $1)=$CC 80434f00d7e1Smrg_LT_TAGVAR(LD, $1)=$LD 80440b661123Smrg_LT_CC_BASENAME([$compiler]) 8045880c7e28Smrg 8046880c7e28Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 8047880c7e28Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8048880c7e28Smrg 8049880c7e28Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8050880c7e28Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8051880c7e28Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 80520b661123Smrg 80530b661123Smrgif test -n "$compiler"; then 8054880c7e28Smrg _LT_COMPILER_NO_RTTI($1) 8055880c7e28Smrg _LT_COMPILER_PIC($1) 8056880c7e28Smrg _LT_COMPILER_C_O($1) 8057880c7e28Smrg _LT_COMPILER_FILE_LOCKS($1) 8058880c7e28Smrg _LT_LINKER_SHLIBS($1) 8059880c7e28Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8060880c7e28Smrg 80610b661123Smrg _LT_CONFIG($1) 80620b661123Smrgfi 80630b661123Smrg 80640b661123SmrgAC_LANG_RESTORE 80650b661123Smrg 8066880c7e28SmrgGCC=$lt_save_GCC 8067880c7e28SmrgCC=$lt_save_CC 8068880c7e28SmrgCFLAGS=$lt_save_CFLAGS 8069880c7e28Smrg])# _LT_LANG_GO_CONFIG 80700b661123Smrg 8071880c7e28Smrg 8072880c7e28Smrg# _LT_LANG_RC_CONFIG([TAG]) 8073880c7e28Smrg# ------------------------- 8074880c7e28Smrg# Ensure that the configuration variables for the Windows resource compiler 8075880c7e28Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 80764f00d7e1Smrg# to write the compiler configuration to 'libtool'. 8077880c7e28Smrgm4_defun([_LT_LANG_RC_CONFIG], 8078880c7e28Smrg[AC_REQUIRE([LT_PROG_RC])dnl 8079880c7e28SmrgAC_LANG_SAVE 8080880c7e28Smrg 8081880c7e28Smrg# Source file extension for RC test sources. 8082880c7e28Smrgac_ext=rc 8083880c7e28Smrg 8084880c7e28Smrg# Object file extension for compiled RC test sources. 8085880c7e28Smrgobjext=o 8086880c7e28Smrg_LT_TAGVAR(objext, $1)=$objext 8087880c7e28Smrg 8088880c7e28Smrg# Code to be used in simple compile tests 8089880c7e28Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8090880c7e28Smrg 8091880c7e28Smrg# Code to be used in simple link tests 80924f00d7e1Smrglt_simple_link_test_code=$lt_simple_compile_test_code 8093880c7e28Smrg 8094880c7e28Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8095880c7e28Smrg_LT_TAG_COMPILER 8096880c7e28Smrg 8097880c7e28Smrg# save warnings/boilerplate of simple test code 8098880c7e28Smrg_LT_COMPILER_BOILERPLATE 8099880c7e28Smrg_LT_LINKER_BOILERPLATE 8100880c7e28Smrg 8101880c7e28Smrg# Allow CC to be a program name with arguments. 81024f00d7e1Smrglt_save_CC=$CC 8103880c7e28Smrglt_save_CFLAGS=$CFLAGS 8104880c7e28Smrglt_save_GCC=$GCC 8105880c7e28SmrgGCC= 8106880c7e28SmrgCC=${RC-"windres"} 8107880c7e28SmrgCFLAGS= 8108880c7e28Smrgcompiler=$CC 8109880c7e28Smrg_LT_TAGVAR(compiler, $1)=$CC 8110880c7e28Smrg_LT_CC_BASENAME([$compiler]) 8111880c7e28Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8112880c7e28Smrg 8113880c7e28Smrgif test -n "$compiler"; then 8114880c7e28Smrg : 8115880c7e28Smrg _LT_CONFIG($1) 8116880c7e28Smrgfi 8117880c7e28Smrg 8118880c7e28SmrgGCC=$lt_save_GCC 8119880c7e28SmrgAC_LANG_RESTORE 8120880c7e28SmrgCC=$lt_save_CC 8121880c7e28SmrgCFLAGS=$lt_save_CFLAGS 8122880c7e28Smrg])# _LT_LANG_RC_CONFIG 8123880c7e28Smrg 8124880c7e28Smrg 8125880c7e28Smrg# LT_PROG_GCJ 8126880c7e28Smrg# ----------- 8127880c7e28SmrgAC_DEFUN([LT_PROG_GCJ], 8128880c7e28Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81290b661123Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81300b661123Smrg [AC_CHECK_TOOL(GCJ, gcj,) 81314f00d7e1Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81320b661123Smrg AC_SUBST(GCJFLAGS)])])[]dnl 81330b661123Smrg]) 81340b661123Smrg 81350b661123Smrg# Old name: 81360b661123SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81370b661123Smrgdnl aclocal-1.4 backwards compatibility: 81380b661123Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81390b661123Smrg 81400b661123Smrg 8141880c7e28Smrg# LT_PROG_GO 8142880c7e28Smrg# ---------- 8143880c7e28SmrgAC_DEFUN([LT_PROG_GO], 8144880c7e28Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8145880c7e28Smrg]) 8146880c7e28Smrg 8147880c7e28Smrg 81480b661123Smrg# LT_PROG_RC 81490b661123Smrg# ---------- 81500b661123SmrgAC_DEFUN([LT_PROG_RC], 81510b661123Smrg[AC_CHECK_TOOL(RC, windres,) 81520b661123Smrg]) 81530b661123Smrg 81540b661123Smrg# Old name: 81550b661123SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81560b661123Smrgdnl aclocal-1.4 backwards compatibility: 81570b661123Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81580b661123Smrg 81590b661123Smrg 81600b661123Smrg# _LT_DECL_EGREP 81610b661123Smrg# -------------- 81620b661123Smrg# If we don't have a new enough Autoconf to choose the best grep 81630b661123Smrg# available, choose the one first in the user's PATH. 81640b661123Smrgm4_defun([_LT_DECL_EGREP], 81650b661123Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 81660b661123SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 81670b661123Smrgtest -z "$GREP" && GREP=grep 81680b661123Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 81690b661123Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 81700b661123Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 81710b661123Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 81720b661123SmrgAC_SUBST([GREP]) 81730b661123Smrg]) 81740b661123Smrg 81750b661123Smrg 81760b661123Smrg# _LT_DECL_OBJDUMP 81770b661123Smrg# -------------- 81780b661123Smrg# If we don't have a new enough Autoconf to choose the best objdump 81790b661123Smrg# available, choose the one first in the user's PATH. 81800b661123Smrgm4_defun([_LT_DECL_OBJDUMP], 81810b661123Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 81820b661123Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 81830b661123Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 81840b661123SmrgAC_SUBST([OBJDUMP]) 81850b661123Smrg]) 81860b661123Smrg 8187880c7e28Smrg# _LT_DECL_DLLTOOL 8188880c7e28Smrg# ---------------- 8189880c7e28Smrg# Ensure DLLTOOL variable is set. 8190880c7e28Smrgm4_defun([_LT_DECL_DLLTOOL], 8191880c7e28Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8192880c7e28Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8193880c7e28Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8194880c7e28SmrgAC_SUBST([DLLTOOL]) 8195880c7e28Smrg]) 81960b661123Smrg 81970b661123Smrg# _LT_DECL_SED 81980b661123Smrg# ------------ 81990b661123Smrg# Check for a fully-functional sed program, that truncates 82000b661123Smrg# as few characters as possible. Prefer GNU sed if found. 82010b661123Smrgm4_defun([_LT_DECL_SED], 82020b661123Smrg[AC_PROG_SED 82030b661123Smrgtest -z "$SED" && SED=sed 82040b661123SmrgXsed="$SED -e 1s/^X//" 82050b661123Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82060b661123Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82070b661123Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82080b661123Smrg])# _LT_DECL_SED 82090b661123Smrg 82100b661123Smrgm4_ifndef([AC_PROG_SED], [ 82110b661123Smrg# NOTE: This macro has been submitted for inclusion into # 82120b661123Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82130b661123Smrg# a released version of Autoconf we should remove this # 82140b661123Smrg# macro and use it instead. # 82150b661123Smrg 82160b661123Smrgm4_defun([AC_PROG_SED], 82170b661123Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82180b661123SmrgAC_CACHE_VAL(lt_cv_path_SED, 82190b661123Smrg[# Loop through the user's path and test for sed and gsed. 82200b661123Smrg# Then use that list of sed's as ones to test for truncation. 82210b661123Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82220b661123Smrgfor as_dir in $PATH 82230b661123Smrgdo 82240b661123Smrg IFS=$as_save_IFS 82250b661123Smrg test -z "$as_dir" && as_dir=. 82260b661123Smrg for lt_ac_prog in sed gsed; do 82270b661123Smrg for ac_exec_ext in '' $ac_executable_extensions; do 82280b661123Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82290b661123Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82300b661123Smrg fi 82310b661123Smrg done 82320b661123Smrg done 82330b661123Smrgdone 82340b661123SmrgIFS=$as_save_IFS 82350b661123Smrglt_ac_max=0 82360b661123Smrglt_ac_count=0 82370b661123Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82380b661123Smrg# along with /bin/sed that truncates output. 82390b661123Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 82404f00d7e1Smrg test ! -f "$lt_ac_sed" && continue 82410b661123Smrg cat /dev/null > conftest.in 82420b661123Smrg lt_ac_count=0 82430b661123Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82440b661123Smrg # Check for GNU sed and select it if it is found. 82450b661123Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82460b661123Smrg lt_cv_path_SED=$lt_ac_sed 82470b661123Smrg break 82480b661123Smrg fi 82490b661123Smrg while true; do 82500b661123Smrg cat conftest.in conftest.in >conftest.tmp 82510b661123Smrg mv conftest.tmp conftest.in 82520b661123Smrg cp conftest.in conftest.nl 82530b661123Smrg echo >>conftest.nl 82540b661123Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 82550b661123Smrg cmp -s conftest.out conftest.nl || break 82560b661123Smrg # 10000 chars as input seems more than enough 82574f00d7e1Smrg test 10 -lt "$lt_ac_count" && break 82580b661123Smrg lt_ac_count=`expr $lt_ac_count + 1` 82594f00d7e1Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 82600b661123Smrg lt_ac_max=$lt_ac_count 82610b661123Smrg lt_cv_path_SED=$lt_ac_sed 82620b661123Smrg fi 82630b661123Smrg done 82640b661123Smrgdone 82650b661123Smrg]) 82660b661123SmrgSED=$lt_cv_path_SED 82670b661123SmrgAC_SUBST([SED]) 82680b661123SmrgAC_MSG_RESULT([$SED]) 82690b661123Smrg])#AC_PROG_SED 82700b661123Smrg])#m4_ifndef 82710b661123Smrg 82720b661123Smrg# Old name: 82730b661123SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 82740b661123Smrgdnl aclocal-1.4 backwards compatibility: 82750b661123Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 82760b661123Smrg 82770b661123Smrg 82780b661123Smrg# _LT_CHECK_SHELL_FEATURES 82790b661123Smrg# ------------------------ 82800b661123Smrg# Find out whether the shell is Bourne or XSI compatible, 82810b661123Smrg# or has some other useful features. 82820b661123Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 82834f00d7e1Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 82840b661123Smrg lt_unset=unset 82850b661123Smrgelse 82860b661123Smrg lt_unset=false 82870b661123Smrgfi 82880b661123Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 82890b661123Smrg 82900b661123Smrg# test EBCDIC or ASCII 82910b661123Smrgcase `echo X|tr X '\101'` in 82920b661123Smrg A) # ASCII based system 82930b661123Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 82940b661123Smrg lt_SP2NL='tr \040 \012' 82950b661123Smrg lt_NL2SP='tr \015\012 \040\040' 82960b661123Smrg ;; 82970b661123Smrg *) # EBCDIC based system 82980b661123Smrg lt_SP2NL='tr \100 \n' 82990b661123Smrg lt_NL2SP='tr \r\n \100\100' 83000b661123Smrg ;; 83010b661123Smrgesac 83020b661123Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83030b661123Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83040b661123Smrg])# _LT_CHECK_SHELL_FEATURES 83050b661123Smrg 83060b661123Smrg 8307880c7e28Smrg# _LT_PATH_CONVERSION_FUNCTIONS 8308880c7e28Smrg# ----------------------------- 83094f00d7e1Smrg# Determine what file name conversion functions should be used by 8310880c7e28Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8311880c7e28Smrg# for certain cross-compile configurations and native mingw. 8312880c7e28Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8313880c7e28Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8314880c7e28SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8315880c7e28SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8316880c7e28SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8317880c7e28Smrg[case $host in 8318880c7e28Smrg *-*-mingw* ) 8319880c7e28Smrg case $build in 8320880c7e28Smrg *-*-mingw* ) # actually msys 8321880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8322880c7e28Smrg ;; 8323880c7e28Smrg *-*-cygwin* ) 8324880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8325880c7e28Smrg ;; 8326880c7e28Smrg * ) # otherwise, assume *nix 8327880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8328880c7e28Smrg ;; 8329880c7e28Smrg esac 83300b661123Smrg ;; 8331880c7e28Smrg *-*-cygwin* ) 8332880c7e28Smrg case $build in 8333880c7e28Smrg *-*-mingw* ) # actually msys 8334880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8335880c7e28Smrg ;; 8336880c7e28Smrg *-*-cygwin* ) 8337880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8338880c7e28Smrg ;; 8339880c7e28Smrg * ) # otherwise, assume *nix 8340880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8341880c7e28Smrg ;; 8342880c7e28Smrg esac 83430b661123Smrg ;; 8344880c7e28Smrg * ) # unhandled hosts (and "normal" native builds) 8345880c7e28Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8346880c7e28Smrg ;; 8347880c7e28Smrgesac 83480b661123Smrg]) 8349880c7e28Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8350880c7e28SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8351880c7e28Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8352880c7e28Smrg [0], [convert $build file names to $host format])dnl 8353880c7e28Smrg 8354880c7e28SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8355880c7e28SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8356880c7e28Smrg[#assume ordinary cross tools, or native build. 8357880c7e28Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 8358880c7e28Smrgcase $host in 8359880c7e28Smrg *-*-mingw* ) 8360880c7e28Smrg case $build in 8361880c7e28Smrg *-*-mingw* ) # actually msys 8362880c7e28Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8363880c7e28Smrg ;; 8364880c7e28Smrg esac 8365880c7e28Smrg ;; 8366880c7e28Smrgesac 8367880c7e28Smrg]) 8368880c7e28Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8369880c7e28SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8370880c7e28Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8371880c7e28Smrg [0], [convert $build files to toolchain format])dnl 8372880c7e28Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8373bdcaa8d0Smrg 83740b661123Smrg# Helper functions for option handling. -*- Autoconf -*- 83750b661123Smrg# 83764f00d7e1Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 83774f00d7e1Smrg# Foundation, Inc. 83780b661123Smrg# Written by Gary V. Vaughan, 2004 83790b661123Smrg# 83800b661123Smrg# This file is free software; the Free Software Foundation gives 83810b661123Smrg# unlimited permission to copy and/or distribute it, with or without 83820b661123Smrg# modifications, as long as this notice is preserved. 8383bdcaa8d0Smrg 83844f00d7e1Smrg# serial 8 ltoptions.m4 8385bdcaa8d0Smrg 83860b661123Smrg# This is to help aclocal find these macros, as it can't see m4_define. 83870b661123SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8388bdcaa8d0Smrg 8389bdcaa8d0Smrg 83900b661123Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 83910b661123Smrg# ------------------------------------------ 83920b661123Smrgm4_define([_LT_MANGLE_OPTION], 83930b661123Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8394bdcaa8d0Smrg 8395bdcaa8d0Smrg 83960b661123Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 83970b661123Smrg# --------------------------------------- 83980b661123Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 83990b661123Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 84000b661123Smrg# saved as a flag. 84010b661123Smrgm4_define([_LT_SET_OPTION], 84020b661123Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 84030b661123Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 84040b661123Smrg _LT_MANGLE_DEFUN([$1], [$2]), 84054f00d7e1Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 84060b661123Smrg]) 84070b661123Smrg 84080b661123Smrg 84090b661123Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 84100b661123Smrg# ------------------------------------------------------------ 84110b661123Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 84120b661123Smrgm4_define([_LT_IF_OPTION], 84130b661123Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 84140b661123Smrg 84150b661123Smrg 84160b661123Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 84170b661123Smrg# ------------------------------------------------------- 84180b661123Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 84190b661123Smrg# are set. 84200b661123Smrgm4_define([_LT_UNLESS_OPTIONS], 84210b661123Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84220b661123Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 84230b661123Smrg [m4_define([$0_found])])])[]dnl 84240b661123Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 84250b661123Smrg])[]dnl 84260b661123Smrg]) 84270b661123Smrg 8428bdcaa8d0Smrg 84290b661123Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 84300b661123Smrg# ---------------------------------------- 84310b661123Smrg# OPTION-LIST is a space-separated list of Libtool options associated 84320b661123Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 84330b661123Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 84340b661123Smrg# the unknown option and exit. 84350b661123Smrgm4_defun([_LT_SET_OPTIONS], 84360b661123Smrg[# Set options 84370b661123Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84380b661123Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 84390b661123Smrg 84400b661123Smrgm4_if([$1],[LT_INIT],[ 84410b661123Smrg dnl 84420b661123Smrg dnl Simply set some default values (i.e off) if boolean options were not 84430b661123Smrg dnl specified: 84440b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 84450b661123Smrg ]) 84460b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 84470b661123Smrg ]) 84480b661123Smrg dnl 84490b661123Smrg dnl If no reference was made to various pairs of opposing options, then 84500b661123Smrg dnl we run the default mode handler for the pair. For example, if neither 84514f00d7e1Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 84520b661123Smrg dnl archives by default: 84530b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 84540b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 84550b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 84560b661123Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 84574f00d7e1Smrg [_LT_ENABLE_FAST_INSTALL]) 84584f00d7e1Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 84594f00d7e1Smrg [_LT_WITH_AIX_SONAME([aix])]) 84600b661123Smrg ]) 84610b661123Smrg])# _LT_SET_OPTIONS 8462bdcaa8d0Smrg 8463bdcaa8d0Smrg 8464bdcaa8d0Smrg 84650b661123Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 84660b661123Smrg# ----------------------------------------- 84670b661123Smrgm4_define([_LT_MANGLE_DEFUN], 84680b661123Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8469bdcaa8d0Smrg 8470bdcaa8d0Smrg 84710b661123Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 84720b661123Smrg# ----------------------------------------------- 84730b661123Smrgm4_define([LT_OPTION_DEFINE], 84740b661123Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 84750b661123Smrg])# LT_OPTION_DEFINE 8476bdcaa8d0Smrg 8477bdcaa8d0Smrg 84780b661123Smrg# dlopen 84790b661123Smrg# ------ 84800b661123SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 84810b661123Smrg]) 8482bdcaa8d0Smrg 84830b661123SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 84840b661123Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 84850b661123SmrgAC_DIAGNOSE([obsolete], 84860b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 84874f00d7e1Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 84880b661123Smrg]) 8489bdcaa8d0Smrg 84900b661123Smrgdnl aclocal-1.4 backwards compatibility: 84910b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 849272313efbSmrg 8493bdcaa8d0Smrg 84940b661123Smrg# win32-dll 84950b661123Smrg# --------- 84960b661123Smrg# Declare package support for building win32 dll's. 84970b661123SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 84980b661123Smrg[enable_win32_dll=yes 8499bdcaa8d0Smrg 85000b661123Smrgcase $host in 8501880c7e28Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 85020b661123Smrg AC_CHECK_TOOL(AS, as, false) 85030b661123Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 85040b661123Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 85050b661123Smrg ;; 85060b661123Smrgesac 8507bdcaa8d0Smrg 85080b661123Smrgtest -z "$AS" && AS=as 8509880c7e28Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8510bdcaa8d0Smrg 85110b661123Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8512880c7e28Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8513bdcaa8d0Smrg 85140b661123Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8515880c7e28Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 85160b661123Smrg])# win32-dll 8517bdcaa8d0Smrg 85180b661123SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 85190b661123Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 85200b661123Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 85210b661123SmrgAC_DIAGNOSE([obsolete], 85220b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 85234f00d7e1Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 85240b661123Smrg]) 8525bdcaa8d0Smrg 85260b661123Smrgdnl aclocal-1.4 backwards compatibility: 85270b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8528bdcaa8d0Smrg 85290b661123Smrg 85300b661123Smrg# _LT_ENABLE_SHARED([DEFAULT]) 85310b661123Smrg# ---------------------------- 85324f00d7e1Smrg# implement the --enable-shared flag, and supports the 'shared' and 85334f00d7e1Smrg# 'disable-shared' LT_INIT options. 85344f00d7e1Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85350b661123Smrgm4_define([_LT_ENABLE_SHARED], 85360b661123Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 85370b661123SmrgAC_ARG_ENABLE([shared], 85380b661123Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 85390b661123Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 85400b661123Smrg [p=${PACKAGE-default} 85410b661123Smrg case $enableval in 85420b661123Smrg yes) enable_shared=yes ;; 85430b661123Smrg no) enable_shared=no ;; 85440b661123Smrg *) 85450b661123Smrg enable_shared=no 85460b661123Smrg # Look at the argument we got. We use all the common list separators. 85474f00d7e1Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 85480b661123Smrg for pkg in $enableval; do 85494f00d7e1Smrg IFS=$lt_save_ifs 85500b661123Smrg if test "X$pkg" = "X$p"; then 85510b661123Smrg enable_shared=yes 85520b661123Smrg fi 85530b661123Smrg done 85544f00d7e1Smrg IFS=$lt_save_ifs 855596ce994aSmrg ;; 85560b661123Smrg esac], 85570b661123Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8558bdcaa8d0Smrg 85590b661123Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 85600b661123Smrg [Whether or not to build shared libraries]) 85610b661123Smrg])# _LT_ENABLE_SHARED 8562bdcaa8d0Smrg 85630b661123SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 85640b661123SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8565bdcaa8d0Smrg 85660b661123Smrg# Old names: 85670b661123SmrgAC_DEFUN([AC_ENABLE_SHARED], 85680b661123Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 85690b661123Smrg]) 85700b661123Smrg 85710b661123SmrgAC_DEFUN([AC_DISABLE_SHARED], 85720b661123Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 85730b661123Smrg]) 8574bdcaa8d0Smrg 85750b661123SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 85760b661123SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8577bdcaa8d0Smrg 85780b661123Smrgdnl aclocal-1.4 backwards compatibility: 85790b661123Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 85800b661123Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8581bdcaa8d0Smrg 8582bdcaa8d0Smrg 8583bdcaa8d0Smrg 85840b661123Smrg# _LT_ENABLE_STATIC([DEFAULT]) 85850b661123Smrg# ---------------------------- 85864f00d7e1Smrg# implement the --enable-static flag, and support the 'static' and 85874f00d7e1Smrg# 'disable-static' LT_INIT options. 85884f00d7e1Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85890b661123Smrgm4_define([_LT_ENABLE_STATIC], 85900b661123Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 85910b661123SmrgAC_ARG_ENABLE([static], 85920b661123Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 85930b661123Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 85940b661123Smrg [p=${PACKAGE-default} 85950b661123Smrg case $enableval in 85960b661123Smrg yes) enable_static=yes ;; 85970b661123Smrg no) enable_static=no ;; 85980b661123Smrg *) 85990b661123Smrg enable_static=no 86000b661123Smrg # Look at the argument we got. We use all the common list separators. 86014f00d7e1Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86020b661123Smrg for pkg in $enableval; do 86034f00d7e1Smrg IFS=$lt_save_ifs 86040b661123Smrg if test "X$pkg" = "X$p"; then 86050b661123Smrg enable_static=yes 86060b661123Smrg fi 86070b661123Smrg done 86084f00d7e1Smrg IFS=$lt_save_ifs 8609bdcaa8d0Smrg ;; 86100b661123Smrg esac], 86110b661123Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8612bdcaa8d0Smrg 86130b661123Smrg _LT_DECL([build_old_libs], [enable_static], [0], 86140b661123Smrg [Whether or not to build static libraries]) 86150b661123Smrg])# _LT_ENABLE_STATIC 8616bdcaa8d0Smrg 86170b661123SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 86180b661123SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8619bdcaa8d0Smrg 86200b661123Smrg# Old names: 86210b661123SmrgAC_DEFUN([AC_ENABLE_STATIC], 86220b661123Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 86230b661123Smrg]) 8624bdcaa8d0Smrg 86250b661123SmrgAC_DEFUN([AC_DISABLE_STATIC], 86260b661123Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 86270b661123Smrg]) 8628bdcaa8d0Smrg 86290b661123SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 86300b661123SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8631bdcaa8d0Smrg 86320b661123Smrgdnl aclocal-1.4 backwards compatibility: 86330b661123Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 86340b661123Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8635bdcaa8d0Smrg 8636bdcaa8d0Smrg 8637bdcaa8d0Smrg 86380b661123Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 86390b661123Smrg# ---------------------------------- 86404f00d7e1Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 86414f00d7e1Smrg# and 'disable-fast-install' LT_INIT options. 86424f00d7e1Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 86430b661123Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 86440b661123Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 86450b661123SmrgAC_ARG_ENABLE([fast-install], 86460b661123Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 86470b661123Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 86480b661123Smrg [p=${PACKAGE-default} 86490b661123Smrg case $enableval in 86500b661123Smrg yes) enable_fast_install=yes ;; 86510b661123Smrg no) enable_fast_install=no ;; 86520b661123Smrg *) 86530b661123Smrg enable_fast_install=no 86540b661123Smrg # Look at the argument we got. We use all the common list separators. 86554f00d7e1Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86560b661123Smrg for pkg in $enableval; do 86574f00d7e1Smrg IFS=$lt_save_ifs 86580b661123Smrg if test "X$pkg" = "X$p"; then 86590b661123Smrg enable_fast_install=yes 866072313efbSmrg fi 86610b661123Smrg done 86624f00d7e1Smrg IFS=$lt_save_ifs 8663bdcaa8d0Smrg ;; 86640b661123Smrg esac], 86650b661123Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8666bdcaa8d0Smrg 86670b661123Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 86680b661123Smrg [Whether or not to optimize for fast installation])dnl 86690b661123Smrg])# _LT_ENABLE_FAST_INSTALL 8670bdcaa8d0Smrg 86710b661123SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 86720b661123SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8673bdcaa8d0Smrg 86740b661123Smrg# Old names: 86750b661123SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 86760b661123Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 86770b661123SmrgAC_DIAGNOSE([obsolete], 86780b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 86794f00d7e1Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 86800b661123Smrg]) 8681bdcaa8d0Smrg 86820b661123SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 86830b661123Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 86840b661123SmrgAC_DIAGNOSE([obsolete], 86850b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 86864f00d7e1Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 86870b661123Smrg]) 8688bdcaa8d0Smrg 86890b661123Smrgdnl aclocal-1.4 backwards compatibility: 86900b661123Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 86910b661123Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8692bdcaa8d0Smrg 869372313efbSmrg 86944f00d7e1Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 86954f00d7e1Smrg# ---------------------------------- 86964f00d7e1Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 86974f00d7e1Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 86984f00d7e1Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 86994f00d7e1Smrgm4_define([_LT_WITH_AIX_SONAME], 87004f00d7e1Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 87014f00d7e1Smrgshared_archive_member_spec= 87024f00d7e1Smrgcase $host,$enable_shared in 87034f00d7e1Smrgpower*-*-aix[[5-9]]*,yes) 87044f00d7e1Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 87054f00d7e1Smrg AC_ARG_WITH([aix-soname], 87064f00d7e1Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 87074f00d7e1Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 87084f00d7e1Smrg [case $withval in 87094f00d7e1Smrg aix|svr4|both) 87104f00d7e1Smrg ;; 87114f00d7e1Smrg *) 87124f00d7e1Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 87134f00d7e1Smrg ;; 87144f00d7e1Smrg esac 87154f00d7e1Smrg lt_cv_with_aix_soname=$with_aix_soname], 87164f00d7e1Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 87174f00d7e1Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 87184f00d7e1Smrg with_aix_soname=$lt_cv_with_aix_soname]) 87194f00d7e1Smrg AC_MSG_RESULT([$with_aix_soname]) 87204f00d7e1Smrg if test aix != "$with_aix_soname"; then 87214f00d7e1Smrg # For the AIX way of multilib, we name the shared archive member 87224f00d7e1Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 87234f00d7e1Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 87244f00d7e1Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 87254f00d7e1Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 87264f00d7e1Smrg if test 64 = "${OBJECT_MODE-32}"; then 87274f00d7e1Smrg shared_archive_member_spec=shr_64 87284f00d7e1Smrg else 87294f00d7e1Smrg shared_archive_member_spec=shr 87304f00d7e1Smrg fi 87314f00d7e1Smrg fi 87324f00d7e1Smrg ;; 87334f00d7e1Smrg*) 87344f00d7e1Smrg with_aix_soname=aix 87354f00d7e1Smrg ;; 87364f00d7e1Smrgesac 87374f00d7e1Smrg 87384f00d7e1Smrg_LT_DECL([], [shared_archive_member_spec], [0], 87394f00d7e1Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 87404f00d7e1Smrg])# _LT_WITH_AIX_SONAME 87414f00d7e1Smrg 87424f00d7e1SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 87434f00d7e1SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 87444f00d7e1SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 87454f00d7e1Smrg 87464f00d7e1Smrg 87470b661123Smrg# _LT_WITH_PIC([MODE]) 87480b661123Smrg# -------------------- 87494f00d7e1Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 87500b661123Smrg# LT_INIT options. 87514f00d7e1Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 87520b661123Smrgm4_define([_LT_WITH_PIC], 87530b661123Smrg[AC_ARG_WITH([pic], 8754880c7e28Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 87550b661123Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8756880c7e28Smrg [lt_p=${PACKAGE-default} 8757880c7e28Smrg case $withval in 8758880c7e28Smrg yes|no) pic_mode=$withval ;; 8759880c7e28Smrg *) 8760880c7e28Smrg pic_mode=default 8761880c7e28Smrg # Look at the argument we got. We use all the common list separators. 87624f00d7e1Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8763880c7e28Smrg for lt_pkg in $withval; do 87644f00d7e1Smrg IFS=$lt_save_ifs 8765880c7e28Smrg if test "X$lt_pkg" = "X$lt_p"; then 8766880c7e28Smrg pic_mode=yes 8767880c7e28Smrg fi 8768880c7e28Smrg done 87694f00d7e1Smrg IFS=$lt_save_ifs 8770880c7e28Smrg ;; 8771880c7e28Smrg esac], 87724f00d7e1Smrg [pic_mode=m4_default([$1], [default])]) 877372313efbSmrg 87740b661123Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 87750b661123Smrg])# _LT_WITH_PIC 877672313efbSmrg 87770b661123SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 87780b661123SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 87790b661123Smrg 87800b661123Smrg# Old name: 87810b661123SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 87820b661123Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 87830b661123SmrgAC_DIAGNOSE([obsolete], 87840b661123Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 87854f00d7e1Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 878672313efbSmrg]) 8787bdcaa8d0Smrg 87880b661123Smrgdnl aclocal-1.4 backwards compatibility: 87890b661123Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 87900b661123Smrg 87910b661123Smrg 87920b661123Smrgm4_define([_LTDL_MODE], []) 87930b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 87940b661123Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 87950b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 87960b661123Smrg [m4_define([_LTDL_MODE], [recursive])]) 87970b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 87980b661123Smrg [m4_define([_LTDL_MODE], [subproject])]) 87990b661123Smrg 88000b661123Smrgm4_define([_LTDL_TYPE], []) 88010b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 88020b661123Smrg [m4_define([_LTDL_TYPE], [installable])]) 88030b661123SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 88040b661123Smrg [m4_define([_LTDL_TYPE], [convenience])]) 88050b661123Smrg 88060b661123Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 880796ce994aSmrg# 88084f00d7e1Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 88094f00d7e1Smrg# Foundation, Inc. 88100b661123Smrg# Written by Gary V. Vaughan, 2004 881196ce994aSmrg# 88120b661123Smrg# This file is free software; the Free Software Foundation gives 88130b661123Smrg# unlimited permission to copy and/or distribute it, with or without 88140b661123Smrg# modifications, as long as this notice is preserved. 8815bdcaa8d0Smrg 88160b661123Smrg# serial 6 ltsugar.m4 881772313efbSmrg 88180b661123Smrg# This is to help aclocal find these macros, as it can't see m4_define. 88190b661123SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 882072313efbSmrg 882172313efbSmrg 88220b661123Smrg# lt_join(SEP, ARG1, [ARG2...]) 88230b661123Smrg# ----------------------------- 88240b661123Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 88250b661123Smrg# associated separator. 88260b661123Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 88270b661123Smrg# versions in m4sugar had bugs. 88280b661123Smrgm4_define([lt_join], 88290b661123Smrg[m4_if([$#], [1], [], 88300b661123Smrg [$#], [2], [[$2]], 88310b661123Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 88320b661123Smrgm4_define([_lt_join], 88330b661123Smrg[m4_if([$#$2], [2], [], 88340b661123Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 88350b661123Smrg 88360b661123Smrg 88370b661123Smrg# lt_car(LIST) 88380b661123Smrg# lt_cdr(LIST) 88390b661123Smrg# ------------ 88400b661123Smrg# Manipulate m4 lists. 88410b661123Smrg# These macros are necessary as long as will still need to support 88424f00d7e1Smrg# Autoconf-2.59, which quotes differently. 88430b661123Smrgm4_define([lt_car], [[$1]]) 88440b661123Smrgm4_define([lt_cdr], 88450b661123Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 88460b661123Smrg [$#], 1, [], 88470b661123Smrg [m4_dquote(m4_shift($@))])]) 88480b661123Smrgm4_define([lt_unquote], $1) 88490b661123Smrg 88500b661123Smrg 88510b661123Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 88520b661123Smrg# ------------------------------------------ 88534f00d7e1Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 88540b661123Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 88550b661123Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 88560b661123Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 88570b661123Smrg# than defined and empty). 88580b661123Smrg# 88590b661123Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 88600b661123Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 88610b661123Smrgm4_define([lt_append], 88620b661123Smrg[m4_define([$1], 88630b661123Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 88640b661123Smrg 88650b661123Smrg 88660b661123Smrg 88670b661123Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 88680b661123Smrg# ---------------------------------------------------------- 88690b661123Smrg# Produce a SEP delimited list of all paired combinations of elements of 88700b661123Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 88710b661123Smrg# has the form PREFIXmINFIXSUFFIXn. 88720b661123Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 88730b661123Smrgm4_define([lt_combine], 88740b661123Smrg[m4_if(m4_eval([$# > 3]), [1], 88750b661123Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 88760b661123Smrg[[m4_foreach([_Lt_prefix], [$2], 88770b661123Smrg [m4_foreach([_Lt_suffix], 88780b661123Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 88790b661123Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 88800b661123Smrg 88810b661123Smrg 88820b661123Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 88830b661123Smrg# ----------------------------------------------------------------------- 88840b661123Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 88850b661123Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 88860b661123Smrgm4_define([lt_if_append_uniq], 88870b661123Smrg[m4_ifdef([$1], 88880b661123Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 88890b661123Smrg [lt_append([$1], [$2], [$3])$4], 88900b661123Smrg [$5])], 88910b661123Smrg [lt_append([$1], [$2], [$3])$4])]) 88920b661123Smrg 88930b661123Smrg 88940b661123Smrg# lt_dict_add(DICT, KEY, VALUE) 88950b661123Smrg# ----------------------------- 88960b661123Smrgm4_define([lt_dict_add], 88970b661123Smrg[m4_define([$1($2)], [$3])]) 8898bdcaa8d0Smrg 8899bdcaa8d0Smrg 89000b661123Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 89010b661123Smrg# -------------------------------------------- 89020b661123Smrgm4_define([lt_dict_add_subkey], 89030b661123Smrg[m4_define([$1($2:$3)], [$4])]) 8904bdcaa8d0Smrg 8905bdcaa8d0Smrg 89060b661123Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 89070b661123Smrg# ---------------------------------- 89080b661123Smrgm4_define([lt_dict_fetch], 89090b661123Smrg[m4_ifval([$3], 89100b661123Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 89110b661123Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 89120b661123Smrg 8913bdcaa8d0Smrg 89140b661123Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 89150b661123Smrg# ----------------------------------------------------------------- 89160b661123Smrgm4_define([lt_if_dict_fetch], 89170b661123Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 89180b661123Smrg [$5], 89190b661123Smrg [$6])]) 89200b661123Smrg 89210b661123Smrg 89220b661123Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 89230b661123Smrg# -------------------------------------------------------------- 89240b661123Smrgm4_define([lt_dict_filter], 89250b661123Smrg[m4_if([$5], [], [], 89260b661123Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 89270b661123Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 89280b661123Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8929bdcaa8d0Smrg]) 893072313efbSmrg 89310b661123Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 89320b661123Smrg# 89334f00d7e1Smrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 89340b661123Smrg# Written by Scott James Remnant, 2004 89350b661123Smrg# 89360b661123Smrg# This file is free software; the Free Software Foundation gives 89370b661123Smrg# unlimited permission to copy and/or distribute it, with or without 89380b661123Smrg# modifications, as long as this notice is preserved. 893972313efbSmrg 8940880c7e28Smrg# @configure_input@ 894172313efbSmrg 89424f00d7e1Smrg# serial 4179 ltversion.m4 89430b661123Smrg# This file is part of GNU Libtool 894472313efbSmrg 89454f00d7e1Smrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 89464f00d7e1Smrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 894772313efbSmrg 89480b661123SmrgAC_DEFUN([LTVERSION_VERSION], 89494f00d7e1Smrg[macro_version='2.4.6' 89504f00d7e1Smrgmacro_revision='2.4.6' 89510b661123Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 89520b661123Smrg_LT_DECL(, macro_revision, 0) 8953bdcaa8d0Smrg]) 895472313efbSmrg 89550b661123Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 89560b661123Smrg# 89574f00d7e1Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 89584f00d7e1Smrg# Foundation, Inc. 89590b661123Smrg# Written by Scott James Remnant, 2004. 89600b661123Smrg# 89610b661123Smrg# This file is free software; the Free Software Foundation gives 89620b661123Smrg# unlimited permission to copy and/or distribute it, with or without 89630b661123Smrg# modifications, as long as this notice is preserved. 89640b661123Smrg 8965880c7e28Smrg# serial 5 lt~obsolete.m4 89660b661123Smrg 89670b661123Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 89680b661123Smrg# 89694f00d7e1Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 89700b661123Smrg# which have later been changed to m4_define as they aren't part of the 89710b661123Smrg# exported API, or moved to Autoconf or Automake where they belong. 89720b661123Smrg# 89730b661123Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 89740b661123Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 89750b661123Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 89760b661123Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 89770b661123Smrg# and doesn't know about Autoconf macros at all.) 89780b661123Smrg# 89790b661123Smrg# So we provide this file, which has a silly filename so it's always 89800b661123Smrg# included after everything else. This provides aclocal with the 89810b661123Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 89820b661123Smrg# because those macros already exist, or will be overwritten later. 89834f00d7e1Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 89840b661123Smrg# 89850b661123Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 89860b661123Smrg# Yes, that means every name once taken will need to remain here until 89870b661123Smrg# we give up compatibility with versions before 1.7, at which point 89880b661123Smrg# we need to keep only those names which we still refer to. 89890b661123Smrg 89900b661123Smrg# This is to help aclocal find these macros, as it can't see m4_define. 89910b661123SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 89920b661123Smrg 89930b661123Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 89940b661123Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 89950b661123Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 89960b661123Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 89970b661123Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 89980b661123Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 89990b661123Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 90000b661123Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 90010b661123Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 90020b661123Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 90030b661123Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 90040b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 90050b661123Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 90060b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 90070b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 90080b661123Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 90090b661123Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 90100b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 90110b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 90120b661123Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 90130b661123Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 90140b661123Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 90150b661123Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 90160b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 90170b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 90180b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 90190b661123Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 90200b661123Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 90210b661123Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 90220b661123Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 90230b661123Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 90240b661123Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 90250b661123Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 90260b661123Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 90270b661123Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 90280b661123Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 90290b661123Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 90300b661123Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 90310b661123Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 90320b661123Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 90330b661123Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 90340b661123Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 90350b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 90360b661123Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 90370b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 90380b661123Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 90390b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 90400b661123Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 90410b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 90420b661123Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 90430b661123Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 90440b661123Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 90450b661123Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 90460b661123Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9047880c7e28Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9048880c7e28Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9049880c7e28Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9050880c7e28Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9051880c7e28Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9052880c7e28Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9053880c7e28Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 90540b661123Smrg 9055bdcaa8d0Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9056880c7e28Smrg# serial 1 (pkg-config-0.24) 9057bdcaa8d0Smrg# 9058bdcaa8d0Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9059bdcaa8d0Smrg# 9060bdcaa8d0Smrg# This program is free software; you can redistribute it and/or modify 9061bdcaa8d0Smrg# it under the terms of the GNU General Public License as published by 9062bdcaa8d0Smrg# the Free Software Foundation; either version 2 of the License, or 9063bdcaa8d0Smrg# (at your option) any later version. 9064bdcaa8d0Smrg# 9065bdcaa8d0Smrg# This program is distributed in the hope that it will be useful, but 9066bdcaa8d0Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9067bdcaa8d0Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9068bdcaa8d0Smrg# General Public License for more details. 9069bdcaa8d0Smrg# 9070bdcaa8d0Smrg# You should have received a copy of the GNU General Public License 9071bdcaa8d0Smrg# along with this program; if not, write to the Free Software 9072bdcaa8d0Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9073bdcaa8d0Smrg# 9074bdcaa8d0Smrg# As a special exception to the GNU General Public License, if you 9075bdcaa8d0Smrg# distribute this file as part of a program that contains a 9076bdcaa8d0Smrg# configuration script generated by Autoconf, you may include it under 9077bdcaa8d0Smrg# the same distribution terms that you use for the rest of that program. 9078bdcaa8d0Smrg 9079bdcaa8d0Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9080bdcaa8d0Smrg# ---------------------------------- 9081bdcaa8d0SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9082bdcaa8d0Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 90834f00d7e1Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 90844f00d7e1Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9085880c7e28SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9086880c7e28SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9087880c7e28SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9088880c7e28Smrg 9089bdcaa8d0Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9090bdcaa8d0Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9091bdcaa8d0Smrgfi 9092bdcaa8d0Smrgif test -n "$PKG_CONFIG"; then 9093bdcaa8d0Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 9094bdcaa8d0Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9095bdcaa8d0Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9096bdcaa8d0Smrg AC_MSG_RESULT([yes]) 9097bdcaa8d0Smrg else 9098bdcaa8d0Smrg AC_MSG_RESULT([no]) 9099bdcaa8d0Smrg PKG_CONFIG="" 9100bdcaa8d0Smrg fi 9101bdcaa8d0Smrgfi[]dnl 9102bdcaa8d0Smrg])# PKG_PROG_PKG_CONFIG 9103bdcaa8d0Smrg 9104bdcaa8d0Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9105bdcaa8d0Smrg# 9106bdcaa8d0Smrg# Check to see whether a particular set of modules exists. Similar 9107bdcaa8d0Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9108bdcaa8d0Smrg# 9109880c7e28Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9110880c7e28Smrg# only at the first occurence in configure.ac, so if the first place 9111880c7e28Smrg# it's called might be skipped (such as if it is within an "if", you 9112880c7e28Smrg# have to call PKG_CHECK_EXISTS manually 9113bdcaa8d0Smrg# -------------------------------------------------------------- 9114bdcaa8d0SmrgAC_DEFUN([PKG_CHECK_EXISTS], 9115bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9116bdcaa8d0Smrgif test -n "$PKG_CONFIG" && \ 9117bdcaa8d0Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9118880c7e28Smrg m4_default([$2], [:]) 9119bdcaa8d0Smrgm4_ifvaln([$3], [else 9120bdcaa8d0Smrg $3])dnl 9121bdcaa8d0Smrgfi]) 9122bdcaa8d0Smrg 9123bdcaa8d0Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9124bdcaa8d0Smrg# --------------------------------------------- 9125bdcaa8d0Smrgm4_define([_PKG_CONFIG], 912672313efbSmrg[if test -n "$$1"; then 912772313efbSmrg pkg_cv_[]$1="$$1" 912872313efbSmrg elif test -n "$PKG_CONFIG"; then 912972313efbSmrg PKG_CHECK_EXISTS([$3], 91304f00d7e1Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 91314f00d7e1Smrg test "x$?" != "x0" && pkg_failed=yes ], 913272313efbSmrg [pkg_failed=yes]) 913372313efbSmrg else 913472313efbSmrg pkg_failed=untried 9135bdcaa8d0Smrgfi[]dnl 9136bdcaa8d0Smrg])# _PKG_CONFIG 9137bdcaa8d0Smrg 9138bdcaa8d0Smrg# _PKG_SHORT_ERRORS_SUPPORTED 9139bdcaa8d0Smrg# ----------------------------- 9140bdcaa8d0SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9141bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9142bdcaa8d0Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9143bdcaa8d0Smrg _pkg_short_errors_supported=yes 9144bdcaa8d0Smrgelse 9145bdcaa8d0Smrg _pkg_short_errors_supported=no 9146bdcaa8d0Smrgfi[]dnl 9147bdcaa8d0Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 9148bdcaa8d0Smrg 9149bdcaa8d0Smrg 9150bdcaa8d0Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9151bdcaa8d0Smrg# [ACTION-IF-NOT-FOUND]) 9152bdcaa8d0Smrg# 9153bdcaa8d0Smrg# 9154bdcaa8d0Smrg# Note that if there is a possibility the first call to 9155bdcaa8d0Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 9156bdcaa8d0Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9157bdcaa8d0Smrg# 9158bdcaa8d0Smrg# 9159bdcaa8d0Smrg# -------------------------------------------------------------- 9160bdcaa8d0SmrgAC_DEFUN([PKG_CHECK_MODULES], 9161bdcaa8d0Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9162bdcaa8d0SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9163bdcaa8d0SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9164bdcaa8d0Smrg 9165bdcaa8d0Smrgpkg_failed=no 9166bdcaa8d0SmrgAC_MSG_CHECKING([for $1]) 9167bdcaa8d0Smrg 9168bdcaa8d0Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9169bdcaa8d0Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9170bdcaa8d0Smrg 9171bdcaa8d0Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9172bdcaa8d0Smrgand $1[]_LIBS to avoid the need to call pkg-config. 9173bdcaa8d0SmrgSee the pkg-config man page for more details.]) 9174bdcaa8d0Smrg 9175bdcaa8d0Smrgif test $pkg_failed = yes; then 9176880c7e28Smrg AC_MSG_RESULT([no]) 9177bdcaa8d0Smrg _PKG_SHORT_ERRORS_SUPPORTED 9178bdcaa8d0Smrg if test $_pkg_short_errors_supported = yes; then 91794f00d7e1Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9180bdcaa8d0Smrg else 91814f00d7e1Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9182bdcaa8d0Smrg fi 9183bdcaa8d0Smrg # Put the nasty error message in config.log where it belongs 9184bdcaa8d0Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9185bdcaa8d0Smrg 9186880c7e28Smrg m4_default([$4], [AC_MSG_ERROR( 9187bdcaa8d0Smrg[Package requirements ($2) were not met: 9188bdcaa8d0Smrg 9189bdcaa8d0Smrg$$1_PKG_ERRORS 9190bdcaa8d0Smrg 9191bdcaa8d0SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9192bdcaa8d0Smrginstalled software in a non-standard prefix. 9193bdcaa8d0Smrg 91944f00d7e1Smrg_PKG_TEXT])[]dnl 9195880c7e28Smrg ]) 9196bdcaa8d0Smrgelif test $pkg_failed = untried; then 9197880c7e28Smrg AC_MSG_RESULT([no]) 9198880c7e28Smrg m4_default([$4], [AC_MSG_FAILURE( 9199bdcaa8d0Smrg[The pkg-config script could not be found or is too old. Make sure it 9200bdcaa8d0Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 9201bdcaa8d0Smrgpath to pkg-config. 9202bdcaa8d0Smrg 9203bdcaa8d0Smrg_PKG_TEXT 9204bdcaa8d0Smrg 92054f00d7e1SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9206880c7e28Smrg ]) 9207bdcaa8d0Smrgelse 9208bdcaa8d0Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9209bdcaa8d0Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9210bdcaa8d0Smrg AC_MSG_RESULT([yes]) 9211880c7e28Smrg $3 9212bdcaa8d0Smrgfi[]dnl 9213bdcaa8d0Smrg])# PKG_CHECK_MODULES 9214bdcaa8d0Smrg 92154f00d7e1Smrg 92164f00d7e1Smrg# PKG_INSTALLDIR(DIRECTORY) 92174f00d7e1Smrg# ------------------------- 92184f00d7e1Smrg# Substitutes the variable pkgconfigdir as the location where a module 92194f00d7e1Smrg# should install pkg-config .pc files. By default the directory is 92204f00d7e1Smrg# $libdir/pkgconfig, but the default can be changed by passing 92214f00d7e1Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 92224f00d7e1Smrg# parameter. 92234f00d7e1SmrgAC_DEFUN([PKG_INSTALLDIR], 92244f00d7e1Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 92254f00d7e1Smrgm4_pushdef([pkg_description], 92264f00d7e1Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 92274f00d7e1SmrgAC_ARG_WITH([pkgconfigdir], 92284f00d7e1Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 92294f00d7e1Smrg [with_pkgconfigdir=]pkg_default) 92304f00d7e1SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 92314f00d7e1Smrgm4_popdef([pkg_default]) 92324f00d7e1Smrgm4_popdef([pkg_description]) 92334f00d7e1Smrg]) dnl PKG_INSTALLDIR 92344f00d7e1Smrg 92354f00d7e1Smrg 92364f00d7e1Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 92374f00d7e1Smrg# ------------------------- 92384f00d7e1Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 92394f00d7e1Smrg# module should install arch-independent pkg-config .pc files. By 92404f00d7e1Smrg# default the directory is $datadir/pkgconfig, but the default can be 92414f00d7e1Smrg# changed by passing DIRECTORY. The user can override through the 92424f00d7e1Smrg# --with-noarch-pkgconfigdir parameter. 92434f00d7e1SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 92444f00d7e1Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 92454f00d7e1Smrgm4_pushdef([pkg_description], 92464f00d7e1Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 92474f00d7e1SmrgAC_ARG_WITH([noarch-pkgconfigdir], 92484f00d7e1Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 92494f00d7e1Smrg [with_noarch_pkgconfigdir=]pkg_default) 92504f00d7e1SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 92514f00d7e1Smrgm4_popdef([pkg_default]) 92524f00d7e1Smrgm4_popdef([pkg_description]) 92534f00d7e1Smrg]) dnl PKG_NOARCH_INSTALLDIR 92544f00d7e1Smrg 92554f00d7e1Smrg 92564f00d7e1Smrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 92574f00d7e1Smrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 92584f00d7e1Smrg# ------------------------------------------- 92594f00d7e1Smrg# Retrieves the value of the pkg-config variable for the given module. 92604f00d7e1SmrgAC_DEFUN([PKG_CHECK_VAR], 92614f00d7e1Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 92624f00d7e1SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 92634f00d7e1Smrg 92644f00d7e1Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 92654f00d7e1SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 92664f00d7e1Smrg 92674f00d7e1SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 92684f00d7e1Smrg])# PKG_CHECK_VAR 92694f00d7e1Smrg 927072313efbSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9271bdcaa8d0Smrgdnl 9272880c7e28Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 92734f00d7e1Smrgdnl 9274bdcaa8d0Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 92750b661123Smrgdnl copy of this software and associated documentation files (the "Software"), 92760b661123Smrgdnl to deal in the Software without restriction, including without limitation 92770b661123Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 92780b661123Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 92790b661123Smrgdnl Software is furnished to do so, subject to the following conditions: 9280bdcaa8d0Smrgdnl 92810b661123Smrgdnl The above copyright notice and this permission notice (including the next 92820b661123Smrgdnl paragraph) shall be included in all copies or substantial portions of the 92830b661123Smrgdnl Software. 9284bdcaa8d0Smrgdnl 92850b661123Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 92860b661123Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 92870b661123Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 92880b661123Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 92890b661123Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92900b661123Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 92910b661123Smrgdnl DEALINGS IN THE SOFTWARE. 9292bdcaa8d0Smrg 9293bdcaa8d0Smrg# XORG_MACROS_VERSION(required-version) 9294bdcaa8d0Smrg# ------------------------------------- 9295bdcaa8d0Smrg# Minimum version: 1.1.0 9296bdcaa8d0Smrg# 9297bdcaa8d0Smrg# If you're using a macro added in Version 1.1 or newer, include this in 9298bdcaa8d0Smrg# your configure.ac with the minimum required version, such as: 9299bdcaa8d0Smrg# XORG_MACROS_VERSION(1.1) 9300bdcaa8d0Smrg# 93010b661123Smrg# To ensure that this macro is defined, also add: 93020b661123Smrg# m4_ifndef([XORG_MACROS_VERSION], 93030b661123Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9304bdcaa8d0Smrg# 9305bdcaa8d0Smrg# 93064f00d7e1Smrg# See the "minimum version" comment for each macro you use to see what 9307bdcaa8d0Smrg# version you require. 93080b661123Smrgm4_defun([XORG_MACROS_VERSION],[ 93094f00d7e1Smrgm4_define([vers_have], [1.19.0]) 93100b661123Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 93110b661123Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 93120b661123Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 93130b661123Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 93140b661123Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 93150b661123Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 93160b661123Smrgm4_undefine([vers_have]) 93170b661123Smrgm4_undefine([maj_have]) 93180b661123Smrgm4_undefine([maj_needed]) 9319bdcaa8d0Smrg]) # XORG_MACROS_VERSION 9320bdcaa8d0Smrg 9321bdcaa8d0Smrg# XORG_PROG_RAWCPP() 9322bdcaa8d0Smrg# ------------------ 9323bdcaa8d0Smrg# Minimum version: 1.0.0 9324bdcaa8d0Smrg# 9325bdcaa8d0Smrg# Find cpp program and necessary flags for use in pre-processing text files 9326bdcaa8d0Smrg# such as man pages and config files 9327bdcaa8d0SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9328bdcaa8d0SmrgAC_REQUIRE([AC_PROG_CPP]) 93294f00d7e1SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9330bdcaa8d0Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9331bdcaa8d0Smrg 9332bdcaa8d0Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9333bdcaa8d0Smrg# which is not the best choice for supporting other OS'es, but covers most 9334bdcaa8d0Smrg# of the ones we need for now. 9335bdcaa8d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9336880c7e28SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9337bdcaa8d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9338bdcaa8d0Smrg AC_MSG_RESULT([no]) 9339bdcaa8d0Smrgelse 9340bdcaa8d0Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9341bdcaa8d0Smrg RAWCPPFLAGS=-undef 9342bdcaa8d0Smrg AC_MSG_RESULT([yes]) 934372313efbSmrg # under Cygwin unix is still defined even with -undef 934472313efbSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 934572313efbSmrg RAWCPPFLAGS="-undef -ansi" 934672313efbSmrg AC_MSG_RESULT([yes, with -ansi]) 9347bdcaa8d0Smrg else 9348bdcaa8d0Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9349bdcaa8d0Smrg fi 9350bdcaa8d0Smrgfi 9351bdcaa8d0Smrgrm -f conftest.$ac_ext 9352bdcaa8d0Smrg 9353bdcaa8d0SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9354880c7e28SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9355bdcaa8d0Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9356bdcaa8d0Smrg AC_MSG_RESULT([no]) 9357bdcaa8d0Smrgelse 9358bdcaa8d0Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 93594f00d7e1Smrg TRADITIONALCPPFLAGS="-traditional" 9360bdcaa8d0Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9361bdcaa8d0Smrg AC_MSG_RESULT([yes]) 9362bdcaa8d0Smrg else 9363bdcaa8d0Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9364bdcaa8d0Smrg fi 9365bdcaa8d0Smrgfi 9366bdcaa8d0Smrgrm -f conftest.$ac_ext 9367bdcaa8d0SmrgAC_SUBST(RAWCPPFLAGS) 93684f00d7e1SmrgAC_SUBST(TRADITIONALCPPFLAGS) 9369bdcaa8d0Smrg]) # XORG_PROG_RAWCPP 9370bdcaa8d0Smrg 9371bdcaa8d0Smrg# XORG_MANPAGE_SECTIONS() 9372bdcaa8d0Smrg# ----------------------- 9373bdcaa8d0Smrg# Minimum version: 1.0.0 9374bdcaa8d0Smrg# 9375bdcaa8d0Smrg# Determine which sections man pages go in for the different man page types 9376bdcaa8d0Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9377bdcaa8d0Smrg# Not sure if there's any better way than just hardcoding by OS name. 9378bdcaa8d0Smrg# Override default settings by setting environment variables 93790b661123Smrg# Added MAN_SUBSTS in version 1.8 93800b661123Smrg# Added AC_PROG_SED in version 1.8 9381bdcaa8d0Smrg 9382bdcaa8d0SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9383bdcaa8d0SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 93840b661123SmrgAC_REQUIRE([AC_PROG_SED]) 9385bdcaa8d0Smrg 9386bdcaa8d0Smrgif test x$APP_MAN_SUFFIX = x ; then 9387bdcaa8d0Smrg APP_MAN_SUFFIX=1 9388bdcaa8d0Smrgfi 9389bdcaa8d0Smrgif test x$APP_MAN_DIR = x ; then 9390bdcaa8d0Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9391bdcaa8d0Smrgfi 9392bdcaa8d0Smrg 9393bdcaa8d0Smrgif test x$LIB_MAN_SUFFIX = x ; then 9394bdcaa8d0Smrg LIB_MAN_SUFFIX=3 9395bdcaa8d0Smrgfi 9396bdcaa8d0Smrgif test x$LIB_MAN_DIR = x ; then 9397bdcaa8d0Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9398bdcaa8d0Smrgfi 9399bdcaa8d0Smrg 9400bdcaa8d0Smrgif test x$FILE_MAN_SUFFIX = x ; then 9401bdcaa8d0Smrg case $host_os in 9402bdcaa8d0Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 9403bdcaa8d0Smrg *) FILE_MAN_SUFFIX=5 ;; 9404bdcaa8d0Smrg esac 9405bdcaa8d0Smrgfi 9406bdcaa8d0Smrgif test x$FILE_MAN_DIR = x ; then 9407bdcaa8d0Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9408bdcaa8d0Smrgfi 9409bdcaa8d0Smrg 9410bdcaa8d0Smrgif test x$MISC_MAN_SUFFIX = x ; then 9411bdcaa8d0Smrg case $host_os in 9412bdcaa8d0Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 9413bdcaa8d0Smrg *) MISC_MAN_SUFFIX=7 ;; 9414bdcaa8d0Smrg esac 9415bdcaa8d0Smrgfi 9416bdcaa8d0Smrgif test x$MISC_MAN_DIR = x ; then 9417bdcaa8d0Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9418bdcaa8d0Smrgfi 9419bdcaa8d0Smrg 9420bdcaa8d0Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 9421bdcaa8d0Smrg case $host_os in 9422bdcaa8d0Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9423bdcaa8d0Smrg *) DRIVER_MAN_SUFFIX=4 ;; 9424bdcaa8d0Smrg esac 9425bdcaa8d0Smrgfi 9426bdcaa8d0Smrgif test x$DRIVER_MAN_DIR = x ; then 9427bdcaa8d0Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9428bdcaa8d0Smrgfi 9429bdcaa8d0Smrg 9430bdcaa8d0Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 9431bdcaa8d0Smrg case $host_os in 9432bdcaa8d0Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9433bdcaa8d0Smrg *) ADMIN_MAN_SUFFIX=8 ;; 9434bdcaa8d0Smrg esac 9435bdcaa8d0Smrgfi 9436bdcaa8d0Smrgif test x$ADMIN_MAN_DIR = x ; then 9437bdcaa8d0Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9438bdcaa8d0Smrgfi 9439bdcaa8d0Smrg 9440bdcaa8d0Smrg 9441bdcaa8d0SmrgAC_SUBST([APP_MAN_SUFFIX]) 9442bdcaa8d0SmrgAC_SUBST([LIB_MAN_SUFFIX]) 9443bdcaa8d0SmrgAC_SUBST([FILE_MAN_SUFFIX]) 9444bdcaa8d0SmrgAC_SUBST([MISC_MAN_SUFFIX]) 9445bdcaa8d0SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9446bdcaa8d0SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9447bdcaa8d0SmrgAC_SUBST([APP_MAN_DIR]) 9448bdcaa8d0SmrgAC_SUBST([LIB_MAN_DIR]) 9449bdcaa8d0SmrgAC_SUBST([FILE_MAN_DIR]) 9450bdcaa8d0SmrgAC_SUBST([MISC_MAN_DIR]) 9451bdcaa8d0SmrgAC_SUBST([DRIVER_MAN_DIR]) 9452bdcaa8d0SmrgAC_SUBST([ADMIN_MAN_DIR]) 94530b661123Smrg 94540b661123SmrgXORG_MAN_PAGE="X Version 11" 94550b661123SmrgAC_SUBST([XORG_MAN_PAGE]) 94560b661123SmrgMAN_SUBSTS="\ 94570b661123Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 94580b661123Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 94590b661123Smrg -e 's|__xservername__|Xorg|g' \ 94600b661123Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 94610b661123Smrg -e 's|__projectroot__|\$(prefix)|g' \ 9462880c7e28Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 94630b661123Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 94640b661123Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 94650b661123Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 94660b661123Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 94670b661123Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 94680b661123Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 94690b661123SmrgAC_SUBST([MAN_SUBSTS]) 94700b661123Smrg 9471bdcaa8d0Smrg]) # XORG_MANPAGE_SECTIONS 9472bdcaa8d0Smrg 94730b661123Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 94740b661123Smrg# ------------------------ 94750b661123Smrg# Minimum version: 1.7.0 94760b661123Smrg# 94770b661123Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 94780b661123Smrg# provided by xorg-sgml-doctools, if installed. 94790b661123SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 94800b661123SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 94810b661123SmrgXORG_SGML_PATH= 94820b661123SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 94830b661123Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 94840b661123Smrg [m4_ifval([$1],[:], 94850b661123Smrg [if test x"$cross_compiling" != x"yes" ; then 94860b661123Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 94870b661123Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 94880b661123Smrg fi]) 94890b661123Smrg ]) 94900b661123Smrg 9491880c7e28Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9492880c7e28Smrg# the path and the name of the doc stylesheet 94930b661123Smrgif test "x$XORG_SGML_PATH" != "x" ; then 94940b661123Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9495880c7e28Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9496880c7e28Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 94970b661123Smrgelse 94980b661123Smrg AC_MSG_RESULT([no]) 94990b661123Smrgfi 95000b661123Smrg 95010b661123SmrgAC_SUBST(XORG_SGML_PATH) 9502880c7e28SmrgAC_SUBST(STYLESHEET_SRCDIR) 9503880c7e28SmrgAC_SUBST(XSL_STYLESHEET) 9504880c7e28SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 95050b661123Smrg]) # XORG_CHECK_SGML_DOCTOOLS 95060b661123Smrg 9507bdcaa8d0Smrg# XORG_CHECK_LINUXDOC 9508bdcaa8d0Smrg# ------------------- 9509bdcaa8d0Smrg# Minimum version: 1.0.0 9510bdcaa8d0Smrg# 9511bdcaa8d0Smrg# Defines the variable MAKE_TEXT if the necessary tools and 9512bdcaa8d0Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9513bdcaa8d0Smrg# Whether or not the necessary tools and files are found can be checked 9514bdcaa8d0Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9515bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 95160b661123SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 95170b661123SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9518bdcaa8d0Smrg 9519bdcaa8d0SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9520bdcaa8d0Smrg 95210b661123SmrgAC_MSG_CHECKING([whether to build documentation]) 9522bdcaa8d0Smrg 95230b661123Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9524bdcaa8d0Smrg BUILDDOC=yes 9525bdcaa8d0Smrgelse 9526bdcaa8d0Smrg BUILDDOC=no 9527bdcaa8d0Smrgfi 9528bdcaa8d0Smrg 9529bdcaa8d0SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9530bdcaa8d0Smrg 9531bdcaa8d0SmrgAC_MSG_RESULT([$BUILDDOC]) 9532bdcaa8d0Smrg 95330b661123SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9534bdcaa8d0Smrg 95350b661123Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9536bdcaa8d0Smrg BUILDPDFDOC=yes 9537bdcaa8d0Smrgelse 9538bdcaa8d0Smrg BUILDPDFDOC=no 9539bdcaa8d0Smrgfi 9540bdcaa8d0Smrg 9541bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9542bdcaa8d0Smrg 9543bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9544bdcaa8d0Smrg 95450b661123SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9546bdcaa8d0SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9547bdcaa8d0SmrgMAKE_PDF="$PS2PDF" 9548bdcaa8d0SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9549bdcaa8d0Smrg 9550bdcaa8d0SmrgAC_SUBST(MAKE_TEXT) 9551bdcaa8d0SmrgAC_SUBST(MAKE_PS) 9552bdcaa8d0SmrgAC_SUBST(MAKE_PDF) 9553bdcaa8d0SmrgAC_SUBST(MAKE_HTML) 9554bdcaa8d0Smrg]) # XORG_CHECK_LINUXDOC 9555bdcaa8d0Smrg 9556bdcaa8d0Smrg# XORG_CHECK_DOCBOOK 9557bdcaa8d0Smrg# ------------------- 9558bdcaa8d0Smrg# Minimum version: 1.0.0 9559bdcaa8d0Smrg# 9560bdcaa8d0Smrg# Checks for the ability to build output formats from SGML DocBook source. 9561bdcaa8d0Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9562bdcaa8d0Smrg# indicates whether the necessary tools and files are found and, if set, 9563bdcaa8d0Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9564bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 95650b661123SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 95660b661123Smrg 9567bdcaa8d0SmrgBUILDTXTDOC=no 9568bdcaa8d0SmrgBUILDPDFDOC=no 9569bdcaa8d0SmrgBUILDPSDOC=no 9570bdcaa8d0SmrgBUILDHTMLDOC=no 9571bdcaa8d0Smrg 9572bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9573bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9574bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9575bdcaa8d0SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9576bdcaa8d0Smrg 95770b661123SmrgAC_MSG_CHECKING([whether to build text documentation]) 95780b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9579bdcaa8d0Smrg test x$BUILD_TXTDOC != xno; then 9580bdcaa8d0Smrg BUILDTXTDOC=yes 9581bdcaa8d0Smrgfi 9582bdcaa8d0SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9583bdcaa8d0SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9584bdcaa8d0Smrg 95850b661123SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 95860b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9587bdcaa8d0Smrg test x$BUILD_PDFDOC != xno; then 9588bdcaa8d0Smrg BUILDPDFDOC=yes 9589bdcaa8d0Smrgfi 9590bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9591bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9592bdcaa8d0Smrg 95930b661123SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 95940b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9595bdcaa8d0Smrg test x$BUILD_PSDOC != xno; then 9596bdcaa8d0Smrg BUILDPSDOC=yes 9597bdcaa8d0Smrgfi 9598bdcaa8d0SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9599bdcaa8d0SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9600bdcaa8d0Smrg 96010b661123SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 96020b661123Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9603bdcaa8d0Smrg test x$BUILD_HTMLDOC != xno; then 9604bdcaa8d0Smrg BUILDHTMLDOC=yes 9605bdcaa8d0Smrgfi 9606bdcaa8d0SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9607bdcaa8d0SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9608bdcaa8d0Smrg 9609bdcaa8d0SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9610bdcaa8d0SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9611bdcaa8d0SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9612bdcaa8d0SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9613bdcaa8d0Smrg 9614bdcaa8d0SmrgAC_SUBST(MAKE_TEXT) 9615bdcaa8d0SmrgAC_SUBST(MAKE_PS) 9616bdcaa8d0SmrgAC_SUBST(MAKE_PDF) 9617bdcaa8d0SmrgAC_SUBST(MAKE_HTML) 9618bdcaa8d0Smrg]) # XORG_CHECK_DOCBOOK 9619bdcaa8d0Smrg 9620880c7e28Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 96210b661123Smrg# ---------------- 96220b661123Smrg# Minimum version: 1.5.0 9623880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 96240b661123Smrg# 96250b661123Smrg# Documentation tools are not always available on all platforms and sometimes 96260b661123Smrg# not at the appropriate level. This macro enables a module to test for the 96270b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 96280b661123Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9629880c7e28Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9630880c7e28Smrg# --with-xmlto assumes 'auto'. 96310b661123Smrg# 96320b661123Smrg# Interface to module: 96330b661123Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 96340b661123Smrg# XMLTO: returns the path of the xmlto program found 96350b661123Smrg# returns the path set by the user in the environment 96360b661123Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 96370b661123Smrg# 'no' user instructs the module not to use xmlto 96380b661123Smrg# 9639880c7e28Smrg# Added in version 1.10.0 9640880c7e28Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9641880c7e28Smrg# xmlto for text output requires either lynx, links, or w3m browsers 9642880c7e28Smrg# 96430b661123Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 96440b661123Smrg# 96450b661123SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 96460b661123SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9647880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 96480b661123SmrgAC_ARG_WITH(xmlto, 96490b661123Smrg AS_HELP_STRING([--with-xmlto], 9650880c7e28Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9651880c7e28Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9652880c7e28Smrgm4_undefine([_defopt]) 96530b661123Smrg 96540b661123Smrgif test "x$use_xmlto" = x"auto"; then 96550b661123Smrg AC_PATH_PROG([XMLTO], [xmlto]) 96560b661123Smrg if test "x$XMLTO" = "x"; then 96570b661123Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 96580b661123Smrg have_xmlto=no 96590b661123Smrg else 96600b661123Smrg have_xmlto=yes 96610b661123Smrg fi 96620b661123Smrgelif test "x$use_xmlto" = x"yes" ; then 96630b661123Smrg AC_PATH_PROG([XMLTO], [xmlto]) 96640b661123Smrg if test "x$XMLTO" = "x"; then 96650b661123Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 96660b661123Smrg fi 96670b661123Smrg have_xmlto=yes 96680b661123Smrgelif test "x$use_xmlto" = x"no" ; then 96690b661123Smrg if test "x$XMLTO" != "x"; then 96700b661123Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 96710b661123Smrg fi 96720b661123Smrg have_xmlto=no 96730b661123Smrgelse 96740b661123Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 96750b661123Smrgfi 9676880c7e28Smrg 9677880c7e28Smrg# Test for a minimum version of xmlto, if provided. 96780b661123Smrgm4_ifval([$1], 96790b661123Smrg[if test "$have_xmlto" = yes; then 96800b661123Smrg # scrape the xmlto version 96810b661123Smrg AC_MSG_CHECKING([the xmlto version]) 96820b661123Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 96830b661123Smrg AC_MSG_RESULT([$xmlto_version]) 96840b661123Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 96850b661123Smrg [if test "x$use_xmlto" = xauto; then 96860b661123Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 96870b661123Smrg have_xmlto=no 96880b661123Smrg else 96890b661123Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 96900b661123Smrg fi]) 96910b661123Smrgfi]) 9692880c7e28Smrg 9693880c7e28Smrg# Test for the ability of xmlto to generate a text target 9694880c7e28Smrghave_xmlto_text=no 9695880c7e28Smrgcat > conftest.xml << "EOF" 9696880c7e28SmrgEOF 9697880c7e28SmrgAS_IF([test "$have_xmlto" = yes], 9698880c7e28Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9699880c7e28Smrg [have_xmlto_text=yes], 9700880c7e28Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 9701880c7e28Smrgrm -f conftest.xml 9702880c7e28SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 97030b661123SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 97040b661123Smrg]) # XORG_WITH_XMLTO 97050b661123Smrg 9706880c7e28Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9707880c7e28Smrg# -------------------------------------------- 9708880c7e28Smrg# Minimum version: 1.12.0 9709880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9710880c7e28Smrg# 9711880c7e28Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9712880c7e28Smrg# XML-based language used for the transformation of XML documents. 9713880c7e28Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9714880c7e28Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9715880c7e28Smrg# The XSLT processor is often used as a standalone tool for transformations. 9716880c7e28Smrg# It should not be assumed that this tool is used only to work with documnetation. 9717880c7e28Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9718880c7e28Smrg# 9719880c7e28Smrg# Interface to module: 9720880c7e28Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9721880c7e28Smrg# XSLTPROC: returns the path of the xsltproc program found 9722880c7e28Smrg# returns the path set by the user in the environment 9723880c7e28Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9724880c7e28Smrg# 'no' user instructs the module not to use xsltproc 9725880c7e28Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9726880c7e28Smrg# 9727880c7e28Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9728880c7e28Smrg# 9729880c7e28SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9730880c7e28SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9731880c7e28Smrg# Preserves the interface, should it be implemented later 9732880c7e28Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9733880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 9734880c7e28SmrgAC_ARG_WITH(xsltproc, 9735880c7e28Smrg AS_HELP_STRING([--with-xsltproc], 9736880c7e28Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9737880c7e28Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9738880c7e28Smrgm4_undefine([_defopt]) 9739880c7e28Smrg 9740880c7e28Smrgif test "x$use_xsltproc" = x"auto"; then 9741880c7e28Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9742880c7e28Smrg if test "x$XSLTPROC" = "x"; then 9743880c7e28Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9744880c7e28Smrg have_xsltproc=no 9745880c7e28Smrg else 9746880c7e28Smrg have_xsltproc=yes 9747880c7e28Smrg fi 9748880c7e28Smrgelif test "x$use_xsltproc" = x"yes" ; then 9749880c7e28Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9750880c7e28Smrg if test "x$XSLTPROC" = "x"; then 9751880c7e28Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9752880c7e28Smrg fi 9753880c7e28Smrg have_xsltproc=yes 9754880c7e28Smrgelif test "x$use_xsltproc" = x"no" ; then 9755880c7e28Smrg if test "x$XSLTPROC" != "x"; then 9756880c7e28Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9757880c7e28Smrg fi 9758880c7e28Smrg have_xsltproc=no 9759880c7e28Smrgelse 9760880c7e28Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9761880c7e28Smrgfi 9762880c7e28Smrg 9763880c7e28SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9764880c7e28Smrg]) # XORG_WITH_XSLTPROC 9765880c7e28Smrg 9766880c7e28Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9767880c7e28Smrg# ---------------------------------------- 9768880c7e28Smrg# Minimum version: 1.15.0 9769880c7e28Smrg# 9770880c7e28Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9771880c7e28Smrg# scanning arbitrary text files, extracting information from those text files, 9772880c7e28Smrg# and printing reports based on that information. 9773880c7e28Smrg# 9774880c7e28Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9775880c7e28Smrg# 9776880c7e28Smrg# Interface to module: 9777880c7e28Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9778880c7e28Smrg# PERL: returns the path of the perl program found 9779880c7e28Smrg# returns the path set by the user in the environment 9780880c7e28Smrg# --with-perl: 'yes' user instructs the module to use perl 9781880c7e28Smrg# 'no' user instructs the module not to use perl 9782880c7e28Smrg# have_perl: returns yes if perl found in PATH or no 9783880c7e28Smrg# 9784880c7e28Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9785880c7e28Smrg# 9786880c7e28SmrgAC_DEFUN([XORG_WITH_PERL],[ 9787880c7e28SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9788880c7e28Smrg# Preserves the interface, should it be implemented later 9789880c7e28Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9790880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 9791880c7e28SmrgAC_ARG_WITH(perl, 9792880c7e28Smrg AS_HELP_STRING([--with-perl], 9793880c7e28Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9794880c7e28Smrg [use_perl=$withval], [use_perl=]_defopt) 9795880c7e28Smrgm4_undefine([_defopt]) 9796880c7e28Smrg 9797880c7e28Smrgif test "x$use_perl" = x"auto"; then 9798880c7e28Smrg AC_PATH_PROG([PERL], [perl]) 9799880c7e28Smrg if test "x$PERL" = "x"; then 9800880c7e28Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9801880c7e28Smrg have_perl=no 9802880c7e28Smrg else 9803880c7e28Smrg have_perl=yes 9804880c7e28Smrg fi 9805880c7e28Smrgelif test "x$use_perl" = x"yes" ; then 9806880c7e28Smrg AC_PATH_PROG([PERL], [perl]) 9807880c7e28Smrg if test "x$PERL" = "x"; then 9808880c7e28Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9809880c7e28Smrg fi 9810880c7e28Smrg have_perl=yes 9811880c7e28Smrgelif test "x$use_perl" = x"no" ; then 9812880c7e28Smrg if test "x$PERL" != "x"; then 9813880c7e28Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9814880c7e28Smrg fi 9815880c7e28Smrg have_perl=no 9816880c7e28Smrgelse 9817880c7e28Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9818880c7e28Smrgfi 9819880c7e28Smrg 9820880c7e28SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9821880c7e28Smrg]) # XORG_WITH_PERL 9822880c7e28Smrg 9823880c7e28Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 98240b661123Smrg# ---------------- 98250b661123Smrg# Minimum version: 1.5.0 9826880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 98270b661123Smrg# 98280b661123Smrg# Documentation tools are not always available on all platforms and sometimes 98290b661123Smrg# not at the appropriate level. This macro enables a module to test for the 98300b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 98310b661123Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9832880c7e28Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9833880c7e28Smrg# --with-asciidoc assumes 'auto'. 98340b661123Smrg# 98350b661123Smrg# Interface to module: 98360b661123Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 98370b661123Smrg# ASCIIDOC: returns the path of the asciidoc program found 98380b661123Smrg# returns the path set by the user in the environment 98390b661123Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 98400b661123Smrg# 'no' user instructs the module not to use asciidoc 98410b661123Smrg# 98420b661123Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 98430b661123Smrg# 98440b661123SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 98450b661123SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9846880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 98470b661123SmrgAC_ARG_WITH(asciidoc, 98480b661123Smrg AS_HELP_STRING([--with-asciidoc], 9849880c7e28Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9850880c7e28Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9851880c7e28Smrgm4_undefine([_defopt]) 98520b661123Smrg 98530b661123Smrgif test "x$use_asciidoc" = x"auto"; then 98540b661123Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 98550b661123Smrg if test "x$ASCIIDOC" = "x"; then 98560b661123Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 98570b661123Smrg have_asciidoc=no 98580b661123Smrg else 98590b661123Smrg have_asciidoc=yes 98600b661123Smrg fi 98610b661123Smrgelif test "x$use_asciidoc" = x"yes" ; then 98620b661123Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 98630b661123Smrg if test "x$ASCIIDOC" = "x"; then 98640b661123Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 98650b661123Smrg fi 98660b661123Smrg have_asciidoc=yes 98670b661123Smrgelif test "x$use_asciidoc" = x"no" ; then 98680b661123Smrg if test "x$ASCIIDOC" != "x"; then 98690b661123Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 98700b661123Smrg fi 98710b661123Smrg have_asciidoc=no 98720b661123Smrgelse 98730b661123Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 98740b661123Smrgfi 98750b661123Smrgm4_ifval([$1], 98760b661123Smrg[if test "$have_asciidoc" = yes; then 98770b661123Smrg # scrape the asciidoc version 98780b661123Smrg AC_MSG_CHECKING([the asciidoc version]) 98790b661123Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 98800b661123Smrg AC_MSG_RESULT([$asciidoc_version]) 98810b661123Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 98820b661123Smrg [if test "x$use_asciidoc" = xauto; then 98830b661123Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 98840b661123Smrg have_asciidoc=no 98850b661123Smrg else 98860b661123Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 98870b661123Smrg fi]) 98880b661123Smrgfi]) 98890b661123SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 98900b661123Smrg]) # XORG_WITH_ASCIIDOC 98910b661123Smrg 9892880c7e28Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 98934f00d7e1Smrg# ------------------------------------------- 98940b661123Smrg# Minimum version: 1.5.0 9895880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 98964f00d7e1Smrg# Minimum version for optional DOT checking: 1.18.0 98970b661123Smrg# 98980b661123Smrg# Documentation tools are not always available on all platforms and sometimes 98990b661123Smrg# not at the appropriate level. This macro enables a module to test for the 99000b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 99010b661123Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9902880c7e28Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9903880c7e28Smrg# --with-doxygen assumes 'auto'. 99040b661123Smrg# 99050b661123Smrg# Interface to module: 99060b661123Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 99070b661123Smrg# DOXYGEN: returns the path of the doxygen program found 99080b661123Smrg# returns the path set by the user in the environment 99090b661123Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 99100b661123Smrg# 'no' user instructs the module not to use doxygen 99110b661123Smrg# 99120b661123Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 99130b661123Smrg# 99140b661123SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 99150b661123SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 99164f00d7e1SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 9917880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 99180b661123SmrgAC_ARG_WITH(doxygen, 99190b661123Smrg AS_HELP_STRING([--with-doxygen], 9920880c7e28Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 9921880c7e28Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 9922880c7e28Smrgm4_undefine([_defopt]) 99230b661123Smrg 99240b661123Smrgif test "x$use_doxygen" = x"auto"; then 99250b661123Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 99260b661123Smrg if test "x$DOXYGEN" = "x"; then 99270b661123Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 99280b661123Smrg have_doxygen=no 99290b661123Smrg else 99300b661123Smrg have_doxygen=yes 99310b661123Smrg fi 99320b661123Smrgelif test "x$use_doxygen" = x"yes" ; then 99330b661123Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 99340b661123Smrg if test "x$DOXYGEN" = "x"; then 99350b661123Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 99360b661123Smrg fi 99370b661123Smrg have_doxygen=yes 99380b661123Smrgelif test "x$use_doxygen" = x"no" ; then 99390b661123Smrg if test "x$DOXYGEN" != "x"; then 99400b661123Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 99410b661123Smrg fi 99420b661123Smrg have_doxygen=no 99430b661123Smrgelse 99440b661123Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 99450b661123Smrgfi 99460b661123Smrgm4_ifval([$1], 99470b661123Smrg[if test "$have_doxygen" = yes; then 99480b661123Smrg # scrape the doxygen version 99490b661123Smrg AC_MSG_CHECKING([the doxygen version]) 99500b661123Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 99510b661123Smrg AC_MSG_RESULT([$doxygen_version]) 99520b661123Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 99530b661123Smrg [if test "x$use_doxygen" = xauto; then 99540b661123Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 99550b661123Smrg have_doxygen=no 99560b661123Smrg else 99570b661123Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 99580b661123Smrg fi]) 99590b661123Smrgfi]) 99604f00d7e1Smrg 99614f00d7e1Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 99624f00d7e1Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 99634f00d7e1Smrgdnl HAVE_DOT = @HAVE_DOT@ 99644f00d7e1SmrgHAVE_DOT=no 99654f00d7e1Smrgif test "x$have_doxygen" = "xyes"; then 99664f00d7e1Smrg AC_PATH_PROG([DOT], [dot]) 99674f00d7e1Smrg if test "x$DOT" != "x"; then 99684f00d7e1Smrg HAVE_DOT=yes 99694f00d7e1Smrg fi 99704f00d7e1Smrgfi 99714f00d7e1Smrg 99724f00d7e1SmrgAC_SUBST([HAVE_DOT]) 99734f00d7e1SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 99740b661123SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 99750b661123Smrg]) # XORG_WITH_DOXYGEN 99760b661123Smrg 9977880c7e28Smrg# XORG_WITH_GROFF([DEFAULT]) 99780b661123Smrg# ---------------- 99790b661123Smrg# Minimum version: 1.6.0 9980880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 99810b661123Smrg# 99820b661123Smrg# Documentation tools are not always available on all platforms and sometimes 99830b661123Smrg# not at the appropriate level. This macro enables a module to test for the 99840b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 99850b661123Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 9986880c7e28Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 9987880c7e28Smrg# --with-groff assumes 'auto'. 99880b661123Smrg# 99890b661123Smrg# Interface to module: 99900b661123Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 99910b661123Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 99920b661123Smrg# HAVE_GROFF_MS: the -ms macros package 99930b661123Smrg# GROFF: returns the path of the groff program found 99940b661123Smrg# returns the path set by the user in the environment 99950b661123Smrg# --with-groff: 'yes' user instructs the module to use groff 99960b661123Smrg# 'no' user instructs the module not to use groff 99970b661123Smrg# 9998880c7e28Smrg# Added in version 1.9.0: 9999880c7e28Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10000880c7e28Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10001880c7e28Smrg# psselect from the psutils package. 10002880c7e28Smrg# the ghostcript package. Refer to the grohtml man pages 10003880c7e28Smrg# 100040b661123Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 100050b661123Smrg# 100060b661123Smrg# OS and distros often splits groff in a basic and full package, the former 100070b661123Smrg# having the groff program and the later having devices, fonts and macros 100080b661123Smrg# Checking for the groff executable is not enough. 100090b661123Smrg# 100100b661123Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 100110b661123Smrg# unset HAVE_GROFF or GROFF env variables. 100120b661123Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 100130b661123Smrg# 100140b661123SmrgAC_DEFUN([XORG_WITH_GROFF],[ 100150b661123SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10016880c7e28Smrgm4_define([_defopt], m4_default([$1], [auto])) 100170b661123SmrgAC_ARG_WITH(groff, 100180b661123Smrg AS_HELP_STRING([--with-groff], 10019880c7e28Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10020880c7e28Smrg [use_groff=$withval], [use_groff=]_defopt) 10021880c7e28Smrgm4_undefine([_defopt]) 100220b661123Smrg 100230b661123Smrgif test "x$use_groff" = x"auto"; then 100240b661123Smrg AC_PATH_PROG([GROFF], [groff]) 100250b661123Smrg if test "x$GROFF" = "x"; then 100260b661123Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 100270b661123Smrg have_groff=no 100280b661123Smrg else 100290b661123Smrg have_groff=yes 100300b661123Smrg fi 100310b661123Smrgelif test "x$use_groff" = x"yes" ; then 100320b661123Smrg AC_PATH_PROG([GROFF], [groff]) 100330b661123Smrg if test "x$GROFF" = "x"; then 100340b661123Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 100350b661123Smrg fi 100360b661123Smrg have_groff=yes 100370b661123Smrgelif test "x$use_groff" = x"no" ; then 100380b661123Smrg if test "x$GROFF" != "x"; then 100390b661123Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 100400b661123Smrg fi 100410b661123Smrg have_groff=no 100420b661123Smrgelse 100430b661123Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 100440b661123Smrgfi 10045880c7e28Smrg 100460b661123Smrg# We have groff, test for the presence of the macro packages 100470b661123Smrgif test "x$have_groff" = x"yes"; then 100480b661123Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 100490b661123Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 100500b661123Smrg groff_ms_works=yes 100510b661123Smrg else 100520b661123Smrg groff_ms_works=no 100530b661123Smrg fi 100540b661123Smrg AC_MSG_RESULT([$groff_ms_works]) 100550b661123Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 100560b661123Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 100570b661123Smrg groff_mm_works=yes 100580b661123Smrg else 100590b661123Smrg groff_mm_works=no 100600b661123Smrg fi 100610b661123Smrg AC_MSG_RESULT([$groff_mm_works]) 100620b661123Smrgfi 10063880c7e28Smrg 10064880c7e28Smrg# We have groff, test for HTML dependencies, one command per package 10065880c7e28Smrgif test "x$have_groff" = x"yes"; then 10066880c7e28Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10067880c7e28Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10068880c7e28Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10069880c7e28Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10070880c7e28Smrg have_groff_html=yes 10071880c7e28Smrg else 10072880c7e28Smrg have_groff_html=no 10073880c7e28Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10074880c7e28Smrg fi 10075880c7e28Smrgfi 10076880c7e28Smrg 10077880c7e28Smrg# Set Automake conditionals for Makefiles 100780b661123SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 100790b661123SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 100800b661123SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10081880c7e28SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 100820b661123Smrg]) # XORG_WITH_GROFF 100830b661123Smrg 10084880c7e28Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10085880c7e28Smrg# --------------------------------------- 100860b661123Smrg# Minimum version: 1.6.0 10087880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10088880c7e28Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 100890b661123Smrg# 100900b661123Smrg# Documentation tools are not always available on all platforms and sometimes 100910b661123Smrg# not at the appropriate level. This macro enables a module to test for the 100920b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 100930b661123Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 10094880c7e28Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 10095880c7e28Smrg# --with-fop assumes 'auto'. 100960b661123Smrg# 100970b661123Smrg# Interface to module: 100980b661123Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 100990b661123Smrg# FOP: returns the path of the fop program found 101000b661123Smrg# returns the path set by the user in the environment 101010b661123Smrg# --with-fop: 'yes' user instructs the module to use fop 101020b661123Smrg# 'no' user instructs the module not to use fop 101030b661123Smrg# 101040b661123Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 101050b661123Smrg# 101060b661123SmrgAC_DEFUN([XORG_WITH_FOP],[ 101070b661123SmrgAC_ARG_VAR([FOP], [Path to fop command]) 10108880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 101090b661123SmrgAC_ARG_WITH(fop, 101100b661123Smrg AS_HELP_STRING([--with-fop], 10111880c7e28Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10112880c7e28Smrg [use_fop=$withval], [use_fop=]_defopt) 10113880c7e28Smrgm4_undefine([_defopt]) 101140b661123Smrg 101150b661123Smrgif test "x$use_fop" = x"auto"; then 101160b661123Smrg AC_PATH_PROG([FOP], [fop]) 101170b661123Smrg if test "x$FOP" = "x"; then 101180b661123Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 101190b661123Smrg have_fop=no 101200b661123Smrg else 101210b661123Smrg have_fop=yes 101220b661123Smrg fi 101230b661123Smrgelif test "x$use_fop" = x"yes" ; then 101240b661123Smrg AC_PATH_PROG([FOP], [fop]) 101250b661123Smrg if test "x$FOP" = "x"; then 101260b661123Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 101270b661123Smrg fi 101280b661123Smrg have_fop=yes 101290b661123Smrgelif test "x$use_fop" = x"no" ; then 101300b661123Smrg if test "x$FOP" != "x"; then 101310b661123Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 101320b661123Smrg fi 101330b661123Smrg have_fop=no 101340b661123Smrgelse 101350b661123Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 101360b661123Smrgfi 10137880c7e28Smrg 10138880c7e28Smrg# Test for a minimum version of fop, if provided. 10139880c7e28Smrgm4_ifval([$1], 10140880c7e28Smrg[if test "$have_fop" = yes; then 10141880c7e28Smrg # scrape the fop version 10142880c7e28Smrg AC_MSG_CHECKING([for fop minimum version]) 10143880c7e28Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10144880c7e28Smrg AC_MSG_RESULT([$fop_version]) 10145880c7e28Smrg AS_VERSION_COMPARE([$fop_version], [$1], 10146880c7e28Smrg [if test "x$use_fop" = xauto; then 10147880c7e28Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10148880c7e28Smrg have_fop=no 10149880c7e28Smrg else 10150880c7e28Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10151880c7e28Smrg fi]) 10152880c7e28Smrgfi]) 101530b661123SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 101540b661123Smrg]) # XORG_WITH_FOP 101550b661123Smrg 101564f00d7e1Smrg# XORG_WITH_M4([MIN-VERSION]) 101574f00d7e1Smrg# --------------------------- 101584f00d7e1Smrg# Minimum version: 1.19.0 101594f00d7e1Smrg# 101604f00d7e1Smrg# This macro attempts to locate an m4 macro processor which supports 101614f00d7e1Smrg# -I option and is only useful for modules relying on M4 in order to 101624f00d7e1Smrg# expand macros in source code files. 101634f00d7e1Smrg# 101644f00d7e1Smrg# Interface to module: 101654f00d7e1Smrg# M4: returns the path of the m4 program found 101664f00d7e1Smrg# returns the path set by the user in the environment 101674f00d7e1Smrg# 101684f00d7e1SmrgAC_DEFUN([XORG_WITH_M4], [ 101694f00d7e1SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 101704f00d7e1Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 101714f00d7e1Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 101724f00d7e1Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 101734f00d7e1Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 101744f00d7e1Smrg [$PATH:/usr/gnu/bin])]) 101754f00d7e1Smrg 101764f00d7e1SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 101774f00d7e1Smrg]) # XORG_WITH_M4 101784f00d7e1Smrg 10179880c7e28Smrg# XORG_WITH_PS2PDF([DEFAULT]) 101800b661123Smrg# ---------------- 101810b661123Smrg# Minimum version: 1.6.0 10182880c7e28Smrg# Minimum version for optional DEFAULT argument: 1.11.0 101830b661123Smrg# 101840b661123Smrg# Documentation tools are not always available on all platforms and sometimes 101850b661123Smrg# not at the appropriate level. This macro enables a module to test for the 101860b661123Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 101870b661123Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10188880c7e28Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10189880c7e28Smrg# --with-ps2pdf assumes 'auto'. 101900b661123Smrg# 101910b661123Smrg# Interface to module: 101920b661123Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 101930b661123Smrg# PS2PDF: returns the path of the ps2pdf program found 101940b661123Smrg# returns the path set by the user in the environment 101950b661123Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 101960b661123Smrg# 'no' user instructs the module not to use ps2pdf 101970b661123Smrg# 101980b661123Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 101990b661123Smrg# 102000b661123SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 102010b661123SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10202880c7e28Smrgm4_define([_defopt], m4_default([$1], [auto])) 102030b661123SmrgAC_ARG_WITH(ps2pdf, 102040b661123Smrg AS_HELP_STRING([--with-ps2pdf], 10205880c7e28Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10206880c7e28Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10207880c7e28Smrgm4_undefine([_defopt]) 102080b661123Smrg 102090b661123Smrgif test "x$use_ps2pdf" = x"auto"; then 102100b661123Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 102110b661123Smrg if test "x$PS2PDF" = "x"; then 102120b661123Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 102130b661123Smrg have_ps2pdf=no 102140b661123Smrg else 102150b661123Smrg have_ps2pdf=yes 102160b661123Smrg fi 102170b661123Smrgelif test "x$use_ps2pdf" = x"yes" ; then 102180b661123Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 102190b661123Smrg if test "x$PS2PDF" = "x"; then 102200b661123Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 102210b661123Smrg fi 102220b661123Smrg have_ps2pdf=yes 102230b661123Smrgelif test "x$use_ps2pdf" = x"no" ; then 102240b661123Smrg if test "x$PS2PDF" != "x"; then 102250b661123Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 102260b661123Smrg fi 102270b661123Smrg have_ps2pdf=no 102280b661123Smrgelse 102290b661123Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 102300b661123Smrgfi 102310b661123SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 102320b661123Smrg]) # XORG_WITH_PS2PDF 102330b661123Smrg 102340b661123Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 102350b661123Smrg# ---------------- 102360b661123Smrg# Minimum version: 1.6.0 102370b661123Smrg# 102380b661123Smrg# Documentation tools are not always available on all platforms and sometimes 102390b661123Smrg# not at the appropriate level. This macro enables a builder to skip all 102400b661123Smrg# documentation targets except traditional man pages. 102410b661123Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 102420b661123Smrg# maximum flexibilty in controlling documentation building. 102430b661123Smrg# Refer to: 102440b661123Smrg# XORG_WITH_XMLTO --with-xmlto 102450b661123Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 102460b661123Smrg# XORG_WITH_DOXYGEN --with-doxygen 102470b661123Smrg# XORG_WITH_FOP --with-fop 102480b661123Smrg# XORG_WITH_GROFF --with-groff 102490b661123Smrg# XORG_WITH_PS2PDF --with-ps2pdf 102500b661123Smrg# 102510b661123Smrg# Interface to module: 102520b661123Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 102530b661123Smrg# --enable-docs: 'yes' user instructs the module to generate docs 102540b661123Smrg# 'no' user instructs the module not to generate docs 102550b661123Smrg# parm1: specify the default value, yes or no. 102560b661123Smrg# 102570b661123SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10258880c7e28Smrgm4_define([docs_default], m4_default([$1], [yes])) 102590b661123SmrgAC_ARG_ENABLE(docs, 102600b661123Smrg AS_HELP_STRING([--enable-docs], 10261880c7e28Smrg [Enable building the documentation (default: ]docs_default[)]), 10262880c7e28Smrg [build_docs=$enableval], [build_docs=]docs_default) 10263880c7e28Smrgm4_undefine([docs_default]) 102640b661123SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 102650b661123SmrgAC_MSG_CHECKING([whether to build documentation]) 102660b661123SmrgAC_MSG_RESULT([$build_docs]) 102670b661123Smrg]) # XORG_ENABLE_DOCS 102680b661123Smrg 102690b661123Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 102700b661123Smrg# ---------------- 102710b661123Smrg# Minimum version: 1.6.0 102720b661123Smrg# 102730b661123Smrg# This macro enables a builder to skip all developer documentation. 102740b661123Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 102750b661123Smrg# maximum flexibilty in controlling documentation building. 102760b661123Smrg# Refer to: 102770b661123Smrg# XORG_WITH_XMLTO --with-xmlto 102780b661123Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 102790b661123Smrg# XORG_WITH_DOXYGEN --with-doxygen 102800b661123Smrg# XORG_WITH_FOP --with-fop 102810b661123Smrg# XORG_WITH_GROFF --with-groff 102820b661123Smrg# XORG_WITH_PS2PDF --with-ps2pdf 102830b661123Smrg# 102840b661123Smrg# Interface to module: 102850b661123Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 102860b661123Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 102870b661123Smrg# 'no' user instructs the module not to generate developer docs 102880b661123Smrg# parm1: specify the default value, yes or no. 102890b661123Smrg# 102900b661123SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10291880c7e28Smrgm4_define([devel_default], m4_default([$1], [yes])) 102920b661123SmrgAC_ARG_ENABLE(devel-docs, 102930b661123Smrg AS_HELP_STRING([--enable-devel-docs], 10294880c7e28Smrg [Enable building the developer documentation (default: ]devel_default[)]), 10295880c7e28Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10296880c7e28Smrgm4_undefine([devel_default]) 102970b661123SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 102980b661123SmrgAC_MSG_CHECKING([whether to build developer documentation]) 102990b661123SmrgAC_MSG_RESULT([$build_devel_docs]) 103000b661123Smrg]) # XORG_ENABLE_DEVEL_DOCS 103010b661123Smrg 103020b661123Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 103030b661123Smrg# ---------------- 103040b661123Smrg# Minimum version: 1.6.0 103050b661123Smrg# 103060b661123Smrg# This macro enables a builder to skip all functional specification targets. 103070b661123Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 103080b661123Smrg# maximum flexibilty in controlling documentation building. 103090b661123Smrg# Refer to: 103100b661123Smrg# XORG_WITH_XMLTO --with-xmlto 103110b661123Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 103120b661123Smrg# XORG_WITH_DOXYGEN --with-doxygen 103130b661123Smrg# XORG_WITH_FOP --with-fop 103140b661123Smrg# XORG_WITH_GROFF --with-groff 103150b661123Smrg# XORG_WITH_PS2PDF --with-ps2pdf 103160b661123Smrg# 103170b661123Smrg# Interface to module: 103180b661123Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 103190b661123Smrg# --enable-specs: 'yes' user instructs the module to generate specs 103200b661123Smrg# 'no' user instructs the module not to generate specs 103210b661123Smrg# parm1: specify the default value, yes or no. 103220b661123Smrg# 103230b661123SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10324880c7e28Smrgm4_define([spec_default], m4_default([$1], [yes])) 103250b661123SmrgAC_ARG_ENABLE(specs, 103260b661123Smrg AS_HELP_STRING([--enable-specs], 10327880c7e28Smrg [Enable building the specs (default: ]spec_default[)]), 10328880c7e28Smrg [build_specs=$enableval], [build_specs=]spec_default) 10329880c7e28Smrgm4_undefine([spec_default]) 103300b661123SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 103310b661123SmrgAC_MSG_CHECKING([whether to build functional specifications]) 103320b661123SmrgAC_MSG_RESULT([$build_specs]) 103330b661123Smrg]) # XORG_ENABLE_SPECS 103340b661123Smrg 10335880c7e28Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10336880c7e28Smrg# ---------------------------------------------- 10337880c7e28Smrg# Minimum version: 1.13.0 10338880c7e28Smrg# 10339880c7e28Smrg# This macro enables a builder to enable/disable unit testing 10340880c7e28Smrg# It makes no assumption about the test cases implementation 10341880c7e28Smrg# Test cases may or may not use Automake "Support for test suites" 10342880c7e28Smrg# They may or may not use the software utility library GLib 10343880c7e28Smrg# 10344880c7e28Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10345880c7e28Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10346880c7e28Smrg# The variable enable_unit_tests is used by other macros in this file. 10347880c7e28Smrg# 10348880c7e28Smrg# Interface to module: 10349880c7e28Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10350880c7e28Smrg# enable_unit_tests: used in configure.ac for additional configuration 10351880c7e28Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10352880c7e28Smrg# 'no' user instructs the module not to build tests 10353880c7e28Smrg# parm1: specify the default value, yes or no. 10354880c7e28Smrg# 10355880c7e28SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10356880c7e28SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10357880c7e28SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10358880c7e28SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10359880c7e28Smrgm4_define([_defopt], m4_default([$1], [auto])) 10360880c7e28SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10361880c7e28Smrg [Enable building unit test cases (default: ]_defopt[)]), 10362880c7e28Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10363880c7e28Smrgm4_undefine([_defopt]) 10364880c7e28SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10365880c7e28SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10366880c7e28SmrgAC_MSG_RESULT([$enable_unit_tests]) 10367880c7e28Smrg]) # XORG_ENABLE_UNIT_TESTS 10368880c7e28Smrg 10369880c7e28Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10370880c7e28Smrg# ------------------------------------------------------ 10371880c7e28Smrg# Minimum version: 1.17.0 10372880c7e28Smrg# 10373880c7e28Smrg# This macro enables a builder to enable/disable integration testing 10374880c7e28Smrg# It makes no assumption about the test cases' implementation 10375880c7e28Smrg# Test cases may or may not use Automake "Support for test suites" 10376880c7e28Smrg# 10377880c7e28Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10378880c7e28Smrg# usually requires less dependencies and may be built and run under less 10379880c7e28Smrg# stringent environments than integration tests. 10380880c7e28Smrg# 10381880c7e28Smrg# Interface to module: 10382880c7e28Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10383880c7e28Smrg# enable_integration_tests: used in configure.ac for additional configuration 10384880c7e28Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10385880c7e28Smrg# 'no' user instructs the module not to build tests 10386880c7e28Smrg# parm1: specify the default value, yes or no. 10387880c7e28Smrg# 10388880c7e28SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10389880c7e28SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10390880c7e28Smrgm4_define([_defopt], m4_default([$1], [auto])) 10391880c7e28SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10392880c7e28Smrg [Enable building integration test cases (default: ]_defopt[)]), 10393880c7e28Smrg [enable_integration_tests=$enableval], 10394880c7e28Smrg [enable_integration_tests=]_defopt) 10395880c7e28Smrgm4_undefine([_defopt]) 10396880c7e28SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10397880c7e28Smrg [test "x$enable_integration_tests" != xno]) 10398880c7e28SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10399880c7e28SmrgAC_MSG_RESULT([$enable_integration_tests]) 10400880c7e28Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 10401880c7e28Smrg 10402880c7e28Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10403880c7e28Smrg# ---------------------------------------- 10404880c7e28Smrg# Minimum version: 1.13.0 10405880c7e28Smrg# 10406880c7e28Smrg# GLib is a library which provides advanced data structures and functions. 10407880c7e28Smrg# This macro enables a module to test for the presence of Glib. 10408880c7e28Smrg# 10409880c7e28Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10410880c7e28Smrg# Otherwise the value of $enable_unit_tests is blank. 10411880c7e28Smrg# 10412880c7e28Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10413880c7e28Smrg# test support usually requires less dependencies and may be built and run under 10414880c7e28Smrg# less stringent environments than integration tests. 10415880c7e28Smrg# 10416880c7e28Smrg# Interface to module: 10417880c7e28Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 10418880c7e28Smrg# with_glib: used in configure.ac to know if GLib has been found 10419880c7e28Smrg# --with-glib: 'yes' user instructs the module to use glib 10420880c7e28Smrg# 'no' user instructs the module not to use glib 10421880c7e28Smrg# 10422880c7e28SmrgAC_DEFUN([XORG_WITH_GLIB],[ 10423880c7e28SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10424880c7e28Smrgm4_define([_defopt], m4_default([$2], [auto])) 10425880c7e28SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10426880c7e28Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 10427880c7e28Smrg [with_glib=$withval], [with_glib=]_defopt) 10428880c7e28Smrgm4_undefine([_defopt]) 10429880c7e28Smrg 10430880c7e28Smrghave_glib=no 10431880c7e28Smrg# Do not probe GLib if user explicitly disabled unit testing 10432880c7e28Smrgif test "x$enable_unit_tests" != x"no"; then 10433880c7e28Smrg # Do not probe GLib if user explicitly disabled it 10434880c7e28Smrg if test "x$with_glib" != x"no"; then 10435880c7e28Smrg m4_ifval( 10436880c7e28Smrg [$1], 10437880c7e28Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10438880c7e28Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10439880c7e28Smrg ) 10440880c7e28Smrg fi 10441880c7e28Smrgfi 10442880c7e28Smrg 10443880c7e28Smrg# Not having GLib when unit testing has been explicitly requested is an error 10444880c7e28Smrgif test "x$enable_unit_tests" = x"yes"; then 10445880c7e28Smrg if test "x$have_glib" = x"no"; then 10446880c7e28Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10447880c7e28Smrg fi 10448880c7e28Smrgfi 10449880c7e28Smrg 10450880c7e28Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 10451880c7e28Smrgif test "x$enable_unit_tests" = x"no"; then 10452880c7e28Smrg if test "x$with_glib" = x"yes"; then 10453880c7e28Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10454880c7e28Smrg fi 10455880c7e28Smrgfi 10456880c7e28Smrg 10457880c7e28Smrg# Not having GLib when it has been explicitly requested is an error 10458880c7e28Smrgif test "x$with_glib" = x"yes"; then 10459880c7e28Smrg if test "x$have_glib" = x"no"; then 10460880c7e28Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10461880c7e28Smrg fi 10462880c7e28Smrgfi 10463880c7e28Smrg 10464880c7e28SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10465880c7e28Smrg]) # XORG_WITH_GLIB 10466880c7e28Smrg 10467880c7e28Smrg# XORG_LD_WRAP([required|optional]) 10468880c7e28Smrg# --------------------------------- 10469880c7e28Smrg# Minimum version: 1.13.0 10470880c7e28Smrg# 10471880c7e28Smrg# Check if linker supports -wrap, passed via compiler flags 10472880c7e28Smrg# 10473880c7e28Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10474880c7e28Smrg# Otherwise the value of $enable_unit_tests is blank. 10475880c7e28Smrg# 10476880c7e28Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10477880c7e28Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10478880c7e28Smrg# available, an argument of "optional" allows use when some unit tests require 10479880c7e28Smrg# ld -wrap and others do not. 10480880c7e28Smrg# 10481880c7e28SmrgAC_DEFUN([XORG_LD_WRAP],[ 10482880c7e28SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10483880c7e28Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 10484880c7e28Smrg void __wrap_exit(int status) { return; }], 10485880c7e28Smrg [exit(0);])]) 10486880c7e28Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 10487880c7e28Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10488880c7e28Smrg if test "x$have_ld_wrap" = x"no"; then 10489880c7e28Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10490880c7e28Smrg fi 10491880c7e28Smrgfi 10492880c7e28SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10493880c7e28Smrg# 10494880c7e28Smrg]) # XORG_LD_WRAP 10495880c7e28Smrg 10496880c7e28Smrg# XORG_CHECK_LINKER_FLAGS 10497880c7e28Smrg# ----------------------- 10498880c7e28Smrg# SYNOPSIS 10499880c7e28Smrg# 10500880c7e28Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10501880c7e28Smrg# 10502880c7e28Smrg# DESCRIPTION 10503880c7e28Smrg# 10504880c7e28Smrg# Check whether the given linker FLAGS work with the current language's 10505880c7e28Smrg# linker, or whether they give an error. 10506880c7e28Smrg# 10507880c7e28Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10508880c7e28Smrg# success/failure. 10509880c7e28Smrg# 10510880c7e28Smrg# PROGRAM-SOURCE is the program source to link with, if needed 10511880c7e28Smrg# 10512880c7e28Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10513880c7e28Smrg# 10514880c7e28Smrg# LICENSE 10515880c7e28Smrg# 10516880c7e28Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10517880c7e28Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10518880c7e28Smrg# Copyright (c) 2009 Matteo Frigo 10519880c7e28Smrg# 10520880c7e28Smrg# This program is free software: you can redistribute it and/or modify it 10521880c7e28Smrg# under the terms of the GNU General Public License as published by the 10522880c7e28Smrg# Free Software Foundation, either version 3 of the License, or (at your 10523880c7e28Smrg# option) any later version. 10524880c7e28Smrg# 10525880c7e28Smrg# This program is distributed in the hope that it will be useful, but 10526880c7e28Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10527880c7e28Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10528880c7e28Smrg# Public License for more details. 10529880c7e28Smrg# 10530880c7e28Smrg# You should have received a copy of the GNU General Public License along 10531880c7e28Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10532880c7e28Smrg# 10533880c7e28Smrg# As a special exception, the respective Autoconf Macro's copyright owner 10534880c7e28Smrg# gives unlimited permission to copy, distribute and modify the configure 10535880c7e28Smrg# scripts that are the output of Autoconf when processing the Macro. You 10536880c7e28Smrg# need not follow the terms of the GNU General Public License when using 10537880c7e28Smrg# or distributing such scripts, even though portions of the text of the 10538880c7e28Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10539880c7e28Smrg# all other use of the material that constitutes the Autoconf Macro. 10540880c7e28Smrg# 10541880c7e28Smrg# This special exception to the GPL applies to versions of the Autoconf 10542880c7e28Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10543880c7e28Smrg# modified version of the Autoconf Macro, you may extend this special 10544880c7e28Smrg# exception to the GPL to apply to your modified version as well.# 10545880c7e28SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10546880c7e28Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10547880c7e28Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10548880c7e28SmrgAS_LITERAL_IF([$1], 10549880c7e28Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10550880c7e28Smrg ax_save_FLAGS=$LDFLAGS 10551880c7e28Smrg LDFLAGS="$1" 10552880c7e28Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10553880c7e28Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10554880c7e28Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10555880c7e28Smrg LDFLAGS=$ax_save_FLAGS])], 10556880c7e28Smrg [ax_save_FLAGS=$LDFLAGS 10557880c7e28Smrg LDFLAGS="$1" 10558880c7e28Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10559880c7e28Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10560880c7e28Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10561880c7e28Smrg LDFLAGS=$ax_save_FLAGS]) 10562880c7e28Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10563880c7e28SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10564880c7e28Smrgif test "x$xorg_check_linker_flags" = xyes; then 10565880c7e28Smrg m4_default([$2], :) 10566880c7e28Smrgelse 10567880c7e28Smrg m4_default([$3], :) 10568880c7e28Smrgfi 10569880c7e28Smrg]) # XORG_CHECK_LINKER_FLAGS 10570880c7e28Smrg 10571880c7e28Smrg# XORG_MEMORY_CHECK_FLAGS 10572880c7e28Smrg# ----------------------- 10573880c7e28Smrg# Minimum version: 1.16.0 10574880c7e28Smrg# 10575880c7e28Smrg# This macro attempts to find appropriate memory checking functionality 10576880c7e28Smrg# for various platforms which unit testing code may use to catch various 10577880c7e28Smrg# forms of memory allocation and access errors in testing. 10578880c7e28Smrg# 10579880c7e28Smrg# Interface to module: 10580880c7e28Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10581880c7e28Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10582880c7e28Smrg# 10583880c7e28Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10584880c7e28Smrg# 10585880c7e28SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10586880c7e28Smrg 10587880c7e28SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10588880c7e28SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10589880c7e28Smrg [Environment variables to enable memory checking in tests]) 10590880c7e28Smrg 10591880c7e28Smrg# Check for different types of support on different platforms 10592880c7e28Smrgcase $host_os in 10593880c7e28Smrg solaris*) 10594880c7e28Smrg AC_CHECK_LIB([umem], [umem_alloc], 10595880c7e28Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10596880c7e28Smrg ;; 10597880c7e28Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10598880c7e28Smrg # both directly and inverted, so should not be 0 or 255. 10599880c7e28Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10600880c7e28Smrg ;; 10601880c7e28Smrg darwin*) 10602880c7e28Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10603880c7e28Smrg ;; 10604880c7e28Smrg *bsd*) 10605880c7e28Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10606880c7e28Smrg ;; 10607880c7e28Smrgesac 10608880c7e28Smrg 10609880c7e28Smrg# User supplied flags override default flags 10610880c7e28Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10611880c7e28Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10612880c7e28Smrgfi 10613880c7e28Smrg 10614880c7e28SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10615880c7e28Smrg]) # XORG_WITH_LINT 10616880c7e28Smrg 10617bdcaa8d0Smrg# XORG_CHECK_MALLOC_ZERO 10618bdcaa8d0Smrg# ---------------------- 10619bdcaa8d0Smrg# Minimum version: 1.0.0 10620bdcaa8d0Smrg# 10621bdcaa8d0Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10622bdcaa8d0Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 10623bdcaa8d0Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10624bdcaa8d0SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10625bdcaa8d0SmrgAC_ARG_ENABLE(malloc0returnsnull, 106260b661123Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 10627bdcaa8d0Smrg [malloc(0) returns NULL (default: auto)]), 10628bdcaa8d0Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10629bdcaa8d0Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10630bdcaa8d0Smrg 10631bdcaa8d0SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10632bdcaa8d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 106334f00d7e1SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 106344f00d7e1Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10635880c7e28Smrg#include <stdlib.h> 10636880c7e28Smrg],[ 10637bdcaa8d0Smrg char *m0, *r0, *c0, *p; 10638bdcaa8d0Smrg m0 = malloc(0); 10639bdcaa8d0Smrg p = malloc(10); 10640bdcaa8d0Smrg r0 = realloc(p,0); 10641880c7e28Smrg c0 = calloc(0,10); 10642880c7e28Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10643880c7e28Smrg])], 106444f00d7e1Smrg [xorg_cv_malloc0_returns_null=yes], 106454f00d7e1Smrg [xorg_cv_malloc0_returns_null=no])]) 106464f00d7e1SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10647bdcaa8d0Smrgfi 10648bdcaa8d0SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10649bdcaa8d0Smrg 10650bdcaa8d0Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10651bdcaa8d0Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10652bdcaa8d0Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10653bdcaa8d0Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10654bdcaa8d0Smrgelse 10655bdcaa8d0Smrg MALLOC_ZERO_CFLAGS="" 10656bdcaa8d0Smrg XMALLOC_ZERO_CFLAGS="" 10657bdcaa8d0Smrg XTMALLOC_ZERO_CFLAGS="" 10658bdcaa8d0Smrgfi 10659bdcaa8d0Smrg 10660bdcaa8d0SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10661bdcaa8d0SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10662bdcaa8d0SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10663bdcaa8d0Smrg]) # XORG_CHECK_MALLOC_ZERO 10664bdcaa8d0Smrg 10665bdcaa8d0Smrg# XORG_WITH_LINT() 10666bdcaa8d0Smrg# ---------------- 10667bdcaa8d0Smrg# Minimum version: 1.1.0 10668bdcaa8d0Smrg# 106690b661123Smrg# This macro enables the use of a tool that flags some suspicious and 106700b661123Smrg# non-portable constructs (likely to be bugs) in C language source code. 106710b661123Smrg# It will attempt to locate the tool and use appropriate options. 106720b661123Smrg# There are various lint type tools on different platforms. 106730b661123Smrg# 106740b661123Smrg# Interface to module: 106750b661123Smrg# LINT: returns the path to the tool found on the platform 106760b661123Smrg# or the value set to LINT on the configure cmd line 106770b661123Smrg# also an Automake conditional 106780b661123Smrg# LINT_FLAGS: an Automake variable with appropriate flags 106790b661123Smrg# 106800b661123Smrg# --with-lint: 'yes' user instructs the module to use lint 106810b661123Smrg# 'no' user instructs the module not to use lint (default) 106820b661123Smrg# 106830b661123Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 106840b661123Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10685bdcaa8d0Smrg# 10686bdcaa8d0SmrgAC_DEFUN([XORG_WITH_LINT],[ 10687bdcaa8d0Smrg 106880b661123SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 106890b661123SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 106900b661123SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10691bdcaa8d0Smrg [Use a lint-style source code checker (default: disabled)])], 10692bdcaa8d0Smrg [use_lint=$withval], [use_lint=no]) 106930b661123Smrg 106940b661123Smrg# Obtain platform specific info like program name and options 106950b661123Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 106960b661123Smrgcase $host_os in 106970b661123Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 106980b661123Smrg lint_name=splint 106990b661123Smrg lint_options="-badflag" 107000b661123Smrg ;; 107010b661123Smrg *freebsd* | *netbsd*) 107020b661123Smrg lint_name=lint 107030b661123Smrg lint_options="-u -b" 107040b661123Smrg ;; 107050b661123Smrg *solaris*) 107060b661123Smrg lint_name=lint 107070b661123Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 107080b661123Smrg ;; 107090b661123Smrgesac 107100b661123Smrg 107110b661123Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 107120b661123Smrgif test "x$use_lint" = x"yes" ; then 107130b661123Smrg AC_PATH_PROG([LINT], [$lint_name]) 107140b661123Smrg if test "x$LINT" = "x"; then 107150b661123Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 107160b661123Smrg fi 107170b661123Smrgelif test "x$use_lint" = x"no" ; then 107180b661123Smrg if test "x$LINT" != "x"; then 107190b661123Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 107200b661123Smrg fi 10721bdcaa8d0Smrgelse 107220b661123Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10723bdcaa8d0Smrgfi 107240b661123Smrg 107250b661123Smrg# User supplied flags override default flags 107260b661123Smrgif test "x$LINT_FLAGS" != "x"; then 107270b661123Smrg lint_options=$LINT_FLAGS 10728bdcaa8d0Smrgfi 10729bdcaa8d0Smrg 107300b661123SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 107310b661123SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10732bdcaa8d0Smrg 10733bdcaa8d0Smrg]) # XORG_WITH_LINT 10734bdcaa8d0Smrg 10735bdcaa8d0Smrg# XORG_LINT_LIBRARY(LIBNAME) 10736bdcaa8d0Smrg# -------------------------- 10737bdcaa8d0Smrg# Minimum version: 1.1.0 10738bdcaa8d0Smrg# 10739bdcaa8d0Smrg# Sets up flags for building lint libraries for checking programs that call 10740bdcaa8d0Smrg# functions in the library. 10741bdcaa8d0Smrg# 107420b661123Smrg# Interface to module: 107430b661123Smrg# LINTLIB - Automake variable with the name of lint library file to make 107440b661123Smrg# MAKE_LINT_LIB - Automake conditional 107450b661123Smrg# 107460b661123Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 107470b661123Smrg# - 'no' user instructs the module not to create a lint library (default) 10748bdcaa8d0Smrg 10749bdcaa8d0SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10750bdcaa8d0SmrgAC_REQUIRE([XORG_WITH_LINT]) 107510b661123SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10752bdcaa8d0Smrg [Create lint library (default: disabled)])], 10753bdcaa8d0Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 107540b661123Smrg 107550b661123Smrgif test "x$make_lint_lib" = x"yes" ; then 107560b661123Smrg LINTLIB=llib-l$1.ln 107570b661123Smrg if test "x$LINT" = "x"; then 107580b661123Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 107590b661123Smrg fi 107600b661123Smrgelif test "x$make_lint_lib" != x"no" ; then 107610b661123Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10762bdcaa8d0Smrgfi 107630b661123Smrg 10764bdcaa8d0SmrgAC_SUBST(LINTLIB) 10765bdcaa8d0SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10766bdcaa8d0Smrg 10767bdcaa8d0Smrg]) # XORG_LINT_LIBRARY 10768bdcaa8d0Smrg 10769880c7e28Smrg# XORG_COMPILER_BRAND 10770880c7e28Smrg# ------------------- 10771880c7e28Smrg# Minimum version: 1.14.0 10772880c7e28Smrg# 10773880c7e28Smrg# Checks for various brands of compilers and sets flags as appropriate: 10774880c7e28Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10775880c7e28Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10776880c7e28Smrg# clang compiler - sets CLANGCC to "yes" 10777880c7e28Smrg# Intel compiler - sets INTELCC to "yes" 10778880c7e28Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10779880c7e28Smrg# 10780880c7e28SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10781880c7e28SmrgAC_LANG_CASE( 10782880c7e28Smrg [C], [ 10783880c7e28Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10784880c7e28Smrg ], 10785880c7e28Smrg [C++], [ 10786880c7e28Smrg AC_REQUIRE([AC_PROG_CXX]) 10787880c7e28Smrg ] 10788880c7e28Smrg) 10789880c7e28SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10790880c7e28SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10791880c7e28SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10792880c7e28Smrg]) # XORG_COMPILER_BRAND 10793880c7e28Smrg 10794880c7e28Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10795880c7e28Smrg# --------------- 10796880c7e28Smrg# Minimum version: 1.16.0 10797880c7e28Smrg# 10798880c7e28Smrg# Test if the compiler works when passed the given flag as a command line argument. 10799880c7e28Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10800880c7e28Smrg# next flag in the list until there are no more options. 10801880c7e28Smrg# 10802880c7e28Smrg# Note that this does not guarantee that the compiler supports the flag as some 10803880c7e28Smrg# compilers will simply ignore arguments that they do not understand, but we do 10804880c7e28Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10805880c7e28Smrg# -Werror=unused-command-line-argument 10806880c7e28Smrg# 10807880c7e28SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10808880c7e28Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10809880c7e28Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10810880c7e28Smrg 10811880c7e28SmrgAC_LANG_COMPILER_REQUIRE 10812880c7e28Smrg 10813880c7e28SmrgAC_LANG_CASE( 10814880c7e28Smrg [C], [ 10815880c7e28Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10816880c7e28Smrg define([PREFIX], [C]) 10817880c7e28Smrg define([CACHE_PREFIX], [cc]) 10818880c7e28Smrg define([COMPILER], [$CC]) 10819880c7e28Smrg ], 10820880c7e28Smrg [C++], [ 10821880c7e28Smrg define([PREFIX], [CXX]) 10822880c7e28Smrg define([CACHE_PREFIX], [cxx]) 10823880c7e28Smrg define([COMPILER], [$CXX]) 10824880c7e28Smrg ] 10825880c7e28Smrg) 10826880c7e28Smrg 10827880c7e28Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10828880c7e28Smrg 10829880c7e28Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10830880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10831880c7e28Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10832880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10833880c7e28Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10834880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10835880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10836880c7e28Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10837880c7e28Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10838880c7e28Smrgfi 10839880c7e28Smrg 10840880c7e28Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10841880c7e28Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10842880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10843880c7e28Smrg fi 10844880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10845880c7e28Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10846880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10847880c7e28Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10848880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10849880c7e28Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10850880c7e28Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10851880c7e28Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10852880c7e28Smrgfi 10853880c7e28Smrg 10854880c7e28Smrgfound="no" 10855880c7e28Smrgm4_foreach([flag], m4_cdr($@), [ 10856880c7e28Smrg if test $found = "no" ; then 108574f00d7e1Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10858880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10859880c7e28Smrg fi 10860880c7e28Smrg 108614f00d7e1Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10862880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10863880c7e28Smrg fi 10864880c7e28Smrg 10865880c7e28Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10866880c7e28Smrg 10867880c7e28Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10868880c7e28Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10869880c7e28Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10870880c7e28Smrg AC_CACHE_VAL($cacheid, 10871880c7e28Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10872880c7e28Smrg [eval $cacheid=yes], 10873880c7e28Smrg [eval $cacheid=no])]) 10874880c7e28Smrg 10875880c7e28Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10876880c7e28Smrg 10877880c7e28Smrg eval supported=\$$cacheid 10878880c7e28Smrg AC_MSG_RESULT([$supported]) 10879880c7e28Smrg if test "$supported" = "yes" ; then 10880880c7e28Smrg $1="$$1 ]flag[" 10881880c7e28Smrg found="yes" 10882880c7e28Smrg fi 10883880c7e28Smrg fi 10884880c7e28Smrg]) 10885880c7e28Smrg]) # XORG_TESTSET_CFLAG 10886880c7e28Smrg 10887880c7e28Smrg# XORG_COMPILER_FLAGS 10888880c7e28Smrg# --------------- 10889880c7e28Smrg# Minimum version: 1.16.0 10890880c7e28Smrg# 10891880c7e28Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10892880c7e28Smrg# arguments supported by the selected compiler which do NOT alter the generated 10893880c7e28Smrg# code. These arguments will cause the compiler to print various warnings 10894880c7e28Smrg# during compilation AND turn a conservative set of warnings into errors. 10895880c7e28Smrg# 10896880c7e28Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10897880c7e28Smrg# future versions of util-macros as options are added to new compilers. 10898880c7e28Smrg# 10899880c7e28SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10900880c7e28SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10901880c7e28Smrg 10902880c7e28SmrgAC_ARG_ENABLE(selective-werror, 10903880c7e28Smrg AS_HELP_STRING([--disable-selective-werror], 10904880c7e28Smrg [Turn off selective compiler errors. (default: enabled)]), 10905880c7e28Smrg [SELECTIVE_WERROR=$enableval], 10906880c7e28Smrg [SELECTIVE_WERROR=yes]) 10907880c7e28Smrg 10908880c7e28SmrgAC_LANG_CASE( 10909880c7e28Smrg [C], [ 10910880c7e28Smrg define([PREFIX], [C]) 10911880c7e28Smrg ], 10912880c7e28Smrg [C++], [ 10913880c7e28Smrg define([PREFIX], [CXX]) 10914880c7e28Smrg ] 10915880c7e28Smrg) 10916880c7e28Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10917880c7e28Smrgif test "x$SUNCC" = "xyes"; then 10918880c7e28Smrg [BASE_]PREFIX[FLAGS]="-v" 10919880c7e28Smrgelse 10920880c7e28Smrg [BASE_]PREFIX[FLAGS]="" 10921880c7e28Smrgfi 10922880c7e28Smrg 10923880c7e28Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10924880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10925880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10926880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10927880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10928880c7e28Smrg 10929880c7e28SmrgAC_LANG_CASE( 10930880c7e28Smrg [C], [ 10931880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10932880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10933880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10934880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 109354f00d7e1Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 10936880c7e28Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10937880c7e28Smrg ] 10938880c7e28Smrg) 10939880c7e28Smrg 10940880c7e28Smrg# This chunk adds additional warnings that could catch undesired effects. 10941880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10942880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10943880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10944880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10945880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10946880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 109474f00d7e1SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10948880c7e28Smrg 10949880c7e28Smrg# These are currently disabled because they are noisy. They will be enabled 10950880c7e28Smrg# in the future once the codebase is sufficiently modernized to silence 10951880c7e28Smrg# them. For now, I don't want them to drown out the other warnings. 10952880c7e28Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10953880c7e28Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 109544f00d7e1Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10955880c7e28Smrg 10956880c7e28Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10957880c7e28Smrg# when there are problems that should be fixed. 10958880c7e28Smrg 10959880c7e28Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10960880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10961880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10962880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10963880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10964880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10965880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10966880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10967880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10968880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10969880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10970880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10971880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10972880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10973880c7e28Smrgelse 10974880c7e28SmrgAC_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]) 10975880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10976880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10977880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10978880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10979880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10980880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10981880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10982880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10983880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10984880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10985880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10986880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10987880c7e28SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10988880c7e28Smrgfi 10989880c7e28Smrg 10990880c7e28SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 10991880c7e28Smrg]) # XORG_COMPILER_FLAGS 10992880c7e28Smrg 1099372313efbSmrg# XORG_CWARNFLAGS 1099472313efbSmrg# --------------- 1099572313efbSmrg# Minimum version: 1.2.0 10996880c7e28Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1099772313efbSmrg# 1099872313efbSmrg# Defines CWARNFLAGS to enable C compiler warnings. 1099972313efbSmrg# 11000880c7e28Smrg# This function is deprecated because it defines -fno-strict-aliasing 11001880c7e28Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 11002880c7e28Smrg# is needed, then it should be added explicitly in the module when 11003880c7e28Smrg# it is updated to use BASE_CFLAGS. 11004880c7e28Smrg# 1100572313efbSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 11006880c7e28SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11007880c7e28SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11008880c7e28SmrgAC_LANG_CASE( 11009880c7e28Smrg [C], [ 11010880c7e28Smrg CWARNFLAGS="$BASE_CFLAGS" 11011880c7e28Smrg if test "x$GCC" = xyes ; then 11012880c7e28Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11013880c7e28Smrg fi 11014880c7e28Smrg AC_SUBST(CWARNFLAGS) 11015880c7e28Smrg ] 11016880c7e28Smrg) 1101772313efbSmrg]) # XORG_CWARNFLAGS 110180b661123Smrg 110190b661123Smrg# XORG_STRICT_OPTION 110200b661123Smrg# ----------------------- 110210b661123Smrg# Minimum version: 1.3.0 110220b661123Smrg# 11023880c7e28Smrg# Add configure option to enable strict compilation flags, such as treating 11024880c7e28Smrg# warnings as fatal errors. 11025880c7e28Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11026880c7e28Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11027880c7e28Smrg# 11028880c7e28Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11029880c7e28Smrg# when strict compilation is unconditionally desired. 110300b661123SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 110310b661123SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 11032880c7e28SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 110330b661123Smrg 110340b661123SmrgAC_ARG_ENABLE(strict-compilation, 110350b661123Smrg AS_HELP_STRING([--enable-strict-compilation], 110360b661123Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 110370b661123Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11038880c7e28Smrg 11039880c7e28SmrgAC_LANG_CASE( 11040880c7e28Smrg [C], [ 11041880c7e28Smrg define([PREFIX], [C]) 11042880c7e28Smrg ], 11043880c7e28Smrg [C++], [ 11044880c7e28Smrg define([PREFIX], [CXX]) 11045880c7e28Smrg ] 11046880c7e28Smrg) 11047880c7e28Smrg 11048880c7e28Smrg[STRICT_]PREFIX[FLAGS]="" 11049880c7e28SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11050880c7e28SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11051880c7e28Smrg 11052880c7e28Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11053880c7e28Smrg# activate it with -Werror, so we add it here explicitly. 11054880c7e28SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11055880c7e28Smrg 110560b661123Smrgif test "x$STRICT_COMPILE" = "xyes"; then 11057880c7e28Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11058880c7e28Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 110590b661123Smrgfi 11060880c7e28SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11061880c7e28SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11062880c7e28SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 110630b661123Smrg]) # XORG_STRICT_OPTION 110640b661123Smrg 110650b661123Smrg# XORG_DEFAULT_OPTIONS 110660b661123Smrg# -------------------- 110670b661123Smrg# Minimum version: 1.3.0 110680b661123Smrg# 110690b661123Smrg# Defines default options for X.Org modules. 110700b661123Smrg# 110710b661123SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 110720b661123SmrgAC_REQUIRE([AC_PROG_INSTALL]) 11073880c7e28SmrgXORG_COMPILER_FLAGS 110740b661123SmrgXORG_CWARNFLAGS 110750b661123SmrgXORG_STRICT_OPTION 110760b661123SmrgXORG_RELEASE_VERSION 110770b661123SmrgXORG_CHANGELOG 110780b661123SmrgXORG_INSTALL 110790b661123SmrgXORG_MANPAGE_SECTIONS 110800b661123Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 110810b661123Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 110820b661123Smrg]) # XORG_DEFAULT_OPTIONS 110830b661123Smrg 110840b661123Smrg# XORG_INSTALL() 110850b661123Smrg# ---------------- 110860b661123Smrg# Minimum version: 1.4.0 110870b661123Smrg# 110880b661123Smrg# Defines the variable INSTALL_CMD as the command to copy 110890b661123Smrg# INSTALL from $prefix/share/util-macros. 110900b661123Smrg# 110910b661123SmrgAC_DEFUN([XORG_INSTALL], [ 110920b661123SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 110930b661123Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 110940b661123SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 110950b661123Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 110960b661123Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 110970b661123Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 110980b661123SmrgAC_SUBST([INSTALL_CMD]) 110990b661123Smrg]) # XORG_INSTALL 11100bdcaa8d0Smrgdnl Copyright 2005 Red Hat, Inc 11101bdcaa8d0Smrgdnl 11102bdcaa8d0Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11103bdcaa8d0Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11104bdcaa8d0Smrgdnl the above copyright notice appear in all copies and that both that 11105bdcaa8d0Smrgdnl copyright notice and this permission notice appear in supporting 11106bdcaa8d0Smrgdnl documentation. 11107bdcaa8d0Smrgdnl 11108bdcaa8d0Smrgdnl The above copyright notice and this permission notice shall be included 11109bdcaa8d0Smrgdnl in all copies or substantial portions of the Software. 11110bdcaa8d0Smrgdnl 11111bdcaa8d0Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11112bdcaa8d0Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11113bdcaa8d0Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11114bdcaa8d0Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11115bdcaa8d0Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11116bdcaa8d0Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11117bdcaa8d0Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11118bdcaa8d0Smrgdnl 11119bdcaa8d0Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11120bdcaa8d0Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11121bdcaa8d0Smrgdnl other dealings in this Software without prior written authorization 11122bdcaa8d0Smrgdnl from the copyright holders. 11123bdcaa8d0Smrgdnl 11124bdcaa8d0Smrg 11125bdcaa8d0Smrg# XORG_RELEASE_VERSION 11126bdcaa8d0Smrg# -------------------- 111270b661123Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 111284f00d7e1Smrg 11129bdcaa8d0SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11130bdcaa8d0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1113172313efbSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11132bdcaa8d0Smrg [Major version of this package]) 1113372313efbSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11134bdcaa8d0Smrg if test "x$PVM" = "x"; then 11135bdcaa8d0Smrg PVM="0" 11136bdcaa8d0Smrg fi 11137bdcaa8d0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11138bdcaa8d0Smrg [$PVM], 11139bdcaa8d0Smrg [Minor version of this package]) 1114072313efbSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11141bdcaa8d0Smrg if test "x$PVP" = "x"; then 11142bdcaa8d0Smrg PVP="0" 11143bdcaa8d0Smrg fi 11144bdcaa8d0Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11145bdcaa8d0Smrg [$PVP], 11146bdcaa8d0Smrg [Patch version of this package]) 11147bdcaa8d0Smrg]) 11148bdcaa8d0Smrg 1114972313efbSmrg# XORG_CHANGELOG() 1115072313efbSmrg# ---------------- 1115172313efbSmrg# Minimum version: 1.2.0 1115272313efbSmrg# 1115372313efbSmrg# Defines the variable CHANGELOG_CMD as the command to generate 1115472313efbSmrg# ChangeLog from git. 1115572313efbSmrg# 1115672313efbSmrg# 1115772313efbSmrgAC_DEFUN([XORG_CHANGELOG], [ 111580b661123SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 111590b661123Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 111600b661123Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1116172313efbSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1116272313efbSmrgAC_SUBST([CHANGELOG_CMD]) 1116372313efbSmrg]) # XORG_CHANGELOG 1116472313efbSmrg 111650b661123Smrgdnl Copyright 2005 Red Hat, Inc 111660b661123Smrgdnl 111670b661123Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 111680b661123Smrgdnl documentation for any purpose is hereby granted without fee, provided that 111690b661123Smrgdnl the above copyright notice appear in all copies and that both that 111700b661123Smrgdnl copyright notice and this permission notice appear in supporting 111710b661123Smrgdnl documentation. 111720b661123Smrgdnl 111730b661123Smrgdnl The above copyright notice and this permission notice shall be included 111740b661123Smrgdnl in all copies or substantial portions of the Software. 111750b661123Smrgdnl 111760b661123Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 111770b661123Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 111780b661123Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 111790b661123Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 111800b661123Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 111810b661123Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 111820b661123Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 111830b661123Smrgdnl 111840b661123Smrgdnl Except as contained in this notice, the name of the copyright holders shall 111850b661123Smrgdnl not be used in advertising or otherwise to promote the sale, use or 111860b661123Smrgdnl other dealings in this Software without prior written authorization 111870b661123Smrgdnl from the copyright holders. 111880b661123Smrgdnl 111890b661123Smrg 111904f00d7e1Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 111910b661123Smrg# -------------------------- 111924f00d7e1Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 111934f00d7e1Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 111940b661123Smrg 111950b661123SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 111960b661123Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 111970b661123Smrg SAVE_CFLAGS="$CFLAGS" 111980b661123Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 111990b661123Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 112000b661123Smrg#include "xorg-server.h" 112010b661123Smrg#if !defined $1 112020b661123Smrg#error $1 not defined 112030b661123Smrg#endif 112040b661123Smrg ]])], 112050b661123Smrg [_EXT_CHECK=yes], 112060b661123Smrg [_EXT_CHECK=no]) 112070b661123Smrg CFLAGS="$SAVE_CFLAGS" 112080b661123Smrg AC_MSG_CHECKING([if $1 is defined]) 112090b661123Smrg AC_MSG_RESULT([$_EXT_CHECK]) 112100b661123Smrg if test "$_EXT_CHECK" != no; then 112110b661123Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 112120b661123Smrg fi 112130b661123Smrg]) 112140b661123Smrg 112154f00d7e1Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 11216bdcaa8d0Smrg# 11217bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11218bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11219bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11220bdcaa8d0Smrg 11221bdcaa8d0Smrg# AM_AUTOMAKE_VERSION(VERSION) 11222bdcaa8d0Smrg# ---------------------------- 11223bdcaa8d0Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 11224bdcaa8d0Smrg# generated from the m4 files accompanying Automake X.Y. 1122572313efbSmrg# (This private macro should not be called outside this file.) 1122672313efbSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 112274f00d7e1Smrg[am__api_version='1.15' 1122872313efbSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 1122972313efbSmrgdnl require some minimum version. Point them to the right macro. 112304f00d7e1Smrgm4_if([$1], [1.15], [], 1123172313efbSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 1123272313efbSmrg]) 1123372313efbSmrg 1123472313efbSmrg# _AM_AUTOCONF_VERSION(VERSION) 1123572313efbSmrg# ----------------------------- 1123672313efbSmrg# aclocal traces this macro to find the Autoconf version. 1123772313efbSmrg# This is a private macro too. Using m4_define simplifies 1123872313efbSmrg# the logic in aclocal, which can simply ignore this definition. 1123972313efbSmrgm4_define([_AM_AUTOCONF_VERSION], []) 11240bdcaa8d0Smrg 11241bdcaa8d0Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 11242bdcaa8d0Smrg# ------------------------------- 1124372313efbSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 1124472313efbSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11245bdcaa8d0SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 112464f00d7e1Smrg[AM_AUTOMAKE_VERSION([1.15])dnl 1124772313efbSmrgm4_ifndef([AC_AUTOCONF_VERSION], 1124872313efbSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1124972313efbSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11250bdcaa8d0Smrg 11251bdcaa8d0Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11252bdcaa8d0Smrg 112534f00d7e1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11254bdcaa8d0Smrg# 11255bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11256bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11257bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11258bdcaa8d0Smrg 11259bdcaa8d0Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 112604f00d7e1Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 112614f00d7e1Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11262bdcaa8d0Smrg# 11263bdcaa8d0Smrg# Of course, Automake must honor this variable whenever it calls a 11264bdcaa8d0Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 11265bdcaa8d0Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 11266bdcaa8d0Smrg# depending on how configure is run. This is pretty annoying, since 11267bdcaa8d0Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11268bdcaa8d0Smrg# source directory, any form will work fine, but in subdirectories a 11269bdcaa8d0Smrg# relative path needs to be adjusted first. 11270bdcaa8d0Smrg# 11271bdcaa8d0Smrg# $ac_aux_dir/missing 11272bdcaa8d0Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 11273bdcaa8d0Smrg# $top_srcdir/$ac_aux_dir/missing 11274bdcaa8d0Smrg# fails if $ac_aux_dir is absolute, 11275bdcaa8d0Smrg# fails when called from a subdirectory in a VPATH build with 11276bdcaa8d0Smrg# a relative $ac_aux_dir 11277bdcaa8d0Smrg# 11278bdcaa8d0Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11279bdcaa8d0Smrg# are both prefixed by $srcdir. In an in-source build this is usually 112804f00d7e1Smrg# harmless because $srcdir is '.', but things will broke when you 11281bdcaa8d0Smrg# start a VPATH build or use an absolute $srcdir. 11282bdcaa8d0Smrg# 11283bdcaa8d0Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11284bdcaa8d0Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11285bdcaa8d0Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11286bdcaa8d0Smrg# and then we would define $MISSING as 11287bdcaa8d0Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 11288bdcaa8d0Smrg# This will work as long as MISSING is not called from configure, because 11289bdcaa8d0Smrg# unfortunately $(top_srcdir) has no meaning in configure. 11290bdcaa8d0Smrg# However there are other variables, like CC, which are often used in 11291bdcaa8d0Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 11292bdcaa8d0Smrg# 11293bdcaa8d0Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 11294bdcaa8d0Smrg# absolute PATH. The drawback is that using absolute paths prevent a 11295bdcaa8d0Smrg# configured tree to be moved without reconfiguration. 11296bdcaa8d0Smrg 11297bdcaa8d0SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 112984f00d7e1Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 112994f00d7e1Smrg# Expand $ac_aux_dir to an absolute path. 113004f00d7e1Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 11301bdcaa8d0Smrg]) 11302bdcaa8d0Smrg 11303bdcaa8d0Smrg# AM_CONDITIONAL -*- Autoconf -*- 11304bdcaa8d0Smrg 113054f00d7e1Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11306bdcaa8d0Smrg# 11307bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11308bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11309bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11310bdcaa8d0Smrg 11311bdcaa8d0Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11312bdcaa8d0Smrg# ------------------------------------- 11313bdcaa8d0Smrg# Define a conditional. 11314bdcaa8d0SmrgAC_DEFUN([AM_CONDITIONAL], 113154f00d7e1Smrg[AC_PREREQ([2.52])dnl 113164f00d7e1Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 113174f00d7e1Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 1131872313efbSmrgAC_SUBST([$1_TRUE])dnl 1131972313efbSmrgAC_SUBST([$1_FALSE])dnl 1132072313efbSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 1132172313efbSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 1132296ce994aSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 11323bdcaa8d0Smrgif $2; then 11324bdcaa8d0Smrg $1_TRUE= 11325bdcaa8d0Smrg $1_FALSE='#' 11326bdcaa8d0Smrgelse 11327bdcaa8d0Smrg $1_TRUE='#' 11328bdcaa8d0Smrg $1_FALSE= 11329bdcaa8d0Smrgfi 11330bdcaa8d0SmrgAC_CONFIG_COMMANDS_PRE( 11331bdcaa8d0Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11332bdcaa8d0Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 11333bdcaa8d0SmrgUsually this means the macro was only invoked conditionally.]]) 11334bdcaa8d0Smrgfi])]) 11335bdcaa8d0Smrg 113364f00d7e1Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11337bdcaa8d0Smrg# 11338bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11339bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11340bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11341bdcaa8d0Smrg 11342bdcaa8d0Smrg 113434f00d7e1Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11344bdcaa8d0Smrg# written in clear, in which case automake, when reading aclocal.m4, 11345bdcaa8d0Smrg# will think it sees a *use*, and therefore will trigger all it's 11346bdcaa8d0Smrg# C support machinery. Also note that it means that autoscan, seeing 11347bdcaa8d0Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11348bdcaa8d0Smrg 11349bdcaa8d0Smrg 11350bdcaa8d0Smrg# _AM_DEPENDENCIES(NAME) 11351bdcaa8d0Smrg# ---------------------- 11352bdcaa8d0Smrg# See how the compiler implements dependency checking. 113534f00d7e1Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11354bdcaa8d0Smrg# We try a few techniques and use that to set a single cache variable. 11355bdcaa8d0Smrg# 11356bdcaa8d0Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11357bdcaa8d0Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11358bdcaa8d0Smrg# dependency, and given that the user is not expected to run this macro, 11359bdcaa8d0Smrg# just rely on AC_PROG_CC. 11360bdcaa8d0SmrgAC_DEFUN([_AM_DEPENDENCIES], 11361bdcaa8d0Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 11362bdcaa8d0SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11363bdcaa8d0SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 11364bdcaa8d0SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 11365bdcaa8d0Smrg 113664f00d7e1Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 113674f00d7e1Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 113684f00d7e1Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 113694f00d7e1Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 113704f00d7e1Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 113714f00d7e1Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 113724f00d7e1Smrg [depcc="$$1" am_compiler_list=]) 11373bdcaa8d0Smrg 11374bdcaa8d0SmrgAC_CACHE_CHECK([dependency style of $depcc], 11375bdcaa8d0Smrg [am_cv_$1_dependencies_compiler_type], 11376bdcaa8d0Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11377bdcaa8d0Smrg # We make a subdir and do the tests there. Otherwise we can end up 11378bdcaa8d0Smrg # making bogus files that we don't know about and never remove. For 11379bdcaa8d0Smrg # instance it was reported that on HP-UX the gcc test will end up 113804f00d7e1Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 113814f00d7e1Smrg # in D". 11382880c7e28Smrg rm -rf conftest.dir 11383bdcaa8d0Smrg mkdir conftest.dir 11384bdcaa8d0Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 11385bdcaa8d0Smrg # using a relative directory. 11386bdcaa8d0Smrg cp "$am_depcomp" conftest.dir 11387bdcaa8d0Smrg cd conftest.dir 11388bdcaa8d0Smrg # We will build objects and dependencies in a subdirectory because 11389bdcaa8d0Smrg # it helps to detect inapplicable dependency modes. For instance 11390bdcaa8d0Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 11391bdcaa8d0Smrg # side effect of compilation, but ICC will put the dependencies in 11392bdcaa8d0Smrg # the current directory while Tru64 will put them in the object 11393bdcaa8d0Smrg # directory. 11394bdcaa8d0Smrg mkdir sub 11395bdcaa8d0Smrg 11396bdcaa8d0Smrg am_cv_$1_dependencies_compiler_type=none 11397bdcaa8d0Smrg if test "$am_compiler_list" = ""; then 11398bdcaa8d0Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11399bdcaa8d0Smrg fi 1140096ce994aSmrg am__universal=false 1140196ce994aSmrg m4_case([$1], [CC], 1140296ce994aSmrg [case " $depcc " in #( 1140396ce994aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 1140496ce994aSmrg esac], 1140596ce994aSmrg [CXX], 1140696ce994aSmrg [case " $depcc " in #( 1140796ce994aSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 1140896ce994aSmrg esac]) 1140996ce994aSmrg 11410bdcaa8d0Smrg for depmode in $am_compiler_list; do 11411bdcaa8d0Smrg # Setup a source with many dependencies, because some compilers 11412bdcaa8d0Smrg # like to wrap large dependency lists on column 80 (with \), and 11413bdcaa8d0Smrg # we should not choose a depcomp mode which is confused by this. 11414bdcaa8d0Smrg # 11415bdcaa8d0Smrg # We need to recreate these files for each test, as the compiler may 11416bdcaa8d0Smrg # overwrite some of them when testing with obscure command lines. 11417bdcaa8d0Smrg # This happens at least with the AIX C compiler. 11418bdcaa8d0Smrg : > sub/conftest.c 11419bdcaa8d0Smrg for i in 1 2 3 4 5 6; do 11420bdcaa8d0Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 114214f00d7e1Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 114224f00d7e1Smrg # Solaris 10 /bin/sh. 114234f00d7e1Smrg echo '/* dummy */' > sub/conftst$i.h 11424bdcaa8d0Smrg done 11425bdcaa8d0Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11426bdcaa8d0Smrg 114274f00d7e1Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 1142896ce994aSmrg # mode. It turns out that the SunPro C++ compiler does not properly 114294f00d7e1Smrg # handle '-M -o', and we need to detect this. Also, some Intel 114304f00d7e1Smrg # versions had trouble with output in subdirs. 1143196ce994aSmrg am__obj=sub/conftest.${OBJEXT-o} 1143296ce994aSmrg am__minus_obj="-o $am__obj" 11433bdcaa8d0Smrg case $depmode in 1143496ce994aSmrg gcc) 1143596ce994aSmrg # This depmode causes a compiler race in universal mode. 1143696ce994aSmrg test "$am__universal" = false || continue 1143796ce994aSmrg ;; 11438bdcaa8d0Smrg nosideeffect) 114394f00d7e1Smrg # After this tag, mechanisms are not by side-effect, so they'll 114404f00d7e1Smrg # only be used when explicitly requested. 11441bdcaa8d0Smrg if test "x$enable_dependency_tracking" = xyes; then 11442bdcaa8d0Smrg continue 11443bdcaa8d0Smrg else 11444bdcaa8d0Smrg break 11445bdcaa8d0Smrg fi 11446bdcaa8d0Smrg ;; 11447880c7e28Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 114484f00d7e1Smrg # This compiler won't grok '-c -o', but also, the minuso test has 1144996ce994aSmrg # not run yet. These depmodes are late enough in the game, and 1145096ce994aSmrg # so weak that their functioning should not be impacted. 1145196ce994aSmrg am__obj=conftest.${OBJEXT-o} 1145296ce994aSmrg am__minus_obj= 1145396ce994aSmrg ;; 11454bdcaa8d0Smrg none) break ;; 11455bdcaa8d0Smrg esac 11456bdcaa8d0Smrg if depmode=$depmode \ 1145796ce994aSmrg source=sub/conftest.c object=$am__obj \ 11458bdcaa8d0Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 1145996ce994aSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11460bdcaa8d0Smrg >/dev/null 2>conftest.err && 1146172313efbSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11462bdcaa8d0Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 1146396ce994aSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11464bdcaa8d0Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11465bdcaa8d0Smrg # icc doesn't choke on unknown options, it will just issue warnings 11466bdcaa8d0Smrg # or remarks (even with -Werror). So we grep stderr for any message 11467bdcaa8d0Smrg # that says an option was ignored or not supported. 11468bdcaa8d0Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 11469bdcaa8d0Smrg # icc: Command line warning: ignoring option '-M'; no argument required 11470bdcaa8d0Smrg # The diagnosis changed in icc 8.0: 11471bdcaa8d0Smrg # icc: Command line remark: option '-MP' not supported 11472bdcaa8d0Smrg if (grep 'ignoring option' conftest.err || 11473bdcaa8d0Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11474bdcaa8d0Smrg am_cv_$1_dependencies_compiler_type=$depmode 11475bdcaa8d0Smrg break 11476bdcaa8d0Smrg fi 11477bdcaa8d0Smrg fi 11478bdcaa8d0Smrg done 11479bdcaa8d0Smrg 11480bdcaa8d0Smrg cd .. 11481bdcaa8d0Smrg rm -rf conftest.dir 11482bdcaa8d0Smrgelse 11483bdcaa8d0Smrg am_cv_$1_dependencies_compiler_type=none 11484bdcaa8d0Smrgfi 11485bdcaa8d0Smrg]) 11486bdcaa8d0SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11487bdcaa8d0SmrgAM_CONDITIONAL([am__fastdep$1], [ 11488bdcaa8d0Smrg test "x$enable_dependency_tracking" != xno \ 11489bdcaa8d0Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11490bdcaa8d0Smrg]) 11491bdcaa8d0Smrg 11492bdcaa8d0Smrg 11493bdcaa8d0Smrg# AM_SET_DEPDIR 11494bdcaa8d0Smrg# ------------- 11495bdcaa8d0Smrg# Choose a directory name for dependency files. 114964f00d7e1Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11497bdcaa8d0SmrgAC_DEFUN([AM_SET_DEPDIR], 11498bdcaa8d0Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11499bdcaa8d0SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11500bdcaa8d0Smrg]) 11501bdcaa8d0Smrg 11502bdcaa8d0Smrg 11503bdcaa8d0Smrg# AM_DEP_TRACK 11504bdcaa8d0Smrg# ------------ 11505bdcaa8d0SmrgAC_DEFUN([AM_DEP_TRACK], 115064f00d7e1Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 115074f00d7e1SmrgAS_HELP_STRING( 115084f00d7e1Smrg [--enable-dependency-tracking], 115094f00d7e1Smrg [do not reject slow dependency extractors]) 115104f00d7e1SmrgAS_HELP_STRING( 115114f00d7e1Smrg [--disable-dependency-tracking], 115124f00d7e1Smrg [speeds up one-time build])]) 11513bdcaa8d0Smrgif test "x$enable_dependency_tracking" != xno; then 11514bdcaa8d0Smrg am_depcomp="$ac_aux_dir/depcomp" 11515bdcaa8d0Smrg AMDEPBACKSLASH='\' 11516880c7e28Smrg am__nodep='_no' 11517bdcaa8d0Smrgfi 11518bdcaa8d0SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 1151972313efbSmrgAC_SUBST([AMDEPBACKSLASH])dnl 1152072313efbSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11521880c7e28SmrgAC_SUBST([am__nodep])dnl 11522880c7e28Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 11523bdcaa8d0Smrg]) 11524bdcaa8d0Smrg 11525bdcaa8d0Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 11526bdcaa8d0Smrg 115274f00d7e1Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11528bdcaa8d0Smrg# 11529bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11530bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11531bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11532bdcaa8d0Smrg 11533bdcaa8d0Smrg 11534bdcaa8d0Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11535bdcaa8d0Smrg# ------------------------------ 11536bdcaa8d0SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 1153796ce994aSmrg[{ 115384f00d7e1Smrg # Older Autoconf quotes --file arguments for eval, but not when files 1153996ce994aSmrg # are listed without --file. Let's play safe and only enable the eval 1154096ce994aSmrg # if we detect the quoting. 1154196ce994aSmrg case $CONFIG_FILES in 1154296ce994aSmrg *\'*) eval set x "$CONFIG_FILES" ;; 1154396ce994aSmrg *) set x $CONFIG_FILES ;; 1154496ce994aSmrg esac 1154596ce994aSmrg shift 1154696ce994aSmrg for mf 1154796ce994aSmrg do 1154896ce994aSmrg # Strip MF so we end up with the name of the file. 1154996ce994aSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 1155096ce994aSmrg # Check whether this is an Automake generated Makefile or not. 115514f00d7e1Smrg # We used to match only the files named 'Makefile.in', but 1155296ce994aSmrg # some people rename them; so instead we look at the file content. 1155396ce994aSmrg # Grep'ing the first line is not enough: some people post-process 1155496ce994aSmrg # each Makefile.in and add a new line on top of each file to say so. 1155596ce994aSmrg # Grep'ing the whole file is not good either: AIX grep has a line 1155696ce994aSmrg # limit of 2048, but all sed's we know have understand at least 4000. 1155796ce994aSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 1155896ce994aSmrg dirpart=`AS_DIRNAME("$mf")` 1155996ce994aSmrg else 1156096ce994aSmrg continue 1156196ce994aSmrg fi 1156296ce994aSmrg # Extract the definition of DEPDIR, am__include, and am__quote 115634f00d7e1Smrg # from the Makefile without running 'make'. 1156496ce994aSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 1156596ce994aSmrg test -z "$DEPDIR" && continue 1156696ce994aSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 115674f00d7e1Smrg test -z "$am__include" && continue 1156896ce994aSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 1156996ce994aSmrg # Find all dependency output files, they are included files with 1157096ce994aSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 1157196ce994aSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 1157296ce994aSmrg # expansion. 1157396ce994aSmrg for file in `sed -n " 1157496ce994aSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 115754f00d7e1Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 1157696ce994aSmrg # Make sure the directory exists. 1157796ce994aSmrg test -f "$dirpart/$file" && continue 1157896ce994aSmrg fdir=`AS_DIRNAME(["$file"])` 1157996ce994aSmrg AS_MKDIR_P([$dirpart/$fdir]) 1158096ce994aSmrg # echo "creating $dirpart/$file" 1158196ce994aSmrg echo '# dummy' > "$dirpart/$file" 1158296ce994aSmrg done 11583bdcaa8d0Smrg done 1158496ce994aSmrg} 11585bdcaa8d0Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11586bdcaa8d0Smrg 11587bdcaa8d0Smrg 11588bdcaa8d0Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11589bdcaa8d0Smrg# ----------------------------- 11590bdcaa8d0Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 11591bdcaa8d0Smrg# 11592bdcaa8d0Smrg# This code is only required when automatic dependency tracking 115934f00d7e1Smrg# is enabled. FIXME. This creates each '.P' file that we will 11594bdcaa8d0Smrg# need in order to bootstrap the dependency handling code. 11595bdcaa8d0SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11596bdcaa8d0Smrg[AC_CONFIG_COMMANDS([depfiles], 11597bdcaa8d0Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11598bdcaa8d0Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11599bdcaa8d0Smrg]) 11600bdcaa8d0Smrg 11601bdcaa8d0Smrg# Do all the work for Automake. -*- Autoconf -*- 11602bdcaa8d0Smrg 116034f00d7e1Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11604bdcaa8d0Smrg# 11605bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11606bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11607bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11608bdcaa8d0Smrg 11609bdcaa8d0Smrg# This macro actually does too much. Some checks are only needed if 11610bdcaa8d0Smrg# your package does certain things. But this isn't really a big deal. 11611bdcaa8d0Smrg 116124f00d7e1Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 116134f00d7e1Smrgm4_define([AC_PROG_CC], 116144f00d7e1Smrgm4_defn([AC_PROG_CC]) 116154f00d7e1Smrg[_AM_PROG_CC_C_O 116164f00d7e1Smrg]) 116174f00d7e1Smrg 11618bdcaa8d0Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11619bdcaa8d0Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 11620bdcaa8d0Smrg# ----------------------------------------------- 11621bdcaa8d0Smrg# The call with PACKAGE and VERSION arguments is the old style 11622bdcaa8d0Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11623bdcaa8d0Smrg# and VERSION should now be passed to AC_INIT and removed from 11624bdcaa8d0Smrg# the call to AM_INIT_AUTOMAKE. 11625bdcaa8d0Smrg# We support both call styles for the transition. After 11626bdcaa8d0Smrg# the next Automake release, Autoconf can make the AC_INIT 11627bdcaa8d0Smrg# arguments mandatory, and then we can depend on a new Autoconf 11628bdcaa8d0Smrg# release and drop the old call support. 11629bdcaa8d0SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 116304f00d7e1Smrg[AC_PREREQ([2.65])dnl 11631bdcaa8d0Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11632bdcaa8d0Smrgdnl the ones we care about. 11633bdcaa8d0Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11634bdcaa8d0SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11635bdcaa8d0SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 1163672313efbSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 1163772313efbSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 1163872313efbSmrg # is not polluted with repeated "-I." 1163972313efbSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 1164072313efbSmrg # test to see if srcdir already configured 1164172313efbSmrg if test -f $srcdir/config.status; then 1164272313efbSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 1164372313efbSmrg fi 11644bdcaa8d0Smrgfi 11645bdcaa8d0Smrg 11646bdcaa8d0Smrg# test whether we have cygpath 11647bdcaa8d0Smrgif test -z "$CYGPATH_W"; then 11648bdcaa8d0Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 11649bdcaa8d0Smrg CYGPATH_W='cygpath -w' 11650bdcaa8d0Smrg else 11651bdcaa8d0Smrg CYGPATH_W=echo 11652bdcaa8d0Smrg fi 11653bdcaa8d0Smrgfi 11654bdcaa8d0SmrgAC_SUBST([CYGPATH_W]) 11655bdcaa8d0Smrg 11656bdcaa8d0Smrg# Define the identity of the package. 11657bdcaa8d0Smrgdnl Distinguish between old-style and new-style calls. 11658bdcaa8d0Smrgm4_ifval([$2], 116594f00d7e1Smrg[AC_DIAGNOSE([obsolete], 116604f00d7e1Smrg [$0: two- and three-arguments forms are deprecated.]) 116614f00d7e1Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11662bdcaa8d0Smrg AC_SUBST([PACKAGE], [$1])dnl 11663bdcaa8d0Smrg AC_SUBST([VERSION], [$2])], 11664bdcaa8d0Smrg[_AM_SET_OPTIONS([$1])dnl 1166572313efbSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 116664f00d7e1Smrgm4_if( 116674f00d7e1Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 116684f00d7e1Smrg [ok:ok],, 1166972313efbSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11670bdcaa8d0Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11671bdcaa8d0Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11672bdcaa8d0Smrg 11673bdcaa8d0Smrg_AM_IF_OPTION([no-define],, 116744f00d7e1Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 116754f00d7e1Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11676bdcaa8d0Smrg 11677bdcaa8d0Smrg# Some tools Automake needs. 11678bdcaa8d0SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11679bdcaa8d0SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 116804f00d7e1SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 116814f00d7e1SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 116824f00d7e1SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 116834f00d7e1SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 116844f00d7e1SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 1168596ce994aSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1168696ce994aSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 116874f00d7e1SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 116884f00d7e1Smrg# For better backward compatibility. To be removed once Automake 1.9.x 116894f00d7e1Smrg# dies out for good. For more background, see: 116904f00d7e1Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 116914f00d7e1Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 116924f00d7e1SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 116934f00d7e1Smrg# We need awk for the "check" target (and possibly the TAP driver). The 116944f00d7e1Smrg# system "awk" is bad on some platforms. 11695bdcaa8d0SmrgAC_REQUIRE([AC_PROG_AWK])dnl 11696bdcaa8d0SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11697bdcaa8d0SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11698bdcaa8d0Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 1169996ce994aSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 1170096ce994aSmrg [_AM_PROG_TAR([v7])])]) 11701bdcaa8d0Smrg_AM_IF_OPTION([no-dependencies],, 11702bdcaa8d0Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 117034f00d7e1Smrg [_AM_DEPENDENCIES([CC])], 117044f00d7e1Smrg [m4_define([AC_PROG_CC], 117054f00d7e1Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11706bdcaa8d0SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 117074f00d7e1Smrg [_AM_DEPENDENCIES([CXX])], 117084f00d7e1Smrg [m4_define([AC_PROG_CXX], 117094f00d7e1Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 1171072313efbSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 117114f00d7e1Smrg [_AM_DEPENDENCIES([OBJC])], 117124f00d7e1Smrg [m4_define([AC_PROG_OBJC], 117134f00d7e1Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 117144f00d7e1SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 117154f00d7e1Smrg [_AM_DEPENDENCIES([OBJCXX])], 117164f00d7e1Smrg [m4_define([AC_PROG_OBJCXX], 117174f00d7e1Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11718bdcaa8d0Smrg]) 117194f00d7e1SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 117204f00d7e1Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 117214f00d7e1Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 117224f00d7e1Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 1172396ce994aSmrgAC_CONFIG_COMMANDS_PRE(dnl 1172496ce994aSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 1172596ce994aSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 117264f00d7e1Smrg 117274f00d7e1Smrg# POSIX will say in a future version that running "rm -f" with no argument 117284f00d7e1Smrg# is OK; and we want to be able to make that assumption in our Makefile 117294f00d7e1Smrg# recipes. So use an aggressive probe to check that the usage we want is 117304f00d7e1Smrg# actually supported "in the wild" to an acceptable degree. 117314f00d7e1Smrg# See automake bug#10828. 117324f00d7e1Smrg# To make any issue more visible, cause the running configure to be aborted 117334f00d7e1Smrg# by default if the 'rm' program in use doesn't match our expectations; the 117344f00d7e1Smrg# user can still override this though. 117354f00d7e1Smrgif rm -f && rm -fr && rm -rf; then : OK; else 117364f00d7e1Smrg cat >&2 <<'END' 117374f00d7e1SmrgOops! 117384f00d7e1Smrg 117394f00d7e1SmrgYour 'rm' program seems unable to run without file operands specified 117404f00d7e1Smrgon the command line, even when the '-f' option is present. This is contrary 117414f00d7e1Smrgto the behaviour of most rm programs out there, and not conforming with 117424f00d7e1Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 117434f00d7e1Smrg 117444f00d7e1SmrgPlease tell bug-automake@gnu.org about your system, including the value 117454f00d7e1Smrgof your $PATH and any error possibly output before this message. This 117464f00d7e1Smrgcan help us improve future automake versions. 117474f00d7e1Smrg 117484f00d7e1SmrgEND 117494f00d7e1Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 117504f00d7e1Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 117514f00d7e1Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 117524f00d7e1Smrg echo >&2 117534f00d7e1Smrg else 117544f00d7e1Smrg cat >&2 <<'END' 117554f00d7e1SmrgAborting the configuration process, to ensure you take notice of the issue. 117564f00d7e1Smrg 117574f00d7e1SmrgYou can download and install GNU coreutils to get an 'rm' implementation 117584f00d7e1Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 117594f00d7e1Smrg 117604f00d7e1SmrgIf you want to complete the configuration process using your problematic 117614f00d7e1Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 117624f00d7e1Smrgto "yes", and re-run configure. 117634f00d7e1Smrg 117644f00d7e1SmrgEND 117654f00d7e1Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 117664f00d7e1Smrg fi 117674f00d7e1Smrgfi 117684f00d7e1Smrgdnl The trailing newline in this macro's definition is deliberate, for 117694f00d7e1Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 117704f00d7e1Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 11771bdcaa8d0Smrg]) 11772bdcaa8d0Smrg 117734f00d7e1Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 1177496ce994aSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 1177596ce994aSmrgdnl mangled by Autoconf and run in a shell conditional statement. 1177696ce994aSmrgm4_define([_AC_COMPILER_EXEEXT], 1177796ce994aSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 1177896ce994aSmrg 11779bdcaa8d0Smrg# When config.status generates a header, we must update the stamp-h file. 11780bdcaa8d0Smrg# This file resides in the same directory as the config header 11781bdcaa8d0Smrg# that is generated. The stamp files are numbered to have different names. 11782bdcaa8d0Smrg 11783bdcaa8d0Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11784bdcaa8d0Smrg# loop where config.status creates the headers, so we can generate 11785bdcaa8d0Smrg# our stamp files there. 11786bdcaa8d0SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11787bdcaa8d0Smrg[# Compute $1's index in $config_headers. 1178872313efbSmrg_am_arg=$1 11789bdcaa8d0Smrg_am_stamp_count=1 11790bdcaa8d0Smrgfor _am_header in $config_headers :; do 11791bdcaa8d0Smrg case $_am_header in 1179272313efbSmrg $_am_arg | $_am_arg:* ) 11793bdcaa8d0Smrg break ;; 11794bdcaa8d0Smrg * ) 11795bdcaa8d0Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11796bdcaa8d0Smrg esac 11797bdcaa8d0Smrgdone 1179872313efbSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11799bdcaa8d0Smrg 118004f00d7e1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11801bdcaa8d0Smrg# 11802bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11803bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11804bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11805bdcaa8d0Smrg 11806bdcaa8d0Smrg# AM_PROG_INSTALL_SH 11807bdcaa8d0Smrg# ------------------ 11808bdcaa8d0Smrg# Define $install_sh. 11809bdcaa8d0SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11810bdcaa8d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 118114f00d7e1Smrgif test x"${install_sh+set}" != xset; then 1181296ce994aSmrg case $am_aux_dir in 1181396ce994aSmrg *\ * | *\ *) 1181496ce994aSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 1181596ce994aSmrg *) 1181696ce994aSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 1181796ce994aSmrg esac 1181896ce994aSmrgfi 118194f00d7e1SmrgAC_SUBST([install_sh])]) 11820bdcaa8d0Smrg 118214f00d7e1Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 11822bdcaa8d0Smrg# 11823bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11824bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11825bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11826bdcaa8d0Smrg 11827bdcaa8d0Smrg# Check whether the underlying file-system supports filenames 11828bdcaa8d0Smrg# with a leading dot. For instance MS-DOS doesn't. 11829bdcaa8d0SmrgAC_DEFUN([AM_SET_LEADING_DOT], 11830bdcaa8d0Smrg[rm -rf .tst 2>/dev/null 11831bdcaa8d0Smrgmkdir .tst 2>/dev/null 11832bdcaa8d0Smrgif test -d .tst; then 11833bdcaa8d0Smrg am__leading_dot=. 11834bdcaa8d0Smrgelse 11835bdcaa8d0Smrg am__leading_dot=_ 11836bdcaa8d0Smrgfi 11837bdcaa8d0Smrgrmdir .tst 2>/dev/null 11838bdcaa8d0SmrgAC_SUBST([am__leading_dot])]) 11839bdcaa8d0Smrg 11840bdcaa8d0Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11841bdcaa8d0Smrg# From Jim Meyering 11842bdcaa8d0Smrg 118434f00d7e1Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11844bdcaa8d0Smrg# 11845bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11846bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11847bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11848bdcaa8d0Smrg 1184996ce994aSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 1185096ce994aSmrg# ---------------------------------- 1185196ce994aSmrg# Control maintainer-specific portions of Makefiles. 118524f00d7e1Smrg# Default is to disable them, unless 'enable' is passed literally. 118534f00d7e1Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 1185496ce994aSmrg# can override the default with the --enable/--disable switch. 11855bdcaa8d0SmrgAC_DEFUN([AM_MAINTAINER_MODE], 1185696ce994aSmrg[m4_case(m4_default([$1], [disable]), 1185796ce994aSmrg [enable], [m4_define([am_maintainer_other], [disable])], 1185896ce994aSmrg [disable], [m4_define([am_maintainer_other], [enable])], 1185996ce994aSmrg [m4_define([am_maintainer_other], [enable]) 1186096ce994aSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11861880c7e28SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 1186296ce994aSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 1186396ce994aSmrg AC_ARG_ENABLE([maintainer-mode], 118644f00d7e1Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 118654f00d7e1Smrg am_maintainer_other[ make rules and dependencies not useful 118664f00d7e1Smrg (and sometimes confusing) to the casual installer])], 118674f00d7e1Smrg [USE_MAINTAINER_MODE=$enableval], 118684f00d7e1Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11869bdcaa8d0Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 1187096ce994aSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11871bdcaa8d0Smrg MAINT=$MAINTAINER_MODE_TRUE 1187296ce994aSmrg AC_SUBST([MAINT])dnl 11873bdcaa8d0Smrg] 11874bdcaa8d0Smrg) 11875bdcaa8d0Smrg 11876bdcaa8d0Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11877bdcaa8d0Smrg 118784f00d7e1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11879bdcaa8d0Smrg# 11880bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11881bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11882bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11883bdcaa8d0Smrg 11884bdcaa8d0Smrg# AM_MAKE_INCLUDE() 11885bdcaa8d0Smrg# ----------------- 11886bdcaa8d0Smrg# Check to see how make treats includes. 11887bdcaa8d0SmrgAC_DEFUN([AM_MAKE_INCLUDE], 11888bdcaa8d0Smrg[am_make=${MAKE-make} 11889bdcaa8d0Smrgcat > confinc << 'END' 11890bdcaa8d0Smrgam__doit: 1189196ce994aSmrg @echo this is the am__doit target 11892bdcaa8d0Smrg.PHONY: am__doit 11893bdcaa8d0SmrgEND 11894bdcaa8d0Smrg# If we don't find an include directive, just comment out the code. 11895bdcaa8d0SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11896bdcaa8d0Smrgam__include="#" 11897bdcaa8d0Smrgam__quote= 11898bdcaa8d0Smrg_am_result=none 11899bdcaa8d0Smrg# First try GNU make style include. 11900bdcaa8d0Smrgecho "include confinc" > confmf 119014f00d7e1Smrg# Ignore all kinds of additional output from 'make'. 1190296ce994aSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 1190396ce994aSmrg*the\ am__doit\ target*) 1190496ce994aSmrg am__include=include 1190596ce994aSmrg am__quote= 1190696ce994aSmrg _am_result=GNU 1190796ce994aSmrg ;; 1190896ce994aSmrgesac 11909bdcaa8d0Smrg# Now try BSD make style include. 11910bdcaa8d0Smrgif test "$am__include" = "#"; then 11911bdcaa8d0Smrg echo '.include "confinc"' > confmf 1191296ce994aSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 1191396ce994aSmrg *the\ am__doit\ target*) 1191496ce994aSmrg am__include=.include 1191596ce994aSmrg am__quote="\"" 1191696ce994aSmrg _am_result=BSD 1191796ce994aSmrg ;; 1191896ce994aSmrg esac 11919bdcaa8d0Smrgfi 11920bdcaa8d0SmrgAC_SUBST([am__include]) 11921bdcaa8d0SmrgAC_SUBST([am__quote]) 11922bdcaa8d0SmrgAC_MSG_RESULT([$_am_result]) 11923bdcaa8d0Smrgrm -f confinc confmf 11924bdcaa8d0Smrg]) 11925bdcaa8d0Smrg 11926bdcaa8d0Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11927bdcaa8d0Smrg 119284f00d7e1Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11929bdcaa8d0Smrg# 11930bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11931bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11932bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11933bdcaa8d0Smrg 11934bdcaa8d0Smrg# AM_MISSING_PROG(NAME, PROGRAM) 11935bdcaa8d0Smrg# ------------------------------ 11936bdcaa8d0SmrgAC_DEFUN([AM_MISSING_PROG], 11937bdcaa8d0Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 11938bdcaa8d0Smrg$1=${$1-"${am_missing_run}$2"} 11939bdcaa8d0SmrgAC_SUBST($1)]) 11940bdcaa8d0Smrg 11941bdcaa8d0Smrg# AM_MISSING_HAS_RUN 11942bdcaa8d0Smrg# ------------------ 119434f00d7e1Smrg# Define MISSING if not defined so far and test if it is modern enough. 119444f00d7e1Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 11945bdcaa8d0SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 11946bdcaa8d0Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1194772313efbSmrgAC_REQUIRE_AUX_FILE([missing])dnl 1194896ce994aSmrgif test x"${MISSING+set}" != xset; then 1194996ce994aSmrg case $am_aux_dir in 1195096ce994aSmrg *\ * | *\ *) 1195196ce994aSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 1195296ce994aSmrg *) 1195396ce994aSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 1195496ce994aSmrg esac 1195596ce994aSmrgfi 11956bdcaa8d0Smrg# Use eval to expand $SHELL 119574f00d7e1Smrgif eval "$MISSING --is-lightweight"; then 119584f00d7e1Smrg am_missing_run="$MISSING " 11959bdcaa8d0Smrgelse 11960bdcaa8d0Smrg am_missing_run= 119614f00d7e1Smrg AC_MSG_WARN(['missing' script is too old or missing]) 11962bdcaa8d0Smrgfi 11963bdcaa8d0Smrg]) 11964bdcaa8d0Smrg 11965bdcaa8d0Smrg# Helper functions for option handling. -*- Autoconf -*- 11966bdcaa8d0Smrg 119674f00d7e1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11968bdcaa8d0Smrg# 11969bdcaa8d0Smrg# This file is free software; the Free Software Foundation 11970bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 11971bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 11972bdcaa8d0Smrg 11973bdcaa8d0Smrg# _AM_MANGLE_OPTION(NAME) 11974bdcaa8d0Smrg# ----------------------- 11975bdcaa8d0SmrgAC_DEFUN([_AM_MANGLE_OPTION], 11976bdcaa8d0Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11977bdcaa8d0Smrg 11978bdcaa8d0Smrg# _AM_SET_OPTION(NAME) 11979880c7e28Smrg# -------------------- 11980bdcaa8d0Smrg# Set option NAME. Presently that only means defining a flag for this option. 11981bdcaa8d0SmrgAC_DEFUN([_AM_SET_OPTION], 119824f00d7e1Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 11983bdcaa8d0Smrg 11984bdcaa8d0Smrg# _AM_SET_OPTIONS(OPTIONS) 11985880c7e28Smrg# ------------------------ 11986bdcaa8d0Smrg# OPTIONS is a space-separated list of Automake options. 11987bdcaa8d0SmrgAC_DEFUN([_AM_SET_OPTIONS], 1198872313efbSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11989bdcaa8d0Smrg 11990bdcaa8d0Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 11991bdcaa8d0Smrg# ------------------------------------------- 11992bdcaa8d0Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 11993bdcaa8d0SmrgAC_DEFUN([_AM_IF_OPTION], 11994bdcaa8d0Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 11995bdcaa8d0Smrg 119964f00d7e1Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 119974f00d7e1Smrg# 119984f00d7e1Smrg# This file is free software; the Free Software Foundation 119994f00d7e1Smrg# gives unlimited permission to copy and/or distribute it, 120004f00d7e1Smrg# with or without modifications, as long as this notice is preserved. 120014f00d7e1Smrg 120024f00d7e1Smrg# _AM_PROG_CC_C_O 120034f00d7e1Smrg# --------------- 120044f00d7e1Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 120054f00d7e1Smrg# to automatically call this. 120064f00d7e1SmrgAC_DEFUN([_AM_PROG_CC_C_O], 120074f00d7e1Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 120084f00d7e1SmrgAC_REQUIRE_AUX_FILE([compile])dnl 120094f00d7e1SmrgAC_LANG_PUSH([C])dnl 120104f00d7e1SmrgAC_CACHE_CHECK( 120114f00d7e1Smrg [whether $CC understands -c and -o together], 120124f00d7e1Smrg [am_cv_prog_cc_c_o], 120134f00d7e1Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 120144f00d7e1Smrg # Make sure it works both with $CC and with simple cc. 120154f00d7e1Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 120164f00d7e1Smrg # compilers refuse to overwrite an existing .o file with -o, 120174f00d7e1Smrg # though they will create one. 120184f00d7e1Smrg am_cv_prog_cc_c_o=yes 120194f00d7e1Smrg for am_i in 1 2; do 120204f00d7e1Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 120214f00d7e1Smrg && test -f conftest2.$ac_objext; then 120224f00d7e1Smrg : OK 120234f00d7e1Smrg else 120244f00d7e1Smrg am_cv_prog_cc_c_o=no 120254f00d7e1Smrg break 120264f00d7e1Smrg fi 120274f00d7e1Smrg done 120284f00d7e1Smrg rm -f core conftest* 120294f00d7e1Smrg unset am_i]) 120304f00d7e1Smrgif test "$am_cv_prog_cc_c_o" != yes; then 120314f00d7e1Smrg # Losing compiler, so override with the script. 120324f00d7e1Smrg # FIXME: It is wrong to rewrite CC. 120334f00d7e1Smrg # But if we don't then we get into trouble of one sort or another. 120344f00d7e1Smrg # A longer-term fix would be to have automake use am__CC in this case, 120354f00d7e1Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 120364f00d7e1Smrg CC="$am_aux_dir/compile $CC" 120374f00d7e1Smrgfi 120384f00d7e1SmrgAC_LANG_POP([C])]) 12039bdcaa8d0Smrg 120404f00d7e1Smrg# For backward compatibility. 120414f00d7e1SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 120424f00d7e1Smrg 120434f00d7e1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12044bdcaa8d0Smrg# 12045bdcaa8d0Smrg# This file is free software; the Free Software Foundation 12046bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 12047bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 12048bdcaa8d0Smrg 120494f00d7e1Smrg# AM_RUN_LOG(COMMAND) 120504f00d7e1Smrg# ------------------- 120514f00d7e1Smrg# Run COMMAND, save the exit status in ac_status, and log it. 120524f00d7e1Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 120534f00d7e1SmrgAC_DEFUN([AM_RUN_LOG], 120544f00d7e1Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 120554f00d7e1Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 120564f00d7e1Smrg ac_status=$? 120574f00d7e1Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 120584f00d7e1Smrg (exit $ac_status); }]) 120594f00d7e1Smrg 120604f00d7e1Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 120614f00d7e1Smrg 120624f00d7e1Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 120634f00d7e1Smrg# 120644f00d7e1Smrg# This file is free software; the Free Software Foundation 120654f00d7e1Smrg# gives unlimited permission to copy and/or distribute it, 120664f00d7e1Smrg# with or without modifications, as long as this notice is preserved. 12067bdcaa8d0Smrg 12068bdcaa8d0Smrg# AM_SANITY_CHECK 12069bdcaa8d0Smrg# --------------- 12070bdcaa8d0SmrgAC_DEFUN([AM_SANITY_CHECK], 12071bdcaa8d0Smrg[AC_MSG_CHECKING([whether build environment is sane]) 1207296ce994aSmrg# Reject unsafe characters in $srcdir or the absolute working directory 1207396ce994aSmrg# name. Accept space and tab only in the latter. 1207496ce994aSmrgam_lf=' 1207596ce994aSmrg' 1207696ce994aSmrgcase `pwd` in 1207796ce994aSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 1207896ce994aSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 1207996ce994aSmrgesac 1208096ce994aSmrgcase $srcdir in 1208196ce994aSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 120824f00d7e1Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 1208396ce994aSmrgesac 1208496ce994aSmrg 120854f00d7e1Smrg# Do 'set' in a subshell so we don't clobber the current shell's 12086bdcaa8d0Smrg# arguments. Must try -L first in case configure is actually a 12087bdcaa8d0Smrg# symlink; some systems play weird games with the mod time of symlinks 12088bdcaa8d0Smrg# (eg FreeBSD returns the mod time of the symlink's containing 12089bdcaa8d0Smrg# directory). 12090bdcaa8d0Smrgif ( 120914f00d7e1Smrg am_has_slept=no 120924f00d7e1Smrg for am_try in 1 2; do 120934f00d7e1Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 120944f00d7e1Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 120954f00d7e1Smrg if test "$[*]" = "X"; then 120964f00d7e1Smrg # -L didn't work. 120974f00d7e1Smrg set X `ls -t "$srcdir/configure" conftest.file` 120984f00d7e1Smrg fi 120994f00d7e1Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 121004f00d7e1Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 121014f00d7e1Smrg 121024f00d7e1Smrg # If neither matched, then we have a broken ls. This can happen 121034f00d7e1Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 121044f00d7e1Smrg # broken ls alias from the environment. This has actually 121054f00d7e1Smrg # happened. Such a system could not be considered "sane". 121064f00d7e1Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 121074f00d7e1Smrg alias in your environment]) 121084f00d7e1Smrg fi 121094f00d7e1Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 121104f00d7e1Smrg break 121114f00d7e1Smrg fi 121124f00d7e1Smrg # Just in case. 121134f00d7e1Smrg sleep 1 121144f00d7e1Smrg am_has_slept=yes 121154f00d7e1Smrg done 12116bdcaa8d0Smrg test "$[2]" = conftest.file 12117bdcaa8d0Smrg ) 12118bdcaa8d0Smrgthen 12119bdcaa8d0Smrg # Ok. 12120bdcaa8d0Smrg : 12121bdcaa8d0Smrgelse 12122bdcaa8d0Smrg AC_MSG_ERROR([newly created file is older than distributed files! 12123bdcaa8d0SmrgCheck your system clock]) 12124bdcaa8d0Smrgfi 121254f00d7e1SmrgAC_MSG_RESULT([yes]) 121264f00d7e1Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 121274f00d7e1Smrg# generated files are strictly newer. 121284f00d7e1Smrgam_sleep_pid= 121294f00d7e1Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 121304f00d7e1Smrg ( sleep 1 ) & 121314f00d7e1Smrg am_sleep_pid=$! 121324f00d7e1Smrgfi 121334f00d7e1SmrgAC_CONFIG_COMMANDS_PRE( 121344f00d7e1Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 121354f00d7e1Smrg if test -n "$am_sleep_pid"; then 121364f00d7e1Smrg # Hide warnings about reused PIDs. 121374f00d7e1Smrg wait $am_sleep_pid 2>/dev/null 121384f00d7e1Smrg fi 121394f00d7e1Smrg AC_MSG_RESULT([done])]) 121404f00d7e1Smrgrm -f conftest.file 121414f00d7e1Smrg]) 12142bdcaa8d0Smrg 121434f00d7e1Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 121440b661123Smrg# 121450b661123Smrg# This file is free software; the Free Software Foundation 121460b661123Smrg# gives unlimited permission to copy and/or distribute it, 121470b661123Smrg# with or without modifications, as long as this notice is preserved. 121480b661123Smrg 121490b661123Smrg# AM_SILENT_RULES([DEFAULT]) 121500b661123Smrg# -------------------------- 121510b661123Smrg# Enable less verbose build rules; with the default set to DEFAULT 121524f00d7e1Smrg# ("yes" being less verbose, "no" or empty being verbose). 121530b661123SmrgAC_DEFUN([AM_SILENT_RULES], 121544f00d7e1Smrg[AC_ARG_ENABLE([silent-rules], [dnl 121554f00d7e1SmrgAS_HELP_STRING( 121564f00d7e1Smrg [--enable-silent-rules], 121574f00d7e1Smrg [less verbose build output (undo: "make V=1")]) 121584f00d7e1SmrgAS_HELP_STRING( 121594f00d7e1Smrg [--disable-silent-rules], 121604f00d7e1Smrg [verbose build output (undo: "make V=0")])dnl 121614f00d7e1Smrg]) 121624f00d7e1Smrgcase $enable_silent_rules in @%:@ ((( 121634f00d7e1Smrg yes) AM_DEFAULT_VERBOSITY=0;; 121644f00d7e1Smrg no) AM_DEFAULT_VERBOSITY=1;; 121654f00d7e1Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 121660b661123Smrgesac 12167880c7e28Smrgdnl 121684f00d7e1Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12169880c7e28Smrgdnl do not support nested variable expansions. 12170880c7e28Smrgdnl See automake bug#9928 and bug#10237. 12171880c7e28Smrgam_make=${MAKE-make} 12172880c7e28SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 12173880c7e28Smrg [am_cv_make_support_nested_variables], 12174880c7e28Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 12175880c7e28SmrgBAR0=false 12176880c7e28SmrgBAR1=true 12177880c7e28SmrgV=1 12178880c7e28Smrgam__doit: 12179880c7e28Smrg @$(TRUE) 12180880c7e28Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12181880c7e28Smrg am_cv_make_support_nested_variables=yes 12182880c7e28Smrgelse 12183880c7e28Smrg am_cv_make_support_nested_variables=no 12184880c7e28Smrgfi]) 12185880c7e28Smrgif test $am_cv_make_support_nested_variables = yes; then 121864f00d7e1Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 12187880c7e28Smrg AM_V='$(V)' 12188880c7e28Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12189880c7e28Smrgelse 12190880c7e28Smrg AM_V=$AM_DEFAULT_VERBOSITY 12191880c7e28Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12192880c7e28Smrgfi 12193880c7e28SmrgAC_SUBST([AM_V])dnl 12194880c7e28SmrgAM_SUBST_NOTMAKE([AM_V])dnl 12195880c7e28SmrgAC_SUBST([AM_DEFAULT_V])dnl 12196880c7e28SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 121970b661123SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 121980b661123SmrgAM_BACKSLASH='\' 121990b661123SmrgAC_SUBST([AM_BACKSLASH])dnl 122000b661123Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 122010b661123Smrg]) 122020b661123Smrg 122034f00d7e1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12204bdcaa8d0Smrg# 12205bdcaa8d0Smrg# This file is free software; the Free Software Foundation 12206bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 12207bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 12208bdcaa8d0Smrg 12209bdcaa8d0Smrg# AM_PROG_INSTALL_STRIP 12210bdcaa8d0Smrg# --------------------- 122114f00d7e1Smrg# One issue with vendor 'install' (even GNU) is that you can't 12212bdcaa8d0Smrg# specify the program used to strip binaries. This is especially 12213bdcaa8d0Smrg# annoying in cross-compiling environments, where the build's strip 12214bdcaa8d0Smrg# is unlikely to handle the host's binaries. 12215bdcaa8d0Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 122164f00d7e1Smrg# always use install-sh in "make install-strip", and initialize 12217bdcaa8d0Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 12218bdcaa8d0SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 12219bdcaa8d0Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 122204f00d7e1Smrg# Installed binaries are usually stripped using 'strip' when the user 122214f00d7e1Smrg# run "make install-strip". However 'strip' might not be the right 12222bdcaa8d0Smrg# tool to use in cross-compilation environments, therefore Automake 122234f00d7e1Smrg# will honor the 'STRIP' environment variable to overrule this program. 122244f00d7e1Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12225bdcaa8d0Smrgif test "$cross_compiling" != no; then 12226bdcaa8d0Smrg AC_CHECK_TOOL([STRIP], [strip], :) 12227bdcaa8d0Smrgfi 1222872313efbSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12229bdcaa8d0SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 12230bdcaa8d0Smrg 122314f00d7e1Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 1223272313efbSmrg# 1223372313efbSmrg# This file is free software; the Free Software Foundation 1223472313efbSmrg# gives unlimited permission to copy and/or distribute it, 1223572313efbSmrg# with or without modifications, as long as this notice is preserved. 1223672313efbSmrg 1223772313efbSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 1223872313efbSmrg# --------------------------- 1223972313efbSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1224072313efbSmrg# This macro is traced by Automake. 1224172313efbSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1224272313efbSmrg 1224396ce994aSmrg# AM_SUBST_NOTMAKE(VARIABLE) 12244880c7e28Smrg# -------------------------- 1224596ce994aSmrg# Public sister of _AM_SUBST_NOTMAKE. 1224696ce994aSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1224796ce994aSmrg 12248bdcaa8d0Smrg# Check how to create a tarball. -*- Autoconf -*- 12249bdcaa8d0Smrg 122504f00d7e1Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 12251bdcaa8d0Smrg# 12252bdcaa8d0Smrg# This file is free software; the Free Software Foundation 12253bdcaa8d0Smrg# gives unlimited permission to copy and/or distribute it, 12254bdcaa8d0Smrg# with or without modifications, as long as this notice is preserved. 12255bdcaa8d0Smrg 12256bdcaa8d0Smrg# _AM_PROG_TAR(FORMAT) 12257bdcaa8d0Smrg# -------------------- 12258bdcaa8d0Smrg# Check how to create a tarball in format FORMAT. 122594f00d7e1Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12260bdcaa8d0Smrg# 12261bdcaa8d0Smrg# Substitute a variable $(am__tar) that is a command 12262bdcaa8d0Smrg# writing to stdout a FORMAT-tarball containing the directory 12263bdcaa8d0Smrg# $tardir. 12264bdcaa8d0Smrg# tardir=directory && $(am__tar) > result.tar 12265bdcaa8d0Smrg# 12266bdcaa8d0Smrg# Substitute a variable $(am__untar) that extract such 12267bdcaa8d0Smrg# a tarball read from stdin. 12268bdcaa8d0Smrg# $(am__untar) < result.tar 122694f00d7e1Smrg# 12270bdcaa8d0SmrgAC_DEFUN([_AM_PROG_TAR], 12271880c7e28Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 12272880c7e28Smrg# in the wild :-( We should find a proper way to deprecate it ... 12273880c7e28SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 122744f00d7e1Smrg 122754f00d7e1Smrg# We'll loop over all known methods to create a tar archive until one works. 12276bdcaa8d0Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12277bdcaa8d0Smrg 122784f00d7e1Smrgm4_if([$1], [v7], 122794f00d7e1Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 122804f00d7e1Smrg 122814f00d7e1Smrg [m4_case([$1], 122824f00d7e1Smrg [ustar], 122834f00d7e1Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 122844f00d7e1Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 122854f00d7e1Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 122864f00d7e1Smrg # and bug#13588). 122874f00d7e1Smrg am_max_uid=2097151 # 2^21 - 1 122884f00d7e1Smrg am_max_gid=$am_max_uid 122894f00d7e1Smrg # The $UID and $GID variables are not portable, so we need to resort 122904f00d7e1Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 122914f00d7e1Smrg # below are definitely unexpected, so allow the users to see them 122924f00d7e1Smrg # (that is, avoid stderr redirection). 122934f00d7e1Smrg am_uid=`id -u || echo unknown` 122944f00d7e1Smrg am_gid=`id -g || echo unknown` 122954f00d7e1Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 122964f00d7e1Smrg if test $am_uid -le $am_max_uid; then 122974f00d7e1Smrg AC_MSG_RESULT([yes]) 122984f00d7e1Smrg else 122994f00d7e1Smrg AC_MSG_RESULT([no]) 123004f00d7e1Smrg _am_tools=none 123014f00d7e1Smrg fi 123024f00d7e1Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 123034f00d7e1Smrg if test $am_gid -le $am_max_gid; then 123044f00d7e1Smrg AC_MSG_RESULT([yes]) 123054f00d7e1Smrg else 123064f00d7e1Smrg AC_MSG_RESULT([no]) 123074f00d7e1Smrg _am_tools=none 123084f00d7e1Smrg fi], 123094f00d7e1Smrg 123104f00d7e1Smrg [pax], 123114f00d7e1Smrg [], 12312bdcaa8d0Smrg 123134f00d7e1Smrg [m4_fatal([Unknown tar format])]) 123144f00d7e1Smrg 123154f00d7e1Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 123164f00d7e1Smrg 123174f00d7e1Smrg # Go ahead even if we have the value already cached. We do so because we 123184f00d7e1Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 123194f00d7e1Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 123204f00d7e1Smrg 123214f00d7e1Smrg for _am_tool in $_am_tools; do 123224f00d7e1Smrg case $_am_tool in 123234f00d7e1Smrg gnutar) 123244f00d7e1Smrg for _am_tar in tar gnutar gtar; do 123254f00d7e1Smrg AM_RUN_LOG([$_am_tar --version]) && break 123264f00d7e1Smrg done 123274f00d7e1Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 123284f00d7e1Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 123294f00d7e1Smrg am__untar="$_am_tar -xf -" 123304f00d7e1Smrg ;; 123314f00d7e1Smrg plaintar) 123324f00d7e1Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 123334f00d7e1Smrg # ustar tarball either. 123344f00d7e1Smrg (tar --version) >/dev/null 2>&1 && continue 123354f00d7e1Smrg am__tar='tar chf - "$$tardir"' 123364f00d7e1Smrg am__tar_='tar chf - "$tardir"' 123374f00d7e1Smrg am__untar='tar xf -' 123384f00d7e1Smrg ;; 123394f00d7e1Smrg pax) 123404f00d7e1Smrg am__tar='pax -L -x $1 -w "$$tardir"' 123414f00d7e1Smrg am__tar_='pax -L -x $1 -w "$tardir"' 123424f00d7e1Smrg am__untar='pax -r' 123434f00d7e1Smrg ;; 123444f00d7e1Smrg cpio) 123454f00d7e1Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 123464f00d7e1Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 123474f00d7e1Smrg am__untar='cpio -i -H $1 -d' 123484f00d7e1Smrg ;; 123494f00d7e1Smrg none) 123504f00d7e1Smrg am__tar=false 123514f00d7e1Smrg am__tar_=false 123524f00d7e1Smrg am__untar=false 123534f00d7e1Smrg ;; 123544f00d7e1Smrg esac 123554f00d7e1Smrg 123564f00d7e1Smrg # If the value was cached, stop now. We just wanted to have am__tar 123574f00d7e1Smrg # and am__untar set. 123584f00d7e1Smrg test -n "${am_cv_prog_tar_$1}" && break 123594f00d7e1Smrg 123604f00d7e1Smrg # tar/untar a dummy directory, and stop if the command works. 123614f00d7e1Smrg rm -rf conftest.dir 123624f00d7e1Smrg mkdir conftest.dir 123634f00d7e1Smrg echo GrepMe > conftest.dir/file 123644f00d7e1Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 123654f00d7e1Smrg rm -rf conftest.dir 123664f00d7e1Smrg if test -s conftest.tar; then 123674f00d7e1Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 123684f00d7e1Smrg AM_RUN_LOG([cat conftest.dir/file]) 123694f00d7e1Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 123704f00d7e1Smrg fi 123714f00d7e1Smrg done 12372bdcaa8d0Smrg rm -rf conftest.dir 12373bdcaa8d0Smrg 123744f00d7e1Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 123754f00d7e1Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 123764f00d7e1Smrg 12377bdcaa8d0SmrgAC_SUBST([am__tar]) 12378bdcaa8d0SmrgAC_SUBST([am__untar]) 12379bdcaa8d0Smrg]) # _AM_PROG_TAR 12380bdcaa8d0Smrg 12381