aclocal.m4 revision 300bf1ae
1300bf1aeSmrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 21e449e82Smrg 3300bf1aeSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4ab47cfaaSmrg 5ab47cfaaSmrg# This file is free software; the Free Software Foundation 6ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 7ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 8ab47cfaaSmrg 9ab47cfaaSmrg# This program is distributed in the hope that it will be useful, 10ab47cfaaSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ab47cfaaSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ab47cfaaSmrg# PARTICULAR PURPOSE. 13ab47cfaaSmrg 141e449e82Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 158697ee19Smrgm4_ifndef([AC_AUTOCONF_VERSION], 168697ee19Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1738770048Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 1838770048Smrg[m4_warning([this file was generated for autoconf 2.69. 198697ee19SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 208697ee19SmrgIf you have problems, you may need to regenerate the build system entirely. 211e449e82SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 228697ee19Smrg 23ab47cfaaSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 246aec45a7Smrg# 25300bf1aeSmrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 266aec45a7Smrg# Written by Gordon Matzigkeit, 1996 276aec45a7Smrg# 286aec45a7Smrg# This file is free software; the Free Software Foundation gives 296aec45a7Smrg# unlimited permission to copy and/or distribute it, with or without 306aec45a7Smrg# modifications, as long as this notice is preserved. 316aec45a7Smrg 326aec45a7Smrgm4_define([_LT_COPYING], [dnl 33300bf1aeSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 34300bf1aeSmrg# This is free software; see the source for copying conditions. There is NO 35300bf1aeSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 36300bf1aeSmrg 37300bf1aeSmrg# GNU Libtool is free software; you can redistribute it and/or modify 38300bf1aeSmrg# it under the terms of the GNU General Public License as published by 39300bf1aeSmrg# the Free Software Foundation; either version 2 of of the License, or 40300bf1aeSmrg# (at your option) any later version. 416aec45a7Smrg# 42300bf1aeSmrg# As a special exception to the GNU General Public License, if you 43300bf1aeSmrg# distribute this file as part of a program or library that is built 44300bf1aeSmrg# using GNU Libtool, you may include this file under the same 45300bf1aeSmrg# distribution terms that you use for the rest of that program. 466aec45a7Smrg# 47300bf1aeSmrg# GNU Libtool is distributed in the hope that it will be useful, but 48300bf1aeSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 496aec45a7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 506aec45a7Smrg# GNU General Public License for more details. 516aec45a7Smrg# 526aec45a7Smrg# You should have received a copy of the GNU General Public License 53300bf1aeSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 546aec45a7Smrg]) 55ab47cfaaSmrg 56300bf1aeSmrg# serial 58 LT_INIT 57ab47cfaaSmrg 58ab47cfaaSmrg 596aec45a7Smrg# LT_PREREQ(VERSION) 606aec45a7Smrg# ------------------ 616aec45a7Smrg# Complain and exit if this libtool version is less that VERSION. 626aec45a7Smrgm4_defun([LT_PREREQ], 636aec45a7Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 646aec45a7Smrg [m4_default([$3], 656aec45a7Smrg [m4_fatal([Libtool version $1 or higher is required], 666aec45a7Smrg 63)])], 676aec45a7Smrg [$2])]) 681473d951Smrg 691473d951Smrg 706aec45a7Smrg# _LT_CHECK_BUILDDIR 716aec45a7Smrg# ------------------ 726aec45a7Smrg# Complain if the absolute build directory name contains unusual characters 736aec45a7Smrgm4_defun([_LT_CHECK_BUILDDIR], 746aec45a7Smrg[case `pwd` in 756aec45a7Smrg *\ * | *\ *) 766aec45a7Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 776aec45a7Smrgesac 786aec45a7Smrg]) 796aec45a7Smrg 806aec45a7Smrg 816aec45a7Smrg# LT_INIT([OPTIONS]) 826aec45a7Smrg# ------------------ 836aec45a7SmrgAC_DEFUN([LT_INIT], 84300bf1aeSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 856aec45a7SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 866aec45a7SmrgAC_BEFORE([$0], [LT_LANG])dnl 876aec45a7SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 886aec45a7SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 896aec45a7Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 906aec45a7Smrg 916aec45a7Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 926aec45a7Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 936aec45a7Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 946aec45a7Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 956aec45a7Smrgdnl unless we require an AC_DEFUNed macro: 966aec45a7SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 976aec45a7SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 986aec45a7SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 996aec45a7SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 1006aec45a7Smrgm4_require([_LT_PROG_LTMAIN])dnl 1016aec45a7Smrg 1026aec45a7Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 1036aec45a7Smrg 1046aec45a7Smrgdnl Parse OPTIONS 1056aec45a7Smrg_LT_SET_OPTIONS([$0], [$1]) 106ab47cfaaSmrg 107ab47cfaaSmrg# This can be used to rebuild libtool when needed 108300bf1aeSmrgLIBTOOL_DEPS=$ltmain 109ab47cfaaSmrg 110ab47cfaaSmrg# Always use our own libtool. 111ab47cfaaSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112ab47cfaaSmrgAC_SUBST(LIBTOOL)dnl 113ab47cfaaSmrg 1146aec45a7Smrg_LT_SETUP 1151473d951Smrg 1166aec45a7Smrg# Only expand once: 1176aec45a7Smrgm4_define([LT_INIT]) 1186aec45a7Smrg])# LT_INIT 1191473d951Smrg 1206aec45a7Smrg# Old names: 1216aec45a7SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 1226aec45a7SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 1236aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 1246aec45a7Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 1256aec45a7Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 1266aec45a7Smrg 1276aec45a7Smrg 128300bf1aeSmrg# _LT_PREPARE_CC_BASENAME 129300bf1aeSmrg# ----------------------- 130300bf1aeSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 131300bf1aeSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 132300bf1aeSmrgfunc_cc_basename () 133300bf1aeSmrg{ 134300bf1aeSmrg for cc_temp in @S|@*""; do 135300bf1aeSmrg case $cc_temp in 136300bf1aeSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137300bf1aeSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138300bf1aeSmrg \-*) ;; 139300bf1aeSmrg *) break;; 140300bf1aeSmrg esac 141300bf1aeSmrg done 142300bf1aeSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 143300bf1aeSmrg} 144300bf1aeSmrg])# _LT_PREPARE_CC_BASENAME 145300bf1aeSmrg 146300bf1aeSmrg 1476aec45a7Smrg# _LT_CC_BASENAME(CC) 1486aec45a7Smrg# ------------------- 149300bf1aeSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 150300bf1aeSmrg# but that macro is also expanded into generated libtool script, which 151300bf1aeSmrg# arranges for $SED and $ECHO to be set by different means. 1526aec45a7Smrgm4_defun([_LT_CC_BASENAME], 153300bf1aeSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 154300bf1aeSmrgAC_REQUIRE([_LT_DECL_SED])dnl 155300bf1aeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 156300bf1aeSmrgfunc_cc_basename $1 157300bf1aeSmrgcc_basename=$func_cc_basename_result 1586aec45a7Smrg]) 1596aec45a7Smrg 1606aec45a7Smrg 1616aec45a7Smrg# _LT_FILEUTILS_DEFAULTS 1626aec45a7Smrg# ---------------------- 1636aec45a7Smrg# It is okay to use these file commands and assume they have been set 164300bf1aeSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 1656aec45a7Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 1666aec45a7Smrg[: ${CP="cp -f"} 1676aec45a7Smrg: ${MV="mv -f"} 1686aec45a7Smrg: ${RM="rm -f"} 1696aec45a7Smrg])# _LT_FILEUTILS_DEFAULTS 1706aec45a7Smrg 1716aec45a7Smrg 1726aec45a7Smrg# _LT_SETUP 1736aec45a7Smrg# --------- 1746aec45a7Smrgm4_defun([_LT_SETUP], 1756aec45a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 1776aec45a7SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 1786aec45a7SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 1795c42550eSmrg 180aa9e3350Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181aa9e3350Smrgdnl 1826aec45a7Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 1836aec45a7Smrg_LT_DECL([], [host], [0])dnl 1846aec45a7Smrg_LT_DECL([], [host_os], [0])dnl 1856aec45a7Smrgdnl 1866aec45a7Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 1876aec45a7Smrg_LT_DECL([], [build], [0])dnl 1886aec45a7Smrg_LT_DECL([], [build_os], [0])dnl 1896aec45a7Smrgdnl 1906aec45a7SmrgAC_REQUIRE([AC_PROG_CC])dnl 1916aec45a7SmrgAC_REQUIRE([LT_PATH_LD])dnl 1926aec45a7SmrgAC_REQUIRE([LT_PATH_NM])dnl 1936aec45a7Smrgdnl 194ab47cfaaSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 1956aec45a7Smrgtest -z "$LN_S" && LN_S="ln -s" 1966aec45a7Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1976aec45a7Smrgdnl 1986aec45a7SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 1996aec45a7Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 2006aec45a7Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 2011473d951Smrgdnl 2026aec45a7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2036aec45a7Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 204aa9e3350Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 2056aec45a7Smrgm4_require([_LT_CMD_RELOAD])dnl 2066aec45a7Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 207aa9e3350Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 2086aec45a7Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 2096aec45a7Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210aa9e3350Smrgm4_require([_LT_WITH_SYSROOT])dnl 211300bf1aeSmrgm4_require([_LT_CMD_TRUNCATE])dnl 2126aec45a7Smrg 2136aec45a7Smrg_LT_CONFIG_LIBTOOL_INIT([ 214300bf1aeSmrg# See if we are running on zsh, and set the options that allow our 2156aec45a7Smrg# commands through without removal of \ escapes INIT. 216300bf1aeSmrgif test -n "\${ZSH_VERSION+set}"; then 2176aec45a7Smrg setopt NO_GLOB_SUBST 2186aec45a7Smrgfi 2196aec45a7Smrg]) 220300bf1aeSmrgif test -n "${ZSH_VERSION+set}"; then 2216aec45a7Smrg setopt NO_GLOB_SUBST 2226aec45a7Smrgfi 2236aec45a7Smrg 2246aec45a7Smrg_LT_CHECK_OBJDIR 225ab47cfaaSmrg 2266aec45a7Smrgm4_require([_LT_TAG_COMPILER])dnl 227ab47cfaaSmrg 228ab47cfaaSmrgcase $host_os in 229ab47cfaaSmrgaix3*) 230ab47cfaaSmrg # AIX sometimes has problems with the GCC collect2 program. For some 231ab47cfaaSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 232ab47cfaaSmrg # vanish in a puff of smoke. 233300bf1aeSmrg if test set != "${COLLECT_NAMES+set}"; then 234ab47cfaaSmrg COLLECT_NAMES= 235ab47cfaaSmrg export COLLECT_NAMES 236ab47cfaaSmrg fi 237ab47cfaaSmrg ;; 238ab47cfaaSmrgesac 239ab47cfaaSmrg 240ab47cfaaSmrg# Global variables: 2416aec45a7Smrgofile=libtool 242ab47cfaaSmrgcan_build_shared=yes 243ab47cfaaSmrg 244300bf1aeSmrg# All known linkers require a '.a' archive for static linking (except MSVC, 245ab47cfaaSmrg# which needs '.lib'). 246ab47cfaaSmrglibext=a 247ab47cfaaSmrg 248300bf1aeSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2495c42550eSmrg 250300bf1aeSmrgold_CC=$CC 251300bf1aeSmrgold_CFLAGS=$CFLAGS 252ab47cfaaSmrg 253ab47cfaaSmrg# Set sane defaults for various variables 254ab47cfaaSmrgtest -z "$CC" && CC=cc 255ab47cfaaSmrgtest -z "$LTCC" && LTCC=$CC 256ab47cfaaSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257ab47cfaaSmrgtest -z "$LD" && LD=ld 258ab47cfaaSmrgtest -z "$ac_objext" && ac_objext=o 259ab47cfaaSmrg 260ab47cfaaSmrg_LT_CC_BASENAME([$compiler]) 261ab47cfaaSmrg 262ab47cfaaSmrg# Only perform the check for file, if the check method requires it 2636aec45a7Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 264ab47cfaaSmrgcase $deplibs_check_method in 265ab47cfaaSmrgfile_magic*) 266ab47cfaaSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 2676aec45a7Smrg _LT_PATH_MAGIC 268ab47cfaaSmrg fi 269ab47cfaaSmrg ;; 270ab47cfaaSmrgesac 271ab47cfaaSmrg 2726aec45a7Smrg# Use C for the default configuration in the libtool script 2736aec45a7SmrgLT_SUPPORTED_TAG([CC]) 2746aec45a7Smrg_LT_LANG_C_CONFIG 2756aec45a7Smrg_LT_LANG_DEFAULT_CONFIG 2766aec45a7Smrg_LT_CONFIG_COMMANDS 2776aec45a7Smrg])# _LT_SETUP 2781473d951Smrg 2791473d951Smrg 2806aec45a7Smrg# _LT_PREPARE_SED_QUOTE_VARS 2816aec45a7Smrg# -------------------------- 2826aec45a7Smrg# Define a few sed substitution that help us do robust quoting. 2836aec45a7Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 2846aec45a7Smrg[# Backslashify metacharacters that are still active within 2856aec45a7Smrg# double-quoted strings. 2866aec45a7Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 2871473d951Smrg 2886aec45a7Smrg# Same as above, but do not quote variable references. 2896aec45a7Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 2901473d951Smrg 2916aec45a7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 2926aec45a7Smrg# double_quote_subst'ed string. 2936aec45a7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 2941473d951Smrg 2956aec45a7Smrg# Sed substitution to delay expansion of an escaped single quote. 2966aec45a7Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 2971473d951Smrg 2986aec45a7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 2996aec45a7Smrgno_glob_subst='s/\*/\\\*/g' 3006aec45a7Smrg]) 301ab47cfaaSmrg 3026aec45a7Smrg# _LT_PROG_LTMAIN 3036aec45a7Smrg# --------------- 304300bf1aeSmrg# Note that this code is called both from 'configure', and 'config.status' 3056aec45a7Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 306300bf1aeSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 3076aec45a7Smrg# so we pass a copy along to make sure it has a sensible value anyway. 3086aec45a7Smrgm4_defun([_LT_PROG_LTMAIN], 3096aec45a7Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 3106aec45a7Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 311300bf1aeSmrgltmain=$ac_aux_dir/ltmain.sh 3126aec45a7Smrg])# _LT_PROG_LTMAIN 313ab47cfaaSmrg 314ab47cfaaSmrg 3155c42550eSmrg 3166aec45a7Smrg# So that we can recreate a full libtool script including additional 3176aec45a7Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 318300bf1aeSmrg# in macros and then make a single call at the end using the 'libtool' 3196aec45a7Smrg# label. 3205c42550eSmrg 321ab47cfaaSmrg 3226aec45a7Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 3236aec45a7Smrg# ---------------------------------------- 3246aec45a7Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3256aec45a7Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 3266aec45a7Smrg[m4_ifval([$1], 3276aec45a7Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 3286aec45a7Smrg [$1 3296aec45a7Smrg])])]) 330ab47cfaaSmrg 3316aec45a7Smrg# Initialize. 3326aec45a7Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333ab47cfaaSmrg 334ab47cfaaSmrg 3356aec45a7Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 3366aec45a7Smrg# ------------------------------ 3376aec45a7Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 3386aec45a7Smrgm4_define([_LT_CONFIG_LIBTOOL], 3396aec45a7Smrg[m4_ifval([$1], 3406aec45a7Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 3416aec45a7Smrg [$1 3426aec45a7Smrg])])]) 3436aec45a7Smrg 3446aec45a7Smrg# Initialize. 3456aec45a7Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 3466aec45a7Smrg 3476aec45a7Smrg 3486aec45a7Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 3496aec45a7Smrg# ----------------------------------------------------- 3506aec45a7Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 3516aec45a7Smrg[_LT_CONFIG_LIBTOOL([$1]) 3526aec45a7Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3536aec45a7Smrg]) 354ab47cfaaSmrg 3551473d951Smrg 3566aec45a7Smrg# _LT_FORMAT_COMMENT([COMMENT]) 3576aec45a7Smrg# ----------------------------- 3586aec45a7Smrg# Add leading comment marks to the start of each line, and a trailing 3596aec45a7Smrg# full-stop to the whole comment if one is not present already. 3606aec45a7Smrgm4_define([_LT_FORMAT_COMMENT], 3616aec45a7Smrg[m4_ifval([$1], [ 3626aec45a7Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 3636aec45a7Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 3646aec45a7Smrg)]) 3656aec45a7Smrg 3666aec45a7Smrg 3676aec45a7Smrg 3686aec45a7Smrg 3696aec45a7Smrg 3706aec45a7Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 3716aec45a7Smrg# ------------------------------------------------------------------- 3726aec45a7Smrg# CONFIGNAME is the name given to the value in the libtool script. 3736aec45a7Smrg# VARNAME is the (base) name used in the configure script. 3746aec45a7Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 3756aec45a7Smrg# VARNAME. Any other value will be used directly. 3766aec45a7Smrgm4_define([_LT_DECL], 3776aec45a7Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 3786aec45a7Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 3796aec45a7Smrg [m4_ifval([$1], [$1], [$2])]) 3806aec45a7Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 3816aec45a7Smrg m4_ifval([$4], 3826aec45a7Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 3836aec45a7Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 3846aec45a7Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 3851473d951Smrg]) 3861473d951Smrg 387ab47cfaaSmrg 3886aec45a7Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 3896aec45a7Smrg# -------------------------------------------------------- 3906aec45a7Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391ab47cfaaSmrg 392ab47cfaaSmrg 3936aec45a7Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 3946aec45a7Smrg# ------------------------------------------------ 3956aec45a7Smrgm4_define([lt_decl_tag_varnames], 3966aec45a7Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 397ab47cfaaSmrg 398ab47cfaaSmrg 3996aec45a7Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 4006aec45a7Smrg# --------------------------------------------------------- 4016aec45a7Smrgm4_define([_lt_decl_filter], 4026aec45a7Smrg[m4_case([$#], 4036aec45a7Smrg [0], [m4_fatal([$0: too few arguments: $#])], 4046aec45a7Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 4056aec45a7Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 4066aec45a7Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 4076aec45a7Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 4086aec45a7Smrg]) 409ab47cfaaSmrg 410ab47cfaaSmrg 4116aec45a7Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 4126aec45a7Smrg# -------------------------------------------------- 4136aec45a7Smrgm4_define([lt_decl_quote_varnames], 4146aec45a7Smrg[_lt_decl_filter([value], [1], $@)]) 415ab47cfaaSmrg 416ab47cfaaSmrg 4176aec45a7Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 4186aec45a7Smrg# --------------------------------------------------- 4196aec45a7Smrgm4_define([lt_decl_dquote_varnames], 4206aec45a7Smrg[_lt_decl_filter([value], [2], $@)]) 421ab47cfaaSmrg 422ab47cfaaSmrg 4236aec45a7Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 4246aec45a7Smrg# --------------------------------------------------- 4256aec45a7Smrgm4_define([lt_decl_varnames_tagged], 4266aec45a7Smrg[m4_assert([$# <= 2])dnl 4276aec45a7Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 4286aec45a7Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 4296aec45a7Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 4306aec45a7Smrgm4_define([_lt_decl_varnames_tagged], 4316aec45a7Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432ab47cfaaSmrg 4335c42550eSmrg 4346aec45a7Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 4356aec45a7Smrg# ------------------------------------------------ 4366aec45a7Smrgm4_define([lt_decl_all_varnames], 4376aec45a7Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 4386aec45a7Smrg m4_if([$2], [], 4396aec45a7Smrg m4_quote(lt_decl_varnames), 4406aec45a7Smrg m4_quote(m4_shift($@))))[]dnl 4416aec45a7Smrg]) 4426aec45a7Smrgm4_define([_lt_decl_all_varnames], 4436aec45a7Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 4446aec45a7Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4456aec45a7Smrg]) 446ab47cfaaSmrg 447ab47cfaaSmrg 4486aec45a7Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 4496aec45a7Smrg# ------------------------------------ 450300bf1aeSmrg# Quote a variable value, and forward it to 'config.status' so that its 451300bf1aeSmrg# declaration there will have the same value as in 'configure'. VARNAME 4526aec45a7Smrg# must have a single quote delimited value for this to work. 4536aec45a7Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 4546aec45a7Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455ab47cfaaSmrg 456ab47cfaaSmrg 4576aec45a7Smrg# _LT_CONFIG_STATUS_DECLARATIONS 4586aec45a7Smrg# ------------------------------ 4596aec45a7Smrg# We delimit libtool config variables with single quotes, so when 4606aec45a7Smrg# we write them to config.status, we have to be sure to quote all 4616aec45a7Smrg# embedded single quotes properly. In configure, this macro expands 4626aec45a7Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4636aec45a7Smrg# 4646aec45a7Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 4656aec45a7Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 4666aec45a7Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 4676aec45a7Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 468ab47cfaaSmrg 4696aec45a7Smrg 4706aec45a7Smrg# _LT_LIBTOOL_TAGS 4716aec45a7Smrg# ---------------- 4726aec45a7Smrg# Output comment and list of tags supported by the script 4736aec45a7Smrgm4_defun([_LT_LIBTOOL_TAGS], 4746aec45a7Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 475300bf1aeSmrgavailable_tags='_LT_TAGS'dnl 4766aec45a7Smrg]) 4776aec45a7Smrg 4786aec45a7Smrg 4796aec45a7Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 4806aec45a7Smrg# ----------------------------------- 4816aec45a7Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 4826aec45a7Smrg# expand to a commented shell variable setting: 4836aec45a7Smrg# 4846aec45a7Smrg# # Some comment about what VAR is for. 4856aec45a7Smrg# visible_name=$lt_internal_name 4866aec45a7Smrgm4_define([_LT_LIBTOOL_DECLARE], 4876aec45a7Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 4886aec45a7Smrg [description])))[]dnl 4896aec45a7Smrgm4_pushdef([_libtool_name], 4906aec45a7Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 4916aec45a7Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 4926aec45a7Smrg [0], [_libtool_name=[$]$1], 4936aec45a7Smrg [1], [_libtool_name=$lt_[]$1], 4946aec45a7Smrg [2], [_libtool_name=$lt_[]$1], 4956aec45a7Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 4966aec45a7Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 4976aec45a7Smrg]) 4986aec45a7Smrg 4996aec45a7Smrg 5006aec45a7Smrg# _LT_LIBTOOL_CONFIG_VARS 5016aec45a7Smrg# ----------------------- 5026aec45a7Smrg# Produce commented declarations of non-tagged libtool config variables 503300bf1aeSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 5046aec45a7Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 5056aec45a7Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 5066aec45a7Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 5076aec45a7Smrg[m4_foreach([_lt_var], 5086aec45a7Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 5096aec45a7Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 5106aec45a7Smrg 5116aec45a7Smrg 5126aec45a7Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 5136aec45a7Smrg# ------------------------- 5146aec45a7Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 5156aec45a7Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 5166aec45a7Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5176aec45a7Smrg 5186aec45a7Smrg 5196aec45a7Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 5206aec45a7Smrg# ------------------------------ 5216aec45a7Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 5226aec45a7Smrg 5236aec45a7Smrg 5246aec45a7Smrg# _LT_CONFIG_COMMANDS 5256aec45a7Smrg# ------------------- 5266aec45a7Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 5276aec45a7Smrg# variables for single and double quote escaping we saved from calls 5286aec45a7Smrg# to _LT_DECL, we can put quote escaped variables declarations 529300bf1aeSmrg# into 'config.status', and then the shell code to quote escape them in 530300bf1aeSmrg# for loops in 'config.status'. Finally, any additional code accumulated 5316aec45a7Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 5326aec45a7Smrgm4_defun([_LT_CONFIG_COMMANDS], 5336aec45a7Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 5346aec45a7Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 5356aec45a7Smrg dnl instead of duplicating it all over again into config.status, 5366aec45a7Smrg dnl then we will have config.status run $CONFIG_LT later, so it 5376aec45a7Smrg dnl needs to know what name is stored there: 5386aec45a7Smrg [AC_CONFIG_COMMANDS([libtool], 5396aec45a7Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 5406aec45a7Smrg dnl If the libtool generation code is destined for config.status, 5416aec45a7Smrg dnl expand the accumulated commands and init code now: 5426aec45a7Smrg [AC_CONFIG_COMMANDS([libtool], 5436aec45a7Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 5446aec45a7Smrg])#_LT_CONFIG_COMMANDS 5456aec45a7Smrg 5466aec45a7Smrg 5476aec45a7Smrg# Initialize. 5486aec45a7Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 5496aec45a7Smrg[ 5506aec45a7Smrg 5516aec45a7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 5526aec45a7Smrg# if CDPATH is set. 5536aec45a7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 5546aec45a7Smrg 5556aec45a7Smrgsed_quote_subst='$sed_quote_subst' 5566aec45a7Smrgdouble_quote_subst='$double_quote_subst' 5576aec45a7Smrgdelay_variable_subst='$delay_variable_subst' 5586aec45a7Smrg_LT_CONFIG_STATUS_DECLARATIONS 5596aec45a7SmrgLTCC='$LTCC' 5606aec45a7SmrgLTCFLAGS='$LTCFLAGS' 5616aec45a7Smrgcompiler='$compiler_DEFAULT' 5626aec45a7Smrg 5636aec45a7Smrg# A function that is used when there is no print builtin or printf. 5646aec45a7Smrgfunc_fallback_echo () 5656aec45a7Smrg{ 5666aec45a7Smrg eval 'cat <<_LTECHO_EOF 5676aec45a7Smrg\$[]1 5686aec45a7Smrg_LTECHO_EOF' 5696aec45a7Smrg} 5706aec45a7Smrg 5716aec45a7Smrg# Quote evaled strings. 5726aec45a7Smrgfor var in lt_decl_all_varnames([[ \ 5736aec45a7Smrg]], lt_decl_quote_varnames); do 5746aec45a7Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5756aec45a7Smrg *[[\\\\\\\`\\"\\\$]]*) 576300bf1aeSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5775c42550eSmrg ;; 5786aec45a7Smrg *) 5796aec45a7Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5805c42550eSmrg ;; 5815c42550eSmrg esac 5826aec45a7Smrgdone 583ab47cfaaSmrg 5846aec45a7Smrg# Double-quote double-evaled strings. 5856aec45a7Smrgfor var in lt_decl_all_varnames([[ \ 5866aec45a7Smrg]], lt_decl_dquote_varnames); do 5876aec45a7Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 5886aec45a7Smrg *[[\\\\\\\`\\"\\\$]]*) 589300bf1aeSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 5905c42550eSmrg ;; 5916aec45a7Smrg *) 5926aec45a7Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 5935c42550eSmrg ;; 594ab47cfaaSmrg esac 5956aec45a7Smrgdone 596ab47cfaaSmrg 5976aec45a7Smrg_LT_OUTPUT_LIBTOOL_INIT 5986aec45a7Smrg]) 5995c42550eSmrg 6006aec45a7Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 6016aec45a7Smrg# ------------------------------------ 6026aec45a7Smrg# Generate a child script FILE with all initialization necessary to 6036aec45a7Smrg# reuse the environment learned by the parent script, and make the 6046aec45a7Smrg# file executable. If COMMENT is supplied, it is inserted after the 605300bf1aeSmrg# '#!' sequence but before initialization text begins. After this 6066aec45a7Smrg# macro, additional text can be appended to FILE to form the body of 6076aec45a7Smrg# the child script. The macro ends with non-zero status if the 6086aec45a7Smrg# file could not be fully written (such as if the disk is full). 6096aec45a7Smrgm4_ifdef([AS_INIT_GENERATED], 6106aec45a7Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 6116aec45a7Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 6126aec45a7Smrg[m4_require([AS_PREPARE])]dnl 6136aec45a7Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 6146aec45a7Smrg[lt_write_fail=0 6156aec45a7Smrgcat >$1 <<_ASEOF || lt_write_fail=1 6166aec45a7Smrg#! $SHELL 6176aec45a7Smrg# Generated by $as_me. 6186aec45a7Smrg$2 6196aec45a7SmrgSHELL=\${CONFIG_SHELL-$SHELL} 6206aec45a7Smrgexport SHELL 6216aec45a7Smrg_ASEOF 6226aec45a7Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 6236aec45a7SmrgAS_SHELL_SANITIZE 6246aec45a7Smrg_AS_PREPARE 6256aec45a7Smrgexec AS_MESSAGE_FD>&1 6266aec45a7Smrg_ASEOF 627300bf1aeSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 6286aec45a7Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 6296aec45a7Smrg 6306aec45a7Smrg# LT_OUTPUT 6316aec45a7Smrg# --------- 6326aec45a7Smrg# This macro allows early generation of the libtool script (before 6336aec45a7Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 6346aec45a7Smrg# tests. 6356aec45a7SmrgAC_DEFUN([LT_OUTPUT], 6366aec45a7Smrg[: ${CONFIG_LT=./config.lt} 6376aec45a7SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 6386aec45a7Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 6396aec45a7Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 6406aec45a7Smrg 6416aec45a7Smrgcat >>"$CONFIG_LT" <<\_LTEOF 6426aec45a7Smrglt_cl_silent=false 6436aec45a7Smrgexec AS_MESSAGE_LOG_FD>>config.log 6446aec45a7Smrg{ 6456aec45a7Smrg echo 6466aec45a7Smrg AS_BOX([Running $as_me.]) 6476aec45a7Smrg} >&AS_MESSAGE_LOG_FD 648ab47cfaaSmrg 6496aec45a7Smrglt_cl_help="\ 650300bf1aeSmrg'$as_me' creates a local libtool stub from the current configuration, 6516aec45a7Smrgfor use in further configure time tests before the real libtool is 6526aec45a7Smrggenerated. 6531473d951Smrg 6546aec45a7SmrgUsage: $[0] [[OPTIONS]] 655ab47cfaaSmrg 6566aec45a7Smrg -h, --help print this help, then exit 6576aec45a7Smrg -V, --version print version number, then exit 6586aec45a7Smrg -q, --quiet do not print progress messages 6596aec45a7Smrg -d, --debug don't remove temporary files 660ab47cfaaSmrg 6616aec45a7SmrgReport bugs to <bug-libtool@gnu.org>." 662ab47cfaaSmrg 6636aec45a7Smrglt_cl_version="\ 6646aec45a7Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 6656aec45a7Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 6666aec45a7Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 667ab47cfaaSmrg 668aa9e3350SmrgCopyright (C) 2011 Free Software Foundation, Inc. 6696aec45a7SmrgThis config.lt script is free software; the Free Software Foundation 6706aec45a7Smrggives unlimited permision to copy, distribute and modify it." 6711473d951Smrg 672300bf1aeSmrgwhile test 0 != $[#] 6736aec45a7Smrgdo 6746aec45a7Smrg case $[1] in 6756aec45a7Smrg --version | --v* | -V ) 6766aec45a7Smrg echo "$lt_cl_version"; exit 0 ;; 6776aec45a7Smrg --help | --h* | -h ) 6786aec45a7Smrg echo "$lt_cl_help"; exit 0 ;; 6796aec45a7Smrg --debug | --d* | -d ) 6806aec45a7Smrg debug=: ;; 6816aec45a7Smrg --quiet | --q* | --silent | --s* | -q ) 6826aec45a7Smrg lt_cl_silent=: ;; 6836aec45a7Smrg 6846aec45a7Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 685300bf1aeSmrgTry '$[0] --help' for more information.]) ;; 6866aec45a7Smrg 6876aec45a7Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 688300bf1aeSmrgTry '$[0] --help' for more information.]) ;; 6896aec45a7Smrg esac 6906aec45a7Smrg shift 6916aec45a7Smrgdone 692ab47cfaaSmrg 6936aec45a7Smrgif $lt_cl_silent; then 6946aec45a7Smrg exec AS_MESSAGE_FD>/dev/null 695ab47cfaaSmrgfi 6966aec45a7Smrg_LTEOF 6976aec45a7Smrg 6986aec45a7Smrgcat >>"$CONFIG_LT" <<_LTEOF 6996aec45a7Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 7006aec45a7Smrg_LTEOF 7016aec45a7Smrg 7026aec45a7Smrgcat >>"$CONFIG_LT" <<\_LTEOF 7036aec45a7SmrgAC_MSG_NOTICE([creating $ofile]) 7046aec45a7Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 7056aec45a7SmrgAS_EXIT(0) 7066aec45a7Smrg_LTEOF 7076aec45a7Smrgchmod +x "$CONFIG_LT" 7086aec45a7Smrg 7096aec45a7Smrg# configure is writing to config.log, but config.lt does its own redirection, 7106aec45a7Smrg# appending to config.log, which fails on DOS, as config.log is still kept 7116aec45a7Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 7126aec45a7Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 7136aec45a7Smrglt_cl_success=: 714300bf1aeSmrgtest yes = "$silent" && 7156aec45a7Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 7166aec45a7Smrgexec AS_MESSAGE_LOG_FD>/dev/null 7176aec45a7Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 7186aec45a7Smrgexec AS_MESSAGE_LOG_FD>>config.log 7196aec45a7Smrg$lt_cl_success || AS_EXIT(1) 7206aec45a7Smrg])# LT_OUTPUT 7216aec45a7Smrg 7226aec45a7Smrg 7236aec45a7Smrg# _LT_CONFIG(TAG) 7246aec45a7Smrg# --------------- 7256aec45a7Smrg# If TAG is the built-in tag, create an initial libtool script with a 7266aec45a7Smrg# default configuration from the untagged config vars. Otherwise add code 7276aec45a7Smrg# to config.status for appending the configuration named by TAG from the 7286aec45a7Smrg# matching tagged config vars. 7296aec45a7Smrgm4_defun([_LT_CONFIG], 7306aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7316aec45a7Smrg_LT_CONFIG_SAVE_COMMANDS([ 7326aec45a7Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 7336aec45a7Smrg m4_if(_LT_TAG, [C], [ 734300bf1aeSmrg # See if we are running on zsh, and set the options that allow our 7356aec45a7Smrg # commands through without removal of \ escapes. 736300bf1aeSmrg if test -n "${ZSH_VERSION+set}"; then 7376aec45a7Smrg setopt NO_GLOB_SUBST 7386aec45a7Smrg fi 739ab47cfaaSmrg 740300bf1aeSmrg cfgfile=${ofile}T 7416aec45a7Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 7426aec45a7Smrg $RM "$cfgfile" 743ab47cfaaSmrg 7446aec45a7Smrg cat <<_LT_EOF >> "$cfgfile" 7456aec45a7Smrg#! $SHELL 746300bf1aeSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 7476aec45a7Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 7486aec45a7Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 749300bf1aeSmrg 750300bf1aeSmrg# Provide generalized library-building support services. 751300bf1aeSmrg# Written by Gordon Matzigkeit, 1996 752300bf1aeSmrg 7536aec45a7Smrg_LT_COPYING 7546aec45a7Smrg_LT_LIBTOOL_TAGS 755ab47cfaaSmrg 756300bf1aeSmrg# Configured defaults for sys_lib_dlsearch_path munging. 757300bf1aeSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 758300bf1aeSmrg 7596aec45a7Smrg# ### BEGIN LIBTOOL CONFIG 7606aec45a7Smrg_LT_LIBTOOL_CONFIG_VARS 7616aec45a7Smrg_LT_LIBTOOL_TAG_VARS 7626aec45a7Smrg# ### END LIBTOOL CONFIG 763ab47cfaaSmrg 764300bf1aeSmrg_LT_EOF 765300bf1aeSmrg 766300bf1aeSmrg cat <<'_LT_EOF' >> "$cfgfile" 767300bf1aeSmrg 768300bf1aeSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 769300bf1aeSmrg 770300bf1aeSmrg_LT_PREPARE_MUNGE_PATH_LIST 771300bf1aeSmrg_LT_PREPARE_CC_BASENAME 772300bf1aeSmrg 773300bf1aeSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 774300bf1aeSmrg 7756aec45a7Smrg_LT_EOF 776ab47cfaaSmrg 7776aec45a7Smrg case $host_os in 7786aec45a7Smrg aix3*) 7796aec45a7Smrg cat <<\_LT_EOF >> "$cfgfile" 7806aec45a7Smrg# AIX sometimes has problems with the GCC collect2 program. For some 7816aec45a7Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 7826aec45a7Smrg# vanish in a puff of smoke. 783300bf1aeSmrgif test set != "${COLLECT_NAMES+set}"; then 7846aec45a7Smrg COLLECT_NAMES= 7856aec45a7Smrg export COLLECT_NAMES 7866aec45a7Smrgfi 7876aec45a7Smrg_LT_EOF 788ab47cfaaSmrg ;; 7896aec45a7Smrg esac 790ab47cfaaSmrg 7916aec45a7Smrg _LT_PROG_LTMAIN 792ab47cfaaSmrg 7936aec45a7Smrg # We use sed instead of cat because bash on DJGPP gets confused if 7946aec45a7Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 7956aec45a7Smrg # text mode, it properly converts lines to CR/LF. This bash problem 7966aec45a7Smrg # is reportedly fixed, but why not run on old versions too? 797aa9e3350Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 798aa9e3350Smrg || (rm -f "$cfgfile"; exit 1) 799ab47cfaaSmrg 800aa9e3350Smrg mv -f "$cfgfile" "$ofile" || 8016aec45a7Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 8026aec45a7Smrg chmod +x "$ofile" 8036aec45a7Smrg], 8046aec45a7Smrg[cat <<_LT_EOF >> "$ofile" 805ab47cfaaSmrg 8066aec45a7Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 8076aec45a7Smrgdnl in a comment (ie after a #). 8086aec45a7Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 8096aec45a7Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 8106aec45a7Smrg# ### END LIBTOOL TAG CONFIG: $1 8116aec45a7Smrg_LT_EOF 8126aec45a7Smrg])dnl /m4_if 8136aec45a7Smrg], 8146aec45a7Smrg[m4_if([$1], [], [ 8156aec45a7Smrg PACKAGE='$PACKAGE' 8166aec45a7Smrg VERSION='$VERSION' 8176aec45a7Smrg RM='$RM' 8186aec45a7Smrg ofile='$ofile'], []) 8196aec45a7Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 8206aec45a7Smrg])# _LT_CONFIG 821ab47cfaaSmrg 822ab47cfaaSmrg 8236aec45a7Smrg# LT_SUPPORTED_TAG(TAG) 8246aec45a7Smrg# --------------------- 8256aec45a7Smrg# Trace this macro to discover what tags are supported by the libtool 8266aec45a7Smrg# --tag option, using: 8276aec45a7Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 8286aec45a7SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829ab47cfaaSmrg 830ab47cfaaSmrg 8316aec45a7Smrg# C support is built-in for now 8326aec45a7Smrgm4_define([_LT_LANG_C_enabled], []) 8336aec45a7Smrgm4_define([_LT_TAGS], []) 834ab47cfaaSmrg 8355c42550eSmrg 8366aec45a7Smrg# LT_LANG(LANG) 8376aec45a7Smrg# ------------- 8386aec45a7Smrg# Enable libtool support for the given language if not already enabled. 8396aec45a7SmrgAC_DEFUN([LT_LANG], 8406aec45a7Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 8416aec45a7Smrgm4_case([$1], 8426aec45a7Smrg [C], [_LT_LANG(C)], 8436aec45a7Smrg [C++], [_LT_LANG(CXX)], 844aa9e3350Smrg [Go], [_LT_LANG(GO)], 8456aec45a7Smrg [Java], [_LT_LANG(GCJ)], 8466aec45a7Smrg [Fortran 77], [_LT_LANG(F77)], 8476aec45a7Smrg [Fortran], [_LT_LANG(FC)], 8486aec45a7Smrg [Windows Resource], [_LT_LANG(RC)], 8496aec45a7Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 8506aec45a7Smrg [_LT_LANG($1)], 8516aec45a7Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 8526aec45a7Smrg])# LT_LANG 8536aec45a7Smrg 8546aec45a7Smrg 8556aec45a7Smrg# _LT_LANG(LANGNAME) 8566aec45a7Smrg# ------------------ 8576aec45a7Smrgm4_defun([_LT_LANG], 8586aec45a7Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 8596aec45a7Smrg [LT_SUPPORTED_TAG([$1])dnl 8606aec45a7Smrg m4_append([_LT_TAGS], [$1 ])dnl 8616aec45a7Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 8626aec45a7Smrg _LT_LANG_$1_CONFIG($1)])dnl 8636aec45a7Smrg])# _LT_LANG 864ab47cfaaSmrg 865ab47cfaaSmrg 866aa9e3350Smrgm4_ifndef([AC_PROG_GO], [ 867aa9e3350Smrg# NOTE: This macro has been submitted for inclusion into # 868aa9e3350Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 869aa9e3350Smrg# a released version of Autoconf we should remove this # 870aa9e3350Smrg# macro and use it instead. # 871aa9e3350Smrgm4_defun([AC_PROG_GO], 872aa9e3350Smrg[AC_LANG_PUSH(Go)dnl 873aa9e3350SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 874aa9e3350SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875aa9e3350Smrg_AC_ARG_VAR_LDFLAGS()dnl 876aa9e3350SmrgAC_CHECK_TOOL(GOC, gccgo) 877aa9e3350Smrgif test -z "$GOC"; then 878aa9e3350Smrg if test -n "$ac_tool_prefix"; then 879aa9e3350Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880aa9e3350Smrg fi 881aa9e3350Smrgfi 882aa9e3350Smrgif test -z "$GOC"; then 883aa9e3350Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884aa9e3350Smrgfi 885aa9e3350Smrg])#m4_defun 886aa9e3350Smrg])#m4_ifndef 887aa9e3350Smrg 888aa9e3350Smrg 8896aec45a7Smrg# _LT_LANG_DEFAULT_CONFIG 8906aec45a7Smrg# ----------------------- 8916aec45a7Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 8926aec45a7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 8936aec45a7Smrg [LT_LANG(CXX)], 8946aec45a7Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 8956aec45a7Smrg 8966aec45a7SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 8976aec45a7Smrg [LT_LANG(F77)], 8986aec45a7Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 8996aec45a7Smrg 9006aec45a7SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 9016aec45a7Smrg [LT_LANG(FC)], 9026aec45a7Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 9036aec45a7Smrg 9046aec45a7Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 9056aec45a7Smrgdnl pulling things in needlessly. 9066aec45a7SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 9076aec45a7Smrg [LT_LANG(GCJ)], 9086aec45a7Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 9096aec45a7Smrg [LT_LANG(GCJ)], 9106aec45a7Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 9116aec45a7Smrg [LT_LANG(GCJ)], 9126aec45a7Smrg [m4_ifdef([AC_PROG_GCJ], 9136aec45a7Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 9146aec45a7Smrg m4_ifdef([A][M_PROG_GCJ], 9156aec45a7Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 9166aec45a7Smrg m4_ifdef([LT_PROG_GCJ], 9176aec45a7Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 9186aec45a7Smrg 919aa9e3350SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 920aa9e3350Smrg [LT_LANG(GO)], 921aa9e3350Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 922aa9e3350Smrg 9236aec45a7SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 9246aec45a7Smrg [LT_LANG(RC)], 9256aec45a7Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 9266aec45a7Smrg])# _LT_LANG_DEFAULT_CONFIG 9276aec45a7Smrg 9286aec45a7Smrg# Obsolete macros: 9296aec45a7SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 9306aec45a7SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 9316aec45a7SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 9326aec45a7SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 9336aec45a7SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 9346aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 9356aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 9366aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 9376aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 9386aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 9396aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 9406aec45a7Smrg 9416aec45a7Smrg 9426aec45a7Smrg# _LT_TAG_COMPILER 9436aec45a7Smrg# ---------------- 9446aec45a7Smrgm4_defun([_LT_TAG_COMPILER], 9456aec45a7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 946ab47cfaaSmrg 9476aec45a7Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 9486aec45a7Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 9496aec45a7Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 9506aec45a7Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 951ab47cfaaSmrg 9526aec45a7Smrg# If no C compiler was specified, use CC. 9536aec45a7SmrgLTCC=${LTCC-"$CC"} 954ab47cfaaSmrg 9556aec45a7Smrg# If no C compiler flags were specified, use CFLAGS. 9566aec45a7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957ab47cfaaSmrg 9586aec45a7Smrg# Allow CC to be a program name with arguments. 9596aec45a7Smrgcompiler=$CC 9606aec45a7Smrg])# _LT_TAG_COMPILER 961ab47cfaaSmrg 962ab47cfaaSmrg 9636aec45a7Smrg# _LT_COMPILER_BOILERPLATE 9646aec45a7Smrg# ------------------------ 9656aec45a7Smrg# Check for compiler boilerplate output or warnings with 9666aec45a7Smrg# the simple compiler test code. 9676aec45a7Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 9686aec45a7Smrg[m4_require([_LT_DECL_SED])dnl 9696aec45a7Smrgac_outfile=conftest.$ac_objext 9706aec45a7Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9716aec45a7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9726aec45a7Smrg_lt_compiler_boilerplate=`cat conftest.err` 9736aec45a7Smrg$RM conftest* 9746aec45a7Smrg])# _LT_COMPILER_BOILERPLATE 975ab47cfaaSmrg 9766aec45a7Smrg 9776aec45a7Smrg# _LT_LINKER_BOILERPLATE 9786aec45a7Smrg# ---------------------- 9796aec45a7Smrg# Check for linker boilerplate output or warnings with 9806aec45a7Smrg# the simple link test code. 9816aec45a7Smrgm4_defun([_LT_LINKER_BOILERPLATE], 9826aec45a7Smrg[m4_require([_LT_DECL_SED])dnl 9836aec45a7Smrgac_outfile=conftest.$ac_objext 9846aec45a7Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 9856aec45a7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9866aec45a7Smrg_lt_linker_boilerplate=`cat conftest.err` 9876aec45a7Smrg$RM -r conftest* 9886aec45a7Smrg])# _LT_LINKER_BOILERPLATE 9896aec45a7Smrg 9906aec45a7Smrg# _LT_REQUIRED_DARWIN_CHECKS 9916aec45a7Smrg# ------------------------- 9926aec45a7Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9936aec45a7Smrg case $host_os in 9946aec45a7Smrg rhapsody* | darwin*) 9956aec45a7Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9966aec45a7Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 9976aec45a7Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 9986aec45a7Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 9996aec45a7Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 10006aec45a7Smrg _LT_DECL([], [DSYMUTIL], [1], 10016aec45a7Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 10026aec45a7Smrg _LT_DECL([], [NMEDIT], [1], 10036aec45a7Smrg [Tool to change global to local symbols on Mac OS X]) 10046aec45a7Smrg _LT_DECL([], [LIPO], [1], 10056aec45a7Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 10066aec45a7Smrg _LT_DECL([], [OTOOL], [1], 10076aec45a7Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 10086aec45a7Smrg _LT_DECL([], [OTOOL64], [1], 10096aec45a7Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 10106aec45a7Smrg 10116aec45a7Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 10126aec45a7Smrg [lt_cv_apple_cc_single_mod=no 1013300bf1aeSmrg if test -z "$LT_MULTI_MODULE"; then 10146aec45a7Smrg # By default we will add the -single_module flag. You can override 10156aec45a7Smrg # by either setting the environment variable LT_MULTI_MODULE 10166aec45a7Smrg # non-empty at configure time, or by adding -multi_module to the 10176aec45a7Smrg # link flags. 10186aec45a7Smrg rm -rf libconftest.dylib* 10196aec45a7Smrg echo "int foo(void){return 1;}" > conftest.c 10206aec45a7Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10216aec45a7Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 10226aec45a7Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 10236aec45a7Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 10246aec45a7Smrg _lt_result=$? 1025aa9e3350Smrg # If there is a non-empty error log, and "single_module" 1026aa9e3350Smrg # appears in it, assume the flag caused a linker warning 1027aa9e3350Smrg if test -s conftest.err && $GREP single_module conftest.err; then 1028aa9e3350Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1029aa9e3350Smrg # Otherwise, if the output was created with a 0 exit code from 1030aa9e3350Smrg # the compiler, it worked. 1031300bf1aeSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 10326aec45a7Smrg lt_cv_apple_cc_single_mod=yes 10336aec45a7Smrg else 10346aec45a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10356aec45a7Smrg fi 10366aec45a7Smrg rm -rf libconftest.dylib* 10376aec45a7Smrg rm -f conftest.* 10386aec45a7Smrg fi]) 1039aa9e3350Smrg 10406aec45a7Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10416aec45a7Smrg [lt_cv_ld_exported_symbols_list], 10426aec45a7Smrg [lt_cv_ld_exported_symbols_list=no 10436aec45a7Smrg save_LDFLAGS=$LDFLAGS 10446aec45a7Smrg echo "_main" > conftest.sym 10456aec45a7Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10466aec45a7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 10476aec45a7Smrg [lt_cv_ld_exported_symbols_list=yes], 10486aec45a7Smrg [lt_cv_ld_exported_symbols_list=no]) 1049300bf1aeSmrg LDFLAGS=$save_LDFLAGS 10506aec45a7Smrg ]) 1051aa9e3350Smrg 10526aec45a7Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 10536aec45a7Smrg [lt_cv_ld_force_load=no 10546aec45a7Smrg cat > conftest.c << _LT_EOF 10556aec45a7Smrgint forced_loaded() { return 2;} 10566aec45a7Smrg_LT_EOF 10576aec45a7Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 10586aec45a7Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 10596aec45a7Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 10606aec45a7Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 10616aec45a7Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 10626aec45a7Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 10636aec45a7Smrg cat > conftest.c << _LT_EOF 10646aec45a7Smrgint main() { return 0;} 10656aec45a7Smrg_LT_EOF 10666aec45a7Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 10676aec45a7Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 10686aec45a7Smrg _lt_result=$? 1069aa9e3350Smrg if test -s conftest.err && $GREP force_load conftest.err; then 1070aa9e3350Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1071300bf1aeSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 10726aec45a7Smrg lt_cv_ld_force_load=yes 10736aec45a7Smrg else 10746aec45a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 10756aec45a7Smrg fi 10766aec45a7Smrg rm -f conftest.err libconftest.a conftest conftest.c 10776aec45a7Smrg rm -rf conftest.dSYM 10786aec45a7Smrg ]) 10796aec45a7Smrg case $host_os in 10806aec45a7Smrg rhapsody* | darwin1.[[012]]) 1081300bf1aeSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10826aec45a7Smrg darwin1.*) 1083300bf1aeSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10846aec45a7Smrg darwin*) # darwin 5.x on 10856aec45a7Smrg # if running on 10.5 or later, the deployment target defaults 10866aec45a7Smrg # to the OS version, if on x86, and 10.4, the deployment 10876aec45a7Smrg # target defaults to 10.4. Don't you love it? 10886aec45a7Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10896aec45a7Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1090300bf1aeSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091300bf1aeSmrg 10.[[012]][[,.]]*) 1092300bf1aeSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10936aec45a7Smrg 10.*) 1094300bf1aeSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10956aec45a7Smrg esac 10966aec45a7Smrg ;; 10976aec45a7Smrg esac 1098300bf1aeSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 10996aec45a7Smrg _lt_dar_single_mod='$single_module' 11006aec45a7Smrg fi 1101300bf1aeSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1102300bf1aeSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 11036aec45a7Smrg else 1104300bf1aeSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 11056aec45a7Smrg fi 1106300bf1aeSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 11076aec45a7Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 11086aec45a7Smrg else 11096aec45a7Smrg _lt_dsymutil= 11106aec45a7Smrg fi 1111ab47cfaaSmrg ;; 1112ab47cfaaSmrg esac 11136aec45a7Smrg]) 1114ab47cfaaSmrg 11156aec45a7Smrg 1116aa9e3350Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117aa9e3350Smrg# --------------------------------- 11186aec45a7Smrg# Checks for linker and compiler features on darwin 11196aec45a7Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 11206aec45a7Smrg[ 11216aec45a7Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 11226aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 11236aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 11246aec45a7Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 11256aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1126300bf1aeSmrg if test yes = "$lt_cv_ld_force_load"; then 1127300bf1aeSmrg _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\"`' 1128aa9e3350Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129aa9e3350Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130ab47cfaaSmrg else 11316aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132ab47cfaaSmrg fi 11336aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1134300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 11356aec45a7Smrg case $cc_basename in 1136300bf1aeSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 11376aec45a7Smrg *) _lt_dar_can_shared=$GCC ;; 11386aec45a7Smrg esac 1139300bf1aeSmrg if test yes = "$_lt_dar_can_shared"; then 11406aec45a7Smrg output_verbose_link_cmd=func_echo_all 1141300bf1aeSmrg _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" 1142300bf1aeSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1143300bf1aeSmrg _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" 1144300bf1aeSmrg _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" 11456aec45a7Smrg m4_if([$1], [CXX], 1146300bf1aeSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1147300bf1aeSmrg _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" 1148300bf1aeSmrg _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" 11496aec45a7Smrg fi 11506aec45a7Smrg],[]) 11516aec45a7Smrg else 11526aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 11536aec45a7Smrg fi 11546aec45a7Smrg]) 1155ab47cfaaSmrg 1156aa9e3350Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157aa9e3350Smrg# ---------------------------------- 11586aec45a7Smrg# Links a minimal program and checks the executable 11596aec45a7Smrg# for the system default hardcoded library path. In most cases, 11606aec45a7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 11616aec45a7Smrg# the location of the communication and MPI libs are included too. 11626aec45a7Smrg# If we don't find anything, use the default library path according 11636aec45a7Smrg# to the aix ld manual. 1164aa9e3350Smrg# Store the results from the different compilers for each TAGNAME. 1165aa9e3350Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 11666aec45a7Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 11676aec45a7Smrg[m4_require([_LT_DECL_SED])dnl 1168300bf1aeSmrgif test set = "${lt_cv_aix_libpath+set}"; then 1169aa9e3350Smrg aix_libpath=$lt_cv_aix_libpath 1170aa9e3350Smrgelse 1171aa9e3350Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172aa9e3350Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173aa9e3350Smrg lt_aix_libpath_sed='[ 1174aa9e3350Smrg /Import File Strings/,/^$/ { 1175aa9e3350Smrg /^0/ { 1176aa9e3350Smrg s/^0 *\([^ ]*\) *$/\1/ 1177aa9e3350Smrg p 1178aa9e3350Smrg } 1179aa9e3350Smrg }]' 1180aa9e3350Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181aa9e3350Smrg # Check for a 64-bit object if we didn't find anything. 1182aa9e3350Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183aa9e3350Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184aa9e3350Smrg fi],[]) 1185aa9e3350Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1186300bf1aeSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187aa9e3350Smrg fi 1188aa9e3350Smrg ]) 1189aa9e3350Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190aa9e3350Smrgfi 11916aec45a7Smrg])# _LT_SYS_MODULE_PATH_AIX 1192ab47cfaaSmrg 1193ab47cfaaSmrg 11946aec45a7Smrg# _LT_SHELL_INIT(ARG) 11956aec45a7Smrg# ------------------- 11966aec45a7Smrgm4_define([_LT_SHELL_INIT], 11976aec45a7Smrg[m4_divert_text([M4SH-INIT], [$1 11986aec45a7Smrg])])# _LT_SHELL_INIT 1199ab47cfaaSmrg 12006aec45a7Smrg 12016aec45a7Smrg 12026aec45a7Smrg# _LT_PROG_ECHO_BACKSLASH 12036aec45a7Smrg# ----------------------- 12046aec45a7Smrg# Find how we can fake an echo command that does not interpret backslash. 12056aec45a7Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 1206300bf1aeSmrg# of the generated configure script that will find a shell with a builtin 1207300bf1aeSmrg# printf (that we can use as an echo command). 12086aec45a7Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 12096aec45a7Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12106aec45a7SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12116aec45a7SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12126aec45a7Smrg 12136aec45a7SmrgAC_MSG_CHECKING([how to print strings]) 12146aec45a7Smrg# Test print first, because it will be a builtin if present. 1215aa9e3350Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 12166aec45a7Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 12176aec45a7Smrg ECHO='print -r --' 12186aec45a7Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 12196aec45a7Smrg ECHO='printf %s\n' 12206aec45a7Smrgelse 12216aec45a7Smrg # Use this function as a fallback that always works. 12226aec45a7Smrg func_fallback_echo () 12236aec45a7Smrg { 12246aec45a7Smrg eval 'cat <<_LTECHO_EOF 12256aec45a7Smrg$[]1 12266aec45a7Smrg_LTECHO_EOF' 12276aec45a7Smrg } 12286aec45a7Smrg ECHO='func_fallback_echo' 12296aec45a7Smrgfi 12306aec45a7Smrg 12316aec45a7Smrg# func_echo_all arg... 12326aec45a7Smrg# Invoke $ECHO with all args, space-separated. 12336aec45a7Smrgfunc_echo_all () 12346aec45a7Smrg{ 1235300bf1aeSmrg $ECHO "$*" 12366aec45a7Smrg} 12376aec45a7Smrg 1238300bf1aeSmrgcase $ECHO in 12396aec45a7Smrg printf*) AC_MSG_RESULT([printf]) ;; 12406aec45a7Smrg print*) AC_MSG_RESULT([print -r]) ;; 12416aec45a7Smrg *) AC_MSG_RESULT([cat]) ;; 12426aec45a7Smrgesac 12436aec45a7Smrg 12446aec45a7Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 12456aec45a7Smrg[_AS_DETECT_SUGGESTED([ 12466aec45a7Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 12476aec45a7Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 12486aec45a7Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 12496aec45a7Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 12506aec45a7Smrg PATH=/empty FPATH=/empty; export PATH FPATH 12516aec45a7Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 12526aec45a7Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12536aec45a7Smrg 12546aec45a7Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 12556aec45a7Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 12566aec45a7Smrg])# _LT_PROG_ECHO_BACKSLASH 12576aec45a7Smrg 12586aec45a7Smrg 1259aa9e3350Smrg# _LT_WITH_SYSROOT 1260aa9e3350Smrg# ---------------- 1261aa9e3350SmrgAC_DEFUN([_LT_WITH_SYSROOT], 1262aa9e3350Smrg[AC_MSG_CHECKING([for sysroot]) 1263aa9e3350SmrgAC_ARG_WITH([sysroot], 1264300bf1aeSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1265300bf1aeSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 1266300bf1aeSmrg if not specified).])], 1267aa9e3350Smrg[], [with_sysroot=no]) 1268aa9e3350Smrg 1269aa9e3350Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 1270aa9e3350Smrgdnl in case the user passed a directory name. 1271aa9e3350Smrglt_sysroot= 1272300bf1aeSmrgcase $with_sysroot in #( 1273aa9e3350Smrg yes) 1274300bf1aeSmrg if test yes = "$GCC"; then 1275aa9e3350Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276aa9e3350Smrg fi 1277aa9e3350Smrg ;; #( 1278aa9e3350Smrg /*) 1279aa9e3350Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280aa9e3350Smrg ;; #( 1281aa9e3350Smrg no|'') 1282aa9e3350Smrg ;; #( 1283aa9e3350Smrg *) 1284300bf1aeSmrg AC_MSG_RESULT([$with_sysroot]) 1285aa9e3350Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286aa9e3350Smrg ;; 1287aa9e3350Smrgesac 1288aa9e3350Smrg 1289aa9e3350Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1290aa9e3350Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1291300bf1aeSmrg[dependent libraries, and where our libraries should be installed.])]) 1292aa9e3350Smrg 12936aec45a7Smrg# _LT_ENABLE_LOCK 12946aec45a7Smrg# --------------- 12956aec45a7Smrgm4_defun([_LT_ENABLE_LOCK], 12966aec45a7Smrg[AC_ARG_ENABLE([libtool-lock], 12976aec45a7Smrg [AS_HELP_STRING([--disable-libtool-lock], 12986aec45a7Smrg [avoid locking (might break parallel builds)])]) 1299300bf1aeSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 13006aec45a7Smrg 13016aec45a7Smrg# Some flags need to be propagated to the compiler or linker for good 13026aec45a7Smrg# libtool support. 13036aec45a7Smrgcase $host in 13046aec45a7Smrgia64-*-hpux*) 1305300bf1aeSmrg # Find out what ABI is being produced by ac_compile, and set mode 1306300bf1aeSmrg # options accordingly. 13076aec45a7Smrg echo 'int i;' > conftest.$ac_ext 13086aec45a7Smrg if AC_TRY_EVAL(ac_compile); then 13096aec45a7Smrg case `/usr/bin/file conftest.$ac_objext` in 13106aec45a7Smrg *ELF-32*) 1311300bf1aeSmrg HPUX_IA64_MODE=32 13126aec45a7Smrg ;; 13136aec45a7Smrg *ELF-64*) 1314300bf1aeSmrg HPUX_IA64_MODE=64 13156aec45a7Smrg ;; 13166aec45a7Smrg esac 13176aec45a7Smrg fi 13186aec45a7Smrg rm -rf conftest* 13196aec45a7Smrg ;; 13206aec45a7Smrg*-*-irix6*) 1321300bf1aeSmrg # Find out what ABI is being produced by ac_compile, and set linker 1322300bf1aeSmrg # options accordingly. 13236aec45a7Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13246aec45a7Smrg if AC_TRY_EVAL(ac_compile); then 1325300bf1aeSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 13266aec45a7Smrg case `/usr/bin/file conftest.$ac_objext` in 13276aec45a7Smrg *32-bit*) 13286aec45a7Smrg LD="${LD-ld} -melf32bsmip" 13296aec45a7Smrg ;; 13306aec45a7Smrg *N32*) 13316aec45a7Smrg LD="${LD-ld} -melf32bmipn32" 13326aec45a7Smrg ;; 13336aec45a7Smrg *64-bit*) 13346aec45a7Smrg LD="${LD-ld} -melf64bmip" 13356aec45a7Smrg ;; 13366aec45a7Smrg esac 13376aec45a7Smrg else 13386aec45a7Smrg case `/usr/bin/file conftest.$ac_objext` in 13396aec45a7Smrg *32-bit*) 13406aec45a7Smrg LD="${LD-ld} -32" 13416aec45a7Smrg ;; 13426aec45a7Smrg *N32*) 13436aec45a7Smrg LD="${LD-ld} -n32" 13446aec45a7Smrg ;; 13456aec45a7Smrg *64-bit*) 13466aec45a7Smrg LD="${LD-ld} -64" 13476aec45a7Smrg ;; 13486aec45a7Smrg esac 1349ab47cfaaSmrg fi 13506aec45a7Smrg fi 13516aec45a7Smrg rm -rf conftest* 13526aec45a7Smrg ;; 1353ab47cfaaSmrg 1354300bf1aeSmrgmips64*-*linux*) 1355300bf1aeSmrg # Find out what ABI is being produced by ac_compile, and set linker 1356300bf1aeSmrg # options accordingly. 1357300bf1aeSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1358300bf1aeSmrg if AC_TRY_EVAL(ac_compile); then 1359300bf1aeSmrg emul=elf 1360300bf1aeSmrg case `/usr/bin/file conftest.$ac_objext` in 1361300bf1aeSmrg *32-bit*) 1362300bf1aeSmrg emul="${emul}32" 1363300bf1aeSmrg ;; 1364300bf1aeSmrg *64-bit*) 1365300bf1aeSmrg emul="${emul}64" 1366300bf1aeSmrg ;; 1367300bf1aeSmrg esac 1368300bf1aeSmrg case `/usr/bin/file conftest.$ac_objext` in 1369300bf1aeSmrg *MSB*) 1370300bf1aeSmrg emul="${emul}btsmip" 1371300bf1aeSmrg ;; 1372300bf1aeSmrg *LSB*) 1373300bf1aeSmrg emul="${emul}ltsmip" 1374300bf1aeSmrg ;; 1375300bf1aeSmrg esac 1376300bf1aeSmrg case `/usr/bin/file conftest.$ac_objext` in 1377300bf1aeSmrg *N32*) 1378300bf1aeSmrg emul="${emul}n32" 1379300bf1aeSmrg ;; 1380300bf1aeSmrg esac 1381300bf1aeSmrg LD="${LD-ld} -m $emul" 1382300bf1aeSmrg fi 1383300bf1aeSmrg rm -rf conftest* 1384300bf1aeSmrg ;; 1385300bf1aeSmrg 13861e449e82Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13876aec45a7Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1388300bf1aeSmrg # Find out what ABI is being produced by ac_compile, and set linker 1389300bf1aeSmrg # options accordingly. Note that the listed cases only cover the 1390300bf1aeSmrg # situations where additional linker options are needed (such as when 1391300bf1aeSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1392300bf1aeSmrg # vice versa); the common cases where no linker options are needed do 1393300bf1aeSmrg # not appear in the list. 13946aec45a7Smrg echo 'int i;' > conftest.$ac_ext 13956aec45a7Smrg if AC_TRY_EVAL(ac_compile); then 13966aec45a7Smrg case `/usr/bin/file conftest.o` in 13976aec45a7Smrg *32-bit*) 13986aec45a7Smrg case $host in 13996aec45a7Smrg x86_64-*kfreebsd*-gnu) 14006aec45a7Smrg LD="${LD-ld} -m elf_i386_fbsd" 14016aec45a7Smrg ;; 14026aec45a7Smrg x86_64-*linux*) 140338770048Smrg case `/usr/bin/file conftest.o` in 140438770048Smrg *x86-64*) 140538770048Smrg LD="${LD-ld} -m elf32_x86_64" 140638770048Smrg ;; 140738770048Smrg *) 140838770048Smrg LD="${LD-ld} -m elf_i386" 140938770048Smrg ;; 141038770048Smrg esac 14116aec45a7Smrg ;; 1412300bf1aeSmrg powerpc64le-*linux*) 14131e449e82Smrg LD="${LD-ld} -m elf32lppclinux" 14141e449e82Smrg ;; 1415300bf1aeSmrg powerpc64-*linux*) 14166aec45a7Smrg LD="${LD-ld} -m elf32ppclinux" 14176aec45a7Smrg ;; 14186aec45a7Smrg s390x-*linux*) 14196aec45a7Smrg LD="${LD-ld} -m elf_s390" 14206aec45a7Smrg ;; 14216aec45a7Smrg sparc64-*linux*) 14226aec45a7Smrg LD="${LD-ld} -m elf32_sparc" 14236aec45a7Smrg ;; 14246aec45a7Smrg esac 14256aec45a7Smrg ;; 14266aec45a7Smrg *64-bit*) 14276aec45a7Smrg case $host in 14286aec45a7Smrg x86_64-*kfreebsd*-gnu) 14296aec45a7Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 14306aec45a7Smrg ;; 14316aec45a7Smrg x86_64-*linux*) 14326aec45a7Smrg LD="${LD-ld} -m elf_x86_64" 14336aec45a7Smrg ;; 1434300bf1aeSmrg powerpcle-*linux*) 14351e449e82Smrg LD="${LD-ld} -m elf64lppc" 14361e449e82Smrg ;; 1437300bf1aeSmrg powerpc-*linux*) 14386aec45a7Smrg LD="${LD-ld} -m elf64ppc" 14396aec45a7Smrg ;; 14406aec45a7Smrg s390*-*linux*|s390*-*tpf*) 14416aec45a7Smrg LD="${LD-ld} -m elf64_s390" 14426aec45a7Smrg ;; 14436aec45a7Smrg sparc*-*linux*) 14446aec45a7Smrg LD="${LD-ld} -m elf64_sparc" 14456aec45a7Smrg ;; 14466aec45a7Smrg esac 14476aec45a7Smrg ;; 14486aec45a7Smrg esac 14496aec45a7Smrg fi 14506aec45a7Smrg rm -rf conftest* 14516aec45a7Smrg ;; 1452ab47cfaaSmrg 14536aec45a7Smrg*-*-sco3.2v5*) 14546aec45a7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1455300bf1aeSmrg SAVE_CFLAGS=$CFLAGS 14566aec45a7Smrg CFLAGS="$CFLAGS -belf" 14576aec45a7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14586aec45a7Smrg [AC_LANG_PUSH(C) 14596aec45a7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14606aec45a7Smrg AC_LANG_POP]) 1461300bf1aeSmrg if test yes != "$lt_cv_cc_needs_belf"; then 14626aec45a7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1463300bf1aeSmrg CFLAGS=$SAVE_CFLAGS 14646aec45a7Smrg fi 14656aec45a7Smrg ;; 1466aa9e3350Smrg*-*solaris*) 1467300bf1aeSmrg # Find out what ABI is being produced by ac_compile, and set linker 1468300bf1aeSmrg # options accordingly. 14696aec45a7Smrg echo 'int i;' > conftest.$ac_ext 14706aec45a7Smrg if AC_TRY_EVAL(ac_compile); then 14716aec45a7Smrg case `/usr/bin/file conftest.o` in 14726aec45a7Smrg *64-bit*) 14736aec45a7Smrg case $lt_cv_prog_gnu_ld in 1474aa9e3350Smrg yes*) 1475aa9e3350Smrg case $host in 1476300bf1aeSmrg i?86-*-solaris*|x86_64-*-solaris*) 1477aa9e3350Smrg LD="${LD-ld} -m elf_x86_64" 1478aa9e3350Smrg ;; 1479aa9e3350Smrg sparc*-*-solaris*) 1480aa9e3350Smrg LD="${LD-ld} -m elf64_sparc" 1481aa9e3350Smrg ;; 1482aa9e3350Smrg esac 1483aa9e3350Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484aa9e3350Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1485300bf1aeSmrg LD=${LD-ld}_sol2 1486aa9e3350Smrg fi 1487aa9e3350Smrg ;; 14886aec45a7Smrg *) 14896aec45a7Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14906aec45a7Smrg LD="${LD-ld} -64" 14916aec45a7Smrg fi 14926aec45a7Smrg ;; 14936aec45a7Smrg esac 14946aec45a7Smrg ;; 14956aec45a7Smrg esac 14966aec45a7Smrg fi 14976aec45a7Smrg rm -rf conftest* 14986aec45a7Smrg ;; 14996aec45a7Smrgesac 1500ab47cfaaSmrg 1501300bf1aeSmrgneed_locks=$enable_libtool_lock 15026aec45a7Smrg])# _LT_ENABLE_LOCK 15036aec45a7Smrg 15046aec45a7Smrg 1505aa9e3350Smrg# _LT_PROG_AR 1506aa9e3350Smrg# ----------- 1507aa9e3350Smrgm4_defun([_LT_PROG_AR], 1508aa9e3350Smrg[AC_CHECK_TOOLS(AR, [ar], false) 1509aa9e3350Smrg: ${AR=ar} 1510aa9e3350Smrg: ${AR_FLAGS=cru} 1511aa9e3350Smrg_LT_DECL([], [AR], [1], [The archiver]) 1512aa9e3350Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1513aa9e3350Smrg 1514aa9e3350SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1515aa9e3350Smrg [lt_cv_ar_at_file=no 1516aa9e3350Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1517aa9e3350Smrg [echo conftest.$ac_objext > conftest.lst 1518aa9e3350Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1519aa9e3350Smrg AC_TRY_EVAL([lt_ar_try]) 1520300bf1aeSmrg if test 0 -eq "$ac_status"; then 1521aa9e3350Smrg # Ensure the archiver fails upon bogus file names. 1522aa9e3350Smrg rm -f conftest.$ac_objext libconftest.a 1523aa9e3350Smrg AC_TRY_EVAL([lt_ar_try]) 1524300bf1aeSmrg if test 0 -ne "$ac_status"; then 1525aa9e3350Smrg lt_cv_ar_at_file=@ 1526aa9e3350Smrg fi 1527aa9e3350Smrg fi 1528aa9e3350Smrg rm -f conftest.* libconftest.a 1529aa9e3350Smrg ]) 1530aa9e3350Smrg ]) 1531aa9e3350Smrg 1532300bf1aeSmrgif test no = "$lt_cv_ar_at_file"; then 1533aa9e3350Smrg archiver_list_spec= 1534aa9e3350Smrgelse 1535aa9e3350Smrg archiver_list_spec=$lt_cv_ar_at_file 1536aa9e3350Smrgfi 1537aa9e3350Smrg_LT_DECL([], [archiver_list_spec], [1], 1538aa9e3350Smrg [How to feed a file listing to the archiver]) 1539aa9e3350Smrg])# _LT_PROG_AR 1540aa9e3350Smrg 1541aa9e3350Smrg 15426aec45a7Smrg# _LT_CMD_OLD_ARCHIVE 15436aec45a7Smrg# ------------------- 15446aec45a7Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1545aa9e3350Smrg[_LT_PROG_AR 15466aec45a7Smrg 15476aec45a7SmrgAC_CHECK_TOOL(STRIP, strip, :) 15486aec45a7Smrgtest -z "$STRIP" && STRIP=: 15496aec45a7Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15506aec45a7Smrg 15516aec45a7SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15526aec45a7Smrgtest -z "$RANLIB" && RANLIB=: 15536aec45a7Smrg_LT_DECL([], [RANLIB], [1], 15546aec45a7Smrg [Commands used to install an old-style archive]) 15556aec45a7Smrg 15566aec45a7Smrg# Determine commands to create old-style static archives. 15576aec45a7Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15586aec45a7Smrgold_postinstall_cmds='chmod 644 $oldlib' 15596aec45a7Smrgold_postuninstall_cmds= 15606aec45a7Smrg 15616aec45a7Smrgif test -n "$RANLIB"; then 15626aec45a7Smrg case $host_os in 1563300bf1aeSmrg bitrig* | openbsd*) 1564aa9e3350Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 15656aec45a7Smrg ;; 15666aec45a7Smrg *) 1567aa9e3350Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 15686aec45a7Smrg ;; 1569ab47cfaaSmrg esac 1570aa9e3350Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1571ab47cfaaSmrgfi 1572ab47cfaaSmrg 15736aec45a7Smrgcase $host_os in 15746aec45a7Smrg darwin*) 15756aec45a7Smrg lock_old_archive_extraction=yes ;; 15766aec45a7Smrg *) 15776aec45a7Smrg lock_old_archive_extraction=no ;; 15786aec45a7Smrgesac 15796aec45a7Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 15806aec45a7Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15816aec45a7Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 15826aec45a7Smrg [Commands used to build an old-style archive]) 15836aec45a7Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 15846aec45a7Smrg [Whether to use a lock for old archive extraction]) 15856aec45a7Smrg])# _LT_CMD_OLD_ARCHIVE 15861473d951Smrg 1587ab47cfaaSmrg 15886aec45a7Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15896aec45a7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15906aec45a7Smrg# ---------------------------------------------------------------- 15916aec45a7Smrg# Check whether the given compiler option works 15926aec45a7SmrgAC_DEFUN([_LT_COMPILER_OPTION], 15936aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15946aec45a7Smrgm4_require([_LT_DECL_SED])dnl 15956aec45a7SmrgAC_CACHE_CHECK([$1], [$2], 15966aec45a7Smrg [$2=no 15976aec45a7Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15986aec45a7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1599300bf1aeSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1600ab47cfaaSmrg # Insert the option either (1) after the last *FLAGS variable, or 1601ab47cfaaSmrg # (2) before a word containing "conftest.", or (3) at the end. 1602ab47cfaaSmrg # Note that $ac_compile itself does not contain backslashes and begins 1603ab47cfaaSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16046aec45a7Smrg # The option is referenced via a variable to avoid confusing sed. 1605ab47cfaaSmrg lt_compile=`echo "$ac_compile" | $SED \ 1606ab47cfaaSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1607ab47cfaaSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1608ab47cfaaSmrg -e 's:$: $lt_compiler_flag:'` 16096aec45a7Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16106aec45a7Smrg (eval "$lt_compile" 2>conftest.err) 1611ab47cfaaSmrg ac_status=$? 16126aec45a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 16136aec45a7Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16146aec45a7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1615ab47cfaaSmrg # The compiler can only warn and ignore the option if not recognized 16166aec45a7Smrg # So say no if there are warnings other than the usual output. 16176aec45a7Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16186aec45a7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16196aec45a7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16206aec45a7Smrg $2=yes 1621ab47cfaaSmrg fi 1622ab47cfaaSmrg fi 16236aec45a7Smrg $RM conftest* 1624ab47cfaaSmrg]) 1625ab47cfaaSmrg 1626300bf1aeSmrgif test yes = "[$]$2"; then 16276aec45a7Smrg m4_if([$5], , :, [$5]) 1628ab47cfaaSmrgelse 16296aec45a7Smrg m4_if([$6], , :, [$6]) 1630ab47cfaaSmrgfi 16316aec45a7Smrg])# _LT_COMPILER_OPTION 1632ab47cfaaSmrg 16336aec45a7Smrg# Old name: 16346aec45a7SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16356aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 16366aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1637ab47cfaaSmrg 1638ab47cfaaSmrg 16396aec45a7Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16406aec45a7Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16416aec45a7Smrg# ---------------------------------------------------- 16426aec45a7Smrg# Check whether the given linker option works 16436aec45a7SmrgAC_DEFUN([_LT_LINKER_OPTION], 16446aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16456aec45a7Smrgm4_require([_LT_DECL_SED])dnl 16466aec45a7SmrgAC_CACHE_CHECK([$1], [$2], 16476aec45a7Smrg [$2=no 1648300bf1aeSmrg save_LDFLAGS=$LDFLAGS 16496aec45a7Smrg LDFLAGS="$LDFLAGS $3" 16506aec45a7Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16516aec45a7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16526aec45a7Smrg # The linker can only warn and ignore the option if not recognized 16536aec45a7Smrg # So say no if there are warnings 16546aec45a7Smrg if test -s conftest.err; then 16556aec45a7Smrg # Append any errors to the config.log. 16566aec45a7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16576aec45a7Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16586aec45a7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16596aec45a7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 16606aec45a7Smrg $2=yes 16616aec45a7Smrg fi 16626aec45a7Smrg else 16636aec45a7Smrg $2=yes 16646aec45a7Smrg fi 16656aec45a7Smrg fi 16666aec45a7Smrg $RM -r conftest* 1667300bf1aeSmrg LDFLAGS=$save_LDFLAGS 16686aec45a7Smrg]) 1669ab47cfaaSmrg 1670300bf1aeSmrgif test yes = "[$]$2"; then 16716aec45a7Smrg m4_if([$4], , :, [$4]) 1672ab47cfaaSmrgelse 16736aec45a7Smrg m4_if([$5], , :, [$5]) 1674ab47cfaaSmrgfi 16756aec45a7Smrg])# _LT_LINKER_OPTION 1676ab47cfaaSmrg 16776aec45a7Smrg# Old name: 16786aec45a7SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16796aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 16806aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1681ab47cfaaSmrg 1682ab47cfaaSmrg 16836aec45a7Smrg# LT_CMD_MAX_LEN 16846aec45a7Smrg#--------------- 16856aec45a7SmrgAC_DEFUN([LT_CMD_MAX_LEN], 16866aec45a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16876aec45a7Smrg# find the maximum length of command line arguments 16886aec45a7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16896aec45a7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16906aec45a7Smrg i=0 1691300bf1aeSmrg teststring=ABCD 1692ab47cfaaSmrg 16936aec45a7Smrg case $build_os in 16946aec45a7Smrg msdosdjgpp*) 16956aec45a7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16966aec45a7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16976aec45a7Smrg # during glob expansion). Even if it were fixed, the result of this 16986aec45a7Smrg # check would be larger than it should be. 16996aec45a7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 17006aec45a7Smrg ;; 1701ab47cfaaSmrg 17026aec45a7Smrg gnu*) 17036aec45a7Smrg # Under GNU Hurd, this test is not required because there is 17046aec45a7Smrg # no limit to the length of command line arguments. 17056aec45a7Smrg # Libtool will interpret -1 as no limit whatsoever 17066aec45a7Smrg lt_cv_sys_max_cmd_len=-1; 17076aec45a7Smrg ;; 1708ab47cfaaSmrg 17096aec45a7Smrg cygwin* | mingw* | cegcc*) 17106aec45a7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17116aec45a7Smrg # about 5 minutes as the teststring grows exponentially. 17126aec45a7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 17136aec45a7Smrg # you end up with a "frozen" computer, even though with patience 17146aec45a7Smrg # the test eventually succeeds (with a max line length of 256k). 17156aec45a7Smrg # Instead, let's just punt: use the minimum linelength reported by 17166aec45a7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 17176aec45a7Smrg lt_cv_sys_max_cmd_len=8192; 17186aec45a7Smrg ;; 1719ab47cfaaSmrg 17206aec45a7Smrg mint*) 17216aec45a7Smrg # On MiNT this can take a long time and run out of memory. 17226aec45a7Smrg lt_cv_sys_max_cmd_len=8192; 17236aec45a7Smrg ;; 1724ab47cfaaSmrg 17256aec45a7Smrg amigaos*) 17266aec45a7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 17276aec45a7Smrg # So we just punt and use a minimum line length of 8192. 17286aec45a7Smrg lt_cv_sys_max_cmd_len=8192; 17296aec45a7Smrg ;; 1730ab47cfaaSmrg 1731300bf1aeSmrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 17326aec45a7Smrg # This has been around since 386BSD, at least. Likely further. 17336aec45a7Smrg if test -x /sbin/sysctl; then 17346aec45a7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17356aec45a7Smrg elif test -x /usr/sbin/sysctl; then 17366aec45a7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1737ab47cfaaSmrg else 17386aec45a7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1739ab47cfaaSmrg fi 17406aec45a7Smrg # And add a safety zone 17416aec45a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17426aec45a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17436aec45a7Smrg ;; 1744ab47cfaaSmrg 17456aec45a7Smrg interix*) 17466aec45a7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17476aec45a7Smrg lt_cv_sys_max_cmd_len=196608 17486aec45a7Smrg ;; 1749ab47cfaaSmrg 1750aa9e3350Smrg os2*) 1751aa9e3350Smrg # The test takes a long time on OS/2. 1752aa9e3350Smrg lt_cv_sys_max_cmd_len=8192 1753aa9e3350Smrg ;; 1754aa9e3350Smrg 17556aec45a7Smrg osf*) 17566aec45a7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17576aec45a7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17586aec45a7Smrg # nice to cause kernel panics so lets avoid the loop below. 17596aec45a7Smrg # First set a reasonable default. 17606aec45a7Smrg lt_cv_sys_max_cmd_len=16384 17616aec45a7Smrg # 17626aec45a7Smrg if test -x /sbin/sysconfig; then 17636aec45a7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17646aec45a7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17656aec45a7Smrg esac 17666aec45a7Smrg fi 17676aec45a7Smrg ;; 17686aec45a7Smrg sco3.2v5*) 17696aec45a7Smrg lt_cv_sys_max_cmd_len=102400 17706aec45a7Smrg ;; 17716aec45a7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 17726aec45a7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17736aec45a7Smrg if test -n "$kargmax"; then 17746aec45a7Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 17756aec45a7Smrg else 17766aec45a7Smrg lt_cv_sys_max_cmd_len=32768 17776aec45a7Smrg fi 1778ab47cfaaSmrg ;; 1779ab47cfaaSmrg *) 17806aec45a7Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 178138770048Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1782300bf1aeSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17836aec45a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17846aec45a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17856aec45a7Smrg else 17866aec45a7Smrg # Make teststring a little bigger before we do anything with it. 17876aec45a7Smrg # a 1K string should be a reasonable start. 1788300bf1aeSmrg for i in 1 2 3 4 5 6 7 8; do 17896aec45a7Smrg teststring=$teststring$teststring 17906aec45a7Smrg done 17916aec45a7Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17926aec45a7Smrg # If test is not a shell built-in, we'll probably end up computing a 17936aec45a7Smrg # maximum length that is only half of the actual maximum length, but 17946aec45a7Smrg # we can't tell. 1795300bf1aeSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 17966aec45a7Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1797300bf1aeSmrg test 17 != "$i" # 1/2 MB should be enough 17986aec45a7Smrg do 17996aec45a7Smrg i=`expr $i + 1` 18006aec45a7Smrg teststring=$teststring$teststring 18016aec45a7Smrg done 18026aec45a7Smrg # Only check the string length outside the loop. 18036aec45a7Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18046aec45a7Smrg teststring= 18056aec45a7Smrg # Add a significant safety factor because C++ compilers can tack on 18066aec45a7Smrg # massive amounts of additional arguments before passing them to the 18076aec45a7Smrg # linker. It appears as though 1/2 is a usable value. 18086aec45a7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18096aec45a7Smrg fi 1810ab47cfaaSmrg ;; 1811ab47cfaaSmrg esac 18126aec45a7Smrg]) 1813300bf1aeSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 18146aec45a7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18156aec45a7Smrgelse 18166aec45a7Smrg AC_MSG_RESULT(none) 18176aec45a7Smrgfi 18186aec45a7Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18196aec45a7Smrg_LT_DECL([], [max_cmd_len], [0], 18206aec45a7Smrg [What is the maximum length of a command?]) 18216aec45a7Smrg])# LT_CMD_MAX_LEN 1822ab47cfaaSmrg 18236aec45a7Smrg# Old name: 18246aec45a7SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18256aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 18266aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827ab47cfaaSmrg 1828ab47cfaaSmrg 18296aec45a7Smrg# _LT_HEADER_DLFCN 18306aec45a7Smrg# ---------------- 18316aec45a7Smrgm4_defun([_LT_HEADER_DLFCN], 18326aec45a7Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18336aec45a7Smrg])# _LT_HEADER_DLFCN 1834ab47cfaaSmrg 18356aec45a7Smrg 18366aec45a7Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18376aec45a7Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18386aec45a7Smrg# ---------------------------------------------------------------- 18396aec45a7Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 18406aec45a7Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1841300bf1aeSmrgif test yes = "$cross_compiling"; then : 18426aec45a7Smrg [$4] 18436aec45a7Smrgelse 18446aec45a7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18456aec45a7Smrg lt_status=$lt_dlunknown 18466aec45a7Smrg cat > conftest.$ac_ext <<_LT_EOF 18476aec45a7Smrg[#line $LINENO "configure" 18486aec45a7Smrg#include "confdefs.h" 18496aec45a7Smrg 18506aec45a7Smrg#if HAVE_DLFCN_H 18516aec45a7Smrg#include <dlfcn.h> 18526aec45a7Smrg#endif 18536aec45a7Smrg 18546aec45a7Smrg#include <stdio.h> 18556aec45a7Smrg 18566aec45a7Smrg#ifdef RTLD_GLOBAL 18576aec45a7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 18586aec45a7Smrg#else 18596aec45a7Smrg# ifdef DL_GLOBAL 18606aec45a7Smrg# define LT_DLGLOBAL DL_GLOBAL 18616aec45a7Smrg# else 18626aec45a7Smrg# define LT_DLGLOBAL 0 18636aec45a7Smrg# endif 18646aec45a7Smrg#endif 18656aec45a7Smrg 18666aec45a7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18676aec45a7Smrg find out it does not work in some platform. */ 18686aec45a7Smrg#ifndef LT_DLLAZY_OR_NOW 18696aec45a7Smrg# ifdef RTLD_LAZY 18706aec45a7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18716aec45a7Smrg# else 18726aec45a7Smrg# ifdef DL_LAZY 18736aec45a7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 18746aec45a7Smrg# else 18756aec45a7Smrg# ifdef RTLD_NOW 18766aec45a7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18776aec45a7Smrg# else 18786aec45a7Smrg# ifdef DL_NOW 18796aec45a7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 18806aec45a7Smrg# else 18816aec45a7Smrg# define LT_DLLAZY_OR_NOW 0 18826aec45a7Smrg# endif 18836aec45a7Smrg# endif 18846aec45a7Smrg# endif 18856aec45a7Smrg# endif 18866aec45a7Smrg#endif 18876aec45a7Smrg 1888300bf1aeSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 18896aec45a7Smrg correspondingly for the symbols needed. */ 1890300bf1aeSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1891aa9e3350Smrgint fnord () __attribute__((visibility("default"))); 18926aec45a7Smrg#endif 18936aec45a7Smrg 1894aa9e3350Smrgint fnord () { return 42; } 18956aec45a7Smrgint main () 18966aec45a7Smrg{ 18976aec45a7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18986aec45a7Smrg int status = $lt_dlunknown; 18996aec45a7Smrg 19006aec45a7Smrg if (self) 19016aec45a7Smrg { 19026aec45a7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19036aec45a7Smrg else 19046aec45a7Smrg { 19056aec45a7Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19066aec45a7Smrg else puts (dlerror ()); 19076aec45a7Smrg } 19086aec45a7Smrg /* dlclose (self); */ 19096aec45a7Smrg } 1910ab47cfaaSmrg else 19116aec45a7Smrg puts (dlerror ()); 19126aec45a7Smrg 19136aec45a7Smrg return status; 19146aec45a7Smrg}] 19156aec45a7Smrg_LT_EOF 1916300bf1aeSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19176aec45a7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19186aec45a7Smrg lt_status=$? 19196aec45a7Smrg case x$lt_status in 19206aec45a7Smrg x$lt_dlno_uscore) $1 ;; 19216aec45a7Smrg x$lt_dlneed_uscore) $2 ;; 19226aec45a7Smrg x$lt_dlunknown|x*) $3 ;; 1923ab47cfaaSmrg esac 19246aec45a7Smrg else : 19256aec45a7Smrg # compilation failed 19266aec45a7Smrg $3 1927ab47cfaaSmrg fi 19286aec45a7Smrgfi 19296aec45a7Smrgrm -fr conftest* 19306aec45a7Smrg])# _LT_TRY_DLOPEN_SELF 19316aec45a7Smrg 19326aec45a7Smrg 19336aec45a7Smrg# LT_SYS_DLOPEN_SELF 19346aec45a7Smrg# ------------------ 19356aec45a7SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19366aec45a7Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1937300bf1aeSmrgif test yes != "$enable_dlopen"; then 19386aec45a7Smrg enable_dlopen=unknown 19396aec45a7Smrg enable_dlopen_self=unknown 19406aec45a7Smrg enable_dlopen_self_static=unknown 19416aec45a7Smrgelse 19426aec45a7Smrg lt_cv_dlopen=no 19436aec45a7Smrg lt_cv_dlopen_libs= 19446aec45a7Smrg 1945ab47cfaaSmrg case $host_os in 19466aec45a7Smrg beos*) 1947300bf1aeSmrg lt_cv_dlopen=load_add_on 19486aec45a7Smrg lt_cv_dlopen_libs= 19496aec45a7Smrg lt_cv_dlopen_self=yes 1950ab47cfaaSmrg ;; 19516aec45a7Smrg 19526aec45a7Smrg mingw* | pw32* | cegcc*) 1953300bf1aeSmrg lt_cv_dlopen=LoadLibrary 19546aec45a7Smrg lt_cv_dlopen_libs= 1955ab47cfaaSmrg ;; 19566aec45a7Smrg 19576aec45a7Smrg cygwin*) 1958300bf1aeSmrg lt_cv_dlopen=dlopen 19596aec45a7Smrg lt_cv_dlopen_libs= 1960ab47cfaaSmrg ;; 19616aec45a7Smrg 19626aec45a7Smrg darwin*) 1963300bf1aeSmrg # if libdl is installed we need to link against it 19646aec45a7Smrg AC_CHECK_LIB([dl], [dlopen], 1965300bf1aeSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1966300bf1aeSmrg lt_cv_dlopen=dyld 19676aec45a7Smrg lt_cv_dlopen_libs= 19686aec45a7Smrg lt_cv_dlopen_self=yes 19696aec45a7Smrg ]) 19706aec45a7Smrg ;; 19716aec45a7Smrg 1972300bf1aeSmrg tpf*) 1973300bf1aeSmrg # Don't try to run any link tests for TPF. We know it's impossible 1974300bf1aeSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 1975300bf1aeSmrg lt_cv_dlopen=dlopen 1976300bf1aeSmrg lt_cv_dlopen_libs= 1977300bf1aeSmrg lt_cv_dlopen_self=no 1978300bf1aeSmrg ;; 1979300bf1aeSmrg 19806aec45a7Smrg *) 19816aec45a7Smrg AC_CHECK_FUNC([shl_load], 1982300bf1aeSmrg [lt_cv_dlopen=shl_load], 19836aec45a7Smrg [AC_CHECK_LIB([dld], [shl_load], 1984300bf1aeSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 19856aec45a7Smrg [AC_CHECK_FUNC([dlopen], 1986300bf1aeSmrg [lt_cv_dlopen=dlopen], 19876aec45a7Smrg [AC_CHECK_LIB([dl], [dlopen], 1988300bf1aeSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 19896aec45a7Smrg [AC_CHECK_LIB([svld], [dlopen], 1990300bf1aeSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 19916aec45a7Smrg [AC_CHECK_LIB([dld], [dld_link], 1992300bf1aeSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 19936aec45a7Smrg ]) 19946aec45a7Smrg ]) 19956aec45a7Smrg ]) 19966aec45a7Smrg ]) 19976aec45a7Smrg ]) 1998ab47cfaaSmrg ;; 1999ab47cfaaSmrg esac 2000ab47cfaaSmrg 2001300bf1aeSmrg if test no = "$lt_cv_dlopen"; then 20026aec45a7Smrg enable_dlopen=no 2003300bf1aeSmrg else 2004300bf1aeSmrg enable_dlopen=yes 20056aec45a7Smrg fi 2006ab47cfaaSmrg 20076aec45a7Smrg case $lt_cv_dlopen in 20086aec45a7Smrg dlopen) 2009300bf1aeSmrg save_CPPFLAGS=$CPPFLAGS 2010300bf1aeSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 20116aec45a7Smrg 2012300bf1aeSmrg save_LDFLAGS=$LDFLAGS 20136aec45a7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 20146aec45a7Smrg 2015300bf1aeSmrg save_LIBS=$LIBS 20166aec45a7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 20176aec45a7Smrg 20186aec45a7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 20196aec45a7Smrg lt_cv_dlopen_self, [dnl 20206aec45a7Smrg _LT_TRY_DLOPEN_SELF( 20216aec45a7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20226aec45a7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20236aec45a7Smrg ]) 20246aec45a7Smrg 2025300bf1aeSmrg if test yes = "$lt_cv_dlopen_self"; then 20266aec45a7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20276aec45a7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20286aec45a7Smrg lt_cv_dlopen_self_static, [dnl 20296aec45a7Smrg _LT_TRY_DLOPEN_SELF( 20306aec45a7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20316aec45a7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20326aec45a7Smrg ]) 2033ab47cfaaSmrg fi 20346aec45a7Smrg 2035300bf1aeSmrg CPPFLAGS=$save_CPPFLAGS 2036300bf1aeSmrg LDFLAGS=$save_LDFLAGS 2037300bf1aeSmrg LIBS=$save_LIBS 2038ab47cfaaSmrg ;; 2039ab47cfaaSmrg esac 2040ab47cfaaSmrg 20416aec45a7Smrg case $lt_cv_dlopen_self in 20426aec45a7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20436aec45a7Smrg *) enable_dlopen_self=unknown ;; 2044ab47cfaaSmrg esac 20456aec45a7Smrg 20466aec45a7Smrg case $lt_cv_dlopen_self_static in 20476aec45a7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20486aec45a7Smrg *) enable_dlopen_self_static=unknown ;; 2049ab47cfaaSmrg esac 20506aec45a7Smrgfi 20516aec45a7Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20526aec45a7Smrg [Whether dlopen is supported]) 20536aec45a7Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20546aec45a7Smrg [Whether dlopen of programs is supported]) 20556aec45a7Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20566aec45a7Smrg [Whether dlopen of statically linked programs is supported]) 20576aec45a7Smrg])# LT_SYS_DLOPEN_SELF 2058ab47cfaaSmrg 20596aec45a7Smrg# Old name: 20606aec45a7SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20616aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 20626aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063ab47cfaaSmrg 2064ab47cfaaSmrg 20656aec45a7Smrg# _LT_COMPILER_C_O([TAGNAME]) 20666aec45a7Smrg# --------------------------- 20676aec45a7Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 20686aec45a7Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20696aec45a7Smrgm4_defun([_LT_COMPILER_C_O], 20706aec45a7Smrg[m4_require([_LT_DECL_SED])dnl 20716aec45a7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20726aec45a7Smrgm4_require([_LT_TAG_COMPILER])dnl 20736aec45a7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20746aec45a7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20756aec45a7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20766aec45a7Smrg $RM -r conftest 2>/dev/null 20776aec45a7Smrg mkdir conftest 20786aec45a7Smrg cd conftest 20796aec45a7Smrg mkdir out 20806aec45a7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 20816aec45a7Smrg 20826aec45a7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20836aec45a7Smrg # Insert the option either (1) after the last *FLAGS variable, or 20846aec45a7Smrg # (2) before a word containing "conftest.", or (3) at the end. 20856aec45a7Smrg # Note that $ac_compile itself does not contain backslashes and begins 20866aec45a7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20876aec45a7Smrg lt_compile=`echo "$ac_compile" | $SED \ 20886aec45a7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20896aec45a7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20906aec45a7Smrg -e 's:$: $lt_compiler_flag:'` 20916aec45a7Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20926aec45a7Smrg (eval "$lt_compile" 2>out/conftest.err) 20936aec45a7Smrg ac_status=$? 20946aec45a7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20956aec45a7Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20966aec45a7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20976aec45a7Smrg then 20986aec45a7Smrg # The compiler can only warn and ignore the option if not recognized 20996aec45a7Smrg # So say no if there are warnings 21006aec45a7Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 21016aec45a7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 21026aec45a7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21036aec45a7Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21046aec45a7Smrg fi 21056aec45a7Smrg fi 21066aec45a7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21076aec45a7Smrg $RM conftest* 21086aec45a7Smrg # SGI C++ compiler will create directory out/ii_files/ for 21096aec45a7Smrg # template instantiation 21106aec45a7Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21116aec45a7Smrg $RM out/* && rmdir out 21126aec45a7Smrg cd .. 21136aec45a7Smrg $RM -r conftest 21146aec45a7Smrg $RM conftest* 21156aec45a7Smrg]) 21166aec45a7Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21176aec45a7Smrg [Does compiler simultaneously support -c and -o options?]) 21186aec45a7Smrg])# _LT_COMPILER_C_O 21196aec45a7Smrg 21206aec45a7Smrg 21216aec45a7Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21226aec45a7Smrg# ---------------------------------- 21236aec45a7Smrg# Check to see if we can do hard links to lock some files if needed 21246aec45a7Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21256aec45a7Smrg[m4_require([_LT_ENABLE_LOCK])dnl 21266aec45a7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21276aec45a7Smrg_LT_COMPILER_C_O([$1]) 21286aec45a7Smrg 2129300bf1aeSmrghard_links=nottested 2130300bf1aeSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21316aec45a7Smrg # do not overwrite the value of need_locks provided by the user 21326aec45a7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 21336aec45a7Smrg hard_links=yes 21346aec45a7Smrg $RM conftest* 21356aec45a7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21366aec45a7Smrg touch conftest.a 21376aec45a7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 21386aec45a7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21396aec45a7Smrg AC_MSG_RESULT([$hard_links]) 2140300bf1aeSmrg if test no = "$hard_links"; then 2141300bf1aeSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21426aec45a7Smrg need_locks=warn 2143ab47cfaaSmrg fi 21446aec45a7Smrgelse 21456aec45a7Smrg need_locks=no 21466aec45a7Smrgfi 21476aec45a7Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21486aec45a7Smrg])# _LT_COMPILER_FILE_LOCKS 2149ab47cfaaSmrg 2150ab47cfaaSmrg 21516aec45a7Smrg# _LT_CHECK_OBJDIR 21526aec45a7Smrg# ---------------- 21536aec45a7Smrgm4_defun([_LT_CHECK_OBJDIR], 21546aec45a7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21556aec45a7Smrg[rm -f .libs 2>/dev/null 21566aec45a7Smrgmkdir .libs 2>/dev/null 21576aec45a7Smrgif test -d .libs; then 21586aec45a7Smrg lt_cv_objdir=.libs 21596aec45a7Smrgelse 21606aec45a7Smrg # MS-DOS does not allow filenames that begin with a dot. 21616aec45a7Smrg lt_cv_objdir=_libs 21626aec45a7Smrgfi 21636aec45a7Smrgrmdir .libs 2>/dev/null]) 21646aec45a7Smrgobjdir=$lt_cv_objdir 21656aec45a7Smrg_LT_DECL([], [objdir], [0], 21666aec45a7Smrg [The name of the directory that contains temporary libtool files])dnl 21676aec45a7Smrgm4_pattern_allow([LT_OBJDIR])dnl 2168300bf1aeSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2169300bf1aeSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21706aec45a7Smrg])# _LT_CHECK_OBJDIR 21716aec45a7Smrg 21726aec45a7Smrg 21736aec45a7Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21746aec45a7Smrg# -------------------------------------- 21756aec45a7Smrg# Check hardcoding attributes. 21766aec45a7Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21776aec45a7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21786aec45a7Smrg_LT_TAGVAR(hardcode_action, $1)= 21796aec45a7Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21806aec45a7Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2181300bf1aeSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21826aec45a7Smrg 21836aec45a7Smrg # We can hardcode non-existent directories. 2184300bf1aeSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 21856aec45a7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21866aec45a7Smrg # have to relink, otherwise we might link with an installed library 21876aec45a7Smrg # when we should be linking with a yet-to-be-installed one 2188300bf1aeSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2189300bf1aeSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 21906aec45a7Smrg # Linking always hardcodes the temporary library directory. 21916aec45a7Smrg _LT_TAGVAR(hardcode_action, $1)=relink 2192ab47cfaaSmrg else 21936aec45a7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21946aec45a7Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 2195ab47cfaaSmrg fi 21966aec45a7Smrgelse 21976aec45a7Smrg # We cannot hardcode anything, or else we can only hardcode existing 21986aec45a7Smrg # directories. 21996aec45a7Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 22006aec45a7Smrgfi 22016aec45a7SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202ab47cfaaSmrg 2203300bf1aeSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2204300bf1aeSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22056aec45a7Smrg # Fast installation is not supported 22066aec45a7Smrg enable_fast_install=no 2207300bf1aeSmrgelif test yes = "$shlibpath_overrides_runpath" || 2208300bf1aeSmrg test no = "$enable_shared"; then 22096aec45a7Smrg # Fast installation is not necessary 22106aec45a7Smrg enable_fast_install=needless 22116aec45a7Smrgfi 22126aec45a7Smrg_LT_TAGDECL([], [hardcode_action], [0], 22136aec45a7Smrg [How to hardcode a shared library path into an executable]) 22146aec45a7Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2215ab47cfaaSmrg 22166aec45a7Smrg 22176aec45a7Smrg# _LT_CMD_STRIPLIB 22186aec45a7Smrg# ---------------- 22196aec45a7Smrgm4_defun([_LT_CMD_STRIPLIB], 22206aec45a7Smrg[m4_require([_LT_DECL_EGREP]) 22216aec45a7Smrgstriplib= 22226aec45a7Smrgold_striplib= 22236aec45a7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 22246aec45a7Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 22256aec45a7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 22266aec45a7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 22276aec45a7Smrg AC_MSG_RESULT([yes]) 22286aec45a7Smrgelse 22296aec45a7Smrg# FIXME - insert some real tests, host_os isn't really good enough 22306aec45a7Smrg case $host_os in 22316aec45a7Smrg darwin*) 2232300bf1aeSmrg if test -n "$STRIP"; then 22336aec45a7Smrg striplib="$STRIP -x" 22346aec45a7Smrg old_striplib="$STRIP -S" 22356aec45a7Smrg AC_MSG_RESULT([yes]) 22366aec45a7Smrg else 22376aec45a7Smrg AC_MSG_RESULT([no]) 22386aec45a7Smrg fi 22396aec45a7Smrg ;; 22406aec45a7Smrg *) 22416aec45a7Smrg AC_MSG_RESULT([no]) 22426aec45a7Smrg ;; 22436aec45a7Smrg esac 22446aec45a7Smrgfi 22456aec45a7Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22466aec45a7Smrg_LT_DECL([], [striplib], [1]) 22476aec45a7Smrg])# _LT_CMD_STRIPLIB 22486aec45a7Smrg 22496aec45a7Smrg 2250300bf1aeSmrg# _LT_PREPARE_MUNGE_PATH_LIST 2251300bf1aeSmrg# --------------------------- 2252300bf1aeSmrg# Make sure func_munge_path_list() is defined correctly. 2253300bf1aeSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2254300bf1aeSmrg[[# func_munge_path_list VARIABLE PATH 2255300bf1aeSmrg# ----------------------------------- 2256300bf1aeSmrg# VARIABLE is name of variable containing _space_ separated list of 2257300bf1aeSmrg# directories to be munged by the contents of PATH, which is string 2258300bf1aeSmrg# having a format: 2259300bf1aeSmrg# "DIR[:DIR]:" 2260300bf1aeSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 2261300bf1aeSmrg# ":DIR[:DIR]" 2262300bf1aeSmrg# string "DIR[ DIR]" will be appended to VARIABLE 2263300bf1aeSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2264300bf1aeSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2265300bf1aeSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 2266300bf1aeSmrg# "DIR[:DIR]" 2267300bf1aeSmrg# VARIABLE will be replaced by "DIR[ DIR]" 2268300bf1aeSmrgfunc_munge_path_list () 2269300bf1aeSmrg{ 2270300bf1aeSmrg case x@S|@2 in 2271300bf1aeSmrg x) 2272300bf1aeSmrg ;; 2273300bf1aeSmrg *:) 2274300bf1aeSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2275300bf1aeSmrg ;; 2276300bf1aeSmrg x:*) 2277300bf1aeSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2278300bf1aeSmrg ;; 2279300bf1aeSmrg *::*) 2280300bf1aeSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2281300bf1aeSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2282300bf1aeSmrg ;; 2283300bf1aeSmrg *) 2284300bf1aeSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2285300bf1aeSmrg ;; 2286300bf1aeSmrg esac 2287300bf1aeSmrg} 2288300bf1aeSmrg]])# _LT_PREPARE_PATH_LIST 2289300bf1aeSmrg 2290300bf1aeSmrg 22916aec45a7Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 22926aec45a7Smrg# ----------------------------- 22936aec45a7Smrg# PORTME Fill in your ld.so characteristics 22946aec45a7Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 22956aec45a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 22966aec45a7Smrgm4_require([_LT_DECL_EGREP])dnl 22976aec45a7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 22986aec45a7Smrgm4_require([_LT_DECL_OBJDUMP])dnl 22996aec45a7Smrgm4_require([_LT_DECL_SED])dnl 23006aec45a7Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2301300bf1aeSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23026aec45a7SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23036aec45a7Smrgm4_if([$1], 23046aec45a7Smrg [], [ 2305300bf1aeSmrgif test yes = "$GCC"; then 23066aec45a7Smrg case $host_os in 2307300bf1aeSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2308300bf1aeSmrg *) lt_awk_arg='/^libraries:/' ;; 23096aec45a7Smrg esac 23106aec45a7Smrg case $host_os in 2311300bf1aeSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2312300bf1aeSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23136aec45a7Smrg esac 23146aec45a7Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23156aec45a7Smrg case $lt_search_path_spec in 23166aec45a7Smrg *\;*) 23176aec45a7Smrg # if the path contains ";" then we assume it to be the separator 23186aec45a7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 23196aec45a7Smrg # assumed that no part of a normal pathname contains ";" but that should 23206aec45a7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 23216aec45a7Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23226aec45a7Smrg ;; 23236aec45a7Smrg *) 23246aec45a7Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23256aec45a7Smrg ;; 23266aec45a7Smrg esac 23276aec45a7Smrg # Ok, now we have the path, separated by spaces, we can step through it 2328300bf1aeSmrg # and add multilib dir if necessary... 23296aec45a7Smrg lt_tmp_lt_search_path_spec= 2330300bf1aeSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2331300bf1aeSmrg # ...but if some path component already ends with the multilib dir we assume 2332300bf1aeSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2333300bf1aeSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2334300bf1aeSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2335300bf1aeSmrg lt_multi_os_dir= 2336300bf1aeSmrg ;; 2337300bf1aeSmrg esac 23386aec45a7Smrg for lt_sys_path in $lt_search_path_spec; do 2339300bf1aeSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2340300bf1aeSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2341300bf1aeSmrg elif test -n "$lt_multi_os_dir"; then 23426aec45a7Smrg test -d "$lt_sys_path" && \ 23436aec45a7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23446aec45a7Smrg fi 23456aec45a7Smrg done 23466aec45a7Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2347300bf1aeSmrgBEGIN {RS = " "; FS = "/|\n";} { 2348300bf1aeSmrg lt_foo = ""; 2349300bf1aeSmrg lt_count = 0; 23506aec45a7Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 23516aec45a7Smrg if ($lt_i != "" && $lt_i != ".") { 23526aec45a7Smrg if ($lt_i == "..") { 23536aec45a7Smrg lt_count++; 23546aec45a7Smrg } else { 23556aec45a7Smrg if (lt_count == 0) { 2356300bf1aeSmrg lt_foo = "/" $lt_i lt_foo; 23576aec45a7Smrg } else { 23586aec45a7Smrg lt_count--; 23596aec45a7Smrg } 23606aec45a7Smrg } 23616aec45a7Smrg } 23626aec45a7Smrg } 23636aec45a7Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23646aec45a7Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23656aec45a7Smrg}'` 23666aec45a7Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 23676aec45a7Smrg # for these hosts. 23686aec45a7Smrg case $host_os in 23696aec45a7Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2370300bf1aeSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23716aec45a7Smrg esac 23726aec45a7Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23736aec45a7Smrgelse 23746aec45a7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23756aec45a7Smrgfi]) 23766aec45a7Smrglibrary_names_spec= 23776aec45a7Smrglibname_spec='lib$name' 23786aec45a7Smrgsoname_spec= 2379300bf1aeSmrgshrext_cmds=.so 23806aec45a7Smrgpostinstall_cmds= 23816aec45a7Smrgpostuninstall_cmds= 23826aec45a7Smrgfinish_cmds= 23836aec45a7Smrgfinish_eval= 23846aec45a7Smrgshlibpath_var= 23856aec45a7Smrgshlibpath_overrides_runpath=unknown 23866aec45a7Smrgversion_type=none 23876aec45a7Smrgdynamic_linker="$host_os ld.so" 23886aec45a7Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 23896aec45a7Smrgneed_lib_prefix=unknown 23906aec45a7Smrghardcode_into_libs=no 23916aec45a7Smrg 23926aec45a7Smrg# when you set need_version to no, make sure it does not cause -set_version 23936aec45a7Smrg# flags to be left without arguments 23946aec45a7Smrgneed_version=unknown 23956aec45a7Smrg 2396300bf1aeSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2397300bf1aeSmrg[User-defined run-time library search path.]) 2398300bf1aeSmrg 23996aec45a7Smrgcase $host_os in 24006aec45a7Smrgaix3*) 2401aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 2402300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24036aec45a7Smrg shlibpath_var=LIBPATH 24046aec45a7Smrg 24056aec45a7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2406300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 2407ab47cfaaSmrg ;; 2408ab47cfaaSmrg 24096aec45a7Smrgaix[[4-9]]*) 2410aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 2411ab47cfaaSmrg need_lib_prefix=no 24126aec45a7Smrg need_version=no 24136aec45a7Smrg hardcode_into_libs=yes 2414300bf1aeSmrg if test ia64 = "$host_cpu"; then 24156aec45a7Smrg # AIX 5 supports IA64 2416300bf1aeSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24176aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 2418ab47cfaaSmrg else 24196aec45a7Smrg # With GCC up to 2.95.x, collect2 would create an import file 24206aec45a7Smrg # for dependence libraries. The import file would start with 2421300bf1aeSmrg # the line '#! .'. This would cause the generated library to 2422300bf1aeSmrg # depend on '.', always an invalid library. This was fixed in 24236aec45a7Smrg # development snapshots of GCC prior to 3.0. 24246aec45a7Smrg case $host_os in 24256aec45a7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24266aec45a7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24276aec45a7Smrg echo ' yes ' 2428300bf1aeSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24296aec45a7Smrg : 24306aec45a7Smrg else 24316aec45a7Smrg can_build_shared=no 24326aec45a7Smrg fi 24336aec45a7Smrg ;; 24346aec45a7Smrg esac 2435300bf1aeSmrg # Using Import Files as archive members, it is possible to support 2436300bf1aeSmrg # filename-based versioning of shared library archives on AIX. While 2437300bf1aeSmrg # this would work for both with and without runtime linking, it will 2438300bf1aeSmrg # prevent static linking of such archives. So we do filename-based 2439300bf1aeSmrg # shared library versioning with .so extension only, which is used 2440300bf1aeSmrg # when both runtime linking and shared linking is enabled. 2441300bf1aeSmrg # Unfortunately, runtime linking may impact performance, so we do 2442300bf1aeSmrg # not want this to be the default eventually. Also, we use the 2443300bf1aeSmrg # versioned .so libs for executables only if there is the -brtl 2444300bf1aeSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2445300bf1aeSmrg # To allow for filename-based versioning support, we need to create 2446300bf1aeSmrg # libNAME.so.V as an archive file, containing: 2447300bf1aeSmrg # *) an Import File, referring to the versioned filename of the 2448300bf1aeSmrg # archive as well as the shared archive member, telling the 2449300bf1aeSmrg # bitwidth (32 or 64) of that shared object, and providing the 2450300bf1aeSmrg # list of exported symbols of that shared object, eventually 2451300bf1aeSmrg # decorated with the 'weak' keyword 2452300bf1aeSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2453300bf1aeSmrg # it being seen by the linker. 2454300bf1aeSmrg # At run time we better use the real file rather than another symlink, 2455300bf1aeSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2456300bf1aeSmrg 2457300bf1aeSmrg case $with_aix_soname,$aix_use_runtimelinking in 2458300bf1aeSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24596aec45a7Smrg # soname into executable. Probably we can add versioning support to 24606aec45a7Smrg # collect2, so additional links can be useful in future. 2461300bf1aeSmrg aix,yes) # traditional libtool 2462300bf1aeSmrg dynamic_linker='AIX unversionable lib.so' 24636aec45a7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24646aec45a7Smrg # instead of lib<name>.a to let people know that these are not 24656aec45a7Smrg # typical AIX shared libraries. 2466300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2467300bf1aeSmrg ;; 2468300bf1aeSmrg aix,no) # traditional AIX only 2469300bf1aeSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24706aec45a7Smrg # We preserve .a as extension for shared libraries through AIX4.2 24716aec45a7Smrg # and later when we are not doing run time linking. 2472300bf1aeSmrg library_names_spec='$libname$release.a $libname.a' 2473300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 2474300bf1aeSmrg ;; 2475300bf1aeSmrg svr4,*) # full svr4 only 2476300bf1aeSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2477300bf1aeSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2478300bf1aeSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2479300bf1aeSmrg shlibpath_overrides_runpath=yes 2480300bf1aeSmrg ;; 2481300bf1aeSmrg *,yes) # both, prefer svr4 2482300bf1aeSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2483300bf1aeSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484300bf1aeSmrg # unpreferred sharedlib libNAME.a needs extra handling 2485300bf1aeSmrg 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"' 2486300bf1aeSmrg 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"' 2487300bf1aeSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2488300bf1aeSmrg shlibpath_overrides_runpath=yes 2489300bf1aeSmrg ;; 2490300bf1aeSmrg *,no) # both, prefer aix 2491300bf1aeSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2492300bf1aeSmrg library_names_spec='$libname$release.a $libname.a' 2493300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 2494300bf1aeSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2495300bf1aeSmrg 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)' 2496300bf1aeSmrg 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"' 2497300bf1aeSmrg ;; 2498300bf1aeSmrg esac 24996aec45a7Smrg shlibpath_var=LIBPATH 2500ab47cfaaSmrg fi 2501ab47cfaaSmrg ;; 2502ab47cfaaSmrg 25036aec45a7Smrgamigaos*) 25046aec45a7Smrg case $host_cpu in 25056aec45a7Smrg powerpc) 25066aec45a7Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25076aec45a7Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2508300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25096aec45a7Smrg ;; 25106aec45a7Smrg m68k) 25116aec45a7Smrg library_names_spec='$libname.ixlibrary $libname.a' 25126aec45a7Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2513300bf1aeSmrg 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' 25146aec45a7Smrg ;; 25156aec45a7Smrg esac 2516ab47cfaaSmrg ;; 2517ab47cfaaSmrg 25186aec45a7Smrgbeos*) 2519300bf1aeSmrg library_names_spec='$libname$shared_ext' 25206aec45a7Smrg dynamic_linker="$host_os ld.so" 25216aec45a7Smrg shlibpath_var=LIBRARY_PATH 25226aec45a7Smrg ;; 25236aec45a7Smrg 25246aec45a7Smrgbsdi[[45]]*) 2525aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 2526ab47cfaaSmrg need_version=no 2527300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2528300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 25296aec45a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2530ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 25316aec45a7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25326aec45a7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25336aec45a7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 25346aec45a7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25356aec45a7Smrg # libtool to hard-code these into programs 2536ab47cfaaSmrg ;; 2537ab47cfaaSmrg 25386aec45a7Smrgcygwin* | mingw* | pw32* | cegcc*) 25396aec45a7Smrg version_type=windows 2540300bf1aeSmrg shrext_cmds=.dll 25416aec45a7Smrg need_version=no 25426aec45a7Smrg need_lib_prefix=no 25436aec45a7Smrg 2544aa9e3350Smrg case $GCC,$cc_basename in 2545aa9e3350Smrg yes,*) 2546aa9e3350Smrg # gcc 25476aec45a7Smrg library_names_spec='$libname.dll.a' 25486aec45a7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2549300bf1aeSmrg postinstall_cmds='base_file=`basename \$file`~ 2550300bf1aeSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25516aec45a7Smrg dldir=$destdir/`dirname \$dlpath`~ 25526aec45a7Smrg test -d \$dldir || mkdir -p \$dldir~ 25536aec45a7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 25546aec45a7Smrg chmod a+x \$dldir/$dlname~ 25556aec45a7Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25566aec45a7Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25576aec45a7Smrg fi' 25586aec45a7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25596aec45a7Smrg dlpath=$dir/\$dldll~ 25606aec45a7Smrg $RM \$dlpath' 25616aec45a7Smrg shlibpath_overrides_runpath=yes 25626aec45a7Smrg 25636aec45a7Smrg case $host_os in 25646aec45a7Smrg cygwin*) 25656aec45a7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2566300bf1aeSmrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25676aec45a7Smrgm4_if([$1], [],[ 25686aec45a7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25696aec45a7Smrg ;; 25706aec45a7Smrg mingw* | cegcc*) 25716aec45a7Smrg # MinGW DLLs use traditional 'lib' prefix 2572300bf1aeSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25736aec45a7Smrg ;; 25746aec45a7Smrg pw32*) 25756aec45a7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2576300bf1aeSmrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25776aec45a7Smrg ;; 25786aec45a7Smrg esac 2579aa9e3350Smrg dynamic_linker='Win32 ld.exe' 2580aa9e3350Smrg ;; 2581aa9e3350Smrg 2582aa9e3350Smrg *,cl*) 2583aa9e3350Smrg # Native MSVC 2584aa9e3350Smrg libname_spec='$name' 2585300bf1aeSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2586300bf1aeSmrg library_names_spec='$libname.dll.lib' 2587aa9e3350Smrg 2588aa9e3350Smrg case $build_os in 2589aa9e3350Smrg mingw*) 2590aa9e3350Smrg sys_lib_search_path_spec= 2591aa9e3350Smrg lt_save_ifs=$IFS 2592aa9e3350Smrg IFS=';' 2593aa9e3350Smrg for lt_path in $LIB 2594aa9e3350Smrg do 2595aa9e3350Smrg IFS=$lt_save_ifs 2596aa9e3350Smrg # Let DOS variable expansion print the short 8.3 style file name. 2597aa9e3350Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2598aa9e3350Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2599aa9e3350Smrg done 2600aa9e3350Smrg IFS=$lt_save_ifs 2601aa9e3350Smrg # Convert to MSYS style. 2602aa9e3350Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2603aa9e3350Smrg ;; 2604aa9e3350Smrg cygwin*) 2605aa9e3350Smrg # Convert to unix form, then to dos form, then back to unix form 2606aa9e3350Smrg # but this time dos style (no spaces!) so that the unix form looks 2607aa9e3350Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 2608aa9e3350Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2609aa9e3350Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2610aa9e3350Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2611aa9e3350Smrg ;; 2612aa9e3350Smrg *) 2613300bf1aeSmrg sys_lib_search_path_spec=$LIB 2614aa9e3350Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2615aa9e3350Smrg # It is most probably a Windows format PATH. 2616aa9e3350Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2617aa9e3350Smrg else 2618aa9e3350Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2619aa9e3350Smrg fi 2620aa9e3350Smrg # FIXME: find the short name or the path components, as spaces are 2621aa9e3350Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 2622aa9e3350Smrg ;; 2623aa9e3350Smrg esac 2624aa9e3350Smrg 2625aa9e3350Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2626300bf1aeSmrg postinstall_cmds='base_file=`basename \$file`~ 2627300bf1aeSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2628aa9e3350Smrg dldir=$destdir/`dirname \$dlpath`~ 2629aa9e3350Smrg test -d \$dldir || mkdir -p \$dldir~ 2630aa9e3350Smrg $install_prog $dir/$dlname \$dldir/$dlname' 2631aa9e3350Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2632aa9e3350Smrg dlpath=$dir/\$dldll~ 2633aa9e3350Smrg $RM \$dlpath' 2634aa9e3350Smrg shlibpath_overrides_runpath=yes 2635aa9e3350Smrg dynamic_linker='Win32 link.exe' 26366aec45a7Smrg ;; 26376aec45a7Smrg 26386aec45a7Smrg *) 2639aa9e3350Smrg # Assume MSVC wrapper 2640300bf1aeSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2641aa9e3350Smrg dynamic_linker='Win32 ld.exe' 26426aec45a7Smrg ;; 26436aec45a7Smrg esac 26446aec45a7Smrg # FIXME: first we should search . and the directory the executable is in 26456aec45a7Smrg shlibpath_var=PATH 26468697ee19Smrg ;; 26478697ee19Smrg 26486aec45a7Smrgdarwin* | rhapsody*) 26496aec45a7Smrg dynamic_linker="$host_os dyld" 26506aec45a7Smrg version_type=darwin 26516aec45a7Smrg need_lib_prefix=no 26526aec45a7Smrg need_version=no 2653300bf1aeSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2654300bf1aeSmrg soname_spec='$libname$release$major$shared_ext' 26556aec45a7Smrg shlibpath_overrides_runpath=yes 26566aec45a7Smrg shlibpath_var=DYLD_LIBRARY_PATH 26576aec45a7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 26586aec45a7Smrgm4_if([$1], [],[ 26596aec45a7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26606aec45a7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 26616aec45a7Smrg ;; 26626aec45a7Smrg 26636aec45a7Smrgdgux*) 2664aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 2665ab47cfaaSmrg need_lib_prefix=no 2666ab47cfaaSmrg need_version=no 2667300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2668300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 2669ab47cfaaSmrg shlibpath_var=LD_LIBRARY_PATH 2670ab47cfaaSmrg ;; 2671ab47cfaaSmrg 26726aec45a7Smrgfreebsd* | dragonfly*) 26736aec45a7Smrg # DragonFly does not have aout. When/if they implement a new 26746aec45a7Smrg # versioning mechanism, adjust this. 26756aec45a7Smrg if test -x /usr/bin/objformat; then 26766aec45a7Smrg objformat=`/usr/bin/objformat` 26776aec45a7Smrg else 26786aec45a7Smrg case $host_os in 2679aa9e3350Smrg freebsd[[23]].*) objformat=aout ;; 26806aec45a7Smrg *) objformat=elf ;; 26816aec45a7Smrg esac 26826aec45a7Smrg fi 2683300bf1aeSmrg # Handle Gentoo/FreeBSD as it was Linux 2684300bf1aeSmrg case $host_vendor in 2685300bf1aeSmrg gentoo) 2686300bf1aeSmrg version_type=linux ;; 2687300bf1aeSmrg *) 2688300bf1aeSmrg version_type=freebsd-$objformat ;; 2689300bf1aeSmrg esac 2690300bf1aeSmrg 26916aec45a7Smrg case $version_type in 26926aec45a7Smrg freebsd-elf*) 2693300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2694300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 26956aec45a7Smrg need_version=no 2696ab47cfaaSmrg need_lib_prefix=no 2697ab47cfaaSmrg ;; 26986aec45a7Smrg freebsd-*) 2699300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 27006aec45a7Smrg need_version=yes 2701ab47cfaaSmrg ;; 2702300bf1aeSmrg linux) 2703300bf1aeSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2704300bf1aeSmrg soname_spec='${libname}${release}${shared_ext}$major' 2705300bf1aeSmrg need_lib_prefix=no 2706300bf1aeSmrg need_version=no 2707300bf1aeSmrg ;; 2708ab47cfaaSmrg esac 27096aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 27106aec45a7Smrg case $host_os in 2711aa9e3350Smrg freebsd2.*) 27126aec45a7Smrg shlibpath_overrides_runpath=yes 27136aec45a7Smrg ;; 27146aec45a7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27156aec45a7Smrg shlibpath_overrides_runpath=yes 27166aec45a7Smrg hardcode_into_libs=yes 27176aec45a7Smrg ;; 27186aec45a7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27196aec45a7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27206aec45a7Smrg shlibpath_overrides_runpath=no 27216aec45a7Smrg hardcode_into_libs=yes 27226aec45a7Smrg ;; 27236aec45a7Smrg *) # from 4.6 on, and DragonFly 27246aec45a7Smrg shlibpath_overrides_runpath=yes 27256aec45a7Smrg hardcode_into_libs=yes 27266aec45a7Smrg ;; 27276aec45a7Smrg esac 2728ab47cfaaSmrg ;; 2729ab47cfaaSmrg 27306aec45a7Smrghaiku*) 2731aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 27326aec45a7Smrg need_lib_prefix=no 27336aec45a7Smrg need_version=no 27346aec45a7Smrg dynamic_linker="$host_os runtime_loader" 2735300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2736300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 27376aec45a7Smrg shlibpath_var=LIBRARY_PATH 2738300bf1aeSmrg shlibpath_overrides_runpath=no 27396aec45a7Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27406aec45a7Smrg hardcode_into_libs=yes 2741ab47cfaaSmrg ;; 27425c42550eSmrg 27436aec45a7Smrghpux9* | hpux10* | hpux11*) 27446aec45a7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 27456aec45a7Smrg # link against other versions. 27466aec45a7Smrg version_type=sunos 27476aec45a7Smrg need_lib_prefix=no 27486aec45a7Smrg need_version=no 27496aec45a7Smrg case $host_cpu in 27506aec45a7Smrg ia64*) 27516aec45a7Smrg shrext_cmds='.so' 27526aec45a7Smrg hardcode_into_libs=yes 27536aec45a7Smrg dynamic_linker="$host_os dld.so" 27546aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 27556aec45a7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2756300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2757300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 2758300bf1aeSmrg if test 32 = "$HPUX_IA64_MODE"; then 27596aec45a7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2760300bf1aeSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27615c42550eSmrg else 27626aec45a7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2763300bf1aeSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27645c42550eSmrg fi 27656aec45a7Smrg ;; 27666aec45a7Smrg hppa*64*) 27676aec45a7Smrg shrext_cmds='.sl' 27686aec45a7Smrg hardcode_into_libs=yes 27696aec45a7Smrg dynamic_linker="$host_os dld.sl" 27706aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27716aec45a7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2772300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2773300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 27746aec45a7Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27756aec45a7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27766aec45a7Smrg ;; 27776aec45a7Smrg *) 27786aec45a7Smrg shrext_cmds='.sl' 27796aec45a7Smrg dynamic_linker="$host_os dld.sl" 27806aec45a7Smrg shlibpath_var=SHLIB_PATH 27816aec45a7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2782300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2783300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 27846aec45a7Smrg ;; 27856aec45a7Smrg esac 27866aec45a7Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 27876aec45a7Smrg postinstall_cmds='chmod 555 $lib' 27886aec45a7Smrg # or fails outright, so override atomically: 27896aec45a7Smrg install_override_mode=555 27906aec45a7Smrg ;; 27915c42550eSmrg 27926aec45a7Smrginterix[[3-9]]*) 2793aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 27946aec45a7Smrg need_lib_prefix=no 27956aec45a7Smrg need_version=no 2796300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2797300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 27986aec45a7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 27996aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 28006aec45a7Smrg shlibpath_overrides_runpath=no 28016aec45a7Smrg hardcode_into_libs=yes 28026aec45a7Smrg ;; 28035c42550eSmrg 28046aec45a7Smrgirix5* | irix6* | nonstopux*) 28056aec45a7Smrg case $host_os in 28066aec45a7Smrg nonstopux*) version_type=nonstopux ;; 28076aec45a7Smrg *) 2808300bf1aeSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 2809aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 28106aec45a7Smrg else 28116aec45a7Smrg version_type=irix 28126aec45a7Smrg fi ;; 28136aec45a7Smrg esac 28146aec45a7Smrg need_lib_prefix=no 28156aec45a7Smrg need_version=no 2816300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 2817300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28186aec45a7Smrg case $host_os in 28196aec45a7Smrg irix5* | nonstopux*) 28206aec45a7Smrg libsuff= shlibsuff= 28216aec45a7Smrg ;; 28226aec45a7Smrg *) 28236aec45a7Smrg case $LD in # libtool.m4 will add one of these switches to LD 28246aec45a7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28256aec45a7Smrg libsuff= shlibsuff= libmagic=32-bit;; 28266aec45a7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28276aec45a7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28286aec45a7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28296aec45a7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28306aec45a7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 28315c42550eSmrg esac 28326aec45a7Smrg ;; 28336aec45a7Smrg esac 28346aec45a7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28356aec45a7Smrg shlibpath_overrides_runpath=no 2836300bf1aeSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2837300bf1aeSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28386aec45a7Smrg hardcode_into_libs=yes 28396aec45a7Smrg ;; 28405c42550eSmrg 28416aec45a7Smrg# No shared lib support for Linux oldld, aout, or coff. 28426aec45a7Smrglinux*oldld* | linux*aout* | linux*coff*) 28436aec45a7Smrg dynamic_linker=no 28446aec45a7Smrg ;; 28455c42550eSmrg 2846300bf1aeSmrglinux*android*) 2847300bf1aeSmrg version_type=none # Android doesn't support versioned libraries. 2848300bf1aeSmrg need_lib_prefix=no 2849300bf1aeSmrg need_version=no 2850300bf1aeSmrg library_names_spec='$libname$release$shared_ext' 2851300bf1aeSmrg soname_spec='$libname$release$shared_ext' 2852300bf1aeSmrg finish_cmds= 2853300bf1aeSmrg shlibpath_var=LD_LIBRARY_PATH 2854300bf1aeSmrg shlibpath_overrides_runpath=yes 2855300bf1aeSmrg 2856300bf1aeSmrg # This implies no fast_install, which is unacceptable. 2857300bf1aeSmrg # Some rework will be needed to allow for fast_install 2858300bf1aeSmrg # before this can be enabled. 2859300bf1aeSmrg hardcode_into_libs=yes 2860300bf1aeSmrg 2861300bf1aeSmrg dynamic_linker='Android linker' 2862300bf1aeSmrg # Don't embed -rpath directories since the linker doesn't support them. 2863300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2864300bf1aeSmrg ;; 2865300bf1aeSmrg 2866aa9e3350Smrg# This must be glibc/ELF. 286738770048Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2868aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 28696aec45a7Smrg need_lib_prefix=no 28706aec45a7Smrg need_version=no 2871300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2872300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 28736aec45a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28746aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 28756aec45a7Smrg shlibpath_overrides_runpath=no 28765c42550eSmrg 28776aec45a7Smrg # Some binutils ld are patched to set DT_RUNPATH 28786aec45a7Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 28796aec45a7Smrg [lt_cv_shlibpath_overrides_runpath=no 28806aec45a7Smrg save_LDFLAGS=$LDFLAGS 28816aec45a7Smrg save_libdir=$libdir 28826aec45a7Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 28836aec45a7Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 28846aec45a7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 28856aec45a7Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 28866aec45a7Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 28876aec45a7Smrg LDFLAGS=$save_LDFLAGS 28886aec45a7Smrg libdir=$save_libdir 28896aec45a7Smrg ]) 28906aec45a7Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 28915c42550eSmrg 28926aec45a7Smrg # This implies no fast_install, which is unacceptable. 28936aec45a7Smrg # Some rework will be needed to allow for fast_install 28946aec45a7Smrg # before this can be enabled. 28956aec45a7Smrg hardcode_into_libs=yes 28965c42550eSmrg 2897300bf1aeSmrg # Ideally, we could use ldconfig to report *all* directores which are 2898300bf1aeSmrg # searched for libraries, however this is still not possible. Aside from not 2899300bf1aeSmrg # being certain /sbin/ldconfig is available, command 2900300bf1aeSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2901300bf1aeSmrg # even though it is searched at run-time. Try to do the best guess by 2902300bf1aeSmrg # appending ld.so.conf contents (and includes) to the search path. 29036aec45a7Smrg if test -f /etc/ld.so.conf; then 29046aec45a7Smrg 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' ' '` 290538770048Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 29065c42550eSmrg fi 29075c42550eSmrg 29086aec45a7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 29096aec45a7Smrg # powerpc, because MkLinux only supported shared libraries with the 29106aec45a7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 29116aec45a7Smrg # most powerpc-linux boxes support dynamic linking these days and 29126aec45a7Smrg # people can always --disable-shared, the test was removed, and we 29136aec45a7Smrg # assume the GNU/Linux dynamic linker is in use. 29146aec45a7Smrg dynamic_linker='GNU/Linux ld.so' 29156aec45a7Smrg ;; 29165c42550eSmrg 29176aec45a7Smrgnetbsd*) 29186aec45a7Smrg version_type=sunos 29196aec45a7Smrg need_lib_prefix=no 29206aec45a7Smrg need_version=no 29216aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2922300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29236aec45a7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29246aec45a7Smrg dynamic_linker='NetBSD (a.out) ld.so' 29256aec45a7Smrg else 2926300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2927300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 29286aec45a7Smrg dynamic_linker='NetBSD ld.elf_so' 29296aec45a7Smrg fi 29306aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 29316aec45a7Smrg shlibpath_overrides_runpath=yes 29326aec45a7Smrg hardcode_into_libs=yes 29336aec45a7Smrg ;; 29345c42550eSmrg 29356aec45a7Smrgnewsos6) 2936aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 2937300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29386aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 29396aec45a7Smrg shlibpath_overrides_runpath=yes 29406aec45a7Smrg ;; 29415c42550eSmrg 29426aec45a7Smrg*nto* | *qnx*) 29436aec45a7Smrg version_type=qnx 29446aec45a7Smrg need_lib_prefix=no 29456aec45a7Smrg need_version=no 2946300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2947300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 29486aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 29496aec45a7Smrg shlibpath_overrides_runpath=no 29506aec45a7Smrg hardcode_into_libs=yes 29516aec45a7Smrg dynamic_linker='ldqnx.so' 29526aec45a7Smrg ;; 29535c42550eSmrg 2954300bf1aeSmrgopenbsd* | bitrig*) 29556aec45a7Smrg version_type=sunos 2956300bf1aeSmrg sys_lib_dlsearch_path_spec=/usr/lib 29576aec45a7Smrg need_lib_prefix=no 2958300bf1aeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2959300bf1aeSmrg need_version=no 29606aec45a7Smrg else 2961300bf1aeSmrg need_version=yes 29626aec45a7Smrg fi 2963300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2964300bf1aeSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2965300bf1aeSmrg shlibpath_var=LD_LIBRARY_PATH 2966300bf1aeSmrg shlibpath_overrides_runpath=yes 29676aec45a7Smrg ;; 29685c42550eSmrg 29696aec45a7Smrgos2*) 29706aec45a7Smrg libname_spec='$name' 2971300bf1aeSmrg version_type=windows 2972300bf1aeSmrg shrext_cmds=.dll 2973300bf1aeSmrg need_version=no 29746aec45a7Smrg need_lib_prefix=no 2975300bf1aeSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2976300bf1aeSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2977300bf1aeSmrg v=$($ECHO $release$versuffix | tr -d .-); 2978300bf1aeSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2979300bf1aeSmrg $ECHO $n$v`$shared_ext' 2980300bf1aeSmrg library_names_spec='${libname}_dll.$libext' 29816aec45a7Smrg dynamic_linker='OS/2 ld.exe' 2982300bf1aeSmrg shlibpath_var=BEGINLIBPATH 2983300bf1aeSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2984300bf1aeSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2985300bf1aeSmrg postinstall_cmds='base_file=`basename \$file`~ 2986300bf1aeSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2987300bf1aeSmrg dldir=$destdir/`dirname \$dlpath`~ 2988300bf1aeSmrg test -d \$dldir || mkdir -p \$dldir~ 2989300bf1aeSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2990300bf1aeSmrg chmod a+x \$dldir/$dlname~ 2991300bf1aeSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2992300bf1aeSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2993300bf1aeSmrg fi' 2994300bf1aeSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2995300bf1aeSmrg dlpath=$dir/\$dldll~ 2996300bf1aeSmrg $RM \$dlpath' 29976aec45a7Smrg ;; 29985c42550eSmrg 29996aec45a7Smrgosf3* | osf4* | osf5*) 30006aec45a7Smrg version_type=osf 30016aec45a7Smrg need_lib_prefix=no 30026aec45a7Smrg need_version=no 3003300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 3004300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30056aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 30066aec45a7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3007300bf1aeSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 30086aec45a7Smrg ;; 30095c42550eSmrg 30106aec45a7Smrgrdos*) 30116aec45a7Smrg dynamic_linker=no 30126aec45a7Smrg ;; 30135c42550eSmrg 30146aec45a7Smrgsolaris*) 3015aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 30166aec45a7Smrg need_lib_prefix=no 30176aec45a7Smrg need_version=no 3018300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3019300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 30206aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 30216aec45a7Smrg shlibpath_overrides_runpath=yes 30226aec45a7Smrg hardcode_into_libs=yes 30236aec45a7Smrg # ldd complains unless libraries are executable 30246aec45a7Smrg postinstall_cmds='chmod +x $lib' 30256aec45a7Smrg ;; 30265c42550eSmrg 30276aec45a7Smrgsunos4*) 30286aec45a7Smrg version_type=sunos 3029300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30306aec45a7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30316aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 30326aec45a7Smrg shlibpath_overrides_runpath=yes 3033300bf1aeSmrg if test yes = "$with_gnu_ld"; then 30346aec45a7Smrg need_lib_prefix=no 30356aec45a7Smrg fi 30366aec45a7Smrg need_version=yes 30376aec45a7Smrg ;; 30385c42550eSmrg 30396aec45a7Smrgsysv4 | sysv4.3*) 3040aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 3041300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3042300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 30436aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 30446aec45a7Smrg case $host_vendor in 30456aec45a7Smrg sni) 30466aec45a7Smrg shlibpath_overrides_runpath=no 30476aec45a7Smrg need_lib_prefix=no 30486aec45a7Smrg runpath_var=LD_RUN_PATH 30496aec45a7Smrg ;; 30506aec45a7Smrg siemens) 30516aec45a7Smrg need_lib_prefix=no 30526aec45a7Smrg ;; 30536aec45a7Smrg motorola) 30546aec45a7Smrg need_lib_prefix=no 30556aec45a7Smrg need_version=no 30566aec45a7Smrg shlibpath_overrides_runpath=no 30576aec45a7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30586aec45a7Smrg ;; 30596aec45a7Smrg esac 30606aec45a7Smrg ;; 30615c42550eSmrg 30626aec45a7Smrgsysv4*MP*) 3063300bf1aeSmrg if test -d /usr/nec; then 3064aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 3065300bf1aeSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3066300bf1aeSmrg soname_spec='$libname$shared_ext.$major' 30676aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 30686aec45a7Smrg fi 30696aec45a7Smrg ;; 30705c42550eSmrg 30716aec45a7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3072300bf1aeSmrg version_type=sco 30736aec45a7Smrg need_lib_prefix=no 30746aec45a7Smrg need_version=no 3075300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3076300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 30776aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 30786aec45a7Smrg shlibpath_overrides_runpath=yes 30796aec45a7Smrg hardcode_into_libs=yes 3080300bf1aeSmrg if test yes = "$with_gnu_ld"; then 30816aec45a7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 30826aec45a7Smrg else 30836aec45a7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 30846aec45a7Smrg case $host_os in 30856aec45a7Smrg sco3.2v5*) 30866aec45a7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 30876aec45a7Smrg ;; 30886aec45a7Smrg esac 30896aec45a7Smrg fi 30906aec45a7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 30916aec45a7Smrg ;; 30925c42550eSmrg 30936aec45a7Smrgtpf*) 30946aec45a7Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3095aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 30966aec45a7Smrg need_lib_prefix=no 30976aec45a7Smrg need_version=no 3098300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30996aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 31006aec45a7Smrg shlibpath_overrides_runpath=no 31016aec45a7Smrg hardcode_into_libs=yes 31026aec45a7Smrg ;; 31035c42550eSmrg 31046aec45a7Smrguts4*) 3105aa9e3350Smrg version_type=linux # correct to gnu/linux during the next big refactor 3106300bf1aeSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3107300bf1aeSmrg soname_spec='$libname$release$shared_ext$major' 31086aec45a7Smrg shlibpath_var=LD_LIBRARY_PATH 31096aec45a7Smrg ;; 31105c42550eSmrg 31116aec45a7Smrg*) 31126aec45a7Smrg dynamic_linker=no 31136aec45a7Smrg ;; 31146aec45a7Smrgesac 31156aec45a7SmrgAC_MSG_RESULT([$dynamic_linker]) 3116300bf1aeSmrgtest no = "$dynamic_linker" && can_build_shared=no 31175c42550eSmrg 31186aec45a7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3119300bf1aeSmrgif test yes = "$GCC"; then 31206aec45a7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31216aec45a7Smrgfi 31225c42550eSmrg 3123300bf1aeSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3124300bf1aeSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31256aec45a7Smrgfi 3126300bf1aeSmrg 3127300bf1aeSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3128300bf1aeSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 31296aec45a7Smrgfi 31305c42550eSmrg 3131300bf1aeSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3132300bf1aeSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3133300bf1aeSmrg 3134300bf1aeSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3135300bf1aeSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3136300bf1aeSmrg 3137300bf1aeSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3138300bf1aeSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3139300bf1aeSmrg 31406aec45a7Smrg_LT_DECL([], [variables_saved_for_relink], [1], 31416aec45a7Smrg [Variables whose values should be saved in libtool wrapper scripts and 31426aec45a7Smrg restored at link time]) 31436aec45a7Smrg_LT_DECL([], [need_lib_prefix], [0], 31446aec45a7Smrg [Do we need the "lib" prefix for modules?]) 31456aec45a7Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31466aec45a7Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31476aec45a7Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31486aec45a7Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31496aec45a7Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31506aec45a7Smrg [Is shlibpath searched before the hard-coded library search path?]) 31516aec45a7Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31526aec45a7Smrg_LT_DECL([], [library_names_spec], [1], 31536aec45a7Smrg [[List of archive names. First name is the real one, the rest are links. 31546aec45a7Smrg The last name is the one that the linker finds with -lNAME]]) 31556aec45a7Smrg_LT_DECL([], [soname_spec], [1], 31566aec45a7Smrg [[The coded name of the library, if different from the real name]]) 31576aec45a7Smrg_LT_DECL([], [install_override_mode], [1], 31586aec45a7Smrg [Permission mode override for installation of shared libraries]) 31596aec45a7Smrg_LT_DECL([], [postinstall_cmds], [2], 31606aec45a7Smrg [Command to use after installation of a shared archive]) 31616aec45a7Smrg_LT_DECL([], [postuninstall_cmds], [2], 31626aec45a7Smrg [Command to use after uninstallation of a shared archive]) 31636aec45a7Smrg_LT_DECL([], [finish_cmds], [2], 31646aec45a7Smrg [Commands used to finish a libtool library installation in a directory]) 31656aec45a7Smrg_LT_DECL([], [finish_eval], [1], 31666aec45a7Smrg [[As "finish_cmds", except a single script fragment to be evaled but 31676aec45a7Smrg not shown]]) 31686aec45a7Smrg_LT_DECL([], [hardcode_into_libs], [0], 31696aec45a7Smrg [Whether we should hardcode library paths into libraries]) 31706aec45a7Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31716aec45a7Smrg [Compile-time system search path for libraries]) 3172300bf1aeSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3173300bf1aeSmrg [Detected run-time system search path for libraries]) 3174300bf1aeSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3175300bf1aeSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31766aec45a7Smrg])# _LT_SYS_DYNAMIC_LINKER 31776aec45a7Smrg 31786aec45a7Smrg 31796aec45a7Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 31806aec45a7Smrg# -------------------------- 3181300bf1aeSmrg# find a file program that can recognize shared library 31826aec45a7SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31836aec45a7Smrg[m4_require([_LT_DECL_EGREP])dnl 31845c42550eSmrgAC_MSG_CHECKING([for $1]) 31855c42550eSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 31865c42550eSmrg[case $MAGIC_CMD in 3187ab47cfaaSmrg[[\\/*] | ?:[\\/]*]) 3188300bf1aeSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3189ab47cfaaSmrg ;; 3190ab47cfaaSmrg*) 3191300bf1aeSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 3192300bf1aeSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3193ab47cfaaSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3194ab47cfaaSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3195ab47cfaaSmrgdnl not every word. This closes a longstanding sh security hole. 31966aec45a7Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3197ab47cfaaSmrg for ac_dir in $ac_dummy; do 3198300bf1aeSmrg IFS=$lt_save_ifs 3199ab47cfaaSmrg test -z "$ac_dir" && ac_dir=. 3200300bf1aeSmrg if test -f "$ac_dir/$1"; then 3201300bf1aeSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3202ab47cfaaSmrg if test -n "$file_magic_test_file"; then 3203ab47cfaaSmrg case $deplibs_check_method in 3204ab47cfaaSmrg "file_magic "*) 3205ab47cfaaSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3206300bf1aeSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3207ab47cfaaSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3208ab47cfaaSmrg $EGREP "$file_magic_regex" > /dev/null; then 3209ab47cfaaSmrg : 3210ab47cfaaSmrg else 32116aec45a7Smrg cat <<_LT_EOF 1>&2 3212ab47cfaaSmrg 3213ab47cfaaSmrg*** Warning: the command libtool uses to detect shared libraries, 3214ab47cfaaSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3215ab47cfaaSmrg*** The result is that libtool may fail to recognize shared libraries 3216ab47cfaaSmrg*** as such. This will affect the creation of libtool libraries that 3217ab47cfaaSmrg*** depend on shared libraries, but programs linked with such libtool 3218ab47cfaaSmrg*** libraries will work regardless of this problem. Nevertheless, you 3219ab47cfaaSmrg*** may want to report the problem to your system manager and/or to 3220ab47cfaaSmrg*** bug-libtool@gnu.org 3221ab47cfaaSmrg 32226aec45a7Smrg_LT_EOF 3223ab47cfaaSmrg fi ;; 3224ab47cfaaSmrg esac 3225ab47cfaaSmrg fi 3226ab47cfaaSmrg break 3227ab47cfaaSmrg fi 3228ab47cfaaSmrg done 3229300bf1aeSmrg IFS=$lt_save_ifs 3230300bf1aeSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 3231ab47cfaaSmrg ;; 3232ab47cfaaSmrgesac]) 3233300bf1aeSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3234ab47cfaaSmrgif test -n "$MAGIC_CMD"; then 3235ab47cfaaSmrg AC_MSG_RESULT($MAGIC_CMD) 3236ab47cfaaSmrgelse 3237ab47cfaaSmrg AC_MSG_RESULT(no) 3238ab47cfaaSmrgfi 32396aec45a7Smrg_LT_DECL([], [MAGIC_CMD], [0], 32406aec45a7Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32416aec45a7Smrg])# _LT_PATH_TOOL_PREFIX 3242ab47cfaaSmrg 32436aec45a7Smrg# Old name: 32446aec45a7SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32456aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 32466aec45a7Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 32471473d951Smrg 32486aec45a7Smrg 32496aec45a7Smrg# _LT_PATH_MAGIC 32506aec45a7Smrg# -------------- 3251300bf1aeSmrg# find a file program that can recognize a shared library 32526aec45a7Smrgm4_defun([_LT_PATH_MAGIC], 32536aec45a7Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3254ab47cfaaSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3255ab47cfaaSmrg if test -n "$ac_tool_prefix"; then 32566aec45a7Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3257ab47cfaaSmrg else 3258ab47cfaaSmrg MAGIC_CMD=: 3259ab47cfaaSmrg fi 3260ab47cfaaSmrgfi 32616aec45a7Smrg])# _LT_PATH_MAGIC 3262ab47cfaaSmrg 3263ab47cfaaSmrg 32646aec45a7Smrg# LT_PATH_LD 3265ab47cfaaSmrg# ---------- 3266ab47cfaaSmrg# find the pathname to the GNU or non-GNU linker 32676aec45a7SmrgAC_DEFUN([LT_PATH_LD], 32686aec45a7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 32695c42550eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 32705c42550eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32716aec45a7Smrgm4_require([_LT_DECL_SED])dnl 32726aec45a7Smrgm4_require([_LT_DECL_EGREP])dnl 32736aec45a7Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 32746aec45a7Smrg 32756aec45a7SmrgAC_ARG_WITH([gnu-ld], 32766aec45a7Smrg [AS_HELP_STRING([--with-gnu-ld], 32776aec45a7Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3278300bf1aeSmrg [test no = "$withval" || with_gnu_ld=yes], 32796aec45a7Smrg [with_gnu_ld=no])dnl 32806aec45a7Smrg 3281ab47cfaaSmrgac_prog=ld 3282300bf1aeSmrgif test yes = "$GCC"; then 3283ab47cfaaSmrg # Check if gcc -print-prog-name=ld gives a path. 3284ab47cfaaSmrg AC_MSG_CHECKING([for ld used by $CC]) 3285ab47cfaaSmrg case $host in 3286ab47cfaaSmrg *-*-mingw*) 3287300bf1aeSmrg # gcc leaves a trailing carriage return, which upsets mingw 3288ab47cfaaSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3289ab47cfaaSmrg *) 3290ab47cfaaSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3291ab47cfaaSmrg esac 3292ab47cfaaSmrg case $ac_prog in 3293ab47cfaaSmrg # Accept absolute paths. 3294ab47cfaaSmrg [[\\/]]* | ?:[[\\/]]*) 3295ab47cfaaSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3296ab47cfaaSmrg # Canonicalize the pathname of ld 32976aec45a7Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 32986aec45a7Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 32996aec45a7Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3300ab47cfaaSmrg done 3301300bf1aeSmrg test -z "$LD" && LD=$ac_prog 3302ab47cfaaSmrg ;; 3303ab47cfaaSmrg "") 3304ab47cfaaSmrg # If it fails, then pretend we aren't using GCC. 3305ab47cfaaSmrg ac_prog=ld 3306ab47cfaaSmrg ;; 3307ab47cfaaSmrg *) 3308ab47cfaaSmrg # If it is relative, then search for the first ld in PATH. 3309ab47cfaaSmrg with_gnu_ld=unknown 3310ab47cfaaSmrg ;; 3311ab47cfaaSmrg esac 3312300bf1aeSmrgelif test yes = "$with_gnu_ld"; then 3313ab47cfaaSmrg AC_MSG_CHECKING([for GNU ld]) 3314ab47cfaaSmrgelse 3315ab47cfaaSmrg AC_MSG_CHECKING([for non-GNU ld]) 3316ab47cfaaSmrgfi 3317ab47cfaaSmrgAC_CACHE_VAL(lt_cv_path_LD, 3318ab47cfaaSmrg[if test -z "$LD"; then 3319300bf1aeSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3320ab47cfaaSmrg for ac_dir in $PATH; do 3321300bf1aeSmrg IFS=$lt_save_ifs 3322ab47cfaaSmrg test -z "$ac_dir" && ac_dir=. 3323ab47cfaaSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3324300bf1aeSmrg lt_cv_path_LD=$ac_dir/$ac_prog 3325ab47cfaaSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3326ab47cfaaSmrg # but apparently some variants of GNU ld only accept -v. 3327ab47cfaaSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3328ab47cfaaSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3329ab47cfaaSmrg *GNU* | *'with BFD'*) 3330300bf1aeSmrg test no != "$with_gnu_ld" && break 3331ab47cfaaSmrg ;; 3332ab47cfaaSmrg *) 3333300bf1aeSmrg test yes != "$with_gnu_ld" && break 3334ab47cfaaSmrg ;; 3335ab47cfaaSmrg esac 3336ab47cfaaSmrg fi 3337ab47cfaaSmrg done 3338300bf1aeSmrg IFS=$lt_save_ifs 3339ab47cfaaSmrgelse 3340300bf1aeSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3341ab47cfaaSmrgfi]) 3342300bf1aeSmrgLD=$lt_cv_path_LD 3343ab47cfaaSmrgif test -n "$LD"; then 3344ab47cfaaSmrg AC_MSG_RESULT($LD) 3345ab47cfaaSmrgelse 3346ab47cfaaSmrg AC_MSG_RESULT(no) 3347ab47cfaaSmrgfi 3348ab47cfaaSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33496aec45a7Smrg_LT_PATH_LD_GNU 33506aec45a7SmrgAC_SUBST([LD]) 3351ab47cfaaSmrg 33526aec45a7Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33536aec45a7Smrg])# LT_PATH_LD 3354ab47cfaaSmrg 33556aec45a7Smrg# Old names: 33566aec45a7SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33576aec45a7SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33586aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 33596aec45a7Smrgdnl AC_DEFUN([AM_PROG_LD], []) 33606aec45a7Smrgdnl AC_DEFUN([AC_PROG_LD], []) 33616aec45a7Smrg 33626aec45a7Smrg 33636aec45a7Smrg# _LT_PATH_LD_GNU 33646aec45a7Smrg#- -------------- 33656aec45a7Smrgm4_defun([_LT_PATH_LD_GNU], 33666aec45a7Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3367ab47cfaaSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3368ab47cfaaSmrgcase `$LD -v 2>&1 </dev/null` in 3369ab47cfaaSmrg*GNU* | *'with BFD'*) 3370ab47cfaaSmrg lt_cv_prog_gnu_ld=yes 3371ab47cfaaSmrg ;; 3372ab47cfaaSmrg*) 3373ab47cfaaSmrg lt_cv_prog_gnu_ld=no 3374ab47cfaaSmrg ;; 3375ab47cfaaSmrgesac]) 3376ab47cfaaSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 33776aec45a7Smrg])# _LT_PATH_LD_GNU 3378ab47cfaaSmrg 3379ab47cfaaSmrg 33806aec45a7Smrg# _LT_CMD_RELOAD 33816aec45a7Smrg# -------------- 3382ab47cfaaSmrg# find reload flag for linker 3383ab47cfaaSmrg# -- PORTME Some linkers may need a different reload flag. 33846aec45a7Smrgm4_defun([_LT_CMD_RELOAD], 3385ab47cfaaSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3386ab47cfaaSmrg lt_cv_ld_reload_flag, 3387ab47cfaaSmrg [lt_cv_ld_reload_flag='-r']) 3388ab47cfaaSmrgreload_flag=$lt_cv_ld_reload_flag 3389ab47cfaaSmrgcase $reload_flag in 3390ab47cfaaSmrg"" | " "*) ;; 3391ab47cfaaSmrg*) reload_flag=" $reload_flag" ;; 3392ab47cfaaSmrgesac 3393ab47cfaaSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3394ab47cfaaSmrgcase $host_os in 3395aa9e3350Smrg cygwin* | mingw* | pw32* | cegcc*) 3396300bf1aeSmrg if test yes != "$GCC"; then 3397aa9e3350Smrg reload_cmds=false 3398aa9e3350Smrg fi 3399aa9e3350Smrg ;; 3400ab47cfaaSmrg darwin*) 3401300bf1aeSmrg if test yes = "$GCC"; then 3402300bf1aeSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3403ab47cfaaSmrg else 3404ab47cfaaSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3405ab47cfaaSmrg fi 3406ab47cfaaSmrg ;; 3407ab47cfaaSmrgesac 34086aec45a7Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 34096aec45a7Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34106aec45a7Smrg])# _LT_CMD_RELOAD 3411ab47cfaaSmrg 3412ab47cfaaSmrg 3413300bf1aeSmrg# _LT_PATH_DD 3414300bf1aeSmrg# ----------- 3415300bf1aeSmrg# find a working dd 3416300bf1aeSmrgm4_defun([_LT_PATH_DD], 3417300bf1aeSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3418300bf1aeSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3419300bf1aeSmrgcat conftest.i conftest.i >conftest2.i 3420300bf1aeSmrg: ${lt_DD:=$DD} 3421300bf1aeSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3422300bf1aeSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3423300bf1aeSmrg cmp -s conftest.i conftest.out \ 3424300bf1aeSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3425300bf1aeSmrgfi]) 3426300bf1aeSmrgrm -f conftest.i conftest2.i conftest.out]) 3427300bf1aeSmrg])# _LT_PATH_DD 3428300bf1aeSmrg 3429300bf1aeSmrg 3430300bf1aeSmrg# _LT_CMD_TRUNCATE 3431300bf1aeSmrg# ---------------- 3432300bf1aeSmrg# find command to truncate a binary pipe 3433300bf1aeSmrgm4_defun([_LT_CMD_TRUNCATE], 3434300bf1aeSmrg[m4_require([_LT_PATH_DD]) 3435300bf1aeSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3436300bf1aeSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3437300bf1aeSmrgcat conftest.i conftest.i >conftest2.i 3438300bf1aeSmrglt_cv_truncate_bin= 3439300bf1aeSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3440300bf1aeSmrg cmp -s conftest.i conftest.out \ 3441300bf1aeSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3442300bf1aeSmrgfi 3443300bf1aeSmrgrm -f conftest.i conftest2.i conftest.out 3444300bf1aeSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3445300bf1aeSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3446300bf1aeSmrg [Command to truncate a binary pipe]) 3447300bf1aeSmrg])# _LT_CMD_TRUNCATE 3448300bf1aeSmrg 3449300bf1aeSmrg 34506aec45a7Smrg# _LT_CHECK_MAGIC_METHOD 34516aec45a7Smrg# ---------------------- 3452ab47cfaaSmrg# how to check for library dependencies 3453ab47cfaaSmrg# -- PORTME fill in with the dynamic library characteristics 34546aec45a7Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34556aec45a7Smrg[m4_require([_LT_DECL_EGREP]) 34566aec45a7Smrgm4_require([_LT_DECL_OBJDUMP]) 34576aec45a7SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3458ab47cfaaSmrglt_cv_deplibs_check_method, 3459ab47cfaaSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3460ab47cfaaSmrglt_cv_file_magic_test_file= 3461ab47cfaaSmrglt_cv_deplibs_check_method='unknown' 3462ab47cfaaSmrg# Need to set the preceding variable on all platforms that support 3463ab47cfaaSmrg# interlibrary dependencies. 3464ab47cfaaSmrg# 'none' -- dependencies not supported. 3465300bf1aeSmrg# 'unknown' -- same as none, but documents that we really don't know. 3466ab47cfaaSmrg# 'pass_all' -- all dependencies passed with no checks. 3467ab47cfaaSmrg# 'test_compile' -- check by making test program. 3468ab47cfaaSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3469300bf1aeSmrg# that responds to the $file_magic_cmd with a given extended regex. 3470300bf1aeSmrg# If you have 'file' or equivalent on your system and you're not sure 3471300bf1aeSmrg# whether 'pass_all' will *always* work, you probably want this one. 3472ab47cfaaSmrg 3473ab47cfaaSmrgcase $host_os in 34741473d951Smrgaix[[4-9]]*) 3475ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3476ab47cfaaSmrg ;; 3477ab47cfaaSmrg 3478ab47cfaaSmrgbeos*) 3479ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3480ab47cfaaSmrg ;; 3481ab47cfaaSmrg 3482ab47cfaaSmrgbsdi[[45]]*) 3483ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3484ab47cfaaSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3485ab47cfaaSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3486ab47cfaaSmrg ;; 3487ab47cfaaSmrg 3488ab47cfaaSmrgcygwin*) 3489ab47cfaaSmrg # func_win32_libid is a shell function defined in ltmain.sh 3490ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3491ab47cfaaSmrg lt_cv_file_magic_cmd='func_win32_libid' 3492ab47cfaaSmrg ;; 3493ab47cfaaSmrg 3494ab47cfaaSmrgmingw* | pw32*) 3495ab47cfaaSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 34968697ee19Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 34978697ee19Smrg # unless we find 'file', for example because we are cross-compiling. 3498300bf1aeSmrg if ( file / ) >/dev/null 2>&1; then 34998697ee19Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35008697ee19Smrg lt_cv_file_magic_cmd='func_win32_libid' 35018697ee19Smrg else 35026aec45a7Smrg # Keep this pattern in sync with the one in func_win32_libid. 35036aec45a7Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 35048697ee19Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35058697ee19Smrg fi 3506ab47cfaaSmrg ;; 3507ab47cfaaSmrg 35086aec45a7Smrgcegcc*) 35096aec45a7Smrg # use the weaker test based on 'objdump'. See mingw*. 35106aec45a7Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35116aec45a7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35126aec45a7Smrg ;; 35136aec45a7Smrg 3514ab47cfaaSmrgdarwin* | rhapsody*) 3515ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3516ab47cfaaSmrg ;; 3517ab47cfaaSmrg 3518ab47cfaaSmrgfreebsd* | dragonfly*) 35196aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3520ab47cfaaSmrg case $host_cpu in 3521ab47cfaaSmrg i*86 ) 3522ab47cfaaSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3523ab47cfaaSmrg # Let's accept both of them until this is cleared up. 3524ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3525ab47cfaaSmrg lt_cv_file_magic_cmd=/usr/bin/file 3526ab47cfaaSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3527ab47cfaaSmrg ;; 3528ab47cfaaSmrg esac 3529ab47cfaaSmrg else 3530ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3531ab47cfaaSmrg fi 3532ab47cfaaSmrg ;; 3533ab47cfaaSmrg 35346aec45a7Smrghaiku*) 35356aec45a7Smrg lt_cv_deplibs_check_method=pass_all 35366aec45a7Smrg ;; 35376aec45a7Smrg 3538ab47cfaaSmrghpux10.20* | hpux11*) 3539ab47cfaaSmrg lt_cv_file_magic_cmd=/usr/bin/file 3540ab47cfaaSmrg case $host_cpu in 3541ab47cfaaSmrg ia64*) 3542ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3543ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3544ab47cfaaSmrg ;; 3545ab47cfaaSmrg hppa*64*) 35466aec45a7Smrg [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]'] 3547ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3548ab47cfaaSmrg ;; 3549ab47cfaaSmrg *) 35506aec45a7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3551ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3552ab47cfaaSmrg ;; 3553ab47cfaaSmrg esac 3554ab47cfaaSmrg ;; 3555ab47cfaaSmrg 35568697ee19Smrginterix[[3-9]]*) 3557ab47cfaaSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3558ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3559ab47cfaaSmrg ;; 3560ab47cfaaSmrg 3561ab47cfaaSmrgirix5* | irix6* | nonstopux*) 3562ab47cfaaSmrg case $LD in 3563ab47cfaaSmrg *-32|*"-32 ") libmagic=32-bit;; 3564ab47cfaaSmrg *-n32|*"-n32 ") libmagic=N32;; 3565ab47cfaaSmrg *-64|*"-64 ") libmagic=64-bit;; 3566ab47cfaaSmrg *) libmagic=never-match;; 3567ab47cfaaSmrg esac 3568ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3569ab47cfaaSmrg ;; 3570ab47cfaaSmrg 3571aa9e3350Smrg# This must be glibc/ELF. 357238770048Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3573ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3574ab47cfaaSmrg ;; 3575ab47cfaaSmrg 3576300bf1aeSmrgnetbsd*) 35776aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3578ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3579ab47cfaaSmrg else 3580ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3581ab47cfaaSmrg fi 3582ab47cfaaSmrg ;; 3583ab47cfaaSmrg 3584ab47cfaaSmrgnewos6*) 3585ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3586ab47cfaaSmrg lt_cv_file_magic_cmd=/usr/bin/file 3587ab47cfaaSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3588ab47cfaaSmrg ;; 3589ab47cfaaSmrg 35906aec45a7Smrg*nto* | *qnx*) 35916aec45a7Smrg lt_cv_deplibs_check_method=pass_all 3592ab47cfaaSmrg ;; 3593ab47cfaaSmrg 3594300bf1aeSmrgopenbsd* | bitrig*) 3595300bf1aeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3596ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3597ab47cfaaSmrg else 3598ab47cfaaSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3599ab47cfaaSmrg fi 3600ab47cfaaSmrg ;; 3601ab47cfaaSmrg 3602ab47cfaaSmrgosf3* | osf4* | osf5*) 3603ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3604ab47cfaaSmrg ;; 3605ab47cfaaSmrg 36068697ee19Smrgrdos*) 36078697ee19Smrg lt_cv_deplibs_check_method=pass_all 36088697ee19Smrg ;; 36098697ee19Smrg 3610ab47cfaaSmrgsolaris*) 3611ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3612ab47cfaaSmrg ;; 3613ab47cfaaSmrg 36146aec45a7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36156aec45a7Smrg lt_cv_deplibs_check_method=pass_all 36166aec45a7Smrg ;; 36176aec45a7Smrg 3618ab47cfaaSmrgsysv4 | sysv4.3*) 3619ab47cfaaSmrg case $host_vendor in 3620ab47cfaaSmrg motorola) 3621ab47cfaaSmrg 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]]' 3622ab47cfaaSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3623ab47cfaaSmrg ;; 3624ab47cfaaSmrg ncr) 3625ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3626ab47cfaaSmrg ;; 3627ab47cfaaSmrg sequent) 3628ab47cfaaSmrg lt_cv_file_magic_cmd='/bin/file' 3629ab47cfaaSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3630ab47cfaaSmrg ;; 3631ab47cfaaSmrg sni) 3632ab47cfaaSmrg lt_cv_file_magic_cmd='/bin/file' 3633ab47cfaaSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3634ab47cfaaSmrg lt_cv_file_magic_test_file=/lib/libc.so 3635ab47cfaaSmrg ;; 3636ab47cfaaSmrg siemens) 3637ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3638ab47cfaaSmrg ;; 3639ab47cfaaSmrg pc) 3640ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3641ab47cfaaSmrg ;; 3642ab47cfaaSmrg esac 3643ab47cfaaSmrg ;; 3644ab47cfaaSmrg 36456aec45a7Smrgtpf*) 3646ab47cfaaSmrg lt_cv_deplibs_check_method=pass_all 3647ab47cfaaSmrg ;; 3648300bf1aeSmrgos2*) 3649300bf1aeSmrg lt_cv_deplibs_check_method=pass_all 3650300bf1aeSmrg ;; 3651ab47cfaaSmrgesac 3652ab47cfaaSmrg]) 3653aa9e3350Smrg 3654aa9e3350Smrgfile_magic_glob= 3655aa9e3350Smrgwant_nocaseglob=no 3656aa9e3350Smrgif test "$build" = "$host"; then 3657aa9e3350Smrg case $host_os in 3658aa9e3350Smrg mingw* | pw32*) 3659aa9e3350Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3660aa9e3350Smrg want_nocaseglob=yes 3661aa9e3350Smrg else 3662aa9e3350Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3663aa9e3350Smrg fi 3664aa9e3350Smrg ;; 3665aa9e3350Smrg esac 3666aa9e3350Smrgfi 3667aa9e3350Smrg 3668ab47cfaaSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3669ab47cfaaSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3670ab47cfaaSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 36716aec45a7Smrg 36726aec45a7Smrg_LT_DECL([], [deplibs_check_method], [1], 36736aec45a7Smrg [Method to check whether dependent libraries are shared objects]) 36746aec45a7Smrg_LT_DECL([], [file_magic_cmd], [1], 3675aa9e3350Smrg [Command to use when deplibs_check_method = "file_magic"]) 3676aa9e3350Smrg_LT_DECL([], [file_magic_glob], [1], 3677aa9e3350Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 3678aa9e3350Smrg_LT_DECL([], [want_nocaseglob], [1], 3679aa9e3350Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36806aec45a7Smrg])# _LT_CHECK_MAGIC_METHOD 3681ab47cfaaSmrg 3682ab47cfaaSmrg 36836aec45a7Smrg# LT_PATH_NM 3684ab47cfaaSmrg# ---------- 36856aec45a7Smrg# find the pathname to a BSD- or MS-compatible name lister 36866aec45a7SmrgAC_DEFUN([LT_PATH_NM], 36876aec45a7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 36886aec45a7SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3689ab47cfaaSmrg[if test -n "$NM"; then 3690ab47cfaaSmrg # Let the user override the test. 3691300bf1aeSmrg lt_cv_path_NM=$NM 3692ab47cfaaSmrgelse 3693300bf1aeSmrg lt_nm_to_check=${ac_tool_prefix}nm 36948697ee19Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3695ab47cfaaSmrg lt_nm_to_check="$lt_nm_to_check nm" 3696ab47cfaaSmrg fi 3697ab47cfaaSmrg for lt_tmp_nm in $lt_nm_to_check; do 3698300bf1aeSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3699ab47cfaaSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3700300bf1aeSmrg IFS=$lt_save_ifs 3701ab47cfaaSmrg test -z "$ac_dir" && ac_dir=. 3702300bf1aeSmrg tmp_nm=$ac_dir/$lt_tmp_nm 3703300bf1aeSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3704ab47cfaaSmrg # Check to see if the nm accepts a BSD-compat flag. 3705300bf1aeSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3706ab47cfaaSmrg # nm: unknown option "B" ignored 3707ab47cfaaSmrg # Tru64's nm complains that /dev/null is an invalid object file 3708300bf1aeSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3709300bf1aeSmrg case $build_os in 3710300bf1aeSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3711300bf1aeSmrg *) lt_bad_file=/dev/null ;; 3712300bf1aeSmrg esac 3713300bf1aeSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3714300bf1aeSmrg *$lt_bad_file* | *'Invalid file or object type'*) 3715ab47cfaaSmrg lt_cv_path_NM="$tmp_nm -B" 3716300bf1aeSmrg break 2 3717ab47cfaaSmrg ;; 3718ab47cfaaSmrg *) 3719ab47cfaaSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3720ab47cfaaSmrg */dev/null*) 3721ab47cfaaSmrg lt_cv_path_NM="$tmp_nm -p" 3722300bf1aeSmrg break 2 3723ab47cfaaSmrg ;; 3724ab47cfaaSmrg *) 3725ab47cfaaSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3726ab47cfaaSmrg continue # so that we can try to find one that supports BSD flags 3727ab47cfaaSmrg ;; 3728ab47cfaaSmrg esac 3729ab47cfaaSmrg ;; 3730ab47cfaaSmrg esac 3731ab47cfaaSmrg fi 3732ab47cfaaSmrg done 3733300bf1aeSmrg IFS=$lt_save_ifs 3734ab47cfaaSmrg done 37356aec45a7Smrg : ${lt_cv_path_NM=no} 3736ab47cfaaSmrgfi]) 3737300bf1aeSmrgif test no != "$lt_cv_path_NM"; then 3738300bf1aeSmrg NM=$lt_cv_path_NM 37396aec45a7Smrgelse 37406aec45a7Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 37416aec45a7Smrg if test -n "$DUMPBIN"; then : 37426aec45a7Smrg # Let the user override the test. 37436aec45a7Smrg else 37446aec45a7Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3745300bf1aeSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 37466aec45a7Smrg *COFF*) 3747300bf1aeSmrg DUMPBIN="$DUMPBIN -symbols -headers" 37486aec45a7Smrg ;; 37496aec45a7Smrg *) 37506aec45a7Smrg DUMPBIN=: 37516aec45a7Smrg ;; 37526aec45a7Smrg esac 37536aec45a7Smrg fi 37546aec45a7Smrg AC_SUBST([DUMPBIN]) 3755300bf1aeSmrg if test : != "$DUMPBIN"; then 3756300bf1aeSmrg NM=$DUMPBIN 37576aec45a7Smrg fi 37586aec45a7Smrgfi 37596aec45a7Smrgtest -z "$NM" && NM=nm 37606aec45a7SmrgAC_SUBST([NM]) 37616aec45a7Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 37626aec45a7Smrg 37636aec45a7SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37646aec45a7Smrg [lt_cv_nm_interface="BSD nm" 37656aec45a7Smrg echo "int some_variable = 0;" > conftest.$ac_ext 37666aec45a7Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37676aec45a7Smrg (eval "$ac_compile" 2>conftest.err) 37686aec45a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37696aec45a7Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37706aec45a7Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37716aec45a7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 37726aec45a7Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37736aec45a7Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 37746aec45a7Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37756aec45a7Smrg lt_cv_nm_interface="MS dumpbin" 37766aec45a7Smrg fi 37776aec45a7Smrg rm -f conftest*]) 37786aec45a7Smrg])# LT_PATH_NM 3779ab47cfaaSmrg 37806aec45a7Smrg# Old names: 37816aec45a7SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37826aec45a7SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37836aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 37846aec45a7Smrgdnl AC_DEFUN([AM_PROG_NM], []) 37856aec45a7Smrgdnl AC_DEFUN([AC_PROG_NM], []) 37861473d951Smrg 3787aa9e3350Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3788aa9e3350Smrg# -------------------------------- 3789aa9e3350Smrg# how to determine the name of the shared library 3790aa9e3350Smrg# associated with a specific link library. 3791aa9e3350Smrg# -- PORTME fill in with the dynamic library characteristics 3792aa9e3350Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3793aa9e3350Smrg[m4_require([_LT_DECL_EGREP]) 3794aa9e3350Smrgm4_require([_LT_DECL_OBJDUMP]) 3795aa9e3350Smrgm4_require([_LT_DECL_DLLTOOL]) 3796aa9e3350SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3797aa9e3350Smrglt_cv_sharedlib_from_linklib_cmd, 3798aa9e3350Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3799aa9e3350Smrg 3800aa9e3350Smrgcase $host_os in 3801aa9e3350Smrgcygwin* | mingw* | pw32* | cegcc*) 3802300bf1aeSmrg # two different shell functions defined in ltmain.sh; 3803300bf1aeSmrg # decide which one to use based on capabilities of $DLLTOOL 3804aa9e3350Smrg case `$DLLTOOL --help 2>&1` in 3805aa9e3350Smrg *--identify-strict*) 3806aa9e3350Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3807aa9e3350Smrg ;; 3808aa9e3350Smrg *) 3809aa9e3350Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3810aa9e3350Smrg ;; 3811aa9e3350Smrg esac 3812aa9e3350Smrg ;; 3813aa9e3350Smrg*) 3814aa9e3350Smrg # fallback: assume linklib IS sharedlib 3815300bf1aeSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 3816aa9e3350Smrg ;; 3817aa9e3350Smrgesac 3818aa9e3350Smrg]) 3819aa9e3350Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3820aa9e3350Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3821aa9e3350Smrg 3822aa9e3350Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3823aa9e3350Smrg [Command to associate shared and link libraries]) 3824aa9e3350Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3825aa9e3350Smrg 3826aa9e3350Smrg 3827aa9e3350Smrg# _LT_PATH_MANIFEST_TOOL 3828aa9e3350Smrg# ---------------------- 3829aa9e3350Smrg# locate the manifest tool 3830aa9e3350Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3831aa9e3350Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3832aa9e3350Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3833aa9e3350SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3834aa9e3350Smrg [lt_cv_path_mainfest_tool=no 3835aa9e3350Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3836aa9e3350Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3837aa9e3350Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3838aa9e3350Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3839aa9e3350Smrg lt_cv_path_mainfest_tool=yes 3840aa9e3350Smrg fi 3841aa9e3350Smrg rm -f conftest*]) 3842300bf1aeSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 3843aa9e3350Smrg MANIFEST_TOOL=: 3844aa9e3350Smrgfi 3845aa9e3350Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3846aa9e3350Smrg])# _LT_PATH_MANIFEST_TOOL 3847aa9e3350Smrg 38486aec45a7Smrg 3849300bf1aeSmrg# _LT_DLL_DEF_P([FILE]) 3850300bf1aeSmrg# --------------------- 3851300bf1aeSmrg# True iff FILE is a Windows DLL '.def' file. 3852300bf1aeSmrg# Keep in sync with func_dll_def_p in the libtool script 3853300bf1aeSmrgAC_DEFUN([_LT_DLL_DEF_P], 3854300bf1aeSmrg[dnl 3855300bf1aeSmrg test DEF = "`$SED -n dnl 3856300bf1aeSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3857300bf1aeSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3858300bf1aeSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3859300bf1aeSmrg -e q dnl Only consider the first "real" line 3860300bf1aeSmrg $1`" dnl 3861300bf1aeSmrg])# _LT_DLL_DEF_P 3862300bf1aeSmrg 3863300bf1aeSmrg 38646aec45a7Smrg# LT_LIB_M 38656aec45a7Smrg# -------- 3866ab47cfaaSmrg# check for math library 38676aec45a7SmrgAC_DEFUN([LT_LIB_M], 3868ab47cfaaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3869ab47cfaaSmrgLIBM= 3870ab47cfaaSmrgcase $host in 38716aec45a7Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3872ab47cfaaSmrg # These system don't have libm, or don't need it 3873ab47cfaaSmrg ;; 3874ab47cfaaSmrg*-ncr-sysv4.3*) 3875300bf1aeSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3876ab47cfaaSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3877ab47cfaaSmrg ;; 3878ab47cfaaSmrg*) 3879300bf1aeSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 3880ab47cfaaSmrg ;; 3881ab47cfaaSmrgesac 38826aec45a7SmrgAC_SUBST([LIBM]) 38836aec45a7Smrg])# LT_LIB_M 3884ab47cfaaSmrg 38856aec45a7Smrg# Old name: 38866aec45a7SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38876aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 38886aec45a7Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3889ab47cfaaSmrg 3890ab47cfaaSmrg 38916aec45a7Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 38926aec45a7Smrg# ------------------------------- 38936aec45a7Smrgm4_defun([_LT_COMPILER_NO_RTTI], 38946aec45a7Smrg[m4_require([_LT_TAG_COMPILER])dnl 3895ab47cfaaSmrg 38966aec45a7Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3897ab47cfaaSmrg 3898300bf1aeSmrgif test yes = "$GCC"; then 38996aec45a7Smrg case $cc_basename in 39006aec45a7Smrg nvcc*) 39016aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 39026aec45a7Smrg *) 39036aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 39046aec45a7Smrg esac 3905ab47cfaaSmrg 39066aec45a7Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 39076aec45a7Smrg lt_cv_prog_compiler_rtti_exceptions, 39086aec45a7Smrg [-fno-rtti -fno-exceptions], [], 39096aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39105c42550eSmrgfi 39116aec45a7Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39126aec45a7Smrg [Compiler flag to turn off builtin functions]) 39136aec45a7Smrg])# _LT_COMPILER_NO_RTTI 3914ab47cfaaSmrg 3915ab47cfaaSmrg 39166aec45a7Smrg# _LT_CMD_GLOBAL_SYMBOLS 39176aec45a7Smrg# ---------------------- 39186aec45a7Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39196aec45a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39206aec45a7SmrgAC_REQUIRE([AC_PROG_CC])dnl 39216aec45a7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 39226aec45a7SmrgAC_REQUIRE([LT_PATH_NM])dnl 39236aec45a7SmrgAC_REQUIRE([LT_PATH_LD])dnl 39246aec45a7Smrgm4_require([_LT_DECL_SED])dnl 39256aec45a7Smrgm4_require([_LT_DECL_EGREP])dnl 39266aec45a7Smrgm4_require([_LT_TAG_COMPILER])dnl 39275c42550eSmrg 39286aec45a7Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39296aec45a7SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39306aec45a7SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39316aec45a7Smrg[ 39326aec45a7Smrg# These are sane defaults that work on at least a few old systems. 39336aec45a7Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 39345c42550eSmrg 39356aec45a7Smrg# Character class describing NM global symbol codes. 39366aec45a7Smrgsymcode='[[BCDEGRST]]' 39375c42550eSmrg 39386aec45a7Smrg# Regexp to match symbols that can be accessed directly from C. 39396aec45a7Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 39405c42550eSmrg 39416aec45a7Smrg# Define system-specific variables. 39425c42550eSmrgcase $host_os in 39436aec45a7Smrgaix*) 39446aec45a7Smrg symcode='[[BCDT]]' 39455c42550eSmrg ;; 39466aec45a7Smrgcygwin* | mingw* | pw32* | cegcc*) 39476aec45a7Smrg symcode='[[ABCDGISTW]]' 39486aec45a7Smrg ;; 39496aec45a7Smrghpux*) 3950300bf1aeSmrg if test ia64 = "$host_cpu"; then 39516aec45a7Smrg symcode='[[ABCDEGRST]]' 39525c42550eSmrg fi 39536aec45a7Smrg ;; 39546aec45a7Smrgirix* | nonstopux*) 39556aec45a7Smrg symcode='[[BCDEGRST]]' 39566aec45a7Smrg ;; 39576aec45a7Smrgosf*) 39586aec45a7Smrg symcode='[[BCDEGQRST]]' 39596aec45a7Smrg ;; 39606aec45a7Smrgsolaris*) 39616aec45a7Smrg symcode='[[BDRT]]' 39626aec45a7Smrg ;; 39636aec45a7Smrgsco3.2v5*) 39646aec45a7Smrg symcode='[[DT]]' 39656aec45a7Smrg ;; 39666aec45a7Smrgsysv4.2uw2*) 39676aec45a7Smrg symcode='[[DT]]' 39686aec45a7Smrg ;; 39696aec45a7Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39706aec45a7Smrg symcode='[[ABDT]]' 39716aec45a7Smrg ;; 39726aec45a7Smrgsysv4) 39736aec45a7Smrg symcode='[[DFNSTU]]' 39746aec45a7Smrg ;; 39755c42550eSmrgesac 3976ab47cfaaSmrg 39776aec45a7Smrg# If we're using GNU nm, then use its standard symbol codes. 39786aec45a7Smrgcase `$NM -V 2>&1` in 39796aec45a7Smrg*GNU* | *'with BFD'*) 39806aec45a7Smrg symcode='[[ABCDGIRSTW]]' ;; 39816aec45a7Smrgesac 3982ab47cfaaSmrg 3983300bf1aeSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3984300bf1aeSmrg # Gets list of data symbols to import. 3985300bf1aeSmrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3986300bf1aeSmrg # Adjust the below global symbol transforms to fixup imported variables. 3987300bf1aeSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3988300bf1aeSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3989300bf1aeSmrg lt_c_name_lib_hook="\ 3990300bf1aeSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3991300bf1aeSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3992300bf1aeSmrgelse 3993300bf1aeSmrg # Disable hooks by default. 3994300bf1aeSmrg lt_cv_sys_global_symbol_to_import= 3995300bf1aeSmrg lt_cdecl_hook= 3996300bf1aeSmrg lt_c_name_hook= 3997300bf1aeSmrg lt_c_name_lib_hook= 3998300bf1aeSmrgfi 3999300bf1aeSmrg 40006aec45a7Smrg# Transform an extracted symbol line into a proper C declaration. 40016aec45a7Smrg# Some systems (esp. on ia64) link data and code symbols differently, 40026aec45a7Smrg# so use this general approach. 4003300bf1aeSmrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 4004300bf1aeSmrg$lt_cdecl_hook\ 4005300bf1aeSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4006300bf1aeSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4007ab47cfaaSmrg 40086aec45a7Smrg# Transform an extracted symbol line into symbol name and symbol address 4009300bf1aeSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4010300bf1aeSmrg$lt_c_name_hook\ 4011300bf1aeSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4012300bf1aeSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4013300bf1aeSmrg 4014300bf1aeSmrg# Transform an extracted symbol line into symbol name with lib prefix and 4015300bf1aeSmrg# symbol address. 4016300bf1aeSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4017300bf1aeSmrg$lt_c_name_lib_hook\ 4018300bf1aeSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4019300bf1aeSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4020300bf1aeSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4021ab47cfaaSmrg 40226aec45a7Smrg# Handle CRLF in mingw tool chain 40236aec45a7Smrgopt_cr= 40246aec45a7Smrgcase $build_os in 40256aec45a7Smrgmingw*) 40266aec45a7Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40276aec45a7Smrg ;; 40286aec45a7Smrgesac 40295c42550eSmrg 40306aec45a7Smrg# Try without a prefix underscore, then with it. 40316aec45a7Smrgfor ac_symprfx in "" "_"; do 40325c42550eSmrg 40336aec45a7Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40346aec45a7Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40355c42550eSmrg 40366aec45a7Smrg # Write the raw and C identifiers. 40376aec45a7Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4038300bf1aeSmrg # Fake it for dumpbin and say T for any non-static function, 4039300bf1aeSmrg # D for any global variable and I for any imported variable. 40406aec45a7Smrg # Also find C++ and __fastcall symbols from MSVC++, 40416aec45a7Smrg # which start with @ or ?. 40426aec45a7Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40436aec45a7Smrg" {last_section=section; section=\$ 3};"\ 4044aa9e3350Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40456aec45a7Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4046300bf1aeSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4047300bf1aeSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4048300bf1aeSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40496aec45a7Smrg" \$ 0!~/External *\|/{next};"\ 40506aec45a7Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40516aec45a7Smrg" {if(hide[section]) next};"\ 4052300bf1aeSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4053300bf1aeSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4054300bf1aeSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4055300bf1aeSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40566aec45a7Smrg" ' prfx=^$ac_symprfx]" 40576aec45a7Smrg else 40586aec45a7Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40596aec45a7Smrg fi 4060aa9e3350Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 40615c42550eSmrg 40626aec45a7Smrg # Check to see that the pipe works correctly. 40636aec45a7Smrg pipe_works=no 40645c42550eSmrg 40656aec45a7Smrg rm -f conftest* 40666aec45a7Smrg cat > conftest.$ac_ext <<_LT_EOF 40676aec45a7Smrg#ifdef __cplusplus 40686aec45a7Smrgextern "C" { 40696aec45a7Smrg#endif 40706aec45a7Smrgchar nm_test_var; 40716aec45a7Smrgvoid nm_test_func(void); 40726aec45a7Smrgvoid nm_test_func(void){} 40736aec45a7Smrg#ifdef __cplusplus 40746aec45a7Smrg} 40756aec45a7Smrg#endif 40766aec45a7Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 40776aec45a7Smrg_LT_EOF 40785c42550eSmrg 40796aec45a7Smrg if AC_TRY_EVAL(ac_compile); then 40806aec45a7Smrg # Now try to grab the symbols. 40816aec45a7Smrg nlist=conftest.nm 40826aec45a7Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40836aec45a7Smrg # Try sorting and uniquifying the output. 40846aec45a7Smrg if sort "$nlist" | uniq > "$nlist"T; then 40856aec45a7Smrg mv -f "$nlist"T "$nlist" 40866aec45a7Smrg else 40876aec45a7Smrg rm -f "$nlist"T 40886aec45a7Smrg fi 40895c42550eSmrg 40906aec45a7Smrg # Make sure that we snagged all the symbols we need. 40916aec45a7Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40926aec45a7Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40936aec45a7Smrg cat <<_LT_EOF > conftest.$ac_ext 4094aa9e3350Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4095300bf1aeSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4096300bf1aeSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4097aa9e3350Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4098aa9e3350Smrg# define LT@&t@_DLSYM_CONST 4099300bf1aeSmrg#elif defined __osf__ 4100aa9e3350Smrg/* This system does not cope well with relocations in const data. */ 4101aa9e3350Smrg# define LT@&t@_DLSYM_CONST 4102aa9e3350Smrg#else 4103aa9e3350Smrg# define LT@&t@_DLSYM_CONST const 4104aa9e3350Smrg#endif 4105aa9e3350Smrg 41066aec45a7Smrg#ifdef __cplusplus 41076aec45a7Smrgextern "C" { 41086aec45a7Smrg#endif 41095c42550eSmrg 41106aec45a7Smrg_LT_EOF 41116aec45a7Smrg # Now generate the symbol file. 41126aec45a7Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 41135c42550eSmrg 41146aec45a7Smrg cat <<_LT_EOF >> conftest.$ac_ext 41155c42550eSmrg 41166aec45a7Smrg/* The mapping between symbol names and symbols. */ 4117aa9e3350SmrgLT@&t@_DLSYM_CONST struct { 41186aec45a7Smrg const char *name; 41196aec45a7Smrg void *address; 41206aec45a7Smrg} 41216aec45a7Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41226aec45a7Smrg{ 41236aec45a7Smrg { "@PROGRAM@", (void *) 0 }, 41246aec45a7Smrg_LT_EOF 4125300bf1aeSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41266aec45a7Smrg cat <<\_LT_EOF >> conftest.$ac_ext 41276aec45a7Smrg {0, (void *) 0} 41286aec45a7Smrg}; 41295c42550eSmrg 41306aec45a7Smrg/* This works around a problem in FreeBSD linker */ 41316aec45a7Smrg#ifdef FREEBSD_WORKAROUND 41326aec45a7Smrgstatic const void *lt_preloaded_setup() { 41336aec45a7Smrg return lt__PROGRAM__LTX_preloaded_symbols; 41346aec45a7Smrg} 41356aec45a7Smrg#endif 41365c42550eSmrg 41376aec45a7Smrg#ifdef __cplusplus 41386aec45a7Smrg} 41396aec45a7Smrg#endif 41406aec45a7Smrg_LT_EOF 41416aec45a7Smrg # Now try linking the two files. 41426aec45a7Smrg mv conftest.$ac_objext conftstm.$ac_objext 4143aa9e3350Smrg lt_globsym_save_LIBS=$LIBS 4144aa9e3350Smrg lt_globsym_save_CFLAGS=$CFLAGS 4145300bf1aeSmrg LIBS=conftstm.$ac_objext 41466aec45a7Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4147300bf1aeSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41486aec45a7Smrg pipe_works=yes 41496aec45a7Smrg fi 4150aa9e3350Smrg LIBS=$lt_globsym_save_LIBS 4151aa9e3350Smrg CFLAGS=$lt_globsym_save_CFLAGS 41526aec45a7Smrg else 41536aec45a7Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 41546aec45a7Smrg fi 41556aec45a7Smrg else 41566aec45a7Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41576aec45a7Smrg fi 4158ab47cfaaSmrg else 41596aec45a7Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4160ab47cfaaSmrg fi 4161ab47cfaaSmrg else 41626aec45a7Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41636aec45a7Smrg cat conftest.$ac_ext >&5 4164ab47cfaaSmrg fi 41656aec45a7Smrg rm -rf conftest* conftst* 4166ab47cfaaSmrg 41676aec45a7Smrg # Do not use the global_symbol_pipe unless it works. 4168300bf1aeSmrg if test yes = "$pipe_works"; then 41696aec45a7Smrg break 41706aec45a7Smrg else 41716aec45a7Smrg lt_cv_sys_global_symbol_pipe= 41726aec45a7Smrg fi 41736aec45a7Smrgdone 41746aec45a7Smrg]) 41756aec45a7Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41766aec45a7Smrg lt_cv_sys_global_symbol_to_cdecl= 41776aec45a7Smrgfi 41786aec45a7Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41796aec45a7Smrg AC_MSG_RESULT(failed) 4180ab47cfaaSmrgelse 41816aec45a7Smrg AC_MSG_RESULT(ok) 4182ab47cfaaSmrgfi 4183ab47cfaaSmrg 4184aa9e3350Smrg# Response file support. 4185aa9e3350Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4186aa9e3350Smrg nm_file_list_spec='@' 4187aa9e3350Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4188aa9e3350Smrg nm_file_list_spec='@' 4189aa9e3350Smrgfi 4190aa9e3350Smrg 41916aec45a7Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41926aec45a7Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 41936aec45a7Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 41946aec45a7Smrg [Transform the output of nm in a proper C declaration]) 4195300bf1aeSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4196300bf1aeSmrg [Transform the output of nm into a list of symbols to manually relocate]) 41976aec45a7Smrg_LT_DECL([global_symbol_to_c_name_address], 41986aec45a7Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 41996aec45a7Smrg [Transform the output of nm in a C name address pair]) 42006aec45a7Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 42016aec45a7Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 42026aec45a7Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4203300bf1aeSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4204300bf1aeSmrg [The name lister interface]) 4205aa9e3350Smrg_LT_DECL([], [nm_file_list_spec], [1], 4206aa9e3350Smrg [Specify filename containing input files for $NM]) 42076aec45a7Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4208ab47cfaaSmrg 4209ab47cfaaSmrg 42106aec45a7Smrg# _LT_COMPILER_PIC([TAGNAME]) 42116aec45a7Smrg# --------------------------- 42126aec45a7Smrgm4_defun([_LT_COMPILER_PIC], 42136aec45a7Smrg[m4_require([_LT_TAG_COMPILER])dnl 42146aec45a7Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42156aec45a7Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42166aec45a7Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4217ab47cfaaSmrg 42186aec45a7Smrgm4_if([$1], [CXX], [ 42196aec45a7Smrg # C++ specific cases for pic, static, wl, etc. 4220300bf1aeSmrg if test yes = "$GXX"; then 42216aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42226aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 42235c42550eSmrg 42246aec45a7Smrg case $host_os in 42256aec45a7Smrg aix*) 42266aec45a7Smrg # All AIX code is PIC. 4227300bf1aeSmrg if test ia64 = "$host_cpu"; then 42286aec45a7Smrg # AIX 5 now supports IA64 processor 42296aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42305c42550eSmrg fi 4231300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42326aec45a7Smrg ;; 42335c42550eSmrg 42346aec45a7Smrg amigaos*) 42356aec45a7Smrg case $host_cpu in 42366aec45a7Smrg powerpc) 42376aec45a7Smrg # see comment about AmigaOS4 .so support 42386aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42395c42550eSmrg ;; 42406aec45a7Smrg m68k) 42416aec45a7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4242300bf1aeSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4243300bf1aeSmrg # like '-m68040'. 42446aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42456aec45a7Smrg ;; 42466aec45a7Smrg esac 42476aec45a7Smrg ;; 42485c42550eSmrg 42496aec45a7Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42506aec45a7Smrg # PIC is the default for these OSes. 42515c42550eSmrg ;; 42526aec45a7Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42536aec45a7Smrg # This hack is so that the source file can tell whether it is being 42546aec45a7Smrg # built for inclusion in a dll (and should export symbols for example). 42556aec45a7Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42566aec45a7Smrg # (--disable-auto-import) libraries 42576aec45a7Smrg m4_if([$1], [GCJ], [], 42586aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4259300bf1aeSmrg case $host_os in 4260300bf1aeSmrg os2*) 4261300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4262300bf1aeSmrg ;; 4263300bf1aeSmrg esac 42645c42550eSmrg ;; 42656aec45a7Smrg darwin* | rhapsody*) 42666aec45a7Smrg # PIC is the default on this platform 42676aec45a7Smrg # Common symbols not allowed in MH_DYLIB files 42686aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42696aec45a7Smrg ;; 42706aec45a7Smrg *djgpp*) 42716aec45a7Smrg # DJGPP does not support shared libraries at all 42726aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42736aec45a7Smrg ;; 42746aec45a7Smrg haiku*) 42756aec45a7Smrg # PIC is the default for Haiku. 42766aec45a7Smrg # The "-static" flag exists, but is broken. 42776aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42786aec45a7Smrg ;; 42796aec45a7Smrg interix[[3-9]]*) 42806aec45a7Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42816aec45a7Smrg # Instead, we relocate shared libraries at runtime. 42826aec45a7Smrg ;; 42836aec45a7Smrg sysv4*MP*) 42846aec45a7Smrg if test -d /usr/nec; then 42856aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4286ab47cfaaSmrg fi 4287ab47cfaaSmrg ;; 42886aec45a7Smrg hpux*) 42896aec45a7Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42906aec45a7Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42916aec45a7Smrg # sets the default TLS model and affects inlining. 4292ab47cfaaSmrg case $host_cpu in 42936aec45a7Smrg hppa*64*) 42946aec45a7Smrg ;; 42955c42550eSmrg *) 42966aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42976aec45a7Smrg ;; 4298ab47cfaaSmrg esac 42996aec45a7Smrg ;; 43006aec45a7Smrg *qnx* | *nto*) 43016aec45a7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 43026aec45a7Smrg # it will coredump. 43036aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 43045c42550eSmrg ;; 43055c42550eSmrg *) 43066aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4307ab47cfaaSmrg ;; 43085c42550eSmrg esac 43096aec45a7Smrg else 43106aec45a7Smrg case $host_os in 43116aec45a7Smrg aix[[4-9]]*) 43126aec45a7Smrg # All AIX code is PIC. 4313300bf1aeSmrg if test ia64 = "$host_cpu"; then 43146aec45a7Smrg # AIX 5 now supports IA64 processor 43156aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43166aec45a7Smrg else 43176aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43186aec45a7Smrg fi 4319ab47cfaaSmrg ;; 43206aec45a7Smrg chorus*) 43216aec45a7Smrg case $cc_basename in 43226aec45a7Smrg cxch68*) 43236aec45a7Smrg # Green Hills C++ Compiler 43246aec45a7Smrg # _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" 4325ab47cfaaSmrg ;; 4326ab47cfaaSmrg esac 4327ab47cfaaSmrg ;; 4328aa9e3350Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4329aa9e3350Smrg # This hack is so that the source file can tell whether it is being 4330aa9e3350Smrg # built for inclusion in a dll (and should export symbols for example). 4331aa9e3350Smrg m4_if([$1], [GCJ], [], 4332aa9e3350Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4333aa9e3350Smrg ;; 43346aec45a7Smrg dgux*) 43356aec45a7Smrg case $cc_basename in 43366aec45a7Smrg ec++*) 43376aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43386aec45a7Smrg ;; 43396aec45a7Smrg ghcx*) 43406aec45a7Smrg # Green Hills C++ Compiler 43416aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43426aec45a7Smrg ;; 43436aec45a7Smrg *) 43446aec45a7Smrg ;; 43456aec45a7Smrg esac 43466aec45a7Smrg ;; 43476aec45a7Smrg freebsd* | dragonfly*) 43486aec45a7Smrg # FreeBSD uses GNU C++ 43496aec45a7Smrg ;; 43506aec45a7Smrg hpux9* | hpux10* | hpux11*) 43516aec45a7Smrg case $cc_basename in 43526aec45a7Smrg CC*) 43536aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4354300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4355300bf1aeSmrg if test ia64 != "$host_cpu"; then 43566aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43576aec45a7Smrg fi 43586aec45a7Smrg ;; 43596aec45a7Smrg aCC*) 43606aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4361300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4362ab47cfaaSmrg case $host_cpu in 43636aec45a7Smrg hppa*64*|ia64*) 43646aec45a7Smrg # +Z the default 4365ab47cfaaSmrg ;; 4366ab47cfaaSmrg *) 43676aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4368ab47cfaaSmrg ;; 4369ab47cfaaSmrg esac 43706aec45a7Smrg ;; 43716aec45a7Smrg *) 43726aec45a7Smrg ;; 43736aec45a7Smrg esac 4374ab47cfaaSmrg ;; 43756aec45a7Smrg interix*) 43766aec45a7Smrg # This is c89, which is MS Visual C++ (no shared libs) 43776aec45a7Smrg # Anyone wants to do a port? 43785c42550eSmrg ;; 43796aec45a7Smrg irix5* | irix6* | nonstopux*) 43806aec45a7Smrg case $cc_basename in 43816aec45a7Smrg CC*) 43826aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43836aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43846aec45a7Smrg # CC pic flag -KPIC is the default. 43856aec45a7Smrg ;; 43866aec45a7Smrg *) 43876aec45a7Smrg ;; 43886aec45a7Smrg esac 43895c42550eSmrg ;; 439038770048Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43916aec45a7Smrg case $cc_basename in 43926aec45a7Smrg KCC*) 43936aec45a7Smrg # KAI C++ Compiler 43946aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 43956aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43966aec45a7Smrg ;; 43976aec45a7Smrg ecpc* ) 4398300bf1aeSmrg # old Intel C++ for x86_64, which still supported -KPIC. 43996aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44006aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44016aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44026aec45a7Smrg ;; 44036aec45a7Smrg icpc* ) 44046aec45a7Smrg # Intel C++, used to be incompatible with GCC. 44056aec45a7Smrg # ICC 10 doesn't accept -KPIC any more. 44066aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44076aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 44086aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 44096aec45a7Smrg ;; 44106aec45a7Smrg pgCC* | pgcpp*) 44116aec45a7Smrg # Portland Group C++ compiler 44126aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44136aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44146aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44156aec45a7Smrg ;; 44166aec45a7Smrg cxx*) 44176aec45a7Smrg # Compaq C++ 44186aec45a7Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44196aec45a7Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44206aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44216aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44226aec45a7Smrg ;; 44236aec45a7Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44246aec45a7Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44256aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44266aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44276aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44286aec45a7Smrg ;; 44296aec45a7Smrg *) 44306aec45a7Smrg case `$CC -V 2>&1 | sed 5q` in 44316aec45a7Smrg *Sun\ C*) 44326aec45a7Smrg # Sun C++ 5.9 44336aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44346aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44356aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44366aec45a7Smrg ;; 44376aec45a7Smrg esac 44386aec45a7Smrg ;; 44398697ee19Smrg esac 44408697ee19Smrg ;; 44416aec45a7Smrg lynxos*) 44425c42550eSmrg ;; 44436aec45a7Smrg m88k*) 44446aec45a7Smrg ;; 44456aec45a7Smrg mvs*) 44466aec45a7Smrg case $cc_basename in 44476aec45a7Smrg cxx*) 44486aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44496aec45a7Smrg ;; 44506aec45a7Smrg *) 44516aec45a7Smrg ;; 44521473d951Smrg esac 4453ab47cfaaSmrg ;; 4454300bf1aeSmrg netbsd*) 4455ab47cfaaSmrg ;; 44566aec45a7Smrg *qnx* | *nto*) 44576aec45a7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44586aec45a7Smrg # it will coredump. 44596aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44606aec45a7Smrg ;; 44616aec45a7Smrg osf3* | osf4* | osf5*) 44626aec45a7Smrg case $cc_basename in 44636aec45a7Smrg KCC*) 44646aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44656aec45a7Smrg ;; 44666aec45a7Smrg RCC*) 44676aec45a7Smrg # Rational C++ 2.4.1 44686aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44696aec45a7Smrg ;; 44706aec45a7Smrg cxx*) 44716aec45a7Smrg # Digital/Compaq C++ 44726aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44736aec45a7Smrg # Make sure the PIC flag is empty. It appears that all Alpha 44746aec45a7Smrg # Linux and Compaq Tru64 Unix objects are PIC. 44756aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44766aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44776aec45a7Smrg ;; 44786aec45a7Smrg *) 44796aec45a7Smrg ;; 44806aec45a7Smrg esac 4481ab47cfaaSmrg ;; 44826aec45a7Smrg psos*) 44836aec45a7Smrg ;; 44846aec45a7Smrg solaris*) 44856aec45a7Smrg case $cc_basename in 44866aec45a7Smrg CC* | sunCC*) 44876aec45a7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 44886aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44896aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44906aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44916aec45a7Smrg ;; 44926aec45a7Smrg gcx*) 44936aec45a7Smrg # Green Hills C++ Compiler 44946aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44956aec45a7Smrg ;; 44966aec45a7Smrg *) 44976aec45a7Smrg ;; 44986aec45a7Smrg esac 44996aec45a7Smrg ;; 45006aec45a7Smrg sunos4*) 45016aec45a7Smrg case $cc_basename in 45026aec45a7Smrg CC*) 45036aec45a7Smrg # Sun C++ 4.x 45046aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45056aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45066aec45a7Smrg ;; 45076aec45a7Smrg lcc*) 45086aec45a7Smrg # Lucid 45096aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45106aec45a7Smrg ;; 45116aec45a7Smrg *) 45126aec45a7Smrg ;; 45136aec45a7Smrg esac 4514ab47cfaaSmrg ;; 45156aec45a7Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45166aec45a7Smrg case $cc_basename in 45176aec45a7Smrg CC*) 45186aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45196aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45206aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45216aec45a7Smrg ;; 45226aec45a7Smrg esac 45236aec45a7Smrg ;; 45246aec45a7Smrg tandem*) 45256aec45a7Smrg case $cc_basename in 45266aec45a7Smrg NCC*) 45276aec45a7Smrg # NonStop-UX NCC 3.20 45286aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45296aec45a7Smrg ;; 45306aec45a7Smrg *) 45316aec45a7Smrg ;; 45326aec45a7Smrg esac 4533ab47cfaaSmrg ;; 45346aec45a7Smrg vxworks*) 4535ab47cfaaSmrg ;; 45365c42550eSmrg *) 45376aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4538ab47cfaaSmrg ;; 45395c42550eSmrg esac 45406aec45a7Smrg fi 45416aec45a7Smrg], 45426aec45a7Smrg[ 4543300bf1aeSmrg if test yes = "$GCC"; then 45446aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45456aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 45466aec45a7Smrg 45476aec45a7Smrg case $host_os in 45486aec45a7Smrg aix*) 45496aec45a7Smrg # All AIX code is PIC. 4550300bf1aeSmrg if test ia64 = "$host_cpu"; then 45516aec45a7Smrg # AIX 5 now supports IA64 processor 45526aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45536aec45a7Smrg fi 4554300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45556aec45a7Smrg ;; 45565c42550eSmrg 45576aec45a7Smrg amigaos*) 45586aec45a7Smrg case $host_cpu in 45596aec45a7Smrg powerpc) 45606aec45a7Smrg # see comment about AmigaOS4 .so support 45616aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45626aec45a7Smrg ;; 45636aec45a7Smrg m68k) 45646aec45a7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4565300bf1aeSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4566300bf1aeSmrg # like '-m68040'. 45676aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45686aec45a7Smrg ;; 45696aec45a7Smrg esac 45706aec45a7Smrg ;; 45715c42550eSmrg 45726aec45a7Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45736aec45a7Smrg # PIC is the default for these OSes. 45746aec45a7Smrg ;; 45755c42550eSmrg 45766aec45a7Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45776aec45a7Smrg # This hack is so that the source file can tell whether it is being 45786aec45a7Smrg # built for inclusion in a dll (and should export symbols for example). 45796aec45a7Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45806aec45a7Smrg # (--disable-auto-import) libraries 45816aec45a7Smrg m4_if([$1], [GCJ], [], 45826aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4583300bf1aeSmrg case $host_os in 4584300bf1aeSmrg os2*) 4585300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4586300bf1aeSmrg ;; 4587300bf1aeSmrg esac 45886aec45a7Smrg ;; 45895c42550eSmrg 45906aec45a7Smrg darwin* | rhapsody*) 45916aec45a7Smrg # PIC is the default on this platform 45926aec45a7Smrg # Common symbols not allowed in MH_DYLIB files 45936aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 45946aec45a7Smrg ;; 45955c42550eSmrg 45966aec45a7Smrg haiku*) 45976aec45a7Smrg # PIC is the default for Haiku. 45986aec45a7Smrg # The "-static" flag exists, but is broken. 45996aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 46006aec45a7Smrg ;; 46015c42550eSmrg 46026aec45a7Smrg hpux*) 46036aec45a7Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 46046aec45a7Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 46056aec45a7Smrg # sets the default TLS model and affects inlining. 46066aec45a7Smrg case $host_cpu in 46076aec45a7Smrg hppa*64*) 46086aec45a7Smrg # +Z the default 46095c42550eSmrg ;; 46105c42550eSmrg *) 46116aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46125c42550eSmrg ;; 46136aec45a7Smrg esac 46146aec45a7Smrg ;; 46155c42550eSmrg 46166aec45a7Smrg interix[[3-9]]*) 46176aec45a7Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46186aec45a7Smrg # Instead, we relocate shared libraries at runtime. 46196aec45a7Smrg ;; 46205c42550eSmrg 46216aec45a7Smrg msdosdjgpp*) 46226aec45a7Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46236aec45a7Smrg # on systems that don't support them. 46246aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46256aec45a7Smrg enable_shared=no 46266aec45a7Smrg ;; 4627ab47cfaaSmrg 46286aec45a7Smrg *nto* | *qnx*) 46296aec45a7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46306aec45a7Smrg # it will coredump. 46316aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46326aec45a7Smrg ;; 46331473d951Smrg 46346aec45a7Smrg sysv4*MP*) 46356aec45a7Smrg if test -d /usr/nec; then 46366aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46376aec45a7Smrg fi 46386aec45a7Smrg ;; 46391473d951Smrg 46406aec45a7Smrg *) 46416aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46426aec45a7Smrg ;; 46435c42550eSmrg esac 46445c42550eSmrg 46455c42550eSmrg case $cc_basename in 46466aec45a7Smrg nvcc*) # Cuda Compiler Driver 2.2 46476aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4648aa9e3350Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4649aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4650aa9e3350Smrg fi 46516aec45a7Smrg ;; 4652ab47cfaaSmrg esac 46536aec45a7Smrg else 46546aec45a7Smrg # PORTME Check for flag to pass linker flags through the system compiler. 46556aec45a7Smrg case $host_os in 46566aec45a7Smrg aix*) 46576aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4658300bf1aeSmrg if test ia64 = "$host_cpu"; then 46596aec45a7Smrg # AIX 5 now supports IA64 processor 46606aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46616aec45a7Smrg else 46626aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46636aec45a7Smrg fi 46646aec45a7Smrg ;; 46655c42550eSmrg 4666300bf1aeSmrg darwin* | rhapsody*) 4667300bf1aeSmrg # PIC is the default on this platform 4668300bf1aeSmrg # Common symbols not allowed in MH_DYLIB files 4669300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4670300bf1aeSmrg case $cc_basename in 4671300bf1aeSmrg nagfor*) 4672300bf1aeSmrg # NAG Fortran compiler 4673300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4674300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4675300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4676300bf1aeSmrg ;; 4677300bf1aeSmrg esac 4678300bf1aeSmrg ;; 4679300bf1aeSmrg 46806aec45a7Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46816aec45a7Smrg # This hack is so that the source file can tell whether it is being 46826aec45a7Smrg # built for inclusion in a dll (and should export symbols for example). 46836aec45a7Smrg m4_if([$1], [GCJ], [], 46846aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4685300bf1aeSmrg case $host_os in 4686300bf1aeSmrg os2*) 4687300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4688300bf1aeSmrg ;; 4689300bf1aeSmrg esac 46906aec45a7Smrg ;; 46916aec45a7Smrg 46926aec45a7Smrg hpux9* | hpux10* | hpux11*) 46936aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46946aec45a7Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 46956aec45a7Smrg # not for PA HP-UX. 46966aec45a7Smrg case $host_cpu in 46976aec45a7Smrg hppa*64*|ia64*) 46986aec45a7Smrg # +Z the default 4699ab47cfaaSmrg ;; 4700ab47cfaaSmrg *) 47016aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 47021473d951Smrg ;; 47036aec45a7Smrg esac 47046aec45a7Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4705300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 47066aec45a7Smrg ;; 47076aec45a7Smrg 47086aec45a7Smrg irix5* | irix6* | nonstopux*) 47096aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47106aec45a7Smrg # PIC (with -KPIC) is the default. 47116aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47126aec45a7Smrg ;; 47136aec45a7Smrg 471438770048Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47156aec45a7Smrg case $cc_basename in 4716300bf1aeSmrg # old Intel for x86_64, which still supported -KPIC. 47176aec45a7Smrg ecc*) 47186aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47196aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47206aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47216aec45a7Smrg ;; 47226aec45a7Smrg # icc used to be incompatible with GCC. 47236aec45a7Smrg # ICC 10 doesn't accept -KPIC any more. 47246aec45a7Smrg icc* | ifort*) 47256aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47266aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47276aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47286aec45a7Smrg ;; 47296aec45a7Smrg # Lahey Fortran 8.1. 47306aec45a7Smrg lf95*) 47316aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47326aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47336aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47346aec45a7Smrg ;; 4735aa9e3350Smrg nagfor*) 4736aa9e3350Smrg # NAG Fortran compiler 4737aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4738aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4739aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4740aa9e3350Smrg ;; 4741300bf1aeSmrg tcc*) 4742300bf1aeSmrg # Fabrice Bellard et al's Tiny C Compiler 4743300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4744300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4745300bf1aeSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4746300bf1aeSmrg ;; 47476aec45a7Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47486aec45a7Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 47496aec45a7Smrg # which looks to be a dead project) 47506aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47516aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47526aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47536aec45a7Smrg ;; 47546aec45a7Smrg ccc*) 47556aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47566aec45a7Smrg # All Alpha code is PIC. 47576aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47586aec45a7Smrg ;; 47596aec45a7Smrg xl* | bgxl* | bgf* | mpixl*) 47606aec45a7Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47616aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47626aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47636aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4764ab47cfaaSmrg ;; 4765ab47cfaaSmrg *) 47666aec45a7Smrg case `$CC -V 2>&1 | sed 5q` in 4767aa9e3350Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47686aec45a7Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47696aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47706aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47716aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47726aec45a7Smrg ;; 4773aa9e3350Smrg *Sun\ F* | *Sun*Fortran*) 4774aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4775aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4776aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4777aa9e3350Smrg ;; 47786aec45a7Smrg *Sun\ C*) 47796aec45a7Smrg # Sun C 5.9 47806aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47816aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47826aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47836aec45a7Smrg ;; 4784aa9e3350Smrg *Intel*\ [[CF]]*Compiler*) 4785aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4786aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4787aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4788aa9e3350Smrg ;; 4789aa9e3350Smrg *Portland\ Group*) 4790aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4791aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4792aa9e3350Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4793aa9e3350Smrg ;; 47946aec45a7Smrg esac 4795ab47cfaaSmrg ;; 47966aec45a7Smrg esac 47976aec45a7Smrg ;; 4798ab47cfaaSmrg 47996aec45a7Smrg newsos6) 48006aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48016aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48026aec45a7Smrg ;; 4803ab47cfaaSmrg 48046aec45a7Smrg *nto* | *qnx*) 48056aec45a7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 48066aec45a7Smrg # it will coredump. 48076aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 48086aec45a7Smrg ;; 4809ab47cfaaSmrg 48106aec45a7Smrg osf3* | osf4* | osf5*) 48116aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48126aec45a7Smrg # All OSF/1 code is PIC. 48136aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48146aec45a7Smrg ;; 4815ab47cfaaSmrg 48166aec45a7Smrg rdos*) 48176aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48186aec45a7Smrg ;; 4819ab47cfaaSmrg 48206aec45a7Smrg solaris*) 48216aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48226aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48236aec45a7Smrg case $cc_basename in 48246aec45a7Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48256aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48266aec45a7Smrg *) 48276aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48286aec45a7Smrg esac 48296aec45a7Smrg ;; 4830ab47cfaaSmrg 48316aec45a7Smrg sunos4*) 48326aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48336aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48346aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48356aec45a7Smrg ;; 4836ab47cfaaSmrg 48376aec45a7Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 48386aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48396aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48406aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48416aec45a7Smrg ;; 4842ab47cfaaSmrg 48436aec45a7Smrg sysv4*MP*) 4844300bf1aeSmrg if test -d /usr/nec; then 48456aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48466aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48476aec45a7Smrg fi 48486aec45a7Smrg ;; 4849ab47cfaaSmrg 48506aec45a7Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48516aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48526aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48536aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48546aec45a7Smrg ;; 4855ab47cfaaSmrg 48566aec45a7Smrg unicos*) 48576aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48586aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48596aec45a7Smrg ;; 48605c42550eSmrg 48616aec45a7Smrg uts4*) 48626aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48636aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48646aec45a7Smrg ;; 4865ab47cfaaSmrg 48666aec45a7Smrg *) 48676aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48686aec45a7Smrg ;; 4869ab47cfaaSmrg esac 48706aec45a7Smrg fi 48716aec45a7Smrg]) 48726aec45a7Smrgcase $host_os in 4873300bf1aeSmrg # For platforms that do not support PIC, -DPIC is meaningless: 48746aec45a7Smrg *djgpp*) 48756aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48766aec45a7Smrg ;; 48776aec45a7Smrg *) 48786aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48796aec45a7Smrg ;; 48806aec45a7Smrgesac 4881aa9e3350Smrg 4882aa9e3350SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4883aa9e3350Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4884aa9e3350Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4885aa9e3350Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4886ab47cfaaSmrg 48876aec45a7Smrg# 48886aec45a7Smrg# Check to make sure the PIC flag actually works. 48896aec45a7Smrg# 48906aec45a7Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 48916aec45a7Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 48926aec45a7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 48936aec45a7Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 48946aec45a7Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 48956aec45a7Smrg "" | " "*) ;; 48966aec45a7Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 48976aec45a7Smrg esac], 48986aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 48996aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 49001473d951Smrgfi 49016aec45a7Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 49026aec45a7Smrg [Additional compiler flags for building library objects]) 4903ab47cfaaSmrg 4904aa9e3350Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4905aa9e3350Smrg [How to pass a linker flag through the compiler]) 49066aec45a7Smrg# 49076aec45a7Smrg# Check to make sure the static flag actually works. 49086aec45a7Smrg# 49096aec45a7Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49106aec45a7Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49116aec45a7Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49126aec45a7Smrg $lt_tmp_static_flag, 49136aec45a7Smrg [], 49146aec45a7Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49156aec45a7Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49166aec45a7Smrg [Compiler flag to prevent dynamic linking]) 49176aec45a7Smrg])# _LT_COMPILER_PIC 4918ab47cfaaSmrg 49195c42550eSmrg 49206aec45a7Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 49216aec45a7Smrg# ---------------------------- 49226aec45a7Smrg# See if the linker supports building shared libraries. 49236aec45a7Smrgm4_defun([_LT_LINKER_SHLIBS], 49246aec45a7Smrg[AC_REQUIRE([LT_PATH_LD])dnl 49256aec45a7SmrgAC_REQUIRE([LT_PATH_NM])dnl 4926aa9e3350Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49276aec45a7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49286aec45a7Smrgm4_require([_LT_DECL_EGREP])dnl 49296aec45a7Smrgm4_require([_LT_DECL_SED])dnl 49306aec45a7Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49316aec45a7Smrgm4_require([_LT_TAG_COMPILER])dnl 49326aec45a7SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49336aec45a7Smrgm4_if([$1], [CXX], [ 49346aec45a7Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4935aa9e3350Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49366aec45a7Smrg case $host_os in 49376aec45a7Smrg aix[[4-9]]*) 49386aec45a7Smrg # If we're using GNU nm, then we don't want the "-C" option. 4939300bf1aeSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4940300bf1aeSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4941300bf1aeSmrg # weak defined symbols like other global defined symbols, whereas 4942300bf1aeSmrg # GNU nm marks them as "W". 4943300bf1aeSmrg # While the 'weak' keyword is ignored in the Export File, we need 4944300bf1aeSmrg # it in the Import File for the 'aix-soname' feature, so we have 4945300bf1aeSmrg # to replace the "-B" option with "-P" for AIX nm. 49466aec45a7Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4947300bf1aeSmrg _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' 49486aec45a7Smrg else 4949300bf1aeSmrg _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' 49508697ee19Smrg fi 49518697ee19Smrg ;; 49526aec45a7Smrg pw32*) 4953300bf1aeSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4954aa9e3350Smrg ;; 49556aec45a7Smrg cygwin* | mingw* | cegcc*) 4956aa9e3350Smrg case $cc_basename in 4957aa9e3350Smrg cl*) 4958aa9e3350Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4959aa9e3350Smrg ;; 4960aa9e3350Smrg *) 4961aa9e3350Smrg _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' 4962aa9e3350Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4963aa9e3350Smrg ;; 4964aa9e3350Smrg esac 4965aa9e3350Smrg ;; 49666aec45a7Smrg *) 49676aec45a7Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4968aa9e3350Smrg ;; 49696aec45a7Smrg esac 49706aec45a7Smrg], [ 49716aec45a7Smrg runpath_var= 49726aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 49736aec45a7Smrg _LT_TAGVAR(always_export_symbols, $1)=no 49746aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)= 49756aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49766aec45a7Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 49776aec45a7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49786aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49796aec45a7Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49806aec45a7Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 49816aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 49826aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49836aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49846aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49856aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 49866aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49876aec45a7Smrg _LT_TAGVAR(inherit_rpath, $1)=no 49886aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 49896aec45a7Smrg _LT_TAGVAR(module_cmds, $1)= 49906aec45a7Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 49916aec45a7Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 49926aec45a7Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 49936aec45a7Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 49946aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49956aec45a7Smrg # include_expsyms should be a list of space-separated symbols to be *always* 49966aec45a7Smrg # included in the symbol list 49976aec45a7Smrg _LT_TAGVAR(include_expsyms, $1)= 49986aec45a7Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4999300bf1aeSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 5000300bf1aeSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5001300bf1aeSmrg # as well as any symbol that contains 'd'. 50026aec45a7Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 50036aec45a7Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 50046aec45a7Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 50056aec45a7Smrg # the symbol is explicitly referenced. Since portable code cannot 50066aec45a7Smrg # rely on this symbol name, it's probably fine to never include it in 50076aec45a7Smrg # preloaded symbol tables. 50086aec45a7Smrg # Exclude shared library initialization/finalization symbols. 50096aec45a7Smrgdnl Note also adjust exclude_expsyms for C++ above. 50106aec45a7Smrg extract_expsyms_cmds= 50118697ee19Smrg 50126aec45a7Smrg case $host_os in 50136aec45a7Smrg cygwin* | mingw* | pw32* | cegcc*) 50146aec45a7Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 50156aec45a7Smrg # When not using gcc, we currently assume that we are using 50166aec45a7Smrg # Microsoft Visual C++. 5017300bf1aeSmrg if test yes != "$GCC"; then 50186aec45a7Smrg with_gnu_ld=no 50198697ee19Smrg fi 5020ab47cfaaSmrg ;; 50216aec45a7Smrg interix*) 50226aec45a7Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 50236aec45a7Smrg with_gnu_ld=yes 50246aec45a7Smrg ;; 5025300bf1aeSmrg openbsd* | bitrig*) 50266aec45a7Smrg with_gnu_ld=no 50276aec45a7Smrg ;; 5028ab47cfaaSmrg esac 5029ab47cfaaSmrg 50306aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5031ab47cfaaSmrg 50326aec45a7Smrg # On some targets, GNU ld is compatible enough with the native linker 50336aec45a7Smrg # that we're better off using the native interface for both. 50346aec45a7Smrg lt_use_gnu_ld_interface=no 5035300bf1aeSmrg if test yes = "$with_gnu_ld"; then 50366aec45a7Smrg case $host_os in 50376aec45a7Smrg aix*) 50386aec45a7Smrg # The AIX port of GNU ld has always aspired to compatibility 50396aec45a7Smrg # with the native linker. However, as the warning in the GNU ld 50406aec45a7Smrg # block says, versions before 2.19.5* couldn't really create working 50416aec45a7Smrg # shared libraries, regardless of the interface used. 50426aec45a7Smrg case `$LD -v 2>&1` in 50436aec45a7Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50446aec45a7Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50456aec45a7Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50466aec45a7Smrg *) 50476aec45a7Smrg lt_use_gnu_ld_interface=yes 50486aec45a7Smrg ;; 50496aec45a7Smrg esac 50506aec45a7Smrg ;; 50516aec45a7Smrg *) 50526aec45a7Smrg lt_use_gnu_ld_interface=yes 50536aec45a7Smrg ;; 50546aec45a7Smrg esac 50556aec45a7Smrg fi 5056ab47cfaaSmrg 5057300bf1aeSmrg if test yes = "$lt_use_gnu_ld_interface"; then 50586aec45a7Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5059300bf1aeSmrg wlarc='$wl' 5060ab47cfaaSmrg 50616aec45a7Smrg # Set some defaults for GNU ld with shared library support. These 50626aec45a7Smrg # are reset later if shared libraries are not supported. Putting them 50636aec45a7Smrg # here allows them to be overridden if necessary. 50646aec45a7Smrg runpath_var=LD_RUN_PATH 5065300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5066300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50676aec45a7Smrg # ancient GNU ld didn't support --whole-archive et. al. 50686aec45a7Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5069300bf1aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50706aec45a7Smrg else 50716aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50726aec45a7Smrg fi 50736aec45a7Smrg supports_anon_versioning=no 5074300bf1aeSmrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 50756aec45a7Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 50766aec45a7Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50776aec45a7Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50786aec45a7Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50796aec45a7Smrg *\ 2.11.*) ;; # other 2.11 versions 50806aec45a7Smrg *) supports_anon_versioning=yes ;; 50816aec45a7Smrg esac 5082ab47cfaaSmrg 50836aec45a7Smrg # See if GNU ld supports shared libraries. 50846aec45a7Smrg case $host_os in 50856aec45a7Smrg aix[[3-9]]*) 50866aec45a7Smrg # On AIX/PPC, the GNU linker is very broken 5087300bf1aeSmrg if test ia64 != "$host_cpu"; then 50886aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 50896aec45a7Smrg cat <<_LT_EOF 1>&2 5090ab47cfaaSmrg 50916aec45a7Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 50926aec45a7Smrg*** to be unable to reliably create shared libraries on AIX. 50936aec45a7Smrg*** Therefore, libtool is disabling shared libraries support. If you 50946aec45a7Smrg*** really care for shared libraries, you may want to install binutils 50956aec45a7Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 50966aec45a7Smrg*** You will then need to restart the configuration process. 5097ab47cfaaSmrg 50986aec45a7Smrg_LT_EOF 50996aec45a7Smrg fi 51006aec45a7Smrg ;; 5101ab47cfaaSmrg 51026aec45a7Smrg amigaos*) 51036aec45a7Smrg case $host_cpu in 51046aec45a7Smrg powerpc) 51056aec45a7Smrg # see comment about AmigaOS4 .so support 5106300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51076aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 51086aec45a7Smrg ;; 51096aec45a7Smrg m68k) 51106aec45a7Smrg _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)' 51116aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51126aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51136aec45a7Smrg ;; 51146aec45a7Smrg esac 51156aec45a7Smrg ;; 5116ab47cfaaSmrg 51176aec45a7Smrg beos*) 51186aec45a7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51196aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51206aec45a7Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51216aec45a7Smrg # support --undefined. This deserves some investigation. FIXME 5122300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51236aec45a7Smrg else 51246aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51256aec45a7Smrg fi 51266aec45a7Smrg ;; 5127ab47cfaaSmrg 51286aec45a7Smrg cygwin* | mingw* | pw32* | cegcc*) 51296aec45a7Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51306aec45a7Smrg # as there is no search path for DLLs. 51316aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5132300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51336aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51346aec45a7Smrg _LT_TAGVAR(always_export_symbols, $1)=no 51356aec45a7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5136aa9e3350Smrg _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' 5137aa9e3350Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 51386aec45a7Smrg 51396aec45a7Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5140300bf1aeSmrg _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' 5141300bf1aeSmrg # If the export-symbols file already is a .def file, use it as 5142300bf1aeSmrg # is; otherwise, prepend EXPORTS... 5143300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5144300bf1aeSmrg cp $export_symbols $output_objdir/$soname.def; 5145300bf1aeSmrg else 5146300bf1aeSmrg echo EXPORTS > $output_objdir/$soname.def; 5147300bf1aeSmrg cat $export_symbols >> $output_objdir/$soname.def; 5148300bf1aeSmrg fi~ 5149300bf1aeSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51506aec45a7Smrg else 51516aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 51526aec45a7Smrg fi 51536aec45a7Smrg ;; 5154ab47cfaaSmrg 51556aec45a7Smrg haiku*) 5156300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51576aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51586aec45a7Smrg ;; 5159ab47cfaaSmrg 5160300bf1aeSmrg os2*) 5161300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5162300bf1aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5163300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5164300bf1aeSmrg shrext_cmds=.dll 5165300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5166300bf1aeSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5167300bf1aeSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5168300bf1aeSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5169300bf1aeSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5170300bf1aeSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5171300bf1aeSmrg emximp -o $lib $output_objdir/$libname.def' 5172300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5173300bf1aeSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5174300bf1aeSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5175300bf1aeSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5176300bf1aeSmrg prefix_cmds="$SED"~ 5177300bf1aeSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5178300bf1aeSmrg prefix_cmds="$prefix_cmds -e 1d"; 5179300bf1aeSmrg fi~ 5180300bf1aeSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5181300bf1aeSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5182300bf1aeSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5183300bf1aeSmrg emximp -o $lib $output_objdir/$libname.def' 5184300bf1aeSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5185300bf1aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5186300bf1aeSmrg ;; 5187300bf1aeSmrg 51886aec45a7Smrg interix[[3-9]]*) 51896aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 51906aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5191300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5192300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 51936aec45a7Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 51946aec45a7Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 51956aec45a7Smrg # default) and relocated if they conflict, which is a slow very memory 51966aec45a7Smrg # consuming and fragmenting process. To avoid this, we pick a random, 51976aec45a7Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 51986aec45a7Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5199300bf1aeSmrg _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' 5200300bf1aeSmrg _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' 52016aec45a7Smrg ;; 5202ab47cfaaSmrg 52036aec45a7Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 52046aec45a7Smrg tmp_diet=no 5205300bf1aeSmrg if test linux-dietlibc = "$host_os"; then 52066aec45a7Smrg case $cc_basename in 52076aec45a7Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 52086aec45a7Smrg esac 52096aec45a7Smrg fi 52106aec45a7Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5211300bf1aeSmrg && test no = "$tmp_diet" 52126aec45a7Smrg then 5213aa9e3350Smrg tmp_addflag=' $pic_flag' 52146aec45a7Smrg tmp_sharedflag='-shared' 52156aec45a7Smrg case $cc_basename,$host_cpu in 52166aec45a7Smrg pgcc*) # Portland Group C compiler 5217300bf1aeSmrg _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' 52186aec45a7Smrg tmp_addflag=' $pic_flag' 52196aec45a7Smrg ;; 52206aec45a7Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 52216aec45a7Smrg # Portland Group f77 and f90 compilers 5222300bf1aeSmrg _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' 52236aec45a7Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 52246aec45a7Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52256aec45a7Smrg tmp_addflag=' -i_dynamic' ;; 52266aec45a7Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52276aec45a7Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52286aec45a7Smrg ifc* | ifort*) # Intel Fortran compiler 52296aec45a7Smrg tmp_addflag=' -nofor_main' ;; 52306aec45a7Smrg lf95*) # Lahey Fortran 8.1 52316aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52326aec45a7Smrg tmp_sharedflag='--shared' ;; 5233300bf1aeSmrg nagfor*) # NAGFOR 5.3 5234300bf1aeSmrg tmp_sharedflag='-Wl,-shared' ;; 52356aec45a7Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52366aec45a7Smrg tmp_sharedflag='-qmkshrobj' 52376aec45a7Smrg tmp_addflag= ;; 52386aec45a7Smrg nvcc*) # Cuda Compiler Driver 2.2 5239300bf1aeSmrg _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' 52406aec45a7Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52416aec45a7Smrg ;; 52426aec45a7Smrg esac 52436aec45a7Smrg case `$CC -V 2>&1 | sed 5q` in 52446aec45a7Smrg *Sun\ C*) # Sun C 5.9 5245300bf1aeSmrg _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' 52466aec45a7Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52476aec45a7Smrg tmp_sharedflag='-G' ;; 52486aec45a7Smrg *Sun\ F*) # Sun Fortran 8.3 52496aec45a7Smrg tmp_sharedflag='-G' ;; 52506aec45a7Smrg esac 5251300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5252ab47cfaaSmrg 5253300bf1aeSmrg if test yes = "$supports_anon_versioning"; then 52546aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5255300bf1aeSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5256300bf1aeSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5257300bf1aeSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52586aec45a7Smrg fi 5259ab47cfaaSmrg 52606aec45a7Smrg case $cc_basename in 5261300bf1aeSmrg tcc*) 5262300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5263300bf1aeSmrg ;; 52646aec45a7Smrg xlf* | bgf* | bgxlf* | mpixlf*) 52656aec45a7Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52666aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5267300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52686aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5269300bf1aeSmrg if test yes = "$supports_anon_versioning"; then 52706aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5271300bf1aeSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5272300bf1aeSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5273300bf1aeSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52746aec45a7Smrg fi 52756aec45a7Smrg ;; 52766aec45a7Smrg esac 52776aec45a7Smrg else 52786aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52796aec45a7Smrg fi 52806aec45a7Smrg ;; 5281ab47cfaaSmrg 5282300bf1aeSmrg netbsd*) 52836aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52846aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52856aec45a7Smrg wlarc= 52866aec45a7Smrg else 5287300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5288300bf1aeSmrg _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' 52896aec45a7Smrg fi 52906aec45a7Smrg ;; 5291ab47cfaaSmrg 52926aec45a7Smrg solaris*) 52936aec45a7Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 52946aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 52956aec45a7Smrg cat <<_LT_EOF 1>&2 5296ab47cfaaSmrg 52976aec45a7Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 52986aec45a7Smrg*** create shared libraries on Solaris systems. Therefore, libtool 52996aec45a7Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53006aec45a7Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 53016aec45a7Smrg*** your PATH or compiler configuration so that the native linker is 53026aec45a7Smrg*** used, and then restart. 5303ab47cfaaSmrg 53046aec45a7Smrg_LT_EOF 53056aec45a7Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5306300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5307300bf1aeSmrg _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' 53086aec45a7Smrg else 53096aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53106aec45a7Smrg fi 53116aec45a7Smrg ;; 5312ab47cfaaSmrg 53136aec45a7Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53146aec45a7Smrg case `$LD -v 2>&1` in 53156aec45a7Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53166aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53176aec45a7Smrg cat <<_LT_EOF 1>&2 5318ab47cfaaSmrg 5319300bf1aeSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53206aec45a7Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53216aec45a7Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 53226aec45a7Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53236aec45a7Smrg*** your PATH or compiler configuration so that the native linker is 53246aec45a7Smrg*** used, and then restart. 5325ab47cfaaSmrg 53266aec45a7Smrg_LT_EOF 53276aec45a7Smrg ;; 53286aec45a7Smrg *) 53296aec45a7Smrg # For security reasons, it is highly recommended that you always 53306aec45a7Smrg # use absolute paths for naming shared libraries, and exclude the 53316aec45a7Smrg # DT_RUNPATH tag from executables and libraries. But doing so 53326aec45a7Smrg # requires that you compile everything twice, which is a pain. 53336aec45a7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5334300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5335300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5336300bf1aeSmrg _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' 53376aec45a7Smrg else 53386aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53396aec45a7Smrg fi 53406aec45a7Smrg ;; 53416aec45a7Smrg esac 53426aec45a7Smrg ;; 5343ab47cfaaSmrg 53446aec45a7Smrg sunos4*) 53456aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53466aec45a7Smrg wlarc= 53476aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 53486aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53496aec45a7Smrg ;; 5350ab47cfaaSmrg 53516aec45a7Smrg *) 53526aec45a7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5353300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5354300bf1aeSmrg _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' 53556aec45a7Smrg else 53566aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 53576aec45a7Smrg fi 53586aec45a7Smrg ;; 53596aec45a7Smrg esac 5360ab47cfaaSmrg 5361300bf1aeSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53626aec45a7Smrg runpath_var= 53636aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53646aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53656aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53666aec45a7Smrg fi 53676aec45a7Smrg else 53686aec45a7Smrg # PORTME fill in a description of your system's linker (not GNU ld) 53696aec45a7Smrg case $host_os in 53706aec45a7Smrg aix3*) 53716aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53726aec45a7Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 53736aec45a7Smrg _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' 53746aec45a7Smrg # Note: this linker hardcodes the directories in LIBPATH if there 53756aec45a7Smrg # are no directories specified by -L. 53766aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5377300bf1aeSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53786aec45a7Smrg # Neither direct hardcoding nor static linking is supported with a 53796aec45a7Smrg # broken collect2. 53806aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 53816aec45a7Smrg fi 53826aec45a7Smrg ;; 5383ab47cfaaSmrg 53846aec45a7Smrg aix[[4-9]]*) 5385300bf1aeSmrg if test ia64 = "$host_cpu"; then 53866aec45a7Smrg # On IA64, the linker does run time linking by default, so we don't 53876aec45a7Smrg # have to do anything special. 53886aec45a7Smrg aix_use_runtimelinking=no 53896aec45a7Smrg exp_sym_flag='-Bexport' 5390300bf1aeSmrg no_entry_flag= 53916aec45a7Smrg else 53926aec45a7Smrg # If we're using GNU nm, then we don't want the "-C" option. 5393300bf1aeSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5394300bf1aeSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5395300bf1aeSmrg # weak defined symbols like other global defined symbols, whereas 5396300bf1aeSmrg # GNU nm marks them as "W". 5397300bf1aeSmrg # While the 'weak' keyword is ignored in the Export File, we need 5398300bf1aeSmrg # it in the Import File for the 'aix-soname' feature, so we have 5399300bf1aeSmrg # to replace the "-B" option with "-P" for AIX nm. 54006aec45a7Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5401300bf1aeSmrg _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' 54026aec45a7Smrg else 5403300bf1aeSmrg _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' 54046aec45a7Smrg fi 54056aec45a7Smrg aix_use_runtimelinking=no 5406ab47cfaaSmrg 54076aec45a7Smrg # Test if we are trying to use run time linking or normal 54086aec45a7Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5409300bf1aeSmrg # have runtime linking enabled, and use it for executables. 5410300bf1aeSmrg # For shared libraries, we enable/disable runtime linking 5411300bf1aeSmrg # depending on the kind of the shared library created - 5412300bf1aeSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 5413300bf1aeSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5414300bf1aeSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 5415300bf1aeSmrg # lib.a static archive 5416300bf1aeSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5417300bf1aeSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 5418300bf1aeSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5419300bf1aeSmrg # lib.a(lib.so.V) shared, rtl:no 5420300bf1aeSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5421300bf1aeSmrg # lib.a static archive 54226aec45a7Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54236aec45a7Smrg for ld_flag in $LDFLAGS; do 5424300bf1aeSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54256aec45a7Smrg aix_use_runtimelinking=yes 54266aec45a7Smrg break 54276aec45a7Smrg fi 54286aec45a7Smrg done 5429300bf1aeSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5430300bf1aeSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5431300bf1aeSmrg # so we don't have lib.a shared libs to link our executables. 5432300bf1aeSmrg # We have to force runtime linking in this case. 5433300bf1aeSmrg aix_use_runtimelinking=yes 5434300bf1aeSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5435300bf1aeSmrg fi 54366aec45a7Smrg ;; 54376aec45a7Smrg esac 5438ab47cfaaSmrg 54396aec45a7Smrg exp_sym_flag='-bexport' 54406aec45a7Smrg no_entry_flag='-bnoentry' 54416aec45a7Smrg fi 5442ab47cfaaSmrg 54436aec45a7Smrg # When large executables or shared objects are built, AIX ld can 54446aec45a7Smrg # have problems creating the table of contents. If linking a library 54456aec45a7Smrg # or program results in "error TOC overflow" add -mminimal-toc to 54466aec45a7Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54476aec45a7Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5448ab47cfaaSmrg 54496aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='' 54506aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 54516aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54526aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54536aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5454300bf1aeSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5455300bf1aeSmrg case $with_aix_soname,$aix_use_runtimelinking in 5456300bf1aeSmrg aix,*) ;; # traditional, no import file 5457300bf1aeSmrg svr4,* | *,yes) # use import file 5458300bf1aeSmrg # The Import File defines what to hardcode. 5459300bf1aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5460300bf1aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5461300bf1aeSmrg ;; 5462300bf1aeSmrg esac 5463ab47cfaaSmrg 5464300bf1aeSmrg if test yes = "$GCC"; then 54656aec45a7Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54666aec45a7Smrg # We only want to do this on AIX 4.2 and lower, the check 54676aec45a7Smrg # below for broken collect2 doesn't work under 4.3+ 5468300bf1aeSmrg collect2name=`$CC -print-prog-name=collect2` 54696aec45a7Smrg if test -f "$collect2name" && 54706aec45a7Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54716aec45a7Smrg then 54726aec45a7Smrg # We have reworked collect2 54736aec45a7Smrg : 54746aec45a7Smrg else 54756aec45a7Smrg # We have old collect2 54766aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54776aec45a7Smrg # It fails to find uninstalled libraries when the uninstalled 54786aec45a7Smrg # path is not listed in the libpath. Setting hardcode_minus_L 54796aec45a7Smrg # to unsupported forces relinking 54806aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54816aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54826aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 54836aec45a7Smrg fi 54846aec45a7Smrg ;; 54856aec45a7Smrg esac 54866aec45a7Smrg shared_flag='-shared' 5487300bf1aeSmrg if test yes = "$aix_use_runtimelinking"; then 5488300bf1aeSmrg shared_flag="$shared_flag "'$wl-G' 54896aec45a7Smrg fi 5490300bf1aeSmrg # Need to ensure runtime linking is disabled for the traditional 5491300bf1aeSmrg # shared library, or the linker may eventually find shared libraries 5492300bf1aeSmrg # /with/ Import File - we do not want to mix them. 5493300bf1aeSmrg shared_flag_aix='-shared' 5494300bf1aeSmrg shared_flag_svr4='-shared $wl-G' 54956aec45a7Smrg else 54966aec45a7Smrg # not using gcc 5497300bf1aeSmrg if test ia64 = "$host_cpu"; then 54986aec45a7Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 54996aec45a7Smrg # chokes on -Wl,-G. The following line is correct: 55006aec45a7Smrg shared_flag='-G' 55016aec45a7Smrg else 5502300bf1aeSmrg if test yes = "$aix_use_runtimelinking"; then 5503300bf1aeSmrg shared_flag='$wl-G' 55046aec45a7Smrg else 5505300bf1aeSmrg shared_flag='$wl-bM:SRE' 55066aec45a7Smrg fi 5507300bf1aeSmrg shared_flag_aix='$wl-bM:SRE' 5508300bf1aeSmrg shared_flag_svr4='$wl-G' 55096aec45a7Smrg fi 55106aec45a7Smrg fi 5511ab47cfaaSmrg 5512300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55136aec45a7Smrg # It seems that -bexpall does not export symbols beginning with 55146aec45a7Smrg # underscore (_), so it is better to generate a list of symbols to export. 55156aec45a7Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5516300bf1aeSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55176aec45a7Smrg # Warning - without using the other runtime loading flags (-brtl), 55186aec45a7Smrg # -berok will link without error, but may produce a broken library. 55196aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55206aec45a7Smrg # Determine the default libpath from the value encoded in an 55216aec45a7Smrg # empty executable. 5522aa9e3350Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5523300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5524300bf1aeSmrg _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 55256aec45a7Smrg else 5526300bf1aeSmrg if test ia64 = "$host_cpu"; then 5527300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55286aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5529300bf1aeSmrg _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" 55306aec45a7Smrg else 55316aec45a7Smrg # Determine the default libpath from the value encoded in an 55326aec45a7Smrg # empty executable. 5533aa9e3350Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 5534300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55356aec45a7Smrg # Warning - without using the other run time loading flags, 55366aec45a7Smrg # -berok will link without error, but may produce a broken library. 5537300bf1aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5538300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5539300bf1aeSmrg if test yes = "$with_gnu_ld"; then 55406aec45a7Smrg # We only use this code for GNU lds that support --whole-archive. 5541300bf1aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55426aec45a7Smrg else 55436aec45a7Smrg # Exported symbols can be pulled into shared objects from archives 55446aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55456aec45a7Smrg fi 55466aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5547300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5548300bf1aeSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5549300bf1aeSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5550300bf1aeSmrg if test svr4 != "$with_aix_soname"; then 5551300bf1aeSmrg # This is similar to how AIX traditionally builds its shared libraries. 5552300bf1aeSmrg _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' 5553300bf1aeSmrg fi 5554300bf1aeSmrg if test aix != "$with_aix_soname"; then 5555300bf1aeSmrg _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' 5556300bf1aeSmrg else 5557300bf1aeSmrg # used by -dlpreopen to get the symbols 5558300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5559300bf1aeSmrg fi 5560300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55616aec45a7Smrg fi 55626aec45a7Smrg fi 55636aec45a7Smrg ;; 5564ab47cfaaSmrg 55656aec45a7Smrg amigaos*) 55666aec45a7Smrg case $host_cpu in 55676aec45a7Smrg powerpc) 55686aec45a7Smrg # see comment about AmigaOS4 .so support 5569300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55706aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55716aec45a7Smrg ;; 55726aec45a7Smrg m68k) 55736aec45a7Smrg _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)' 55746aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55756aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55766aec45a7Smrg ;; 55776aec45a7Smrg esac 55786aec45a7Smrg ;; 5579ab47cfaaSmrg 55806aec45a7Smrg bsdi[[45]]*) 55816aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55826aec45a7Smrg ;; 5583ab47cfaaSmrg 55846aec45a7Smrg cygwin* | mingw* | pw32* | cegcc*) 55856aec45a7Smrg # When not using gcc, we currently assume that we are using 55866aec45a7Smrg # Microsoft Visual C++. 55876aec45a7Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 55886aec45a7Smrg # no search path for DLLs. 5589aa9e3350Smrg case $cc_basename in 5590aa9e3350Smrg cl*) 5591aa9e3350Smrg # Native MSVC 5592aa9e3350Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5593aa9e3350Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5594aa9e3350Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5595aa9e3350Smrg _LT_TAGVAR(file_list_spec, $1)='@' 5596aa9e3350Smrg # Tell ltmain to make .lib files, not .a files. 5597aa9e3350Smrg libext=lib 5598aa9e3350Smrg # Tell ltmain to make .dll files, not .so files. 5599300bf1aeSmrg shrext_cmds=.dll 5600aa9e3350Smrg # FIXME: Setting linknames here is a bad hack. 5601300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5602300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5603300bf1aeSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 5604300bf1aeSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5605300bf1aeSmrg else 5606300bf1aeSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5607300bf1aeSmrg fi~ 5608300bf1aeSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5609300bf1aeSmrg linknames=' 5610aa9e3350Smrg # The linker will not automatically build a static lib if we build a DLL. 5611aa9e3350Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5612aa9e3350Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5613aa9e3350Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5614aa9e3350Smrg _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' 5615aa9e3350Smrg # Don't use ranlib 5616aa9e3350Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5617aa9e3350Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5618300bf1aeSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5619300bf1aeSmrg case $lt_outputfile in 5620300bf1aeSmrg *.exe|*.EXE) ;; 5621300bf1aeSmrg *) 5622300bf1aeSmrg lt_outputfile=$lt_outputfile.exe 5623300bf1aeSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 5624300bf1aeSmrg ;; 5625300bf1aeSmrg esac~ 5626300bf1aeSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5627300bf1aeSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5628300bf1aeSmrg $RM "$lt_outputfile.manifest"; 5629300bf1aeSmrg fi' 5630aa9e3350Smrg ;; 5631aa9e3350Smrg *) 5632aa9e3350Smrg # Assume MSVC wrapper 5633aa9e3350Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5634aa9e3350Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5635aa9e3350Smrg # Tell ltmain to make .lib files, not .a files. 5636aa9e3350Smrg libext=lib 5637aa9e3350Smrg # Tell ltmain to make .dll files, not .so files. 5638300bf1aeSmrg shrext_cmds=.dll 5639aa9e3350Smrg # FIXME: Setting linknames here is a bad hack. 5640aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5641aa9e3350Smrg # The linker will automatically build a .lib file if we build a DLL. 5642aa9e3350Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5643aa9e3350Smrg # FIXME: Should let the user specify the lib program. 5644aa9e3350Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5645aa9e3350Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5646aa9e3350Smrg ;; 5647aa9e3350Smrg esac 56486aec45a7Smrg ;; 5649ab47cfaaSmrg 56506aec45a7Smrg darwin* | rhapsody*) 56516aec45a7Smrg _LT_DARWIN_LINKER_FEATURES($1) 56526aec45a7Smrg ;; 5653ab47cfaaSmrg 56546aec45a7Smrg dgux*) 56556aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56566aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56576aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56586aec45a7Smrg ;; 5659ab47cfaaSmrg 56606aec45a7Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56616aec45a7Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 56626aec45a7Smrg # does not break anything, and helps significantly (at the cost of a little 56636aec45a7Smrg # extra space). 56646aec45a7Smrg freebsd2.2*) 56656aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56666aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56676aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56686aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56691473d951Smrg ;; 56706aec45a7Smrg 56716aec45a7Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5672aa9e3350Smrg freebsd2.*) 56736aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56746aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56756aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56766aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5677ab47cfaaSmrg ;; 56781473d951Smrg 56796aec45a7Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 56806aec45a7Smrg freebsd* | dragonfly*) 5681aa9e3350Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56826aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56836aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 56846aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56856aec45a7Smrg ;; 5686ab47cfaaSmrg 56876aec45a7Smrg hpux9*) 5688300bf1aeSmrg if test yes = "$GCC"; then 5689300bf1aeSmrg _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' 56906aec45a7Smrg else 5691300bf1aeSmrg _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' 56926aec45a7Smrg fi 5693300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56946aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56956aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5696ab47cfaaSmrg 56976aec45a7Smrg # hardcode_minus_L: Not really in the search PATH, 56986aec45a7Smrg # but as the default location of the library. 56996aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5700300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57016aec45a7Smrg ;; 5702ab47cfaaSmrg 57036aec45a7Smrg hpux10*) 5704300bf1aeSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5705300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57066aec45a7Smrg else 57076aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 57086aec45a7Smrg fi 5709300bf1aeSmrg if test no = "$with_gnu_ld"; then 5710300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57116aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57126aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57136aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5714300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57156aec45a7Smrg # hardcode_minus_L: Not really in the search PATH, 57166aec45a7Smrg # but as the default location of the library. 57176aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57186aec45a7Smrg fi 57196aec45a7Smrg ;; 5720ab47cfaaSmrg 57216aec45a7Smrg hpux11*) 5722300bf1aeSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 57236aec45a7Smrg case $host_cpu in 57246aec45a7Smrg hppa*64*) 5725300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57266aec45a7Smrg ;; 57276aec45a7Smrg ia64*) 5728300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57296aec45a7Smrg ;; 57306aec45a7Smrg *) 5731300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 57326aec45a7Smrg ;; 57336aec45a7Smrg esac 57346aec45a7Smrg else 57356aec45a7Smrg case $host_cpu in 57366aec45a7Smrg hppa*64*) 5737300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57386aec45a7Smrg ;; 57396aec45a7Smrg ia64*) 5740300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57416aec45a7Smrg ;; 57426aec45a7Smrg *) 57436aec45a7Smrg m4_if($1, [], [ 57446aec45a7Smrg # Older versions of the 11.00 compiler do not understand -b yet 57456aec45a7Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57466aec45a7Smrg _LT_LINKER_OPTION([if $CC understands -b], 57476aec45a7Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5748300bf1aeSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57496aec45a7Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5750300bf1aeSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57516aec45a7Smrg ;; 57526aec45a7Smrg esac 57536aec45a7Smrg fi 5754300bf1aeSmrg if test no = "$with_gnu_ld"; then 5755300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57566aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5757ab47cfaaSmrg 57586aec45a7Smrg case $host_cpu in 57596aec45a7Smrg hppa*64*|ia64*) 57606aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 57616aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57626aec45a7Smrg ;; 57636aec45a7Smrg *) 57646aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 57656aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5766300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5767ab47cfaaSmrg 57686aec45a7Smrg # hardcode_minus_L: Not really in the search PATH, 57696aec45a7Smrg # but as the default location of the library. 57706aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57716aec45a7Smrg ;; 57726aec45a7Smrg esac 57736aec45a7Smrg fi 57746aec45a7Smrg ;; 5775ab47cfaaSmrg 57766aec45a7Smrg irix5* | irix6* | nonstopux*) 5777300bf1aeSmrg if test yes = "$GCC"; then 5778300bf1aeSmrg _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' 57796aec45a7Smrg # Try to use the -exported_symbol ld option, if it does not 57806aec45a7Smrg # work, assume that -exports_file does not work either and 57816aec45a7Smrg # implicitly export all symbols. 5782aa9e3350Smrg # This should be the same for all languages, so no per-tag cache variable. 5783aa9e3350Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5784aa9e3350Smrg [lt_cv_irix_exported_symbol], 5785300bf1aeSmrg [save_LDFLAGS=$LDFLAGS 5786300bf1aeSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5787aa9e3350Smrg AC_LINK_IFELSE( 5788aa9e3350Smrg [AC_LANG_SOURCE( 5789aa9e3350Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5790aa9e3350Smrg [C++], [[int foo (void) { return 0; }]], 5791aa9e3350Smrg [Fortran 77], [[ 5792aa9e3350Smrg subroutine foo 5793aa9e3350Smrg end]], 5794aa9e3350Smrg [Fortran], [[ 5795aa9e3350Smrg subroutine foo 5796aa9e3350Smrg end]])])], 5797aa9e3350Smrg [lt_cv_irix_exported_symbol=yes], 5798aa9e3350Smrg [lt_cv_irix_exported_symbol=no]) 5799300bf1aeSmrg LDFLAGS=$save_LDFLAGS]) 5800300bf1aeSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 5801300bf1aeSmrg _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' 5802aa9e3350Smrg fi 58036aec45a7Smrg else 5804300bf1aeSmrg _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' 5805300bf1aeSmrg _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' 58066aec45a7Smrg fi 58076aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5808300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58096aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58106aec45a7Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 58116aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58126aec45a7Smrg ;; 5813ab47cfaaSmrg 5814300bf1aeSmrg linux*) 5815300bf1aeSmrg case $cc_basename in 5816300bf1aeSmrg tcc*) 5817300bf1aeSmrg # Fabrice Bellard et al's Tiny C Compiler 5818300bf1aeSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5819300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5820300bf1aeSmrg ;; 5821300bf1aeSmrg esac 5822300bf1aeSmrg ;; 5823300bf1aeSmrg 5824300bf1aeSmrg netbsd*) 58256aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58266aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58276aec45a7Smrg else 58286aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58296aec45a7Smrg fi 58306aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58316aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58326aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58336aec45a7Smrg ;; 5834ab47cfaaSmrg 58356aec45a7Smrg newsos6) 58366aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58376aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5838300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58396aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58406aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58416aec45a7Smrg ;; 5842ab47cfaaSmrg 58436aec45a7Smrg *nto* | *qnx*) 58446aec45a7Smrg ;; 5845ab47cfaaSmrg 5846300bf1aeSmrg openbsd* | bitrig*) 58476aec45a7Smrg if test -f /usr/libexec/ld.so; then 58486aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 58496aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58506aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5851300bf1aeSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58526aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5853300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5854300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5855300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58566aec45a7Smrg else 5857300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5858300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58596aec45a7Smrg fi 58606aec45a7Smrg else 58616aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 58626aec45a7Smrg fi 58636aec45a7Smrg ;; 5864ab47cfaaSmrg 58656aec45a7Smrg os2*) 58666aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58676aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58686aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5869300bf1aeSmrg shrext_cmds=.dll 5870300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5871300bf1aeSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5872300bf1aeSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5873300bf1aeSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5874300bf1aeSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5875300bf1aeSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5876300bf1aeSmrg emximp -o $lib $output_objdir/$libname.def' 5877300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5878300bf1aeSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5879300bf1aeSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5880300bf1aeSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5881300bf1aeSmrg prefix_cmds="$SED"~ 5882300bf1aeSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5883300bf1aeSmrg prefix_cmds="$prefix_cmds -e 1d"; 5884300bf1aeSmrg fi~ 5885300bf1aeSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5886300bf1aeSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5887300bf1aeSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5888300bf1aeSmrg emximp -o $lib $output_objdir/$libname.def' 5889300bf1aeSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5890300bf1aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58916aec45a7Smrg ;; 5892ab47cfaaSmrg 58936aec45a7Smrg osf3*) 5894300bf1aeSmrg if test yes = "$GCC"; then 5895300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5896300bf1aeSmrg _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' 58976aec45a7Smrg else 58986aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5899300bf1aeSmrg _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' 59006aec45a7Smrg fi 59016aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5902300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59036aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59046aec45a7Smrg ;; 5905ab47cfaaSmrg 59066aec45a7Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5907300bf1aeSmrg if test yes = "$GCC"; then 5908300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5909300bf1aeSmrg _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' 5910300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59116aec45a7Smrg else 59126aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5913300bf1aeSmrg _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' 59146aec45a7Smrg _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~ 5915300bf1aeSmrg $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' 5916ab47cfaaSmrg 59176aec45a7Smrg # Both c and cxx compiler support -rpath directly 59186aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59196aec45a7Smrg fi 59206aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59216aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59226aec45a7Smrg ;; 5923ab47cfaaSmrg 59246aec45a7Smrg solaris*) 59256aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5926300bf1aeSmrg if test yes = "$GCC"; then 5927300bf1aeSmrg wlarc='$wl' 5928300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59296aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5930300bf1aeSmrg $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' 59316aec45a7Smrg else 59326aec45a7Smrg case `$CC -V 2>&1` in 59336aec45a7Smrg *"Compilers 5.0"*) 59346aec45a7Smrg wlarc='' 5935300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59366aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5937300bf1aeSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59386aec45a7Smrg ;; 59396aec45a7Smrg *) 5940300bf1aeSmrg wlarc='$wl' 5941300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59426aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5943300bf1aeSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59446aec45a7Smrg ;; 59456aec45a7Smrg esac 59466aec45a7Smrg fi 59476aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59486aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59496aec45a7Smrg case $host_os in 59506aec45a7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59516aec45a7Smrg *) 59526aec45a7Smrg # The compiler driver will combine and reorder linker options, 5953300bf1aeSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59546aec45a7Smrg # but is careful enough not to reorder. 59556aec45a7Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5956300bf1aeSmrg if test yes = "$GCC"; then 5957300bf1aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59586aec45a7Smrg else 59596aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59606aec45a7Smrg fi 59616aec45a7Smrg ;; 59626aec45a7Smrg esac 59636aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59646aec45a7Smrg ;; 5965ab47cfaaSmrg 59666aec45a7Smrg sunos4*) 5967300bf1aeSmrg if test sequent = "$host_vendor"; then 59686aec45a7Smrg # Use $CC to link under sequent, because it throws in some extra .o 59696aec45a7Smrg # files that make .init and .fini sections work. 5970300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59716aec45a7Smrg else 59726aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59736aec45a7Smrg fi 59746aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59756aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 59766aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59776aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59786aec45a7Smrg ;; 5979ab47cfaaSmrg 59806aec45a7Smrg sysv4) 59816aec45a7Smrg case $host_vendor in 59826aec45a7Smrg sni) 59836aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59846aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59856aec45a7Smrg ;; 59866aec45a7Smrg siemens) 59876aec45a7Smrg ## LD is ld it makes a PLAMLIB 59886aec45a7Smrg ## CC just makes a GrossModule. 59896aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 59906aec45a7Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 59916aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 59926aec45a7Smrg ;; 59936aec45a7Smrg motorola) 59946aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59956aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 59966aec45a7Smrg ;; 59976aec45a7Smrg esac 59986aec45a7Smrg runpath_var='LD_RUN_PATH' 59996aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60006aec45a7Smrg ;; 6001ab47cfaaSmrg 60026aec45a7Smrg sysv4.3*) 60036aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60046aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60056aec45a7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 60066aec45a7Smrg ;; 6007ab47cfaaSmrg 60086aec45a7Smrg sysv4*MP*) 60096aec45a7Smrg if test -d /usr/nec; then 60106aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60116aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60126aec45a7Smrg runpath_var=LD_RUN_PATH 60136aec45a7Smrg hardcode_runpath_var=yes 60146aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 60156aec45a7Smrg fi 60166aec45a7Smrg ;; 6017ab47cfaaSmrg 60186aec45a7Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6019300bf1aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60206aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60216aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60226aec45a7Smrg runpath_var='LD_RUN_PATH' 6023ab47cfaaSmrg 6024300bf1aeSmrg if test yes = "$GCC"; then 6025300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6026300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60276aec45a7Smrg else 6028300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6029300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60306aec45a7Smrg fi 60316aec45a7Smrg ;; 6032ab47cfaaSmrg 60336aec45a7Smrg sysv5* | sco3.2v5* | sco5v6*) 6034300bf1aeSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 60356aec45a7Smrg # link with -lc, and that would cause any symbols used from libc to 60366aec45a7Smrg # always be unresolved, which means just about no library would 60376aec45a7Smrg # ever link correctly. If we're not using GNU ld we use -z text 60386aec45a7Smrg # though, which does catch some bad symbols but isn't as heavy-handed 60396aec45a7Smrg # as -z defs. 6040300bf1aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6041300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60426aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60436aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6044300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60456aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60466aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6047300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60486aec45a7Smrg runpath_var='LD_RUN_PATH' 6049ab47cfaaSmrg 6050300bf1aeSmrg if test yes = "$GCC"; then 6051300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6052300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60536aec45a7Smrg else 6054300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6055300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60566aec45a7Smrg fi 60576aec45a7Smrg ;; 6058ab47cfaaSmrg 60596aec45a7Smrg uts4*) 60606aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60616aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60626aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60636aec45a7Smrg ;; 6064ab47cfaaSmrg 60656aec45a7Smrg *) 60666aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 60676aec45a7Smrg ;; 60686aec45a7Smrg esac 6069ab47cfaaSmrg 6070300bf1aeSmrg if test sni = "$host_vendor"; then 60716aec45a7Smrg case $host in 60726aec45a7Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6073300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60746aec45a7Smrg ;; 60756aec45a7Smrg esac 60766aec45a7Smrg fi 60776aec45a7Smrg fi 60786aec45a7Smrg]) 60796aec45a7SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6080300bf1aeSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6081ab47cfaaSmrg 60826aec45a7Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6083ab47cfaaSmrg 60846aec45a7Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60856aec45a7Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60866aec45a7Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 60876aec45a7Smrg [The commands to extract the exported symbol list from a shared archive]) 6088ab47cfaaSmrg 60896aec45a7Smrg# 60906aec45a7Smrg# Do we need to explicitly link libc? 60916aec45a7Smrg# 60926aec45a7Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 60936aec45a7Smrgx|xyes) 60946aec45a7Smrg # Assume -lc should be added 60956aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6096ab47cfaaSmrg 6097300bf1aeSmrg if test yes,yes = "$GCC,$enable_shared"; then 60986aec45a7Smrg case $_LT_TAGVAR(archive_cmds, $1) in 60996aec45a7Smrg *'~'*) 61006aec45a7Smrg # FIXME: we may have to deal with multi-command sequences. 61016aec45a7Smrg ;; 61026aec45a7Smrg '$CC '*) 61036aec45a7Smrg # Test whether the compiler implicitly links with -lc since on some 61046aec45a7Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 61056aec45a7Smrg # to ld, don't add -lc before -lgcc. 61066aec45a7Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 61076aec45a7Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 61086aec45a7Smrg [$RM conftest* 61096aec45a7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 61106aec45a7Smrg 61116aec45a7Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61126aec45a7Smrg soname=conftest 61136aec45a7Smrg lib=conftest 61146aec45a7Smrg libobjs=conftest.$ac_objext 61156aec45a7Smrg deplibs= 61166aec45a7Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61176aec45a7Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61186aec45a7Smrg compiler_flags=-v 61196aec45a7Smrg linker_flags=-v 61206aec45a7Smrg verstring= 61216aec45a7Smrg output_objdir=. 61226aec45a7Smrg libname=conftest 61236aec45a7Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61246aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 61256aec45a7Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61266aec45a7Smrg then 61276aec45a7Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61286aec45a7Smrg else 61296aec45a7Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61306aec45a7Smrg fi 61316aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61326aec45a7Smrg else 61336aec45a7Smrg cat conftest.err 1>&5 61346aec45a7Smrg fi 61356aec45a7Smrg $RM conftest* 61366aec45a7Smrg ]) 61376aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 61386aec45a7Smrg ;; 61396aec45a7Smrg esac 61406aec45a7Smrg fi 61416aec45a7Smrg ;; 61426aec45a7Smrgesac 6143ab47cfaaSmrg 61446aec45a7Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61456aec45a7Smrg [Whether or not to add -lc for building shared libraries]) 61466aec45a7Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61476aec45a7Smrg [enable_shared_with_static_runtimes], [0], 61486aec45a7Smrg [Whether or not to disallow shared libs when runtime libs are static]) 61496aec45a7Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61506aec45a7Smrg [Compiler flag to allow reflexive dlopens]) 61516aec45a7Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61526aec45a7Smrg [Compiler flag to generate shared objects directly from archives]) 61536aec45a7Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 61546aec45a7Smrg [Whether the compiler copes with passing no objects directly]) 61556aec45a7Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61566aec45a7Smrg [Create an old-style archive from a shared archive]) 61576aec45a7Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61586aec45a7Smrg [Create a temporary old-style archive to link instead of a shared archive]) 61596aec45a7Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61606aec45a7Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61616aec45a7Smrg_LT_TAGDECL([], [module_cmds], [2], 61626aec45a7Smrg [Commands used to build a loadable module if different from building 61636aec45a7Smrg a shared archive.]) 61646aec45a7Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61656aec45a7Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 61666aec45a7Smrg [Whether we are building with GNU ld or not]) 61676aec45a7Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61686aec45a7Smrg [Flag that allows shared libraries with undefined symbols to be built]) 61696aec45a7Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 61706aec45a7Smrg [Flag that enforces no undefined symbols]) 61716aec45a7Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61726aec45a7Smrg [Flag to hardcode $libdir into a binary during linking. 61736aec45a7Smrg This must work even if $libdir does not exist]) 61746aec45a7Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61756aec45a7Smrg [Whether we need a single "-rpath" flag with a separated argument]) 61766aec45a7Smrg_LT_TAGDECL([], [hardcode_direct], [0], 6177300bf1aeSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61786aec45a7Smrg DIR into the resulting binary]) 61796aec45a7Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6180300bf1aeSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61816aec45a7Smrg DIR into the resulting binary and the resulting library dependency is 6182300bf1aeSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 61836aec45a7Smrg library is relocated]) 61846aec45a7Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 61856aec45a7Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61866aec45a7Smrg into the resulting binary]) 61876aec45a7Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 61886aec45a7Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 61896aec45a7Smrg into the resulting binary]) 61906aec45a7Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 61916aec45a7Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 61926aec45a7Smrg into the library and all subsequent libraries and executables linked 61936aec45a7Smrg against it]) 61946aec45a7Smrg_LT_TAGDECL([], [inherit_rpath], [0], 61956aec45a7Smrg [Set to yes if linker adds runtime paths of dependent libraries 61966aec45a7Smrg to runtime path list]) 61976aec45a7Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 61986aec45a7Smrg [Whether libtool must link a program against all its dependency libraries]) 61996aec45a7Smrg_LT_TAGDECL([], [always_export_symbols], [0], 62006aec45a7Smrg [Set to "yes" if exported symbols are required]) 62016aec45a7Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 62026aec45a7Smrg [The commands to list exported symbols]) 62036aec45a7Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 62046aec45a7Smrg [Symbols that should not be listed in the preloaded symbols]) 62056aec45a7Smrg_LT_TAGDECL([], [include_expsyms], [1], 62066aec45a7Smrg [Symbols that must always be exported]) 62076aec45a7Smrg_LT_TAGDECL([], [prelink_cmds], [2], 62086aec45a7Smrg [Commands necessary for linking programs (against libraries) with templates]) 6209aa9e3350Smrg_LT_TAGDECL([], [postlink_cmds], [2], 6210aa9e3350Smrg [Commands necessary for finishing linking programs]) 62116aec45a7Smrg_LT_TAGDECL([], [file_list_spec], [1], 62126aec45a7Smrg [Specify filename containing input files]) 62136aec45a7Smrgdnl FIXME: Not yet implemented 62146aec45a7Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62156aec45a7Smrgdnl [Compiler flag to generate thread safe objects]) 62166aec45a7Smrg])# _LT_LINKER_SHLIBS 62176aec45a7Smrg 62186aec45a7Smrg 62196aec45a7Smrg# _LT_LANG_C_CONFIG([TAG]) 62206aec45a7Smrg# ------------------------ 62216aec45a7Smrg# Ensure that the configuration variables for a C compiler are suitably 62226aec45a7Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6223300bf1aeSmrg# the compiler configuration to 'libtool'. 62246aec45a7Smrgm4_defun([_LT_LANG_C_CONFIG], 62256aec45a7Smrg[m4_require([_LT_DECL_EGREP])dnl 6226300bf1aeSmrglt_save_CC=$CC 62276aec45a7SmrgAC_LANG_PUSH(C) 6228ab47cfaaSmrg 62296aec45a7Smrg# Source file extension for C test sources. 62306aec45a7Smrgac_ext=c 6231ab47cfaaSmrg 62326aec45a7Smrg# Object file extension for compiled C test sources. 62336aec45a7Smrgobjext=o 62346aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 6235ab47cfaaSmrg 62366aec45a7Smrg# Code to be used in simple compile tests 62376aec45a7Smrglt_simple_compile_test_code="int some_variable = 0;" 6238ab47cfaaSmrg 62396aec45a7Smrg# Code to be used in simple link tests 62406aec45a7Smrglt_simple_link_test_code='int main(){return(0);}' 6241ab47cfaaSmrg 62426aec45a7Smrg_LT_TAG_COMPILER 62436aec45a7Smrg# Save the default compiler, since it gets overwritten when the other 62446aec45a7Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62456aec45a7Smrgcompiler_DEFAULT=$CC 6246ab47cfaaSmrg 62476aec45a7Smrg# save warnings/boilerplate of simple test code 62486aec45a7Smrg_LT_COMPILER_BOILERPLATE 62496aec45a7Smrg_LT_LINKER_BOILERPLATE 6250ab47cfaaSmrg 62516aec45a7Smrgif test -n "$compiler"; then 62526aec45a7Smrg _LT_COMPILER_NO_RTTI($1) 62536aec45a7Smrg _LT_COMPILER_PIC($1) 62546aec45a7Smrg _LT_COMPILER_C_O($1) 62556aec45a7Smrg _LT_COMPILER_FILE_LOCKS($1) 62566aec45a7Smrg _LT_LINKER_SHLIBS($1) 62576aec45a7Smrg _LT_SYS_DYNAMIC_LINKER($1) 62586aec45a7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 62596aec45a7Smrg LT_SYS_DLOPEN_SELF 62606aec45a7Smrg _LT_CMD_STRIPLIB 62616aec45a7Smrg 6262300bf1aeSmrg # Report what library types will actually be built 62636aec45a7Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62646aec45a7Smrg AC_MSG_RESULT([$can_build_shared]) 62656aec45a7Smrg 62666aec45a7Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6267300bf1aeSmrg test no = "$can_build_shared" && enable_shared=no 62686aec45a7Smrg 62696aec45a7Smrg # On AIX, shared libraries and static libraries use the same namespace, and 62706aec45a7Smrg # are all built from PIC. 62716aec45a7Smrg case $host_os in 62726aec45a7Smrg aix3*) 6273300bf1aeSmrg test yes = "$enable_shared" && enable_static=no 62746aec45a7Smrg if test -n "$RANLIB"; then 62756aec45a7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 62766aec45a7Smrg postinstall_cmds='$RANLIB $lib' 62776aec45a7Smrg fi 62786aec45a7Smrg ;; 6279ab47cfaaSmrg 62806aec45a7Smrg aix[[4-9]]*) 6281300bf1aeSmrg if test ia64 != "$host_cpu"; then 6282300bf1aeSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6283300bf1aeSmrg yes,aix,yes) ;; # shared object as lib.so file only 6284300bf1aeSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 6285300bf1aeSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6286300bf1aeSmrg esac 62876aec45a7Smrg fi 62886aec45a7Smrg ;; 62896aec45a7Smrg esac 62906aec45a7Smrg AC_MSG_RESULT([$enable_shared]) 6291ab47cfaaSmrg 62926aec45a7Smrg AC_MSG_CHECKING([whether to build static libraries]) 62936aec45a7Smrg # Make sure either enable_shared or enable_static is yes. 6294300bf1aeSmrg test yes = "$enable_shared" || enable_static=yes 62956aec45a7Smrg AC_MSG_RESULT([$enable_static]) 6296ab47cfaaSmrg 62976aec45a7Smrg _LT_CONFIG($1) 62986aec45a7Smrgfi 62996aec45a7SmrgAC_LANG_POP 6300300bf1aeSmrgCC=$lt_save_CC 63016aec45a7Smrg])# _LT_LANG_C_CONFIG 6302ab47cfaaSmrg 6303ab47cfaaSmrg 63046aec45a7Smrg# _LT_LANG_CXX_CONFIG([TAG]) 63056aec45a7Smrg# -------------------------- 63066aec45a7Smrg# Ensure that the configuration variables for a C++ compiler are suitably 63076aec45a7Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 6308300bf1aeSmrg# the compiler configuration to 'libtool'. 63096aec45a7Smrgm4_defun([_LT_LANG_CXX_CONFIG], 63106aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63116aec45a7Smrgm4_require([_LT_DECL_EGREP])dnl 6312aa9e3350Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6313300bf1aeSmrgif test -n "$CXX" && ( test no != "$CXX" && 6314300bf1aeSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6315300bf1aeSmrg (test g++ != "$CXX"))); then 63166aec45a7Smrg AC_PROG_CXXCPP 63176aec45a7Smrgelse 63186aec45a7Smrg _lt_caught_CXX_error=yes 63196aec45a7Smrgfi 6320ab47cfaaSmrg 63216aec45a7SmrgAC_LANG_PUSH(C++) 63226aec45a7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 63236aec45a7Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 63246aec45a7Smrg_LT_TAGVAR(always_export_symbols, $1)=no 63256aec45a7Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63266aec45a7Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 63276aec45a7Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 63286aec45a7Smrg_LT_TAGVAR(hardcode_direct, $1)=no 63296aec45a7Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 63306aec45a7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 63316aec45a7Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 63326aec45a7Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63336aec45a7Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 63346aec45a7Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 63356aec45a7Smrg_LT_TAGVAR(inherit_rpath, $1)=no 63366aec45a7Smrg_LT_TAGVAR(module_cmds, $1)= 63376aec45a7Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 63386aec45a7Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 63396aec45a7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 63406aec45a7Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 63416aec45a7Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 63426aec45a7Smrg_LT_TAGVAR(no_undefined_flag, $1)= 63436aec45a7Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 63446aec45a7Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6345ab47cfaaSmrg 63466aec45a7Smrg# Source file extension for C++ test sources. 63476aec45a7Smrgac_ext=cpp 6348ab47cfaaSmrg 63496aec45a7Smrg# Object file extension for compiled C++ test sources. 63506aec45a7Smrgobjext=o 63516aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 63526aec45a7Smrg 63536aec45a7Smrg# No sense in running all these tests if we already determined that 63546aec45a7Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 63556aec45a7Smrg# are currently assumed to apply to all compilers on this platform, 63566aec45a7Smrg# and will be corrupted by setting them based on a non-working compiler. 6357300bf1aeSmrgif test yes != "$_lt_caught_CXX_error"; then 63586aec45a7Smrg # Code to be used in simple compile tests 63596aec45a7Smrg lt_simple_compile_test_code="int some_variable = 0;" 63606aec45a7Smrg 63616aec45a7Smrg # Code to be used in simple link tests 63626aec45a7Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 63636aec45a7Smrg 63646aec45a7Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 63656aec45a7Smrg _LT_TAG_COMPILER 63666aec45a7Smrg 63676aec45a7Smrg # save warnings/boilerplate of simple test code 63686aec45a7Smrg _LT_COMPILER_BOILERPLATE 63696aec45a7Smrg _LT_LINKER_BOILERPLATE 63706aec45a7Smrg 63716aec45a7Smrg # Allow CC to be a program name with arguments. 63726aec45a7Smrg lt_save_CC=$CC 6373aa9e3350Smrg lt_save_CFLAGS=$CFLAGS 63746aec45a7Smrg lt_save_LD=$LD 63756aec45a7Smrg lt_save_GCC=$GCC 63766aec45a7Smrg GCC=$GXX 63776aec45a7Smrg lt_save_with_gnu_ld=$with_gnu_ld 63786aec45a7Smrg lt_save_path_LD=$lt_cv_path_LD 63796aec45a7Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63806aec45a7Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63816aec45a7Smrg else 63826aec45a7Smrg $as_unset lt_cv_prog_gnu_ld 63836aec45a7Smrg fi 63846aec45a7Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 63856aec45a7Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 63866aec45a7Smrg else 63876aec45a7Smrg $as_unset lt_cv_path_LD 63886aec45a7Smrg fi 63896aec45a7Smrg test -z "${LDCXX+set}" || LD=$LDCXX 63906aec45a7Smrg CC=${CXX-"c++"} 6391aa9e3350Smrg CFLAGS=$CXXFLAGS 63926aec45a7Smrg compiler=$CC 63936aec45a7Smrg _LT_TAGVAR(compiler, $1)=$CC 63946aec45a7Smrg _LT_CC_BASENAME([$compiler]) 6395ab47cfaaSmrg 63966aec45a7Smrg if test -n "$compiler"; then 63976aec45a7Smrg # We don't want -fno-exception when compiling C++ code, so set the 63986aec45a7Smrg # no_builtin_flag separately 6399300bf1aeSmrg if test yes = "$GXX"; then 64006aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 64016aec45a7Smrg else 64026aec45a7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 64036aec45a7Smrg fi 6404ab47cfaaSmrg 6405300bf1aeSmrg if test yes = "$GXX"; then 64066aec45a7Smrg # Set up default GNU C++ configuration 6407ab47cfaaSmrg 64086aec45a7Smrg LT_PATH_LD 6409ab47cfaaSmrg 64106aec45a7Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64116aec45a7Smrg # archiving commands below assume that GNU ld is being used. 6412300bf1aeSmrg if test yes = "$with_gnu_ld"; then 6413300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6414300bf1aeSmrg _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' 6415ab47cfaaSmrg 6416300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6417300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6418ab47cfaaSmrg 64196aec45a7Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 64206aec45a7Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64216aec45a7Smrg # investigate it a little bit more. (MM) 6422300bf1aeSmrg wlarc='$wl' 6423ab47cfaaSmrg 64246aec45a7Smrg # ancient GNU ld didn't support --whole-archive et. al. 64256aec45a7Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64266aec45a7Smrg $GREP 'no-whole-archive' > /dev/null; then 6427300bf1aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64286aec45a7Smrg else 64296aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64306aec45a7Smrg fi 64316aec45a7Smrg else 64326aec45a7Smrg with_gnu_ld=no 64336aec45a7Smrg wlarc= 64346aec45a7Smrg 64356aec45a7Smrg # A generic and very simple default shared library creation 64366aec45a7Smrg # command for GNU C++ for the case where it uses the native 64376aec45a7Smrg # linker, instead of GNU ld. If possible, this setting should 64386aec45a7Smrg # overridden to take advantage of the native linker features on 64396aec45a7Smrg # the platform it is being used on. 64406aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64416aec45a7Smrg fi 6442ab47cfaaSmrg 64436aec45a7Smrg # Commands to make compiler produce verbose output that lists 64446aec45a7Smrg # what "hidden" libraries, object files and flags are used when 64456aec45a7Smrg # linking a shared library. 64466aec45a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6447ab47cfaaSmrg 64486aec45a7Smrg else 64496aec45a7Smrg GXX=no 64506aec45a7Smrg with_gnu_ld=no 64516aec45a7Smrg wlarc= 64526aec45a7Smrg fi 6453ab47cfaaSmrg 64546aec45a7Smrg # PORTME: fill in a description of your system's C++ link characteristics 64556aec45a7Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64566aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 64576aec45a7Smrg case $host_os in 64586aec45a7Smrg aix3*) 64596aec45a7Smrg # FIXME: insert proper C++ library support 64606aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 64616aec45a7Smrg ;; 64626aec45a7Smrg aix[[4-9]]*) 6463300bf1aeSmrg if test ia64 = "$host_cpu"; then 64646aec45a7Smrg # On IA64, the linker does run time linking by default, so we don't 64656aec45a7Smrg # have to do anything special. 64666aec45a7Smrg aix_use_runtimelinking=no 64676aec45a7Smrg exp_sym_flag='-Bexport' 6468300bf1aeSmrg no_entry_flag= 64696aec45a7Smrg else 64706aec45a7Smrg aix_use_runtimelinking=no 64716aec45a7Smrg 64726aec45a7Smrg # Test if we are trying to use run time linking or normal 64736aec45a7Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6474300bf1aeSmrg # have runtime linking enabled, and use it for executables. 6475300bf1aeSmrg # For shared libraries, we enable/disable runtime linking 6476300bf1aeSmrg # depending on the kind of the shared library created - 6477300bf1aeSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 6478300bf1aeSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6479300bf1aeSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 6480300bf1aeSmrg # lib.a static archive 6481300bf1aeSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6482300bf1aeSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 6483300bf1aeSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6484300bf1aeSmrg # lib.a(lib.so.V) shared, rtl:no 6485300bf1aeSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6486300bf1aeSmrg # lib.a static archive 64876aec45a7Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 64886aec45a7Smrg for ld_flag in $LDFLAGS; do 64896aec45a7Smrg case $ld_flag in 64906aec45a7Smrg *-brtl*) 64916aec45a7Smrg aix_use_runtimelinking=yes 64926aec45a7Smrg break 64936aec45a7Smrg ;; 64946aec45a7Smrg esac 64956aec45a7Smrg done 6496300bf1aeSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6497300bf1aeSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6498300bf1aeSmrg # so we don't have lib.a shared libs to link our executables. 6499300bf1aeSmrg # We have to force runtime linking in this case. 6500300bf1aeSmrg aix_use_runtimelinking=yes 6501300bf1aeSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6502300bf1aeSmrg fi 65036aec45a7Smrg ;; 65046aec45a7Smrg esac 6505ab47cfaaSmrg 65066aec45a7Smrg exp_sym_flag='-bexport' 65076aec45a7Smrg no_entry_flag='-bnoentry' 65086aec45a7Smrg fi 6509ab47cfaaSmrg 65106aec45a7Smrg # When large executables or shared objects are built, AIX ld can 65116aec45a7Smrg # have problems creating the table of contents. If linking a library 65126aec45a7Smrg # or program results in "error TOC overflow" add -mminimal-toc to 65136aec45a7Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65146aec45a7Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 65156aec45a7Smrg 65166aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='' 65176aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 65186aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65196aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65206aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6521300bf1aeSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6522300bf1aeSmrg case $with_aix_soname,$aix_use_runtimelinking in 6523300bf1aeSmrg aix,*) ;; # no import file 6524300bf1aeSmrg svr4,* | *,yes) # use import file 6525300bf1aeSmrg # The Import File defines what to hardcode. 6526300bf1aeSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6527300bf1aeSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6528300bf1aeSmrg ;; 6529300bf1aeSmrg esac 65306aec45a7Smrg 6531300bf1aeSmrg if test yes = "$GXX"; then 65326aec45a7Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65336aec45a7Smrg # We only want to do this on AIX 4.2 and lower, the check 65346aec45a7Smrg # below for broken collect2 doesn't work under 4.3+ 6535300bf1aeSmrg collect2name=`$CC -print-prog-name=collect2` 65366aec45a7Smrg if test -f "$collect2name" && 65376aec45a7Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65386aec45a7Smrg then 65396aec45a7Smrg # We have reworked collect2 65406aec45a7Smrg : 65416aec45a7Smrg else 65426aec45a7Smrg # We have old collect2 65436aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65446aec45a7Smrg # It fails to find uninstalled libraries when the uninstalled 65456aec45a7Smrg # path is not listed in the libpath. Setting hardcode_minus_L 65466aec45a7Smrg # to unsupported forces relinking 65476aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65486aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65496aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65506aec45a7Smrg fi 65516aec45a7Smrg esac 65526aec45a7Smrg shared_flag='-shared' 6553300bf1aeSmrg if test yes = "$aix_use_runtimelinking"; then 6554300bf1aeSmrg shared_flag=$shared_flag' $wl-G' 65556aec45a7Smrg fi 6556300bf1aeSmrg # Need to ensure runtime linking is disabled for the traditional 6557300bf1aeSmrg # shared library, or the linker may eventually find shared libraries 6558300bf1aeSmrg # /with/ Import File - we do not want to mix them. 6559300bf1aeSmrg shared_flag_aix='-shared' 6560300bf1aeSmrg shared_flag_svr4='-shared $wl-G' 65616aec45a7Smrg else 65626aec45a7Smrg # not using gcc 6563300bf1aeSmrg if test ia64 = "$host_cpu"; then 65646aec45a7Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65656aec45a7Smrg # chokes on -Wl,-G. The following line is correct: 65666aec45a7Smrg shared_flag='-G' 65676aec45a7Smrg else 6568300bf1aeSmrg if test yes = "$aix_use_runtimelinking"; then 6569300bf1aeSmrg shared_flag='$wl-G' 65706aec45a7Smrg else 6571300bf1aeSmrg shared_flag='$wl-bM:SRE' 65726aec45a7Smrg fi 6573300bf1aeSmrg shared_flag_aix='$wl-bM:SRE' 6574300bf1aeSmrg shared_flag_svr4='$wl-G' 65756aec45a7Smrg fi 65766aec45a7Smrg fi 6577ab47cfaaSmrg 6578300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65796aec45a7Smrg # It seems that -bexpall does not export symbols beginning with 65806aec45a7Smrg # underscore (_), so it is better to generate a list of symbols to 65816aec45a7Smrg # export. 65826aec45a7Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6583300bf1aeSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 65846aec45a7Smrg # Warning - without using the other runtime loading flags (-brtl), 65856aec45a7Smrg # -berok will link without error, but may produce a broken library. 6586300bf1aeSmrg # The "-G" linker flag allows undefined symbols. 6587300bf1aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 65886aec45a7Smrg # Determine the default libpath from the value encoded in an empty 65896aec45a7Smrg # executable. 6590aa9e3350Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6591300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65926aec45a7Smrg 6593300bf1aeSmrg _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 65946aec45a7Smrg else 6595300bf1aeSmrg if test ia64 = "$host_cpu"; then 6596300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 65976aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6598300bf1aeSmrg _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" 65996aec45a7Smrg else 66006aec45a7Smrg # Determine the default libpath from the value encoded in an 66016aec45a7Smrg # empty executable. 6602aa9e3350Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 6603300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 66046aec45a7Smrg # Warning - without using the other run time loading flags, 66056aec45a7Smrg # -berok will link without error, but may produce a broken library. 6606300bf1aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6607300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6608300bf1aeSmrg if test yes = "$with_gnu_ld"; then 66096aec45a7Smrg # We only use this code for GNU lds that support --whole-archive. 6610300bf1aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66116aec45a7Smrg else 66126aec45a7Smrg # Exported symbols can be pulled into shared objects from archives 66136aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66146aec45a7Smrg fi 66156aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6616300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6617300bf1aeSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6618300bf1aeSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6619300bf1aeSmrg if test svr4 != "$with_aix_soname"; then 6620300bf1aeSmrg # This is similar to how AIX traditionally builds its shared 6621300bf1aeSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6622300bf1aeSmrg _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' 6623300bf1aeSmrg fi 6624300bf1aeSmrg if test aix != "$with_aix_soname"; then 6625300bf1aeSmrg _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' 6626300bf1aeSmrg else 6627300bf1aeSmrg # used by -dlpreopen to get the symbols 6628300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6629300bf1aeSmrg fi 6630300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66316aec45a7Smrg fi 66326aec45a7Smrg fi 66336aec45a7Smrg ;; 6634ab47cfaaSmrg 66356aec45a7Smrg beos*) 66366aec45a7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66376aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66386aec45a7Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66396aec45a7Smrg # support --undefined. This deserves some investigation. FIXME 6640300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66416aec45a7Smrg else 66426aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66436aec45a7Smrg fi 66446aec45a7Smrg ;; 6645ab47cfaaSmrg 66466aec45a7Smrg chorus*) 66476aec45a7Smrg case $cc_basename in 66486aec45a7Smrg *) 66496aec45a7Smrg # FIXME: insert proper C++ library support 66506aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 66516aec45a7Smrg ;; 66526aec45a7Smrg esac 66536aec45a7Smrg ;; 6654ab47cfaaSmrg 66556aec45a7Smrg cygwin* | mingw* | pw32* | cegcc*) 6656aa9e3350Smrg case $GXX,$cc_basename in 6657aa9e3350Smrg ,cl* | no,cl*) 6658aa9e3350Smrg # Native MSVC 6659aa9e3350Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6660aa9e3350Smrg # no search path for DLLs. 6661aa9e3350Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6662aa9e3350Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6663aa9e3350Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6664aa9e3350Smrg _LT_TAGVAR(file_list_spec, $1)='@' 6665aa9e3350Smrg # Tell ltmain to make .lib files, not .a files. 6666aa9e3350Smrg libext=lib 6667aa9e3350Smrg # Tell ltmain to make .dll files, not .so files. 6668300bf1aeSmrg shrext_cmds=.dll 6669aa9e3350Smrg # FIXME: Setting linknames here is a bad hack. 6670300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6671300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6672300bf1aeSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 6673300bf1aeSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6674300bf1aeSmrg else 6675300bf1aeSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6676300bf1aeSmrg fi~ 6677300bf1aeSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6678300bf1aeSmrg linknames=' 6679aa9e3350Smrg # The linker will not automatically build a static lib if we build a DLL. 6680aa9e3350Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6681aa9e3350Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6682aa9e3350Smrg # Don't use ranlib 6683aa9e3350Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6684aa9e3350Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6685300bf1aeSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6686300bf1aeSmrg case $lt_outputfile in 6687300bf1aeSmrg *.exe|*.EXE) ;; 6688300bf1aeSmrg *) 6689300bf1aeSmrg lt_outputfile=$lt_outputfile.exe 6690300bf1aeSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 6691300bf1aeSmrg ;; 6692300bf1aeSmrg esac~ 6693300bf1aeSmrg func_to_tool_file "$lt_outputfile"~ 6694300bf1aeSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6695300bf1aeSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6696300bf1aeSmrg $RM "$lt_outputfile.manifest"; 6697300bf1aeSmrg fi' 6698aa9e3350Smrg ;; 6699aa9e3350Smrg *) 6700aa9e3350Smrg # g++ 6701aa9e3350Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6702aa9e3350Smrg # as there is no search path for DLLs. 6703aa9e3350Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6704300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6705aa9e3350Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6706aa9e3350Smrg _LT_TAGVAR(always_export_symbols, $1)=no 6707aa9e3350Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6708aa9e3350Smrg 6709aa9e3350Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6710300bf1aeSmrg _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' 6711300bf1aeSmrg # If the export-symbols file already is a .def file, use it as 6712300bf1aeSmrg # is; otherwise, prepend EXPORTS... 6713300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6714300bf1aeSmrg cp $export_symbols $output_objdir/$soname.def; 6715300bf1aeSmrg else 6716300bf1aeSmrg echo EXPORTS > $output_objdir/$soname.def; 6717300bf1aeSmrg cat $export_symbols >> $output_objdir/$soname.def; 6718300bf1aeSmrg fi~ 6719300bf1aeSmrg $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' 6720aa9e3350Smrg else 6721aa9e3350Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6722aa9e3350Smrg fi 6723aa9e3350Smrg ;; 6724aa9e3350Smrg esac 6725aa9e3350Smrg ;; 67266aec45a7Smrg darwin* | rhapsody*) 67276aec45a7Smrg _LT_DARWIN_LINKER_FEATURES($1) 67286aec45a7Smrg ;; 6729ab47cfaaSmrg 6730300bf1aeSmrg os2*) 6731300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6732300bf1aeSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6733300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6734300bf1aeSmrg shrext_cmds=.dll 6735300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6736300bf1aeSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6737300bf1aeSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6738300bf1aeSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6739300bf1aeSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6740300bf1aeSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6741300bf1aeSmrg emximp -o $lib $output_objdir/$libname.def' 6742300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6743300bf1aeSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6744300bf1aeSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6745300bf1aeSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6746300bf1aeSmrg prefix_cmds="$SED"~ 6747300bf1aeSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6748300bf1aeSmrg prefix_cmds="$prefix_cmds -e 1d"; 6749300bf1aeSmrg fi~ 6750300bf1aeSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6751300bf1aeSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6752300bf1aeSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6753300bf1aeSmrg emximp -o $lib $output_objdir/$libname.def' 6754300bf1aeSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6755300bf1aeSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6756300bf1aeSmrg ;; 6757300bf1aeSmrg 67586aec45a7Smrg dgux*) 67596aec45a7Smrg case $cc_basename in 67606aec45a7Smrg ec++*) 67616aec45a7Smrg # FIXME: insert proper C++ library support 67626aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67636aec45a7Smrg ;; 67646aec45a7Smrg ghcx*) 67656aec45a7Smrg # Green Hills C++ Compiler 67666aec45a7Smrg # FIXME: insert proper C++ library support 67676aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67686aec45a7Smrg ;; 67696aec45a7Smrg *) 67706aec45a7Smrg # FIXME: insert proper C++ library support 67716aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67726aec45a7Smrg ;; 67736aec45a7Smrg esac 67746aec45a7Smrg ;; 6775ab47cfaaSmrg 6776aa9e3350Smrg freebsd2.*) 67776aec45a7Smrg # C++ shared libraries reported to be fairly broken before 67786aec45a7Smrg # switch to ELF 67796aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 67806aec45a7Smrg ;; 6781ab47cfaaSmrg 67826aec45a7Smrg freebsd-elf*) 67836aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67846aec45a7Smrg ;; 6785ab47cfaaSmrg 67866aec45a7Smrg freebsd* | dragonfly*) 67876aec45a7Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 67886aec45a7Smrg # conventions 67896aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 67906aec45a7Smrg ;; 6791ab47cfaaSmrg 67926aec45a7Smrg haiku*) 6793300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 67946aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67956aec45a7Smrg ;; 6796ab47cfaaSmrg 67976aec45a7Smrg hpux9*) 6798300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 67996aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6800300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68016aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68026aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68036aec45a7Smrg # but as the default 68046aec45a7Smrg # location of the library. 68056aec45a7Smrg 68066aec45a7Smrg case $cc_basename in 68076aec45a7Smrg CC*) 68086aec45a7Smrg # FIXME: insert proper C++ library support 68096aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68106aec45a7Smrg ;; 68116aec45a7Smrg aCC*) 6812300bf1aeSmrg _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' 68136aec45a7Smrg # Commands to make compiler produce verbose output that lists 68146aec45a7Smrg # what "hidden" libraries, object files and flags are used when 68156aec45a7Smrg # linking a shared library. 68166aec45a7Smrg # 68176aec45a7Smrg # There doesn't appear to be a way to prevent this compiler from 68186aec45a7Smrg # explicitly linking system object files so we need to strip them 68196aec45a7Smrg # from the output so that they don't get included in the library 68206aec45a7Smrg # dependencies. 6821300bf1aeSmrg 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"' 68226aec45a7Smrg ;; 68236aec45a7Smrg *) 6824300bf1aeSmrg if test yes = "$GXX"; then 6825300bf1aeSmrg _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' 68266aec45a7Smrg else 68276aec45a7Smrg # FIXME: insert proper C++ library support 68286aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68296aec45a7Smrg fi 68306aec45a7Smrg ;; 68316aec45a7Smrg esac 68326aec45a7Smrg ;; 6833ab47cfaaSmrg 68346aec45a7Smrg hpux10*|hpux11*) 6835300bf1aeSmrg if test no = "$with_gnu_ld"; then 6836300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68376aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 68386aec45a7Smrg 68396aec45a7Smrg case $host_cpu in 68406aec45a7Smrg hppa*64*|ia64*) 68416aec45a7Smrg ;; 68426aec45a7Smrg *) 6843300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68446aec45a7Smrg ;; 68456aec45a7Smrg esac 68466aec45a7Smrg fi 68476aec45a7Smrg case $host_cpu in 68486aec45a7Smrg hppa*64*|ia64*) 68496aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 68506aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68516aec45a7Smrg ;; 68526aec45a7Smrg *) 68536aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 68546aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68556aec45a7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68566aec45a7Smrg # but as the default 68576aec45a7Smrg # location of the library. 68586aec45a7Smrg ;; 68596aec45a7Smrg esac 68606aec45a7Smrg 68616aec45a7Smrg case $cc_basename in 68626aec45a7Smrg CC*) 68636aec45a7Smrg # FIXME: insert proper C++ library support 68646aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 68656aec45a7Smrg ;; 68666aec45a7Smrg aCC*) 68676aec45a7Smrg case $host_cpu in 68686aec45a7Smrg hppa*64*) 6869300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68706aec45a7Smrg ;; 68716aec45a7Smrg ia64*) 6872300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68736aec45a7Smrg ;; 68746aec45a7Smrg *) 6875300bf1aeSmrg _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' 68766aec45a7Smrg ;; 68776aec45a7Smrg esac 68786aec45a7Smrg # Commands to make compiler produce verbose output that lists 68796aec45a7Smrg # what "hidden" libraries, object files and flags are used when 68806aec45a7Smrg # linking a shared library. 68816aec45a7Smrg # 68826aec45a7Smrg # There doesn't appear to be a way to prevent this compiler from 68836aec45a7Smrg # explicitly linking system object files so we need to strip them 68846aec45a7Smrg # from the output so that they don't get included in the library 68856aec45a7Smrg # dependencies. 6886300bf1aeSmrg 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"' 68876aec45a7Smrg ;; 68886aec45a7Smrg *) 6889300bf1aeSmrg if test yes = "$GXX"; then 6890300bf1aeSmrg if test no = "$with_gnu_ld"; then 68916aec45a7Smrg case $host_cpu in 68926aec45a7Smrg hppa*64*) 6893300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68946aec45a7Smrg ;; 68956aec45a7Smrg ia64*) 6896300bf1aeSmrg _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' 68976aec45a7Smrg ;; 68986aec45a7Smrg *) 6899300bf1aeSmrg _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' 69006aec45a7Smrg ;; 69016aec45a7Smrg esac 69026aec45a7Smrg fi 69036aec45a7Smrg else 69046aec45a7Smrg # FIXME: insert proper C++ library support 69056aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 69066aec45a7Smrg fi 69076aec45a7Smrg ;; 69086aec45a7Smrg esac 69096aec45a7Smrg ;; 6910ab47cfaaSmrg 69116aec45a7Smrg interix[[3-9]]*) 69126aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 69136aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6914300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6915300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69166aec45a7Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69176aec45a7Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69186aec45a7Smrg # default) and relocated if they conflict, which is a slow very memory 69196aec45a7Smrg # consuming and fragmenting process. To avoid this, we pick a random, 69206aec45a7Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69216aec45a7Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6922300bf1aeSmrg _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' 6923300bf1aeSmrg _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' 69246aec45a7Smrg ;; 69256aec45a7Smrg irix5* | irix6*) 69266aec45a7Smrg case $cc_basename in 69276aec45a7Smrg CC*) 69286aec45a7Smrg # SGI C++ 6929300bf1aeSmrg _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' 69306aec45a7Smrg 69316aec45a7Smrg # Archives containing C++ object files must be created using 69326aec45a7Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69336aec45a7Smrg # necessary to make sure instantiated templates are included 69346aec45a7Smrg # in the archive. 69356aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69366aec45a7Smrg ;; 69376aec45a7Smrg *) 6938300bf1aeSmrg if test yes = "$GXX"; then 6939300bf1aeSmrg if test no = "$with_gnu_ld"; then 6940300bf1aeSmrg _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' 69416aec45a7Smrg else 6942300bf1aeSmrg _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' 69436aec45a7Smrg fi 69446aec45a7Smrg fi 69456aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69466aec45a7Smrg ;; 69476aec45a7Smrg esac 6948300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69496aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69506aec45a7Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 69516aec45a7Smrg ;; 6952ab47cfaaSmrg 695338770048Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69546aec45a7Smrg case $cc_basename in 69556aec45a7Smrg KCC*) 69566aec45a7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6957ab47cfaaSmrg 69586aec45a7Smrg # KCC will only create a shared library if the output file 69596aec45a7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69606aec45a7Smrg # to its proper name (with version) after linking. 6961300bf1aeSmrg _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' 6962300bf1aeSmrg _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' 69636aec45a7Smrg # Commands to make compiler produce verbose output that lists 69646aec45a7Smrg # what "hidden" libraries, object files and flags are used when 69656aec45a7Smrg # linking a shared library. 69666aec45a7Smrg # 69676aec45a7Smrg # There doesn't appear to be a way to prevent this compiler from 69686aec45a7Smrg # explicitly linking system object files so we need to strip them 69696aec45a7Smrg # from the output so that they don't get included in the library 69706aec45a7Smrg # dependencies. 6971300bf1aeSmrg 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"' 69726aec45a7Smrg 6973300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6974300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 69756aec45a7Smrg 69766aec45a7Smrg # Archives containing C++ object files must be created using 69776aec45a7Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69786aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69796aec45a7Smrg ;; 69806aec45a7Smrg icpc* | ecpc* ) 69816aec45a7Smrg # Intel C++ 69826aec45a7Smrg with_gnu_ld=yes 69836aec45a7Smrg # version 8.0 and above of icpc choke on multiply defined symbols 69846aec45a7Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 69856aec45a7Smrg # earlier do not add the objects themselves. 69866aec45a7Smrg case `$CC -V 2>&1` in 69876aec45a7Smrg *"Version 7."*) 6988300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6989300bf1aeSmrg _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' 69906aec45a7Smrg ;; 69916aec45a7Smrg *) # Version 8.0 or newer 69926aec45a7Smrg tmp_idyn= 69936aec45a7Smrg case $host_cpu in 69946aec45a7Smrg ia64*) tmp_idyn=' -i_dynamic';; 69956aec45a7Smrg esac 6996300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6997300bf1aeSmrg _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' 69986aec45a7Smrg ;; 69996aec45a7Smrg esac 70006aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7001300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7002300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7003300bf1aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 70046aec45a7Smrg ;; 70056aec45a7Smrg pgCC* | pgcpp*) 70066aec45a7Smrg # Portland Group C++ compiler 70076aec45a7Smrg case `$CC -V` in 70086aec45a7Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 70096aec45a7Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7010300bf1aeSmrg rm -rf $tpldir~ 7011300bf1aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7012300bf1aeSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70136aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7014300bf1aeSmrg rm -rf $tpldir~ 7015300bf1aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7016300bf1aeSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7017300bf1aeSmrg $RANLIB $oldlib' 70186aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7019300bf1aeSmrg rm -rf $tpldir~ 7020300bf1aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7021300bf1aeSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70226aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7023300bf1aeSmrg rm -rf $tpldir~ 7024300bf1aeSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7025300bf1aeSmrg $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' 70266aec45a7Smrg ;; 70276aec45a7Smrg *) # Version 6 and above use weak symbols 7028300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7029300bf1aeSmrg _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' 70306aec45a7Smrg ;; 70316aec45a7Smrg esac 7032ab47cfaaSmrg 7033300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7034300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7035300bf1aeSmrg _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' 70366aec45a7Smrg ;; 70376aec45a7Smrg cxx*) 70386aec45a7Smrg # Compaq C++ 7039300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7040300bf1aeSmrg _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' 7041ab47cfaaSmrg 70426aec45a7Smrg runpath_var=LD_RUN_PATH 70436aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70446aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7045ab47cfaaSmrg 70466aec45a7Smrg # Commands to make compiler produce verbose output that lists 70476aec45a7Smrg # what "hidden" libraries, object files and flags are used when 70486aec45a7Smrg # linking a shared library. 70496aec45a7Smrg # 70506aec45a7Smrg # There doesn't appear to be a way to prevent this compiler from 70516aec45a7Smrg # explicitly linking system object files so we need to strip them 70526aec45a7Smrg # from the output so that they don't get included in the library 70536aec45a7Smrg # dependencies. 7054300bf1aeSmrg 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' 70556aec45a7Smrg ;; 70566aec45a7Smrg xl* | mpixl* | bgxl*) 70576aec45a7Smrg # IBM XL 8.0 on PPC, with GNU ld 7058300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7059300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7060300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7061300bf1aeSmrg if test yes = "$supports_anon_versioning"; then 70626aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7063300bf1aeSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7064300bf1aeSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7065300bf1aeSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70666aec45a7Smrg fi 70676aec45a7Smrg ;; 70686aec45a7Smrg *) 70696aec45a7Smrg case `$CC -V 2>&1 | sed 5q` in 70706aec45a7Smrg *Sun\ C*) 70716aec45a7Smrg # Sun C++ 5.9 70726aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7073300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7074300bf1aeSmrg _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' 70756aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7076300bf1aeSmrg _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' 70776aec45a7Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 70786aec45a7Smrg 70796aec45a7Smrg # Not sure whether something based on 70806aec45a7Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70816aec45a7Smrg # would be better. 70826aec45a7Smrg output_verbose_link_cmd='func_echo_all' 70836aec45a7Smrg 70846aec45a7Smrg # Archives containing C++ object files must be created using 70856aec45a7Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 70866aec45a7Smrg # necessary to make sure instantiated templates are included 70876aec45a7Smrg # in the archive. 70886aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 70896aec45a7Smrg ;; 70906aec45a7Smrg esac 70916aec45a7Smrg ;; 70926aec45a7Smrg esac 70936aec45a7Smrg ;; 7094ab47cfaaSmrg 70956aec45a7Smrg lynxos*) 70966aec45a7Smrg # FIXME: insert proper C++ library support 70976aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 70986aec45a7Smrg ;; 7099ab47cfaaSmrg 71006aec45a7Smrg m88k*) 71016aec45a7Smrg # FIXME: insert proper C++ library support 71026aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71036aec45a7Smrg ;; 7104ab47cfaaSmrg 71056aec45a7Smrg mvs*) 71066aec45a7Smrg case $cc_basename in 71076aec45a7Smrg cxx*) 71086aec45a7Smrg # FIXME: insert proper C++ library support 71096aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71106aec45a7Smrg ;; 71116aec45a7Smrg *) 71126aec45a7Smrg # FIXME: insert proper C++ library support 71136aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71146aec45a7Smrg ;; 71156aec45a7Smrg esac 71166aec45a7Smrg ;; 7117ab47cfaaSmrg 71186aec45a7Smrg netbsd*) 71196aec45a7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71206aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71216aec45a7Smrg wlarc= 71226aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71236aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71246aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71256aec45a7Smrg fi 71266aec45a7Smrg # Workaround some broken pre-1.5 toolchains 71276aec45a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71286aec45a7Smrg ;; 7129ab47cfaaSmrg 71306aec45a7Smrg *nto* | *qnx*) 71316aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 71326aec45a7Smrg ;; 7133ab47cfaaSmrg 7134300bf1aeSmrg openbsd* | bitrig*) 71356aec45a7Smrg if test -f /usr/libexec/ld.so; then 71366aec45a7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 71376aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71386aec45a7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71396aec45a7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7140300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7141300bf1aeSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7142300bf1aeSmrg _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' 7143300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7144300bf1aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71456aec45a7Smrg fi 71466aec45a7Smrg output_verbose_link_cmd=func_echo_all 71476aec45a7Smrg else 71486aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71496aec45a7Smrg fi 71506aec45a7Smrg ;; 7151ab47cfaaSmrg 71526aec45a7Smrg osf3* | osf4* | osf5*) 71536aec45a7Smrg case $cc_basename in 71546aec45a7Smrg KCC*) 71556aec45a7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 71566aec45a7Smrg 71576aec45a7Smrg # KCC will only create a shared library if the output file 71586aec45a7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71596aec45a7Smrg # to its proper name (with version) after linking. 7160300bf1aeSmrg _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' 71616aec45a7Smrg 7162300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71636aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 71646aec45a7Smrg 71656aec45a7Smrg # Archives containing C++ object files must be created using 71666aec45a7Smrg # the KAI C++ compiler. 71676aec45a7Smrg case $host in 71686aec45a7Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71696aec45a7Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71706aec45a7Smrg esac 71716aec45a7Smrg ;; 71726aec45a7Smrg RCC*) 71736aec45a7Smrg # Rational C++ 2.4.1 71746aec45a7Smrg # FIXME: insert proper C++ library support 71756aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 71766aec45a7Smrg ;; 71776aec45a7Smrg cxx*) 71786aec45a7Smrg case $host in 71796aec45a7Smrg osf3*) 7180300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7181300bf1aeSmrg _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' 7182300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71836aec45a7Smrg ;; 71846aec45a7Smrg *) 71856aec45a7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7186300bf1aeSmrg _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' 71876aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7188300bf1aeSmrg echo "-hidden">> $lib.exp~ 7189300bf1aeSmrg $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~ 7190300bf1aeSmrg $RM $lib.exp' 71916aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 71926aec45a7Smrg ;; 71936aec45a7Smrg esac 7194ab47cfaaSmrg 71956aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7196ab47cfaaSmrg 71976aec45a7Smrg # Commands to make compiler produce verbose output that lists 71986aec45a7Smrg # what "hidden" libraries, object files and flags are used when 71996aec45a7Smrg # linking a shared library. 72006aec45a7Smrg # 72016aec45a7Smrg # There doesn't appear to be a way to prevent this compiler from 72026aec45a7Smrg # explicitly linking system object files so we need to strip them 72036aec45a7Smrg # from the output so that they don't get included in the library 72046aec45a7Smrg # dependencies. 7205300bf1aeSmrg 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"' 72066aec45a7Smrg ;; 72076aec45a7Smrg *) 7208300bf1aeSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7209300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72106aec45a7Smrg case $host in 72116aec45a7Smrg osf3*) 7212300bf1aeSmrg _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' 72136aec45a7Smrg ;; 72146aec45a7Smrg *) 7215300bf1aeSmrg _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' 72166aec45a7Smrg ;; 72176aec45a7Smrg esac 72186aec45a7Smrg 7219300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72206aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 72216aec45a7Smrg 72226aec45a7Smrg # Commands to make compiler produce verbose output that lists 72236aec45a7Smrg # what "hidden" libraries, object files and flags are used when 72246aec45a7Smrg # linking a shared library. 72256aec45a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 72266aec45a7Smrg 72276aec45a7Smrg else 72286aec45a7Smrg # FIXME: insert proper C++ library support 72296aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72306aec45a7Smrg fi 72316aec45a7Smrg ;; 72326aec45a7Smrg esac 72336aec45a7Smrg ;; 7234ab47cfaaSmrg 72356aec45a7Smrg psos*) 72366aec45a7Smrg # FIXME: insert proper C++ library support 72376aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72386aec45a7Smrg ;; 7239ab47cfaaSmrg 72406aec45a7Smrg sunos4*) 72416aec45a7Smrg case $cc_basename in 72426aec45a7Smrg CC*) 72436aec45a7Smrg # Sun C++ 4.x 72446aec45a7Smrg # FIXME: insert proper C++ library support 72456aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72466aec45a7Smrg ;; 72476aec45a7Smrg lcc*) 72486aec45a7Smrg # Lucid 72496aec45a7Smrg # FIXME: insert proper C++ library support 72506aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72516aec45a7Smrg ;; 72526aec45a7Smrg *) 72536aec45a7Smrg # FIXME: insert proper C++ library support 72546aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 72556aec45a7Smrg ;; 72566aec45a7Smrg esac 72576aec45a7Smrg ;; 7258ab47cfaaSmrg 72596aec45a7Smrg solaris*) 72606aec45a7Smrg case $cc_basename in 72616aec45a7Smrg CC* | sunCC*) 72626aec45a7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 72636aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72646aec45a7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7265300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72666aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7267300bf1aeSmrg $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' 72686aec45a7Smrg 72696aec45a7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72706aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72716aec45a7Smrg case $host_os in 72726aec45a7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72736aec45a7Smrg *) 72746aec45a7Smrg # The compiler driver will combine and reorder linker options, 7275300bf1aeSmrg # but understands '-z linker_flag'. 72766aec45a7Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 72776aec45a7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72786aec45a7Smrg ;; 72796aec45a7Smrg esac 72806aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7281ab47cfaaSmrg 72826aec45a7Smrg output_verbose_link_cmd='func_echo_all' 7283ab47cfaaSmrg 72846aec45a7Smrg # Archives containing C++ object files must be created using 72856aec45a7Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 72866aec45a7Smrg # necessary to make sure instantiated templates are included 72876aec45a7Smrg # in the archive. 72886aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 72896aec45a7Smrg ;; 72906aec45a7Smrg gcx*) 72916aec45a7Smrg # Green Hills C++ Compiler 7292300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7293ab47cfaaSmrg 72946aec45a7Smrg # The C++ compiler must be used to create the archive. 72956aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 72966aec45a7Smrg ;; 72976aec45a7Smrg *) 72986aec45a7Smrg # GNU C++ compiler with Solaris linker 7299300bf1aeSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7300300bf1aeSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 73016aec45a7Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7302300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73036aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7304300bf1aeSmrg $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' 73056aec45a7Smrg 73066aec45a7Smrg # Commands to make compiler produce verbose output that lists 73076aec45a7Smrg # what "hidden" libraries, object files and flags are used when 73086aec45a7Smrg # linking a shared library. 73096aec45a7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73106aec45a7Smrg else 7311300bf1aeSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73126aec45a7Smrg # platform. 7313300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73146aec45a7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7315300bf1aeSmrg $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' 73166aec45a7Smrg 73176aec45a7Smrg # Commands to make compiler produce verbose output that lists 73186aec45a7Smrg # what "hidden" libraries, object files and flags are used when 73196aec45a7Smrg # linking a shared library. 73206aec45a7Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73216aec45a7Smrg fi 73226aec45a7Smrg 7323300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73246aec45a7Smrg case $host_os in 73256aec45a7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73266aec45a7Smrg *) 7327300bf1aeSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73286aec45a7Smrg ;; 73296aec45a7Smrg esac 73306aec45a7Smrg fi 73316aec45a7Smrg ;; 73326aec45a7Smrg esac 73336aec45a7Smrg ;; 7334ab47cfaaSmrg 73356aec45a7Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7336300bf1aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73376aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73386aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73396aec45a7Smrg runpath_var='LD_RUN_PATH' 7340ab47cfaaSmrg 73416aec45a7Smrg case $cc_basename in 73426aec45a7Smrg CC*) 7343300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7344300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73456aec45a7Smrg ;; 73466aec45a7Smrg *) 7347300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7348300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73496aec45a7Smrg ;; 73506aec45a7Smrg esac 73516aec45a7Smrg ;; 7352ab47cfaaSmrg 73536aec45a7Smrg sysv5* | sco3.2v5* | sco5v6*) 7354300bf1aeSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 73556aec45a7Smrg # link with -lc, and that would cause any symbols used from libc to 73566aec45a7Smrg # always be unresolved, which means just about no library would 73576aec45a7Smrg # ever link correctly. If we're not using GNU ld we use -z text 73586aec45a7Smrg # though, which does catch some bad symbols but isn't as heavy-handed 73596aec45a7Smrg # as -z defs. 7360300bf1aeSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7361300bf1aeSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73626aec45a7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73636aec45a7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7364300bf1aeSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73656aec45a7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73666aec45a7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7367300bf1aeSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73686aec45a7Smrg runpath_var='LD_RUN_PATH' 7369ab47cfaaSmrg 73706aec45a7Smrg case $cc_basename in 73716aec45a7Smrg CC*) 7372300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7373300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73746aec45a7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7375300bf1aeSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 73766aec45a7Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7377300bf1aeSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 73786aec45a7Smrg ;; 73796aec45a7Smrg *) 7380300bf1aeSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7381300bf1aeSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73826aec45a7Smrg ;; 73836aec45a7Smrg esac 73846aec45a7Smrg ;; 7385ab47cfaaSmrg 73866aec45a7Smrg tandem*) 73876aec45a7Smrg case $cc_basename in 73886aec45a7Smrg NCC*) 73896aec45a7Smrg # NonStop-UX NCC 3.20 73906aec45a7Smrg # FIXME: insert proper C++ library support 73916aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73926aec45a7Smrg ;; 73936aec45a7Smrg *) 73946aec45a7Smrg # FIXME: insert proper C++ library support 73956aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 73966aec45a7Smrg ;; 73976aec45a7Smrg esac 73986aec45a7Smrg ;; 7399ab47cfaaSmrg 74006aec45a7Smrg vxworks*) 74016aec45a7Smrg # FIXME: insert proper C++ library support 74026aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74036aec45a7Smrg ;; 7404ab47cfaaSmrg 74056aec45a7Smrg *) 74066aec45a7Smrg # FIXME: insert proper C++ library support 74076aec45a7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 74086aec45a7Smrg ;; 74096aec45a7Smrg esac 7410ab47cfaaSmrg 74116aec45a7Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7412300bf1aeSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 74136aec45a7Smrg 7414300bf1aeSmrg _LT_TAGVAR(GCC, $1)=$GXX 7415300bf1aeSmrg _LT_TAGVAR(LD, $1)=$LD 74166aec45a7Smrg 74176aec45a7Smrg ## CAVEAT EMPTOR: 74186aec45a7Smrg ## There is no encapsulation within the following macros, do not change 74196aec45a7Smrg ## the running order or otherwise move them around unless you know exactly 74206aec45a7Smrg ## what you are doing... 74216aec45a7Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 74226aec45a7Smrg _LT_COMPILER_PIC($1) 74236aec45a7Smrg _LT_COMPILER_C_O($1) 74246aec45a7Smrg _LT_COMPILER_FILE_LOCKS($1) 74256aec45a7Smrg _LT_LINKER_SHLIBS($1) 74266aec45a7Smrg _LT_SYS_DYNAMIC_LINKER($1) 74276aec45a7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 74286aec45a7Smrg 74296aec45a7Smrg _LT_CONFIG($1) 74306aec45a7Smrg fi # test -n "$compiler" 74316aec45a7Smrg 74326aec45a7Smrg CC=$lt_save_CC 7433aa9e3350Smrg CFLAGS=$lt_save_CFLAGS 74346aec45a7Smrg LDCXX=$LD 74356aec45a7Smrg LD=$lt_save_LD 74366aec45a7Smrg GCC=$lt_save_GCC 74376aec45a7Smrg with_gnu_ld=$lt_save_with_gnu_ld 74386aec45a7Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 74396aec45a7Smrg lt_cv_path_LD=$lt_save_path_LD 74406aec45a7Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74416aec45a7Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7442300bf1aeSmrgfi # test yes != "$_lt_caught_CXX_error" 7443ab47cfaaSmrg 74446aec45a7SmrgAC_LANG_POP 74456aec45a7Smrg])# _LT_LANG_CXX_CONFIG 7446ab47cfaaSmrg 7447ab47cfaaSmrg 7448aa9e3350Smrg# _LT_FUNC_STRIPNAME_CNF 7449aa9e3350Smrg# ---------------------- 7450aa9e3350Smrg# func_stripname_cnf prefix suffix name 7451aa9e3350Smrg# strip PREFIX and SUFFIX off of NAME. 7452aa9e3350Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7453aa9e3350Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7454aa9e3350Smrg# dot (in which case that matches only a dot). 7455aa9e3350Smrg# 7456aa9e3350Smrg# This function is identical to the (non-XSI) version of func_stripname, 7457aa9e3350Smrg# except this one can be used by m4 code that may be executed by configure, 7458aa9e3350Smrg# rather than the libtool script. 7459aa9e3350Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7460aa9e3350SmrgAC_REQUIRE([_LT_DECL_SED]) 7461aa9e3350SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7462aa9e3350Smrgfunc_stripname_cnf () 7463aa9e3350Smrg{ 7464300bf1aeSmrg case @S|@2 in 7465300bf1aeSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7466300bf1aeSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7467aa9e3350Smrg esac 7468aa9e3350Smrg} # func_stripname_cnf 7469aa9e3350Smrg])# _LT_FUNC_STRIPNAME_CNF 7470aa9e3350Smrg 7471300bf1aeSmrg 74726aec45a7Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74736aec45a7Smrg# --------------------------------- 74746aec45a7Smrg# Figure out "hidden" library dependencies from verbose 74756aec45a7Smrg# compiler output when linking a shared library. 74766aec45a7Smrg# Parse the compiler output and extract the necessary 74776aec45a7Smrg# objects, libraries and library flags. 74786aec45a7Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74796aec45a7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7480aa9e3350SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74816aec45a7Smrg# Dependencies to place before and after the object being linked: 74826aec45a7Smrg_LT_TAGVAR(predep_objects, $1)= 74836aec45a7Smrg_LT_TAGVAR(postdep_objects, $1)= 74846aec45a7Smrg_LT_TAGVAR(predeps, $1)= 74856aec45a7Smrg_LT_TAGVAR(postdeps, $1)= 74866aec45a7Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7487ab47cfaaSmrg 74886aec45a7Smrgdnl we can't use the lt_simple_compile_test_code here, 74896aec45a7Smrgdnl because it contains code intended for an executable, 74906aec45a7Smrgdnl not a library. It's possible we should let each 74916aec45a7Smrgdnl tag define a new lt_????_link_test_code variable, 74926aec45a7Smrgdnl but it's only used here... 74936aec45a7Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 74946aec45a7Smrgint a; 74956aec45a7Smrgvoid foo (void) { a = 0; } 74966aec45a7Smrg_LT_EOF 74976aec45a7Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 74986aec45a7Smrgclass Foo 74996aec45a7Smrg{ 75006aec45a7Smrgpublic: 75016aec45a7Smrg Foo (void) { a = 0; } 75026aec45a7Smrgprivate: 75036aec45a7Smrg int a; 75046aec45a7Smrg}; 75056aec45a7Smrg_LT_EOF 75066aec45a7Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 75076aec45a7Smrg subroutine foo 75086aec45a7Smrg implicit none 75096aec45a7Smrg integer*4 a 75106aec45a7Smrg a=0 75116aec45a7Smrg return 75126aec45a7Smrg end 75136aec45a7Smrg_LT_EOF 75146aec45a7Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75156aec45a7Smrg subroutine foo 75166aec45a7Smrg implicit none 75176aec45a7Smrg integer a 75186aec45a7Smrg a=0 75196aec45a7Smrg return 75206aec45a7Smrg end 75216aec45a7Smrg_LT_EOF 75226aec45a7Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75236aec45a7Smrgpublic class foo { 75246aec45a7Smrg private int a; 75256aec45a7Smrg public void bar (void) { 75266aec45a7Smrg a = 0; 75276aec45a7Smrg } 75286aec45a7Smrg}; 75296aec45a7Smrg_LT_EOF 7530aa9e3350Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7531aa9e3350Smrgpackage foo 7532aa9e3350Smrgfunc foo() { 7533aa9e3350Smrg} 7534aa9e3350Smrg_LT_EOF 75355c42550eSmrg]) 7536aa9e3350Smrg 7537aa9e3350Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 7538aa9e3350Smrgcase "$CC $CFLAGS " in #( 7539aa9e3350Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7540aa9e3350Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7541aa9e3350Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7542aa9e3350Smrgesac 7543aa9e3350Smrg 75446aec45a7Smrgdnl Parse the compiler output and extract the necessary 75456aec45a7Smrgdnl objects, libraries and library flags. 75466aec45a7Smrgif AC_TRY_EVAL(ac_compile); then 75476aec45a7Smrg # Parse the compiler output and extract the necessary 75486aec45a7Smrg # objects, libraries and library flags. 7549ab47cfaaSmrg 75506aec45a7Smrg # Sentinel used to keep track of whether or not we are before 75516aec45a7Smrg # the conftest object file. 75526aec45a7Smrg pre_test_object_deps_done=no 75531473d951Smrg 75546aec45a7Smrg for p in `eval "$output_verbose_link_cmd"`; do 7555300bf1aeSmrg case $prev$p in 7556ab47cfaaSmrg 75576aec45a7Smrg -L* | -R* | -l*) 75586aec45a7Smrg # Some compilers place space between "-{L,R}" and the path. 75596aec45a7Smrg # Remove the space. 7560300bf1aeSmrg if test x-L = "$p" || 7561300bf1aeSmrg test x-R = "$p"; then 75626aec45a7Smrg prev=$p 75636aec45a7Smrg continue 75646aec45a7Smrg fi 7565ab47cfaaSmrg 7566aa9e3350Smrg # Expand the sysroot to ease extracting the directories later. 7567aa9e3350Smrg if test -z "$prev"; then 7568aa9e3350Smrg case $p in 7569aa9e3350Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7570aa9e3350Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7571aa9e3350Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7572aa9e3350Smrg esac 7573aa9e3350Smrg fi 7574aa9e3350Smrg case $p in 7575aa9e3350Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7576aa9e3350Smrg esac 7577300bf1aeSmrg if test no = "$pre_test_object_deps_done"; then 7578300bf1aeSmrg case $prev in 7579aa9e3350Smrg -L | -R) 75806aec45a7Smrg # Internal compiler library paths should come after those 75816aec45a7Smrg # provided the user. The postdeps already come after the 75826aec45a7Smrg # user supplied libs so there is no need to process them. 75836aec45a7Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7584300bf1aeSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 75856aec45a7Smrg else 7586300bf1aeSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 75876aec45a7Smrg fi 75886aec45a7Smrg ;; 75896aec45a7Smrg # The "-l" case would never come before the object being 75906aec45a7Smrg # linked, so don't bother handling this case. 75916aec45a7Smrg esac 75926aec45a7Smrg else 75936aec45a7Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7594300bf1aeSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 75956aec45a7Smrg else 7596300bf1aeSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 75976aec45a7Smrg fi 75986aec45a7Smrg fi 7599aa9e3350Smrg prev= 76006aec45a7Smrg ;; 7601ab47cfaaSmrg 7602aa9e3350Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 76036aec45a7Smrg *.$objext) 76046aec45a7Smrg # This assumes that the test object file only shows up 76056aec45a7Smrg # once in the compiler output. 76066aec45a7Smrg if test "$p" = "conftest.$objext"; then 76076aec45a7Smrg pre_test_object_deps_done=yes 76086aec45a7Smrg continue 76096aec45a7Smrg fi 7610ab47cfaaSmrg 7611300bf1aeSmrg if test no = "$pre_test_object_deps_done"; then 76126aec45a7Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7613300bf1aeSmrg _LT_TAGVAR(predep_objects, $1)=$p 76146aec45a7Smrg else 76156aec45a7Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76166aec45a7Smrg fi 76176aec45a7Smrg else 76186aec45a7Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7619300bf1aeSmrg _LT_TAGVAR(postdep_objects, $1)=$p 76206aec45a7Smrg else 76216aec45a7Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76226aec45a7Smrg fi 76236aec45a7Smrg fi 76246aec45a7Smrg ;; 7625ab47cfaaSmrg 76266aec45a7Smrg *) ;; # Ignore the rest. 7627ab47cfaaSmrg 76286aec45a7Smrg esac 76296aec45a7Smrg done 7630ab47cfaaSmrg 76316aec45a7Smrg # Clean up. 76326aec45a7Smrg rm -f a.out a.exe 76336aec45a7Smrgelse 76346aec45a7Smrg echo "libtool.m4: error: problem compiling $1 test program" 76356aec45a7Smrgfi 76361473d951Smrg 76376aec45a7Smrg$RM -f confest.$objext 7638aa9e3350SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7639ab47cfaaSmrg 76406aec45a7Smrg# PORTME: override above test on systems where it is broken 76416aec45a7Smrgm4_if([$1], [CXX], 76426aec45a7Smrg[case $host_os in 76436aec45a7Smrginterix[[3-9]]*) 76446aec45a7Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76456aec45a7Smrg # hack all around it, let's just trust "g++" to DTRT. 76466aec45a7Smrg _LT_TAGVAR(predep_objects,$1)= 76476aec45a7Smrg _LT_TAGVAR(postdep_objects,$1)= 76486aec45a7Smrg _LT_TAGVAR(postdeps,$1)= 76495c42550eSmrg ;; 76505c42550eSmrgesac 76516aec45a7Smrg]) 76521473d951Smrg 76536aec45a7Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 76546aec45a7Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76555c42550eSmrgesac 76566aec45a7Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76576aec45a7Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7658300bf1aeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76596aec45a7Smrgfi 76606aec45a7Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76616aec45a7Smrg [The directories searched by this compiler when creating a shared library]) 76626aec45a7Smrg_LT_TAGDECL([], [predep_objects], [1], 76636aec45a7Smrg [Dependencies to place before and after the objects being linked to 76646aec45a7Smrg create a shared library]) 76656aec45a7Smrg_LT_TAGDECL([], [postdep_objects], [1]) 76666aec45a7Smrg_LT_TAGDECL([], [predeps], [1]) 76676aec45a7Smrg_LT_TAGDECL([], [postdeps], [1]) 76686aec45a7Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76696aec45a7Smrg [The library search path used internally by the compiler when linking 76706aec45a7Smrg a shared library]) 76716aec45a7Smrg])# _LT_SYS_HIDDEN_LIBDEPS 76726aec45a7Smrg 76736aec45a7Smrg 76746aec45a7Smrg# _LT_LANG_F77_CONFIG([TAG]) 76756aec45a7Smrg# -------------------------- 76766aec45a7Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 76776aec45a7Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7678300bf1aeSmrg# to write the compiler configuration to 'libtool'. 76796aec45a7Smrgm4_defun([_LT_LANG_F77_CONFIG], 76806aec45a7Smrg[AC_LANG_PUSH(Fortran 77) 7681300bf1aeSmrgif test -z "$F77" || test no = "$F77"; then 76826aec45a7Smrg _lt_disable_F77=yes 76836aec45a7Smrgfi 7684ab47cfaaSmrg 76856aec45a7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 76866aec45a7Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 76876aec45a7Smrg_LT_TAGVAR(always_export_symbols, $1)=no 76886aec45a7Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 76896aec45a7Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 76906aec45a7Smrg_LT_TAGVAR(hardcode_direct, $1)=no 76916aec45a7Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 76926aec45a7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 76936aec45a7Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 76946aec45a7Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 76956aec45a7Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 76966aec45a7Smrg_LT_TAGVAR(inherit_rpath, $1)=no 76976aec45a7Smrg_LT_TAGVAR(module_cmds, $1)= 76986aec45a7Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 76996aec45a7Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 77006aec45a7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 77016aec45a7Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 77026aec45a7Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 77036aec45a7Smrg_LT_TAGVAR(no_undefined_flag, $1)= 77046aec45a7Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 77056aec45a7Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7706ab47cfaaSmrg 77076aec45a7Smrg# Source file extension for f77 test sources. 77086aec45a7Smrgac_ext=f 7709ab47cfaaSmrg 77106aec45a7Smrg# Object file extension for compiled f77 test sources. 77116aec45a7Smrgobjext=o 77126aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 77136aec45a7Smrg 77146aec45a7Smrg# No sense in running all these tests if we already determined that 77156aec45a7Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 77166aec45a7Smrg# are currently assumed to apply to all compilers on this platform, 77176aec45a7Smrg# and will be corrupted by setting them based on a non-working compiler. 7718300bf1aeSmrgif test yes != "$_lt_disable_F77"; then 77196aec45a7Smrg # Code to be used in simple compile tests 77206aec45a7Smrg lt_simple_compile_test_code="\ 77216aec45a7Smrg subroutine t 77226aec45a7Smrg return 77236aec45a7Smrg end 77246aec45a7Smrg" 77251473d951Smrg 77266aec45a7Smrg # Code to be used in simple link tests 77276aec45a7Smrg lt_simple_link_test_code="\ 77286aec45a7Smrg program t 77296aec45a7Smrg end 77306aec45a7Smrg" 77311473d951Smrg 77326aec45a7Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 77336aec45a7Smrg _LT_TAG_COMPILER 77341473d951Smrg 77356aec45a7Smrg # save warnings/boilerplate of simple test code 77366aec45a7Smrg _LT_COMPILER_BOILERPLATE 77376aec45a7Smrg _LT_LINKER_BOILERPLATE 7738ab47cfaaSmrg 77396aec45a7Smrg # Allow CC to be a program name with arguments. 7740300bf1aeSmrg lt_save_CC=$CC 77416aec45a7Smrg lt_save_GCC=$GCC 7742aa9e3350Smrg lt_save_CFLAGS=$CFLAGS 77436aec45a7Smrg CC=${F77-"f77"} 7744aa9e3350Smrg CFLAGS=$FFLAGS 77456aec45a7Smrg compiler=$CC 77466aec45a7Smrg _LT_TAGVAR(compiler, $1)=$CC 77476aec45a7Smrg _LT_CC_BASENAME([$compiler]) 77486aec45a7Smrg GCC=$G77 77496aec45a7Smrg if test -n "$compiler"; then 77506aec45a7Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 77516aec45a7Smrg AC_MSG_RESULT([$can_build_shared]) 77521473d951Smrg 77536aec45a7Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7754300bf1aeSmrg test no = "$can_build_shared" && enable_shared=no 77551473d951Smrg 77566aec45a7Smrg # On AIX, shared libraries and static libraries use the same namespace, and 77576aec45a7Smrg # are all built from PIC. 77586aec45a7Smrg case $host_os in 77596aec45a7Smrg aix3*) 7760300bf1aeSmrg test yes = "$enable_shared" && enable_static=no 77616aec45a7Smrg if test -n "$RANLIB"; then 77626aec45a7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 77636aec45a7Smrg postinstall_cmds='$RANLIB $lib' 77646aec45a7Smrg fi 77656aec45a7Smrg ;; 77666aec45a7Smrg aix[[4-9]]*) 7767300bf1aeSmrg if test ia64 != "$host_cpu"; then 7768300bf1aeSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7769300bf1aeSmrg yes,aix,yes) ;; # shared object as lib.so file only 7770300bf1aeSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7771300bf1aeSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7772300bf1aeSmrg esac 77736aec45a7Smrg fi 77746aec45a7Smrg ;; 77756aec45a7Smrg esac 77766aec45a7Smrg AC_MSG_RESULT([$enable_shared]) 77776aec45a7Smrg 77786aec45a7Smrg AC_MSG_CHECKING([whether to build static libraries]) 77796aec45a7Smrg # Make sure either enable_shared or enable_static is yes. 7780300bf1aeSmrg test yes = "$enable_shared" || enable_static=yes 77816aec45a7Smrg AC_MSG_RESULT([$enable_static]) 77826aec45a7Smrg 7783300bf1aeSmrg _LT_TAGVAR(GCC, $1)=$G77 7784300bf1aeSmrg _LT_TAGVAR(LD, $1)=$LD 77856aec45a7Smrg 77866aec45a7Smrg ## CAVEAT EMPTOR: 77876aec45a7Smrg ## There is no encapsulation within the following macros, do not change 77886aec45a7Smrg ## the running order or otherwise move them around unless you know exactly 77896aec45a7Smrg ## what you are doing... 77906aec45a7Smrg _LT_COMPILER_PIC($1) 77916aec45a7Smrg _LT_COMPILER_C_O($1) 77926aec45a7Smrg _LT_COMPILER_FILE_LOCKS($1) 77936aec45a7Smrg _LT_LINKER_SHLIBS($1) 77946aec45a7Smrg _LT_SYS_DYNAMIC_LINKER($1) 77956aec45a7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 77966aec45a7Smrg 77976aec45a7Smrg _LT_CONFIG($1) 77986aec45a7Smrg fi # test -n "$compiler" 77996aec45a7Smrg 78006aec45a7Smrg GCC=$lt_save_GCC 7801300bf1aeSmrg CC=$lt_save_CC 7802300bf1aeSmrg CFLAGS=$lt_save_CFLAGS 7803300bf1aeSmrgfi # test yes != "$_lt_disable_F77" 78041473d951Smrg 78056aec45a7SmrgAC_LANG_POP 78066aec45a7Smrg])# _LT_LANG_F77_CONFIG 78071473d951Smrg 7808ab47cfaaSmrg 78096aec45a7Smrg# _LT_LANG_FC_CONFIG([TAG]) 78106aec45a7Smrg# ------------------------- 78116aec45a7Smrg# Ensure that the configuration variables for a Fortran compiler are 78126aec45a7Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7813300bf1aeSmrg# to write the compiler configuration to 'libtool'. 78146aec45a7Smrgm4_defun([_LT_LANG_FC_CONFIG], 78156aec45a7Smrg[AC_LANG_PUSH(Fortran) 78166aec45a7Smrg 7817300bf1aeSmrgif test -z "$FC" || test no = "$FC"; then 78186aec45a7Smrg _lt_disable_FC=yes 78195c42550eSmrgfi 7820ab47cfaaSmrg 78216aec45a7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78226aec45a7Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 78236aec45a7Smrg_LT_TAGVAR(always_export_symbols, $1)=no 78246aec45a7Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78256aec45a7Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78266aec45a7Smrg_LT_TAGVAR(hardcode_direct, $1)=no 78276aec45a7Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78286aec45a7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78296aec45a7Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78306aec45a7Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78316aec45a7Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 78326aec45a7Smrg_LT_TAGVAR(inherit_rpath, $1)=no 78336aec45a7Smrg_LT_TAGVAR(module_cmds, $1)= 78346aec45a7Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 78356aec45a7Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78366aec45a7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78376aec45a7Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78386aec45a7Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78396aec45a7Smrg_LT_TAGVAR(no_undefined_flag, $1)= 78406aec45a7Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78416aec45a7Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 78426aec45a7Smrg 78436aec45a7Smrg# Source file extension for fc test sources. 78446aec45a7Smrgac_ext=${ac_fc_srcext-f} 78456aec45a7Smrg 78466aec45a7Smrg# Object file extension for compiled fc test sources. 78476aec45a7Smrgobjext=o 78486aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 78496aec45a7Smrg 78506aec45a7Smrg# No sense in running all these tests if we already determined that 78516aec45a7Smrg# the FC compiler isn't working. Some variables (like enable_shared) 78526aec45a7Smrg# are currently assumed to apply to all compilers on this platform, 78536aec45a7Smrg# and will be corrupted by setting them based on a non-working compiler. 7854300bf1aeSmrgif test yes != "$_lt_disable_FC"; then 78556aec45a7Smrg # Code to be used in simple compile tests 78566aec45a7Smrg lt_simple_compile_test_code="\ 78576aec45a7Smrg subroutine t 78586aec45a7Smrg return 78596aec45a7Smrg end 78606aec45a7Smrg" 7861ab47cfaaSmrg 78626aec45a7Smrg # Code to be used in simple link tests 78636aec45a7Smrg lt_simple_link_test_code="\ 78646aec45a7Smrg program t 78656aec45a7Smrg end 78666aec45a7Smrg" 7867ab47cfaaSmrg 78686aec45a7Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78696aec45a7Smrg _LT_TAG_COMPILER 7870ab47cfaaSmrg 78716aec45a7Smrg # save warnings/boilerplate of simple test code 78726aec45a7Smrg _LT_COMPILER_BOILERPLATE 78736aec45a7Smrg _LT_LINKER_BOILERPLATE 78746aec45a7Smrg 78756aec45a7Smrg # Allow CC to be a program name with arguments. 7876300bf1aeSmrg lt_save_CC=$CC 78776aec45a7Smrg lt_save_GCC=$GCC 7878aa9e3350Smrg lt_save_CFLAGS=$CFLAGS 78796aec45a7Smrg CC=${FC-"f95"} 7880aa9e3350Smrg CFLAGS=$FCFLAGS 78816aec45a7Smrg compiler=$CC 78826aec45a7Smrg GCC=$ac_cv_fc_compiler_gnu 78836aec45a7Smrg 78846aec45a7Smrg _LT_TAGVAR(compiler, $1)=$CC 78856aec45a7Smrg _LT_CC_BASENAME([$compiler]) 78866aec45a7Smrg 78876aec45a7Smrg if test -n "$compiler"; then 78886aec45a7Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 78896aec45a7Smrg AC_MSG_RESULT([$can_build_shared]) 78906aec45a7Smrg 78916aec45a7Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7892300bf1aeSmrg test no = "$can_build_shared" && enable_shared=no 78936aec45a7Smrg 78946aec45a7Smrg # On AIX, shared libraries and static libraries use the same namespace, and 78956aec45a7Smrg # are all built from PIC. 78965c42550eSmrg case $host_os in 78976aec45a7Smrg aix3*) 7898300bf1aeSmrg test yes = "$enable_shared" && enable_static=no 78996aec45a7Smrg if test -n "$RANLIB"; then 79006aec45a7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 79016aec45a7Smrg postinstall_cmds='$RANLIB $lib' 79026aec45a7Smrg fi 79036aec45a7Smrg ;; 79045c42550eSmrg aix[[4-9]]*) 7905300bf1aeSmrg if test ia64 != "$host_cpu"; then 7906300bf1aeSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7907300bf1aeSmrg yes,aix,yes) ;; # shared object as lib.so file only 7908300bf1aeSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7909300bf1aeSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7910300bf1aeSmrg esac 79115c42550eSmrg fi 79126aec45a7Smrg ;; 79135c42550eSmrg esac 79146aec45a7Smrg AC_MSG_RESULT([$enable_shared]) 79156aec45a7Smrg 79166aec45a7Smrg AC_MSG_CHECKING([whether to build static libraries]) 79176aec45a7Smrg # Make sure either enable_shared or enable_static is yes. 7918300bf1aeSmrg test yes = "$enable_shared" || enable_static=yes 79196aec45a7Smrg AC_MSG_RESULT([$enable_static]) 79206aec45a7Smrg 7921300bf1aeSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7922300bf1aeSmrg _LT_TAGVAR(LD, $1)=$LD 79236aec45a7Smrg 79246aec45a7Smrg ## CAVEAT EMPTOR: 79256aec45a7Smrg ## There is no encapsulation within the following macros, do not change 79266aec45a7Smrg ## the running order or otherwise move them around unless you know exactly 79276aec45a7Smrg ## what you are doing... 79286aec45a7Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 79296aec45a7Smrg _LT_COMPILER_PIC($1) 79306aec45a7Smrg _LT_COMPILER_C_O($1) 79316aec45a7Smrg _LT_COMPILER_FILE_LOCKS($1) 79326aec45a7Smrg _LT_LINKER_SHLIBS($1) 79336aec45a7Smrg _LT_SYS_DYNAMIC_LINKER($1) 79346aec45a7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 79356aec45a7Smrg 79366aec45a7Smrg _LT_CONFIG($1) 79376aec45a7Smrg fi # test -n "$compiler" 79386aec45a7Smrg 79396aec45a7Smrg GCC=$lt_save_GCC 7940aa9e3350Smrg CC=$lt_save_CC 7941aa9e3350Smrg CFLAGS=$lt_save_CFLAGS 7942300bf1aeSmrgfi # test yes != "$_lt_disable_FC" 79431473d951Smrg 79446aec45a7SmrgAC_LANG_POP 79456aec45a7Smrg])# _LT_LANG_FC_CONFIG 79461473d951Smrg 79471473d951Smrg 79486aec45a7Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 79496aec45a7Smrg# -------------------------- 79506aec45a7Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 79516aec45a7Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7952300bf1aeSmrg# to write the compiler configuration to 'libtool'. 79536aec45a7Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 79546aec45a7Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 79556aec45a7SmrgAC_LANG_SAVE 79561473d951Smrg 79576aec45a7Smrg# Source file extension for Java test sources. 79586aec45a7Smrgac_ext=java 79591473d951Smrg 79606aec45a7Smrg# Object file extension for compiled Java test sources. 79616aec45a7Smrgobjext=o 79626aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 79631473d951Smrg 79646aec45a7Smrg# Code to be used in simple compile tests 79656aec45a7Smrglt_simple_compile_test_code="class foo {}" 79661473d951Smrg 79676aec45a7Smrg# Code to be used in simple link tests 79686aec45a7Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 79696aec45a7Smrg 79706aec45a7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 79716aec45a7Smrg_LT_TAG_COMPILER 79726aec45a7Smrg 79736aec45a7Smrg# save warnings/boilerplate of simple test code 79746aec45a7Smrg_LT_COMPILER_BOILERPLATE 79756aec45a7Smrg_LT_LINKER_BOILERPLATE 79766aec45a7Smrg 79776aec45a7Smrg# Allow CC to be a program name with arguments. 7978aa9e3350Smrglt_save_CC=$CC 7979aa9e3350Smrglt_save_CFLAGS=$CFLAGS 79806aec45a7Smrglt_save_GCC=$GCC 79816aec45a7SmrgGCC=yes 79826aec45a7SmrgCC=${GCJ-"gcj"} 7983aa9e3350SmrgCFLAGS=$GCJFLAGS 79846aec45a7Smrgcompiler=$CC 79856aec45a7Smrg_LT_TAGVAR(compiler, $1)=$CC 7986300bf1aeSmrg_LT_TAGVAR(LD, $1)=$LD 79876aec45a7Smrg_LT_CC_BASENAME([$compiler]) 79886aec45a7Smrg 79896aec45a7Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 79906aec45a7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 79916aec45a7Smrg 79926aec45a7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 79936aec45a7Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 79946aec45a7Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 79956aec45a7Smrg 79966aec45a7Smrgif test -n "$compiler"; then 79976aec45a7Smrg _LT_COMPILER_NO_RTTI($1) 79986aec45a7Smrg _LT_COMPILER_PIC($1) 79996aec45a7Smrg _LT_COMPILER_C_O($1) 80006aec45a7Smrg _LT_COMPILER_FILE_LOCKS($1) 80016aec45a7Smrg _LT_LINKER_SHLIBS($1) 80026aec45a7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 80036aec45a7Smrg 80046aec45a7Smrg _LT_CONFIG($1) 80056aec45a7Smrgfi 80066aec45a7Smrg 80076aec45a7SmrgAC_LANG_RESTORE 80086aec45a7Smrg 80096aec45a7SmrgGCC=$lt_save_GCC 8010aa9e3350SmrgCC=$lt_save_CC 8011aa9e3350SmrgCFLAGS=$lt_save_CFLAGS 80126aec45a7Smrg])# _LT_LANG_GCJ_CONFIG 80136aec45a7Smrg 80146aec45a7Smrg 8015aa9e3350Smrg# _LT_LANG_GO_CONFIG([TAG]) 8016aa9e3350Smrg# -------------------------- 8017aa9e3350Smrg# Ensure that the configuration variables for the GNU Go compiler 8018aa9e3350Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8019300bf1aeSmrg# to write the compiler configuration to 'libtool'. 8020aa9e3350Smrgm4_defun([_LT_LANG_GO_CONFIG], 8021aa9e3350Smrg[AC_REQUIRE([LT_PROG_GO])dnl 8022aa9e3350SmrgAC_LANG_SAVE 8023aa9e3350Smrg 8024aa9e3350Smrg# Source file extension for Go test sources. 8025aa9e3350Smrgac_ext=go 8026aa9e3350Smrg 8027aa9e3350Smrg# Object file extension for compiled Go test sources. 8028aa9e3350Smrgobjext=o 8029aa9e3350Smrg_LT_TAGVAR(objext, $1)=$objext 8030aa9e3350Smrg 8031aa9e3350Smrg# Code to be used in simple compile tests 8032aa9e3350Smrglt_simple_compile_test_code="package main; func main() { }" 8033aa9e3350Smrg 8034aa9e3350Smrg# Code to be used in simple link tests 8035aa9e3350Smrglt_simple_link_test_code='package main; func main() { }' 8036aa9e3350Smrg 8037aa9e3350Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8038aa9e3350Smrg_LT_TAG_COMPILER 8039aa9e3350Smrg 8040aa9e3350Smrg# save warnings/boilerplate of simple test code 8041aa9e3350Smrg_LT_COMPILER_BOILERPLATE 8042aa9e3350Smrg_LT_LINKER_BOILERPLATE 8043aa9e3350Smrg 8044aa9e3350Smrg# Allow CC to be a program name with arguments. 8045aa9e3350Smrglt_save_CC=$CC 8046aa9e3350Smrglt_save_CFLAGS=$CFLAGS 8047aa9e3350Smrglt_save_GCC=$GCC 8048aa9e3350SmrgGCC=yes 8049aa9e3350SmrgCC=${GOC-"gccgo"} 8050aa9e3350SmrgCFLAGS=$GOFLAGS 8051aa9e3350Smrgcompiler=$CC 8052aa9e3350Smrg_LT_TAGVAR(compiler, $1)=$CC 8053300bf1aeSmrg_LT_TAGVAR(LD, $1)=$LD 8054aa9e3350Smrg_LT_CC_BASENAME([$compiler]) 8055aa9e3350Smrg 8056aa9e3350Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 8057aa9e3350Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8058aa9e3350Smrg 8059aa9e3350Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8060aa9e3350Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8061aa9e3350Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8062aa9e3350Smrg 8063aa9e3350Smrgif test -n "$compiler"; then 8064aa9e3350Smrg _LT_COMPILER_NO_RTTI($1) 8065aa9e3350Smrg _LT_COMPILER_PIC($1) 8066aa9e3350Smrg _LT_COMPILER_C_O($1) 8067aa9e3350Smrg _LT_COMPILER_FILE_LOCKS($1) 8068aa9e3350Smrg _LT_LINKER_SHLIBS($1) 8069aa9e3350Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 8070aa9e3350Smrg 8071aa9e3350Smrg _LT_CONFIG($1) 8072aa9e3350Smrgfi 8073aa9e3350Smrg 8074aa9e3350SmrgAC_LANG_RESTORE 8075aa9e3350Smrg 8076aa9e3350SmrgGCC=$lt_save_GCC 8077aa9e3350SmrgCC=$lt_save_CC 8078aa9e3350SmrgCFLAGS=$lt_save_CFLAGS 8079aa9e3350Smrg])# _LT_LANG_GO_CONFIG 8080aa9e3350Smrg 8081aa9e3350Smrg 80826aec45a7Smrg# _LT_LANG_RC_CONFIG([TAG]) 80836aec45a7Smrg# ------------------------- 80846aec45a7Smrg# Ensure that the configuration variables for the Windows resource compiler 80856aec45a7Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8086300bf1aeSmrg# to write the compiler configuration to 'libtool'. 80876aec45a7Smrgm4_defun([_LT_LANG_RC_CONFIG], 80886aec45a7Smrg[AC_REQUIRE([LT_PROG_RC])dnl 80896aec45a7SmrgAC_LANG_SAVE 80906aec45a7Smrg 80916aec45a7Smrg# Source file extension for RC test sources. 80926aec45a7Smrgac_ext=rc 80936aec45a7Smrg 80946aec45a7Smrg# Object file extension for compiled RC test sources. 80956aec45a7Smrgobjext=o 80966aec45a7Smrg_LT_TAGVAR(objext, $1)=$objext 80976aec45a7Smrg 80986aec45a7Smrg# Code to be used in simple compile tests 80996aec45a7Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 81006aec45a7Smrg 81016aec45a7Smrg# Code to be used in simple link tests 8102300bf1aeSmrglt_simple_link_test_code=$lt_simple_compile_test_code 81036aec45a7Smrg 81046aec45a7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 81056aec45a7Smrg_LT_TAG_COMPILER 81066aec45a7Smrg 81076aec45a7Smrg# save warnings/boilerplate of simple test code 81086aec45a7Smrg_LT_COMPILER_BOILERPLATE 81096aec45a7Smrg_LT_LINKER_BOILERPLATE 81106aec45a7Smrg 81116aec45a7Smrg# Allow CC to be a program name with arguments. 8112300bf1aeSmrglt_save_CC=$CC 8113aa9e3350Smrglt_save_CFLAGS=$CFLAGS 81146aec45a7Smrglt_save_GCC=$GCC 81156aec45a7SmrgGCC= 81166aec45a7SmrgCC=${RC-"windres"} 8117aa9e3350SmrgCFLAGS= 81186aec45a7Smrgcompiler=$CC 81196aec45a7Smrg_LT_TAGVAR(compiler, $1)=$CC 81206aec45a7Smrg_LT_CC_BASENAME([$compiler]) 81216aec45a7Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 81226aec45a7Smrg 81236aec45a7Smrgif test -n "$compiler"; then 81246aec45a7Smrg : 81256aec45a7Smrg _LT_CONFIG($1) 81266aec45a7Smrgfi 81276aec45a7Smrg 81286aec45a7SmrgGCC=$lt_save_GCC 81296aec45a7SmrgAC_LANG_RESTORE 8130aa9e3350SmrgCC=$lt_save_CC 8131aa9e3350SmrgCFLAGS=$lt_save_CFLAGS 81326aec45a7Smrg])# _LT_LANG_RC_CONFIG 81336aec45a7Smrg 81346aec45a7Smrg 81356aec45a7Smrg# LT_PROG_GCJ 81366aec45a7Smrg# ----------- 81376aec45a7SmrgAC_DEFUN([LT_PROG_GCJ], 81386aec45a7Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 81396aec45a7Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 81406aec45a7Smrg [AC_CHECK_TOOL(GCJ, gcj,) 8141300bf1aeSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 81426aec45a7Smrg AC_SUBST(GCJFLAGS)])])[]dnl 81436aec45a7Smrg]) 81446aec45a7Smrg 81456aec45a7Smrg# Old name: 81466aec45a7SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 81476aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 81486aec45a7Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81496aec45a7Smrg 81506aec45a7Smrg 8151aa9e3350Smrg# LT_PROG_GO 8152aa9e3350Smrg# ---------- 8153aa9e3350SmrgAC_DEFUN([LT_PROG_GO], 8154aa9e3350Smrg[AC_CHECK_TOOL(GOC, gccgo,) 8155aa9e3350Smrg]) 8156aa9e3350Smrg 8157aa9e3350Smrg 81586aec45a7Smrg# LT_PROG_RC 81596aec45a7Smrg# ---------- 81606aec45a7SmrgAC_DEFUN([LT_PROG_RC], 81616aec45a7Smrg[AC_CHECK_TOOL(RC, windres,) 81626aec45a7Smrg]) 81636aec45a7Smrg 81646aec45a7Smrg# Old name: 81656aec45a7SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 81666aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 81676aec45a7Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 81686aec45a7Smrg 81696aec45a7Smrg 81706aec45a7Smrg# _LT_DECL_EGREP 81716aec45a7Smrg# -------------- 81726aec45a7Smrg# If we don't have a new enough Autoconf to choose the best grep 81736aec45a7Smrg# available, choose the one first in the user's PATH. 81746aec45a7Smrgm4_defun([_LT_DECL_EGREP], 81756aec45a7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 81766aec45a7SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 81776aec45a7Smrgtest -z "$GREP" && GREP=grep 81786aec45a7Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 81796aec45a7Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 81806aec45a7Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 81816aec45a7Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 81826aec45a7SmrgAC_SUBST([GREP]) 81836aec45a7Smrg]) 81846aec45a7Smrg 81856aec45a7Smrg 81866aec45a7Smrg# _LT_DECL_OBJDUMP 81876aec45a7Smrg# -------------- 81886aec45a7Smrg# If we don't have a new enough Autoconf to choose the best objdump 81896aec45a7Smrg# available, choose the one first in the user's PATH. 81906aec45a7Smrgm4_defun([_LT_DECL_OBJDUMP], 81916aec45a7Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 81926aec45a7Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 81936aec45a7Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 81946aec45a7SmrgAC_SUBST([OBJDUMP]) 81956aec45a7Smrg]) 81966aec45a7Smrg 8197aa9e3350Smrg# _LT_DECL_DLLTOOL 8198aa9e3350Smrg# ---------------- 8199aa9e3350Smrg# Ensure DLLTOOL variable is set. 8200aa9e3350Smrgm4_defun([_LT_DECL_DLLTOOL], 8201aa9e3350Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8202aa9e3350Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8203aa9e3350Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8204aa9e3350SmrgAC_SUBST([DLLTOOL]) 8205aa9e3350Smrg]) 82066aec45a7Smrg 82076aec45a7Smrg# _LT_DECL_SED 82086aec45a7Smrg# ------------ 82096aec45a7Smrg# Check for a fully-functional sed program, that truncates 82106aec45a7Smrg# as few characters as possible. Prefer GNU sed if found. 82116aec45a7Smrgm4_defun([_LT_DECL_SED], 82126aec45a7Smrg[AC_PROG_SED 82136aec45a7Smrgtest -z "$SED" && SED=sed 82146aec45a7SmrgXsed="$SED -e 1s/^X//" 82156aec45a7Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 82166aec45a7Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 82176aec45a7Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 82186aec45a7Smrg])# _LT_DECL_SED 82196aec45a7Smrg 82206aec45a7Smrgm4_ifndef([AC_PROG_SED], [ 82216aec45a7Smrg# NOTE: This macro has been submitted for inclusion into # 82226aec45a7Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 82236aec45a7Smrg# a released version of Autoconf we should remove this # 82246aec45a7Smrg# macro and use it instead. # 82256aec45a7Smrg 82266aec45a7Smrgm4_defun([AC_PROG_SED], 82276aec45a7Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 82286aec45a7SmrgAC_CACHE_VAL(lt_cv_path_SED, 82296aec45a7Smrg[# Loop through the user's path and test for sed and gsed. 82306aec45a7Smrg# Then use that list of sed's as ones to test for truncation. 82316aec45a7Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 82326aec45a7Smrgfor as_dir in $PATH 82336aec45a7Smrgdo 82346aec45a7Smrg IFS=$as_save_IFS 82356aec45a7Smrg test -z "$as_dir" && as_dir=. 82366aec45a7Smrg for lt_ac_prog in sed gsed; do 82376aec45a7Smrg for ac_exec_ext in '' $ac_executable_extensions; do 82386aec45a7Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 82396aec45a7Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 82406aec45a7Smrg fi 82416aec45a7Smrg done 82426aec45a7Smrg done 82436aec45a7Smrgdone 82446aec45a7SmrgIFS=$as_save_IFS 82456aec45a7Smrglt_ac_max=0 82466aec45a7Smrglt_ac_count=0 82476aec45a7Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 82486aec45a7Smrg# along with /bin/sed that truncates output. 82496aec45a7Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8250300bf1aeSmrg test ! -f "$lt_ac_sed" && continue 82516aec45a7Smrg cat /dev/null > conftest.in 82526aec45a7Smrg lt_ac_count=0 82536aec45a7Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 82546aec45a7Smrg # Check for GNU sed and select it if it is found. 82556aec45a7Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 82566aec45a7Smrg lt_cv_path_SED=$lt_ac_sed 82576aec45a7Smrg break 82586aec45a7Smrg fi 82596aec45a7Smrg while true; do 82606aec45a7Smrg cat conftest.in conftest.in >conftest.tmp 82616aec45a7Smrg mv conftest.tmp conftest.in 82626aec45a7Smrg cp conftest.in conftest.nl 82636aec45a7Smrg echo >>conftest.nl 82646aec45a7Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 82656aec45a7Smrg cmp -s conftest.out conftest.nl || break 82666aec45a7Smrg # 10000 chars as input seems more than enough 8267300bf1aeSmrg test 10 -lt "$lt_ac_count" && break 82686aec45a7Smrg lt_ac_count=`expr $lt_ac_count + 1` 8269300bf1aeSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 82706aec45a7Smrg lt_ac_max=$lt_ac_count 82716aec45a7Smrg lt_cv_path_SED=$lt_ac_sed 82726aec45a7Smrg fi 82736aec45a7Smrg done 82746aec45a7Smrgdone 82756aec45a7Smrg]) 82766aec45a7SmrgSED=$lt_cv_path_SED 82776aec45a7SmrgAC_SUBST([SED]) 82786aec45a7SmrgAC_MSG_RESULT([$SED]) 82796aec45a7Smrg])#AC_PROG_SED 82806aec45a7Smrg])#m4_ifndef 82811473d951Smrg 82826aec45a7Smrg# Old name: 82836aec45a7SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 82846aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 82856aec45a7Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 82861473d951Smrg 82871473d951Smrg 82886aec45a7Smrg# _LT_CHECK_SHELL_FEATURES 82896aec45a7Smrg# ------------------------ 82906aec45a7Smrg# Find out whether the shell is Bourne or XSI compatible, 82916aec45a7Smrg# or has some other useful features. 82926aec45a7Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8293300bf1aeSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 82946aec45a7Smrg lt_unset=unset 82956aec45a7Smrgelse 82966aec45a7Smrg lt_unset=false 82976aec45a7Smrgfi 82986aec45a7Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 82996aec45a7Smrg 83006aec45a7Smrg# test EBCDIC or ASCII 83016aec45a7Smrgcase `echo X|tr X '\101'` in 83026aec45a7Smrg A) # ASCII based system 83036aec45a7Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 83046aec45a7Smrg lt_SP2NL='tr \040 \012' 83056aec45a7Smrg lt_NL2SP='tr \015\012 \040\040' 83066aec45a7Smrg ;; 83076aec45a7Smrg *) # EBCDIC based system 83086aec45a7Smrg lt_SP2NL='tr \100 \n' 83096aec45a7Smrg lt_NL2SP='tr \r\n \100\100' 83106aec45a7Smrg ;; 83116aec45a7Smrgesac 83126aec45a7Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 83136aec45a7Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 83146aec45a7Smrg])# _LT_CHECK_SHELL_FEATURES 83151473d951Smrg 83161473d951Smrg 8317aa9e3350Smrg# _LT_PATH_CONVERSION_FUNCTIONS 8318aa9e3350Smrg# ----------------------------- 8319300bf1aeSmrg# Determine what file name conversion functions should be used by 8320aa9e3350Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8321aa9e3350Smrg# for certain cross-compile configurations and native mingw. 8322aa9e3350Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8323aa9e3350Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8324aa9e3350SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8325aa9e3350SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8326aa9e3350SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8327aa9e3350Smrg[case $host in 8328aa9e3350Smrg *-*-mingw* ) 8329aa9e3350Smrg case $build in 8330aa9e3350Smrg *-*-mingw* ) # actually msys 8331aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8332aa9e3350Smrg ;; 8333aa9e3350Smrg *-*-cygwin* ) 8334aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8335aa9e3350Smrg ;; 8336aa9e3350Smrg * ) # otherwise, assume *nix 8337aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8338aa9e3350Smrg ;; 8339aa9e3350Smrg esac 83406aec45a7Smrg ;; 8341aa9e3350Smrg *-*-cygwin* ) 8342aa9e3350Smrg case $build in 8343aa9e3350Smrg *-*-mingw* ) # actually msys 8344aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8345aa9e3350Smrg ;; 8346aa9e3350Smrg *-*-cygwin* ) 8347aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8348aa9e3350Smrg ;; 8349aa9e3350Smrg * ) # otherwise, assume *nix 8350aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8351aa9e3350Smrg ;; 8352aa9e3350Smrg esac 83536aec45a7Smrg ;; 8354aa9e3350Smrg * ) # unhandled hosts (and "normal" native builds) 8355aa9e3350Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 8356aa9e3350Smrg ;; 8357aa9e3350Smrgesac 83586aec45a7Smrg]) 8359aa9e3350Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8360aa9e3350SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8361aa9e3350Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8362aa9e3350Smrg [0], [convert $build file names to $host format])dnl 8363aa9e3350Smrg 8364aa9e3350SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8365aa9e3350SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8366aa9e3350Smrg[#assume ordinary cross tools, or native build. 8367aa9e3350Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 8368aa9e3350Smrgcase $host in 8369aa9e3350Smrg *-*-mingw* ) 8370aa9e3350Smrg case $build in 8371aa9e3350Smrg *-*-mingw* ) # actually msys 8372aa9e3350Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8373aa9e3350Smrg ;; 8374aa9e3350Smrg esac 8375aa9e3350Smrg ;; 8376aa9e3350Smrgesac 8377aa9e3350Smrg]) 8378aa9e3350Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8379aa9e3350SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8380aa9e3350Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8381aa9e3350Smrg [0], [convert $build files to toolchain format])dnl 8382aa9e3350Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8383ab47cfaaSmrg 83846aec45a7Smrg# Helper functions for option handling. -*- Autoconf -*- 83856aec45a7Smrg# 8386300bf1aeSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8387300bf1aeSmrg# Foundation, Inc. 83886aec45a7Smrg# Written by Gary V. Vaughan, 2004 83896aec45a7Smrg# 83906aec45a7Smrg# This file is free software; the Free Software Foundation gives 83916aec45a7Smrg# unlimited permission to copy and/or distribute it, with or without 83926aec45a7Smrg# modifications, as long as this notice is preserved. 8393ab47cfaaSmrg 8394300bf1aeSmrg# serial 8 ltoptions.m4 8395ab47cfaaSmrg 83966aec45a7Smrg# This is to help aclocal find these macros, as it can't see m4_define. 83976aec45a7SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8398ab47cfaaSmrg 8399ab47cfaaSmrg 84006aec45a7Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 84016aec45a7Smrg# ------------------------------------------ 84026aec45a7Smrgm4_define([_LT_MANGLE_OPTION], 84036aec45a7Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8404ab47cfaaSmrg 8405ab47cfaaSmrg 84066aec45a7Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 84076aec45a7Smrg# --------------------------------------- 84086aec45a7Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 84096aec45a7Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 84106aec45a7Smrg# saved as a flag. 84116aec45a7Smrgm4_define([_LT_SET_OPTION], 84126aec45a7Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 84136aec45a7Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 84146aec45a7Smrg _LT_MANGLE_DEFUN([$1], [$2]), 8415300bf1aeSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 84166aec45a7Smrg]) 8417ab47cfaaSmrg 8418ab47cfaaSmrg 84196aec45a7Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 84206aec45a7Smrg# ------------------------------------------------------------ 84216aec45a7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 84226aec45a7Smrgm4_define([_LT_IF_OPTION], 84236aec45a7Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 84246aec45a7Smrg 84256aec45a7Smrg 84266aec45a7Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 84276aec45a7Smrg# ------------------------------------------------------- 84286aec45a7Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 84296aec45a7Smrg# are set. 84306aec45a7Smrgm4_define([_LT_UNLESS_OPTIONS], 84316aec45a7Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84326aec45a7Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 84336aec45a7Smrg [m4_define([$0_found])])])[]dnl 84346aec45a7Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 84356aec45a7Smrg])[]dnl 84366aec45a7Smrg]) 8437ab47cfaaSmrg 8438ab47cfaaSmrg 84396aec45a7Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 84406aec45a7Smrg# ---------------------------------------- 84416aec45a7Smrg# OPTION-LIST is a space-separated list of Libtool options associated 84426aec45a7Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 84436aec45a7Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 84446aec45a7Smrg# the unknown option and exit. 84456aec45a7Smrgm4_defun([_LT_SET_OPTIONS], 84466aec45a7Smrg[# Set options 84476aec45a7Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 84486aec45a7Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 84496aec45a7Smrg 84506aec45a7Smrgm4_if([$1],[LT_INIT],[ 84516aec45a7Smrg dnl 84526aec45a7Smrg dnl Simply set some default values (i.e off) if boolean options were not 84536aec45a7Smrg dnl specified: 84546aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 84556aec45a7Smrg ]) 84566aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 84576aec45a7Smrg ]) 84586aec45a7Smrg dnl 84596aec45a7Smrg dnl If no reference was made to various pairs of opposing options, then 84606aec45a7Smrg dnl we run the default mode handler for the pair. For example, if neither 8461300bf1aeSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 84626aec45a7Smrg dnl archives by default: 84636aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 84646aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 84656aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 84666aec45a7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8467300bf1aeSmrg [_LT_ENABLE_FAST_INSTALL]) 8468300bf1aeSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8469300bf1aeSmrg [_LT_WITH_AIX_SONAME([aix])]) 84706aec45a7Smrg ]) 84716aec45a7Smrg])# _LT_SET_OPTIONS 8472ab47cfaaSmrg 8473ab47cfaaSmrg 8474ab47cfaaSmrg 84756aec45a7Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 84766aec45a7Smrg# ----------------------------------------- 84776aec45a7Smrgm4_define([_LT_MANGLE_DEFUN], 84786aec45a7Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8479ab47cfaaSmrg 84801473d951Smrg 84816aec45a7Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 84826aec45a7Smrg# ----------------------------------------------- 84836aec45a7Smrgm4_define([LT_OPTION_DEFINE], 84846aec45a7Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 84856aec45a7Smrg])# LT_OPTION_DEFINE 84861473d951Smrg 84871473d951Smrg 84886aec45a7Smrg# dlopen 84896aec45a7Smrg# ------ 84906aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 84916aec45a7Smrg]) 84921473d951Smrg 84936aec45a7SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 84946aec45a7Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 84956aec45a7SmrgAC_DIAGNOSE([obsolete], 84966aec45a7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8497300bf1aeSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 84986aec45a7Smrg]) 8499ab47cfaaSmrg 85006aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 85016aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8502ab47cfaaSmrg 8503ab47cfaaSmrg 85046aec45a7Smrg# win32-dll 85056aec45a7Smrg# --------- 85066aec45a7Smrg# Declare package support for building win32 dll's. 85076aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 85086aec45a7Smrg[enable_win32_dll=yes 8509ab47cfaaSmrg 85106aec45a7Smrgcase $host in 85116aec45a7Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 85126aec45a7Smrg AC_CHECK_TOOL(AS, as, false) 85136aec45a7Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 85146aec45a7Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 85156aec45a7Smrg ;; 85166aec45a7Smrgesac 8517ab47cfaaSmrg 85186aec45a7Smrgtest -z "$AS" && AS=as 85196aec45a7Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8520ab47cfaaSmrg 85216aec45a7Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 85226aec45a7Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8523ab47cfaaSmrg 85246aec45a7Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 85256aec45a7Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 85266aec45a7Smrg])# win32-dll 8527ab47cfaaSmrg 85286aec45a7SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 85296aec45a7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 85306aec45a7Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 85316aec45a7SmrgAC_DIAGNOSE([obsolete], 85326aec45a7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8533300bf1aeSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 85346aec45a7Smrg]) 8535ab47cfaaSmrg 85366aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 85376aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8538ab47cfaaSmrg 8539ab47cfaaSmrg 85406aec45a7Smrg# _LT_ENABLE_SHARED([DEFAULT]) 85416aec45a7Smrg# ---------------------------- 8542300bf1aeSmrg# implement the --enable-shared flag, and supports the 'shared' and 8543300bf1aeSmrg# 'disable-shared' LT_INIT options. 8544300bf1aeSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85456aec45a7Smrgm4_define([_LT_ENABLE_SHARED], 85466aec45a7Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 85476aec45a7SmrgAC_ARG_ENABLE([shared], 85486aec45a7Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 85496aec45a7Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 85506aec45a7Smrg [p=${PACKAGE-default} 85516aec45a7Smrg case $enableval in 85526aec45a7Smrg yes) enable_shared=yes ;; 85536aec45a7Smrg no) enable_shared=no ;; 85546aec45a7Smrg *) 85556aec45a7Smrg enable_shared=no 85566aec45a7Smrg # Look at the argument we got. We use all the common list separators. 8557300bf1aeSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 85586aec45a7Smrg for pkg in $enableval; do 8559300bf1aeSmrg IFS=$lt_save_ifs 85606aec45a7Smrg if test "X$pkg" = "X$p"; then 85616aec45a7Smrg enable_shared=yes 85626aec45a7Smrg fi 85636aec45a7Smrg done 8564300bf1aeSmrg IFS=$lt_save_ifs 85655c42550eSmrg ;; 85666aec45a7Smrg esac], 85676aec45a7Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8568ab47cfaaSmrg 85696aec45a7Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 85706aec45a7Smrg [Whether or not to build shared libraries]) 85716aec45a7Smrg])# _LT_ENABLE_SHARED 8572ab47cfaaSmrg 85736aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 85746aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8575ab47cfaaSmrg 85766aec45a7Smrg# Old names: 85776aec45a7SmrgAC_DEFUN([AC_ENABLE_SHARED], 85786aec45a7Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 85796aec45a7Smrg]) 8580ab47cfaaSmrg 85816aec45a7SmrgAC_DEFUN([AC_DISABLE_SHARED], 85826aec45a7Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 85836aec45a7Smrg]) 8584ab47cfaaSmrg 85856aec45a7SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 85866aec45a7SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8587ab47cfaaSmrg 85886aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 85896aec45a7Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 85906aec45a7Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8591ab47cfaaSmrg 8592ab47cfaaSmrg 8593ab47cfaaSmrg 85946aec45a7Smrg# _LT_ENABLE_STATIC([DEFAULT]) 85956aec45a7Smrg# ---------------------------- 8596300bf1aeSmrg# implement the --enable-static flag, and support the 'static' and 8597300bf1aeSmrg# 'disable-static' LT_INIT options. 8598300bf1aeSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 85996aec45a7Smrgm4_define([_LT_ENABLE_STATIC], 86006aec45a7Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 86016aec45a7SmrgAC_ARG_ENABLE([static], 86026aec45a7Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 86036aec45a7Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 86046aec45a7Smrg [p=${PACKAGE-default} 86056aec45a7Smrg case $enableval in 86066aec45a7Smrg yes) enable_static=yes ;; 86076aec45a7Smrg no) enable_static=no ;; 86086aec45a7Smrg *) 86096aec45a7Smrg enable_static=no 86106aec45a7Smrg # Look at the argument we got. We use all the common list separators. 8611300bf1aeSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86126aec45a7Smrg for pkg in $enableval; do 8613300bf1aeSmrg IFS=$lt_save_ifs 86146aec45a7Smrg if test "X$pkg" = "X$p"; then 86156aec45a7Smrg enable_static=yes 86166aec45a7Smrg fi 86176aec45a7Smrg done 8618300bf1aeSmrg IFS=$lt_save_ifs 86195c42550eSmrg ;; 86206aec45a7Smrg esac], 86216aec45a7Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8622ab47cfaaSmrg 86236aec45a7Smrg _LT_DECL([build_old_libs], [enable_static], [0], 86246aec45a7Smrg [Whether or not to build static libraries]) 86256aec45a7Smrg])# _LT_ENABLE_STATIC 8626ab47cfaaSmrg 86276aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 86286aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8629ab47cfaaSmrg 86306aec45a7Smrg# Old names: 86316aec45a7SmrgAC_DEFUN([AC_ENABLE_STATIC], 86326aec45a7Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 86336aec45a7Smrg]) 86341473d951Smrg 86356aec45a7SmrgAC_DEFUN([AC_DISABLE_STATIC], 86366aec45a7Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 86376aec45a7Smrg]) 8638ab47cfaaSmrg 86396aec45a7SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 86406aec45a7SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8641ab47cfaaSmrg 86426aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 86436aec45a7Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 86446aec45a7Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8645ab47cfaaSmrg 8646ab47cfaaSmrg 8647ab47cfaaSmrg 86486aec45a7Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 86496aec45a7Smrg# ---------------------------------- 8650300bf1aeSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 8651300bf1aeSmrg# and 'disable-fast-install' LT_INIT options. 8652300bf1aeSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 86536aec45a7Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 86546aec45a7Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 86556aec45a7SmrgAC_ARG_ENABLE([fast-install], 86566aec45a7Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 86576aec45a7Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 86586aec45a7Smrg [p=${PACKAGE-default} 86596aec45a7Smrg case $enableval in 86606aec45a7Smrg yes) enable_fast_install=yes ;; 86616aec45a7Smrg no) enable_fast_install=no ;; 86626aec45a7Smrg *) 86636aec45a7Smrg enable_fast_install=no 86646aec45a7Smrg # Look at the argument we got. We use all the common list separators. 8665300bf1aeSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 86666aec45a7Smrg for pkg in $enableval; do 8667300bf1aeSmrg IFS=$lt_save_ifs 86686aec45a7Smrg if test "X$pkg" = "X$p"; then 86696aec45a7Smrg enable_fast_install=yes 86705c42550eSmrg fi 86716aec45a7Smrg done 8672300bf1aeSmrg IFS=$lt_save_ifs 86735c42550eSmrg ;; 86746aec45a7Smrg esac], 86756aec45a7Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8676ab47cfaaSmrg 86776aec45a7Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 86786aec45a7Smrg [Whether or not to optimize for fast installation])dnl 86796aec45a7Smrg])# _LT_ENABLE_FAST_INSTALL 8680ab47cfaaSmrg 86816aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 86826aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8683ab47cfaaSmrg 86846aec45a7Smrg# Old names: 86856aec45a7SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 86866aec45a7Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 86876aec45a7SmrgAC_DIAGNOSE([obsolete], 86886aec45a7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8689300bf1aeSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 86906aec45a7Smrg]) 8691ab47cfaaSmrg 86926aec45a7SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 86936aec45a7Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 86946aec45a7SmrgAC_DIAGNOSE([obsolete], 86956aec45a7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8696300bf1aeSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 86976aec45a7Smrg]) 8698ab47cfaaSmrg 86996aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 87006aec45a7Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 87016aec45a7Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 87021473d951Smrg 8703ab47cfaaSmrg 8704300bf1aeSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 8705300bf1aeSmrg# ---------------------------------- 8706300bf1aeSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8707300bf1aeSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8708300bf1aeSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8709300bf1aeSmrgm4_define([_LT_WITH_AIX_SONAME], 8710300bf1aeSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8711300bf1aeSmrgshared_archive_member_spec= 8712300bf1aeSmrgcase $host,$enable_shared in 8713300bf1aeSmrgpower*-*-aix[[5-9]]*,yes) 8714300bf1aeSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8715300bf1aeSmrg AC_ARG_WITH([aix-soname], 8716300bf1aeSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8717300bf1aeSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8718300bf1aeSmrg [case $withval in 8719300bf1aeSmrg aix|svr4|both) 8720300bf1aeSmrg ;; 8721300bf1aeSmrg *) 8722300bf1aeSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8723300bf1aeSmrg ;; 8724300bf1aeSmrg esac 8725300bf1aeSmrg lt_cv_with_aix_soname=$with_aix_soname], 8726300bf1aeSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 8727300bf1aeSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8728300bf1aeSmrg with_aix_soname=$lt_cv_with_aix_soname]) 8729300bf1aeSmrg AC_MSG_RESULT([$with_aix_soname]) 8730300bf1aeSmrg if test aix != "$with_aix_soname"; then 8731300bf1aeSmrg # For the AIX way of multilib, we name the shared archive member 8732300bf1aeSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8733300bf1aeSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8734300bf1aeSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8735300bf1aeSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 8736300bf1aeSmrg if test 64 = "${OBJECT_MODE-32}"; then 8737300bf1aeSmrg shared_archive_member_spec=shr_64 8738300bf1aeSmrg else 8739300bf1aeSmrg shared_archive_member_spec=shr 8740300bf1aeSmrg fi 8741300bf1aeSmrg fi 8742300bf1aeSmrg ;; 8743300bf1aeSmrg*) 8744300bf1aeSmrg with_aix_soname=aix 8745300bf1aeSmrg ;; 8746300bf1aeSmrgesac 8747300bf1aeSmrg 8748300bf1aeSmrg_LT_DECL([], [shared_archive_member_spec], [0], 8749300bf1aeSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8750300bf1aeSmrg])# _LT_WITH_AIX_SONAME 8751300bf1aeSmrg 8752300bf1aeSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8753300bf1aeSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8754300bf1aeSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8755300bf1aeSmrg 8756300bf1aeSmrg 87576aec45a7Smrg# _LT_WITH_PIC([MODE]) 87586aec45a7Smrg# -------------------- 8759300bf1aeSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 87606aec45a7Smrg# LT_INIT options. 8761300bf1aeSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 87626aec45a7Smrgm4_define([_LT_WITH_PIC], 87636aec45a7Smrg[AC_ARG_WITH([pic], 8764aa9e3350Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 87656aec45a7Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8766aa9e3350Smrg [lt_p=${PACKAGE-default} 8767aa9e3350Smrg case $withval in 8768aa9e3350Smrg yes|no) pic_mode=$withval ;; 8769aa9e3350Smrg *) 8770aa9e3350Smrg pic_mode=default 8771aa9e3350Smrg # Look at the argument we got. We use all the common list separators. 8772300bf1aeSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8773aa9e3350Smrg for lt_pkg in $withval; do 8774300bf1aeSmrg IFS=$lt_save_ifs 8775aa9e3350Smrg if test "X$lt_pkg" = "X$lt_p"; then 8776aa9e3350Smrg pic_mode=yes 8777aa9e3350Smrg fi 8778aa9e3350Smrg done 8779300bf1aeSmrg IFS=$lt_save_ifs 8780aa9e3350Smrg ;; 8781aa9e3350Smrg esac], 8782300bf1aeSmrg [pic_mode=m4_default([$1], [default])]) 8783ab47cfaaSmrg 87846aec45a7Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 87856aec45a7Smrg])# _LT_WITH_PIC 8786ab47cfaaSmrg 87876aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 87886aec45a7SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 87896aec45a7Smrg 87906aec45a7Smrg# Old name: 87916aec45a7SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 87926aec45a7Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 87936aec45a7SmrgAC_DIAGNOSE([obsolete], 87946aec45a7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8795300bf1aeSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 87965c42550eSmrg]) 8797ab47cfaaSmrg 87986aec45a7Smrgdnl aclocal-1.4 backwards compatibility: 87996aec45a7Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 88001473d951Smrg 88011473d951Smrg 88026aec45a7Smrgm4_define([_LTDL_MODE], []) 88036aec45a7SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 88046aec45a7Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 88056aec45a7SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 88066aec45a7Smrg [m4_define([_LTDL_MODE], [recursive])]) 88076aec45a7SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 88086aec45a7Smrg [m4_define([_LTDL_MODE], [subproject])]) 88091473d951Smrg 88106aec45a7Smrgm4_define([_LTDL_TYPE], []) 88116aec45a7SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 88126aec45a7Smrg [m4_define([_LTDL_TYPE], [installable])]) 88136aec45a7SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 88146aec45a7Smrg [m4_define([_LTDL_TYPE], [convenience])]) 88156aec45a7Smrg 88166aec45a7Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 88175c42550eSmrg# 8818300bf1aeSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 8819300bf1aeSmrg# Foundation, Inc. 88206aec45a7Smrg# Written by Gary V. Vaughan, 2004 88215c42550eSmrg# 88226aec45a7Smrg# This file is free software; the Free Software Foundation gives 88236aec45a7Smrg# unlimited permission to copy and/or distribute it, with or without 88246aec45a7Smrg# modifications, as long as this notice is preserved. 88256aec45a7Smrg 88266aec45a7Smrg# serial 6 ltsugar.m4 88276aec45a7Smrg 88286aec45a7Smrg# This is to help aclocal find these macros, as it can't see m4_define. 88296aec45a7SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 88306aec45a7Smrg 88316aec45a7Smrg 88326aec45a7Smrg# lt_join(SEP, ARG1, [ARG2...]) 88336aec45a7Smrg# ----------------------------- 88346aec45a7Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 88356aec45a7Smrg# associated separator. 88366aec45a7Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 88376aec45a7Smrg# versions in m4sugar had bugs. 88386aec45a7Smrgm4_define([lt_join], 88396aec45a7Smrg[m4_if([$#], [1], [], 88406aec45a7Smrg [$#], [2], [[$2]], 88416aec45a7Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 88426aec45a7Smrgm4_define([_lt_join], 88436aec45a7Smrg[m4_if([$#$2], [2], [], 88446aec45a7Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 88456aec45a7Smrg 88466aec45a7Smrg 88476aec45a7Smrg# lt_car(LIST) 88486aec45a7Smrg# lt_cdr(LIST) 88496aec45a7Smrg# ------------ 88506aec45a7Smrg# Manipulate m4 lists. 88516aec45a7Smrg# These macros are necessary as long as will still need to support 8852300bf1aeSmrg# Autoconf-2.59, which quotes differently. 88536aec45a7Smrgm4_define([lt_car], [[$1]]) 88546aec45a7Smrgm4_define([lt_cdr], 88556aec45a7Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 88566aec45a7Smrg [$#], 1, [], 88576aec45a7Smrg [m4_dquote(m4_shift($@))])]) 88586aec45a7Smrgm4_define([lt_unquote], $1) 88596aec45a7Smrg 88606aec45a7Smrg 88616aec45a7Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 88626aec45a7Smrg# ------------------------------------------ 8863300bf1aeSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 88646aec45a7Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 88656aec45a7Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 88666aec45a7Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 88676aec45a7Smrg# than defined and empty). 88685c42550eSmrg# 88696aec45a7Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 88706aec45a7Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 88716aec45a7Smrgm4_define([lt_append], 88726aec45a7Smrg[m4_define([$1], 88736aec45a7Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 88746aec45a7Smrg 88756aec45a7Smrg 88766aec45a7Smrg 88776aec45a7Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 88786aec45a7Smrg# ---------------------------------------------------------- 88796aec45a7Smrg# Produce a SEP delimited list of all paired combinations of elements of 88806aec45a7Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 88816aec45a7Smrg# has the form PREFIXmINFIXSUFFIXn. 88826aec45a7Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 88836aec45a7Smrgm4_define([lt_combine], 88846aec45a7Smrg[m4_if(m4_eval([$# > 3]), [1], 88856aec45a7Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 88866aec45a7Smrg[[m4_foreach([_Lt_prefix], [$2], 88876aec45a7Smrg [m4_foreach([_Lt_suffix], 88886aec45a7Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 88896aec45a7Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 88906aec45a7Smrg 88916aec45a7Smrg 88926aec45a7Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 88936aec45a7Smrg# ----------------------------------------------------------------------- 88946aec45a7Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 88956aec45a7Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 88966aec45a7Smrgm4_define([lt_if_append_uniq], 88976aec45a7Smrg[m4_ifdef([$1], 88986aec45a7Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 88996aec45a7Smrg [lt_append([$1], [$2], [$3])$4], 89006aec45a7Smrg [$5])], 89016aec45a7Smrg [lt_append([$1], [$2], [$3])$4])]) 89026aec45a7Smrg 89036aec45a7Smrg 89046aec45a7Smrg# lt_dict_add(DICT, KEY, VALUE) 89056aec45a7Smrg# ----------------------------- 89066aec45a7Smrgm4_define([lt_dict_add], 89076aec45a7Smrg[m4_define([$1($2)], [$3])]) 8908ab47cfaaSmrg 89091473d951Smrg 89106aec45a7Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 89116aec45a7Smrg# -------------------------------------------- 89126aec45a7Smrgm4_define([lt_dict_add_subkey], 89136aec45a7Smrg[m4_define([$1($2:$3)], [$4])]) 8914ab47cfaaSmrg 8915ab47cfaaSmrg 89166aec45a7Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 89176aec45a7Smrg# ---------------------------------- 89186aec45a7Smrgm4_define([lt_dict_fetch], 89196aec45a7Smrg[m4_ifval([$3], 89206aec45a7Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 89216aec45a7Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8922ab47cfaaSmrg 8923ab47cfaaSmrg 89246aec45a7Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 89256aec45a7Smrg# ----------------------------------------------------------------- 89266aec45a7Smrgm4_define([lt_if_dict_fetch], 89276aec45a7Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 89286aec45a7Smrg [$5], 89296aec45a7Smrg [$6])]) 8930ab47cfaaSmrg 8931ab47cfaaSmrg 89326aec45a7Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 89336aec45a7Smrg# -------------------------------------------------------------- 89346aec45a7Smrgm4_define([lt_dict_filter], 89356aec45a7Smrg[m4_if([$5], [], [], 89366aec45a7Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 89376aec45a7Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 89386aec45a7Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 89396aec45a7Smrg]) 89408697ee19Smrg 89416aec45a7Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 89426aec45a7Smrg# 8943300bf1aeSmrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 89446aec45a7Smrg# Written by Scott James Remnant, 2004 89456aec45a7Smrg# 89466aec45a7Smrg# This file is free software; the Free Software Foundation gives 89476aec45a7Smrg# unlimited permission to copy and/or distribute it, with or without 89486aec45a7Smrg# modifications, as long as this notice is preserved. 89498697ee19Smrg 8950aa9e3350Smrg# @configure_input@ 89518697ee19Smrg 8952300bf1aeSmrg# serial 4179 ltversion.m4 89536aec45a7Smrg# This file is part of GNU Libtool 89548697ee19Smrg 8955300bf1aeSmrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 8956300bf1aeSmrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 89576aec45a7Smrg 89586aec45a7SmrgAC_DEFUN([LTVERSION_VERSION], 8959300bf1aeSmrg[macro_version='2.4.6' 8960300bf1aeSmrgmacro_revision='2.4.6' 89616aec45a7Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 89626aec45a7Smrg_LT_DECL(, macro_revision, 0) 8963ab47cfaaSmrg]) 89641473d951Smrg 89656aec45a7Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 89666aec45a7Smrg# 8967300bf1aeSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 8968300bf1aeSmrg# Foundation, Inc. 89696aec45a7Smrg# Written by Scott James Remnant, 2004. 89706aec45a7Smrg# 89716aec45a7Smrg# This file is free software; the Free Software Foundation gives 89726aec45a7Smrg# unlimited permission to copy and/or distribute it, with or without 89736aec45a7Smrg# modifications, as long as this notice is preserved. 89746aec45a7Smrg 89756aec45a7Smrg# serial 5 lt~obsolete.m4 89766aec45a7Smrg 89776aec45a7Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 89786aec45a7Smrg# 8979300bf1aeSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 89806aec45a7Smrg# which have later been changed to m4_define as they aren't part of the 89816aec45a7Smrg# exported API, or moved to Autoconf or Automake where they belong. 89826aec45a7Smrg# 89836aec45a7Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 89846aec45a7Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 89856aec45a7Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 89866aec45a7Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 89876aec45a7Smrg# and doesn't know about Autoconf macros at all.) 89886aec45a7Smrg# 89896aec45a7Smrg# So we provide this file, which has a silly filename so it's always 89906aec45a7Smrg# included after everything else. This provides aclocal with the 89916aec45a7Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 89926aec45a7Smrg# because those macros already exist, or will be overwritten later. 8993300bf1aeSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 89946aec45a7Smrg# 89956aec45a7Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 89966aec45a7Smrg# Yes, that means every name once taken will need to remain here until 89976aec45a7Smrg# we give up compatibility with versions before 1.7, at which point 89986aec45a7Smrg# we need to keep only those names which we still refer to. 89996aec45a7Smrg 90006aec45a7Smrg# This is to help aclocal find these macros, as it can't see m4_define. 90016aec45a7SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 90026aec45a7Smrg 90036aec45a7Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 90046aec45a7Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 90056aec45a7Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 90066aec45a7Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 90076aec45a7Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 90086aec45a7Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 90096aec45a7Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 90106aec45a7Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 90116aec45a7Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 90126aec45a7Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 90136aec45a7Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 90146aec45a7Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 90156aec45a7Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 90166aec45a7Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 90176aec45a7Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 90186aec45a7Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 90196aec45a7Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 90206aec45a7Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 90216aec45a7Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 90226aec45a7Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 90236aec45a7Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 90246aec45a7Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 90256aec45a7Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 90266aec45a7Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 90276aec45a7Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 90286aec45a7Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 90296aec45a7Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 90306aec45a7Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 90316aec45a7Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 90326aec45a7Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 90336aec45a7Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 90346aec45a7Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 90356aec45a7Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 90366aec45a7Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 90376aec45a7Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 90386aec45a7Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 90396aec45a7Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 90406aec45a7Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 90416aec45a7Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 90426aec45a7Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 90436aec45a7Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 90446aec45a7Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 90456aec45a7Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 90466aec45a7Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 90476aec45a7Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 90486aec45a7Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 90496aec45a7Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 90506aec45a7Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 90516aec45a7Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 90526aec45a7Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 90536aec45a7Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 90546aec45a7Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 90556aec45a7Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 90566aec45a7Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 90576aec45a7Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 90586aec45a7Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 90596aec45a7Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 90606aec45a7Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 90616aec45a7Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 90626aec45a7Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 90636aec45a7Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 90646aec45a7Smrg 9065ab47cfaaSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 90666aec45a7Smrg# serial 1 (pkg-config-0.24) 9067ab47cfaaSmrg# 9068ab47cfaaSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9069ab47cfaaSmrg# 9070ab47cfaaSmrg# This program is free software; you can redistribute it and/or modify 9071ab47cfaaSmrg# it under the terms of the GNU General Public License as published by 9072ab47cfaaSmrg# the Free Software Foundation; either version 2 of the License, or 9073ab47cfaaSmrg# (at your option) any later version. 9074ab47cfaaSmrg# 9075ab47cfaaSmrg# This program is distributed in the hope that it will be useful, but 9076ab47cfaaSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 9077ab47cfaaSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9078ab47cfaaSmrg# General Public License for more details. 9079ab47cfaaSmrg# 9080ab47cfaaSmrg# You should have received a copy of the GNU General Public License 9081ab47cfaaSmrg# along with this program; if not, write to the Free Software 9082ab47cfaaSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 9083ab47cfaaSmrg# 9084ab47cfaaSmrg# As a special exception to the GNU General Public License, if you 9085ab47cfaaSmrg# distribute this file as part of a program that contains a 9086ab47cfaaSmrg# configuration script generated by Autoconf, you may include it under 9087ab47cfaaSmrg# the same distribution terms that you use for the rest of that program. 9088ab47cfaaSmrg 9089ab47cfaaSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9090ab47cfaaSmrg# ---------------------------------- 9091ab47cfaaSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9092ab47cfaaSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 909338770048Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 909438770048Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 90956aec45a7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 90966aec45a7SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 90976aec45a7SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 90986aec45a7Smrg 9099ab47cfaaSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9100ab47cfaaSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9101ab47cfaaSmrgfi 9102ab47cfaaSmrgif test -n "$PKG_CONFIG"; then 9103ab47cfaaSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 9104ab47cfaaSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9105ab47cfaaSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9106ab47cfaaSmrg AC_MSG_RESULT([yes]) 9107ab47cfaaSmrg else 9108ab47cfaaSmrg AC_MSG_RESULT([no]) 9109ab47cfaaSmrg PKG_CONFIG="" 9110ab47cfaaSmrg fi 9111ab47cfaaSmrgfi[]dnl 9112ab47cfaaSmrg])# PKG_PROG_PKG_CONFIG 9113ab47cfaaSmrg 9114ab47cfaaSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9115ab47cfaaSmrg# 9116ab47cfaaSmrg# Check to see whether a particular set of modules exists. Similar 9117ab47cfaaSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9118ab47cfaaSmrg# 91196aec45a7Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 91206aec45a7Smrg# only at the first occurence in configure.ac, so if the first place 91216aec45a7Smrg# it's called might be skipped (such as if it is within an "if", you 91226aec45a7Smrg# have to call PKG_CHECK_EXISTS manually 9123ab47cfaaSmrg# -------------------------------------------------------------- 9124ab47cfaaSmrgAC_DEFUN([PKG_CHECK_EXISTS], 9125ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9126ab47cfaaSmrgif test -n "$PKG_CONFIG" && \ 9127ab47cfaaSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 91286aec45a7Smrg m4_default([$2], [:]) 9129ab47cfaaSmrgm4_ifvaln([$3], [else 9130ab47cfaaSmrg $3])dnl 9131ab47cfaaSmrgfi]) 9132ab47cfaaSmrg 9133ab47cfaaSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9134ab47cfaaSmrg# --------------------------------------------- 9135ab47cfaaSmrgm4_define([_PKG_CONFIG], 91368697ee19Smrg[if test -n "$$1"; then 91378697ee19Smrg pkg_cv_[]$1="$$1" 91388697ee19Smrg elif test -n "$PKG_CONFIG"; then 91398697ee19Smrg PKG_CHECK_EXISTS([$3], 914038770048Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 914138770048Smrg test "x$?" != "x0" && pkg_failed=yes ], 91428697ee19Smrg [pkg_failed=yes]) 91438697ee19Smrg else 91448697ee19Smrg pkg_failed=untried 9145ab47cfaaSmrgfi[]dnl 9146ab47cfaaSmrg])# _PKG_CONFIG 9147ab47cfaaSmrg 9148ab47cfaaSmrg# _PKG_SHORT_ERRORS_SUPPORTED 9149ab47cfaaSmrg# ----------------------------- 9150ab47cfaaSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9151ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9152ab47cfaaSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9153ab47cfaaSmrg _pkg_short_errors_supported=yes 9154ab47cfaaSmrgelse 9155ab47cfaaSmrg _pkg_short_errors_supported=no 9156ab47cfaaSmrgfi[]dnl 9157ab47cfaaSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 9158ab47cfaaSmrg 9159ab47cfaaSmrg 9160ab47cfaaSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9161ab47cfaaSmrg# [ACTION-IF-NOT-FOUND]) 9162ab47cfaaSmrg# 9163ab47cfaaSmrg# 9164ab47cfaaSmrg# Note that if there is a possibility the first call to 9165ab47cfaaSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 9166ab47cfaaSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9167ab47cfaaSmrg# 9168ab47cfaaSmrg# 9169ab47cfaaSmrg# -------------------------------------------------------------- 9170ab47cfaaSmrgAC_DEFUN([PKG_CHECK_MODULES], 9171ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9172ab47cfaaSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9173ab47cfaaSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9174ab47cfaaSmrg 9175ab47cfaaSmrgpkg_failed=no 9176ab47cfaaSmrgAC_MSG_CHECKING([for $1]) 9177ab47cfaaSmrg 9178ab47cfaaSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9179ab47cfaaSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9180ab47cfaaSmrg 9181ab47cfaaSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9182ab47cfaaSmrgand $1[]_LIBS to avoid the need to call pkg-config. 9183ab47cfaaSmrgSee the pkg-config man page for more details.]) 9184ab47cfaaSmrg 9185ab47cfaaSmrgif test $pkg_failed = yes; then 91866aec45a7Smrg AC_MSG_RESULT([no]) 9187ab47cfaaSmrg _PKG_SHORT_ERRORS_SUPPORTED 9188ab47cfaaSmrg if test $_pkg_short_errors_supported = yes; then 918938770048Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9190ab47cfaaSmrg else 919138770048Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9192ab47cfaaSmrg fi 9193ab47cfaaSmrg # Put the nasty error message in config.log where it belongs 9194ab47cfaaSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9195ab47cfaaSmrg 91966aec45a7Smrg m4_default([$4], [AC_MSG_ERROR( 9197ab47cfaaSmrg[Package requirements ($2) were not met: 9198ab47cfaaSmrg 9199ab47cfaaSmrg$$1_PKG_ERRORS 9200ab47cfaaSmrg 9201ab47cfaaSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9202ab47cfaaSmrginstalled software in a non-standard prefix. 9203ab47cfaaSmrg 920438770048Smrg_PKG_TEXT])[]dnl 92056aec45a7Smrg ]) 9206ab47cfaaSmrgelif test $pkg_failed = untried; then 92076aec45a7Smrg AC_MSG_RESULT([no]) 92086aec45a7Smrg m4_default([$4], [AC_MSG_FAILURE( 9209ab47cfaaSmrg[The pkg-config script could not be found or is too old. Make sure it 9210ab47cfaaSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 9211ab47cfaaSmrgpath to pkg-config. 9212ab47cfaaSmrg 9213ab47cfaaSmrg_PKG_TEXT 9214ab47cfaaSmrg 921538770048SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 92166aec45a7Smrg ]) 9217ab47cfaaSmrgelse 9218ab47cfaaSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9219ab47cfaaSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9220ab47cfaaSmrg AC_MSG_RESULT([yes]) 92216aec45a7Smrg $3 9222ab47cfaaSmrgfi[]dnl 9223ab47cfaaSmrg])# PKG_CHECK_MODULES 9224ab47cfaaSmrg 92251e449e82Smrg 92261e449e82Smrg# PKG_INSTALLDIR(DIRECTORY) 92271e449e82Smrg# ------------------------- 92281e449e82Smrg# Substitutes the variable pkgconfigdir as the location where a module 92291e449e82Smrg# should install pkg-config .pc files. By default the directory is 92301e449e82Smrg# $libdir/pkgconfig, but the default can be changed by passing 92311e449e82Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 92321e449e82Smrg# parameter. 92331e449e82SmrgAC_DEFUN([PKG_INSTALLDIR], 92341e449e82Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 92351e449e82Smrgm4_pushdef([pkg_description], 92361e449e82Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 92371e449e82SmrgAC_ARG_WITH([pkgconfigdir], 92381e449e82Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 92391e449e82Smrg [with_pkgconfigdir=]pkg_default) 92401e449e82SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 92411e449e82Smrgm4_popdef([pkg_default]) 92421e449e82Smrgm4_popdef([pkg_description]) 92431e449e82Smrg]) dnl PKG_INSTALLDIR 92441e449e82Smrg 92451e449e82Smrg 92461e449e82Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 92471e449e82Smrg# ------------------------- 92481e449e82Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 92491e449e82Smrg# module should install arch-independent pkg-config .pc files. By 92501e449e82Smrg# default the directory is $datadir/pkgconfig, but the default can be 92511e449e82Smrg# changed by passing DIRECTORY. The user can override through the 92521e449e82Smrg# --with-noarch-pkgconfigdir parameter. 92531e449e82SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 92541e449e82Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 92551e449e82Smrgm4_pushdef([pkg_description], 92561e449e82Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 92571e449e82SmrgAC_ARG_WITH([noarch-pkgconfigdir], 92581e449e82Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 92591e449e82Smrg [with_noarch_pkgconfigdir=]pkg_default) 92601e449e82SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 92611e449e82Smrgm4_popdef([pkg_default]) 92621e449e82Smrgm4_popdef([pkg_description]) 92631e449e82Smrg]) dnl PKG_NOARCH_INSTALLDIR 92641e449e82Smrg 92651e449e82Smrg 92661e449e82Smrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 92671e449e82Smrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 92681e449e82Smrg# ------------------------------------------- 92691e449e82Smrg# Retrieves the value of the pkg-config variable for the given module. 92701e449e82SmrgAC_DEFUN([PKG_CHECK_VAR], 92711e449e82Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 92721e449e82SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 92731e449e82Smrg 92741e449e82Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 92751e449e82SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 92761e449e82Smrg 92771e449e82SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 92781e449e82Smrg])# PKG_CHECK_VAR 92791e449e82Smrg 92801473d951Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 92818697ee19Smrgdnl 92826aec45a7Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 92831e449e82Smrgdnl 92848697ee19Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 92856aec45a7Smrgdnl copy of this software and associated documentation files (the "Software"), 92866aec45a7Smrgdnl to deal in the Software without restriction, including without limitation 92876aec45a7Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 92886aec45a7Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 92896aec45a7Smrgdnl Software is furnished to do so, subject to the following conditions: 92908697ee19Smrgdnl 92916aec45a7Smrgdnl The above copyright notice and this permission notice (including the next 92926aec45a7Smrgdnl paragraph) shall be included in all copies or substantial portions of the 92936aec45a7Smrgdnl Software. 92948697ee19Smrgdnl 92956aec45a7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 92966aec45a7Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 92976aec45a7Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 92986aec45a7Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 92996aec45a7Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 93006aec45a7Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 93016aec45a7Smrgdnl DEALINGS IN THE SOFTWARE. 9302ab47cfaaSmrg 93038697ee19Smrg# XORG_MACROS_VERSION(required-version) 93048697ee19Smrg# ------------------------------------- 93058697ee19Smrg# Minimum version: 1.1.0 9306ab47cfaaSmrg# 93078697ee19Smrg# If you're using a macro added in Version 1.1 or newer, include this in 93088697ee19Smrg# your configure.ac with the minimum required version, such as: 93098697ee19Smrg# XORG_MACROS_VERSION(1.1) 9310ab47cfaaSmrg# 93116aec45a7Smrg# To ensure that this macro is defined, also add: 93126aec45a7Smrg# m4_ifndef([XORG_MACROS_VERSION], 93136aec45a7Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9314ab47cfaaSmrg# 9315ab47cfaaSmrg# 93161e449e82Smrg# See the "minimum version" comment for each macro you use to see what 93178697ee19Smrg# version you require. 93186aec45a7Smrgm4_defun([XORG_MACROS_VERSION],[ 93191e449e82Smrgm4_define([vers_have], [1.19.0]) 93206aec45a7Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 93216aec45a7Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 93226aec45a7Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 93236aec45a7Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 93246aec45a7Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 93256aec45a7Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 93266aec45a7Smrgm4_undefine([vers_have]) 93276aec45a7Smrgm4_undefine([maj_have]) 93286aec45a7Smrgm4_undefine([maj_needed]) 93298697ee19Smrg]) # XORG_MACROS_VERSION 9330ab47cfaaSmrg 93318697ee19Smrg# XORG_PROG_RAWCPP() 93328697ee19Smrg# ------------------ 93338697ee19Smrg# Minimum version: 1.0.0 9334ab47cfaaSmrg# 93358697ee19Smrg# Find cpp program and necessary flags for use in pre-processing text files 93368697ee19Smrg# such as man pages and config files 93378697ee19SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 93388697ee19SmrgAC_REQUIRE([AC_PROG_CPP]) 93391e449e82SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 93408697ee19Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9341ab47cfaaSmrg 93428697ee19Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 93438697ee19Smrg# which is not the best choice for supporting other OS'es, but covers most 93448697ee19Smrg# of the ones we need for now. 93458697ee19SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9346aa9e3350SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 93478697ee19Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 93488697ee19Smrg AC_MSG_RESULT([no]) 9349ab47cfaaSmrgelse 93508697ee19Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 93518697ee19Smrg RAWCPPFLAGS=-undef 93528697ee19Smrg AC_MSG_RESULT([yes]) 93531473d951Smrg # under Cygwin unix is still defined even with -undef 93541473d951Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 93551473d951Smrg RAWCPPFLAGS="-undef -ansi" 93561473d951Smrg AC_MSG_RESULT([yes, with -ansi]) 93578697ee19Smrg else 93588697ee19Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 93598697ee19Smrg fi 9360ab47cfaaSmrgfi 93618697ee19Smrgrm -f conftest.$ac_ext 9362ab47cfaaSmrg 93638697ee19SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9364aa9e3350SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 93658697ee19Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 93668697ee19Smrg AC_MSG_RESULT([no]) 93678697ee19Smrgelse 93688697ee19Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 93691e449e82Smrg TRADITIONALCPPFLAGS="-traditional" 93708697ee19Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 93718697ee19Smrg AC_MSG_RESULT([yes]) 93728697ee19Smrg else 93738697ee19Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 93748697ee19Smrg fi 93758697ee19Smrgfi 93768697ee19Smrgrm -f conftest.$ac_ext 93778697ee19SmrgAC_SUBST(RAWCPPFLAGS) 93781e449e82SmrgAC_SUBST(TRADITIONALCPPFLAGS) 93798697ee19Smrg]) # XORG_PROG_RAWCPP 9380ab47cfaaSmrg 93818697ee19Smrg# XORG_MANPAGE_SECTIONS() 93828697ee19Smrg# ----------------------- 93838697ee19Smrg# Minimum version: 1.0.0 9384ab47cfaaSmrg# 93858697ee19Smrg# Determine which sections man pages go in for the different man page types 93868697ee19Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 93878697ee19Smrg# Not sure if there's any better way than just hardcoding by OS name. 93888697ee19Smrg# Override default settings by setting environment variables 93896aec45a7Smrg# Added MAN_SUBSTS in version 1.8 93906aec45a7Smrg# Added AC_PROG_SED in version 1.8 9391ab47cfaaSmrg 93928697ee19SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 93938697ee19SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 93946aec45a7SmrgAC_REQUIRE([AC_PROG_SED]) 9395ab47cfaaSmrg 93968697ee19Smrgif test x$APP_MAN_SUFFIX = x ; then 93978697ee19Smrg APP_MAN_SUFFIX=1 93988697ee19Smrgfi 93998697ee19Smrgif test x$APP_MAN_DIR = x ; then 94008697ee19Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 94018697ee19Smrgfi 9402ab47cfaaSmrg 94038697ee19Smrgif test x$LIB_MAN_SUFFIX = x ; then 94048697ee19Smrg LIB_MAN_SUFFIX=3 94058697ee19Smrgfi 94068697ee19Smrgif test x$LIB_MAN_DIR = x ; then 94078697ee19Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 94088697ee19Smrgfi 9409ab47cfaaSmrg 94108697ee19Smrgif test x$FILE_MAN_SUFFIX = x ; then 94118697ee19Smrg case $host_os in 94128697ee19Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 94138697ee19Smrg *) FILE_MAN_SUFFIX=5 ;; 9414ab47cfaaSmrg esac 9415ab47cfaaSmrgfi 94168697ee19Smrgif test x$FILE_MAN_DIR = x ; then 94178697ee19Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 94188697ee19Smrgfi 9419ab47cfaaSmrg 94208697ee19Smrgif test x$MISC_MAN_SUFFIX = x ; then 94218697ee19Smrg case $host_os in 94228697ee19Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 94238697ee19Smrg *) MISC_MAN_SUFFIX=7 ;; 94248697ee19Smrg esac 94258697ee19Smrgfi 94268697ee19Smrgif test x$MISC_MAN_DIR = x ; then 94278697ee19Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 94288697ee19Smrgfi 9429ab47cfaaSmrg 94308697ee19Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 94318697ee19Smrg case $host_os in 94328697ee19Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 94338697ee19Smrg *) DRIVER_MAN_SUFFIX=4 ;; 94348697ee19Smrg esac 94358697ee19Smrgfi 94368697ee19Smrgif test x$DRIVER_MAN_DIR = x ; then 94378697ee19Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 94388697ee19Smrgfi 9439ab47cfaaSmrg 94408697ee19Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 94418697ee19Smrg case $host_os in 94428697ee19Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 94438697ee19Smrg *) ADMIN_MAN_SUFFIX=8 ;; 94448697ee19Smrg esac 94458697ee19Smrgfi 94468697ee19Smrgif test x$ADMIN_MAN_DIR = x ; then 94478697ee19Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9448ab47cfaaSmrgfi 9449ab47cfaaSmrg 9450ab47cfaaSmrg 94518697ee19SmrgAC_SUBST([APP_MAN_SUFFIX]) 94528697ee19SmrgAC_SUBST([LIB_MAN_SUFFIX]) 94538697ee19SmrgAC_SUBST([FILE_MAN_SUFFIX]) 94548697ee19SmrgAC_SUBST([MISC_MAN_SUFFIX]) 94558697ee19SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 94568697ee19SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 94578697ee19SmrgAC_SUBST([APP_MAN_DIR]) 94588697ee19SmrgAC_SUBST([LIB_MAN_DIR]) 94598697ee19SmrgAC_SUBST([FILE_MAN_DIR]) 94608697ee19SmrgAC_SUBST([MISC_MAN_DIR]) 94618697ee19SmrgAC_SUBST([DRIVER_MAN_DIR]) 94628697ee19SmrgAC_SUBST([ADMIN_MAN_DIR]) 94636aec45a7Smrg 94646aec45a7SmrgXORG_MAN_PAGE="X Version 11" 94656aec45a7SmrgAC_SUBST([XORG_MAN_PAGE]) 94666aec45a7SmrgMAN_SUBSTS="\ 94676aec45a7Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 94686aec45a7Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 94696aec45a7Smrg -e 's|__xservername__|Xorg|g' \ 94706aec45a7Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 94716aec45a7Smrg -e 's|__projectroot__|\$(prefix)|g' \ 94726aec45a7Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 94736aec45a7Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 94746aec45a7Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 94756aec45a7Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 94766aec45a7Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 94776aec45a7Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 94786aec45a7Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 94796aec45a7SmrgAC_SUBST([MAN_SUBSTS]) 94806aec45a7Smrg 94818697ee19Smrg]) # XORG_MANPAGE_SECTIONS 9482ab47cfaaSmrg 94836aec45a7Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 94846aec45a7Smrg# ------------------------ 94856aec45a7Smrg# Minimum version: 1.7.0 94866aec45a7Smrg# 94876aec45a7Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 94886aec45a7Smrg# provided by xorg-sgml-doctools, if installed. 94896aec45a7SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 94906aec45a7SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 94916aec45a7SmrgXORG_SGML_PATH= 94926aec45a7SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 94936aec45a7Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 94946aec45a7Smrg [m4_ifval([$1],[:], 94956aec45a7Smrg [if test x"$cross_compiling" != x"yes" ; then 94966aec45a7Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 94976aec45a7Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 94986aec45a7Smrg fi]) 94996aec45a7Smrg ]) 95006aec45a7Smrg 95016aec45a7Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 95026aec45a7Smrg# the path and the name of the doc stylesheet 95036aec45a7Smrgif test "x$XORG_SGML_PATH" != "x" ; then 95046aec45a7Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 95056aec45a7Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 95066aec45a7Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 95076aec45a7Smrgelse 95086aec45a7Smrg AC_MSG_RESULT([no]) 95096aec45a7Smrgfi 95106aec45a7Smrg 95116aec45a7SmrgAC_SUBST(XORG_SGML_PATH) 95126aec45a7SmrgAC_SUBST(STYLESHEET_SRCDIR) 95136aec45a7SmrgAC_SUBST(XSL_STYLESHEET) 95146aec45a7SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 95156aec45a7Smrg]) # XORG_CHECK_SGML_DOCTOOLS 95166aec45a7Smrg 95178697ee19Smrg# XORG_CHECK_LINUXDOC 95188697ee19Smrg# ------------------- 95198697ee19Smrg# Minimum version: 1.0.0 9520ab47cfaaSmrg# 95218697ee19Smrg# Defines the variable MAKE_TEXT if the necessary tools and 95228697ee19Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 95238697ee19Smrg# Whether or not the necessary tools and files are found can be checked 95248697ee19Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 95258697ee19SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 95266aec45a7SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 95276aec45a7SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9528ab47cfaaSmrg 95298697ee19SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9530ab47cfaaSmrg 95316aec45a7SmrgAC_MSG_CHECKING([whether to build documentation]) 9532ab47cfaaSmrg 95336aec45a7Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 95348697ee19Smrg BUILDDOC=yes 95358697ee19Smrgelse 95368697ee19Smrg BUILDDOC=no 95378697ee19Smrgfi 9538ab47cfaaSmrg 95398697ee19SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9540ab47cfaaSmrg 95418697ee19SmrgAC_MSG_RESULT([$BUILDDOC]) 9542ab47cfaaSmrg 95436aec45a7SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9544ab47cfaaSmrg 95456aec45a7Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 95468697ee19Smrg BUILDPDFDOC=yes 95478697ee19Smrgelse 95488697ee19Smrg BUILDPDFDOC=no 9549ab47cfaaSmrgfi 9550ab47cfaaSmrg 95518697ee19SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9552ab47cfaaSmrg 95538697ee19SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9554ab47cfaaSmrg 95556aec45a7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 95568697ee19SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 95578697ee19SmrgMAKE_PDF="$PS2PDF" 95588697ee19SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9559ab47cfaaSmrg 95608697ee19SmrgAC_SUBST(MAKE_TEXT) 95618697ee19SmrgAC_SUBST(MAKE_PS) 95628697ee19SmrgAC_SUBST(MAKE_PDF) 95638697ee19SmrgAC_SUBST(MAKE_HTML) 95648697ee19Smrg]) # XORG_CHECK_LINUXDOC 9565ab47cfaaSmrg 95668697ee19Smrg# XORG_CHECK_DOCBOOK 95678697ee19Smrg# ------------------- 95688697ee19Smrg# Minimum version: 1.0.0 9569ab47cfaaSmrg# 95708697ee19Smrg# Checks for the ability to build output formats from SGML DocBook source. 95718697ee19Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 95728697ee19Smrg# indicates whether the necessary tools and files are found and, if set, 95738697ee19Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 95748697ee19SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 95756aec45a7SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 95766aec45a7Smrg 95778697ee19SmrgBUILDTXTDOC=no 95788697ee19SmrgBUILDPDFDOC=no 95798697ee19SmrgBUILDPSDOC=no 95808697ee19SmrgBUILDHTMLDOC=no 9581ab47cfaaSmrg 95828697ee19SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 95838697ee19SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 95848697ee19SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 95858697ee19SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9586ab47cfaaSmrg 95876aec45a7SmrgAC_MSG_CHECKING([whether to build text documentation]) 95886aec45a7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 95898697ee19Smrg test x$BUILD_TXTDOC != xno; then 95908697ee19Smrg BUILDTXTDOC=yes 95918697ee19Smrgfi 95928697ee19SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 95938697ee19SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9594ab47cfaaSmrg 95956aec45a7SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 95966aec45a7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 95978697ee19Smrg test x$BUILD_PDFDOC != xno; then 95988697ee19Smrg BUILDPDFDOC=yes 9599ab47cfaaSmrgfi 96008697ee19SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 96018697ee19SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9602ab47cfaaSmrg 96036aec45a7SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 96046aec45a7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 96058697ee19Smrg test x$BUILD_PSDOC != xno; then 96068697ee19Smrg BUILDPSDOC=yes 96078697ee19Smrgfi 96088697ee19SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 96098697ee19SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9610ab47cfaaSmrg 96116aec45a7SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 96126aec45a7Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 96138697ee19Smrg test x$BUILD_HTMLDOC != xno; then 96148697ee19Smrg BUILDHTMLDOC=yes 96158697ee19Smrgfi 96168697ee19SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 96178697ee19SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9618ab47cfaaSmrg 96198697ee19SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 96208697ee19SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 96218697ee19SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 96228697ee19SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9623ab47cfaaSmrg 96248697ee19SmrgAC_SUBST(MAKE_TEXT) 96258697ee19SmrgAC_SUBST(MAKE_PS) 96268697ee19SmrgAC_SUBST(MAKE_PDF) 96278697ee19SmrgAC_SUBST(MAKE_HTML) 96288697ee19Smrg]) # XORG_CHECK_DOCBOOK 9629ab47cfaaSmrg 96306aec45a7Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 96316aec45a7Smrg# ---------------- 96326aec45a7Smrg# Minimum version: 1.5.0 96336aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 96346aec45a7Smrg# 96356aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 96366aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 96376aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 96386aec45a7Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 96396aec45a7Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 96406aec45a7Smrg# --with-xmlto assumes 'auto'. 96416aec45a7Smrg# 96426aec45a7Smrg# Interface to module: 96436aec45a7Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 96446aec45a7Smrg# XMLTO: returns the path of the xmlto program found 96456aec45a7Smrg# returns the path set by the user in the environment 96466aec45a7Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 96476aec45a7Smrg# 'no' user instructs the module not to use xmlto 96486aec45a7Smrg# 96496aec45a7Smrg# Added in version 1.10.0 96506aec45a7Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 96516aec45a7Smrg# xmlto for text output requires either lynx, links, or w3m browsers 96526aec45a7Smrg# 96536aec45a7Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 96546aec45a7Smrg# 96556aec45a7SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 96566aec45a7SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 96576aec45a7Smrgm4_define([_defopt], m4_default([$2], [auto])) 96586aec45a7SmrgAC_ARG_WITH(xmlto, 96596aec45a7Smrg AS_HELP_STRING([--with-xmlto], 96606aec45a7Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 96616aec45a7Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 96626aec45a7Smrgm4_undefine([_defopt]) 96636aec45a7Smrg 96646aec45a7Smrgif test "x$use_xmlto" = x"auto"; then 96656aec45a7Smrg AC_PATH_PROG([XMLTO], [xmlto]) 96666aec45a7Smrg if test "x$XMLTO" = "x"; then 96676aec45a7Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 96686aec45a7Smrg have_xmlto=no 96696aec45a7Smrg else 96706aec45a7Smrg have_xmlto=yes 96716aec45a7Smrg fi 96726aec45a7Smrgelif test "x$use_xmlto" = x"yes" ; then 96736aec45a7Smrg AC_PATH_PROG([XMLTO], [xmlto]) 96746aec45a7Smrg if test "x$XMLTO" = "x"; then 96756aec45a7Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 96766aec45a7Smrg fi 96776aec45a7Smrg have_xmlto=yes 96786aec45a7Smrgelif test "x$use_xmlto" = x"no" ; then 96796aec45a7Smrg if test "x$XMLTO" != "x"; then 96806aec45a7Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 96816aec45a7Smrg fi 96826aec45a7Smrg have_xmlto=no 96836aec45a7Smrgelse 96846aec45a7Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 96856aec45a7Smrgfi 96866aec45a7Smrg 96876aec45a7Smrg# Test for a minimum version of xmlto, if provided. 96886aec45a7Smrgm4_ifval([$1], 96896aec45a7Smrg[if test "$have_xmlto" = yes; then 96906aec45a7Smrg # scrape the xmlto version 96916aec45a7Smrg AC_MSG_CHECKING([the xmlto version]) 96926aec45a7Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 96936aec45a7Smrg AC_MSG_RESULT([$xmlto_version]) 96946aec45a7Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 96956aec45a7Smrg [if test "x$use_xmlto" = xauto; then 96966aec45a7Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 96976aec45a7Smrg have_xmlto=no 96986aec45a7Smrg else 96996aec45a7Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 97006aec45a7Smrg fi]) 97016aec45a7Smrgfi]) 97026aec45a7Smrg 97036aec45a7Smrg# Test for the ability of xmlto to generate a text target 97046aec45a7Smrghave_xmlto_text=no 97056aec45a7Smrgcat > conftest.xml << "EOF" 97066aec45a7SmrgEOF 97076aec45a7SmrgAS_IF([test "$have_xmlto" = yes], 97086aec45a7Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 97096aec45a7Smrg [have_xmlto_text=yes], 97106aec45a7Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 97116aec45a7Smrgrm -f conftest.xml 97126aec45a7SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 97136aec45a7SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 97146aec45a7Smrg]) # XORG_WITH_XMLTO 97156aec45a7Smrg 9716aa9e3350Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9717aa9e3350Smrg# -------------------------------------------- 9718aa9e3350Smrg# Minimum version: 1.12.0 9719aa9e3350Smrg# Minimum version for optional DEFAULT argument: 1.12.0 9720aa9e3350Smrg# 9721aa9e3350Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9722aa9e3350Smrg# XML-based language used for the transformation of XML documents. 9723aa9e3350Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9724aa9e3350Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9725aa9e3350Smrg# The XSLT processor is often used as a standalone tool for transformations. 9726aa9e3350Smrg# It should not be assumed that this tool is used only to work with documnetation. 9727aa9e3350Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9728aa9e3350Smrg# 9729aa9e3350Smrg# Interface to module: 9730aa9e3350Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9731aa9e3350Smrg# XSLTPROC: returns the path of the xsltproc program found 9732aa9e3350Smrg# returns the path set by the user in the environment 9733aa9e3350Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9734aa9e3350Smrg# 'no' user instructs the module not to use xsltproc 9735aa9e3350Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9736aa9e3350Smrg# 9737aa9e3350Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9738aa9e3350Smrg# 9739aa9e3350SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9740aa9e3350SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9741aa9e3350Smrg# Preserves the interface, should it be implemented later 9742aa9e3350Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9743aa9e3350Smrgm4_define([_defopt], m4_default([$2], [auto])) 9744aa9e3350SmrgAC_ARG_WITH(xsltproc, 9745aa9e3350Smrg AS_HELP_STRING([--with-xsltproc], 9746aa9e3350Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9747aa9e3350Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9748aa9e3350Smrgm4_undefine([_defopt]) 9749aa9e3350Smrg 9750aa9e3350Smrgif test "x$use_xsltproc" = x"auto"; then 9751aa9e3350Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9752aa9e3350Smrg if test "x$XSLTPROC" = "x"; then 9753aa9e3350Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9754aa9e3350Smrg have_xsltproc=no 9755aa9e3350Smrg else 9756aa9e3350Smrg have_xsltproc=yes 9757aa9e3350Smrg fi 9758aa9e3350Smrgelif test "x$use_xsltproc" = x"yes" ; then 9759aa9e3350Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9760aa9e3350Smrg if test "x$XSLTPROC" = "x"; then 9761aa9e3350Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9762aa9e3350Smrg fi 9763aa9e3350Smrg have_xsltproc=yes 9764aa9e3350Smrgelif test "x$use_xsltproc" = x"no" ; then 9765aa9e3350Smrg if test "x$XSLTPROC" != "x"; then 9766aa9e3350Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9767aa9e3350Smrg fi 9768aa9e3350Smrg have_xsltproc=no 9769aa9e3350Smrgelse 9770aa9e3350Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9771aa9e3350Smrgfi 9772aa9e3350Smrg 9773aa9e3350SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9774aa9e3350Smrg]) # XORG_WITH_XSLTPROC 9775aa9e3350Smrg 9776aa9e3350Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9777aa9e3350Smrg# ---------------------------------------- 9778aa9e3350Smrg# Minimum version: 1.15.0 9779aa9e3350Smrg# 9780aa9e3350Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 9781aa9e3350Smrg# scanning arbitrary text files, extracting information from those text files, 9782aa9e3350Smrg# and printing reports based on that information. 9783aa9e3350Smrg# 9784aa9e3350Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9785aa9e3350Smrg# 9786aa9e3350Smrg# Interface to module: 9787aa9e3350Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 9788aa9e3350Smrg# PERL: returns the path of the perl program found 9789aa9e3350Smrg# returns the path set by the user in the environment 9790aa9e3350Smrg# --with-perl: 'yes' user instructs the module to use perl 9791aa9e3350Smrg# 'no' user instructs the module not to use perl 9792aa9e3350Smrg# have_perl: returns yes if perl found in PATH or no 9793aa9e3350Smrg# 9794aa9e3350Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9795aa9e3350Smrg# 9796aa9e3350SmrgAC_DEFUN([XORG_WITH_PERL],[ 9797aa9e3350SmrgAC_ARG_VAR([PERL], [Path to perl command]) 9798aa9e3350Smrg# Preserves the interface, should it be implemented later 9799aa9e3350Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9800aa9e3350Smrgm4_define([_defopt], m4_default([$2], [auto])) 9801aa9e3350SmrgAC_ARG_WITH(perl, 9802aa9e3350Smrg AS_HELP_STRING([--with-perl], 9803aa9e3350Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 9804aa9e3350Smrg [use_perl=$withval], [use_perl=]_defopt) 9805aa9e3350Smrgm4_undefine([_defopt]) 9806aa9e3350Smrg 9807aa9e3350Smrgif test "x$use_perl" = x"auto"; then 9808aa9e3350Smrg AC_PATH_PROG([PERL], [perl]) 9809aa9e3350Smrg if test "x$PERL" = "x"; then 9810aa9e3350Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9811aa9e3350Smrg have_perl=no 9812aa9e3350Smrg else 9813aa9e3350Smrg have_perl=yes 9814aa9e3350Smrg fi 9815aa9e3350Smrgelif test "x$use_perl" = x"yes" ; then 9816aa9e3350Smrg AC_PATH_PROG([PERL], [perl]) 9817aa9e3350Smrg if test "x$PERL" = "x"; then 9818aa9e3350Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9819aa9e3350Smrg fi 9820aa9e3350Smrg have_perl=yes 9821aa9e3350Smrgelif test "x$use_perl" = x"no" ; then 9822aa9e3350Smrg if test "x$PERL" != "x"; then 9823aa9e3350Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9824aa9e3350Smrg fi 9825aa9e3350Smrg have_perl=no 9826aa9e3350Smrgelse 9827aa9e3350Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9828aa9e3350Smrgfi 9829aa9e3350Smrg 9830aa9e3350SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9831aa9e3350Smrg]) # XORG_WITH_PERL 9832aa9e3350Smrg 98336aec45a7Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 98346aec45a7Smrg# ---------------- 98356aec45a7Smrg# Minimum version: 1.5.0 98366aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 98376aec45a7Smrg# 98386aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 98396aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 98406aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 98416aec45a7Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 98426aec45a7Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 98436aec45a7Smrg# --with-asciidoc assumes 'auto'. 98446aec45a7Smrg# 98456aec45a7Smrg# Interface to module: 98466aec45a7Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 98476aec45a7Smrg# ASCIIDOC: returns the path of the asciidoc program found 98486aec45a7Smrg# returns the path set by the user in the environment 98496aec45a7Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 98506aec45a7Smrg# 'no' user instructs the module not to use asciidoc 98516aec45a7Smrg# 98526aec45a7Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 98536aec45a7Smrg# 98546aec45a7SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 98556aec45a7SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 98566aec45a7Smrgm4_define([_defopt], m4_default([$2], [auto])) 98576aec45a7SmrgAC_ARG_WITH(asciidoc, 98586aec45a7Smrg AS_HELP_STRING([--with-asciidoc], 98596aec45a7Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 98606aec45a7Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 98616aec45a7Smrgm4_undefine([_defopt]) 98626aec45a7Smrg 98636aec45a7Smrgif test "x$use_asciidoc" = x"auto"; then 98646aec45a7Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 98656aec45a7Smrg if test "x$ASCIIDOC" = "x"; then 98666aec45a7Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 98676aec45a7Smrg have_asciidoc=no 98686aec45a7Smrg else 98696aec45a7Smrg have_asciidoc=yes 98706aec45a7Smrg fi 98716aec45a7Smrgelif test "x$use_asciidoc" = x"yes" ; then 98726aec45a7Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 98736aec45a7Smrg if test "x$ASCIIDOC" = "x"; then 98746aec45a7Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 98756aec45a7Smrg fi 98766aec45a7Smrg have_asciidoc=yes 98776aec45a7Smrgelif test "x$use_asciidoc" = x"no" ; then 98786aec45a7Smrg if test "x$ASCIIDOC" != "x"; then 98796aec45a7Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 98806aec45a7Smrg fi 98816aec45a7Smrg have_asciidoc=no 98826aec45a7Smrgelse 98836aec45a7Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 98846aec45a7Smrgfi 98856aec45a7Smrgm4_ifval([$1], 98866aec45a7Smrg[if test "$have_asciidoc" = yes; then 98876aec45a7Smrg # scrape the asciidoc version 98886aec45a7Smrg AC_MSG_CHECKING([the asciidoc version]) 98896aec45a7Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 98906aec45a7Smrg AC_MSG_RESULT([$asciidoc_version]) 98916aec45a7Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 98926aec45a7Smrg [if test "x$use_asciidoc" = xauto; then 98936aec45a7Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 98946aec45a7Smrg have_asciidoc=no 98956aec45a7Smrg else 98966aec45a7Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 98976aec45a7Smrg fi]) 98986aec45a7Smrgfi]) 98996aec45a7SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 99006aec45a7Smrg]) # XORG_WITH_ASCIIDOC 99016aec45a7Smrg 99026aec45a7Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 99031e449e82Smrg# ------------------------------------------- 99046aec45a7Smrg# Minimum version: 1.5.0 99056aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 99061e449e82Smrg# Minimum version for optional DOT checking: 1.18.0 99076aec45a7Smrg# 99086aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 99096aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 99106aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 99116aec45a7Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 99126aec45a7Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 99136aec45a7Smrg# --with-doxygen assumes 'auto'. 99146aec45a7Smrg# 99156aec45a7Smrg# Interface to module: 99166aec45a7Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 99176aec45a7Smrg# DOXYGEN: returns the path of the doxygen program found 99186aec45a7Smrg# returns the path set by the user in the environment 99196aec45a7Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 99206aec45a7Smrg# 'no' user instructs the module not to use doxygen 99216aec45a7Smrg# 99226aec45a7Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 99236aec45a7Smrg# 99246aec45a7SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 99256aec45a7SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 99261e449e82SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 99276aec45a7Smrgm4_define([_defopt], m4_default([$2], [auto])) 99286aec45a7SmrgAC_ARG_WITH(doxygen, 99296aec45a7Smrg AS_HELP_STRING([--with-doxygen], 99306aec45a7Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 99316aec45a7Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 99326aec45a7Smrgm4_undefine([_defopt]) 99336aec45a7Smrg 99346aec45a7Smrgif test "x$use_doxygen" = x"auto"; then 99356aec45a7Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 99366aec45a7Smrg if test "x$DOXYGEN" = "x"; then 99376aec45a7Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 99386aec45a7Smrg have_doxygen=no 99396aec45a7Smrg else 99406aec45a7Smrg have_doxygen=yes 99416aec45a7Smrg fi 99426aec45a7Smrgelif test "x$use_doxygen" = x"yes" ; then 99436aec45a7Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 99446aec45a7Smrg if test "x$DOXYGEN" = "x"; then 99456aec45a7Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 99466aec45a7Smrg fi 99476aec45a7Smrg have_doxygen=yes 99486aec45a7Smrgelif test "x$use_doxygen" = x"no" ; then 99496aec45a7Smrg if test "x$DOXYGEN" != "x"; then 99506aec45a7Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 99516aec45a7Smrg fi 99526aec45a7Smrg have_doxygen=no 99536aec45a7Smrgelse 99546aec45a7Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 99556aec45a7Smrgfi 99566aec45a7Smrgm4_ifval([$1], 99576aec45a7Smrg[if test "$have_doxygen" = yes; then 99586aec45a7Smrg # scrape the doxygen version 99596aec45a7Smrg AC_MSG_CHECKING([the doxygen version]) 99606aec45a7Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 99616aec45a7Smrg AC_MSG_RESULT([$doxygen_version]) 99626aec45a7Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 99636aec45a7Smrg [if test "x$use_doxygen" = xauto; then 99646aec45a7Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 99656aec45a7Smrg have_doxygen=no 99666aec45a7Smrg else 99676aec45a7Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 99686aec45a7Smrg fi]) 99696aec45a7Smrgfi]) 99701e449e82Smrg 99711e449e82Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 99721e449e82Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 99731e449e82Smrgdnl HAVE_DOT = @HAVE_DOT@ 99741e449e82SmrgHAVE_DOT=no 99751e449e82Smrgif test "x$have_doxygen" = "xyes"; then 99761e449e82Smrg AC_PATH_PROG([DOT], [dot]) 99771e449e82Smrg if test "x$DOT" != "x"; then 99781e449e82Smrg HAVE_DOT=yes 99791e449e82Smrg fi 99801e449e82Smrgfi 99811e449e82Smrg 99821e449e82SmrgAC_SUBST([HAVE_DOT]) 99831e449e82SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 99846aec45a7SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 99856aec45a7Smrg]) # XORG_WITH_DOXYGEN 99866aec45a7Smrg 99876aec45a7Smrg# XORG_WITH_GROFF([DEFAULT]) 99886aec45a7Smrg# ---------------- 99896aec45a7Smrg# Minimum version: 1.6.0 99906aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 99916aec45a7Smrg# 99926aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 99936aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 99946aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 99956aec45a7Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 99966aec45a7Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 99976aec45a7Smrg# --with-groff assumes 'auto'. 99986aec45a7Smrg# 99996aec45a7Smrg# Interface to module: 100006aec45a7Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 100016aec45a7Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 100026aec45a7Smrg# HAVE_GROFF_MS: the -ms macros package 100036aec45a7Smrg# GROFF: returns the path of the groff program found 100046aec45a7Smrg# returns the path set by the user in the environment 100056aec45a7Smrg# --with-groff: 'yes' user instructs the module to use groff 100066aec45a7Smrg# 'no' user instructs the module not to use groff 100076aec45a7Smrg# 100086aec45a7Smrg# Added in version 1.9.0: 100096aec45a7Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 100106aec45a7Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 100116aec45a7Smrg# psselect from the psutils package. 100126aec45a7Smrg# the ghostcript package. Refer to the grohtml man pages 100136aec45a7Smrg# 100146aec45a7Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 100156aec45a7Smrg# 100166aec45a7Smrg# OS and distros often splits groff in a basic and full package, the former 100176aec45a7Smrg# having the groff program and the later having devices, fonts and macros 100186aec45a7Smrg# Checking for the groff executable is not enough. 100196aec45a7Smrg# 100206aec45a7Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 100216aec45a7Smrg# unset HAVE_GROFF or GROFF env variables. 100226aec45a7Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 100236aec45a7Smrg# 100246aec45a7SmrgAC_DEFUN([XORG_WITH_GROFF],[ 100256aec45a7SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 100266aec45a7Smrgm4_define([_defopt], m4_default([$1], [auto])) 100276aec45a7SmrgAC_ARG_WITH(groff, 100286aec45a7Smrg AS_HELP_STRING([--with-groff], 100296aec45a7Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 100306aec45a7Smrg [use_groff=$withval], [use_groff=]_defopt) 100316aec45a7Smrgm4_undefine([_defopt]) 100326aec45a7Smrg 100336aec45a7Smrgif test "x$use_groff" = x"auto"; then 100346aec45a7Smrg AC_PATH_PROG([GROFF], [groff]) 100356aec45a7Smrg if test "x$GROFF" = "x"; then 100366aec45a7Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 100376aec45a7Smrg have_groff=no 100386aec45a7Smrg else 100396aec45a7Smrg have_groff=yes 100406aec45a7Smrg fi 100416aec45a7Smrgelif test "x$use_groff" = x"yes" ; then 100426aec45a7Smrg AC_PATH_PROG([GROFF], [groff]) 100436aec45a7Smrg if test "x$GROFF" = "x"; then 100446aec45a7Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 100456aec45a7Smrg fi 100466aec45a7Smrg have_groff=yes 100476aec45a7Smrgelif test "x$use_groff" = x"no" ; then 100486aec45a7Smrg if test "x$GROFF" != "x"; then 100496aec45a7Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 100506aec45a7Smrg fi 100516aec45a7Smrg have_groff=no 100526aec45a7Smrgelse 100536aec45a7Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 100546aec45a7Smrgfi 100556aec45a7Smrg 100566aec45a7Smrg# We have groff, test for the presence of the macro packages 100576aec45a7Smrgif test "x$have_groff" = x"yes"; then 100586aec45a7Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 100596aec45a7Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 100606aec45a7Smrg groff_ms_works=yes 100616aec45a7Smrg else 100626aec45a7Smrg groff_ms_works=no 100636aec45a7Smrg fi 100646aec45a7Smrg AC_MSG_RESULT([$groff_ms_works]) 100656aec45a7Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 100666aec45a7Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 100676aec45a7Smrg groff_mm_works=yes 100686aec45a7Smrg else 100696aec45a7Smrg groff_mm_works=no 100706aec45a7Smrg fi 100716aec45a7Smrg AC_MSG_RESULT([$groff_mm_works]) 100726aec45a7Smrgfi 100736aec45a7Smrg 100746aec45a7Smrg# We have groff, test for HTML dependencies, one command per package 100756aec45a7Smrgif test "x$have_groff" = x"yes"; then 100766aec45a7Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 100776aec45a7Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 100786aec45a7Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 100796aec45a7Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 100806aec45a7Smrg have_groff_html=yes 100816aec45a7Smrg else 100826aec45a7Smrg have_groff_html=no 100836aec45a7Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 100846aec45a7Smrg fi 100856aec45a7Smrgfi 100866aec45a7Smrg 100876aec45a7Smrg# Set Automake conditionals for Makefiles 100886aec45a7SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 100896aec45a7SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 100906aec45a7SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 100916aec45a7SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 100926aec45a7Smrg]) # XORG_WITH_GROFF 100936aec45a7Smrg 10094aa9e3350Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10095aa9e3350Smrg# --------------------------------------- 100966aec45a7Smrg# Minimum version: 1.6.0 100976aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10098aa9e3350Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 100996aec45a7Smrg# 101006aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 101016aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 101026aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 101036aec45a7Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 101046aec45a7Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 101056aec45a7Smrg# --with-fop assumes 'auto'. 101066aec45a7Smrg# 101076aec45a7Smrg# Interface to module: 101086aec45a7Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 101096aec45a7Smrg# FOP: returns the path of the fop program found 101106aec45a7Smrg# returns the path set by the user in the environment 101116aec45a7Smrg# --with-fop: 'yes' user instructs the module to use fop 101126aec45a7Smrg# 'no' user instructs the module not to use fop 101136aec45a7Smrg# 101146aec45a7Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 101156aec45a7Smrg# 101166aec45a7SmrgAC_DEFUN([XORG_WITH_FOP],[ 101176aec45a7SmrgAC_ARG_VAR([FOP], [Path to fop command]) 10118aa9e3350Smrgm4_define([_defopt], m4_default([$2], [auto])) 101196aec45a7SmrgAC_ARG_WITH(fop, 101206aec45a7Smrg AS_HELP_STRING([--with-fop], 101216aec45a7Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 101226aec45a7Smrg [use_fop=$withval], [use_fop=]_defopt) 101236aec45a7Smrgm4_undefine([_defopt]) 101246aec45a7Smrg 101256aec45a7Smrgif test "x$use_fop" = x"auto"; then 101266aec45a7Smrg AC_PATH_PROG([FOP], [fop]) 101276aec45a7Smrg if test "x$FOP" = "x"; then 101286aec45a7Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 101296aec45a7Smrg have_fop=no 101306aec45a7Smrg else 101316aec45a7Smrg have_fop=yes 101326aec45a7Smrg fi 101336aec45a7Smrgelif test "x$use_fop" = x"yes" ; then 101346aec45a7Smrg AC_PATH_PROG([FOP], [fop]) 101356aec45a7Smrg if test "x$FOP" = "x"; then 101366aec45a7Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 101376aec45a7Smrg fi 101386aec45a7Smrg have_fop=yes 101396aec45a7Smrgelif test "x$use_fop" = x"no" ; then 101406aec45a7Smrg if test "x$FOP" != "x"; then 101416aec45a7Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 101426aec45a7Smrg fi 101436aec45a7Smrg have_fop=no 101446aec45a7Smrgelse 101456aec45a7Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 101466aec45a7Smrgfi 10147aa9e3350Smrg 10148aa9e3350Smrg# Test for a minimum version of fop, if provided. 10149aa9e3350Smrgm4_ifval([$1], 10150aa9e3350Smrg[if test "$have_fop" = yes; then 10151aa9e3350Smrg # scrape the fop version 10152aa9e3350Smrg AC_MSG_CHECKING([for fop minimum version]) 10153aa9e3350Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10154aa9e3350Smrg AC_MSG_RESULT([$fop_version]) 10155aa9e3350Smrg AS_VERSION_COMPARE([$fop_version], [$1], 10156aa9e3350Smrg [if test "x$use_fop" = xauto; then 10157aa9e3350Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10158aa9e3350Smrg have_fop=no 10159aa9e3350Smrg else 10160aa9e3350Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10161aa9e3350Smrg fi]) 10162aa9e3350Smrgfi]) 101636aec45a7SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 101646aec45a7Smrg]) # XORG_WITH_FOP 101656aec45a7Smrg 101661e449e82Smrg# XORG_WITH_M4([MIN-VERSION]) 101671e449e82Smrg# --------------------------- 101681e449e82Smrg# Minimum version: 1.19.0 101691e449e82Smrg# 101701e449e82Smrg# This macro attempts to locate an m4 macro processor which supports 101711e449e82Smrg# -I option and is only useful for modules relying on M4 in order to 101721e449e82Smrg# expand macros in source code files. 101731e449e82Smrg# 101741e449e82Smrg# Interface to module: 101751e449e82Smrg# M4: returns the path of the m4 program found 101761e449e82Smrg# returns the path set by the user in the environment 101771e449e82Smrg# 101781e449e82SmrgAC_DEFUN([XORG_WITH_M4], [ 101791e449e82SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 101801e449e82Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 101811e449e82Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 101821e449e82Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 101831e449e82Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 101841e449e82Smrg [$PATH:/usr/gnu/bin])]) 101851e449e82Smrg 101861e449e82SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 101871e449e82Smrg]) # XORG_WITH_M4 101881e449e82Smrg 101896aec45a7Smrg# XORG_WITH_PS2PDF([DEFAULT]) 101906aec45a7Smrg# ---------------- 101916aec45a7Smrg# Minimum version: 1.6.0 101926aec45a7Smrg# Minimum version for optional DEFAULT argument: 1.11.0 101936aec45a7Smrg# 101946aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 101956aec45a7Smrg# not at the appropriate level. This macro enables a module to test for the 101966aec45a7Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 101976aec45a7Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 101986aec45a7Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 101996aec45a7Smrg# --with-ps2pdf assumes 'auto'. 102006aec45a7Smrg# 102016aec45a7Smrg# Interface to module: 102026aec45a7Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 102036aec45a7Smrg# PS2PDF: returns the path of the ps2pdf program found 102046aec45a7Smrg# returns the path set by the user in the environment 102056aec45a7Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 102066aec45a7Smrg# 'no' user instructs the module not to use ps2pdf 102076aec45a7Smrg# 102086aec45a7Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 102096aec45a7Smrg# 102106aec45a7SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 102116aec45a7SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 102126aec45a7Smrgm4_define([_defopt], m4_default([$1], [auto])) 102136aec45a7SmrgAC_ARG_WITH(ps2pdf, 102146aec45a7Smrg AS_HELP_STRING([--with-ps2pdf], 102156aec45a7Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 102166aec45a7Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 102176aec45a7Smrgm4_undefine([_defopt]) 102186aec45a7Smrg 102196aec45a7Smrgif test "x$use_ps2pdf" = x"auto"; then 102206aec45a7Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 102216aec45a7Smrg if test "x$PS2PDF" = "x"; then 102226aec45a7Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 102236aec45a7Smrg have_ps2pdf=no 102246aec45a7Smrg else 102256aec45a7Smrg have_ps2pdf=yes 102266aec45a7Smrg fi 102276aec45a7Smrgelif test "x$use_ps2pdf" = x"yes" ; then 102286aec45a7Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 102296aec45a7Smrg if test "x$PS2PDF" = "x"; then 102306aec45a7Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 102316aec45a7Smrg fi 102326aec45a7Smrg have_ps2pdf=yes 102336aec45a7Smrgelif test "x$use_ps2pdf" = x"no" ; then 102346aec45a7Smrg if test "x$PS2PDF" != "x"; then 102356aec45a7Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 102366aec45a7Smrg fi 102376aec45a7Smrg have_ps2pdf=no 102386aec45a7Smrgelse 102396aec45a7Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 102406aec45a7Smrgfi 102416aec45a7SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 102426aec45a7Smrg]) # XORG_WITH_PS2PDF 102436aec45a7Smrg 102446aec45a7Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 102456aec45a7Smrg# ---------------- 102466aec45a7Smrg# Minimum version: 1.6.0 102476aec45a7Smrg# 102486aec45a7Smrg# Documentation tools are not always available on all platforms and sometimes 102496aec45a7Smrg# not at the appropriate level. This macro enables a builder to skip all 102506aec45a7Smrg# documentation targets except traditional man pages. 102516aec45a7Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 102526aec45a7Smrg# maximum flexibilty in controlling documentation building. 102536aec45a7Smrg# Refer to: 102546aec45a7Smrg# XORG_WITH_XMLTO --with-xmlto 102556aec45a7Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 102566aec45a7Smrg# XORG_WITH_DOXYGEN --with-doxygen 102576aec45a7Smrg# XORG_WITH_FOP --with-fop 102586aec45a7Smrg# XORG_WITH_GROFF --with-groff 102596aec45a7Smrg# XORG_WITH_PS2PDF --with-ps2pdf 102606aec45a7Smrg# 102616aec45a7Smrg# Interface to module: 102626aec45a7Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 102636aec45a7Smrg# --enable-docs: 'yes' user instructs the module to generate docs 102646aec45a7Smrg# 'no' user instructs the module not to generate docs 102656aec45a7Smrg# parm1: specify the default value, yes or no. 102666aec45a7Smrg# 102676aec45a7SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10268aa9e3350Smrgm4_define([docs_default], m4_default([$1], [yes])) 102696aec45a7SmrgAC_ARG_ENABLE(docs, 102706aec45a7Smrg AS_HELP_STRING([--enable-docs], 10271aa9e3350Smrg [Enable building the documentation (default: ]docs_default[)]), 10272aa9e3350Smrg [build_docs=$enableval], [build_docs=]docs_default) 10273aa9e3350Smrgm4_undefine([docs_default]) 102746aec45a7SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 102756aec45a7SmrgAC_MSG_CHECKING([whether to build documentation]) 102766aec45a7SmrgAC_MSG_RESULT([$build_docs]) 102776aec45a7Smrg]) # XORG_ENABLE_DOCS 102786aec45a7Smrg 102796aec45a7Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 102806aec45a7Smrg# ---------------- 102816aec45a7Smrg# Minimum version: 1.6.0 102826aec45a7Smrg# 102836aec45a7Smrg# This macro enables a builder to skip all developer documentation. 102846aec45a7Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 102856aec45a7Smrg# maximum flexibilty in controlling documentation building. 102866aec45a7Smrg# Refer to: 102876aec45a7Smrg# XORG_WITH_XMLTO --with-xmlto 102886aec45a7Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 102896aec45a7Smrg# XORG_WITH_DOXYGEN --with-doxygen 102906aec45a7Smrg# XORG_WITH_FOP --with-fop 102916aec45a7Smrg# XORG_WITH_GROFF --with-groff 102926aec45a7Smrg# XORG_WITH_PS2PDF --with-ps2pdf 102936aec45a7Smrg# 102946aec45a7Smrg# Interface to module: 102956aec45a7Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 102966aec45a7Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 102976aec45a7Smrg# 'no' user instructs the module not to generate developer docs 102986aec45a7Smrg# parm1: specify the default value, yes or no. 102996aec45a7Smrg# 103006aec45a7SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 103016aec45a7Smrgm4_define([devel_default], m4_default([$1], [yes])) 103026aec45a7SmrgAC_ARG_ENABLE(devel-docs, 103036aec45a7Smrg AS_HELP_STRING([--enable-devel-docs], 103046aec45a7Smrg [Enable building the developer documentation (default: ]devel_default[)]), 103056aec45a7Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 103066aec45a7Smrgm4_undefine([devel_default]) 103076aec45a7SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 103086aec45a7SmrgAC_MSG_CHECKING([whether to build developer documentation]) 103096aec45a7SmrgAC_MSG_RESULT([$build_devel_docs]) 103106aec45a7Smrg]) # XORG_ENABLE_DEVEL_DOCS 103116aec45a7Smrg 103126aec45a7Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 103136aec45a7Smrg# ---------------- 103146aec45a7Smrg# Minimum version: 1.6.0 103156aec45a7Smrg# 103166aec45a7Smrg# This macro enables a builder to skip all functional specification targets. 103176aec45a7Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 103186aec45a7Smrg# maximum flexibilty in controlling documentation building. 103196aec45a7Smrg# Refer to: 103206aec45a7Smrg# XORG_WITH_XMLTO --with-xmlto 103216aec45a7Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 103226aec45a7Smrg# XORG_WITH_DOXYGEN --with-doxygen 103236aec45a7Smrg# XORG_WITH_FOP --with-fop 103246aec45a7Smrg# XORG_WITH_GROFF --with-groff 103256aec45a7Smrg# XORG_WITH_PS2PDF --with-ps2pdf 103266aec45a7Smrg# 103276aec45a7Smrg# Interface to module: 103286aec45a7Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 103296aec45a7Smrg# --enable-specs: 'yes' user instructs the module to generate specs 103306aec45a7Smrg# 'no' user instructs the module not to generate specs 103316aec45a7Smrg# parm1: specify the default value, yes or no. 103326aec45a7Smrg# 103336aec45a7SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 103346aec45a7Smrgm4_define([spec_default], m4_default([$1], [yes])) 103356aec45a7SmrgAC_ARG_ENABLE(specs, 103366aec45a7Smrg AS_HELP_STRING([--enable-specs], 103376aec45a7Smrg [Enable building the specs (default: ]spec_default[)]), 103386aec45a7Smrg [build_specs=$enableval], [build_specs=]spec_default) 103396aec45a7Smrgm4_undefine([spec_default]) 103406aec45a7SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 103416aec45a7SmrgAC_MSG_CHECKING([whether to build functional specifications]) 103426aec45a7SmrgAC_MSG_RESULT([$build_specs]) 103436aec45a7Smrg]) # XORG_ENABLE_SPECS 103446aec45a7Smrg 10345aa9e3350Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10346aa9e3350Smrg# ---------------------------------------------- 10347aa9e3350Smrg# Minimum version: 1.13.0 10348aa9e3350Smrg# 10349aa9e3350Smrg# This macro enables a builder to enable/disable unit testing 10350aa9e3350Smrg# It makes no assumption about the test cases implementation 10351aa9e3350Smrg# Test cases may or may not use Automake "Support for test suites" 10352aa9e3350Smrg# They may or may not use the software utility library GLib 10353aa9e3350Smrg# 10354aa9e3350Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10355aa9e3350Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10356aa9e3350Smrg# The variable enable_unit_tests is used by other macros in this file. 10357aa9e3350Smrg# 10358aa9e3350Smrg# Interface to module: 10359aa9e3350Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10360aa9e3350Smrg# enable_unit_tests: used in configure.ac for additional configuration 10361aa9e3350Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10362aa9e3350Smrg# 'no' user instructs the module not to build tests 10363aa9e3350Smrg# parm1: specify the default value, yes or no. 10364aa9e3350Smrg# 10365aa9e3350SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10366aa9e3350SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10367aa9e3350SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10368aa9e3350SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10369aa9e3350Smrgm4_define([_defopt], m4_default([$1], [auto])) 10370aa9e3350SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10371aa9e3350Smrg [Enable building unit test cases (default: ]_defopt[)]), 10372aa9e3350Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10373aa9e3350Smrgm4_undefine([_defopt]) 10374aa9e3350SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10375aa9e3350SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10376aa9e3350SmrgAC_MSG_RESULT([$enable_unit_tests]) 10377aa9e3350Smrg]) # XORG_ENABLE_UNIT_TESTS 10378aa9e3350Smrg 10379aa9e3350Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10380aa9e3350Smrg# ------------------------------------------------------ 10381aa9e3350Smrg# Minimum version: 1.17.0 10382aa9e3350Smrg# 10383aa9e3350Smrg# This macro enables a builder to enable/disable integration testing 10384aa9e3350Smrg# It makes no assumption about the test cases' implementation 10385aa9e3350Smrg# Test cases may or may not use Automake "Support for test suites" 10386aa9e3350Smrg# 10387aa9e3350Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10388aa9e3350Smrg# usually requires less dependencies and may be built and run under less 10389aa9e3350Smrg# stringent environments than integration tests. 10390aa9e3350Smrg# 10391aa9e3350Smrg# Interface to module: 10392aa9e3350Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10393aa9e3350Smrg# enable_integration_tests: used in configure.ac for additional configuration 10394aa9e3350Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10395aa9e3350Smrg# 'no' user instructs the module not to build tests 10396aa9e3350Smrg# parm1: specify the default value, yes or no. 10397aa9e3350Smrg# 10398aa9e3350SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10399aa9e3350SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10400aa9e3350Smrgm4_define([_defopt], m4_default([$1], [auto])) 10401aa9e3350SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10402aa9e3350Smrg [Enable building integration test cases (default: ]_defopt[)]), 10403aa9e3350Smrg [enable_integration_tests=$enableval], 10404aa9e3350Smrg [enable_integration_tests=]_defopt) 10405aa9e3350Smrgm4_undefine([_defopt]) 10406aa9e3350SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10407aa9e3350Smrg [test "x$enable_integration_tests" != xno]) 10408aa9e3350SmrgAC_MSG_CHECKING([whether to build unit test cases]) 10409aa9e3350SmrgAC_MSG_RESULT([$enable_integration_tests]) 10410aa9e3350Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 10411aa9e3350Smrg 10412aa9e3350Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10413aa9e3350Smrg# ---------------------------------------- 10414aa9e3350Smrg# Minimum version: 1.13.0 10415aa9e3350Smrg# 10416aa9e3350Smrg# GLib is a library which provides advanced data structures and functions. 10417aa9e3350Smrg# This macro enables a module to test for the presence of Glib. 10418aa9e3350Smrg# 10419aa9e3350Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10420aa9e3350Smrg# Otherwise the value of $enable_unit_tests is blank. 10421aa9e3350Smrg# 10422aa9e3350Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10423aa9e3350Smrg# test support usually requires less dependencies and may be built and run under 10424aa9e3350Smrg# less stringent environments than integration tests. 10425aa9e3350Smrg# 10426aa9e3350Smrg# Interface to module: 10427aa9e3350Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 10428aa9e3350Smrg# with_glib: used in configure.ac to know if GLib has been found 10429aa9e3350Smrg# --with-glib: 'yes' user instructs the module to use glib 10430aa9e3350Smrg# 'no' user instructs the module not to use glib 10431aa9e3350Smrg# 10432aa9e3350SmrgAC_DEFUN([XORG_WITH_GLIB],[ 10433aa9e3350SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10434aa9e3350Smrgm4_define([_defopt], m4_default([$2], [auto])) 10435aa9e3350SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10436aa9e3350Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 10437aa9e3350Smrg [with_glib=$withval], [with_glib=]_defopt) 10438aa9e3350Smrgm4_undefine([_defopt]) 10439aa9e3350Smrg 10440aa9e3350Smrghave_glib=no 10441aa9e3350Smrg# Do not probe GLib if user explicitly disabled unit testing 10442aa9e3350Smrgif test "x$enable_unit_tests" != x"no"; then 10443aa9e3350Smrg # Do not probe GLib if user explicitly disabled it 10444aa9e3350Smrg if test "x$with_glib" != x"no"; then 10445aa9e3350Smrg m4_ifval( 10446aa9e3350Smrg [$1], 10447aa9e3350Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10448aa9e3350Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10449aa9e3350Smrg ) 10450aa9e3350Smrg fi 10451aa9e3350Smrgfi 10452aa9e3350Smrg 10453aa9e3350Smrg# Not having GLib when unit testing has been explicitly requested is an error 10454aa9e3350Smrgif test "x$enable_unit_tests" = x"yes"; then 10455aa9e3350Smrg if test "x$have_glib" = x"no"; then 10456aa9e3350Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10457aa9e3350Smrg fi 10458aa9e3350Smrgfi 10459aa9e3350Smrg 10460aa9e3350Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 10461aa9e3350Smrgif test "x$enable_unit_tests" = x"no"; then 10462aa9e3350Smrg if test "x$with_glib" = x"yes"; then 10463aa9e3350Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10464aa9e3350Smrg fi 10465aa9e3350Smrgfi 10466aa9e3350Smrg 10467aa9e3350Smrg# Not having GLib when it has been explicitly requested is an error 10468aa9e3350Smrgif test "x$with_glib" = x"yes"; then 10469aa9e3350Smrg if test "x$have_glib" = x"no"; then 10470aa9e3350Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10471aa9e3350Smrg fi 10472aa9e3350Smrgfi 10473aa9e3350Smrg 10474aa9e3350SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10475aa9e3350Smrg]) # XORG_WITH_GLIB 10476aa9e3350Smrg 10477aa9e3350Smrg# XORG_LD_WRAP([required|optional]) 10478aa9e3350Smrg# --------------------------------- 10479aa9e3350Smrg# Minimum version: 1.13.0 10480aa9e3350Smrg# 10481aa9e3350Smrg# Check if linker supports -wrap, passed via compiler flags 10482aa9e3350Smrg# 10483aa9e3350Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10484aa9e3350Smrg# Otherwise the value of $enable_unit_tests is blank. 10485aa9e3350Smrg# 10486aa9e3350Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10487aa9e3350Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10488aa9e3350Smrg# available, an argument of "optional" allows use when some unit tests require 10489aa9e3350Smrg# ld -wrap and others do not. 10490aa9e3350Smrg# 10491aa9e3350SmrgAC_DEFUN([XORG_LD_WRAP],[ 10492aa9e3350SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10493aa9e3350Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 10494aa9e3350Smrg void __wrap_exit(int status) { return; }], 10495aa9e3350Smrg [exit(0);])]) 10496aa9e3350Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 10497aa9e3350Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10498aa9e3350Smrg if test "x$have_ld_wrap" = x"no"; then 10499aa9e3350Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10500aa9e3350Smrg fi 10501aa9e3350Smrgfi 10502aa9e3350SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10503aa9e3350Smrg# 10504aa9e3350Smrg]) # XORG_LD_WRAP 10505aa9e3350Smrg 10506aa9e3350Smrg# XORG_CHECK_LINKER_FLAGS 10507aa9e3350Smrg# ----------------------- 10508aa9e3350Smrg# SYNOPSIS 10509aa9e3350Smrg# 10510aa9e3350Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10511aa9e3350Smrg# 10512aa9e3350Smrg# DESCRIPTION 10513aa9e3350Smrg# 10514aa9e3350Smrg# Check whether the given linker FLAGS work with the current language's 10515aa9e3350Smrg# linker, or whether they give an error. 10516aa9e3350Smrg# 10517aa9e3350Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10518aa9e3350Smrg# success/failure. 10519aa9e3350Smrg# 10520aa9e3350Smrg# PROGRAM-SOURCE is the program source to link with, if needed 10521aa9e3350Smrg# 10522aa9e3350Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10523aa9e3350Smrg# 10524aa9e3350Smrg# LICENSE 10525aa9e3350Smrg# 10526aa9e3350Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10527aa9e3350Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10528aa9e3350Smrg# Copyright (c) 2009 Matteo Frigo 10529aa9e3350Smrg# 10530aa9e3350Smrg# This program is free software: you can redistribute it and/or modify it 10531aa9e3350Smrg# under the terms of the GNU General Public License as published by the 10532aa9e3350Smrg# Free Software Foundation, either version 3 of the License, or (at your 10533aa9e3350Smrg# option) any later version. 10534aa9e3350Smrg# 10535aa9e3350Smrg# This program is distributed in the hope that it will be useful, but 10536aa9e3350Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10537aa9e3350Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10538aa9e3350Smrg# Public License for more details. 10539aa9e3350Smrg# 10540aa9e3350Smrg# You should have received a copy of the GNU General Public License along 10541aa9e3350Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10542aa9e3350Smrg# 10543aa9e3350Smrg# As a special exception, the respective Autoconf Macro's copyright owner 10544aa9e3350Smrg# gives unlimited permission to copy, distribute and modify the configure 10545aa9e3350Smrg# scripts that are the output of Autoconf when processing the Macro. You 10546aa9e3350Smrg# need not follow the terms of the GNU General Public License when using 10547aa9e3350Smrg# or distributing such scripts, even though portions of the text of the 10548aa9e3350Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 10549aa9e3350Smrg# all other use of the material that constitutes the Autoconf Macro. 10550aa9e3350Smrg# 10551aa9e3350Smrg# This special exception to the GPL applies to versions of the Autoconf 10552aa9e3350Smrg# Macro released by the Autoconf Archive. When you make and distribute a 10553aa9e3350Smrg# modified version of the Autoconf Macro, you may extend this special 10554aa9e3350Smrg# exception to the GPL to apply to your modified version as well.# 10555aa9e3350SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10556aa9e3350Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10557aa9e3350Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10558aa9e3350SmrgAS_LITERAL_IF([$1], 10559aa9e3350Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10560aa9e3350Smrg ax_save_FLAGS=$LDFLAGS 10561aa9e3350Smrg LDFLAGS="$1" 10562aa9e3350Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10563aa9e3350Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10564aa9e3350Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10565aa9e3350Smrg LDFLAGS=$ax_save_FLAGS])], 10566aa9e3350Smrg [ax_save_FLAGS=$LDFLAGS 10567aa9e3350Smrg LDFLAGS="$1" 10568aa9e3350Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10569aa9e3350Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10570aa9e3350Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10571aa9e3350Smrg LDFLAGS=$ax_save_FLAGS]) 10572aa9e3350Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10573aa9e3350SmrgAC_MSG_RESULT($xorg_check_linker_flags) 10574aa9e3350Smrgif test "x$xorg_check_linker_flags" = xyes; then 10575aa9e3350Smrg m4_default([$2], :) 10576aa9e3350Smrgelse 10577aa9e3350Smrg m4_default([$3], :) 10578aa9e3350Smrgfi 10579aa9e3350Smrg]) # XORG_CHECK_LINKER_FLAGS 10580aa9e3350Smrg 10581aa9e3350Smrg# XORG_MEMORY_CHECK_FLAGS 10582aa9e3350Smrg# ----------------------- 10583aa9e3350Smrg# Minimum version: 1.16.0 10584aa9e3350Smrg# 10585aa9e3350Smrg# This macro attempts to find appropriate memory checking functionality 10586aa9e3350Smrg# for various platforms which unit testing code may use to catch various 10587aa9e3350Smrg# forms of memory allocation and access errors in testing. 10588aa9e3350Smrg# 10589aa9e3350Smrg# Interface to module: 10590aa9e3350Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10591aa9e3350Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10592aa9e3350Smrg# 10593aa9e3350Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10594aa9e3350Smrg# 10595aa9e3350SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10596aa9e3350Smrg 10597aa9e3350SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10598aa9e3350SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10599aa9e3350Smrg [Environment variables to enable memory checking in tests]) 10600aa9e3350Smrg 10601aa9e3350Smrg# Check for different types of support on different platforms 10602aa9e3350Smrgcase $host_os in 10603aa9e3350Smrg solaris*) 10604aa9e3350Smrg AC_CHECK_LIB([umem], [umem_alloc], 10605aa9e3350Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10606aa9e3350Smrg ;; 10607aa9e3350Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10608aa9e3350Smrg # both directly and inverted, so should not be 0 or 255. 10609aa9e3350Smrg malloc_debug_env='MALLOC_PERTURB_=15' 10610aa9e3350Smrg ;; 10611aa9e3350Smrg darwin*) 10612aa9e3350Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10613aa9e3350Smrg ;; 10614aa9e3350Smrg *bsd*) 10615aa9e3350Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10616aa9e3350Smrg ;; 10617aa9e3350Smrgesac 10618aa9e3350Smrg 10619aa9e3350Smrg# User supplied flags override default flags 10620aa9e3350Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10621aa9e3350Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10622aa9e3350Smrgfi 10623aa9e3350Smrg 10624aa9e3350SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10625aa9e3350Smrg]) # XORG_WITH_LINT 10626aa9e3350Smrg 106278697ee19Smrg# XORG_CHECK_MALLOC_ZERO 106288697ee19Smrg# ---------------------- 106298697ee19Smrg# Minimum version: 1.0.0 10630ab47cfaaSmrg# 106318697ee19Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 106328697ee19Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 106338697ee19Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 106348697ee19SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 106358697ee19SmrgAC_ARG_ENABLE(malloc0returnsnull, 106366aec45a7Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 106378697ee19Smrg [malloc(0) returns NULL (default: auto)]), 106388697ee19Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 106398697ee19Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10640ab47cfaaSmrg 106418697ee19SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 106428697ee19Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 106431e449e82SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 106441e449e82Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10645aa9e3350Smrg#include <stdlib.h> 10646aa9e3350Smrg],[ 106478697ee19Smrg char *m0, *r0, *c0, *p; 106488697ee19Smrg m0 = malloc(0); 106498697ee19Smrg p = malloc(10); 106508697ee19Smrg r0 = realloc(p,0); 10651aa9e3350Smrg c0 = calloc(0,10); 10652aa9e3350Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10653aa9e3350Smrg])], 106541e449e82Smrg [xorg_cv_malloc0_returns_null=yes], 106551e449e82Smrg [xorg_cv_malloc0_returns_null=no])]) 106561e449e82SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10657ab47cfaaSmrgfi 106588697ee19SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 106598697ee19Smrg 106608697ee19Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 106618697ee19Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 106628697ee19Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 106638697ee19Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 106648697ee19Smrgelse 106658697ee19Smrg MALLOC_ZERO_CFLAGS="" 106668697ee19Smrg XMALLOC_ZERO_CFLAGS="" 106678697ee19Smrg XTMALLOC_ZERO_CFLAGS="" 10668ab47cfaaSmrgfi 10669ab47cfaaSmrg 106708697ee19SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 106718697ee19SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 106728697ee19SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 106738697ee19Smrg]) # XORG_CHECK_MALLOC_ZERO 10674ab47cfaaSmrg 106758697ee19Smrg# XORG_WITH_LINT() 106768697ee19Smrg# ---------------- 106778697ee19Smrg# Minimum version: 1.1.0 10678ab47cfaaSmrg# 106796aec45a7Smrg# This macro enables the use of a tool that flags some suspicious and 106806aec45a7Smrg# non-portable constructs (likely to be bugs) in C language source code. 106816aec45a7Smrg# It will attempt to locate the tool and use appropriate options. 106826aec45a7Smrg# There are various lint type tools on different platforms. 106836aec45a7Smrg# 106846aec45a7Smrg# Interface to module: 106856aec45a7Smrg# LINT: returns the path to the tool found on the platform 106866aec45a7Smrg# or the value set to LINT on the configure cmd line 106876aec45a7Smrg# also an Automake conditional 106886aec45a7Smrg# LINT_FLAGS: an Automake variable with appropriate flags 106896aec45a7Smrg# 106906aec45a7Smrg# --with-lint: 'yes' user instructs the module to use lint 106916aec45a7Smrg# 'no' user instructs the module not to use lint (default) 106926aec45a7Smrg# 106936aec45a7Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 106946aec45a7Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 106958697ee19Smrg# 106968697ee19SmrgAC_DEFUN([XORG_WITH_LINT],[ 10697ab47cfaaSmrg 106986aec45a7SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 106996aec45a7SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 107006aec45a7SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 107018697ee19Smrg [Use a lint-style source code checker (default: disabled)])], 107028697ee19Smrg [use_lint=$withval], [use_lint=no]) 107036aec45a7Smrg 107046aec45a7Smrg# Obtain platform specific info like program name and options 107056aec45a7Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 107066aec45a7Smrgcase $host_os in 107076aec45a7Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 107086aec45a7Smrg lint_name=splint 107096aec45a7Smrg lint_options="-badflag" 107106aec45a7Smrg ;; 107116aec45a7Smrg *freebsd* | *netbsd*) 107126aec45a7Smrg lint_name=lint 107136aec45a7Smrg lint_options="-u -b" 107146aec45a7Smrg ;; 107156aec45a7Smrg *solaris*) 107166aec45a7Smrg lint_name=lint 107176aec45a7Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 107186aec45a7Smrg ;; 107196aec45a7Smrgesac 107206aec45a7Smrg 107216aec45a7Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 107226aec45a7Smrgif test "x$use_lint" = x"yes" ; then 107236aec45a7Smrg AC_PATH_PROG([LINT], [$lint_name]) 107246aec45a7Smrg if test "x$LINT" = "x"; then 107256aec45a7Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 107266aec45a7Smrg fi 107276aec45a7Smrgelif test "x$use_lint" = x"no" ; then 107286aec45a7Smrg if test "x$LINT" != "x"; then 107296aec45a7Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 107306aec45a7Smrg fi 10731ab47cfaaSmrgelse 107326aec45a7Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 107338697ee19Smrgfi 107346aec45a7Smrg 107356aec45a7Smrg# User supplied flags override default flags 107366aec45a7Smrgif test "x$LINT_FLAGS" != "x"; then 107376aec45a7Smrg lint_options=$LINT_FLAGS 10738ab47cfaaSmrgfi 10739ab47cfaaSmrg 107406aec45a7SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 107416aec45a7SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10742ab47cfaaSmrg 107438697ee19Smrg]) # XORG_WITH_LINT 107448697ee19Smrg 107458697ee19Smrg# XORG_LINT_LIBRARY(LIBNAME) 107468697ee19Smrg# -------------------------- 107478697ee19Smrg# Minimum version: 1.1.0 10748ab47cfaaSmrg# 107498697ee19Smrg# Sets up flags for building lint libraries for checking programs that call 107508697ee19Smrg# functions in the library. 10751ab47cfaaSmrg# 107526aec45a7Smrg# Interface to module: 107536aec45a7Smrg# LINTLIB - Automake variable with the name of lint library file to make 107546aec45a7Smrg# MAKE_LINT_LIB - Automake conditional 107556aec45a7Smrg# 107566aec45a7Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 107576aec45a7Smrg# - 'no' user instructs the module not to create a lint library (default) 107588697ee19Smrg 107598697ee19SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 107608697ee19SmrgAC_REQUIRE([XORG_WITH_LINT]) 107616aec45a7SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 107628697ee19Smrg [Create lint library (default: disabled)])], 107638697ee19Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 107646aec45a7Smrg 107656aec45a7Smrgif test "x$make_lint_lib" = x"yes" ; then 107666aec45a7Smrg LINTLIB=llib-l$1.ln 107676aec45a7Smrg if test "x$LINT" = "x"; then 107686aec45a7Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 107696aec45a7Smrg fi 107706aec45a7Smrgelif test "x$make_lint_lib" != x"no" ; then 107716aec45a7Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10772ab47cfaaSmrgfi 107736aec45a7Smrg 107748697ee19SmrgAC_SUBST(LINTLIB) 107758697ee19SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10776ab47cfaaSmrg 107778697ee19Smrg]) # XORG_LINT_LIBRARY 10778ab47cfaaSmrg 10779aa9e3350Smrg# XORG_COMPILER_BRAND 10780aa9e3350Smrg# ------------------- 10781aa9e3350Smrg# Minimum version: 1.14.0 10782aa9e3350Smrg# 10783aa9e3350Smrg# Checks for various brands of compilers and sets flags as appropriate: 10784aa9e3350Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10785aa9e3350Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10786aa9e3350Smrg# clang compiler - sets CLANGCC to "yes" 10787aa9e3350Smrg# Intel compiler - sets INTELCC to "yes" 10788aa9e3350Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10789aa9e3350Smrg# 10790aa9e3350SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10791aa9e3350SmrgAC_LANG_CASE( 10792aa9e3350Smrg [C], [ 10793aa9e3350Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10794aa9e3350Smrg ], 10795aa9e3350Smrg [C++], [ 10796aa9e3350Smrg AC_REQUIRE([AC_PROG_CXX]) 10797aa9e3350Smrg ] 10798aa9e3350Smrg) 10799aa9e3350SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10800aa9e3350SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10801aa9e3350SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10802aa9e3350Smrg]) # XORG_COMPILER_BRAND 10803aa9e3350Smrg 10804aa9e3350Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10805aa9e3350Smrg# --------------- 10806aa9e3350Smrg# Minimum version: 1.16.0 10807aa9e3350Smrg# 10808aa9e3350Smrg# Test if the compiler works when passed the given flag as a command line argument. 10809aa9e3350Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10810aa9e3350Smrg# next flag in the list until there are no more options. 10811aa9e3350Smrg# 10812aa9e3350Smrg# Note that this does not guarantee that the compiler supports the flag as some 10813aa9e3350Smrg# compilers will simply ignore arguments that they do not understand, but we do 10814aa9e3350Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10815aa9e3350Smrg# -Werror=unused-command-line-argument 10816aa9e3350Smrg# 10817aa9e3350SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10818aa9e3350Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10819aa9e3350Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10820aa9e3350Smrg 10821aa9e3350SmrgAC_LANG_COMPILER_REQUIRE 10822aa9e3350Smrg 10823aa9e3350SmrgAC_LANG_CASE( 10824aa9e3350Smrg [C], [ 10825aa9e3350Smrg AC_REQUIRE([AC_PROG_CC_C99]) 10826aa9e3350Smrg define([PREFIX], [C]) 10827aa9e3350Smrg define([CACHE_PREFIX], [cc]) 10828aa9e3350Smrg define([COMPILER], [$CC]) 10829aa9e3350Smrg ], 10830aa9e3350Smrg [C++], [ 10831aa9e3350Smrg define([PREFIX], [CXX]) 10832aa9e3350Smrg define([CACHE_PREFIX], [cxx]) 10833aa9e3350Smrg define([COMPILER], [$CXX]) 10834aa9e3350Smrg ] 10835aa9e3350Smrg) 10836aa9e3350Smrg 10837aa9e3350Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10838aa9e3350Smrg 10839aa9e3350Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10840aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10841aa9e3350Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10842aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10843aa9e3350Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10844aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10845aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10846aa9e3350Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10847aa9e3350Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10848aa9e3350Smrgfi 10849aa9e3350Smrg 10850aa9e3350Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10851aa9e3350Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10852aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10853aa9e3350Smrg fi 10854aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10855aa9e3350Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10856aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10857aa9e3350Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10858aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10859aa9e3350Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10860aa9e3350Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10861aa9e3350Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10862aa9e3350Smrgfi 10863aa9e3350Smrg 10864aa9e3350Smrgfound="no" 10865aa9e3350Smrgm4_foreach([flag], m4_cdr($@), [ 10866aa9e3350Smrg if test $found = "no" ; then 108671e449e82Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10868aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10869aa9e3350Smrg fi 10870aa9e3350Smrg 108711e449e82Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10872aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10873aa9e3350Smrg fi 10874aa9e3350Smrg 10875aa9e3350Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10876aa9e3350Smrg 10877aa9e3350Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 108781e449e82Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10879aa9e3350Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10880aa9e3350Smrg AC_CACHE_VAL($cacheid, 10881aa9e3350Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10882aa9e3350Smrg [eval $cacheid=yes], 10883aa9e3350Smrg [eval $cacheid=no])]) 10884aa9e3350Smrg 10885aa9e3350Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10886aa9e3350Smrg 10887aa9e3350Smrg eval supported=\$$cacheid 10888aa9e3350Smrg AC_MSG_RESULT([$supported]) 10889aa9e3350Smrg if test "$supported" = "yes" ; then 10890aa9e3350Smrg $1="$$1 ]flag[" 10891aa9e3350Smrg found="yes" 10892aa9e3350Smrg fi 10893aa9e3350Smrg fi 10894aa9e3350Smrg]) 10895aa9e3350Smrg]) # XORG_TESTSET_CFLAG 10896aa9e3350Smrg 10897aa9e3350Smrg# XORG_COMPILER_FLAGS 10898aa9e3350Smrg# --------------- 10899aa9e3350Smrg# Minimum version: 1.16.0 10900aa9e3350Smrg# 10901aa9e3350Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10902aa9e3350Smrg# arguments supported by the selected compiler which do NOT alter the generated 10903aa9e3350Smrg# code. These arguments will cause the compiler to print various warnings 10904aa9e3350Smrg# during compilation AND turn a conservative set of warnings into errors. 10905aa9e3350Smrg# 10906aa9e3350Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10907aa9e3350Smrg# future versions of util-macros as options are added to new compilers. 10908aa9e3350Smrg# 10909aa9e3350SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10910aa9e3350SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10911aa9e3350Smrg 10912aa9e3350SmrgAC_ARG_ENABLE(selective-werror, 10913aa9e3350Smrg AS_HELP_STRING([--disable-selective-werror], 10914aa9e3350Smrg [Turn off selective compiler errors. (default: enabled)]), 10915aa9e3350Smrg [SELECTIVE_WERROR=$enableval], 10916aa9e3350Smrg [SELECTIVE_WERROR=yes]) 10917aa9e3350Smrg 10918aa9e3350SmrgAC_LANG_CASE( 10919aa9e3350Smrg [C], [ 10920aa9e3350Smrg define([PREFIX], [C]) 10921aa9e3350Smrg ], 10922aa9e3350Smrg [C++], [ 10923aa9e3350Smrg define([PREFIX], [CXX]) 10924aa9e3350Smrg ] 10925aa9e3350Smrg) 10926aa9e3350Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 10927aa9e3350Smrgif test "x$SUNCC" = "xyes"; then 10928aa9e3350Smrg [BASE_]PREFIX[FLAGS]="-v" 10929aa9e3350Smrgelse 10930aa9e3350Smrg [BASE_]PREFIX[FLAGS]="" 10931aa9e3350Smrgfi 10932aa9e3350Smrg 10933aa9e3350Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 10934aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 10935aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 10936aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 10937aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 10938aa9e3350Smrg 10939aa9e3350SmrgAC_LANG_CASE( 10940aa9e3350Smrg [C], [ 10941aa9e3350Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 10942aa9e3350Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 10943aa9e3350Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 10944aa9e3350Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 109451e449e82Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 10946aa9e3350Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 10947aa9e3350Smrg ] 10948aa9e3350Smrg) 10949aa9e3350Smrg 10950aa9e3350Smrg# This chunk adds additional warnings that could catch undesired effects. 10951aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 10952aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 10953aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 10954aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 10955aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 10956aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 109571e449e82SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 10958aa9e3350Smrg 10959aa9e3350Smrg# These are currently disabled because they are noisy. They will be enabled 10960aa9e3350Smrg# in the future once the codebase is sufficiently modernized to silence 10961aa9e3350Smrg# them. For now, I don't want them to drown out the other warnings. 10962aa9e3350Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 10963aa9e3350Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 109641e449e82Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 10965aa9e3350Smrg 10966aa9e3350Smrg# Turn some warnings into errors, so we don't accidently get successful builds 10967aa9e3350Smrg# when there are problems that should be fixed. 10968aa9e3350Smrg 10969aa9e3350Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 10970aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 10971aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 10972aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 10973aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 10974aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 10975aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 10976aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 10977aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 10978aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 10979aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 10980aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 10981aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 10982aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 10983aa9e3350Smrgelse 10984aa9e3350SmrgAC_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]) 10985aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 10986aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 10987aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 10988aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 10989aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 10990aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 10991aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 10992aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 10993aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 10994aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 10995aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 10996aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 10997aa9e3350SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 10998aa9e3350Smrgfi 10999aa9e3350Smrg 11000aa9e3350SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11001aa9e3350Smrg]) # XORG_COMPILER_FLAGS 11002aa9e3350Smrg 110031473d951Smrg# XORG_CWARNFLAGS 110041473d951Smrg# --------------- 110051473d951Smrg# Minimum version: 1.2.0 11006aa9e3350Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 110071473d951Smrg# 110081473d951Smrg# Defines CWARNFLAGS to enable C compiler warnings. 110091473d951Smrg# 11010aa9e3350Smrg# This function is deprecated because it defines -fno-strict-aliasing 11011aa9e3350Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 11012aa9e3350Smrg# is needed, then it should be added explicitly in the module when 11013aa9e3350Smrg# it is updated to use BASE_CFLAGS. 11014aa9e3350Smrg# 110151473d951SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 11016aa9e3350SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11017aa9e3350SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11018aa9e3350SmrgAC_LANG_CASE( 11019aa9e3350Smrg [C], [ 11020aa9e3350Smrg CWARNFLAGS="$BASE_CFLAGS" 11021aa9e3350Smrg if test "x$GCC" = xyes ; then 11022aa9e3350Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11023aa9e3350Smrg fi 11024aa9e3350Smrg AC_SUBST(CWARNFLAGS) 11025aa9e3350Smrg ] 11026aa9e3350Smrg) 110271473d951Smrg]) # XORG_CWARNFLAGS 110286aec45a7Smrg 110296aec45a7Smrg# XORG_STRICT_OPTION 110306aec45a7Smrg# ----------------------- 110316aec45a7Smrg# Minimum version: 1.3.0 110326aec45a7Smrg# 11033aa9e3350Smrg# Add configure option to enable strict compilation flags, such as treating 11034aa9e3350Smrg# warnings as fatal errors. 11035aa9e3350Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11036aa9e3350Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11037aa9e3350Smrg# 11038aa9e3350Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11039aa9e3350Smrg# when strict compilation is unconditionally desired. 110406aec45a7SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 110416aec45a7SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 11042aa9e3350SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 110436aec45a7Smrg 110446aec45a7SmrgAC_ARG_ENABLE(strict-compilation, 110456aec45a7Smrg AS_HELP_STRING([--enable-strict-compilation], 110466aec45a7Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 110476aec45a7Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11048aa9e3350Smrg 11049aa9e3350SmrgAC_LANG_CASE( 11050aa9e3350Smrg [C], [ 11051aa9e3350Smrg define([PREFIX], [C]) 11052aa9e3350Smrg ], 11053aa9e3350Smrg [C++], [ 11054aa9e3350Smrg define([PREFIX], [CXX]) 11055aa9e3350Smrg ] 11056aa9e3350Smrg) 11057aa9e3350Smrg 11058aa9e3350Smrg[STRICT_]PREFIX[FLAGS]="" 11059aa9e3350SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11060aa9e3350SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11061aa9e3350Smrg 11062aa9e3350Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11063aa9e3350Smrg# activate it with -Werror, so we add it here explicitly. 11064aa9e3350SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11065aa9e3350Smrg 110666aec45a7Smrgif test "x$STRICT_COMPILE" = "xyes"; then 11067aa9e3350Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11068aa9e3350Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 110696aec45a7Smrgfi 11070aa9e3350SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11071aa9e3350SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11072aa9e3350SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 110736aec45a7Smrg]) # XORG_STRICT_OPTION 110746aec45a7Smrg 110756aec45a7Smrg# XORG_DEFAULT_OPTIONS 110766aec45a7Smrg# -------------------- 110776aec45a7Smrg# Minimum version: 1.3.0 110786aec45a7Smrg# 110796aec45a7Smrg# Defines default options for X.Org modules. 110806aec45a7Smrg# 110816aec45a7SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 110826aec45a7SmrgAC_REQUIRE([AC_PROG_INSTALL]) 11083aa9e3350SmrgXORG_COMPILER_FLAGS 110846aec45a7SmrgXORG_CWARNFLAGS 110856aec45a7SmrgXORG_STRICT_OPTION 110866aec45a7SmrgXORG_RELEASE_VERSION 110876aec45a7SmrgXORG_CHANGELOG 110886aec45a7SmrgXORG_INSTALL 110896aec45a7SmrgXORG_MANPAGE_SECTIONS 110906aec45a7Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 110916aec45a7Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 110926aec45a7Smrg]) # XORG_DEFAULT_OPTIONS 110936aec45a7Smrg 110946aec45a7Smrg# XORG_INSTALL() 110956aec45a7Smrg# ---------------- 110966aec45a7Smrg# Minimum version: 1.4.0 110976aec45a7Smrg# 110986aec45a7Smrg# Defines the variable INSTALL_CMD as the command to copy 110996aec45a7Smrg# INSTALL from $prefix/share/util-macros. 111006aec45a7Smrg# 111016aec45a7SmrgAC_DEFUN([XORG_INSTALL], [ 111026aec45a7SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 111036aec45a7Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 111046aec45a7SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 111056aec45a7Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 111066aec45a7Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 111076aec45a7Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 111086aec45a7SmrgAC_SUBST([INSTALL_CMD]) 111096aec45a7Smrg]) # XORG_INSTALL 111108697ee19Smrgdnl Copyright 2005 Red Hat, Inc 111118697ee19Smrgdnl 111128697ee19Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 111138697ee19Smrgdnl documentation for any purpose is hereby granted without fee, provided that 111148697ee19Smrgdnl the above copyright notice appear in all copies and that both that 111158697ee19Smrgdnl copyright notice and this permission notice appear in supporting 111168697ee19Smrgdnl documentation. 111178697ee19Smrgdnl 111188697ee19Smrgdnl The above copyright notice and this permission notice shall be included 111198697ee19Smrgdnl in all copies or substantial portions of the Software. 111208697ee19Smrgdnl 111218697ee19Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 111228697ee19Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 111238697ee19Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 111248697ee19Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 111258697ee19Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 111268697ee19Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 111278697ee19Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 111288697ee19Smrgdnl 111298697ee19Smrgdnl Except as contained in this notice, the name of the copyright holders shall 111308697ee19Smrgdnl not be used in advertising or otherwise to promote the sale, use or 111318697ee19Smrgdnl other dealings in this Software without prior written authorization 111328697ee19Smrgdnl from the copyright holders. 111338697ee19Smrgdnl 11134ab47cfaaSmrg 111358697ee19Smrg# XORG_RELEASE_VERSION 111368697ee19Smrg# -------------------- 111376aec45a7Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 111381e449e82Smrg 111398697ee19SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 111408697ee19Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 111418697ee19Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 111428697ee19Smrg [Major version of this package]) 111438697ee19Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 111448697ee19Smrg if test "x$PVM" = "x"; then 111458697ee19Smrg PVM="0" 111468697ee19Smrg fi 111478697ee19Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 111488697ee19Smrg [$PVM], 111498697ee19Smrg [Minor version of this package]) 111508697ee19Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 111518697ee19Smrg if test "x$PVP" = "x"; then 111528697ee19Smrg PVP="0" 111538697ee19Smrg fi 111548697ee19Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 111558697ee19Smrg [$PVP], 111568697ee19Smrg [Patch version of this package]) 111578697ee19Smrg]) 11158ab47cfaaSmrg 111591473d951Smrg# XORG_CHANGELOG() 111601473d951Smrg# ---------------- 111611473d951Smrg# Minimum version: 1.2.0 111621473d951Smrg# 111631473d951Smrg# Defines the variable CHANGELOG_CMD as the command to generate 111641473d951Smrg# ChangeLog from git. 111651473d951Smrg# 111661473d951Smrg# 111671473d951SmrgAC_DEFUN([XORG_CHANGELOG], [ 111686aec45a7SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 111696aec45a7Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 111706aec45a7Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 111711473d951Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 111721473d951SmrgAC_SUBST([CHANGELOG_CMD]) 111731473d951Smrg]) # XORG_CHANGELOG 111741473d951Smrg 111751473d951Smrgdnl Copyright 2005 Red Hat, Inc 111761473d951Smrgdnl 111771473d951Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 111781473d951Smrgdnl documentation for any purpose is hereby granted without fee, provided that 111791473d951Smrgdnl the above copyright notice appear in all copies and that both that 111801473d951Smrgdnl copyright notice and this permission notice appear in supporting 111811473d951Smrgdnl documentation. 111821473d951Smrgdnl 111831473d951Smrgdnl The above copyright notice and this permission notice shall be included 111841473d951Smrgdnl in all copies or substantial portions of the Software. 111851473d951Smrgdnl 111861473d951Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 111871473d951Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 111881473d951Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 111891473d951Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 111901473d951Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 111911473d951Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 111921473d951Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 111931473d951Smrgdnl 111941473d951Smrgdnl Except as contained in this notice, the name of the copyright holders shall 111951473d951Smrgdnl not be used in advertising or otherwise to promote the sale, use or 111961473d951Smrgdnl other dealings in this Software without prior written authorization 111971473d951Smrgdnl from the copyright holders. 111981473d951Smrgdnl 111991473d951Smrg 112001e449e82Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 112011473d951Smrg# -------------------------- 112021e449e82Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 112031e449e82Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 112041473d951Smrg 112051473d951SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 112066aec45a7Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 112071473d951Smrg SAVE_CFLAGS="$CFLAGS" 112086aec45a7Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 112091473d951Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 112101473d951Smrg#include "xorg-server.h" 112111473d951Smrg#if !defined $1 112121473d951Smrg#error $1 not defined 112131473d951Smrg#endif 112141473d951Smrg ]])], 112151473d951Smrg [_EXT_CHECK=yes], 112161473d951Smrg [_EXT_CHECK=no]) 112171473d951Smrg CFLAGS="$SAVE_CFLAGS" 112181473d951Smrg AC_MSG_CHECKING([if $1 is defined]) 112191473d951Smrg AC_MSG_RESULT([$_EXT_CHECK]) 112201473d951Smrg if test "$_EXT_CHECK" != no; then 112211473d951Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 112221473d951Smrg fi 112231473d951Smrg]) 112241473d951Smrg 11225300bf1aeSmrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 11226ab47cfaaSmrg# 11227ab47cfaaSmrg# This file is free software; the Free Software Foundation 11228ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 11229ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 11230ab47cfaaSmrg 112318697ee19Smrg# AM_AUTOMAKE_VERSION(VERSION) 112328697ee19Smrg# ---------------------------- 112338697ee19Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 112348697ee19Smrg# generated from the m4 files accompanying Automake X.Y. 112358697ee19Smrg# (This private macro should not be called outside this file.) 112368697ee19SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 11237300bf1aeSmrg[am__api_version='1.15' 112388697ee19Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 112398697ee19Smrgdnl require some minimum version. Point them to the right macro. 11240300bf1aeSmrgm4_if([$1], [1.15], [], 112418697ee19Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 112428697ee19Smrg]) 11243ab47cfaaSmrg 112448697ee19Smrg# _AM_AUTOCONF_VERSION(VERSION) 112458697ee19Smrg# ----------------------------- 112468697ee19Smrg# aclocal traces this macro to find the Autoconf version. 112478697ee19Smrg# This is a private macro too. Using m4_define simplifies 112488697ee19Smrg# the logic in aclocal, which can simply ignore this definition. 112498697ee19Smrgm4_define([_AM_AUTOCONF_VERSION], []) 11250ab47cfaaSmrg 112518697ee19Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 112528697ee19Smrg# ------------------------------- 112538697ee19Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 112541473d951Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 112558697ee19SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11256300bf1aeSmrg[AM_AUTOMAKE_VERSION([1.15])dnl 112578697ee19Smrgm4_ifndef([AC_AUTOCONF_VERSION], 112588697ee19Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 112591473d951Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11260ab47cfaaSmrg 112618697ee19Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11262ab47cfaaSmrg 11263300bf1aeSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11264ab47cfaaSmrg# 11265ab47cfaaSmrg# This file is free software; the Free Software Foundation 11266ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 11267ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 11268ab47cfaaSmrg 112698697ee19Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 112701e449e82Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 112711e449e82Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 112728697ee19Smrg# 112738697ee19Smrg# Of course, Automake must honor this variable whenever it calls a 112748697ee19Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 112758697ee19Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 112768697ee19Smrg# depending on how configure is run. This is pretty annoying, since 112778697ee19Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 112788697ee19Smrg# source directory, any form will work fine, but in subdirectories a 112798697ee19Smrg# relative path needs to be adjusted first. 112808697ee19Smrg# 112818697ee19Smrg# $ac_aux_dir/missing 112828697ee19Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 112838697ee19Smrg# $top_srcdir/$ac_aux_dir/missing 112848697ee19Smrg# fails if $ac_aux_dir is absolute, 112858697ee19Smrg# fails when called from a subdirectory in a VPATH build with 112868697ee19Smrg# a relative $ac_aux_dir 112878697ee19Smrg# 112888697ee19Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 112898697ee19Smrg# are both prefixed by $srcdir. In an in-source build this is usually 112901e449e82Smrg# harmless because $srcdir is '.', but things will broke when you 112918697ee19Smrg# start a VPATH build or use an absolute $srcdir. 112928697ee19Smrg# 112938697ee19Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 112948697ee19Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 112958697ee19Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 112968697ee19Smrg# and then we would define $MISSING as 112978697ee19Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 112988697ee19Smrg# This will work as long as MISSING is not called from configure, because 112998697ee19Smrg# unfortunately $(top_srcdir) has no meaning in configure. 113008697ee19Smrg# However there are other variables, like CC, which are often used in 113018697ee19Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 113028697ee19Smrg# 113038697ee19Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 113048697ee19Smrg# absolute PATH. The drawback is that using absolute paths prevent a 113058697ee19Smrg# configured tree to be moved without reconfiguration. 11306ab47cfaaSmrg 113078697ee19SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 113081e449e82Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 113091e449e82Smrg# Expand $ac_aux_dir to an absolute path. 113101e449e82Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 113118697ee19Smrg]) 11312ab47cfaaSmrg 113138697ee19Smrg# AM_CONDITIONAL -*- Autoconf -*- 113148697ee19Smrg 11315300bf1aeSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11316ab47cfaaSmrg# 11317ab47cfaaSmrg# This file is free software; the Free Software Foundation 11318ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it, 11319ab47cfaaSmrg# with or without modifications, as long as this notice is preserved. 11320ab47cfaaSmrg 113218697ee19Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 113228697ee19Smrg# ------------------------------------- 113238697ee19Smrg# Define a conditional. 113248697ee19SmrgAC_DEFUN([AM_CONDITIONAL], 113251e449e82Smrg[AC_PREREQ([2.52])dnl 113261e449e82Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 113271e449e82Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 113288697ee19SmrgAC_SUBST([$1_TRUE])dnl 113298697ee19SmrgAC_SUBST([$1_FALSE])dnl 113308697ee19Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 113318697ee19Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 113325c42550eSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 113338697ee19Smrgif $2; then 113348697ee19Smrg $1_TRUE= 113358697ee19Smrg $1_FALSE='#' 113368697ee19Smrgelse 113378697ee19Smrg $1_TRUE='#' 113388697ee19Smrg $1_FALSE= 113398697ee19Smrgfi 113408697ee19SmrgAC_CONFIG_COMMANDS_PRE( 113418697ee19Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 113428697ee19Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 113438697ee19SmrgUsually this means the macro was only invoked conditionally.]]) 113448697ee19Smrgfi])]) 113458697ee19Smrg 11346300bf1aeSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11347ab47cfaaSmrg# 113488697ee19Smrg# This file is free software; the Free Software Foundation 113498697ee19Smrg# gives unlimited permission to copy and/or distribute it, 113508697ee19Smrg# with or without modifications, as long as this notice is preserved. 113518697ee19Smrg 113528697ee19Smrg 113531e449e82Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 113548697ee19Smrg# written in clear, in which case automake, when reading aclocal.m4, 113558697ee19Smrg# will think it sees a *use*, and therefore will trigger all it's 113568697ee19Smrg# C support machinery. Also note that it means that autoscan, seeing 113578697ee19Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 113588697ee19Smrg 113598697ee19Smrg 113608697ee19Smrg# _AM_DEPENDENCIES(NAME) 113618697ee19Smrg# ---------------------- 113628697ee19Smrg# See how the compiler implements dependency checking. 113631e449e82Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 113648697ee19Smrg# We try a few techniques and use that to set a single cache variable. 11365ab47cfaaSmrg# 113668697ee19Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 113678697ee19Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 113688697ee19Smrg# dependency, and given that the user is not expected to run this macro, 113698697ee19Smrg# just rely on AC_PROG_CC. 113708697ee19SmrgAC_DEFUN([_AM_DEPENDENCIES], 113718697ee19Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 113728697ee19SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 113738697ee19SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 113748697ee19SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 11375ab47cfaaSmrg 113761e449e82Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 113771e449e82Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 113781e449e82Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 113791e449e82Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 113801e449e82Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 113811e449e82Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 113821e449e82Smrg [depcc="$$1" am_compiler_list=]) 11383ab47cfaaSmrg 113848697ee19SmrgAC_CACHE_CHECK([dependency style of $depcc], 113858697ee19Smrg [am_cv_$1_dependencies_compiler_type], 113868697ee19Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 113878697ee19Smrg # We make a subdir and do the tests there. Otherwise we can end up 113888697ee19Smrg # making bogus files that we don't know about and never remove. For 113898697ee19Smrg # instance it was reported that on HP-UX the gcc test will end up 113901e449e82Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 113911e449e82Smrg # in D". 11392aa9e3350Smrg rm -rf conftest.dir 11393ab47cfaaSmrg mkdir conftest.dir 113948697ee19Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 113958697ee19Smrg # using a relative directory. 113968697ee19Smrg cp "$am_depcomp" conftest.dir 113978697ee19Smrg cd conftest.dir 113988697ee19Smrg # We will build objects and dependencies in a subdirectory because 113998697ee19Smrg # it helps to detect inapplicable dependency modes. For instance 114008697ee19Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 114018697ee19Smrg # side effect of compilation, but ICC will put the dependencies in 114028697ee19Smrg # the current directory while Tru64 will put them in the object 114038697ee19Smrg # directory. 114048697ee19Smrg mkdir sub 114058697ee19Smrg 114068697ee19Smrg am_cv_$1_dependencies_compiler_type=none 114078697ee19Smrg if test "$am_compiler_list" = ""; then 114088697ee19Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11409ab47cfaaSmrg fi 114105c42550eSmrg am__universal=false 114115c42550eSmrg m4_case([$1], [CC], 114125c42550eSmrg [case " $depcc " in #( 114135c42550eSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 114145c42550eSmrg esac], 114155c42550eSmrg [CXX], 114165c42550eSmrg [case " $depcc " in #( 114175c42550eSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 114185c42550eSmrg esac]) 114195c42550eSmrg 114208697ee19Smrg for depmode in $am_compiler_list; do 114218697ee19Smrg # Setup a source with many dependencies, because some compilers 114228697ee19Smrg # like to wrap large dependency lists on column 80 (with \), and 114238697ee19Smrg # we should not choose a depcomp mode which is confused by this. 114248697ee19Smrg # 114258697ee19Smrg # We need to recreate these files for each test, as the compiler may 114268697ee19Smrg # overwrite some of them when testing with obscure command lines. 114278697ee19Smrg # This happens at least with the AIX C compiler. 114288697ee19Smrg : > sub/conftest.c 114298697ee19Smrg for i in 1 2 3 4 5 6; do 114308697ee19Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 114311e449e82Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 114321e449e82Smrg # Solaris 10 /bin/sh. 114331e449e82Smrg echo '/* dummy */' > sub/conftst$i.h 114348697ee19Smrg done 114358697ee19Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11436ab47cfaaSmrg 114371e449e82Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 114385c42550eSmrg # mode. It turns out that the SunPro C++ compiler does not properly 114391e449e82Smrg # handle '-M -o', and we need to detect this. Also, some Intel 114401e449e82Smrg # versions had trouble with output in subdirs. 114415c42550eSmrg am__obj=sub/conftest.${OBJEXT-o} 114425c42550eSmrg am__minus_obj="-o $am__obj" 114438697ee19Smrg case $depmode in 114445c42550eSmrg gcc) 114455c42550eSmrg # This depmode causes a compiler race in universal mode. 114465c42550eSmrg test "$am__universal" = false || continue 114475c42550eSmrg ;; 114488697ee19Smrg nosideeffect) 114491e449e82Smrg # After this tag, mechanisms are not by side-effect, so they'll 114501e449e82Smrg # only be used when explicitly requested. 114518697ee19Smrg if test "x$enable_dependency_tracking" = xyes; then 114528697ee19Smrg continue 114538697ee19Smrg else 114548697ee19Smrg break 114558697ee19Smrg fi 114568697ee19Smrg ;; 11457aa9e3350Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 114581e449e82Smrg # This compiler won't grok '-c -o', but also, the minuso test has 114595c42550eSmrg # not run yet. These depmodes are late enough in the game, and 114605c42550eSmrg # so weak that their functioning should not be impacted. 114615c42550eSmrg am__obj=conftest.${OBJEXT-o} 114625c42550eSmrg am__minus_obj= 114635c42550eSmrg ;; 114648697ee19Smrg none) break ;; 114658697ee19Smrg esac 114668697ee19Smrg if depmode=$depmode \ 114675c42550eSmrg source=sub/conftest.c object=$am__obj \ 114688697ee19Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 114695c42550eSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 114708697ee19Smrg >/dev/null 2>conftest.err && 114718697ee19Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 114728697ee19Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 114735c42550eSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 114748697ee19Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 114758697ee19Smrg # icc doesn't choke on unknown options, it will just issue warnings 114768697ee19Smrg # or remarks (even with -Werror). So we grep stderr for any message 114778697ee19Smrg # that says an option was ignored or not supported. 114788697ee19Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 114798697ee19Smrg # icc: Command line warning: ignoring option '-M'; no argument required 114808697ee19Smrg # The diagnosis changed in icc 8.0: 114818697ee19Smrg # icc: Command line remark: option '-MP' not supported 114828697ee19Smrg if (grep 'ignoring option' conftest.err || 114838697ee19Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 114848697ee19Smrg am_cv_$1_dependencies_compiler_type=$depmode 114858697ee19Smrg break 114868697ee19Smrg fi 114878697ee19Smrg fi 114888697ee19Smrg done 11489ab47cfaaSmrg 114908697ee19Smrg cd .. 114918697ee19Smrg rm -rf conftest.dir 114928697ee19Smrgelse 114938697ee19Smrg am_cv_$1_dependencies_compiler_type=none 114948697ee19Smrgfi 114958697ee19Smrg]) 114968697ee19SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 114978697ee19SmrgAM_CONDITIONAL([am__fastdep$1], [ 114988697ee19Smrg test "x$enable_dependency_tracking" != xno \ 114998697ee19Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 115008697ee19Smrg]) 11501ab47cfaaSmrg 115028697ee19Smrg 115038697ee19Smrg# AM_SET_DEPDIR 115048697ee19Smrg# ------------- 115058697ee19Smrg# Choose a directory name for dependency files. 115061e449e82Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 115078697ee19SmrgAC_DEFUN([AM_SET_DEPDIR], 115088697ee19Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 115098697ee19SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 115108697ee19Smrg]) 115118697ee19Smrg 115128697ee19Smrg 115138697ee19Smrg# AM_DEP_TRACK 115148697ee19Smrg# ------------ 115158697ee19SmrgAC_DEFUN([AM_DEP_TRACK], 115161e449e82Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 115171e449e82SmrgAS_HELP_STRING( 115181e449e82Smrg [--enable-dependency-tracking], 115191e449e82Smrg [do not reject slow dependency extractors]) 115201e449e82SmrgAS_HELP_STRING( 115211e449e82Smrg [--disable-dependency-tracking], 115221e449e82Smrg [speeds up one-time build])]) 115238697ee19Smrgif test "x$enable_dependency_tracking" != xno; then 115248697ee19Smrg am_depcomp="$ac_aux_dir/depcomp" 115258697ee19Smrg AMDEPBACKSLASH='\' 11526aa9e3350Smrg am__nodep='_no' 115278697ee19Smrgfi 115288697ee19SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 115298697ee19SmrgAC_SUBST([AMDEPBACKSLASH])dnl 115308697ee19Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11531aa9e3350SmrgAC_SUBST([am__nodep])dnl 11532aa9e3350Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 115338697ee19Smrg]) 115348697ee19Smrg 115358697ee19Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 115368697ee19Smrg 11537300bf1aeSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11538ab47cfaaSmrg# 115398697ee19Smrg# This file is free software; the Free Software Foundation 115408697ee19Smrg# gives unlimited permission to copy and/or distribute it, 115418697ee19Smrg# with or without modifications, as long as this notice is preserved. 115428697ee19Smrg 115438697ee19Smrg 115448697ee19Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 115458697ee19Smrg# ------------------------------ 115468697ee19SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 115475c42550eSmrg[{ 115481e449e82Smrg # Older Autoconf quotes --file arguments for eval, but not when files 115495c42550eSmrg # are listed without --file. Let's play safe and only enable the eval 115505c42550eSmrg # if we detect the quoting. 115515c42550eSmrg case $CONFIG_FILES in 115525c42550eSmrg *\'*) eval set x "$CONFIG_FILES" ;; 115535c42550eSmrg *) set x $CONFIG_FILES ;; 115545c42550eSmrg esac 115555c42550eSmrg shift 115565c42550eSmrg for mf 115575c42550eSmrg do 115585c42550eSmrg # Strip MF so we end up with the name of the file. 115595c42550eSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 115605c42550eSmrg # Check whether this is an Automake generated Makefile or not. 115611e449e82Smrg # We used to match only the files named 'Makefile.in', but 115625c42550eSmrg # some people rename them; so instead we look at the file content. 115635c42550eSmrg # Grep'ing the first line is not enough: some people post-process 115645c42550eSmrg # each Makefile.in and add a new line on top of each file to say so. 115655c42550eSmrg # Grep'ing the whole file is not good either: AIX grep has a line 115665c42550eSmrg # limit of 2048, but all sed's we know have understand at least 4000. 115675c42550eSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 115685c42550eSmrg dirpart=`AS_DIRNAME("$mf")` 115695c42550eSmrg else 115705c42550eSmrg continue 115715c42550eSmrg fi 115725c42550eSmrg # Extract the definition of DEPDIR, am__include, and am__quote 115731e449e82Smrg # from the Makefile without running 'make'. 115745c42550eSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 115755c42550eSmrg test -z "$DEPDIR" && continue 115765c42550eSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 115771e449e82Smrg test -z "$am__include" && continue 115785c42550eSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 115795c42550eSmrg # Find all dependency output files, they are included files with 115805c42550eSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 115815c42550eSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 115825c42550eSmrg # expansion. 115835c42550eSmrg for file in `sed -n " 115845c42550eSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 115851e449e82Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 115865c42550eSmrg # Make sure the directory exists. 115875c42550eSmrg test -f "$dirpart/$file" && continue 115885c42550eSmrg fdir=`AS_DIRNAME(["$file"])` 115895c42550eSmrg AS_MKDIR_P([$dirpart/$fdir]) 115905c42550eSmrg # echo "creating $dirpart/$file" 115915c42550eSmrg echo '# dummy' > "$dirpart/$file" 115925c42550eSmrg done 115938697ee19Smrg done 115945c42550eSmrg} 115958697ee19Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 115968697ee19Smrg 115978697ee19Smrg 115988697ee19Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 115998697ee19Smrg# ----------------------------- 116008697ee19Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 11601ab47cfaaSmrg# 116028697ee19Smrg# This code is only required when automatic dependency tracking 116031e449e82Smrg# is enabled. FIXME. This creates each '.P' file that we will 116048697ee19Smrg# need in order to bootstrap the dependency handling code. 116058697ee19SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 116068697ee19Smrg[AC_CONFIG_COMMANDS([depfiles], 116078697ee19Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 116088697ee19Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 116098697ee19Smrg]) 116108697ee19Smrg 116118697ee19Smrg# Do all the work for Automake. -*- Autoconf -*- 116128697ee19Smrg 11613300bf1aeSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11614ab47cfaaSmrg# 116158697ee19Smrg# This file is free software; the Free Software Foundation 116168697ee19Smrg# gives unlimited permission to copy and/or distribute it, 116178697ee19Smrg# with or without modifications, as long as this notice is preserved. 116188697ee19Smrg 116198697ee19Smrg# This macro actually does too much. Some checks are only needed if 116208697ee19Smrg# your package does certain things. But this isn't really a big deal. 116218697ee19Smrg 116221e449e82Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 116231e449e82Smrgm4_define([AC_PROG_CC], 116241e449e82Smrgm4_defn([AC_PROG_CC]) 116251e449e82Smrg[_AM_PROG_CC_C_O 116261e449e82Smrg]) 116271e449e82Smrg 116288697ee19Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 116298697ee19Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 116308697ee19Smrg# ----------------------------------------------- 116318697ee19Smrg# The call with PACKAGE and VERSION arguments is the old style 116328697ee19Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 116338697ee19Smrg# and VERSION should now be passed to AC_INIT and removed from 116348697ee19Smrg# the call to AM_INIT_AUTOMAKE. 116358697ee19Smrg# We support both call styles for the transition. After 116368697ee19Smrg# the next Automake release, Autoconf can make the AC_INIT 116378697ee19Smrg# arguments mandatory, and then we can depend on a new Autoconf 116388697ee19Smrg# release and drop the old call support. 116398697ee19SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 116401e449e82Smrg[AC_PREREQ([2.65])dnl 116418697ee19Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 116428697ee19Smrgdnl the ones we care about. 116438697ee19Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 116448697ee19SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 116458697ee19SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 116468697ee19Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 116478697ee19Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 116488697ee19Smrg # is not polluted with repeated "-I." 116498697ee19Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 116508697ee19Smrg # test to see if srcdir already configured 116518697ee19Smrg if test -f $srcdir/config.status; then 116528697ee19Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 116538697ee19Smrg fi 116548697ee19Smrgfi 116558697ee19Smrg 116568697ee19Smrg# test whether we have cygpath 116578697ee19Smrgif test -z "$CYGPATH_W"; then 116588697ee19Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 116598697ee19Smrg CYGPATH_W='cygpath -w' 116608697ee19Smrg else 116618697ee19Smrg CYGPATH_W=echo 116628697ee19Smrg fi 116638697ee19Smrgfi 116648697ee19SmrgAC_SUBST([CYGPATH_W]) 116658697ee19Smrg 116668697ee19Smrg# Define the identity of the package. 116678697ee19Smrgdnl Distinguish between old-style and new-style calls. 116688697ee19Smrgm4_ifval([$2], 116691e449e82Smrg[AC_DIAGNOSE([obsolete], 116701e449e82Smrg [$0: two- and three-arguments forms are deprecated.]) 116711e449e82Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 116728697ee19Smrg AC_SUBST([PACKAGE], [$1])dnl 116738697ee19Smrg AC_SUBST([VERSION], [$2])], 116748697ee19Smrg[_AM_SET_OPTIONS([$1])dnl 116758697ee19Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 116761e449e82Smrgm4_if( 116771e449e82Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 116781e449e82Smrg [ok:ok],, 116798697ee19Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 116808697ee19Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 116818697ee19Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 116828697ee19Smrg 116838697ee19Smrg_AM_IF_OPTION([no-define],, 116841e449e82Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 116851e449e82Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 116868697ee19Smrg 116878697ee19Smrg# Some tools Automake needs. 116888697ee19SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 116898697ee19SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 116901e449e82SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 116911e449e82SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 116921e449e82SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 116931e449e82SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 116941e449e82SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 116955c42550eSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 116965c42550eSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 116971e449e82SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 116981e449e82Smrg# For better backward compatibility. To be removed once Automake 1.9.x 116991e449e82Smrg# dies out for good. For more background, see: 117001e449e82Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 117011e449e82Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 117021e449e82SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11703300bf1aeSmrg# We need awk for the "check" target (and possibly the TAP driver). The 11704300bf1aeSmrg# system "awk" is bad on some platforms. 117058697ee19SmrgAC_REQUIRE([AC_PROG_AWK])dnl 117068697ee19SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 117078697ee19SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 117088697ee19Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 117095c42550eSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 117105c42550eSmrg [_AM_PROG_TAR([v7])])]) 117118697ee19Smrg_AM_IF_OPTION([no-dependencies],, 117128697ee19Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 117131e449e82Smrg [_AM_DEPENDENCIES([CC])], 117141e449e82Smrg [m4_define([AC_PROG_CC], 117151e449e82Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 117168697ee19SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 117171e449e82Smrg [_AM_DEPENDENCIES([CXX])], 117181e449e82Smrg [m4_define([AC_PROG_CXX], 117191e449e82Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 117208697ee19SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 117211e449e82Smrg [_AM_DEPENDENCIES([OBJC])], 117221e449e82Smrg [m4_define([AC_PROG_OBJC], 117231e449e82Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 117241e449e82SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 117251e449e82Smrg [_AM_DEPENDENCIES([OBJCXX])], 117261e449e82Smrg [m4_define([AC_PROG_OBJCXX], 117271e449e82Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 117288697ee19Smrg]) 117291e449e82SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 117301e449e82Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 117311e449e82Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 117321e449e82Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 117335c42550eSmrgAC_CONFIG_COMMANDS_PRE(dnl 117345c42550eSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 117355c42550eSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 117361e449e82Smrg 117371e449e82Smrg# POSIX will say in a future version that running "rm -f" with no argument 117381e449e82Smrg# is OK; and we want to be able to make that assumption in our Makefile 117391e449e82Smrg# recipes. So use an aggressive probe to check that the usage we want is 117401e449e82Smrg# actually supported "in the wild" to an acceptable degree. 117411e449e82Smrg# See automake bug#10828. 117421e449e82Smrg# To make any issue more visible, cause the running configure to be aborted 117431e449e82Smrg# by default if the 'rm' program in use doesn't match our expectations; the 117441e449e82Smrg# user can still override this though. 117451e449e82Smrgif rm -f && rm -fr && rm -rf; then : OK; else 117461e449e82Smrg cat >&2 <<'END' 117471e449e82SmrgOops! 117481e449e82Smrg 117491e449e82SmrgYour 'rm' program seems unable to run without file operands specified 117501e449e82Smrgon the command line, even when the '-f' option is present. This is contrary 117511e449e82Smrgto the behaviour of most rm programs out there, and not conforming with 117521e449e82Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 117531e449e82Smrg 117541e449e82SmrgPlease tell bug-automake@gnu.org about your system, including the value 117551e449e82Smrgof your $PATH and any error possibly output before this message. This 117561e449e82Smrgcan help us improve future automake versions. 117571e449e82Smrg 117581e449e82SmrgEND 117591e449e82Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 117601e449e82Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 117611e449e82Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 117621e449e82Smrg echo >&2 117631e449e82Smrg else 117641e449e82Smrg cat >&2 <<'END' 117651e449e82SmrgAborting the configuration process, to ensure you take notice of the issue. 117661e449e82Smrg 117671e449e82SmrgYou can download and install GNU coreutils to get an 'rm' implementation 117681e449e82Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 117691e449e82Smrg 117701e449e82SmrgIf you want to complete the configuration process using your problematic 117711e449e82Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 117721e449e82Smrgto "yes", and re-run configure. 117731e449e82Smrg 117741e449e82SmrgEND 117751e449e82Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 117761e449e82Smrg fi 117771e449e82Smrgfi 11778300bf1aeSmrgdnl The trailing newline in this macro's definition is deliberate, for 11779300bf1aeSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 11780300bf1aeSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 117818697ee19Smrg]) 11782ab47cfaaSmrg 117831e449e82Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 117845c42550eSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 117855c42550eSmrgdnl mangled by Autoconf and run in a shell conditional statement. 117865c42550eSmrgm4_define([_AC_COMPILER_EXEEXT], 117875c42550eSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 117885c42550eSmrg 117898697ee19Smrg# When config.status generates a header, we must update the stamp-h file. 117908697ee19Smrg# This file resides in the same directory as the config header 117918697ee19Smrg# that is generated. The stamp files are numbered to have different names. 11792ab47cfaaSmrg 117938697ee19Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 117948697ee19Smrg# loop where config.status creates the headers, so we can generate 117958697ee19Smrg# our stamp files there. 117968697ee19SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 117978697ee19Smrg[# Compute $1's index in $config_headers. 117988697ee19Smrg_am_arg=$1 117998697ee19Smrg_am_stamp_count=1 118008697ee19Smrgfor _am_header in $config_headers :; do 118018697ee19Smrg case $_am_header in 118028697ee19Smrg $_am_arg | $_am_arg:* ) 118038697ee19Smrg break ;; 118048697ee19Smrg * ) 118058697ee19Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 118068697ee19Smrg esac 118078697ee19Smrgdone 118088697ee19Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11809ab47cfaaSmrg 11810300bf1aeSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11811ab47cfaaSmrg# 118128697ee19Smrg# This file is free software; the Free Software Foundation 118138697ee19Smrg# gives unlimited permission to copy and/or distribute it, 118148697ee19Smrg# with or without modifications, as long as this notice is preserved. 11815ab47cfaaSmrg 118168697ee19Smrg# AM_PROG_INSTALL_SH 118178697ee19Smrg# ------------------ 118188697ee19Smrg# Define $install_sh. 118198697ee19SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 118208697ee19Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11821300bf1aeSmrgif test x"${install_sh+set}" != xset; then 118225c42550eSmrg case $am_aux_dir in 118235c42550eSmrg *\ * | *\ *) 118245c42550eSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 118255c42550eSmrg *) 118265c42550eSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 118275c42550eSmrg esac 118285c42550eSmrgfi 118291e449e82SmrgAC_SUBST([install_sh])]) 11830ab47cfaaSmrg 11831300bf1aeSmrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 118328697ee19Smrg# 118338697ee19Smrg# This file is free software; the Free Software Foundation 118348697ee19Smrg# gives unlimited permission to copy and/or distribute it, 118358697ee19Smrg# with or without modifications, as long as this notice is preserved. 11836ab47cfaaSmrg 118378697ee19Smrg# Check whether the underlying file-system supports filenames 118388697ee19Smrg# with a leading dot. For instance MS-DOS doesn't. 118398697ee19SmrgAC_DEFUN([AM_SET_LEADING_DOT], 118408697ee19Smrg[rm -rf .tst 2>/dev/null 118418697ee19Smrgmkdir .tst 2>/dev/null 118428697ee19Smrgif test -d .tst; then 118438697ee19Smrg am__leading_dot=. 118448697ee19Smrgelse 118458697ee19Smrg am__leading_dot=_ 11846ab47cfaaSmrgfi 118478697ee19Smrgrmdir .tst 2>/dev/null 118488697ee19SmrgAC_SUBST([am__leading_dot])]) 11849ab47cfaaSmrg 118508697ee19Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 118518697ee19Smrg# From Jim Meyering 11852ab47cfaaSmrg 11853300bf1aeSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 118548697ee19Smrg# 118558697ee19Smrg# This file is free software; the Free Software Foundation 118568697ee19Smrg# gives unlimited permission to copy and/or distribute it, 118578697ee19Smrg# with or without modifications, as long as this notice is preserved. 11858ab47cfaaSmrg 118595c42550eSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 118605c42550eSmrg# ---------------------------------- 118615c42550eSmrg# Control maintainer-specific portions of Makefiles. 118621e449e82Smrg# Default is to disable them, unless 'enable' is passed literally. 118631e449e82Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 118645c42550eSmrg# can override the default with the --enable/--disable switch. 118658697ee19SmrgAC_DEFUN([AM_MAINTAINER_MODE], 118665c42550eSmrg[m4_case(m4_default([$1], [disable]), 118675c42550eSmrg [enable], [m4_define([am_maintainer_other], [disable])], 118685c42550eSmrg [disable], [m4_define([am_maintainer_other], [enable])], 118695c42550eSmrg [m4_define([am_maintainer_other], [enable]) 118705c42550eSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11871aa9e3350SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 118725c42550eSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 118735c42550eSmrg AC_ARG_ENABLE([maintainer-mode], 118741e449e82Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 118751e449e82Smrg am_maintainer_other[ make rules and dependencies not useful 118761e449e82Smrg (and sometimes confusing) to the casual installer])], 118771e449e82Smrg [USE_MAINTAINER_MODE=$enableval], 118781e449e82Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 118798697ee19Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 118805c42550eSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 118818697ee19Smrg MAINT=$MAINTAINER_MODE_TRUE 118825c42550eSmrg AC_SUBST([MAINT])dnl 118838697ee19Smrg] 118848697ee19Smrg) 11885ab47cfaaSmrg 118868697ee19Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11887ab47cfaaSmrg 11888300bf1aeSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 118898697ee19Smrg# 118908697ee19Smrg# This file is free software; the Free Software Foundation 118918697ee19Smrg# gives unlimited permission to copy and/or distribute it, 118928697ee19Smrg# with or without modifications, as long as this notice is preserved. 11893ab47cfaaSmrg 118948697ee19Smrg# AM_MAKE_INCLUDE() 118958697ee19Smrg# ----------------- 118968697ee19Smrg# Check to see how make treats includes. 118978697ee19SmrgAC_DEFUN([AM_MAKE_INCLUDE], 118988697ee19Smrg[am_make=${MAKE-make} 118998697ee19Smrgcat > confinc << 'END' 119008697ee19Smrgam__doit: 119015c42550eSmrg @echo this is the am__doit target 119028697ee19Smrg.PHONY: am__doit 119038697ee19SmrgEND 119048697ee19Smrg# If we don't find an include directive, just comment out the code. 119058697ee19SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 119068697ee19Smrgam__include="#" 119078697ee19Smrgam__quote= 119088697ee19Smrg_am_result=none 119098697ee19Smrg# First try GNU make style include. 119108697ee19Smrgecho "include confinc" > confmf 119111e449e82Smrg# Ignore all kinds of additional output from 'make'. 119125c42550eSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 119135c42550eSmrg*the\ am__doit\ target*) 119145c42550eSmrg am__include=include 119155c42550eSmrg am__quote= 119165c42550eSmrg _am_result=GNU 119175c42550eSmrg ;; 119185c42550eSmrgesac 119198697ee19Smrg# Now try BSD make style include. 119208697ee19Smrgif test "$am__include" = "#"; then 119218697ee19Smrg echo '.include "confinc"' > confmf 119225c42550eSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 119235c42550eSmrg *the\ am__doit\ target*) 119245c42550eSmrg am__include=.include 119255c42550eSmrg am__quote="\"" 119265c42550eSmrg _am_result=BSD 119275c42550eSmrg ;; 119285c42550eSmrg esac 11929ab47cfaaSmrgfi 119308697ee19SmrgAC_SUBST([am__include]) 119318697ee19SmrgAC_SUBST([am__quote]) 119328697ee19SmrgAC_MSG_RESULT([$_am_result]) 119338697ee19Smrgrm -f confinc confmf 119348697ee19Smrg]) 119358697ee19Smrg 119368697ee19Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 11937ab47cfaaSmrg 11938300bf1aeSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 119398697ee19Smrg# 119408697ee19Smrg# This file is free software; the Free Software Foundation 119418697ee19Smrg# gives unlimited permission to copy and/or distribute it, 119428697ee19Smrg# with or without modifications, as long as this notice is preserved. 11943ab47cfaaSmrg 119448697ee19Smrg# AM_MISSING_PROG(NAME, PROGRAM) 119458697ee19Smrg# ------------------------------ 119468697ee19SmrgAC_DEFUN([AM_MISSING_PROG], 119478697ee19Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 119488697ee19Smrg$1=${$1-"${am_missing_run}$2"} 119498697ee19SmrgAC_SUBST($1)]) 11950ab47cfaaSmrg 119518697ee19Smrg# AM_MISSING_HAS_RUN 119528697ee19Smrg# ------------------ 119531e449e82Smrg# Define MISSING if not defined so far and test if it is modern enough. 119541e449e82Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 119558697ee19SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 119568697ee19Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 119578697ee19SmrgAC_REQUIRE_AUX_FILE([missing])dnl 119585c42550eSmrgif test x"${MISSING+set}" != xset; then 119595c42550eSmrg case $am_aux_dir in 119605c42550eSmrg *\ * | *\ *) 119615c42550eSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 119625c42550eSmrg *) 119635c42550eSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 119645c42550eSmrg esac 119655c42550eSmrgfi 119668697ee19Smrg# Use eval to expand $SHELL 119671e449e82Smrgif eval "$MISSING --is-lightweight"; then 119681e449e82Smrg am_missing_run="$MISSING " 11969ab47cfaaSmrgelse 119708697ee19Smrg am_missing_run= 119711e449e82Smrg AC_MSG_WARN(['missing' script is too old or missing]) 11972ab47cfaaSmrgfi 119738697ee19Smrg]) 11974ab47cfaaSmrg 119758697ee19Smrg# Helper functions for option handling. -*- Autoconf -*- 11976ab47cfaaSmrg 11977300bf1aeSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11978ab47cfaaSmrg# 119798697ee19Smrg# This file is free software; the Free Software Foundation 119808697ee19Smrg# gives unlimited permission to copy and/or distribute it, 119818697ee19Smrg# with or without modifications, as long as this notice is preserved. 11982ab47cfaaSmrg 119838697ee19Smrg# _AM_MANGLE_OPTION(NAME) 119848697ee19Smrg# ----------------------- 119858697ee19SmrgAC_DEFUN([_AM_MANGLE_OPTION], 119868697ee19Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 11987ab47cfaaSmrg 119888697ee19Smrg# _AM_SET_OPTION(NAME) 11989aa9e3350Smrg# -------------------- 119908697ee19Smrg# Set option NAME. Presently that only means defining a flag for this option. 119918697ee19SmrgAC_DEFUN([_AM_SET_OPTION], 119921e449e82Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 11993ab47cfaaSmrg 119948697ee19Smrg# _AM_SET_OPTIONS(OPTIONS) 11995aa9e3350Smrg# ------------------------ 119968697ee19Smrg# OPTIONS is a space-separated list of Automake options. 119978697ee19SmrgAC_DEFUN([_AM_SET_OPTIONS], 119981473d951Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 11999ab47cfaaSmrg 120008697ee19Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 120018697ee19Smrg# ------------------------------------------- 120028697ee19Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 120038697ee19SmrgAC_DEFUN([_AM_IF_OPTION], 120048697ee19Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12005ab47cfaaSmrg 12006300bf1aeSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 120071e449e82Smrg# 120081e449e82Smrg# This file is free software; the Free Software Foundation 120091e449e82Smrg# gives unlimited permission to copy and/or distribute it, 120101e449e82Smrg# with or without modifications, as long as this notice is preserved. 120111e449e82Smrg 120121e449e82Smrg# _AM_PROG_CC_C_O 120131e449e82Smrg# --------------- 120141e449e82Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 120151e449e82Smrg# to automatically call this. 120161e449e82SmrgAC_DEFUN([_AM_PROG_CC_C_O], 120171e449e82Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 120181e449e82SmrgAC_REQUIRE_AUX_FILE([compile])dnl 120191e449e82SmrgAC_LANG_PUSH([C])dnl 120201e449e82SmrgAC_CACHE_CHECK( 120211e449e82Smrg [whether $CC understands -c and -o together], 120221e449e82Smrg [am_cv_prog_cc_c_o], 120231e449e82Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 120241e449e82Smrg # Make sure it works both with $CC and with simple cc. 120251e449e82Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 120261e449e82Smrg # compilers refuse to overwrite an existing .o file with -o, 120271e449e82Smrg # though they will create one. 120281e449e82Smrg am_cv_prog_cc_c_o=yes 120291e449e82Smrg for am_i in 1 2; do 120301e449e82Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 120311e449e82Smrg && test -f conftest2.$ac_objext; then 120321e449e82Smrg : OK 120331e449e82Smrg else 120341e449e82Smrg am_cv_prog_cc_c_o=no 120351e449e82Smrg break 120361e449e82Smrg fi 120371e449e82Smrg done 120381e449e82Smrg rm -f core conftest* 120391e449e82Smrg unset am_i]) 120401e449e82Smrgif test "$am_cv_prog_cc_c_o" != yes; then 120411e449e82Smrg # Losing compiler, so override with the script. 120421e449e82Smrg # FIXME: It is wrong to rewrite CC. 120431e449e82Smrg # But if we don't then we get into trouble of one sort or another. 120441e449e82Smrg # A longer-term fix would be to have automake use am__CC in this case, 120451e449e82Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 120461e449e82Smrg CC="$am_aux_dir/compile $CC" 120471e449e82Smrgfi 120481e449e82SmrgAC_LANG_POP([C])]) 12049ab47cfaaSmrg 120501e449e82Smrg# For backward compatibility. 120511e449e82SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 120521e449e82Smrg 12053300bf1aeSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12054ab47cfaaSmrg# 120558697ee19Smrg# This file is free software; the Free Software Foundation 120568697ee19Smrg# gives unlimited permission to copy and/or distribute it, 120578697ee19Smrg# with or without modifications, as long as this notice is preserved. 12058ab47cfaaSmrg 120591e449e82Smrg# AM_RUN_LOG(COMMAND) 120601e449e82Smrg# ------------------- 120611e449e82Smrg# Run COMMAND, save the exit status in ac_status, and log it. 120621e449e82Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 120631e449e82SmrgAC_DEFUN([AM_RUN_LOG], 120641e449e82Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 120651e449e82Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 120661e449e82Smrg ac_status=$? 120671e449e82Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 120681e449e82Smrg (exit $ac_status); }]) 120691e449e82Smrg 120701e449e82Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 120711e449e82Smrg 12072300bf1aeSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 120731e449e82Smrg# 120741e449e82Smrg# This file is free software; the Free Software Foundation 120751e449e82Smrg# gives unlimited permission to copy and/or distribute it, 120761e449e82Smrg# with or without modifications, as long as this notice is preserved. 12077ab47cfaaSmrg 120788697ee19Smrg# AM_SANITY_CHECK 120798697ee19Smrg# --------------- 120808697ee19SmrgAC_DEFUN([AM_SANITY_CHECK], 120818697ee19Smrg[AC_MSG_CHECKING([whether build environment is sane]) 120825c42550eSmrg# Reject unsafe characters in $srcdir or the absolute working directory 120835c42550eSmrg# name. Accept space and tab only in the latter. 120845c42550eSmrgam_lf=' 120855c42550eSmrg' 120865c42550eSmrgcase `pwd` in 120875c42550eSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 120885c42550eSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 120895c42550eSmrgesac 120905c42550eSmrgcase $srcdir in 120915c42550eSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 120921e449e82Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 120935c42550eSmrgesac 120945c42550eSmrg 120951e449e82Smrg# Do 'set' in a subshell so we don't clobber the current shell's 120968697ee19Smrg# arguments. Must try -L first in case configure is actually a 120978697ee19Smrg# symlink; some systems play weird games with the mod time of symlinks 120988697ee19Smrg# (eg FreeBSD returns the mod time of the symlink's containing 120998697ee19Smrg# directory). 121008697ee19Smrgif ( 121011e449e82Smrg am_has_slept=no 121021e449e82Smrg for am_try in 1 2; do 121031e449e82Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 121041e449e82Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 121051e449e82Smrg if test "$[*]" = "X"; then 121061e449e82Smrg # -L didn't work. 121071e449e82Smrg set X `ls -t "$srcdir/configure" conftest.file` 121081e449e82Smrg fi 121091e449e82Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 121101e449e82Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 121111e449e82Smrg 121121e449e82Smrg # If neither matched, then we have a broken ls. This can happen 121131e449e82Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 121141e449e82Smrg # broken ls alias from the environment. This has actually 121151e449e82Smrg # happened. Such a system could not be considered "sane". 121161e449e82Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 121171e449e82Smrg alias in your environment]) 121181e449e82Smrg fi 121191e449e82Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 121201e449e82Smrg break 121211e449e82Smrg fi 121221e449e82Smrg # Just in case. 121231e449e82Smrg sleep 1 121241e449e82Smrg am_has_slept=yes 121251e449e82Smrg done 121268697ee19Smrg test "$[2]" = conftest.file 121278697ee19Smrg ) 121288697ee19Smrgthen 121298697ee19Smrg # Ok. 121308697ee19Smrg : 121318697ee19Smrgelse 121328697ee19Smrg AC_MSG_ERROR([newly created file is older than distributed files! 121338697ee19SmrgCheck your system clock]) 121348697ee19Smrgfi 121351e449e82SmrgAC_MSG_RESULT([yes]) 121361e449e82Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 121371e449e82Smrg# generated files are strictly newer. 121381e449e82Smrgam_sleep_pid= 121391e449e82Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 121401e449e82Smrg ( sleep 1 ) & 121411e449e82Smrg am_sleep_pid=$! 121421e449e82Smrgfi 121431e449e82SmrgAC_CONFIG_COMMANDS_PRE( 121441e449e82Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 121451e449e82Smrg if test -n "$am_sleep_pid"; then 121461e449e82Smrg # Hide warnings about reused PIDs. 121471e449e82Smrg wait $am_sleep_pid 2>/dev/null 121481e449e82Smrg fi 121491e449e82Smrg AC_MSG_RESULT([done])]) 121501e449e82Smrgrm -f conftest.file 121511e449e82Smrg]) 12152ab47cfaaSmrg 12153300bf1aeSmrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 121546aec45a7Smrg# 121556aec45a7Smrg# This file is free software; the Free Software Foundation 121566aec45a7Smrg# gives unlimited permission to copy and/or distribute it, 121576aec45a7Smrg# with or without modifications, as long as this notice is preserved. 121586aec45a7Smrg 121596aec45a7Smrg# AM_SILENT_RULES([DEFAULT]) 121606aec45a7Smrg# -------------------------- 121616aec45a7Smrg# Enable less verbose build rules; with the default set to DEFAULT 121621e449e82Smrg# ("yes" being less verbose, "no" or empty being verbose). 121636aec45a7SmrgAC_DEFUN([AM_SILENT_RULES], 121641e449e82Smrg[AC_ARG_ENABLE([silent-rules], [dnl 121651e449e82SmrgAS_HELP_STRING( 121661e449e82Smrg [--enable-silent-rules], 121671e449e82Smrg [less verbose build output (undo: "make V=1")]) 121681e449e82SmrgAS_HELP_STRING( 121691e449e82Smrg [--disable-silent-rules], 121701e449e82Smrg [verbose build output (undo: "make V=0")])dnl 121711e449e82Smrg]) 121721e449e82Smrgcase $enable_silent_rules in @%:@ ((( 121731e449e82Smrg yes) AM_DEFAULT_VERBOSITY=0;; 121741e449e82Smrg no) AM_DEFAULT_VERBOSITY=1;; 121751e449e82Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 121766aec45a7Smrgesac 12177aa9e3350Smrgdnl 121781e449e82Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12179aa9e3350Smrgdnl do not support nested variable expansions. 12180aa9e3350Smrgdnl See automake bug#9928 and bug#10237. 12181aa9e3350Smrgam_make=${MAKE-make} 12182aa9e3350SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 12183aa9e3350Smrg [am_cv_make_support_nested_variables], 12184aa9e3350Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 12185aa9e3350SmrgBAR0=false 12186aa9e3350SmrgBAR1=true 12187aa9e3350SmrgV=1 12188aa9e3350Smrgam__doit: 12189aa9e3350Smrg @$(TRUE) 12190aa9e3350Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12191aa9e3350Smrg am_cv_make_support_nested_variables=yes 12192aa9e3350Smrgelse 12193aa9e3350Smrg am_cv_make_support_nested_variables=no 12194aa9e3350Smrgfi]) 12195aa9e3350Smrgif test $am_cv_make_support_nested_variables = yes; then 121961e449e82Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 12197aa9e3350Smrg AM_V='$(V)' 12198aa9e3350Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12199aa9e3350Smrgelse 12200aa9e3350Smrg AM_V=$AM_DEFAULT_VERBOSITY 12201aa9e3350Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12202aa9e3350Smrgfi 12203aa9e3350SmrgAC_SUBST([AM_V])dnl 12204aa9e3350SmrgAM_SUBST_NOTMAKE([AM_V])dnl 12205aa9e3350SmrgAC_SUBST([AM_DEFAULT_V])dnl 12206aa9e3350SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 122076aec45a7SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 122086aec45a7SmrgAM_BACKSLASH='\' 122096aec45a7SmrgAC_SUBST([AM_BACKSLASH])dnl 122106aec45a7Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 122116aec45a7Smrg]) 122126aec45a7Smrg 12213300bf1aeSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12214ab47cfaaSmrg# 122158697ee19Smrg# This file is free software; the Free Software Foundation 122168697ee19Smrg# gives unlimited permission to copy and/or distribute it, 122178697ee19Smrg# with or without modifications, as long as this notice is preserved. 12218ab47cfaaSmrg 122198697ee19Smrg# AM_PROG_INSTALL_STRIP 122208697ee19Smrg# --------------------- 122211e449e82Smrg# One issue with vendor 'install' (even GNU) is that you can't 122228697ee19Smrg# specify the program used to strip binaries. This is especially 122238697ee19Smrg# annoying in cross-compiling environments, where the build's strip 122248697ee19Smrg# is unlikely to handle the host's binaries. 122258697ee19Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 122261e449e82Smrg# always use install-sh in "make install-strip", and initialize 122278697ee19Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 122288697ee19SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 122298697ee19Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 122301e449e82Smrg# Installed binaries are usually stripped using 'strip' when the user 122311e449e82Smrg# run "make install-strip". However 'strip' might not be the right 122328697ee19Smrg# tool to use in cross-compilation environments, therefore Automake 122331e449e82Smrg# will honor the 'STRIP' environment variable to overrule this program. 122341e449e82Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 122358697ee19Smrgif test "$cross_compiling" != no; then 122368697ee19Smrg AC_CHECK_TOOL([STRIP], [strip], :) 12237ab47cfaaSmrgfi 122388697ee19SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 122398697ee19SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 12240ab47cfaaSmrg 12241300bf1aeSmrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 122428697ee19Smrg# 122438697ee19Smrg# This file is free software; the Free Software Foundation 122448697ee19Smrg# gives unlimited permission to copy and/or distribute it, 122458697ee19Smrg# with or without modifications, as long as this notice is preserved. 12246ab47cfaaSmrg 122478697ee19Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 122488697ee19Smrg# --------------------------- 122498697ee19Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 122508697ee19Smrg# This macro is traced by Automake. 122518697ee19SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 12252ab47cfaaSmrg 122535c42550eSmrg# AM_SUBST_NOTMAKE(VARIABLE) 12254aa9e3350Smrg# -------------------------- 122555c42550eSmrg# Public sister of _AM_SUBST_NOTMAKE. 122565c42550eSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 122575c42550eSmrg 122588697ee19Smrg# Check how to create a tarball. -*- Autoconf -*- 12259ab47cfaaSmrg 12260300bf1aeSmrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 122618697ee19Smrg# 122628697ee19Smrg# This file is free software; the Free Software Foundation 122638697ee19Smrg# gives unlimited permission to copy and/or distribute it, 122648697ee19Smrg# with or without modifications, as long as this notice is preserved. 12265ab47cfaaSmrg 122668697ee19Smrg# _AM_PROG_TAR(FORMAT) 12267ab47cfaaSmrg# -------------------- 122688697ee19Smrg# Check how to create a tarball in format FORMAT. 122691e449e82Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 122708697ee19Smrg# 122718697ee19Smrg# Substitute a variable $(am__tar) that is a command 122728697ee19Smrg# writing to stdout a FORMAT-tarball containing the directory 122738697ee19Smrg# $tardir. 122748697ee19Smrg# tardir=directory && $(am__tar) > result.tar 122758697ee19Smrg# 122768697ee19Smrg# Substitute a variable $(am__untar) that extract such 122778697ee19Smrg# a tarball read from stdin. 122788697ee19Smrg# $(am__untar) < result.tar 122791e449e82Smrg# 122808697ee19SmrgAC_DEFUN([_AM_PROG_TAR], 12281aa9e3350Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 12282aa9e3350Smrg# in the wild :-( We should find a proper way to deprecate it ... 12283aa9e3350SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 122841e449e82Smrg 122851e449e82Smrg# We'll loop over all known methods to create a tar archive until one works. 122868697ee19Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 122878697ee19Smrg 122881e449e82Smrgm4_if([$1], [v7], 122891e449e82Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 122901e449e82Smrg 122911e449e82Smrg [m4_case([$1], 122921e449e82Smrg [ustar], 122931e449e82Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 122941e449e82Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 122951e449e82Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 122961e449e82Smrg # and bug#13588). 122971e449e82Smrg am_max_uid=2097151 # 2^21 - 1 122981e449e82Smrg am_max_gid=$am_max_uid 122991e449e82Smrg # The $UID and $GID variables are not portable, so we need to resort 123001e449e82Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 123011e449e82Smrg # below are definitely unexpected, so allow the users to see them 123021e449e82Smrg # (that is, avoid stderr redirection). 123031e449e82Smrg am_uid=`id -u || echo unknown` 123041e449e82Smrg am_gid=`id -g || echo unknown` 123051e449e82Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 123061e449e82Smrg if test $am_uid -le $am_max_uid; then 123071e449e82Smrg AC_MSG_RESULT([yes]) 123081e449e82Smrg else 123091e449e82Smrg AC_MSG_RESULT([no]) 123101e449e82Smrg _am_tools=none 123111e449e82Smrg fi 123121e449e82Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 123131e449e82Smrg if test $am_gid -le $am_max_gid; then 123141e449e82Smrg AC_MSG_RESULT([yes]) 123151e449e82Smrg else 123161e449e82Smrg AC_MSG_RESULT([no]) 123171e449e82Smrg _am_tools=none 123181e449e82Smrg fi], 123198697ee19Smrg 123201e449e82Smrg [pax], 123211e449e82Smrg [], 123221e449e82Smrg 123231e449e82Smrg [m4_fatal([Unknown tar format])]) 123241e449e82Smrg 123251e449e82Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 123261e449e82Smrg 123271e449e82Smrg # Go ahead even if we have the value already cached. We do so because we 123281e449e82Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 123291e449e82Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 123301e449e82Smrg 123311e449e82Smrg for _am_tool in $_am_tools; do 123321e449e82Smrg case $_am_tool in 123331e449e82Smrg gnutar) 123341e449e82Smrg for _am_tar in tar gnutar gtar; do 123351e449e82Smrg AM_RUN_LOG([$_am_tar --version]) && break 123361e449e82Smrg done 123371e449e82Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 123381e449e82Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 123391e449e82Smrg am__untar="$_am_tar -xf -" 123401e449e82Smrg ;; 123411e449e82Smrg plaintar) 123421e449e82Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 123431e449e82Smrg # ustar tarball either. 123441e449e82Smrg (tar --version) >/dev/null 2>&1 && continue 123451e449e82Smrg am__tar='tar chf - "$$tardir"' 123461e449e82Smrg am__tar_='tar chf - "$tardir"' 123471e449e82Smrg am__untar='tar xf -' 123481e449e82Smrg ;; 123491e449e82Smrg pax) 123501e449e82Smrg am__tar='pax -L -x $1 -w "$$tardir"' 123511e449e82Smrg am__tar_='pax -L -x $1 -w "$tardir"' 123521e449e82Smrg am__untar='pax -r' 123531e449e82Smrg ;; 123541e449e82Smrg cpio) 123551e449e82Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 123561e449e82Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 123571e449e82Smrg am__untar='cpio -i -H $1 -d' 123581e449e82Smrg ;; 123591e449e82Smrg none) 123601e449e82Smrg am__tar=false 123611e449e82Smrg am__tar_=false 123621e449e82Smrg am__untar=false 123631e449e82Smrg ;; 123641e449e82Smrg esac 123651e449e82Smrg 123661e449e82Smrg # If the value was cached, stop now. We just wanted to have am__tar 123671e449e82Smrg # and am__untar set. 123681e449e82Smrg test -n "${am_cv_prog_tar_$1}" && break 123691e449e82Smrg 123701e449e82Smrg # tar/untar a dummy directory, and stop if the command works. 123711e449e82Smrg rm -rf conftest.dir 123721e449e82Smrg mkdir conftest.dir 123731e449e82Smrg echo GrepMe > conftest.dir/file 123741e449e82Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 123751e449e82Smrg rm -rf conftest.dir 123761e449e82Smrg if test -s conftest.tar; then 123771e449e82Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 123781e449e82Smrg AM_RUN_LOG([cat conftest.dir/file]) 123791e449e82Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 123801e449e82Smrg fi 123811e449e82Smrg done 123828697ee19Smrg rm -rf conftest.dir 123838697ee19Smrg 123841e449e82Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 123851e449e82Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 123861e449e82Smrg 123878697ee19SmrgAC_SUBST([am__tar]) 123888697ee19SmrgAC_SUBST([am__untar]) 123898697ee19Smrg]) # _AM_PROG_TAR 12390ab47cfaaSmrg 12391