aclocal.m4 revision fe24f8a2
1414bd68fSmrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 23e72ca8cSmrg 3414bd68fSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4ee3138f1Smrg 5ee3138f1Smrg# This file is free software; the Free Software Foundation 6ee3138f1Smrg# gives unlimited permission to copy and/or distribute it, 7ee3138f1Smrg# with or without modifications, as long as this notice is preserved. 8ee3138f1Smrg 9ee3138f1Smrg# This program is distributed in the hope that it will be useful, 10ee3138f1Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11ee3138f1Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12ee3138f1Smrg# PARTICULAR PURPOSE. 13ee3138f1Smrg 1426b1ff4eSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15ee3138f1Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16ee3138f1Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 173e72ca8cSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 183e72ca8cSmrg[m4_warning([this file was generated for autoconf 2.69. 19ee3138f1SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20ee3138f1SmrgIf you have problems, you may need to regenerate the build system entirely. 213e72ca8cSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22ee3138f1Smrg 23414bd68fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 2434977a2fSmrg# 25fe24f8a2Smrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 26414bd68fSmrg# Written by Gordon Matzigkeit, 1996 2734977a2fSmrg# 28414bd68fSmrg# This file is free software; the Free Software Foundation gives 29414bd68fSmrg# unlimited permission to copy and/or distribute it, with or without 30414bd68fSmrg# modifications, as long as this notice is preserved. 3134977a2fSmrg 32414bd68fSmrgm4_define([_LT_COPYING], [dnl 33fe24f8a2Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 34fe24f8a2Smrg# This is free software; see the source for copying conditions. There is NO 35fe24f8a2Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 36fe24f8a2Smrg 37fe24f8a2Smrg# GNU Libtool is free software; you can redistribute it and/or modify 38fe24f8a2Smrg# it under the terms of the GNU General Public License as published by 39fe24f8a2Smrg# the Free Software Foundation; either version 2 of of the License, or 40fe24f8a2Smrg# (at your option) any later version. 4134977a2fSmrg# 42fe24f8a2Smrg# As a special exception to the GNU General Public License, if you 43fe24f8a2Smrg# distribute this file as part of a program or library that is built 44fe24f8a2Smrg# using GNU Libtool, you may include this file under the same 45fe24f8a2Smrg# distribution terms that you use for the rest of that program. 4634977a2fSmrg# 47fe24f8a2Smrg# GNU Libtool is distributed in the hope that it will be useful, but 48fe24f8a2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 49414bd68fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50414bd68fSmrg# GNU General Public License for more details. 5134977a2fSmrg# 52414bd68fSmrg# You should have received a copy of the GNU General Public License 53fe24f8a2Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54414bd68fSmrg]) 55ee3138f1Smrg 56fe24f8a2Smrg# serial 58 LT_INIT 57414bd68fSmrg 58414bd68fSmrg 59414bd68fSmrg# LT_PREREQ(VERSION) 60414bd68fSmrg# ------------------ 61414bd68fSmrg# Complain and exit if this libtool version is less that VERSION. 62414bd68fSmrgm4_defun([LT_PREREQ], 63414bd68fSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64414bd68fSmrg [m4_default([$3], 65414bd68fSmrg [m4_fatal([Libtool version $1 or higher is required], 66414bd68fSmrg 63)])], 67414bd68fSmrg [$2])]) 68414bd68fSmrg 69414bd68fSmrg 70414bd68fSmrg# _LT_CHECK_BUILDDIR 71414bd68fSmrg# ------------------ 72414bd68fSmrg# Complain if the absolute build directory name contains unusual characters 73414bd68fSmrgm4_defun([_LT_CHECK_BUILDDIR], 74414bd68fSmrg[case `pwd` in 75414bd68fSmrg *\ * | *\ *) 76414bd68fSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77414bd68fSmrgesac 78a1ed278cSmrg]) 7934977a2fSmrg 8034977a2fSmrg 81414bd68fSmrg# LT_INIT([OPTIONS]) 82414bd68fSmrg# ------------------ 83414bd68fSmrgAC_DEFUN([LT_INIT], 84fe24f8a2Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85414bd68fSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86414bd68fSmrgAC_BEFORE([$0], [LT_LANG])dnl 87414bd68fSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 88414bd68fSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 89414bd68fSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 9034977a2fSmrg 91414bd68fSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 92414bd68fSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93414bd68fSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94414bd68fSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95414bd68fSmrgdnl unless we require an AC_DEFUNed macro: 96414bd68fSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 97414bd68fSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 98414bd68fSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 99414bd68fSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 100414bd68fSmrgm4_require([_LT_PROG_LTMAIN])dnl 10134977a2fSmrg 102414bd68fSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 10334977a2fSmrg 104414bd68fSmrgdnl Parse OPTIONS 105414bd68fSmrg_LT_SET_OPTIONS([$0], [$1]) 106ee3138f1Smrg 107414bd68fSmrg# This can be used to rebuild libtool when needed 108fe24f8a2SmrgLIBTOOL_DEPS=$ltmain 109ee3138f1Smrg 110414bd68fSmrg# Always use our own libtool. 111414bd68fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112414bd68fSmrgAC_SUBST(LIBTOOL)dnl 113ee3138f1Smrg 114414bd68fSmrg_LT_SETUP 11579a8a9c6Smrg 116414bd68fSmrg# Only expand once: 117414bd68fSmrgm4_define([LT_INIT]) 118414bd68fSmrg])# LT_INIT 119ee3138f1Smrg 120414bd68fSmrg# Old names: 121414bd68fSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122414bd68fSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 124414bd68fSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125414bd68fSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126ee3138f1Smrg 127ee3138f1Smrg 128fe24f8a2Smrg# _LT_PREPARE_CC_BASENAME 129fe24f8a2Smrg# ----------------------- 130fe24f8a2Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 131fe24f8a2Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 132fe24f8a2Smrgfunc_cc_basename () 133fe24f8a2Smrg{ 134fe24f8a2Smrg for cc_temp in @S|@*""; do 135fe24f8a2Smrg case $cc_temp in 136fe24f8a2Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137fe24f8a2Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138fe24f8a2Smrg \-*) ;; 139fe24f8a2Smrg *) break;; 140fe24f8a2Smrg esac 141fe24f8a2Smrg done 142fe24f8a2Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 143fe24f8a2Smrg} 144fe24f8a2Smrg])# _LT_PREPARE_CC_BASENAME 145fe24f8a2Smrg 146fe24f8a2Smrg 147414bd68fSmrg# _LT_CC_BASENAME(CC) 148414bd68fSmrg# ------------------- 149fe24f8a2Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 150fe24f8a2Smrg# but that macro is also expanded into generated libtool script, which 151fe24f8a2Smrg# arranges for $SED and $ECHO to be set by different means. 152414bd68fSmrgm4_defun([_LT_CC_BASENAME], 153fe24f8a2Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 154fe24f8a2SmrgAC_REQUIRE([_LT_DECL_SED])dnl 155fe24f8a2SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 156fe24f8a2Smrgfunc_cc_basename $1 157fe24f8a2Smrgcc_basename=$func_cc_basename_result 158414bd68fSmrg]) 15934977a2fSmrg 16034977a2fSmrg 161414bd68fSmrg# _LT_FILEUTILS_DEFAULTS 162414bd68fSmrg# ---------------------- 163414bd68fSmrg# It is okay to use these file commands and assume they have been set 164fe24f8a2Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165414bd68fSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 166414bd68fSmrg[: ${CP="cp -f"} 167414bd68fSmrg: ${MV="mv -f"} 168414bd68fSmrg: ${RM="rm -f"} 169414bd68fSmrg])# _LT_FILEUTILS_DEFAULTS 17034977a2fSmrg 17134977a2fSmrg 172414bd68fSmrg# _LT_SETUP 173414bd68fSmrg# --------- 174414bd68fSmrgm4_defun([_LT_SETUP], 175414bd68fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176414bd68fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 177414bd68fSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178414bd68fSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 17934977a2fSmrg 180414bd68fSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181414bd68fSmrgdnl 182414bd68fSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 183414bd68fSmrg_LT_DECL([], [host], [0])dnl 184414bd68fSmrg_LT_DECL([], [host_os], [0])dnl 185414bd68fSmrgdnl 186414bd68fSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 187414bd68fSmrg_LT_DECL([], [build], [0])dnl 188414bd68fSmrg_LT_DECL([], [build_os], [0])dnl 189414bd68fSmrgdnl 190414bd68fSmrgAC_REQUIRE([AC_PROG_CC])dnl 191414bd68fSmrgAC_REQUIRE([LT_PATH_LD])dnl 192414bd68fSmrgAC_REQUIRE([LT_PATH_NM])dnl 193414bd68fSmrgdnl 194414bd68fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 195414bd68fSmrgtest -z "$LN_S" && LN_S="ln -s" 196414bd68fSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197414bd68fSmrgdnl 198414bd68fSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 199414bd68fSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200414bd68fSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201414bd68fSmrgdnl 202414bd68fSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 203414bd68fSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 204414bd68fSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205414bd68fSmrgm4_require([_LT_CMD_RELOAD])dnl 206414bd68fSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 207414bd68fSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208414bd68fSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 209414bd68fSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210414bd68fSmrgm4_require([_LT_WITH_SYSROOT])dnl 211fe24f8a2Smrgm4_require([_LT_CMD_TRUNCATE])dnl 21234977a2fSmrg 213414bd68fSmrg_LT_CONFIG_LIBTOOL_INIT([ 214fe24f8a2Smrg# See if we are running on zsh, and set the options that allow our 215414bd68fSmrg# commands through without removal of \ escapes INIT. 216fe24f8a2Smrgif test -n "\${ZSH_VERSION+set}"; then 217414bd68fSmrg setopt NO_GLOB_SUBST 2183e72ca8cSmrgfi 2193e72ca8cSmrg]) 220fe24f8a2Smrgif test -n "${ZSH_VERSION+set}"; then 221414bd68fSmrg setopt NO_GLOB_SUBST 222414bd68fSmrgfi 22334977a2fSmrg 224414bd68fSmrg_LT_CHECK_OBJDIR 22534977a2fSmrg 226414bd68fSmrgm4_require([_LT_TAG_COMPILER])dnl 22734977a2fSmrg 228414bd68fSmrgcase $host_os in 229414bd68fSmrgaix3*) 230414bd68fSmrg # AIX sometimes has problems with the GCC collect2 program. For some 231414bd68fSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 232414bd68fSmrg # vanish in a puff of smoke. 233fe24f8a2Smrg if test set != "${COLLECT_NAMES+set}"; then 234414bd68fSmrg COLLECT_NAMES= 235414bd68fSmrg export COLLECT_NAMES 236414bd68fSmrg fi 237414bd68fSmrg ;; 238414bd68fSmrgesac 23934977a2fSmrg 240414bd68fSmrg# Global variables: 241414bd68fSmrgofile=libtool 242414bd68fSmrgcan_build_shared=yes 243a1ed278cSmrg 244fe24f8a2Smrg# All known linkers require a '.a' archive for static linking (except MSVC, 245414bd68fSmrg# which needs '.lib'). 246414bd68fSmrglibext=a 247a1ed278cSmrg 248fe24f8a2Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 249a1ed278cSmrg 250fe24f8a2Smrgold_CC=$CC 251fe24f8a2Smrgold_CFLAGS=$CFLAGS 252a1ed278cSmrg 253414bd68fSmrg# Set sane defaults for various variables 254414bd68fSmrgtest -z "$CC" && CC=cc 255414bd68fSmrgtest -z "$LTCC" && LTCC=$CC 256414bd68fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257414bd68fSmrgtest -z "$LD" && LD=ld 258414bd68fSmrgtest -z "$ac_objext" && ac_objext=o 25934977a2fSmrg 260414bd68fSmrg_LT_CC_BASENAME([$compiler]) 26134977a2fSmrg 262414bd68fSmrg# Only perform the check for file, if the check method requires it 263414bd68fSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 264414bd68fSmrgcase $deplibs_check_method in 265414bd68fSmrgfile_magic*) 266414bd68fSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267414bd68fSmrg _LT_PATH_MAGIC 2683e72ca8cSmrg fi 269414bd68fSmrg ;; 270414bd68fSmrgesac 27134977a2fSmrg 272414bd68fSmrg# Use C for the default configuration in the libtool script 273414bd68fSmrgLT_SUPPORTED_TAG([CC]) 274414bd68fSmrg_LT_LANG_C_CONFIG 275414bd68fSmrg_LT_LANG_DEFAULT_CONFIG 276414bd68fSmrg_LT_CONFIG_COMMANDS 277414bd68fSmrg])# _LT_SETUP 27834977a2fSmrg 27934977a2fSmrg 280414bd68fSmrg# _LT_PREPARE_SED_QUOTE_VARS 281414bd68fSmrg# -------------------------- 282414bd68fSmrg# Define a few sed substitution that help us do robust quoting. 283414bd68fSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284414bd68fSmrg[# Backslashify metacharacters that are still active within 285414bd68fSmrg# double-quoted strings. 286414bd68fSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 28734977a2fSmrg 288414bd68fSmrg# Same as above, but do not quote variable references. 289414bd68fSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 290414bd68fSmrg 291414bd68fSmrg# Sed substitution to delay expansion of an escaped shell variable in a 292414bd68fSmrg# double_quote_subst'ed string. 293414bd68fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294414bd68fSmrg 295414bd68fSmrg# Sed substitution to delay expansion of an escaped single quote. 296414bd68fSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297414bd68fSmrg 298414bd68fSmrg# Sed substitution to avoid accidental globbing in evaled expressions 299414bd68fSmrgno_glob_subst='s/\*/\\\*/g' 300a1ed278cSmrg]) 30134977a2fSmrg 302414bd68fSmrg# _LT_PROG_LTMAIN 303414bd68fSmrg# --------------- 304fe24f8a2Smrg# Note that this code is called both from 'configure', and 'config.status' 305414bd68fSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 306fe24f8a2Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307414bd68fSmrg# so we pass a copy along to make sure it has a sensible value anyway. 308414bd68fSmrgm4_defun([_LT_PROG_LTMAIN], 309414bd68fSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310414bd68fSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 311fe24f8a2Smrgltmain=$ac_aux_dir/ltmain.sh 312414bd68fSmrg])# _LT_PROG_LTMAIN 31334977a2fSmrg 31434977a2fSmrg 315ee3138f1Smrg 316414bd68fSmrg# So that we can recreate a full libtool script including additional 317414bd68fSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 318fe24f8a2Smrg# in macros and then make a single call at the end using the 'libtool' 319414bd68fSmrg# label. 320ee3138f1Smrg 32134977a2fSmrg 322414bd68fSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323414bd68fSmrg# ---------------------------------------- 324414bd68fSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325414bd68fSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 326414bd68fSmrg[m4_ifval([$1], 327414bd68fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328414bd68fSmrg [$1 329414bd68fSmrg])])]) 33034977a2fSmrg 331414bd68fSmrg# Initialize. 332414bd68fSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 33334977a2fSmrg 33434977a2fSmrg 335414bd68fSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 336414bd68fSmrg# ------------------------------ 337414bd68fSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338414bd68fSmrgm4_define([_LT_CONFIG_LIBTOOL], 339414bd68fSmrg[m4_ifval([$1], 340414bd68fSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341414bd68fSmrg [$1 342414bd68fSmrg])])]) 34334977a2fSmrg 344414bd68fSmrg# Initialize. 345414bd68fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 34634977a2fSmrg 347414bd68fSmrg 348414bd68fSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349414bd68fSmrg# ----------------------------------------------------- 350414bd68fSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 351414bd68fSmrg[_LT_CONFIG_LIBTOOL([$1]) 352414bd68fSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 3533e72ca8cSmrg]) 35434977a2fSmrg 35534977a2fSmrg 356414bd68fSmrg# _LT_FORMAT_COMMENT([COMMENT]) 357414bd68fSmrg# ----------------------------- 358414bd68fSmrg# Add leading comment marks to the start of each line, and a trailing 359414bd68fSmrg# full-stop to the whole comment if one is not present already. 360414bd68fSmrgm4_define([_LT_FORMAT_COMMENT], 361414bd68fSmrg[m4_ifval([$1], [ 362414bd68fSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363414bd68fSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364414bd68fSmrg)]) 36534977a2fSmrg 36634977a2fSmrg 367414bd68fSmrg 368414bd68fSmrg 369414bd68fSmrg 370414bd68fSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371414bd68fSmrg# ------------------------------------------------------------------- 372414bd68fSmrg# CONFIGNAME is the name given to the value in the libtool script. 373414bd68fSmrg# VARNAME is the (base) name used in the configure script. 374414bd68fSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375414bd68fSmrg# VARNAME. Any other value will be used directly. 376414bd68fSmrgm4_define([_LT_DECL], 377414bd68fSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378414bd68fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379414bd68fSmrg [m4_ifval([$1], [$1], [$2])]) 380414bd68fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381414bd68fSmrg m4_ifval([$4], 382414bd68fSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383414bd68fSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 384414bd68fSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 38534977a2fSmrg]) 38634977a2fSmrg 38734977a2fSmrg 388414bd68fSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389414bd68fSmrg# -------------------------------------------------------- 390414bd68fSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 39134977a2fSmrg 39234977a2fSmrg 393414bd68fSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394414bd68fSmrg# ------------------------------------------------ 395414bd68fSmrgm4_define([lt_decl_tag_varnames], 396414bd68fSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 39734977a2fSmrg 39834977a2fSmrg 399414bd68fSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400414bd68fSmrg# --------------------------------------------------------- 401414bd68fSmrgm4_define([_lt_decl_filter], 402414bd68fSmrg[m4_case([$#], 403414bd68fSmrg [0], [m4_fatal([$0: too few arguments: $#])], 404414bd68fSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 405414bd68fSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406414bd68fSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407414bd68fSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 408414bd68fSmrg]) 40934977a2fSmrg 41034977a2fSmrg 411414bd68fSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412414bd68fSmrg# -------------------------------------------------- 413414bd68fSmrgm4_define([lt_decl_quote_varnames], 414414bd68fSmrg[_lt_decl_filter([value], [1], $@)]) 41534977a2fSmrg 41634977a2fSmrg 417414bd68fSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418414bd68fSmrg# --------------------------------------------------- 419414bd68fSmrgm4_define([lt_decl_dquote_varnames], 420414bd68fSmrg[_lt_decl_filter([value], [2], $@)]) 4213e72ca8cSmrg 422414bd68fSmrg 423414bd68fSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424414bd68fSmrg# --------------------------------------------------- 425414bd68fSmrgm4_define([lt_decl_varnames_tagged], 426414bd68fSmrg[m4_assert([$# <= 2])dnl 427414bd68fSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 428414bd68fSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429414bd68fSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430414bd68fSmrgm4_define([_lt_decl_varnames_tagged], 431414bd68fSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432414bd68fSmrg 433414bd68fSmrg 434414bd68fSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435414bd68fSmrg# ------------------------------------------------ 436414bd68fSmrgm4_define([lt_decl_all_varnames], 437414bd68fSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 438414bd68fSmrg m4_if([$2], [], 439414bd68fSmrg m4_quote(lt_decl_varnames), 440414bd68fSmrg m4_quote(m4_shift($@))))[]dnl 441414bd68fSmrg]) 442414bd68fSmrgm4_define([_lt_decl_all_varnames], 443414bd68fSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 444414bd68fSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 4453e72ca8cSmrg]) 44634977a2fSmrg 44734977a2fSmrg 448414bd68fSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449414bd68fSmrg# ------------------------------------ 450fe24f8a2Smrg# Quote a variable value, and forward it to 'config.status' so that its 451fe24f8a2Smrg# declaration there will have the same value as in 'configure'. VARNAME 452414bd68fSmrg# must have a single quote delimited value for this to work. 453414bd68fSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 454414bd68fSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455414bd68fSmrg 45634977a2fSmrg 457414bd68fSmrg# _LT_CONFIG_STATUS_DECLARATIONS 458414bd68fSmrg# ------------------------------ 459414bd68fSmrg# We delimit libtool config variables with single quotes, so when 460414bd68fSmrg# we write them to config.status, we have to be sure to quote all 461414bd68fSmrg# embedded single quotes properly. In configure, this macro expands 462414bd68fSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 4633e72ca8cSmrg# 464414bd68fSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465414bd68fSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466414bd68fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467414bd68fSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 46834977a2fSmrg 46934977a2fSmrg 470414bd68fSmrg# _LT_LIBTOOL_TAGS 471414bd68fSmrg# ---------------- 472414bd68fSmrg# Output comment and list of tags supported by the script 473414bd68fSmrgm4_defun([_LT_LIBTOOL_TAGS], 474414bd68fSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 475fe24f8a2Smrgavailable_tags='_LT_TAGS'dnl 476414bd68fSmrg]) 477414bd68fSmrg 478414bd68fSmrg 479414bd68fSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480414bd68fSmrg# ----------------------------------- 481414bd68fSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 482414bd68fSmrg# expand to a commented shell variable setting: 48334977a2fSmrg# 484414bd68fSmrg# # Some comment about what VAR is for. 485414bd68fSmrg# visible_name=$lt_internal_name 486414bd68fSmrgm4_define([_LT_LIBTOOL_DECLARE], 487414bd68fSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488414bd68fSmrg [description])))[]dnl 489414bd68fSmrgm4_pushdef([_libtool_name], 490414bd68fSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491414bd68fSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492414bd68fSmrg [0], [_libtool_name=[$]$1], 493414bd68fSmrg [1], [_libtool_name=$lt_[]$1], 494414bd68fSmrg [2], [_libtool_name=$lt_[]$1], 495414bd68fSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496414bd68fSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497414bd68fSmrg]) 49834977a2fSmrg 49934977a2fSmrg 500414bd68fSmrg# _LT_LIBTOOL_CONFIG_VARS 501414bd68fSmrg# ----------------------- 502414bd68fSmrg# Produce commented declarations of non-tagged libtool config variables 503fe24f8a2Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504414bd68fSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505414bd68fSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 506414bd68fSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 507414bd68fSmrg[m4_foreach([_lt_var], 508414bd68fSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509414bd68fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 51034977a2fSmrg 51134977a2fSmrg 512414bd68fSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 513414bd68fSmrg# ------------------------- 514414bd68fSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 515414bd68fSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516414bd68fSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 51734977a2fSmrg 51826b1ff4eSmrg 519414bd68fSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 520414bd68fSmrg# ------------------------------ 521414bd68fSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 52234977a2fSmrg 52326b1ff4eSmrg 524414bd68fSmrg# _LT_CONFIG_COMMANDS 525414bd68fSmrg# ------------------- 526414bd68fSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527414bd68fSmrg# variables for single and double quote escaping we saved from calls 528414bd68fSmrg# to _LT_DECL, we can put quote escaped variables declarations 529fe24f8a2Smrg# into 'config.status', and then the shell code to quote escape them in 530fe24f8a2Smrg# for loops in 'config.status'. Finally, any additional code accumulated 531414bd68fSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532414bd68fSmrgm4_defun([_LT_CONFIG_COMMANDS], 533414bd68fSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 534414bd68fSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 535414bd68fSmrg dnl instead of duplicating it all over again into config.status, 536414bd68fSmrg dnl then we will have config.status run $CONFIG_LT later, so it 537414bd68fSmrg dnl needs to know what name is stored there: 538414bd68fSmrg [AC_CONFIG_COMMANDS([libtool], 539414bd68fSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540414bd68fSmrg dnl If the libtool generation code is destined for config.status, 541414bd68fSmrg dnl expand the accumulated commands and init code now: 542414bd68fSmrg [AC_CONFIG_COMMANDS([libtool], 543414bd68fSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544414bd68fSmrg])#_LT_CONFIG_COMMANDS 54526b1ff4eSmrg 54626b1ff4eSmrg 547414bd68fSmrg# Initialize. 548414bd68fSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549414bd68fSmrg[ 55026b1ff4eSmrg 551414bd68fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 552414bd68fSmrg# if CDPATH is set. 553414bd68fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 55426b1ff4eSmrg 555414bd68fSmrgsed_quote_subst='$sed_quote_subst' 556414bd68fSmrgdouble_quote_subst='$double_quote_subst' 557414bd68fSmrgdelay_variable_subst='$delay_variable_subst' 558414bd68fSmrg_LT_CONFIG_STATUS_DECLARATIONS 559414bd68fSmrgLTCC='$LTCC' 560414bd68fSmrgLTCFLAGS='$LTCFLAGS' 561414bd68fSmrgcompiler='$compiler_DEFAULT' 56226b1ff4eSmrg 563414bd68fSmrg# A function that is used when there is no print builtin or printf. 564414bd68fSmrgfunc_fallback_echo () 565414bd68fSmrg{ 566414bd68fSmrg eval 'cat <<_LTECHO_EOF 567414bd68fSmrg\$[]1 568414bd68fSmrg_LTECHO_EOF' 569414bd68fSmrg} 570414bd68fSmrg 571414bd68fSmrg# Quote evaled strings. 572414bd68fSmrgfor var in lt_decl_all_varnames([[ \ 573414bd68fSmrg]], lt_decl_quote_varnames); do 574414bd68fSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575414bd68fSmrg *[[\\\\\\\`\\"\\\$]]*) 576fe24f8a2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 57726b1ff4eSmrg ;; 578414bd68fSmrg *) 579414bd68fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 58026b1ff4eSmrg ;; 581414bd68fSmrg esac 582414bd68fSmrgdone 583414bd68fSmrg 584414bd68fSmrg# Double-quote double-evaled strings. 585414bd68fSmrgfor var in lt_decl_all_varnames([[ \ 586414bd68fSmrg]], lt_decl_dquote_varnames); do 587414bd68fSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588414bd68fSmrg *[[\\\\\\\`\\"\\\$]]*) 589fe24f8a2Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 59026b1ff4eSmrg ;; 591414bd68fSmrg *) 592414bd68fSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 59326b1ff4eSmrg ;; 59426b1ff4eSmrg esac 595414bd68fSmrgdone 59634977a2fSmrg 597414bd68fSmrg_LT_OUTPUT_LIBTOOL_INIT 5983e72ca8cSmrg]) 59934977a2fSmrg 600414bd68fSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601414bd68fSmrg# ------------------------------------ 602414bd68fSmrg# Generate a child script FILE with all initialization necessary to 603414bd68fSmrg# reuse the environment learned by the parent script, and make the 604414bd68fSmrg# file executable. If COMMENT is supplied, it is inserted after the 605fe24f8a2Smrg# '#!' sequence but before initialization text begins. After this 606414bd68fSmrg# macro, additional text can be appended to FILE to form the body of 607414bd68fSmrg# the child script. The macro ends with non-zero status if the 608414bd68fSmrg# file could not be fully written (such as if the disk is full). 609414bd68fSmrgm4_ifdef([AS_INIT_GENERATED], 610414bd68fSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611414bd68fSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 612414bd68fSmrg[m4_require([AS_PREPARE])]dnl 613414bd68fSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614414bd68fSmrg[lt_write_fail=0 615414bd68fSmrgcat >$1 <<_ASEOF || lt_write_fail=1 616414bd68fSmrg#! $SHELL 617414bd68fSmrg# Generated by $as_me. 618414bd68fSmrg$2 619414bd68fSmrgSHELL=\${CONFIG_SHELL-$SHELL} 620414bd68fSmrgexport SHELL 621414bd68fSmrg_ASEOF 622414bd68fSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 623414bd68fSmrgAS_SHELL_SANITIZE 624414bd68fSmrg_AS_PREPARE 625414bd68fSmrgexec AS_MESSAGE_FD>&1 626414bd68fSmrg_ASEOF 627fe24f8a2Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 628414bd68fSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629ee3138f1Smrg 630414bd68fSmrg# LT_OUTPUT 631414bd68fSmrg# --------- 632414bd68fSmrg# This macro allows early generation of the libtool script (before 633414bd68fSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 634414bd68fSmrg# tests. 635414bd68fSmrgAC_DEFUN([LT_OUTPUT], 636414bd68fSmrg[: ${CONFIG_LT=./config.lt} 637414bd68fSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 638414bd68fSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639414bd68fSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 64034977a2fSmrg 641414bd68fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 642414bd68fSmrglt_cl_silent=false 643414bd68fSmrgexec AS_MESSAGE_LOG_FD>>config.log 644414bd68fSmrg{ 645414bd68fSmrg echo 646414bd68fSmrg AS_BOX([Running $as_me.]) 647414bd68fSmrg} >&AS_MESSAGE_LOG_FD 648ee3138f1Smrg 649414bd68fSmrglt_cl_help="\ 650fe24f8a2Smrg'$as_me' creates a local libtool stub from the current configuration, 651414bd68fSmrgfor use in further configure time tests before the real libtool is 652414bd68fSmrggenerated. 653ee3138f1Smrg 654414bd68fSmrgUsage: $[0] [[OPTIONS]] 655ee3138f1Smrg 656414bd68fSmrg -h, --help print this help, then exit 657414bd68fSmrg -V, --version print version number, then exit 658414bd68fSmrg -q, --quiet do not print progress messages 659414bd68fSmrg -d, --debug don't remove temporary files 660ee3138f1Smrg 661414bd68fSmrgReport bugs to <bug-libtool@gnu.org>." 662b425557eSmrg 663414bd68fSmrglt_cl_version="\ 664414bd68fSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665414bd68fSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666414bd68fSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 667b425557eSmrg 668414bd68fSmrgCopyright (C) 2011 Free Software Foundation, Inc. 669414bd68fSmrgThis config.lt script is free software; the Free Software Foundation 670414bd68fSmrggives unlimited permision to copy, distribute and modify it." 671b425557eSmrg 672fe24f8a2Smrgwhile test 0 != $[#] 673414bd68fSmrgdo 674414bd68fSmrg case $[1] in 675414bd68fSmrg --version | --v* | -V ) 676414bd68fSmrg echo "$lt_cl_version"; exit 0 ;; 677414bd68fSmrg --help | --h* | -h ) 678414bd68fSmrg echo "$lt_cl_help"; exit 0 ;; 679414bd68fSmrg --debug | --d* | -d ) 680414bd68fSmrg debug=: ;; 681414bd68fSmrg --quiet | --q* | --silent | --s* | -q ) 682414bd68fSmrg lt_cl_silent=: ;; 683ee3138f1Smrg 684414bd68fSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 685fe24f8a2SmrgTry '$[0] --help' for more information.]) ;; 686ee3138f1Smrg 687414bd68fSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 688fe24f8a2SmrgTry '$[0] --help' for more information.]) ;; 689414bd68fSmrg esac 690414bd68fSmrg shift 691414bd68fSmrgdone 692ee3138f1Smrg 693414bd68fSmrgif $lt_cl_silent; then 694414bd68fSmrg exec AS_MESSAGE_FD>/dev/null 695414bd68fSmrgfi 696414bd68fSmrg_LTEOF 69779a8a9c6Smrg 698414bd68fSmrgcat >>"$CONFIG_LT" <<_LTEOF 699414bd68fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700414bd68fSmrg_LTEOF 70134977a2fSmrg 702414bd68fSmrgcat >>"$CONFIG_LT" <<\_LTEOF 703414bd68fSmrgAC_MSG_NOTICE([creating $ofile]) 704414bd68fSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 705414bd68fSmrgAS_EXIT(0) 706414bd68fSmrg_LTEOF 707414bd68fSmrgchmod +x "$CONFIG_LT" 708ee3138f1Smrg 709414bd68fSmrg# configure is writing to config.log, but config.lt does its own redirection, 710414bd68fSmrg# appending to config.log, which fails on DOS, as config.log is still kept 711414bd68fSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 712414bd68fSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 713414bd68fSmrglt_cl_success=: 714fe24f8a2Smrgtest yes = "$silent" && 715414bd68fSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 716414bd68fSmrgexec AS_MESSAGE_LOG_FD>/dev/null 717414bd68fSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718414bd68fSmrgexec AS_MESSAGE_LOG_FD>>config.log 719414bd68fSmrg$lt_cl_success || AS_EXIT(1) 720414bd68fSmrg])# LT_OUTPUT 721ee3138f1Smrg 722ee3138f1Smrg 723414bd68fSmrg# _LT_CONFIG(TAG) 724414bd68fSmrg# --------------- 725414bd68fSmrg# If TAG is the built-in tag, create an initial libtool script with a 726414bd68fSmrg# default configuration from the untagged config vars. Otherwise add code 727414bd68fSmrg# to config.status for appending the configuration named by TAG from the 728414bd68fSmrg# matching tagged config vars. 729414bd68fSmrgm4_defun([_LT_CONFIG], 730414bd68fSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731414bd68fSmrg_LT_CONFIG_SAVE_COMMANDS([ 732414bd68fSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733414bd68fSmrg m4_if(_LT_TAG, [C], [ 734fe24f8a2Smrg # See if we are running on zsh, and set the options that allow our 735414bd68fSmrg # commands through without removal of \ escapes. 736fe24f8a2Smrg if test -n "${ZSH_VERSION+set}"; then 737414bd68fSmrg setopt NO_GLOB_SUBST 738414bd68fSmrg fi 739ee3138f1Smrg 740fe24f8a2Smrg cfgfile=${ofile}T 741414bd68fSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742414bd68fSmrg $RM "$cfgfile" 743ee3138f1Smrg 744414bd68fSmrg cat <<_LT_EOF >> "$cfgfile" 745414bd68fSmrg#! $SHELL 746fe24f8a2Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 747414bd68fSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748414bd68fSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 749fe24f8a2Smrg 750fe24f8a2Smrg# Provide generalized library-building support services. 751fe24f8a2Smrg# Written by Gordon Matzigkeit, 1996 752fe24f8a2Smrg 753414bd68fSmrg_LT_COPYING 754414bd68fSmrg_LT_LIBTOOL_TAGS 755ee3138f1Smrg 756fe24f8a2Smrg# Configured defaults for sys_lib_dlsearch_path munging. 757fe24f8a2Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 758fe24f8a2Smrg 759414bd68fSmrg# ### BEGIN LIBTOOL CONFIG 760414bd68fSmrg_LT_LIBTOOL_CONFIG_VARS 761414bd68fSmrg_LT_LIBTOOL_TAG_VARS 762414bd68fSmrg# ### END LIBTOOL CONFIG 763ee3138f1Smrg 764fe24f8a2Smrg_LT_EOF 765fe24f8a2Smrg 766fe24f8a2Smrg cat <<'_LT_EOF' >> "$cfgfile" 767fe24f8a2Smrg 768fe24f8a2Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 769fe24f8a2Smrg 770fe24f8a2Smrg_LT_PREPARE_MUNGE_PATH_LIST 771fe24f8a2Smrg_LT_PREPARE_CC_BASENAME 772fe24f8a2Smrg 773fe24f8a2Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 774fe24f8a2Smrg 775414bd68fSmrg_LT_EOF 776ee3138f1Smrg 777414bd68fSmrg case $host_os in 778414bd68fSmrg aix3*) 779414bd68fSmrg cat <<\_LT_EOF >> "$cfgfile" 780414bd68fSmrg# AIX sometimes has problems with the GCC collect2 program. For some 781414bd68fSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 782414bd68fSmrg# vanish in a puff of smoke. 783fe24f8a2Smrgif test set != "${COLLECT_NAMES+set}"; then 784414bd68fSmrg COLLECT_NAMES= 785414bd68fSmrg export COLLECT_NAMES 786414bd68fSmrgfi 787414bd68fSmrg_LT_EOF 788414bd68fSmrg ;; 789414bd68fSmrg esac 790ee3138f1Smrg 791414bd68fSmrg _LT_PROG_LTMAIN 792ee3138f1Smrg 793414bd68fSmrg # We use sed instead of cat because bash on DJGPP gets confused if 794414bd68fSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 795414bd68fSmrg # text mode, it properly converts lines to CR/LF. This bash problem 796414bd68fSmrg # is reportedly fixed, but why not run on old versions too? 797414bd68fSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 798414bd68fSmrg || (rm -f "$cfgfile"; exit 1) 799ee3138f1Smrg 800414bd68fSmrg mv -f "$cfgfile" "$ofile" || 801414bd68fSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802414bd68fSmrg chmod +x "$ofile" 803414bd68fSmrg], 804414bd68fSmrg[cat <<_LT_EOF >> "$ofile" 805ee3138f1Smrg 806414bd68fSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807414bd68fSmrgdnl in a comment (ie after a #). 808414bd68fSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 809414bd68fSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810414bd68fSmrg# ### END LIBTOOL TAG CONFIG: $1 811414bd68fSmrg_LT_EOF 812414bd68fSmrg])dnl /m4_if 813414bd68fSmrg], 814414bd68fSmrg[m4_if([$1], [], [ 815414bd68fSmrg PACKAGE='$PACKAGE' 816414bd68fSmrg VERSION='$VERSION' 817414bd68fSmrg RM='$RM' 818414bd68fSmrg ofile='$ofile'], []) 819414bd68fSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 820414bd68fSmrg])# _LT_CONFIG 821ee3138f1Smrg 822ee3138f1Smrg 823414bd68fSmrg# LT_SUPPORTED_TAG(TAG) 824414bd68fSmrg# --------------------- 825414bd68fSmrg# Trace this macro to discover what tags are supported by the libtool 826414bd68fSmrg# --tag option, using: 827414bd68fSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828414bd68fSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829ee3138f1Smrg 830ee3138f1Smrg 831414bd68fSmrg# C support is built-in for now 832414bd68fSmrgm4_define([_LT_LANG_C_enabled], []) 833414bd68fSmrgm4_define([_LT_TAGS], []) 834b425557eSmrg 83534977a2fSmrg 836414bd68fSmrg# LT_LANG(LANG) 837414bd68fSmrg# ------------- 838414bd68fSmrg# Enable libtool support for the given language if not already enabled. 839414bd68fSmrgAC_DEFUN([LT_LANG], 840414bd68fSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 841414bd68fSmrgm4_case([$1], 842414bd68fSmrg [C], [_LT_LANG(C)], 843414bd68fSmrg [C++], [_LT_LANG(CXX)], 844414bd68fSmrg [Go], [_LT_LANG(GO)], 845414bd68fSmrg [Java], [_LT_LANG(GCJ)], 846414bd68fSmrg [Fortran 77], [_LT_LANG(F77)], 847414bd68fSmrg [Fortran], [_LT_LANG(FC)], 848414bd68fSmrg [Windows Resource], [_LT_LANG(RC)], 849414bd68fSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850414bd68fSmrg [_LT_LANG($1)], 851414bd68fSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 852414bd68fSmrg])# LT_LANG 85334977a2fSmrg 854b425557eSmrg 855414bd68fSmrg# _LT_LANG(LANGNAME) 856414bd68fSmrg# ------------------ 857414bd68fSmrgm4_defun([_LT_LANG], 858414bd68fSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859414bd68fSmrg [LT_SUPPORTED_TAG([$1])dnl 860414bd68fSmrg m4_append([_LT_TAGS], [$1 ])dnl 861414bd68fSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 862414bd68fSmrg _LT_LANG_$1_CONFIG($1)])dnl 863414bd68fSmrg])# _LT_LANG 864b425557eSmrg 86534977a2fSmrg 866414bd68fSmrgm4_ifndef([AC_PROG_GO], [ 867414bd68fSmrg# NOTE: This macro has been submitted for inclusion into # 868414bd68fSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 869414bd68fSmrg# a released version of Autoconf we should remove this # 870414bd68fSmrg# macro and use it instead. # 871414bd68fSmrgm4_defun([AC_PROG_GO], 872414bd68fSmrg[AC_LANG_PUSH(Go)dnl 873414bd68fSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 874414bd68fSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875414bd68fSmrg_AC_ARG_VAR_LDFLAGS()dnl 876414bd68fSmrgAC_CHECK_TOOL(GOC, gccgo) 877414bd68fSmrgif test -z "$GOC"; then 878414bd68fSmrg if test -n "$ac_tool_prefix"; then 879414bd68fSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880414bd68fSmrg fi 881414bd68fSmrgfi 882414bd68fSmrgif test -z "$GOC"; then 883414bd68fSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884414bd68fSmrgfi 885414bd68fSmrg])#m4_defun 886414bd68fSmrg])#m4_ifndef 887ee3138f1Smrg 888ee3138f1Smrg 889414bd68fSmrg# _LT_LANG_DEFAULT_CONFIG 890414bd68fSmrg# ----------------------- 891414bd68fSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 892414bd68fSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893414bd68fSmrg [LT_LANG(CXX)], 894414bd68fSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895ee3138f1Smrg 896414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 897414bd68fSmrg [LT_LANG(F77)], 898414bd68fSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899b425557eSmrg 900414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 901414bd68fSmrg [LT_LANG(FC)], 902414bd68fSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903ee3138f1Smrg 904414bd68fSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905414bd68fSmrgdnl pulling things in needlessly. 906414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 907414bd68fSmrg [LT_LANG(GCJ)], 908414bd68fSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909414bd68fSmrg [LT_LANG(GCJ)], 910414bd68fSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911414bd68fSmrg [LT_LANG(GCJ)], 912414bd68fSmrg [m4_ifdef([AC_PROG_GCJ], 913414bd68fSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914414bd68fSmrg m4_ifdef([A][M_PROG_GCJ], 915414bd68fSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916414bd68fSmrg m4_ifdef([LT_PROG_GCJ], 917414bd68fSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918b425557eSmrg 919414bd68fSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 920414bd68fSmrg [LT_LANG(GO)], 921414bd68fSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 922ee3138f1Smrg 923414bd68fSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 924414bd68fSmrg [LT_LANG(RC)], 925414bd68fSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926414bd68fSmrg])# _LT_LANG_DEFAULT_CONFIG 927a1ed278cSmrg 928414bd68fSmrg# Obsolete macros: 929414bd68fSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930414bd68fSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931414bd68fSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932414bd68fSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933414bd68fSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 935414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 937414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 938414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 940a1ed278cSmrg 941ee3138f1Smrg 942414bd68fSmrg# _LT_TAG_COMPILER 943414bd68fSmrg# ---------------- 944414bd68fSmrgm4_defun([_LT_TAG_COMPILER], 945414bd68fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 946ee3138f1Smrg 947414bd68fSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948414bd68fSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949414bd68fSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950414bd68fSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 951ee3138f1Smrg 952414bd68fSmrg# If no C compiler was specified, use CC. 953414bd68fSmrgLTCC=${LTCC-"$CC"} 954ee3138f1Smrg 955414bd68fSmrg# If no C compiler flags were specified, use CFLAGS. 956414bd68fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957ee3138f1Smrg 958414bd68fSmrg# Allow CC to be a program name with arguments. 959414bd68fSmrgcompiler=$CC 960414bd68fSmrg])# _LT_TAG_COMPILER 961ee3138f1Smrg 962ee3138f1Smrg 963414bd68fSmrg# _LT_COMPILER_BOILERPLATE 964414bd68fSmrg# ------------------------ 965414bd68fSmrg# Check for compiler boilerplate output or warnings with 966414bd68fSmrg# the simple compiler test code. 967414bd68fSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 968414bd68fSmrg[m4_require([_LT_DECL_SED])dnl 969414bd68fSmrgac_outfile=conftest.$ac_objext 970414bd68fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 971414bd68fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972414bd68fSmrg_lt_compiler_boilerplate=`cat conftest.err` 973414bd68fSmrg$RM conftest* 974414bd68fSmrg])# _LT_COMPILER_BOILERPLATE 975ee3138f1Smrg 97634977a2fSmrg 977414bd68fSmrg# _LT_LINKER_BOILERPLATE 978414bd68fSmrg# ---------------------- 979414bd68fSmrg# Check for linker boilerplate output or warnings with 980414bd68fSmrg# the simple link test code. 981414bd68fSmrgm4_defun([_LT_LINKER_BOILERPLATE], 982414bd68fSmrg[m4_require([_LT_DECL_SED])dnl 983414bd68fSmrgac_outfile=conftest.$ac_objext 984414bd68fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 985414bd68fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 986414bd68fSmrg_lt_linker_boilerplate=`cat conftest.err` 987414bd68fSmrg$RM -r conftest* 988414bd68fSmrg])# _LT_LINKER_BOILERPLATE 989ee3138f1Smrg 990414bd68fSmrg# _LT_REQUIRED_DARWIN_CHECKS 991414bd68fSmrg# ------------------------- 992414bd68fSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 993414bd68fSmrg case $host_os in 994414bd68fSmrg rhapsody* | darwin*) 995414bd68fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 996414bd68fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997414bd68fSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 998414bd68fSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 999414bd68fSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000414bd68fSmrg _LT_DECL([], [DSYMUTIL], [1], 1001414bd68fSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002414bd68fSmrg _LT_DECL([], [NMEDIT], [1], 1003414bd68fSmrg [Tool to change global to local symbols on Mac OS X]) 1004414bd68fSmrg _LT_DECL([], [LIPO], [1], 1005414bd68fSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 1006414bd68fSmrg _LT_DECL([], [OTOOL], [1], 1007414bd68fSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008414bd68fSmrg _LT_DECL([], [OTOOL64], [1], 1009414bd68fSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1010ee3138f1Smrg 1011414bd68fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1012414bd68fSmrg [lt_cv_apple_cc_single_mod=no 1013fe24f8a2Smrg if test -z "$LT_MULTI_MODULE"; then 1014414bd68fSmrg # By default we will add the -single_module flag. You can override 1015414bd68fSmrg # by either setting the environment variable LT_MULTI_MODULE 1016414bd68fSmrg # non-empty at configure time, or by adding -multi_module to the 1017414bd68fSmrg # link flags. 1018414bd68fSmrg rm -rf libconftest.dylib* 1019414bd68fSmrg echo "int foo(void){return 1;}" > conftest.c 1020414bd68fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021414bd68fSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022414bd68fSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023414bd68fSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024414bd68fSmrg _lt_result=$? 1025414bd68fSmrg # If there is a non-empty error log, and "single_module" 1026414bd68fSmrg # appears in it, assume the flag caused a linker warning 1027414bd68fSmrg if test -s conftest.err && $GREP single_module conftest.err; then 1028414bd68fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1029414bd68fSmrg # Otherwise, if the output was created with a 0 exit code from 1030414bd68fSmrg # the compiler, it worked. 1031fe24f8a2Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032414bd68fSmrg lt_cv_apple_cc_single_mod=yes 1033414bd68fSmrg else 1034414bd68fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1035414bd68fSmrg fi 1036414bd68fSmrg rm -rf libconftest.dylib* 1037414bd68fSmrg rm -f conftest.* 1038414bd68fSmrg fi]) 1039ee3138f1Smrg 1040414bd68fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1041414bd68fSmrg [lt_cv_ld_exported_symbols_list], 1042414bd68fSmrg [lt_cv_ld_exported_symbols_list=no 1043414bd68fSmrg save_LDFLAGS=$LDFLAGS 1044414bd68fSmrg echo "_main" > conftest.sym 1045414bd68fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1046414bd68fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047414bd68fSmrg [lt_cv_ld_exported_symbols_list=yes], 1048414bd68fSmrg [lt_cv_ld_exported_symbols_list=no]) 1049fe24f8a2Smrg LDFLAGS=$save_LDFLAGS 1050414bd68fSmrg ]) 10513e72ca8cSmrg 1052414bd68fSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053414bd68fSmrg [lt_cv_ld_force_load=no 1054414bd68fSmrg cat > conftest.c << _LT_EOF 1055414bd68fSmrgint forced_loaded() { return 2;} 1056414bd68fSmrg_LT_EOF 1057414bd68fSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058414bd68fSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059414bd68fSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060414bd68fSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061414bd68fSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062414bd68fSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063414bd68fSmrg cat > conftest.c << _LT_EOF 1064414bd68fSmrgint main() { return 0;} 1065414bd68fSmrg_LT_EOF 1066414bd68fSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067414bd68fSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068414bd68fSmrg _lt_result=$? 1069414bd68fSmrg if test -s conftest.err && $GREP force_load conftest.err; then 1070414bd68fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1071fe24f8a2Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072414bd68fSmrg lt_cv_ld_force_load=yes 1073414bd68fSmrg else 1074414bd68fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1075414bd68fSmrg fi 1076414bd68fSmrg rm -f conftest.err libconftest.a conftest conftest.c 1077414bd68fSmrg rm -rf conftest.dSYM 1078414bd68fSmrg ]) 1079414bd68fSmrg case $host_os in 1080414bd68fSmrg rhapsody* | darwin1.[[012]]) 1081fe24f8a2Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1082414bd68fSmrg darwin1.*) 1083fe24f8a2Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084414bd68fSmrg darwin*) # darwin 5.x on 1085414bd68fSmrg # if running on 10.5 or later, the deployment target defaults 1086414bd68fSmrg # to the OS version, if on x86, and 10.4, the deployment 1087414bd68fSmrg # target defaults to 10.4. Don't you love it? 1088414bd68fSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089414bd68fSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1090fe24f8a2Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091fe24f8a2Smrg 10.[[012]][[,.]]*) 1092fe24f8a2Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093414bd68fSmrg 10.*) 1094fe24f8a2Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1095414bd68fSmrg esac 1096414bd68fSmrg ;; 1097414bd68fSmrg esac 1098fe24f8a2Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1099414bd68fSmrg _lt_dar_single_mod='$single_module' 1100414bd68fSmrg fi 1101fe24f8a2Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1102fe24f8a2Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1103414bd68fSmrg else 1104fe24f8a2Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1105414bd68fSmrg fi 1106fe24f8a2Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107414bd68fSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1108414bd68fSmrg else 1109414bd68fSmrg _lt_dsymutil= 1110414bd68fSmrg fi 1111414bd68fSmrg ;; 1112414bd68fSmrg esac 1113414bd68fSmrg]) 1114ee3138f1Smrg 1115ee3138f1Smrg 1116414bd68fSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117414bd68fSmrg# --------------------------------- 1118414bd68fSmrg# Checks for linker and compiler features on darwin 1119414bd68fSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1120414bd68fSmrg[ 1121414bd68fSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122414bd68fSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123414bd68fSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1124414bd68fSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1125414bd68fSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1126fe24f8a2Smrg if test yes = "$lt_cv_ld_force_load"; then 1127fe24f8a2Smrg _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\"`' 1128414bd68fSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129414bd68fSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130414bd68fSmrg else 1131414bd68fSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132414bd68fSmrg fi 1133414bd68fSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1134fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135414bd68fSmrg case $cc_basename in 1136fe24f8a2Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137414bd68fSmrg *) _lt_dar_can_shared=$GCC ;; 1138414bd68fSmrg esac 1139fe24f8a2Smrg if test yes = "$_lt_dar_can_shared"; then 1140414bd68fSmrg output_verbose_link_cmd=func_echo_all 1141fe24f8a2Smrg _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" 1142fe24f8a2Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1143fe24f8a2Smrg _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" 1144fe24f8a2Smrg _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" 1145414bd68fSmrg m4_if([$1], [CXX], 1146fe24f8a2Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1147fe24f8a2Smrg _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" 1148fe24f8a2Smrg _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" 1149414bd68fSmrg fi 1150414bd68fSmrg],[]) 1151414bd68fSmrg else 1152414bd68fSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1153414bd68fSmrg fi 1154414bd68fSmrg]) 1155414bd68fSmrg 1156414bd68fSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157414bd68fSmrg# ---------------------------------- 1158414bd68fSmrg# Links a minimal program and checks the executable 1159414bd68fSmrg# for the system default hardcoded library path. In most cases, 1160414bd68fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1161414bd68fSmrg# the location of the communication and MPI libs are included too. 1162414bd68fSmrg# If we don't find anything, use the default library path according 1163414bd68fSmrg# to the aix ld manual. 1164414bd68fSmrg# Store the results from the different compilers for each TAGNAME. 1165414bd68fSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1166414bd68fSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1167414bd68fSmrg[m4_require([_LT_DECL_SED])dnl 1168fe24f8a2Smrgif test set = "${lt_cv_aix_libpath+set}"; then 1169414bd68fSmrg aix_libpath=$lt_cv_aix_libpath 1170414bd68fSmrgelse 1171414bd68fSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172414bd68fSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173414bd68fSmrg lt_aix_libpath_sed='[ 1174414bd68fSmrg /Import File Strings/,/^$/ { 1175414bd68fSmrg /^0/ { 1176414bd68fSmrg s/^0 *\([^ ]*\) *$/\1/ 1177414bd68fSmrg p 1178414bd68fSmrg } 1179414bd68fSmrg }]' 1180414bd68fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181414bd68fSmrg # Check for a 64-bit object if we didn't find anything. 1182414bd68fSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183414bd68fSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184414bd68fSmrg fi],[]) 1185414bd68fSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1186fe24f8a2Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187414bd68fSmrg fi 1188414bd68fSmrg ]) 1189414bd68fSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190414bd68fSmrgfi 1191414bd68fSmrg])# _LT_SYS_MODULE_PATH_AIX 1192ee3138f1Smrg 1193ee3138f1Smrg 1194414bd68fSmrg# _LT_SHELL_INIT(ARG) 1195414bd68fSmrg# ------------------- 1196414bd68fSmrgm4_define([_LT_SHELL_INIT], 1197414bd68fSmrg[m4_divert_text([M4SH-INIT], [$1 1198414bd68fSmrg])])# _LT_SHELL_INIT 1199a1ed278cSmrg 1200a1ed278cSmrg 1201ee3138f1Smrg 1202414bd68fSmrg# _LT_PROG_ECHO_BACKSLASH 1203414bd68fSmrg# ----------------------- 1204414bd68fSmrg# Find how we can fake an echo command that does not interpret backslash. 1205414bd68fSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1206fe24f8a2Smrg# of the generated configure script that will find a shell with a builtin 1207fe24f8a2Smrg# printf (that we can use as an echo command). 1208414bd68fSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1209414bd68fSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210414bd68fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211414bd68fSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212ee3138f1Smrg 1213414bd68fSmrgAC_MSG_CHECKING([how to print strings]) 1214414bd68fSmrg# Test print first, because it will be a builtin if present. 1215414bd68fSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216414bd68fSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217414bd68fSmrg ECHO='print -r --' 1218414bd68fSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219414bd68fSmrg ECHO='printf %s\n' 1220414bd68fSmrgelse 1221414bd68fSmrg # Use this function as a fallback that always works. 1222414bd68fSmrg func_fallback_echo () 1223414bd68fSmrg { 1224414bd68fSmrg eval 'cat <<_LTECHO_EOF 1225414bd68fSmrg$[]1 1226414bd68fSmrg_LTECHO_EOF' 1227414bd68fSmrg } 1228414bd68fSmrg ECHO='func_fallback_echo' 1229414bd68fSmrgfi 1230ee3138f1Smrg 1231414bd68fSmrg# func_echo_all arg... 1232414bd68fSmrg# Invoke $ECHO with all args, space-separated. 1233414bd68fSmrgfunc_echo_all () 1234414bd68fSmrg{ 1235fe24f8a2Smrg $ECHO "$*" 1236414bd68fSmrg} 1237ee3138f1Smrg 1238fe24f8a2Smrgcase $ECHO in 1239414bd68fSmrg printf*) AC_MSG_RESULT([printf]) ;; 1240414bd68fSmrg print*) AC_MSG_RESULT([print -r]) ;; 1241414bd68fSmrg *) AC_MSG_RESULT([cat]) ;; 1242414bd68fSmrgesac 1243ee3138f1Smrg 1244414bd68fSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1245414bd68fSmrg[_AS_DETECT_SUGGESTED([ 1246414bd68fSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247414bd68fSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248414bd68fSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249414bd68fSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250414bd68fSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1251414bd68fSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1252414bd68fSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253ee3138f1Smrg 1254414bd68fSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255414bd68fSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256414bd68fSmrg])# _LT_PROG_ECHO_BACKSLASH 1257ee3138f1Smrg 1258ee3138f1Smrg 1259414bd68fSmrg# _LT_WITH_SYSROOT 12603e72ca8cSmrg# ---------------- 1261414bd68fSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1262414bd68fSmrg[AC_MSG_CHECKING([for sysroot]) 1263414bd68fSmrgAC_ARG_WITH([sysroot], 1264fe24f8a2Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1265fe24f8a2Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 1266fe24f8a2Smrg if not specified).])], 1267414bd68fSmrg[], [with_sysroot=no]) 12683e72ca8cSmrg 12693e72ca8cSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 12703e72ca8cSmrgdnl in case the user passed a directory name. 12713e72ca8cSmrglt_sysroot= 1272fe24f8a2Smrgcase $with_sysroot in #( 12733e72ca8cSmrg yes) 1274fe24f8a2Smrg if test yes = "$GCC"; then 12753e72ca8cSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 12763e72ca8cSmrg fi 12773e72ca8cSmrg ;; #( 12783e72ca8cSmrg /*) 12793e72ca8cSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 12803e72ca8cSmrg ;; #( 12813e72ca8cSmrg no|'') 12823e72ca8cSmrg ;; #( 12833e72ca8cSmrg *) 1284fe24f8a2Smrg AC_MSG_RESULT([$with_sysroot]) 12853e72ca8cSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 12863e72ca8cSmrg ;; 12873e72ca8cSmrgesac 1288ee3138f1Smrg 12893e72ca8cSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 12903e72ca8cSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1291fe24f8a2Smrg[dependent libraries, and where our libraries should be installed.])]) 1292ee3138f1Smrg 12933e72ca8cSmrg# _LT_ENABLE_LOCK 12943e72ca8cSmrg# --------------- 12953e72ca8cSmrgm4_defun([_LT_ENABLE_LOCK], 12963e72ca8cSmrg[AC_ARG_ENABLE([libtool-lock], 12973e72ca8cSmrg [AS_HELP_STRING([--disable-libtool-lock], 12983e72ca8cSmrg [avoid locking (might break parallel builds)])]) 1299fe24f8a2Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1300ee3138f1Smrg 13013e72ca8cSmrg# Some flags need to be propagated to the compiler or linker for good 13023e72ca8cSmrg# libtool support. 13033e72ca8cSmrgcase $host in 13043e72ca8cSmrgia64-*-hpux*) 1305fe24f8a2Smrg # Find out what ABI is being produced by ac_compile, and set mode 1306fe24f8a2Smrg # options accordingly. 13073e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 13083e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 13093e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 13103e72ca8cSmrg *ELF-32*) 1311fe24f8a2Smrg HPUX_IA64_MODE=32 13123e72ca8cSmrg ;; 13133e72ca8cSmrg *ELF-64*) 1314fe24f8a2Smrg HPUX_IA64_MODE=64 13153e72ca8cSmrg ;; 1316b425557eSmrg esac 1317a1ed278cSmrg fi 13183e72ca8cSmrg rm -rf conftest* 13193e72ca8cSmrg ;; 13203e72ca8cSmrg*-*-irix6*) 1321fe24f8a2Smrg # Find out what ABI is being produced by ac_compile, and set linker 1322fe24f8a2Smrg # options accordingly. 13233e72ca8cSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 13243e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 1325fe24f8a2Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 13263e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 13273e72ca8cSmrg *32-bit*) 13283e72ca8cSmrg LD="${LD-ld} -melf32bsmip" 13293e72ca8cSmrg ;; 13303e72ca8cSmrg *N32*) 13313e72ca8cSmrg LD="${LD-ld} -melf32bmipn32" 13323e72ca8cSmrg ;; 13333e72ca8cSmrg *64-bit*) 13343e72ca8cSmrg LD="${LD-ld} -melf64bmip" 13353e72ca8cSmrg ;; 13363e72ca8cSmrg esac 13373e72ca8cSmrg else 13383e72ca8cSmrg case `/usr/bin/file conftest.$ac_objext` in 13393e72ca8cSmrg *32-bit*) 13403e72ca8cSmrg LD="${LD-ld} -32" 13413e72ca8cSmrg ;; 13423e72ca8cSmrg *N32*) 13433e72ca8cSmrg LD="${LD-ld} -n32" 13443e72ca8cSmrg ;; 13453e72ca8cSmrg *64-bit*) 13463e72ca8cSmrg LD="${LD-ld} -64" 13473e72ca8cSmrg ;; 13483e72ca8cSmrg esac 13493e72ca8cSmrg fi 13503e72ca8cSmrg fi 13513e72ca8cSmrg rm -rf conftest* 1352a1ed278cSmrg ;; 1353ee3138f1Smrg 1354fe24f8a2Smrgmips64*-*linux*) 1355fe24f8a2Smrg # Find out what ABI is being produced by ac_compile, and set linker 1356fe24f8a2Smrg # options accordingly. 1357fe24f8a2Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1358fe24f8a2Smrg if AC_TRY_EVAL(ac_compile); then 1359fe24f8a2Smrg emul=elf 1360fe24f8a2Smrg case `/usr/bin/file conftest.$ac_objext` in 1361fe24f8a2Smrg *32-bit*) 1362fe24f8a2Smrg emul="${emul}32" 1363fe24f8a2Smrg ;; 1364fe24f8a2Smrg *64-bit*) 1365fe24f8a2Smrg emul="${emul}64" 1366fe24f8a2Smrg ;; 1367fe24f8a2Smrg esac 1368fe24f8a2Smrg case `/usr/bin/file conftest.$ac_objext` in 1369fe24f8a2Smrg *MSB*) 1370fe24f8a2Smrg emul="${emul}btsmip" 1371fe24f8a2Smrg ;; 1372fe24f8a2Smrg *LSB*) 1373fe24f8a2Smrg emul="${emul}ltsmip" 1374fe24f8a2Smrg ;; 1375fe24f8a2Smrg esac 1376fe24f8a2Smrg case `/usr/bin/file conftest.$ac_objext` in 1377fe24f8a2Smrg *N32*) 1378fe24f8a2Smrg emul="${emul}n32" 1379fe24f8a2Smrg ;; 1380fe24f8a2Smrg esac 1381fe24f8a2Smrg LD="${LD-ld} -m $emul" 1382fe24f8a2Smrg fi 1383fe24f8a2Smrg rm -rf conftest* 1384fe24f8a2Smrg ;; 1385fe24f8a2Smrg 1386414bd68fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 13873e72ca8cSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1388fe24f8a2Smrg # Find out what ABI is being produced by ac_compile, and set linker 1389fe24f8a2Smrg # options accordingly. Note that the listed cases only cover the 1390fe24f8a2Smrg # situations where additional linker options are needed (such as when 1391fe24f8a2Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1392fe24f8a2Smrg # vice versa); the common cases where no linker options are needed do 1393fe24f8a2Smrg # not appear in the list. 13943e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 13953e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 13963e72ca8cSmrg case `/usr/bin/file conftest.o` in 13973e72ca8cSmrg *32-bit*) 13983e72ca8cSmrg case $host in 13993e72ca8cSmrg x86_64-*kfreebsd*-gnu) 14003e72ca8cSmrg LD="${LD-ld} -m elf_i386_fbsd" 14013e72ca8cSmrg ;; 14023e72ca8cSmrg x86_64-*linux*) 1403fe24f8a2Smrg case `/usr/bin/file conftest.o` in 1404fe24f8a2Smrg *x86-64*) 1405fe24f8a2Smrg LD="${LD-ld} -m elf32_x86_64" 1406fe24f8a2Smrg ;; 1407fe24f8a2Smrg *) 1408fe24f8a2Smrg LD="${LD-ld} -m elf_i386" 1409fe24f8a2Smrg ;; 1410fe24f8a2Smrg esac 14113e72ca8cSmrg ;; 1412414bd68fSmrg powerpc64le-*linux*) 1413414bd68fSmrg LD="${LD-ld} -m elf32lppclinux" 1414414bd68fSmrg ;; 1415414bd68fSmrg powerpc64-*linux*) 14163e72ca8cSmrg LD="${LD-ld} -m elf32ppclinux" 14173e72ca8cSmrg ;; 14183e72ca8cSmrg s390x-*linux*) 14193e72ca8cSmrg LD="${LD-ld} -m elf_s390" 14203e72ca8cSmrg ;; 14213e72ca8cSmrg sparc64-*linux*) 14223e72ca8cSmrg LD="${LD-ld} -m elf32_sparc" 14233e72ca8cSmrg ;; 14243e72ca8cSmrg esac 14253e72ca8cSmrg ;; 14263e72ca8cSmrg *64-bit*) 14273e72ca8cSmrg case $host in 14283e72ca8cSmrg x86_64-*kfreebsd*-gnu) 14293e72ca8cSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 14303e72ca8cSmrg ;; 14313e72ca8cSmrg x86_64-*linux*) 14323e72ca8cSmrg LD="${LD-ld} -m elf_x86_64" 14333e72ca8cSmrg ;; 1434414bd68fSmrg powerpcle-*linux*) 1435414bd68fSmrg LD="${LD-ld} -m elf64lppc" 1436414bd68fSmrg ;; 1437414bd68fSmrg powerpc-*linux*) 14383e72ca8cSmrg LD="${LD-ld} -m elf64ppc" 14393e72ca8cSmrg ;; 14403e72ca8cSmrg s390*-*linux*|s390*-*tpf*) 14413e72ca8cSmrg LD="${LD-ld} -m elf64_s390" 14423e72ca8cSmrg ;; 14433e72ca8cSmrg sparc*-*linux*) 14443e72ca8cSmrg LD="${LD-ld} -m elf64_sparc" 14453e72ca8cSmrg ;; 14463e72ca8cSmrg esac 14473e72ca8cSmrg ;; 14483e72ca8cSmrg esac 14493e72ca8cSmrg fi 14503e72ca8cSmrg rm -rf conftest* 1451a1ed278cSmrg ;; 1452ee3138f1Smrg 14533e72ca8cSmrg*-*-sco3.2v5*) 14543e72ca8cSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1455fe24f8a2Smrg SAVE_CFLAGS=$CFLAGS 14563e72ca8cSmrg CFLAGS="$CFLAGS -belf" 14573e72ca8cSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 14583e72ca8cSmrg [AC_LANG_PUSH(C) 14593e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 14603e72ca8cSmrg AC_LANG_POP]) 1461fe24f8a2Smrg if test yes != "$lt_cv_cc_needs_belf"; then 14623e72ca8cSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1463fe24f8a2Smrg CFLAGS=$SAVE_CFLAGS 14643e72ca8cSmrg fi 14653e72ca8cSmrg ;; 14663e72ca8cSmrg*-*solaris*) 1467fe24f8a2Smrg # Find out what ABI is being produced by ac_compile, and set linker 1468fe24f8a2Smrg # options accordingly. 14693e72ca8cSmrg echo 'int i;' > conftest.$ac_ext 14703e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 14713e72ca8cSmrg case `/usr/bin/file conftest.o` in 14723e72ca8cSmrg *64-bit*) 14733e72ca8cSmrg case $lt_cv_prog_gnu_ld in 14743e72ca8cSmrg yes*) 14753e72ca8cSmrg case $host in 1476fe24f8a2Smrg i?86-*-solaris*|x86_64-*-solaris*) 14773e72ca8cSmrg LD="${LD-ld} -m elf_x86_64" 14783e72ca8cSmrg ;; 14793e72ca8cSmrg sparc*-*-solaris*) 14803e72ca8cSmrg LD="${LD-ld} -m elf64_sparc" 14813e72ca8cSmrg ;; 14823e72ca8cSmrg esac 14833e72ca8cSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 14843e72ca8cSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1485fe24f8a2Smrg LD=${LD-ld}_sol2 14863e72ca8cSmrg fi 14873e72ca8cSmrg ;; 14883e72ca8cSmrg *) 14893e72ca8cSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14903e72ca8cSmrg LD="${LD-ld} -64" 14913e72ca8cSmrg fi 14923e72ca8cSmrg ;; 14933e72ca8cSmrg esac 14943e72ca8cSmrg ;; 14953e72ca8cSmrg esac 14963e72ca8cSmrg fi 14973e72ca8cSmrg rm -rf conftest* 1498a1ed278cSmrg ;; 14993e72ca8cSmrgesac 1500ee3138f1Smrg 1501fe24f8a2Smrgneed_locks=$enable_libtool_lock 15023e72ca8cSmrg])# _LT_ENABLE_LOCK 1503ee3138f1Smrg 1504ee3138f1Smrg 15053e72ca8cSmrg# _LT_PROG_AR 15063e72ca8cSmrg# ----------- 15073e72ca8cSmrgm4_defun([_LT_PROG_AR], 15083e72ca8cSmrg[AC_CHECK_TOOLS(AR, [ar], false) 15093e72ca8cSmrg: ${AR=ar} 15103e72ca8cSmrg: ${AR_FLAGS=cru} 15113e72ca8cSmrg_LT_DECL([], [AR], [1], [The archiver]) 15123e72ca8cSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 15133e72ca8cSmrg 15143e72ca8cSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 15153e72ca8cSmrg [lt_cv_ar_at_file=no 15163e72ca8cSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 15173e72ca8cSmrg [echo conftest.$ac_objext > conftest.lst 15183e72ca8cSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 15193e72ca8cSmrg AC_TRY_EVAL([lt_ar_try]) 1520fe24f8a2Smrg if test 0 -eq "$ac_status"; then 15213e72ca8cSmrg # Ensure the archiver fails upon bogus file names. 15223e72ca8cSmrg rm -f conftest.$ac_objext libconftest.a 15233e72ca8cSmrg AC_TRY_EVAL([lt_ar_try]) 1524fe24f8a2Smrg if test 0 -ne "$ac_status"; then 15253e72ca8cSmrg lt_cv_ar_at_file=@ 15263e72ca8cSmrg fi 15273e72ca8cSmrg fi 15283e72ca8cSmrg rm -f conftest.* libconftest.a 15293e72ca8cSmrg ]) 15303e72ca8cSmrg ]) 15313e72ca8cSmrg 1532fe24f8a2Smrgif test no = "$lt_cv_ar_at_file"; then 15333e72ca8cSmrg archiver_list_spec= 15343e72ca8cSmrgelse 15353e72ca8cSmrg archiver_list_spec=$lt_cv_ar_at_file 15363e72ca8cSmrgfi 15373e72ca8cSmrg_LT_DECL([], [archiver_list_spec], [1], 15383e72ca8cSmrg [How to feed a file listing to the archiver]) 15393e72ca8cSmrg])# _LT_PROG_AR 15403e72ca8cSmrg 15413e72ca8cSmrg 15423e72ca8cSmrg# _LT_CMD_OLD_ARCHIVE 15433e72ca8cSmrg# ------------------- 15443e72ca8cSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 15453e72ca8cSmrg[_LT_PROG_AR 15463e72ca8cSmrg 15473e72ca8cSmrgAC_CHECK_TOOL(STRIP, strip, :) 15483e72ca8cSmrgtest -z "$STRIP" && STRIP=: 15493e72ca8cSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 15503e72ca8cSmrg 15513e72ca8cSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 15523e72ca8cSmrgtest -z "$RANLIB" && RANLIB=: 15533e72ca8cSmrg_LT_DECL([], [RANLIB], [1], 15543e72ca8cSmrg [Commands used to install an old-style archive]) 15553e72ca8cSmrg 15563e72ca8cSmrg# Determine commands to create old-style static archives. 15573e72ca8cSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 15583e72ca8cSmrgold_postinstall_cmds='chmod 644 $oldlib' 15593e72ca8cSmrgold_postuninstall_cmds= 15603e72ca8cSmrg 15613e72ca8cSmrgif test -n "$RANLIB"; then 1562a1ed278cSmrg case $host_os in 1563fe24f8a2Smrg bitrig* | openbsd*) 15643e72ca8cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1565a1ed278cSmrg ;; 1566a1ed278cSmrg *) 15673e72ca8cSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1568a1ed278cSmrg ;; 1569a1ed278cSmrg esac 15703e72ca8cSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 15713e72ca8cSmrgfi 1572ee3138f1Smrg 15733e72ca8cSmrgcase $host_os in 15743e72ca8cSmrg darwin*) 15753e72ca8cSmrg lock_old_archive_extraction=yes ;; 15763e72ca8cSmrg *) 15773e72ca8cSmrg lock_old_archive_extraction=no ;; 15783e72ca8cSmrgesac 15793e72ca8cSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 15803e72ca8cSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 15813e72ca8cSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 15823e72ca8cSmrg [Commands used to build an old-style archive]) 15833e72ca8cSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 15843e72ca8cSmrg [Whether to use a lock for old archive extraction]) 15853e72ca8cSmrg])# _LT_CMD_OLD_ARCHIVE 1586ee3138f1Smrg 158734977a2fSmrg 15883e72ca8cSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15893e72ca8cSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15903e72ca8cSmrg# ---------------------------------------------------------------- 15913e72ca8cSmrg# Check whether the given compiler option works 15923e72ca8cSmrgAC_DEFUN([_LT_COMPILER_OPTION], 15933e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 15943e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 15953e72ca8cSmrgAC_CACHE_CHECK([$1], [$2], 15963e72ca8cSmrg [$2=no 15973e72ca8cSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15983e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1599fe24f8a2Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 16003e72ca8cSmrg # Insert the option either (1) after the last *FLAGS variable, or 16013e72ca8cSmrg # (2) before a word containing "conftest.", or (3) at the end. 16023e72ca8cSmrg # Note that $ac_compile itself does not contain backslashes and begins 16033e72ca8cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 16043e72ca8cSmrg # The option is referenced via a variable to avoid confusing sed. 16053e72ca8cSmrg lt_compile=`echo "$ac_compile" | $SED \ 16063e72ca8cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 16073e72ca8cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 16083e72ca8cSmrg -e 's:$: $lt_compiler_flag:'` 16093e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 16103e72ca8cSmrg (eval "$lt_compile" 2>conftest.err) 16113e72ca8cSmrg ac_status=$? 16123e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 16133e72ca8cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 16143e72ca8cSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 16153e72ca8cSmrg # The compiler can only warn and ignore the option if not recognized 16163e72ca8cSmrg # So say no if there are warnings other than the usual output. 16173e72ca8cSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 16183e72ca8cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16193e72ca8cSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 16203e72ca8cSmrg $2=yes 16213e72ca8cSmrg fi 16223e72ca8cSmrg fi 16233e72ca8cSmrg $RM conftest* 16243e72ca8cSmrg]) 1625ee3138f1Smrg 1626fe24f8a2Smrgif test yes = "[$]$2"; then 16273e72ca8cSmrg m4_if([$5], , :, [$5]) 16283e72ca8cSmrgelse 16293e72ca8cSmrg m4_if([$6], , :, [$6]) 16303e72ca8cSmrgfi 16313e72ca8cSmrg])# _LT_COMPILER_OPTION 1632ee3138f1Smrg 16333e72ca8cSmrg# Old name: 16343e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 16353e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 16363e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1637b425557eSmrg 1638ee3138f1Smrg 16393e72ca8cSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 16403e72ca8cSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 16413e72ca8cSmrg# ---------------------------------------------------- 16423e72ca8cSmrg# Check whether the given linker option works 16433e72ca8cSmrgAC_DEFUN([_LT_LINKER_OPTION], 16443e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 16453e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 16463e72ca8cSmrgAC_CACHE_CHECK([$1], [$2], 16473e72ca8cSmrg [$2=no 1648fe24f8a2Smrg save_LDFLAGS=$LDFLAGS 16493e72ca8cSmrg LDFLAGS="$LDFLAGS $3" 16503e72ca8cSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 16513e72ca8cSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 16523e72ca8cSmrg # The linker can only warn and ignore the option if not recognized 16533e72ca8cSmrg # So say no if there are warnings 16543e72ca8cSmrg if test -s conftest.err; then 16553e72ca8cSmrg # Append any errors to the config.log. 16563e72ca8cSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 16573e72ca8cSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 16583e72ca8cSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 16593e72ca8cSmrg if diff conftest.exp conftest.er2 >/dev/null; then 16603e72ca8cSmrg $2=yes 16613e72ca8cSmrg fi 16623e72ca8cSmrg else 16633e72ca8cSmrg $2=yes 16643e72ca8cSmrg fi 16653e72ca8cSmrg fi 16663e72ca8cSmrg $RM -r conftest* 1667fe24f8a2Smrg LDFLAGS=$save_LDFLAGS 16683e72ca8cSmrg]) 166934977a2fSmrg 1670fe24f8a2Smrgif test yes = "[$]$2"; then 16713e72ca8cSmrg m4_if([$4], , :, [$4]) 16723e72ca8cSmrgelse 16733e72ca8cSmrg m4_if([$5], , :, [$5]) 16743e72ca8cSmrgfi 16753e72ca8cSmrg])# _LT_LINKER_OPTION 1676b425557eSmrg 16773e72ca8cSmrg# Old name: 16783e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 16793e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 16803e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 168134977a2fSmrg 168234977a2fSmrg 16833e72ca8cSmrg# LT_CMD_MAX_LEN 16843e72ca8cSmrg#--------------- 16853e72ca8cSmrgAC_DEFUN([LT_CMD_MAX_LEN], 16863e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 16873e72ca8cSmrg# find the maximum length of command line arguments 16883e72ca8cSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 16893e72ca8cSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16903e72ca8cSmrg i=0 1691fe24f8a2Smrg teststring=ABCD 1692ee3138f1Smrg 16933e72ca8cSmrg case $build_os in 16943e72ca8cSmrg msdosdjgpp*) 16953e72ca8cSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 16963e72ca8cSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 16973e72ca8cSmrg # during glob expansion). Even if it were fixed, the result of this 16983e72ca8cSmrg # check would be larger than it should be. 16993e72ca8cSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 17003e72ca8cSmrg ;; 1701ee3138f1Smrg 17023e72ca8cSmrg gnu*) 17033e72ca8cSmrg # Under GNU Hurd, this test is not required because there is 17043e72ca8cSmrg # no limit to the length of command line arguments. 17053e72ca8cSmrg # Libtool will interpret -1 as no limit whatsoever 17063e72ca8cSmrg lt_cv_sys_max_cmd_len=-1; 17073e72ca8cSmrg ;; 1708ee3138f1Smrg 17093e72ca8cSmrg cygwin* | mingw* | cegcc*) 17103e72ca8cSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 17113e72ca8cSmrg # about 5 minutes as the teststring grows exponentially. 17123e72ca8cSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 17133e72ca8cSmrg # you end up with a "frozen" computer, even though with patience 17143e72ca8cSmrg # the test eventually succeeds (with a max line length of 256k). 17153e72ca8cSmrg # Instead, let's just punt: use the minimum linelength reported by 17163e72ca8cSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 17173e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 17183e72ca8cSmrg ;; 1719ee3138f1Smrg 17203e72ca8cSmrg mint*) 17213e72ca8cSmrg # On MiNT this can take a long time and run out of memory. 17223e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 17233e72ca8cSmrg ;; 1724ee3138f1Smrg 17253e72ca8cSmrg amigaos*) 17263e72ca8cSmrg # On AmigaOS with pdksh, this test takes hours, literally. 17273e72ca8cSmrg # So we just punt and use a minimum line length of 8192. 17283e72ca8cSmrg lt_cv_sys_max_cmd_len=8192; 17293e72ca8cSmrg ;; 1730ee3138f1Smrg 1731fe24f8a2Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 17323e72ca8cSmrg # This has been around since 386BSD, at least. Likely further. 17333e72ca8cSmrg if test -x /sbin/sysctl; then 17343e72ca8cSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 17353e72ca8cSmrg elif test -x /usr/sbin/sysctl; then 17363e72ca8cSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 17373e72ca8cSmrg else 17383e72ca8cSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 17393e72ca8cSmrg fi 17403e72ca8cSmrg # And add a safety zone 17413e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17423e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17433e72ca8cSmrg ;; 1744b425557eSmrg 17453e72ca8cSmrg interix*) 17463e72ca8cSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 17473e72ca8cSmrg lt_cv_sys_max_cmd_len=196608 17483e72ca8cSmrg ;; 17493e72ca8cSmrg 17503e72ca8cSmrg os2*) 17513e72ca8cSmrg # The test takes a long time on OS/2. 17523e72ca8cSmrg lt_cv_sys_max_cmd_len=8192 17533e72ca8cSmrg ;; 17543e72ca8cSmrg 17553e72ca8cSmrg osf*) 17563e72ca8cSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 17573e72ca8cSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 17583e72ca8cSmrg # nice to cause kernel panics so lets avoid the loop below. 17593e72ca8cSmrg # First set a reasonable default. 17603e72ca8cSmrg lt_cv_sys_max_cmd_len=16384 17613e72ca8cSmrg # 17623e72ca8cSmrg if test -x /sbin/sysconfig; then 17633e72ca8cSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 17643e72ca8cSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 17653e72ca8cSmrg esac 17663e72ca8cSmrg fi 17673e72ca8cSmrg ;; 17683e72ca8cSmrg sco3.2v5*) 17693e72ca8cSmrg lt_cv_sys_max_cmd_len=102400 17703e72ca8cSmrg ;; 17713e72ca8cSmrg sysv5* | sco5v6* | sysv4.2uw2*) 17723e72ca8cSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 17733e72ca8cSmrg if test -n "$kargmax"; then 17743e72ca8cSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 17753e72ca8cSmrg else 17763e72ca8cSmrg lt_cv_sys_max_cmd_len=32768 17773e72ca8cSmrg fi 17783e72ca8cSmrg ;; 17793e72ca8cSmrg *) 17803e72ca8cSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1781fe24f8a2Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1782fe24f8a2Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17833e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17843e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17853e72ca8cSmrg else 17863e72ca8cSmrg # Make teststring a little bigger before we do anything with it. 17873e72ca8cSmrg # a 1K string should be a reasonable start. 1788fe24f8a2Smrg for i in 1 2 3 4 5 6 7 8; do 17893e72ca8cSmrg teststring=$teststring$teststring 17903e72ca8cSmrg done 17913e72ca8cSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 17923e72ca8cSmrg # If test is not a shell built-in, we'll probably end up computing a 17933e72ca8cSmrg # maximum length that is only half of the actual maximum length, but 17943e72ca8cSmrg # we can't tell. 1795fe24f8a2Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 17963e72ca8cSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1797fe24f8a2Smrg test 17 != "$i" # 1/2 MB should be enough 17983e72ca8cSmrg do 17993e72ca8cSmrg i=`expr $i + 1` 18003e72ca8cSmrg teststring=$teststring$teststring 18013e72ca8cSmrg done 18023e72ca8cSmrg # Only check the string length outside the loop. 18033e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18043e72ca8cSmrg teststring= 18053e72ca8cSmrg # Add a significant safety factor because C++ compilers can tack on 18063e72ca8cSmrg # massive amounts of additional arguments before passing them to the 18073e72ca8cSmrg # linker. It appears as though 1/2 is a usable value. 18083e72ca8cSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18093e72ca8cSmrg fi 18103e72ca8cSmrg ;; 1811b425557eSmrg esac 18123e72ca8cSmrg]) 1813fe24f8a2Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 18143e72ca8cSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 18153e72ca8cSmrgelse 18163e72ca8cSmrg AC_MSG_RESULT(none) 18173e72ca8cSmrgfi 18183e72ca8cSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 18193e72ca8cSmrg_LT_DECL([], [max_cmd_len], [0], 18203e72ca8cSmrg [What is the maximum length of a command?]) 18213e72ca8cSmrg])# LT_CMD_MAX_LEN 1822ee3138f1Smrg 18233e72ca8cSmrg# Old name: 18243e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 18253e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 18263e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827ee3138f1Smrg 1828ee3138f1Smrg 18293e72ca8cSmrg# _LT_HEADER_DLFCN 18303e72ca8cSmrg# ---------------- 18313e72ca8cSmrgm4_defun([_LT_HEADER_DLFCN], 18323e72ca8cSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 18333e72ca8cSmrg])# _LT_HEADER_DLFCN 1834ee3138f1Smrg 1835ee3138f1Smrg 18363e72ca8cSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 18373e72ca8cSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 18383e72ca8cSmrg# ---------------------------------------------------------------- 18393e72ca8cSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 18403e72ca8cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1841fe24f8a2Smrgif test yes = "$cross_compiling"; then : 18423e72ca8cSmrg [$4] 18433e72ca8cSmrgelse 18443e72ca8cSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 18453e72ca8cSmrg lt_status=$lt_dlunknown 18463e72ca8cSmrg cat > conftest.$ac_ext <<_LT_EOF 18473e72ca8cSmrg[#line $LINENO "configure" 18483e72ca8cSmrg#include "confdefs.h" 1849ee3138f1Smrg 18503e72ca8cSmrg#if HAVE_DLFCN_H 18513e72ca8cSmrg#include <dlfcn.h> 18523e72ca8cSmrg#endif 1853ee3138f1Smrg 18543e72ca8cSmrg#include <stdio.h> 1855ee3138f1Smrg 18563e72ca8cSmrg#ifdef RTLD_GLOBAL 18573e72ca8cSmrg# define LT_DLGLOBAL RTLD_GLOBAL 18583e72ca8cSmrg#else 18593e72ca8cSmrg# ifdef DL_GLOBAL 18603e72ca8cSmrg# define LT_DLGLOBAL DL_GLOBAL 18613e72ca8cSmrg# else 18623e72ca8cSmrg# define LT_DLGLOBAL 0 18633e72ca8cSmrg# endif 18643e72ca8cSmrg#endif 1865ee3138f1Smrg 18663e72ca8cSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 18673e72ca8cSmrg find out it does not work in some platform. */ 18683e72ca8cSmrg#ifndef LT_DLLAZY_OR_NOW 18693e72ca8cSmrg# ifdef RTLD_LAZY 18703e72ca8cSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 18713e72ca8cSmrg# else 18723e72ca8cSmrg# ifdef DL_LAZY 18733e72ca8cSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 18743e72ca8cSmrg# else 18753e72ca8cSmrg# ifdef RTLD_NOW 18763e72ca8cSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 18773e72ca8cSmrg# else 18783e72ca8cSmrg# ifdef DL_NOW 18793e72ca8cSmrg# define LT_DLLAZY_OR_NOW DL_NOW 18803e72ca8cSmrg# else 18813e72ca8cSmrg# define LT_DLLAZY_OR_NOW 0 18823e72ca8cSmrg# endif 18833e72ca8cSmrg# endif 18843e72ca8cSmrg# endif 18853e72ca8cSmrg# endif 18863e72ca8cSmrg#endif 1887ee3138f1Smrg 1888fe24f8a2Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 18893e72ca8cSmrg correspondingly for the symbols needed. */ 1890fe24f8a2Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 18913e72ca8cSmrgint fnord () __attribute__((visibility("default"))); 18923e72ca8cSmrg#endif 1893b425557eSmrg 18943e72ca8cSmrgint fnord () { return 42; } 18953e72ca8cSmrgint main () 18963e72ca8cSmrg{ 18973e72ca8cSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18983e72ca8cSmrg int status = $lt_dlunknown; 1899b425557eSmrg 19003e72ca8cSmrg if (self) 19013e72ca8cSmrg { 19023e72ca8cSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 19033e72ca8cSmrg else 19043e72ca8cSmrg { 19053e72ca8cSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 19063e72ca8cSmrg else puts (dlerror ()); 19073e72ca8cSmrg } 19083e72ca8cSmrg /* dlclose (self); */ 19093e72ca8cSmrg } 1910a1ed278cSmrg else 19113e72ca8cSmrg puts (dlerror ()); 19123e72ca8cSmrg 19133e72ca8cSmrg return status; 19143e72ca8cSmrg}] 19153e72ca8cSmrg_LT_EOF 1916fe24f8a2Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 19173e72ca8cSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 19183e72ca8cSmrg lt_status=$? 19193e72ca8cSmrg case x$lt_status in 19203e72ca8cSmrg x$lt_dlno_uscore) $1 ;; 19213e72ca8cSmrg x$lt_dlneed_uscore) $2 ;; 19223e72ca8cSmrg x$lt_dlunknown|x*) $3 ;; 19233e72ca8cSmrg esac 19243e72ca8cSmrg else : 19253e72ca8cSmrg # compilation failed 19263e72ca8cSmrg $3 1927a1ed278cSmrg fi 1928a1ed278cSmrgfi 19293e72ca8cSmrgrm -fr conftest* 19303e72ca8cSmrg])# _LT_TRY_DLOPEN_SELF 1931b425557eSmrg 1932b425557eSmrg 19333e72ca8cSmrg# LT_SYS_DLOPEN_SELF 19343e72ca8cSmrg# ------------------ 19353e72ca8cSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 19363e72ca8cSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1937fe24f8a2Smrgif test yes != "$enable_dlopen"; then 19383e72ca8cSmrg enable_dlopen=unknown 19393e72ca8cSmrg enable_dlopen_self=unknown 19403e72ca8cSmrg enable_dlopen_self_static=unknown 19413e72ca8cSmrgelse 19423e72ca8cSmrg lt_cv_dlopen=no 19433e72ca8cSmrg lt_cv_dlopen_libs= 1944b425557eSmrg 19453e72ca8cSmrg case $host_os in 19463e72ca8cSmrg beos*) 1947fe24f8a2Smrg lt_cv_dlopen=load_add_on 19483e72ca8cSmrg lt_cv_dlopen_libs= 19493e72ca8cSmrg lt_cv_dlopen_self=yes 19503e72ca8cSmrg ;; 1951b425557eSmrg 19523e72ca8cSmrg mingw* | pw32* | cegcc*) 1953fe24f8a2Smrg lt_cv_dlopen=LoadLibrary 19543e72ca8cSmrg lt_cv_dlopen_libs= 19553e72ca8cSmrg ;; 19563e72ca8cSmrg 19573e72ca8cSmrg cygwin*) 1958fe24f8a2Smrg lt_cv_dlopen=dlopen 19593e72ca8cSmrg lt_cv_dlopen_libs= 19603e72ca8cSmrg ;; 19613e72ca8cSmrg 19623e72ca8cSmrg darwin*) 1963fe24f8a2Smrg # if libdl is installed we need to link against it 19643e72ca8cSmrg AC_CHECK_LIB([dl], [dlopen], 1965fe24f8a2Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1966fe24f8a2Smrg lt_cv_dlopen=dyld 19673e72ca8cSmrg lt_cv_dlopen_libs= 19683e72ca8cSmrg lt_cv_dlopen_self=yes 19693e72ca8cSmrg ]) 1970a1ed278cSmrg ;; 19713e72ca8cSmrg 1972fe24f8a2Smrg tpf*) 1973fe24f8a2Smrg # Don't try to run any link tests for TPF. We know it's impossible 1974fe24f8a2Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 1975fe24f8a2Smrg lt_cv_dlopen=dlopen 1976fe24f8a2Smrg lt_cv_dlopen_libs= 1977fe24f8a2Smrg lt_cv_dlopen_self=no 1978fe24f8a2Smrg ;; 1979fe24f8a2Smrg 1980a1ed278cSmrg *) 19813e72ca8cSmrg AC_CHECK_FUNC([shl_load], 1982fe24f8a2Smrg [lt_cv_dlopen=shl_load], 19833e72ca8cSmrg [AC_CHECK_LIB([dld], [shl_load], 1984fe24f8a2Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 19853e72ca8cSmrg [AC_CHECK_FUNC([dlopen], 1986fe24f8a2Smrg [lt_cv_dlopen=dlopen], 19873e72ca8cSmrg [AC_CHECK_LIB([dl], [dlopen], 1988fe24f8a2Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 19893e72ca8cSmrg [AC_CHECK_LIB([svld], [dlopen], 1990fe24f8a2Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 19913e72ca8cSmrg [AC_CHECK_LIB([dld], [dld_link], 1992fe24f8a2Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 19933e72ca8cSmrg ]) 19943e72ca8cSmrg ]) 19953e72ca8cSmrg ]) 19963e72ca8cSmrg ]) 19973e72ca8cSmrg ]) 1998b425557eSmrg ;; 1999b425557eSmrg esac 2000ee3138f1Smrg 2001fe24f8a2Smrg if test no = "$lt_cv_dlopen"; then 20023e72ca8cSmrg enable_dlopen=no 2003fe24f8a2Smrg else 2004fe24f8a2Smrg enable_dlopen=yes 20053e72ca8cSmrg fi 2006ee3138f1Smrg 20073e72ca8cSmrg case $lt_cv_dlopen in 20083e72ca8cSmrg dlopen) 2009fe24f8a2Smrg save_CPPFLAGS=$CPPFLAGS 2010fe24f8a2Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011ee3138f1Smrg 2012fe24f8a2Smrg save_LDFLAGS=$LDFLAGS 20133e72ca8cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014ee3138f1Smrg 2015fe24f8a2Smrg save_LIBS=$LIBS 20163e72ca8cSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2017ee3138f1Smrg 20183e72ca8cSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 20193e72ca8cSmrg lt_cv_dlopen_self, [dnl 20203e72ca8cSmrg _LT_TRY_DLOPEN_SELF( 20213e72ca8cSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 20223e72ca8cSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 20233e72ca8cSmrg ]) 2024b425557eSmrg 2025fe24f8a2Smrg if test yes = "$lt_cv_dlopen_self"; then 20263e72ca8cSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 20273e72ca8cSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 20283e72ca8cSmrg lt_cv_dlopen_self_static, [dnl 20293e72ca8cSmrg _LT_TRY_DLOPEN_SELF( 20303e72ca8cSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 20313e72ca8cSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 20323e72ca8cSmrg ]) 2033a1ed278cSmrg fi 20343e72ca8cSmrg 2035fe24f8a2Smrg CPPFLAGS=$save_CPPFLAGS 2036fe24f8a2Smrg LDFLAGS=$save_LDFLAGS 2037fe24f8a2Smrg LIBS=$save_LIBS 2038a1ed278cSmrg ;; 20393e72ca8cSmrg esac 2040b425557eSmrg 20413e72ca8cSmrg case $lt_cv_dlopen_self in 20423e72ca8cSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 20433e72ca8cSmrg *) enable_dlopen_self=unknown ;; 20443e72ca8cSmrg esac 2045b425557eSmrg 20463e72ca8cSmrg case $lt_cv_dlopen_self_static in 20473e72ca8cSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 20483e72ca8cSmrg *) enable_dlopen_self_static=unknown ;; 20493e72ca8cSmrg esac 20503e72ca8cSmrgfi 20513e72ca8cSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 20523e72ca8cSmrg [Whether dlopen is supported]) 20533e72ca8cSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 20543e72ca8cSmrg [Whether dlopen of programs is supported]) 20553e72ca8cSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 20563e72ca8cSmrg [Whether dlopen of statically linked programs is supported]) 20573e72ca8cSmrg])# LT_SYS_DLOPEN_SELF 2058b425557eSmrg 20593e72ca8cSmrg# Old name: 20603e72ca8cSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 20613e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 20623e72ca8cSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063b425557eSmrg 2064b425557eSmrg 20653e72ca8cSmrg# _LT_COMPILER_C_O([TAGNAME]) 20663e72ca8cSmrg# --------------------------- 20673e72ca8cSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 20683e72ca8cSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 20693e72ca8cSmrgm4_defun([_LT_COMPILER_C_O], 20703e72ca8cSmrg[m4_require([_LT_DECL_SED])dnl 20713e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 20723e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 20733e72ca8cSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 20743e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 20753e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 20763e72ca8cSmrg $RM -r conftest 2>/dev/null 20773e72ca8cSmrg mkdir conftest 20783e72ca8cSmrg cd conftest 20793e72ca8cSmrg mkdir out 20803e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081a1ed278cSmrg 20823e72ca8cSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 20833e72ca8cSmrg # Insert the option either (1) after the last *FLAGS variable, or 20843e72ca8cSmrg # (2) before a word containing "conftest.", or (3) at the end. 20853e72ca8cSmrg # Note that $ac_compile itself does not contain backslashes and begins 20863e72ca8cSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 20873e72ca8cSmrg lt_compile=`echo "$ac_compile" | $SED \ 20883e72ca8cSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20893e72ca8cSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20903e72ca8cSmrg -e 's:$: $lt_compiler_flag:'` 20913e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20923e72ca8cSmrg (eval "$lt_compile" 2>out/conftest.err) 20933e72ca8cSmrg ac_status=$? 20943e72ca8cSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 20953e72ca8cSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20963e72ca8cSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 20973e72ca8cSmrg then 20983e72ca8cSmrg # The compiler can only warn and ignore the option if not recognized 20993e72ca8cSmrg # So say no if there are warnings 21003e72ca8cSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 21013e72ca8cSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 21023e72ca8cSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 21033e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 21043e72ca8cSmrg fi 21053e72ca8cSmrg fi 21063e72ca8cSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 21073e72ca8cSmrg $RM conftest* 21083e72ca8cSmrg # SGI C++ compiler will create directory out/ii_files/ for 21093e72ca8cSmrg # template instantiation 21103e72ca8cSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 21113e72ca8cSmrg $RM out/* && rmdir out 21123e72ca8cSmrg cd .. 21133e72ca8cSmrg $RM -r conftest 21143e72ca8cSmrg $RM conftest* 21153e72ca8cSmrg]) 21163e72ca8cSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 21173e72ca8cSmrg [Does compiler simultaneously support -c and -o options?]) 21183e72ca8cSmrg])# _LT_COMPILER_C_O 2119a1ed278cSmrg 21203e72ca8cSmrg 21213e72ca8cSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 21223e72ca8cSmrg# ---------------------------------- 21233e72ca8cSmrg# Check to see if we can do hard links to lock some files if needed 21243e72ca8cSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 21253e72ca8cSmrg[m4_require([_LT_ENABLE_LOCK])dnl 21263e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 21273e72ca8cSmrg_LT_COMPILER_C_O([$1]) 21283e72ca8cSmrg 2129fe24f8a2Smrghard_links=nottested 2130fe24f8a2Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 21313e72ca8cSmrg # do not overwrite the value of need_locks provided by the user 21323e72ca8cSmrg AC_MSG_CHECKING([if we can lock with hard links]) 21333e72ca8cSmrg hard_links=yes 21343e72ca8cSmrg $RM conftest* 21353e72ca8cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21363e72ca8cSmrg touch conftest.a 21373e72ca8cSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 21383e72ca8cSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 21393e72ca8cSmrg AC_MSG_RESULT([$hard_links]) 2140fe24f8a2Smrg if test no = "$hard_links"; then 2141fe24f8a2Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 21423e72ca8cSmrg need_locks=warn 2143b425557eSmrg fi 21443e72ca8cSmrgelse 21453e72ca8cSmrg need_locks=no 21463e72ca8cSmrgfi 21473e72ca8cSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 21483e72ca8cSmrg])# _LT_COMPILER_FILE_LOCKS 2149b425557eSmrg 2150a1ed278cSmrg 21513e72ca8cSmrg# _LT_CHECK_OBJDIR 21523e72ca8cSmrg# ---------------- 21533e72ca8cSmrgm4_defun([_LT_CHECK_OBJDIR], 21543e72ca8cSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 21553e72ca8cSmrg[rm -f .libs 2>/dev/null 21563e72ca8cSmrgmkdir .libs 2>/dev/null 21573e72ca8cSmrgif test -d .libs; then 21583e72ca8cSmrg lt_cv_objdir=.libs 21593e72ca8cSmrgelse 21603e72ca8cSmrg # MS-DOS does not allow filenames that begin with a dot. 21613e72ca8cSmrg lt_cv_objdir=_libs 21623e72ca8cSmrgfi 21633e72ca8cSmrgrmdir .libs 2>/dev/null]) 21643e72ca8cSmrgobjdir=$lt_cv_objdir 21653e72ca8cSmrg_LT_DECL([], [objdir], [0], 21663e72ca8cSmrg [The name of the directory that contains temporary libtool files])dnl 21673e72ca8cSmrgm4_pattern_allow([LT_OBJDIR])dnl 2168fe24f8a2SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2169fe24f8a2Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 21703e72ca8cSmrg])# _LT_CHECK_OBJDIR 2171a1ed278cSmrg 21723e72ca8cSmrg 21733e72ca8cSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 21743e72ca8cSmrg# -------------------------------------- 21753e72ca8cSmrg# Check hardcoding attributes. 21763e72ca8cSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 21773e72ca8cSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 21783e72ca8cSmrg_LT_TAGVAR(hardcode_action, $1)= 21793e72ca8cSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 21803e72ca8cSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2181fe24f8a2Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 21823e72ca8cSmrg 21833e72ca8cSmrg # We can hardcode non-existent directories. 2184fe24f8a2Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 21853e72ca8cSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 21863e72ca8cSmrg # have to relink, otherwise we might link with an installed library 21873e72ca8cSmrg # when we should be linking with a yet-to-be-installed one 2188fe24f8a2Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2189fe24f8a2Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 21903e72ca8cSmrg # Linking always hardcodes the temporary library directory. 21913e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2192a1ed278cSmrg else 21933e72ca8cSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 21943e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 219534977a2fSmrg fi 21963e72ca8cSmrgelse 21973e72ca8cSmrg # We cannot hardcode anything, or else we can only hardcode existing 21983e72ca8cSmrg # directories. 21993e72ca8cSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 22003e72ca8cSmrgfi 22013e72ca8cSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 220234977a2fSmrg 2203fe24f8a2Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2204fe24f8a2Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 22053e72ca8cSmrg # Fast installation is not supported 22063e72ca8cSmrg enable_fast_install=no 2207fe24f8a2Smrgelif test yes = "$shlibpath_overrides_runpath" || 2208fe24f8a2Smrg test no = "$enable_shared"; then 22093e72ca8cSmrg # Fast installation is not necessary 22103e72ca8cSmrg enable_fast_install=needless 22113e72ca8cSmrgfi 22123e72ca8cSmrg_LT_TAGDECL([], [hardcode_action], [0], 22133e72ca8cSmrg [How to hardcode a shared library path into an executable]) 22143e72ca8cSmrg])# _LT_LINKER_HARDCODE_LIBPATH 221534977a2fSmrg 221634977a2fSmrg 22173e72ca8cSmrg# _LT_CMD_STRIPLIB 22183e72ca8cSmrg# ---------------- 22193e72ca8cSmrgm4_defun([_LT_CMD_STRIPLIB], 22203e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 22213e72ca8cSmrgstriplib= 22223e72ca8cSmrgold_striplib= 22233e72ca8cSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 22243e72ca8cSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 22253e72ca8cSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 22263e72ca8cSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 22273e72ca8cSmrg AC_MSG_RESULT([yes]) 22283e72ca8cSmrgelse 22293e72ca8cSmrg# FIXME - insert some real tests, host_os isn't really good enough 22303e72ca8cSmrg case $host_os in 22313e72ca8cSmrg darwin*) 2232fe24f8a2Smrg if test -n "$STRIP"; then 22333e72ca8cSmrg striplib="$STRIP -x" 22343e72ca8cSmrg old_striplib="$STRIP -S" 22353e72ca8cSmrg AC_MSG_RESULT([yes]) 22363e72ca8cSmrg else 22373e72ca8cSmrg AC_MSG_RESULT([no]) 22383e72ca8cSmrg fi 2239b425557eSmrg ;; 2240b425557eSmrg *) 22413e72ca8cSmrg AC_MSG_RESULT([no]) 2242b425557eSmrg ;; 2243b425557eSmrg esac 22443e72ca8cSmrgfi 22453e72ca8cSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 22463e72ca8cSmrg_LT_DECL([], [striplib], [1]) 22473e72ca8cSmrg])# _LT_CMD_STRIPLIB 224834977a2fSmrg 2249ee3138f1Smrg 2250fe24f8a2Smrg# _LT_PREPARE_MUNGE_PATH_LIST 2251fe24f8a2Smrg# --------------------------- 2252fe24f8a2Smrg# Make sure func_munge_path_list() is defined correctly. 2253fe24f8a2Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2254fe24f8a2Smrg[[# func_munge_path_list VARIABLE PATH 2255fe24f8a2Smrg# ----------------------------------- 2256fe24f8a2Smrg# VARIABLE is name of variable containing _space_ separated list of 2257fe24f8a2Smrg# directories to be munged by the contents of PATH, which is string 2258fe24f8a2Smrg# having a format: 2259fe24f8a2Smrg# "DIR[:DIR]:" 2260fe24f8a2Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 2261fe24f8a2Smrg# ":DIR[:DIR]" 2262fe24f8a2Smrg# string "DIR[ DIR]" will be appended to VARIABLE 2263fe24f8a2Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2264fe24f8a2Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2265fe24f8a2Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 2266fe24f8a2Smrg# "DIR[:DIR]" 2267fe24f8a2Smrg# VARIABLE will be replaced by "DIR[ DIR]" 2268fe24f8a2Smrgfunc_munge_path_list () 2269fe24f8a2Smrg{ 2270fe24f8a2Smrg case x@S|@2 in 2271fe24f8a2Smrg x) 2272fe24f8a2Smrg ;; 2273fe24f8a2Smrg *:) 2274fe24f8a2Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2275fe24f8a2Smrg ;; 2276fe24f8a2Smrg x:*) 2277fe24f8a2Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2278fe24f8a2Smrg ;; 2279fe24f8a2Smrg *::*) 2280fe24f8a2Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2281fe24f8a2Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2282fe24f8a2Smrg ;; 2283fe24f8a2Smrg *) 2284fe24f8a2Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2285fe24f8a2Smrg ;; 2286fe24f8a2Smrg esac 2287fe24f8a2Smrg} 2288fe24f8a2Smrg]])# _LT_PREPARE_PATH_LIST 2289fe24f8a2Smrg 2290fe24f8a2Smrg 22913e72ca8cSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 22923e72ca8cSmrg# ----------------------------- 22933e72ca8cSmrg# PORTME Fill in your ld.so characteristics 22943e72ca8cSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 22953e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 22963e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 22973e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 22983e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP])dnl 22993e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 23003e72ca8cSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2301fe24f8a2Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23023e72ca8cSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 23033e72ca8cSmrgm4_if([$1], 23043e72ca8cSmrg [], [ 2305fe24f8a2Smrgif test yes = "$GCC"; then 23063e72ca8cSmrg case $host_os in 2307fe24f8a2Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2308fe24f8a2Smrg *) lt_awk_arg='/^libraries:/' ;; 2309a1ed278cSmrg esac 23103e72ca8cSmrg case $host_os in 2311fe24f8a2Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2312fe24f8a2Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 23133e72ca8cSmrg esac 23143e72ca8cSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 23153e72ca8cSmrg case $lt_search_path_spec in 23163e72ca8cSmrg *\;*) 23173e72ca8cSmrg # if the path contains ";" then we assume it to be the separator 23183e72ca8cSmrg # otherwise default to the standard path separator (i.e. ":") - it is 23193e72ca8cSmrg # assumed that no part of a normal pathname contains ";" but that should 23203e72ca8cSmrg # okay in the real world where ";" in dirpaths is itself problematic. 23213e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 23223e72ca8cSmrg ;; 23233e72ca8cSmrg *) 23243e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 23253e72ca8cSmrg ;; 23263e72ca8cSmrg esac 23273e72ca8cSmrg # Ok, now we have the path, separated by spaces, we can step through it 2328fe24f8a2Smrg # and add multilib dir if necessary... 23293e72ca8cSmrg lt_tmp_lt_search_path_spec= 2330fe24f8a2Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2331fe24f8a2Smrg # ...but if some path component already ends with the multilib dir we assume 2332fe24f8a2Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2333fe24f8a2Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2334fe24f8a2Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2335fe24f8a2Smrg lt_multi_os_dir= 2336fe24f8a2Smrg ;; 2337fe24f8a2Smrg esac 23383e72ca8cSmrg for lt_sys_path in $lt_search_path_spec; do 2339fe24f8a2Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2340fe24f8a2Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2341fe24f8a2Smrg elif test -n "$lt_multi_os_dir"; then 23423e72ca8cSmrg test -d "$lt_sys_path" && \ 23433e72ca8cSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23443e72ca8cSmrg fi 23453e72ca8cSmrg done 23463e72ca8cSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2347fe24f8a2SmrgBEGIN {RS = " "; FS = "/|\n";} { 2348fe24f8a2Smrg lt_foo = ""; 2349fe24f8a2Smrg lt_count = 0; 23503e72ca8cSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 23513e72ca8cSmrg if ($lt_i != "" && $lt_i != ".") { 23523e72ca8cSmrg if ($lt_i == "..") { 23533e72ca8cSmrg lt_count++; 23543e72ca8cSmrg } else { 23553e72ca8cSmrg if (lt_count == 0) { 2356fe24f8a2Smrg lt_foo = "/" $lt_i lt_foo; 23573e72ca8cSmrg } else { 23583e72ca8cSmrg lt_count--; 23593e72ca8cSmrg } 23603e72ca8cSmrg } 23613e72ca8cSmrg } 23623e72ca8cSmrg } 23633e72ca8cSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23643e72ca8cSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23653e72ca8cSmrg}'` 23663e72ca8cSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 23673e72ca8cSmrg # for these hosts. 23683e72ca8cSmrg case $host_os in 23693e72ca8cSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2370fe24f8a2Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 23713e72ca8cSmrg esac 23723e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 23733e72ca8cSmrgelse 23743e72ca8cSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23753e72ca8cSmrgfi]) 23763e72ca8cSmrglibrary_names_spec= 23773e72ca8cSmrglibname_spec='lib$name' 23783e72ca8cSmrgsoname_spec= 2379fe24f8a2Smrgshrext_cmds=.so 23803e72ca8cSmrgpostinstall_cmds= 23813e72ca8cSmrgpostuninstall_cmds= 23823e72ca8cSmrgfinish_cmds= 23833e72ca8cSmrgfinish_eval= 23843e72ca8cSmrgshlibpath_var= 23853e72ca8cSmrgshlibpath_overrides_runpath=unknown 23863e72ca8cSmrgversion_type=none 23873e72ca8cSmrgdynamic_linker="$host_os ld.so" 23883e72ca8cSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 23893e72ca8cSmrgneed_lib_prefix=unknown 23903e72ca8cSmrghardcode_into_libs=no 2391ee3138f1Smrg 23923e72ca8cSmrg# when you set need_version to no, make sure it does not cause -set_version 23933e72ca8cSmrg# flags to be left without arguments 23943e72ca8cSmrgneed_version=unknown 2395ee3138f1Smrg 2396fe24f8a2SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2397fe24f8a2Smrg[User-defined run-time library search path.]) 2398fe24f8a2Smrg 23993e72ca8cSmrgcase $host_os in 24003e72ca8cSmrgaix3*) 24013e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 2402fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 24033e72ca8cSmrg shlibpath_var=LIBPATH 2404ee3138f1Smrg 24053e72ca8cSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2406fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 2407a1ed278cSmrg ;; 2408ee3138f1Smrg 24093e72ca8cSmrgaix[[4-9]]*) 24103e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 24113e72ca8cSmrg need_lib_prefix=no 24123e72ca8cSmrg need_version=no 24133e72ca8cSmrg hardcode_into_libs=yes 2414fe24f8a2Smrg if test ia64 = "$host_cpu"; then 24153e72ca8cSmrg # AIX 5 supports IA64 2416fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 24173e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 2418a1ed278cSmrg else 24193e72ca8cSmrg # With GCC up to 2.95.x, collect2 would create an import file 24203e72ca8cSmrg # for dependence libraries. The import file would start with 2421fe24f8a2Smrg # the line '#! .'. This would cause the generated library to 2422fe24f8a2Smrg # depend on '.', always an invalid library. This was fixed in 24233e72ca8cSmrg # development snapshots of GCC prior to 3.0. 24243e72ca8cSmrg case $host_os in 24253e72ca8cSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 24263e72ca8cSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 24273e72ca8cSmrg echo ' yes ' 2428fe24f8a2Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 24293e72ca8cSmrg : 24303e72ca8cSmrg else 24313e72ca8cSmrg can_build_shared=no 24323e72ca8cSmrg fi 24333e72ca8cSmrg ;; 24343e72ca8cSmrg esac 2435fe24f8a2Smrg # Using Import Files as archive members, it is possible to support 2436fe24f8a2Smrg # filename-based versioning of shared library archives on AIX. While 2437fe24f8a2Smrg # this would work for both with and without runtime linking, it will 2438fe24f8a2Smrg # prevent static linking of such archives. So we do filename-based 2439fe24f8a2Smrg # shared library versioning with .so extension only, which is used 2440fe24f8a2Smrg # when both runtime linking and shared linking is enabled. 2441fe24f8a2Smrg # Unfortunately, runtime linking may impact performance, so we do 2442fe24f8a2Smrg # not want this to be the default eventually. Also, we use the 2443fe24f8a2Smrg # versioned .so libs for executables only if there is the -brtl 2444fe24f8a2Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2445fe24f8a2Smrg # To allow for filename-based versioning support, we need to create 2446fe24f8a2Smrg # libNAME.so.V as an archive file, containing: 2447fe24f8a2Smrg # *) an Import File, referring to the versioned filename of the 2448fe24f8a2Smrg # archive as well as the shared archive member, telling the 2449fe24f8a2Smrg # bitwidth (32 or 64) of that shared object, and providing the 2450fe24f8a2Smrg # list of exported symbols of that shared object, eventually 2451fe24f8a2Smrg # decorated with the 'weak' keyword 2452fe24f8a2Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2453fe24f8a2Smrg # it being seen by the linker. 2454fe24f8a2Smrg # At run time we better use the real file rather than another symlink, 2455fe24f8a2Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2456fe24f8a2Smrg 2457fe24f8a2Smrg case $with_aix_soname,$aix_use_runtimelinking in 2458fe24f8a2Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 24593e72ca8cSmrg # soname into executable. Probably we can add versioning support to 24603e72ca8cSmrg # collect2, so additional links can be useful in future. 2461fe24f8a2Smrg aix,yes) # traditional libtool 2462fe24f8a2Smrg dynamic_linker='AIX unversionable lib.so' 24633e72ca8cSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 24643e72ca8cSmrg # instead of lib<name>.a to let people know that these are not 24653e72ca8cSmrg # typical AIX shared libraries. 2466fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2467fe24f8a2Smrg ;; 2468fe24f8a2Smrg aix,no) # traditional AIX only 2469fe24f8a2Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 24703e72ca8cSmrg # We preserve .a as extension for shared libraries through AIX4.2 24713e72ca8cSmrg # and later when we are not doing run time linking. 2472fe24f8a2Smrg library_names_spec='$libname$release.a $libname.a' 2473fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 2474fe24f8a2Smrg ;; 2475fe24f8a2Smrg svr4,*) # full svr4 only 2476fe24f8a2Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2477fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2478fe24f8a2Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2479fe24f8a2Smrg shlibpath_overrides_runpath=yes 2480fe24f8a2Smrg ;; 2481fe24f8a2Smrg *,yes) # both, prefer svr4 2482fe24f8a2Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2483fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484fe24f8a2Smrg # unpreferred sharedlib libNAME.a needs extra handling 2485fe24f8a2Smrg 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"' 2486fe24f8a2Smrg 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"' 2487fe24f8a2Smrg # We do not specify a path in Import Files, so LIBPATH fires. 2488fe24f8a2Smrg shlibpath_overrides_runpath=yes 2489fe24f8a2Smrg ;; 2490fe24f8a2Smrg *,no) # both, prefer aix 2491fe24f8a2Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2492fe24f8a2Smrg library_names_spec='$libname$release.a $libname.a' 2493fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 2494fe24f8a2Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2495fe24f8a2Smrg 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)' 2496fe24f8a2Smrg 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"' 2497fe24f8a2Smrg ;; 2498fe24f8a2Smrg esac 24993e72ca8cSmrg shlibpath_var=LIBPATH 2500a1ed278cSmrg fi 2501a1ed278cSmrg ;; 2502ee3138f1Smrg 25033e72ca8cSmrgamigaos*) 25043e72ca8cSmrg case $host_cpu in 25053e72ca8cSmrg powerpc) 25063e72ca8cSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 25073e72ca8cSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2508fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 25093e72ca8cSmrg ;; 25103e72ca8cSmrg m68k) 25113e72ca8cSmrg library_names_spec='$libname.ixlibrary $libname.a' 25123e72ca8cSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2513fe24f8a2Smrg 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' 25143e72ca8cSmrg ;; 25153e72ca8cSmrg esac 2516a1ed278cSmrg ;; 2517ee3138f1Smrg 25183e72ca8cSmrgbeos*) 2519fe24f8a2Smrg library_names_spec='$libname$shared_ext' 25203e72ca8cSmrg dynamic_linker="$host_os ld.so" 25213e72ca8cSmrg shlibpath_var=LIBRARY_PATH 2522a1ed278cSmrg ;; 2523ee3138f1Smrg 25243e72ca8cSmrgbsdi[[45]]*) 25253e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 25263e72ca8cSmrg need_version=no 2527fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2528fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 25293e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 25303e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 25313e72ca8cSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 25323e72ca8cSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 25333e72ca8cSmrg # the default ld.so.conf also contains /usr/contrib/lib and 25343e72ca8cSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 25353e72ca8cSmrg # libtool to hard-code these into programs 2536a1ed278cSmrg ;; 2537ee3138f1Smrg 25383e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 25393e72ca8cSmrg version_type=windows 2540fe24f8a2Smrg shrext_cmds=.dll 25413e72ca8cSmrg need_version=no 25423e72ca8cSmrg need_lib_prefix=no 2543ee3138f1Smrg 25443e72ca8cSmrg case $GCC,$cc_basename in 25453e72ca8cSmrg yes,*) 25463e72ca8cSmrg # gcc 25473e72ca8cSmrg library_names_spec='$libname.dll.a' 25483e72ca8cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2549fe24f8a2Smrg postinstall_cmds='base_file=`basename \$file`~ 2550fe24f8a2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 25513e72ca8cSmrg dldir=$destdir/`dirname \$dlpath`~ 25523e72ca8cSmrg test -d \$dldir || mkdir -p \$dldir~ 25533e72ca8cSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 25543e72ca8cSmrg chmod a+x \$dldir/$dlname~ 25553e72ca8cSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 25563e72ca8cSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 25573e72ca8cSmrg fi' 25583e72ca8cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 25593e72ca8cSmrg dlpath=$dir/\$dldll~ 25603e72ca8cSmrg $RM \$dlpath' 25613e72ca8cSmrg shlibpath_overrides_runpath=yes 25623e72ca8cSmrg 25633e72ca8cSmrg case $host_os in 25643e72ca8cSmrg cygwin*) 25653e72ca8cSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2566fe24f8a2Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25673e72ca8cSmrgm4_if([$1], [],[ 25683e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 25693e72ca8cSmrg ;; 25703e72ca8cSmrg mingw* | cegcc*) 25713e72ca8cSmrg # MinGW DLLs use traditional 'lib' prefix 2572fe24f8a2Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25733e72ca8cSmrg ;; 25743e72ca8cSmrg pw32*) 25753e72ca8cSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2576fe24f8a2Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 25773e72ca8cSmrg ;; 25783e72ca8cSmrg esac 25793e72ca8cSmrg dynamic_linker='Win32 ld.exe' 2580b425557eSmrg ;; 25813e72ca8cSmrg 25823e72ca8cSmrg *,cl*) 25833e72ca8cSmrg # Native MSVC 25843e72ca8cSmrg libname_spec='$name' 2585fe24f8a2Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2586fe24f8a2Smrg library_names_spec='$libname.dll.lib' 25873e72ca8cSmrg 25883e72ca8cSmrg case $build_os in 25893e72ca8cSmrg mingw*) 25903e72ca8cSmrg sys_lib_search_path_spec= 25913e72ca8cSmrg lt_save_ifs=$IFS 25923e72ca8cSmrg IFS=';' 25933e72ca8cSmrg for lt_path in $LIB 25943e72ca8cSmrg do 25953e72ca8cSmrg IFS=$lt_save_ifs 25963e72ca8cSmrg # Let DOS variable expansion print the short 8.3 style file name. 25973e72ca8cSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 25983e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 25993e72ca8cSmrg done 26003e72ca8cSmrg IFS=$lt_save_ifs 26013e72ca8cSmrg # Convert to MSYS style. 26023e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 26033e72ca8cSmrg ;; 26043e72ca8cSmrg cygwin*) 26053e72ca8cSmrg # Convert to unix form, then to dos form, then back to unix form 26063e72ca8cSmrg # but this time dos style (no spaces!) so that the unix form looks 26073e72ca8cSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 26083e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 26093e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 26103e72ca8cSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26113e72ca8cSmrg ;; 26123e72ca8cSmrg *) 2613fe24f8a2Smrg sys_lib_search_path_spec=$LIB 26143e72ca8cSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 26153e72ca8cSmrg # It is most probably a Windows format PATH. 26163e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 26173e72ca8cSmrg else 26183e72ca8cSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 26193e72ca8cSmrg fi 26203e72ca8cSmrg # FIXME: find the short name or the path components, as spaces are 26213e72ca8cSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 26223e72ca8cSmrg ;; 26233e72ca8cSmrg esac 26243e72ca8cSmrg 26253e72ca8cSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2626fe24f8a2Smrg postinstall_cmds='base_file=`basename \$file`~ 2627fe24f8a2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 26283e72ca8cSmrg dldir=$destdir/`dirname \$dlpath`~ 26293e72ca8cSmrg test -d \$dldir || mkdir -p \$dldir~ 26303e72ca8cSmrg $install_prog $dir/$dlname \$dldir/$dlname' 26313e72ca8cSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 26323e72ca8cSmrg dlpath=$dir/\$dldll~ 26333e72ca8cSmrg $RM \$dlpath' 26343e72ca8cSmrg shlibpath_overrides_runpath=yes 26353e72ca8cSmrg dynamic_linker='Win32 link.exe' 2636b425557eSmrg ;; 26373e72ca8cSmrg 26383e72ca8cSmrg *) 26393e72ca8cSmrg # Assume MSVC wrapper 2640fe24f8a2Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 26413e72ca8cSmrg dynamic_linker='Win32 ld.exe' 264234977a2fSmrg ;; 2643ee3138f1Smrg esac 26443e72ca8cSmrg # FIXME: first we should search . and the directory the executable is in 26453e72ca8cSmrg shlibpath_var=PATH 2646a1ed278cSmrg ;; 2647ee3138f1Smrg 26483e72ca8cSmrgdarwin* | rhapsody*) 26493e72ca8cSmrg dynamic_linker="$host_os dyld" 26503e72ca8cSmrg version_type=darwin 26513e72ca8cSmrg need_lib_prefix=no 26523e72ca8cSmrg need_version=no 2653fe24f8a2Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2654fe24f8a2Smrg soname_spec='$libname$release$major$shared_ext' 26553e72ca8cSmrg shlibpath_overrides_runpath=yes 26563e72ca8cSmrg shlibpath_var=DYLD_LIBRARY_PATH 26573e72ca8cSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 26583e72ca8cSmrgm4_if([$1], [],[ 26593e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 26603e72ca8cSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2661a1ed278cSmrg ;; 2662ee3138f1Smrg 26633e72ca8cSmrgdgux*) 26643e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 26653e72ca8cSmrg need_lib_prefix=no 26663e72ca8cSmrg need_version=no 2667fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2668fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 26693e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 26703e72ca8cSmrg ;; 2671ee3138f1Smrg 26723e72ca8cSmrgfreebsd* | dragonfly*) 26733e72ca8cSmrg # DragonFly does not have aout. When/if they implement a new 26743e72ca8cSmrg # versioning mechanism, adjust this. 26753e72ca8cSmrg if test -x /usr/bin/objformat; then 26763e72ca8cSmrg objformat=`/usr/bin/objformat` 2677a1ed278cSmrg else 26783e72ca8cSmrg case $host_os in 26793e72ca8cSmrg freebsd[[23]].*) objformat=aout ;; 26803e72ca8cSmrg *) objformat=elf ;; 2681a1ed278cSmrg esac 2682a1ed278cSmrg fi 26833e72ca8cSmrg version_type=freebsd-$objformat 26843e72ca8cSmrg case $version_type in 26853e72ca8cSmrg freebsd-elf*) 2686fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2687fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 26883e72ca8cSmrg need_version=no 26893e72ca8cSmrg need_lib_prefix=no 26903e72ca8cSmrg ;; 26913e72ca8cSmrg freebsd-*) 2692fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 26933e72ca8cSmrg need_version=yes 26943e72ca8cSmrg ;; 26953e72ca8cSmrg esac 26963e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 26973e72ca8cSmrg case $host_os in 26983e72ca8cSmrg freebsd2.*) 26993e72ca8cSmrg shlibpath_overrides_runpath=yes 27003e72ca8cSmrg ;; 27013e72ca8cSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 27023e72ca8cSmrg shlibpath_overrides_runpath=yes 27033e72ca8cSmrg hardcode_into_libs=yes 27043e72ca8cSmrg ;; 27053e72ca8cSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 27063e72ca8cSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 27073e72ca8cSmrg shlibpath_overrides_runpath=no 27083e72ca8cSmrg hardcode_into_libs=yes 27093e72ca8cSmrg ;; 27103e72ca8cSmrg *) # from 4.6 on, and DragonFly 27113e72ca8cSmrg shlibpath_overrides_runpath=yes 27123e72ca8cSmrg hardcode_into_libs=yes 27133e72ca8cSmrg ;; 2714a1ed278cSmrg esac 27153e72ca8cSmrg ;; 2716ee3138f1Smrg 27173e72ca8cSmrghaiku*) 27183e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 27193e72ca8cSmrg need_lib_prefix=no 27203e72ca8cSmrg need_version=no 27213e72ca8cSmrg dynamic_linker="$host_os runtime_loader" 2722fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2723fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 27243e72ca8cSmrg shlibpath_var=LIBRARY_PATH 2725fe24f8a2Smrg shlibpath_overrides_runpath=no 27263e72ca8cSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 27273e72ca8cSmrg hardcode_into_libs=yes 27283e72ca8cSmrg ;; 2729ee3138f1Smrg 27303e72ca8cSmrghpux9* | hpux10* | hpux11*) 27313e72ca8cSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 27323e72ca8cSmrg # link against other versions. 27333e72ca8cSmrg version_type=sunos 27343e72ca8cSmrg need_lib_prefix=no 27353e72ca8cSmrg need_version=no 27363e72ca8cSmrg case $host_cpu in 27373e72ca8cSmrg ia64*) 27383e72ca8cSmrg shrext_cmds='.so' 27393e72ca8cSmrg hardcode_into_libs=yes 27403e72ca8cSmrg dynamic_linker="$host_os dld.so" 27413e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 27423e72ca8cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2743fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2744fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 2745fe24f8a2Smrg if test 32 = "$HPUX_IA64_MODE"; then 27463e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2747fe24f8a2Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 27483e72ca8cSmrg else 27493e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2750fe24f8a2Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 27513e72ca8cSmrg fi 27523e72ca8cSmrg ;; 27533e72ca8cSmrg hppa*64*) 27543e72ca8cSmrg shrext_cmds='.sl' 27553e72ca8cSmrg hardcode_into_libs=yes 27563e72ca8cSmrg dynamic_linker="$host_os dld.sl" 27573e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 27583e72ca8cSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2759fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2760fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 27613e72ca8cSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 27623e72ca8cSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 27633e72ca8cSmrg ;; 27643e72ca8cSmrg *) 27653e72ca8cSmrg shrext_cmds='.sl' 27663e72ca8cSmrg dynamic_linker="$host_os dld.sl" 27673e72ca8cSmrg shlibpath_var=SHLIB_PATH 27683e72ca8cSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2769fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2770fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 27713e72ca8cSmrg ;; 27723e72ca8cSmrg esac 27733e72ca8cSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 27743e72ca8cSmrg postinstall_cmds='chmod 555 $lib' 27753e72ca8cSmrg # or fails outright, so override atomically: 27763e72ca8cSmrg install_override_mode=555 2777a1ed278cSmrg ;; 27783e72ca8cSmrg 27793e72ca8cSmrginterix[[3-9]]*) 27803e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 27813e72ca8cSmrg need_lib_prefix=no 27823e72ca8cSmrg need_version=no 2783fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2784fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 27853e72ca8cSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 27863e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 27873e72ca8cSmrg shlibpath_overrides_runpath=no 27883e72ca8cSmrg hardcode_into_libs=yes 2789a1ed278cSmrg ;; 27903e72ca8cSmrg 27913e72ca8cSmrgirix5* | irix6* | nonstopux*) 27923e72ca8cSmrg case $host_os in 27933e72ca8cSmrg nonstopux*) version_type=nonstopux ;; 27943e72ca8cSmrg *) 2795fe24f8a2Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 27963e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 27973e72ca8cSmrg else 27983e72ca8cSmrg version_type=irix 27993e72ca8cSmrg fi ;; 28003e72ca8cSmrg esac 28013e72ca8cSmrg need_lib_prefix=no 28023e72ca8cSmrg need_version=no 2803fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 2804fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 28053e72ca8cSmrg case $host_os in 28063e72ca8cSmrg irix5* | nonstopux*) 28073e72ca8cSmrg libsuff= shlibsuff= 28083e72ca8cSmrg ;; 28093e72ca8cSmrg *) 28103e72ca8cSmrg case $LD in # libtool.m4 will add one of these switches to LD 28113e72ca8cSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 28123e72ca8cSmrg libsuff= shlibsuff= libmagic=32-bit;; 28133e72ca8cSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 28143e72ca8cSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 28153e72ca8cSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 28163e72ca8cSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 28173e72ca8cSmrg *) libsuff= shlibsuff= libmagic=never-match;; 28183e72ca8cSmrg esac 28193e72ca8cSmrg ;; 28203e72ca8cSmrg esac 28213e72ca8cSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 28223e72ca8cSmrg shlibpath_overrides_runpath=no 2823fe24f8a2Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2824fe24f8a2Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 28253e72ca8cSmrg hardcode_into_libs=yes 2826a1ed278cSmrg ;; 28273e72ca8cSmrg 28283e72ca8cSmrg# No shared lib support for Linux oldld, aout, or coff. 28293e72ca8cSmrglinux*oldld* | linux*aout* | linux*coff*) 28303e72ca8cSmrg dynamic_linker=no 2831a1ed278cSmrg ;; 2832ee3138f1Smrg 2833fe24f8a2Smrglinux*android*) 2834fe24f8a2Smrg version_type=none # Android doesn't support versioned libraries. 2835fe24f8a2Smrg need_lib_prefix=no 2836fe24f8a2Smrg need_version=no 2837fe24f8a2Smrg library_names_spec='$libname$release$shared_ext' 2838fe24f8a2Smrg soname_spec='$libname$release$shared_ext' 2839fe24f8a2Smrg finish_cmds= 2840fe24f8a2Smrg shlibpath_var=LD_LIBRARY_PATH 2841fe24f8a2Smrg shlibpath_overrides_runpath=yes 2842fe24f8a2Smrg 2843fe24f8a2Smrg # This implies no fast_install, which is unacceptable. 2844fe24f8a2Smrg # Some rework will be needed to allow for fast_install 2845fe24f8a2Smrg # before this can be enabled. 2846fe24f8a2Smrg hardcode_into_libs=yes 2847fe24f8a2Smrg 2848fe24f8a2Smrg dynamic_linker='Android linker' 2849fe24f8a2Smrg # Don't embed -rpath directories since the linker doesn't support them. 2850fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2851fe24f8a2Smrg ;; 2852fe24f8a2Smrg 28533e72ca8cSmrg# This must be glibc/ELF. 2854fe24f8a2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 28553e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 28563e72ca8cSmrg need_lib_prefix=no 28573e72ca8cSmrg need_version=no 2858fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2859fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 28603e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 28613e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 28623e72ca8cSmrg shlibpath_overrides_runpath=no 2863ee3138f1Smrg 28643e72ca8cSmrg # Some binutils ld are patched to set DT_RUNPATH 28653e72ca8cSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 28663e72ca8cSmrg [lt_cv_shlibpath_overrides_runpath=no 28673e72ca8cSmrg save_LDFLAGS=$LDFLAGS 28683e72ca8cSmrg save_libdir=$libdir 28693e72ca8cSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 28703e72ca8cSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 28713e72ca8cSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 28723e72ca8cSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 28733e72ca8cSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 28743e72ca8cSmrg LDFLAGS=$save_LDFLAGS 28753e72ca8cSmrg libdir=$save_libdir 28763e72ca8cSmrg ]) 28773e72ca8cSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 287834977a2fSmrg 28793e72ca8cSmrg # This implies no fast_install, which is unacceptable. 28803e72ca8cSmrg # Some rework will be needed to allow for fast_install 28813e72ca8cSmrg # before this can be enabled. 28823e72ca8cSmrg hardcode_into_libs=yes 2883ee3138f1Smrg 28843e72ca8cSmrg # Add ABI-specific directories to the system library path. 28853e72ca8cSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2886ee3138f1Smrg 2887fe24f8a2Smrg # Ideally, we could use ldconfig to report *all* directores which are 2888fe24f8a2Smrg # searched for libraries, however this is still not possible. Aside from not 2889fe24f8a2Smrg # being certain /sbin/ldconfig is available, command 2890fe24f8a2Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2891fe24f8a2Smrg # even though it is searched at run-time. Try to do the best guess by 2892fe24f8a2Smrg # appending ld.so.conf contents (and includes) to the search path. 28933e72ca8cSmrg if test -f /etc/ld.so.conf; then 28943e72ca8cSmrg 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' ' '` 28953e72ca8cSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 28963e72ca8cSmrg fi 2897ee3138f1Smrg 28983e72ca8cSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 28993e72ca8cSmrg # powerpc, because MkLinux only supported shared libraries with the 29003e72ca8cSmrg # GNU dynamic linker. Since this was broken with cross compilers, 29013e72ca8cSmrg # most powerpc-linux boxes support dynamic linking these days and 29023e72ca8cSmrg # people can always --disable-shared, the test was removed, and we 29033e72ca8cSmrg # assume the GNU/Linux dynamic linker is in use. 29043e72ca8cSmrg dynamic_linker='GNU/Linux ld.so' 29053e72ca8cSmrg ;; 29063e72ca8cSmrg 29073e72ca8cSmrgnetbsd*) 29083e72ca8cSmrg version_type=sunos 29093e72ca8cSmrg need_lib_prefix=no 29103e72ca8cSmrg need_version=no 29113e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2912fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 29133e72ca8cSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 29143e72ca8cSmrg dynamic_linker='NetBSD (a.out) ld.so' 2915a1ed278cSmrg else 2916fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2917fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 29183e72ca8cSmrg dynamic_linker='NetBSD ld.elf_so' 2919a1ed278cSmrg fi 29203e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 29213e72ca8cSmrg shlibpath_overrides_runpath=yes 29223e72ca8cSmrg hardcode_into_libs=yes 29233e72ca8cSmrg ;; 2924ee3138f1Smrg 29253e72ca8cSmrgnewsos6) 29263e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 2927fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29283e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 29293e72ca8cSmrg shlibpath_overrides_runpath=yes 29303e72ca8cSmrg ;; 2931ee3138f1Smrg 29323e72ca8cSmrg*nto* | *qnx*) 29333e72ca8cSmrg version_type=qnx 29343e72ca8cSmrg need_lib_prefix=no 29353e72ca8cSmrg need_version=no 2936fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2937fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 29383e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 29393e72ca8cSmrg shlibpath_overrides_runpath=no 29403e72ca8cSmrg hardcode_into_libs=yes 29413e72ca8cSmrg dynamic_linker='ldqnx.so' 29423e72ca8cSmrg ;; 2943ee3138f1Smrg 2944fe24f8a2Smrgopenbsd* | bitrig*) 29453e72ca8cSmrg version_type=sunos 2946fe24f8a2Smrg sys_lib_dlsearch_path_spec=/usr/lib 29473e72ca8cSmrg need_lib_prefix=no 2948fe24f8a2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2949fe24f8a2Smrg need_version=no 29503e72ca8cSmrg else 2951fe24f8a2Smrg need_version=yes 29523e72ca8cSmrg fi 2953fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2954fe24f8a2Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2955fe24f8a2Smrg shlibpath_var=LD_LIBRARY_PATH 2956fe24f8a2Smrg shlibpath_overrides_runpath=yes 29573e72ca8cSmrg ;; 2958ee3138f1Smrg 29593e72ca8cSmrgos2*) 29603e72ca8cSmrg libname_spec='$name' 2961fe24f8a2Smrg version_type=windows 2962fe24f8a2Smrg shrext_cmds=.dll 2963fe24f8a2Smrg need_version=no 29643e72ca8cSmrg need_lib_prefix=no 2965fe24f8a2Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2966fe24f8a2Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2967fe24f8a2Smrg v=$($ECHO $release$versuffix | tr -d .-); 2968fe24f8a2Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2969fe24f8a2Smrg $ECHO $n$v`$shared_ext' 2970fe24f8a2Smrg library_names_spec='${libname}_dll.$libext' 29713e72ca8cSmrg dynamic_linker='OS/2 ld.exe' 2972fe24f8a2Smrg shlibpath_var=BEGINLIBPATH 2973fe24f8a2Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2974fe24f8a2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2975fe24f8a2Smrg postinstall_cmds='base_file=`basename \$file`~ 2976fe24f8a2Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2977fe24f8a2Smrg dldir=$destdir/`dirname \$dlpath`~ 2978fe24f8a2Smrg test -d \$dldir || mkdir -p \$dldir~ 2979fe24f8a2Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2980fe24f8a2Smrg chmod a+x \$dldir/$dlname~ 2981fe24f8a2Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2982fe24f8a2Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2983fe24f8a2Smrg fi' 2984fe24f8a2Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2985fe24f8a2Smrg dlpath=$dir/\$dldll~ 2986fe24f8a2Smrg $RM \$dlpath' 29873e72ca8cSmrg ;; 2988ee3138f1Smrg 29893e72ca8cSmrgosf3* | osf4* | osf5*) 29903e72ca8cSmrg version_type=osf 29913e72ca8cSmrg need_lib_prefix=no 29923e72ca8cSmrg need_version=no 2993fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 2994fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 29953e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 29963e72ca8cSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2997fe24f8a2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 29983e72ca8cSmrg ;; 2999ee3138f1Smrg 30003e72ca8cSmrgrdos*) 30013e72ca8cSmrg dynamic_linker=no 30023e72ca8cSmrg ;; 3003ee3138f1Smrg 30043e72ca8cSmrgsolaris*) 30053e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 30063e72ca8cSmrg need_lib_prefix=no 30073e72ca8cSmrg need_version=no 3008fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3009fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 30103e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 30113e72ca8cSmrg shlibpath_overrides_runpath=yes 30123e72ca8cSmrg hardcode_into_libs=yes 30133e72ca8cSmrg # ldd complains unless libraries are executable 30143e72ca8cSmrg postinstall_cmds='chmod +x $lib' 30153e72ca8cSmrg ;; 3016a1ed278cSmrg 30173e72ca8cSmrgsunos4*) 30183e72ca8cSmrg version_type=sunos 3019fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 30203e72ca8cSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 30213e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 30223e72ca8cSmrg shlibpath_overrides_runpath=yes 3023fe24f8a2Smrg if test yes = "$with_gnu_ld"; then 30243e72ca8cSmrg need_lib_prefix=no 30253e72ca8cSmrg fi 30263e72ca8cSmrg need_version=yes 30273e72ca8cSmrg ;; 3028a1ed278cSmrg 30293e72ca8cSmrgsysv4 | sysv4.3*) 30303e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 3031fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3032fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 30333e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 30343e72ca8cSmrg case $host_vendor in 30353e72ca8cSmrg sni) 30363e72ca8cSmrg shlibpath_overrides_runpath=no 30373e72ca8cSmrg need_lib_prefix=no 30383e72ca8cSmrg runpath_var=LD_RUN_PATH 30393e72ca8cSmrg ;; 30403e72ca8cSmrg siemens) 30413e72ca8cSmrg need_lib_prefix=no 30423e72ca8cSmrg ;; 30433e72ca8cSmrg motorola) 30443e72ca8cSmrg need_lib_prefix=no 30453e72ca8cSmrg need_version=no 30463e72ca8cSmrg shlibpath_overrides_runpath=no 30473e72ca8cSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 30483e72ca8cSmrg ;; 30493e72ca8cSmrg esac 30503e72ca8cSmrg ;; 30513e72ca8cSmrg 30523e72ca8cSmrgsysv4*MP*) 3053fe24f8a2Smrg if test -d /usr/nec; then 30543e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 3055fe24f8a2Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3056fe24f8a2Smrg soname_spec='$libname$shared_ext.$major' 30573e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 3058a1ed278cSmrg fi 30593e72ca8cSmrg ;; 3060a1ed278cSmrg 30613e72ca8cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3062fe24f8a2Smrg version_type=sco 30633e72ca8cSmrg need_lib_prefix=no 30643e72ca8cSmrg need_version=no 3065fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3066fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 30673e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 30683e72ca8cSmrg shlibpath_overrides_runpath=yes 30693e72ca8cSmrg hardcode_into_libs=yes 3070fe24f8a2Smrg if test yes = "$with_gnu_ld"; then 30713e72ca8cSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3072a1ed278cSmrg else 30733e72ca8cSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 30743e72ca8cSmrg case $host_os in 30753e72ca8cSmrg sco3.2v5*) 30763e72ca8cSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 30773e72ca8cSmrg ;; 30783e72ca8cSmrg esac 3079b425557eSmrg fi 30803e72ca8cSmrg sys_lib_dlsearch_path_spec='/usr/lib' 30813e72ca8cSmrg ;; 3082ee3138f1Smrg 30833e72ca8cSmrgtpf*) 30843e72ca8cSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 30853e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 30863e72ca8cSmrg need_lib_prefix=no 30873e72ca8cSmrg need_version=no 3088fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 30893e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 30903e72ca8cSmrg shlibpath_overrides_runpath=no 30913e72ca8cSmrg hardcode_into_libs=yes 30923e72ca8cSmrg ;; 3093ee3138f1Smrg 30943e72ca8cSmrguts4*) 30953e72ca8cSmrg version_type=linux # correct to gnu/linux during the next big refactor 3096fe24f8a2Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3097fe24f8a2Smrg soname_spec='$libname$release$shared_ext$major' 30983e72ca8cSmrg shlibpath_var=LD_LIBRARY_PATH 30993e72ca8cSmrg ;; 3100ee3138f1Smrg 31013e72ca8cSmrg*) 31023e72ca8cSmrg dynamic_linker=no 31033e72ca8cSmrg ;; 31043e72ca8cSmrgesac 31053e72ca8cSmrgAC_MSG_RESULT([$dynamic_linker]) 3106fe24f8a2Smrgtest no = "$dynamic_linker" && can_build_shared=no 3107b425557eSmrg 31083e72ca8cSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3109fe24f8a2Smrgif test yes = "$GCC"; then 31103e72ca8cSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 31113e72ca8cSmrgfi 3112b425557eSmrg 3113fe24f8a2Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3114fe24f8a2Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 31153e72ca8cSmrgfi 3116fe24f8a2Smrg 3117fe24f8a2Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3118fe24f8a2Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3119a1ed278cSmrgfi 3120ee3138f1Smrg 3121fe24f8a2Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3122fe24f8a2Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3123fe24f8a2Smrg 3124fe24f8a2Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3125fe24f8a2Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3126fe24f8a2Smrg 3127fe24f8a2Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3128fe24f8a2Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3129fe24f8a2Smrg 31303e72ca8cSmrg_LT_DECL([], [variables_saved_for_relink], [1], 31313e72ca8cSmrg [Variables whose values should be saved in libtool wrapper scripts and 31323e72ca8cSmrg restored at link time]) 31333e72ca8cSmrg_LT_DECL([], [need_lib_prefix], [0], 31343e72ca8cSmrg [Do we need the "lib" prefix for modules?]) 31353e72ca8cSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 31363e72ca8cSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 31373e72ca8cSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 31383e72ca8cSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 31393e72ca8cSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 31403e72ca8cSmrg [Is shlibpath searched before the hard-coded library search path?]) 31413e72ca8cSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 31423e72ca8cSmrg_LT_DECL([], [library_names_spec], [1], 31433e72ca8cSmrg [[List of archive names. First name is the real one, the rest are links. 31443e72ca8cSmrg The last name is the one that the linker finds with -lNAME]]) 31453e72ca8cSmrg_LT_DECL([], [soname_spec], [1], 31463e72ca8cSmrg [[The coded name of the library, if different from the real name]]) 31473e72ca8cSmrg_LT_DECL([], [install_override_mode], [1], 31483e72ca8cSmrg [Permission mode override for installation of shared libraries]) 31493e72ca8cSmrg_LT_DECL([], [postinstall_cmds], [2], 31503e72ca8cSmrg [Command to use after installation of a shared archive]) 31513e72ca8cSmrg_LT_DECL([], [postuninstall_cmds], [2], 31523e72ca8cSmrg [Command to use after uninstallation of a shared archive]) 31533e72ca8cSmrg_LT_DECL([], [finish_cmds], [2], 31543e72ca8cSmrg [Commands used to finish a libtool library installation in a directory]) 31553e72ca8cSmrg_LT_DECL([], [finish_eval], [1], 31563e72ca8cSmrg [[As "finish_cmds", except a single script fragment to be evaled but 31573e72ca8cSmrg not shown]]) 31583e72ca8cSmrg_LT_DECL([], [hardcode_into_libs], [0], 31593e72ca8cSmrg [Whether we should hardcode library paths into libraries]) 31603e72ca8cSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 31613e72ca8cSmrg [Compile-time system search path for libraries]) 3162fe24f8a2Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3163fe24f8a2Smrg [Detected run-time system search path for libraries]) 3164fe24f8a2Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3165fe24f8a2Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 31663e72ca8cSmrg])# _LT_SYS_DYNAMIC_LINKER 3167ee3138f1Smrg 3168ee3138f1Smrg 31693e72ca8cSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 31703e72ca8cSmrg# -------------------------- 3171fe24f8a2Smrg# find a file program that can recognize shared library 31723e72ca8cSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 31733e72ca8cSmrg[m4_require([_LT_DECL_EGREP])dnl 31743e72ca8cSmrgAC_MSG_CHECKING([for $1]) 31753e72ca8cSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 31763e72ca8cSmrg[case $MAGIC_CMD in 31773e72ca8cSmrg[[\\/*] | ?:[\\/]*]) 3178fe24f8a2Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3179a1ed278cSmrg ;; 31803e72ca8cSmrg*) 3181fe24f8a2Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 3182fe24f8a2Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 31833e72ca8cSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 31843e72ca8cSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 31853e72ca8cSmrgdnl not every word. This closes a longstanding sh security hole. 31863e72ca8cSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 31873e72ca8cSmrg for ac_dir in $ac_dummy; do 3188fe24f8a2Smrg IFS=$lt_save_ifs 31893e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 3190fe24f8a2Smrg if test -f "$ac_dir/$1"; then 3191fe24f8a2Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 31923e72ca8cSmrg if test -n "$file_magic_test_file"; then 31933e72ca8cSmrg case $deplibs_check_method in 31943e72ca8cSmrg "file_magic "*) 31953e72ca8cSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3196fe24f8a2Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 31973e72ca8cSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 31983e72ca8cSmrg $EGREP "$file_magic_regex" > /dev/null; then 31993e72ca8cSmrg : 32003e72ca8cSmrg else 32013e72ca8cSmrg cat <<_LT_EOF 1>&2 3202ee3138f1Smrg 32033e72ca8cSmrg*** Warning: the command libtool uses to detect shared libraries, 32043e72ca8cSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 32053e72ca8cSmrg*** The result is that libtool may fail to recognize shared libraries 32063e72ca8cSmrg*** as such. This will affect the creation of libtool libraries that 32073e72ca8cSmrg*** depend on shared libraries, but programs linked with such libtool 32083e72ca8cSmrg*** libraries will work regardless of this problem. Nevertheless, you 32093e72ca8cSmrg*** may want to report the problem to your system manager and/or to 32103e72ca8cSmrg*** bug-libtool@gnu.org 3211ee3138f1Smrg 32123e72ca8cSmrg_LT_EOF 32133e72ca8cSmrg fi ;; 3214a1ed278cSmrg esac 32153e72ca8cSmrg fi 32163e72ca8cSmrg break 3217a1ed278cSmrg fi 32183e72ca8cSmrg done 3219fe24f8a2Smrg IFS=$lt_save_ifs 3220fe24f8a2Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 32213e72ca8cSmrg ;; 32223e72ca8cSmrgesac]) 3223fe24f8a2SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 32243e72ca8cSmrgif test -n "$MAGIC_CMD"; then 32253e72ca8cSmrg AC_MSG_RESULT($MAGIC_CMD) 32263e72ca8cSmrgelse 32273e72ca8cSmrg AC_MSG_RESULT(no) 32283e72ca8cSmrgfi 32293e72ca8cSmrg_LT_DECL([], [MAGIC_CMD], [0], 32303e72ca8cSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 32313e72ca8cSmrg])# _LT_PATH_TOOL_PREFIX 3232ee3138f1Smrg 32333e72ca8cSmrg# Old name: 32343e72ca8cSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 32353e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 32363e72ca8cSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 323734977a2fSmrg 3238ee3138f1Smrg 32393e72ca8cSmrg# _LT_PATH_MAGIC 32403e72ca8cSmrg# -------------- 3241fe24f8a2Smrg# find a file program that can recognize a shared library 32423e72ca8cSmrgm4_defun([_LT_PATH_MAGIC], 32433e72ca8cSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 32443e72ca8cSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 32453e72ca8cSmrg if test -n "$ac_tool_prefix"; then 32463e72ca8cSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 32473e72ca8cSmrg else 32483e72ca8cSmrg MAGIC_CMD=: 32493e72ca8cSmrg fi 32503e72ca8cSmrgfi 32513e72ca8cSmrg])# _LT_PATH_MAGIC 32523e72ca8cSmrg 3253ee3138f1Smrg 32543e72ca8cSmrg# LT_PATH_LD 32553e72ca8cSmrg# ---------- 32563e72ca8cSmrg# find the pathname to the GNU or non-GNU linker 32573e72ca8cSmrgAC_DEFUN([LT_PATH_LD], 32583e72ca8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 32593e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 32603e72ca8cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 32613e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 32623e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 32633e72ca8cSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 326434977a2fSmrg 32653e72ca8cSmrgAC_ARG_WITH([gnu-ld], 32663e72ca8cSmrg [AS_HELP_STRING([--with-gnu-ld], 32673e72ca8cSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3268fe24f8a2Smrg [test no = "$withval" || with_gnu_ld=yes], 32693e72ca8cSmrg [with_gnu_ld=no])dnl 32703e72ca8cSmrg 32713e72ca8cSmrgac_prog=ld 3272fe24f8a2Smrgif test yes = "$GCC"; then 32733e72ca8cSmrg # Check if gcc -print-prog-name=ld gives a path. 32743e72ca8cSmrg AC_MSG_CHECKING([for ld used by $CC]) 32753e72ca8cSmrg case $host in 32763e72ca8cSmrg *-*-mingw*) 3277fe24f8a2Smrg # gcc leaves a trailing carriage return, which upsets mingw 32783e72ca8cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 32793e72ca8cSmrg *) 32803e72ca8cSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 32813e72ca8cSmrg esac 32823e72ca8cSmrg case $ac_prog in 32833e72ca8cSmrg # Accept absolute paths. 32843e72ca8cSmrg [[\\/]]* | ?:[[\\/]]*) 32853e72ca8cSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 32863e72ca8cSmrg # Canonicalize the pathname of ld 32873e72ca8cSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 32883e72ca8cSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 32893e72ca8cSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 32903e72ca8cSmrg done 3291fe24f8a2Smrg test -z "$LD" && LD=$ac_prog 3292a1ed278cSmrg ;; 32933e72ca8cSmrg "") 32943e72ca8cSmrg # If it fails, then pretend we aren't using GCC. 32953e72ca8cSmrg ac_prog=ld 32963e72ca8cSmrg ;; 32973e72ca8cSmrg *) 32983e72ca8cSmrg # If it is relative, then search for the first ld in PATH. 32993e72ca8cSmrg with_gnu_ld=unknown 33003e72ca8cSmrg ;; 33013e72ca8cSmrg esac 3302fe24f8a2Smrgelif test yes = "$with_gnu_ld"; then 33033e72ca8cSmrg AC_MSG_CHECKING([for GNU ld]) 33043e72ca8cSmrgelse 33053e72ca8cSmrg AC_MSG_CHECKING([for non-GNU ld]) 33063e72ca8cSmrgfi 33073e72ca8cSmrgAC_CACHE_VAL(lt_cv_path_LD, 33083e72ca8cSmrg[if test -z "$LD"; then 3309fe24f8a2Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 33103e72ca8cSmrg for ac_dir in $PATH; do 3311fe24f8a2Smrg IFS=$lt_save_ifs 33123e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 33133e72ca8cSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3314fe24f8a2Smrg lt_cv_path_LD=$ac_dir/$ac_prog 33153e72ca8cSmrg # Check to see if the program is GNU ld. I'd rather use --version, 33163e72ca8cSmrg # but apparently some variants of GNU ld only accept -v. 33173e72ca8cSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 33183e72ca8cSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 33193e72ca8cSmrg *GNU* | *'with BFD'*) 3320fe24f8a2Smrg test no != "$with_gnu_ld" && break 33213e72ca8cSmrg ;; 33223e72ca8cSmrg *) 3323fe24f8a2Smrg test yes != "$with_gnu_ld" && break 33243e72ca8cSmrg ;; 33253e72ca8cSmrg esac 33263e72ca8cSmrg fi 33273e72ca8cSmrg done 3328fe24f8a2Smrg IFS=$lt_save_ifs 33293e72ca8cSmrgelse 3330fe24f8a2Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 33313e72ca8cSmrgfi]) 3332fe24f8a2SmrgLD=$lt_cv_path_LD 33333e72ca8cSmrgif test -n "$LD"; then 33343e72ca8cSmrg AC_MSG_RESULT($LD) 33353e72ca8cSmrgelse 33363e72ca8cSmrg AC_MSG_RESULT(no) 33373e72ca8cSmrgfi 33383e72ca8cSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 33393e72ca8cSmrg_LT_PATH_LD_GNU 33403e72ca8cSmrgAC_SUBST([LD]) 334134977a2fSmrg 33423e72ca8cSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 33433e72ca8cSmrg])# LT_PATH_LD 334434977a2fSmrg 33453e72ca8cSmrg# Old names: 33463e72ca8cSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 33473e72ca8cSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 33483e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 33493e72ca8cSmrgdnl AC_DEFUN([AM_PROG_LD], []) 33503e72ca8cSmrgdnl AC_DEFUN([AC_PROG_LD], []) 335134977a2fSmrg 335234977a2fSmrg 33533e72ca8cSmrg# _LT_PATH_LD_GNU 33543e72ca8cSmrg#- -------------- 33553e72ca8cSmrgm4_defun([_LT_PATH_LD_GNU], 33563e72ca8cSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 33573e72ca8cSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 33583e72ca8cSmrgcase `$LD -v 2>&1 </dev/null` in 33593e72ca8cSmrg*GNU* | *'with BFD'*) 33603e72ca8cSmrg lt_cv_prog_gnu_ld=yes 33613e72ca8cSmrg ;; 33623e72ca8cSmrg*) 33633e72ca8cSmrg lt_cv_prog_gnu_ld=no 33643e72ca8cSmrg ;; 33653e72ca8cSmrgesac]) 33663e72ca8cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 33673e72ca8cSmrg])# _LT_PATH_LD_GNU 3368ee3138f1Smrg 3369ee3138f1Smrg 33703e72ca8cSmrg# _LT_CMD_RELOAD 33713e72ca8cSmrg# -------------- 33723e72ca8cSmrg# find reload flag for linker 33733e72ca8cSmrg# -- PORTME Some linkers may need a different reload flag. 33743e72ca8cSmrgm4_defun([_LT_CMD_RELOAD], 33753e72ca8cSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 33763e72ca8cSmrg lt_cv_ld_reload_flag, 33773e72ca8cSmrg [lt_cv_ld_reload_flag='-r']) 33783e72ca8cSmrgreload_flag=$lt_cv_ld_reload_flag 33793e72ca8cSmrgcase $reload_flag in 33803e72ca8cSmrg"" | " "*) ;; 33813e72ca8cSmrg*) reload_flag=" $reload_flag" ;; 33823e72ca8cSmrgesac 33833e72ca8cSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 33843e72ca8cSmrgcase $host_os in 33853e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 3386fe24f8a2Smrg if test yes != "$GCC"; then 33873e72ca8cSmrg reload_cmds=false 33883e72ca8cSmrg fi 33893e72ca8cSmrg ;; 33903e72ca8cSmrg darwin*) 3391fe24f8a2Smrg if test yes = "$GCC"; then 3392fe24f8a2Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 33933e72ca8cSmrg else 33943e72ca8cSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 33953e72ca8cSmrg fi 33963e72ca8cSmrg ;; 33973e72ca8cSmrgesac 33983e72ca8cSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 33993e72ca8cSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 34003e72ca8cSmrg])# _LT_CMD_RELOAD 3401ee3138f1Smrg 3402ee3138f1Smrg 3403fe24f8a2Smrg# _LT_PATH_DD 3404fe24f8a2Smrg# ----------- 3405fe24f8a2Smrg# find a working dd 3406fe24f8a2Smrgm4_defun([_LT_PATH_DD], 3407fe24f8a2Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3408fe24f8a2Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3409fe24f8a2Smrgcat conftest.i conftest.i >conftest2.i 3410fe24f8a2Smrg: ${lt_DD:=$DD} 3411fe24f8a2SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3412fe24f8a2Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3413fe24f8a2Smrg cmp -s conftest.i conftest.out \ 3414fe24f8a2Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3415fe24f8a2Smrgfi]) 3416fe24f8a2Smrgrm -f conftest.i conftest2.i conftest.out]) 3417fe24f8a2Smrg])# _LT_PATH_DD 3418fe24f8a2Smrg 3419fe24f8a2Smrg 3420fe24f8a2Smrg# _LT_CMD_TRUNCATE 3421fe24f8a2Smrg# ---------------- 3422fe24f8a2Smrg# find command to truncate a binary pipe 3423fe24f8a2Smrgm4_defun([_LT_CMD_TRUNCATE], 3424fe24f8a2Smrg[m4_require([_LT_PATH_DD]) 3425fe24f8a2SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3426fe24f8a2Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3427fe24f8a2Smrgcat conftest.i conftest.i >conftest2.i 3428fe24f8a2Smrglt_cv_truncate_bin= 3429fe24f8a2Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3430fe24f8a2Smrg cmp -s conftest.i conftest.out \ 3431fe24f8a2Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3432fe24f8a2Smrgfi 3433fe24f8a2Smrgrm -f conftest.i conftest2.i conftest.out 3434fe24f8a2Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3435fe24f8a2Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3436fe24f8a2Smrg [Command to truncate a binary pipe]) 3437fe24f8a2Smrg])# _LT_CMD_TRUNCATE 3438fe24f8a2Smrg 3439fe24f8a2Smrg 34403e72ca8cSmrg# _LT_CHECK_MAGIC_METHOD 34413e72ca8cSmrg# ---------------------- 34423e72ca8cSmrg# how to check for library dependencies 34433e72ca8cSmrg# -- PORTME fill in with the dynamic library characteristics 34443e72ca8cSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 34453e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 34463e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP]) 34473e72ca8cSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 34483e72ca8cSmrglt_cv_deplibs_check_method, 34493e72ca8cSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 34503e72ca8cSmrglt_cv_file_magic_test_file= 34513e72ca8cSmrglt_cv_deplibs_check_method='unknown' 34523e72ca8cSmrg# Need to set the preceding variable on all platforms that support 34533e72ca8cSmrg# interlibrary dependencies. 34543e72ca8cSmrg# 'none' -- dependencies not supported. 3455fe24f8a2Smrg# 'unknown' -- same as none, but documents that we really don't know. 34563e72ca8cSmrg# 'pass_all' -- all dependencies passed with no checks. 34573e72ca8cSmrg# 'test_compile' -- check by making test program. 34583e72ca8cSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3459fe24f8a2Smrg# that responds to the $file_magic_cmd with a given extended regex. 3460fe24f8a2Smrg# If you have 'file' or equivalent on your system and you're not sure 3461fe24f8a2Smrg# whether 'pass_all' will *always* work, you probably want this one. 3462ee3138f1Smrg 34633e72ca8cSmrgcase $host_os in 34643e72ca8cSmrgaix[[4-9]]*) 34653e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 34663e72ca8cSmrg ;; 3467ee3138f1Smrg 34683e72ca8cSmrgbeos*) 34693e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 34703e72ca8cSmrg ;; 3471b425557eSmrg 34723e72ca8cSmrgbsdi[[45]]*) 34733e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 34743e72ca8cSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 34753e72ca8cSmrg lt_cv_file_magic_test_file=/shlib/libc.so 34763e72ca8cSmrg ;; 3477b425557eSmrg 34783e72ca8cSmrgcygwin*) 34793e72ca8cSmrg # func_win32_libid is a shell function defined in ltmain.sh 34803e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34813e72ca8cSmrg lt_cv_file_magic_cmd='func_win32_libid' 34823e72ca8cSmrg ;; 3483a1ed278cSmrg 34843e72ca8cSmrgmingw* | pw32*) 34853e72ca8cSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 34863e72ca8cSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 34873e72ca8cSmrg # unless we find 'file', for example because we are cross-compiling. 3488fe24f8a2Smrg if ( file / ) >/dev/null 2>&1; then 34893e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34903e72ca8cSmrg lt_cv_file_magic_cmd='func_win32_libid' 34913e72ca8cSmrg else 34923e72ca8cSmrg # Keep this pattern in sync with the one in func_win32_libid. 34933e72ca8cSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 34943e72ca8cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 34953e72ca8cSmrg fi 34963e72ca8cSmrg ;; 3497ee3138f1Smrg 34983e72ca8cSmrgcegcc*) 34993e72ca8cSmrg # use the weaker test based on 'objdump'. See mingw*. 35003e72ca8cSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 35013e72ca8cSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35023e72ca8cSmrg ;; 3503a1ed278cSmrg 35043e72ca8cSmrgdarwin* | rhapsody*) 35053e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 35063e72ca8cSmrg ;; 3507a1ed278cSmrg 35083e72ca8cSmrgfreebsd* | dragonfly*) 35093e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35103e72ca8cSmrg case $host_cpu in 35113e72ca8cSmrg i*86 ) 35123e72ca8cSmrg # Not sure whether the presence of OpenBSD here was a mistake. 35133e72ca8cSmrg # Let's accept both of them until this is cleared up. 35143e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 35153e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 35163e72ca8cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3517a1ed278cSmrg ;; 3518a1ed278cSmrg esac 35193e72ca8cSmrg else 35203e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 35213e72ca8cSmrg fi 35223e72ca8cSmrg ;; 3523a1ed278cSmrg 35243e72ca8cSmrghaiku*) 35253e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 35263e72ca8cSmrg ;; 35273e72ca8cSmrg 35283e72ca8cSmrghpux10.20* | hpux11*) 35293e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 35303e72ca8cSmrg case $host_cpu in 35313e72ca8cSmrg ia64*) 35323e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 35333e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 35343e72ca8cSmrg ;; 35353e72ca8cSmrg hppa*64*) 35363e72ca8cSmrg [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]'] 35373e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 35383e72ca8cSmrg ;; 35393e72ca8cSmrg *) 35403e72ca8cSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 35413e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 35423e72ca8cSmrg ;; 35433e72ca8cSmrg esac 35443e72ca8cSmrg ;; 35453e72ca8cSmrg 35463e72ca8cSmrginterix[[3-9]]*) 35473e72ca8cSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 35483e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 35493e72ca8cSmrg ;; 35503e72ca8cSmrg 35513e72ca8cSmrgirix5* | irix6* | nonstopux*) 35523e72ca8cSmrg case $LD in 35533e72ca8cSmrg *-32|*"-32 ") libmagic=32-bit;; 35543e72ca8cSmrg *-n32|*"-n32 ") libmagic=N32;; 35553e72ca8cSmrg *-64|*"-64 ") libmagic=64-bit;; 35563e72ca8cSmrg *) libmagic=never-match;; 35573e72ca8cSmrg esac 35583e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 35593e72ca8cSmrg ;; 35603e72ca8cSmrg 35613e72ca8cSmrg# This must be glibc/ELF. 3562fe24f8a2Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 35633e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 35643e72ca8cSmrg ;; 35653e72ca8cSmrg 35663e72ca8cSmrgnetbsd*) 35673e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 35683e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3569b425557eSmrg else 35703e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 35713e72ca8cSmrg fi 35723e72ca8cSmrg ;; 3573ee3138f1Smrg 35743e72ca8cSmrgnewos6*) 35753e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 35763e72ca8cSmrg lt_cv_file_magic_cmd=/usr/bin/file 35773e72ca8cSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 35783e72ca8cSmrg ;; 35793e72ca8cSmrg 35803e72ca8cSmrg*nto* | *qnx*) 35813e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 35823e72ca8cSmrg ;; 35833e72ca8cSmrg 3584fe24f8a2Smrgopenbsd* | bitrig*) 3585fe24f8a2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 35863e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 35873e72ca8cSmrg else 35883e72ca8cSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 35893e72ca8cSmrg fi 35903e72ca8cSmrg ;; 3591ee3138f1Smrg 35923e72ca8cSmrgosf3* | osf4* | osf5*) 35933e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 35943e72ca8cSmrg ;; 3595ee3138f1Smrg 35963e72ca8cSmrgrdos*) 35973e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 35983e72ca8cSmrg ;; 359934977a2fSmrg 36003e72ca8cSmrgsolaris*) 36013e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 36023e72ca8cSmrg ;; 360334977a2fSmrg 36043e72ca8cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 36053e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 36063e72ca8cSmrg ;; 3607ee3138f1Smrg 36083e72ca8cSmrgsysv4 | sysv4.3*) 36093e72ca8cSmrg case $host_vendor in 36103e72ca8cSmrg motorola) 36113e72ca8cSmrg 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]]' 36123e72ca8cSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 36133e72ca8cSmrg ;; 36143e72ca8cSmrg ncr) 36153e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 36163e72ca8cSmrg ;; 36173e72ca8cSmrg sequent) 36183e72ca8cSmrg lt_cv_file_magic_cmd='/bin/file' 36193e72ca8cSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 36203e72ca8cSmrg ;; 36213e72ca8cSmrg sni) 36223e72ca8cSmrg lt_cv_file_magic_cmd='/bin/file' 36233e72ca8cSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 36243e72ca8cSmrg lt_cv_file_magic_test_file=/lib/libc.so 36253e72ca8cSmrg ;; 36263e72ca8cSmrg siemens) 36273e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 36283e72ca8cSmrg ;; 36293e72ca8cSmrg pc) 36303e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 36313e72ca8cSmrg ;; 36323e72ca8cSmrg esac 36333e72ca8cSmrg ;; 3634a1ed278cSmrg 36353e72ca8cSmrgtpf*) 36363e72ca8cSmrg lt_cv_deplibs_check_method=pass_all 36373e72ca8cSmrg ;; 3638fe24f8a2Smrgos2*) 3639fe24f8a2Smrg lt_cv_deplibs_check_method=pass_all 3640fe24f8a2Smrg ;; 36413e72ca8cSmrgesac 36423e72ca8cSmrg]) 364334977a2fSmrg 36443e72ca8cSmrgfile_magic_glob= 36453e72ca8cSmrgwant_nocaseglob=no 36463e72ca8cSmrgif test "$build" = "$host"; then 36473e72ca8cSmrg case $host_os in 36483e72ca8cSmrg mingw* | pw32*) 36493e72ca8cSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 36503e72ca8cSmrg want_nocaseglob=yes 36513e72ca8cSmrg else 36523e72ca8cSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 36533e72ca8cSmrg fi 36543e72ca8cSmrg ;; 36553e72ca8cSmrg esac 36563e72ca8cSmrgfi 3657ee3138f1Smrg 36583e72ca8cSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 36593e72ca8cSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 36603e72ca8cSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3661a1ed278cSmrg 36623e72ca8cSmrg_LT_DECL([], [deplibs_check_method], [1], 36633e72ca8cSmrg [Method to check whether dependent libraries are shared objects]) 36643e72ca8cSmrg_LT_DECL([], [file_magic_cmd], [1], 36653e72ca8cSmrg [Command to use when deplibs_check_method = "file_magic"]) 36663e72ca8cSmrg_LT_DECL([], [file_magic_glob], [1], 36673e72ca8cSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 36683e72ca8cSmrg_LT_DECL([], [want_nocaseglob], [1], 36693e72ca8cSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 36703e72ca8cSmrg])# _LT_CHECK_MAGIC_METHOD 3671a1ed278cSmrg 3672a1ed278cSmrg 36733e72ca8cSmrg# LT_PATH_NM 36743e72ca8cSmrg# ---------- 36753e72ca8cSmrg# find the pathname to a BSD- or MS-compatible name lister 36763e72ca8cSmrgAC_DEFUN([LT_PATH_NM], 36773e72ca8cSmrg[AC_REQUIRE([AC_PROG_CC])dnl 36783e72ca8cSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 36793e72ca8cSmrg[if test -n "$NM"; then 36803e72ca8cSmrg # Let the user override the test. 3681fe24f8a2Smrg lt_cv_path_NM=$NM 36823e72ca8cSmrgelse 3683fe24f8a2Smrg lt_nm_to_check=${ac_tool_prefix}nm 36843e72ca8cSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 36853e72ca8cSmrg lt_nm_to_check="$lt_nm_to_check nm" 36863e72ca8cSmrg fi 36873e72ca8cSmrg for lt_tmp_nm in $lt_nm_to_check; do 3688fe24f8a2Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 36893e72ca8cSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3690fe24f8a2Smrg IFS=$lt_save_ifs 36913e72ca8cSmrg test -z "$ac_dir" && ac_dir=. 3692fe24f8a2Smrg tmp_nm=$ac_dir/$lt_tmp_nm 3693fe24f8a2Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 36943e72ca8cSmrg # Check to see if the nm accepts a BSD-compat flag. 3695fe24f8a2Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 36963e72ca8cSmrg # nm: unknown option "B" ignored 36973e72ca8cSmrg # Tru64's nm complains that /dev/null is an invalid object file 3698fe24f8a2Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3699fe24f8a2Smrg case $build_os in 3700fe24f8a2Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3701fe24f8a2Smrg *) lt_bad_file=/dev/null ;; 3702fe24f8a2Smrg esac 3703fe24f8a2Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3704fe24f8a2Smrg *$lt_bad_file* | *'Invalid file or object type'*) 37053e72ca8cSmrg lt_cv_path_NM="$tmp_nm -B" 3706fe24f8a2Smrg break 2 37073e72ca8cSmrg ;; 37083e72ca8cSmrg *) 37093e72ca8cSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 37103e72ca8cSmrg */dev/null*) 37113e72ca8cSmrg lt_cv_path_NM="$tmp_nm -p" 3712fe24f8a2Smrg break 2 37133e72ca8cSmrg ;; 37143e72ca8cSmrg *) 37153e72ca8cSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 37163e72ca8cSmrg continue # so that we can try to find one that supports BSD flags 37173e72ca8cSmrg ;; 37183e72ca8cSmrg esac 37193e72ca8cSmrg ;; 37203e72ca8cSmrg esac 37213e72ca8cSmrg fi 37223e72ca8cSmrg done 3723fe24f8a2Smrg IFS=$lt_save_ifs 37243e72ca8cSmrg done 37253e72ca8cSmrg : ${lt_cv_path_NM=no} 37263e72ca8cSmrgfi]) 3727fe24f8a2Smrgif test no != "$lt_cv_path_NM"; then 3728fe24f8a2Smrg NM=$lt_cv_path_NM 37293e72ca8cSmrgelse 37303e72ca8cSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 37313e72ca8cSmrg if test -n "$DUMPBIN"; then : 37323e72ca8cSmrg # Let the user override the test. 37333e72ca8cSmrg else 37343e72ca8cSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3735fe24f8a2Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 37363e72ca8cSmrg *COFF*) 3737fe24f8a2Smrg DUMPBIN="$DUMPBIN -symbols -headers" 3738b425557eSmrg ;; 37393e72ca8cSmrg *) 37403e72ca8cSmrg DUMPBIN=: 3741b425557eSmrg ;; 37423e72ca8cSmrg esac 37433e72ca8cSmrg fi 37443e72ca8cSmrg AC_SUBST([DUMPBIN]) 3745fe24f8a2Smrg if test : != "$DUMPBIN"; then 3746fe24f8a2Smrg NM=$DUMPBIN 37473e72ca8cSmrg fi 37483e72ca8cSmrgfi 37493e72ca8cSmrgtest -z "$NM" && NM=nm 37503e72ca8cSmrgAC_SUBST([NM]) 37513e72ca8cSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3752a1ed278cSmrg 37533e72ca8cSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 37543e72ca8cSmrg [lt_cv_nm_interface="BSD nm" 37553e72ca8cSmrg echo "int some_variable = 0;" > conftest.$ac_ext 37563e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 37573e72ca8cSmrg (eval "$ac_compile" 2>conftest.err) 37583e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 37593e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 37603e72ca8cSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 37613e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 37623e72ca8cSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 37633e72ca8cSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 37643e72ca8cSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 37653e72ca8cSmrg lt_cv_nm_interface="MS dumpbin" 37663e72ca8cSmrg fi 37673e72ca8cSmrg rm -f conftest*]) 37683e72ca8cSmrg])# LT_PATH_NM 3769a1ed278cSmrg 37703e72ca8cSmrg# Old names: 37713e72ca8cSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 37723e72ca8cSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 37733e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 37743e72ca8cSmrgdnl AC_DEFUN([AM_PROG_NM], []) 37753e72ca8cSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3776a1ed278cSmrg 37773e72ca8cSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 37783e72ca8cSmrg# -------------------------------- 37793e72ca8cSmrg# how to determine the name of the shared library 37803e72ca8cSmrg# associated with a specific link library. 37813e72ca8cSmrg# -- PORTME fill in with the dynamic library characteristics 37823e72ca8cSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 37833e72ca8cSmrg[m4_require([_LT_DECL_EGREP]) 37843e72ca8cSmrgm4_require([_LT_DECL_OBJDUMP]) 37853e72ca8cSmrgm4_require([_LT_DECL_DLLTOOL]) 37863e72ca8cSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 37873e72ca8cSmrglt_cv_sharedlib_from_linklib_cmd, 37883e72ca8cSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3789a1ed278cSmrg 37903e72ca8cSmrgcase $host_os in 37913e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 3792fe24f8a2Smrg # two different shell functions defined in ltmain.sh; 3793fe24f8a2Smrg # decide which one to use based on capabilities of $DLLTOOL 37943e72ca8cSmrg case `$DLLTOOL --help 2>&1` in 37953e72ca8cSmrg *--identify-strict*) 37963e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 37973e72ca8cSmrg ;; 37983e72ca8cSmrg *) 37993e72ca8cSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 38003e72ca8cSmrg ;; 38013e72ca8cSmrg esac 38023e72ca8cSmrg ;; 38033e72ca8cSmrg*) 38043e72ca8cSmrg # fallback: assume linklib IS sharedlib 3805fe24f8a2Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 38063e72ca8cSmrg ;; 38073e72ca8cSmrgesac 38083e72ca8cSmrg]) 38093e72ca8cSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 38103e72ca8cSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3811a1ed278cSmrg 38123e72ca8cSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 38133e72ca8cSmrg [Command to associate shared and link libraries]) 38143e72ca8cSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3815a1ed278cSmrg 3816a1ed278cSmrg 38173e72ca8cSmrg# _LT_PATH_MANIFEST_TOOL 38183e72ca8cSmrg# ---------------------- 38193e72ca8cSmrg# locate the manifest tool 38203e72ca8cSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 38213e72ca8cSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 38223e72ca8cSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 38233e72ca8cSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 38243e72ca8cSmrg [lt_cv_path_mainfest_tool=no 38253e72ca8cSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 38263e72ca8cSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 38273e72ca8cSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 38283e72ca8cSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 38293e72ca8cSmrg lt_cv_path_mainfest_tool=yes 38303e72ca8cSmrg fi 38313e72ca8cSmrg rm -f conftest*]) 3832fe24f8a2Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 38333e72ca8cSmrg MANIFEST_TOOL=: 38343e72ca8cSmrgfi 38353e72ca8cSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 38363e72ca8cSmrg])# _LT_PATH_MANIFEST_TOOL 3837a1ed278cSmrg 3838a1ed278cSmrg 3839fe24f8a2Smrg# _LT_DLL_DEF_P([FILE]) 3840fe24f8a2Smrg# --------------------- 3841fe24f8a2Smrg# True iff FILE is a Windows DLL '.def' file. 3842fe24f8a2Smrg# Keep in sync with func_dll_def_p in the libtool script 3843fe24f8a2SmrgAC_DEFUN([_LT_DLL_DEF_P], 3844fe24f8a2Smrg[dnl 3845fe24f8a2Smrg test DEF = "`$SED -n dnl 3846fe24f8a2Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3847fe24f8a2Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3848fe24f8a2Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3849fe24f8a2Smrg -e q dnl Only consider the first "real" line 3850fe24f8a2Smrg $1`" dnl 3851fe24f8a2Smrg])# _LT_DLL_DEF_P 3852fe24f8a2Smrg 3853fe24f8a2Smrg 38543e72ca8cSmrg# LT_LIB_M 38553e72ca8cSmrg# -------- 38563e72ca8cSmrg# check for math library 38573e72ca8cSmrgAC_DEFUN([LT_LIB_M], 38583e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 38593e72ca8cSmrgLIBM= 38603e72ca8cSmrgcase $host in 38613e72ca8cSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 38623e72ca8cSmrg # These system don't have libm, or don't need it 38633e72ca8cSmrg ;; 38643e72ca8cSmrg*-ncr-sysv4.3*) 3865fe24f8a2Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 38663e72ca8cSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 38673e72ca8cSmrg ;; 38683e72ca8cSmrg*) 3869fe24f8a2Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 38703e72ca8cSmrg ;; 38713e72ca8cSmrgesac 38723e72ca8cSmrgAC_SUBST([LIBM]) 38733e72ca8cSmrg])# LT_LIB_M 3874a1ed278cSmrg 38753e72ca8cSmrg# Old name: 38763e72ca8cSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 38773e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 38783e72ca8cSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3879a1ed278cSmrg 3880a1ed278cSmrg 38813e72ca8cSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 38823e72ca8cSmrg# ------------------------------- 38833e72ca8cSmrgm4_defun([_LT_COMPILER_NO_RTTI], 38843e72ca8cSmrg[m4_require([_LT_TAG_COMPILER])dnl 3885a1ed278cSmrg 38863e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3887a1ed278cSmrg 3888fe24f8a2Smrgif test yes = "$GCC"; then 38893e72ca8cSmrg case $cc_basename in 38903e72ca8cSmrg nvcc*) 38913e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 38923e72ca8cSmrg *) 38933e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 38943e72ca8cSmrg esac 38953e72ca8cSmrg 38963e72ca8cSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 38973e72ca8cSmrg lt_cv_prog_compiler_rtti_exceptions, 38983e72ca8cSmrg [-fno-rtti -fno-exceptions], [], 38993e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 39003e72ca8cSmrgfi 39013e72ca8cSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 39023e72ca8cSmrg [Compiler flag to turn off builtin functions]) 39033e72ca8cSmrg])# _LT_COMPILER_NO_RTTI 3904a1ed278cSmrg 3905a1ed278cSmrg 39063e72ca8cSmrg# _LT_CMD_GLOBAL_SYMBOLS 39073e72ca8cSmrg# ---------------------- 39083e72ca8cSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 39093e72ca8cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 39103e72ca8cSmrgAC_REQUIRE([AC_PROG_CC])dnl 39113e72ca8cSmrgAC_REQUIRE([AC_PROG_AWK])dnl 39123e72ca8cSmrgAC_REQUIRE([LT_PATH_NM])dnl 39133e72ca8cSmrgAC_REQUIRE([LT_PATH_LD])dnl 39143e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 39153e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 39163e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 3917a1ed278cSmrg 39183e72ca8cSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 39193e72ca8cSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 39203e72ca8cSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 39213e72ca8cSmrg[ 39223e72ca8cSmrg# These are sane defaults that work on at least a few old systems. 39233e72ca8cSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3924a1ed278cSmrg 39253e72ca8cSmrg# Character class describing NM global symbol codes. 39263e72ca8cSmrgsymcode='[[BCDEGRST]]' 3927a1ed278cSmrg 39283e72ca8cSmrg# Regexp to match symbols that can be accessed directly from C. 39293e72ca8cSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3930a1ed278cSmrg 39313e72ca8cSmrg# Define system-specific variables. 39323e72ca8cSmrgcase $host_os in 39333e72ca8cSmrgaix*) 39343e72ca8cSmrg symcode='[[BCDT]]' 39353e72ca8cSmrg ;; 39363e72ca8cSmrgcygwin* | mingw* | pw32* | cegcc*) 39373e72ca8cSmrg symcode='[[ABCDGISTW]]' 39383e72ca8cSmrg ;; 39393e72ca8cSmrghpux*) 3940fe24f8a2Smrg if test ia64 = "$host_cpu"; then 39413e72ca8cSmrg symcode='[[ABCDEGRST]]' 39423e72ca8cSmrg fi 39433e72ca8cSmrg ;; 39443e72ca8cSmrgirix* | nonstopux*) 39453e72ca8cSmrg symcode='[[BCDEGRST]]' 39463e72ca8cSmrg ;; 39473e72ca8cSmrgosf*) 39483e72ca8cSmrg symcode='[[BCDEGQRST]]' 39493e72ca8cSmrg ;; 39503e72ca8cSmrgsolaris*) 39513e72ca8cSmrg symcode='[[BDRT]]' 39523e72ca8cSmrg ;; 39533e72ca8cSmrgsco3.2v5*) 39543e72ca8cSmrg symcode='[[DT]]' 39553e72ca8cSmrg ;; 39563e72ca8cSmrgsysv4.2uw2*) 39573e72ca8cSmrg symcode='[[DT]]' 39583e72ca8cSmrg ;; 39593e72ca8cSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 39603e72ca8cSmrg symcode='[[ABDT]]' 39613e72ca8cSmrg ;; 39623e72ca8cSmrgsysv4) 39633e72ca8cSmrg symcode='[[DFNSTU]]' 39643e72ca8cSmrg ;; 39653e72ca8cSmrgesac 3966a1ed278cSmrg 39673e72ca8cSmrg# If we're using GNU nm, then use its standard symbol codes. 39683e72ca8cSmrgcase `$NM -V 2>&1` in 39693e72ca8cSmrg*GNU* | *'with BFD'*) 39703e72ca8cSmrg symcode='[[ABCDGIRSTW]]' ;; 39713e72ca8cSmrgesac 3972a1ed278cSmrg 3973fe24f8a2Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3974fe24f8a2Smrg # Gets list of data symbols to import. 3975fe24f8a2Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3976fe24f8a2Smrg # Adjust the below global symbol transforms to fixup imported variables. 3977fe24f8a2Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3978fe24f8a2Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3979fe24f8a2Smrg lt_c_name_lib_hook="\ 3980fe24f8a2Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3981fe24f8a2Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3982fe24f8a2Smrgelse 3983fe24f8a2Smrg # Disable hooks by default. 3984fe24f8a2Smrg lt_cv_sys_global_symbol_to_import= 3985fe24f8a2Smrg lt_cdecl_hook= 3986fe24f8a2Smrg lt_c_name_hook= 3987fe24f8a2Smrg lt_c_name_lib_hook= 3988fe24f8a2Smrgfi 3989fe24f8a2Smrg 39903e72ca8cSmrg# Transform an extracted symbol line into a proper C declaration. 39913e72ca8cSmrg# Some systems (esp. on ia64) link data and code symbols differently, 39923e72ca8cSmrg# so use this general approach. 3993fe24f8a2Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 3994fe24f8a2Smrg$lt_cdecl_hook\ 3995fe24f8a2Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 3996fe24f8a2Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 3997a1ed278cSmrg 39983e72ca8cSmrg# Transform an extracted symbol line into symbol name and symbol address 3999fe24f8a2Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4000fe24f8a2Smrg$lt_c_name_hook\ 4001fe24f8a2Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4002fe24f8a2Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4003fe24f8a2Smrg 4004fe24f8a2Smrg# Transform an extracted symbol line into symbol name with lib prefix and 4005fe24f8a2Smrg# symbol address. 4006fe24f8a2Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4007fe24f8a2Smrg$lt_c_name_lib_hook\ 4008fe24f8a2Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4009fe24f8a2Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4010fe24f8a2Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4011a1ed278cSmrg 40123e72ca8cSmrg# Handle CRLF in mingw tool chain 40133e72ca8cSmrgopt_cr= 40143e72ca8cSmrgcase $build_os in 40153e72ca8cSmrgmingw*) 40163e72ca8cSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 40173e72ca8cSmrg ;; 40183e72ca8cSmrgesac 4019a1ed278cSmrg 40203e72ca8cSmrg# Try without a prefix underscore, then with it. 40213e72ca8cSmrgfor ac_symprfx in "" "_"; do 4022a1ed278cSmrg 40233e72ca8cSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 40243e72ca8cSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 40253e72ca8cSmrg 40263e72ca8cSmrg # Write the raw and C identifiers. 40273e72ca8cSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4028fe24f8a2Smrg # Fake it for dumpbin and say T for any non-static function, 4029fe24f8a2Smrg # D for any global variable and I for any imported variable. 40303e72ca8cSmrg # Also find C++ and __fastcall symbols from MSVC++, 40313e72ca8cSmrg # which start with @ or ?. 40323e72ca8cSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 40333e72ca8cSmrg" {last_section=section; section=\$ 3};"\ 40343e72ca8cSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 40353e72ca8cSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4036fe24f8a2Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4037fe24f8a2Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4038fe24f8a2Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 40393e72ca8cSmrg" \$ 0!~/External *\|/{next};"\ 40403e72ca8cSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 40413e72ca8cSmrg" {if(hide[section]) next};"\ 4042fe24f8a2Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4043fe24f8a2Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4044fe24f8a2Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4045fe24f8a2Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 40463e72ca8cSmrg" ' prfx=^$ac_symprfx]" 40473e72ca8cSmrg else 40483e72ca8cSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 40493e72ca8cSmrg fi 40503e72ca8cSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4051a1ed278cSmrg 40523e72ca8cSmrg # Check to see that the pipe works correctly. 40533e72ca8cSmrg pipe_works=no 40543e72ca8cSmrg 40553e72ca8cSmrg rm -f conftest* 40563e72ca8cSmrg cat > conftest.$ac_ext <<_LT_EOF 40573e72ca8cSmrg#ifdef __cplusplus 40583e72ca8cSmrgextern "C" { 40593e72ca8cSmrg#endif 40603e72ca8cSmrgchar nm_test_var; 40613e72ca8cSmrgvoid nm_test_func(void); 40623e72ca8cSmrgvoid nm_test_func(void){} 40633e72ca8cSmrg#ifdef __cplusplus 40643e72ca8cSmrg} 40653e72ca8cSmrg#endif 40663e72ca8cSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 40673e72ca8cSmrg_LT_EOF 40683e72ca8cSmrg 40693e72ca8cSmrg if AC_TRY_EVAL(ac_compile); then 40703e72ca8cSmrg # Now try to grab the symbols. 40713e72ca8cSmrg nlist=conftest.nm 40723e72ca8cSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 40733e72ca8cSmrg # Try sorting and uniquifying the output. 40743e72ca8cSmrg if sort "$nlist" | uniq > "$nlist"T; then 40753e72ca8cSmrg mv -f "$nlist"T "$nlist" 4076a1ed278cSmrg else 40773e72ca8cSmrg rm -f "$nlist"T 4078a1ed278cSmrg fi 4079a1ed278cSmrg 40803e72ca8cSmrg # Make sure that we snagged all the symbols we need. 40813e72ca8cSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 40823e72ca8cSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 40833e72ca8cSmrg cat <<_LT_EOF > conftest.$ac_ext 40843e72ca8cSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4085fe24f8a2Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4086fe24f8a2Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 40873e72ca8cSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 40883e72ca8cSmrg# define LT@&t@_DLSYM_CONST 4089fe24f8a2Smrg#elif defined __osf__ 40903e72ca8cSmrg/* This system does not cope well with relocations in const data. */ 40913e72ca8cSmrg# define LT@&t@_DLSYM_CONST 40923e72ca8cSmrg#else 40933e72ca8cSmrg# define LT@&t@_DLSYM_CONST const 40943e72ca8cSmrg#endif 4095a1ed278cSmrg 40963e72ca8cSmrg#ifdef __cplusplus 40973e72ca8cSmrgextern "C" { 40983e72ca8cSmrg#endif 4099a1ed278cSmrg 41003e72ca8cSmrg_LT_EOF 41013e72ca8cSmrg # Now generate the symbol file. 41023e72ca8cSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4103a1ed278cSmrg 41043e72ca8cSmrg cat <<_LT_EOF >> conftest.$ac_ext 4105a1ed278cSmrg 41063e72ca8cSmrg/* The mapping between symbol names and symbols. */ 41073e72ca8cSmrgLT@&t@_DLSYM_CONST struct { 41083e72ca8cSmrg const char *name; 41093e72ca8cSmrg void *address; 41103e72ca8cSmrg} 41113e72ca8cSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 41123e72ca8cSmrg{ 41133e72ca8cSmrg { "@PROGRAM@", (void *) 0 }, 41143e72ca8cSmrg_LT_EOF 4115fe24f8a2Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 41163e72ca8cSmrg cat <<\_LT_EOF >> conftest.$ac_ext 41173e72ca8cSmrg {0, (void *) 0} 41183e72ca8cSmrg}; 4119a1ed278cSmrg 41203e72ca8cSmrg/* This works around a problem in FreeBSD linker */ 41213e72ca8cSmrg#ifdef FREEBSD_WORKAROUND 41223e72ca8cSmrgstatic const void *lt_preloaded_setup() { 41233e72ca8cSmrg return lt__PROGRAM__LTX_preloaded_symbols; 41243e72ca8cSmrg} 41253e72ca8cSmrg#endif 4126a1ed278cSmrg 41273e72ca8cSmrg#ifdef __cplusplus 41283e72ca8cSmrg} 41293e72ca8cSmrg#endif 41303e72ca8cSmrg_LT_EOF 41313e72ca8cSmrg # Now try linking the two files. 41323e72ca8cSmrg mv conftest.$ac_objext conftstm.$ac_objext 41333e72ca8cSmrg lt_globsym_save_LIBS=$LIBS 41343e72ca8cSmrg lt_globsym_save_CFLAGS=$CFLAGS 4135fe24f8a2Smrg LIBS=conftstm.$ac_objext 41363e72ca8cSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4137fe24f8a2Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 41383e72ca8cSmrg pipe_works=yes 4139a1ed278cSmrg fi 41403e72ca8cSmrg LIBS=$lt_globsym_save_LIBS 41413e72ca8cSmrg CFLAGS=$lt_globsym_save_CFLAGS 4142a1ed278cSmrg else 41433e72ca8cSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4144a1ed278cSmrg fi 41453e72ca8cSmrg else 41463e72ca8cSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 41473e72ca8cSmrg fi 41483e72ca8cSmrg else 41493e72ca8cSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 41503e72ca8cSmrg fi 41513e72ca8cSmrg else 41523e72ca8cSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 41533e72ca8cSmrg cat conftest.$ac_ext >&5 4154b425557eSmrg fi 41553e72ca8cSmrg rm -rf conftest* conftst* 415634977a2fSmrg 41573e72ca8cSmrg # Do not use the global_symbol_pipe unless it works. 4158fe24f8a2Smrg if test yes = "$pipe_works"; then 41593e72ca8cSmrg break 41603e72ca8cSmrg else 41613e72ca8cSmrg lt_cv_sys_global_symbol_pipe= 41623e72ca8cSmrg fi 41633e72ca8cSmrgdone 41643e72ca8cSmrg]) 41653e72ca8cSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 41663e72ca8cSmrg lt_cv_sys_global_symbol_to_cdecl= 41673e72ca8cSmrgfi 41683e72ca8cSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 41693e72ca8cSmrg AC_MSG_RESULT(failed) 41703e72ca8cSmrgelse 41713e72ca8cSmrg AC_MSG_RESULT(ok) 41723e72ca8cSmrgfi 417334977a2fSmrg 41743e72ca8cSmrg# Response file support. 41753e72ca8cSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 41763e72ca8cSmrg nm_file_list_spec='@' 41773e72ca8cSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 41783e72ca8cSmrg nm_file_list_spec='@' 41793e72ca8cSmrgfi 4180ee3138f1Smrg 41813e72ca8cSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 41823e72ca8cSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 41833e72ca8cSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 41843e72ca8cSmrg [Transform the output of nm in a proper C declaration]) 4185fe24f8a2Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4186fe24f8a2Smrg [Transform the output of nm into a list of symbols to manually relocate]) 41873e72ca8cSmrg_LT_DECL([global_symbol_to_c_name_address], 41883e72ca8cSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 41893e72ca8cSmrg [Transform the output of nm in a C name address pair]) 41903e72ca8cSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 41913e72ca8cSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 41923e72ca8cSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4193fe24f8a2Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4194fe24f8a2Smrg [The name lister interface]) 41953e72ca8cSmrg_LT_DECL([], [nm_file_list_spec], [1], 41963e72ca8cSmrg [Specify filename containing input files for $NM]) 41973e72ca8cSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 4198ee3138f1Smrg 4199ee3138f1Smrg 42003e72ca8cSmrg# _LT_COMPILER_PIC([TAGNAME]) 42013e72ca8cSmrg# --------------------------- 42023e72ca8cSmrgm4_defun([_LT_COMPILER_PIC], 42033e72ca8cSmrg[m4_require([_LT_TAG_COMPILER])dnl 42043e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 42053e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 42063e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 420734977a2fSmrg 42083e72ca8cSmrgm4_if([$1], [CXX], [ 42093e72ca8cSmrg # C++ specific cases for pic, static, wl, etc. 4210fe24f8a2Smrg if test yes = "$GXX"; then 42113e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 42123e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4213ee3138f1Smrg 42143e72ca8cSmrg case $host_os in 42153e72ca8cSmrg aix*) 42163e72ca8cSmrg # All AIX code is PIC. 4217fe24f8a2Smrg if test ia64 = "$host_cpu"; then 42183e72ca8cSmrg # AIX 5 now supports IA64 processor 42193e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 42203e72ca8cSmrg fi 4221fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42223e72ca8cSmrg ;; 4223a1ed278cSmrg 42243e72ca8cSmrg amigaos*) 42253e72ca8cSmrg case $host_cpu in 42263e72ca8cSmrg powerpc) 42273e72ca8cSmrg # see comment about AmigaOS4 .so support 42283e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42293e72ca8cSmrg ;; 42303e72ca8cSmrg m68k) 42313e72ca8cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4232fe24f8a2Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4233fe24f8a2Smrg # like '-m68040'. 42343e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 42353e72ca8cSmrg ;; 42363e72ca8cSmrg esac 42373e72ca8cSmrg ;; 4238a1ed278cSmrg 42393e72ca8cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 42403e72ca8cSmrg # PIC is the default for these OSes. 42413e72ca8cSmrg ;; 42423e72ca8cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 42433e72ca8cSmrg # This hack is so that the source file can tell whether it is being 42443e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 42453e72ca8cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 42463e72ca8cSmrg # (--disable-auto-import) libraries 42473e72ca8cSmrg m4_if([$1], [GCJ], [], 42483e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4249fe24f8a2Smrg case $host_os in 4250fe24f8a2Smrg os2*) 4251fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4252fe24f8a2Smrg ;; 4253fe24f8a2Smrg esac 42543e72ca8cSmrg ;; 42553e72ca8cSmrg darwin* | rhapsody*) 42563e72ca8cSmrg # PIC is the default on this platform 42573e72ca8cSmrg # Common symbols not allowed in MH_DYLIB files 42583e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 42593e72ca8cSmrg ;; 42603e72ca8cSmrg *djgpp*) 42613e72ca8cSmrg # DJGPP does not support shared libraries at all 42623e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 42633e72ca8cSmrg ;; 42643e72ca8cSmrg haiku*) 42653e72ca8cSmrg # PIC is the default for Haiku. 42663e72ca8cSmrg # The "-static" flag exists, but is broken. 42673e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 42683e72ca8cSmrg ;; 42693e72ca8cSmrg interix[[3-9]]*) 42703e72ca8cSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 42713e72ca8cSmrg # Instead, we relocate shared libraries at runtime. 42723e72ca8cSmrg ;; 42733e72ca8cSmrg sysv4*MP*) 42743e72ca8cSmrg if test -d /usr/nec; then 42753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 42763e72ca8cSmrg fi 42773e72ca8cSmrg ;; 42783e72ca8cSmrg hpux*) 42793e72ca8cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 42803e72ca8cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 42813e72ca8cSmrg # sets the default TLS model and affects inlining. 42823e72ca8cSmrg case $host_cpu in 42833e72ca8cSmrg hppa*64*) 42843e72ca8cSmrg ;; 42853e72ca8cSmrg *) 42863e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42873e72ca8cSmrg ;; 42883e72ca8cSmrg esac 42893e72ca8cSmrg ;; 42903e72ca8cSmrg *qnx* | *nto*) 42913e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 42923e72ca8cSmrg # it will coredump. 42933e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 42943e72ca8cSmrg ;; 42953e72ca8cSmrg *) 42963e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42973e72ca8cSmrg ;; 42983e72ca8cSmrg esac 42993e72ca8cSmrg else 43003e72ca8cSmrg case $host_os in 43013e72ca8cSmrg aix[[4-9]]*) 43023e72ca8cSmrg # All AIX code is PIC. 4303fe24f8a2Smrg if test ia64 = "$host_cpu"; then 43043e72ca8cSmrg # AIX 5 now supports IA64 processor 43053e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 43063e72ca8cSmrg else 43073e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 43083e72ca8cSmrg fi 43093e72ca8cSmrg ;; 43103e72ca8cSmrg chorus*) 43113e72ca8cSmrg case $cc_basename in 43123e72ca8cSmrg cxch68*) 43133e72ca8cSmrg # Green Hills C++ Compiler 43143e72ca8cSmrg # _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" 43153e72ca8cSmrg ;; 43163e72ca8cSmrg esac 43173e72ca8cSmrg ;; 43183e72ca8cSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 43193e72ca8cSmrg # This hack is so that the source file can tell whether it is being 43203e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 43213e72ca8cSmrg m4_if([$1], [GCJ], [], 43223e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 43233e72ca8cSmrg ;; 43243e72ca8cSmrg dgux*) 43253e72ca8cSmrg case $cc_basename in 43263e72ca8cSmrg ec++*) 43273e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43283e72ca8cSmrg ;; 43293e72ca8cSmrg ghcx*) 43303e72ca8cSmrg # Green Hills C++ Compiler 43313e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 43323e72ca8cSmrg ;; 43333e72ca8cSmrg *) 43343e72ca8cSmrg ;; 43353e72ca8cSmrg esac 43363e72ca8cSmrg ;; 43373e72ca8cSmrg freebsd* | dragonfly*) 43383e72ca8cSmrg # FreeBSD uses GNU C++ 43393e72ca8cSmrg ;; 43403e72ca8cSmrg hpux9* | hpux10* | hpux11*) 43413e72ca8cSmrg case $cc_basename in 43423e72ca8cSmrg CC*) 43433e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4344fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4345fe24f8a2Smrg if test ia64 != "$host_cpu"; then 43463e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43473e72ca8cSmrg fi 43483e72ca8cSmrg ;; 43493e72ca8cSmrg aCC*) 43503e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4351fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 43523e72ca8cSmrg case $host_cpu in 43533e72ca8cSmrg hppa*64*|ia64*) 43543e72ca8cSmrg # +Z the default 43553e72ca8cSmrg ;; 43563e72ca8cSmrg *) 43573e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43583e72ca8cSmrg ;; 43593e72ca8cSmrg esac 43603e72ca8cSmrg ;; 43613e72ca8cSmrg *) 43623e72ca8cSmrg ;; 43633e72ca8cSmrg esac 43643e72ca8cSmrg ;; 43653e72ca8cSmrg interix*) 43663e72ca8cSmrg # This is c89, which is MS Visual C++ (no shared libs) 43673e72ca8cSmrg # Anyone wants to do a port? 43683e72ca8cSmrg ;; 43693e72ca8cSmrg irix5* | irix6* | nonstopux*) 43703e72ca8cSmrg case $cc_basename in 43713e72ca8cSmrg CC*) 43723e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43733e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 43743e72ca8cSmrg # CC pic flag -KPIC is the default. 43753e72ca8cSmrg ;; 43763e72ca8cSmrg *) 43773e72ca8cSmrg ;; 43783e72ca8cSmrg esac 43793e72ca8cSmrg ;; 4380fe24f8a2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 43813e72ca8cSmrg case $cc_basename in 43823e72ca8cSmrg KCC*) 43833e72ca8cSmrg # KAI C++ Compiler 43843e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 43853e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43863e72ca8cSmrg ;; 43873e72ca8cSmrg ecpc* ) 4388fe24f8a2Smrg # old Intel C++ for x86_64, which still supported -KPIC. 43893e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43903e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 43913e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43923e72ca8cSmrg ;; 43933e72ca8cSmrg icpc* ) 43943e72ca8cSmrg # Intel C++, used to be incompatible with GCC. 43953e72ca8cSmrg # ICC 10 doesn't accept -KPIC any more. 43963e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 43973e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 43983e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 43993e72ca8cSmrg ;; 44003e72ca8cSmrg pgCC* | pgcpp*) 44013e72ca8cSmrg # Portland Group C++ compiler 44023e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44033e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 44043e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44053e72ca8cSmrg ;; 44063e72ca8cSmrg cxx*) 44073e72ca8cSmrg # Compaq C++ 44083e72ca8cSmrg # Make sure the PIC flag is empty. It appears that all Alpha 44093e72ca8cSmrg # Linux and Compaq Tru64 Unix objects are PIC. 44103e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44113e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44123e72ca8cSmrg ;; 44133e72ca8cSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 44143e72ca8cSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 44153e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44163e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 44173e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 44183e72ca8cSmrg ;; 44193e72ca8cSmrg *) 44203e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 44213e72ca8cSmrg *Sun\ C*) 44223e72ca8cSmrg # Sun C++ 5.9 44233e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44243e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44253e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44263e72ca8cSmrg ;; 44273e72ca8cSmrg esac 44283e72ca8cSmrg ;; 44293e72ca8cSmrg esac 44303e72ca8cSmrg ;; 44313e72ca8cSmrg lynxos*) 44323e72ca8cSmrg ;; 44333e72ca8cSmrg m88k*) 44343e72ca8cSmrg ;; 44353e72ca8cSmrg mvs*) 44363e72ca8cSmrg case $cc_basename in 44373e72ca8cSmrg cxx*) 44383e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 44393e72ca8cSmrg ;; 44403e72ca8cSmrg *) 44413e72ca8cSmrg ;; 44423e72ca8cSmrg esac 44433e72ca8cSmrg ;; 44443e72ca8cSmrg netbsd*) 44453e72ca8cSmrg ;; 44463e72ca8cSmrg *qnx* | *nto*) 44473e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 44483e72ca8cSmrg # it will coredump. 44493e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 44503e72ca8cSmrg ;; 44513e72ca8cSmrg osf3* | osf4* | osf5*) 44523e72ca8cSmrg case $cc_basename in 44533e72ca8cSmrg KCC*) 44543e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 44553e72ca8cSmrg ;; 44563e72ca8cSmrg RCC*) 44573e72ca8cSmrg # Rational C++ 2.4.1 44583e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44593e72ca8cSmrg ;; 44603e72ca8cSmrg cxx*) 44613e72ca8cSmrg # Digital/Compaq C++ 44623e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 44633e72ca8cSmrg # Make sure the PIC flag is empty. It appears that all Alpha 44643e72ca8cSmrg # Linux and Compaq Tru64 Unix objects are PIC. 44653e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 44663e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 44673e72ca8cSmrg ;; 44683e72ca8cSmrg *) 44693e72ca8cSmrg ;; 44703e72ca8cSmrg esac 44713e72ca8cSmrg ;; 44723e72ca8cSmrg psos*) 44733e72ca8cSmrg ;; 44743e72ca8cSmrg solaris*) 44753e72ca8cSmrg case $cc_basename in 44763e72ca8cSmrg CC* | sunCC*) 44773e72ca8cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 44783e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 44793e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44803e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 44813e72ca8cSmrg ;; 44823e72ca8cSmrg gcx*) 44833e72ca8cSmrg # Green Hills C++ Compiler 44843e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 44853e72ca8cSmrg ;; 44863e72ca8cSmrg *) 44873e72ca8cSmrg ;; 44883e72ca8cSmrg esac 44893e72ca8cSmrg ;; 44903e72ca8cSmrg sunos4*) 44913e72ca8cSmrg case $cc_basename in 44923e72ca8cSmrg CC*) 44933e72ca8cSmrg # Sun C++ 4.x 44943e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 44953e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 44963e72ca8cSmrg ;; 44973e72ca8cSmrg lcc*) 44983e72ca8cSmrg # Lucid 44993e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 45003e72ca8cSmrg ;; 45013e72ca8cSmrg *) 45023e72ca8cSmrg ;; 45033e72ca8cSmrg esac 45043e72ca8cSmrg ;; 45053e72ca8cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 45063e72ca8cSmrg case $cc_basename in 45073e72ca8cSmrg CC*) 45083e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45093e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45103e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45113e72ca8cSmrg ;; 45123e72ca8cSmrg esac 45133e72ca8cSmrg ;; 45143e72ca8cSmrg tandem*) 45153e72ca8cSmrg case $cc_basename in 45163e72ca8cSmrg NCC*) 45173e72ca8cSmrg # NonStop-UX NCC 3.20 45183e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 45193e72ca8cSmrg ;; 45203e72ca8cSmrg *) 45213e72ca8cSmrg ;; 45223e72ca8cSmrg esac 45233e72ca8cSmrg ;; 45243e72ca8cSmrg vxworks*) 45253e72ca8cSmrg ;; 45263e72ca8cSmrg *) 45273e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 45283e72ca8cSmrg ;; 45293e72ca8cSmrg esac 45303e72ca8cSmrg fi 45313e72ca8cSmrg], 45323e72ca8cSmrg[ 4533fe24f8a2Smrg if test yes = "$GCC"; then 45343e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 45353e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4536a1ed278cSmrg 45373e72ca8cSmrg case $host_os in 45383e72ca8cSmrg aix*) 45393e72ca8cSmrg # All AIX code is PIC. 4540fe24f8a2Smrg if test ia64 = "$host_cpu"; then 45413e72ca8cSmrg # AIX 5 now supports IA64 processor 45423e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 45433e72ca8cSmrg fi 4544fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45453e72ca8cSmrg ;; 4546a1ed278cSmrg 45473e72ca8cSmrg amigaos*) 45483e72ca8cSmrg case $host_cpu in 45493e72ca8cSmrg powerpc) 45503e72ca8cSmrg # see comment about AmigaOS4 .so support 45513e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 45523e72ca8cSmrg ;; 45533e72ca8cSmrg m68k) 45543e72ca8cSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4555fe24f8a2Smrg # adding the '-m68020' flag to GCC prevents building anything better, 4556fe24f8a2Smrg # like '-m68040'. 45573e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 45583e72ca8cSmrg ;; 45593e72ca8cSmrg esac 45603e72ca8cSmrg ;; 4561a1ed278cSmrg 45623e72ca8cSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 45633e72ca8cSmrg # PIC is the default for these OSes. 45643e72ca8cSmrg ;; 4565a1ed278cSmrg 45663e72ca8cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 45673e72ca8cSmrg # This hack is so that the source file can tell whether it is being 45683e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 45693e72ca8cSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 45703e72ca8cSmrg # (--disable-auto-import) libraries 45713e72ca8cSmrg m4_if([$1], [GCJ], [], 45723e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4573fe24f8a2Smrg case $host_os in 4574fe24f8a2Smrg os2*) 4575fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4576fe24f8a2Smrg ;; 4577fe24f8a2Smrg esac 45783e72ca8cSmrg ;; 4579a1ed278cSmrg 45803e72ca8cSmrg darwin* | rhapsody*) 45813e72ca8cSmrg # PIC is the default on this platform 45823e72ca8cSmrg # Common symbols not allowed in MH_DYLIB files 45833e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 45843e72ca8cSmrg ;; 4585a1ed278cSmrg 45863e72ca8cSmrg haiku*) 45873e72ca8cSmrg # PIC is the default for Haiku. 45883e72ca8cSmrg # The "-static" flag exists, but is broken. 45893e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 45903e72ca8cSmrg ;; 4591a1ed278cSmrg 45923e72ca8cSmrg hpux*) 45933e72ca8cSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 45943e72ca8cSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 45953e72ca8cSmrg # sets the default TLS model and affects inlining. 45963e72ca8cSmrg case $host_cpu in 45973e72ca8cSmrg hppa*64*) 45983e72ca8cSmrg # +Z the default 45993e72ca8cSmrg ;; 46003e72ca8cSmrg *) 46013e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46023e72ca8cSmrg ;; 46033e72ca8cSmrg esac 46043e72ca8cSmrg ;; 4605a1ed278cSmrg 46063e72ca8cSmrg interix[[3-9]]*) 46073e72ca8cSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 46083e72ca8cSmrg # Instead, we relocate shared libraries at runtime. 46093e72ca8cSmrg ;; 4610a1ed278cSmrg 46113e72ca8cSmrg msdosdjgpp*) 46123e72ca8cSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 46133e72ca8cSmrg # on systems that don't support them. 46143e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 46153e72ca8cSmrg enable_shared=no 46163e72ca8cSmrg ;; 4617a1ed278cSmrg 46183e72ca8cSmrg *nto* | *qnx*) 46193e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 46203e72ca8cSmrg # it will coredump. 46213e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 46223e72ca8cSmrg ;; 4623a1ed278cSmrg 46243e72ca8cSmrg sysv4*MP*) 46253e72ca8cSmrg if test -d /usr/nec; then 46263e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 46273e72ca8cSmrg fi 46283e72ca8cSmrg ;; 4629a1ed278cSmrg 46303e72ca8cSmrg *) 46313e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 46323e72ca8cSmrg ;; 46333e72ca8cSmrg esac 4634a1ed278cSmrg 46353e72ca8cSmrg case $cc_basename in 46363e72ca8cSmrg nvcc*) # Cuda Compiler Driver 2.2 46373e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 46383e72ca8cSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 46393e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 46403e72ca8cSmrg fi 46413e72ca8cSmrg ;; 46423e72ca8cSmrg esac 4643a1ed278cSmrg else 46443e72ca8cSmrg # PORTME Check for flag to pass linker flags through the system compiler. 46453e72ca8cSmrg case $host_os in 46463e72ca8cSmrg aix*) 46473e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4648fe24f8a2Smrg if test ia64 = "$host_cpu"; then 46493e72ca8cSmrg # AIX 5 now supports IA64 processor 46503e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 46513e72ca8cSmrg else 46523e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 46533e72ca8cSmrg fi 46543e72ca8cSmrg ;; 4655ee3138f1Smrg 4656fe24f8a2Smrg darwin* | rhapsody*) 4657fe24f8a2Smrg # PIC is the default on this platform 4658fe24f8a2Smrg # Common symbols not allowed in MH_DYLIB files 4659fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4660fe24f8a2Smrg case $cc_basename in 4661fe24f8a2Smrg nagfor*) 4662fe24f8a2Smrg # NAG Fortran compiler 4663fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4664fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4665fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4666fe24f8a2Smrg ;; 4667fe24f8a2Smrg esac 4668fe24f8a2Smrg ;; 4669fe24f8a2Smrg 46703e72ca8cSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 46713e72ca8cSmrg # This hack is so that the source file can tell whether it is being 46723e72ca8cSmrg # built for inclusion in a dll (and should export symbols for example). 46733e72ca8cSmrg m4_if([$1], [GCJ], [], 46743e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4675fe24f8a2Smrg case $host_os in 4676fe24f8a2Smrg os2*) 4677fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4678fe24f8a2Smrg ;; 4679fe24f8a2Smrg esac 46803e72ca8cSmrg ;; 4681ee3138f1Smrg 46823e72ca8cSmrg hpux9* | hpux10* | hpux11*) 46833e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 46843e72ca8cSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 46853e72ca8cSmrg # not for PA HP-UX. 46863e72ca8cSmrg case $host_cpu in 46873e72ca8cSmrg hppa*64*|ia64*) 46883e72ca8cSmrg # +Z the default 46893e72ca8cSmrg ;; 46903e72ca8cSmrg *) 46913e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 46923e72ca8cSmrg ;; 46933e72ca8cSmrg esac 46943e72ca8cSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4695fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 46963e72ca8cSmrg ;; 469734977a2fSmrg 46983e72ca8cSmrg irix5* | irix6* | nonstopux*) 46993e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47003e72ca8cSmrg # PIC (with -KPIC) is the default. 47013e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47023e72ca8cSmrg ;; 470334977a2fSmrg 4704fe24f8a2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 47053e72ca8cSmrg case $cc_basename in 4706fe24f8a2Smrg # old Intel for x86_64, which still supported -KPIC. 47073e72ca8cSmrg ecc*) 47083e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47093e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47103e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47113e72ca8cSmrg ;; 47123e72ca8cSmrg # icc used to be incompatible with GCC. 47133e72ca8cSmrg # ICC 10 doesn't accept -KPIC any more. 47143e72ca8cSmrg icc* | ifort*) 47153e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47163e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47173e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47183e72ca8cSmrg ;; 47193e72ca8cSmrg # Lahey Fortran 8.1. 47203e72ca8cSmrg lf95*) 47213e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47223e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 47233e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 47243e72ca8cSmrg ;; 47253e72ca8cSmrg nagfor*) 47263e72ca8cSmrg # NAG Fortran compiler 47273e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 47283e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 47293e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47303e72ca8cSmrg ;; 4731fe24f8a2Smrg tcc*) 4732fe24f8a2Smrg # Fabrice Bellard et al's Tiny C Compiler 4733fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4734fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4735fe24f8a2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4736fe24f8a2Smrg ;; 47373e72ca8cSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 47383e72ca8cSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 47393e72ca8cSmrg # which looks to be a dead project) 47403e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47413e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47423e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47433e72ca8cSmrg ;; 47443e72ca8cSmrg ccc*) 47453e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47463e72ca8cSmrg # All Alpha code is PIC. 47473e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 47483e72ca8cSmrg ;; 47493e72ca8cSmrg xl* | bgxl* | bgf* | mpixl*) 47503e72ca8cSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 47513e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47523e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 47533e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 47543e72ca8cSmrg ;; 47553e72ca8cSmrg *) 47563e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 47573e72ca8cSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 47583e72ca8cSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 47593e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47603e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47613e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 47623e72ca8cSmrg ;; 47633e72ca8cSmrg *Sun\ F* | *Sun*Fortran*) 47643e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47653e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47663e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 47673e72ca8cSmrg ;; 47683e72ca8cSmrg *Sun\ C*) 47693e72ca8cSmrg # Sun C 5.9 47703e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47713e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47723e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47733e72ca8cSmrg ;; 47743e72ca8cSmrg *Intel*\ [[CF]]*Compiler*) 47753e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47763e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 47773e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 47783e72ca8cSmrg ;; 47793e72ca8cSmrg *Portland\ Group*) 47803e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 47813e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 47823e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47833e72ca8cSmrg ;; 47843e72ca8cSmrg esac 47853e72ca8cSmrg ;; 47863e72ca8cSmrg esac 47873e72ca8cSmrg ;; 478834977a2fSmrg 47893e72ca8cSmrg newsos6) 47903e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 47913e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 47923e72ca8cSmrg ;; 4793ee3138f1Smrg 47943e72ca8cSmrg *nto* | *qnx*) 47953e72ca8cSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 47963e72ca8cSmrg # it will coredump. 47973e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 47983e72ca8cSmrg ;; 4799ee3138f1Smrg 48003e72ca8cSmrg osf3* | osf4* | osf5*) 48013e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48023e72ca8cSmrg # All OSF/1 code is PIC. 48033e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48043e72ca8cSmrg ;; 4805ee3138f1Smrg 48063e72ca8cSmrg rdos*) 48073e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 48083e72ca8cSmrg ;; 4809ee3138f1Smrg 48103e72ca8cSmrg solaris*) 48113e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48123e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48133e72ca8cSmrg case $cc_basename in 48143e72ca8cSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 48153e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 48163e72ca8cSmrg *) 48173e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 48183e72ca8cSmrg esac 48193e72ca8cSmrg ;; 4820ee3138f1Smrg 48213e72ca8cSmrg sunos4*) 48223e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 48233e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 48243e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48253e72ca8cSmrg ;; 4826ee3138f1Smrg 48273e72ca8cSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 48283e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48293e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48303e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48313e72ca8cSmrg ;; 48323e72ca8cSmrg 48333e72ca8cSmrg sysv4*MP*) 4834fe24f8a2Smrg if test -d /usr/nec; then 48353e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 48363e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48373e72ca8cSmrg fi 48383e72ca8cSmrg ;; 48393e72ca8cSmrg 48403e72ca8cSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 48413e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48423e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 48433e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48443e72ca8cSmrg ;; 4845b425557eSmrg 48463e72ca8cSmrg unicos*) 48473e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 48483e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48493e72ca8cSmrg ;; 4850b425557eSmrg 48513e72ca8cSmrg uts4*) 48523e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 48533e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 48543e72ca8cSmrg ;; 4855b425557eSmrg 48563e72ca8cSmrg *) 48573e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 48583e72ca8cSmrg ;; 48593e72ca8cSmrg esac 48603e72ca8cSmrg fi 48613e72ca8cSmrg]) 48623e72ca8cSmrgcase $host_os in 4863fe24f8a2Smrg # For platforms that do not support PIC, -DPIC is meaningless: 48643e72ca8cSmrg *djgpp*) 48653e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 48663e72ca8cSmrg ;; 48673e72ca8cSmrg *) 48683e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 48693e72ca8cSmrg ;; 48703e72ca8cSmrgesac 4871b425557eSmrg 48723e72ca8cSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 48733e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 48743e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 48753e72ca8cSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4876b425557eSmrg 48773e72ca8cSmrg# 48783e72ca8cSmrg# Check to make sure the PIC flag actually works. 48793e72ca8cSmrg# 48803e72ca8cSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 48813e72ca8cSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 48823e72ca8cSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 48833e72ca8cSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 48843e72ca8cSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 48853e72ca8cSmrg "" | " "*) ;; 48863e72ca8cSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 48873e72ca8cSmrg esac], 48883e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 48893e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 48903e72ca8cSmrgfi 48913e72ca8cSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 48923e72ca8cSmrg [Additional compiler flags for building library objects]) 4893b425557eSmrg 48943e72ca8cSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 48953e72ca8cSmrg [How to pass a linker flag through the compiler]) 48963e72ca8cSmrg# 48973e72ca8cSmrg# Check to make sure the static flag actually works. 48983e72ca8cSmrg# 48993e72ca8cSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 49003e72ca8cSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 49013e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 49023e72ca8cSmrg $lt_tmp_static_flag, 49033e72ca8cSmrg [], 49043e72ca8cSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 49053e72ca8cSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 49063e72ca8cSmrg [Compiler flag to prevent dynamic linking]) 49073e72ca8cSmrg])# _LT_COMPILER_PIC 4908b425557eSmrg 4909ee3138f1Smrg 49103e72ca8cSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 49113e72ca8cSmrg# ---------------------------- 49123e72ca8cSmrg# See if the linker supports building shared libraries. 49133e72ca8cSmrgm4_defun([_LT_LINKER_SHLIBS], 49143e72ca8cSmrg[AC_REQUIRE([LT_PATH_LD])dnl 49153e72ca8cSmrgAC_REQUIRE([LT_PATH_NM])dnl 49163e72ca8cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 49173e72ca8cSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 49183e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 49193e72ca8cSmrgm4_require([_LT_DECL_SED])dnl 49203e72ca8cSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 49213e72ca8cSmrgm4_require([_LT_TAG_COMPILER])dnl 49223e72ca8cSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 49233e72ca8cSmrgm4_if([$1], [CXX], [ 49243e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49253e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49263e72ca8cSmrg case $host_os in 49273e72ca8cSmrg aix[[4-9]]*) 49283e72ca8cSmrg # If we're using GNU nm, then we don't want the "-C" option. 4929fe24f8a2Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4930fe24f8a2Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4931fe24f8a2Smrg # weak defined symbols like other global defined symbols, whereas 4932fe24f8a2Smrg # GNU nm marks them as "W". 4933fe24f8a2Smrg # While the 'weak' keyword is ignored in the Export File, we need 4934fe24f8a2Smrg # it in the Import File for the 'aix-soname' feature, so we have 4935fe24f8a2Smrg # to replace the "-B" option with "-P" for AIX nm. 49363e72ca8cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4937fe24f8a2Smrg _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' 49383e72ca8cSmrg else 4939fe24f8a2Smrg _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' 49403e72ca8cSmrg fi 49413e72ca8cSmrg ;; 49423e72ca8cSmrg pw32*) 4943fe24f8a2Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 49443e72ca8cSmrg ;; 49453e72ca8cSmrg cygwin* | mingw* | cegcc*) 49463e72ca8cSmrg case $cc_basename in 49473e72ca8cSmrg cl*) 49483e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 49493e72ca8cSmrg ;; 49503e72ca8cSmrg *) 49513e72ca8cSmrg _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' 49523e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 49533e72ca8cSmrg ;; 49543e72ca8cSmrg esac 49553e72ca8cSmrg ;; 49563e72ca8cSmrg *) 49573e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49583e72ca8cSmrg ;; 49593e72ca8cSmrg esac 49603e72ca8cSmrg], [ 49613e72ca8cSmrg runpath_var= 49623e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 49633e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 49643e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)= 49653e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 49663e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 49673e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 49683e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 49693e72ca8cSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 49703e72ca8cSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 49713e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 49723e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 49733e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 49743e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 49753e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 49763e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 49773e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=no 49783e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 49793e72ca8cSmrg _LT_TAGVAR(module_cmds, $1)= 49803e72ca8cSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 49813e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 49823e72ca8cSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 49833e72ca8cSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 49843e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 49853e72ca8cSmrg # include_expsyms should be a list of space-separated symbols to be *always* 49863e72ca8cSmrg # included in the symbol list 49873e72ca8cSmrg _LT_TAGVAR(include_expsyms, $1)= 49883e72ca8cSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4989fe24f8a2Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 4990fe24f8a2Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 4991fe24f8a2Smrg # as well as any symbol that contains 'd'. 49923e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 49933e72ca8cSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 49943e72ca8cSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 49953e72ca8cSmrg # the symbol is explicitly referenced. Since portable code cannot 49963e72ca8cSmrg # rely on this symbol name, it's probably fine to never include it in 49973e72ca8cSmrg # preloaded symbol tables. 49983e72ca8cSmrg # Exclude shared library initialization/finalization symbols. 49993e72ca8cSmrgdnl Note also adjust exclude_expsyms for C++ above. 50003e72ca8cSmrg extract_expsyms_cmds= 5001ee3138f1Smrg 50023e72ca8cSmrg case $host_os in 50033e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 50043e72ca8cSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 50053e72ca8cSmrg # When not using gcc, we currently assume that we are using 50063e72ca8cSmrg # Microsoft Visual C++. 5007fe24f8a2Smrg if test yes != "$GCC"; then 50083e72ca8cSmrg with_gnu_ld=no 50093e72ca8cSmrg fi 50103e72ca8cSmrg ;; 50113e72ca8cSmrg interix*) 50123e72ca8cSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 50133e72ca8cSmrg with_gnu_ld=yes 50143e72ca8cSmrg ;; 5015fe24f8a2Smrg openbsd* | bitrig*) 50163e72ca8cSmrg with_gnu_ld=no 50173e72ca8cSmrg ;; 50183e72ca8cSmrg esac 501934977a2fSmrg 50203e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 502134977a2fSmrg 50223e72ca8cSmrg # On some targets, GNU ld is compatible enough with the native linker 50233e72ca8cSmrg # that we're better off using the native interface for both. 50243e72ca8cSmrg lt_use_gnu_ld_interface=no 5025fe24f8a2Smrg if test yes = "$with_gnu_ld"; then 50263e72ca8cSmrg case $host_os in 50273e72ca8cSmrg aix*) 50283e72ca8cSmrg # The AIX port of GNU ld has always aspired to compatibility 50293e72ca8cSmrg # with the native linker. However, as the warning in the GNU ld 50303e72ca8cSmrg # block says, versions before 2.19.5* couldn't really create working 50313e72ca8cSmrg # shared libraries, regardless of the interface used. 50323e72ca8cSmrg case `$LD -v 2>&1` in 50333e72ca8cSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 50343e72ca8cSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 50353e72ca8cSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 50363e72ca8cSmrg *) 50373e72ca8cSmrg lt_use_gnu_ld_interface=yes 5038a1ed278cSmrg ;; 50393e72ca8cSmrg esac 50403e72ca8cSmrg ;; 50413e72ca8cSmrg *) 50423e72ca8cSmrg lt_use_gnu_ld_interface=yes 50433e72ca8cSmrg ;; 50443e72ca8cSmrg esac 50453e72ca8cSmrg fi 5046a1ed278cSmrg 5047fe24f8a2Smrg if test yes = "$lt_use_gnu_ld_interface"; then 50483e72ca8cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5049fe24f8a2Smrg wlarc='$wl' 5050a1ed278cSmrg 50513e72ca8cSmrg # Set some defaults for GNU ld with shared library support. These 50523e72ca8cSmrg # are reset later if shared libraries are not supported. Putting them 50533e72ca8cSmrg # here allows them to be overridden if necessary. 50543e72ca8cSmrg runpath_var=LD_RUN_PATH 5055fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5056fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 50573e72ca8cSmrg # ancient GNU ld didn't support --whole-archive et. al. 50583e72ca8cSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5059fe24f8a2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 50603e72ca8cSmrg else 50613e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 50623e72ca8cSmrg fi 50633e72ca8cSmrg supports_anon_versioning=no 5064fe24f8a2Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 50653e72ca8cSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 50663e72ca8cSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 50673e72ca8cSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 50683e72ca8cSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 50693e72ca8cSmrg *\ 2.11.*) ;; # other 2.11 versions 50703e72ca8cSmrg *) supports_anon_versioning=yes ;; 50713e72ca8cSmrg esac 5072a1ed278cSmrg 50733e72ca8cSmrg # See if GNU ld supports shared libraries. 50743e72ca8cSmrg case $host_os in 50753e72ca8cSmrg aix[[3-9]]*) 50763e72ca8cSmrg # On AIX/PPC, the GNU linker is very broken 5077fe24f8a2Smrg if test ia64 != "$host_cpu"; then 50783e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 50793e72ca8cSmrg cat <<_LT_EOF 1>&2 5080a1ed278cSmrg 50813e72ca8cSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 50823e72ca8cSmrg*** to be unable to reliably create shared libraries on AIX. 50833e72ca8cSmrg*** Therefore, libtool is disabling shared libraries support. If you 50843e72ca8cSmrg*** really care for shared libraries, you may want to install binutils 50853e72ca8cSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 50863e72ca8cSmrg*** You will then need to restart the configuration process. 5087a1ed278cSmrg 50883e72ca8cSmrg_LT_EOF 50893e72ca8cSmrg fi 50903e72ca8cSmrg ;; 5091ee3138f1Smrg 50923e72ca8cSmrg amigaos*) 50933e72ca8cSmrg case $host_cpu in 50943e72ca8cSmrg powerpc) 50953e72ca8cSmrg # see comment about AmigaOS4 .so support 5096fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 50973e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 50983e72ca8cSmrg ;; 50993e72ca8cSmrg m68k) 51003e72ca8cSmrg _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)' 51013e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 51023e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 51033e72ca8cSmrg ;; 51043e72ca8cSmrg esac 51053e72ca8cSmrg ;; 5106ee3138f1Smrg 51073e72ca8cSmrg beos*) 51083e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 51093e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51103e72ca8cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 51113e72ca8cSmrg # support --undefined. This deserves some investigation. FIXME 5112fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51133e72ca8cSmrg else 51143e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51153e72ca8cSmrg fi 51163e72ca8cSmrg ;; 5117ee3138f1Smrg 51183e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 51193e72ca8cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 51203e72ca8cSmrg # as there is no search path for DLLs. 51213e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5122fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 51233e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 51243e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 51253e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 51263e72ca8cSmrg _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' 51273e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5128ee3138f1Smrg 51293e72ca8cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5130fe24f8a2Smrg _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' 5131fe24f8a2Smrg # If the export-symbols file already is a .def file, use it as 5132fe24f8a2Smrg # is; otherwise, prepend EXPORTS... 5133fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5134fe24f8a2Smrg cp $export_symbols $output_objdir/$soname.def; 5135fe24f8a2Smrg else 5136fe24f8a2Smrg echo EXPORTS > $output_objdir/$soname.def; 5137fe24f8a2Smrg cat $export_symbols >> $output_objdir/$soname.def; 5138fe24f8a2Smrg fi~ 5139fe24f8a2Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 51403e72ca8cSmrg else 51413e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 51423e72ca8cSmrg fi 51433e72ca8cSmrg ;; 5144ee3138f1Smrg 51453e72ca8cSmrg haiku*) 5146fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 51473e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 51483e72ca8cSmrg ;; 5149ee3138f1Smrg 5150fe24f8a2Smrg os2*) 5151fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5152fe24f8a2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5153fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5154fe24f8a2Smrg shrext_cmds=.dll 5155fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5156fe24f8a2Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5157fe24f8a2Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5158fe24f8a2Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5159fe24f8a2Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5160fe24f8a2Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5161fe24f8a2Smrg emximp -o $lib $output_objdir/$libname.def' 5162fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5163fe24f8a2Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5164fe24f8a2Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5165fe24f8a2Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5166fe24f8a2Smrg prefix_cmds="$SED"~ 5167fe24f8a2Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5168fe24f8a2Smrg prefix_cmds="$prefix_cmds -e 1d"; 5169fe24f8a2Smrg fi~ 5170fe24f8a2Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5171fe24f8a2Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5172fe24f8a2Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5173fe24f8a2Smrg emximp -o $lib $output_objdir/$libname.def' 5174fe24f8a2Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5175fe24f8a2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5176fe24f8a2Smrg ;; 5177fe24f8a2Smrg 51783e72ca8cSmrg interix[[3-9]]*) 51793e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 51803e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5181fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5182fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 51833e72ca8cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 51843e72ca8cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 51853e72ca8cSmrg # default) and relocated if they conflict, which is a slow very memory 51863e72ca8cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 51873e72ca8cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 51883e72ca8cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5189fe24f8a2Smrg _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' 5190fe24f8a2Smrg _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' 51913e72ca8cSmrg ;; 5192ee3138f1Smrg 51933e72ca8cSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 51943e72ca8cSmrg tmp_diet=no 5195fe24f8a2Smrg if test linux-dietlibc = "$host_os"; then 51963e72ca8cSmrg case $cc_basename in 51973e72ca8cSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 51983e72ca8cSmrg esac 51993e72ca8cSmrg fi 52003e72ca8cSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5201fe24f8a2Smrg && test no = "$tmp_diet" 52023e72ca8cSmrg then 52033e72ca8cSmrg tmp_addflag=' $pic_flag' 52043e72ca8cSmrg tmp_sharedflag='-shared' 52053e72ca8cSmrg case $cc_basename,$host_cpu in 52063e72ca8cSmrg pgcc*) # Portland Group C compiler 5207fe24f8a2Smrg _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' 52083e72ca8cSmrg tmp_addflag=' $pic_flag' 52093e72ca8cSmrg ;; 52103e72ca8cSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 52113e72ca8cSmrg # Portland Group f77 and f90 compilers 5212fe24f8a2Smrg _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' 52133e72ca8cSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 52143e72ca8cSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 52153e72ca8cSmrg tmp_addflag=' -i_dynamic' ;; 52163e72ca8cSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 52173e72ca8cSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 52183e72ca8cSmrg ifc* | ifort*) # Intel Fortran compiler 52193e72ca8cSmrg tmp_addflag=' -nofor_main' ;; 52203e72ca8cSmrg lf95*) # Lahey Fortran 8.1 52213e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 52223e72ca8cSmrg tmp_sharedflag='--shared' ;; 5223fe24f8a2Smrg nagfor*) # NAGFOR 5.3 5224fe24f8a2Smrg tmp_sharedflag='-Wl,-shared' ;; 52253e72ca8cSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 52263e72ca8cSmrg tmp_sharedflag='-qmkshrobj' 52273e72ca8cSmrg tmp_addflag= ;; 52283e72ca8cSmrg nvcc*) # Cuda Compiler Driver 2.2 5229fe24f8a2Smrg _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' 52303e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52313e72ca8cSmrg ;; 52323e72ca8cSmrg esac 52333e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 52343e72ca8cSmrg *Sun\ C*) # Sun C 5.9 5235fe24f8a2Smrg _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' 52363e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 52373e72ca8cSmrg tmp_sharedflag='-G' ;; 52383e72ca8cSmrg *Sun\ F*) # Sun Fortran 8.3 52393e72ca8cSmrg tmp_sharedflag='-G' ;; 52403e72ca8cSmrg esac 5241fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5242ee3138f1Smrg 5243fe24f8a2Smrg if test yes = "$supports_anon_versioning"; then 52443e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5245fe24f8a2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5246fe24f8a2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5247fe24f8a2Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 52483e72ca8cSmrg fi 5249ee3138f1Smrg 52503e72ca8cSmrg case $cc_basename in 5251fe24f8a2Smrg tcc*) 5252fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5253fe24f8a2Smrg ;; 52543e72ca8cSmrg xlf* | bgf* | bgxlf* | mpixlf*) 52553e72ca8cSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 52563e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5257fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 52583e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5259fe24f8a2Smrg if test yes = "$supports_anon_versioning"; then 52603e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5261fe24f8a2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5262fe24f8a2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5263fe24f8a2Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 52643e72ca8cSmrg fi 52653e72ca8cSmrg ;; 5266b425557eSmrg esac 52673e72ca8cSmrg else 52683e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 52693e72ca8cSmrg fi 52703e72ca8cSmrg ;; 5271ee3138f1Smrg 52723e72ca8cSmrg netbsd*) 52733e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 52743e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 52753e72ca8cSmrg wlarc= 52763e72ca8cSmrg else 5277fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5278fe24f8a2Smrg _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' 52793e72ca8cSmrg fi 52803e72ca8cSmrg ;; 52813e72ca8cSmrg 52823e72ca8cSmrg solaris*) 52833e72ca8cSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5284a1ed278cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 52853e72ca8cSmrg cat <<_LT_EOF 1>&2 5286ee3138f1Smrg 52873e72ca8cSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 52883e72ca8cSmrg*** create shared libraries on Solaris systems. Therefore, libtool 52893e72ca8cSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 52903e72ca8cSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 52913e72ca8cSmrg*** your PATH or compiler configuration so that the native linker is 52923e72ca8cSmrg*** used, and then restart. 5293ee3138f1Smrg 52943e72ca8cSmrg_LT_EOF 52953e72ca8cSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5296fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5297fe24f8a2Smrg _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' 52983e72ca8cSmrg else 52993e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53003e72ca8cSmrg fi 53013e72ca8cSmrg ;; 5302ee3138f1Smrg 53033e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 53043e72ca8cSmrg case `$LD -v 2>&1` in 53053e72ca8cSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 53063e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53073e72ca8cSmrg cat <<_LT_EOF 1>&2 5308ee3138f1Smrg 5309fe24f8a2Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 53103e72ca8cSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 53113e72ca8cSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 53123e72ca8cSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 53133e72ca8cSmrg*** your PATH or compiler configuration so that the native linker is 53143e72ca8cSmrg*** used, and then restart. 531534977a2fSmrg 53163e72ca8cSmrg_LT_EOF 5317a1ed278cSmrg ;; 53183e72ca8cSmrg *) 53193e72ca8cSmrg # For security reasons, it is highly recommended that you always 53203e72ca8cSmrg # use absolute paths for naming shared libraries, and exclude the 53213e72ca8cSmrg # DT_RUNPATH tag from executables and libraries. But doing so 53223e72ca8cSmrg # requires that you compile everything twice, which is a pain. 53233e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5324fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5325fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5326fe24f8a2Smrg _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' 53273e72ca8cSmrg else 53283e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5329a1ed278cSmrg fi 5330a1ed278cSmrg ;; 53313e72ca8cSmrg esac 53323e72ca8cSmrg ;; 5333ee3138f1Smrg 53343e72ca8cSmrg sunos4*) 53353e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 53363e72ca8cSmrg wlarc= 53373e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 53383e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 53393e72ca8cSmrg ;; 5340a1ed278cSmrg 53413e72ca8cSmrg *) 53423e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5343fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5344fe24f8a2Smrg _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' 53453e72ca8cSmrg else 53463e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 53473e72ca8cSmrg fi 53483e72ca8cSmrg ;; 53493e72ca8cSmrg esac 5350ee3138f1Smrg 5351fe24f8a2Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 53523e72ca8cSmrg runpath_var= 53533e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 53543e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 53553e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 53563e72ca8cSmrg fi 53573e72ca8cSmrg else 53583e72ca8cSmrg # PORTME fill in a description of your system's linker (not GNU ld) 53593e72ca8cSmrg case $host_os in 53603e72ca8cSmrg aix3*) 53613e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 53623e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 53633e72ca8cSmrg _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' 53643e72ca8cSmrg # Note: this linker hardcodes the directories in LIBPATH if there 53653e72ca8cSmrg # are no directories specified by -L. 53663e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5367fe24f8a2Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 53683e72ca8cSmrg # Neither direct hardcoding nor static linking is supported with a 53693e72ca8cSmrg # broken collect2. 53703e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 53713e72ca8cSmrg fi 53723e72ca8cSmrg ;; 5373a1ed278cSmrg 53743e72ca8cSmrg aix[[4-9]]*) 5375fe24f8a2Smrg if test ia64 = "$host_cpu"; then 53763e72ca8cSmrg # On IA64, the linker does run time linking by default, so we don't 53773e72ca8cSmrg # have to do anything special. 53783e72ca8cSmrg aix_use_runtimelinking=no 53793e72ca8cSmrg exp_sym_flag='-Bexport' 5380fe24f8a2Smrg no_entry_flag= 53813e72ca8cSmrg else 53823e72ca8cSmrg # If we're using GNU nm, then we don't want the "-C" option. 5383fe24f8a2Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5384fe24f8a2Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5385fe24f8a2Smrg # weak defined symbols like other global defined symbols, whereas 5386fe24f8a2Smrg # GNU nm marks them as "W". 5387fe24f8a2Smrg # While the 'weak' keyword is ignored in the Export File, we need 5388fe24f8a2Smrg # it in the Import File for the 'aix-soname' feature, so we have 5389fe24f8a2Smrg # to replace the "-B" option with "-P" for AIX nm. 53903e72ca8cSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5391fe24f8a2Smrg _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' 53923e72ca8cSmrg else 5393fe24f8a2Smrg _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' 53943e72ca8cSmrg fi 53953e72ca8cSmrg aix_use_runtimelinking=no 5396a1ed278cSmrg 53973e72ca8cSmrg # Test if we are trying to use run time linking or normal 53983e72ca8cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5399fe24f8a2Smrg # have runtime linking enabled, and use it for executables. 5400fe24f8a2Smrg # For shared libraries, we enable/disable runtime linking 5401fe24f8a2Smrg # depending on the kind of the shared library created - 5402fe24f8a2Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 5403fe24f8a2Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5404fe24f8a2Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 5405fe24f8a2Smrg # lib.a static archive 5406fe24f8a2Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5407fe24f8a2Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 5408fe24f8a2Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5409fe24f8a2Smrg # lib.a(lib.so.V) shared, rtl:no 5410fe24f8a2Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5411fe24f8a2Smrg # lib.a static archive 54123e72ca8cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 54133e72ca8cSmrg for ld_flag in $LDFLAGS; do 5414fe24f8a2Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 54153e72ca8cSmrg aix_use_runtimelinking=yes 54163e72ca8cSmrg break 54173e72ca8cSmrg fi 54183e72ca8cSmrg done 5419fe24f8a2Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5420fe24f8a2Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5421fe24f8a2Smrg # so we don't have lib.a shared libs to link our executables. 5422fe24f8a2Smrg # We have to force runtime linking in this case. 5423fe24f8a2Smrg aix_use_runtimelinking=yes 5424fe24f8a2Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5425fe24f8a2Smrg fi 54263e72ca8cSmrg ;; 54273e72ca8cSmrg esac 5428a1ed278cSmrg 54293e72ca8cSmrg exp_sym_flag='-bexport' 54303e72ca8cSmrg no_entry_flag='-bnoentry' 54313e72ca8cSmrg fi 5432a1ed278cSmrg 54333e72ca8cSmrg # When large executables or shared objects are built, AIX ld can 54343e72ca8cSmrg # have problems creating the table of contents. If linking a library 54353e72ca8cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 54363e72ca8cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 54373e72ca8cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5438a1ed278cSmrg 54393e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='' 54403e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 54413e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 54423e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 54433e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5444fe24f8a2Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5445fe24f8a2Smrg case $with_aix_soname,$aix_use_runtimelinking in 5446fe24f8a2Smrg aix,*) ;; # traditional, no import file 5447fe24f8a2Smrg svr4,* | *,yes) # use import file 5448fe24f8a2Smrg # The Import File defines what to hardcode. 5449fe24f8a2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5450fe24f8a2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5451fe24f8a2Smrg ;; 5452fe24f8a2Smrg esac 5453a1ed278cSmrg 5454fe24f8a2Smrg if test yes = "$GCC"; then 54553e72ca8cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 54563e72ca8cSmrg # We only want to do this on AIX 4.2 and lower, the check 54573e72ca8cSmrg # below for broken collect2 doesn't work under 4.3+ 5458fe24f8a2Smrg collect2name=`$CC -print-prog-name=collect2` 54593e72ca8cSmrg if test -f "$collect2name" && 54603e72ca8cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 54613e72ca8cSmrg then 54623e72ca8cSmrg # We have reworked collect2 54633e72ca8cSmrg : 54643e72ca8cSmrg else 54653e72ca8cSmrg # We have old collect2 54663e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 54673e72ca8cSmrg # It fails to find uninstalled libraries when the uninstalled 54683e72ca8cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 54693e72ca8cSmrg # to unsupported forces relinking 54703e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 54713e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 54723e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 54733e72ca8cSmrg fi 54743e72ca8cSmrg ;; 54753e72ca8cSmrg esac 54763e72ca8cSmrg shared_flag='-shared' 5477fe24f8a2Smrg if test yes = "$aix_use_runtimelinking"; then 5478fe24f8a2Smrg shared_flag="$shared_flag "'$wl-G' 54793e72ca8cSmrg fi 5480fe24f8a2Smrg # Need to ensure runtime linking is disabled for the traditional 5481fe24f8a2Smrg # shared library, or the linker may eventually find shared libraries 5482fe24f8a2Smrg # /with/ Import File - we do not want to mix them. 5483fe24f8a2Smrg shared_flag_aix='-shared' 5484fe24f8a2Smrg shared_flag_svr4='-shared $wl-G' 54853e72ca8cSmrg else 54863e72ca8cSmrg # not using gcc 5487fe24f8a2Smrg if test ia64 = "$host_cpu"; then 54883e72ca8cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 54893e72ca8cSmrg # chokes on -Wl,-G. The following line is correct: 54903e72ca8cSmrg shared_flag='-G' 54913e72ca8cSmrg else 5492fe24f8a2Smrg if test yes = "$aix_use_runtimelinking"; then 5493fe24f8a2Smrg shared_flag='$wl-G' 54943e72ca8cSmrg else 5495fe24f8a2Smrg shared_flag='$wl-bM:SRE' 54963e72ca8cSmrg fi 5497fe24f8a2Smrg shared_flag_aix='$wl-bM:SRE' 5498fe24f8a2Smrg shared_flag_svr4='$wl-G' 54993e72ca8cSmrg fi 55003e72ca8cSmrg fi 5501a1ed278cSmrg 5502fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 55033e72ca8cSmrg # It seems that -bexpall does not export symbols beginning with 55043e72ca8cSmrg # underscore (_), so it is better to generate a list of symbols to export. 55053e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5506fe24f8a2Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 55073e72ca8cSmrg # Warning - without using the other runtime loading flags (-brtl), 55083e72ca8cSmrg # -berok will link without error, but may produce a broken library. 55093e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 55103e72ca8cSmrg # Determine the default libpath from the value encoded in an 55113e72ca8cSmrg # empty executable. 55123e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5513fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5514fe24f8a2Smrg _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 55153e72ca8cSmrg else 5516fe24f8a2Smrg if test ia64 = "$host_cpu"; then 5517fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 55183e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5519fe24f8a2Smrg _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" 55203e72ca8cSmrg else 55213e72ca8cSmrg # Determine the default libpath from the value encoded in an 55223e72ca8cSmrg # empty executable. 55233e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5524fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 55253e72ca8cSmrg # Warning - without using the other run time loading flags, 55263e72ca8cSmrg # -berok will link without error, but may produce a broken library. 5527fe24f8a2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5528fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5529fe24f8a2Smrg if test yes = "$with_gnu_ld"; then 55303e72ca8cSmrg # We only use this code for GNU lds that support --whole-archive. 5531fe24f8a2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 55323e72ca8cSmrg else 55333e72ca8cSmrg # Exported symbols can be pulled into shared objects from archives 55343e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 55353e72ca8cSmrg fi 55363e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5537fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5538fe24f8a2Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5539fe24f8a2Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5540fe24f8a2Smrg if test svr4 != "$with_aix_soname"; then 5541fe24f8a2Smrg # This is similar to how AIX traditionally builds its shared libraries. 5542fe24f8a2Smrg _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' 5543fe24f8a2Smrg fi 5544fe24f8a2Smrg if test aix != "$with_aix_soname"; then 5545fe24f8a2Smrg _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' 5546fe24f8a2Smrg else 5547fe24f8a2Smrg # used by -dlpreopen to get the symbols 5548fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5549fe24f8a2Smrg fi 5550fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 55513e72ca8cSmrg fi 55523e72ca8cSmrg fi 55533e72ca8cSmrg ;; 5554a1ed278cSmrg 55553e72ca8cSmrg amigaos*) 55563e72ca8cSmrg case $host_cpu in 55573e72ca8cSmrg powerpc) 55583e72ca8cSmrg # see comment about AmigaOS4 .so support 5559fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 55603e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 55613e72ca8cSmrg ;; 55623e72ca8cSmrg m68k) 55633e72ca8cSmrg _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)' 55643e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 55653e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 55663e72ca8cSmrg ;; 55673e72ca8cSmrg esac 55683e72ca8cSmrg ;; 5569ee3138f1Smrg 55703e72ca8cSmrg bsdi[[45]]*) 55713e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 55723e72ca8cSmrg ;; 5573ee3138f1Smrg 55743e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 55753e72ca8cSmrg # When not using gcc, we currently assume that we are using 55763e72ca8cSmrg # Microsoft Visual C++. 55773e72ca8cSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 55783e72ca8cSmrg # no search path for DLLs. 55793e72ca8cSmrg case $cc_basename in 55803e72ca8cSmrg cl*) 55813e72ca8cSmrg # Native MSVC 55823e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 55833e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 55843e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 55853e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 55863e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 55873e72ca8cSmrg libext=lib 55883e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 5589fe24f8a2Smrg shrext_cmds=.dll 55903e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 5591fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5592fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5593fe24f8a2Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 5594fe24f8a2Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5595fe24f8a2Smrg else 5596fe24f8a2Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5597fe24f8a2Smrg fi~ 5598fe24f8a2Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5599fe24f8a2Smrg linknames=' 56003e72ca8cSmrg # The linker will not automatically build a static lib if we build a DLL. 56013e72ca8cSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56023e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56033e72ca8cSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 56043e72ca8cSmrg _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' 56053e72ca8cSmrg # Don't use ranlib 56063e72ca8cSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 56073e72ca8cSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5608fe24f8a2Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5609fe24f8a2Smrg case $lt_outputfile in 5610fe24f8a2Smrg *.exe|*.EXE) ;; 5611fe24f8a2Smrg *) 5612fe24f8a2Smrg lt_outputfile=$lt_outputfile.exe 5613fe24f8a2Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 5614fe24f8a2Smrg ;; 5615fe24f8a2Smrg esac~ 5616fe24f8a2Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5617fe24f8a2Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5618fe24f8a2Smrg $RM "$lt_outputfile.manifest"; 5619fe24f8a2Smrg fi' 56203e72ca8cSmrg ;; 56213e72ca8cSmrg *) 56223e72ca8cSmrg # Assume MSVC wrapper 56233e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 56243e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 56253e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 56263e72ca8cSmrg libext=lib 56273e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 5628fe24f8a2Smrg shrext_cmds=.dll 56293e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 56303e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 56313e72ca8cSmrg # The linker will automatically build a .lib file if we build a DLL. 56323e72ca8cSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 56333e72ca8cSmrg # FIXME: Should let the user specify the lib program. 56343e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 56353e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 56363e72ca8cSmrg ;; 56373e72ca8cSmrg esac 56383e72ca8cSmrg ;; 5639ee3138f1Smrg 56403e72ca8cSmrg darwin* | rhapsody*) 56413e72ca8cSmrg _LT_DARWIN_LINKER_FEATURES($1) 56423e72ca8cSmrg ;; 564334977a2fSmrg 56443e72ca8cSmrg dgux*) 56453e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 56463e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 56473e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56483e72ca8cSmrg ;; 5649ee3138f1Smrg 56503e72ca8cSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 56513e72ca8cSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 56523e72ca8cSmrg # does not break anything, and helps significantly (at the cost of a little 56533e72ca8cSmrg # extra space). 56543e72ca8cSmrg freebsd2.2*) 56553e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 56563e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56573e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56583e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56593e72ca8cSmrg ;; 5660ee3138f1Smrg 56613e72ca8cSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 56623e72ca8cSmrg freebsd2.*) 56633e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 56643e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56653e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 56663e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56673e72ca8cSmrg ;; 5668ee3138f1Smrg 56693e72ca8cSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 56703e72ca8cSmrg freebsd* | dragonfly*) 56713e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 56723e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 56733e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5674a1ed278cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 56753e72ca8cSmrg ;; 5676ee3138f1Smrg 56773e72ca8cSmrg hpux9*) 5678fe24f8a2Smrg if test yes = "$GCC"; then 5679fe24f8a2Smrg _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' 56803e72ca8cSmrg else 5681fe24f8a2Smrg _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' 56823e72ca8cSmrg fi 5683fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 56843e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 56853e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 56863e72ca8cSmrg 56873e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 56883e72ca8cSmrg # but as the default location of the library. 56893e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5690fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 56913e72ca8cSmrg ;; 56923e72ca8cSmrg 56933e72ca8cSmrg hpux10*) 5694fe24f8a2Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5695fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 56963e72ca8cSmrg else 56973e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 56983e72ca8cSmrg fi 5699fe24f8a2Smrg if test no = "$with_gnu_ld"; then 5700fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57013e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 57023e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57033e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5704fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 57053e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 57063e72ca8cSmrg # but as the default location of the library. 57073e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57083e72ca8cSmrg fi 57093e72ca8cSmrg ;; 57103e72ca8cSmrg 57113e72ca8cSmrg hpux11*) 5712fe24f8a2Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 57133e72ca8cSmrg case $host_cpu in 57143e72ca8cSmrg hppa*64*) 5715fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57163e72ca8cSmrg ;; 57173e72ca8cSmrg ia64*) 5718fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5719b425557eSmrg ;; 5720a1ed278cSmrg *) 5721fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5722a1ed278cSmrg ;; 57233e72ca8cSmrg esac 57243e72ca8cSmrg else 57253e72ca8cSmrg case $host_cpu in 57263e72ca8cSmrg hppa*64*) 5727fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 57283e72ca8cSmrg ;; 57293e72ca8cSmrg ia64*) 5730fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 57313e72ca8cSmrg ;; 57323e72ca8cSmrg *) 57333e72ca8cSmrg m4_if($1, [], [ 57343e72ca8cSmrg # Older versions of the 11.00 compiler do not understand -b yet 57353e72ca8cSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 57363e72ca8cSmrg _LT_LINKER_OPTION([if $CC understands -b], 57373e72ca8cSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5738fe24f8a2Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 57393e72ca8cSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5740fe24f8a2Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 57413e72ca8cSmrg ;; 57423e72ca8cSmrg esac 57433e72ca8cSmrg fi 5744fe24f8a2Smrg if test no = "$with_gnu_ld"; then 5745fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 57463e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5747ee3138f1Smrg 57483e72ca8cSmrg case $host_cpu in 57493e72ca8cSmrg hppa*64*|ia64*) 57503e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 57513e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 57523e72ca8cSmrg ;; 57533e72ca8cSmrg *) 57543e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 57553e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5756fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5757a1ed278cSmrg 57583e72ca8cSmrg # hardcode_minus_L: Not really in the search PATH, 57593e72ca8cSmrg # but as the default location of the library. 57603e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 57613e72ca8cSmrg ;; 5762a1ed278cSmrg esac 57633e72ca8cSmrg fi 5764b425557eSmrg ;; 5765ee3138f1Smrg 57663e72ca8cSmrg irix5* | irix6* | nonstopux*) 5767fe24f8a2Smrg if test yes = "$GCC"; then 5768fe24f8a2Smrg _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' 57693e72ca8cSmrg # Try to use the -exported_symbol ld option, if it does not 57703e72ca8cSmrg # work, assume that -exports_file does not work either and 57713e72ca8cSmrg # implicitly export all symbols. 57723e72ca8cSmrg # This should be the same for all languages, so no per-tag cache variable. 57733e72ca8cSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 57743e72ca8cSmrg [lt_cv_irix_exported_symbol], 5775fe24f8a2Smrg [save_LDFLAGS=$LDFLAGS 5776fe24f8a2Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 57773e72ca8cSmrg AC_LINK_IFELSE( 57783e72ca8cSmrg [AC_LANG_SOURCE( 57793e72ca8cSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 57803e72ca8cSmrg [C++], [[int foo (void) { return 0; }]], 57813e72ca8cSmrg [Fortran 77], [[ 57823e72ca8cSmrg subroutine foo 57833e72ca8cSmrg end]], 57843e72ca8cSmrg [Fortran], [[ 57853e72ca8cSmrg subroutine foo 57863e72ca8cSmrg end]])])], 57873e72ca8cSmrg [lt_cv_irix_exported_symbol=yes], 57883e72ca8cSmrg [lt_cv_irix_exported_symbol=no]) 5789fe24f8a2Smrg LDFLAGS=$save_LDFLAGS]) 5790fe24f8a2Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 5791fe24f8a2Smrg _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' 57923e72ca8cSmrg fi 57933e72ca8cSmrg else 5794fe24f8a2Smrg _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' 5795fe24f8a2Smrg _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' 57963e72ca8cSmrg fi 57973e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5798fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 57993e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58003e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 58013e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 58023e72ca8cSmrg ;; 5803a1ed278cSmrg 5804fe24f8a2Smrg linux*) 5805fe24f8a2Smrg case $cc_basename in 5806fe24f8a2Smrg tcc*) 5807fe24f8a2Smrg # Fabrice Bellard et al's Tiny C Compiler 5808fe24f8a2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5809fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5810fe24f8a2Smrg ;; 5811fe24f8a2Smrg esac 5812fe24f8a2Smrg ;; 5813fe24f8a2Smrg 58143e72ca8cSmrg netbsd*) 58153e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 58163e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 58173e72ca8cSmrg else 58183e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 58193e72ca8cSmrg fi 58203e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 58213e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58223e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58233e72ca8cSmrg ;; 5824a1ed278cSmrg 58253e72ca8cSmrg newsos6) 58263e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 58273e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5828fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58293e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58303e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58313e72ca8cSmrg ;; 583234977a2fSmrg 58333e72ca8cSmrg *nto* | *qnx*) 58343e72ca8cSmrg ;; 5835ee3138f1Smrg 5836fe24f8a2Smrg openbsd* | bitrig*) 58373e72ca8cSmrg if test -f /usr/libexec/ld.so; then 58383e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 58393e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 58403e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5841fe24f8a2Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 58423e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5843fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5844fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5845fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 58463e72ca8cSmrg else 5847fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5848fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 58493e72ca8cSmrg fi 58503e72ca8cSmrg else 58513e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 58523e72ca8cSmrg fi 58533e72ca8cSmrg ;; 5854ee3138f1Smrg 58553e72ca8cSmrg os2*) 58563e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 58573e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 58583e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5859fe24f8a2Smrg shrext_cmds=.dll 5860fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5861fe24f8a2Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5862fe24f8a2Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5863fe24f8a2Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5864fe24f8a2Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5865fe24f8a2Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5866fe24f8a2Smrg emximp -o $lib $output_objdir/$libname.def' 5867fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5868fe24f8a2Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5869fe24f8a2Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5870fe24f8a2Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5871fe24f8a2Smrg prefix_cmds="$SED"~ 5872fe24f8a2Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5873fe24f8a2Smrg prefix_cmds="$prefix_cmds -e 1d"; 5874fe24f8a2Smrg fi~ 5875fe24f8a2Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5876fe24f8a2Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5877fe24f8a2Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5878fe24f8a2Smrg emximp -o $lib $output_objdir/$libname.def' 5879fe24f8a2Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5880fe24f8a2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 58813e72ca8cSmrg ;; 5882ee3138f1Smrg 58833e72ca8cSmrg osf3*) 5884fe24f8a2Smrg if test yes = "$GCC"; then 5885fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5886fe24f8a2Smrg _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' 58873e72ca8cSmrg else 58883e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5889fe24f8a2Smrg _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' 58903e72ca8cSmrg fi 58913e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5892fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 58933e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 58943e72ca8cSmrg ;; 5895ee3138f1Smrg 58963e72ca8cSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5897fe24f8a2Smrg if test yes = "$GCC"; then 5898fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5899fe24f8a2Smrg _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' 5900fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 59013e72ca8cSmrg else 59023e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5903fe24f8a2Smrg _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' 59043e72ca8cSmrg _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~ 5905fe24f8a2Smrg $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' 5906ee3138f1Smrg 59073e72ca8cSmrg # Both c and cxx compiler support -rpath directly 59083e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 59093e72ca8cSmrg fi 59103e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 59113e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 59123e72ca8cSmrg ;; 5913ee3138f1Smrg 59143e72ca8cSmrg solaris*) 59153e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5916fe24f8a2Smrg if test yes = "$GCC"; then 5917fe24f8a2Smrg wlarc='$wl' 5918fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 59193e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5920fe24f8a2Smrg $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' 59213e72ca8cSmrg else 59223e72ca8cSmrg case `$CC -V 2>&1` in 59233e72ca8cSmrg *"Compilers 5.0"*) 59243e72ca8cSmrg wlarc='' 5925fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 59263e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5927fe24f8a2Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 59283e72ca8cSmrg ;; 59293e72ca8cSmrg *) 5930fe24f8a2Smrg wlarc='$wl' 5931fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 59323e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5933fe24f8a2Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 59343e72ca8cSmrg ;; 59353e72ca8cSmrg esac 59363e72ca8cSmrg fi 59373e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 59383e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59393e72ca8cSmrg case $host_os in 59403e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 59413e72ca8cSmrg *) 59423e72ca8cSmrg # The compiler driver will combine and reorder linker options, 5943fe24f8a2Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 59443e72ca8cSmrg # but is careful enough not to reorder. 59453e72ca8cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5946fe24f8a2Smrg if test yes = "$GCC"; then 5947fe24f8a2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 59483e72ca8cSmrg else 59493e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 59503e72ca8cSmrg fi 59513e72ca8cSmrg ;; 59523e72ca8cSmrg esac 59533e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 59543e72ca8cSmrg ;; 595534977a2fSmrg 59563e72ca8cSmrg sunos4*) 5957fe24f8a2Smrg if test sequent = "$host_vendor"; then 59583e72ca8cSmrg # Use $CC to link under sequent, because it throws in some extra .o 59593e72ca8cSmrg # files that make .init and .fini sections work. 5960fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 59613e72ca8cSmrg else 59623e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 59633e72ca8cSmrg fi 59643e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 59653e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 59663e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 59673e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59683e72ca8cSmrg ;; 596934977a2fSmrg 59703e72ca8cSmrg sysv4) 59713e72ca8cSmrg case $host_vendor in 59723e72ca8cSmrg sni) 59733e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59743e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 59753e72ca8cSmrg ;; 59763e72ca8cSmrg siemens) 59773e72ca8cSmrg ## LD is ld it makes a PLAMLIB 59783e72ca8cSmrg ## CC just makes a GrossModule. 59793e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 59803e72ca8cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 59813e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 59823e72ca8cSmrg ;; 59833e72ca8cSmrg motorola) 59843e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59853e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 59863e72ca8cSmrg ;; 59873e72ca8cSmrg esac 59883e72ca8cSmrg runpath_var='LD_RUN_PATH' 59893e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59903e72ca8cSmrg ;; 5991a1ed278cSmrg 59923e72ca8cSmrg sysv4.3*) 59933e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 59943e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 59953e72ca8cSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 59963e72ca8cSmrg ;; 5997a1ed278cSmrg 59983e72ca8cSmrg sysv4*MP*) 59993e72ca8cSmrg if test -d /usr/nec; then 60003e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60013e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60023e72ca8cSmrg runpath_var=LD_RUN_PATH 60033e72ca8cSmrg hardcode_runpath_var=yes 60043e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 60053e72ca8cSmrg fi 60063e72ca8cSmrg ;; 6007a1ed278cSmrg 60083e72ca8cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6009fe24f8a2Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 60103e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60113e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60123e72ca8cSmrg runpath_var='LD_RUN_PATH' 6013a1ed278cSmrg 6014fe24f8a2Smrg if test yes = "$GCC"; then 6015fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6016fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60173e72ca8cSmrg else 6018fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6019fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60203e72ca8cSmrg fi 60213e72ca8cSmrg ;; 6022a1ed278cSmrg 60233e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6*) 6024fe24f8a2Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 60253e72ca8cSmrg # link with -lc, and that would cause any symbols used from libc to 60263e72ca8cSmrg # always be unresolved, which means just about no library would 60273e72ca8cSmrg # ever link correctly. If we're not using GNU ld we use -z text 60283e72ca8cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 60293e72ca8cSmrg # as -z defs. 6030fe24f8a2Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6031fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 60323e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 60333e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6034fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 60353e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 60363e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6037fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 60383e72ca8cSmrg runpath_var='LD_RUN_PATH' 6039a1ed278cSmrg 6040fe24f8a2Smrg if test yes = "$GCC"; then 6041fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6042fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60433e72ca8cSmrg else 6044fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6045fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 60463e72ca8cSmrg fi 60473e72ca8cSmrg ;; 604834977a2fSmrg 60493e72ca8cSmrg uts4*) 60503e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 60513e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 60523e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 60533e72ca8cSmrg ;; 605434977a2fSmrg 60553e72ca8cSmrg *) 60563e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 60573e72ca8cSmrg ;; 6058a1ed278cSmrg esac 6059ee3138f1Smrg 6060fe24f8a2Smrg if test sni = "$host_vendor"; then 60613e72ca8cSmrg case $host in 60623e72ca8cSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6063fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 60643e72ca8cSmrg ;; 60653e72ca8cSmrg esac 60663e72ca8cSmrg fi 60673e72ca8cSmrg fi 60683e72ca8cSmrg]) 60693e72ca8cSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6070fe24f8a2Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6071ee3138f1Smrg 60723e72ca8cSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6073ee3138f1Smrg 60743e72ca8cSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 60753e72ca8cSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 60763e72ca8cSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 60773e72ca8cSmrg [The commands to extract the exported symbol list from a shared archive]) 6078ee3138f1Smrg 60793e72ca8cSmrg# 60803e72ca8cSmrg# Do we need to explicitly link libc? 60813e72ca8cSmrg# 60823e72ca8cSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 60833e72ca8cSmrgx|xyes) 60843e72ca8cSmrg # Assume -lc should be added 60853e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 608634977a2fSmrg 6087fe24f8a2Smrg if test yes,yes = "$GCC,$enable_shared"; then 60883e72ca8cSmrg case $_LT_TAGVAR(archive_cmds, $1) in 60893e72ca8cSmrg *'~'*) 60903e72ca8cSmrg # FIXME: we may have to deal with multi-command sequences. 6091b425557eSmrg ;; 60923e72ca8cSmrg '$CC '*) 60933e72ca8cSmrg # Test whether the compiler implicitly links with -lc since on some 60943e72ca8cSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 60953e72ca8cSmrg # to ld, don't add -lc before -lgcc. 60963e72ca8cSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 60973e72ca8cSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 60983e72ca8cSmrg [$RM conftest* 60993e72ca8cSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6100ee3138f1Smrg 61013e72ca8cSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 61023e72ca8cSmrg soname=conftest 61033e72ca8cSmrg lib=conftest 61043e72ca8cSmrg libobjs=conftest.$ac_objext 61053e72ca8cSmrg deplibs= 61063e72ca8cSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 61073e72ca8cSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 61083e72ca8cSmrg compiler_flags=-v 61093e72ca8cSmrg linker_flags=-v 61103e72ca8cSmrg verstring= 61113e72ca8cSmrg output_objdir=. 61123e72ca8cSmrg libname=conftest 61133e72ca8cSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 61143e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 61153e72ca8cSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 61163e72ca8cSmrg then 61173e72ca8cSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 61183e72ca8cSmrg else 61193e72ca8cSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 61203e72ca8cSmrg fi 61213e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 61223e72ca8cSmrg else 61233e72ca8cSmrg cat conftest.err 1>&5 61243e72ca8cSmrg fi 61253e72ca8cSmrg $RM conftest* 61263e72ca8cSmrg ]) 61273e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6128b425557eSmrg ;; 6129a1ed278cSmrg esac 61303e72ca8cSmrg fi 6131a1ed278cSmrg ;; 6132a1ed278cSmrgesac 6133a1ed278cSmrg 61343e72ca8cSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 61353e72ca8cSmrg [Whether or not to add -lc for building shared libraries]) 61363e72ca8cSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 61373e72ca8cSmrg [enable_shared_with_static_runtimes], [0], 61383e72ca8cSmrg [Whether or not to disallow shared libs when runtime libs are static]) 61393e72ca8cSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 61403e72ca8cSmrg [Compiler flag to allow reflexive dlopens]) 61413e72ca8cSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 61423e72ca8cSmrg [Compiler flag to generate shared objects directly from archives]) 61433e72ca8cSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 61443e72ca8cSmrg [Whether the compiler copes with passing no objects directly]) 61453e72ca8cSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 61463e72ca8cSmrg [Create an old-style archive from a shared archive]) 61473e72ca8cSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 61483e72ca8cSmrg [Create a temporary old-style archive to link instead of a shared archive]) 61493e72ca8cSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 61503e72ca8cSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 61513e72ca8cSmrg_LT_TAGDECL([], [module_cmds], [2], 61523e72ca8cSmrg [Commands used to build a loadable module if different from building 61533e72ca8cSmrg a shared archive.]) 61543e72ca8cSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 61553e72ca8cSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 61563e72ca8cSmrg [Whether we are building with GNU ld or not]) 61573e72ca8cSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 61583e72ca8cSmrg [Flag that allows shared libraries with undefined symbols to be built]) 61593e72ca8cSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 61603e72ca8cSmrg [Flag that enforces no undefined symbols]) 61613e72ca8cSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 61623e72ca8cSmrg [Flag to hardcode $libdir into a binary during linking. 61633e72ca8cSmrg This must work even if $libdir does not exist]) 61643e72ca8cSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 61653e72ca8cSmrg [Whether we need a single "-rpath" flag with a separated argument]) 61663e72ca8cSmrg_LT_TAGDECL([], [hardcode_direct], [0], 6167fe24f8a2Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61683e72ca8cSmrg DIR into the resulting binary]) 61693e72ca8cSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6170fe24f8a2Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 61713e72ca8cSmrg DIR into the resulting binary and the resulting library dependency is 6172fe24f8a2Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 61733e72ca8cSmrg library is relocated]) 61743e72ca8cSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 61753e72ca8cSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 61763e72ca8cSmrg into the resulting binary]) 61773e72ca8cSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 61783e72ca8cSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 61793e72ca8cSmrg into the resulting binary]) 61803e72ca8cSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 61813e72ca8cSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 61823e72ca8cSmrg into the library and all subsequent libraries and executables linked 61833e72ca8cSmrg against it]) 61843e72ca8cSmrg_LT_TAGDECL([], [inherit_rpath], [0], 61853e72ca8cSmrg [Set to yes if linker adds runtime paths of dependent libraries 61863e72ca8cSmrg to runtime path list]) 61873e72ca8cSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 61883e72ca8cSmrg [Whether libtool must link a program against all its dependency libraries]) 61893e72ca8cSmrg_LT_TAGDECL([], [always_export_symbols], [0], 61903e72ca8cSmrg [Set to "yes" if exported symbols are required]) 61913e72ca8cSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 61923e72ca8cSmrg [The commands to list exported symbols]) 61933e72ca8cSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 61943e72ca8cSmrg [Symbols that should not be listed in the preloaded symbols]) 61953e72ca8cSmrg_LT_TAGDECL([], [include_expsyms], [1], 61963e72ca8cSmrg [Symbols that must always be exported]) 61973e72ca8cSmrg_LT_TAGDECL([], [prelink_cmds], [2], 61983e72ca8cSmrg [Commands necessary for linking programs (against libraries) with templates]) 61993e72ca8cSmrg_LT_TAGDECL([], [postlink_cmds], [2], 62003e72ca8cSmrg [Commands necessary for finishing linking programs]) 62013e72ca8cSmrg_LT_TAGDECL([], [file_list_spec], [1], 62023e72ca8cSmrg [Specify filename containing input files]) 62033e72ca8cSmrgdnl FIXME: Not yet implemented 62043e72ca8cSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 62053e72ca8cSmrgdnl [Compiler flag to generate thread safe objects]) 62063e72ca8cSmrg])# _LT_LINKER_SHLIBS 6207a1ed278cSmrg 6208a1ed278cSmrg 62093e72ca8cSmrg# _LT_LANG_C_CONFIG([TAG]) 62103e72ca8cSmrg# ------------------------ 62113e72ca8cSmrg# Ensure that the configuration variables for a C compiler are suitably 62123e72ca8cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6213fe24f8a2Smrg# the compiler configuration to 'libtool'. 62143e72ca8cSmrgm4_defun([_LT_LANG_C_CONFIG], 62153e72ca8cSmrg[m4_require([_LT_DECL_EGREP])dnl 6216fe24f8a2Smrglt_save_CC=$CC 62173e72ca8cSmrgAC_LANG_PUSH(C) 6218a1ed278cSmrg 62193e72ca8cSmrg# Source file extension for C test sources. 62203e72ca8cSmrgac_ext=c 622134977a2fSmrg 62223e72ca8cSmrg# Object file extension for compiled C test sources. 6223a1ed278cSmrgobjext=o 6224a1ed278cSmrg_LT_TAGVAR(objext, $1)=$objext 622534977a2fSmrg 62263e72ca8cSmrg# Code to be used in simple compile tests 62273e72ca8cSmrglt_simple_compile_test_code="int some_variable = 0;" 622834977a2fSmrg 62293e72ca8cSmrg# Code to be used in simple link tests 62303e72ca8cSmrglt_simple_link_test_code='int main(){return(0);}' 6231ee3138f1Smrg 62323e72ca8cSmrg_LT_TAG_COMPILER 62333e72ca8cSmrg# Save the default compiler, since it gets overwritten when the other 62343e72ca8cSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 62353e72ca8cSmrgcompiler_DEFAULT=$CC 6236ee3138f1Smrg 62373e72ca8cSmrg# save warnings/boilerplate of simple test code 62383e72ca8cSmrg_LT_COMPILER_BOILERPLATE 62393e72ca8cSmrg_LT_LINKER_BOILERPLATE 6240a1ed278cSmrg 62413e72ca8cSmrgif test -n "$compiler"; then 62423e72ca8cSmrg _LT_COMPILER_NO_RTTI($1) 62433e72ca8cSmrg _LT_COMPILER_PIC($1) 62443e72ca8cSmrg _LT_COMPILER_C_O($1) 62453e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 62463e72ca8cSmrg _LT_LINKER_SHLIBS($1) 62473e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 62483e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 62493e72ca8cSmrg LT_SYS_DLOPEN_SELF 62503e72ca8cSmrg _LT_CMD_STRIPLIB 6251ee3138f1Smrg 6252fe24f8a2Smrg # Report what library types will actually be built 62533e72ca8cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 62543e72ca8cSmrg AC_MSG_RESULT([$can_build_shared]) 6255ee3138f1Smrg 62563e72ca8cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6257fe24f8a2Smrg test no = "$can_build_shared" && enable_shared=no 6258ee3138f1Smrg 62593e72ca8cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 62603e72ca8cSmrg # are all built from PIC. 62613e72ca8cSmrg case $host_os in 62623e72ca8cSmrg aix3*) 6263fe24f8a2Smrg test yes = "$enable_shared" && enable_static=no 62643e72ca8cSmrg if test -n "$RANLIB"; then 62653e72ca8cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 62663e72ca8cSmrg postinstall_cmds='$RANLIB $lib' 62673e72ca8cSmrg fi 62683e72ca8cSmrg ;; 6269ee3138f1Smrg 62703e72ca8cSmrg aix[[4-9]]*) 6271fe24f8a2Smrg if test ia64 != "$host_cpu"; then 6272fe24f8a2Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6273fe24f8a2Smrg yes,aix,yes) ;; # shared object as lib.so file only 6274fe24f8a2Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 6275fe24f8a2Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6276fe24f8a2Smrg esac 62773e72ca8cSmrg fi 62783e72ca8cSmrg ;; 62793e72ca8cSmrg esac 62803e72ca8cSmrg AC_MSG_RESULT([$enable_shared]) 6281ee3138f1Smrg 62823e72ca8cSmrg AC_MSG_CHECKING([whether to build static libraries]) 62833e72ca8cSmrg # Make sure either enable_shared or enable_static is yes. 6284fe24f8a2Smrg test yes = "$enable_shared" || enable_static=yes 62853e72ca8cSmrg AC_MSG_RESULT([$enable_static]) 6286a1ed278cSmrg 62873e72ca8cSmrg _LT_CONFIG($1) 62883e72ca8cSmrgfi 6289a1ed278cSmrgAC_LANG_POP 6290fe24f8a2SmrgCC=$lt_save_CC 62913e72ca8cSmrg])# _LT_LANG_C_CONFIG 6292a1ed278cSmrg 6293a1ed278cSmrg 62943e72ca8cSmrg# _LT_LANG_CXX_CONFIG([TAG]) 62953e72ca8cSmrg# -------------------------- 62963e72ca8cSmrg# Ensure that the configuration variables for a C++ compiler are suitably 62973e72ca8cSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6298fe24f8a2Smrg# the compiler configuration to 'libtool'. 62993e72ca8cSmrgm4_defun([_LT_LANG_CXX_CONFIG], 63003e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 63013e72ca8cSmrgm4_require([_LT_DECL_EGREP])dnl 63023e72ca8cSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6303fe24f8a2Smrgif test -n "$CXX" && ( test no != "$CXX" && 6304fe24f8a2Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6305fe24f8a2Smrg (test g++ != "$CXX"))); then 63063e72ca8cSmrg AC_PROG_CXXCPP 63073e72ca8cSmrgelse 63083e72ca8cSmrg _lt_caught_CXX_error=yes 6309a1ed278cSmrgfi 6310a1ed278cSmrg 63113e72ca8cSmrgAC_LANG_PUSH(C++) 6312a1ed278cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6313a1ed278cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6314a1ed278cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6315a1ed278cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 63163e72ca8cSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 6317a1ed278cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6318a1ed278cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6319a1ed278cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6320a1ed278cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6321a1ed278cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6322a1ed278cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 63233e72ca8cSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6324a1ed278cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6325a1ed278cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6326a1ed278cSmrg_LT_TAGVAR(module_cmds, $1)= 6327a1ed278cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6328a1ed278cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6329a1ed278cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6330a1ed278cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6331a1ed278cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6332a1ed278cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6333a1ed278cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6334a1ed278cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6335ee3138f1Smrg 63363e72ca8cSmrg# Source file extension for C++ test sources. 63373e72ca8cSmrgac_ext=cpp 633834977a2fSmrg 63393e72ca8cSmrg# Object file extension for compiled C++ test sources. 6340a1ed278cSmrgobjext=o 6341a1ed278cSmrg_LT_TAGVAR(objext, $1)=$objext 634234977a2fSmrg 6343a1ed278cSmrg# No sense in running all these tests if we already determined that 63443e72ca8cSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 6345a1ed278cSmrg# are currently assumed to apply to all compilers on this platform, 6346a1ed278cSmrg# and will be corrupted by setting them based on a non-working compiler. 6347fe24f8a2Smrgif test yes != "$_lt_caught_CXX_error"; then 6348a1ed278cSmrg # Code to be used in simple compile tests 63493e72ca8cSmrg lt_simple_compile_test_code="int some_variable = 0;" 635034977a2fSmrg 6351a1ed278cSmrg # Code to be used in simple link tests 63523e72ca8cSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 635334977a2fSmrg 6354a1ed278cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6355a1ed278cSmrg _LT_TAG_COMPILER 635634977a2fSmrg 6357a1ed278cSmrg # save warnings/boilerplate of simple test code 6358a1ed278cSmrg _LT_COMPILER_BOILERPLATE 6359a1ed278cSmrg _LT_LINKER_BOILERPLATE 636034977a2fSmrg 6361a1ed278cSmrg # Allow CC to be a program name with arguments. 63623e72ca8cSmrg lt_save_CC=$CC 63633e72ca8cSmrg lt_save_CFLAGS=$CFLAGS 63643e72ca8cSmrg lt_save_LD=$LD 6365a1ed278cSmrg lt_save_GCC=$GCC 63663e72ca8cSmrg GCC=$GXX 63673e72ca8cSmrg lt_save_with_gnu_ld=$with_gnu_ld 63683e72ca8cSmrg lt_save_path_LD=$lt_cv_path_LD 63693e72ca8cSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 63703e72ca8cSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 63713e72ca8cSmrg else 63723e72ca8cSmrg $as_unset lt_cv_prog_gnu_ld 63733e72ca8cSmrg fi 63743e72ca8cSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 63753e72ca8cSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 63763e72ca8cSmrg else 63773e72ca8cSmrg $as_unset lt_cv_path_LD 63783e72ca8cSmrg fi 63793e72ca8cSmrg test -z "${LDCXX+set}" || LD=$LDCXX 63803e72ca8cSmrg CC=${CXX-"c++"} 63813e72ca8cSmrg CFLAGS=$CXXFLAGS 6382a1ed278cSmrg compiler=$CC 6383a1ed278cSmrg _LT_TAGVAR(compiler, $1)=$CC 6384a1ed278cSmrg _LT_CC_BASENAME([$compiler]) 6385b425557eSmrg 6386a1ed278cSmrg if test -n "$compiler"; then 63873e72ca8cSmrg # We don't want -fno-exception when compiling C++ code, so set the 63883e72ca8cSmrg # no_builtin_flag separately 6389fe24f8a2Smrg if test yes = "$GXX"; then 63903e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 63913e72ca8cSmrg else 63923e72ca8cSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 63933e72ca8cSmrg fi 63943e72ca8cSmrg 6395fe24f8a2Smrg if test yes = "$GXX"; then 63963e72ca8cSmrg # Set up default GNU C++ configuration 63973e72ca8cSmrg 63983e72ca8cSmrg LT_PATH_LD 63993e72ca8cSmrg 64003e72ca8cSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 64013e72ca8cSmrg # archiving commands below assume that GNU ld is being used. 6402fe24f8a2Smrg if test yes = "$with_gnu_ld"; then 6403fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6404fe24f8a2Smrg _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' 64053e72ca8cSmrg 6406fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6407fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 64083e72ca8cSmrg 64093e72ca8cSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 64103e72ca8cSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 64113e72ca8cSmrg # investigate it a little bit more. (MM) 6412fe24f8a2Smrg wlarc='$wl' 64133e72ca8cSmrg 64143e72ca8cSmrg # ancient GNU ld didn't support --whole-archive et. al. 64153e72ca8cSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 64163e72ca8cSmrg $GREP 'no-whole-archive' > /dev/null; then 6417fe24f8a2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 64183e72ca8cSmrg else 64193e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 64203e72ca8cSmrg fi 64213e72ca8cSmrg else 64223e72ca8cSmrg with_gnu_ld=no 64233e72ca8cSmrg wlarc= 64243e72ca8cSmrg 64253e72ca8cSmrg # A generic and very simple default shared library creation 64263e72ca8cSmrg # command for GNU C++ for the case where it uses the native 64273e72ca8cSmrg # linker, instead of GNU ld. If possible, this setting should 64283e72ca8cSmrg # overridden to take advantage of the native linker features on 64293e72ca8cSmrg # the platform it is being used on. 64303e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 64313e72ca8cSmrg fi 64323e72ca8cSmrg 64333e72ca8cSmrg # Commands to make compiler produce verbose output that lists 64343e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 64353e72ca8cSmrg # linking a shared library. 64363e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6437a1ed278cSmrg 64383e72ca8cSmrg else 64393e72ca8cSmrg GXX=no 64403e72ca8cSmrg with_gnu_ld=no 64413e72ca8cSmrg wlarc= 64423e72ca8cSmrg fi 6443a1ed278cSmrg 64443e72ca8cSmrg # PORTME: fill in a description of your system's C++ link characteristics 64453e72ca8cSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 64463e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6447a1ed278cSmrg case $host_os in 6448a1ed278cSmrg aix3*) 64493e72ca8cSmrg # FIXME: insert proper C++ library support 64503e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6451a1ed278cSmrg ;; 6452a1ed278cSmrg aix[[4-9]]*) 6453fe24f8a2Smrg if test ia64 = "$host_cpu"; then 64543e72ca8cSmrg # On IA64, the linker does run time linking by default, so we don't 64553e72ca8cSmrg # have to do anything special. 64563e72ca8cSmrg aix_use_runtimelinking=no 64573e72ca8cSmrg exp_sym_flag='-Bexport' 6458fe24f8a2Smrg no_entry_flag= 64593e72ca8cSmrg else 64603e72ca8cSmrg aix_use_runtimelinking=no 646134977a2fSmrg 64623e72ca8cSmrg # Test if we are trying to use run time linking or normal 64633e72ca8cSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6464fe24f8a2Smrg # have runtime linking enabled, and use it for executables. 6465fe24f8a2Smrg # For shared libraries, we enable/disable runtime linking 6466fe24f8a2Smrg # depending on the kind of the shared library created - 6467fe24f8a2Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 6468fe24f8a2Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6469fe24f8a2Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 6470fe24f8a2Smrg # lib.a static archive 6471fe24f8a2Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6472fe24f8a2Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 6473fe24f8a2Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6474fe24f8a2Smrg # lib.a(lib.so.V) shared, rtl:no 6475fe24f8a2Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6476fe24f8a2Smrg # lib.a static archive 64773e72ca8cSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 64783e72ca8cSmrg for ld_flag in $LDFLAGS; do 64793e72ca8cSmrg case $ld_flag in 64803e72ca8cSmrg *-brtl*) 64813e72ca8cSmrg aix_use_runtimelinking=yes 64823e72ca8cSmrg break 64833e72ca8cSmrg ;; 64843e72ca8cSmrg esac 64853e72ca8cSmrg done 6486fe24f8a2Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6487fe24f8a2Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6488fe24f8a2Smrg # so we don't have lib.a shared libs to link our executables. 6489fe24f8a2Smrg # We have to force runtime linking in this case. 6490fe24f8a2Smrg aix_use_runtimelinking=yes 6491fe24f8a2Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6492fe24f8a2Smrg fi 64933e72ca8cSmrg ;; 64943e72ca8cSmrg esac 6495ee3138f1Smrg 64963e72ca8cSmrg exp_sym_flag='-bexport' 64973e72ca8cSmrg no_entry_flag='-bnoentry' 64983e72ca8cSmrg fi 6499ee3138f1Smrg 65003e72ca8cSmrg # When large executables or shared objects are built, AIX ld can 65013e72ca8cSmrg # have problems creating the table of contents. If linking a library 65023e72ca8cSmrg # or program results in "error TOC overflow" add -mminimal-toc to 65033e72ca8cSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 65043e72ca8cSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6505a1ed278cSmrg 65063e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='' 65073e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 65083e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 65093e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 65103e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6511fe24f8a2Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6512fe24f8a2Smrg case $with_aix_soname,$aix_use_runtimelinking in 6513fe24f8a2Smrg aix,*) ;; # no import file 6514fe24f8a2Smrg svr4,* | *,yes) # use import file 6515fe24f8a2Smrg # The Import File defines what to hardcode. 6516fe24f8a2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6517fe24f8a2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6518fe24f8a2Smrg ;; 6519fe24f8a2Smrg esac 6520a1ed278cSmrg 6521fe24f8a2Smrg if test yes = "$GXX"; then 65223e72ca8cSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 65233e72ca8cSmrg # We only want to do this on AIX 4.2 and lower, the check 65243e72ca8cSmrg # below for broken collect2 doesn't work under 4.3+ 6525fe24f8a2Smrg collect2name=`$CC -print-prog-name=collect2` 65263e72ca8cSmrg if test -f "$collect2name" && 65273e72ca8cSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 65283e72ca8cSmrg then 65293e72ca8cSmrg # We have reworked collect2 65303e72ca8cSmrg : 65313e72ca8cSmrg else 65323e72ca8cSmrg # We have old collect2 65333e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 65343e72ca8cSmrg # It fails to find uninstalled libraries when the uninstalled 65353e72ca8cSmrg # path is not listed in the libpath. Setting hardcode_minus_L 65363e72ca8cSmrg # to unsupported forces relinking 65373e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 65383e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 65393e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 65403e72ca8cSmrg fi 65413e72ca8cSmrg esac 65423e72ca8cSmrg shared_flag='-shared' 6543fe24f8a2Smrg if test yes = "$aix_use_runtimelinking"; then 6544fe24f8a2Smrg shared_flag=$shared_flag' $wl-G' 65453e72ca8cSmrg fi 6546fe24f8a2Smrg # Need to ensure runtime linking is disabled for the traditional 6547fe24f8a2Smrg # shared library, or the linker may eventually find shared libraries 6548fe24f8a2Smrg # /with/ Import File - we do not want to mix them. 6549fe24f8a2Smrg shared_flag_aix='-shared' 6550fe24f8a2Smrg shared_flag_svr4='-shared $wl-G' 65513e72ca8cSmrg else 65523e72ca8cSmrg # not using gcc 6553fe24f8a2Smrg if test ia64 = "$host_cpu"; then 65543e72ca8cSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 65553e72ca8cSmrg # chokes on -Wl,-G. The following line is correct: 65563e72ca8cSmrg shared_flag='-G' 65573e72ca8cSmrg else 6558fe24f8a2Smrg if test yes = "$aix_use_runtimelinking"; then 6559fe24f8a2Smrg shared_flag='$wl-G' 65603e72ca8cSmrg else 6561fe24f8a2Smrg shared_flag='$wl-bM:SRE' 65623e72ca8cSmrg fi 6563fe24f8a2Smrg shared_flag_aix='$wl-bM:SRE' 6564fe24f8a2Smrg shared_flag_svr4='$wl-G' 65653e72ca8cSmrg fi 65663e72ca8cSmrg fi 6567ee3138f1Smrg 6568fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 65693e72ca8cSmrg # It seems that -bexpall does not export symbols beginning with 65703e72ca8cSmrg # underscore (_), so it is better to generate a list of symbols to 65713e72ca8cSmrg # export. 65723e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6573fe24f8a2Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 65743e72ca8cSmrg # Warning - without using the other runtime loading flags (-brtl), 65753e72ca8cSmrg # -berok will link without error, but may produce a broken library. 6576fe24f8a2Smrg # The "-G" linker flag allows undefined symbols. 6577fe24f8a2Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 65783e72ca8cSmrg # Determine the default libpath from the value encoded in an empty 65793e72ca8cSmrg # executable. 65803e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6581fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6582ee3138f1Smrg 6583fe24f8a2Smrg _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 65843e72ca8cSmrg else 6585fe24f8a2Smrg if test ia64 = "$host_cpu"; then 6586fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 65873e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6588fe24f8a2Smrg _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" 65893e72ca8cSmrg else 65903e72ca8cSmrg # Determine the default libpath from the value encoded in an 65913e72ca8cSmrg # empty executable. 65923e72ca8cSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6593fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 65943e72ca8cSmrg # Warning - without using the other run time loading flags, 65953e72ca8cSmrg # -berok will link without error, but may produce a broken library. 6596fe24f8a2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6597fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6598fe24f8a2Smrg if test yes = "$with_gnu_ld"; then 65993e72ca8cSmrg # We only use this code for GNU lds that support --whole-archive. 6600fe24f8a2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 66013e72ca8cSmrg else 66023e72ca8cSmrg # Exported symbols can be pulled into shared objects from archives 66033e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 66043e72ca8cSmrg fi 66053e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6606fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6607fe24f8a2Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6608fe24f8a2Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6609fe24f8a2Smrg if test svr4 != "$with_aix_soname"; then 6610fe24f8a2Smrg # This is similar to how AIX traditionally builds its shared 6611fe24f8a2Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6612fe24f8a2Smrg _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' 6613fe24f8a2Smrg fi 6614fe24f8a2Smrg if test aix != "$with_aix_soname"; then 6615fe24f8a2Smrg _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' 6616fe24f8a2Smrg else 6617fe24f8a2Smrg # used by -dlpreopen to get the symbols 6618fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6619fe24f8a2Smrg fi 6620fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 66213e72ca8cSmrg fi 66223e72ca8cSmrg fi 66233e72ca8cSmrg ;; 6624a1ed278cSmrg 66253e72ca8cSmrg beos*) 66263e72ca8cSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 66273e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66283e72ca8cSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 66293e72ca8cSmrg # support --undefined. This deserves some investigation. FIXME 6630fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 66313e72ca8cSmrg else 66323e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66333e72ca8cSmrg fi 66343e72ca8cSmrg ;; 6635a1ed278cSmrg 66363e72ca8cSmrg chorus*) 66373e72ca8cSmrg case $cc_basename in 66383e72ca8cSmrg *) 66393e72ca8cSmrg # FIXME: insert proper C++ library support 66403e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 66413e72ca8cSmrg ;; 66423e72ca8cSmrg esac 66433e72ca8cSmrg ;; 6644a1ed278cSmrg 66453e72ca8cSmrg cygwin* | mingw* | pw32* | cegcc*) 66463e72ca8cSmrg case $GXX,$cc_basename in 66473e72ca8cSmrg ,cl* | no,cl*) 66483e72ca8cSmrg # Native MSVC 66493e72ca8cSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 66503e72ca8cSmrg # no search path for DLLs. 66513e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 66523e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66533e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 66543e72ca8cSmrg _LT_TAGVAR(file_list_spec, $1)='@' 66553e72ca8cSmrg # Tell ltmain to make .lib files, not .a files. 66563e72ca8cSmrg libext=lib 66573e72ca8cSmrg # Tell ltmain to make .dll files, not .so files. 6658fe24f8a2Smrg shrext_cmds=.dll 66593e72ca8cSmrg # FIXME: Setting linknames here is a bad hack. 6660fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6661fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6662fe24f8a2Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 6663fe24f8a2Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6664fe24f8a2Smrg else 6665fe24f8a2Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6666fe24f8a2Smrg fi~ 6667fe24f8a2Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6668fe24f8a2Smrg linknames=' 66693e72ca8cSmrg # The linker will not automatically build a static lib if we build a DLL. 66703e72ca8cSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 66713e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66723e72ca8cSmrg # Don't use ranlib 66733e72ca8cSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 66743e72ca8cSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6675fe24f8a2Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6676fe24f8a2Smrg case $lt_outputfile in 6677fe24f8a2Smrg *.exe|*.EXE) ;; 6678fe24f8a2Smrg *) 6679fe24f8a2Smrg lt_outputfile=$lt_outputfile.exe 6680fe24f8a2Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 6681fe24f8a2Smrg ;; 6682fe24f8a2Smrg esac~ 6683fe24f8a2Smrg func_to_tool_file "$lt_outputfile"~ 6684fe24f8a2Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6685fe24f8a2Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6686fe24f8a2Smrg $RM "$lt_outputfile.manifest"; 6687fe24f8a2Smrg fi' 66883e72ca8cSmrg ;; 66893e72ca8cSmrg *) 66903e72ca8cSmrg # g++ 66913e72ca8cSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 66923e72ca8cSmrg # as there is no search path for DLLs. 66933e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6694fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 66953e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 66963e72ca8cSmrg _LT_TAGVAR(always_export_symbols, $1)=no 66973e72ca8cSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 66983e72ca8cSmrg 66993e72ca8cSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6700fe24f8a2Smrg _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' 6701fe24f8a2Smrg # If the export-symbols file already is a .def file, use it as 6702fe24f8a2Smrg # is; otherwise, prepend EXPORTS... 6703fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6704fe24f8a2Smrg cp $export_symbols $output_objdir/$soname.def; 6705fe24f8a2Smrg else 6706fe24f8a2Smrg echo EXPORTS > $output_objdir/$soname.def; 6707fe24f8a2Smrg cat $export_symbols >> $output_objdir/$soname.def; 6708fe24f8a2Smrg fi~ 6709fe24f8a2Smrg $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' 67103e72ca8cSmrg else 67113e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67123e72ca8cSmrg fi 67133e72ca8cSmrg ;; 67143e72ca8cSmrg esac 67153e72ca8cSmrg ;; 67163e72ca8cSmrg darwin* | rhapsody*) 67173e72ca8cSmrg _LT_DARWIN_LINKER_FEATURES($1) 67183e72ca8cSmrg ;; 6719ee3138f1Smrg 6720fe24f8a2Smrg os2*) 6721fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6722fe24f8a2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6723fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6724fe24f8a2Smrg shrext_cmds=.dll 6725fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6726fe24f8a2Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6727fe24f8a2Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6728fe24f8a2Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6729fe24f8a2Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6730fe24f8a2Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6731fe24f8a2Smrg emximp -o $lib $output_objdir/$libname.def' 6732fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6733fe24f8a2Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6734fe24f8a2Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6735fe24f8a2Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6736fe24f8a2Smrg prefix_cmds="$SED"~ 6737fe24f8a2Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6738fe24f8a2Smrg prefix_cmds="$prefix_cmds -e 1d"; 6739fe24f8a2Smrg fi~ 6740fe24f8a2Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6741fe24f8a2Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6742fe24f8a2Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6743fe24f8a2Smrg emximp -o $lib $output_objdir/$libname.def' 6744fe24f8a2Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6745fe24f8a2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6746fe24f8a2Smrg ;; 6747fe24f8a2Smrg 67483e72ca8cSmrg dgux*) 67493e72ca8cSmrg case $cc_basename in 67503e72ca8cSmrg ec++*) 67513e72ca8cSmrg # FIXME: insert proper C++ library support 67523e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67533e72ca8cSmrg ;; 67543e72ca8cSmrg ghcx*) 67553e72ca8cSmrg # Green Hills C++ Compiler 67563e72ca8cSmrg # FIXME: insert proper C++ library support 67573e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67583e72ca8cSmrg ;; 67593e72ca8cSmrg *) 67603e72ca8cSmrg # FIXME: insert proper C++ library support 67613e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67623e72ca8cSmrg ;; 67633e72ca8cSmrg esac 67643e72ca8cSmrg ;; 6765ee3138f1Smrg 67663e72ca8cSmrg freebsd2.*) 67673e72ca8cSmrg # C++ shared libraries reported to be fairly broken before 67683e72ca8cSmrg # switch to ELF 67693e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 67703e72ca8cSmrg ;; 67713e72ca8cSmrg 67723e72ca8cSmrg freebsd-elf*) 67733e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 67743e72ca8cSmrg ;; 67753e72ca8cSmrg 67763e72ca8cSmrg freebsd* | dragonfly*) 67773e72ca8cSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 67783e72ca8cSmrg # conventions 67793e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 67803e72ca8cSmrg ;; 67813e72ca8cSmrg 67823e72ca8cSmrg haiku*) 6783fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 67843e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67853e72ca8cSmrg ;; 6786ee3138f1Smrg 67873e72ca8cSmrg hpux9*) 6788fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 67893e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6790fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 67913e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 67923e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 67933e72ca8cSmrg # but as the default 67943e72ca8cSmrg # location of the library. 6795ee3138f1Smrg 67963e72ca8cSmrg case $cc_basename in 67973e72ca8cSmrg CC*) 67983e72ca8cSmrg # FIXME: insert proper C++ library support 67993e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68003e72ca8cSmrg ;; 68013e72ca8cSmrg aCC*) 6802fe24f8a2Smrg _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' 68033e72ca8cSmrg # Commands to make compiler produce verbose output that lists 68043e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 68053e72ca8cSmrg # linking a shared library. 68063e72ca8cSmrg # 68073e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 68083e72ca8cSmrg # explicitly linking system object files so we need to strip them 68093e72ca8cSmrg # from the output so that they don't get included in the library 68103e72ca8cSmrg # dependencies. 6811fe24f8a2Smrg 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"' 68123e72ca8cSmrg ;; 68133e72ca8cSmrg *) 6814fe24f8a2Smrg if test yes = "$GXX"; then 6815fe24f8a2Smrg _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' 68163e72ca8cSmrg else 68173e72ca8cSmrg # FIXME: insert proper C++ library support 68183e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68193e72ca8cSmrg fi 68203e72ca8cSmrg ;; 68213e72ca8cSmrg esac 68223e72ca8cSmrg ;; 6823ee3138f1Smrg 68243e72ca8cSmrg hpux10*|hpux11*) 6825fe24f8a2Smrg if test no = "$with_gnu_ld"; then 6826fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 68273e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6828a1ed278cSmrg 68293e72ca8cSmrg case $host_cpu in 68303e72ca8cSmrg hppa*64*|ia64*) 68313e72ca8cSmrg ;; 68323e72ca8cSmrg *) 6833fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 68343e72ca8cSmrg ;; 68353e72ca8cSmrg esac 68363e72ca8cSmrg fi 68373e72ca8cSmrg case $host_cpu in 68383e72ca8cSmrg hppa*64*|ia64*) 68393e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 68403e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 68413e72ca8cSmrg ;; 68423e72ca8cSmrg *) 68433e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 68443e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 68453e72ca8cSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 68463e72ca8cSmrg # but as the default 68473e72ca8cSmrg # location of the library. 68483e72ca8cSmrg ;; 68493e72ca8cSmrg esac 6850a1ed278cSmrg 68513e72ca8cSmrg case $cc_basename in 68523e72ca8cSmrg CC*) 68533e72ca8cSmrg # FIXME: insert proper C++ library support 68543e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68553e72ca8cSmrg ;; 68563e72ca8cSmrg aCC*) 68573e72ca8cSmrg case $host_cpu in 68583e72ca8cSmrg hppa*64*) 6859fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68603e72ca8cSmrg ;; 68613e72ca8cSmrg ia64*) 6862fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68633e72ca8cSmrg ;; 68643e72ca8cSmrg *) 6865fe24f8a2Smrg _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' 68663e72ca8cSmrg ;; 68673e72ca8cSmrg esac 68683e72ca8cSmrg # Commands to make compiler produce verbose output that lists 68693e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 68703e72ca8cSmrg # linking a shared library. 68713e72ca8cSmrg # 68723e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 68733e72ca8cSmrg # explicitly linking system object files so we need to strip them 68743e72ca8cSmrg # from the output so that they don't get included in the library 68753e72ca8cSmrg # dependencies. 6876fe24f8a2Smrg 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"' 68773e72ca8cSmrg ;; 68783e72ca8cSmrg *) 6879fe24f8a2Smrg if test yes = "$GXX"; then 6880fe24f8a2Smrg if test no = "$with_gnu_ld"; then 68813e72ca8cSmrg case $host_cpu in 68823e72ca8cSmrg hppa*64*) 6883fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 68843e72ca8cSmrg ;; 68853e72ca8cSmrg ia64*) 6886fe24f8a2Smrg _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' 68873e72ca8cSmrg ;; 68883e72ca8cSmrg *) 6889fe24f8a2Smrg _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' 68903e72ca8cSmrg ;; 68913e72ca8cSmrg esac 68923e72ca8cSmrg fi 68933e72ca8cSmrg else 68943e72ca8cSmrg # FIXME: insert proper C++ library support 68953e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 68963e72ca8cSmrg fi 68973e72ca8cSmrg ;; 68983e72ca8cSmrg esac 68993e72ca8cSmrg ;; 6900a1ed278cSmrg 69013e72ca8cSmrg interix[[3-9]]*) 69023e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=no 69033e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6904fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6905fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 69063e72ca8cSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 69073e72ca8cSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 69083e72ca8cSmrg # default) and relocated if they conflict, which is a slow very memory 69093e72ca8cSmrg # consuming and fragmenting process. To avoid this, we pick a random, 69103e72ca8cSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 69113e72ca8cSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6912fe24f8a2Smrg _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' 6913fe24f8a2Smrg _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' 69143e72ca8cSmrg ;; 69153e72ca8cSmrg irix5* | irix6*) 69163e72ca8cSmrg case $cc_basename in 69173e72ca8cSmrg CC*) 69183e72ca8cSmrg # SGI C++ 6919fe24f8a2Smrg _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' 6920ee3138f1Smrg 69213e72ca8cSmrg # Archives containing C++ object files must be created using 69223e72ca8cSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 69233e72ca8cSmrg # necessary to make sure instantiated templates are included 69243e72ca8cSmrg # in the archive. 69253e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 69263e72ca8cSmrg ;; 69273e72ca8cSmrg *) 6928fe24f8a2Smrg if test yes = "$GXX"; then 6929fe24f8a2Smrg if test no = "$with_gnu_ld"; then 6930fe24f8a2Smrg _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' 69313e72ca8cSmrg else 6932fe24f8a2Smrg _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' 69333e72ca8cSmrg fi 69343e72ca8cSmrg fi 69353e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 69363e72ca8cSmrg ;; 69373e72ca8cSmrg esac 6938fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 69393e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 69403e72ca8cSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 69413e72ca8cSmrg ;; 694234977a2fSmrg 6943fe24f8a2Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 69443e72ca8cSmrg case $cc_basename in 69453e72ca8cSmrg KCC*) 69463e72ca8cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 694734977a2fSmrg 69483e72ca8cSmrg # KCC will only create a shared library if the output file 69493e72ca8cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 69503e72ca8cSmrg # to its proper name (with version) after linking. 6951fe24f8a2Smrg _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' 6952fe24f8a2Smrg _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' 69533e72ca8cSmrg # Commands to make compiler produce verbose output that lists 69543e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 69553e72ca8cSmrg # linking a shared library. 69563e72ca8cSmrg # 69573e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 69583e72ca8cSmrg # explicitly linking system object files so we need to strip them 69593e72ca8cSmrg # from the output so that they don't get included in the library 69603e72ca8cSmrg # dependencies. 6961fe24f8a2Smrg 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"' 696234977a2fSmrg 6963fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6964fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6965a1ed278cSmrg 69663e72ca8cSmrg # Archives containing C++ object files must be created using 69673e72ca8cSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 69683e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 69693e72ca8cSmrg ;; 69703e72ca8cSmrg icpc* | ecpc* ) 69713e72ca8cSmrg # Intel C++ 69723e72ca8cSmrg with_gnu_ld=yes 69733e72ca8cSmrg # version 8.0 and above of icpc choke on multiply defined symbols 69743e72ca8cSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 69753e72ca8cSmrg # earlier do not add the objects themselves. 69763e72ca8cSmrg case `$CC -V 2>&1` in 69773e72ca8cSmrg *"Version 7."*) 6978fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6979fe24f8a2Smrg _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' 69803e72ca8cSmrg ;; 69813e72ca8cSmrg *) # Version 8.0 or newer 69823e72ca8cSmrg tmp_idyn= 69833e72ca8cSmrg case $host_cpu in 69843e72ca8cSmrg ia64*) tmp_idyn=' -i_dynamic';; 69853e72ca8cSmrg esac 6986fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6987fe24f8a2Smrg _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' 69883e72ca8cSmrg ;; 69893e72ca8cSmrg esac 69903e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6991fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6992fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6993fe24f8a2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 69943e72ca8cSmrg ;; 69953e72ca8cSmrg pgCC* | pgcpp*) 69963e72ca8cSmrg # Portland Group C++ compiler 69973e72ca8cSmrg case `$CC -V` in 69983e72ca8cSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 69993e72ca8cSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7000fe24f8a2Smrg rm -rf $tpldir~ 7001fe24f8a2Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7002fe24f8a2Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 70033e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7004fe24f8a2Smrg rm -rf $tpldir~ 7005fe24f8a2Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7006fe24f8a2Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7007fe24f8a2Smrg $RANLIB $oldlib' 70083e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7009fe24f8a2Smrg rm -rf $tpldir~ 7010fe24f8a2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7011fe24f8a2Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 70123e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7013fe24f8a2Smrg rm -rf $tpldir~ 7014fe24f8a2Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7015fe24f8a2Smrg $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' 70163e72ca8cSmrg ;; 70173e72ca8cSmrg *) # Version 6 and above use weak symbols 7018fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7019fe24f8a2Smrg _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' 70203e72ca8cSmrg ;; 70213e72ca8cSmrg esac 7022a1ed278cSmrg 7023fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7024fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7025fe24f8a2Smrg _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' 70263e72ca8cSmrg ;; 70273e72ca8cSmrg cxx*) 70283e72ca8cSmrg # Compaq C++ 7029fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7030fe24f8a2Smrg _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' 7031a1ed278cSmrg 70323e72ca8cSmrg runpath_var=LD_RUN_PATH 70333e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 70343e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7035a1ed278cSmrg 70363e72ca8cSmrg # Commands to make compiler produce verbose output that lists 70373e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 70383e72ca8cSmrg # linking a shared library. 70393e72ca8cSmrg # 70403e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 70413e72ca8cSmrg # explicitly linking system object files so we need to strip them 70423e72ca8cSmrg # from the output so that they don't get included in the library 70433e72ca8cSmrg # dependencies. 7044fe24f8a2Smrg 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' 70453e72ca8cSmrg ;; 70463e72ca8cSmrg xl* | mpixl* | bgxl*) 70473e72ca8cSmrg # IBM XL 8.0 on PPC, with GNU ld 7048fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7049fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7050fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7051fe24f8a2Smrg if test yes = "$supports_anon_versioning"; then 70523e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7053fe24f8a2Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7054fe24f8a2Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7055fe24f8a2Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 70563e72ca8cSmrg fi 70573e72ca8cSmrg ;; 70583e72ca8cSmrg *) 70593e72ca8cSmrg case `$CC -V 2>&1 | sed 5q` in 70603e72ca8cSmrg *Sun\ C*) 70613e72ca8cSmrg # Sun C++ 5.9 70623e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7063fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7064fe24f8a2Smrg _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' 70653e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7066fe24f8a2Smrg _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' 70673e72ca8cSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7068a1ed278cSmrg 70693e72ca8cSmrg # Not sure whether something based on 70703e72ca8cSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 70713e72ca8cSmrg # would be better. 70723e72ca8cSmrg output_verbose_link_cmd='func_echo_all' 7073a1ed278cSmrg 70743e72ca8cSmrg # Archives containing C++ object files must be created using 70753e72ca8cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 70763e72ca8cSmrg # necessary to make sure instantiated templates are included 70773e72ca8cSmrg # in the archive. 70783e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 70793e72ca8cSmrg ;; 70803e72ca8cSmrg esac 70813e72ca8cSmrg ;; 70823e72ca8cSmrg esac 70833e72ca8cSmrg ;; 7084a1ed278cSmrg 70853e72ca8cSmrg lynxos*) 70863e72ca8cSmrg # FIXME: insert proper C++ library support 70873e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 70883e72ca8cSmrg ;; 7089a1ed278cSmrg 70903e72ca8cSmrg m88k*) 70913e72ca8cSmrg # FIXME: insert proper C++ library support 70923e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 70933e72ca8cSmrg ;; 7094a1ed278cSmrg 70953e72ca8cSmrg mvs*) 70963e72ca8cSmrg case $cc_basename in 70973e72ca8cSmrg cxx*) 70983e72ca8cSmrg # FIXME: insert proper C++ library support 70993e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71003e72ca8cSmrg ;; 71013e72ca8cSmrg *) 71023e72ca8cSmrg # FIXME: insert proper C++ library support 71033e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71043e72ca8cSmrg ;; 71053e72ca8cSmrg esac 71063e72ca8cSmrg ;; 7107a1ed278cSmrg 71083e72ca8cSmrg netbsd*) 71093e72ca8cSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 71103e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 71113e72ca8cSmrg wlarc= 71123e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 71133e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71143e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71153e72ca8cSmrg fi 71163e72ca8cSmrg # Workaround some broken pre-1.5 toolchains 71173e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 71183e72ca8cSmrg ;; 7119a1ed278cSmrg 71203e72ca8cSmrg *nto* | *qnx*) 71213e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 71223e72ca8cSmrg ;; 7123a1ed278cSmrg 7124fe24f8a2Smrg openbsd* | bitrig*) 71253e72ca8cSmrg if test -f /usr/libexec/ld.so; then 71263e72ca8cSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 71273e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 71283e72ca8cSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 71293e72ca8cSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7130fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7131fe24f8a2Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7132fe24f8a2Smrg _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' 7133fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7134fe24f8a2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 71353e72ca8cSmrg fi 71363e72ca8cSmrg output_verbose_link_cmd=func_echo_all 71373e72ca8cSmrg else 71383e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71393e72ca8cSmrg fi 71403e72ca8cSmrg ;; 7141a1ed278cSmrg 71423e72ca8cSmrg osf3* | osf4* | osf5*) 71433e72ca8cSmrg case $cc_basename in 71443e72ca8cSmrg KCC*) 71453e72ca8cSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7146a1ed278cSmrg 71473e72ca8cSmrg # KCC will only create a shared library if the output file 71483e72ca8cSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 71493e72ca8cSmrg # to its proper name (with version) after linking. 7150fe24f8a2Smrg _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' 7151a1ed278cSmrg 7152fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 71533e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7154a1ed278cSmrg 71553e72ca8cSmrg # Archives containing C++ object files must be created using 71563e72ca8cSmrg # the KAI C++ compiler. 71573e72ca8cSmrg case $host in 71583e72ca8cSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 71593e72ca8cSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 71603e72ca8cSmrg esac 71613e72ca8cSmrg ;; 71623e72ca8cSmrg RCC*) 71633e72ca8cSmrg # Rational C++ 2.4.1 71643e72ca8cSmrg # FIXME: insert proper C++ library support 71653e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 71663e72ca8cSmrg ;; 71673e72ca8cSmrg cxx*) 71683e72ca8cSmrg case $host in 71693e72ca8cSmrg osf3*) 7170fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7171fe24f8a2Smrg _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' 7172fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 71733e72ca8cSmrg ;; 71743e72ca8cSmrg *) 71753e72ca8cSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7176fe24f8a2Smrg _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' 71773e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7178fe24f8a2Smrg echo "-hidden">> $lib.exp~ 7179fe24f8a2Smrg $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~ 7180fe24f8a2Smrg $RM $lib.exp' 71813e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 71823e72ca8cSmrg ;; 71833e72ca8cSmrg esac 7184a1ed278cSmrg 71853e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7186a1ed278cSmrg 71873e72ca8cSmrg # Commands to make compiler produce verbose output that lists 71883e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 71893e72ca8cSmrg # linking a shared library. 71903e72ca8cSmrg # 71913e72ca8cSmrg # There doesn't appear to be a way to prevent this compiler from 71923e72ca8cSmrg # explicitly linking system object files so we need to strip them 71933e72ca8cSmrg # from the output so that they don't get included in the library 71943e72ca8cSmrg # dependencies. 7195fe24f8a2Smrg 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"' 71963e72ca8cSmrg ;; 71973e72ca8cSmrg *) 7198fe24f8a2Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7199fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 72003e72ca8cSmrg case $host in 72013e72ca8cSmrg osf3*) 7202fe24f8a2Smrg _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' 72033e72ca8cSmrg ;; 72043e72ca8cSmrg *) 7205fe24f8a2Smrg _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' 72063e72ca8cSmrg ;; 72073e72ca8cSmrg esac 7208a1ed278cSmrg 7209fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 72103e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7211a1ed278cSmrg 72123e72ca8cSmrg # Commands to make compiler produce verbose output that lists 72133e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 72143e72ca8cSmrg # linking a shared library. 72153e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7216a1ed278cSmrg 72173e72ca8cSmrg else 72183e72ca8cSmrg # FIXME: insert proper C++ library support 72193e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72203e72ca8cSmrg fi 72213e72ca8cSmrg ;; 72223e72ca8cSmrg esac 72233e72ca8cSmrg ;; 7224a1ed278cSmrg 72253e72ca8cSmrg psos*) 72263e72ca8cSmrg # FIXME: insert proper C++ library support 72273e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72283e72ca8cSmrg ;; 7229a1ed278cSmrg 72303e72ca8cSmrg sunos4*) 72313e72ca8cSmrg case $cc_basename in 72323e72ca8cSmrg CC*) 72333e72ca8cSmrg # Sun C++ 4.x 72343e72ca8cSmrg # FIXME: insert proper C++ library support 72353e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72363e72ca8cSmrg ;; 72373e72ca8cSmrg lcc*) 72383e72ca8cSmrg # Lucid 72393e72ca8cSmrg # FIXME: insert proper C++ library support 72403e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72413e72ca8cSmrg ;; 72423e72ca8cSmrg *) 72433e72ca8cSmrg # FIXME: insert proper C++ library support 72443e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 72453e72ca8cSmrg ;; 72463e72ca8cSmrg esac 72473e72ca8cSmrg ;; 7248b425557eSmrg 72493e72ca8cSmrg solaris*) 72503e72ca8cSmrg case $cc_basename in 72513e72ca8cSmrg CC* | sunCC*) 72523e72ca8cSmrg # Sun C++ 4.2, 5.x and Centerline C++ 72533e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 72543e72ca8cSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7255fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 72563e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7257fe24f8a2Smrg $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' 72583e72ca8cSmrg 72593e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 72603e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 72613e72ca8cSmrg case $host_os in 72623e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 72633e72ca8cSmrg *) 72643e72ca8cSmrg # The compiler driver will combine and reorder linker options, 7265fe24f8a2Smrg # but understands '-z linker_flag'. 72663e72ca8cSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 72673e72ca8cSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 72683e72ca8cSmrg ;; 72693e72ca8cSmrg esac 72703e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7271ee3138f1Smrg 72723e72ca8cSmrg output_verbose_link_cmd='func_echo_all' 7273ee3138f1Smrg 72743e72ca8cSmrg # Archives containing C++ object files must be created using 72753e72ca8cSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 72763e72ca8cSmrg # necessary to make sure instantiated templates are included 72773e72ca8cSmrg # in the archive. 72783e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 72793e72ca8cSmrg ;; 72803e72ca8cSmrg gcx*) 72813e72ca8cSmrg # Green Hills C++ Compiler 7282fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7283ee3138f1Smrg 72843e72ca8cSmrg # The C++ compiler must be used to create the archive. 72853e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 72863e72ca8cSmrg ;; 72873e72ca8cSmrg *) 72883e72ca8cSmrg # GNU C++ compiler with Solaris linker 7289fe24f8a2Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 7290fe24f8a2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 72913e72ca8cSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7292fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 72933e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7294fe24f8a2Smrg $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' 7295a1ed278cSmrg 72963e72ca8cSmrg # Commands to make compiler produce verbose output that lists 72973e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 72983e72ca8cSmrg # linking a shared library. 72993e72ca8cSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73003e72ca8cSmrg else 7301fe24f8a2Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 73023e72ca8cSmrg # platform. 7303fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 73043e72ca8cSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7305fe24f8a2Smrg $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' 7306ee3138f1Smrg 73073e72ca8cSmrg # Commands to make compiler produce verbose output that lists 73083e72ca8cSmrg # what "hidden" libraries, object files and flags are used when 73093e72ca8cSmrg # linking a shared library. 73103e72ca8cSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 73113e72ca8cSmrg fi 7312ee3138f1Smrg 7313fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 73143e72ca8cSmrg case $host_os in 73153e72ca8cSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 73163e72ca8cSmrg *) 7317fe24f8a2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 73183e72ca8cSmrg ;; 73193e72ca8cSmrg esac 73203e72ca8cSmrg fi 73213e72ca8cSmrg ;; 73223e72ca8cSmrg esac 73233e72ca8cSmrg ;; 7324ee3138f1Smrg 73253e72ca8cSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7326fe24f8a2Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 73273e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73283e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 73293e72ca8cSmrg runpath_var='LD_RUN_PATH' 7330ee3138f1Smrg 73313e72ca8cSmrg case $cc_basename in 73323e72ca8cSmrg CC*) 7333fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7334fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73353e72ca8cSmrg ;; 73363e72ca8cSmrg *) 7337fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7338fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73393e72ca8cSmrg ;; 73403e72ca8cSmrg esac 73413e72ca8cSmrg ;; 73423e72ca8cSmrg 73433e72ca8cSmrg sysv5* | sco3.2v5* | sco5v6*) 7344fe24f8a2Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 73453e72ca8cSmrg # link with -lc, and that would cause any symbols used from libc to 73463e72ca8cSmrg # always be unresolved, which means just about no library would 73473e72ca8cSmrg # ever link correctly. If we're not using GNU ld we use -z text 73483e72ca8cSmrg # though, which does catch some bad symbols but isn't as heavy-handed 73493e72ca8cSmrg # as -z defs. 7350fe24f8a2Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7351fe24f8a2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 73523e72ca8cSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 73533e72ca8cSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7354fe24f8a2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 73553e72ca8cSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 73563e72ca8cSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7357fe24f8a2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 73583e72ca8cSmrg runpath_var='LD_RUN_PATH' 7359ee3138f1Smrg 73603e72ca8cSmrg case $cc_basename in 73613e72ca8cSmrg CC*) 7362fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7363fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73643e72ca8cSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7365fe24f8a2Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 73663e72ca8cSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7367fe24f8a2Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 73683e72ca8cSmrg ;; 73693e72ca8cSmrg *) 7370fe24f8a2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7371fe24f8a2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 73723e72ca8cSmrg ;; 73733e72ca8cSmrg esac 73743e72ca8cSmrg ;; 7375ee3138f1Smrg 73763e72ca8cSmrg tandem*) 73773e72ca8cSmrg case $cc_basename in 73783e72ca8cSmrg NCC*) 73793e72ca8cSmrg # NonStop-UX NCC 3.20 73803e72ca8cSmrg # FIXME: insert proper C++ library support 73813e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73823e72ca8cSmrg ;; 73833e72ca8cSmrg *) 73843e72ca8cSmrg # FIXME: insert proper C++ library support 73853e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73863e72ca8cSmrg ;; 73873e72ca8cSmrg esac 73883e72ca8cSmrg ;; 7389ee3138f1Smrg 73903e72ca8cSmrg vxworks*) 73913e72ca8cSmrg # FIXME: insert proper C++ library support 73923e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73933e72ca8cSmrg ;; 7394ee3138f1Smrg 73953e72ca8cSmrg *) 73963e72ca8cSmrg # FIXME: insert proper C++ library support 73973e72ca8cSmrg _LT_TAGVAR(ld_shlibs, $1)=no 73983e72ca8cSmrg ;; 73993e72ca8cSmrg esac 7400ee3138f1Smrg 74013e72ca8cSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7402fe24f8a2Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7403b425557eSmrg 7404fe24f8a2Smrg _LT_TAGVAR(GCC, $1)=$GXX 7405fe24f8a2Smrg _LT_TAGVAR(LD, $1)=$LD 7406ee3138f1Smrg 74073e72ca8cSmrg ## CAVEAT EMPTOR: 74083e72ca8cSmrg ## There is no encapsulation within the following macros, do not change 74093e72ca8cSmrg ## the running order or otherwise move them around unless you know exactly 74103e72ca8cSmrg ## what you are doing... 74113e72ca8cSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 74123e72ca8cSmrg _LT_COMPILER_PIC($1) 74133e72ca8cSmrg _LT_COMPILER_C_O($1) 74143e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 74153e72ca8cSmrg _LT_LINKER_SHLIBS($1) 74163e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 74173e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7418ee3138f1Smrg 74193e72ca8cSmrg _LT_CONFIG($1) 74203e72ca8cSmrg fi # test -n "$compiler" 7421ee3138f1Smrg 74223e72ca8cSmrg CC=$lt_save_CC 74233e72ca8cSmrg CFLAGS=$lt_save_CFLAGS 74243e72ca8cSmrg LDCXX=$LD 74253e72ca8cSmrg LD=$lt_save_LD 74263e72ca8cSmrg GCC=$lt_save_GCC 74273e72ca8cSmrg with_gnu_ld=$lt_save_with_gnu_ld 74283e72ca8cSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 74293e72ca8cSmrg lt_cv_path_LD=$lt_save_path_LD 74303e72ca8cSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 74313e72ca8cSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7432fe24f8a2Smrgfi # test yes != "$_lt_caught_CXX_error" 7433ee3138f1Smrg 74343e72ca8cSmrgAC_LANG_POP 74353e72ca8cSmrg])# _LT_LANG_CXX_CONFIG 7436ee3138f1Smrg 7437ee3138f1Smrg 74383e72ca8cSmrg# _LT_FUNC_STRIPNAME_CNF 74393e72ca8cSmrg# ---------------------- 74403e72ca8cSmrg# func_stripname_cnf prefix suffix name 7441a1ed278cSmrg# strip PREFIX and SUFFIX off of NAME. 7442a1ed278cSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7443a1ed278cSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7444a1ed278cSmrg# dot (in which case that matches only a dot). 74453e72ca8cSmrg# 74463e72ca8cSmrg# This function is identical to the (non-XSI) version of func_stripname, 74473e72ca8cSmrg# except this one can be used by m4 code that may be executed by configure, 74483e72ca8cSmrg# rather than the libtool script. 74493e72ca8cSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 74503e72ca8cSmrgAC_REQUIRE([_LT_DECL_SED]) 74513e72ca8cSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 74523e72ca8cSmrgfunc_stripname_cnf () 7453a1ed278cSmrg{ 7454fe24f8a2Smrg case @S|@2 in 7455fe24f8a2Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7456fe24f8a2Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7457a1ed278cSmrg esac 74583e72ca8cSmrg} # func_stripname_cnf 74593e72ca8cSmrg])# _LT_FUNC_STRIPNAME_CNF 7460ee3138f1Smrg 7461fe24f8a2Smrg 74623e72ca8cSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 74633e72ca8cSmrg# --------------------------------- 74643e72ca8cSmrg# Figure out "hidden" library dependencies from verbose 74653e72ca8cSmrg# compiler output when linking a shared library. 74663e72ca8cSmrg# Parse the compiler output and extract the necessary 74673e72ca8cSmrg# objects, libraries and library flags. 74683e72ca8cSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 74693e72ca8cSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 74703e72ca8cSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 74713e72ca8cSmrg# Dependencies to place before and after the object being linked: 74723e72ca8cSmrg_LT_TAGVAR(predep_objects, $1)= 74733e72ca8cSmrg_LT_TAGVAR(postdep_objects, $1)= 74743e72ca8cSmrg_LT_TAGVAR(predeps, $1)= 74753e72ca8cSmrg_LT_TAGVAR(postdeps, $1)= 74763e72ca8cSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7477ee3138f1Smrg 74783e72ca8cSmrgdnl we can't use the lt_simple_compile_test_code here, 74793e72ca8cSmrgdnl because it contains code intended for an executable, 74803e72ca8cSmrgdnl not a library. It's possible we should let each 74813e72ca8cSmrgdnl tag define a new lt_????_link_test_code variable, 74823e72ca8cSmrgdnl but it's only used here... 74833e72ca8cSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 74843e72ca8cSmrgint a; 74853e72ca8cSmrgvoid foo (void) { a = 0; } 7486a1ed278cSmrg_LT_EOF 74873e72ca8cSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 74883e72ca8cSmrgclass Foo 7489a1ed278cSmrg{ 74903e72ca8cSmrgpublic: 74913e72ca8cSmrg Foo (void) { a = 0; } 74923e72ca8cSmrgprivate: 74933e72ca8cSmrg int a; 74943e72ca8cSmrg}; 7495a1ed278cSmrg_LT_EOF 74963e72ca8cSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 74973e72ca8cSmrg subroutine foo 74983e72ca8cSmrg implicit none 74993e72ca8cSmrg integer*4 a 75003e72ca8cSmrg a=0 75013e72ca8cSmrg return 75023e72ca8cSmrg end 7503a1ed278cSmrg_LT_EOF 75043e72ca8cSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 75053e72ca8cSmrg subroutine foo 75063e72ca8cSmrg implicit none 75073e72ca8cSmrg integer a 75083e72ca8cSmrg a=0 75093e72ca8cSmrg return 75103e72ca8cSmrg end 75113e72ca8cSmrg_LT_EOF 75123e72ca8cSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 75133e72ca8cSmrgpublic class foo { 75143e72ca8cSmrg private int a; 75153e72ca8cSmrg public void bar (void) { 75163e72ca8cSmrg a = 0; 75173e72ca8cSmrg } 75183e72ca8cSmrg}; 75193e72ca8cSmrg_LT_EOF 75203e72ca8cSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 75213e72ca8cSmrgpackage foo 75223e72ca8cSmrgfunc foo() { 75233e72ca8cSmrg} 75243e72ca8cSmrg_LT_EOF 75253e72ca8cSmrg]) 7526ee3138f1Smrg 75273e72ca8cSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 75283e72ca8cSmrgcase "$CC $CFLAGS " in #( 75293e72ca8cSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 75303e72ca8cSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 75313e72ca8cSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 75323e72ca8cSmrgesac 7533ee3138f1Smrg 75343e72ca8cSmrgdnl Parse the compiler output and extract the necessary 75353e72ca8cSmrgdnl objects, libraries and library flags. 75363e72ca8cSmrgif AC_TRY_EVAL(ac_compile); then 75373e72ca8cSmrg # Parse the compiler output and extract the necessary 75383e72ca8cSmrg # objects, libraries and library flags. 7539ee3138f1Smrg 75403e72ca8cSmrg # Sentinel used to keep track of whether or not we are before 75413e72ca8cSmrg # the conftest object file. 75423e72ca8cSmrg pre_test_object_deps_done=no 7543ee3138f1Smrg 75443e72ca8cSmrg for p in `eval "$output_verbose_link_cmd"`; do 7545fe24f8a2Smrg case $prev$p in 7546ee3138f1Smrg 75473e72ca8cSmrg -L* | -R* | -l*) 75483e72ca8cSmrg # Some compilers place space between "-{L,R}" and the path. 75493e72ca8cSmrg # Remove the space. 7550fe24f8a2Smrg if test x-L = "$p" || 7551fe24f8a2Smrg test x-R = "$p"; then 75523e72ca8cSmrg prev=$p 75533e72ca8cSmrg continue 75543e72ca8cSmrg fi 7555ee3138f1Smrg 75563e72ca8cSmrg # Expand the sysroot to ease extracting the directories later. 75573e72ca8cSmrg if test -z "$prev"; then 75583e72ca8cSmrg case $p in 75593e72ca8cSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 75603e72ca8cSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 75613e72ca8cSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 75623e72ca8cSmrg esac 75633e72ca8cSmrg fi 75643e72ca8cSmrg case $p in 75653e72ca8cSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 75663e72ca8cSmrg esac 7567fe24f8a2Smrg if test no = "$pre_test_object_deps_done"; then 7568fe24f8a2Smrg case $prev in 75693e72ca8cSmrg -L | -R) 75703e72ca8cSmrg # Internal compiler library paths should come after those 75713e72ca8cSmrg # provided the user. The postdeps already come after the 75723e72ca8cSmrg # user supplied libs so there is no need to process them. 75733e72ca8cSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7574fe24f8a2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 75753e72ca8cSmrg else 7576fe24f8a2Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 75773e72ca8cSmrg fi 75783e72ca8cSmrg ;; 75793e72ca8cSmrg # The "-l" case would never come before the object being 75803e72ca8cSmrg # linked, so don't bother handling this case. 75813e72ca8cSmrg esac 75823e72ca8cSmrg else 75833e72ca8cSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7584fe24f8a2Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 75853e72ca8cSmrg else 7586fe24f8a2Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 75873e72ca8cSmrg fi 75883e72ca8cSmrg fi 75893e72ca8cSmrg prev= 75903e72ca8cSmrg ;; 7591ee3138f1Smrg 75923e72ca8cSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 75933e72ca8cSmrg *.$objext) 75943e72ca8cSmrg # This assumes that the test object file only shows up 75953e72ca8cSmrg # once in the compiler output. 75963e72ca8cSmrg if test "$p" = "conftest.$objext"; then 75973e72ca8cSmrg pre_test_object_deps_done=yes 75983e72ca8cSmrg continue 75993e72ca8cSmrg fi 7600ee3138f1Smrg 7601fe24f8a2Smrg if test no = "$pre_test_object_deps_done"; then 76023e72ca8cSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7603fe24f8a2Smrg _LT_TAGVAR(predep_objects, $1)=$p 76043e72ca8cSmrg else 76053e72ca8cSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 76063e72ca8cSmrg fi 76073e72ca8cSmrg else 76083e72ca8cSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7609fe24f8a2Smrg _LT_TAGVAR(postdep_objects, $1)=$p 76103e72ca8cSmrg else 76113e72ca8cSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 76123e72ca8cSmrg fi 76133e72ca8cSmrg fi 76143e72ca8cSmrg ;; 7615ee3138f1Smrg 76163e72ca8cSmrg *) ;; # Ignore the rest. 76173e72ca8cSmrg 76183e72ca8cSmrg esac 76193e72ca8cSmrg done 7620ee3138f1Smrg 76213e72ca8cSmrg # Clean up. 76223e72ca8cSmrg rm -f a.out a.exe 76233e72ca8cSmrgelse 76243e72ca8cSmrg echo "libtool.m4: error: problem compiling $1 test program" 76253e72ca8cSmrgfi 762634977a2fSmrg 76273e72ca8cSmrg$RM -f confest.$objext 76283e72ca8cSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 762934977a2fSmrg 76303e72ca8cSmrg# PORTME: override above test on systems where it is broken 76313e72ca8cSmrgm4_if([$1], [CXX], 76323e72ca8cSmrg[case $host_os in 76333e72ca8cSmrginterix[[3-9]]*) 76343e72ca8cSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 76353e72ca8cSmrg # hack all around it, let's just trust "g++" to DTRT. 76363e72ca8cSmrg _LT_TAGVAR(predep_objects,$1)= 76373e72ca8cSmrg _LT_TAGVAR(postdep_objects,$1)= 76383e72ca8cSmrg _LT_TAGVAR(postdeps,$1)= 7639a1ed278cSmrg ;; 7640fe24f8a2Smrgesac 7641fe24f8a2Smrg]) 764234977a2fSmrg 76433e72ca8cSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 76443e72ca8cSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 76453e72ca8cSmrgesac 76463e72ca8cSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 76473e72ca8cSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7648fe24f8a2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 76493e72ca8cSmrgfi 76503e72ca8cSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 76513e72ca8cSmrg [The directories searched by this compiler when creating a shared library]) 76523e72ca8cSmrg_LT_TAGDECL([], [predep_objects], [1], 76533e72ca8cSmrg [Dependencies to place before and after the objects being linked to 76543e72ca8cSmrg create a shared library]) 76553e72ca8cSmrg_LT_TAGDECL([], [postdep_objects], [1]) 76563e72ca8cSmrg_LT_TAGDECL([], [predeps], [1]) 76573e72ca8cSmrg_LT_TAGDECL([], [postdeps], [1]) 76583e72ca8cSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 76593e72ca8cSmrg [The library search path used internally by the compiler when linking 76603e72ca8cSmrg a shared library]) 76613e72ca8cSmrg])# _LT_SYS_HIDDEN_LIBDEPS 7662ee3138f1Smrg 766334977a2fSmrg 7664414bd68fSmrg# _LT_LANG_F77_CONFIG([TAG]) 7665414bd68fSmrg# -------------------------- 7666414bd68fSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 7667414bd68fSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7668fe24f8a2Smrg# to write the compiler configuration to 'libtool'. 7669414bd68fSmrgm4_defun([_LT_LANG_F77_CONFIG], 7670414bd68fSmrg[AC_LANG_PUSH(Fortran 77) 7671fe24f8a2Smrgif test -z "$F77" || test no = "$F77"; then 7672414bd68fSmrg _lt_disable_F77=yes 7673414bd68fSmrgfi 7674414bd68fSmrg 7675414bd68fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7676414bd68fSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7677414bd68fSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7678414bd68fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7679414bd68fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7680414bd68fSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7681414bd68fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7682414bd68fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7683414bd68fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7684414bd68fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7685414bd68fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7686414bd68fSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7687414bd68fSmrg_LT_TAGVAR(module_cmds, $1)= 7688414bd68fSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7689414bd68fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7690414bd68fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7691414bd68fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7692414bd68fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7693414bd68fSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7694414bd68fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7695414bd68fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7696414bd68fSmrg 7697414bd68fSmrg# Source file extension for f77 test sources. 7698414bd68fSmrgac_ext=f 7699414bd68fSmrg 7700414bd68fSmrg# Object file extension for compiled f77 test sources. 7701414bd68fSmrgobjext=o 7702414bd68fSmrg_LT_TAGVAR(objext, $1)=$objext 7703414bd68fSmrg 7704414bd68fSmrg# No sense in running all these tests if we already determined that 7705414bd68fSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 7706414bd68fSmrg# are currently assumed to apply to all compilers on this platform, 7707414bd68fSmrg# and will be corrupted by setting them based on a non-working compiler. 7708fe24f8a2Smrgif test yes != "$_lt_disable_F77"; then 7709414bd68fSmrg # Code to be used in simple compile tests 7710414bd68fSmrg lt_simple_compile_test_code="\ 7711414bd68fSmrg subroutine t 7712414bd68fSmrg return 7713414bd68fSmrg end 7714414bd68fSmrg" 7715414bd68fSmrg 7716414bd68fSmrg # Code to be used in simple link tests 7717414bd68fSmrg lt_simple_link_test_code="\ 7718414bd68fSmrg program t 7719414bd68fSmrg end 7720414bd68fSmrg" 7721414bd68fSmrg 7722414bd68fSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7723414bd68fSmrg _LT_TAG_COMPILER 7724414bd68fSmrg 7725414bd68fSmrg # save warnings/boilerplate of simple test code 7726414bd68fSmrg _LT_COMPILER_BOILERPLATE 7727414bd68fSmrg _LT_LINKER_BOILERPLATE 7728414bd68fSmrg 7729414bd68fSmrg # Allow CC to be a program name with arguments. 7730fe24f8a2Smrg lt_save_CC=$CC 7731414bd68fSmrg lt_save_GCC=$GCC 7732414bd68fSmrg lt_save_CFLAGS=$CFLAGS 7733414bd68fSmrg CC=${F77-"f77"} 7734414bd68fSmrg CFLAGS=$FFLAGS 7735414bd68fSmrg compiler=$CC 7736414bd68fSmrg _LT_TAGVAR(compiler, $1)=$CC 7737414bd68fSmrg _LT_CC_BASENAME([$compiler]) 7738414bd68fSmrg GCC=$G77 7739414bd68fSmrg if test -n "$compiler"; then 7740414bd68fSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7741414bd68fSmrg AC_MSG_RESULT([$can_build_shared]) 7742414bd68fSmrg 7743414bd68fSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7744fe24f8a2Smrg test no = "$can_build_shared" && enable_shared=no 7745414bd68fSmrg 7746414bd68fSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7747414bd68fSmrg # are all built from PIC. 7748414bd68fSmrg case $host_os in 7749414bd68fSmrg aix3*) 7750fe24f8a2Smrg test yes = "$enable_shared" && enable_static=no 7751414bd68fSmrg if test -n "$RANLIB"; then 7752414bd68fSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7753414bd68fSmrg postinstall_cmds='$RANLIB $lib' 7754414bd68fSmrg fi 7755414bd68fSmrg ;; 7756414bd68fSmrg aix[[4-9]]*) 7757fe24f8a2Smrg if test ia64 != "$host_cpu"; then 7758fe24f8a2Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7759fe24f8a2Smrg yes,aix,yes) ;; # shared object as lib.so file only 7760fe24f8a2Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7761fe24f8a2Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7762fe24f8a2Smrg esac 7763414bd68fSmrg fi 7764414bd68fSmrg ;; 7765414bd68fSmrg esac 7766414bd68fSmrg AC_MSG_RESULT([$enable_shared]) 7767414bd68fSmrg 7768414bd68fSmrg AC_MSG_CHECKING([whether to build static libraries]) 7769414bd68fSmrg # Make sure either enable_shared or enable_static is yes. 7770fe24f8a2Smrg test yes = "$enable_shared" || enable_static=yes 7771414bd68fSmrg AC_MSG_RESULT([$enable_static]) 7772414bd68fSmrg 7773fe24f8a2Smrg _LT_TAGVAR(GCC, $1)=$G77 7774fe24f8a2Smrg _LT_TAGVAR(LD, $1)=$LD 7775414bd68fSmrg 7776414bd68fSmrg ## CAVEAT EMPTOR: 7777414bd68fSmrg ## There is no encapsulation within the following macros, do not change 7778414bd68fSmrg ## the running order or otherwise move them around unless you know exactly 7779414bd68fSmrg ## what you are doing... 7780414bd68fSmrg _LT_COMPILER_PIC($1) 7781414bd68fSmrg _LT_COMPILER_C_O($1) 7782414bd68fSmrg _LT_COMPILER_FILE_LOCKS($1) 7783414bd68fSmrg _LT_LINKER_SHLIBS($1) 7784414bd68fSmrg _LT_SYS_DYNAMIC_LINKER($1) 7785414bd68fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7786414bd68fSmrg 7787414bd68fSmrg _LT_CONFIG($1) 7788414bd68fSmrg fi # test -n "$compiler" 7789414bd68fSmrg 7790414bd68fSmrg GCC=$lt_save_GCC 7791fe24f8a2Smrg CC=$lt_save_CC 7792fe24f8a2Smrg CFLAGS=$lt_save_CFLAGS 7793fe24f8a2Smrgfi # test yes != "$_lt_disable_F77" 7794414bd68fSmrg 7795414bd68fSmrgAC_LANG_POP 7796414bd68fSmrg])# _LT_LANG_F77_CONFIG 7797414bd68fSmrg 7798414bd68fSmrg 7799414bd68fSmrg# _LT_LANG_FC_CONFIG([TAG]) 7800414bd68fSmrg# ------------------------- 7801414bd68fSmrg# Ensure that the configuration variables for a Fortran compiler are 78023e72ca8cSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7803fe24f8a2Smrg# to write the compiler configuration to 'libtool'. 7804414bd68fSmrgm4_defun([_LT_LANG_FC_CONFIG], 7805414bd68fSmrg[AC_LANG_PUSH(Fortran) 7806414bd68fSmrg 7807fe24f8a2Smrgif test -z "$FC" || test no = "$FC"; then 7808414bd68fSmrg _lt_disable_FC=yes 78093e72ca8cSmrgfi 78103e72ca8cSmrg 78113e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 78123e72ca8cSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 78133e72ca8cSmrg_LT_TAGVAR(always_export_symbols, $1)=no 78143e72ca8cSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 78153e72ca8cSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 78163e72ca8cSmrg_LT_TAGVAR(hardcode_direct, $1)=no 78173e72ca8cSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 78183e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 78193e72ca8cSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 78203e72ca8cSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 78213e72ca8cSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 78223e72ca8cSmrg_LT_TAGVAR(inherit_rpath, $1)=no 78233e72ca8cSmrg_LT_TAGVAR(module_cmds, $1)= 78243e72ca8cSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 78253e72ca8cSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 78263e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 78273e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 78283e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 78293e72ca8cSmrg_LT_TAGVAR(no_undefined_flag, $1)= 78303e72ca8cSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 78313e72ca8cSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 783234977a2fSmrg 7833414bd68fSmrg# Source file extension for fc test sources. 7834414bd68fSmrgac_ext=${ac_fc_srcext-f} 783534977a2fSmrg 7836414bd68fSmrg# Object file extension for compiled fc test sources. 78373e72ca8cSmrgobjext=o 78383e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 783934977a2fSmrg 78403e72ca8cSmrg# No sense in running all these tests if we already determined that 7841414bd68fSmrg# the FC compiler isn't working. Some variables (like enable_shared) 78423e72ca8cSmrg# are currently assumed to apply to all compilers on this platform, 78433e72ca8cSmrg# and will be corrupted by setting them based on a non-working compiler. 7844fe24f8a2Smrgif test yes != "$_lt_disable_FC"; then 78453e72ca8cSmrg # Code to be used in simple compile tests 78463e72ca8cSmrg lt_simple_compile_test_code="\ 78473e72ca8cSmrg subroutine t 78483e72ca8cSmrg return 78493e72ca8cSmrg end 78503e72ca8cSmrg" 785134977a2fSmrg 78523e72ca8cSmrg # Code to be used in simple link tests 78533e72ca8cSmrg lt_simple_link_test_code="\ 78543e72ca8cSmrg program t 78553e72ca8cSmrg end 78563e72ca8cSmrg" 785734977a2fSmrg 78583e72ca8cSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 78593e72ca8cSmrg _LT_TAG_COMPILER 786034977a2fSmrg 78613e72ca8cSmrg # save warnings/boilerplate of simple test code 78623e72ca8cSmrg _LT_COMPILER_BOILERPLATE 78633e72ca8cSmrg _LT_LINKER_BOILERPLATE 786434977a2fSmrg 78653e72ca8cSmrg # Allow CC to be a program name with arguments. 7866fe24f8a2Smrg lt_save_CC=$CC 78673e72ca8cSmrg lt_save_GCC=$GCC 78683e72ca8cSmrg lt_save_CFLAGS=$CFLAGS 7869414bd68fSmrg CC=${FC-"f95"} 7870414bd68fSmrg CFLAGS=$FCFLAGS 78713e72ca8cSmrg compiler=$CC 7872414bd68fSmrg GCC=$ac_cv_fc_compiler_gnu 7873414bd68fSmrg 78743e72ca8cSmrg _LT_TAGVAR(compiler, $1)=$CC 78753e72ca8cSmrg _LT_CC_BASENAME([$compiler]) 7876414bd68fSmrg 78773e72ca8cSmrg if test -n "$compiler"; then 78783e72ca8cSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 78793e72ca8cSmrg AC_MSG_RESULT([$can_build_shared]) 7880ee3138f1Smrg 78813e72ca8cSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7882fe24f8a2Smrg test no = "$can_build_shared" && enable_shared=no 7883ee3138f1Smrg 78843e72ca8cSmrg # On AIX, shared libraries and static libraries use the same namespace, and 78853e72ca8cSmrg # are all built from PIC. 78863e72ca8cSmrg case $host_os in 78873e72ca8cSmrg aix3*) 7888fe24f8a2Smrg test yes = "$enable_shared" && enable_static=no 78893e72ca8cSmrg if test -n "$RANLIB"; then 78903e72ca8cSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 78913e72ca8cSmrg postinstall_cmds='$RANLIB $lib' 78923e72ca8cSmrg fi 78933e72ca8cSmrg ;; 78943e72ca8cSmrg aix[[4-9]]*) 7895fe24f8a2Smrg if test ia64 != "$host_cpu"; then 7896fe24f8a2Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7897fe24f8a2Smrg yes,aix,yes) ;; # shared object as lib.so file only 7898fe24f8a2Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 7899fe24f8a2Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7900fe24f8a2Smrg esac 7901a1ed278cSmrg fi 79023e72ca8cSmrg ;; 79033e72ca8cSmrg esac 79043e72ca8cSmrg AC_MSG_RESULT([$enable_shared]) 7905ee3138f1Smrg 79063e72ca8cSmrg AC_MSG_CHECKING([whether to build static libraries]) 79073e72ca8cSmrg # Make sure either enable_shared or enable_static is yes. 7908fe24f8a2Smrg test yes = "$enable_shared" || enable_static=yes 79093e72ca8cSmrg AC_MSG_RESULT([$enable_static]) 7910ee3138f1Smrg 7911fe24f8a2Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7912fe24f8a2Smrg _LT_TAGVAR(LD, $1)=$LD 7913ee3138f1Smrg 79143e72ca8cSmrg ## CAVEAT EMPTOR: 79153e72ca8cSmrg ## There is no encapsulation within the following macros, do not change 79163e72ca8cSmrg ## the running order or otherwise move them around unless you know exactly 79173e72ca8cSmrg ## what you are doing... 7918414bd68fSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 79193e72ca8cSmrg _LT_COMPILER_PIC($1) 79203e72ca8cSmrg _LT_COMPILER_C_O($1) 79213e72ca8cSmrg _LT_COMPILER_FILE_LOCKS($1) 79223e72ca8cSmrg _LT_LINKER_SHLIBS($1) 79233e72ca8cSmrg _LT_SYS_DYNAMIC_LINKER($1) 79243e72ca8cSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7925ee3138f1Smrg 79263e72ca8cSmrg _LT_CONFIG($1) 79273e72ca8cSmrg fi # test -n "$compiler" 7928a1ed278cSmrg 79293e72ca8cSmrg GCC=$lt_save_GCC 7930414bd68fSmrg CC=$lt_save_CC 7931414bd68fSmrg CFLAGS=$lt_save_CFLAGS 7932fe24f8a2Smrgfi # test yes != "$_lt_disable_FC" 7933a1ed278cSmrg 79343e72ca8cSmrgAC_LANG_POP 7935414bd68fSmrg])# _LT_LANG_FC_CONFIG 7936ee3138f1Smrg 7937ee3138f1Smrg 7938414bd68fSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7939414bd68fSmrg# -------------------------- 7940414bd68fSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7941414bd68fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7942fe24f8a2Smrg# to write the compiler configuration to 'libtool'. 7943414bd68fSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7944414bd68fSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7945414bd68fSmrgAC_LANG_SAVE 7946ee3138f1Smrg 7947414bd68fSmrg# Source file extension for Java test sources. 7948414bd68fSmrgac_ext=java 7949414bd68fSmrg 7950414bd68fSmrg# Object file extension for compiled Java test sources. 7951414bd68fSmrgobjext=o 7952414bd68fSmrg_LT_TAGVAR(objext, $1)=$objext 7953414bd68fSmrg 7954414bd68fSmrg# Code to be used in simple compile tests 7955414bd68fSmrglt_simple_compile_test_code="class foo {}" 7956414bd68fSmrg 7957414bd68fSmrg# Code to be used in simple link tests 7958414bd68fSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7959414bd68fSmrg 7960414bd68fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7961414bd68fSmrg_LT_TAG_COMPILER 7962414bd68fSmrg 7963414bd68fSmrg# save warnings/boilerplate of simple test code 7964414bd68fSmrg_LT_COMPILER_BOILERPLATE 7965414bd68fSmrg_LT_LINKER_BOILERPLATE 7966414bd68fSmrg 7967414bd68fSmrg# Allow CC to be a program name with arguments. 7968414bd68fSmrglt_save_CC=$CC 7969414bd68fSmrglt_save_CFLAGS=$CFLAGS 7970414bd68fSmrglt_save_GCC=$GCC 7971414bd68fSmrgGCC=yes 7972414bd68fSmrgCC=${GCJ-"gcj"} 7973414bd68fSmrgCFLAGS=$GCJFLAGS 7974414bd68fSmrgcompiler=$CC 7975414bd68fSmrg_LT_TAGVAR(compiler, $1)=$CC 7976fe24f8a2Smrg_LT_TAGVAR(LD, $1)=$LD 7977414bd68fSmrg_LT_CC_BASENAME([$compiler]) 7978414bd68fSmrg 7979414bd68fSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7980414bd68fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7981414bd68fSmrg 7982414bd68fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7983414bd68fSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7984414bd68fSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7985414bd68fSmrg 7986414bd68fSmrgif test -n "$compiler"; then 7987414bd68fSmrg _LT_COMPILER_NO_RTTI($1) 7988414bd68fSmrg _LT_COMPILER_PIC($1) 7989414bd68fSmrg _LT_COMPILER_C_O($1) 7990414bd68fSmrg _LT_COMPILER_FILE_LOCKS($1) 7991414bd68fSmrg _LT_LINKER_SHLIBS($1) 7992414bd68fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7993414bd68fSmrg 7994414bd68fSmrg _LT_CONFIG($1) 79953e72ca8cSmrgfi 799634977a2fSmrg 7997414bd68fSmrgAC_LANG_RESTORE 7998414bd68fSmrg 7999414bd68fSmrgGCC=$lt_save_GCC 8000414bd68fSmrgCC=$lt_save_CC 8001414bd68fSmrgCFLAGS=$lt_save_CFLAGS 8002414bd68fSmrg])# _LT_LANG_GCJ_CONFIG 8003414bd68fSmrg 8004414bd68fSmrg 8005414bd68fSmrg# _LT_LANG_GO_CONFIG([TAG]) 8006414bd68fSmrg# -------------------------- 8007414bd68fSmrg# Ensure that the configuration variables for the GNU Go compiler 8008414bd68fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8009fe24f8a2Smrg# to write the compiler configuration to 'libtool'. 8010414bd68fSmrgm4_defun([_LT_LANG_GO_CONFIG], 8011414bd68fSmrg[AC_REQUIRE([LT_PROG_GO])dnl 8012414bd68fSmrgAC_LANG_SAVE 8013414bd68fSmrg 8014414bd68fSmrg# Source file extension for Go test sources. 8015414bd68fSmrgac_ext=go 8016414bd68fSmrg 8017414bd68fSmrg# Object file extension for compiled Go test sources. 8018414bd68fSmrgobjext=o 8019414bd68fSmrg_LT_TAGVAR(objext, $1)=$objext 8020414bd68fSmrg 8021414bd68fSmrg# Code to be used in simple compile tests 8022414bd68fSmrglt_simple_compile_test_code="package main; func main() { }" 8023414bd68fSmrg 8024414bd68fSmrg# Code to be used in simple link tests 8025414bd68fSmrglt_simple_link_test_code='package main; func main() { }' 8026414bd68fSmrg 8027414bd68fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8028414bd68fSmrg_LT_TAG_COMPILER 8029414bd68fSmrg 8030414bd68fSmrg# save warnings/boilerplate of simple test code 8031414bd68fSmrg_LT_COMPILER_BOILERPLATE 8032414bd68fSmrg_LT_LINKER_BOILERPLATE 8033414bd68fSmrg 8034414bd68fSmrg# Allow CC to be a program name with arguments. 8035414bd68fSmrglt_save_CC=$CC 8036414bd68fSmrglt_save_CFLAGS=$CFLAGS 8037414bd68fSmrglt_save_GCC=$GCC 8038414bd68fSmrgGCC=yes 8039414bd68fSmrgCC=${GOC-"gccgo"} 8040414bd68fSmrgCFLAGS=$GOFLAGS 8041414bd68fSmrgcompiler=$CC 8042414bd68fSmrg_LT_TAGVAR(compiler, $1)=$CC 8043fe24f8a2Smrg_LT_TAGVAR(LD, $1)=$LD 8044414bd68fSmrg_LT_CC_BASENAME([$compiler]) 8045414bd68fSmrg 8046414bd68fSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 80473e72ca8cSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8048414bd68fSmrg 80493e72ca8cSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 80503e72ca8cSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 80513e72ca8cSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 805234977a2fSmrg 8053414bd68fSmrgif test -n "$compiler"; then 8054414bd68fSmrg _LT_COMPILER_NO_RTTI($1) 8055414bd68fSmrg _LT_COMPILER_PIC($1) 8056414bd68fSmrg _LT_COMPILER_C_O($1) 8057414bd68fSmrg _LT_COMPILER_FILE_LOCKS($1) 8058414bd68fSmrg _LT_LINKER_SHLIBS($1) 8059414bd68fSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8060ee3138f1Smrg 8061414bd68fSmrg _LT_CONFIG($1) 8062414bd68fSmrgfi 8063414bd68fSmrg 8064414bd68fSmrgAC_LANG_RESTORE 8065414bd68fSmrg 8066414bd68fSmrgGCC=$lt_save_GCC 8067414bd68fSmrgCC=$lt_save_CC 8068414bd68fSmrgCFLAGS=$lt_save_CFLAGS 8069414bd68fSmrg])# _LT_LANG_GO_CONFIG 8070414bd68fSmrg 8071414bd68fSmrg 8072414bd68fSmrg# _LT_LANG_RC_CONFIG([TAG]) 8073414bd68fSmrg# ------------------------- 8074414bd68fSmrg# Ensure that the configuration variables for the Windows resource compiler 8075414bd68fSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8076fe24f8a2Smrg# to write the compiler configuration to 'libtool'. 8077414bd68fSmrgm4_defun([_LT_LANG_RC_CONFIG], 8078414bd68fSmrg[AC_REQUIRE([LT_PROG_RC])dnl 8079414bd68fSmrgAC_LANG_SAVE 8080414bd68fSmrg 8081414bd68fSmrg# Source file extension for RC test sources. 8082414bd68fSmrgac_ext=rc 8083414bd68fSmrg 8084414bd68fSmrg# Object file extension for compiled RC test sources. 80853e72ca8cSmrgobjext=o 80863e72ca8cSmrg_LT_TAGVAR(objext, $1)=$objext 8087ee3138f1Smrg 8088414bd68fSmrg# Code to be used in simple compile tests 8089414bd68fSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8090414bd68fSmrg 8091414bd68fSmrg# Code to be used in simple link tests 8092fe24f8a2Smrglt_simple_link_test_code=$lt_simple_compile_test_code 8093414bd68fSmrg 8094414bd68fSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8095414bd68fSmrg_LT_TAG_COMPILER 8096414bd68fSmrg 8097414bd68fSmrg# save warnings/boilerplate of simple test code 8098414bd68fSmrg_LT_COMPILER_BOILERPLATE 8099414bd68fSmrg_LT_LINKER_BOILERPLATE 8100414bd68fSmrg 8101414bd68fSmrg# Allow CC to be a program name with arguments. 8102fe24f8a2Smrglt_save_CC=$CC 8103414bd68fSmrglt_save_CFLAGS=$CFLAGS 8104414bd68fSmrglt_save_GCC=$GCC 8105414bd68fSmrgGCC= 8106414bd68fSmrgCC=${RC-"windres"} 8107414bd68fSmrgCFLAGS= 8108414bd68fSmrgcompiler=$CC 8109414bd68fSmrg_LT_TAGVAR(compiler, $1)=$CC 8110414bd68fSmrg_LT_CC_BASENAME([$compiler]) 8111414bd68fSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8112414bd68fSmrg 8113414bd68fSmrgif test -n "$compiler"; then 8114414bd68fSmrg : 8115414bd68fSmrg _LT_CONFIG($1) 8116414bd68fSmrgfi 8117414bd68fSmrg 8118414bd68fSmrgGCC=$lt_save_GCC 8119414bd68fSmrgAC_LANG_RESTORE 8120414bd68fSmrgCC=$lt_save_CC 8121414bd68fSmrgCFLAGS=$lt_save_CFLAGS 8122414bd68fSmrg])# _LT_LANG_RC_CONFIG 8123414bd68fSmrg 81243e72ca8cSmrg 8125414bd68fSmrg# LT_PROG_GCJ 8126414bd68fSmrg# ----------- 8127414bd68fSmrgAC_DEFUN([LT_PROG_GCJ], 8128414bd68fSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8129414bd68fSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8130414bd68fSmrg [AC_CHECK_TOOL(GCJ, gcj,) 8131fe24f8a2Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8132414bd68fSmrg AC_SUBST(GCJFLAGS)])])[]dnl 8133414bd68fSmrg]) 81343e72ca8cSmrg 8135414bd68fSmrg# Old name: 8136414bd68fSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8137414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8138414bd68fSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 81393e72ca8cSmrg 81403e72ca8cSmrg 8141414bd68fSmrg# LT_PROG_GO 8142414bd68fSmrg# ---------- 8143414bd68fSmrgAC_DEFUN([LT_PROG_GO], 8144414bd68fSmrg[AC_CHECK_TOOL(GOC, gccgo,) 8145414bd68fSmrg]) 8146ee3138f1Smrg 8147ee3138f1Smrg 8148414bd68fSmrg# LT_PROG_RC 8149414bd68fSmrg# ---------- 8150414bd68fSmrgAC_DEFUN([LT_PROG_RC], 8151414bd68fSmrg[AC_CHECK_TOOL(RC, windres,) 8152414bd68fSmrg]) 8153ee3138f1Smrg 8154414bd68fSmrg# Old name: 8155414bd68fSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8156414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8157414bd68fSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 815834977a2fSmrg 815934977a2fSmrg 8160414bd68fSmrg# _LT_DECL_EGREP 8161414bd68fSmrg# -------------- 8162414bd68fSmrg# If we don't have a new enough Autoconf to choose the best grep 8163414bd68fSmrg# available, choose the one first in the user's PATH. 8164414bd68fSmrgm4_defun([_LT_DECL_EGREP], 8165414bd68fSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8166414bd68fSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8167414bd68fSmrgtest -z "$GREP" && GREP=grep 8168414bd68fSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8169414bd68fSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8170414bd68fSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8171414bd68fSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8172414bd68fSmrgAC_SUBST([GREP]) 8173414bd68fSmrg]) 817434977a2fSmrg 817534977a2fSmrg 8176414bd68fSmrg# _LT_DECL_OBJDUMP 8177414bd68fSmrg# -------------- 8178414bd68fSmrg# If we don't have a new enough Autoconf to choose the best objdump 8179414bd68fSmrg# available, choose the one first in the user's PATH. 8180414bd68fSmrgm4_defun([_LT_DECL_OBJDUMP], 8181414bd68fSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8182414bd68fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8183414bd68fSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8184414bd68fSmrgAC_SUBST([OBJDUMP]) 8185414bd68fSmrg]) 818634977a2fSmrg 8187414bd68fSmrg# _LT_DECL_DLLTOOL 8188414bd68fSmrg# ---------------- 8189414bd68fSmrg# Ensure DLLTOOL variable is set. 8190414bd68fSmrgm4_defun([_LT_DECL_DLLTOOL], 8191414bd68fSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8192414bd68fSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8193414bd68fSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8194414bd68fSmrgAC_SUBST([DLLTOOL]) 8195414bd68fSmrg]) 819634977a2fSmrg 8197414bd68fSmrg# _LT_DECL_SED 8198414bd68fSmrg# ------------ 8199414bd68fSmrg# Check for a fully-functional sed program, that truncates 8200414bd68fSmrg# as few characters as possible. Prefer GNU sed if found. 8201414bd68fSmrgm4_defun([_LT_DECL_SED], 8202414bd68fSmrg[AC_PROG_SED 8203414bd68fSmrgtest -z "$SED" && SED=sed 8204414bd68fSmrgXsed="$SED -e 1s/^X//" 8205414bd68fSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8206414bd68fSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8207414bd68fSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8208414bd68fSmrg])# _LT_DECL_SED 820934977a2fSmrg 8210414bd68fSmrgm4_ifndef([AC_PROG_SED], [ 8211414bd68fSmrg# NOTE: This macro has been submitted for inclusion into # 8212414bd68fSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8213414bd68fSmrg# a released version of Autoconf we should remove this # 8214414bd68fSmrg# macro and use it instead. # 8215414bd68fSmrg 8216414bd68fSmrgm4_defun([AC_PROG_SED], 8217414bd68fSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8218414bd68fSmrgAC_CACHE_VAL(lt_cv_path_SED, 8219414bd68fSmrg[# Loop through the user's path and test for sed and gsed. 8220414bd68fSmrg# Then use that list of sed's as ones to test for truncation. 8221414bd68fSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8222414bd68fSmrgfor as_dir in $PATH 8223414bd68fSmrgdo 8224414bd68fSmrg IFS=$as_save_IFS 8225414bd68fSmrg test -z "$as_dir" && as_dir=. 8226414bd68fSmrg for lt_ac_prog in sed gsed; do 8227414bd68fSmrg for ac_exec_ext in '' $ac_executable_extensions; do 8228414bd68fSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8229414bd68fSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8230414bd68fSmrg fi 8231414bd68fSmrg done 8232414bd68fSmrg done 8233414bd68fSmrgdone 8234414bd68fSmrgIFS=$as_save_IFS 8235414bd68fSmrglt_ac_max=0 8236414bd68fSmrglt_ac_count=0 8237414bd68fSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8238414bd68fSmrg# along with /bin/sed that truncates output. 8239414bd68fSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8240fe24f8a2Smrg test ! -f "$lt_ac_sed" && continue 8241414bd68fSmrg cat /dev/null > conftest.in 8242414bd68fSmrg lt_ac_count=0 8243414bd68fSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8244414bd68fSmrg # Check for GNU sed and select it if it is found. 8245414bd68fSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8246414bd68fSmrg lt_cv_path_SED=$lt_ac_sed 8247414bd68fSmrg break 8248414bd68fSmrg fi 8249414bd68fSmrg while true; do 8250414bd68fSmrg cat conftest.in conftest.in >conftest.tmp 8251414bd68fSmrg mv conftest.tmp conftest.in 8252414bd68fSmrg cp conftest.in conftest.nl 8253414bd68fSmrg echo >>conftest.nl 8254414bd68fSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8255414bd68fSmrg cmp -s conftest.out conftest.nl || break 8256414bd68fSmrg # 10000 chars as input seems more than enough 8257fe24f8a2Smrg test 10 -lt "$lt_ac_count" && break 8258414bd68fSmrg lt_ac_count=`expr $lt_ac_count + 1` 8259fe24f8a2Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8260414bd68fSmrg lt_ac_max=$lt_ac_count 8261414bd68fSmrg lt_cv_path_SED=$lt_ac_sed 8262414bd68fSmrg fi 8263414bd68fSmrg done 8264414bd68fSmrgdone 8265414bd68fSmrg]) 8266414bd68fSmrgSED=$lt_cv_path_SED 8267414bd68fSmrgAC_SUBST([SED]) 8268414bd68fSmrgAC_MSG_RESULT([$SED]) 8269414bd68fSmrg])#AC_PROG_SED 8270414bd68fSmrg])#m4_ifndef 8271a1ed278cSmrg 8272414bd68fSmrg# Old name: 8273414bd68fSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8274414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8275414bd68fSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 827634977a2fSmrg 827734977a2fSmrg 8278414bd68fSmrg# _LT_CHECK_SHELL_FEATURES 8279414bd68fSmrg# ------------------------ 8280414bd68fSmrg# Find out whether the shell is Bourne or XSI compatible, 8281414bd68fSmrg# or has some other useful features. 8282414bd68fSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8283fe24f8a2Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8284414bd68fSmrg lt_unset=unset 8285414bd68fSmrgelse 8286414bd68fSmrg lt_unset=false 8287414bd68fSmrgfi 8288414bd68fSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 828934977a2fSmrg 8290414bd68fSmrg# test EBCDIC or ASCII 8291414bd68fSmrgcase `echo X|tr X '\101'` in 8292414bd68fSmrg A) # ASCII based system 8293414bd68fSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8294414bd68fSmrg lt_SP2NL='tr \040 \012' 8295414bd68fSmrg lt_NL2SP='tr \015\012 \040\040' 8296414bd68fSmrg ;; 8297414bd68fSmrg *) # EBCDIC based system 8298414bd68fSmrg lt_SP2NL='tr \100 \n' 8299414bd68fSmrg lt_NL2SP='tr \r\n \100\100' 8300414bd68fSmrg ;; 8301414bd68fSmrgesac 8302414bd68fSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8303414bd68fSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8304414bd68fSmrg])# _LT_CHECK_SHELL_FEATURES 830534977a2fSmrg 830634977a2fSmrg 8307414bd68fSmrg# _LT_PATH_CONVERSION_FUNCTIONS 8308414bd68fSmrg# ----------------------------- 8309fe24f8a2Smrg# Determine what file name conversion functions should be used by 8310414bd68fSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8311414bd68fSmrg# for certain cross-compile configurations and native mingw. 8312414bd68fSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8313414bd68fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8314414bd68fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8315414bd68fSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8316414bd68fSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8317414bd68fSmrg[case $host in 8318414bd68fSmrg *-*-mingw* ) 8319414bd68fSmrg case $build in 8320414bd68fSmrg *-*-mingw* ) # actually msys 8321414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8322414bd68fSmrg ;; 8323414bd68fSmrg *-*-cygwin* ) 8324414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8325414bd68fSmrg ;; 8326414bd68fSmrg * ) # otherwise, assume *nix 8327414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8328414bd68fSmrg ;; 8329414bd68fSmrg esac 8330414bd68fSmrg ;; 8331414bd68fSmrg *-*-cygwin* ) 8332414bd68fSmrg case $build in 8333414bd68fSmrg *-*-mingw* ) # actually msys 8334414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8335414bd68fSmrg ;; 8336414bd68fSmrg *-*-cygwin* ) 8337414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 8338414bd68fSmrg ;; 8339414bd68fSmrg * ) # otherwise, assume *nix 8340414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8341414bd68fSmrg ;; 8342414bd68fSmrg esac 8343414bd68fSmrg ;; 8344414bd68fSmrg * ) # unhandled hosts (and "normal" native builds) 8345414bd68fSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 8346414bd68fSmrg ;; 8347414bd68fSmrgesac 8348414bd68fSmrg]) 8349414bd68fSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8350414bd68fSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8351414bd68fSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8352414bd68fSmrg [0], [convert $build file names to $host format])dnl 8353a1ed278cSmrg 8354414bd68fSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8355414bd68fSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8356414bd68fSmrg[#assume ordinary cross tools, or native build. 8357414bd68fSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 8358414bd68fSmrgcase $host in 8359414bd68fSmrg *-*-mingw* ) 8360414bd68fSmrg case $build in 8361414bd68fSmrg *-*-mingw* ) # actually msys 8362414bd68fSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8363414bd68fSmrg ;; 8364414bd68fSmrg esac 8365414bd68fSmrg ;; 8366414bd68fSmrgesac 8367414bd68fSmrg]) 8368414bd68fSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8369414bd68fSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8370414bd68fSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8371414bd68fSmrg [0], [convert $build files to toolchain format])dnl 8372414bd68fSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 8373a1ed278cSmrg 8374414bd68fSmrg# Helper functions for option handling. -*- Autoconf -*- 8375414bd68fSmrg# 8376fe24f8a2Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8377fe24f8a2Smrg# Foundation, Inc. 8378414bd68fSmrg# Written by Gary V. Vaughan, 2004 8379414bd68fSmrg# 8380414bd68fSmrg# This file is free software; the Free Software Foundation gives 8381414bd68fSmrg# unlimited permission to copy and/or distribute it, with or without 8382414bd68fSmrg# modifications, as long as this notice is preserved. 8383ee3138f1Smrg 8384fe24f8a2Smrg# serial 8 ltoptions.m4 8385ee3138f1Smrg 8386414bd68fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8387414bd68fSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8388ee3138f1Smrg 8389b425557eSmrg 8390414bd68fSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8391414bd68fSmrg# ------------------------------------------ 8392414bd68fSmrgm4_define([_LT_MANGLE_OPTION], 8393414bd68fSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8394ee3138f1Smrg 8395ee3138f1Smrg 8396414bd68fSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8397414bd68fSmrg# --------------------------------------- 8398414bd68fSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8399414bd68fSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8400414bd68fSmrg# saved as a flag. 8401414bd68fSmrgm4_define([_LT_SET_OPTION], 8402414bd68fSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8403414bd68fSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8404414bd68fSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8405fe24f8a2Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 8406414bd68fSmrg]) 8407ee3138f1Smrg 840834977a2fSmrg 8409414bd68fSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8410414bd68fSmrg# ------------------------------------------------------------ 8411414bd68fSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8412414bd68fSmrgm4_define([_LT_IF_OPTION], 8413414bd68fSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 841434977a2fSmrg 841534977a2fSmrg 8416414bd68fSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8417414bd68fSmrg# ------------------------------------------------------- 8418414bd68fSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8419414bd68fSmrg# are set. 8420414bd68fSmrgm4_define([_LT_UNLESS_OPTIONS], 8421414bd68fSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8422414bd68fSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8423414bd68fSmrg [m4_define([$0_found])])])[]dnl 8424414bd68fSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8425414bd68fSmrg])[]dnl 8426414bd68fSmrg]) 842734977a2fSmrg 842834977a2fSmrg 8429414bd68fSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8430414bd68fSmrg# ---------------------------------------- 8431414bd68fSmrg# OPTION-LIST is a space-separated list of Libtool options associated 8432414bd68fSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8433414bd68fSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8434414bd68fSmrg# the unknown option and exit. 8435414bd68fSmrgm4_defun([_LT_SET_OPTIONS], 8436414bd68fSmrg[# Set options 8437414bd68fSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8438414bd68fSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 8439ee3138f1Smrg 8440414bd68fSmrgm4_if([$1],[LT_INIT],[ 8441414bd68fSmrg dnl 8442414bd68fSmrg dnl Simply set some default values (i.e off) if boolean options were not 8443414bd68fSmrg dnl specified: 8444414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8445414bd68fSmrg ]) 8446414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8447414bd68fSmrg ]) 8448414bd68fSmrg dnl 8449414bd68fSmrg dnl If no reference was made to various pairs of opposing options, then 8450414bd68fSmrg dnl we run the default mode handler for the pair. For example, if neither 8451fe24f8a2Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8452414bd68fSmrg dnl archives by default: 8453414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8454414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8455414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8456414bd68fSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8457fe24f8a2Smrg [_LT_ENABLE_FAST_INSTALL]) 8458fe24f8a2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8459fe24f8a2Smrg [_LT_WITH_AIX_SONAME([aix])]) 8460414bd68fSmrg ]) 8461414bd68fSmrg])# _LT_SET_OPTIONS 84623e72ca8cSmrg 8463ee3138f1Smrg 8464ee3138f1Smrg 8465414bd68fSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8466414bd68fSmrg# ----------------------------------------- 8467414bd68fSmrgm4_define([_LT_MANGLE_DEFUN], 8468414bd68fSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8469ee3138f1Smrg 8470ee3138f1Smrg 8471414bd68fSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8472414bd68fSmrg# ----------------------------------------------- 8473414bd68fSmrgm4_define([LT_OPTION_DEFINE], 8474414bd68fSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8475414bd68fSmrg])# LT_OPTION_DEFINE 8476ee3138f1Smrg 8477ee3138f1Smrg 8478414bd68fSmrg# dlopen 8479414bd68fSmrg# ------ 8480414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 84813e72ca8cSmrg]) 8482ee3138f1Smrg 8483414bd68fSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8484414bd68fSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8485414bd68fSmrgAC_DIAGNOSE([obsolete], 8486414bd68fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8487fe24f8a2Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 84883e72ca8cSmrg]) 8489ee3138f1Smrg 84903e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 8491414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8492ee3138f1Smrg 8493ee3138f1Smrg 8494414bd68fSmrg# win32-dll 8495414bd68fSmrg# --------- 8496414bd68fSmrg# Declare package support for building win32 dll's. 8497414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8498414bd68fSmrg[enable_win32_dll=yes 8499ee3138f1Smrg 8500414bd68fSmrgcase $host in 8501414bd68fSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8502414bd68fSmrg AC_CHECK_TOOL(AS, as, false) 8503414bd68fSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8504414bd68fSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8505414bd68fSmrg ;; 8506414bd68fSmrgesac 8507b425557eSmrg 8508414bd68fSmrgtest -z "$AS" && AS=as 8509414bd68fSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8510b425557eSmrg 85113e72ca8cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8512414bd68fSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8513414bd68fSmrg 8514414bd68fSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8515414bd68fSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8516414bd68fSmrg])# win32-dll 8517414bd68fSmrg 8518414bd68fSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8519414bd68fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8520414bd68fSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8521414bd68fSmrgAC_DIAGNOSE([obsolete], 8522414bd68fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8523fe24f8a2Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 85243e72ca8cSmrg]) 8525b425557eSmrg 8526414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8527414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8528414bd68fSmrg 8529414bd68fSmrg 8530414bd68fSmrg# _LT_ENABLE_SHARED([DEFAULT]) 8531414bd68fSmrg# ---------------------------- 8532fe24f8a2Smrg# implement the --enable-shared flag, and supports the 'shared' and 8533fe24f8a2Smrg# 'disable-shared' LT_INIT options. 8534fe24f8a2Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8535414bd68fSmrgm4_define([_LT_ENABLE_SHARED], 8536414bd68fSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8537414bd68fSmrgAC_ARG_ENABLE([shared], 8538414bd68fSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8539414bd68fSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8540414bd68fSmrg [p=${PACKAGE-default} 8541414bd68fSmrg case $enableval in 8542414bd68fSmrg yes) enable_shared=yes ;; 8543414bd68fSmrg no) enable_shared=no ;; 8544414bd68fSmrg *) 8545414bd68fSmrg enable_shared=no 8546414bd68fSmrg # Look at the argument we got. We use all the common list separators. 8547fe24f8a2Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8548414bd68fSmrg for pkg in $enableval; do 8549fe24f8a2Smrg IFS=$lt_save_ifs 8550414bd68fSmrg if test "X$pkg" = "X$p"; then 8551414bd68fSmrg enable_shared=yes 8552414bd68fSmrg fi 8553414bd68fSmrg done 8554fe24f8a2Smrg IFS=$lt_save_ifs 8555414bd68fSmrg ;; 8556414bd68fSmrg esac], 8557414bd68fSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8558414bd68fSmrg 8559414bd68fSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8560414bd68fSmrg [Whether or not to build shared libraries]) 8561414bd68fSmrg])# _LT_ENABLE_SHARED 8562b425557eSmrg 8563414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8564414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8565b425557eSmrg 8566414bd68fSmrg# Old names: 8567414bd68fSmrgAC_DEFUN([AC_ENABLE_SHARED], 8568414bd68fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8569a1ed278cSmrg]) 8570b425557eSmrg 8571414bd68fSmrgAC_DEFUN([AC_DISABLE_SHARED], 8572414bd68fSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8573414bd68fSmrg]) 8574414bd68fSmrg 8575414bd68fSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8576414bd68fSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8577414bd68fSmrg 85783e72ca8cSmrgdnl aclocal-1.4 backwards compatibility: 8579414bd68fSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8580414bd68fSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8581b425557eSmrg 8582ee3138f1Smrg 8583ee3138f1Smrg 8584414bd68fSmrg# _LT_ENABLE_STATIC([DEFAULT]) 8585414bd68fSmrg# ---------------------------- 8586fe24f8a2Smrg# implement the --enable-static flag, and support the 'static' and 8587fe24f8a2Smrg# 'disable-static' LT_INIT options. 8588fe24f8a2Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8589414bd68fSmrgm4_define([_LT_ENABLE_STATIC], 8590414bd68fSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8591414bd68fSmrgAC_ARG_ENABLE([static], 8592414bd68fSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8593414bd68fSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8594414bd68fSmrg [p=${PACKAGE-default} 8595414bd68fSmrg case $enableval in 8596414bd68fSmrg yes) enable_static=yes ;; 8597414bd68fSmrg no) enable_static=no ;; 8598414bd68fSmrg *) 8599414bd68fSmrg enable_static=no 8600414bd68fSmrg # Look at the argument we got. We use all the common list separators. 8601fe24f8a2Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8602414bd68fSmrg for pkg in $enableval; do 8603fe24f8a2Smrg IFS=$lt_save_ifs 8604414bd68fSmrg if test "X$pkg" = "X$p"; then 8605414bd68fSmrg enable_static=yes 8606414bd68fSmrg fi 8607414bd68fSmrg done 8608fe24f8a2Smrg IFS=$lt_save_ifs 8609414bd68fSmrg ;; 8610414bd68fSmrg esac], 8611414bd68fSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8612ee3138f1Smrg 8613414bd68fSmrg _LT_DECL([build_old_libs], [enable_static], [0], 8614414bd68fSmrg [Whether or not to build static libraries]) 8615414bd68fSmrg])# _LT_ENABLE_STATIC 8616ee3138f1Smrg 8617414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8618414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 86193e72ca8cSmrg 8620414bd68fSmrg# Old names: 8621414bd68fSmrgAC_DEFUN([AC_ENABLE_STATIC], 8622414bd68fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8623414bd68fSmrg]) 86243e72ca8cSmrg 8625414bd68fSmrgAC_DEFUN([AC_DISABLE_STATIC], 8626414bd68fSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8627a1ed278cSmrg]) 862834977a2fSmrg 8629414bd68fSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8630414bd68fSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 863134977a2fSmrg 8632414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8633414bd68fSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8634414bd68fSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 86353e72ca8cSmrg 86363e72ca8cSmrg 863734977a2fSmrg 8638414bd68fSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8639414bd68fSmrg# ---------------------------------- 8640fe24f8a2Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 8641fe24f8a2Smrg# and 'disable-fast-install' LT_INIT options. 8642fe24f8a2Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8643414bd68fSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 8644414bd68fSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8645414bd68fSmrgAC_ARG_ENABLE([fast-install], 8646414bd68fSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8647414bd68fSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8648414bd68fSmrg [p=${PACKAGE-default} 8649414bd68fSmrg case $enableval in 8650414bd68fSmrg yes) enable_fast_install=yes ;; 8651414bd68fSmrg no) enable_fast_install=no ;; 8652414bd68fSmrg *) 8653414bd68fSmrg enable_fast_install=no 8654414bd68fSmrg # Look at the argument we got. We use all the common list separators. 8655fe24f8a2Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8656414bd68fSmrg for pkg in $enableval; do 8657fe24f8a2Smrg IFS=$lt_save_ifs 8658414bd68fSmrg if test "X$pkg" = "X$p"; then 8659414bd68fSmrg enable_fast_install=yes 8660414bd68fSmrg fi 8661414bd68fSmrg done 8662fe24f8a2Smrg IFS=$lt_save_ifs 8663414bd68fSmrg ;; 8664414bd68fSmrg esac], 8665414bd68fSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 866634977a2fSmrg 8667414bd68fSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 8668414bd68fSmrg [Whether or not to optimize for fast installation])dnl 8669414bd68fSmrg])# _LT_ENABLE_FAST_INSTALL 8670414bd68fSmrg 8671414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8672414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8673414bd68fSmrg 8674414bd68fSmrg# Old names: 8675414bd68fSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8676414bd68fSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8677414bd68fSmrgAC_DIAGNOSE([obsolete], 8678414bd68fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8679fe24f8a2Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 8680414bd68fSmrg]) 8681414bd68fSmrg 8682414bd68fSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8683414bd68fSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8684414bd68fSmrgAC_DIAGNOSE([obsolete], 8685414bd68fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8686fe24f8a2Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 8687414bd68fSmrg]) 86883e72ca8cSmrg 8689414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8690414bd68fSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8691414bd68fSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 86923e72ca8cSmrg 86933e72ca8cSmrg 8694fe24f8a2Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 8695fe24f8a2Smrg# ---------------------------------- 8696fe24f8a2Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8697fe24f8a2Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8698fe24f8a2Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8699fe24f8a2Smrgm4_define([_LT_WITH_AIX_SONAME], 8700fe24f8a2Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8701fe24f8a2Smrgshared_archive_member_spec= 8702fe24f8a2Smrgcase $host,$enable_shared in 8703fe24f8a2Smrgpower*-*-aix[[5-9]]*,yes) 8704fe24f8a2Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8705fe24f8a2Smrg AC_ARG_WITH([aix-soname], 8706fe24f8a2Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8707fe24f8a2Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8708fe24f8a2Smrg [case $withval in 8709fe24f8a2Smrg aix|svr4|both) 8710fe24f8a2Smrg ;; 8711fe24f8a2Smrg *) 8712fe24f8a2Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8713fe24f8a2Smrg ;; 8714fe24f8a2Smrg esac 8715fe24f8a2Smrg lt_cv_with_aix_soname=$with_aix_soname], 8716fe24f8a2Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 8717fe24f8a2Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8718fe24f8a2Smrg with_aix_soname=$lt_cv_with_aix_soname]) 8719fe24f8a2Smrg AC_MSG_RESULT([$with_aix_soname]) 8720fe24f8a2Smrg if test aix != "$with_aix_soname"; then 8721fe24f8a2Smrg # For the AIX way of multilib, we name the shared archive member 8722fe24f8a2Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8723fe24f8a2Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8724fe24f8a2Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8725fe24f8a2Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 8726fe24f8a2Smrg if test 64 = "${OBJECT_MODE-32}"; then 8727fe24f8a2Smrg shared_archive_member_spec=shr_64 8728fe24f8a2Smrg else 8729fe24f8a2Smrg shared_archive_member_spec=shr 8730fe24f8a2Smrg fi 8731fe24f8a2Smrg fi 8732fe24f8a2Smrg ;; 8733fe24f8a2Smrg*) 8734fe24f8a2Smrg with_aix_soname=aix 8735fe24f8a2Smrg ;; 8736fe24f8a2Smrgesac 8737fe24f8a2Smrg 8738fe24f8a2Smrg_LT_DECL([], [shared_archive_member_spec], [0], 8739fe24f8a2Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8740fe24f8a2Smrg])# _LT_WITH_AIX_SONAME 8741fe24f8a2Smrg 8742fe24f8a2SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8743fe24f8a2SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8744fe24f8a2SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8745fe24f8a2Smrg 8746fe24f8a2Smrg 8747414bd68fSmrg# _LT_WITH_PIC([MODE]) 8748414bd68fSmrg# -------------------- 8749fe24f8a2Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8750414bd68fSmrg# LT_INIT options. 8751fe24f8a2Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8752414bd68fSmrgm4_define([_LT_WITH_PIC], 8753414bd68fSmrg[AC_ARG_WITH([pic], 8754414bd68fSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8755414bd68fSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8756414bd68fSmrg [lt_p=${PACKAGE-default} 8757414bd68fSmrg case $withval in 8758414bd68fSmrg yes|no) pic_mode=$withval ;; 8759414bd68fSmrg *) 8760414bd68fSmrg pic_mode=default 8761414bd68fSmrg # Look at the argument we got. We use all the common list separators. 8762fe24f8a2Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8763414bd68fSmrg for lt_pkg in $withval; do 8764fe24f8a2Smrg IFS=$lt_save_ifs 8765414bd68fSmrg if test "X$lt_pkg" = "X$lt_p"; then 8766414bd68fSmrg pic_mode=yes 8767414bd68fSmrg fi 8768414bd68fSmrg done 8769fe24f8a2Smrg IFS=$lt_save_ifs 8770414bd68fSmrg ;; 8771414bd68fSmrg esac], 8772fe24f8a2Smrg [pic_mode=m4_default([$1], [default])]) 87733e72ca8cSmrg 8774414bd68fSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8775414bd68fSmrg])# _LT_WITH_PIC 877634977a2fSmrg 8777414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8778414bd68fSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8779ee3138f1Smrg 8780414bd68fSmrg# Old name: 8781414bd68fSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8782414bd68fSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8783414bd68fSmrgAC_DIAGNOSE([obsolete], 8784414bd68fSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8785fe24f8a2Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 8786414bd68fSmrg]) 8787ee3138f1Smrg 8788414bd68fSmrgdnl aclocal-1.4 backwards compatibility: 8789414bd68fSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8790ee3138f1Smrg 8791ee3138f1Smrg 8792414bd68fSmrgm4_define([_LTDL_MODE], []) 8793414bd68fSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8794414bd68fSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8795414bd68fSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8796414bd68fSmrg [m4_define([_LTDL_MODE], [recursive])]) 8797414bd68fSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8798414bd68fSmrg [m4_define([_LTDL_MODE], [subproject])]) 87993e72ca8cSmrg 8800414bd68fSmrgm4_define([_LTDL_TYPE], []) 8801414bd68fSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8802414bd68fSmrg [m4_define([_LTDL_TYPE], [installable])]) 8803414bd68fSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8804414bd68fSmrg [m4_define([_LTDL_TYPE], [convenience])]) 88053e72ca8cSmrg 8806414bd68fSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8807a1ed278cSmrg# 8808fe24f8a2Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 8809fe24f8a2Smrg# Foundation, Inc. 8810414bd68fSmrg# Written by Gary V. Vaughan, 2004 88113e72ca8cSmrg# 88123e72ca8cSmrg# This file is free software; the Free Software Foundation gives 88133e72ca8cSmrg# unlimited permission to copy and/or distribute it, with or without 88143e72ca8cSmrg# modifications, as long as this notice is preserved. 8815ee3138f1Smrg 8816414bd68fSmrg# serial 6 ltsugar.m4 8817ee3138f1Smrg 88183e72ca8cSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8819414bd68fSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 88203e72ca8cSmrg 8821ee3138f1Smrg 8822414bd68fSmrg# lt_join(SEP, ARG1, [ARG2...]) 8823414bd68fSmrg# ----------------------------- 8824414bd68fSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8825414bd68fSmrg# associated separator. 8826414bd68fSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8827414bd68fSmrg# versions in m4sugar had bugs. 8828414bd68fSmrgm4_define([lt_join], 8829414bd68fSmrg[m4_if([$#], [1], [], 8830414bd68fSmrg [$#], [2], [[$2]], 8831414bd68fSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8832414bd68fSmrgm4_define([_lt_join], 8833414bd68fSmrg[m4_if([$#$2], [2], [], 8834414bd68fSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8835ee3138f1Smrg 88363e72ca8cSmrg 8837414bd68fSmrg# lt_car(LIST) 8838414bd68fSmrg# lt_cdr(LIST) 8839414bd68fSmrg# ------------ 8840414bd68fSmrg# Manipulate m4 lists. 8841414bd68fSmrg# These macros are necessary as long as will still need to support 8842fe24f8a2Smrg# Autoconf-2.59, which quotes differently. 8843414bd68fSmrgm4_define([lt_car], [[$1]]) 8844414bd68fSmrgm4_define([lt_cdr], 8845414bd68fSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8846414bd68fSmrg [$#], 1, [], 8847414bd68fSmrg [m4_dquote(m4_shift($@))])]) 8848414bd68fSmrgm4_define([lt_unquote], $1) 8849ee3138f1Smrg 8850ee3138f1Smrg 8851414bd68fSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8852414bd68fSmrg# ------------------------------------------ 8853fe24f8a2Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8854414bd68fSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8855414bd68fSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8856414bd68fSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8857414bd68fSmrg# than defined and empty). 8858414bd68fSmrg# 8859414bd68fSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8860414bd68fSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8861414bd68fSmrgm4_define([lt_append], 8862414bd68fSmrg[m4_define([$1], 8863414bd68fSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8864ee3138f1Smrg 8865b425557eSmrg 8866b425557eSmrg 8867414bd68fSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8868414bd68fSmrg# ---------------------------------------------------------- 8869414bd68fSmrg# Produce a SEP delimited list of all paired combinations of elements of 8870414bd68fSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8871414bd68fSmrg# has the form PREFIXmINFIXSUFFIXn. 8872414bd68fSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8873414bd68fSmrgm4_define([lt_combine], 8874414bd68fSmrg[m4_if(m4_eval([$# > 3]), [1], 8875414bd68fSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8876414bd68fSmrg[[m4_foreach([_Lt_prefix], [$2], 8877414bd68fSmrg [m4_foreach([_Lt_suffix], 8878414bd68fSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8879414bd68fSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8880ee3138f1Smrg 8881ee3138f1Smrg 8882414bd68fSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8883414bd68fSmrg# ----------------------------------------------------------------------- 8884414bd68fSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8885414bd68fSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8886414bd68fSmrgm4_define([lt_if_append_uniq], 8887414bd68fSmrg[m4_ifdef([$1], 8888414bd68fSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8889414bd68fSmrg [lt_append([$1], [$2], [$3])$4], 8890414bd68fSmrg [$5])], 8891414bd68fSmrg [lt_append([$1], [$2], [$3])$4])]) 8892ee3138f1Smrg 8893ee3138f1Smrg 8894414bd68fSmrg# lt_dict_add(DICT, KEY, VALUE) 8895414bd68fSmrg# ----------------------------- 8896414bd68fSmrgm4_define([lt_dict_add], 8897414bd68fSmrg[m4_define([$1($2)], [$3])]) 8898ee3138f1Smrg 8899ee3138f1Smrg 8900414bd68fSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8901414bd68fSmrg# -------------------------------------------- 8902414bd68fSmrgm4_define([lt_dict_add_subkey], 8903414bd68fSmrg[m4_define([$1($2:$3)], [$4])]) 8904ee3138f1Smrg 8905b425557eSmrg 8906414bd68fSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8907414bd68fSmrg# ---------------------------------- 8908414bd68fSmrgm4_define([lt_dict_fetch], 8909414bd68fSmrg[m4_ifval([$3], 8910414bd68fSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8911414bd68fSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8912ee3138f1Smrg 8913a1ed278cSmrg 8914414bd68fSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8915414bd68fSmrg# ----------------------------------------------------------------- 8916414bd68fSmrgm4_define([lt_if_dict_fetch], 8917414bd68fSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8918414bd68fSmrg [$5], 8919414bd68fSmrg [$6])]) 8920a1ed278cSmrg 8921a1ed278cSmrg 8922414bd68fSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8923414bd68fSmrg# -------------------------------------------------------------- 8924414bd68fSmrgm4_define([lt_dict_filter], 8925414bd68fSmrg[m4_if([$5], [], [], 8926414bd68fSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8927414bd68fSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8928414bd68fSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8929414bd68fSmrg]) 89303e72ca8cSmrg 8931414bd68fSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8932414bd68fSmrg# 8933fe24f8a2Smrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 8934414bd68fSmrg# Written by Scott James Remnant, 2004 8935414bd68fSmrg# 8936414bd68fSmrg# This file is free software; the Free Software Foundation gives 8937414bd68fSmrg# unlimited permission to copy and/or distribute it, with or without 8938414bd68fSmrg# modifications, as long as this notice is preserved. 89393e72ca8cSmrg 8940414bd68fSmrg# @configure_input@ 89413e72ca8cSmrg 8942fe24f8a2Smrg# serial 4179 ltversion.m4 8943414bd68fSmrg# This file is part of GNU Libtool 89443e72ca8cSmrg 8945fe24f8a2Smrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 8946fe24f8a2Smrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 89473e72ca8cSmrg 8948414bd68fSmrgAC_DEFUN([LTVERSION_VERSION], 8949fe24f8a2Smrg[macro_version='2.4.6' 8950fe24f8a2Smrgmacro_revision='2.4.6' 8951414bd68fSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8952414bd68fSmrg_LT_DECL(, macro_revision, 0) 8953b425557eSmrg]) 89543e72ca8cSmrg 8955414bd68fSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8956414bd68fSmrg# 8957fe24f8a2Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 8958fe24f8a2Smrg# Foundation, Inc. 8959414bd68fSmrg# Written by Scott James Remnant, 2004. 8960414bd68fSmrg# 8961414bd68fSmrg# This file is free software; the Free Software Foundation gives 8962414bd68fSmrg# unlimited permission to copy and/or distribute it, with or without 8963414bd68fSmrg# modifications, as long as this notice is preserved. 8964ee3138f1Smrg 8965414bd68fSmrg# serial 5 lt~obsolete.m4 8966ee3138f1Smrg 8967414bd68fSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 8968414bd68fSmrg# 8969fe24f8a2Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8970414bd68fSmrg# which have later been changed to m4_define as they aren't part of the 8971414bd68fSmrg# exported API, or moved to Autoconf or Automake where they belong. 8972414bd68fSmrg# 8973414bd68fSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8974414bd68fSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8975414bd68fSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 8976414bd68fSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8977414bd68fSmrg# and doesn't know about Autoconf macros at all.) 8978414bd68fSmrg# 8979414bd68fSmrg# So we provide this file, which has a silly filename so it's always 8980414bd68fSmrg# included after everything else. This provides aclocal with the 8981414bd68fSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8982414bd68fSmrg# because those macros already exist, or will be overwritten later. 8983fe24f8a2Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8984414bd68fSmrg# 8985414bd68fSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8986414bd68fSmrg# Yes, that means every name once taken will need to remain here until 8987414bd68fSmrg# we give up compatibility with versions before 1.7, at which point 8988414bd68fSmrg# we need to keep only those names which we still refer to. 8989414bd68fSmrg 8990414bd68fSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8991414bd68fSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8992414bd68fSmrg 8993414bd68fSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8994414bd68fSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8995414bd68fSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8996414bd68fSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8997414bd68fSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8998414bd68fSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8999414bd68fSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9000414bd68fSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9001414bd68fSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9002414bd68fSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9003414bd68fSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9004414bd68fSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9005414bd68fSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9006414bd68fSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9007414bd68fSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9008414bd68fSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9009414bd68fSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9010414bd68fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9011414bd68fSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9012414bd68fSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9013414bd68fSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9014414bd68fSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9015414bd68fSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9016414bd68fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9017414bd68fSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9018414bd68fSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9019414bd68fSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9020414bd68fSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9021414bd68fSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9022414bd68fSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9023414bd68fSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9024414bd68fSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9025414bd68fSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9026414bd68fSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9027414bd68fSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9028414bd68fSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9029414bd68fSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9030414bd68fSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9031414bd68fSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9032414bd68fSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9033414bd68fSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9034414bd68fSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9035414bd68fSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9036414bd68fSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9037414bd68fSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9038414bd68fSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9039414bd68fSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9040414bd68fSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9041414bd68fSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9042414bd68fSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9043414bd68fSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9044414bd68fSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9045414bd68fSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9046414bd68fSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9047414bd68fSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9048414bd68fSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9049414bd68fSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9050414bd68fSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9051414bd68fSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9052414bd68fSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9053414bd68fSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 905434977a2fSmrg 9055fe24f8a2Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9056fe24f8a2Smrgdnl serial 11 (pkg-config-0.29.1) 9057fe24f8a2Smrgdnl 9058fe24f8a2Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9059fe24f8a2Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9060fe24f8a2Smrgdnl 9061fe24f8a2Smrgdnl This program is free software; you can redistribute it and/or modify 9062fe24f8a2Smrgdnl it under the terms of the GNU General Public License as published by 9063fe24f8a2Smrgdnl the Free Software Foundation; either version 2 of the License, or 9064fe24f8a2Smrgdnl (at your option) any later version. 9065fe24f8a2Smrgdnl 9066fe24f8a2Smrgdnl This program is distributed in the hope that it will be useful, but 9067fe24f8a2Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 9068fe24f8a2Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9069fe24f8a2Smrgdnl General Public License for more details. 9070fe24f8a2Smrgdnl 9071fe24f8a2Smrgdnl You should have received a copy of the GNU General Public License 9072fe24f8a2Smrgdnl along with this program; if not, write to the Free Software 9073fe24f8a2Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9074fe24f8a2Smrgdnl 02111-1307, USA. 9075fe24f8a2Smrgdnl 9076fe24f8a2Smrgdnl As a special exception to the GNU General Public License, if you 9077fe24f8a2Smrgdnl distribute this file as part of a program that contains a 9078fe24f8a2Smrgdnl configuration script generated by Autoconf, you may include it under 9079fe24f8a2Smrgdnl the same distribution terms that you use for the rest of that 9080fe24f8a2Smrgdnl program. 9081fe24f8a2Smrg 9082fe24f8a2Smrgdnl PKG_PREREQ(MIN-VERSION) 9083fe24f8a2Smrgdnl ----------------------- 9084fe24f8a2Smrgdnl Since: 0.29 9085fe24f8a2Smrgdnl 9086fe24f8a2Smrgdnl Verify that the version of the pkg-config macros are at least 9087fe24f8a2Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9088fe24f8a2Smrgdnl installed version of pkg-config, this checks the developer's version 9089fe24f8a2Smrgdnl of pkg.m4 when generating configure. 9090fe24f8a2Smrgdnl 9091fe24f8a2Smrgdnl To ensure that this macro is defined, also add: 9092fe24f8a2Smrgdnl m4_ifndef([PKG_PREREQ], 9093fe24f8a2Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9094fe24f8a2Smrgdnl 9095fe24f8a2Smrgdnl See the "Since" comment for each macro you use to see what version 9096fe24f8a2Smrgdnl of the macros you require. 9097fe24f8a2Smrgm4_defun([PKG_PREREQ], 9098fe24f8a2Smrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 9099fe24f8a2Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9100fe24f8a2Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9101fe24f8a2Smrg])dnl PKG_PREREQ 9102fe24f8a2Smrg 9103fe24f8a2Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9104fe24f8a2Smrgdnl ---------------------------------- 9105fe24f8a2Smrgdnl Since: 0.16 9106fe24f8a2Smrgdnl 9107fe24f8a2Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9108fe24f8a2Smrgdnl first found in the path. Checks that the version of pkg-config found 9109fe24f8a2Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9110fe24f8a2Smrgdnl used since that's the first version where most current features of 9111fe24f8a2Smrgdnl pkg-config existed. 9112414bd68fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9113414bd68fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9114414bd68fSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9115414bd68fSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9116414bd68fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9117414bd68fSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9118414bd68fSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9119ee3138f1Smrg 9120414bd68fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9121414bd68fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9122414bd68fSmrgfi 9123414bd68fSmrgif test -n "$PKG_CONFIG"; then 9124414bd68fSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 9125414bd68fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9126414bd68fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9127414bd68fSmrg AC_MSG_RESULT([yes]) 9128414bd68fSmrg else 9129414bd68fSmrg AC_MSG_RESULT([no]) 9130414bd68fSmrg PKG_CONFIG="" 91313e72ca8cSmrg fi 9132414bd68fSmrgfi[]dnl 9133fe24f8a2Smrg])dnl PKG_PROG_PKG_CONFIG 9134ee3138f1Smrg 9135fe24f8a2Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9136fe24f8a2Smrgdnl ------------------------------------------------------------------- 9137fe24f8a2Smrgdnl Since: 0.18 9138fe24f8a2Smrgdnl 9139fe24f8a2Smrgdnl Check to see whether a particular set of modules exists. Similar to 9140fe24f8a2Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9141fe24f8a2Smrgdnl 9142fe24f8a2Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9143fe24f8a2Smrgdnl only at the first occurence in configure.ac, so if the first place 9144fe24f8a2Smrgdnl it's called might be skipped (such as if it is within an "if", you 9145fe24f8a2Smrgdnl have to call PKG_CHECK_EXISTS manually 9146414bd68fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 9147414bd68fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9148414bd68fSmrgif test -n "$PKG_CONFIG" && \ 9149414bd68fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9150414bd68fSmrg m4_default([$2], [:]) 9151414bd68fSmrgm4_ifvaln([$3], [else 9152414bd68fSmrg $3])dnl 9153414bd68fSmrgfi]) 91543e72ca8cSmrg 9155fe24f8a2Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9156fe24f8a2Smrgdnl --------------------------------------------- 9157fe24f8a2Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9158fe24f8a2Smrgdnl pkg_failed based on the result. 9159414bd68fSmrgm4_define([_PKG_CONFIG], 9160414bd68fSmrg[if test -n "$$1"; then 9161414bd68fSmrg pkg_cv_[]$1="$$1" 9162414bd68fSmrg elif test -n "$PKG_CONFIG"; then 9163414bd68fSmrg PKG_CHECK_EXISTS([$3], 9164414bd68fSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9165414bd68fSmrg test "x$?" != "x0" && pkg_failed=yes ], 9166414bd68fSmrg [pkg_failed=yes]) 9167414bd68fSmrg else 9168414bd68fSmrg pkg_failed=untried 9169414bd68fSmrgfi[]dnl 9170fe24f8a2Smrg])dnl _PKG_CONFIG 9171ee3138f1Smrg 9172fe24f8a2Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 9173fe24f8a2Smrgdnl --------------------------- 9174fe24f8a2Smrgdnl Internal check to see if pkg-config supports short errors. 9175414bd68fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9176414bd68fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9177414bd68fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9178414bd68fSmrg _pkg_short_errors_supported=yes 9179414bd68fSmrgelse 9180414bd68fSmrg _pkg_short_errors_supported=no 9181414bd68fSmrgfi[]dnl 9182fe24f8a2Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 9183ee3138f1Smrg 9184ee3138f1Smrg 9185fe24f8a2Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9186fe24f8a2Smrgdnl [ACTION-IF-NOT-FOUND]) 9187fe24f8a2Smrgdnl -------------------------------------------------------------- 9188fe24f8a2Smrgdnl Since: 0.4.0 9189fe24f8a2Smrgdnl 9190fe24f8a2Smrgdnl Note that if there is a possibility the first call to 9191fe24f8a2Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9192fe24f8a2Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9193414bd68fSmrgAC_DEFUN([PKG_CHECK_MODULES], 9194414bd68fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9195414bd68fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9196414bd68fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9197ee3138f1Smrg 9198414bd68fSmrgpkg_failed=no 9199414bd68fSmrgAC_MSG_CHECKING([for $1]) 920079a8a9c6Smrg 9201414bd68fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9202414bd68fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 920379a8a9c6Smrg 9204414bd68fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9205414bd68fSmrgand $1[]_LIBS to avoid the need to call pkg-config. 9206414bd68fSmrgSee the pkg-config man page for more details.]) 920779a8a9c6Smrg 9208414bd68fSmrgif test $pkg_failed = yes; then 9209414bd68fSmrg AC_MSG_RESULT([no]) 9210414bd68fSmrg _PKG_SHORT_ERRORS_SUPPORTED 9211414bd68fSmrg if test $_pkg_short_errors_supported = yes; then 9212414bd68fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9213414bd68fSmrg else 9214414bd68fSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9215414bd68fSmrg fi 9216414bd68fSmrg # Put the nasty error message in config.log where it belongs 9217414bd68fSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 921879a8a9c6Smrg 9219414bd68fSmrg m4_default([$4], [AC_MSG_ERROR( 9220414bd68fSmrg[Package requirements ($2) were not met: 92213e72ca8cSmrg 9222414bd68fSmrg$$1_PKG_ERRORS 92233e72ca8cSmrg 9224414bd68fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9225414bd68fSmrginstalled software in a non-standard prefix. 92263e72ca8cSmrg 9227414bd68fSmrg_PKG_TEXT])[]dnl 9228414bd68fSmrg ]) 9229414bd68fSmrgelif test $pkg_failed = untried; then 9230414bd68fSmrg AC_MSG_RESULT([no]) 9231414bd68fSmrg m4_default([$4], [AC_MSG_FAILURE( 9232414bd68fSmrg[The pkg-config script could not be found or is too old. Make sure it 9233414bd68fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 9234414bd68fSmrgpath to pkg-config. 92353e72ca8cSmrg 9236414bd68fSmrg_PKG_TEXT 92373e72ca8cSmrg 9238414bd68fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9239414bd68fSmrg ]) 9240414bd68fSmrgelse 9241414bd68fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9242414bd68fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9243414bd68fSmrg AC_MSG_RESULT([yes]) 9244414bd68fSmrg $3 9245414bd68fSmrgfi[]dnl 9246fe24f8a2Smrg])dnl PKG_CHECK_MODULES 92473e72ca8cSmrg 9248ee3138f1Smrg 9249fe24f8a2Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9250fe24f8a2Smrgdnl [ACTION-IF-NOT-FOUND]) 9251fe24f8a2Smrgdnl --------------------------------------------------------------------- 9252fe24f8a2Smrgdnl Since: 0.29 9253fe24f8a2Smrgdnl 9254fe24f8a2Smrgdnl Checks for existence of MODULES and gathers its build flags with 9255fe24f8a2Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9256fe24f8a2Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 9257fe24f8a2Smrgdnl 9258fe24f8a2Smrgdnl Note that if there is a possibility the first call to 9259fe24f8a2Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9260fe24f8a2Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9261fe24f8a2Smrgdnl configure.ac. 9262fe24f8a2SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 9263fe24f8a2Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9264fe24f8a2Smrg_save_PKG_CONFIG=$PKG_CONFIG 9265fe24f8a2SmrgPKG_CONFIG="$PKG_CONFIG --static" 9266fe24f8a2SmrgPKG_CHECK_MODULES($@) 9267fe24f8a2SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 9268fe24f8a2Smrg])dnl PKG_CHECK_MODULES_STATIC 9269fe24f8a2Smrg 9270fe24f8a2Smrg 9271fe24f8a2Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 9272fe24f8a2Smrgdnl ------------------------- 9273fe24f8a2Smrgdnl Since: 0.27 9274fe24f8a2Smrgdnl 9275fe24f8a2Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 9276fe24f8a2Smrgdnl should install pkg-config .pc files. By default the directory is 9277fe24f8a2Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 9278fe24f8a2Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 9279fe24f8a2Smrgdnl parameter. 9280414bd68fSmrgAC_DEFUN([PKG_INSTALLDIR], 9281414bd68fSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9282414bd68fSmrgm4_pushdef([pkg_description], 9283414bd68fSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 9284414bd68fSmrgAC_ARG_WITH([pkgconfigdir], 9285414bd68fSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9286414bd68fSmrg [with_pkgconfigdir=]pkg_default) 9287414bd68fSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9288414bd68fSmrgm4_popdef([pkg_default]) 9289414bd68fSmrgm4_popdef([pkg_description]) 9290fe24f8a2Smrg])dnl PKG_INSTALLDIR 9291414bd68fSmrg 9292414bd68fSmrg 9293fe24f8a2Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9294fe24f8a2Smrgdnl -------------------------------- 9295fe24f8a2Smrgdnl Since: 0.27 9296fe24f8a2Smrgdnl 9297fe24f8a2Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 9298fe24f8a2Smrgdnl module should install arch-independent pkg-config .pc files. By 9299fe24f8a2Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 9300fe24f8a2Smrgdnl changed by passing DIRECTORY. The user can override through the 9301fe24f8a2Smrgdnl --with-noarch-pkgconfigdir parameter. 9302414bd68fSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 9303414bd68fSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9304414bd68fSmrgm4_pushdef([pkg_description], 9305414bd68fSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9306414bd68fSmrgAC_ARG_WITH([noarch-pkgconfigdir], 9307414bd68fSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9308414bd68fSmrg [with_noarch_pkgconfigdir=]pkg_default) 9309414bd68fSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9310414bd68fSmrgm4_popdef([pkg_default]) 9311414bd68fSmrgm4_popdef([pkg_description]) 9312fe24f8a2Smrg])dnl PKG_NOARCH_INSTALLDIR 9313414bd68fSmrg 9314414bd68fSmrg 9315fe24f8a2Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9316fe24f8a2Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9317fe24f8a2Smrgdnl ------------------------------------------- 9318fe24f8a2Smrgdnl Since: 0.28 9319fe24f8a2Smrgdnl 9320fe24f8a2Smrgdnl Retrieves the value of the pkg-config variable for the given module. 9321414bd68fSmrgAC_DEFUN([PKG_CHECK_VAR], 9322414bd68fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9323414bd68fSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 93243e72ca8cSmrg 9325414bd68fSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9326414bd68fSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 93273e72ca8cSmrg 9328414bd68fSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9329fe24f8a2Smrg])dnl PKG_CHECK_VAR 9330ee3138f1Smrg 9331fe24f8a2Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 9332fe24f8a2Smrg# 9333fe24f8a2Smrg# This file is free software; the Free Software Foundation 9334fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 9335fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 93363e72ca8cSmrg 9337fe24f8a2Smrg# AM_AUTOMAKE_VERSION(VERSION) 9338fe24f8a2Smrg# ---------------------------- 9339fe24f8a2Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 9340fe24f8a2Smrg# generated from the m4 files accompanying Automake X.Y. 9341fe24f8a2Smrg# (This private macro should not be called outside this file.) 9342fe24f8a2SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 9343fe24f8a2Smrg[am__api_version='1.15' 9344fe24f8a2Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 9345fe24f8a2Smrgdnl require some minimum version. Point them to the right macro. 9346fe24f8a2Smrgm4_if([$1], [1.15], [], 9347fe24f8a2Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 9348fe24f8a2Smrg]) 9349fe24f8a2Smrg 9350fe24f8a2Smrg# _AM_AUTOCONF_VERSION(VERSION) 9351fe24f8a2Smrg# ----------------------------- 9352fe24f8a2Smrg# aclocal traces this macro to find the Autoconf version. 9353fe24f8a2Smrg# This is a private macro too. Using m4_define simplifies 9354fe24f8a2Smrg# the logic in aclocal, which can simply ignore this definition. 9355fe24f8a2Smrgm4_define([_AM_AUTOCONF_VERSION], []) 9356fe24f8a2Smrg 9357fe24f8a2Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 9358fe24f8a2Smrg# ------------------------------- 9359fe24f8a2Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 9360fe24f8a2Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 9361fe24f8a2SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 9362fe24f8a2Smrg[AM_AUTOMAKE_VERSION([1.15])dnl 9363fe24f8a2Smrgm4_ifndef([AC_AUTOCONF_VERSION], 9364fe24f8a2Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 9365fe24f8a2Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 9366fe24f8a2Smrg 9367fe24f8a2Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 9368fe24f8a2Smrg 9369fe24f8a2Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 9370a1ed278cSmrg# 9371fe24f8a2Smrg# This file is free software; the Free Software Foundation 9372fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 9373fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 9374fe24f8a2Smrg 9375fe24f8a2Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 9376fe24f8a2Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 9377fe24f8a2Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 93783e72ca8cSmrg# 9379fe24f8a2Smrg# Of course, Automake must honor this variable whenever it calls a 9380fe24f8a2Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 9381fe24f8a2Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 9382fe24f8a2Smrg# depending on how configure is run. This is pretty annoying, since 9383fe24f8a2Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 9384fe24f8a2Smrg# source directory, any form will work fine, but in subdirectories a 9385fe24f8a2Smrg# relative path needs to be adjusted first. 9386414bd68fSmrg# 9387fe24f8a2Smrg# $ac_aux_dir/missing 9388fe24f8a2Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 9389fe24f8a2Smrg# $top_srcdir/$ac_aux_dir/missing 9390fe24f8a2Smrg# fails if $ac_aux_dir is absolute, 9391fe24f8a2Smrg# fails when called from a subdirectory in a VPATH build with 9392fe24f8a2Smrg# a relative $ac_aux_dir 9393414bd68fSmrg# 9394fe24f8a2Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 9395fe24f8a2Smrg# are both prefixed by $srcdir. In an in-source build this is usually 9396fe24f8a2Smrg# harmless because $srcdir is '.', but things will broke when you 9397fe24f8a2Smrg# start a VPATH build or use an absolute $srcdir. 9398fe24f8a2Smrg# 9399fe24f8a2Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 9400fe24f8a2Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 9401fe24f8a2Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 9402fe24f8a2Smrg# and then we would define $MISSING as 9403fe24f8a2Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 9404fe24f8a2Smrg# This will work as long as MISSING is not called from configure, because 9405fe24f8a2Smrg# unfortunately $(top_srcdir) has no meaning in configure. 9406fe24f8a2Smrg# However there are other variables, like CC, which are often used in 9407fe24f8a2Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 9408fe24f8a2Smrg# 9409fe24f8a2Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 9410fe24f8a2Smrg# absolute PATH. The drawback is that using absolute paths prevent a 9411fe24f8a2Smrg# configured tree to be moved without reconfiguration. 9412ee3138f1Smrg 9413fe24f8a2SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 9414fe24f8a2Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 9415fe24f8a2Smrg# Expand $ac_aux_dir to an absolute path. 9416fe24f8a2Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 9417fe24f8a2Smrg]) 9418fe24f8a2Smrg 9419fe24f8a2Smrg# AM_CONDITIONAL -*- Autoconf -*- 9420fe24f8a2Smrg 9421fe24f8a2Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 9422414bd68fSmrg# 9423fe24f8a2Smrg# This file is free software; the Free Software Foundation 9424fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 9425fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 9426ee3138f1Smrg 9427fe24f8a2Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 9428fe24f8a2Smrg# ------------------------------------- 9429fe24f8a2Smrg# Define a conditional. 9430fe24f8a2SmrgAC_DEFUN([AM_CONDITIONAL], 9431fe24f8a2Smrg[AC_PREREQ([2.52])dnl 9432fe24f8a2Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 9433fe24f8a2Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 9434fe24f8a2SmrgAC_SUBST([$1_TRUE])dnl 9435fe24f8a2SmrgAC_SUBST([$1_FALSE])dnl 9436fe24f8a2Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 9437fe24f8a2Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 9438fe24f8a2Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 9439fe24f8a2Smrgif $2; then 9440fe24f8a2Smrg $1_TRUE= 9441fe24f8a2Smrg $1_FALSE='#' 9442414bd68fSmrgelse 9443fe24f8a2Smrg $1_TRUE='#' 9444fe24f8a2Smrg $1_FALSE= 9445414bd68fSmrgfi 9446fe24f8a2SmrgAC_CONFIG_COMMANDS_PRE( 9447fe24f8a2Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 9448fe24f8a2Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 9449fe24f8a2SmrgUsually this means the macro was only invoked conditionally.]]) 9450fe24f8a2Smrgfi])]) 9451ee3138f1Smrg 9452fe24f8a2Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 9453fe24f8a2Smrg# 9454fe24f8a2Smrg# This file is free software; the Free Software Foundation 9455fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 9456fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 9457ee3138f1Smrg 9458fe24f8a2Smrg 9459fe24f8a2Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 9460fe24f8a2Smrg# written in clear, in which case automake, when reading aclocal.m4, 9461fe24f8a2Smrg# will think it sees a *use*, and therefore will trigger all it's 9462fe24f8a2Smrg# C support machinery. Also note that it means that autoscan, seeing 9463fe24f8a2Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 9464fe24f8a2Smrg 9465fe24f8a2Smrg 9466fe24f8a2Smrg# _AM_DEPENDENCIES(NAME) 9467fe24f8a2Smrg# ---------------------- 9468fe24f8a2Smrg# See how the compiler implements dependency checking. 9469fe24f8a2Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 9470fe24f8a2Smrg# We try a few techniques and use that to set a single cache variable. 9471414bd68fSmrg# 9472fe24f8a2Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 9473fe24f8a2Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 9474fe24f8a2Smrg# dependency, and given that the user is not expected to run this macro, 9475fe24f8a2Smrg# just rely on AC_PROG_CC. 9476fe24f8a2SmrgAC_DEFUN([_AM_DEPENDENCIES], 9477fe24f8a2Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 9478fe24f8a2SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 9479fe24f8a2SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 9480fe24f8a2SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 9481b425557eSmrg 9482fe24f8a2Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 9483fe24f8a2Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 9484fe24f8a2Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 9485fe24f8a2Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 9486fe24f8a2Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 9487fe24f8a2Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 9488fe24f8a2Smrg [depcc="$$1" am_compiler_list=]) 948934977a2fSmrg 9490fe24f8a2SmrgAC_CACHE_CHECK([dependency style of $depcc], 9491fe24f8a2Smrg [am_cv_$1_dependencies_compiler_type], 9492fe24f8a2Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 9493fe24f8a2Smrg # We make a subdir and do the tests there. Otherwise we can end up 9494fe24f8a2Smrg # making bogus files that we don't know about and never remove. For 9495fe24f8a2Smrg # instance it was reported that on HP-UX the gcc test will end up 9496fe24f8a2Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 9497fe24f8a2Smrg # in D". 9498fe24f8a2Smrg rm -rf conftest.dir 9499fe24f8a2Smrg mkdir conftest.dir 9500fe24f8a2Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 9501fe24f8a2Smrg # using a relative directory. 9502fe24f8a2Smrg cp "$am_depcomp" conftest.dir 9503fe24f8a2Smrg cd conftest.dir 9504fe24f8a2Smrg # We will build objects and dependencies in a subdirectory because 9505fe24f8a2Smrg # it helps to detect inapplicable dependency modes. For instance 9506fe24f8a2Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 9507fe24f8a2Smrg # side effect of compilation, but ICC will put the dependencies in 9508fe24f8a2Smrg # the current directory while Tru64 will put them in the object 9509fe24f8a2Smrg # directory. 9510fe24f8a2Smrg mkdir sub 951134977a2fSmrg 9512fe24f8a2Smrg am_cv_$1_dependencies_compiler_type=none 9513fe24f8a2Smrg if test "$am_compiler_list" = ""; then 9514fe24f8a2Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 9515fe24f8a2Smrg fi 9516fe24f8a2Smrg am__universal=false 9517fe24f8a2Smrg m4_case([$1], [CC], 9518fe24f8a2Smrg [case " $depcc " in #( 9519fe24f8a2Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 9520fe24f8a2Smrg esac], 9521fe24f8a2Smrg [CXX], 9522fe24f8a2Smrg [case " $depcc " in #( 9523fe24f8a2Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 9524fe24f8a2Smrg esac]) 952534977a2fSmrg 9526fe24f8a2Smrg for depmode in $am_compiler_list; do 9527fe24f8a2Smrg # Setup a source with many dependencies, because some compilers 9528fe24f8a2Smrg # like to wrap large dependency lists on column 80 (with \), and 9529fe24f8a2Smrg # we should not choose a depcomp mode which is confused by this. 9530fe24f8a2Smrg # 9531fe24f8a2Smrg # We need to recreate these files for each test, as the compiler may 9532fe24f8a2Smrg # overwrite some of them when testing with obscure command lines. 9533fe24f8a2Smrg # This happens at least with the AIX C compiler. 9534fe24f8a2Smrg : > sub/conftest.c 9535fe24f8a2Smrg for i in 1 2 3 4 5 6; do 9536fe24f8a2Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 9537fe24f8a2Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 9538fe24f8a2Smrg # Solaris 10 /bin/sh. 9539fe24f8a2Smrg echo '/* dummy */' > sub/conftst$i.h 9540fe24f8a2Smrg done 9541fe24f8a2Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 954234977a2fSmrg 9543fe24f8a2Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 9544fe24f8a2Smrg # mode. It turns out that the SunPro C++ compiler does not properly 9545fe24f8a2Smrg # handle '-M -o', and we need to detect this. Also, some Intel 9546fe24f8a2Smrg # versions had trouble with output in subdirs. 9547fe24f8a2Smrg am__obj=sub/conftest.${OBJEXT-o} 9548fe24f8a2Smrg am__minus_obj="-o $am__obj" 9549fe24f8a2Smrg case $depmode in 9550fe24f8a2Smrg gcc) 9551fe24f8a2Smrg # This depmode causes a compiler race in universal mode. 9552fe24f8a2Smrg test "$am__universal" = false || continue 9553fe24f8a2Smrg ;; 9554fe24f8a2Smrg nosideeffect) 9555fe24f8a2Smrg # After this tag, mechanisms are not by side-effect, so they'll 9556fe24f8a2Smrg # only be used when explicitly requested. 9557fe24f8a2Smrg if test "x$enable_dependency_tracking" = xyes; then 9558fe24f8a2Smrg continue 9559fe24f8a2Smrg else 9560fe24f8a2Smrg break 9561fe24f8a2Smrg fi 9562fe24f8a2Smrg ;; 9563fe24f8a2Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 9564fe24f8a2Smrg # This compiler won't grok '-c -o', but also, the minuso test has 9565fe24f8a2Smrg # not run yet. These depmodes are late enough in the game, and 9566fe24f8a2Smrg # so weak that their functioning should not be impacted. 9567fe24f8a2Smrg am__obj=conftest.${OBJEXT-o} 9568fe24f8a2Smrg am__minus_obj= 9569fe24f8a2Smrg ;; 9570fe24f8a2Smrg none) break ;; 9571414bd68fSmrg esac 9572fe24f8a2Smrg if depmode=$depmode \ 9573fe24f8a2Smrg source=sub/conftest.c object=$am__obj \ 9574fe24f8a2Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 9575fe24f8a2Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 9576fe24f8a2Smrg >/dev/null 2>conftest.err && 9577fe24f8a2Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 9578fe24f8a2Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 9579fe24f8a2Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 9580fe24f8a2Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 9581fe24f8a2Smrg # icc doesn't choke on unknown options, it will just issue warnings 9582fe24f8a2Smrg # or remarks (even with -Werror). So we grep stderr for any message 9583fe24f8a2Smrg # that says an option was ignored or not supported. 9584fe24f8a2Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 9585fe24f8a2Smrg # icc: Command line warning: ignoring option '-M'; no argument required 9586fe24f8a2Smrg # The diagnosis changed in icc 8.0: 9587fe24f8a2Smrg # icc: Command line remark: option '-MP' not supported 9588fe24f8a2Smrg if (grep 'ignoring option' conftest.err || 9589fe24f8a2Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 9590fe24f8a2Smrg am_cv_$1_dependencies_compiler_type=$depmode 9591fe24f8a2Smrg break 9592fe24f8a2Smrg fi 9593fe24f8a2Smrg fi 9594fe24f8a2Smrg done 959534977a2fSmrg 9596fe24f8a2Smrg cd .. 9597fe24f8a2Smrg rm -rf conftest.dir 9598fe24f8a2Smrgelse 9599fe24f8a2Smrg am_cv_$1_dependencies_compiler_type=none 9600414bd68fSmrgfi 9601fe24f8a2Smrg]) 9602fe24f8a2SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 9603fe24f8a2SmrgAM_CONDITIONAL([am__fastdep$1], [ 9604fe24f8a2Smrg test "x$enable_dependency_tracking" != xno \ 9605fe24f8a2Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 9606fe24f8a2Smrg]) 960734977a2fSmrg 9608b425557eSmrg 9609fe24f8a2Smrg# AM_SET_DEPDIR 9610fe24f8a2Smrg# ------------- 9611fe24f8a2Smrg# Choose a directory name for dependency files. 9612fe24f8a2Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 9613fe24f8a2SmrgAC_DEFUN([AM_SET_DEPDIR], 9614fe24f8a2Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 9615fe24f8a2SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 9616fe24f8a2Smrg]) 9617b425557eSmrg 9618b425557eSmrg 9619fe24f8a2Smrg# AM_DEP_TRACK 9620fe24f8a2Smrg# ------------ 9621fe24f8a2SmrgAC_DEFUN([AM_DEP_TRACK], 9622fe24f8a2Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 9623fe24f8a2SmrgAS_HELP_STRING( 9624fe24f8a2Smrg [--enable-dependency-tracking], 9625fe24f8a2Smrg [do not reject slow dependency extractors]) 9626fe24f8a2SmrgAS_HELP_STRING( 9627fe24f8a2Smrg [--disable-dependency-tracking], 9628fe24f8a2Smrg [speeds up one-time build])]) 9629fe24f8a2Smrgif test "x$enable_dependency_tracking" != xno; then 9630fe24f8a2Smrg am_depcomp="$ac_aux_dir/depcomp" 9631fe24f8a2Smrg AMDEPBACKSLASH='\' 9632fe24f8a2Smrg am__nodep='_no' 9633fe24f8a2Smrgfi 9634fe24f8a2SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 9635fe24f8a2SmrgAC_SUBST([AMDEPBACKSLASH])dnl 9636fe24f8a2Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 9637fe24f8a2SmrgAC_SUBST([am__nodep])dnl 9638fe24f8a2Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 9639fe24f8a2Smrg]) 964034977a2fSmrg 9641fe24f8a2Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 964234977a2fSmrg 9643fe24f8a2Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 9644414bd68fSmrg# 9645fe24f8a2Smrg# This file is free software; the Free Software Foundation 9646fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 9647fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 9648a1ed278cSmrg 964934977a2fSmrg 9650fe24f8a2Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 9651fe24f8a2Smrg# ------------------------------ 9652fe24f8a2SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 9653fe24f8a2Smrg[{ 9654fe24f8a2Smrg # Older Autoconf quotes --file arguments for eval, but not when files 9655fe24f8a2Smrg # are listed without --file. Let's play safe and only enable the eval 9656fe24f8a2Smrg # if we detect the quoting. 9657fe24f8a2Smrg case $CONFIG_FILES in 9658fe24f8a2Smrg *\'*) eval set x "$CONFIG_FILES" ;; 9659fe24f8a2Smrg *) set x $CONFIG_FILES ;; 9660fe24f8a2Smrg esac 9661fe24f8a2Smrg shift 9662fe24f8a2Smrg for mf 9663fe24f8a2Smrg do 9664fe24f8a2Smrg # Strip MF so we end up with the name of the file. 9665fe24f8a2Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 9666fe24f8a2Smrg # Check whether this is an Automake generated Makefile or not. 9667fe24f8a2Smrg # We used to match only the files named 'Makefile.in', but 9668fe24f8a2Smrg # some people rename them; so instead we look at the file content. 9669fe24f8a2Smrg # Grep'ing the first line is not enough: some people post-process 9670fe24f8a2Smrg # each Makefile.in and add a new line on top of each file to say so. 9671fe24f8a2Smrg # Grep'ing the whole file is not good either: AIX grep has a line 9672fe24f8a2Smrg # limit of 2048, but all sed's we know have understand at least 4000. 9673fe24f8a2Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 9674fe24f8a2Smrg dirpart=`AS_DIRNAME("$mf")` 9675fe24f8a2Smrg else 9676fe24f8a2Smrg continue 9677fe24f8a2Smrg fi 9678fe24f8a2Smrg # Extract the definition of DEPDIR, am__include, and am__quote 9679fe24f8a2Smrg # from the Makefile without running 'make'. 9680fe24f8a2Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 9681fe24f8a2Smrg test -z "$DEPDIR" && continue 9682fe24f8a2Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 9683fe24f8a2Smrg test -z "$am__include" && continue 9684fe24f8a2Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 9685fe24f8a2Smrg # Find all dependency output files, they are included files with 9686fe24f8a2Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 9687fe24f8a2Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 9688fe24f8a2Smrg # expansion. 9689fe24f8a2Smrg for file in `sed -n " 9690fe24f8a2Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 9691fe24f8a2Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 9692fe24f8a2Smrg # Make sure the directory exists. 9693fe24f8a2Smrg test -f "$dirpart/$file" && continue 9694fe24f8a2Smrg fdir=`AS_DIRNAME(["$file"])` 9695fe24f8a2Smrg AS_MKDIR_P([$dirpart/$fdir]) 9696fe24f8a2Smrg # echo "creating $dirpart/$file" 9697fe24f8a2Smrg echo '# dummy' > "$dirpart/$file" 9698fe24f8a2Smrg done 9699fe24f8a2Smrg done 9700fe24f8a2Smrg} 9701fe24f8a2Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 970234977a2fSmrg 970334977a2fSmrg 9704fe24f8a2Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 9705fe24f8a2Smrg# ----------------------------- 9706fe24f8a2Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 9707fe24f8a2Smrg# 9708fe24f8a2Smrg# This code is only required when automatic dependency tracking 9709fe24f8a2Smrg# is enabled. FIXME. This creates each '.P' file that we will 9710fe24f8a2Smrg# need in order to bootstrap the dependency handling code. 9711fe24f8a2SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 9712fe24f8a2Smrg[AC_CONFIG_COMMANDS([depfiles], 9713fe24f8a2Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 9714fe24f8a2Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 9715fe24f8a2Smrg]) 9716a1ed278cSmrg 9717fe24f8a2Smrg# Do all the work for Automake. -*- Autoconf -*- 97183e72ca8cSmrg 9719fe24f8a2Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 9720fe24f8a2Smrg# 9721fe24f8a2Smrg# This file is free software; the Free Software Foundation 9722fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 9723fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 972434977a2fSmrg 9725fe24f8a2Smrg# This macro actually does too much. Some checks are only needed if 9726fe24f8a2Smrg# your package does certain things. But this isn't really a big deal. 97273e72ca8cSmrg 9728fe24f8a2Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 9729fe24f8a2Smrgm4_define([AC_PROG_CC], 9730fe24f8a2Smrgm4_defn([AC_PROG_CC]) 9731fe24f8a2Smrg[_AM_PROG_CC_C_O 9732fe24f8a2Smrg]) 97333e72ca8cSmrg 9734fe24f8a2Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 9735fe24f8a2Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 9736fe24f8a2Smrg# ----------------------------------------------- 9737fe24f8a2Smrg# The call with PACKAGE and VERSION arguments is the old style 9738fe24f8a2Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 9739fe24f8a2Smrg# and VERSION should now be passed to AC_INIT and removed from 9740fe24f8a2Smrg# the call to AM_INIT_AUTOMAKE. 9741fe24f8a2Smrg# We support both call styles for the transition. After 9742fe24f8a2Smrg# the next Automake release, Autoconf can make the AC_INIT 9743fe24f8a2Smrg# arguments mandatory, and then we can depend on a new Autoconf 9744fe24f8a2Smrg# release and drop the old call support. 9745fe24f8a2SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 9746fe24f8a2Smrg[AC_PREREQ([2.65])dnl 9747fe24f8a2Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 9748fe24f8a2Smrgdnl the ones we care about. 9749fe24f8a2Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 9750fe24f8a2SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 9751fe24f8a2SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 9752fe24f8a2Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 9753fe24f8a2Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 9754fe24f8a2Smrg # is not polluted with repeated "-I." 9755fe24f8a2Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 9756fe24f8a2Smrg # test to see if srcdir already configured 9757fe24f8a2Smrg if test -f $srcdir/config.status; then 9758fe24f8a2Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 9759fe24f8a2Smrg fi 9760414bd68fSmrgfi 97613e72ca8cSmrg 9762fe24f8a2Smrg# test whether we have cygpath 9763fe24f8a2Smrgif test -z "$CYGPATH_W"; then 9764fe24f8a2Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 9765fe24f8a2Smrg CYGPATH_W='cygpath -w' 9766fe24f8a2Smrg else 9767fe24f8a2Smrg CYGPATH_W=echo 9768fe24f8a2Smrg fi 9769fe24f8a2Smrgfi 9770fe24f8a2SmrgAC_SUBST([CYGPATH_W]) 9771ee3138f1Smrg 9772fe24f8a2Smrg# Define the identity of the package. 9773fe24f8a2Smrgdnl Distinguish between old-style and new-style calls. 9774fe24f8a2Smrgm4_ifval([$2], 9775fe24f8a2Smrg[AC_DIAGNOSE([obsolete], 9776fe24f8a2Smrg [$0: two- and three-arguments forms are deprecated.]) 9777fe24f8a2Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 9778fe24f8a2Smrg AC_SUBST([PACKAGE], [$1])dnl 9779fe24f8a2Smrg AC_SUBST([VERSION], [$2])], 9780fe24f8a2Smrg[_AM_SET_OPTIONS([$1])dnl 9781fe24f8a2Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 9782fe24f8a2Smrgm4_if( 9783fe24f8a2Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 9784fe24f8a2Smrg [ok:ok],, 9785fe24f8a2Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 9786fe24f8a2Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 9787fe24f8a2Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9788ee3138f1Smrg 9789fe24f8a2Smrg_AM_IF_OPTION([no-define],, 9790fe24f8a2Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 9791fe24f8a2Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 9792ee3138f1Smrg 9793fe24f8a2Smrg# Some tools Automake needs. 9794fe24f8a2SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 9795fe24f8a2SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 9796fe24f8a2SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 9797fe24f8a2SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 9798fe24f8a2SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 9799fe24f8a2SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 9800fe24f8a2SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 9801fe24f8a2SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9802fe24f8a2SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 9803fe24f8a2SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9804fe24f8a2Smrg# For better backward compatibility. To be removed once Automake 1.9.x 9805fe24f8a2Smrg# dies out for good. For more background, see: 9806fe24f8a2Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 9807fe24f8a2Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 9808fe24f8a2SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 9809fe24f8a2Smrg# We need awk for the "check" target (and possibly the TAP driver). The 9810fe24f8a2Smrg# system "awk" is bad on some platforms. 9811fe24f8a2SmrgAC_REQUIRE([AC_PROG_AWK])dnl 9812fe24f8a2SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 9813fe24f8a2SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 9814fe24f8a2Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9815fe24f8a2Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9816fe24f8a2Smrg [_AM_PROG_TAR([v7])])]) 9817fe24f8a2Smrg_AM_IF_OPTION([no-dependencies],, 9818fe24f8a2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 9819fe24f8a2Smrg [_AM_DEPENDENCIES([CC])], 9820fe24f8a2Smrg [m4_define([AC_PROG_CC], 9821fe24f8a2Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 9822fe24f8a2SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 9823fe24f8a2Smrg [_AM_DEPENDENCIES([CXX])], 9824fe24f8a2Smrg [m4_define([AC_PROG_CXX], 9825fe24f8a2Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 9826fe24f8a2SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 9827fe24f8a2Smrg [_AM_DEPENDENCIES([OBJC])], 9828fe24f8a2Smrg [m4_define([AC_PROG_OBJC], 9829fe24f8a2Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 9830fe24f8a2SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 9831fe24f8a2Smrg [_AM_DEPENDENCIES([OBJCXX])], 9832fe24f8a2Smrg [m4_define([AC_PROG_OBJCXX], 9833fe24f8a2Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 9834fe24f8a2Smrg]) 9835fe24f8a2SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 9836fe24f8a2Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 9837fe24f8a2Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 9838fe24f8a2Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 9839fe24f8a2SmrgAC_CONFIG_COMMANDS_PRE(dnl 9840fe24f8a2Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 9841fe24f8a2Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 9842a1ed278cSmrg 9843fe24f8a2Smrg# POSIX will say in a future version that running "rm -f" with no argument 9844fe24f8a2Smrg# is OK; and we want to be able to make that assumption in our Makefile 9845fe24f8a2Smrg# recipes. So use an aggressive probe to check that the usage we want is 9846fe24f8a2Smrg# actually supported "in the wild" to an acceptable degree. 9847fe24f8a2Smrg# See automake bug#10828. 9848fe24f8a2Smrg# To make any issue more visible, cause the running configure to be aborted 9849fe24f8a2Smrg# by default if the 'rm' program in use doesn't match our expectations; the 9850fe24f8a2Smrg# user can still override this though. 9851fe24f8a2Smrgif rm -f && rm -fr && rm -rf; then : OK; else 9852fe24f8a2Smrg cat >&2 <<'END' 9853fe24f8a2SmrgOops! 9854414bd68fSmrg 9855fe24f8a2SmrgYour 'rm' program seems unable to run without file operands specified 9856fe24f8a2Smrgon the command line, even when the '-f' option is present. This is contrary 9857fe24f8a2Smrgto the behaviour of most rm programs out there, and not conforming with 9858fe24f8a2Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 9859414bd68fSmrg 9860fe24f8a2SmrgPlease tell bug-automake@gnu.org about your system, including the value 9861fe24f8a2Smrgof your $PATH and any error possibly output before this message. This 9862fe24f8a2Smrgcan help us improve future automake versions. 9863414bd68fSmrg 9864fe24f8a2SmrgEND 9865fe24f8a2Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 9866fe24f8a2Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 9867fe24f8a2Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 9868fe24f8a2Smrg echo >&2 9869fe24f8a2Smrg else 9870fe24f8a2Smrg cat >&2 <<'END' 9871fe24f8a2SmrgAborting the configuration process, to ensure you take notice of the issue. 9872414bd68fSmrg 9873fe24f8a2SmrgYou can download and install GNU coreutils to get an 'rm' implementation 9874fe24f8a2Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 9875414bd68fSmrg 9876fe24f8a2SmrgIf you want to complete the configuration process using your problematic 9877fe24f8a2Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 9878fe24f8a2Smrgto "yes", and re-run configure. 9879fe24f8a2Smrg 9880fe24f8a2SmrgEND 9881fe24f8a2Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 9882fe24f8a2Smrg fi 9883414bd68fSmrgfi 9884fe24f8a2Smrgdnl The trailing newline in this macro's definition is deliberate, for 9885fe24f8a2Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 9886fe24f8a2Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 9887fe24f8a2Smrg]) 9888414bd68fSmrg 9889fe24f8a2Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 9890fe24f8a2Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 9891fe24f8a2Smrgdnl mangled by Autoconf and run in a shell conditional statement. 9892fe24f8a2Smrgm4_define([_AC_COMPILER_EXEEXT], 9893fe24f8a2Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9894414bd68fSmrg 9895fe24f8a2Smrg# When config.status generates a header, we must update the stamp-h file. 9896fe24f8a2Smrg# This file resides in the same directory as the config header 9897fe24f8a2Smrg# that is generated. The stamp files are numbered to have different names. 9898414bd68fSmrg 9899fe24f8a2Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 9900fe24f8a2Smrg# loop where config.status creates the headers, so we can generate 9901fe24f8a2Smrg# our stamp files there. 9902fe24f8a2SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 9903fe24f8a2Smrg[# Compute $1's index in $config_headers. 9904fe24f8a2Smrg_am_arg=$1 9905fe24f8a2Smrg_am_stamp_count=1 9906fe24f8a2Smrgfor _am_header in $config_headers :; do 9907fe24f8a2Smrg case $_am_header in 9908fe24f8a2Smrg $_am_arg | $_am_arg:* ) 9909fe24f8a2Smrg break ;; 9910fe24f8a2Smrg * ) 9911fe24f8a2Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9912fe24f8a2Smrg esac 9913fe24f8a2Smrgdone 9914fe24f8a2Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9915fe24f8a2Smrg 9916fe24f8a2Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 99173e72ca8cSmrg# 9918fe24f8a2Smrg# This file is free software; the Free Software Foundation 9919fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 9920fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 9921fe24f8a2Smrg 9922fe24f8a2Smrg# AM_PROG_INSTALL_SH 9923fe24f8a2Smrg# ------------------ 9924fe24f8a2Smrg# Define $install_sh. 9925fe24f8a2SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 9926fe24f8a2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9927fe24f8a2Smrgif test x"${install_sh+set}" != xset; then 9928fe24f8a2Smrg case $am_aux_dir in 9929fe24f8a2Smrg *\ * | *\ *) 9930fe24f8a2Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 9931fe24f8a2Smrg *) 9932fe24f8a2Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 9933fe24f8a2Smrg esac 9934fe24f8a2Smrgfi 9935fe24f8a2SmrgAC_SUBST([install_sh])]) 9936fe24f8a2Smrg 9937fe24f8a2Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 9938414bd68fSmrg# 9939fe24f8a2Smrg# This file is free software; the Free Software Foundation 9940fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 9941fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 9942b425557eSmrg 9943fe24f8a2Smrg# Check whether the underlying file-system supports filenames 9944fe24f8a2Smrg# with a leading dot. For instance MS-DOS doesn't. 9945fe24f8a2SmrgAC_DEFUN([AM_SET_LEADING_DOT], 9946fe24f8a2Smrg[rm -rf .tst 2>/dev/null 9947fe24f8a2Smrgmkdir .tst 2>/dev/null 9948fe24f8a2Smrgif test -d .tst; then 9949fe24f8a2Smrg am__leading_dot=. 9950414bd68fSmrgelse 9951fe24f8a2Smrg am__leading_dot=_ 99523e72ca8cSmrgfi 9953fe24f8a2Smrgrmdir .tst 2>/dev/null 9954fe24f8a2SmrgAC_SUBST([am__leading_dot])]) 99553e72ca8cSmrg 9956fe24f8a2Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 99573e72ca8cSmrg 9958fe24f8a2Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 9959414bd68fSmrg# 9960fe24f8a2Smrg# This file is free software; the Free Software Foundation 9961fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 9962fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 9963414bd68fSmrg 9964fe24f8a2Smrg# AM_MAKE_INCLUDE() 9965fe24f8a2Smrg# ----------------- 9966fe24f8a2Smrg# Check to see how make treats includes. 9967fe24f8a2SmrgAC_DEFUN([AM_MAKE_INCLUDE], 9968fe24f8a2Smrg[am_make=${MAKE-make} 9969fe24f8a2Smrgcat > confinc << 'END' 9970fe24f8a2Smrgam__doit: 9971fe24f8a2Smrg @echo this is the am__doit target 9972fe24f8a2Smrg.PHONY: am__doit 9973fe24f8a2SmrgEND 9974fe24f8a2Smrg# If we don't find an include directive, just comment out the code. 9975fe24f8a2SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 9976fe24f8a2Smrgam__include="#" 9977fe24f8a2Smrgam__quote= 9978fe24f8a2Smrg_am_result=none 9979fe24f8a2Smrg# First try GNU make style include. 9980fe24f8a2Smrgecho "include confinc" > confmf 9981fe24f8a2Smrg# Ignore all kinds of additional output from 'make'. 9982fe24f8a2Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 9983fe24f8a2Smrg*the\ am__doit\ target*) 9984fe24f8a2Smrg am__include=include 9985fe24f8a2Smrg am__quote= 9986fe24f8a2Smrg _am_result=GNU 9987fe24f8a2Smrg ;; 9988fe24f8a2Smrgesac 9989fe24f8a2Smrg# Now try BSD make style include. 9990fe24f8a2Smrgif test "$am__include" = "#"; then 9991fe24f8a2Smrg echo '.include "confinc"' > confmf 9992fe24f8a2Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 9993fe24f8a2Smrg *the\ am__doit\ target*) 9994fe24f8a2Smrg am__include=.include 9995fe24f8a2Smrg am__quote="\"" 9996fe24f8a2Smrg _am_result=BSD 9997fe24f8a2Smrg ;; 9998fe24f8a2Smrg esac 9999414bd68fSmrgfi 10000fe24f8a2SmrgAC_SUBST([am__include]) 10001fe24f8a2SmrgAC_SUBST([am__quote]) 10002fe24f8a2SmrgAC_MSG_RESULT([$_am_result]) 10003fe24f8a2Smrgrm -f confinc confmf 10004fe24f8a2Smrg]) 10005b425557eSmrg 10006fe24f8a2Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 10007b425557eSmrg 10008fe24f8a2Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 10009414bd68fSmrg# 10010fe24f8a2Smrg# This file is free software; the Free Software Foundation 10011fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 10012fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 100133e72ca8cSmrg 10014fe24f8a2Smrg# AM_MISSING_PROG(NAME, PROGRAM) 10015fe24f8a2Smrg# ------------------------------ 10016fe24f8a2SmrgAC_DEFUN([AM_MISSING_PROG], 10017fe24f8a2Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 10018fe24f8a2Smrg$1=${$1-"${am_missing_run}$2"} 10019fe24f8a2SmrgAC_SUBST($1)]) 10020fe24f8a2Smrg 10021fe24f8a2Smrg# AM_MISSING_HAS_RUN 10022fe24f8a2Smrg# ------------------ 10023fe24f8a2Smrg# Define MISSING if not defined so far and test if it is modern enough. 10024fe24f8a2Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 10025fe24f8a2SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 10026fe24f8a2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 10027fe24f8a2SmrgAC_REQUIRE_AUX_FILE([missing])dnl 10028fe24f8a2Smrgif test x"${MISSING+set}" != xset; then 10029fe24f8a2Smrg case $am_aux_dir in 10030fe24f8a2Smrg *\ * | *\ *) 10031fe24f8a2Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 10032fe24f8a2Smrg *) 10033fe24f8a2Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 10034fe24f8a2Smrg esac 10035fe24f8a2Smrgfi 10036fe24f8a2Smrg# Use eval to expand $SHELL 10037fe24f8a2Smrgif eval "$MISSING --is-lightweight"; then 10038fe24f8a2Smrg am_missing_run="$MISSING " 100393e72ca8cSmrgelse 10040fe24f8a2Smrg am_missing_run= 10041fe24f8a2Smrg AC_MSG_WARN(['missing' script is too old or missing]) 10042414bd68fSmrgfi 10043fe24f8a2Smrg]) 10044b425557eSmrg 10045fe24f8a2Smrg# Helper functions for option handling. -*- Autoconf -*- 1004634977a2fSmrg 10047fe24f8a2Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 10048a1ed278cSmrg# 10049fe24f8a2Smrg# This file is free software; the Free Software Foundation 10050fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 10051fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 10052ee3138f1Smrg 10053fe24f8a2Smrg# _AM_MANGLE_OPTION(NAME) 10054fe24f8a2Smrg# ----------------------- 10055fe24f8a2SmrgAC_DEFUN([_AM_MANGLE_OPTION], 10056fe24f8a2Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 10057ee3138f1Smrg 10058fe24f8a2Smrg# _AM_SET_OPTION(NAME) 10059fe24f8a2Smrg# -------------------- 10060fe24f8a2Smrg# Set option NAME. Presently that only means defining a flag for this option. 10061fe24f8a2SmrgAC_DEFUN([_AM_SET_OPTION], 10062fe24f8a2Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 10063ee3138f1Smrg 10064fe24f8a2Smrg# _AM_SET_OPTIONS(OPTIONS) 10065fe24f8a2Smrg# ------------------------ 10066fe24f8a2Smrg# OPTIONS is a space-separated list of Automake options. 10067fe24f8a2SmrgAC_DEFUN([_AM_SET_OPTIONS], 10068fe24f8a2Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 10069ee3138f1Smrg 10070fe24f8a2Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 10071fe24f8a2Smrg# ------------------------------------------- 10072fe24f8a2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 10073fe24f8a2SmrgAC_DEFUN([_AM_IF_OPTION], 10074fe24f8a2Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 10075ee3138f1Smrg 10076fe24f8a2Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 10077414bd68fSmrg# 10078fe24f8a2Smrg# This file is free software; the Free Software Foundation 10079fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 10080fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 10081ee3138f1Smrg 10082fe24f8a2Smrg# _AM_PROG_CC_C_O 10083fe24f8a2Smrg# --------------- 10084fe24f8a2Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 10085fe24f8a2Smrg# to automatically call this. 10086fe24f8a2SmrgAC_DEFUN([_AM_PROG_CC_C_O], 10087fe24f8a2Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 10088fe24f8a2SmrgAC_REQUIRE_AUX_FILE([compile])dnl 10089fe24f8a2SmrgAC_LANG_PUSH([C])dnl 10090fe24f8a2SmrgAC_CACHE_CHECK( 10091fe24f8a2Smrg [whether $CC understands -c and -o together], 10092fe24f8a2Smrg [am_cv_prog_cc_c_o], 10093fe24f8a2Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 10094fe24f8a2Smrg # Make sure it works both with $CC and with simple cc. 10095fe24f8a2Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 10096fe24f8a2Smrg # compilers refuse to overwrite an existing .o file with -o, 10097fe24f8a2Smrg # though they will create one. 10098fe24f8a2Smrg am_cv_prog_cc_c_o=yes 10099fe24f8a2Smrg for am_i in 1 2; do 10100fe24f8a2Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 10101fe24f8a2Smrg && test -f conftest2.$ac_objext; then 10102fe24f8a2Smrg : OK 10103414bd68fSmrg else 10104fe24f8a2Smrg am_cv_prog_cc_c_o=no 10105fe24f8a2Smrg break 10106414bd68fSmrg fi 10107fe24f8a2Smrg done 10108fe24f8a2Smrg rm -f core conftest* 10109fe24f8a2Smrg unset am_i]) 10110fe24f8a2Smrgif test "$am_cv_prog_cc_c_o" != yes; then 10111fe24f8a2Smrg # Losing compiler, so override with the script. 10112fe24f8a2Smrg # FIXME: It is wrong to rewrite CC. 10113fe24f8a2Smrg # But if we don't then we get into trouble of one sort or another. 10114fe24f8a2Smrg # A longer-term fix would be to have automake use am__CC in this case, 10115fe24f8a2Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 10116fe24f8a2Smrg CC="$am_aux_dir/compile $CC" 10117414bd68fSmrgfi 10118fe24f8a2SmrgAC_LANG_POP([C])]) 10119ee3138f1Smrg 10120fe24f8a2Smrg# For backward compatibility. 10121fe24f8a2SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 1012234977a2fSmrg 10123fe24f8a2Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 10124414bd68fSmrg# 10125fe24f8a2Smrg# This file is free software; the Free Software Foundation 10126fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 10127fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 10128b425557eSmrg 10129fe24f8a2Smrg# AM_RUN_LOG(COMMAND) 10130fe24f8a2Smrg# ------------------- 10131fe24f8a2Smrg# Run COMMAND, save the exit status in ac_status, and log it. 10132fe24f8a2Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 10133fe24f8a2SmrgAC_DEFUN([AM_RUN_LOG], 10134fe24f8a2Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 10135fe24f8a2Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 10136fe24f8a2Smrg ac_status=$? 10137fe24f8a2Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 10138fe24f8a2Smrg (exit $ac_status); }]) 10139ee3138f1Smrg 10140fe24f8a2Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 10141ee3138f1Smrg 10142fe24f8a2Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 10143414bd68fSmrg# 10144fe24f8a2Smrg# This file is free software; the Free Software Foundation 10145fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 10146fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 10147ee3138f1Smrg 10148fe24f8a2Smrg# AM_SANITY_CHECK 10149fe24f8a2Smrg# --------------- 10150fe24f8a2SmrgAC_DEFUN([AM_SANITY_CHECK], 10151fe24f8a2Smrg[AC_MSG_CHECKING([whether build environment is sane]) 10152fe24f8a2Smrg# Reject unsafe characters in $srcdir or the absolute working directory 10153fe24f8a2Smrg# name. Accept space and tab only in the latter. 10154fe24f8a2Smrgam_lf=' 10155fe24f8a2Smrg' 10156fe24f8a2Smrgcase `pwd` in 10157fe24f8a2Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 10158fe24f8a2Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 10159fe24f8a2Smrgesac 10160fe24f8a2Smrgcase $srcdir in 10161fe24f8a2Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 10162fe24f8a2Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 10163fe24f8a2Smrgesac 10164ee3138f1Smrg 10165fe24f8a2Smrg# Do 'set' in a subshell so we don't clobber the current shell's 10166fe24f8a2Smrg# arguments. Must try -L first in case configure is actually a 10167fe24f8a2Smrg# symlink; some systems play weird games with the mod time of symlinks 10168fe24f8a2Smrg# (eg FreeBSD returns the mod time of the symlink's containing 10169fe24f8a2Smrg# directory). 10170fe24f8a2Smrgif ( 10171fe24f8a2Smrg am_has_slept=no 10172fe24f8a2Smrg for am_try in 1 2; do 10173fe24f8a2Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 10174fe24f8a2Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 10175fe24f8a2Smrg if test "$[*]" = "X"; then 10176fe24f8a2Smrg # -L didn't work. 10177fe24f8a2Smrg set X `ls -t "$srcdir/configure" conftest.file` 10178fe24f8a2Smrg fi 10179fe24f8a2Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 10180fe24f8a2Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 10181414bd68fSmrg 10182fe24f8a2Smrg # If neither matched, then we have a broken ls. This can happen 10183fe24f8a2Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 10184fe24f8a2Smrg # broken ls alias from the environment. This has actually 10185fe24f8a2Smrg # happened. Such a system could not be considered "sane". 10186fe24f8a2Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 10187fe24f8a2Smrg alias in your environment]) 10188fe24f8a2Smrg fi 10189fe24f8a2Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 10190fe24f8a2Smrg break 10191fe24f8a2Smrg fi 10192fe24f8a2Smrg # Just in case. 10193fe24f8a2Smrg sleep 1 10194fe24f8a2Smrg am_has_slept=yes 10195fe24f8a2Smrg done 10196fe24f8a2Smrg test "$[2]" = conftest.file 10197fe24f8a2Smrg ) 10198fe24f8a2Smrgthen 10199fe24f8a2Smrg # Ok. 10200fe24f8a2Smrg : 10201a1ed278cSmrgelse 10202fe24f8a2Smrg AC_MSG_ERROR([newly created file is older than distributed files! 10203fe24f8a2SmrgCheck your system clock]) 10204a1ed278cSmrgfi 10205fe24f8a2SmrgAC_MSG_RESULT([yes]) 10206fe24f8a2Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 10207fe24f8a2Smrg# generated files are strictly newer. 10208fe24f8a2Smrgam_sleep_pid= 10209fe24f8a2Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 10210fe24f8a2Smrg ( sleep 1 ) & 10211fe24f8a2Smrg am_sleep_pid=$! 10212fe24f8a2Smrgfi 10213fe24f8a2SmrgAC_CONFIG_COMMANDS_PRE( 10214fe24f8a2Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 10215fe24f8a2Smrg if test -n "$am_sleep_pid"; then 10216fe24f8a2Smrg # Hide warnings about reused PIDs. 10217fe24f8a2Smrg wait $am_sleep_pid 2>/dev/null 10218fe24f8a2Smrg fi 10219fe24f8a2Smrg AC_MSG_RESULT([done])]) 10220fe24f8a2Smrgrm -f conftest.file 10221fe24f8a2Smrg]) 10222ee3138f1Smrg 10223fe24f8a2Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 10224414bd68fSmrg# 10225fe24f8a2Smrg# This file is free software; the Free Software Foundation 10226fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 10227fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 10228ee3138f1Smrg 10229fe24f8a2Smrg# AM_SILENT_RULES([DEFAULT]) 10230fe24f8a2Smrg# -------------------------- 10231fe24f8a2Smrg# Enable less verbose build rules; with the default set to DEFAULT 10232fe24f8a2Smrg# ("yes" being less verbose, "no" or empty being verbose). 10233fe24f8a2SmrgAC_DEFUN([AM_SILENT_RULES], 10234fe24f8a2Smrg[AC_ARG_ENABLE([silent-rules], [dnl 10235fe24f8a2SmrgAS_HELP_STRING( 10236fe24f8a2Smrg [--enable-silent-rules], 10237fe24f8a2Smrg [less verbose build output (undo: "make V=1")]) 10238fe24f8a2SmrgAS_HELP_STRING( 10239fe24f8a2Smrg [--disable-silent-rules], 10240fe24f8a2Smrg [verbose build output (undo: "make V=0")])dnl 10241fe24f8a2Smrg]) 10242fe24f8a2Smrgcase $enable_silent_rules in @%:@ ((( 10243fe24f8a2Smrg yes) AM_DEFAULT_VERBOSITY=0;; 10244fe24f8a2Smrg no) AM_DEFAULT_VERBOSITY=1;; 10245fe24f8a2Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 10246fe24f8a2Smrgesac 10247fe24f8a2Smrgdnl 10248fe24f8a2Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 10249fe24f8a2Smrgdnl do not support nested variable expansions. 10250fe24f8a2Smrgdnl See automake bug#9928 and bug#10237. 10251fe24f8a2Smrgam_make=${MAKE-make} 10252fe24f8a2SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 10253fe24f8a2Smrg [am_cv_make_support_nested_variables], 10254fe24f8a2Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 10255fe24f8a2SmrgBAR0=false 10256fe24f8a2SmrgBAR1=true 10257fe24f8a2SmrgV=1 10258fe24f8a2Smrgam__doit: 10259fe24f8a2Smrg @$(TRUE) 10260fe24f8a2Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 10261fe24f8a2Smrg am_cv_make_support_nested_variables=yes 10262fe24f8a2Smrgelse 10263fe24f8a2Smrg am_cv_make_support_nested_variables=no 10264fe24f8a2Smrgfi]) 10265fe24f8a2Smrgif test $am_cv_make_support_nested_variables = yes; then 10266fe24f8a2Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 10267fe24f8a2Smrg AM_V='$(V)' 10268fe24f8a2Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 10269fe24f8a2Smrgelse 10270fe24f8a2Smrg AM_V=$AM_DEFAULT_VERBOSITY 10271fe24f8a2Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 10272fe24f8a2Smrgfi 10273fe24f8a2SmrgAC_SUBST([AM_V])dnl 10274fe24f8a2SmrgAM_SUBST_NOTMAKE([AM_V])dnl 10275fe24f8a2SmrgAC_SUBST([AM_DEFAULT_V])dnl 10276fe24f8a2SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 10277fe24f8a2SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 10278fe24f8a2SmrgAM_BACKSLASH='\' 10279fe24f8a2SmrgAC_SUBST([AM_BACKSLASH])dnl 10280fe24f8a2Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 10281fe24f8a2Smrg]) 10282ee3138f1Smrg 10283fe24f8a2Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 10284414bd68fSmrg# 10285fe24f8a2Smrg# This file is free software; the Free Software Foundation 10286fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 10287fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 10288ee3138f1Smrg 10289fe24f8a2Smrg# AM_PROG_INSTALL_STRIP 10290fe24f8a2Smrg# --------------------- 10291fe24f8a2Smrg# One issue with vendor 'install' (even GNU) is that you can't 10292fe24f8a2Smrg# specify the program used to strip binaries. This is especially 10293fe24f8a2Smrg# annoying in cross-compiling environments, where the build's strip 10294fe24f8a2Smrg# is unlikely to handle the host's binaries. 10295fe24f8a2Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 10296fe24f8a2Smrg# always use install-sh in "make install-strip", and initialize 10297fe24f8a2Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 10298fe24f8a2SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 10299fe24f8a2Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 10300fe24f8a2Smrg# Installed binaries are usually stripped using 'strip' when the user 10301fe24f8a2Smrg# run "make install-strip". However 'strip' might not be the right 10302fe24f8a2Smrg# tool to use in cross-compilation environments, therefore Automake 10303fe24f8a2Smrg# will honor the 'STRIP' environment variable to overrule this program. 10304fe24f8a2Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 10305fe24f8a2Smrgif test "$cross_compiling" != no; then 10306fe24f8a2Smrg AC_CHECK_TOOL([STRIP], [strip], :) 10307fe24f8a2Smrgfi 10308fe24f8a2SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 10309fe24f8a2SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 10310fe24f8a2Smrg 10311fe24f8a2Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 10312414bd68fSmrg# 10313fe24f8a2Smrg# This file is free software; the Free Software Foundation 10314fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 10315fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 10316ee3138f1Smrg 10317fe24f8a2Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 10318fe24f8a2Smrg# --------------------------- 10319fe24f8a2Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 10320fe24f8a2Smrg# This macro is traced by Automake. 10321fe24f8a2SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 10322fe24f8a2Smrg 10323fe24f8a2Smrg# AM_SUBST_NOTMAKE(VARIABLE) 10324fe24f8a2Smrg# -------------------------- 10325fe24f8a2Smrg# Public sister of _AM_SUBST_NOTMAKE. 10326fe24f8a2SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 10327fe24f8a2Smrg 10328fe24f8a2Smrg# Check how to create a tarball. -*- Autoconf -*- 10329fe24f8a2Smrg 10330fe24f8a2Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 10331414bd68fSmrg# 10332fe24f8a2Smrg# This file is free software; the Free Software Foundation 10333fe24f8a2Smrg# gives unlimited permission to copy and/or distribute it, 10334fe24f8a2Smrg# with or without modifications, as long as this notice is preserved. 10335fe24f8a2Smrg 10336fe24f8a2Smrg# _AM_PROG_TAR(FORMAT) 10337fe24f8a2Smrg# -------------------- 10338fe24f8a2Smrg# Check how to create a tarball in format FORMAT. 10339fe24f8a2Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 10340414bd68fSmrg# 10341fe24f8a2Smrg# Substitute a variable $(am__tar) that is a command 10342fe24f8a2Smrg# writing to stdout a FORMAT-tarball containing the directory 10343fe24f8a2Smrg# $tardir. 10344fe24f8a2Smrg# tardir=directory && $(am__tar) > result.tar 10345414bd68fSmrg# 10346fe24f8a2Smrg# Substitute a variable $(am__untar) that extract such 10347fe24f8a2Smrg# a tarball read from stdin. 10348fe24f8a2Smrg# $(am__untar) < result.tar 10349414bd68fSmrg# 10350fe24f8a2SmrgAC_DEFUN([_AM_PROG_TAR], 10351fe24f8a2Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 10352fe24f8a2Smrg# in the wild :-( We should find a proper way to deprecate it ... 10353fe24f8a2SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 10354ee3138f1Smrg 10355fe24f8a2Smrg# We'll loop over all known methods to create a tar archive until one works. 10356fe24f8a2Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10357ee3138f1Smrg 10358fe24f8a2Smrgm4_if([$1], [v7], 10359fe24f8a2Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10360ee3138f1Smrg 10361fe24f8a2Smrg [m4_case([$1], 10362fe24f8a2Smrg [ustar], 10363fe24f8a2Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 10364fe24f8a2Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 10365fe24f8a2Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 10366fe24f8a2Smrg # and bug#13588). 10367fe24f8a2Smrg am_max_uid=2097151 # 2^21 - 1 10368fe24f8a2Smrg am_max_gid=$am_max_uid 10369fe24f8a2Smrg # The $UID and $GID variables are not portable, so we need to resort 10370fe24f8a2Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 10371fe24f8a2Smrg # below are definitely unexpected, so allow the users to see them 10372fe24f8a2Smrg # (that is, avoid stderr redirection). 10373fe24f8a2Smrg am_uid=`id -u || echo unknown` 10374fe24f8a2Smrg am_gid=`id -g || echo unknown` 10375fe24f8a2Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 10376fe24f8a2Smrg if test $am_uid -le $am_max_uid; then 10377fe24f8a2Smrg AC_MSG_RESULT([yes]) 10378fe24f8a2Smrg else 10379fe24f8a2Smrg AC_MSG_RESULT([no]) 10380fe24f8a2Smrg _am_tools=none 10381fe24f8a2Smrg fi 10382fe24f8a2Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 10383fe24f8a2Smrg if test $am_gid -le $am_max_gid; then 10384fe24f8a2Smrg AC_MSG_RESULT([yes]) 10385fe24f8a2Smrg else 10386fe24f8a2Smrg AC_MSG_RESULT([no]) 10387fe24f8a2Smrg _am_tools=none 10388fe24f8a2Smrg fi], 10389ee3138f1Smrg 10390fe24f8a2Smrg [pax], 10391fe24f8a2Smrg [], 10392ee3138f1Smrg 10393fe24f8a2Smrg [m4_fatal([Unknown tar format])]) 10394ee3138f1Smrg 10395fe24f8a2Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10396ee3138f1Smrg 10397fe24f8a2Smrg # Go ahead even if we have the value already cached. We do so because we 10398fe24f8a2Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 10399fe24f8a2Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10400ee3138f1Smrg 10401fe24f8a2Smrg for _am_tool in $_am_tools; do 10402fe24f8a2Smrg case $_am_tool in 10403fe24f8a2Smrg gnutar) 10404fe24f8a2Smrg for _am_tar in tar gnutar gtar; do 10405fe24f8a2Smrg AM_RUN_LOG([$_am_tar --version]) && break 10406fe24f8a2Smrg done 10407fe24f8a2Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 10408fe24f8a2Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 10409fe24f8a2Smrg am__untar="$_am_tar -xf -" 10410fe24f8a2Smrg ;; 10411fe24f8a2Smrg plaintar) 10412fe24f8a2Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 10413fe24f8a2Smrg # ustar tarball either. 10414fe24f8a2Smrg (tar --version) >/dev/null 2>&1 && continue 10415fe24f8a2Smrg am__tar='tar chf - "$$tardir"' 10416fe24f8a2Smrg am__tar_='tar chf - "$tardir"' 10417fe24f8a2Smrg am__untar='tar xf -' 10418fe24f8a2Smrg ;; 10419fe24f8a2Smrg pax) 10420fe24f8a2Smrg am__tar='pax -L -x $1 -w "$$tardir"' 10421fe24f8a2Smrg am__tar_='pax -L -x $1 -w "$tardir"' 10422fe24f8a2Smrg am__untar='pax -r' 10423fe24f8a2Smrg ;; 10424fe24f8a2Smrg cpio) 10425fe24f8a2Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 10426fe24f8a2Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 10427fe24f8a2Smrg am__untar='cpio -i -H $1 -d' 10428fe24f8a2Smrg ;; 10429fe24f8a2Smrg none) 10430fe24f8a2Smrg am__tar=false 10431fe24f8a2Smrg am__tar_=false 10432fe24f8a2Smrg am__untar=false 10433fe24f8a2Smrg ;; 10434fe24f8a2Smrg esac 10435fe24f8a2Smrg 10436fe24f8a2Smrg # If the value was cached, stop now. We just wanted to have am__tar 10437fe24f8a2Smrg # and am__untar set. 10438fe24f8a2Smrg test -n "${am_cv_prog_tar_$1}" && break 10439fe24f8a2Smrg 10440fe24f8a2Smrg # tar/untar a dummy directory, and stop if the command works. 10441fe24f8a2Smrg rm -rf conftest.dir 10442fe24f8a2Smrg mkdir conftest.dir 10443fe24f8a2Smrg echo GrepMe > conftest.dir/file 10444fe24f8a2Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 10445fe24f8a2Smrg rm -rf conftest.dir 10446fe24f8a2Smrg if test -s conftest.tar; then 10447fe24f8a2Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 10448fe24f8a2Smrg AM_RUN_LOG([cat conftest.dir/file]) 10449fe24f8a2Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 10450fe24f8a2Smrg fi 10451fe24f8a2Smrg done 10452fe24f8a2Smrg rm -rf conftest.dir 10453fe24f8a2Smrg 10454fe24f8a2Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 10455fe24f8a2Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10456fe24f8a2Smrg 10457fe24f8a2SmrgAC_SUBST([am__tar]) 10458fe24f8a2SmrgAC_SUBST([am__untar]) 10459fe24f8a2Smrg]) # _AM_PROG_TAR 10460fe24f8a2Smrg 10461fe24f8a2Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 10462fe24f8a2Smrgdnl 10463fe24f8a2Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved. 10464fe24f8a2Smrgdnl 10465fe24f8a2Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 10466fe24f8a2Smrgdnl copy of this software and associated documentation files (the "Software"), 10467fe24f8a2Smrgdnl to deal in the Software without restriction, including without limitation 10468fe24f8a2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 10469fe24f8a2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 10470fe24f8a2Smrgdnl Software is furnished to do so, subject to the following conditions: 10471fe24f8a2Smrgdnl 10472fe24f8a2Smrgdnl The above copyright notice and this permission notice (including the next 10473fe24f8a2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 10474fe24f8a2Smrgdnl Software. 10475fe24f8a2Smrgdnl 10476fe24f8a2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 10477fe24f8a2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 10478fe24f8a2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 10479fe24f8a2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 10480fe24f8a2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 10481fe24f8a2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 10482fe24f8a2Smrgdnl DEALINGS IN THE SOFTWARE. 10483fe24f8a2Smrg 10484fe24f8a2Smrg# XORG_MACROS_VERSION(required-version) 10485fe24f8a2Smrg# ------------------------------------- 10486fe24f8a2Smrg# Minimum version: 1.1.0 10487414bd68fSmrg# 10488fe24f8a2Smrg# If you're using a macro added in Version 1.1 or newer, include this in 10489fe24f8a2Smrg# your configure.ac with the minimum required version, such as: 10490fe24f8a2Smrg# XORG_MACROS_VERSION(1.1) 10491a1ed278cSmrg# 10492fe24f8a2Smrg# To ensure that this macro is defined, also add: 10493fe24f8a2Smrg# m4_ifndef([XORG_MACROS_VERSION], 10494fe24f8a2Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 10495a1ed278cSmrg# 10496a1ed278cSmrg# 10497fe24f8a2Smrg# See the "minimum version" comment for each macro you use to see what 10498fe24f8a2Smrg# version you require. 10499fe24f8a2Smrgm4_defun([XORG_MACROS_VERSION],[ 10500fe24f8a2Smrgm4_define([vers_have], [1.19.0]) 10501fe24f8a2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 10502fe24f8a2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 10503fe24f8a2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 10504fe24f8a2Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 10505fe24f8a2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 10506fe24f8a2Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 10507fe24f8a2Smrgm4_undefine([vers_have]) 10508fe24f8a2Smrgm4_undefine([maj_have]) 10509fe24f8a2Smrgm4_undefine([maj_needed]) 10510fe24f8a2Smrg]) # XORG_MACROS_VERSION 10511fe24f8a2Smrg 10512fe24f8a2Smrg# XORG_PROG_RAWCPP() 10513fe24f8a2Smrg# ------------------ 10514fe24f8a2Smrg# Minimum version: 1.0.0 10515a1ed278cSmrg# 10516fe24f8a2Smrg# Find cpp program and necessary flags for use in pre-processing text files 10517fe24f8a2Smrg# such as man pages and config files 10518fe24f8a2SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 10519fe24f8a2SmrgAC_REQUIRE([AC_PROG_CPP]) 10520fe24f8a2SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 10521fe24f8a2Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10522fe24f8a2Smrg 10523fe24f8a2Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 10524fe24f8a2Smrg# which is not the best choice for supporting other OS'es, but covers most 10525fe24f8a2Smrg# of the ones we need for now. 10526fe24f8a2SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 10527fe24f8a2SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 10528fe24f8a2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10529fe24f8a2Smrg AC_MSG_RESULT([no]) 10530a1ed278cSmrgelse 10531fe24f8a2Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10532fe24f8a2Smrg RAWCPPFLAGS=-undef 10533fe24f8a2Smrg AC_MSG_RESULT([yes]) 10534fe24f8a2Smrg # under Cygwin unix is still defined even with -undef 10535fe24f8a2Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 10536fe24f8a2Smrg RAWCPPFLAGS="-undef -ansi" 10537fe24f8a2Smrg AC_MSG_RESULT([yes, with -ansi]) 10538fe24f8a2Smrg else 10539fe24f8a2Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 10540fe24f8a2Smrg fi 10541a1ed278cSmrgfi 10542fe24f8a2Smrgrm -f conftest.$ac_ext 10543ee3138f1Smrg 10544fe24f8a2SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 10545fe24f8a2SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 10546fe24f8a2Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 10547fe24f8a2Smrg AC_MSG_RESULT([no]) 10548fe24f8a2Smrgelse 10549fe24f8a2Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 10550fe24f8a2Smrg TRADITIONALCPPFLAGS="-traditional" 10551fe24f8a2Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 10552fe24f8a2Smrg AC_MSG_RESULT([yes]) 10553fe24f8a2Smrg else 10554fe24f8a2Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 10555fe24f8a2Smrg fi 10556fe24f8a2Smrgfi 10557fe24f8a2Smrgrm -f conftest.$ac_ext 10558fe24f8a2SmrgAC_SUBST(RAWCPPFLAGS) 10559fe24f8a2SmrgAC_SUBST(TRADITIONALCPPFLAGS) 10560fe24f8a2Smrg]) # XORG_PROG_RAWCPP 10561fe24f8a2Smrg 10562fe24f8a2Smrg# XORG_MANPAGE_SECTIONS() 10563414bd68fSmrg# ----------------------- 10564fe24f8a2Smrg# Minimum version: 1.0.0 105653e72ca8cSmrg# 10566fe24f8a2Smrg# Determine which sections man pages go in for the different man page types 10567fe24f8a2Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 10568fe24f8a2Smrg# Not sure if there's any better way than just hardcoding by OS name. 10569fe24f8a2Smrg# Override default settings by setting environment variables 10570fe24f8a2Smrg# Added MAN_SUBSTS in version 1.8 10571fe24f8a2Smrg# Added AC_PROG_SED in version 1.8 105723e72ca8cSmrg 10573fe24f8a2SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 10574414bd68fSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10575fe24f8a2SmrgAC_REQUIRE([AC_PROG_SED]) 10576414bd68fSmrg 10577fe24f8a2Smrgif test x$APP_MAN_SUFFIX = x ; then 10578fe24f8a2Smrg APP_MAN_SUFFIX=1 10579fe24f8a2Smrgfi 10580fe24f8a2Smrgif test x$APP_MAN_DIR = x ; then 10581fe24f8a2Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 105823e72ca8cSmrgfi 105833e72ca8cSmrg 10584fe24f8a2Smrgif test x$LIB_MAN_SUFFIX = x ; then 10585fe24f8a2Smrg LIB_MAN_SUFFIX=3 10586fe24f8a2Smrgfi 10587fe24f8a2Smrgif test x$LIB_MAN_DIR = x ; then 10588fe24f8a2Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 10589fe24f8a2Smrgfi 105903e72ca8cSmrg 10591fe24f8a2Smrgif test x$FILE_MAN_SUFFIX = x ; then 10592fe24f8a2Smrg case $host_os in 10593fe24f8a2Smrg # Solaris 2.0 - 11 use SysV man page sections 10594fe24f8a2Smrg solaris2.?|solaris2.1[[01]]) FILE_MAN_SUFFIX=4 ;; 10595fe24f8a2Smrg *) FILE_MAN_SUFFIX=5 ;; 10596fe24f8a2Smrg esac 10597fe24f8a2Smrgfi 10598fe24f8a2Smrgif test x$FILE_MAN_DIR = x ; then 10599fe24f8a2Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 10600fe24f8a2Smrgfi 10601414bd68fSmrg 10602fe24f8a2Smrgif test x$MISC_MAN_SUFFIX = x ; then 10603fe24f8a2Smrg case $host_os in 10604fe24f8a2Smrg # Solaris 2.0 - 11 use SysV man page sections 10605fe24f8a2Smrg solaris2.?|solaris2.1[[01]]) MISC_MAN_SUFFIX=5 ;; 10606fe24f8a2Smrg *) MISC_MAN_SUFFIX=7 ;; 10607fe24f8a2Smrg esac 10608fe24f8a2Smrgfi 10609fe24f8a2Smrgif test x$MISC_MAN_DIR = x ; then 10610fe24f8a2Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 10611414bd68fSmrgfi 106123e72ca8cSmrg 10613fe24f8a2Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 10614fe24f8a2Smrg case $host_os in 10615fe24f8a2Smrg # Solaris 2.0 - 11 use SysV man page sections 10616fe24f8a2Smrg solaris2.?|solaris2.1[[01]]) DRIVER_MAN_SUFFIX=7 ;; 10617fe24f8a2Smrg *) DRIVER_MAN_SUFFIX=4 ;; 10618fe24f8a2Smrg esac 10619fe24f8a2Smrgfi 10620fe24f8a2Smrgif test x$DRIVER_MAN_DIR = x ; then 10621fe24f8a2Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 106223e72ca8cSmrgfi 106233e72ca8cSmrg 10624fe24f8a2Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 10625fe24f8a2Smrg case $host_os in 10626fe24f8a2Smrg # Solaris 2.0 - 11 use SysV man page sections 10627fe24f8a2Smrg solaris2.?|solaris2.1[[01]]) ADMIN_MAN_SUFFIX=1m ;; 10628fe24f8a2Smrg *) ADMIN_MAN_SUFFIX=8 ;; 10629fe24f8a2Smrg esac 10630fe24f8a2Smrgfi 10631fe24f8a2Smrgif test x$ADMIN_MAN_DIR = x ; then 10632fe24f8a2Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 10633fe24f8a2Smrgfi 106343e72ca8cSmrg 10635ee3138f1Smrg 10636fe24f8a2SmrgAC_SUBST([APP_MAN_SUFFIX]) 10637fe24f8a2SmrgAC_SUBST([LIB_MAN_SUFFIX]) 10638fe24f8a2SmrgAC_SUBST([FILE_MAN_SUFFIX]) 10639fe24f8a2SmrgAC_SUBST([MISC_MAN_SUFFIX]) 10640fe24f8a2SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 10641fe24f8a2SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 10642fe24f8a2SmrgAC_SUBST([APP_MAN_DIR]) 10643fe24f8a2SmrgAC_SUBST([LIB_MAN_DIR]) 10644fe24f8a2SmrgAC_SUBST([FILE_MAN_DIR]) 10645fe24f8a2SmrgAC_SUBST([MISC_MAN_DIR]) 10646fe24f8a2SmrgAC_SUBST([DRIVER_MAN_DIR]) 10647fe24f8a2SmrgAC_SUBST([ADMIN_MAN_DIR]) 10648414bd68fSmrg 10649fe24f8a2SmrgXORG_MAN_PAGE="X Version 11" 10650fe24f8a2SmrgAC_SUBST([XORG_MAN_PAGE]) 10651fe24f8a2SmrgMAN_SUBSTS="\ 10652fe24f8a2Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10653fe24f8a2Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 10654fe24f8a2Smrg -e 's|__xservername__|Xorg|g' \ 10655fe24f8a2Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 10656fe24f8a2Smrg -e 's|__xorgconfdir__|xorg.conf.d|g' \ 10657fe24f8a2Smrg -e 's|__projectroot__|\$(prefix)|g' \ 10658fe24f8a2Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 10659fe24f8a2Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 10660fe24f8a2Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 10661fe24f8a2Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 10662fe24f8a2Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 10663fe24f8a2Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 10664fe24f8a2Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 10665fe24f8a2SmrgAC_SUBST([MAN_SUBSTS]) 10666414bd68fSmrg 10667fe24f8a2Smrg]) # XORG_MANPAGE_SECTIONS 10668fe24f8a2Smrg 10669fe24f8a2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 10670fe24f8a2Smrg# ------------------------ 10671fe24f8a2Smrg# Minimum version: 1.7.0 10672fe24f8a2Smrg# 10673fe24f8a2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 10674fe24f8a2Smrg# provided by xorg-sgml-doctools, if installed. 10675fe24f8a2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 10676fe24f8a2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 10677fe24f8a2SmrgXORG_SGML_PATH= 10678fe24f8a2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 10679fe24f8a2Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 10680fe24f8a2Smrg [m4_ifval([$1],[:], 10681fe24f8a2Smrg [if test x"$cross_compiling" != x"yes" ; then 10682fe24f8a2Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 10683fe24f8a2Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 10684fe24f8a2Smrg fi]) 10685fe24f8a2Smrg ]) 10686fe24f8a2Smrg 10687fe24f8a2Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 10688fe24f8a2Smrg# the path and the name of the doc stylesheet 10689fe24f8a2Smrgif test "x$XORG_SGML_PATH" != "x" ; then 10690fe24f8a2Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 10691fe24f8a2Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 10692fe24f8a2Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 10693a1ed278cSmrgelse 10694fe24f8a2Smrg AC_MSG_RESULT([no]) 10695a1ed278cSmrgfi 10696ee3138f1Smrg 10697fe24f8a2SmrgAC_SUBST(XORG_SGML_PATH) 10698fe24f8a2SmrgAC_SUBST(STYLESHEET_SRCDIR) 10699fe24f8a2SmrgAC_SUBST(XSL_STYLESHEET) 10700fe24f8a2SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10701fe24f8a2Smrg]) # XORG_CHECK_SGML_DOCTOOLS 10702414bd68fSmrg 10703fe24f8a2Smrg# XORG_CHECK_LINUXDOC 10704fe24f8a2Smrg# ------------------- 10705fe24f8a2Smrg# Minimum version: 1.0.0 10706fe24f8a2Smrg# 10707fe24f8a2Smrg# Defines the variable MAKE_TEXT if the necessary tools and 10708fe24f8a2Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 10709fe24f8a2Smrg# Whether or not the necessary tools and files are found can be checked 10710fe24f8a2Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 10711fe24f8a2SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 10712fe24f8a2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10713fe24f8a2SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10714414bd68fSmrg 10715fe24f8a2SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10716414bd68fSmrg 10717fe24f8a2SmrgAC_MSG_CHECKING([whether to build documentation]) 10718a1ed278cSmrg 10719fe24f8a2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 10720fe24f8a2Smrg BUILDDOC=yes 10721fe24f8a2Smrgelse 10722fe24f8a2Smrg BUILDDOC=no 10723fe24f8a2Smrgfi 10724ee3138f1Smrg 10725fe24f8a2SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10726fe24f8a2Smrg 10727fe24f8a2SmrgAC_MSG_RESULT([$BUILDDOC]) 10728fe24f8a2Smrg 10729fe24f8a2SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 10730fe24f8a2Smrg 10731fe24f8a2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 10732fe24f8a2Smrg BUILDPDFDOC=yes 10733fe24f8a2Smrgelse 10734fe24f8a2Smrg BUILDPDFDOC=no 10735414bd68fSmrgfi 10736414bd68fSmrg 10737fe24f8a2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10738414bd68fSmrg 10739fe24f8a2SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10740414bd68fSmrg 10741fe24f8a2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 10742fe24f8a2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 10743fe24f8a2SmrgMAKE_PDF="$PS2PDF" 10744fe24f8a2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10745414bd68fSmrg 10746fe24f8a2SmrgAC_SUBST(MAKE_TEXT) 10747fe24f8a2SmrgAC_SUBST(MAKE_PS) 10748fe24f8a2SmrgAC_SUBST(MAKE_PDF) 10749fe24f8a2SmrgAC_SUBST(MAKE_HTML) 10750fe24f8a2Smrg]) # XORG_CHECK_LINUXDOC 10751fe24f8a2Smrg 10752fe24f8a2Smrg# XORG_CHECK_DOCBOOK 10753fe24f8a2Smrg# ------------------- 10754fe24f8a2Smrg# Minimum version: 1.0.0 10755a1ed278cSmrg# 10756fe24f8a2Smrg# Checks for the ability to build output formats from SGML DocBook source. 10757fe24f8a2Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 10758fe24f8a2Smrg# indicates whether the necessary tools and files are found and, if set, 10759fe24f8a2Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 10760fe24f8a2SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 10761fe24f8a2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10762ee3138f1Smrg 10763fe24f8a2SmrgBUILDTXTDOC=no 10764fe24f8a2SmrgBUILDPDFDOC=no 10765fe24f8a2SmrgBUILDPSDOC=no 10766fe24f8a2SmrgBUILDHTMLDOC=no 10767ee3138f1Smrg 10768fe24f8a2SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 10769fe24f8a2SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 10770fe24f8a2SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 10771fe24f8a2SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 10772414bd68fSmrg 10773fe24f8a2SmrgAC_MSG_CHECKING([whether to build text documentation]) 10774fe24f8a2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 10775fe24f8a2Smrg test x$BUILD_TXTDOC != xno; then 10776fe24f8a2Smrg BUILDTXTDOC=yes 10777fe24f8a2Smrgfi 10778fe24f8a2SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 10779fe24f8a2SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10780414bd68fSmrg 10781fe24f8a2SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 10782fe24f8a2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 10783fe24f8a2Smrg test x$BUILD_PDFDOC != xno; then 10784fe24f8a2Smrg BUILDPDFDOC=yes 10785a1ed278cSmrgfi 10786fe24f8a2SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10787fe24f8a2SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10788ee3138f1Smrg 10789fe24f8a2SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 10790fe24f8a2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 10791fe24f8a2Smrg test x$BUILD_PSDOC != xno; then 10792fe24f8a2Smrg BUILDPSDOC=yes 10793a1ed278cSmrgfi 10794fe24f8a2SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 10795fe24f8a2SmrgAC_MSG_RESULT([$BUILDPSDOC]) 10796ee3138f1Smrg 10797fe24f8a2SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 10798fe24f8a2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 10799fe24f8a2Smrg test x$BUILD_HTMLDOC != xno; then 10800fe24f8a2Smrg BUILDHTMLDOC=yes 10801fe24f8a2Smrgfi 10802fe24f8a2SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 10803fe24f8a2SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 10804414bd68fSmrg 10805fe24f8a2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 10806fe24f8a2SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 10807fe24f8a2SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 10808fe24f8a2SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 10809414bd68fSmrg 10810fe24f8a2SmrgAC_SUBST(MAKE_TEXT) 10811fe24f8a2SmrgAC_SUBST(MAKE_PS) 10812fe24f8a2SmrgAC_SUBST(MAKE_PDF) 10813fe24f8a2SmrgAC_SUBST(MAKE_HTML) 10814fe24f8a2Smrg]) # XORG_CHECK_DOCBOOK 10815414bd68fSmrg 10816fe24f8a2Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10817fe24f8a2Smrg# ---------------- 10818fe24f8a2Smrg# Minimum version: 1.5.0 10819fe24f8a2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10820a1ed278cSmrg# 10821fe24f8a2Smrg# Documentation tools are not always available on all platforms and sometimes 10822fe24f8a2Smrg# not at the appropriate level. This macro enables a module to test for the 10823fe24f8a2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10824fe24f8a2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 10825fe24f8a2Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 10826fe24f8a2Smrg# --with-xmlto assumes 'auto'. 10827a1ed278cSmrg# 10828fe24f8a2Smrg# Interface to module: 10829fe24f8a2Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10830fe24f8a2Smrg# XMLTO: returns the path of the xmlto program found 10831fe24f8a2Smrg# returns the path set by the user in the environment 10832fe24f8a2Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 10833fe24f8a2Smrg# 'no' user instructs the module not to use xmlto 10834a1ed278cSmrg# 10835fe24f8a2Smrg# Added in version 1.10.0 10836fe24f8a2Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10837fe24f8a2Smrg# xmlto for text output requires either lynx, links, or w3m browsers 10838fe24f8a2Smrg# 10839fe24f8a2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10840fe24f8a2Smrg# 10841fe24f8a2SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 10842fe24f8a2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 10843fe24f8a2Smrgm4_define([_defopt], m4_default([$2], [auto])) 10844fe24f8a2SmrgAC_ARG_WITH(xmlto, 10845fe24f8a2Smrg AS_HELP_STRING([--with-xmlto], 10846fe24f8a2Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10847fe24f8a2Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 10848fe24f8a2Smrgm4_undefine([_defopt]) 10849414bd68fSmrg 10850fe24f8a2Smrgif test "x$use_xmlto" = x"auto"; then 10851fe24f8a2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 10852fe24f8a2Smrg if test "x$XMLTO" = "x"; then 10853fe24f8a2Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10854fe24f8a2Smrg have_xmlto=no 10855fe24f8a2Smrg else 10856fe24f8a2Smrg have_xmlto=yes 10857fe24f8a2Smrg fi 10858fe24f8a2Smrgelif test "x$use_xmlto" = x"yes" ; then 10859fe24f8a2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 10860fe24f8a2Smrg if test "x$XMLTO" = "x"; then 10861fe24f8a2Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10862fe24f8a2Smrg fi 10863fe24f8a2Smrg have_xmlto=yes 10864fe24f8a2Smrgelif test "x$use_xmlto" = x"no" ; then 10865fe24f8a2Smrg if test "x$XMLTO" != "x"; then 10866fe24f8a2Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10867fe24f8a2Smrg fi 10868fe24f8a2Smrg have_xmlto=no 10869a1ed278cSmrgelse 10870fe24f8a2Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10871a1ed278cSmrgfi 108723e72ca8cSmrg 10873fe24f8a2Smrg# Test for a minimum version of xmlto, if provided. 10874fe24f8a2Smrgm4_ifval([$1], 10875fe24f8a2Smrg[if test "$have_xmlto" = yes; then 10876fe24f8a2Smrg # scrape the xmlto version 10877fe24f8a2Smrg AC_MSG_CHECKING([the xmlto version]) 10878fe24f8a2Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10879fe24f8a2Smrg AC_MSG_RESULT([$xmlto_version]) 10880fe24f8a2Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 10881fe24f8a2Smrg [if test "x$use_xmlto" = xauto; then 10882fe24f8a2Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10883fe24f8a2Smrg have_xmlto=no 10884fe24f8a2Smrg else 10885fe24f8a2Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10886fe24f8a2Smrg fi]) 10887fe24f8a2Smrgfi]) 10888ee3138f1Smrg 10889fe24f8a2Smrg# Test for the ability of xmlto to generate a text target 10890fe24f8a2Smrg# 10891fe24f8a2Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 10892fe24f8a2Smrg# following test for empty XML docbook files. 10893fe24f8a2Smrg# For compatibility reasons use the following empty XML docbook file and if 10894fe24f8a2Smrg# it fails try it again with a non-empty XML file. 10895fe24f8a2Smrghave_xmlto_text=no 10896fe24f8a2Smrgcat > conftest.xml << "EOF" 10897fe24f8a2SmrgEOF 10898fe24f8a2SmrgAS_IF([test "$have_xmlto" = yes], 10899fe24f8a2Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10900fe24f8a2Smrg [have_xmlto_text=yes], 10901fe24f8a2Smrg [# Try it again with a non-empty XML file. 10902fe24f8a2Smrg cat > conftest.xml << "EOF" 10903fe24f8a2Smrg<x></x> 10904fe24f8a2SmrgEOF 10905fe24f8a2Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10906fe24f8a2Smrg [have_xmlto_text=yes], 10907fe24f8a2Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 10908fe24f8a2Smrgrm -f conftest.xml 10909fe24f8a2SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10910fe24f8a2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10911fe24f8a2Smrg]) # XORG_WITH_XMLTO 10912414bd68fSmrg 10913fe24f8a2Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10914fe24f8a2Smrg# -------------------------------------------- 10915fe24f8a2Smrg# Minimum version: 1.12.0 10916fe24f8a2Smrg# Minimum version for optional DEFAULT argument: 1.12.0 10917a1ed278cSmrg# 10918fe24f8a2Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10919fe24f8a2Smrg# XML-based language used for the transformation of XML documents. 10920fe24f8a2Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10921fe24f8a2Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 10922fe24f8a2Smrg# The XSLT processor is often used as a standalone tool for transformations. 10923fe24f8a2Smrg# It should not be assumed that this tool is used only to work with documnetation. 10924fe24f8a2Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10925a1ed278cSmrg# 10926fe24f8a2Smrg# Interface to module: 10927fe24f8a2Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10928fe24f8a2Smrg# XSLTPROC: returns the path of the xsltproc program found 10929fe24f8a2Smrg# returns the path set by the user in the environment 10930fe24f8a2Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10931fe24f8a2Smrg# 'no' user instructs the module not to use xsltproc 10932fe24f8a2Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 10933b425557eSmrg# 10934fe24f8a2Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10935414bd68fSmrg# 10936fe24f8a2SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 10937fe24f8a2SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 10938fe24f8a2Smrg# Preserves the interface, should it be implemented later 10939fe24f8a2Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10940fe24f8a2Smrgm4_define([_defopt], m4_default([$2], [auto])) 10941fe24f8a2SmrgAC_ARG_WITH(xsltproc, 10942fe24f8a2Smrg AS_HELP_STRING([--with-xsltproc], 10943fe24f8a2Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10944fe24f8a2Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10945fe24f8a2Smrgm4_undefine([_defopt]) 10946414bd68fSmrg 10947fe24f8a2Smrgif test "x$use_xsltproc" = x"auto"; then 10948fe24f8a2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10949fe24f8a2Smrg if test "x$XSLTPROC" = "x"; then 10950fe24f8a2Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10951fe24f8a2Smrg have_xsltproc=no 10952fe24f8a2Smrg else 10953fe24f8a2Smrg have_xsltproc=yes 10954fe24f8a2Smrg fi 10955fe24f8a2Smrgelif test "x$use_xsltproc" = x"yes" ; then 10956fe24f8a2Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10957fe24f8a2Smrg if test "x$XSLTPROC" = "x"; then 10958fe24f8a2Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10959fe24f8a2Smrg fi 10960fe24f8a2Smrg have_xsltproc=yes 10961fe24f8a2Smrgelif test "x$use_xsltproc" = x"no" ; then 10962fe24f8a2Smrg if test "x$XSLTPROC" != "x"; then 10963fe24f8a2Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10964fe24f8a2Smrg fi 10965fe24f8a2Smrg have_xsltproc=no 10966fe24f8a2Smrgelse 10967fe24f8a2Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10968414bd68fSmrgfi 10969414bd68fSmrg 10970fe24f8a2SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10971fe24f8a2Smrg]) # XORG_WITH_XSLTPROC 10972fe24f8a2Smrg 10973fe24f8a2Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 10974fe24f8a2Smrg# ---------------------------------------- 10975fe24f8a2Smrg# Minimum version: 1.15.0 10976a1ed278cSmrg# 10977fe24f8a2Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 10978fe24f8a2Smrg# scanning arbitrary text files, extracting information from those text files, 10979fe24f8a2Smrg# and printing reports based on that information. 10980a1ed278cSmrg# 10981fe24f8a2Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 10982a1ed278cSmrg# 10983fe24f8a2Smrg# Interface to module: 10984fe24f8a2Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 10985fe24f8a2Smrg# PERL: returns the path of the perl program found 10986fe24f8a2Smrg# returns the path set by the user in the environment 10987fe24f8a2Smrg# --with-perl: 'yes' user instructs the module to use perl 10988fe24f8a2Smrg# 'no' user instructs the module not to use perl 10989fe24f8a2Smrg# have_perl: returns yes if perl found in PATH or no 10990a1ed278cSmrg# 10991fe24f8a2Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 10992fe24f8a2Smrg# 10993fe24f8a2SmrgAC_DEFUN([XORG_WITH_PERL],[ 10994fe24f8a2SmrgAC_ARG_VAR([PERL], [Path to perl command]) 10995fe24f8a2Smrg# Preserves the interface, should it be implemented later 10996fe24f8a2Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 10997fe24f8a2Smrgm4_define([_defopt], m4_default([$2], [auto])) 10998fe24f8a2SmrgAC_ARG_WITH(perl, 10999fe24f8a2Smrg AS_HELP_STRING([--with-perl], 11000fe24f8a2Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 11001fe24f8a2Smrg [use_perl=$withval], [use_perl=]_defopt) 11002fe24f8a2Smrgm4_undefine([_defopt]) 11003ee3138f1Smrg 11004fe24f8a2Smrgif test "x$use_perl" = x"auto"; then 11005fe24f8a2Smrg AC_PATH_PROG([PERL], [perl]) 11006fe24f8a2Smrg if test "x$PERL" = "x"; then 11007fe24f8a2Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 11008fe24f8a2Smrg have_perl=no 11009fe24f8a2Smrg else 11010fe24f8a2Smrg have_perl=yes 11011fe24f8a2Smrg fi 11012fe24f8a2Smrgelif test "x$use_perl" = x"yes" ; then 11013fe24f8a2Smrg AC_PATH_PROG([PERL], [perl]) 11014fe24f8a2Smrg if test "x$PERL" = "x"; then 11015fe24f8a2Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 11016fe24f8a2Smrg fi 11017fe24f8a2Smrg have_perl=yes 11018fe24f8a2Smrgelif test "x$use_perl" = x"no" ; then 11019fe24f8a2Smrg if test "x$PERL" != "x"; then 11020fe24f8a2Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 11021fe24f8a2Smrg fi 11022fe24f8a2Smrg have_perl=no 11023fe24f8a2Smrgelse 11024fe24f8a2Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 11025fe24f8a2Smrgfi 11026414bd68fSmrg 11027fe24f8a2SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 11028fe24f8a2Smrg]) # XORG_WITH_PERL 11029414bd68fSmrg 11030fe24f8a2Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 11031414bd68fSmrg# ---------------- 11032fe24f8a2Smrg# Minimum version: 1.5.0 11033fe24f8a2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 110343e72ca8cSmrg# 11035fe24f8a2Smrg# Documentation tools are not always available on all platforms and sometimes 11036fe24f8a2Smrg# not at the appropriate level. This macro enables a module to test for the 11037fe24f8a2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 11038fe24f8a2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 11039fe24f8a2Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 11040fe24f8a2Smrg# --with-asciidoc assumes 'auto'. 110413e72ca8cSmrg# 11042fe24f8a2Smrg# Interface to module: 11043fe24f8a2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 11044fe24f8a2Smrg# ASCIIDOC: returns the path of the asciidoc program found 11045fe24f8a2Smrg# returns the path set by the user in the environment 11046fe24f8a2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 11047fe24f8a2Smrg# 'no' user instructs the module not to use asciidoc 110483e72ca8cSmrg# 11049fe24f8a2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 110503e72ca8cSmrg# 11051fe24f8a2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 11052fe24f8a2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 11053fe24f8a2Smrgm4_define([_defopt], m4_default([$2], [auto])) 11054fe24f8a2SmrgAC_ARG_WITH(asciidoc, 11055fe24f8a2Smrg AS_HELP_STRING([--with-asciidoc], 11056fe24f8a2Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 11057fe24f8a2Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 11058fe24f8a2Smrgm4_undefine([_defopt]) 110593e72ca8cSmrg 11060fe24f8a2Smrgif test "x$use_asciidoc" = x"auto"; then 11061fe24f8a2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 11062fe24f8a2Smrg if test "x$ASCIIDOC" = "x"; then 11063fe24f8a2Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 11064fe24f8a2Smrg have_asciidoc=no 11065fe24f8a2Smrg else 11066fe24f8a2Smrg have_asciidoc=yes 11067fe24f8a2Smrg fi 11068fe24f8a2Smrgelif test "x$use_asciidoc" = x"yes" ; then 11069fe24f8a2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 11070fe24f8a2Smrg if test "x$ASCIIDOC" = "x"; then 11071fe24f8a2Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 11072fe24f8a2Smrg fi 11073fe24f8a2Smrg have_asciidoc=yes 11074fe24f8a2Smrgelif test "x$use_asciidoc" = x"no" ; then 11075fe24f8a2Smrg if test "x$ASCIIDOC" != "x"; then 11076fe24f8a2Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 11077fe24f8a2Smrg fi 11078fe24f8a2Smrg have_asciidoc=no 11079fe24f8a2Smrgelse 11080fe24f8a2Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 11081fe24f8a2Smrgfi 11082fe24f8a2Smrgm4_ifval([$1], 11083fe24f8a2Smrg[if test "$have_asciidoc" = yes; then 11084fe24f8a2Smrg # scrape the asciidoc version 11085fe24f8a2Smrg AC_MSG_CHECKING([the asciidoc version]) 11086fe24f8a2Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 11087fe24f8a2Smrg AC_MSG_RESULT([$asciidoc_version]) 11088fe24f8a2Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 11089fe24f8a2Smrg [if test "x$use_asciidoc" = xauto; then 11090fe24f8a2Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 11091fe24f8a2Smrg have_asciidoc=no 11092fe24f8a2Smrg else 11093fe24f8a2Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 11094fe24f8a2Smrg fi]) 11095fe24f8a2Smrgfi]) 11096fe24f8a2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 11097fe24f8a2Smrg]) # XORG_WITH_ASCIIDOC 11098414bd68fSmrg 11099fe24f8a2Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 11100fe24f8a2Smrg# ------------------------------------------- 11101fe24f8a2Smrg# Minimum version: 1.5.0 11102fe24f8a2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 11103fe24f8a2Smrg# Minimum version for optional DOT checking: 1.18.0 111043e72ca8cSmrg# 11105fe24f8a2Smrg# Documentation tools are not always available on all platforms and sometimes 11106fe24f8a2Smrg# not at the appropriate level. This macro enables a module to test for the 11107fe24f8a2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 11108fe24f8a2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 11109fe24f8a2Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 11110fe24f8a2Smrg# --with-doxygen assumes 'auto'. 111113e72ca8cSmrg# 11112fe24f8a2Smrg# Interface to module: 11113fe24f8a2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 11114fe24f8a2Smrg# DOXYGEN: returns the path of the doxygen program found 11115fe24f8a2Smrg# returns the path set by the user in the environment 11116fe24f8a2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 11117fe24f8a2Smrg# 'no' user instructs the module not to use doxygen 111183e72ca8cSmrg# 11119fe24f8a2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 111203e72ca8cSmrg# 11121fe24f8a2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 11122fe24f8a2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 11123fe24f8a2SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 11124fe24f8a2Smrgm4_define([_defopt], m4_default([$2], [auto])) 11125fe24f8a2SmrgAC_ARG_WITH(doxygen, 11126fe24f8a2Smrg AS_HELP_STRING([--with-doxygen], 11127fe24f8a2Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 11128fe24f8a2Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 11129fe24f8a2Smrgm4_undefine([_defopt]) 11130414bd68fSmrg 11131fe24f8a2Smrgif test "x$use_doxygen" = x"auto"; then 11132fe24f8a2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 11133fe24f8a2Smrg if test "x$DOXYGEN" = "x"; then 11134fe24f8a2Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 11135fe24f8a2Smrg have_doxygen=no 11136fe24f8a2Smrg else 11137fe24f8a2Smrg have_doxygen=yes 11138fe24f8a2Smrg fi 11139fe24f8a2Smrgelif test "x$use_doxygen" = x"yes" ; then 11140fe24f8a2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 11141fe24f8a2Smrg if test "x$DOXYGEN" = "x"; then 11142fe24f8a2Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 11143fe24f8a2Smrg fi 11144fe24f8a2Smrg have_doxygen=yes 11145fe24f8a2Smrgelif test "x$use_doxygen" = x"no" ; then 11146fe24f8a2Smrg if test "x$DOXYGEN" != "x"; then 11147fe24f8a2Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 11148fe24f8a2Smrg fi 11149fe24f8a2Smrg have_doxygen=no 11150414bd68fSmrgelse 11151fe24f8a2Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 11152414bd68fSmrgfi 11153fe24f8a2Smrgm4_ifval([$1], 11154fe24f8a2Smrg[if test "$have_doxygen" = yes; then 11155fe24f8a2Smrg # scrape the doxygen version 11156fe24f8a2Smrg AC_MSG_CHECKING([the doxygen version]) 11157fe24f8a2Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 11158fe24f8a2Smrg AC_MSG_RESULT([$doxygen_version]) 11159fe24f8a2Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 11160fe24f8a2Smrg [if test "x$use_doxygen" = xauto; then 11161fe24f8a2Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 11162fe24f8a2Smrg have_doxygen=no 11163fe24f8a2Smrg else 11164fe24f8a2Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 11165fe24f8a2Smrg fi]) 11166fe24f8a2Smrgfi]) 11167414bd68fSmrg 11168fe24f8a2Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 11169fe24f8a2Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 11170fe24f8a2Smrgdnl HAVE_DOT = @HAVE_DOT@ 11171fe24f8a2SmrgHAVE_DOT=no 11172fe24f8a2Smrgif test "x$have_doxygen" = "xyes"; then 11173fe24f8a2Smrg AC_PATH_PROG([DOT], [dot]) 11174fe24f8a2Smrg if test "x$DOT" != "x"; then 11175fe24f8a2Smrg HAVE_DOT=yes 11176fe24f8a2Smrg fi 11177fe24f8a2Smrgfi 11178414bd68fSmrg 11179fe24f8a2SmrgAC_SUBST([HAVE_DOT]) 11180fe24f8a2SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 11181fe24f8a2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 11182fe24f8a2Smrg]) # XORG_WITH_DOXYGEN 11183414bd68fSmrg 11184fe24f8a2Smrg# XORG_WITH_GROFF([DEFAULT]) 11185fe24f8a2Smrg# ---------------- 11186fe24f8a2Smrg# Minimum version: 1.6.0 11187fe24f8a2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 111883e72ca8cSmrg# 11189fe24f8a2Smrg# Documentation tools are not always available on all platforms and sometimes 11190fe24f8a2Smrg# not at the appropriate level. This macro enables a module to test for the 11191fe24f8a2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 11192fe24f8a2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 11193fe24f8a2Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 11194fe24f8a2Smrg# --with-groff assumes 'auto'. 11195fe24f8a2Smrg# 11196fe24f8a2Smrg# Interface to module: 11197fe24f8a2Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 11198fe24f8a2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 11199fe24f8a2Smrg# HAVE_GROFF_MS: the -ms macros package 11200fe24f8a2Smrg# GROFF: returns the path of the groff program found 11201fe24f8a2Smrg# returns the path set by the user in the environment 11202fe24f8a2Smrg# --with-groff: 'yes' user instructs the module to use groff 11203fe24f8a2Smrg# 'no' user instructs the module not to use groff 11204fe24f8a2Smrg# 11205fe24f8a2Smrg# Added in version 1.9.0: 11206fe24f8a2Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 11207fe24f8a2Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 11208fe24f8a2Smrg# psselect from the psutils package. 11209fe24f8a2Smrg# the ghostcript package. Refer to the grohtml man pages 11210fe24f8a2Smrg# 11211fe24f8a2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 11212fe24f8a2Smrg# 11213fe24f8a2Smrg# OS and distros often splits groff in a basic and full package, the former 11214fe24f8a2Smrg# having the groff program and the later having devices, fonts and macros 11215fe24f8a2Smrg# Checking for the groff executable is not enough. 11216fe24f8a2Smrg# 11217fe24f8a2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 11218fe24f8a2Smrg# unset HAVE_GROFF or GROFF env variables. 11219fe24f8a2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 11220fe24f8a2Smrg# 11221fe24f8a2SmrgAC_DEFUN([XORG_WITH_GROFF],[ 11222fe24f8a2SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 11223fe24f8a2Smrgm4_define([_defopt], m4_default([$1], [auto])) 11224fe24f8a2SmrgAC_ARG_WITH(groff, 11225fe24f8a2Smrg AS_HELP_STRING([--with-groff], 11226fe24f8a2Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 11227fe24f8a2Smrg [use_groff=$withval], [use_groff=]_defopt) 11228fe24f8a2Smrgm4_undefine([_defopt]) 11229414bd68fSmrg 11230fe24f8a2Smrgif test "x$use_groff" = x"auto"; then 11231fe24f8a2Smrg AC_PATH_PROG([GROFF], [groff]) 11232fe24f8a2Smrg if test "x$GROFF" = "x"; then 11233fe24f8a2Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 11234fe24f8a2Smrg have_groff=no 11235fe24f8a2Smrg else 11236fe24f8a2Smrg have_groff=yes 11237fe24f8a2Smrg fi 11238fe24f8a2Smrgelif test "x$use_groff" = x"yes" ; then 11239fe24f8a2Smrg AC_PATH_PROG([GROFF], [groff]) 11240fe24f8a2Smrg if test "x$GROFF" = "x"; then 11241fe24f8a2Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 11242fe24f8a2Smrg fi 11243fe24f8a2Smrg have_groff=yes 11244fe24f8a2Smrgelif test "x$use_groff" = x"no" ; then 11245fe24f8a2Smrg if test "x$GROFF" != "x"; then 11246fe24f8a2Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 11247fe24f8a2Smrg fi 11248fe24f8a2Smrg have_groff=no 11249fe24f8a2Smrgelse 11250fe24f8a2Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 11251fe24f8a2Smrgfi 11252414bd68fSmrg 11253fe24f8a2Smrg# We have groff, test for the presence of the macro packages 11254fe24f8a2Smrgif test "x$have_groff" = x"yes"; then 11255fe24f8a2Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 11256fe24f8a2Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 11257fe24f8a2Smrg groff_ms_works=yes 11258fe24f8a2Smrg else 11259fe24f8a2Smrg groff_ms_works=no 11260414bd68fSmrg fi 11261fe24f8a2Smrg AC_MSG_RESULT([$groff_ms_works]) 11262fe24f8a2Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 11263fe24f8a2Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 11264fe24f8a2Smrg groff_mm_works=yes 11265fe24f8a2Smrg else 11266fe24f8a2Smrg groff_mm_works=no 11267fe24f8a2Smrg fi 11268fe24f8a2Smrg AC_MSG_RESULT([$groff_mm_works]) 112693e72ca8cSmrgfi 112703e72ca8cSmrg 11271fe24f8a2Smrg# We have groff, test for HTML dependencies, one command per package 11272fe24f8a2Smrgif test "x$have_groff" = x"yes"; then 11273fe24f8a2Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 11274fe24f8a2Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 11275fe24f8a2Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 11276fe24f8a2Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 11277fe24f8a2Smrg have_groff_html=yes 11278fe24f8a2Smrg else 11279fe24f8a2Smrg have_groff_html=no 11280fe24f8a2Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 11281fe24f8a2Smrg fi 11282fe24f8a2Smrgfi 11283414bd68fSmrg 11284fe24f8a2Smrg# Set Automake conditionals for Makefiles 11285fe24f8a2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 11286fe24f8a2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 11287fe24f8a2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 11288fe24f8a2SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 11289fe24f8a2Smrg]) # XORG_WITH_GROFF 11290414bd68fSmrg 11291fe24f8a2Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 11292fe24f8a2Smrg# --------------------------------------- 11293fe24f8a2Smrg# Minimum version: 1.6.0 11294fe24f8a2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 11295fe24f8a2Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 11296fe24f8a2Smrg# 11297fe24f8a2Smrg# Documentation tools are not always available on all platforms and sometimes 11298fe24f8a2Smrg# not at the appropriate level. This macro enables a module to test for the 11299fe24f8a2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 11300fe24f8a2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 11301fe24f8a2Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 11302fe24f8a2Smrg# --with-fop assumes 'auto'. 11303fe24f8a2Smrg# 11304fe24f8a2Smrg# Interface to module: 11305fe24f8a2Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 11306fe24f8a2Smrg# FOP: returns the path of the fop program found 11307fe24f8a2Smrg# returns the path set by the user in the environment 11308fe24f8a2Smrg# --with-fop: 'yes' user instructs the module to use fop 11309fe24f8a2Smrg# 'no' user instructs the module not to use fop 11310fe24f8a2Smrg# 11311fe24f8a2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 11312fe24f8a2Smrg# 11313fe24f8a2SmrgAC_DEFUN([XORG_WITH_FOP],[ 11314fe24f8a2SmrgAC_ARG_VAR([FOP], [Path to fop command]) 11315fe24f8a2Smrgm4_define([_defopt], m4_default([$2], [auto])) 11316fe24f8a2SmrgAC_ARG_WITH(fop, 11317fe24f8a2Smrg AS_HELP_STRING([--with-fop], 11318fe24f8a2Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 11319fe24f8a2Smrg [use_fop=$withval], [use_fop=]_defopt) 11320fe24f8a2Smrgm4_undefine([_defopt]) 11321414bd68fSmrg 11322fe24f8a2Smrgif test "x$use_fop" = x"auto"; then 11323fe24f8a2Smrg AC_PATH_PROG([FOP], [fop]) 11324fe24f8a2Smrg if test "x$FOP" = "x"; then 11325fe24f8a2Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 11326fe24f8a2Smrg have_fop=no 11327fe24f8a2Smrg else 11328fe24f8a2Smrg have_fop=yes 11329fe24f8a2Smrg fi 11330fe24f8a2Smrgelif test "x$use_fop" = x"yes" ; then 11331fe24f8a2Smrg AC_PATH_PROG([FOP], [fop]) 11332fe24f8a2Smrg if test "x$FOP" = "x"; then 11333fe24f8a2Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 11334fe24f8a2Smrg fi 11335fe24f8a2Smrg have_fop=yes 11336fe24f8a2Smrgelif test "x$use_fop" = x"no" ; then 11337fe24f8a2Smrg if test "x$FOP" != "x"; then 11338fe24f8a2Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 11339fe24f8a2Smrg fi 11340fe24f8a2Smrg have_fop=no 11341fe24f8a2Smrgelse 11342fe24f8a2Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 113433e72ca8cSmrgfi 113443e72ca8cSmrg 11345fe24f8a2Smrg# Test for a minimum version of fop, if provided. 11346fe24f8a2Smrgm4_ifval([$1], 11347fe24f8a2Smrg[if test "$have_fop" = yes; then 11348fe24f8a2Smrg # scrape the fop version 11349fe24f8a2Smrg AC_MSG_CHECKING([for fop minimum version]) 11350fe24f8a2Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 11351fe24f8a2Smrg AC_MSG_RESULT([$fop_version]) 11352fe24f8a2Smrg AS_VERSION_COMPARE([$fop_version], [$1], 11353fe24f8a2Smrg [if test "x$use_fop" = xauto; then 11354fe24f8a2Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 11355fe24f8a2Smrg have_fop=no 11356fe24f8a2Smrg else 11357fe24f8a2Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 11358fe24f8a2Smrg fi]) 11359fe24f8a2Smrgfi]) 11360fe24f8a2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 11361fe24f8a2Smrg]) # XORG_WITH_FOP 113623e72ca8cSmrg 11363fe24f8a2Smrg# XORG_WITH_M4([MIN-VERSION]) 11364fe24f8a2Smrg# --------------------------- 11365fe24f8a2Smrg# Minimum version: 1.19.0 113663e72ca8cSmrg# 11367fe24f8a2Smrg# This macro attempts to locate an m4 macro processor which supports 11368fe24f8a2Smrg# -I option and is only useful for modules relying on M4 in order to 11369fe24f8a2Smrg# expand macros in source code files. 11370fe24f8a2Smrg# 11371fe24f8a2Smrg# Interface to module: 11372fe24f8a2Smrg# M4: returns the path of the m4 program found 11373fe24f8a2Smrg# returns the path set by the user in the environment 11374fe24f8a2Smrg# 11375fe24f8a2SmrgAC_DEFUN([XORG_WITH_M4], [ 11376fe24f8a2SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 11377fe24f8a2Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 11378fe24f8a2Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 11379fe24f8a2Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 11380fe24f8a2Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 11381fe24f8a2Smrg [$PATH:/usr/gnu/bin])]) 113823e72ca8cSmrg 11383fe24f8a2SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 11384fe24f8a2Smrg]) # XORG_WITH_M4 113853e72ca8cSmrg 11386fe24f8a2Smrg# XORG_WITH_PS2PDF([DEFAULT]) 11387fe24f8a2Smrg# ---------------- 11388fe24f8a2Smrg# Minimum version: 1.6.0 11389fe24f8a2Smrg# Minimum version for optional DEFAULT argument: 1.11.0 11390fe24f8a2Smrg# 11391fe24f8a2Smrg# Documentation tools are not always available on all platforms and sometimes 11392fe24f8a2Smrg# not at the appropriate level. This macro enables a module to test for the 11393fe24f8a2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 11394fe24f8a2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 11395fe24f8a2Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 11396fe24f8a2Smrg# --with-ps2pdf assumes 'auto'. 11397fe24f8a2Smrg# 11398fe24f8a2Smrg# Interface to module: 11399fe24f8a2Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 11400fe24f8a2Smrg# PS2PDF: returns the path of the ps2pdf program found 11401fe24f8a2Smrg# returns the path set by the user in the environment 11402fe24f8a2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 11403fe24f8a2Smrg# 'no' user instructs the module not to use ps2pdf 11404fe24f8a2Smrg# 11405fe24f8a2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 11406fe24f8a2Smrg# 11407fe24f8a2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 11408fe24f8a2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 11409fe24f8a2Smrgm4_define([_defopt], m4_default([$1], [auto])) 11410fe24f8a2SmrgAC_ARG_WITH(ps2pdf, 11411fe24f8a2Smrg AS_HELP_STRING([--with-ps2pdf], 11412fe24f8a2Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 11413fe24f8a2Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 11414fe24f8a2Smrgm4_undefine([_defopt]) 11415fe24f8a2Smrg 11416fe24f8a2Smrgif test "x$use_ps2pdf" = x"auto"; then 11417fe24f8a2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 11418fe24f8a2Smrg if test "x$PS2PDF" = "x"; then 11419fe24f8a2Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 11420fe24f8a2Smrg have_ps2pdf=no 11421fe24f8a2Smrg else 11422fe24f8a2Smrg have_ps2pdf=yes 11423fe24f8a2Smrg fi 11424fe24f8a2Smrgelif test "x$use_ps2pdf" = x"yes" ; then 11425fe24f8a2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 11426fe24f8a2Smrg if test "x$PS2PDF" = "x"; then 11427fe24f8a2Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 11428fe24f8a2Smrg fi 11429fe24f8a2Smrg have_ps2pdf=yes 11430fe24f8a2Smrgelif test "x$use_ps2pdf" = x"no" ; then 11431fe24f8a2Smrg if test "x$PS2PDF" != "x"; then 11432fe24f8a2Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 11433fe24f8a2Smrg fi 11434fe24f8a2Smrg have_ps2pdf=no 11435fe24f8a2Smrgelse 11436fe24f8a2Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 11437fe24f8a2Smrgfi 11438fe24f8a2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 11439fe24f8a2Smrg]) # XORG_WITH_PS2PDF 11440414bd68fSmrg 11441fe24f8a2Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 11442fe24f8a2Smrg# ---------------- 11443fe24f8a2Smrg# Minimum version: 1.6.0 11444fe24f8a2Smrg# 11445fe24f8a2Smrg# Documentation tools are not always available on all platforms and sometimes 11446fe24f8a2Smrg# not at the appropriate level. This macro enables a builder to skip all 11447fe24f8a2Smrg# documentation targets except traditional man pages. 11448fe24f8a2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 11449fe24f8a2Smrg# maximum flexibilty in controlling documentation building. 11450fe24f8a2Smrg# Refer to: 11451fe24f8a2Smrg# XORG_WITH_XMLTO --with-xmlto 11452fe24f8a2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 11453fe24f8a2Smrg# XORG_WITH_DOXYGEN --with-doxygen 11454fe24f8a2Smrg# XORG_WITH_FOP --with-fop 11455fe24f8a2Smrg# XORG_WITH_GROFF --with-groff 11456fe24f8a2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 11457fe24f8a2Smrg# 11458fe24f8a2Smrg# Interface to module: 11459fe24f8a2Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 11460fe24f8a2Smrg# --enable-docs: 'yes' user instructs the module to generate docs 11461fe24f8a2Smrg# 'no' user instructs the module not to generate docs 11462fe24f8a2Smrg# parm1: specify the default value, yes or no. 11463fe24f8a2Smrg# 11464fe24f8a2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 11465fe24f8a2Smrgm4_define([docs_default], m4_default([$1], [yes])) 11466fe24f8a2SmrgAC_ARG_ENABLE(docs, 11467fe24f8a2Smrg AS_HELP_STRING([--enable-docs], 11468fe24f8a2Smrg [Enable building the documentation (default: ]docs_default[)]), 11469fe24f8a2Smrg [build_docs=$enableval], [build_docs=]docs_default) 11470fe24f8a2Smrgm4_undefine([docs_default]) 11471fe24f8a2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 11472fe24f8a2SmrgAC_MSG_CHECKING([whether to build documentation]) 11473fe24f8a2SmrgAC_MSG_RESULT([$build_docs]) 11474fe24f8a2Smrg]) # XORG_ENABLE_DOCS 11475414bd68fSmrg 11476fe24f8a2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 11477fe24f8a2Smrg# ---------------- 11478fe24f8a2Smrg# Minimum version: 1.6.0 114793e72ca8cSmrg# 11480fe24f8a2Smrg# This macro enables a builder to skip all developer documentation. 11481fe24f8a2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 11482fe24f8a2Smrg# maximum flexibilty in controlling documentation building. 11483fe24f8a2Smrg# Refer to: 11484fe24f8a2Smrg# XORG_WITH_XMLTO --with-xmlto 11485fe24f8a2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 11486fe24f8a2Smrg# XORG_WITH_DOXYGEN --with-doxygen 11487fe24f8a2Smrg# XORG_WITH_FOP --with-fop 11488fe24f8a2Smrg# XORG_WITH_GROFF --with-groff 11489fe24f8a2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 11490fe24f8a2Smrg# 11491fe24f8a2Smrg# Interface to module: 11492fe24f8a2Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 11493fe24f8a2Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 11494fe24f8a2Smrg# 'no' user instructs the module not to generate developer docs 11495fe24f8a2Smrg# parm1: specify the default value, yes or no. 11496fe24f8a2Smrg# 11497fe24f8a2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 11498fe24f8a2Smrgm4_define([devel_default], m4_default([$1], [yes])) 11499fe24f8a2SmrgAC_ARG_ENABLE(devel-docs, 11500fe24f8a2Smrg AS_HELP_STRING([--enable-devel-docs], 11501fe24f8a2Smrg [Enable building the developer documentation (default: ]devel_default[)]), 11502fe24f8a2Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 11503fe24f8a2Smrgm4_undefine([devel_default]) 11504fe24f8a2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 11505fe24f8a2SmrgAC_MSG_CHECKING([whether to build developer documentation]) 11506fe24f8a2SmrgAC_MSG_RESULT([$build_devel_docs]) 11507fe24f8a2Smrg]) # XORG_ENABLE_DEVEL_DOCS 11508414bd68fSmrg 11509fe24f8a2Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 11510fe24f8a2Smrg# ---------------- 11511fe24f8a2Smrg# Minimum version: 1.6.0 11512fe24f8a2Smrg# 11513fe24f8a2Smrg# This macro enables a builder to skip all functional specification targets. 11514fe24f8a2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 11515fe24f8a2Smrg# maximum flexibilty in controlling documentation building. 11516fe24f8a2Smrg# Refer to: 11517fe24f8a2Smrg# XORG_WITH_XMLTO --with-xmlto 11518fe24f8a2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 11519fe24f8a2Smrg# XORG_WITH_DOXYGEN --with-doxygen 11520fe24f8a2Smrg# XORG_WITH_FOP --with-fop 11521fe24f8a2Smrg# XORG_WITH_GROFF --with-groff 11522fe24f8a2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 11523fe24f8a2Smrg# 11524fe24f8a2Smrg# Interface to module: 11525fe24f8a2Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 11526fe24f8a2Smrg# --enable-specs: 'yes' user instructs the module to generate specs 11527fe24f8a2Smrg# 'no' user instructs the module not to generate specs 11528fe24f8a2Smrg# parm1: specify the default value, yes or no. 11529fe24f8a2Smrg# 11530fe24f8a2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 11531fe24f8a2Smrgm4_define([spec_default], m4_default([$1], [yes])) 11532fe24f8a2SmrgAC_ARG_ENABLE(specs, 11533fe24f8a2Smrg AS_HELP_STRING([--enable-specs], 11534fe24f8a2Smrg [Enable building the specs (default: ]spec_default[)]), 11535fe24f8a2Smrg [build_specs=$enableval], [build_specs=]spec_default) 11536fe24f8a2Smrgm4_undefine([spec_default]) 11537fe24f8a2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 11538fe24f8a2SmrgAC_MSG_CHECKING([whether to build functional specifications]) 11539fe24f8a2SmrgAC_MSG_RESULT([$build_specs]) 11540fe24f8a2Smrg]) # XORG_ENABLE_SPECS 11541414bd68fSmrg 11542fe24f8a2Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 11543fe24f8a2Smrg# ---------------------------------------------- 11544fe24f8a2Smrg# Minimum version: 1.13.0 115453e72ca8cSmrg# 11546fe24f8a2Smrg# This macro enables a builder to enable/disable unit testing 11547fe24f8a2Smrg# It makes no assumption about the test cases implementation 11548fe24f8a2Smrg# Test cases may or may not use Automake "Support for test suites" 11549fe24f8a2Smrg# They may or may not use the software utility library GLib 11550fe24f8a2Smrg# 11551fe24f8a2Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 11552fe24f8a2Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 11553fe24f8a2Smrg# The variable enable_unit_tests is used by other macros in this file. 11554fe24f8a2Smrg# 11555fe24f8a2Smrg# Interface to module: 11556fe24f8a2Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 11557fe24f8a2Smrg# enable_unit_tests: used in configure.ac for additional configuration 11558fe24f8a2Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 11559fe24f8a2Smrg# 'no' user instructs the module not to build tests 11560fe24f8a2Smrg# parm1: specify the default value, yes or no. 11561fe24f8a2Smrg# 11562fe24f8a2SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 11563fe24f8a2SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 11564fe24f8a2SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 11565fe24f8a2SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 11566fe24f8a2Smrgm4_define([_defopt], m4_default([$1], [auto])) 11567fe24f8a2SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 11568fe24f8a2Smrg [Enable building unit test cases (default: ]_defopt[)]), 11569fe24f8a2Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 11570fe24f8a2Smrgm4_undefine([_defopt]) 11571fe24f8a2SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 11572fe24f8a2SmrgAC_MSG_CHECKING([whether to build unit test cases]) 11573fe24f8a2SmrgAC_MSG_RESULT([$enable_unit_tests]) 11574fe24f8a2Smrg]) # XORG_ENABLE_UNIT_TESTS 115753e72ca8cSmrg 11576fe24f8a2Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 11577fe24f8a2Smrg# ------------------------------------------------------ 11578fe24f8a2Smrg# Minimum version: 1.17.0 11579fe24f8a2Smrg# 11580fe24f8a2Smrg# This macro enables a builder to enable/disable integration testing 11581fe24f8a2Smrg# It makes no assumption about the test cases' implementation 11582fe24f8a2Smrg# Test cases may or may not use Automake "Support for test suites" 11583fe24f8a2Smrg# 11584fe24f8a2Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 11585fe24f8a2Smrg# usually requires less dependencies and may be built and run under less 11586fe24f8a2Smrg# stringent environments than integration tests. 11587fe24f8a2Smrg# 11588fe24f8a2Smrg# Interface to module: 11589fe24f8a2Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 11590fe24f8a2Smrg# enable_integration_tests: used in configure.ac for additional configuration 11591fe24f8a2Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 11592fe24f8a2Smrg# 'no' user instructs the module not to build tests 11593fe24f8a2Smrg# parm1: specify the default value, yes or no. 11594fe24f8a2Smrg# 11595fe24f8a2SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 11596fe24f8a2SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 11597fe24f8a2Smrgm4_define([_defopt], m4_default([$1], [auto])) 11598fe24f8a2SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 11599fe24f8a2Smrg [Enable building integration test cases (default: ]_defopt[)]), 11600fe24f8a2Smrg [enable_integration_tests=$enableval], 11601fe24f8a2Smrg [enable_integration_tests=]_defopt) 11602fe24f8a2Smrgm4_undefine([_defopt]) 11603fe24f8a2SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 11604fe24f8a2Smrg [test "x$enable_integration_tests" != xno]) 11605fe24f8a2SmrgAC_MSG_CHECKING([whether to build unit test cases]) 11606fe24f8a2SmrgAC_MSG_RESULT([$enable_integration_tests]) 11607fe24f8a2Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 116083e72ca8cSmrg 11609fe24f8a2Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 11610fe24f8a2Smrg# ---------------------------------------- 11611fe24f8a2Smrg# Minimum version: 1.13.0 11612fe24f8a2Smrg# 11613fe24f8a2Smrg# GLib is a library which provides advanced data structures and functions. 11614fe24f8a2Smrg# This macro enables a module to test for the presence of Glib. 11615fe24f8a2Smrg# 11616fe24f8a2Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 11617fe24f8a2Smrg# Otherwise the value of $enable_unit_tests is blank. 11618fe24f8a2Smrg# 11619fe24f8a2Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 11620fe24f8a2Smrg# test support usually requires less dependencies and may be built and run under 11621fe24f8a2Smrg# less stringent environments than integration tests. 11622fe24f8a2Smrg# 11623fe24f8a2Smrg# Interface to module: 11624fe24f8a2Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 11625fe24f8a2Smrg# with_glib: used in configure.ac to know if GLib has been found 11626fe24f8a2Smrg# --with-glib: 'yes' user instructs the module to use glib 11627fe24f8a2Smrg# 'no' user instructs the module not to use glib 11628fe24f8a2Smrg# 11629fe24f8a2SmrgAC_DEFUN([XORG_WITH_GLIB],[ 11630fe24f8a2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11631fe24f8a2Smrgm4_define([_defopt], m4_default([$2], [auto])) 11632fe24f8a2SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 11633fe24f8a2Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 11634fe24f8a2Smrg [with_glib=$withval], [with_glib=]_defopt) 11635fe24f8a2Smrgm4_undefine([_defopt]) 116363e72ca8cSmrg 11637fe24f8a2Smrghave_glib=no 11638fe24f8a2Smrg# Do not probe GLib if user explicitly disabled unit testing 11639fe24f8a2Smrgif test "x$enable_unit_tests" != x"no"; then 11640fe24f8a2Smrg # Do not probe GLib if user explicitly disabled it 11641fe24f8a2Smrg if test "x$with_glib" != x"no"; then 11642fe24f8a2Smrg m4_ifval( 11643fe24f8a2Smrg [$1], 11644fe24f8a2Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 11645fe24f8a2Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 11646fe24f8a2Smrg ) 11647414bd68fSmrg fi 11648414bd68fSmrgfi 11649414bd68fSmrg 11650fe24f8a2Smrg# Not having GLib when unit testing has been explicitly requested is an error 11651fe24f8a2Smrgif test "x$enable_unit_tests" = x"yes"; then 11652fe24f8a2Smrg if test "x$have_glib" = x"no"; then 11653fe24f8a2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11654414bd68fSmrg fi 116553e72ca8cSmrgfi 11656ee3138f1Smrg 11657fe24f8a2Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 11658fe24f8a2Smrgif test "x$enable_unit_tests" = x"no"; then 11659fe24f8a2Smrg if test "x$with_glib" = x"yes"; then 11660fe24f8a2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 11661fe24f8a2Smrg fi 11662fe24f8a2Smrgfi 11663ee3138f1Smrg 11664fe24f8a2Smrg# Not having GLib when it has been explicitly requested is an error 11665fe24f8a2Smrgif test "x$with_glib" = x"yes"; then 11666fe24f8a2Smrg if test "x$have_glib" = x"no"; then 11667fe24f8a2Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 11668414bd68fSmrg fi 11669a1ed278cSmrgfi 11670ee3138f1Smrg 11671fe24f8a2SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 11672fe24f8a2Smrg]) # XORG_WITH_GLIB 11673ee3138f1Smrg 11674fe24f8a2Smrg# XORG_LD_WRAP([required|optional]) 11675fe24f8a2Smrg# --------------------------------- 11676fe24f8a2Smrg# Minimum version: 1.13.0 11677fe24f8a2Smrg# 11678fe24f8a2Smrg# Check if linker supports -wrap, passed via compiler flags 11679fe24f8a2Smrg# 11680fe24f8a2Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 11681fe24f8a2Smrg# Otherwise the value of $enable_unit_tests is blank. 11682fe24f8a2Smrg# 11683fe24f8a2Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 11684fe24f8a2Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 11685fe24f8a2Smrg# available, an argument of "optional" allows use when some unit tests require 11686fe24f8a2Smrg# ld -wrap and others do not. 11687fe24f8a2Smrg# 11688fe24f8a2SmrgAC_DEFUN([XORG_LD_WRAP],[ 11689fe24f8a2SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 11690fe24f8a2Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 11691fe24f8a2Smrg void __wrap_exit(int status) { return; }], 11692fe24f8a2Smrg [exit(0);])]) 11693fe24f8a2Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 11694fe24f8a2Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 11695fe24f8a2Smrg if test "x$have_ld_wrap" = x"no"; then 11696fe24f8a2Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 11697fe24f8a2Smrg fi 11698fe24f8a2Smrgfi 11699fe24f8a2SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 11700fe24f8a2Smrg# 11701fe24f8a2Smrg]) # XORG_LD_WRAP 11702ee3138f1Smrg 11703fe24f8a2Smrg# XORG_CHECK_LINKER_FLAGS 11704fe24f8a2Smrg# ----------------------- 11705fe24f8a2Smrg# SYNOPSIS 11706fe24f8a2Smrg# 11707fe24f8a2Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 11708fe24f8a2Smrg# 11709fe24f8a2Smrg# DESCRIPTION 11710fe24f8a2Smrg# 11711fe24f8a2Smrg# Check whether the given linker FLAGS work with the current language's 11712fe24f8a2Smrg# linker, or whether they give an error. 11713fe24f8a2Smrg# 11714fe24f8a2Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 11715fe24f8a2Smrg# success/failure. 11716fe24f8a2Smrg# 11717fe24f8a2Smrg# PROGRAM-SOURCE is the program source to link with, if needed 11718fe24f8a2Smrg# 11719fe24f8a2Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 11720fe24f8a2Smrg# 11721fe24f8a2Smrg# LICENSE 11722fe24f8a2Smrg# 11723fe24f8a2Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 11724fe24f8a2Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 11725fe24f8a2Smrg# Copyright (c) 2009 Matteo Frigo 11726fe24f8a2Smrg# 11727fe24f8a2Smrg# This program is free software: you can redistribute it and/or modify it 11728fe24f8a2Smrg# under the terms of the GNU General Public License as published by the 11729fe24f8a2Smrg# Free Software Foundation, either version 3 of the License, or (at your 11730fe24f8a2Smrg# option) any later version. 11731fe24f8a2Smrg# 11732fe24f8a2Smrg# This program is distributed in the hope that it will be useful, but 11733fe24f8a2Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 11734fe24f8a2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 11735fe24f8a2Smrg# Public License for more details. 11736fe24f8a2Smrg# 11737fe24f8a2Smrg# You should have received a copy of the GNU General Public License along 11738fe24f8a2Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 11739fe24f8a2Smrg# 11740fe24f8a2Smrg# As a special exception, the respective Autoconf Macro's copyright owner 11741fe24f8a2Smrg# gives unlimited permission to copy, distribute and modify the configure 11742fe24f8a2Smrg# scripts that are the output of Autoconf when processing the Macro. You 11743fe24f8a2Smrg# need not follow the terms of the GNU General Public License when using 11744fe24f8a2Smrg# or distributing such scripts, even though portions of the text of the 11745fe24f8a2Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 11746fe24f8a2Smrg# all other use of the material that constitutes the Autoconf Macro. 11747fe24f8a2Smrg# 11748fe24f8a2Smrg# This special exception to the GPL applies to versions of the Autoconf 11749fe24f8a2Smrg# Macro released by the Autoconf Archive. When you make and distribute a 11750fe24f8a2Smrg# modified version of the Autoconf Macro, you may extend this special 11751fe24f8a2Smrg# exception to the GPL to apply to your modified version as well.# 11752fe24f8a2SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11753fe24f8a2Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 11754fe24f8a2Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11755fe24f8a2SmrgAS_LITERAL_IF([$1], 11756fe24f8a2Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11757fe24f8a2Smrg ax_save_FLAGS=$LDFLAGS 11758fe24f8a2Smrg LDFLAGS="$1" 11759fe24f8a2Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11760fe24f8a2Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11761fe24f8a2Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11762fe24f8a2Smrg LDFLAGS=$ax_save_FLAGS])], 11763fe24f8a2Smrg [ax_save_FLAGS=$LDFLAGS 11764fe24f8a2Smrg LDFLAGS="$1" 11765fe24f8a2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11766fe24f8a2Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11767fe24f8a2Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11768fe24f8a2Smrg LDFLAGS=$ax_save_FLAGS]) 11769fe24f8a2Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11770fe24f8a2SmrgAC_MSG_RESULT($xorg_check_linker_flags) 11771fe24f8a2Smrgif test "x$xorg_check_linker_flags" = xyes; then 11772fe24f8a2Smrg m4_default([$2], :) 11773fe24f8a2Smrgelse 11774fe24f8a2Smrg m4_default([$3], :) 11775fe24f8a2Smrgfi 11776fe24f8a2Smrg]) # XORG_CHECK_LINKER_FLAGS 11777ee3138f1Smrg 11778fe24f8a2Smrg# XORG_MEMORY_CHECK_FLAGS 11779fe24f8a2Smrg# ----------------------- 11780fe24f8a2Smrg# Minimum version: 1.16.0 1178134977a2fSmrg# 11782fe24f8a2Smrg# This macro attempts to find appropriate memory checking functionality 11783fe24f8a2Smrg# for various platforms which unit testing code may use to catch various 11784fe24f8a2Smrg# forms of memory allocation and access errors in testing. 11785fe24f8a2Smrg# 11786fe24f8a2Smrg# Interface to module: 11787fe24f8a2Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 11788fe24f8a2Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 11789fe24f8a2Smrg# 11790fe24f8a2Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 11791fe24f8a2Smrg# 11792fe24f8a2SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11793ee3138f1Smrg 11794fe24f8a2SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 11795fe24f8a2SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 11796fe24f8a2Smrg [Environment variables to enable memory checking in tests]) 1179734977a2fSmrg 11798fe24f8a2Smrg# Check for different types of support on different platforms 11799fe24f8a2Smrgcase $host_os in 11800fe24f8a2Smrg solaris*) 11801fe24f8a2Smrg AC_CHECK_LIB([umem], [umem_alloc], 11802fe24f8a2Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 11803fe24f8a2Smrg ;; 11804fe24f8a2Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 11805fe24f8a2Smrg # both directly and inverted, so should not be 0 or 255. 11806fe24f8a2Smrg malloc_debug_env='MALLOC_PERTURB_=15' 11807fe24f8a2Smrg ;; 11808fe24f8a2Smrg darwin*) 11809fe24f8a2Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 11810fe24f8a2Smrg ;; 11811fe24f8a2Smrg *bsd*) 11812fe24f8a2Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 11813fe24f8a2Smrg ;; 11814fe24f8a2Smrgesac 11815414bd68fSmrg 11816fe24f8a2Smrg# User supplied flags override default flags 11817fe24f8a2Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 11818fe24f8a2Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 11819a1ed278cSmrgfi 11820ee3138f1Smrg 11821fe24f8a2SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 11822fe24f8a2Smrg]) # XORG_WITH_LINT 11823b425557eSmrg 11824fe24f8a2Smrg# XORG_CHECK_MALLOC_ZERO 11825fe24f8a2Smrg# ---------------------- 11826fe24f8a2Smrg# Minimum version: 1.0.0 118273e72ca8cSmrg# 11828fe24f8a2Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 11829fe24f8a2Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 11830fe24f8a2Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 11831fe24f8a2SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 11832fe24f8a2SmrgAC_ARG_ENABLE(malloc0returnsnull, 11833fe24f8a2Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 11834fe24f8a2Smrg [malloc(0) returns NULL (default: auto)]), 11835fe24f8a2Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 11836fe24f8a2Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 118373e72ca8cSmrg 11838fe24f8a2SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 11839fe24f8a2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11840fe24f8a2SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 11841fe24f8a2Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11842fe24f8a2Smrg#include <stdlib.h> 11843fe24f8a2Smrg],[ 11844fe24f8a2Smrg char *m0, *r0, *c0, *p; 11845fe24f8a2Smrg m0 = malloc(0); 11846fe24f8a2Smrg p = malloc(10); 11847fe24f8a2Smrg r0 = realloc(p,0); 11848fe24f8a2Smrg c0 = calloc(0,10); 11849fe24f8a2Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11850fe24f8a2Smrg])], 11851fe24f8a2Smrg [xorg_cv_malloc0_returns_null=yes], 11852fe24f8a2Smrg [xorg_cv_malloc0_returns_null=no])]) 11853fe24f8a2SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 11854414bd68fSmrgfi 11855fe24f8a2SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 118563e72ca8cSmrg 11857fe24f8a2Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 11858fe24f8a2Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 11859fe24f8a2Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 11860fe24f8a2Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 11861fe24f8a2Smrgelse 11862fe24f8a2Smrg MALLOC_ZERO_CFLAGS="" 11863fe24f8a2Smrg XMALLOC_ZERO_CFLAGS="" 11864fe24f8a2Smrg XTMALLOC_ZERO_CFLAGS="" 11865fe24f8a2Smrgfi 118663e72ca8cSmrg 11867fe24f8a2SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 11868fe24f8a2SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 11869fe24f8a2SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 11870fe24f8a2Smrg]) # XORG_CHECK_MALLOC_ZERO 11871fe24f8a2Smrg 11872fe24f8a2Smrg# XORG_WITH_LINT() 11873fe24f8a2Smrg# ---------------- 11874fe24f8a2Smrg# Minimum version: 1.1.0 11875414bd68fSmrg# 11876fe24f8a2Smrg# This macro enables the use of a tool that flags some suspicious and 11877fe24f8a2Smrg# non-portable constructs (likely to be bugs) in C language source code. 11878fe24f8a2Smrg# It will attempt to locate the tool and use appropriate options. 11879fe24f8a2Smrg# There are various lint type tools on different platforms. 11880fe24f8a2Smrg# 11881fe24f8a2Smrg# Interface to module: 11882fe24f8a2Smrg# LINT: returns the path to the tool found on the platform 11883fe24f8a2Smrg# or the value set to LINT on the configure cmd line 11884fe24f8a2Smrg# also an Automake conditional 11885fe24f8a2Smrg# LINT_FLAGS: an Automake variable with appropriate flags 11886fe24f8a2Smrg# 11887fe24f8a2Smrg# --with-lint: 'yes' user instructs the module to use lint 11888fe24f8a2Smrg# 'no' user instructs the module not to use lint (default) 11889fe24f8a2Smrg# 11890fe24f8a2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11891fe24f8a2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 11892fe24f8a2Smrg# 11893fe24f8a2SmrgAC_DEFUN([XORG_WITH_LINT],[ 118943e72ca8cSmrg 11895fe24f8a2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 11896fe24f8a2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11897fe24f8a2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 11898fe24f8a2Smrg [Use a lint-style source code checker (default: disabled)])], 11899fe24f8a2Smrg [use_lint=$withval], [use_lint=no]) 119003e72ca8cSmrg 11901fe24f8a2Smrg# Obtain platform specific info like program name and options 11902fe24f8a2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11903fe24f8a2Smrgcase $host_os in 11904fe24f8a2Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11905fe24f8a2Smrg lint_name=splint 11906fe24f8a2Smrg lint_options="-badflag" 11907fe24f8a2Smrg ;; 11908fe24f8a2Smrg *freebsd* | *netbsd*) 11909fe24f8a2Smrg lint_name=lint 11910fe24f8a2Smrg lint_options="-u -b" 11911fe24f8a2Smrg ;; 11912fe24f8a2Smrg *solaris*) 11913fe24f8a2Smrg lint_name=lint 11914fe24f8a2Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11915fe24f8a2Smrg ;; 11916fe24f8a2Smrgesac 11917fe24f8a2Smrg 11918fe24f8a2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 11919fe24f8a2Smrgif test "x$use_lint" = x"yes" ; then 11920fe24f8a2Smrg AC_PATH_PROG([LINT], [$lint_name]) 11921fe24f8a2Smrg if test "x$LINT" = "x"; then 11922fe24f8a2Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11923fe24f8a2Smrg fi 11924fe24f8a2Smrgelif test "x$use_lint" = x"no" ; then 11925fe24f8a2Smrg if test "x$LINT" != "x"; then 11926fe24f8a2Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11927fe24f8a2Smrg fi 11928414bd68fSmrgelse 11929fe24f8a2Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 119303e72ca8cSmrgfi 119313e72ca8cSmrg 11932fe24f8a2Smrg# User supplied flags override default flags 11933fe24f8a2Smrgif test "x$LINT_FLAGS" != "x"; then 11934fe24f8a2Smrg lint_options=$LINT_FLAGS 11935fe24f8a2Smrgfi 119363e72ca8cSmrg 11937fe24f8a2SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 11938fe24f8a2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 119393e72ca8cSmrg 11940fe24f8a2Smrg]) # XORG_WITH_LINT 119413e72ca8cSmrg 11942fe24f8a2Smrg# XORG_LINT_LIBRARY(LIBNAME) 11943fe24f8a2Smrg# -------------------------- 11944fe24f8a2Smrg# Minimum version: 1.1.0 119453e72ca8cSmrg# 11946fe24f8a2Smrg# Sets up flags for building lint libraries for checking programs that call 11947fe24f8a2Smrg# functions in the library. 11948fe24f8a2Smrg# 11949fe24f8a2Smrg# Interface to module: 11950fe24f8a2Smrg# LINTLIB - Automake variable with the name of lint library file to make 11951fe24f8a2Smrg# MAKE_LINT_LIB - Automake conditional 11952fe24f8a2Smrg# 11953fe24f8a2Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11954fe24f8a2Smrg# - 'no' user instructs the module not to create a lint library (default) 119553e72ca8cSmrg 11956fe24f8a2SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 11957fe24f8a2SmrgAC_REQUIRE([XORG_WITH_LINT]) 11958fe24f8a2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 11959fe24f8a2Smrg [Create lint library (default: disabled)])], 11960fe24f8a2Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 11961fe24f8a2Smrg 11962fe24f8a2Smrgif test "x$make_lint_lib" = x"yes" ; then 11963fe24f8a2Smrg LINTLIB=llib-l$1.ln 11964fe24f8a2Smrg if test "x$LINT" = "x"; then 11965fe24f8a2Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11966fe24f8a2Smrg fi 11967fe24f8a2Smrgelif test "x$make_lint_lib" != x"no" ; then 11968fe24f8a2Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 119693e72ca8cSmrgfi 11970414bd68fSmrg 11971fe24f8a2SmrgAC_SUBST(LINTLIB) 11972fe24f8a2SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 11973414bd68fSmrg 11974fe24f8a2Smrg]) # XORG_LINT_LIBRARY 119753e72ca8cSmrg 11976fe24f8a2Smrg# XORG_COMPILER_BRAND 11977414bd68fSmrg# ------------------- 11978fe24f8a2Smrg# Minimum version: 1.14.0 11979414bd68fSmrg# 11980fe24f8a2Smrg# Checks for various brands of compilers and sets flags as appropriate: 11981fe24f8a2Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 11982fe24f8a2Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11983fe24f8a2Smrg# clang compiler - sets CLANGCC to "yes" 11984fe24f8a2Smrg# Intel compiler - sets INTELCC to "yes" 11985fe24f8a2Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11986fe24f8a2Smrg# 11987fe24f8a2SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 11988fe24f8a2SmrgAC_LANG_CASE( 11989fe24f8a2Smrg [C], [ 11990fe24f8a2Smrg AC_REQUIRE([AC_PROG_CC_C99]) 11991fe24f8a2Smrg ], 11992fe24f8a2Smrg [C++], [ 11993fe24f8a2Smrg AC_REQUIRE([AC_PROG_CXX]) 11994fe24f8a2Smrg ] 11995fe24f8a2Smrg) 11996fe24f8a2SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11997fe24f8a2SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11998fe24f8a2SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11999fe24f8a2Smrg]) # XORG_COMPILER_BRAND 120003e72ca8cSmrg 12001fe24f8a2Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 12002414bd68fSmrg# --------------- 12003fe24f8a2Smrg# Minimum version: 1.16.0 12004fe24f8a2Smrg# 12005fe24f8a2Smrg# Test if the compiler works when passed the given flag as a command line argument. 12006fe24f8a2Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 12007fe24f8a2Smrg# next flag in the list until there are no more options. 12008fe24f8a2Smrg# 12009fe24f8a2Smrg# Note that this does not guarantee that the compiler supports the flag as some 12010fe24f8a2Smrg# compilers will simply ignore arguments that they do not understand, but we do 12011fe24f8a2Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 12012fe24f8a2Smrg# -Werror=unused-command-line-argument 12013fe24f8a2Smrg# 12014fe24f8a2SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 12015fe24f8a2Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 12016fe24f8a2Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 120173e72ca8cSmrg 12018fe24f8a2SmrgAC_LANG_COMPILER_REQUIRE 120193e72ca8cSmrg 12020fe24f8a2SmrgAC_LANG_CASE( 12021fe24f8a2Smrg [C], [ 12022fe24f8a2Smrg AC_REQUIRE([AC_PROG_CC_C99]) 12023fe24f8a2Smrg define([PREFIX], [C]) 12024fe24f8a2Smrg define([CACHE_PREFIX], [cc]) 12025fe24f8a2Smrg define([COMPILER], [$CC]) 12026fe24f8a2Smrg ], 12027fe24f8a2Smrg [C++], [ 12028fe24f8a2Smrg define([PREFIX], [CXX]) 12029fe24f8a2Smrg define([CACHE_PREFIX], [cxx]) 12030fe24f8a2Smrg define([COMPILER], [$CXX]) 12031fe24f8a2Smrg ] 12032fe24f8a2Smrg) 12033fe24f8a2Smrg 12034fe24f8a2Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 12035fe24f8a2Smrg 12036fe24f8a2Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 12037fe24f8a2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 12038fe24f8a2Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 12039fe24f8a2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 12040fe24f8a2Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 12041fe24f8a2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 12042fe24f8a2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 12043fe24f8a2Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 12044fe24f8a2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 120453e72ca8cSmrgfi 12046fe24f8a2Smrg 12047fe24f8a2Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 12048fe24f8a2Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 12049fe24f8a2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 12050fe24f8a2Smrg fi 12051fe24f8a2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 12052fe24f8a2Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 12053fe24f8a2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 12054fe24f8a2Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 12055fe24f8a2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 12056fe24f8a2Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 12057fe24f8a2Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 12058fe24f8a2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 12059414bd68fSmrgfi 12060fe24f8a2Smrg 12061fe24f8a2Smrgfound="no" 12062fe24f8a2Smrgm4_foreach([flag], m4_cdr($@), [ 12063fe24f8a2Smrg if test $found = "no" ; then 12064fe24f8a2Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 12065fe24f8a2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 12066fe24f8a2Smrg fi 12067fe24f8a2Smrg 12068fe24f8a2Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 12069fe24f8a2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 12070fe24f8a2Smrg fi 12071fe24f8a2Smrg 12072fe24f8a2Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 12073fe24f8a2Smrg 12074fe24f8a2Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 12075fe24f8a2Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 12076fe24f8a2Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 12077fe24f8a2Smrg AC_CACHE_VAL($cacheid, 12078fe24f8a2Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 12079fe24f8a2Smrg [eval $cacheid=yes], 12080fe24f8a2Smrg [eval $cacheid=no])]) 12081fe24f8a2Smrg 12082fe24f8a2Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 12083fe24f8a2Smrg 12084fe24f8a2Smrg eval supported=\$$cacheid 12085fe24f8a2Smrg AC_MSG_RESULT([$supported]) 12086fe24f8a2Smrg if test "$supported" = "yes" ; then 12087fe24f8a2Smrg $1="$$1 ]flag[" 12088fe24f8a2Smrg found="yes" 12089fe24f8a2Smrg fi 12090fe24f8a2Smrg fi 12091414bd68fSmrg]) 12092fe24f8a2Smrg]) # XORG_TESTSET_CFLAG 120933e72ca8cSmrg 12094fe24f8a2Smrg# XORG_COMPILER_FLAGS 12095fe24f8a2Smrg# --------------- 12096fe24f8a2Smrg# Minimum version: 1.16.0 120973e72ca8cSmrg# 12098fe24f8a2Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 12099fe24f8a2Smrg# arguments supported by the selected compiler which do NOT alter the generated 12100fe24f8a2Smrg# code. These arguments will cause the compiler to print various warnings 12101fe24f8a2Smrg# during compilation AND turn a conservative set of warnings into errors. 12102fe24f8a2Smrg# 12103fe24f8a2Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 12104fe24f8a2Smrg# future versions of util-macros as options are added to new compilers. 12105fe24f8a2Smrg# 12106fe24f8a2SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 12107fe24f8a2SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 12108ee3138f1Smrg 12109fe24f8a2SmrgAC_ARG_ENABLE(selective-werror, 12110fe24f8a2Smrg AS_HELP_STRING([--disable-selective-werror], 12111fe24f8a2Smrg [Turn off selective compiler errors. (default: enabled)]), 12112fe24f8a2Smrg [SELECTIVE_WERROR=$enableval], 12113fe24f8a2Smrg [SELECTIVE_WERROR=yes]) 12114fe24f8a2Smrg 12115fe24f8a2SmrgAC_LANG_CASE( 12116fe24f8a2Smrg [C], [ 12117fe24f8a2Smrg define([PREFIX], [C]) 12118fe24f8a2Smrg ], 12119fe24f8a2Smrg [C++], [ 12120fe24f8a2Smrg define([PREFIX], [CXX]) 12121fe24f8a2Smrg ] 12122fe24f8a2Smrg) 12123fe24f8a2Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 12124fe24f8a2Smrgif test "x$SUNCC" = "xyes"; then 12125fe24f8a2Smrg [BASE_]PREFIX[FLAGS]="-v" 12126414bd68fSmrgelse 12127fe24f8a2Smrg [BASE_]PREFIX[FLAGS]="" 12128414bd68fSmrgfi 12129414bd68fSmrg 12130fe24f8a2Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 12131fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 12132fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 12133fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 12134fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 12135414bd68fSmrg 12136fe24f8a2SmrgAC_LANG_CASE( 12137fe24f8a2Smrg [C], [ 12138fe24f8a2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 12139fe24f8a2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 12140fe24f8a2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 12141fe24f8a2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 12142fe24f8a2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 12143fe24f8a2Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 12144fe24f8a2Smrg ] 12145fe24f8a2Smrg) 1214634977a2fSmrg 12147fe24f8a2Smrg# This chunk adds additional warnings that could catch undesired effects. 12148fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 12149fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 12150fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 12151fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 12152fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 12153fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 12154fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 121553e72ca8cSmrg 12156fe24f8a2Smrg# These are currently disabled because they are noisy. They will be enabled 12157fe24f8a2Smrg# in the future once the codebase is sufficiently modernized to silence 12158fe24f8a2Smrg# them. For now, I don't want them to drown out the other warnings. 12159fe24f8a2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 12160fe24f8a2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 12161fe24f8a2Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 121623e72ca8cSmrg 12163fe24f8a2Smrg# Turn some warnings into errors, so we don't accidently get successful builds 12164fe24f8a2Smrg# when there are problems that should be fixed. 121653e72ca8cSmrg 12166fe24f8a2Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 12167fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 12168fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 12169fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 12170fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 12171fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 12172fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 12173fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 12174fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 12175fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 12176fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 12177fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 12178fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 12179fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 12180fe24f8a2Smrgelse 12181fe24f8a2SmrgAC_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]) 12182fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 12183fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 12184fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 12185fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 12186fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 12187fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 12188fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 12189fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 12190fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 12191fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 12192fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 12193fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 12194fe24f8a2SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 12195fe24f8a2Smrgfi 121963e72ca8cSmrg 12197fe24f8a2SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 12198fe24f8a2Smrg]) # XORG_COMPILER_FLAGS 12199a1ed278cSmrg 12200fe24f8a2Smrg# XORG_CWARNFLAGS 12201fe24f8a2Smrg# --------------- 12202fe24f8a2Smrg# Minimum version: 1.2.0 12203fe24f8a2Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 1220434977a2fSmrg# 12205fe24f8a2Smrg# Defines CWARNFLAGS to enable C compiler warnings. 12206b425557eSmrg# 12207fe24f8a2Smrg# This function is deprecated because it defines -fno-strict-aliasing 12208fe24f8a2Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 12209fe24f8a2Smrg# is needed, then it should be added explicitly in the module when 12210fe24f8a2Smrg# it is updated to use BASE_CFLAGS. 12211fe24f8a2Smrg# 12212fe24f8a2SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 12213fe24f8a2SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 12214fe24f8a2SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 12215fe24f8a2SmrgAC_LANG_CASE( 12216fe24f8a2Smrg [C], [ 12217fe24f8a2Smrg CWARNFLAGS="$BASE_CFLAGS" 12218fe24f8a2Smrg if test "x$GCC" = xyes ; then 12219fe24f8a2Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 12220fe24f8a2Smrg fi 12221fe24f8a2Smrg AC_SUBST(CWARNFLAGS) 12222fe24f8a2Smrg ] 12223fe24f8a2Smrg) 12224fe24f8a2Smrg]) # XORG_CWARNFLAGS 12225ee3138f1Smrg 12226fe24f8a2Smrg# XORG_STRICT_OPTION 12227fe24f8a2Smrg# ----------------------- 12228fe24f8a2Smrg# Minimum version: 1.3.0 12229fe24f8a2Smrg# 12230fe24f8a2Smrg# Add configure option to enable strict compilation flags, such as treating 12231fe24f8a2Smrg# warnings as fatal errors. 12232fe24f8a2Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 12233fe24f8a2Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 12234fe24f8a2Smrg# 12235fe24f8a2Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 12236fe24f8a2Smrg# when strict compilation is unconditionally desired. 12237fe24f8a2SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 12238fe24f8a2SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 12239fe24f8a2SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 12240414bd68fSmrg 12241fe24f8a2SmrgAC_ARG_ENABLE(strict-compilation, 12242fe24f8a2Smrg AS_HELP_STRING([--enable-strict-compilation], 12243fe24f8a2Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 12244fe24f8a2Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 12245414bd68fSmrg 12246fe24f8a2SmrgAC_LANG_CASE( 12247fe24f8a2Smrg [C], [ 12248fe24f8a2Smrg define([PREFIX], [C]) 12249fe24f8a2Smrg ], 12250fe24f8a2Smrg [C++], [ 12251fe24f8a2Smrg define([PREFIX], [CXX]) 12252fe24f8a2Smrg ] 12253fe24f8a2Smrg) 12254414bd68fSmrg 12255fe24f8a2Smrg[STRICT_]PREFIX[FLAGS]="" 12256fe24f8a2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 12257fe24f8a2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 12258414bd68fSmrg 12259fe24f8a2Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 12260fe24f8a2Smrg# activate it with -Werror, so we add it here explicitly. 12261fe24f8a2SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 12262414bd68fSmrg 12263fe24f8a2Smrgif test "x$STRICT_COMPILE" = "xyes"; then 12264fe24f8a2Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 12265fe24f8a2Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 12266fe24f8a2Smrgfi 12267fe24f8a2SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 12268fe24f8a2SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 12269fe24f8a2SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 12270fe24f8a2Smrg]) # XORG_STRICT_OPTION 12271414bd68fSmrg 12272fe24f8a2Smrg# XORG_DEFAULT_OPTIONS 12273fe24f8a2Smrg# -------------------- 12274fe24f8a2Smrg# Minimum version: 1.3.0 12275fe24f8a2Smrg# 12276fe24f8a2Smrg# Defines default options for X.Org modules. 12277fe24f8a2Smrg# 12278fe24f8a2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 12279fe24f8a2SmrgAC_REQUIRE([AC_PROG_INSTALL]) 12280fe24f8a2SmrgXORG_COMPILER_FLAGS 12281fe24f8a2SmrgXORG_CWARNFLAGS 12282fe24f8a2SmrgXORG_STRICT_OPTION 12283fe24f8a2SmrgXORG_RELEASE_VERSION 12284fe24f8a2SmrgXORG_CHANGELOG 12285fe24f8a2SmrgXORG_INSTALL 12286fe24f8a2SmrgXORG_MANPAGE_SECTIONS 12287fe24f8a2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 12288fe24f8a2Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 12289fe24f8a2Smrg]) # XORG_DEFAULT_OPTIONS 12290414bd68fSmrg 12291fe24f8a2Smrg# XORG_INSTALL() 12292fe24f8a2Smrg# ---------------- 12293fe24f8a2Smrg# Minimum version: 1.4.0 12294fe24f8a2Smrg# 12295fe24f8a2Smrg# Defines the variable INSTALL_CMD as the command to copy 12296fe24f8a2Smrg# INSTALL from $prefix/share/util-macros. 12297fe24f8a2Smrg# 12298fe24f8a2SmrgAC_DEFUN([XORG_INSTALL], [ 12299fe24f8a2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 12300fe24f8a2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 12301fe24f8a2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 12302fe24f8a2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 12303fe24f8a2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 12304fe24f8a2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 12305fe24f8a2SmrgAC_SUBST([INSTALL_CMD]) 12306fe24f8a2Smrg]) # XORG_INSTALL 12307fe24f8a2Smrgdnl Copyright 2005 Red Hat, Inc 12308fe24f8a2Smrgdnl 12309fe24f8a2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 12310fe24f8a2Smrgdnl documentation for any purpose is hereby granted without fee, provided that 12311fe24f8a2Smrgdnl the above copyright notice appear in all copies and that both that 12312fe24f8a2Smrgdnl copyright notice and this permission notice appear in supporting 12313fe24f8a2Smrgdnl documentation. 12314fe24f8a2Smrgdnl 12315fe24f8a2Smrgdnl The above copyright notice and this permission notice shall be included 12316fe24f8a2Smrgdnl in all copies or substantial portions of the Software. 12317fe24f8a2Smrgdnl 12318fe24f8a2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 12319fe24f8a2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 12320fe24f8a2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 12321fe24f8a2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 12322fe24f8a2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 12323fe24f8a2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 12324fe24f8a2Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 12325fe24f8a2Smrgdnl 12326fe24f8a2Smrgdnl Except as contained in this notice, the name of the copyright holders shall 12327fe24f8a2Smrgdnl not be used in advertising or otherwise to promote the sale, use or 12328fe24f8a2Smrgdnl other dealings in this Software without prior written authorization 12329fe24f8a2Smrgdnl from the copyright holders. 12330fe24f8a2Smrgdnl 12331414bd68fSmrg 12332fe24f8a2Smrg# XORG_RELEASE_VERSION 12333fe24f8a2Smrg# -------------------- 12334fe24f8a2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 12335414bd68fSmrg 12336fe24f8a2SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 12337fe24f8a2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 12338fe24f8a2Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 12339fe24f8a2Smrg [Major version of this package]) 12340fe24f8a2Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 12341fe24f8a2Smrg if test "x$PVM" = "x"; then 12342fe24f8a2Smrg PVM="0" 12343fe24f8a2Smrg fi 12344fe24f8a2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 12345fe24f8a2Smrg [$PVM], 12346fe24f8a2Smrg [Minor version of this package]) 12347fe24f8a2Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 12348fe24f8a2Smrg if test "x$PVP" = "x"; then 12349fe24f8a2Smrg PVP="0" 12350fe24f8a2Smrg fi 12351fe24f8a2Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 12352fe24f8a2Smrg [$PVP], 12353fe24f8a2Smrg [Patch version of this package]) 12354fe24f8a2Smrg]) 12355414bd68fSmrg 12356fe24f8a2Smrg# XORG_CHANGELOG() 12357fe24f8a2Smrg# ---------------- 12358fe24f8a2Smrg# Minimum version: 1.2.0 12359fe24f8a2Smrg# 12360fe24f8a2Smrg# Defines the variable CHANGELOG_CMD as the command to generate 12361fe24f8a2Smrg# ChangeLog from git. 12362fe24f8a2Smrg# 12363fe24f8a2Smrg# 12364fe24f8a2SmrgAC_DEFUN([XORG_CHANGELOG], [ 12365fe24f8a2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 12366fe24f8a2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 12367fe24f8a2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 12368fe24f8a2Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 12369fe24f8a2SmrgAC_SUBST([CHANGELOG_CMD]) 12370fe24f8a2Smrg]) # XORG_CHANGELOG 12371ee3138f1Smrg 12372