aclocal.m4 revision 93d9adc1
193d9adc1Smrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 293d9adc1Smrg 393d9adc1Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 472b676d7Smrg 572b676d7Smrg# This file is free software; the Free Software Foundation 672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 772b676d7Smrg# with or without modifications, as long as this notice is preserved. 872b676d7Smrg 972b676d7Smrg# This program is distributed in the hope that it will be useful, 1072b676d7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 1172b676d7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 1272b676d7Smrg# PARTICULAR PURPOSE. 1372b676d7Smrg 1493d9adc1Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 151fd23544Smrgm4_ifndef([AC_AUTOCONF_VERSION], 161fd23544Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 1721525869Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 1821525869Smrg[m4_warning([this file was generated for autoconf 2.69. 191fd23544SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 201fd23544SmrgIf you have problems, you may need to regenerate the build system entirely. 2193d9adc1SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 221fd23544Smrg 2372b676d7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24e35772b2Smrg# 2521525869Smrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 26e35772b2Smrg# Written by Gordon Matzigkeit, 1996 27e35772b2Smrg# 28e35772b2Smrg# This file is free software; the Free Software Foundation gives 29e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 30e35772b2Smrg# modifications, as long as this notice is preserved. 31e35772b2Smrg 32e35772b2Smrgm4_define([_LT_COPYING], [dnl 3321525869Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 3421525869Smrg# This is free software; see the source for copying conditions. There is NO 3521525869Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3621525869Smrg 3721525869Smrg# GNU Libtool is free software; you can redistribute it and/or modify 3821525869Smrg# it under the terms of the GNU General Public License as published by 3921525869Smrg# the Free Software Foundation; either version 2 of of the License, or 4021525869Smrg# (at your option) any later version. 41e35772b2Smrg# 4221525869Smrg# As a special exception to the GNU General Public License, if you 4321525869Smrg# distribute this file as part of a program or library that is built 4421525869Smrg# using GNU Libtool, you may include this file under the same 4521525869Smrg# distribution terms that you use for the rest of that program. 46e35772b2Smrg# 4721525869Smrg# GNU Libtool is distributed in the hope that it will be useful, but 4821525869Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 49e35772b2Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50e35772b2Smrg# GNU General Public License for more details. 51e35772b2Smrg# 52e35772b2Smrg# You should have received a copy of the GNU General Public License 5321525869Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54e35772b2Smrg]) 5572b676d7Smrg 5621525869Smrg# serial 58 LT_INIT 5772b676d7Smrg 5872b676d7Smrg 59e35772b2Smrg# LT_PREREQ(VERSION) 60e35772b2Smrg# ------------------ 61e35772b2Smrg# Complain and exit if this libtool version is less that VERSION. 62e35772b2Smrgm4_defun([LT_PREREQ], 63e35772b2Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64e35772b2Smrg [m4_default([$3], 65e35772b2Smrg [m4_fatal([Libtool version $1 or higher is required], 66e35772b2Smrg 63)])], 67e35772b2Smrg [$2])]) 6872b676d7Smrg 6972b676d7Smrg 70e35772b2Smrg# _LT_CHECK_BUILDDIR 71e35772b2Smrg# ------------------ 72e35772b2Smrg# Complain if the absolute build directory name contains unusual characters 73e35772b2Smrgm4_defun([_LT_CHECK_BUILDDIR], 74e35772b2Smrg[case `pwd` in 75e35772b2Smrg *\ * | *\ *) 76e35772b2Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77e35772b2Smrgesac 78e35772b2Smrg]) 79e35772b2Smrg 80e35772b2Smrg 81e35772b2Smrg# LT_INIT([OPTIONS]) 82e35772b2Smrg# ------------------ 83e35772b2SmrgAC_DEFUN([LT_INIT], 8421525869Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 8574c14cd6SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86e35772b2SmrgAC_BEFORE([$0], [LT_LANG])dnl 87e35772b2SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 88e35772b2SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 89e35772b2Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 90e35772b2Smrg 91e35772b2Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 92e35772b2Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93e35772b2Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94e35772b2Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95e35772b2Smrgdnl unless we require an AC_DEFUNed macro: 96e35772b2SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 97e35772b2SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 98e35772b2SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 99e35772b2SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 100e35772b2Smrgm4_require([_LT_PROG_LTMAIN])dnl 101e35772b2Smrg 10274c14cd6Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 10374c14cd6Smrg 104e35772b2Smrgdnl Parse OPTIONS 105e35772b2Smrg_LT_SET_OPTIONS([$0], [$1]) 10672b676d7Smrg 10772b676d7Smrg# This can be used to rebuild libtool when needed 10821525869SmrgLIBTOOL_DEPS=$ltmain 10972b676d7Smrg 11072b676d7Smrg# Always use our own libtool. 11172b676d7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 11272b676d7SmrgAC_SUBST(LIBTOOL)dnl 11372b676d7Smrg 114e35772b2Smrg_LT_SETUP 11572b676d7Smrg 116e35772b2Smrg# Only expand once: 117e35772b2Smrgm4_define([LT_INIT]) 118e35772b2Smrg])# LT_INIT 11972b676d7Smrg 120e35772b2Smrg# Old names: 121e35772b2SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122e35772b2SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 124e35772b2Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125e35772b2Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126e35772b2Smrg 127e35772b2Smrg 12821525869Smrg# _LT_PREPARE_CC_BASENAME 12921525869Smrg# ----------------------- 13021525869Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 13121525869Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 13221525869Smrgfunc_cc_basename () 13321525869Smrg{ 13421525869Smrg for cc_temp in @S|@*""; do 13521525869Smrg case $cc_temp in 13621525869Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 13721525869Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 13821525869Smrg \-*) ;; 13921525869Smrg *) break;; 14021525869Smrg esac 14121525869Smrg done 14221525869Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 14321525869Smrg} 14421525869Smrg])# _LT_PREPARE_CC_BASENAME 14521525869Smrg 14621525869Smrg 147e35772b2Smrg# _LT_CC_BASENAME(CC) 148e35772b2Smrg# ------------------- 14921525869Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 15021525869Smrg# but that macro is also expanded into generated libtool script, which 15121525869Smrg# arranges for $SED and $ECHO to be set by different means. 152e35772b2Smrgm4_defun([_LT_CC_BASENAME], 15321525869Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 15421525869SmrgAC_REQUIRE([_LT_DECL_SED])dnl 15521525869SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 15621525869Smrgfunc_cc_basename $1 15721525869Smrgcc_basename=$func_cc_basename_result 158e35772b2Smrg]) 159e35772b2Smrg 160e35772b2Smrg 161e35772b2Smrg# _LT_FILEUTILS_DEFAULTS 162e35772b2Smrg# ---------------------- 163e35772b2Smrg# It is okay to use these file commands and assume they have been set 16421525869Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165e35772b2Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 166e35772b2Smrg[: ${CP="cp -f"} 167e35772b2Smrg: ${MV="mv -f"} 168e35772b2Smrg: ${RM="rm -f"} 169e35772b2Smrg])# _LT_FILEUTILS_DEFAULTS 170e35772b2Smrg 171e35772b2Smrg 172e35772b2Smrg# _LT_SETUP 173e35772b2Smrg# --------- 174e35772b2Smrgm4_defun([_LT_SETUP], 175e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 17672b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 17774c14cd6SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 17874c14cd6SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 17974c14cd6Smrg 18074c14cd6Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 18174c14cd6Smrgdnl 182e35772b2Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 183e35772b2Smrg_LT_DECL([], [host], [0])dnl 184e35772b2Smrg_LT_DECL([], [host_os], [0])dnl 185e35772b2Smrgdnl 186e35772b2Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 187e35772b2Smrg_LT_DECL([], [build], [0])dnl 188e35772b2Smrg_LT_DECL([], [build_os], [0])dnl 189e35772b2Smrgdnl 19072b676d7SmrgAC_REQUIRE([AC_PROG_CC])dnl 191e35772b2SmrgAC_REQUIRE([LT_PATH_LD])dnl 192e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 193e35772b2Smrgdnl 19472b676d7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 195e35772b2Smrgtest -z "$LN_S" && LN_S="ln -s" 196e35772b2Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 19772b676d7Smrgdnl 198e35772b2SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 199e35772b2Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200e35772b2Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201e35772b2Smrgdnl 202e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 203e35772b2Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 20474c14cd6Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205e35772b2Smrgm4_require([_LT_CMD_RELOAD])dnl 206e35772b2Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 20774c14cd6Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208e35772b2Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 209e35772b2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 21074c14cd6Smrgm4_require([_LT_WITH_SYSROOT])dnl 21121525869Smrgm4_require([_LT_CMD_TRUNCATE])dnl 212e35772b2Smrg 213e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([ 21421525869Smrg# See if we are running on zsh, and set the options that allow our 215e35772b2Smrg# commands through without removal of \ escapes INIT. 21621525869Smrgif test -n "\${ZSH_VERSION+set}"; then 217e35772b2Smrg setopt NO_GLOB_SUBST 218e35772b2Smrgfi 219e35772b2Smrg]) 22021525869Smrgif test -n "${ZSH_VERSION+set}"; then 221e35772b2Smrg setopt NO_GLOB_SUBST 222e35772b2Smrgfi 22372b676d7Smrg 224e35772b2Smrg_LT_CHECK_OBJDIR 225e35772b2Smrg 226e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 22772b676d7Smrg 22872b676d7Smrgcase $host_os in 22972b676d7Smrgaix3*) 23072b676d7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 23172b676d7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 23272b676d7Smrg # vanish in a puff of smoke. 23321525869Smrg if test set != "${COLLECT_NAMES+set}"; then 23472b676d7Smrg COLLECT_NAMES= 23572b676d7Smrg export COLLECT_NAMES 23672b676d7Smrg fi 23772b676d7Smrg ;; 23872b676d7Smrgesac 23972b676d7Smrg 24072b676d7Smrg# Global variables: 241e35772b2Smrgofile=libtool 24272b676d7Smrgcan_build_shared=yes 24372b676d7Smrg 24421525869Smrg# All known linkers require a '.a' archive for static linking (except MSVC, 24572b676d7Smrg# which needs '.lib'). 24672b676d7Smrglibext=a 24772b676d7Smrg 24821525869Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 24972b676d7Smrg 25021525869Smrgold_CC=$CC 25121525869Smrgold_CFLAGS=$CFLAGS 25272b676d7Smrg 25372b676d7Smrg# Set sane defaults for various variables 25472b676d7Smrgtest -z "$CC" && CC=cc 25572b676d7Smrgtest -z "$LTCC" && LTCC=$CC 25672b676d7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 25772b676d7Smrgtest -z "$LD" && LD=ld 25872b676d7Smrgtest -z "$ac_objext" && ac_objext=o 25972b676d7Smrg 26072b676d7Smrg_LT_CC_BASENAME([$compiler]) 26172b676d7Smrg 26272b676d7Smrg# Only perform the check for file, if the check method requires it 263e35772b2Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 26472b676d7Smrgcase $deplibs_check_method in 26572b676d7Smrgfile_magic*) 26672b676d7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267e35772b2Smrg _LT_PATH_MAGIC 26872b676d7Smrg fi 26972b676d7Smrg ;; 27072b676d7Smrgesac 27172b676d7Smrg 272e35772b2Smrg# Use C for the default configuration in the libtool script 273e35772b2SmrgLT_SUPPORTED_TAG([CC]) 274e35772b2Smrg_LT_LANG_C_CONFIG 275e35772b2Smrg_LT_LANG_DEFAULT_CONFIG 276e35772b2Smrg_LT_CONFIG_COMMANDS 277e35772b2Smrg])# _LT_SETUP 2781fd23544Smrg 27972b676d7Smrg 28074c14cd6Smrg# _LT_PREPARE_SED_QUOTE_VARS 28174c14cd6Smrg# -------------------------- 28274c14cd6Smrg# Define a few sed substitution that help us do robust quoting. 28374c14cd6Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 28474c14cd6Smrg[# Backslashify metacharacters that are still active within 28574c14cd6Smrg# double-quoted strings. 28674c14cd6Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 28774c14cd6Smrg 28874c14cd6Smrg# Same as above, but do not quote variable references. 28974c14cd6Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 29074c14cd6Smrg 29174c14cd6Smrg# Sed substitution to delay expansion of an escaped shell variable in a 29274c14cd6Smrg# double_quote_subst'ed string. 29374c14cd6Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 29474c14cd6Smrg 29574c14cd6Smrg# Sed substitution to delay expansion of an escaped single quote. 29674c14cd6Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 29774c14cd6Smrg 29874c14cd6Smrg# Sed substitution to avoid accidental globbing in evaled expressions 29974c14cd6Smrgno_glob_subst='s/\*/\\\*/g' 30074c14cd6Smrg]) 30174c14cd6Smrg 302e35772b2Smrg# _LT_PROG_LTMAIN 303e35772b2Smrg# --------------- 30421525869Smrg# Note that this code is called both from 'configure', and 'config.status' 305e35772b2Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 30621525869Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307e35772b2Smrg# so we pass a copy along to make sure it has a sensible value anyway. 308e35772b2Smrgm4_defun([_LT_PROG_LTMAIN], 309e35772b2Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 31121525869Smrgltmain=$ac_aux_dir/ltmain.sh 312e35772b2Smrg])# _LT_PROG_LTMAIN 31372b676d7Smrg 31472b676d7Smrg 315e35772b2Smrg 316e35772b2Smrg# So that we can recreate a full libtool script including additional 317e35772b2Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 31821525869Smrg# in macros and then make a single call at the end using the 'libtool' 319e35772b2Smrg# label. 320e35772b2Smrg 321e35772b2Smrg 322e35772b2Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323e35772b2Smrg# ---------------------------------------- 324e35772b2Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325e35772b2Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 326e35772b2Smrg[m4_ifval([$1], 327e35772b2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328e35772b2Smrg [$1 329e35772b2Smrg])])]) 330e35772b2Smrg 331e35772b2Smrg# Initialize. 332e35772b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333e35772b2Smrg 334e35772b2Smrg 335e35772b2Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 336e35772b2Smrg# ------------------------------ 337e35772b2Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338e35772b2Smrgm4_define([_LT_CONFIG_LIBTOOL], 339e35772b2Smrg[m4_ifval([$1], 340e35772b2Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341e35772b2Smrg [$1 342e35772b2Smrg])])]) 343e35772b2Smrg 344e35772b2Smrg# Initialize. 345e35772b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 346e35772b2Smrg 347e35772b2Smrg 348e35772b2Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349e35772b2Smrg# ----------------------------------------------------- 350e35772b2Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 351e35772b2Smrg[_LT_CONFIG_LIBTOOL([$1]) 352e35772b2Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 353e35772b2Smrg]) 354e35772b2Smrg 355e35772b2Smrg 356e35772b2Smrg# _LT_FORMAT_COMMENT([COMMENT]) 357e35772b2Smrg# ----------------------------- 358e35772b2Smrg# Add leading comment marks to the start of each line, and a trailing 359e35772b2Smrg# full-stop to the whole comment if one is not present already. 360e35772b2Smrgm4_define([_LT_FORMAT_COMMENT], 361e35772b2Smrg[m4_ifval([$1], [ 362e35772b2Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363e35772b2Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364e35772b2Smrg)]) 365e35772b2Smrg 366e35772b2Smrg 367e35772b2Smrg 368e35772b2Smrg 369e35772b2Smrg 370e35772b2Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371e35772b2Smrg# ------------------------------------------------------------------- 372e35772b2Smrg# CONFIGNAME is the name given to the value in the libtool script. 373e35772b2Smrg# VARNAME is the (base) name used in the configure script. 374e35772b2Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375e35772b2Smrg# VARNAME. Any other value will be used directly. 376e35772b2Smrgm4_define([_LT_DECL], 377e35772b2Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378e35772b2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379e35772b2Smrg [m4_ifval([$1], [$1], [$2])]) 380e35772b2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381e35772b2Smrg m4_ifval([$4], 382e35772b2Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383e35772b2Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 384e35772b2Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 385e35772b2Smrg]) 386e35772b2Smrg 387e35772b2Smrg 388e35772b2Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389e35772b2Smrg# -------------------------------------------------------- 390e35772b2Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391e35772b2Smrg 392e35772b2Smrg 393e35772b2Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394e35772b2Smrg# ------------------------------------------------ 395e35772b2Smrgm4_define([lt_decl_tag_varnames], 396e35772b2Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 397e35772b2Smrg 398e35772b2Smrg 399e35772b2Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400e35772b2Smrg# --------------------------------------------------------- 401e35772b2Smrgm4_define([_lt_decl_filter], 402e35772b2Smrg[m4_case([$#], 403e35772b2Smrg [0], [m4_fatal([$0: too few arguments: $#])], 404e35772b2Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 405e35772b2Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406e35772b2Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407e35772b2Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 408e35772b2Smrg]) 409e35772b2Smrg 410e35772b2Smrg 411e35772b2Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412e35772b2Smrg# -------------------------------------------------- 413e35772b2Smrgm4_define([lt_decl_quote_varnames], 414e35772b2Smrg[_lt_decl_filter([value], [1], $@)]) 415e35772b2Smrg 416e35772b2Smrg 417e35772b2Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418e35772b2Smrg# --------------------------------------------------- 419e35772b2Smrgm4_define([lt_decl_dquote_varnames], 420e35772b2Smrg[_lt_decl_filter([value], [2], $@)]) 421e35772b2Smrg 422e35772b2Smrg 423e35772b2Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424e35772b2Smrg# --------------------------------------------------- 425e35772b2Smrgm4_define([lt_decl_varnames_tagged], 426e35772b2Smrg[m4_assert([$# <= 2])dnl 427e35772b2Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 428e35772b2Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429e35772b2Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430e35772b2Smrgm4_define([_lt_decl_varnames_tagged], 431e35772b2Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432e35772b2Smrg 433e35772b2Smrg 434e35772b2Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435e35772b2Smrg# ------------------------------------------------ 436e35772b2Smrgm4_define([lt_decl_all_varnames], 437e35772b2Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 438e35772b2Smrg m4_if([$2], [], 439e35772b2Smrg m4_quote(lt_decl_varnames), 440e35772b2Smrg m4_quote(m4_shift($@))))[]dnl 441e35772b2Smrg]) 442e35772b2Smrgm4_define([_lt_decl_all_varnames], 443e35772b2Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 444e35772b2Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 445e35772b2Smrg]) 446e35772b2Smrg 447e35772b2Smrg 448e35772b2Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449e35772b2Smrg# ------------------------------------ 45021525869Smrg# Quote a variable value, and forward it to 'config.status' so that its 45121525869Smrg# declaration there will have the same value as in 'configure'. VARNAME 452e35772b2Smrg# must have a single quote delimited value for this to work. 453e35772b2Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 45474c14cd6Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455e35772b2Smrg 456e35772b2Smrg 457e35772b2Smrg# _LT_CONFIG_STATUS_DECLARATIONS 458e35772b2Smrg# ------------------------------ 459e35772b2Smrg# We delimit libtool config variables with single quotes, so when 460e35772b2Smrg# we write them to config.status, we have to be sure to quote all 461e35772b2Smrg# embedded single quotes properly. In configure, this macro expands 462e35772b2Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 463e35772b2Smrg# 46474c14cd6Smrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465e35772b2Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466e35772b2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467e35772b2Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 468e35772b2Smrg 469e35772b2Smrg 470e35772b2Smrg# _LT_LIBTOOL_TAGS 471e35772b2Smrg# ---------------- 472e35772b2Smrg# Output comment and list of tags supported by the script 473e35772b2Smrgm4_defun([_LT_LIBTOOL_TAGS], 474e35772b2Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 47521525869Smrgavailable_tags='_LT_TAGS'dnl 476e35772b2Smrg]) 477e35772b2Smrg 478e35772b2Smrg 479e35772b2Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480e35772b2Smrg# ----------------------------------- 481e35772b2Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 482e35772b2Smrg# expand to a commented shell variable setting: 483e35772b2Smrg# 484e35772b2Smrg# # Some comment about what VAR is for. 485e35772b2Smrg# visible_name=$lt_internal_name 486e35772b2Smrgm4_define([_LT_LIBTOOL_DECLARE], 487e35772b2Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488e35772b2Smrg [description])))[]dnl 489e35772b2Smrgm4_pushdef([_libtool_name], 490e35772b2Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491e35772b2Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492e35772b2Smrg [0], [_libtool_name=[$]$1], 493e35772b2Smrg [1], [_libtool_name=$lt_[]$1], 494e35772b2Smrg [2], [_libtool_name=$lt_[]$1], 495e35772b2Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496e35772b2Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497e35772b2Smrg]) 498e35772b2Smrg 499e35772b2Smrg 500e35772b2Smrg# _LT_LIBTOOL_CONFIG_VARS 501e35772b2Smrg# ----------------------- 502e35772b2Smrg# Produce commented declarations of non-tagged libtool config variables 50321525869Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504e35772b2Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505e35772b2Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 506e35772b2Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 507e35772b2Smrg[m4_foreach([_lt_var], 508e35772b2Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509e35772b2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 510e35772b2Smrg 511e35772b2Smrg 512e35772b2Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 513e35772b2Smrg# ------------------------- 514e35772b2Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 515e35772b2Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516e35772b2Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 51772b676d7Smrg 51872b676d7Smrg 519e35772b2Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 520e35772b2Smrg# ------------------------------ 521e35772b2Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 522e35772b2Smrg 523e35772b2Smrg 524e35772b2Smrg# _LT_CONFIG_COMMANDS 52572b676d7Smrg# ------------------- 526e35772b2Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527e35772b2Smrg# variables for single and double quote escaping we saved from calls 528e35772b2Smrg# to _LT_DECL, we can put quote escaped variables declarations 52921525869Smrg# into 'config.status', and then the shell code to quote escape them in 53021525869Smrg# for loops in 'config.status'. Finally, any additional code accumulated 531e35772b2Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532e35772b2Smrgm4_defun([_LT_CONFIG_COMMANDS], 533e35772b2Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 534e35772b2Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 535e35772b2Smrg dnl instead of duplicating it all over again into config.status, 536e35772b2Smrg dnl then we will have config.status run $CONFIG_LT later, so it 537e35772b2Smrg dnl needs to know what name is stored there: 538e35772b2Smrg [AC_CONFIG_COMMANDS([libtool], 539e35772b2Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540e35772b2Smrg dnl If the libtool generation code is destined for config.status, 541e35772b2Smrg dnl expand the accumulated commands and init code now: 542e35772b2Smrg [AC_CONFIG_COMMANDS([libtool], 543e35772b2Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544e35772b2Smrg])#_LT_CONFIG_COMMANDS 545e35772b2Smrg 546e35772b2Smrg 547e35772b2Smrg# Initialize. 548e35772b2Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549e35772b2Smrg[ 550e35772b2Smrg 551e35772b2Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 552e35772b2Smrg# if CDPATH is set. 553e35772b2Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 554e35772b2Smrg 555e35772b2Smrgsed_quote_subst='$sed_quote_subst' 556e35772b2Smrgdouble_quote_subst='$double_quote_subst' 557e35772b2Smrgdelay_variable_subst='$delay_variable_subst' 558e35772b2Smrg_LT_CONFIG_STATUS_DECLARATIONS 559e35772b2SmrgLTCC='$LTCC' 560e35772b2SmrgLTCFLAGS='$LTCFLAGS' 561e35772b2Smrgcompiler='$compiler_DEFAULT' 562e35772b2Smrg 56374c14cd6Smrg# A function that is used when there is no print builtin or printf. 56474c14cd6Smrgfunc_fallback_echo () 56574c14cd6Smrg{ 56674c14cd6Smrg eval 'cat <<_LTECHO_EOF 56774c14cd6Smrg\$[]1 56874c14cd6Smrg_LTECHO_EOF' 56974c14cd6Smrg} 57074c14cd6Smrg 571e35772b2Smrg# Quote evaled strings. 572e35772b2Smrgfor var in lt_decl_all_varnames([[ \ 573e35772b2Smrg]], lt_decl_quote_varnames); do 57474c14cd6Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575e35772b2Smrg *[[\\\\\\\`\\"\\\$]]*) 57621525869Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577e35772b2Smrg ;; 578e35772b2Smrg *) 579e35772b2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580e35772b2Smrg ;; 581e35772b2Smrg esac 582e35772b2Smrgdone 583e35772b2Smrg 584e35772b2Smrg# Double-quote double-evaled strings. 585e35772b2Smrgfor var in lt_decl_all_varnames([[ \ 586e35772b2Smrg]], lt_decl_dquote_varnames); do 58774c14cd6Smrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588e35772b2Smrg *[[\\\\\\\`\\"\\\$]]*) 58921525869Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590e35772b2Smrg ;; 591e35772b2Smrg *) 592e35772b2Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593e35772b2Smrg ;; 594e35772b2Smrg esac 595e35772b2Smrgdone 596e35772b2Smrg 597e35772b2Smrg_LT_OUTPUT_LIBTOOL_INIT 598e35772b2Smrg]) 599e35772b2Smrg 60074c14cd6Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 60174c14cd6Smrg# ------------------------------------ 60274c14cd6Smrg# Generate a child script FILE with all initialization necessary to 60374c14cd6Smrg# reuse the environment learned by the parent script, and make the 60474c14cd6Smrg# file executable. If COMMENT is supplied, it is inserted after the 60521525869Smrg# '#!' sequence but before initialization text begins. After this 60674c14cd6Smrg# macro, additional text can be appended to FILE to form the body of 60774c14cd6Smrg# the child script. The macro ends with non-zero status if the 60874c14cd6Smrg# file could not be fully written (such as if the disk is full). 60974c14cd6Smrgm4_ifdef([AS_INIT_GENERATED], 61074c14cd6Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 61174c14cd6Smrg[m4_defun([_LT_GENERATED_FILE_INIT], 61274c14cd6Smrg[m4_require([AS_PREPARE])]dnl 61374c14cd6Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 61474c14cd6Smrg[lt_write_fail=0 61574c14cd6Smrgcat >$1 <<_ASEOF || lt_write_fail=1 61674c14cd6Smrg#! $SHELL 61774c14cd6Smrg# Generated by $as_me. 61874c14cd6Smrg$2 61974c14cd6SmrgSHELL=\${CONFIG_SHELL-$SHELL} 62074c14cd6Smrgexport SHELL 62174c14cd6Smrg_ASEOF 62274c14cd6Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1 62374c14cd6SmrgAS_SHELL_SANITIZE 62474c14cd6Smrg_AS_PREPARE 62574c14cd6Smrgexec AS_MESSAGE_FD>&1 62674c14cd6Smrg_ASEOF 62721525869Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 62874c14cd6Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629e35772b2Smrg 630e35772b2Smrg# LT_OUTPUT 631e35772b2Smrg# --------- 632e35772b2Smrg# This macro allows early generation of the libtool script (before 633e35772b2Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 634e35772b2Smrg# tests. 635e35772b2SmrgAC_DEFUN([LT_OUTPUT], 636e35772b2Smrg[: ${CONFIG_LT=./config.lt} 637e35772b2SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 63874c14cd6Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 63974c14cd6Smrg[# Run this file to recreate a libtool stub with the current configuration.]) 640e35772b2Smrg 641e35772b2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 64274c14cd6Smrglt_cl_silent=false 643e35772b2Smrgexec AS_MESSAGE_LOG_FD>>config.log 644e35772b2Smrg{ 645e35772b2Smrg echo 646e35772b2Smrg AS_BOX([Running $as_me.]) 647e35772b2Smrg} >&AS_MESSAGE_LOG_FD 648e35772b2Smrg 649e35772b2Smrglt_cl_help="\ 65021525869Smrg'$as_me' creates a local libtool stub from the current configuration, 651e35772b2Smrgfor use in further configure time tests before the real libtool is 652e35772b2Smrggenerated. 653e35772b2Smrg 654e35772b2SmrgUsage: $[0] [[OPTIONS]] 655e35772b2Smrg 656e35772b2Smrg -h, --help print this help, then exit 657e35772b2Smrg -V, --version print version number, then exit 658e35772b2Smrg -q, --quiet do not print progress messages 659e35772b2Smrg -d, --debug don't remove temporary files 660e35772b2Smrg 661e35772b2SmrgReport bugs to <bug-libtool@gnu.org>." 662e35772b2Smrg 663e35772b2Smrglt_cl_version="\ 664e35772b2Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665e35772b2Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666e35772b2Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 667e35772b2Smrg 66874c14cd6SmrgCopyright (C) 2011 Free Software Foundation, Inc. 669e35772b2SmrgThis config.lt script is free software; the Free Software Foundation 670e35772b2Smrggives unlimited permision to copy, distribute and modify it." 671e35772b2Smrg 67221525869Smrgwhile test 0 != $[#] 673e35772b2Smrgdo 674e35772b2Smrg case $[1] in 675e35772b2Smrg --version | --v* | -V ) 676e35772b2Smrg echo "$lt_cl_version"; exit 0 ;; 677e35772b2Smrg --help | --h* | -h ) 678e35772b2Smrg echo "$lt_cl_help"; exit 0 ;; 679e35772b2Smrg --debug | --d* | -d ) 680e35772b2Smrg debug=: ;; 681e35772b2Smrg --quiet | --q* | --silent | --s* | -q ) 682e35772b2Smrg lt_cl_silent=: ;; 683e35772b2Smrg 684e35772b2Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 68521525869SmrgTry '$[0] --help' for more information.]) ;; 686e35772b2Smrg 687e35772b2Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 68821525869SmrgTry '$[0] --help' for more information.]) ;; 689e35772b2Smrg esac 690e35772b2Smrg shift 691e35772b2Smrgdone 692e35772b2Smrg 693e35772b2Smrgif $lt_cl_silent; then 694e35772b2Smrg exec AS_MESSAGE_FD>/dev/null 695e35772b2Smrgfi 696e35772b2Smrg_LTEOF 697e35772b2Smrg 698e35772b2Smrgcat >>"$CONFIG_LT" <<_LTEOF 699e35772b2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700e35772b2Smrg_LTEOF 701e35772b2Smrg 702e35772b2Smrgcat >>"$CONFIG_LT" <<\_LTEOF 703e35772b2SmrgAC_MSG_NOTICE([creating $ofile]) 704e35772b2Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 705e35772b2SmrgAS_EXIT(0) 706e35772b2Smrg_LTEOF 707e35772b2Smrgchmod +x "$CONFIG_LT" 708e35772b2Smrg 709e35772b2Smrg# configure is writing to config.log, but config.lt does its own redirection, 710e35772b2Smrg# appending to config.log, which fails on DOS, as config.log is still kept 711e35772b2Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 712e35772b2Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 71374c14cd6Smrglt_cl_success=: 71421525869Smrgtest yes = "$silent" && 71574c14cd6Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 71674c14cd6Smrgexec AS_MESSAGE_LOG_FD>/dev/null 71774c14cd6Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 71874c14cd6Smrgexec AS_MESSAGE_LOG_FD>>config.log 71974c14cd6Smrg$lt_cl_success || AS_EXIT(1) 720e35772b2Smrg])# LT_OUTPUT 721e35772b2Smrg 722e35772b2Smrg 723e35772b2Smrg# _LT_CONFIG(TAG) 724e35772b2Smrg# --------------- 725e35772b2Smrg# If TAG is the built-in tag, create an initial libtool script with a 726e35772b2Smrg# default configuration from the untagged config vars. Otherwise add code 727e35772b2Smrg# to config.status for appending the configuration named by TAG from the 728e35772b2Smrg# matching tagged config vars. 729e35772b2Smrgm4_defun([_LT_CONFIG], 730e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731e35772b2Smrg_LT_CONFIG_SAVE_COMMANDS([ 732e35772b2Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733e35772b2Smrg m4_if(_LT_TAG, [C], [ 73421525869Smrg # See if we are running on zsh, and set the options that allow our 735e35772b2Smrg # commands through without removal of \ escapes. 73621525869Smrg if test -n "${ZSH_VERSION+set}"; then 737e35772b2Smrg setopt NO_GLOB_SUBST 738e35772b2Smrg fi 739e35772b2Smrg 74021525869Smrg cfgfile=${ofile}T 741e35772b2Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742e35772b2Smrg $RM "$cfgfile" 743e35772b2Smrg 744e35772b2Smrg cat <<_LT_EOF >> "$cfgfile" 745e35772b2Smrg#! $SHELL 74621525869Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 747e35772b2Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748e35772b2Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 74921525869Smrg 75021525869Smrg# Provide generalized library-building support services. 75121525869Smrg# Written by Gordon Matzigkeit, 1996 75221525869Smrg 753e35772b2Smrg_LT_COPYING 754e35772b2Smrg_LT_LIBTOOL_TAGS 755e35772b2Smrg 75621525869Smrg# Configured defaults for sys_lib_dlsearch_path munging. 75721525869Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 75821525869Smrg 759e35772b2Smrg# ### BEGIN LIBTOOL CONFIG 760e35772b2Smrg_LT_LIBTOOL_CONFIG_VARS 761e35772b2Smrg_LT_LIBTOOL_TAG_VARS 762e35772b2Smrg# ### END LIBTOOL CONFIG 763e35772b2Smrg 76421525869Smrg_LT_EOF 76521525869Smrg 76621525869Smrg cat <<'_LT_EOF' >> "$cfgfile" 76721525869Smrg 76821525869Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 76921525869Smrg 77021525869Smrg_LT_PREPARE_MUNGE_PATH_LIST 77121525869Smrg_LT_PREPARE_CC_BASENAME 77221525869Smrg 77321525869Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 77421525869Smrg 775e35772b2Smrg_LT_EOF 776e35772b2Smrg 777e35772b2Smrg case $host_os in 778e35772b2Smrg aix3*) 779e35772b2Smrg cat <<\_LT_EOF >> "$cfgfile" 780e35772b2Smrg# AIX sometimes has problems with the GCC collect2 program. For some 781e35772b2Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 782e35772b2Smrg# vanish in a puff of smoke. 78321525869Smrgif test set != "${COLLECT_NAMES+set}"; then 784e35772b2Smrg COLLECT_NAMES= 785e35772b2Smrg export COLLECT_NAMES 786e35772b2Smrgfi 787e35772b2Smrg_LT_EOF 788e35772b2Smrg ;; 789e35772b2Smrg esac 790e35772b2Smrg 791e35772b2Smrg _LT_PROG_LTMAIN 792e35772b2Smrg 793e35772b2Smrg # We use sed instead of cat because bash on DJGPP gets confused if 794e35772b2Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 795e35772b2Smrg # text mode, it properly converts lines to CR/LF. This bash problem 796e35772b2Smrg # is reportedly fixed, but why not run on old versions too? 79774c14cd6Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 79874c14cd6Smrg || (rm -f "$cfgfile"; exit 1) 799e35772b2Smrg 80074c14cd6Smrg mv -f "$cfgfile" "$ofile" || 801e35772b2Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802e35772b2Smrg chmod +x "$ofile" 803e35772b2Smrg], 804e35772b2Smrg[cat <<_LT_EOF >> "$ofile" 805e35772b2Smrg 806e35772b2Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807e35772b2Smrgdnl in a comment (ie after a #). 808e35772b2Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 809e35772b2Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810e35772b2Smrg# ### END LIBTOOL TAG CONFIG: $1 811e35772b2Smrg_LT_EOF 812e35772b2Smrg])dnl /m4_if 813e35772b2Smrg], 814e35772b2Smrg[m4_if([$1], [], [ 815e35772b2Smrg PACKAGE='$PACKAGE' 816e35772b2Smrg VERSION='$VERSION' 817e35772b2Smrg RM='$RM' 818e35772b2Smrg ofile='$ofile'], []) 819e35772b2Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 820e35772b2Smrg])# _LT_CONFIG 821e35772b2Smrg 822e35772b2Smrg 823e35772b2Smrg# LT_SUPPORTED_TAG(TAG) 824e35772b2Smrg# --------------------- 825e35772b2Smrg# Trace this macro to discover what tags are supported by the libtool 826e35772b2Smrg# --tag option, using: 827e35772b2Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828e35772b2SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829e35772b2Smrg 830e35772b2Smrg 831e35772b2Smrg# C support is built-in for now 832e35772b2Smrgm4_define([_LT_LANG_C_enabled], []) 833e35772b2Smrgm4_define([_LT_TAGS], []) 834e35772b2Smrg 835e35772b2Smrg 836e35772b2Smrg# LT_LANG(LANG) 837e35772b2Smrg# ------------- 838e35772b2Smrg# Enable libtool support for the given language if not already enabled. 839e35772b2SmrgAC_DEFUN([LT_LANG], 840e35772b2Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 841e35772b2Smrgm4_case([$1], 842e35772b2Smrg [C], [_LT_LANG(C)], 843e35772b2Smrg [C++], [_LT_LANG(CXX)], 84474c14cd6Smrg [Go], [_LT_LANG(GO)], 845e35772b2Smrg [Java], [_LT_LANG(GCJ)], 846e35772b2Smrg [Fortran 77], [_LT_LANG(F77)], 847e35772b2Smrg [Fortran], [_LT_LANG(FC)], 848e35772b2Smrg [Windows Resource], [_LT_LANG(RC)], 849e35772b2Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850e35772b2Smrg [_LT_LANG($1)], 851e35772b2Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 852e35772b2Smrg])# LT_LANG 853e35772b2Smrg 854e35772b2Smrg 855e35772b2Smrg# _LT_LANG(LANGNAME) 856e35772b2Smrg# ------------------ 857e35772b2Smrgm4_defun([_LT_LANG], 858e35772b2Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859e35772b2Smrg [LT_SUPPORTED_TAG([$1])dnl 860e35772b2Smrg m4_append([_LT_TAGS], [$1 ])dnl 861e35772b2Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 862e35772b2Smrg _LT_LANG_$1_CONFIG($1)])dnl 863e35772b2Smrg])# _LT_LANG 864e35772b2Smrg 865e35772b2Smrg 86674c14cd6Smrgm4_ifndef([AC_PROG_GO], [ 86774c14cd6Smrg# NOTE: This macro has been submitted for inclusion into # 86874c14cd6Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 86974c14cd6Smrg# a released version of Autoconf we should remove this # 87074c14cd6Smrg# macro and use it instead. # 87174c14cd6Smrgm4_defun([AC_PROG_GO], 87274c14cd6Smrg[AC_LANG_PUSH(Go)dnl 87374c14cd6SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 87474c14cd6SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 87574c14cd6Smrg_AC_ARG_VAR_LDFLAGS()dnl 87674c14cd6SmrgAC_CHECK_TOOL(GOC, gccgo) 87774c14cd6Smrgif test -z "$GOC"; then 87874c14cd6Smrg if test -n "$ac_tool_prefix"; then 87974c14cd6Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 88074c14cd6Smrg fi 88174c14cd6Smrgfi 88274c14cd6Smrgif test -z "$GOC"; then 88374c14cd6Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 88474c14cd6Smrgfi 88574c14cd6Smrg])#m4_defun 88674c14cd6Smrg])#m4_ifndef 88774c14cd6Smrg 88874c14cd6Smrg 889e35772b2Smrg# _LT_LANG_DEFAULT_CONFIG 890e35772b2Smrg# ----------------------- 891e35772b2Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 892e35772b2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893e35772b2Smrg [LT_LANG(CXX)], 894e35772b2Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895e35772b2Smrg 896e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 897e35772b2Smrg [LT_LANG(F77)], 898e35772b2Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899e35772b2Smrg 900e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 901e35772b2Smrg [LT_LANG(FC)], 902e35772b2Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903e35772b2Smrg 904e35772b2Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905e35772b2Smrgdnl pulling things in needlessly. 906e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 907e35772b2Smrg [LT_LANG(GCJ)], 908e35772b2Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909e35772b2Smrg [LT_LANG(GCJ)], 910e35772b2Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911e35772b2Smrg [LT_LANG(GCJ)], 912e35772b2Smrg [m4_ifdef([AC_PROG_GCJ], 913e35772b2Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914e35772b2Smrg m4_ifdef([A][M_PROG_GCJ], 915e35772b2Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916e35772b2Smrg m4_ifdef([LT_PROG_GCJ], 917e35772b2Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918e35772b2Smrg 91974c14cd6SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 92074c14cd6Smrg [LT_LANG(GO)], 92174c14cd6Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 92274c14cd6Smrg 923e35772b2SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 924e35772b2Smrg [LT_LANG(RC)], 925e35772b2Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926e35772b2Smrg])# _LT_LANG_DEFAULT_CONFIG 927e35772b2Smrg 928e35772b2Smrg# Obsolete macros: 929e35772b2SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930e35772b2SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931e35772b2SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932e35772b2SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 93374c14cd6SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 935e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 937e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 938e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 93974c14cd6Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 940e35772b2Smrg 941e35772b2Smrg 942e35772b2Smrg# _LT_TAG_COMPILER 943e35772b2Smrg# ---------------- 944e35772b2Smrgm4_defun([_LT_TAG_COMPILER], 94572b676d7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 94672b676d7Smrg 947e35772b2Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948e35772b2Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949e35772b2Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950e35772b2Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 951e35772b2Smrg 95272b676d7Smrg# If no C compiler was specified, use CC. 95372b676d7SmrgLTCC=${LTCC-"$CC"} 95472b676d7Smrg 95572b676d7Smrg# If no C compiler flags were specified, use CFLAGS. 95672b676d7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 95772b676d7Smrg 95872b676d7Smrg# Allow CC to be a program name with arguments. 95972b676d7Smrgcompiler=$CC 960e35772b2Smrg])# _LT_TAG_COMPILER 96172b676d7Smrg 96272b676d7Smrg 96372b676d7Smrg# _LT_COMPILER_BOILERPLATE 96472b676d7Smrg# ------------------------ 96572b676d7Smrg# Check for compiler boilerplate output or warnings with 96672b676d7Smrg# the simple compiler test code. 967e35772b2Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 968e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 9691fd23544Smrgac_outfile=conftest.$ac_objext 9701fd23544Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 97172b676d7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 97272b676d7Smrg_lt_compiler_boilerplate=`cat conftest.err` 973e35772b2Smrg$RM conftest* 97472b676d7Smrg])# _LT_COMPILER_BOILERPLATE 97572b676d7Smrg 97672b676d7Smrg 97772b676d7Smrg# _LT_LINKER_BOILERPLATE 97872b676d7Smrg# ---------------------- 97972b676d7Smrg# Check for linker boilerplate output or warnings with 98072b676d7Smrg# the simple link test code. 981e35772b2Smrgm4_defun([_LT_LINKER_BOILERPLATE], 982e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 9831fd23544Smrgac_outfile=conftest.$ac_objext 9841fd23544Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 98572b676d7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 98672b676d7Smrg_lt_linker_boilerplate=`cat conftest.err` 987e35772b2Smrg$RM -r conftest* 98872b676d7Smrg])# _LT_LINKER_BOILERPLATE 98972b676d7Smrg 9901fd23544Smrg# _LT_REQUIRED_DARWIN_CHECKS 991e35772b2Smrg# ------------------------- 992e35772b2Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9931fd23544Smrg case $host_os in 9941fd23544Smrg rhapsody* | darwin*) 9951fd23544Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9961fd23544Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997e35772b2Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 998e35772b2Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 999e35772b2Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000e35772b2Smrg _LT_DECL([], [DSYMUTIL], [1], 1001e35772b2Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002e35772b2Smrg _LT_DECL([], [NMEDIT], [1], 1003e35772b2Smrg [Tool to change global to local symbols on Mac OS X]) 1004e35772b2Smrg _LT_DECL([], [LIPO], [1], 1005e35772b2Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 1006e35772b2Smrg _LT_DECL([], [OTOOL], [1], 1007e35772b2Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008e35772b2Smrg _LT_DECL([], [OTOOL64], [1], 1009e35772b2Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 10101fd23544Smrg 10111fd23544Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 10121fd23544Smrg [lt_cv_apple_cc_single_mod=no 101321525869Smrg if test -z "$LT_MULTI_MODULE"; then 1014e35772b2Smrg # By default we will add the -single_module flag. You can override 1015e35772b2Smrg # by either setting the environment variable LT_MULTI_MODULE 1016e35772b2Smrg # non-empty at configure time, or by adding -multi_module to the 1017e35772b2Smrg # link flags. 1018e35772b2Smrg rm -rf libconftest.dylib* 1019e35772b2Smrg echo "int foo(void){return 1;}" > conftest.c 1020e35772b2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021e35772b2Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022e35772b2Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023e35772b2Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024e35772b2Smrg _lt_result=$? 102574c14cd6Smrg # If there is a non-empty error log, and "single_module" 102674c14cd6Smrg # appears in it, assume the flag caused a linker warning 102774c14cd6Smrg if test -s conftest.err && $GREP single_module conftest.err; then 102874c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 102974c14cd6Smrg # Otherwise, if the output was created with a 0 exit code from 103074c14cd6Smrg # the compiler, it worked. 103121525869Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032e35772b2Smrg lt_cv_apple_cc_single_mod=yes 1033e35772b2Smrg else 1034e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1035e35772b2Smrg fi 1036e35772b2Smrg rm -rf libconftest.dylib* 1037e35772b2Smrg rm -f conftest.* 10381fd23544Smrg fi]) 103974c14cd6Smrg 10401fd23544Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10411fd23544Smrg [lt_cv_ld_exported_symbols_list], 10421fd23544Smrg [lt_cv_ld_exported_symbols_list=no 10431fd23544Smrg save_LDFLAGS=$LDFLAGS 10441fd23544Smrg echo "_main" > conftest.sym 10451fd23544Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10461fd23544Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047e35772b2Smrg [lt_cv_ld_exported_symbols_list=yes], 1048e35772b2Smrg [lt_cv_ld_exported_symbols_list=no]) 104921525869Smrg LDFLAGS=$save_LDFLAGS 10501fd23544Smrg ]) 105174c14cd6Smrg 105274c14cd6Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 105374c14cd6Smrg [lt_cv_ld_force_load=no 105474c14cd6Smrg cat > conftest.c << _LT_EOF 105574c14cd6Smrgint forced_loaded() { return 2;} 105674c14cd6Smrg_LT_EOF 105774c14cd6Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 105874c14cd6Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 105974c14cd6Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 106074c14cd6Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 106174c14cd6Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 106274c14cd6Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 106374c14cd6Smrg cat > conftest.c << _LT_EOF 106474c14cd6Smrgint main() { return 0;} 106574c14cd6Smrg_LT_EOF 106674c14cd6Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 106774c14cd6Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 106874c14cd6Smrg _lt_result=$? 106974c14cd6Smrg if test -s conftest.err && $GREP force_load conftest.err; then 107074c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 107121525869Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 107274c14cd6Smrg lt_cv_ld_force_load=yes 107374c14cd6Smrg else 107474c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 107574c14cd6Smrg fi 107674c14cd6Smrg rm -f conftest.err libconftest.a conftest conftest.c 107774c14cd6Smrg rm -rf conftest.dSYM 107874c14cd6Smrg ]) 10791fd23544Smrg case $host_os in 1080e35772b2Smrg rhapsody* | darwin1.[[012]]) 108121525869Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10821fd23544Smrg darwin1.*) 108321525869Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084e35772b2Smrg darwin*) # darwin 5.x on 10851fd23544Smrg # if running on 10.5 or later, the deployment target defaults 10861fd23544Smrg # to the OS version, if on x86, and 10.4, the deployment 10871fd23544Smrg # target defaults to 10.4. Don't you love it? 10881fd23544Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089e35772b2Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 109021525869Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 109121525869Smrg 10.[[012]][[,.]]*) 109221525869Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093e35772b2Smrg 10.*) 109421525869Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10951fd23544Smrg esac 10961fd23544Smrg ;; 10971fd23544Smrg esac 109821525869Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 10991fd23544Smrg _lt_dar_single_mod='$single_module' 11001fd23544Smrg fi 110121525869Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 110221525869Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 11031fd23544Smrg else 110421525869Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 11051fd23544Smrg fi 110621525869Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107e35772b2Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 11081fd23544Smrg else 11091fd23544Smrg _lt_dsymutil= 11101fd23544Smrg fi 11111fd23544Smrg ;; 11121fd23544Smrg esac 11131fd23544Smrg]) 111472b676d7Smrg 1115e35772b2Smrg 111674c14cd6Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 111774c14cd6Smrg# --------------------------------- 1118e35772b2Smrg# Checks for linker and compiler features on darwin 1119e35772b2Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1120e35772b2Smrg[ 1121e35772b2Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1124e35772b2Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1125e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 112621525869Smrg if test yes = "$lt_cv_ld_force_load"; then 112721525869Smrg _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\"`' 112874c14cd6Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 112974c14cd6Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 113074c14cd6Smrg else 113174c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 113274c14cd6Smrg fi 1133e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 113421525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135e35772b2Smrg case $cc_basename in 113621525869Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137e35772b2Smrg *) _lt_dar_can_shared=$GCC ;; 1138e35772b2Smrg esac 113921525869Smrg if test yes = "$_lt_dar_can_shared"; then 114074c14cd6Smrg output_verbose_link_cmd=func_echo_all 114121525869Smrg _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" 114221525869Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 114321525869Smrg _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" 114421525869Smrg _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" 1145e35772b2Smrg m4_if([$1], [CXX], 114621525869Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 114721525869Smrg _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" 114821525869Smrg _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" 1149e35772b2Smrg fi 1150e35772b2Smrg],[]) 1151e35772b2Smrg else 1152e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1153e35772b2Smrg fi 1154e35772b2Smrg]) 1155e35772b2Smrg 115674c14cd6Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 115774c14cd6Smrg# ---------------------------------- 115872b676d7Smrg# Links a minimal program and checks the executable 115972b676d7Smrg# for the system default hardcoded library path. In most cases, 116072b676d7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 116172b676d7Smrg# the location of the communication and MPI libs are included too. 116272b676d7Smrg# If we don't find anything, use the default library path according 116372b676d7Smrg# to the aix ld manual. 116474c14cd6Smrg# Store the results from the different compilers for each TAGNAME. 116574c14cd6Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1166e35772b2Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1167e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 116821525869Smrgif test set = "${lt_cv_aix_libpath+set}"; then 116974c14cd6Smrg aix_libpath=$lt_cv_aix_libpath 117074c14cd6Smrgelse 117174c14cd6Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 117274c14cd6Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 117374c14cd6Smrg lt_aix_libpath_sed='[ 117474c14cd6Smrg /Import File Strings/,/^$/ { 117574c14cd6Smrg /^0/ { 117674c14cd6Smrg s/^0 *\([^ ]*\) *$/\1/ 117774c14cd6Smrg p 117874c14cd6Smrg } 117974c14cd6Smrg }]' 118074c14cd6Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 118174c14cd6Smrg # Check for a 64-bit object if we didn't find anything. 118274c14cd6Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 118374c14cd6Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 118474c14cd6Smrg fi],[]) 118574c14cd6Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 118621525869Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 118774c14cd6Smrg fi 118874c14cd6Smrg ]) 118974c14cd6Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 119074c14cd6Smrgfi 1191e35772b2Smrg])# _LT_SYS_MODULE_PATH_AIX 119272b676d7Smrg 119372b676d7Smrg 1194e35772b2Smrg# _LT_SHELL_INIT(ARG) 1195e35772b2Smrg# ------------------- 1196e35772b2Smrgm4_define([_LT_SHELL_INIT], 119774c14cd6Smrg[m4_divert_text([M4SH-INIT], [$1 119874c14cd6Smrg])])# _LT_SHELL_INIT 119974c14cd6Smrg 120072b676d7Smrg 120172b676d7Smrg 1202e35772b2Smrg# _LT_PROG_ECHO_BACKSLASH 1203e35772b2Smrg# ----------------------- 120474c14cd6Smrg# Find how we can fake an echo command that does not interpret backslash. 120574c14cd6Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 120621525869Smrg# of the generated configure script that will find a shell with a builtin 120721525869Smrg# printf (that we can use as an echo command). 1208e35772b2Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 120974c14cd6Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 121074c14cd6SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 121174c14cd6SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 121274c14cd6Smrg 121374c14cd6SmrgAC_MSG_CHECKING([how to print strings]) 121474c14cd6Smrg# Test print first, because it will be a builtin if present. 121574c14cd6Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 121674c14cd6Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 121774c14cd6Smrg ECHO='print -r --' 121874c14cd6Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 121974c14cd6Smrg ECHO='printf %s\n' 122072b676d7Smrgelse 122174c14cd6Smrg # Use this function as a fallback that always works. 122274c14cd6Smrg func_fallback_echo () 122374c14cd6Smrg { 122474c14cd6Smrg eval 'cat <<_LTECHO_EOF 122574c14cd6Smrg$[]1 122674c14cd6Smrg_LTECHO_EOF' 122774c14cd6Smrg } 122874c14cd6Smrg ECHO='func_fallback_echo' 122972b676d7Smrgfi 123072b676d7Smrg 123174c14cd6Smrg# func_echo_all arg... 123274c14cd6Smrg# Invoke $ECHO with all args, space-separated. 123374c14cd6Smrgfunc_echo_all () 123474c14cd6Smrg{ 123521525869Smrg $ECHO "$*" 123674c14cd6Smrg} 123772b676d7Smrg 123821525869Smrgcase $ECHO in 123974c14cd6Smrg printf*) AC_MSG_RESULT([printf]) ;; 124074c14cd6Smrg print*) AC_MSG_RESULT([print -r]) ;; 124174c14cd6Smrg *) AC_MSG_RESULT([cat]) ;; 124274c14cd6Smrgesac 124372b676d7Smrg 124474c14cd6Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 124574c14cd6Smrg[_AS_DETECT_SUGGESTED([ 124674c14cd6Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 124774c14cd6Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 124874c14cd6Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 124974c14cd6Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 125074c14cd6Smrg PATH=/empty FPATH=/empty; export PATH FPATH 125174c14cd6Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 125274c14cd6Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 125372b676d7Smrg 1254e35772b2Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 125574c14cd6Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256e35772b2Smrg])# _LT_PROG_ECHO_BACKSLASH 125772b676d7Smrg 125872b676d7Smrg 125974c14cd6Smrg# _LT_WITH_SYSROOT 126074c14cd6Smrg# ---------------- 126174c14cd6SmrgAC_DEFUN([_LT_WITH_SYSROOT], 126274c14cd6Smrg[AC_MSG_CHECKING([for sysroot]) 126374c14cd6SmrgAC_ARG_WITH([sysroot], 126421525869Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 126521525869Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 126621525869Smrg if not specified).])], 126774c14cd6Smrg[], [with_sysroot=no]) 126874c14cd6Smrg 126974c14cd6Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 127074c14cd6Smrgdnl in case the user passed a directory name. 127174c14cd6Smrglt_sysroot= 127221525869Smrgcase $with_sysroot in #( 127374c14cd6Smrg yes) 127421525869Smrg if test yes = "$GCC"; then 127574c14cd6Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 127674c14cd6Smrg fi 127774c14cd6Smrg ;; #( 127874c14cd6Smrg /*) 127974c14cd6Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 128074c14cd6Smrg ;; #( 128174c14cd6Smrg no|'') 128274c14cd6Smrg ;; #( 128374c14cd6Smrg *) 128421525869Smrg AC_MSG_RESULT([$with_sysroot]) 128574c14cd6Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 128674c14cd6Smrg ;; 128774c14cd6Smrgesac 128874c14cd6Smrg 128974c14cd6Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 129074c14cd6Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 129121525869Smrg[dependent libraries, and where our libraries should be installed.])]) 129274c14cd6Smrg 1293e35772b2Smrg# _LT_ENABLE_LOCK 1294e35772b2Smrg# --------------- 1295e35772b2Smrgm4_defun([_LT_ENABLE_LOCK], 129672b676d7Smrg[AC_ARG_ENABLE([libtool-lock], 1297e35772b2Smrg [AS_HELP_STRING([--disable-libtool-lock], 1298e35772b2Smrg [avoid locking (might break parallel builds)])]) 129921525869Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 130072b676d7Smrg 130172b676d7Smrg# Some flags need to be propagated to the compiler or linker for good 130272b676d7Smrg# libtool support. 130372b676d7Smrgcase $host in 130472b676d7Smrgia64-*-hpux*) 130521525869Smrg # Find out what ABI is being produced by ac_compile, and set mode 130621525869Smrg # options accordingly. 130772b676d7Smrg echo 'int i;' > conftest.$ac_ext 130872b676d7Smrg if AC_TRY_EVAL(ac_compile); then 130972b676d7Smrg case `/usr/bin/file conftest.$ac_objext` in 1310e35772b2Smrg *ELF-32*) 131121525869Smrg HPUX_IA64_MODE=32 1312e35772b2Smrg ;; 1313e35772b2Smrg *ELF-64*) 131421525869Smrg HPUX_IA64_MODE=64 1315e35772b2Smrg ;; 131672b676d7Smrg esac 131772b676d7Smrg fi 131872b676d7Smrg rm -rf conftest* 131972b676d7Smrg ;; 132072b676d7Smrg*-*-irix6*) 132121525869Smrg # Find out what ABI is being produced by ac_compile, and set linker 132221525869Smrg # options accordingly. 132374c14cd6Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 132472b676d7Smrg if AC_TRY_EVAL(ac_compile); then 132521525869Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 1326e35772b2Smrg case `/usr/bin/file conftest.$ac_objext` in 1327e35772b2Smrg *32-bit*) 1328e35772b2Smrg LD="${LD-ld} -melf32bsmip" 1329e35772b2Smrg ;; 1330e35772b2Smrg *N32*) 1331e35772b2Smrg LD="${LD-ld} -melf32bmipn32" 1332e35772b2Smrg ;; 1333e35772b2Smrg *64-bit*) 1334e35772b2Smrg LD="${LD-ld} -melf64bmip" 1335e35772b2Smrg ;; 1336e35772b2Smrg esac 1337e35772b2Smrg else 1338e35772b2Smrg case `/usr/bin/file conftest.$ac_objext` in 1339e35772b2Smrg *32-bit*) 1340e35772b2Smrg LD="${LD-ld} -32" 1341e35772b2Smrg ;; 1342e35772b2Smrg *N32*) 1343e35772b2Smrg LD="${LD-ld} -n32" 1344e35772b2Smrg ;; 1345e35772b2Smrg *64-bit*) 1346e35772b2Smrg LD="${LD-ld} -64" 1347e35772b2Smrg ;; 1348e35772b2Smrg esac 1349e35772b2Smrg fi 135072b676d7Smrg fi 135172b676d7Smrg rm -rf conftest* 135272b676d7Smrg ;; 135372b676d7Smrg 135421525869Smrgmips64*-*linux*) 135521525869Smrg # Find out what ABI is being produced by ac_compile, and set linker 135621525869Smrg # options accordingly. 135721525869Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 135821525869Smrg if AC_TRY_EVAL(ac_compile); then 135921525869Smrg emul=elf 136021525869Smrg case `/usr/bin/file conftest.$ac_objext` in 136121525869Smrg *32-bit*) 136221525869Smrg emul="${emul}32" 136321525869Smrg ;; 136421525869Smrg *64-bit*) 136521525869Smrg emul="${emul}64" 136621525869Smrg ;; 136721525869Smrg esac 136821525869Smrg case `/usr/bin/file conftest.$ac_objext` in 136921525869Smrg *MSB*) 137021525869Smrg emul="${emul}btsmip" 137121525869Smrg ;; 137221525869Smrg *LSB*) 137321525869Smrg emul="${emul}ltsmip" 137421525869Smrg ;; 137521525869Smrg esac 137621525869Smrg case `/usr/bin/file conftest.$ac_objext` in 137721525869Smrg *N32*) 137821525869Smrg emul="${emul}n32" 137921525869Smrg ;; 138021525869Smrg esac 138121525869Smrg LD="${LD-ld} -m $emul" 138221525869Smrg fi 138321525869Smrg rm -rf conftest* 138421525869Smrg ;; 138521525869Smrg 138621525869Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1387e35772b2Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 138821525869Smrg # Find out what ABI is being produced by ac_compile, and set linker 138921525869Smrg # options accordingly. Note that the listed cases only cover the 139021525869Smrg # situations where additional linker options are needed (such as when 139121525869Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 139221525869Smrg # vice versa); the common cases where no linker options are needed do 139321525869Smrg # not appear in the list. 139472b676d7Smrg echo 'int i;' > conftest.$ac_ext 139572b676d7Smrg if AC_TRY_EVAL(ac_compile); then 139672b676d7Smrg case `/usr/bin/file conftest.o` in 1397e35772b2Smrg *32-bit*) 1398e35772b2Smrg case $host in 1399e35772b2Smrg x86_64-*kfreebsd*-gnu) 1400e35772b2Smrg LD="${LD-ld} -m elf_i386_fbsd" 1401e35772b2Smrg ;; 1402e35772b2Smrg x86_64-*linux*) 140321525869Smrg case `/usr/bin/file conftest.o` in 140421525869Smrg *x86-64*) 140521525869Smrg LD="${LD-ld} -m elf32_x86_64" 140621525869Smrg ;; 140721525869Smrg *) 140821525869Smrg LD="${LD-ld} -m elf_i386" 140921525869Smrg ;; 141021525869Smrg esac 1411e35772b2Smrg ;; 141221525869Smrg powerpc64le-*linux*) 141321525869Smrg LD="${LD-ld} -m elf32lppclinux" 141421525869Smrg ;; 141521525869Smrg powerpc64-*linux*) 1416e35772b2Smrg LD="${LD-ld} -m elf32ppclinux" 1417e35772b2Smrg ;; 1418e35772b2Smrg s390x-*linux*) 1419e35772b2Smrg LD="${LD-ld} -m elf_s390" 1420e35772b2Smrg ;; 1421e35772b2Smrg sparc64-*linux*) 1422e35772b2Smrg LD="${LD-ld} -m elf32_sparc" 1423e35772b2Smrg ;; 1424e35772b2Smrg esac 1425e35772b2Smrg ;; 1426e35772b2Smrg *64-bit*) 1427e35772b2Smrg case $host in 1428e35772b2Smrg x86_64-*kfreebsd*-gnu) 1429e35772b2Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1430e35772b2Smrg ;; 1431e35772b2Smrg x86_64-*linux*) 1432e35772b2Smrg LD="${LD-ld} -m elf_x86_64" 1433e35772b2Smrg ;; 143421525869Smrg powerpcle-*linux*) 143521525869Smrg LD="${LD-ld} -m elf64lppc" 143621525869Smrg ;; 143721525869Smrg powerpc-*linux*) 1438e35772b2Smrg LD="${LD-ld} -m elf64ppc" 1439e35772b2Smrg ;; 1440e35772b2Smrg s390*-*linux*|s390*-*tpf*) 1441e35772b2Smrg LD="${LD-ld} -m elf64_s390" 1442e35772b2Smrg ;; 1443e35772b2Smrg sparc*-*linux*) 1444e35772b2Smrg LD="${LD-ld} -m elf64_sparc" 1445e35772b2Smrg ;; 1446e35772b2Smrg esac 1447e35772b2Smrg ;; 144872b676d7Smrg esac 144972b676d7Smrg fi 145072b676d7Smrg rm -rf conftest* 145172b676d7Smrg ;; 145272b676d7Smrg 145372b676d7Smrg*-*-sco3.2v5*) 145472b676d7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 145521525869Smrg SAVE_CFLAGS=$CFLAGS 145672b676d7Smrg CFLAGS="$CFLAGS -belf" 145772b676d7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 145872b676d7Smrg [AC_LANG_PUSH(C) 1459e35772b2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 146072b676d7Smrg AC_LANG_POP]) 146121525869Smrg if test yes != "$lt_cv_cc_needs_belf"; then 146272b676d7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 146321525869Smrg CFLAGS=$SAVE_CFLAGS 146472b676d7Smrg fi 146572b676d7Smrg ;; 146674c14cd6Smrg*-*solaris*) 146721525869Smrg # Find out what ABI is being produced by ac_compile, and set linker 146821525869Smrg # options accordingly. 146972b676d7Smrg echo 'int i;' > conftest.$ac_ext 147072b676d7Smrg if AC_TRY_EVAL(ac_compile); then 147172b676d7Smrg case `/usr/bin/file conftest.o` in 147272b676d7Smrg *64-bit*) 147372b676d7Smrg case $lt_cv_prog_gnu_ld in 147474c14cd6Smrg yes*) 147574c14cd6Smrg case $host in 147621525869Smrg i?86-*-solaris*|x86_64-*-solaris*) 147774c14cd6Smrg LD="${LD-ld} -m elf_x86_64" 147874c14cd6Smrg ;; 147974c14cd6Smrg sparc*-*-solaris*) 148074c14cd6Smrg LD="${LD-ld} -m elf64_sparc" 148174c14cd6Smrg ;; 148274c14cd6Smrg esac 148374c14cd6Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 148474c14cd6Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 148521525869Smrg LD=${LD-ld}_sol2 148674c14cd6Smrg fi 148774c14cd6Smrg ;; 14881fd23544Smrg *) 1489e35772b2Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14901fd23544Smrg LD="${LD-ld} -64" 14911fd23544Smrg fi 14921fd23544Smrg ;; 149372b676d7Smrg esac 149472b676d7Smrg ;; 149572b676d7Smrg esac 149672b676d7Smrg fi 149772b676d7Smrg rm -rf conftest* 149872b676d7Smrg ;; 149972b676d7Smrgesac 150072b676d7Smrg 150121525869Smrgneed_locks=$enable_libtool_lock 1502e35772b2Smrg])# _LT_ENABLE_LOCK 1503e35772b2Smrg 1504e35772b2Smrg 150574c14cd6Smrg# _LT_PROG_AR 150674c14cd6Smrg# ----------- 150774c14cd6Smrgm4_defun([_LT_PROG_AR], 150874c14cd6Smrg[AC_CHECK_TOOLS(AR, [ar], false) 150974c14cd6Smrg: ${AR=ar} 151074c14cd6Smrg: ${AR_FLAGS=cru} 151174c14cd6Smrg_LT_DECL([], [AR], [1], [The archiver]) 151274c14cd6Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 151374c14cd6Smrg 151474c14cd6SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 151574c14cd6Smrg [lt_cv_ar_at_file=no 151674c14cd6Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 151774c14cd6Smrg [echo conftest.$ac_objext > conftest.lst 151874c14cd6Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 151974c14cd6Smrg AC_TRY_EVAL([lt_ar_try]) 152021525869Smrg if test 0 -eq "$ac_status"; then 152174c14cd6Smrg # Ensure the archiver fails upon bogus file names. 152274c14cd6Smrg rm -f conftest.$ac_objext libconftest.a 152374c14cd6Smrg AC_TRY_EVAL([lt_ar_try]) 152421525869Smrg if test 0 -ne "$ac_status"; then 152574c14cd6Smrg lt_cv_ar_at_file=@ 152674c14cd6Smrg fi 152774c14cd6Smrg fi 152874c14cd6Smrg rm -f conftest.* libconftest.a 152974c14cd6Smrg ]) 153074c14cd6Smrg ]) 153174c14cd6Smrg 153221525869Smrgif test no = "$lt_cv_ar_at_file"; then 153374c14cd6Smrg archiver_list_spec= 153474c14cd6Smrgelse 153574c14cd6Smrg archiver_list_spec=$lt_cv_ar_at_file 153674c14cd6Smrgfi 153774c14cd6Smrg_LT_DECL([], [archiver_list_spec], [1], 153874c14cd6Smrg [How to feed a file listing to the archiver]) 153974c14cd6Smrg])# _LT_PROG_AR 154074c14cd6Smrg 154174c14cd6Smrg 1542e35772b2Smrg# _LT_CMD_OLD_ARCHIVE 1543e35772b2Smrg# ------------------- 1544e35772b2Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 154574c14cd6Smrg[_LT_PROG_AR 1546e35772b2Smrg 1547e35772b2SmrgAC_CHECK_TOOL(STRIP, strip, :) 1548e35772b2Smrgtest -z "$STRIP" && STRIP=: 1549e35772b2Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1550e35772b2Smrg 1551e35772b2SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1552e35772b2Smrgtest -z "$RANLIB" && RANLIB=: 1553e35772b2Smrg_LT_DECL([], [RANLIB], [1], 1554e35772b2Smrg [Commands used to install an old-style archive]) 1555e35772b2Smrg 1556e35772b2Smrg# Determine commands to create old-style static archives. 1557e35772b2Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1558e35772b2Smrgold_postinstall_cmds='chmod 644 $oldlib' 1559e35772b2Smrgold_postuninstall_cmds= 156072b676d7Smrg 1561e35772b2Smrgif test -n "$RANLIB"; then 1562e35772b2Smrg case $host_os in 156321525869Smrg bitrig* | openbsd*) 156474c14cd6Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1565e35772b2Smrg ;; 1566e35772b2Smrg *) 156774c14cd6Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1568e35772b2Smrg ;; 1569e35772b2Smrg esac 157074c14cd6Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1571e35772b2Smrgfi 157274c14cd6Smrg 157374c14cd6Smrgcase $host_os in 157474c14cd6Smrg darwin*) 157574c14cd6Smrg lock_old_archive_extraction=yes ;; 157674c14cd6Smrg *) 157774c14cd6Smrg lock_old_archive_extraction=no ;; 157874c14cd6Smrgesac 1579e35772b2Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1580e35772b2Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1581e35772b2Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1582e35772b2Smrg [Commands used to build an old-style archive]) 158374c14cd6Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 158474c14cd6Smrg [Whether to use a lock for old archive extraction]) 1585e35772b2Smrg])# _LT_CMD_OLD_ARCHIVE 158672b676d7Smrg 158772b676d7Smrg 1588e35772b2Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 158972b676d7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 159072b676d7Smrg# ---------------------------------------------------------------- 159172b676d7Smrg# Check whether the given compiler option works 1592e35772b2SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1593e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1594e35772b2Smrgm4_require([_LT_DECL_SED])dnl 159572b676d7SmrgAC_CACHE_CHECK([$1], [$2], 159672b676d7Smrg [$2=no 1597e35772b2Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15981fd23544Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 159921525869Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 160072b676d7Smrg # Insert the option either (1) after the last *FLAGS variable, or 160172b676d7Smrg # (2) before a word containing "conftest.", or (3) at the end. 160272b676d7Smrg # Note that $ac_compile itself does not contain backslashes and begins 160372b676d7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 160472b676d7Smrg # The option is referenced via a variable to avoid confusing sed. 160572b676d7Smrg lt_compile=`echo "$ac_compile" | $SED \ 160672b676d7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 160772b676d7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 160872b676d7Smrg -e 's:$: $lt_compiler_flag:'` 160974c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 161072b676d7Smrg (eval "$lt_compile" 2>conftest.err) 161172b676d7Smrg ac_status=$? 161272b676d7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 161374c14cd6Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 161472b676d7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 161572b676d7Smrg # The compiler can only warn and ignore the option if not recognized 161672b676d7Smrg # So say no if there are warnings other than the usual output. 161774c14cd6Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 161872b676d7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 161972b676d7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 162072b676d7Smrg $2=yes 162172b676d7Smrg fi 162272b676d7Smrg fi 1623e35772b2Smrg $RM conftest* 162472b676d7Smrg]) 162572b676d7Smrg 162621525869Smrgif test yes = "[$]$2"; then 1627e35772b2Smrg m4_if([$5], , :, [$5]) 162872b676d7Smrgelse 1629e35772b2Smrg m4_if([$6], , :, [$6]) 163072b676d7Smrgfi 1631e35772b2Smrg])# _LT_COMPILER_OPTION 163272b676d7Smrg 1633e35772b2Smrg# Old name: 1634e35772b2SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1635e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1636e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 163772b676d7Smrg 1638e35772b2Smrg 1639e35772b2Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1640e35772b2Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1641e35772b2Smrg# ---------------------------------------------------- 1642e35772b2Smrg# Check whether the given linker option works 1643e35772b2SmrgAC_DEFUN([_LT_LINKER_OPTION], 1644e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1645e35772b2Smrgm4_require([_LT_DECL_SED])dnl 16461fd23544SmrgAC_CACHE_CHECK([$1], [$2], 164772b676d7Smrg [$2=no 164821525869Smrg save_LDFLAGS=$LDFLAGS 164972b676d7Smrg LDFLAGS="$LDFLAGS $3" 16501fd23544Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 165172b676d7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 165272b676d7Smrg # The linker can only warn and ignore the option if not recognized 165372b676d7Smrg # So say no if there are warnings 165472b676d7Smrg if test -s conftest.err; then 165572b676d7Smrg # Append any errors to the config.log. 165672b676d7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 165774c14cd6Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 165872b676d7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 165972b676d7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 166072b676d7Smrg $2=yes 166172b676d7Smrg fi 166272b676d7Smrg else 166372b676d7Smrg $2=yes 166472b676d7Smrg fi 166572b676d7Smrg fi 1666e35772b2Smrg $RM -r conftest* 166721525869Smrg LDFLAGS=$save_LDFLAGS 166872b676d7Smrg]) 166972b676d7Smrg 167021525869Smrgif test yes = "[$]$2"; then 1671e35772b2Smrg m4_if([$4], , :, [$4]) 167272b676d7Smrgelse 1673e35772b2Smrg m4_if([$5], , :, [$5]) 167472b676d7Smrgfi 1675e35772b2Smrg])# _LT_LINKER_OPTION 167672b676d7Smrg 1677e35772b2Smrg# Old name: 1678e35772b2SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1679e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1680e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 168172b676d7Smrg 1682e35772b2Smrg 1683e35772b2Smrg# LT_CMD_MAX_LEN 1684e35772b2Smrg#--------------- 1685e35772b2SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1686e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1687e35772b2Smrg# find the maximum length of command line arguments 168872b676d7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 168972b676d7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 169072b676d7Smrg i=0 169121525869Smrg teststring=ABCD 169272b676d7Smrg 169372b676d7Smrg case $build_os in 169472b676d7Smrg msdosdjgpp*) 169572b676d7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 169672b676d7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 169772b676d7Smrg # during glob expansion). Even if it were fixed, the result of this 169872b676d7Smrg # check would be larger than it should be. 169972b676d7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 170072b676d7Smrg ;; 170172b676d7Smrg 170272b676d7Smrg gnu*) 170372b676d7Smrg # Under GNU Hurd, this test is not required because there is 170472b676d7Smrg # no limit to the length of command line arguments. 170572b676d7Smrg # Libtool will interpret -1 as no limit whatsoever 170672b676d7Smrg lt_cv_sys_max_cmd_len=-1; 170772b676d7Smrg ;; 170872b676d7Smrg 1709e35772b2Smrg cygwin* | mingw* | cegcc*) 171072b676d7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 171172b676d7Smrg # about 5 minutes as the teststring grows exponentially. 171272b676d7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 171372b676d7Smrg # you end up with a "frozen" computer, even though with patience 171472b676d7Smrg # the test eventually succeeds (with a max line length of 256k). 171572b676d7Smrg # Instead, let's just punt: use the minimum linelength reported by 171672b676d7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 171772b676d7Smrg lt_cv_sys_max_cmd_len=8192; 171872b676d7Smrg ;; 171972b676d7Smrg 172074c14cd6Smrg mint*) 172174c14cd6Smrg # On MiNT this can take a long time and run out of memory. 172274c14cd6Smrg lt_cv_sys_max_cmd_len=8192; 172374c14cd6Smrg ;; 172474c14cd6Smrg 172572b676d7Smrg amigaos*) 172672b676d7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 172772b676d7Smrg # So we just punt and use a minimum line length of 8192. 172872b676d7Smrg lt_cv_sys_max_cmd_len=8192; 172972b676d7Smrg ;; 173072b676d7Smrg 173121525869Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 173272b676d7Smrg # This has been around since 386BSD, at least. Likely further. 173372b676d7Smrg if test -x /sbin/sysctl; then 173472b676d7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 173572b676d7Smrg elif test -x /usr/sbin/sysctl; then 173672b676d7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 173772b676d7Smrg else 173872b676d7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 173972b676d7Smrg fi 174072b676d7Smrg # And add a safety zone 174172b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 174272b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 174372b676d7Smrg ;; 174472b676d7Smrg 174572b676d7Smrg interix*) 174672b676d7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 174772b676d7Smrg lt_cv_sys_max_cmd_len=196608 174872b676d7Smrg ;; 174972b676d7Smrg 175074c14cd6Smrg os2*) 175174c14cd6Smrg # The test takes a long time on OS/2. 175274c14cd6Smrg lt_cv_sys_max_cmd_len=8192 175374c14cd6Smrg ;; 175474c14cd6Smrg 175572b676d7Smrg osf*) 175672b676d7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 175772b676d7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 175872b676d7Smrg # nice to cause kernel panics so lets avoid the loop below. 175972b676d7Smrg # First set a reasonable default. 176072b676d7Smrg lt_cv_sys_max_cmd_len=16384 176172b676d7Smrg # 176272b676d7Smrg if test -x /sbin/sysconfig; then 176372b676d7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 176472b676d7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 176572b676d7Smrg esac 176672b676d7Smrg fi 176772b676d7Smrg ;; 176872b676d7Smrg sco3.2v5*) 176972b676d7Smrg lt_cv_sys_max_cmd_len=102400 177072b676d7Smrg ;; 177172b676d7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 177272b676d7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 177372b676d7Smrg if test -n "$kargmax"; then 1774e35772b2Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 177572b676d7Smrg else 177672b676d7Smrg lt_cv_sys_max_cmd_len=32768 177772b676d7Smrg fi 177872b676d7Smrg ;; 177972b676d7Smrg *) 17801fd23544Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 178121525869Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 178221525869Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17831fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17841fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17851fd23544Smrg else 1786e35772b2Smrg # Make teststring a little bigger before we do anything with it. 1787e35772b2Smrg # a 1K string should be a reasonable start. 178821525869Smrg for i in 1 2 3 4 5 6 7 8; do 1789e35772b2Smrg teststring=$teststring$teststring 1790e35772b2Smrg done 17911fd23544Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1792e35772b2Smrg # If test is not a shell built-in, we'll probably end up computing a 1793e35772b2Smrg # maximum length that is only half of the actual maximum length, but 1794e35772b2Smrg # we can't tell. 179521525869Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 179674c14cd6Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 179721525869Smrg test 17 != "$i" # 1/2 MB should be enough 17981fd23544Smrg do 17991fd23544Smrg i=`expr $i + 1` 18001fd23544Smrg teststring=$teststring$teststring 18011fd23544Smrg done 1802e35772b2Smrg # Only check the string length outside the loop. 1803e35772b2Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18041fd23544Smrg teststring= 1805e35772b2Smrg # Add a significant safety factor because C++ compilers can tack on 1806e35772b2Smrg # massive amounts of additional arguments before passing them to the 1807e35772b2Smrg # linker. It appears as though 1/2 is a usable value. 18081fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18091fd23544Smrg fi 181072b676d7Smrg ;; 181172b676d7Smrg esac 181272b676d7Smrg]) 181321525869Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 181472b676d7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 181572b676d7Smrgelse 181672b676d7Smrg AC_MSG_RESULT(none) 181772b676d7Smrgfi 1818e35772b2Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1819e35772b2Smrg_LT_DECL([], [max_cmd_len], [0], 1820e35772b2Smrg [What is the maximum length of a command?]) 1821e35772b2Smrg])# LT_CMD_MAX_LEN 182272b676d7Smrg 1823e35772b2Smrg# Old name: 1824e35772b2SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1825e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1826e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 182772b676d7Smrg 1828e35772b2Smrg 1829e35772b2Smrg# _LT_HEADER_DLFCN 1830e35772b2Smrg# ---------------- 1831e35772b2Smrgm4_defun([_LT_HEADER_DLFCN], 1832e35772b2Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1833e35772b2Smrg])# _LT_HEADER_DLFCN 183472b676d7Smrg 183572b676d7Smrg 1836e35772b2Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1837e35772b2Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1838e35772b2Smrg# ---------------------------------------------------------------- 1839e35772b2Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1840e35772b2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 184121525869Smrgif test yes = "$cross_compiling"; then : 184272b676d7Smrg [$4] 184372b676d7Smrgelse 184472b676d7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 184572b676d7Smrg lt_status=$lt_dlunknown 1846e35772b2Smrg cat > conftest.$ac_ext <<_LT_EOF 184774c14cd6Smrg[#line $LINENO "configure" 184872b676d7Smrg#include "confdefs.h" 184972b676d7Smrg 185072b676d7Smrg#if HAVE_DLFCN_H 185172b676d7Smrg#include <dlfcn.h> 185272b676d7Smrg#endif 185372b676d7Smrg 185472b676d7Smrg#include <stdio.h> 185572b676d7Smrg 185672b676d7Smrg#ifdef RTLD_GLOBAL 185772b676d7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 185872b676d7Smrg#else 185972b676d7Smrg# ifdef DL_GLOBAL 186072b676d7Smrg# define LT_DLGLOBAL DL_GLOBAL 186172b676d7Smrg# else 186272b676d7Smrg# define LT_DLGLOBAL 0 186372b676d7Smrg# endif 186472b676d7Smrg#endif 186572b676d7Smrg 186672b676d7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 186772b676d7Smrg find out it does not work in some platform. */ 186872b676d7Smrg#ifndef LT_DLLAZY_OR_NOW 186972b676d7Smrg# ifdef RTLD_LAZY 187072b676d7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 187172b676d7Smrg# else 187272b676d7Smrg# ifdef DL_LAZY 187372b676d7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 187472b676d7Smrg# else 187572b676d7Smrg# ifdef RTLD_NOW 187672b676d7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 187772b676d7Smrg# else 187872b676d7Smrg# ifdef DL_NOW 187972b676d7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 188072b676d7Smrg# else 188172b676d7Smrg# define LT_DLLAZY_OR_NOW 0 188272b676d7Smrg# endif 188372b676d7Smrg# endif 188472b676d7Smrg# endif 188572b676d7Smrg# endif 188672b676d7Smrg#endif 188772b676d7Smrg 188821525869Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 188974c14cd6Smrg correspondingly for the symbols needed. */ 189021525869Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 189174c14cd6Smrgint fnord () __attribute__((visibility("default"))); 189274c14cd6Smrg#endif 189374c14cd6Smrg 189474c14cd6Smrgint fnord () { return 42; } 189572b676d7Smrgint main () 189672b676d7Smrg{ 189772b676d7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 189872b676d7Smrg int status = $lt_dlunknown; 189972b676d7Smrg 190072b676d7Smrg if (self) 190172b676d7Smrg { 190272b676d7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 190374c14cd6Smrg else 190474c14cd6Smrg { 190574c14cd6Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 190674c14cd6Smrg else puts (dlerror ()); 190774c14cd6Smrg } 190872b676d7Smrg /* dlclose (self); */ 190972b676d7Smrg } 191072b676d7Smrg else 191172b676d7Smrg puts (dlerror ()); 191272b676d7Smrg 1913e35772b2Smrg return status; 191472b676d7Smrg}] 1915e35772b2Smrg_LT_EOF 191621525869Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 191772b676d7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 191872b676d7Smrg lt_status=$? 191972b676d7Smrg case x$lt_status in 192072b676d7Smrg x$lt_dlno_uscore) $1 ;; 192172b676d7Smrg x$lt_dlneed_uscore) $2 ;; 192272b676d7Smrg x$lt_dlunknown|x*) $3 ;; 192372b676d7Smrg esac 192472b676d7Smrg else : 192572b676d7Smrg # compilation failed 192672b676d7Smrg $3 192772b676d7Smrg fi 192872b676d7Smrgfi 192972b676d7Smrgrm -fr conftest* 1930e35772b2Smrg])# _LT_TRY_DLOPEN_SELF 193172b676d7Smrg 193272b676d7Smrg 1933e35772b2Smrg# LT_SYS_DLOPEN_SELF 1934e35772b2Smrg# ------------------ 1935e35772b2SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1936e35772b2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 193721525869Smrgif test yes != "$enable_dlopen"; then 193872b676d7Smrg enable_dlopen=unknown 193972b676d7Smrg enable_dlopen_self=unknown 194072b676d7Smrg enable_dlopen_self_static=unknown 194172b676d7Smrgelse 194272b676d7Smrg lt_cv_dlopen=no 194372b676d7Smrg lt_cv_dlopen_libs= 194472b676d7Smrg 194572b676d7Smrg case $host_os in 194672b676d7Smrg beos*) 194721525869Smrg lt_cv_dlopen=load_add_on 194872b676d7Smrg lt_cv_dlopen_libs= 194972b676d7Smrg lt_cv_dlopen_self=yes 195072b676d7Smrg ;; 195172b676d7Smrg 1952e35772b2Smrg mingw* | pw32* | cegcc*) 195321525869Smrg lt_cv_dlopen=LoadLibrary 195472b676d7Smrg lt_cv_dlopen_libs= 1955e35772b2Smrg ;; 195672b676d7Smrg 195772b676d7Smrg cygwin*) 195821525869Smrg lt_cv_dlopen=dlopen 195972b676d7Smrg lt_cv_dlopen_libs= 1960e35772b2Smrg ;; 196172b676d7Smrg 196272b676d7Smrg darwin*) 196321525869Smrg # if libdl is installed we need to link against it 196472b676d7Smrg AC_CHECK_LIB([dl], [dlopen], 196521525869Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 196621525869Smrg lt_cv_dlopen=dyld 196772b676d7Smrg lt_cv_dlopen_libs= 196872b676d7Smrg lt_cv_dlopen_self=yes 196972b676d7Smrg ]) 1970e35772b2Smrg ;; 197172b676d7Smrg 197221525869Smrg tpf*) 197321525869Smrg # Don't try to run any link tests for TPF. We know it's impossible 197421525869Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 197521525869Smrg lt_cv_dlopen=dlopen 197621525869Smrg lt_cv_dlopen_libs= 197721525869Smrg lt_cv_dlopen_self=no 197821525869Smrg ;; 197921525869Smrg 198072b676d7Smrg *) 198172b676d7Smrg AC_CHECK_FUNC([shl_load], 198221525869Smrg [lt_cv_dlopen=shl_load], 198372b676d7Smrg [AC_CHECK_LIB([dld], [shl_load], 198421525869Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 198572b676d7Smrg [AC_CHECK_FUNC([dlopen], 198621525869Smrg [lt_cv_dlopen=dlopen], 198772b676d7Smrg [AC_CHECK_LIB([dl], [dlopen], 198821525869Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 198972b676d7Smrg [AC_CHECK_LIB([svld], [dlopen], 199021525869Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 199172b676d7Smrg [AC_CHECK_LIB([dld], [dld_link], 199221525869Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 199372b676d7Smrg ]) 199472b676d7Smrg ]) 199572b676d7Smrg ]) 199672b676d7Smrg ]) 199772b676d7Smrg ]) 199872b676d7Smrg ;; 199972b676d7Smrg esac 200072b676d7Smrg 200121525869Smrg if test no = "$lt_cv_dlopen"; then 200272b676d7Smrg enable_dlopen=no 200321525869Smrg else 200421525869Smrg enable_dlopen=yes 200572b676d7Smrg fi 200672b676d7Smrg 200772b676d7Smrg case $lt_cv_dlopen in 200872b676d7Smrg dlopen) 200921525869Smrg save_CPPFLAGS=$CPPFLAGS 201021525869Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 201172b676d7Smrg 201221525869Smrg save_LDFLAGS=$LDFLAGS 201372b676d7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 201472b676d7Smrg 201521525869Smrg save_LIBS=$LIBS 201672b676d7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 201772b676d7Smrg 201872b676d7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 201972b676d7Smrg lt_cv_dlopen_self, [dnl 2020e35772b2Smrg _LT_TRY_DLOPEN_SELF( 202172b676d7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 202272b676d7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 202372b676d7Smrg ]) 202472b676d7Smrg 202521525869Smrg if test yes = "$lt_cv_dlopen_self"; then 202672b676d7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 202772b676d7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2028e35772b2Smrg lt_cv_dlopen_self_static, [dnl 2029e35772b2Smrg _LT_TRY_DLOPEN_SELF( 203072b676d7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 203172b676d7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 203272b676d7Smrg ]) 203372b676d7Smrg fi 203472b676d7Smrg 203521525869Smrg CPPFLAGS=$save_CPPFLAGS 203621525869Smrg LDFLAGS=$save_LDFLAGS 203721525869Smrg LIBS=$save_LIBS 203872b676d7Smrg ;; 203972b676d7Smrg esac 204072b676d7Smrg 204172b676d7Smrg case $lt_cv_dlopen_self in 204272b676d7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 204372b676d7Smrg *) enable_dlopen_self=unknown ;; 204472b676d7Smrg esac 204572b676d7Smrg 204672b676d7Smrg case $lt_cv_dlopen_self_static in 204772b676d7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 204872b676d7Smrg *) enable_dlopen_self_static=unknown ;; 204972b676d7Smrg esac 205072b676d7Smrgfi 2051e35772b2Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2052e35772b2Smrg [Whether dlopen is supported]) 2053e35772b2Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2054e35772b2Smrg [Whether dlopen of programs is supported]) 2055e35772b2Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2056e35772b2Smrg [Whether dlopen of statically linked programs is supported]) 2057e35772b2Smrg])# LT_SYS_DLOPEN_SELF 205872b676d7Smrg 2059e35772b2Smrg# Old name: 2060e35772b2SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2061e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 2062e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 206372b676d7Smrg 2064e35772b2Smrg 2065e35772b2Smrg# _LT_COMPILER_C_O([TAGNAME]) 2066e35772b2Smrg# --------------------------- 2067e35772b2Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 2068e35772b2Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2069e35772b2Smrgm4_defun([_LT_COMPILER_C_O], 2070e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 2071e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2072e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 207372b676d7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2074e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2075e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2076e35772b2Smrg $RM -r conftest 2>/dev/null 207772b676d7Smrg mkdir conftest 207872b676d7Smrg cd conftest 207972b676d7Smrg mkdir out 20801fd23544Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 208172b676d7Smrg 208272b676d7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 208372b676d7Smrg # Insert the option either (1) after the last *FLAGS variable, or 208472b676d7Smrg # (2) before a word containing "conftest.", or (3) at the end. 208572b676d7Smrg # Note that $ac_compile itself does not contain backslashes and begins 208672b676d7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 208772b676d7Smrg lt_compile=`echo "$ac_compile" | $SED \ 208872b676d7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 208972b676d7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 209072b676d7Smrg -e 's:$: $lt_compiler_flag:'` 209174c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 209272b676d7Smrg (eval "$lt_compile" 2>out/conftest.err) 209372b676d7Smrg ac_status=$? 209472b676d7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 209574c14cd6Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 209672b676d7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 209772b676d7Smrg then 209872b676d7Smrg # The compiler can only warn and ignore the option if not recognized 209972b676d7Smrg # So say no if there are warnings 210074c14cd6Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 210172b676d7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 210272b676d7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2103e35772b2Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 210472b676d7Smrg fi 210572b676d7Smrg fi 210672b676d7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2107e35772b2Smrg $RM conftest* 210872b676d7Smrg # SGI C++ compiler will create directory out/ii_files/ for 210972b676d7Smrg # template instantiation 2110e35772b2Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2111e35772b2Smrg $RM out/* && rmdir out 211272b676d7Smrg cd .. 2113e35772b2Smrg $RM -r conftest 2114e35772b2Smrg $RM conftest* 211572b676d7Smrg]) 2116e35772b2Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2117e35772b2Smrg [Does compiler simultaneously support -c and -o options?]) 2118e35772b2Smrg])# _LT_COMPILER_C_O 211972b676d7Smrg 212072b676d7Smrg 2121e35772b2Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2122e35772b2Smrg# ---------------------------------- 212372b676d7Smrg# Check to see if we can do hard links to lock some files if needed 2124e35772b2Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2125e35772b2Smrg[m4_require([_LT_ENABLE_LOCK])dnl 2126e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2127e35772b2Smrg_LT_COMPILER_C_O([$1]) 212872b676d7Smrg 212921525869Smrghard_links=nottested 213021525869Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 213172b676d7Smrg # do not overwrite the value of need_locks provided by the user 213272b676d7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 213372b676d7Smrg hard_links=yes 2134e35772b2Smrg $RM conftest* 213572b676d7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213672b676d7Smrg touch conftest.a 213772b676d7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 213872b676d7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213972b676d7Smrg AC_MSG_RESULT([$hard_links]) 214021525869Smrg if test no = "$hard_links"; then 214121525869Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 214272b676d7Smrg need_locks=warn 214372b676d7Smrg fi 214472b676d7Smrgelse 214572b676d7Smrg need_locks=no 214672b676d7Smrgfi 2147e35772b2Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2148e35772b2Smrg])# _LT_COMPILER_FILE_LOCKS 214972b676d7Smrg 215072b676d7Smrg 2151e35772b2Smrg# _LT_CHECK_OBJDIR 2152e35772b2Smrg# ---------------- 2153e35772b2Smrgm4_defun([_LT_CHECK_OBJDIR], 215472b676d7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 215572b676d7Smrg[rm -f .libs 2>/dev/null 215672b676d7Smrgmkdir .libs 2>/dev/null 215772b676d7Smrgif test -d .libs; then 215872b676d7Smrg lt_cv_objdir=.libs 215972b676d7Smrgelse 216072b676d7Smrg # MS-DOS does not allow filenames that begin with a dot. 216172b676d7Smrg lt_cv_objdir=_libs 216272b676d7Smrgfi 216372b676d7Smrgrmdir .libs 2>/dev/null]) 216472b676d7Smrgobjdir=$lt_cv_objdir 2165e35772b2Smrg_LT_DECL([], [objdir], [0], 2166e35772b2Smrg [The name of the directory that contains temporary libtool files])dnl 2167e35772b2Smrgm4_pattern_allow([LT_OBJDIR])dnl 216821525869SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 216921525869Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2170e35772b2Smrg])# _LT_CHECK_OBJDIR 217172b676d7Smrg 217272b676d7Smrg 2173e35772b2Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2174e35772b2Smrg# -------------------------------------- 217572b676d7Smrg# Check hardcoding attributes. 2176e35772b2Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 217772b676d7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2178e35772b2Smrg_LT_TAGVAR(hardcode_action, $1)= 2179e35772b2Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2180e35772b2Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 218121525869Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 218272b676d7Smrg 2183e35772b2Smrg # We can hardcode non-existent directories. 218421525869Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 218572b676d7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 218672b676d7Smrg # have to relink, otherwise we might link with an installed library 218772b676d7Smrg # when we should be linking with a yet-to-be-installed one 218821525869Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 218921525869Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 219072b676d7Smrg # Linking always hardcodes the temporary library directory. 2191e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=relink 219272b676d7Smrg else 219372b676d7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2194e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 219572b676d7Smrg fi 219672b676d7Smrgelse 219772b676d7Smrg # We cannot hardcode anything, or else we can only hardcode existing 219872b676d7Smrg # directories. 2199e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 220072b676d7Smrgfi 2201e35772b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 220272b676d7Smrg 220321525869Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 220421525869Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 220572b676d7Smrg # Fast installation is not supported 220672b676d7Smrg enable_fast_install=no 220721525869Smrgelif test yes = "$shlibpath_overrides_runpath" || 220821525869Smrg test no = "$enable_shared"; then 220972b676d7Smrg # Fast installation is not necessary 221072b676d7Smrg enable_fast_install=needless 221172b676d7Smrgfi 2212e35772b2Smrg_LT_TAGDECL([], [hardcode_action], [0], 2213e35772b2Smrg [How to hardcode a shared library path into an executable]) 2214e35772b2Smrg])# _LT_LINKER_HARDCODE_LIBPATH 221572b676d7Smrg 221672b676d7Smrg 2217e35772b2Smrg# _LT_CMD_STRIPLIB 2218e35772b2Smrg# ---------------- 2219e35772b2Smrgm4_defun([_LT_CMD_STRIPLIB], 2220e35772b2Smrg[m4_require([_LT_DECL_EGREP]) 2221e35772b2Smrgstriplib= 222272b676d7Smrgold_striplib= 222372b676d7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2224e35772b2Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 222572b676d7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 222672b676d7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 222772b676d7Smrg AC_MSG_RESULT([yes]) 222872b676d7Smrgelse 222972b676d7Smrg# FIXME - insert some real tests, host_os isn't really good enough 223072b676d7Smrg case $host_os in 2231e35772b2Smrg darwin*) 223221525869Smrg if test -n "$STRIP"; then 2233e35772b2Smrg striplib="$STRIP -x" 2234e35772b2Smrg old_striplib="$STRIP -S" 2235e35772b2Smrg AC_MSG_RESULT([yes]) 2236e35772b2Smrg else 2237e35772b2Smrg AC_MSG_RESULT([no]) 2238e35772b2Smrg fi 2239e35772b2Smrg ;; 2240e35772b2Smrg *) 2241e35772b2Smrg AC_MSG_RESULT([no]) 224272b676d7Smrg ;; 224372b676d7Smrg esac 224472b676d7Smrgfi 2245e35772b2Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2246e35772b2Smrg_LT_DECL([], [striplib], [1]) 2247e35772b2Smrg])# _LT_CMD_STRIPLIB 224872b676d7Smrg 224972b676d7Smrg 225021525869Smrg# _LT_PREPARE_MUNGE_PATH_LIST 225121525869Smrg# --------------------------- 225221525869Smrg# Make sure func_munge_path_list() is defined correctly. 225321525869Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 225421525869Smrg[[# func_munge_path_list VARIABLE PATH 225521525869Smrg# ----------------------------------- 225621525869Smrg# VARIABLE is name of variable containing _space_ separated list of 225721525869Smrg# directories to be munged by the contents of PATH, which is string 225821525869Smrg# having a format: 225921525869Smrg# "DIR[:DIR]:" 226021525869Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 226121525869Smrg# ":DIR[:DIR]" 226221525869Smrg# string "DIR[ DIR]" will be appended to VARIABLE 226321525869Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 226421525869Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 226521525869Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 226621525869Smrg# "DIR[:DIR]" 226721525869Smrg# VARIABLE will be replaced by "DIR[ DIR]" 226821525869Smrgfunc_munge_path_list () 226921525869Smrg{ 227021525869Smrg case x@S|@2 in 227121525869Smrg x) 227221525869Smrg ;; 227321525869Smrg *:) 227421525869Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 227521525869Smrg ;; 227621525869Smrg x:*) 227721525869Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 227821525869Smrg ;; 227921525869Smrg *::*) 228021525869Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 228121525869Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 228221525869Smrg ;; 228321525869Smrg *) 228421525869Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 228521525869Smrg ;; 228621525869Smrg esac 228721525869Smrg} 228821525869Smrg]])# _LT_PREPARE_PATH_LIST 228921525869Smrg 229021525869Smrg 2291e35772b2Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 229272b676d7Smrg# ----------------------------- 229372b676d7Smrg# PORTME Fill in your ld.so characteristics 2294e35772b2Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2295e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2296e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 2297e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2298e35772b2Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2299e35772b2Smrgm4_require([_LT_DECL_SED])dnl 230074c14cd6Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 230121525869Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23021fd23544SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2303e35772b2Smrgm4_if([$1], 2304e35772b2Smrg [], [ 230521525869Smrgif test yes = "$GCC"; then 23061fd23544Smrg case $host_os in 230721525869Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 230821525869Smrg *) lt_awk_arg='/^libraries:/' ;; 23091fd23544Smrg esac 231074c14cd6Smrg case $host_os in 231121525869Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 231221525869Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 231374c14cd6Smrg esac 231474c14cd6Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 231574c14cd6Smrg case $lt_search_path_spec in 231674c14cd6Smrg *\;*) 231772b676d7Smrg # if the path contains ";" then we assume it to be the separator 231872b676d7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 231972b676d7Smrg # assumed that no part of a normal pathname contains ";" but that should 232072b676d7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 232174c14cd6Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 232274c14cd6Smrg ;; 232374c14cd6Smrg *) 232474c14cd6Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 232574c14cd6Smrg ;; 232674c14cd6Smrg esac 23271fd23544Smrg # Ok, now we have the path, separated by spaces, we can step through it 232821525869Smrg # and add multilib dir if necessary... 23291fd23544Smrg lt_tmp_lt_search_path_spec= 233021525869Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 233121525869Smrg # ...but if some path component already ends with the multilib dir we assume 233221525869Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 233321525869Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 233421525869Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 233521525869Smrg lt_multi_os_dir= 233621525869Smrg ;; 233721525869Smrg esac 23381fd23544Smrg for lt_sys_path in $lt_search_path_spec; do 233921525869Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 234021525869Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 234121525869Smrg elif test -n "$lt_multi_os_dir"; then 23421fd23544Smrg test -d "$lt_sys_path" && \ 23431fd23544Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23441fd23544Smrg fi 23451fd23544Smrg done 234674c14cd6Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 234721525869SmrgBEGIN {RS = " "; FS = "/|\n";} { 234821525869Smrg lt_foo = ""; 234921525869Smrg lt_count = 0; 23501fd23544Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 23511fd23544Smrg if ($lt_i != "" && $lt_i != ".") { 23521fd23544Smrg if ($lt_i == "..") { 23531fd23544Smrg lt_count++; 23541fd23544Smrg } else { 23551fd23544Smrg if (lt_count == 0) { 235621525869Smrg lt_foo = "/" $lt_i lt_foo; 23571fd23544Smrg } else { 23581fd23544Smrg lt_count--; 23591fd23544Smrg } 23601fd23544Smrg } 23611fd23544Smrg } 23621fd23544Smrg } 23631fd23544Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23641fd23544Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23651fd23544Smrg}'` 236674c14cd6Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 236774c14cd6Smrg # for these hosts. 236874c14cd6Smrg case $host_os in 236974c14cd6Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 237021525869Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 237174c14cd6Smrg esac 237274c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 237372b676d7Smrgelse 237472b676d7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23751fd23544Smrgfi]) 2376e35772b2Smrglibrary_names_spec= 2377e35772b2Smrglibname_spec='lib$name' 2378e35772b2Smrgsoname_spec= 237921525869Smrgshrext_cmds=.so 2380e35772b2Smrgpostinstall_cmds= 2381e35772b2Smrgpostuninstall_cmds= 2382e35772b2Smrgfinish_cmds= 2383e35772b2Smrgfinish_eval= 2384e35772b2Smrgshlibpath_var= 2385e35772b2Smrgshlibpath_overrides_runpath=unknown 2386e35772b2Smrgversion_type=none 2387e35772b2Smrgdynamic_linker="$host_os ld.so" 2388e35772b2Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 238972b676d7Smrgneed_lib_prefix=unknown 239072b676d7Smrghardcode_into_libs=no 239172b676d7Smrg 239272b676d7Smrg# when you set need_version to no, make sure it does not cause -set_version 239372b676d7Smrg# flags to be left without arguments 239472b676d7Smrgneed_version=unknown 239572b676d7Smrg 239621525869SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 239721525869Smrg[User-defined run-time library search path.]) 239821525869Smrg 239972b676d7Smrgcase $host_os in 240072b676d7Smrgaix3*) 240174c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 240221525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 240372b676d7Smrg shlibpath_var=LIBPATH 240472b676d7Smrg 240572b676d7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 240621525869Smrg soname_spec='$libname$release$shared_ext$major' 240772b676d7Smrg ;; 240872b676d7Smrg 24091fd23544Smrgaix[[4-9]]*) 241074c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 241172b676d7Smrg need_lib_prefix=no 241272b676d7Smrg need_version=no 241372b676d7Smrg hardcode_into_libs=yes 241421525869Smrg if test ia64 = "$host_cpu"; then 241572b676d7Smrg # AIX 5 supports IA64 241621525869Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 241772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 241872b676d7Smrg else 241972b676d7Smrg # With GCC up to 2.95.x, collect2 would create an import file 242072b676d7Smrg # for dependence libraries. The import file would start with 242121525869Smrg # the line '#! .'. This would cause the generated library to 242221525869Smrg # depend on '.', always an invalid library. This was fixed in 242372b676d7Smrg # development snapshots of GCC prior to 3.0. 242472b676d7Smrg case $host_os in 242572b676d7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 242672b676d7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 242772b676d7Smrg echo ' yes ' 242821525869Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 242972b676d7Smrg : 243072b676d7Smrg else 243172b676d7Smrg can_build_shared=no 243272b676d7Smrg fi 243372b676d7Smrg ;; 243472b676d7Smrg esac 243521525869Smrg # Using Import Files as archive members, it is possible to support 243621525869Smrg # filename-based versioning of shared library archives on AIX. While 243721525869Smrg # this would work for both with and without runtime linking, it will 243821525869Smrg # prevent static linking of such archives. So we do filename-based 243921525869Smrg # shared library versioning with .so extension only, which is used 244021525869Smrg # when both runtime linking and shared linking is enabled. 244121525869Smrg # Unfortunately, runtime linking may impact performance, so we do 244221525869Smrg # not want this to be the default eventually. Also, we use the 244321525869Smrg # versioned .so libs for executables only if there is the -brtl 244421525869Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 244521525869Smrg # To allow for filename-based versioning support, we need to create 244621525869Smrg # libNAME.so.V as an archive file, containing: 244721525869Smrg # *) an Import File, referring to the versioned filename of the 244821525869Smrg # archive as well as the shared archive member, telling the 244921525869Smrg # bitwidth (32 or 64) of that shared object, and providing the 245021525869Smrg # list of exported symbols of that shared object, eventually 245121525869Smrg # decorated with the 'weak' keyword 245221525869Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 245321525869Smrg # it being seen by the linker. 245421525869Smrg # At run time we better use the real file rather than another symlink, 245521525869Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 245621525869Smrg 245721525869Smrg case $with_aix_soname,$aix_use_runtimelinking in 245821525869Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 245972b676d7Smrg # soname into executable. Probably we can add versioning support to 246072b676d7Smrg # collect2, so additional links can be useful in future. 246121525869Smrg aix,yes) # traditional libtool 246221525869Smrg dynamic_linker='AIX unversionable lib.so' 246372b676d7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 246472b676d7Smrg # instead of lib<name>.a to let people know that these are not 246572b676d7Smrg # typical AIX shared libraries. 246621525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 246721525869Smrg ;; 246821525869Smrg aix,no) # traditional AIX only 246921525869Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 247072b676d7Smrg # We preserve .a as extension for shared libraries through AIX4.2 247172b676d7Smrg # and later when we are not doing run time linking. 247221525869Smrg library_names_spec='$libname$release.a $libname.a' 247321525869Smrg soname_spec='$libname$release$shared_ext$major' 247421525869Smrg ;; 247521525869Smrg svr4,*) # full svr4 only 247621525869Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 247721525869Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 247821525869Smrg # We do not specify a path in Import Files, so LIBPATH fires. 247921525869Smrg shlibpath_overrides_runpath=yes 248021525869Smrg ;; 248121525869Smrg *,yes) # both, prefer svr4 248221525869Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 248321525869Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 248421525869Smrg # unpreferred sharedlib libNAME.a needs extra handling 248521525869Smrg 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"' 248621525869Smrg 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"' 248721525869Smrg # We do not specify a path in Import Files, so LIBPATH fires. 248821525869Smrg shlibpath_overrides_runpath=yes 248921525869Smrg ;; 249021525869Smrg *,no) # both, prefer aix 249121525869Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 249221525869Smrg library_names_spec='$libname$release.a $libname.a' 249321525869Smrg soname_spec='$libname$release$shared_ext$major' 249421525869Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 249521525869Smrg 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)' 249621525869Smrg 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"' 249721525869Smrg ;; 249821525869Smrg esac 249972b676d7Smrg shlibpath_var=LIBPATH 250072b676d7Smrg fi 250172b676d7Smrg ;; 250272b676d7Smrg 250372b676d7Smrgamigaos*) 2504e35772b2Smrg case $host_cpu in 2505e35772b2Smrg powerpc) 2506e35772b2Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2507e35772b2Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 250821525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2509e35772b2Smrg ;; 2510e35772b2Smrg m68k) 2511e35772b2Smrg library_names_spec='$libname.ixlibrary $libname.a' 2512e35772b2Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 251321525869Smrg 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' 2514e35772b2Smrg ;; 2515e35772b2Smrg esac 251672b676d7Smrg ;; 251772b676d7Smrg 251872b676d7Smrgbeos*) 251921525869Smrg library_names_spec='$libname$shared_ext' 252072b676d7Smrg dynamic_linker="$host_os ld.so" 252172b676d7Smrg shlibpath_var=LIBRARY_PATH 252272b676d7Smrg ;; 252372b676d7Smrg 252472b676d7Smrgbsdi[[45]]*) 252574c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 252672b676d7Smrg need_version=no 252721525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 252821525869Smrg soname_spec='$libname$release$shared_ext$major' 252972b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 253072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 253172b676d7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 253272b676d7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 253372b676d7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 253472b676d7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 253572b676d7Smrg # libtool to hard-code these into programs 253672b676d7Smrg ;; 253772b676d7Smrg 2538e35772b2Smrgcygwin* | mingw* | pw32* | cegcc*) 253972b676d7Smrg version_type=windows 254021525869Smrg shrext_cmds=.dll 254172b676d7Smrg need_version=no 254272b676d7Smrg need_lib_prefix=no 254372b676d7Smrg 254474c14cd6Smrg case $GCC,$cc_basename in 254574c14cd6Smrg yes,*) 254674c14cd6Smrg # gcc 254772b676d7Smrg library_names_spec='$libname.dll.a' 254872b676d7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 254921525869Smrg postinstall_cmds='base_file=`basename \$file`~ 255021525869Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 255172b676d7Smrg dldir=$destdir/`dirname \$dlpath`~ 255272b676d7Smrg test -d \$dldir || mkdir -p \$dldir~ 255372b676d7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2554e35772b2Smrg chmod a+x \$dldir/$dlname~ 2555e35772b2Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2556e35772b2Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2557e35772b2Smrg fi' 255872b676d7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 255972b676d7Smrg dlpath=$dir/\$dldll~ 2560e35772b2Smrg $RM \$dlpath' 256172b676d7Smrg shlibpath_overrides_runpath=yes 256272b676d7Smrg 256372b676d7Smrg case $host_os in 256472b676d7Smrg cygwin*) 256572b676d7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 256621525869Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 256774c14cd6Smrgm4_if([$1], [],[ 256874c14cd6Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 256972b676d7Smrg ;; 2570e35772b2Smrg mingw* | cegcc*) 257172b676d7Smrg # MinGW DLLs use traditional 'lib' prefix 257221525869Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257372b676d7Smrg ;; 257472b676d7Smrg pw32*) 257572b676d7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 257621525869Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257772b676d7Smrg ;; 257872b676d7Smrg esac 257974c14cd6Smrg dynamic_linker='Win32 ld.exe' 258074c14cd6Smrg ;; 258174c14cd6Smrg 258274c14cd6Smrg *,cl*) 258374c14cd6Smrg # Native MSVC 258474c14cd6Smrg libname_spec='$name' 258521525869Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 258621525869Smrg library_names_spec='$libname.dll.lib' 258774c14cd6Smrg 258874c14cd6Smrg case $build_os in 258974c14cd6Smrg mingw*) 259074c14cd6Smrg sys_lib_search_path_spec= 259174c14cd6Smrg lt_save_ifs=$IFS 259274c14cd6Smrg IFS=';' 259374c14cd6Smrg for lt_path in $LIB 259474c14cd6Smrg do 259574c14cd6Smrg IFS=$lt_save_ifs 259674c14cd6Smrg # Let DOS variable expansion print the short 8.3 style file name. 259774c14cd6Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 259874c14cd6Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 259974c14cd6Smrg done 260074c14cd6Smrg IFS=$lt_save_ifs 260174c14cd6Smrg # Convert to MSYS style. 260274c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 260374c14cd6Smrg ;; 260474c14cd6Smrg cygwin*) 260574c14cd6Smrg # Convert to unix form, then to dos form, then back to unix form 260674c14cd6Smrg # but this time dos style (no spaces!) so that the unix form looks 260774c14cd6Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 260874c14cd6Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 260974c14cd6Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 261074c14cd6Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 261174c14cd6Smrg ;; 261274c14cd6Smrg *) 261321525869Smrg sys_lib_search_path_spec=$LIB 261474c14cd6Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 261574c14cd6Smrg # It is most probably a Windows format PATH. 261674c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 261774c14cd6Smrg else 261874c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 261974c14cd6Smrg fi 262074c14cd6Smrg # FIXME: find the short name or the path components, as spaces are 262174c14cd6Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 262274c14cd6Smrg ;; 262374c14cd6Smrg esac 262474c14cd6Smrg 262574c14cd6Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 262621525869Smrg postinstall_cmds='base_file=`basename \$file`~ 262721525869Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 262874c14cd6Smrg dldir=$destdir/`dirname \$dlpath`~ 262974c14cd6Smrg test -d \$dldir || mkdir -p \$dldir~ 263074c14cd6Smrg $install_prog $dir/$dlname \$dldir/$dlname' 263174c14cd6Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 263274c14cd6Smrg dlpath=$dir/\$dldll~ 263374c14cd6Smrg $RM \$dlpath' 263474c14cd6Smrg shlibpath_overrides_runpath=yes 263574c14cd6Smrg dynamic_linker='Win32 link.exe' 263672b676d7Smrg ;; 263772b676d7Smrg 263872b676d7Smrg *) 263974c14cd6Smrg # Assume MSVC wrapper 264021525869Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 264174c14cd6Smrg dynamic_linker='Win32 ld.exe' 264272b676d7Smrg ;; 264372b676d7Smrg esac 264472b676d7Smrg # FIXME: first we should search . and the directory the executable is in 264572b676d7Smrg shlibpath_var=PATH 264672b676d7Smrg ;; 264772b676d7Smrg 264872b676d7Smrgdarwin* | rhapsody*) 264972b676d7Smrg dynamic_linker="$host_os dyld" 265072b676d7Smrg version_type=darwin 265172b676d7Smrg need_lib_prefix=no 265272b676d7Smrg need_version=no 265321525869Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 265421525869Smrg soname_spec='$libname$release$major$shared_ext' 265572b676d7Smrg shlibpath_overrides_runpath=yes 265672b676d7Smrg shlibpath_var=DYLD_LIBRARY_PATH 265772b676d7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2658e35772b2Smrgm4_if([$1], [],[ 2659e35772b2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 266072b676d7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 266172b676d7Smrg ;; 266272b676d7Smrg 266372b676d7Smrgdgux*) 266474c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 266572b676d7Smrg need_lib_prefix=no 266672b676d7Smrg need_version=no 266721525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 266821525869Smrg soname_spec='$libname$release$shared_ext$major' 266972b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 267072b676d7Smrg ;; 267172b676d7Smrg 267272b676d7Smrgfreebsd* | dragonfly*) 267372b676d7Smrg # DragonFly does not have aout. When/if they implement a new 267472b676d7Smrg # versioning mechanism, adjust this. 267572b676d7Smrg if test -x /usr/bin/objformat; then 267672b676d7Smrg objformat=`/usr/bin/objformat` 267772b676d7Smrg else 267872b676d7Smrg case $host_os in 267974c14cd6Smrg freebsd[[23]].*) objformat=aout ;; 268072b676d7Smrg *) objformat=elf ;; 268172b676d7Smrg esac 268272b676d7Smrg fi 268321525869Smrg # Handle Gentoo/FreeBSD as it was Linux 268421525869Smrg case $host_vendor in 268521525869Smrg gentoo) 268621525869Smrg version_type=linux ;; 268721525869Smrg *) 268821525869Smrg version_type=freebsd-$objformat ;; 268921525869Smrg esac 269021525869Smrg 269172b676d7Smrg case $version_type in 269272b676d7Smrg freebsd-elf*) 269321525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 269421525869Smrg soname_spec='$libname$release$shared_ext$major' 269572b676d7Smrg need_version=no 269672b676d7Smrg need_lib_prefix=no 269772b676d7Smrg ;; 269872b676d7Smrg freebsd-*) 269921525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 270072b676d7Smrg need_version=yes 270172b676d7Smrg ;; 270221525869Smrg linux) 270321525869Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 270421525869Smrg soname_spec='${libname}${release}${shared_ext}$major' 270521525869Smrg need_lib_prefix=no 270621525869Smrg need_version=no 270721525869Smrg ;; 270872b676d7Smrg esac 270972b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 271072b676d7Smrg case $host_os in 271174c14cd6Smrg freebsd2.*) 271272b676d7Smrg shlibpath_overrides_runpath=yes 271372b676d7Smrg ;; 271472b676d7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 271572b676d7Smrg shlibpath_overrides_runpath=yes 271672b676d7Smrg hardcode_into_libs=yes 271772b676d7Smrg ;; 271872b676d7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 271972b676d7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 272072b676d7Smrg shlibpath_overrides_runpath=no 272172b676d7Smrg hardcode_into_libs=yes 272272b676d7Smrg ;; 27231fd23544Smrg *) # from 4.6 on, and DragonFly 272472b676d7Smrg shlibpath_overrides_runpath=yes 272572b676d7Smrg hardcode_into_libs=yes 272672b676d7Smrg ;; 272772b676d7Smrg esac 272872b676d7Smrg ;; 272972b676d7Smrg 273074c14cd6Smrghaiku*) 273174c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 273274c14cd6Smrg need_lib_prefix=no 273374c14cd6Smrg need_version=no 273474c14cd6Smrg dynamic_linker="$host_os runtime_loader" 273521525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 273621525869Smrg soname_spec='$libname$release$shared_ext$major' 273774c14cd6Smrg shlibpath_var=LIBRARY_PATH 273821525869Smrg shlibpath_overrides_runpath=no 273974c14cd6Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 274072b676d7Smrg hardcode_into_libs=yes 274172b676d7Smrg ;; 274272b676d7Smrg 274372b676d7Smrghpux9* | hpux10* | hpux11*) 274472b676d7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 274572b676d7Smrg # link against other versions. 274672b676d7Smrg version_type=sunos 274772b676d7Smrg need_lib_prefix=no 274872b676d7Smrg need_version=no 274972b676d7Smrg case $host_cpu in 275072b676d7Smrg ia64*) 275172b676d7Smrg shrext_cmds='.so' 275272b676d7Smrg hardcode_into_libs=yes 275372b676d7Smrg dynamic_linker="$host_os dld.so" 275472b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 275572b676d7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 275621525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 275721525869Smrg soname_spec='$libname$release$shared_ext$major' 275821525869Smrg if test 32 = "$HPUX_IA64_MODE"; then 275972b676d7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 276021525869Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 276172b676d7Smrg else 276272b676d7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 276321525869Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 276472b676d7Smrg fi 276572b676d7Smrg ;; 2766e35772b2Smrg hppa*64*) 2767e35772b2Smrg shrext_cmds='.sl' 2768e35772b2Smrg hardcode_into_libs=yes 2769e35772b2Smrg dynamic_linker="$host_os dld.sl" 2770e35772b2Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2771e35772b2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 277221525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 277321525869Smrg soname_spec='$libname$release$shared_ext$major' 2774e35772b2Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2775e35772b2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2776e35772b2Smrg ;; 2777e35772b2Smrg *) 277872b676d7Smrg shrext_cmds='.sl' 277972b676d7Smrg dynamic_linker="$host_os dld.sl" 278072b676d7Smrg shlibpath_var=SHLIB_PATH 278172b676d7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 278221525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 278321525869Smrg soname_spec='$libname$release$shared_ext$major' 278472b676d7Smrg ;; 278572b676d7Smrg esac 278674c14cd6Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 278772b676d7Smrg postinstall_cmds='chmod 555 $lib' 278874c14cd6Smrg # or fails outright, so override atomically: 278974c14cd6Smrg install_override_mode=555 279072b676d7Smrg ;; 279172b676d7Smrg 27921fd23544Smrginterix[[3-9]]*) 279374c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 279472b676d7Smrg need_lib_prefix=no 279572b676d7Smrg need_version=no 279621525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 279721525869Smrg soname_spec='$libname$release$shared_ext$major' 279872b676d7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 279972b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 280072b676d7Smrg shlibpath_overrides_runpath=no 280172b676d7Smrg hardcode_into_libs=yes 280272b676d7Smrg ;; 280372b676d7Smrg 280472b676d7Smrgirix5* | irix6* | nonstopux*) 280572b676d7Smrg case $host_os in 280672b676d7Smrg nonstopux*) version_type=nonstopux ;; 280772b676d7Smrg *) 280821525869Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 280974c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 281072b676d7Smrg else 281172b676d7Smrg version_type=irix 281272b676d7Smrg fi ;; 281372b676d7Smrg esac 281472b676d7Smrg need_lib_prefix=no 281572b676d7Smrg need_version=no 281621525869Smrg soname_spec='$libname$release$shared_ext$major' 281721525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 281872b676d7Smrg case $host_os in 281972b676d7Smrg irix5* | nonstopux*) 282072b676d7Smrg libsuff= shlibsuff= 282172b676d7Smrg ;; 282272b676d7Smrg *) 282372b676d7Smrg case $LD in # libtool.m4 will add one of these switches to LD 282472b676d7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 282572b676d7Smrg libsuff= shlibsuff= libmagic=32-bit;; 282672b676d7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 282772b676d7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 282872b676d7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 282972b676d7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 283072b676d7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 283172b676d7Smrg esac 283272b676d7Smrg ;; 283372b676d7Smrg esac 283472b676d7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 283572b676d7Smrg shlibpath_overrides_runpath=no 283621525869Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 283721525869Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 283872b676d7Smrg hardcode_into_libs=yes 283972b676d7Smrg ;; 284072b676d7Smrg 284172b676d7Smrg# No shared lib support for Linux oldld, aout, or coff. 284272b676d7Smrglinux*oldld* | linux*aout* | linux*coff*) 284372b676d7Smrg dynamic_linker=no 284472b676d7Smrg ;; 284572b676d7Smrg 284621525869Smrglinux*android*) 284721525869Smrg version_type=none # Android doesn't support versioned libraries. 284821525869Smrg need_lib_prefix=no 284921525869Smrg need_version=no 285021525869Smrg library_names_spec='$libname$release$shared_ext' 285121525869Smrg soname_spec='$libname$release$shared_ext' 285221525869Smrg finish_cmds= 285321525869Smrg shlibpath_var=LD_LIBRARY_PATH 285421525869Smrg shlibpath_overrides_runpath=yes 285521525869Smrg 285621525869Smrg # This implies no fast_install, which is unacceptable. 285721525869Smrg # Some rework will be needed to allow for fast_install 285821525869Smrg # before this can be enabled. 285921525869Smrg hardcode_into_libs=yes 286021525869Smrg 286121525869Smrg dynamic_linker='Android linker' 286221525869Smrg # Don't embed -rpath directories since the linker doesn't support them. 286321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 286421525869Smrg ;; 286521525869Smrg 286674c14cd6Smrg# This must be glibc/ELF. 286721525869Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 286874c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 286972b676d7Smrg need_lib_prefix=no 287072b676d7Smrg need_version=no 287121525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 287221525869Smrg soname_spec='$libname$release$shared_ext$major' 287372b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 287472b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 287572b676d7Smrg shlibpath_overrides_runpath=no 287674c14cd6Smrg 2877e35772b2Smrg # Some binutils ld are patched to set DT_RUNPATH 287874c14cd6Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 287974c14cd6Smrg [lt_cv_shlibpath_overrides_runpath=no 288074c14cd6Smrg save_LDFLAGS=$LDFLAGS 288174c14cd6Smrg save_libdir=$libdir 288274c14cd6Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 288374c14cd6Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 288474c14cd6Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 288574c14cd6Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 288674c14cd6Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 288774c14cd6Smrg LDFLAGS=$save_LDFLAGS 288874c14cd6Smrg libdir=$save_libdir 288974c14cd6Smrg ]) 289074c14cd6Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2891e35772b2Smrg 289272b676d7Smrg # This implies no fast_install, which is unacceptable. 289372b676d7Smrg # Some rework will be needed to allow for fast_install 289472b676d7Smrg # before this can be enabled. 289572b676d7Smrg hardcode_into_libs=yes 2896e35772b2Smrg 289721525869Smrg # Ideally, we could use ldconfig to report *all* directores which are 289821525869Smrg # searched for libraries, however this is still not possible. Aside from not 289921525869Smrg # being certain /sbin/ldconfig is available, command 290021525869Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 290121525869Smrg # even though it is searched at run-time. Try to do the best guess by 290221525869Smrg # appending ld.so.conf contents (and includes) to the search path. 290372b676d7Smrg if test -f /etc/ld.so.conf; then 290474c14cd6Smrg 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' ' '` 290521525869Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 290672b676d7Smrg fi 290772b676d7Smrg 290872b676d7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 290972b676d7Smrg # powerpc, because MkLinux only supported shared libraries with the 291072b676d7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 291172b676d7Smrg # most powerpc-linux boxes support dynamic linking these days and 291272b676d7Smrg # people can always --disable-shared, the test was removed, and we 291372b676d7Smrg # assume the GNU/Linux dynamic linker is in use. 291472b676d7Smrg dynamic_linker='GNU/Linux ld.so' 291572b676d7Smrg ;; 291672b676d7Smrg 291772b676d7Smrgnetbsd*) 291872b676d7Smrg version_type=sunos 291972b676d7Smrg need_lib_prefix=no 292072b676d7Smrg need_version=no 2921e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 292221525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 292372b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 292472b676d7Smrg dynamic_linker='NetBSD (a.out) ld.so' 292572b676d7Smrg else 292621525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 292721525869Smrg soname_spec='$libname$release$shared_ext$major' 292872b676d7Smrg dynamic_linker='NetBSD ld.elf_so' 292972b676d7Smrg fi 293072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 293172b676d7Smrg shlibpath_overrides_runpath=yes 293272b676d7Smrg hardcode_into_libs=yes 293372b676d7Smrg ;; 293472b676d7Smrg 293572b676d7Smrgnewsos6) 293674c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 293721525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 293872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 293972b676d7Smrg shlibpath_overrides_runpath=yes 294072b676d7Smrg ;; 294172b676d7Smrg 2942e35772b2Smrg*nto* | *qnx*) 2943e35772b2Smrg version_type=qnx 294472b676d7Smrg need_lib_prefix=no 294572b676d7Smrg need_version=no 294621525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 294721525869Smrg soname_spec='$libname$release$shared_ext$major' 294872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 2949e35772b2Smrg shlibpath_overrides_runpath=no 2950e35772b2Smrg hardcode_into_libs=yes 2951e35772b2Smrg dynamic_linker='ldqnx.so' 295272b676d7Smrg ;; 295372b676d7Smrg 295421525869Smrgopenbsd* | bitrig*) 295572b676d7Smrg version_type=sunos 295621525869Smrg sys_lib_dlsearch_path_spec=/usr/lib 295772b676d7Smrg need_lib_prefix=no 295821525869Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 295921525869Smrg need_version=no 296072b676d7Smrg else 296121525869Smrg need_version=yes 296272b676d7Smrg fi 296321525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 296421525869Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 296521525869Smrg shlibpath_var=LD_LIBRARY_PATH 296621525869Smrg shlibpath_overrides_runpath=yes 296772b676d7Smrg ;; 296872b676d7Smrg 296972b676d7Smrgos2*) 297072b676d7Smrg libname_spec='$name' 297121525869Smrg version_type=windows 297221525869Smrg shrext_cmds=.dll 297321525869Smrg need_version=no 297472b676d7Smrg need_lib_prefix=no 297521525869Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 297621525869Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 297721525869Smrg v=$($ECHO $release$versuffix | tr -d .-); 297821525869Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 297921525869Smrg $ECHO $n$v`$shared_ext' 298021525869Smrg library_names_spec='${libname}_dll.$libext' 298172b676d7Smrg dynamic_linker='OS/2 ld.exe' 298221525869Smrg shlibpath_var=BEGINLIBPATH 298321525869Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 298421525869Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 298521525869Smrg postinstall_cmds='base_file=`basename \$file`~ 298621525869Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 298721525869Smrg dldir=$destdir/`dirname \$dlpath`~ 298821525869Smrg test -d \$dldir || mkdir -p \$dldir~ 298921525869Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 299021525869Smrg chmod a+x \$dldir/$dlname~ 299121525869Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 299221525869Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 299321525869Smrg fi' 299421525869Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 299521525869Smrg dlpath=$dir/\$dldll~ 299621525869Smrg $RM \$dlpath' 299772b676d7Smrg ;; 299872b676d7Smrg 299972b676d7Smrgosf3* | osf4* | osf5*) 300072b676d7Smrg version_type=osf 300172b676d7Smrg need_lib_prefix=no 300272b676d7Smrg need_version=no 300321525869Smrg soname_spec='$libname$release$shared_ext$major' 300421525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 300572b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 300672b676d7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 300721525869Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 300872b676d7Smrg ;; 300972b676d7Smrg 30101fd23544Smrgrdos*) 30111fd23544Smrg dynamic_linker=no 30121fd23544Smrg ;; 30131fd23544Smrg 301472b676d7Smrgsolaris*) 301574c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 301672b676d7Smrg need_lib_prefix=no 301772b676d7Smrg need_version=no 301821525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 301921525869Smrg soname_spec='$libname$release$shared_ext$major' 302072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 302172b676d7Smrg shlibpath_overrides_runpath=yes 302272b676d7Smrg hardcode_into_libs=yes 302372b676d7Smrg # ldd complains unless libraries are executable 302472b676d7Smrg postinstall_cmds='chmod +x $lib' 302572b676d7Smrg ;; 302672b676d7Smrg 302772b676d7Smrgsunos4*) 302872b676d7Smrg version_type=sunos 302921525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 303072b676d7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 303172b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 303272b676d7Smrg shlibpath_overrides_runpath=yes 303321525869Smrg if test yes = "$with_gnu_ld"; then 303472b676d7Smrg need_lib_prefix=no 303572b676d7Smrg fi 303672b676d7Smrg need_version=yes 303772b676d7Smrg ;; 303872b676d7Smrg 303972b676d7Smrgsysv4 | sysv4.3*) 304074c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 304121525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 304221525869Smrg soname_spec='$libname$release$shared_ext$major' 304372b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 304472b676d7Smrg case $host_vendor in 304572b676d7Smrg sni) 304672b676d7Smrg shlibpath_overrides_runpath=no 304772b676d7Smrg need_lib_prefix=no 304872b676d7Smrg runpath_var=LD_RUN_PATH 304972b676d7Smrg ;; 305072b676d7Smrg siemens) 305172b676d7Smrg need_lib_prefix=no 305272b676d7Smrg ;; 305372b676d7Smrg motorola) 305472b676d7Smrg need_lib_prefix=no 305572b676d7Smrg need_version=no 305672b676d7Smrg shlibpath_overrides_runpath=no 305772b676d7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 305872b676d7Smrg ;; 305972b676d7Smrg esac 306072b676d7Smrg ;; 306172b676d7Smrg 306272b676d7Smrgsysv4*MP*) 306321525869Smrg if test -d /usr/nec; then 306474c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 306521525869Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 306621525869Smrg soname_spec='$libname$shared_ext.$major' 306772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 306872b676d7Smrg fi 306972b676d7Smrg ;; 307072b676d7Smrg 307172b676d7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 307221525869Smrg version_type=sco 307372b676d7Smrg need_lib_prefix=no 307472b676d7Smrg need_version=no 307521525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 307621525869Smrg soname_spec='$libname$release$shared_ext$major' 307772b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 3078e35772b2Smrg shlibpath_overrides_runpath=yes 307972b676d7Smrg hardcode_into_libs=yes 308021525869Smrg if test yes = "$with_gnu_ld"; then 308172b676d7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 308272b676d7Smrg else 308372b676d7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 308472b676d7Smrg case $host_os in 308572b676d7Smrg sco3.2v5*) 308672b676d7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 308772b676d7Smrg ;; 308872b676d7Smrg esac 308972b676d7Smrg fi 309072b676d7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 309172b676d7Smrg ;; 309272b676d7Smrg 3093e35772b2Smrgtpf*) 3094e35772b2Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 309574c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 3096e35772b2Smrg need_lib_prefix=no 3097e35772b2Smrg need_version=no 309821525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3099e35772b2Smrg shlibpath_var=LD_LIBRARY_PATH 3100e35772b2Smrg shlibpath_overrides_runpath=no 3101e35772b2Smrg hardcode_into_libs=yes 3102e35772b2Smrg ;; 3103e35772b2Smrg 310472b676d7Smrguts4*) 310574c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 310621525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 310721525869Smrg soname_spec='$libname$release$shared_ext$major' 310872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 310972b676d7Smrg ;; 311072b676d7Smrg 311172b676d7Smrg*) 311272b676d7Smrg dynamic_linker=no 311372b676d7Smrg ;; 311472b676d7Smrgesac 311572b676d7SmrgAC_MSG_RESULT([$dynamic_linker]) 311621525869Smrgtest no = "$dynamic_linker" && can_build_shared=no 311772b676d7Smrg 311872b676d7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 311921525869Smrgif test yes = "$GCC"; then 312072b676d7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 312172b676d7Smrgfi 312272b676d7Smrg 312321525869Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 312421525869Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3125e35772b2Smrgfi 312621525869Smrg 312721525869Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 312821525869Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3129e35772b2Smrgfi 313072b676d7Smrg 313121525869Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 313221525869Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 313321525869Smrg 313421525869Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 313521525869Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 313621525869Smrg 313721525869Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 313821525869Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 313921525869Smrg 3140e35772b2Smrg_LT_DECL([], [variables_saved_for_relink], [1], 3141e35772b2Smrg [Variables whose values should be saved in libtool wrapper scripts and 3142e35772b2Smrg restored at link time]) 3143e35772b2Smrg_LT_DECL([], [need_lib_prefix], [0], 3144e35772b2Smrg [Do we need the "lib" prefix for modules?]) 3145e35772b2Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3146e35772b2Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3147e35772b2Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3148e35772b2Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3149e35772b2Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3150e35772b2Smrg [Is shlibpath searched before the hard-coded library search path?]) 3151e35772b2Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3152e35772b2Smrg_LT_DECL([], [library_names_spec], [1], 3153e35772b2Smrg [[List of archive names. First name is the real one, the rest are links. 3154e35772b2Smrg The last name is the one that the linker finds with -lNAME]]) 3155e35772b2Smrg_LT_DECL([], [soname_spec], [1], 3156e35772b2Smrg [[The coded name of the library, if different from the real name]]) 315774c14cd6Smrg_LT_DECL([], [install_override_mode], [1], 315874c14cd6Smrg [Permission mode override for installation of shared libraries]) 3159e35772b2Smrg_LT_DECL([], [postinstall_cmds], [2], 3160e35772b2Smrg [Command to use after installation of a shared archive]) 3161e35772b2Smrg_LT_DECL([], [postuninstall_cmds], [2], 3162e35772b2Smrg [Command to use after uninstallation of a shared archive]) 3163e35772b2Smrg_LT_DECL([], [finish_cmds], [2], 3164e35772b2Smrg [Commands used to finish a libtool library installation in a directory]) 3165e35772b2Smrg_LT_DECL([], [finish_eval], [1], 3166e35772b2Smrg [[As "finish_cmds", except a single script fragment to be evaled but 3167e35772b2Smrg not shown]]) 3168e35772b2Smrg_LT_DECL([], [hardcode_into_libs], [0], 3169e35772b2Smrg [Whether we should hardcode library paths into libraries]) 3170e35772b2Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3171e35772b2Smrg [Compile-time system search path for libraries]) 317221525869Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 317321525869Smrg [Detected run-time system search path for libraries]) 317421525869Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 317521525869Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3176e35772b2Smrg])# _LT_SYS_DYNAMIC_LINKER 3177e35772b2Smrg 3178e35772b2Smrg 3179e35772b2Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 318072b676d7Smrg# -------------------------- 318121525869Smrg# find a file program that can recognize shared library 3182e35772b2SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3183e35772b2Smrg[m4_require([_LT_DECL_EGREP])dnl 318472b676d7SmrgAC_MSG_CHECKING([for $1]) 318572b676d7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 318672b676d7Smrg[case $MAGIC_CMD in 318772b676d7Smrg[[\\/*] | ?:[\\/]*]) 318821525869Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 318972b676d7Smrg ;; 319072b676d7Smrg*) 319121525869Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 319221525869Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 319372b676d7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 319472b676d7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 319572b676d7Smrgdnl not every word. This closes a longstanding sh security hole. 3196e35772b2Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 319772b676d7Smrg for ac_dir in $ac_dummy; do 319821525869Smrg IFS=$lt_save_ifs 319972b676d7Smrg test -z "$ac_dir" && ac_dir=. 320021525869Smrg if test -f "$ac_dir/$1"; then 320121525869Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 320272b676d7Smrg if test -n "$file_magic_test_file"; then 320372b676d7Smrg case $deplibs_check_method in 320472b676d7Smrg "file_magic "*) 320572b676d7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 320621525869Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 320772b676d7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 320872b676d7Smrg $EGREP "$file_magic_regex" > /dev/null; then 320972b676d7Smrg : 321072b676d7Smrg else 3211e35772b2Smrg cat <<_LT_EOF 1>&2 321272b676d7Smrg 321372b676d7Smrg*** Warning: the command libtool uses to detect shared libraries, 321472b676d7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 321572b676d7Smrg*** The result is that libtool may fail to recognize shared libraries 321672b676d7Smrg*** as such. This will affect the creation of libtool libraries that 321772b676d7Smrg*** depend on shared libraries, but programs linked with such libtool 321872b676d7Smrg*** libraries will work regardless of this problem. Nevertheless, you 321972b676d7Smrg*** may want to report the problem to your system manager and/or to 322072b676d7Smrg*** bug-libtool@gnu.org 322172b676d7Smrg 3222e35772b2Smrg_LT_EOF 322372b676d7Smrg fi ;; 322472b676d7Smrg esac 322572b676d7Smrg fi 322672b676d7Smrg break 322772b676d7Smrg fi 322872b676d7Smrg done 322921525869Smrg IFS=$lt_save_ifs 323021525869Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 323172b676d7Smrg ;; 323272b676d7Smrgesac]) 323321525869SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 323472b676d7Smrgif test -n "$MAGIC_CMD"; then 323572b676d7Smrg AC_MSG_RESULT($MAGIC_CMD) 323672b676d7Smrgelse 323772b676d7Smrg AC_MSG_RESULT(no) 323872b676d7Smrgfi 3239e35772b2Smrg_LT_DECL([], [MAGIC_CMD], [0], 3240e35772b2Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3241e35772b2Smrg])# _LT_PATH_TOOL_PREFIX 324272b676d7Smrg 3243e35772b2Smrg# Old name: 3244e35772b2SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3245e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3246e35772b2Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 324772b676d7Smrg 3248e35772b2Smrg 3249e35772b2Smrg# _LT_PATH_MAGIC 3250e35772b2Smrg# -------------- 325121525869Smrg# find a file program that can recognize a shared library 3252e35772b2Smrgm4_defun([_LT_PATH_MAGIC], 3253e35772b2Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 325472b676d7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 325572b676d7Smrg if test -n "$ac_tool_prefix"; then 3256e35772b2Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 325772b676d7Smrg else 325872b676d7Smrg MAGIC_CMD=: 325972b676d7Smrg fi 326072b676d7Smrgfi 3261e35772b2Smrg])# _LT_PATH_MAGIC 326272b676d7Smrg 326372b676d7Smrg 3264e35772b2Smrg# LT_PATH_LD 326572b676d7Smrg# ---------- 326672b676d7Smrg# find the pathname to the GNU or non-GNU linker 3267e35772b2SmrgAC_DEFUN([LT_PATH_LD], 3268e35772b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 326972b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 327072b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3271e35772b2Smrgm4_require([_LT_DECL_SED])dnl 3272e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 327374c14cd6Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3274e35772b2Smrg 3275e35772b2SmrgAC_ARG_WITH([gnu-ld], 3276e35772b2Smrg [AS_HELP_STRING([--with-gnu-ld], 3277e35772b2Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 327821525869Smrg [test no = "$withval" || with_gnu_ld=yes], 3279e35772b2Smrg [with_gnu_ld=no])dnl 3280e35772b2Smrg 328172b676d7Smrgac_prog=ld 328221525869Smrgif test yes = "$GCC"; then 328372b676d7Smrg # Check if gcc -print-prog-name=ld gives a path. 328472b676d7Smrg AC_MSG_CHECKING([for ld used by $CC]) 328572b676d7Smrg case $host in 328672b676d7Smrg *-*-mingw*) 328721525869Smrg # gcc leaves a trailing carriage return, which upsets mingw 328872b676d7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 328972b676d7Smrg *) 329072b676d7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 329172b676d7Smrg esac 329272b676d7Smrg case $ac_prog in 329372b676d7Smrg # Accept absolute paths. 329472b676d7Smrg [[\\/]]* | ?:[[\\/]]*) 329572b676d7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 329672b676d7Smrg # Canonicalize the pathname of ld 3297e35772b2Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3298e35772b2Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3299e35772b2Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 330072b676d7Smrg done 330121525869Smrg test -z "$LD" && LD=$ac_prog 330272b676d7Smrg ;; 330372b676d7Smrg "") 330472b676d7Smrg # If it fails, then pretend we aren't using GCC. 330572b676d7Smrg ac_prog=ld 330672b676d7Smrg ;; 330772b676d7Smrg *) 330872b676d7Smrg # If it is relative, then search for the first ld in PATH. 330972b676d7Smrg with_gnu_ld=unknown 331072b676d7Smrg ;; 331172b676d7Smrg esac 331221525869Smrgelif test yes = "$with_gnu_ld"; then 331372b676d7Smrg AC_MSG_CHECKING([for GNU ld]) 331472b676d7Smrgelse 331572b676d7Smrg AC_MSG_CHECKING([for non-GNU ld]) 331672b676d7Smrgfi 331772b676d7SmrgAC_CACHE_VAL(lt_cv_path_LD, 331872b676d7Smrg[if test -z "$LD"; then 331921525869Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 332072b676d7Smrg for ac_dir in $PATH; do 332121525869Smrg IFS=$lt_save_ifs 332272b676d7Smrg test -z "$ac_dir" && ac_dir=. 332372b676d7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 332421525869Smrg lt_cv_path_LD=$ac_dir/$ac_prog 332572b676d7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 332672b676d7Smrg # but apparently some variants of GNU ld only accept -v. 332772b676d7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 332872b676d7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 332972b676d7Smrg *GNU* | *'with BFD'*) 333021525869Smrg test no != "$with_gnu_ld" && break 333172b676d7Smrg ;; 333272b676d7Smrg *) 333321525869Smrg test yes != "$with_gnu_ld" && break 333472b676d7Smrg ;; 333572b676d7Smrg esac 333672b676d7Smrg fi 333772b676d7Smrg done 333821525869Smrg IFS=$lt_save_ifs 333972b676d7Smrgelse 334021525869Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 334172b676d7Smrgfi]) 334221525869SmrgLD=$lt_cv_path_LD 334372b676d7Smrgif test -n "$LD"; then 334472b676d7Smrg AC_MSG_RESULT($LD) 334572b676d7Smrgelse 334672b676d7Smrg AC_MSG_RESULT(no) 334772b676d7Smrgfi 334872b676d7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3349e35772b2Smrg_LT_PATH_LD_GNU 3350e35772b2SmrgAC_SUBST([LD]) 335172b676d7Smrg 3352e35772b2Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3353e35772b2Smrg])# LT_PATH_LD 335472b676d7Smrg 3355e35772b2Smrg# Old names: 3356e35772b2SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3357e35772b2SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3358e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3359e35772b2Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3360e35772b2Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3361e35772b2Smrg 3362e35772b2Smrg 3363e35772b2Smrg# _LT_PATH_LD_GNU 3364e35772b2Smrg#- -------------- 3365e35772b2Smrgm4_defun([_LT_PATH_LD_GNU], 3366e35772b2Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 336772b676d7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 336872b676d7Smrgcase `$LD -v 2>&1 </dev/null` in 336972b676d7Smrg*GNU* | *'with BFD'*) 337072b676d7Smrg lt_cv_prog_gnu_ld=yes 337172b676d7Smrg ;; 337272b676d7Smrg*) 337372b676d7Smrg lt_cv_prog_gnu_ld=no 337472b676d7Smrg ;; 337572b676d7Smrgesac]) 337672b676d7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3377e35772b2Smrg])# _LT_PATH_LD_GNU 337872b676d7Smrg 337972b676d7Smrg 3380e35772b2Smrg# _LT_CMD_RELOAD 3381e35772b2Smrg# -------------- 338272b676d7Smrg# find reload flag for linker 338372b676d7Smrg# -- PORTME Some linkers may need a different reload flag. 3384e35772b2Smrgm4_defun([_LT_CMD_RELOAD], 338572b676d7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 338672b676d7Smrg lt_cv_ld_reload_flag, 338772b676d7Smrg [lt_cv_ld_reload_flag='-r']) 338872b676d7Smrgreload_flag=$lt_cv_ld_reload_flag 338972b676d7Smrgcase $reload_flag in 339072b676d7Smrg"" | " "*) ;; 339172b676d7Smrg*) reload_flag=" $reload_flag" ;; 339272b676d7Smrgesac 339372b676d7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 339472b676d7Smrgcase $host_os in 339574c14cd6Smrg cygwin* | mingw* | pw32* | cegcc*) 339621525869Smrg if test yes != "$GCC"; then 339774c14cd6Smrg reload_cmds=false 339874c14cd6Smrg fi 339974c14cd6Smrg ;; 340072b676d7Smrg darwin*) 340121525869Smrg if test yes = "$GCC"; then 340221525869Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 340372b676d7Smrg else 340472b676d7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 340572b676d7Smrg fi 340672b676d7Smrg ;; 340772b676d7Smrgesac 340874c14cd6Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 340974c14cd6Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3410e35772b2Smrg])# _LT_CMD_RELOAD 341172b676d7Smrg 341272b676d7Smrg 341321525869Smrg# _LT_PATH_DD 341421525869Smrg# ----------- 341521525869Smrg# find a working dd 341621525869Smrgm4_defun([_LT_PATH_DD], 341721525869Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 341821525869Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 341921525869Smrgcat conftest.i conftest.i >conftest2.i 342021525869Smrg: ${lt_DD:=$DD} 342121525869SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 342221525869Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 342321525869Smrg cmp -s conftest.i conftest.out \ 342421525869Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 342521525869Smrgfi]) 342621525869Smrgrm -f conftest.i conftest2.i conftest.out]) 342721525869Smrg])# _LT_PATH_DD 342821525869Smrg 342921525869Smrg 343021525869Smrg# _LT_CMD_TRUNCATE 343121525869Smrg# ---------------- 343221525869Smrg# find command to truncate a binary pipe 343321525869Smrgm4_defun([_LT_CMD_TRUNCATE], 343421525869Smrg[m4_require([_LT_PATH_DD]) 343521525869SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 343621525869Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 343721525869Smrgcat conftest.i conftest.i >conftest2.i 343821525869Smrglt_cv_truncate_bin= 343921525869Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 344021525869Smrg cmp -s conftest.i conftest.out \ 344121525869Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 344221525869Smrgfi 344321525869Smrgrm -f conftest.i conftest2.i conftest.out 344421525869Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 344521525869Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 344621525869Smrg [Command to truncate a binary pipe]) 344721525869Smrg])# _LT_CMD_TRUNCATE 344821525869Smrg 344921525869Smrg 3450e35772b2Smrg# _LT_CHECK_MAGIC_METHOD 3451e35772b2Smrg# ---------------------- 345272b676d7Smrg# how to check for library dependencies 345372b676d7Smrg# -- PORTME fill in with the dynamic library characteristics 3454e35772b2Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3455e35772b2Smrg[m4_require([_LT_DECL_EGREP]) 3456e35772b2Smrgm4_require([_LT_DECL_OBJDUMP]) 3457e35772b2SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 345872b676d7Smrglt_cv_deplibs_check_method, 345972b676d7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 346072b676d7Smrglt_cv_file_magic_test_file= 346172b676d7Smrglt_cv_deplibs_check_method='unknown' 346272b676d7Smrg# Need to set the preceding variable on all platforms that support 346372b676d7Smrg# interlibrary dependencies. 346472b676d7Smrg# 'none' -- dependencies not supported. 346521525869Smrg# 'unknown' -- same as none, but documents that we really don't know. 346672b676d7Smrg# 'pass_all' -- all dependencies passed with no checks. 346772b676d7Smrg# 'test_compile' -- check by making test program. 346872b676d7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 346921525869Smrg# that responds to the $file_magic_cmd with a given extended regex. 347021525869Smrg# If you have 'file' or equivalent on your system and you're not sure 347121525869Smrg# whether 'pass_all' will *always* work, you probably want this one. 347272b676d7Smrg 347372b676d7Smrgcase $host_os in 34741fd23544Smrgaix[[4-9]]*) 347572b676d7Smrg lt_cv_deplibs_check_method=pass_all 347672b676d7Smrg ;; 347772b676d7Smrg 347872b676d7Smrgbeos*) 347972b676d7Smrg lt_cv_deplibs_check_method=pass_all 348072b676d7Smrg ;; 348172b676d7Smrg 348272b676d7Smrgbsdi[[45]]*) 348372b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 348472b676d7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 348572b676d7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 348672b676d7Smrg ;; 348772b676d7Smrg 348872b676d7Smrgcygwin*) 348972b676d7Smrg # func_win32_libid is a shell function defined in ltmain.sh 349072b676d7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 349172b676d7Smrg lt_cv_file_magic_cmd='func_win32_libid' 349272b676d7Smrg ;; 349372b676d7Smrg 349472b676d7Smrgmingw* | pw32*) 349572b676d7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 34961fd23544Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 34971fd23544Smrg # unless we find 'file', for example because we are cross-compiling. 349821525869Smrg if ( file / ) >/dev/null 2>&1; then 34991fd23544Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 35001fd23544Smrg lt_cv_file_magic_cmd='func_win32_libid' 35011fd23544Smrg else 350274c14cd6Smrg # Keep this pattern in sync with the one in func_win32_libid. 350374c14cd6Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 35041fd23544Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35051fd23544Smrg fi 350672b676d7Smrg ;; 350772b676d7Smrg 350874c14cd6Smrgcegcc*) 3509e35772b2Smrg # use the weaker test based on 'objdump'. See mingw*. 3510e35772b2Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3511e35772b2Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3512e35772b2Smrg ;; 3513e35772b2Smrg 351472b676d7Smrgdarwin* | rhapsody*) 351572b676d7Smrg lt_cv_deplibs_check_method=pass_all 351672b676d7Smrg ;; 351772b676d7Smrg 351872b676d7Smrgfreebsd* | dragonfly*) 3519e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 352072b676d7Smrg case $host_cpu in 352172b676d7Smrg i*86 ) 352272b676d7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 352372b676d7Smrg # Let's accept both of them until this is cleared up. 352472b676d7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 352572b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 352672b676d7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 352772b676d7Smrg ;; 352872b676d7Smrg esac 352972b676d7Smrg else 353072b676d7Smrg lt_cv_deplibs_check_method=pass_all 353172b676d7Smrg fi 353272b676d7Smrg ;; 353372b676d7Smrg 353474c14cd6Smrghaiku*) 353574c14cd6Smrg lt_cv_deplibs_check_method=pass_all 353674c14cd6Smrg ;; 353774c14cd6Smrg 353872b676d7Smrghpux10.20* | hpux11*) 353972b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 354072b676d7Smrg case $host_cpu in 354172b676d7Smrg ia64*) 354272b676d7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 354372b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 354472b676d7Smrg ;; 354572b676d7Smrg hppa*64*) 354674c14cd6Smrg [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]'] 354772b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 354872b676d7Smrg ;; 354972b676d7Smrg *) 355074c14cd6Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 355172b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 355272b676d7Smrg ;; 355372b676d7Smrg esac 355472b676d7Smrg ;; 355572b676d7Smrg 35561fd23544Smrginterix[[3-9]]*) 355772b676d7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 355872b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 355972b676d7Smrg ;; 356072b676d7Smrg 356172b676d7Smrgirix5* | irix6* | nonstopux*) 356272b676d7Smrg case $LD in 356372b676d7Smrg *-32|*"-32 ") libmagic=32-bit;; 356472b676d7Smrg *-n32|*"-n32 ") libmagic=N32;; 356572b676d7Smrg *-64|*"-64 ") libmagic=64-bit;; 356672b676d7Smrg *) libmagic=never-match;; 356772b676d7Smrg esac 356872b676d7Smrg lt_cv_deplibs_check_method=pass_all 356972b676d7Smrg ;; 357072b676d7Smrg 357174c14cd6Smrg# This must be glibc/ELF. 357221525869Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 357372b676d7Smrg lt_cv_deplibs_check_method=pass_all 357472b676d7Smrg ;; 357572b676d7Smrg 35761fd23544Smrgnetbsd*) 3577e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 357872b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 357972b676d7Smrg else 358072b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 358172b676d7Smrg fi 358272b676d7Smrg ;; 358372b676d7Smrg 358472b676d7Smrgnewos6*) 358572b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 358672b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 358772b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 358872b676d7Smrg ;; 358972b676d7Smrg 3590e35772b2Smrg*nto* | *qnx*) 3591e35772b2Smrg lt_cv_deplibs_check_method=pass_all 359272b676d7Smrg ;; 359372b676d7Smrg 359421525869Smrgopenbsd* | bitrig*) 359521525869Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 359672b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 359772b676d7Smrg else 359872b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 359972b676d7Smrg fi 360072b676d7Smrg ;; 360172b676d7Smrg 360272b676d7Smrgosf3* | osf4* | osf5*) 360372b676d7Smrg lt_cv_deplibs_check_method=pass_all 360472b676d7Smrg ;; 360572b676d7Smrg 36061fd23544Smrgrdos*) 36071fd23544Smrg lt_cv_deplibs_check_method=pass_all 36081fd23544Smrg ;; 36091fd23544Smrg 361072b676d7Smrgsolaris*) 361172b676d7Smrg lt_cv_deplibs_check_method=pass_all 361272b676d7Smrg ;; 361372b676d7Smrg 3614e35772b2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3615e35772b2Smrg lt_cv_deplibs_check_method=pass_all 3616e35772b2Smrg ;; 3617e35772b2Smrg 361872b676d7Smrgsysv4 | sysv4.3*) 361972b676d7Smrg case $host_vendor in 362072b676d7Smrg motorola) 362172b676d7Smrg 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]]' 362272b676d7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 362372b676d7Smrg ;; 362472b676d7Smrg ncr) 362572b676d7Smrg lt_cv_deplibs_check_method=pass_all 362672b676d7Smrg ;; 362772b676d7Smrg sequent) 362872b676d7Smrg lt_cv_file_magic_cmd='/bin/file' 362972b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 363072b676d7Smrg ;; 363172b676d7Smrg sni) 363272b676d7Smrg lt_cv_file_magic_cmd='/bin/file' 363372b676d7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 363472b676d7Smrg lt_cv_file_magic_test_file=/lib/libc.so 363572b676d7Smrg ;; 363672b676d7Smrg siemens) 363772b676d7Smrg lt_cv_deplibs_check_method=pass_all 363872b676d7Smrg ;; 363972b676d7Smrg pc) 364072b676d7Smrg lt_cv_deplibs_check_method=pass_all 364172b676d7Smrg ;; 364272b676d7Smrg esac 364372b676d7Smrg ;; 364472b676d7Smrg 3645e35772b2Smrgtpf*) 364672b676d7Smrg lt_cv_deplibs_check_method=pass_all 364772b676d7Smrg ;; 364821525869Smrgos2*) 364921525869Smrg lt_cv_deplibs_check_method=pass_all 365021525869Smrg ;; 365172b676d7Smrgesac 365272b676d7Smrg]) 365374c14cd6Smrg 365474c14cd6Smrgfile_magic_glob= 365574c14cd6Smrgwant_nocaseglob=no 365674c14cd6Smrgif test "$build" = "$host"; then 365774c14cd6Smrg case $host_os in 365874c14cd6Smrg mingw* | pw32*) 365974c14cd6Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 366074c14cd6Smrg want_nocaseglob=yes 366174c14cd6Smrg else 366274c14cd6Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 366374c14cd6Smrg fi 366474c14cd6Smrg ;; 366574c14cd6Smrg esac 366674c14cd6Smrgfi 366774c14cd6Smrg 366872b676d7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 366972b676d7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 367072b676d7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 367172b676d7Smrg 3672e35772b2Smrg_LT_DECL([], [deplibs_check_method], [1], 3673e35772b2Smrg [Method to check whether dependent libraries are shared objects]) 3674e35772b2Smrg_LT_DECL([], [file_magic_cmd], [1], 367574c14cd6Smrg [Command to use when deplibs_check_method = "file_magic"]) 367674c14cd6Smrg_LT_DECL([], [file_magic_glob], [1], 367774c14cd6Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 367874c14cd6Smrg_LT_DECL([], [want_nocaseglob], [1], 367974c14cd6Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3680e35772b2Smrg])# _LT_CHECK_MAGIC_METHOD 368172b676d7Smrg 3682e35772b2Smrg 3683e35772b2Smrg# LT_PATH_NM 368472b676d7Smrg# ---------- 3685e35772b2Smrg# find the pathname to a BSD- or MS-compatible name lister 3686e35772b2SmrgAC_DEFUN([LT_PATH_NM], 3687e35772b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3688e35772b2SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 368972b676d7Smrg[if test -n "$NM"; then 369072b676d7Smrg # Let the user override the test. 369121525869Smrg lt_cv_path_NM=$NM 369272b676d7Smrgelse 369321525869Smrg lt_nm_to_check=${ac_tool_prefix}nm 36941fd23544Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 369572b676d7Smrg lt_nm_to_check="$lt_nm_to_check nm" 369672b676d7Smrg fi 369772b676d7Smrg for lt_tmp_nm in $lt_nm_to_check; do 369821525869Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 369972b676d7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 370021525869Smrg IFS=$lt_save_ifs 370172b676d7Smrg test -z "$ac_dir" && ac_dir=. 370221525869Smrg tmp_nm=$ac_dir/$lt_tmp_nm 370321525869Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 370472b676d7Smrg # Check to see if the nm accepts a BSD-compat flag. 370521525869Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 370672b676d7Smrg # nm: unknown option "B" ignored 370772b676d7Smrg # Tru64's nm complains that /dev/null is an invalid object file 370821525869Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 370921525869Smrg case $build_os in 371021525869Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 371121525869Smrg *) lt_bad_file=/dev/null ;; 371221525869Smrg esac 371321525869Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 371421525869Smrg *$lt_bad_file* | *'Invalid file or object type'*) 371572b676d7Smrg lt_cv_path_NM="$tmp_nm -B" 371621525869Smrg break 2 371772b676d7Smrg ;; 371872b676d7Smrg *) 371972b676d7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 372072b676d7Smrg */dev/null*) 372172b676d7Smrg lt_cv_path_NM="$tmp_nm -p" 372221525869Smrg break 2 372372b676d7Smrg ;; 372472b676d7Smrg *) 372572b676d7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 372672b676d7Smrg continue # so that we can try to find one that supports BSD flags 372772b676d7Smrg ;; 372872b676d7Smrg esac 372972b676d7Smrg ;; 373072b676d7Smrg esac 373172b676d7Smrg fi 373272b676d7Smrg done 373321525869Smrg IFS=$lt_save_ifs 373472b676d7Smrg done 3735e35772b2Smrg : ${lt_cv_path_NM=no} 373672b676d7Smrgfi]) 373721525869Smrgif test no != "$lt_cv_path_NM"; then 373821525869Smrg NM=$lt_cv_path_NM 3739e35772b2Smrgelse 3740e35772b2Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 374174c14cd6Smrg if test -n "$DUMPBIN"; then : 374274c14cd6Smrg # Let the user override the test. 374374c14cd6Smrg else 374474c14cd6Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 374521525869Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 374674c14cd6Smrg *COFF*) 374721525869Smrg DUMPBIN="$DUMPBIN -symbols -headers" 374874c14cd6Smrg ;; 374974c14cd6Smrg *) 375074c14cd6Smrg DUMPBIN=: 375174c14cd6Smrg ;; 375274c14cd6Smrg esac 375374c14cd6Smrg fi 3754e35772b2Smrg AC_SUBST([DUMPBIN]) 375521525869Smrg if test : != "$DUMPBIN"; then 375621525869Smrg NM=$DUMPBIN 3757e35772b2Smrg fi 3758e35772b2Smrgfi 3759e35772b2Smrgtest -z "$NM" && NM=nm 3760e35772b2SmrgAC_SUBST([NM]) 3761e35772b2Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3762e35772b2Smrg 3763e35772b2SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3764e35772b2Smrg [lt_cv_nm_interface="BSD nm" 3765e35772b2Smrg echo "int some_variable = 0;" > conftest.$ac_ext 376674c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3767e35772b2Smrg (eval "$ac_compile" 2>conftest.err) 3768e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 376974c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3770e35772b2Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3771e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 377274c14cd6Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3773e35772b2Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3774e35772b2Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3775e35772b2Smrg lt_cv_nm_interface="MS dumpbin" 3776e35772b2Smrg fi 3777e35772b2Smrg rm -f conftest*]) 3778e35772b2Smrg])# LT_PATH_NM 377972b676d7Smrg 3780e35772b2Smrg# Old names: 3781e35772b2SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3782e35772b2SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3783e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3784e35772b2Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3785e35772b2Smrgdnl AC_DEFUN([AC_PROG_NM], []) 378672b676d7Smrg 378774c14cd6Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 378874c14cd6Smrg# -------------------------------- 378974c14cd6Smrg# how to determine the name of the shared library 379074c14cd6Smrg# associated with a specific link library. 379174c14cd6Smrg# -- PORTME fill in with the dynamic library characteristics 379274c14cd6Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 379374c14cd6Smrg[m4_require([_LT_DECL_EGREP]) 379474c14cd6Smrgm4_require([_LT_DECL_OBJDUMP]) 379574c14cd6Smrgm4_require([_LT_DECL_DLLTOOL]) 379674c14cd6SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 379774c14cd6Smrglt_cv_sharedlib_from_linklib_cmd, 379874c14cd6Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 379974c14cd6Smrg 380074c14cd6Smrgcase $host_os in 380174c14cd6Smrgcygwin* | mingw* | pw32* | cegcc*) 380221525869Smrg # two different shell functions defined in ltmain.sh; 380321525869Smrg # decide which one to use based on capabilities of $DLLTOOL 380474c14cd6Smrg case `$DLLTOOL --help 2>&1` in 380574c14cd6Smrg *--identify-strict*) 380674c14cd6Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 380774c14cd6Smrg ;; 380874c14cd6Smrg *) 380974c14cd6Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 381074c14cd6Smrg ;; 381174c14cd6Smrg esac 381274c14cd6Smrg ;; 381374c14cd6Smrg*) 381474c14cd6Smrg # fallback: assume linklib IS sharedlib 381521525869Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 381674c14cd6Smrg ;; 381774c14cd6Smrgesac 381874c14cd6Smrg]) 381974c14cd6Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 382074c14cd6Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 382174c14cd6Smrg 382274c14cd6Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 382374c14cd6Smrg [Command to associate shared and link libraries]) 382474c14cd6Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 382574c14cd6Smrg 382674c14cd6Smrg 382774c14cd6Smrg# _LT_PATH_MANIFEST_TOOL 382874c14cd6Smrg# ---------------------- 382974c14cd6Smrg# locate the manifest tool 383074c14cd6Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 383174c14cd6Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 383274c14cd6Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 383374c14cd6SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 383474c14cd6Smrg [lt_cv_path_mainfest_tool=no 383574c14cd6Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 383674c14cd6Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 383774c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 383874c14cd6Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 383974c14cd6Smrg lt_cv_path_mainfest_tool=yes 384074c14cd6Smrg fi 384174c14cd6Smrg rm -f conftest*]) 384221525869Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 384374c14cd6Smrg MANIFEST_TOOL=: 384474c14cd6Smrgfi 384574c14cd6Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 384674c14cd6Smrg])# _LT_PATH_MANIFEST_TOOL 384774c14cd6Smrg 3848e35772b2Smrg 384921525869Smrg# _LT_DLL_DEF_P([FILE]) 385021525869Smrg# --------------------- 385121525869Smrg# True iff FILE is a Windows DLL '.def' file. 385221525869Smrg# Keep in sync with func_dll_def_p in the libtool script 385321525869SmrgAC_DEFUN([_LT_DLL_DEF_P], 385421525869Smrg[dnl 385521525869Smrg test DEF = "`$SED -n dnl 385621525869Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 385721525869Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 385821525869Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 385921525869Smrg -e q dnl Only consider the first "real" line 386021525869Smrg $1`" dnl 386121525869Smrg])# _LT_DLL_DEF_P 386221525869Smrg 386321525869Smrg 3864e35772b2Smrg# LT_LIB_M 3865e35772b2Smrg# -------- 386672b676d7Smrg# check for math library 3867e35772b2SmrgAC_DEFUN([LT_LIB_M], 386872b676d7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 386972b676d7SmrgLIBM= 387072b676d7Smrgcase $host in 387174c14cd6Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 387272b676d7Smrg # These system don't have libm, or don't need it 387372b676d7Smrg ;; 387472b676d7Smrg*-ncr-sysv4.3*) 387521525869Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 387672b676d7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 387772b676d7Smrg ;; 387872b676d7Smrg*) 387921525869Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 388072b676d7Smrg ;; 388172b676d7Smrgesac 3882e35772b2SmrgAC_SUBST([LIBM]) 3883e35772b2Smrg])# LT_LIB_M 388472b676d7Smrg 3885e35772b2Smrg# Old name: 3886e35772b2SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3887e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3888e35772b2Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 388972b676d7Smrg 389072b676d7Smrg 3891e35772b2Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3892e35772b2Smrg# ------------------------------- 3893e35772b2Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3894e35772b2Smrg[m4_require([_LT_TAG_COMPILER])dnl 389572b676d7Smrg 3896e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 389772b676d7Smrg 389821525869Smrgif test yes = "$GCC"; then 389974c14cd6Smrg case $cc_basename in 390074c14cd6Smrg nvcc*) 390174c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 390274c14cd6Smrg *) 390374c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 390474c14cd6Smrg esac 390572b676d7Smrg 3906e35772b2Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3907e35772b2Smrg lt_cv_prog_compiler_rtti_exceptions, 3908e35772b2Smrg [-fno-rtti -fno-exceptions], [], 3909e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3910e35772b2Smrgfi 3911e35772b2Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3912e35772b2Smrg [Compiler flag to turn off builtin functions]) 3913e35772b2Smrg])# _LT_COMPILER_NO_RTTI 391472b676d7Smrg 391572b676d7Smrg 3916e35772b2Smrg# _LT_CMD_GLOBAL_SYMBOLS 3917e35772b2Smrg# ---------------------- 3918e35772b2Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3919e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3920e35772b2SmrgAC_REQUIRE([AC_PROG_CC])dnl 392174c14cd6SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3922e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 3923e35772b2SmrgAC_REQUIRE([LT_PATH_LD])dnl 3924e35772b2Smrgm4_require([_LT_DECL_SED])dnl 3925e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 3926e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 392772b676d7Smrg 3928e35772b2Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3929e35772b2SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3930e35772b2SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 393172b676d7Smrg[ 3932e35772b2Smrg# These are sane defaults that work on at least a few old systems. 3933e35772b2Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 393472b676d7Smrg 3935e35772b2Smrg# Character class describing NM global symbol codes. 3936e35772b2Smrgsymcode='[[BCDEGRST]]' 393772b676d7Smrg 3938e35772b2Smrg# Regexp to match symbols that can be accessed directly from C. 3939e35772b2Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 394072b676d7Smrg 3941e35772b2Smrg# Define system-specific variables. 3942e35772b2Smrgcase $host_os in 3943e35772b2Smrgaix*) 3944e35772b2Smrg symcode='[[BCDT]]' 3945e35772b2Smrg ;; 3946e35772b2Smrgcygwin* | mingw* | pw32* | cegcc*) 3947e35772b2Smrg symcode='[[ABCDGISTW]]' 3948e35772b2Smrg ;; 3949e35772b2Smrghpux*) 395021525869Smrg if test ia64 = "$host_cpu"; then 3951e35772b2Smrg symcode='[[ABCDEGRST]]' 3952e35772b2Smrg fi 3953e35772b2Smrg ;; 3954e35772b2Smrgirix* | nonstopux*) 3955e35772b2Smrg symcode='[[BCDEGRST]]' 3956e35772b2Smrg ;; 3957e35772b2Smrgosf*) 3958e35772b2Smrg symcode='[[BCDEGQRST]]' 3959e35772b2Smrg ;; 3960e35772b2Smrgsolaris*) 3961e35772b2Smrg symcode='[[BDRT]]' 3962e35772b2Smrg ;; 3963e35772b2Smrgsco3.2v5*) 3964e35772b2Smrg symcode='[[DT]]' 3965e35772b2Smrg ;; 3966e35772b2Smrgsysv4.2uw2*) 3967e35772b2Smrg symcode='[[DT]]' 3968e35772b2Smrg ;; 3969e35772b2Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3970e35772b2Smrg symcode='[[ABDT]]' 3971e35772b2Smrg ;; 3972e35772b2Smrgsysv4) 3973e35772b2Smrg symcode='[[DFNSTU]]' 3974e35772b2Smrg ;; 3975e35772b2Smrgesac 397672b676d7Smrg 3977e35772b2Smrg# If we're using GNU nm, then use its standard symbol codes. 3978e35772b2Smrgcase `$NM -V 2>&1` in 3979e35772b2Smrg*GNU* | *'with BFD'*) 3980e35772b2Smrg symcode='[[ABCDGIRSTW]]' ;; 3981e35772b2Smrgesac 398272b676d7Smrg 398321525869Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 398421525869Smrg # Gets list of data symbols to import. 398521525869Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 398621525869Smrg # Adjust the below global symbol transforms to fixup imported variables. 398721525869Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 398821525869Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 398921525869Smrg lt_c_name_lib_hook="\ 399021525869Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 399121525869Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 399221525869Smrgelse 399321525869Smrg # Disable hooks by default. 399421525869Smrg lt_cv_sys_global_symbol_to_import= 399521525869Smrg lt_cdecl_hook= 399621525869Smrg lt_c_name_hook= 399721525869Smrg lt_c_name_lib_hook= 399821525869Smrgfi 399921525869Smrg 4000e35772b2Smrg# Transform an extracted symbol line into a proper C declaration. 4001e35772b2Smrg# Some systems (esp. on ia64) link data and code symbols differently, 4002e35772b2Smrg# so use this general approach. 400321525869Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 400421525869Smrg$lt_cdecl_hook\ 400521525869Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 400621525869Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 400772b676d7Smrg 4008e35772b2Smrg# Transform an extracted symbol line into symbol name and symbol address 400921525869Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 401021525869Smrg$lt_c_name_hook\ 401121525869Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 401221525869Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 401321525869Smrg 401421525869Smrg# Transform an extracted symbol line into symbol name with lib prefix and 401521525869Smrg# symbol address. 401621525869Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 401721525869Smrg$lt_c_name_lib_hook\ 401821525869Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 401921525869Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 402021525869Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 402172b676d7Smrg 4022e35772b2Smrg# Handle CRLF in mingw tool chain 4023e35772b2Smrgopt_cr= 4024e35772b2Smrgcase $build_os in 4025e35772b2Smrgmingw*) 4026e35772b2Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4027e35772b2Smrg ;; 4028e35772b2Smrgesac 402972b676d7Smrg 4030e35772b2Smrg# Try without a prefix underscore, then with it. 4031e35772b2Smrgfor ac_symprfx in "" "_"; do 403272b676d7Smrg 4033e35772b2Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4034e35772b2Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 403572b676d7Smrg 4036e35772b2Smrg # Write the raw and C identifiers. 4037e35772b2Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 403821525869Smrg # Fake it for dumpbin and say T for any non-static function, 403921525869Smrg # D for any global variable and I for any imported variable. 4040e35772b2Smrg # Also find C++ and __fastcall symbols from MSVC++, 4041e35772b2Smrg # which start with @ or ?. 4042e35772b2Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4043e35772b2Smrg" {last_section=section; section=\$ 3};"\ 404474c14cd6Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4045e35772b2Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 404621525869Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 404721525869Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 404821525869Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4049e35772b2Smrg" \$ 0!~/External *\|/{next};"\ 4050e35772b2Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4051e35772b2Smrg" {if(hide[section]) next};"\ 405221525869Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 405321525869Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 405421525869Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 405521525869Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4056e35772b2Smrg" ' prfx=^$ac_symprfx]" 4057e35772b2Smrg else 4058e35772b2Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 405972b676d7Smrg fi 406074c14cd6Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 406172b676d7Smrg 4062e35772b2Smrg # Check to see that the pipe works correctly. 4063e35772b2Smrg pipe_works=no 406472b676d7Smrg 4065e35772b2Smrg rm -f conftest* 4066e35772b2Smrg cat > conftest.$ac_ext <<_LT_EOF 4067e35772b2Smrg#ifdef __cplusplus 4068e35772b2Smrgextern "C" { 4069e35772b2Smrg#endif 4070e35772b2Smrgchar nm_test_var; 4071e35772b2Smrgvoid nm_test_func(void); 4072e35772b2Smrgvoid nm_test_func(void){} 4073e35772b2Smrg#ifdef __cplusplus 4074e35772b2Smrg} 4075e35772b2Smrg#endif 4076e35772b2Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 4077e35772b2Smrg_LT_EOF 407872b676d7Smrg 4079e35772b2Smrg if AC_TRY_EVAL(ac_compile); then 4080e35772b2Smrg # Now try to grab the symbols. 4081e35772b2Smrg nlist=conftest.nm 408274c14cd6Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4083e35772b2Smrg # Try sorting and uniquifying the output. 4084e35772b2Smrg if sort "$nlist" | uniq > "$nlist"T; then 4085e35772b2Smrg mv -f "$nlist"T "$nlist" 4086e35772b2Smrg else 4087e35772b2Smrg rm -f "$nlist"T 4088e35772b2Smrg fi 408972b676d7Smrg 4090e35772b2Smrg # Make sure that we snagged all the symbols we need. 4091e35772b2Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4092e35772b2Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4093e35772b2Smrg cat <<_LT_EOF > conftest.$ac_ext 409474c14cd6Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 409521525869Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 409621525869Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 409774c14cd6Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 409874c14cd6Smrg# define LT@&t@_DLSYM_CONST 409921525869Smrg#elif defined __osf__ 410074c14cd6Smrg/* This system does not cope well with relocations in const data. */ 410174c14cd6Smrg# define LT@&t@_DLSYM_CONST 410274c14cd6Smrg#else 410374c14cd6Smrg# define LT@&t@_DLSYM_CONST const 410474c14cd6Smrg#endif 410574c14cd6Smrg 4106e35772b2Smrg#ifdef __cplusplus 4107e35772b2Smrgextern "C" { 4108e35772b2Smrg#endif 410972b676d7Smrg 4110e35772b2Smrg_LT_EOF 4111e35772b2Smrg # Now generate the symbol file. 4112e35772b2Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 411372b676d7Smrg 4114e35772b2Smrg cat <<_LT_EOF >> conftest.$ac_ext 411572b676d7Smrg 4116e35772b2Smrg/* The mapping between symbol names and symbols. */ 411774c14cd6SmrgLT@&t@_DLSYM_CONST struct { 4118e35772b2Smrg const char *name; 4119e35772b2Smrg void *address; 4120e35772b2Smrg} 4121e35772b2Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4122e35772b2Smrg{ 4123e35772b2Smrg { "@PROGRAM@", (void *) 0 }, 4124e35772b2Smrg_LT_EOF 412521525869Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4126e35772b2Smrg cat <<\_LT_EOF >> conftest.$ac_ext 4127e35772b2Smrg {0, (void *) 0} 4128e35772b2Smrg}; 412972b676d7Smrg 4130e35772b2Smrg/* This works around a problem in FreeBSD linker */ 4131e35772b2Smrg#ifdef FREEBSD_WORKAROUND 4132e35772b2Smrgstatic const void *lt_preloaded_setup() { 4133e35772b2Smrg return lt__PROGRAM__LTX_preloaded_symbols; 4134e35772b2Smrg} 4135e35772b2Smrg#endif 413672b676d7Smrg 4137e35772b2Smrg#ifdef __cplusplus 4138e35772b2Smrg} 4139e35772b2Smrg#endif 4140e35772b2Smrg_LT_EOF 4141e35772b2Smrg # Now try linking the two files. 4142e35772b2Smrg mv conftest.$ac_objext conftstm.$ac_objext 414374c14cd6Smrg lt_globsym_save_LIBS=$LIBS 414474c14cd6Smrg lt_globsym_save_CFLAGS=$CFLAGS 414521525869Smrg LIBS=conftstm.$ac_objext 4146e35772b2Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 414721525869Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4148e35772b2Smrg pipe_works=yes 4149e35772b2Smrg fi 415074c14cd6Smrg LIBS=$lt_globsym_save_LIBS 415174c14cd6Smrg CFLAGS=$lt_globsym_save_CFLAGS 4152e35772b2Smrg else 4153e35772b2Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4154e35772b2Smrg fi 4155e35772b2Smrg else 4156e35772b2Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4157e35772b2Smrg fi 415872b676d7Smrg else 4159e35772b2Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 416072b676d7Smrg fi 416172b676d7Smrg else 4162e35772b2Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4163e35772b2Smrg cat conftest.$ac_ext >&5 416472b676d7Smrg fi 4165e35772b2Smrg rm -rf conftest* conftst* 416672b676d7Smrg 4167e35772b2Smrg # Do not use the global_symbol_pipe unless it works. 416821525869Smrg if test yes = "$pipe_works"; then 4169e35772b2Smrg break 4170e35772b2Smrg else 4171e35772b2Smrg lt_cv_sys_global_symbol_pipe= 4172e35772b2Smrg fi 4173e35772b2Smrgdone 4174e35772b2Smrg]) 4175e35772b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4176e35772b2Smrg lt_cv_sys_global_symbol_to_cdecl= 4177e35772b2Smrgfi 4178e35772b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4179e35772b2Smrg AC_MSG_RESULT(failed) 418072b676d7Smrgelse 4181e35772b2Smrg AC_MSG_RESULT(ok) 418272b676d7Smrgfi 418372b676d7Smrg 418474c14cd6Smrg# Response file support. 418574c14cd6Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 418674c14cd6Smrg nm_file_list_spec='@' 418774c14cd6Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 418874c14cd6Smrg nm_file_list_spec='@' 418974c14cd6Smrgfi 419074c14cd6Smrg 4191e35772b2Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4192e35772b2Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 4193e35772b2Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4194e35772b2Smrg [Transform the output of nm in a proper C declaration]) 419521525869Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 419621525869Smrg [Transform the output of nm into a list of symbols to manually relocate]) 4197e35772b2Smrg_LT_DECL([global_symbol_to_c_name_address], 4198e35772b2Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4199e35772b2Smrg [Transform the output of nm in a C name address pair]) 4200e35772b2Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4201e35772b2Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4202e35772b2Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 420321525869Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 420421525869Smrg [The name lister interface]) 420574c14cd6Smrg_LT_DECL([], [nm_file_list_spec], [1], 420674c14cd6Smrg [Specify filename containing input files for $NM]) 4207e35772b2Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 420872b676d7Smrg 420972b676d7Smrg 4210e35772b2Smrg# _LT_COMPILER_PIC([TAGNAME]) 4211e35772b2Smrg# --------------------------- 4212e35772b2Smrgm4_defun([_LT_COMPILER_PIC], 4213e35772b2Smrg[m4_require([_LT_TAG_COMPILER])dnl 4214e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4215e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4216e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 421772b676d7Smrg 4218e35772b2Smrgm4_if([$1], [CXX], [ 4219e35772b2Smrg # C++ specific cases for pic, static, wl, etc. 422021525869Smrg if test yes = "$GXX"; then 4221e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4222e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 422372b676d7Smrg 4224e35772b2Smrg case $host_os in 4225e35772b2Smrg aix*) 4226e35772b2Smrg # All AIX code is PIC. 422721525869Smrg if test ia64 = "$host_cpu"; then 4228e35772b2Smrg # AIX 5 now supports IA64 processor 4229e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 423072b676d7Smrg fi 423121525869Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 423272b676d7Smrg ;; 423372b676d7Smrg 4234e35772b2Smrg amigaos*) 423572b676d7Smrg case $host_cpu in 4236e35772b2Smrg powerpc) 4237e35772b2Smrg # see comment about AmigaOS4 .so support 4238e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4239e35772b2Smrg ;; 4240e35772b2Smrg m68k) 4241e35772b2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 424221525869Smrg # adding the '-m68020' flag to GCC prevents building anything better, 424321525869Smrg # like '-m68040'. 4244e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 424572b676d7Smrg ;; 424672b676d7Smrg esac 424772b676d7Smrg ;; 424872b676d7Smrg 4249e35772b2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4250e35772b2Smrg # PIC is the default for these OSes. 4251e35772b2Smrg ;; 4252e35772b2Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4253e35772b2Smrg # This hack is so that the source file can tell whether it is being 4254e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 4255e35772b2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4256e35772b2Smrg # (--disable-auto-import) libraries 4257e35772b2Smrg m4_if([$1], [GCJ], [], 4258e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 425921525869Smrg case $host_os in 426021525869Smrg os2*) 426121525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 426221525869Smrg ;; 426321525869Smrg esac 4264e35772b2Smrg ;; 4265e35772b2Smrg darwin* | rhapsody*) 4266e35772b2Smrg # PIC is the default on this platform 4267e35772b2Smrg # Common symbols not allowed in MH_DYLIB files 4268e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4269e35772b2Smrg ;; 4270e35772b2Smrg *djgpp*) 4271e35772b2Smrg # DJGPP does not support shared libraries at all 4272e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4273e35772b2Smrg ;; 427474c14cd6Smrg haiku*) 427574c14cd6Smrg # PIC is the default for Haiku. 427674c14cd6Smrg # The "-static" flag exists, but is broken. 427774c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 427874c14cd6Smrg ;; 4279e35772b2Smrg interix[[3-9]]*) 4280e35772b2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4281e35772b2Smrg # Instead, we relocate shared libraries at runtime. 4282e35772b2Smrg ;; 4283e35772b2Smrg sysv4*MP*) 4284e35772b2Smrg if test -d /usr/nec; then 4285e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4286e35772b2Smrg fi 4287e35772b2Smrg ;; 4288e35772b2Smrg hpux*) 4289e35772b2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4290e35772b2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4291e35772b2Smrg # sets the default TLS model and affects inlining. 4292e35772b2Smrg case $host_cpu in 4293e35772b2Smrg hppa*64*) 429472b676d7Smrg ;; 429572b676d7Smrg *) 4296e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 429772b676d7Smrg ;; 4298e35772b2Smrg esac 4299e35772b2Smrg ;; 4300e35772b2Smrg *qnx* | *nto*) 4301e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4302e35772b2Smrg # it will coredump. 4303e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4304e35772b2Smrg ;; 4305e35772b2Smrg *) 4306e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4307e35772b2Smrg ;; 430872b676d7Smrg esac 4309e35772b2Smrg else 4310e35772b2Smrg case $host_os in 4311e35772b2Smrg aix[[4-9]]*) 4312e35772b2Smrg # All AIX code is PIC. 431321525869Smrg if test ia64 = "$host_cpu"; then 4314e35772b2Smrg # AIX 5 now supports IA64 processor 4315e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4316e35772b2Smrg else 4317e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 431872b676d7Smrg fi 431972b676d7Smrg ;; 4320e35772b2Smrg chorus*) 4321e35772b2Smrg case $cc_basename in 4322e35772b2Smrg cxch68*) 4323e35772b2Smrg # Green Hills C++ Compiler 4324e35772b2Smrg # _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" 432572b676d7Smrg ;; 432672b676d7Smrg esac 432772b676d7Smrg ;; 432874c14cd6Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 432974c14cd6Smrg # This hack is so that the source file can tell whether it is being 433074c14cd6Smrg # built for inclusion in a dll (and should export symbols for example). 433174c14cd6Smrg m4_if([$1], [GCJ], [], 433274c14cd6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 433374c14cd6Smrg ;; 4334e35772b2Smrg dgux*) 4335e35772b2Smrg case $cc_basename in 4336e35772b2Smrg ec++*) 4337e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4338e35772b2Smrg ;; 4339e35772b2Smrg ghcx*) 4340e35772b2Smrg # Green Hills C++ Compiler 4341e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4342e35772b2Smrg ;; 4343e35772b2Smrg *) 4344e35772b2Smrg ;; 43451fd23544Smrg esac 43461fd23544Smrg ;; 4347e35772b2Smrg freebsd* | dragonfly*) 4348e35772b2Smrg # FreeBSD uses GNU C++ 434972b676d7Smrg ;; 4350e35772b2Smrg hpux9* | hpux10* | hpux11*) 4351e35772b2Smrg case $cc_basename in 4352e35772b2Smrg CC*) 4353e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 435421525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 435521525869Smrg if test ia64 != "$host_cpu"; then 4356e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4357e35772b2Smrg fi 4358e35772b2Smrg ;; 4359e35772b2Smrg aCC*) 4360e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 436121525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4362e35772b2Smrg case $host_cpu in 4363e35772b2Smrg hppa*64*|ia64*) 4364e35772b2Smrg # +Z the default 4365e35772b2Smrg ;; 4366e35772b2Smrg *) 4367e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4368e35772b2Smrg ;; 4369e35772b2Smrg esac 4370e35772b2Smrg ;; 4371e35772b2Smrg *) 4372e35772b2Smrg ;; 4373e35772b2Smrg esac 437472b676d7Smrg ;; 4375e35772b2Smrg interix*) 4376e35772b2Smrg # This is c89, which is MS Visual C++ (no shared libs) 4377e35772b2Smrg # Anyone wants to do a port? 437872b676d7Smrg ;; 4379e35772b2Smrg irix5* | irix6* | nonstopux*) 4380e35772b2Smrg case $cc_basename in 4381e35772b2Smrg CC*) 4382e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4383e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4384e35772b2Smrg # CC pic flag -KPIC is the default. 4385e35772b2Smrg ;; 4386e35772b2Smrg *) 4387e35772b2Smrg ;; 4388e35772b2Smrg esac 438972b676d7Smrg ;; 439021525869Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4391e35772b2Smrg case $cc_basename in 4392e35772b2Smrg KCC*) 4393e35772b2Smrg # KAI C++ Compiler 4394e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4395e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4396e35772b2Smrg ;; 4397e35772b2Smrg ecpc* ) 439821525869Smrg # old Intel C++ for x86_64, which still supported -KPIC. 4399e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4400e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4401e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4402e35772b2Smrg ;; 4403e35772b2Smrg icpc* ) 4404e35772b2Smrg # Intel C++, used to be incompatible with GCC. 4405e35772b2Smrg # ICC 10 doesn't accept -KPIC any more. 4406e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4407e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4408e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4409e35772b2Smrg ;; 4410e35772b2Smrg pgCC* | pgcpp*) 4411e35772b2Smrg # Portland Group C++ compiler 4412e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4413e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4414e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4415e35772b2Smrg ;; 4416e35772b2Smrg cxx*) 4417e35772b2Smrg # Compaq C++ 4418e35772b2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4419e35772b2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4420e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4421e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4422e35772b2Smrg ;; 442374c14cd6Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 442474c14cd6Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4425e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4426e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4427e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4428e35772b2Smrg ;; 4429e35772b2Smrg *) 4430e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 4431e35772b2Smrg *Sun\ C*) 4432e35772b2Smrg # Sun C++ 5.9 4433e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4434e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4435e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4436e35772b2Smrg ;; 4437e35772b2Smrg esac 4438e35772b2Smrg ;; 4439e35772b2Smrg esac 444072b676d7Smrg ;; 4441e35772b2Smrg lynxos*) 444272b676d7Smrg ;; 4443e35772b2Smrg m88k*) 444472b676d7Smrg ;; 4445e35772b2Smrg mvs*) 4446e35772b2Smrg case $cc_basename in 4447e35772b2Smrg cxx*) 4448e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4449e35772b2Smrg ;; 4450e35772b2Smrg *) 4451e35772b2Smrg ;; 4452e35772b2Smrg esac 445372b676d7Smrg ;; 4454e35772b2Smrg netbsd*) 445572b676d7Smrg ;; 4456e35772b2Smrg *qnx* | *nto*) 4457e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4458e35772b2Smrg # it will coredump. 4459e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4460e35772b2Smrg ;; 4461e35772b2Smrg osf3* | osf4* | osf5*) 4462e35772b2Smrg case $cc_basename in 4463e35772b2Smrg KCC*) 4464e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4465e35772b2Smrg ;; 4466e35772b2Smrg RCC*) 4467e35772b2Smrg # Rational C++ 2.4.1 4468e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4469e35772b2Smrg ;; 4470e35772b2Smrg cxx*) 4471e35772b2Smrg # Digital/Compaq C++ 4472e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4473e35772b2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4474e35772b2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4475e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4476e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4477e35772b2Smrg ;; 4478e35772b2Smrg *) 4479e35772b2Smrg ;; 4480e35772b2Smrg esac 448172b676d7Smrg ;; 4482e35772b2Smrg psos*) 448372b676d7Smrg ;; 4484e35772b2Smrg solaris*) 4485e35772b2Smrg case $cc_basename in 448674c14cd6Smrg CC* | sunCC*) 4487e35772b2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4488e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4489e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4490e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4491e35772b2Smrg ;; 4492e35772b2Smrg gcx*) 4493e35772b2Smrg # Green Hills C++ Compiler 4494e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4495e35772b2Smrg ;; 4496e35772b2Smrg *) 4497e35772b2Smrg ;; 4498e35772b2Smrg esac 449972b676d7Smrg ;; 4500e35772b2Smrg sunos4*) 4501e35772b2Smrg case $cc_basename in 4502e35772b2Smrg CC*) 4503e35772b2Smrg # Sun C++ 4.x 4504e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4505e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4506e35772b2Smrg ;; 4507e35772b2Smrg lcc*) 4508e35772b2Smrg # Lucid 4509e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4510e35772b2Smrg ;; 451172b676d7Smrg *) 451272b676d7Smrg ;; 451372b676d7Smrg esac 451472b676d7Smrg ;; 4515e35772b2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4516e35772b2Smrg case $cc_basename in 4517e35772b2Smrg CC*) 4518e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4519e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4520e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4521e35772b2Smrg ;; 4522e35772b2Smrg esac 452372b676d7Smrg ;; 4524e35772b2Smrg tandem*) 4525e35772b2Smrg case $cc_basename in 4526e35772b2Smrg NCC*) 4527e35772b2Smrg # NonStop-UX NCC 3.20 4528e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4529e35772b2Smrg ;; 45301fd23544Smrg *) 45311fd23544Smrg ;; 4532e35772b2Smrg esac 453372b676d7Smrg ;; 4534e35772b2Smrg vxworks*) 453572b676d7Smrg ;; 453672b676d7Smrg *) 4537e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 453872b676d7Smrg ;; 453972b676d7Smrg esac 4540e35772b2Smrg fi 4541e35772b2Smrg], 4542e35772b2Smrg[ 454321525869Smrg if test yes = "$GCC"; then 4544e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4545e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4546e35772b2Smrg 4547e35772b2Smrg case $host_os in 4548e35772b2Smrg aix*) 4549e35772b2Smrg # All AIX code is PIC. 455021525869Smrg if test ia64 = "$host_cpu"; then 4551e35772b2Smrg # AIX 5 now supports IA64 processor 4552e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4553e35772b2Smrg fi 455421525869Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4555e35772b2Smrg ;; 4556e35772b2Smrg 4557e35772b2Smrg amigaos*) 4558e35772b2Smrg case $host_cpu in 4559e35772b2Smrg powerpc) 4560e35772b2Smrg # see comment about AmigaOS4 .so support 4561e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4562e35772b2Smrg ;; 4563e35772b2Smrg m68k) 4564e35772b2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 456521525869Smrg # adding the '-m68020' flag to GCC prevents building anything better, 456621525869Smrg # like '-m68040'. 4567e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4568e35772b2Smrg ;; 4569e35772b2Smrg esac 4570e35772b2Smrg ;; 4571e35772b2Smrg 4572e35772b2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4573e35772b2Smrg # PIC is the default for these OSes. 4574e35772b2Smrg ;; 4575e35772b2Smrg 4576e35772b2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4577e35772b2Smrg # This hack is so that the source file can tell whether it is being 4578e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 4579e35772b2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4580e35772b2Smrg # (--disable-auto-import) libraries 4581e35772b2Smrg m4_if([$1], [GCJ], [], 4582e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 458321525869Smrg case $host_os in 458421525869Smrg os2*) 458521525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 458621525869Smrg ;; 458721525869Smrg esac 4588e35772b2Smrg ;; 4589e35772b2Smrg 4590e35772b2Smrg darwin* | rhapsody*) 4591e35772b2Smrg # PIC is the default on this platform 4592e35772b2Smrg # Common symbols not allowed in MH_DYLIB files 4593e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4594e35772b2Smrg ;; 4595e35772b2Smrg 459674c14cd6Smrg haiku*) 459774c14cd6Smrg # PIC is the default for Haiku. 459874c14cd6Smrg # The "-static" flag exists, but is broken. 459974c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 460074c14cd6Smrg ;; 460174c14cd6Smrg 4602e35772b2Smrg hpux*) 4603e35772b2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4604e35772b2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4605e35772b2Smrg # sets the default TLS model and affects inlining. 4606e35772b2Smrg case $host_cpu in 4607e35772b2Smrg hppa*64*) 4608e35772b2Smrg # +Z the default 460972b676d7Smrg ;; 461072b676d7Smrg *) 4611e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 461272b676d7Smrg ;; 4613e35772b2Smrg esac 4614e35772b2Smrg ;; 4615e35772b2Smrg 4616e35772b2Smrg interix[[3-9]]*) 4617e35772b2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4618e35772b2Smrg # Instead, we relocate shared libraries at runtime. 4619e35772b2Smrg ;; 4620e35772b2Smrg 4621e35772b2Smrg msdosdjgpp*) 4622e35772b2Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4623e35772b2Smrg # on systems that don't support them. 4624e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4625e35772b2Smrg enable_shared=no 4626e35772b2Smrg ;; 4627e35772b2Smrg 4628e35772b2Smrg *nto* | *qnx*) 4629e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4630e35772b2Smrg # it will coredump. 4631e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4632e35772b2Smrg ;; 4633e35772b2Smrg 4634e35772b2Smrg sysv4*MP*) 4635e35772b2Smrg if test -d /usr/nec; then 4636e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4637e35772b2Smrg fi 4638e35772b2Smrg ;; 4639e35772b2Smrg 4640e35772b2Smrg *) 4641e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4642e35772b2Smrg ;; 464372b676d7Smrg esac 464474c14cd6Smrg 464574c14cd6Smrg case $cc_basename in 464674c14cd6Smrg nvcc*) # Cuda Compiler Driver 2.2 464774c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 464874c14cd6Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 464974c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 465074c14cd6Smrg fi 465174c14cd6Smrg ;; 465274c14cd6Smrg esac 4653e35772b2Smrg else 4654e35772b2Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4655e35772b2Smrg case $host_os in 4656e35772b2Smrg aix*) 4657e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 465821525869Smrg if test ia64 = "$host_cpu"; then 4659e35772b2Smrg # AIX 5 now supports IA64 processor 4660e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4661e35772b2Smrg else 4662e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4663e35772b2Smrg fi 4664e35772b2Smrg ;; 4665e35772b2Smrg 466621525869Smrg darwin* | rhapsody*) 466721525869Smrg # PIC is the default on this platform 466821525869Smrg # Common symbols not allowed in MH_DYLIB files 466921525869Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 467021525869Smrg case $cc_basename in 467121525869Smrg nagfor*) 467221525869Smrg # NAG Fortran compiler 467321525869Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 467421525869Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 467521525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 467621525869Smrg ;; 467721525869Smrg esac 467821525869Smrg ;; 467921525869Smrg 4680e35772b2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4681e35772b2Smrg # This hack is so that the source file can tell whether it is being 4682e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 4683e35772b2Smrg m4_if([$1], [GCJ], [], 4684e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 468521525869Smrg case $host_os in 468621525869Smrg os2*) 468721525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 468821525869Smrg ;; 468921525869Smrg esac 4690e35772b2Smrg ;; 4691e35772b2Smrg 4692e35772b2Smrg hpux9* | hpux10* | hpux11*) 4693e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4694e35772b2Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4695e35772b2Smrg # not for PA HP-UX. 4696e35772b2Smrg case $host_cpu in 4697e35772b2Smrg hppa*64*|ia64*) 4698e35772b2Smrg # +Z the default 469972b676d7Smrg ;; 470072b676d7Smrg *) 4701e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 470272b676d7Smrg ;; 4703e35772b2Smrg esac 4704e35772b2Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 470521525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4706e35772b2Smrg ;; 470772b676d7Smrg 4708e35772b2Smrg irix5* | irix6* | nonstopux*) 4709e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4710e35772b2Smrg # PIC (with -KPIC) is the default. 4711e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4712e35772b2Smrg ;; 471372b676d7Smrg 471421525869Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4715e35772b2Smrg case $cc_basename in 471621525869Smrg # old Intel for x86_64, which still supported -KPIC. 4717e35772b2Smrg ecc*) 4718e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4719e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4720e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4721e35772b2Smrg ;; 4722e35772b2Smrg # icc used to be incompatible with GCC. 4723e35772b2Smrg # ICC 10 doesn't accept -KPIC any more. 4724e35772b2Smrg icc* | ifort*) 4725e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4726e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4727e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4728e35772b2Smrg ;; 4729e35772b2Smrg # Lahey Fortran 8.1. 4730e35772b2Smrg lf95*) 4731e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4732e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4733e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4734e35772b2Smrg ;; 473574c14cd6Smrg nagfor*) 473674c14cd6Smrg # NAG Fortran compiler 473774c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 473874c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 473974c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 474074c14cd6Smrg ;; 474121525869Smrg tcc*) 474221525869Smrg # Fabrice Bellard et al's Tiny C Compiler 474321525869Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 474421525869Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 474521525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 474621525869Smrg ;; 474774c14cd6Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4748e35772b2Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4749e35772b2Smrg # which looks to be a dead project) 4750e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4751e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4752e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4753e35772b2Smrg ;; 4754e35772b2Smrg ccc*) 4755e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4756e35772b2Smrg # All Alpha code is PIC. 4757e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4758e35772b2Smrg ;; 475974c14cd6Smrg xl* | bgxl* | bgf* | mpixl*) 476074c14cd6Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4761e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4762e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4763e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4764e35772b2Smrg ;; 4765e35772b2Smrg *) 4766e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 476774c14cd6Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 476874c14cd6Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 476974c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 477074c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 477174c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 477274c14cd6Smrg ;; 477374c14cd6Smrg *Sun\ F* | *Sun*Fortran*) 477474c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 477574c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 477674c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 477774c14cd6Smrg ;; 4778e35772b2Smrg *Sun\ C*) 4779e35772b2Smrg # Sun C 5.9 4780e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4781e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4782e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4783e35772b2Smrg ;; 478474c14cd6Smrg *Intel*\ [[CF]]*Compiler*) 478574c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 478674c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 478774c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 478874c14cd6Smrg ;; 478974c14cd6Smrg *Portland\ Group*) 479074c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 479174c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4792e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4793e35772b2Smrg ;; 4794e35772b2Smrg esac 4795e35772b2Smrg ;; 4796e35772b2Smrg esac 4797e35772b2Smrg ;; 479872b676d7Smrg 4799e35772b2Smrg newsos6) 4800e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4801e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4802e35772b2Smrg ;; 480372b676d7Smrg 4804e35772b2Smrg *nto* | *qnx*) 4805e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4806e35772b2Smrg # it will coredump. 4807e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4808e35772b2Smrg ;; 480972b676d7Smrg 4810e35772b2Smrg osf3* | osf4* | osf5*) 4811e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4812e35772b2Smrg # All OSF/1 code is PIC. 4813e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4814e35772b2Smrg ;; 481572b676d7Smrg 4816e35772b2Smrg rdos*) 4817e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4818e35772b2Smrg ;; 481972b676d7Smrg 4820e35772b2Smrg solaris*) 4821e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4822e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4823e35772b2Smrg case $cc_basename in 482474c14cd6Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4825e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4826e35772b2Smrg *) 4827e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4828e35772b2Smrg esac 4829e35772b2Smrg ;; 483072b676d7Smrg 4831e35772b2Smrg sunos4*) 4832e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4833e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4834e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4835e35772b2Smrg ;; 483672b676d7Smrg 4837e35772b2Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4838e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4839e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4840e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4841e35772b2Smrg ;; 484272b676d7Smrg 4843e35772b2Smrg sysv4*MP*) 484421525869Smrg if test -d /usr/nec; then 4845e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4846e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4847e35772b2Smrg fi 4848e35772b2Smrg ;; 484972b676d7Smrg 4850e35772b2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4851e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4852e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4853e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4854e35772b2Smrg ;; 485572b676d7Smrg 4856e35772b2Smrg unicos*) 4857e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4858e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4859e35772b2Smrg ;; 486072b676d7Smrg 4861e35772b2Smrg uts4*) 4862e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4863e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4864e35772b2Smrg ;; 486572b676d7Smrg 4866e35772b2Smrg *) 4867e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4868e35772b2Smrg ;; 4869e35772b2Smrg esac 4870e35772b2Smrg fi 4871e35772b2Smrg]) 4872e35772b2Smrgcase $host_os in 487321525869Smrg # For platforms that do not support PIC, -DPIC is meaningless: 4874e35772b2Smrg *djgpp*) 4875e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4876e35772b2Smrg ;; 4877e35772b2Smrg *) 4878e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4879e35772b2Smrg ;; 4880e35772b2Smrgesac 488174c14cd6Smrg 488274c14cd6SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 488374c14cd6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 488474c14cd6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 488574c14cd6Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 488672b676d7Smrg 4887e35772b2Smrg# 4888e35772b2Smrg# Check to make sure the PIC flag actually works. 4889e35772b2Smrg# 4890e35772b2Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4891e35772b2Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4892e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4893e35772b2Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4894e35772b2Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4895e35772b2Smrg "" | " "*) ;; 4896e35772b2Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4897e35772b2Smrg esac], 4898e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4899e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 49001fd23544Smrgfi 4901e35772b2Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4902e35772b2Smrg [Additional compiler flags for building library objects]) 49031fd23544Smrg 490474c14cd6Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 490574c14cd6Smrg [How to pass a linker flag through the compiler]) 4906e35772b2Smrg# 4907e35772b2Smrg# Check to make sure the static flag actually works. 4908e35772b2Smrg# 4909e35772b2Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4910e35772b2Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4911e35772b2Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4912e35772b2Smrg $lt_tmp_static_flag, 4913e35772b2Smrg [], 4914e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4915e35772b2Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4916e35772b2Smrg [Compiler flag to prevent dynamic linking]) 4917e35772b2Smrg])# _LT_COMPILER_PIC 491872b676d7Smrg 4919e35772b2Smrg 4920e35772b2Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4921e35772b2Smrg# ---------------------------- 4922e35772b2Smrg# See if the linker supports building shared libraries. 4923e35772b2Smrgm4_defun([_LT_LINKER_SHLIBS], 4924e35772b2Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4925e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 492674c14cd6Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4927e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4928e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 4929e35772b2Smrgm4_require([_LT_DECL_SED])dnl 4930e35772b2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4931e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 4932e35772b2SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4933e35772b2Smrgm4_if([$1], [CXX], [ 4934e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 493574c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4936e35772b2Smrg case $host_os in 4937e35772b2Smrg aix[[4-9]]*) 4938e35772b2Smrg # If we're using GNU nm, then we don't want the "-C" option. 493921525869Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 494021525869Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 494121525869Smrg # weak defined symbols like other global defined symbols, whereas 494221525869Smrg # GNU nm marks them as "W". 494321525869Smrg # While the 'weak' keyword is ignored in the Export File, we need 494421525869Smrg # it in the Import File for the 'aix-soname' feature, so we have 494521525869Smrg # to replace the "-B" option with "-P" for AIX nm. 4946e35772b2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 494721525869Smrg _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' 4948e35772b2Smrg else 494921525869Smrg _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' 49501fd23544Smrg fi 49511fd23544Smrg ;; 4952e35772b2Smrg pw32*) 495321525869Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 495474c14cd6Smrg ;; 4955e35772b2Smrg cygwin* | mingw* | cegcc*) 495674c14cd6Smrg case $cc_basename in 495774c14cd6Smrg cl*) 495874c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 495974c14cd6Smrg ;; 496074c14cd6Smrg *) 496174c14cd6Smrg _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' 496274c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 496374c14cd6Smrg ;; 496474c14cd6Smrg esac 496574c14cd6Smrg ;; 4966e35772b2Smrg *) 4967e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 496874c14cd6Smrg ;; 4969e35772b2Smrg esac 4970e35772b2Smrg], [ 4971e35772b2Smrg runpath_var= 4972e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4973e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4974e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)= 4975e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4976e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4977e35772b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4978e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4979e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4980e35772b2Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4981e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4982e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4983e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4984e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4985e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4986e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4987e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4988e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4989e35772b2Smrg _LT_TAGVAR(module_cmds, $1)= 4990e35772b2Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4991e35772b2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4992e35772b2Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4993e35772b2Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4994e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4995e35772b2Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4996e35772b2Smrg # included in the symbol list 4997e35772b2Smrg _LT_TAGVAR(include_expsyms, $1)= 4998e35772b2Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 499921525869Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 500021525869Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 500121525869Smrg # as well as any symbol that contains 'd'. 5002e35772b2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5003e35772b2Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5004e35772b2Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 5005e35772b2Smrg # the symbol is explicitly referenced. Since portable code cannot 5006e35772b2Smrg # rely on this symbol name, it's probably fine to never include it in 5007e35772b2Smrg # preloaded symbol tables. 5008e35772b2Smrg # Exclude shared library initialization/finalization symbols. 5009e35772b2Smrgdnl Note also adjust exclude_expsyms for C++ above. 5010e35772b2Smrg extract_expsyms_cmds= 50111fd23544Smrg 5012e35772b2Smrg case $host_os in 5013e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 5014e35772b2Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5015e35772b2Smrg # When not using gcc, we currently assume that we are using 5016e35772b2Smrg # Microsoft Visual C++. 501721525869Smrg if test yes != "$GCC"; then 5018e35772b2Smrg with_gnu_ld=no 50191fd23544Smrg fi 502072b676d7Smrg ;; 5021e35772b2Smrg interix*) 5022e35772b2Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5023e35772b2Smrg with_gnu_ld=yes 5024e35772b2Smrg ;; 502521525869Smrg openbsd* | bitrig*) 5026e35772b2Smrg with_gnu_ld=no 5027e35772b2Smrg ;; 502872b676d7Smrg esac 502972b676d7Smrg 5030e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 503174c14cd6Smrg 503274c14cd6Smrg # On some targets, GNU ld is compatible enough with the native linker 503374c14cd6Smrg # that we're better off using the native interface for both. 503474c14cd6Smrg lt_use_gnu_ld_interface=no 503521525869Smrg if test yes = "$with_gnu_ld"; then 503674c14cd6Smrg case $host_os in 503774c14cd6Smrg aix*) 503874c14cd6Smrg # The AIX port of GNU ld has always aspired to compatibility 503974c14cd6Smrg # with the native linker. However, as the warning in the GNU ld 504074c14cd6Smrg # block says, versions before 2.19.5* couldn't really create working 504174c14cd6Smrg # shared libraries, regardless of the interface used. 504274c14cd6Smrg case `$LD -v 2>&1` in 504374c14cd6Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 504474c14cd6Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 504574c14cd6Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 504674c14cd6Smrg *) 504774c14cd6Smrg lt_use_gnu_ld_interface=yes 504874c14cd6Smrg ;; 504974c14cd6Smrg esac 505074c14cd6Smrg ;; 505174c14cd6Smrg *) 505274c14cd6Smrg lt_use_gnu_ld_interface=yes 505374c14cd6Smrg ;; 505474c14cd6Smrg esac 505574c14cd6Smrg fi 505674c14cd6Smrg 505721525869Smrg if test yes = "$lt_use_gnu_ld_interface"; then 5058e35772b2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 505921525869Smrg wlarc='$wl' 506072b676d7Smrg 5061e35772b2Smrg # Set some defaults for GNU ld with shared library support. These 5062e35772b2Smrg # are reset later if shared libraries are not supported. Putting them 5063e35772b2Smrg # here allows them to be overridden if necessary. 5064e35772b2Smrg runpath_var=LD_RUN_PATH 506521525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 506621525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5067e35772b2Smrg # ancient GNU ld didn't support --whole-archive et. al. 5068e35772b2Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 506921525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5070e35772b2Smrg else 5071e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5072e35772b2Smrg fi 5073e35772b2Smrg supports_anon_versioning=no 507421525869Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 507574c14cd6Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 5076e35772b2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5077e35772b2Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5078e35772b2Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5079e35772b2Smrg *\ 2.11.*) ;; # other 2.11 versions 5080e35772b2Smrg *) supports_anon_versioning=yes ;; 5081e35772b2Smrg esac 508272b676d7Smrg 5083e35772b2Smrg # See if GNU ld supports shared libraries. 5084e35772b2Smrg case $host_os in 5085e35772b2Smrg aix[[3-9]]*) 5086e35772b2Smrg # On AIX/PPC, the GNU linker is very broken 508721525869Smrg if test ia64 != "$host_cpu"; then 5088e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5089e35772b2Smrg cat <<_LT_EOF 1>&2 509072b676d7Smrg 509174c14cd6Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5092e35772b2Smrg*** to be unable to reliably create shared libraries on AIX. 5093e35772b2Smrg*** Therefore, libtool is disabling shared libraries support. If you 509474c14cd6Smrg*** really care for shared libraries, you may want to install binutils 509574c14cd6Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 509674c14cd6Smrg*** You will then need to restart the configuration process. 509772b676d7Smrg 5098e35772b2Smrg_LT_EOF 5099e35772b2Smrg fi 5100e35772b2Smrg ;; 510172b676d7Smrg 5102e35772b2Smrg amigaos*) 5103e35772b2Smrg case $host_cpu in 5104e35772b2Smrg powerpc) 5105e35772b2Smrg # see comment about AmigaOS4 .so support 510621525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5107e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5108e35772b2Smrg ;; 5109e35772b2Smrg m68k) 5110e35772b2Smrg _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)' 5111e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5112e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5113e35772b2Smrg ;; 5114e35772b2Smrg esac 5115e35772b2Smrg ;; 511672b676d7Smrg 5117e35772b2Smrg beos*) 5118e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5119e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5120e35772b2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5121e35772b2Smrg # support --undefined. This deserves some investigation. FIXME 512221525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5123e35772b2Smrg else 5124e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5125e35772b2Smrg fi 5126e35772b2Smrg ;; 512772b676d7Smrg 5128e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 5129e35772b2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5130e35772b2Smrg # as there is no search path for DLLs. 5131e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 513221525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5133e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5134e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5135e35772b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 513674c14cd6Smrg _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' 513774c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5138e35772b2Smrg 5139e35772b2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 514021525869Smrg _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' 514121525869Smrg # If the export-symbols file already is a .def file, use it as 514221525869Smrg # is; otherwise, prepend EXPORTS... 514321525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 514421525869Smrg cp $export_symbols $output_objdir/$soname.def; 514521525869Smrg else 514621525869Smrg echo EXPORTS > $output_objdir/$soname.def; 514721525869Smrg cat $export_symbols >> $output_objdir/$soname.def; 514821525869Smrg fi~ 514921525869Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5150e35772b2Smrg else 5151e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5152e35772b2Smrg fi 5153e35772b2Smrg ;; 515472b676d7Smrg 515574c14cd6Smrg haiku*) 515621525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 515774c14cd6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 515874c14cd6Smrg ;; 515974c14cd6Smrg 516021525869Smrg os2*) 516121525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 516221525869Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 516321525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 516421525869Smrg shrext_cmds=.dll 516521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 516621525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 516721525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 516821525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 516921525869Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 517021525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 517121525869Smrg emximp -o $lib $output_objdir/$libname.def' 517221525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 517321525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 517421525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 517521525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 517621525869Smrg prefix_cmds="$SED"~ 517721525869Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 517821525869Smrg prefix_cmds="$prefix_cmds -e 1d"; 517921525869Smrg fi~ 518021525869Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 518121525869Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 518221525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 518321525869Smrg emximp -o $lib $output_objdir/$libname.def' 518421525869Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 518521525869Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 518621525869Smrg ;; 518721525869Smrg 5188e35772b2Smrg interix[[3-9]]*) 5189e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5190e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 519121525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 519221525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5193e35772b2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5194e35772b2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5195e35772b2Smrg # default) and relocated if they conflict, which is a slow very memory 5196e35772b2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5197e35772b2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5198e35772b2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 519921525869Smrg _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' 520021525869Smrg _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' 5201e35772b2Smrg ;; 520272b676d7Smrg 520374c14cd6Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5204e35772b2Smrg tmp_diet=no 520521525869Smrg if test linux-dietlibc = "$host_os"; then 5206e35772b2Smrg case $cc_basename in 5207e35772b2Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5208e35772b2Smrg esac 5209e35772b2Smrg fi 5210e35772b2Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 521121525869Smrg && test no = "$tmp_diet" 5212e35772b2Smrg then 521374c14cd6Smrg tmp_addflag=' $pic_flag' 5214e35772b2Smrg tmp_sharedflag='-shared' 5215e35772b2Smrg case $cc_basename,$host_cpu in 5216e35772b2Smrg pgcc*) # Portland Group C compiler 521721525869Smrg _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' 5218e35772b2Smrg tmp_addflag=' $pic_flag' 5219e35772b2Smrg ;; 522074c14cd6Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 522174c14cd6Smrg # Portland Group f77 and f90 compilers 522221525869Smrg _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' 5223e35772b2Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 5224e35772b2Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5225e35772b2Smrg tmp_addflag=' -i_dynamic' ;; 5226e35772b2Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5227e35772b2Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5228e35772b2Smrg ifc* | ifort*) # Intel Fortran compiler 5229e35772b2Smrg tmp_addflag=' -nofor_main' ;; 5230e35772b2Smrg lf95*) # Lahey Fortran 8.1 5231e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5232e35772b2Smrg tmp_sharedflag='--shared' ;; 523321525869Smrg nagfor*) # NAGFOR 5.3 523421525869Smrg tmp_sharedflag='-Wl,-shared' ;; 523574c14cd6Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5236e35772b2Smrg tmp_sharedflag='-qmkshrobj' 5237e35772b2Smrg tmp_addflag= ;; 523874c14cd6Smrg nvcc*) # Cuda Compiler Driver 2.2 523921525869Smrg _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' 524074c14cd6Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 524174c14cd6Smrg ;; 5242e35772b2Smrg esac 5243e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 5244e35772b2Smrg *Sun\ C*) # Sun C 5.9 524521525869Smrg _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' 5246e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5247e35772b2Smrg tmp_sharedflag='-G' ;; 5248e35772b2Smrg *Sun\ F*) # Sun Fortran 8.3 5249e35772b2Smrg tmp_sharedflag='-G' ;; 5250e35772b2Smrg esac 525121525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 525272b676d7Smrg 525321525869Smrg if test yes = "$supports_anon_versioning"; then 5254e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 525521525869Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 525621525869Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 525721525869Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5258e35772b2Smrg fi 525972b676d7Smrg 5260e35772b2Smrg case $cc_basename in 526121525869Smrg tcc*) 526221525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 526321525869Smrg ;; 526474c14cd6Smrg xlf* | bgf* | bgxlf* | mpixlf*) 5265e35772b2Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5266e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 526721525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 526874c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 526921525869Smrg if test yes = "$supports_anon_versioning"; then 5270e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 527121525869Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 527221525869Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 527321525869Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5274e35772b2Smrg fi 5275e35772b2Smrg ;; 5276e35772b2Smrg esac 5277e35772b2Smrg else 5278e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5279e35772b2Smrg fi 5280e35772b2Smrg ;; 528172b676d7Smrg 5282e35772b2Smrg netbsd*) 5283e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5284e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5285e35772b2Smrg wlarc= 5286e35772b2Smrg else 528721525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 528821525869Smrg _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' 5289e35772b2Smrg fi 5290e35772b2Smrg ;; 529172b676d7Smrg 5292e35772b2Smrg solaris*) 5293e35772b2Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5294e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5295e35772b2Smrg cat <<_LT_EOF 1>&2 529672b676d7Smrg 5297e35772b2Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5298e35772b2Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5299e35772b2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5300e35772b2Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5301e35772b2Smrg*** your PATH or compiler configuration so that the native linker is 5302e35772b2Smrg*** used, and then restart. 530372b676d7Smrg 5304e35772b2Smrg_LT_EOF 5305e35772b2Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 530621525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 530721525869Smrg _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' 5308e35772b2Smrg else 5309e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5310e35772b2Smrg fi 5311e35772b2Smrg ;; 531272b676d7Smrg 5313e35772b2Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5314e35772b2Smrg case `$LD -v 2>&1` in 5315e35772b2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5316e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5317e35772b2Smrg cat <<_LT_EOF 1>&2 531872b676d7Smrg 531921525869Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5320e35772b2Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5321e35772b2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5322e35772b2Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5323e35772b2Smrg*** your PATH or compiler configuration so that the native linker is 5324e35772b2Smrg*** used, and then restart. 532572b676d7Smrg 5326e35772b2Smrg_LT_EOF 5327e35772b2Smrg ;; 5328e35772b2Smrg *) 5329e35772b2Smrg # For security reasons, it is highly recommended that you always 5330e35772b2Smrg # use absolute paths for naming shared libraries, and exclude the 5331e35772b2Smrg # DT_RUNPATH tag from executables and libraries. But doing so 5332e35772b2Smrg # requires that you compile everything twice, which is a pain. 5333e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 533421525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 533521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 533621525869Smrg _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' 5337e35772b2Smrg else 5338e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5339e35772b2Smrg fi 5340e35772b2Smrg ;; 5341e35772b2Smrg esac 5342e35772b2Smrg ;; 534372b676d7Smrg 5344e35772b2Smrg sunos4*) 5345e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5346e35772b2Smrg wlarc= 5347e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5348e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5349e35772b2Smrg ;; 535072b676d7Smrg 5351e35772b2Smrg *) 5352e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 535321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 535421525869Smrg _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' 5355e35772b2Smrg else 5356e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5357e35772b2Smrg fi 5358e35772b2Smrg ;; 5359e35772b2Smrg esac 536072b676d7Smrg 536121525869Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5362e35772b2Smrg runpath_var= 5363e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5364e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5365e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5366e35772b2Smrg fi 5367e35772b2Smrg else 5368e35772b2Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5369e35772b2Smrg case $host_os in 5370e35772b2Smrg aix3*) 5371e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5372e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5373e35772b2Smrg _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' 5374e35772b2Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5375e35772b2Smrg # are no directories specified by -L. 5376e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 537721525869Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5378e35772b2Smrg # Neither direct hardcoding nor static linking is supported with a 5379e35772b2Smrg # broken collect2. 5380e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5381e35772b2Smrg fi 5382e35772b2Smrg ;; 538372b676d7Smrg 5384e35772b2Smrg aix[[4-9]]*) 538521525869Smrg if test ia64 = "$host_cpu"; then 5386e35772b2Smrg # On IA64, the linker does run time linking by default, so we don't 5387e35772b2Smrg # have to do anything special. 5388e35772b2Smrg aix_use_runtimelinking=no 5389e35772b2Smrg exp_sym_flag='-Bexport' 539021525869Smrg no_entry_flag= 5391e35772b2Smrg else 5392e35772b2Smrg # If we're using GNU nm, then we don't want the "-C" option. 539321525869Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 539421525869Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 539521525869Smrg # weak defined symbols like other global defined symbols, whereas 539621525869Smrg # GNU nm marks them as "W". 539721525869Smrg # While the 'weak' keyword is ignored in the Export File, we need 539821525869Smrg # it in the Import File for the 'aix-soname' feature, so we have 539921525869Smrg # to replace the "-B" option with "-P" for AIX nm. 5400e35772b2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 540121525869Smrg _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' 5402e35772b2Smrg else 540321525869Smrg _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' 5404e35772b2Smrg fi 5405e35772b2Smrg aix_use_runtimelinking=no 540672b676d7Smrg 5407e35772b2Smrg # Test if we are trying to use run time linking or normal 5408e35772b2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 540921525869Smrg # have runtime linking enabled, and use it for executables. 541021525869Smrg # For shared libraries, we enable/disable runtime linking 541121525869Smrg # depending on the kind of the shared library created - 541221525869Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 541321525869Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 541421525869Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 541521525869Smrg # lib.a static archive 541621525869Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 541721525869Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 541821525869Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 541921525869Smrg # lib.a(lib.so.V) shared, rtl:no 542021525869Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 542121525869Smrg # lib.a static archive 5422e35772b2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5423e35772b2Smrg for ld_flag in $LDFLAGS; do 542421525869Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5425e35772b2Smrg aix_use_runtimelinking=yes 5426e35772b2Smrg break 5427e35772b2Smrg fi 5428e35772b2Smrg done 542921525869Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 543021525869Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 543121525869Smrg # so we don't have lib.a shared libs to link our executables. 543221525869Smrg # We have to force runtime linking in this case. 543321525869Smrg aix_use_runtimelinking=yes 543421525869Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 543521525869Smrg fi 5436e35772b2Smrg ;; 5437e35772b2Smrg esac 543872b676d7Smrg 5439e35772b2Smrg exp_sym_flag='-bexport' 5440e35772b2Smrg no_entry_flag='-bnoentry' 5441e35772b2Smrg fi 544272b676d7Smrg 5443e35772b2Smrg # When large executables or shared objects are built, AIX ld can 5444e35772b2Smrg # have problems creating the table of contents. If linking a library 5445e35772b2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5446e35772b2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5447e35772b2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 544872b676d7Smrg 5449e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='' 5450e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5451e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5452e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5453e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 545421525869Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 545521525869Smrg case $with_aix_soname,$aix_use_runtimelinking in 545621525869Smrg aix,*) ;; # traditional, no import file 545721525869Smrg svr4,* | *,yes) # use import file 545821525869Smrg # The Import File defines what to hardcode. 545921525869Smrg _LT_TAGVAR(hardcode_direct, $1)=no 546021525869Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 546121525869Smrg ;; 546221525869Smrg esac 546372b676d7Smrg 546421525869Smrg if test yes = "$GCC"; then 5465e35772b2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5466e35772b2Smrg # We only want to do this on AIX 4.2 and lower, the check 5467e35772b2Smrg # below for broken collect2 doesn't work under 4.3+ 546821525869Smrg collect2name=`$CC -print-prog-name=collect2` 5469e35772b2Smrg if test -f "$collect2name" && 5470e35772b2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5471e35772b2Smrg then 5472e35772b2Smrg # We have reworked collect2 5473e35772b2Smrg : 5474e35772b2Smrg else 5475e35772b2Smrg # We have old collect2 5476e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5477e35772b2Smrg # It fails to find uninstalled libraries when the uninstalled 5478e35772b2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5479e35772b2Smrg # to unsupported forces relinking 5480e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5481e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5482e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5483e35772b2Smrg fi 5484e35772b2Smrg ;; 5485e35772b2Smrg esac 5486e35772b2Smrg shared_flag='-shared' 548721525869Smrg if test yes = "$aix_use_runtimelinking"; then 548821525869Smrg shared_flag="$shared_flag "'$wl-G' 5489e35772b2Smrg fi 549021525869Smrg # Need to ensure runtime linking is disabled for the traditional 549121525869Smrg # shared library, or the linker may eventually find shared libraries 549221525869Smrg # /with/ Import File - we do not want to mix them. 549321525869Smrg shared_flag_aix='-shared' 549421525869Smrg shared_flag_svr4='-shared $wl-G' 5495e35772b2Smrg else 5496e35772b2Smrg # not using gcc 549721525869Smrg if test ia64 = "$host_cpu"; then 5498e35772b2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5499e35772b2Smrg # chokes on -Wl,-G. The following line is correct: 5500e35772b2Smrg shared_flag='-G' 5501e35772b2Smrg else 550221525869Smrg if test yes = "$aix_use_runtimelinking"; then 550321525869Smrg shared_flag='$wl-G' 5504e35772b2Smrg else 550521525869Smrg shared_flag='$wl-bM:SRE' 5506e35772b2Smrg fi 550721525869Smrg shared_flag_aix='$wl-bM:SRE' 550821525869Smrg shared_flag_svr4='$wl-G' 5509e35772b2Smrg fi 5510e35772b2Smrg fi 551172b676d7Smrg 551221525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5513e35772b2Smrg # It seems that -bexpall does not export symbols beginning with 5514e35772b2Smrg # underscore (_), so it is better to generate a list of symbols to export. 5515e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 551621525869Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5517e35772b2Smrg # Warning - without using the other runtime loading flags (-brtl), 5518e35772b2Smrg # -berok will link without error, but may produce a broken library. 5519e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5520e35772b2Smrg # Determine the default libpath from the value encoded in an 5521e35772b2Smrg # empty executable. 552274c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 552321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 552421525869Smrg _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 5525e35772b2Smrg else 552621525869Smrg if test ia64 = "$host_cpu"; then 552721525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5528e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 552921525869Smrg _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" 5530e35772b2Smrg else 5531e35772b2Smrg # Determine the default libpath from the value encoded in an 5532e35772b2Smrg # empty executable. 553374c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 553421525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5535e35772b2Smrg # Warning - without using the other run time loading flags, 5536e35772b2Smrg # -berok will link without error, but may produce a broken library. 553721525869Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 553821525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 553921525869Smrg if test yes = "$with_gnu_ld"; then 554074c14cd6Smrg # We only use this code for GNU lds that support --whole-archive. 554121525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 554274c14cd6Smrg else 554374c14cd6Smrg # Exported symbols can be pulled into shared objects from archives 554474c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 554574c14cd6Smrg fi 5546e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 554721525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 554821525869Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 554921525869Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 555021525869Smrg if test svr4 != "$with_aix_soname"; then 555121525869Smrg # This is similar to how AIX traditionally builds its shared libraries. 555221525869Smrg _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' 555321525869Smrg fi 555421525869Smrg if test aix != "$with_aix_soname"; then 555521525869Smrg _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' 555621525869Smrg else 555721525869Smrg # used by -dlpreopen to get the symbols 555821525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 555921525869Smrg fi 556021525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5561e35772b2Smrg fi 5562e35772b2Smrg fi 5563e35772b2Smrg ;; 556472b676d7Smrg 5565e35772b2Smrg amigaos*) 5566e35772b2Smrg case $host_cpu in 5567e35772b2Smrg powerpc) 5568e35772b2Smrg # see comment about AmigaOS4 .so support 556921525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5570e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5571e35772b2Smrg ;; 5572e35772b2Smrg m68k) 5573e35772b2Smrg _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)' 5574e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5575e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5576e35772b2Smrg ;; 5577e35772b2Smrg esac 5578e35772b2Smrg ;; 557972b676d7Smrg 5580e35772b2Smrg bsdi[[45]]*) 5581e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5582e35772b2Smrg ;; 558372b676d7Smrg 5584e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 5585e35772b2Smrg # When not using gcc, we currently assume that we are using 5586e35772b2Smrg # Microsoft Visual C++. 5587e35772b2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5588e35772b2Smrg # no search path for DLLs. 558974c14cd6Smrg case $cc_basename in 559074c14cd6Smrg cl*) 559174c14cd6Smrg # Native MSVC 559274c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 559374c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 559474c14cd6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 559574c14cd6Smrg _LT_TAGVAR(file_list_spec, $1)='@' 559674c14cd6Smrg # Tell ltmain to make .lib files, not .a files. 559774c14cd6Smrg libext=lib 559874c14cd6Smrg # Tell ltmain to make .dll files, not .so files. 559921525869Smrg shrext_cmds=.dll 560074c14cd6Smrg # FIXME: Setting linknames here is a bad hack. 560121525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 560221525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 560321525869Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 560421525869Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 560521525869Smrg else 560621525869Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 560721525869Smrg fi~ 560821525869Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 560921525869Smrg linknames=' 561074c14cd6Smrg # The linker will not automatically build a static lib if we build a DLL. 561174c14cd6Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 561274c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 561374c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 561474c14cd6Smrg _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' 561574c14cd6Smrg # Don't use ranlib 561674c14cd6Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 561774c14cd6Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 561821525869Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 561921525869Smrg case $lt_outputfile in 562021525869Smrg *.exe|*.EXE) ;; 562121525869Smrg *) 562221525869Smrg lt_outputfile=$lt_outputfile.exe 562321525869Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 562421525869Smrg ;; 562521525869Smrg esac~ 562621525869Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 562721525869Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 562821525869Smrg $RM "$lt_outputfile.manifest"; 562921525869Smrg fi' 563074c14cd6Smrg ;; 563174c14cd6Smrg *) 563274c14cd6Smrg # Assume MSVC wrapper 563374c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 563474c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 563574c14cd6Smrg # Tell ltmain to make .lib files, not .a files. 563674c14cd6Smrg libext=lib 563774c14cd6Smrg # Tell ltmain to make .dll files, not .so files. 563821525869Smrg shrext_cmds=.dll 563974c14cd6Smrg # FIXME: Setting linknames here is a bad hack. 564074c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 564174c14cd6Smrg # The linker will automatically build a .lib file if we build a DLL. 564274c14cd6Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 564374c14cd6Smrg # FIXME: Should let the user specify the lib program. 564474c14cd6Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 564574c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 564674c14cd6Smrg ;; 564774c14cd6Smrg esac 5648e35772b2Smrg ;; 564972b676d7Smrg 5650e35772b2Smrg darwin* | rhapsody*) 5651e35772b2Smrg _LT_DARWIN_LINKER_FEATURES($1) 5652e35772b2Smrg ;; 565372b676d7Smrg 5654e35772b2Smrg dgux*) 5655e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5656e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5657e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5658e35772b2Smrg ;; 565972b676d7Smrg 5660e35772b2Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5661e35772b2Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5662e35772b2Smrg # does not break anything, and helps significantly (at the cost of a little 5663e35772b2Smrg # extra space). 5664e35772b2Smrg freebsd2.2*) 5665e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5666e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5667e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5668e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5669e35772b2Smrg ;; 567072b676d7Smrg 5671e35772b2Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 567274c14cd6Smrg freebsd2.*) 5673e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5674e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5675e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5676e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5677e35772b2Smrg ;; 567872b676d7Smrg 5679e35772b2Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5680e35772b2Smrg freebsd* | dragonfly*) 568174c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5682e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5683e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5684e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5685e35772b2Smrg ;; 568672b676d7Smrg 5687e35772b2Smrg hpux9*) 568821525869Smrg if test yes = "$GCC"; then 568921525869Smrg _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' 5690e35772b2Smrg else 569121525869Smrg _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' 5692e35772b2Smrg fi 569321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5694e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5695e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 569672b676d7Smrg 5697e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 5698e35772b2Smrg # but as the default location of the library. 5699e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 570021525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5701e35772b2Smrg ;; 570272b676d7Smrg 5703e35772b2Smrg hpux10*) 570421525869Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 570521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5706e35772b2Smrg else 5707e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5708e35772b2Smrg fi 570921525869Smrg if test no = "$with_gnu_ld"; then 571021525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5711e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5712e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5713e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 571421525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5715e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 5716e35772b2Smrg # but as the default location of the library. 5717e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5718e35772b2Smrg fi 571972b676d7Smrg ;; 5720e35772b2Smrg 5721e35772b2Smrg hpux11*) 572221525869Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5723e35772b2Smrg case $host_cpu in 5724e35772b2Smrg hppa*64*) 572521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5726e35772b2Smrg ;; 5727e35772b2Smrg ia64*) 572821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5729e35772b2Smrg ;; 5730e35772b2Smrg *) 573121525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5732e35772b2Smrg ;; 5733e35772b2Smrg esac 5734e35772b2Smrg else 5735e35772b2Smrg case $host_cpu in 5736e35772b2Smrg hppa*64*) 573721525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5738e35772b2Smrg ;; 5739e35772b2Smrg ia64*) 574021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5741e35772b2Smrg ;; 5742e35772b2Smrg *) 574374c14cd6Smrg m4_if($1, [], [ 574474c14cd6Smrg # Older versions of the 11.00 compiler do not understand -b yet 574574c14cd6Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 574674c14cd6Smrg _LT_LINKER_OPTION([if $CC understands -b], 574774c14cd6Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 574821525869Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 574974c14cd6Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 575021525869Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5751e35772b2Smrg ;; 5752e35772b2Smrg esac 5753e35772b2Smrg fi 575421525869Smrg if test no = "$with_gnu_ld"; then 575521525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5756e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5757e35772b2Smrg 5758e35772b2Smrg case $host_cpu in 5759e35772b2Smrg hppa*64*|ia64*) 5760e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5761e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5762e35772b2Smrg ;; 5763e35772b2Smrg *) 5764e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5765e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 576621525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5767e35772b2Smrg 5768e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 5769e35772b2Smrg # but as the default location of the library. 5770e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5771e35772b2Smrg ;; 5772e35772b2Smrg esac 5773e35772b2Smrg fi 577472b676d7Smrg ;; 577572b676d7Smrg 5776e35772b2Smrg irix5* | irix6* | nonstopux*) 577721525869Smrg if test yes = "$GCC"; then 577821525869Smrg _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' 5779e35772b2Smrg # Try to use the -exported_symbol ld option, if it does not 5780e35772b2Smrg # work, assume that -exports_file does not work either and 5781e35772b2Smrg # implicitly export all symbols. 578274c14cd6Smrg # This should be the same for all languages, so no per-tag cache variable. 578374c14cd6Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 578474c14cd6Smrg [lt_cv_irix_exported_symbol], 578521525869Smrg [save_LDFLAGS=$LDFLAGS 578621525869Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 578774c14cd6Smrg AC_LINK_IFELSE( 578874c14cd6Smrg [AC_LANG_SOURCE( 578974c14cd6Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 579074c14cd6Smrg [C++], [[int foo (void) { return 0; }]], 579174c14cd6Smrg [Fortran 77], [[ 579274c14cd6Smrg subroutine foo 579374c14cd6Smrg end]], 579474c14cd6Smrg [Fortran], [[ 579574c14cd6Smrg subroutine foo 579674c14cd6Smrg end]])])], 579774c14cd6Smrg [lt_cv_irix_exported_symbol=yes], 579874c14cd6Smrg [lt_cv_irix_exported_symbol=no]) 579921525869Smrg LDFLAGS=$save_LDFLAGS]) 580021525869Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 580121525869Smrg _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' 580274c14cd6Smrg fi 5803e35772b2Smrg else 580421525869Smrg _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' 580521525869Smrg _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' 5806e35772b2Smrg fi 5807e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 580821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5809e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5810e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5811e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5812e35772b2Smrg ;; 581372b676d7Smrg 581421525869Smrg linux*) 581521525869Smrg case $cc_basename in 581621525869Smrg tcc*) 581721525869Smrg # Fabrice Bellard et al's Tiny C Compiler 581821525869Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 581921525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 582021525869Smrg ;; 582121525869Smrg esac 582221525869Smrg ;; 582321525869Smrg 5824e35772b2Smrg netbsd*) 5825e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5826e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5827e35772b2Smrg else 5828e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5829e35772b2Smrg fi 5830e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5831e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5832e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5833e35772b2Smrg ;; 583472b676d7Smrg 5835e35772b2Smrg newsos6) 5836e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5837e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 583821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5839e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5840e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5841e35772b2Smrg ;; 584272b676d7Smrg 5843e35772b2Smrg *nto* | *qnx*) 5844e35772b2Smrg ;; 584572b676d7Smrg 584621525869Smrg openbsd* | bitrig*) 5847e35772b2Smrg if test -f /usr/libexec/ld.so; then 5848e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5849e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5850e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 585121525869Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5852e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 585321525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 585421525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 585521525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5856e35772b2Smrg else 585721525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 585821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5859e35772b2Smrg fi 5860e35772b2Smrg else 5861e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5862e35772b2Smrg fi 5863e35772b2Smrg ;; 586472b676d7Smrg 5865e35772b2Smrg os2*) 5866e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5867e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5868e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 586921525869Smrg shrext_cmds=.dll 587021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 587121525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 587221525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 587321525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 587421525869Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 587521525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 587621525869Smrg emximp -o $lib $output_objdir/$libname.def' 587721525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 587821525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 587921525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 588021525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 588121525869Smrg prefix_cmds="$SED"~ 588221525869Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 588321525869Smrg prefix_cmds="$prefix_cmds -e 1d"; 588421525869Smrg fi~ 588521525869Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 588621525869Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 588721525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 588821525869Smrg emximp -o $lib $output_objdir/$libname.def' 588921525869Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 589021525869Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5891e35772b2Smrg ;; 589272b676d7Smrg 5893e35772b2Smrg osf3*) 589421525869Smrg if test yes = "$GCC"; then 589521525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 589621525869Smrg _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' 5897e35772b2Smrg else 5898e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 589921525869Smrg _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' 5900e35772b2Smrg fi 5901e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 590221525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5903e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5904e35772b2Smrg ;; 590572b676d7Smrg 5906e35772b2Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 590721525869Smrg if test yes = "$GCC"; then 590821525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 590921525869Smrg _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' 591021525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5911e35772b2Smrg else 5912e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 591321525869Smrg _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' 5914e35772b2Smrg _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~ 591521525869Smrg $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' 591672b676d7Smrg 5917e35772b2Smrg # Both c and cxx compiler support -rpath directly 5918e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5919e35772b2Smrg fi 5920e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5921e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5922e35772b2Smrg ;; 592372b676d7Smrg 5924e35772b2Smrg solaris*) 5925e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 592621525869Smrg if test yes = "$GCC"; then 592721525869Smrg wlarc='$wl' 592821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5929e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593021525869Smrg $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' 5931e35772b2Smrg else 5932e35772b2Smrg case `$CC -V 2>&1` in 5933e35772b2Smrg *"Compilers 5.0"*) 5934e35772b2Smrg wlarc='' 593521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5936e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593721525869Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5938e35772b2Smrg ;; 5939e35772b2Smrg *) 594021525869Smrg wlarc='$wl' 594121525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5942e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 594321525869Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5944e35772b2Smrg ;; 5945e35772b2Smrg esac 5946e35772b2Smrg fi 5947e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5948e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5949e35772b2Smrg case $host_os in 5950e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5951e35772b2Smrg *) 5952e35772b2Smrg # The compiler driver will combine and reorder linker options, 595321525869Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 5954e35772b2Smrg # but is careful enough not to reorder. 5955e35772b2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 595621525869Smrg if test yes = "$GCC"; then 595721525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5958e35772b2Smrg else 5959e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5960e35772b2Smrg fi 5961e35772b2Smrg ;; 5962e35772b2Smrg esac 5963e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5964e35772b2Smrg ;; 596572b676d7Smrg 5966e35772b2Smrg sunos4*) 596721525869Smrg if test sequent = "$host_vendor"; then 5968e35772b2Smrg # Use $CC to link under sequent, because it throws in some extra .o 5969e35772b2Smrg # files that make .init and .fini sections work. 597021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5971e35772b2Smrg else 5972e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5973e35772b2Smrg fi 5974e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5975e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5976e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5977e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5978e35772b2Smrg ;; 597972b676d7Smrg 5980e35772b2Smrg sysv4) 5981e35772b2Smrg case $host_vendor in 5982e35772b2Smrg sni) 5983e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5984e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5985e35772b2Smrg ;; 5986e35772b2Smrg siemens) 5987e35772b2Smrg ## LD is ld it makes a PLAMLIB 5988e35772b2Smrg ## CC just makes a GrossModule. 5989e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5990e35772b2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5991e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5992e35772b2Smrg ;; 5993e35772b2Smrg motorola) 5994e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5995e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5996e35772b2Smrg ;; 5997e35772b2Smrg esac 5998e35772b2Smrg runpath_var='LD_RUN_PATH' 5999e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6000e35772b2Smrg ;; 600172b676d7Smrg 6002e35772b2Smrg sysv4.3*) 6003e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6004e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6005e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6006e35772b2Smrg ;; 600772b676d7Smrg 6008e35772b2Smrg sysv4*MP*) 6009e35772b2Smrg if test -d /usr/nec; then 6010e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6011e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6012e35772b2Smrg runpath_var=LD_RUN_PATH 6013e35772b2Smrg hardcode_runpath_var=yes 6014e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6015e35772b2Smrg fi 6016e35772b2Smrg ;; 601772b676d7Smrg 6018e35772b2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 601921525869Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6020e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6021e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6022e35772b2Smrg runpath_var='LD_RUN_PATH' 602372b676d7Smrg 602421525869Smrg if test yes = "$GCC"; then 602521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602621525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6027e35772b2Smrg else 602821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602921525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6030e35772b2Smrg fi 6031e35772b2Smrg ;; 603272b676d7Smrg 6033e35772b2Smrg sysv5* | sco3.2v5* | sco5v6*) 603421525869Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 6035e35772b2Smrg # link with -lc, and that would cause any symbols used from libc to 6036e35772b2Smrg # always be unresolved, which means just about no library would 6037e35772b2Smrg # ever link correctly. If we're not using GNU ld we use -z text 6038e35772b2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6039e35772b2Smrg # as -z defs. 604021525869Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 604121525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6042e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6043e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 604421525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6045e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6046e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 604721525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6048e35772b2Smrg runpath_var='LD_RUN_PATH' 604972b676d7Smrg 605021525869Smrg if test yes = "$GCC"; then 605121525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605221525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6053e35772b2Smrg else 605421525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605521525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6056e35772b2Smrg fi 6057e35772b2Smrg ;; 605872b676d7Smrg 6059e35772b2Smrg uts4*) 6060e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6061e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6062e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6063e35772b2Smrg ;; 606472b676d7Smrg 6065e35772b2Smrg *) 6066e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6067e35772b2Smrg ;; 6068e35772b2Smrg esac 606972b676d7Smrg 607021525869Smrg if test sni = "$host_vendor"; then 6071e35772b2Smrg case $host in 6072e35772b2Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 607321525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6074e35772b2Smrg ;; 6075e35772b2Smrg esac 6076e35772b2Smrg fi 6077e35772b2Smrg fi 6078e35772b2Smrg]) 6079e35772b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 608021525869Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 608172b676d7Smrg 6082e35772b2Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 608372b676d7Smrg 6084e35772b2Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6085e35772b2Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6086e35772b2Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 6087e35772b2Smrg [The commands to extract the exported symbol list from a shared archive]) 608872b676d7Smrg 6089e35772b2Smrg# 6090e35772b2Smrg# Do we need to explicitly link libc? 6091e35772b2Smrg# 6092e35772b2Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6093e35772b2Smrgx|xyes) 6094e35772b2Smrg # Assume -lc should be added 6095e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 609672b676d7Smrg 609721525869Smrg if test yes,yes = "$GCC,$enable_shared"; then 6098e35772b2Smrg case $_LT_TAGVAR(archive_cmds, $1) in 6099e35772b2Smrg *'~'*) 6100e35772b2Smrg # FIXME: we may have to deal with multi-command sequences. 6101e35772b2Smrg ;; 6102e35772b2Smrg '$CC '*) 6103e35772b2Smrg # Test whether the compiler implicitly links with -lc since on some 6104e35772b2Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6105e35772b2Smrg # to ld, don't add -lc before -lgcc. 610674c14cd6Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 610774c14cd6Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 610874c14cd6Smrg [$RM conftest* 610974c14cd6Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 611074c14cd6Smrg 611174c14cd6Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 611274c14cd6Smrg soname=conftest 611374c14cd6Smrg lib=conftest 611474c14cd6Smrg libobjs=conftest.$ac_objext 611574c14cd6Smrg deplibs= 611674c14cd6Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 611774c14cd6Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 611874c14cd6Smrg compiler_flags=-v 611974c14cd6Smrg linker_flags=-v 612074c14cd6Smrg verstring= 612174c14cd6Smrg output_objdir=. 612274c14cd6Smrg libname=conftest 612374c14cd6Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 612474c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 612574c14cd6Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 612674c14cd6Smrg then 612774c14cd6Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 612874c14cd6Smrg else 612974c14cd6Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 613074c14cd6Smrg fi 613174c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 613274c14cd6Smrg else 613374c14cd6Smrg cat conftest.err 1>&5 613474c14cd6Smrg fi 613574c14cd6Smrg $RM conftest* 613674c14cd6Smrg ]) 613774c14cd6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6138e35772b2Smrg ;; 6139e35772b2Smrg esac 6140e35772b2Smrg fi 6141e35772b2Smrg ;; 6142e35772b2Smrgesac 614372b676d7Smrg 6144e35772b2Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6145e35772b2Smrg [Whether or not to add -lc for building shared libraries]) 6146e35772b2Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6147e35772b2Smrg [enable_shared_with_static_runtimes], [0], 6148e35772b2Smrg [Whether or not to disallow shared libs when runtime libs are static]) 6149e35772b2Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6150e35772b2Smrg [Compiler flag to allow reflexive dlopens]) 6151e35772b2Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6152e35772b2Smrg [Compiler flag to generate shared objects directly from archives]) 6153e35772b2Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 6154e35772b2Smrg [Whether the compiler copes with passing no objects directly]) 6155e35772b2Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6156e35772b2Smrg [Create an old-style archive from a shared archive]) 6157e35772b2Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6158e35772b2Smrg [Create a temporary old-style archive to link instead of a shared archive]) 6159e35772b2Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6160e35772b2Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6161e35772b2Smrg_LT_TAGDECL([], [module_cmds], [2], 6162e35772b2Smrg [Commands used to build a loadable module if different from building 6163e35772b2Smrg a shared archive.]) 6164e35772b2Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6165e35772b2Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 6166e35772b2Smrg [Whether we are building with GNU ld or not]) 6167e35772b2Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6168e35772b2Smrg [Flag that allows shared libraries with undefined symbols to be built]) 6169e35772b2Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 6170e35772b2Smrg [Flag that enforces no undefined symbols]) 6171e35772b2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6172e35772b2Smrg [Flag to hardcode $libdir into a binary during linking. 6173e35772b2Smrg This must work even if $libdir does not exist]) 6174e35772b2Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6175e35772b2Smrg [Whether we need a single "-rpath" flag with a separated argument]) 6176e35772b2Smrg_LT_TAGDECL([], [hardcode_direct], [0], 617721525869Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6178e35772b2Smrg DIR into the resulting binary]) 6179e35772b2Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 618021525869Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6181e35772b2Smrg DIR into the resulting binary and the resulting library dependency is 618221525869Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 6183e35772b2Smrg library is relocated]) 6184e35772b2Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6185e35772b2Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6186e35772b2Smrg into the resulting binary]) 6187e35772b2Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6188e35772b2Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6189e35772b2Smrg into the resulting binary]) 6190e35772b2Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 6191e35772b2Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 6192e35772b2Smrg into the library and all subsequent libraries and executables linked 6193e35772b2Smrg against it]) 6194e35772b2Smrg_LT_TAGDECL([], [inherit_rpath], [0], 6195e35772b2Smrg [Set to yes if linker adds runtime paths of dependent libraries 6196e35772b2Smrg to runtime path list]) 6197e35772b2Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 6198e35772b2Smrg [Whether libtool must link a program against all its dependency libraries]) 6199e35772b2Smrg_LT_TAGDECL([], [always_export_symbols], [0], 6200e35772b2Smrg [Set to "yes" if exported symbols are required]) 6201e35772b2Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6202e35772b2Smrg [The commands to list exported symbols]) 6203e35772b2Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 6204e35772b2Smrg [Symbols that should not be listed in the preloaded symbols]) 6205e35772b2Smrg_LT_TAGDECL([], [include_expsyms], [1], 6206e35772b2Smrg [Symbols that must always be exported]) 6207e35772b2Smrg_LT_TAGDECL([], [prelink_cmds], [2], 6208e35772b2Smrg [Commands necessary for linking programs (against libraries) with templates]) 620974c14cd6Smrg_LT_TAGDECL([], [postlink_cmds], [2], 621074c14cd6Smrg [Commands necessary for finishing linking programs]) 6211e35772b2Smrg_LT_TAGDECL([], [file_list_spec], [1], 6212e35772b2Smrg [Specify filename containing input files]) 6213e35772b2Smrgdnl FIXME: Not yet implemented 6214e35772b2Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6215e35772b2Smrgdnl [Compiler flag to generate thread safe objects]) 6216e35772b2Smrg])# _LT_LINKER_SHLIBS 6217e35772b2Smrg 6218e35772b2Smrg 6219e35772b2Smrg# _LT_LANG_C_CONFIG([TAG]) 6220e35772b2Smrg# ------------------------ 6221e35772b2Smrg# Ensure that the configuration variables for a C compiler are suitably 6222e35772b2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 622321525869Smrg# the compiler configuration to 'libtool'. 6224e35772b2Smrgm4_defun([_LT_LANG_C_CONFIG], 6225e35772b2Smrg[m4_require([_LT_DECL_EGREP])dnl 622621525869Smrglt_save_CC=$CC 6227e35772b2SmrgAC_LANG_PUSH(C) 622872b676d7Smrg 6229e35772b2Smrg# Source file extension for C test sources. 6230e35772b2Smrgac_ext=c 623172b676d7Smrg 6232e35772b2Smrg# Object file extension for compiled C test sources. 6233e35772b2Smrgobjext=o 6234e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 623572b676d7Smrg 6236e35772b2Smrg# Code to be used in simple compile tests 6237e35772b2Smrglt_simple_compile_test_code="int some_variable = 0;" 623872b676d7Smrg 6239e35772b2Smrg# Code to be used in simple link tests 6240e35772b2Smrglt_simple_link_test_code='int main(){return(0);}' 624172b676d7Smrg 6242e35772b2Smrg_LT_TAG_COMPILER 6243e35772b2Smrg# Save the default compiler, since it gets overwritten when the other 6244e35772b2Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6245e35772b2Smrgcompiler_DEFAULT=$CC 624672b676d7Smrg 6247e35772b2Smrg# save warnings/boilerplate of simple test code 6248e35772b2Smrg_LT_COMPILER_BOILERPLATE 6249e35772b2Smrg_LT_LINKER_BOILERPLATE 625072b676d7Smrg 6251e35772b2Smrgif test -n "$compiler"; then 6252e35772b2Smrg _LT_COMPILER_NO_RTTI($1) 6253e35772b2Smrg _LT_COMPILER_PIC($1) 6254e35772b2Smrg _LT_COMPILER_C_O($1) 6255e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 6256e35772b2Smrg _LT_LINKER_SHLIBS($1) 6257e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 6258e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6259e35772b2Smrg LT_SYS_DLOPEN_SELF 6260e35772b2Smrg _LT_CMD_STRIPLIB 6261e35772b2Smrg 626221525869Smrg # Report what library types will actually be built 6263e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6264e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 6265e35772b2Smrg 6266e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 626721525869Smrg test no = "$can_build_shared" && enable_shared=no 6268e35772b2Smrg 6269e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6270e35772b2Smrg # are all built from PIC. 6271e35772b2Smrg case $host_os in 6272e35772b2Smrg aix3*) 627321525869Smrg test yes = "$enable_shared" && enable_static=no 6274e35772b2Smrg if test -n "$RANLIB"; then 6275e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6276e35772b2Smrg postinstall_cmds='$RANLIB $lib' 6277e35772b2Smrg fi 6278e35772b2Smrg ;; 627972b676d7Smrg 6280e35772b2Smrg aix[[4-9]]*) 628121525869Smrg if test ia64 != "$host_cpu"; then 628221525869Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 628321525869Smrg yes,aix,yes) ;; # shared object as lib.so file only 628421525869Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 628521525869Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 628621525869Smrg esac 6287e35772b2Smrg fi 6288e35772b2Smrg ;; 6289e35772b2Smrg esac 6290e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 629172b676d7Smrg 6292e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 6293e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 629421525869Smrg test yes = "$enable_shared" || enable_static=yes 6295e35772b2Smrg AC_MSG_RESULT([$enable_static]) 629672b676d7Smrg 6297e35772b2Smrg _LT_CONFIG($1) 6298e35772b2Smrgfi 6299e35772b2SmrgAC_LANG_POP 630021525869SmrgCC=$lt_save_CC 6301e35772b2Smrg])# _LT_LANG_C_CONFIG 630272b676d7Smrg 630372b676d7Smrg 6304e35772b2Smrg# _LT_LANG_CXX_CONFIG([TAG]) 6305e35772b2Smrg# -------------------------- 6306e35772b2Smrg# Ensure that the configuration variables for a C++ compiler are suitably 6307e35772b2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 630821525869Smrg# the compiler configuration to 'libtool'. 6309e35772b2Smrgm4_defun([_LT_LANG_CXX_CONFIG], 631074c14cd6Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6311e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 631274c14cd6Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 631321525869Smrgif test -n "$CXX" && ( test no != "$CXX" && 631421525869Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 631521525869Smrg (test g++ != "$CXX"))); then 631674c14cd6Smrg AC_PROG_CXXCPP 631774c14cd6Smrgelse 631874c14cd6Smrg _lt_caught_CXX_error=yes 631974c14cd6Smrgfi 6320e35772b2Smrg 6321e35772b2SmrgAC_LANG_PUSH(C++) 6322e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6323e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6324e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6325e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6326e35772b2Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6327e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6328e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6329e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6330e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6331e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6332e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6333e35772b2Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6334e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6335e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6336e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 6337e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6338e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6339e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 634074c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 634174c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6342e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6343e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6344e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 634572b676d7Smrg 6346e35772b2Smrg# Source file extension for C++ test sources. 6347e35772b2Smrgac_ext=cpp 634872b676d7Smrg 6349e35772b2Smrg# Object file extension for compiled C++ test sources. 6350e35772b2Smrgobjext=o 6351e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 6352e35772b2Smrg 6353e35772b2Smrg# No sense in running all these tests if we already determined that 6354e35772b2Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6355e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 6356e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 635721525869Smrgif test yes != "$_lt_caught_CXX_error"; then 6358e35772b2Smrg # Code to be used in simple compile tests 6359e35772b2Smrg lt_simple_compile_test_code="int some_variable = 0;" 6360e35772b2Smrg 6361e35772b2Smrg # Code to be used in simple link tests 6362e35772b2Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6363e35772b2Smrg 6364e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6365e35772b2Smrg _LT_TAG_COMPILER 6366e35772b2Smrg 6367e35772b2Smrg # save warnings/boilerplate of simple test code 6368e35772b2Smrg _LT_COMPILER_BOILERPLATE 6369e35772b2Smrg _LT_LINKER_BOILERPLATE 6370e35772b2Smrg 6371e35772b2Smrg # Allow CC to be a program name with arguments. 6372e35772b2Smrg lt_save_CC=$CC 637374c14cd6Smrg lt_save_CFLAGS=$CFLAGS 6374e35772b2Smrg lt_save_LD=$LD 6375e35772b2Smrg lt_save_GCC=$GCC 6376e35772b2Smrg GCC=$GXX 6377e35772b2Smrg lt_save_with_gnu_ld=$with_gnu_ld 6378e35772b2Smrg lt_save_path_LD=$lt_cv_path_LD 6379e35772b2Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6380e35772b2Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6381e35772b2Smrg else 6382e35772b2Smrg $as_unset lt_cv_prog_gnu_ld 6383e35772b2Smrg fi 6384e35772b2Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 6385e35772b2Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 6386e35772b2Smrg else 6387e35772b2Smrg $as_unset lt_cv_path_LD 6388e35772b2Smrg fi 6389e35772b2Smrg test -z "${LDCXX+set}" || LD=$LDCXX 6390e35772b2Smrg CC=${CXX-"c++"} 639174c14cd6Smrg CFLAGS=$CXXFLAGS 6392e35772b2Smrg compiler=$CC 6393e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 6394e35772b2Smrg _LT_CC_BASENAME([$compiler]) 639572b676d7Smrg 6396e35772b2Smrg if test -n "$compiler"; then 6397e35772b2Smrg # We don't want -fno-exception when compiling C++ code, so set the 6398e35772b2Smrg # no_builtin_flag separately 639921525869Smrg if test yes = "$GXX"; then 6400e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6401e35772b2Smrg else 6402e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6403e35772b2Smrg fi 640472b676d7Smrg 640521525869Smrg if test yes = "$GXX"; then 6406e35772b2Smrg # Set up default GNU C++ configuration 640772b676d7Smrg 6408e35772b2Smrg LT_PATH_LD 640972b676d7Smrg 6410e35772b2Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6411e35772b2Smrg # archiving commands below assume that GNU ld is being used. 641221525869Smrg if test yes = "$with_gnu_ld"; then 641321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 641421525869Smrg _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' 641572b676d7Smrg 641621525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 641721525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 641872b676d7Smrg 6419e35772b2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6420e35772b2Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6421e35772b2Smrg # investigate it a little bit more. (MM) 642221525869Smrg wlarc='$wl' 642372b676d7Smrg 6424e35772b2Smrg # ancient GNU ld didn't support --whole-archive et. al. 6425e35772b2Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6426e35772b2Smrg $GREP 'no-whole-archive' > /dev/null; then 642721525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6428e35772b2Smrg else 6429e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6430e35772b2Smrg fi 6431e35772b2Smrg else 6432e35772b2Smrg with_gnu_ld=no 6433e35772b2Smrg wlarc= 6434e35772b2Smrg 6435e35772b2Smrg # A generic and very simple default shared library creation 6436e35772b2Smrg # command for GNU C++ for the case where it uses the native 6437e35772b2Smrg # linker, instead of GNU ld. If possible, this setting should 6438e35772b2Smrg # overridden to take advantage of the native linker features on 6439e35772b2Smrg # the platform it is being used on. 6440e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6441e35772b2Smrg fi 644272b676d7Smrg 6443e35772b2Smrg # Commands to make compiler produce verbose output that lists 6444e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6445e35772b2Smrg # linking a shared library. 644674c14cd6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 644772b676d7Smrg 6448e35772b2Smrg else 6449e35772b2Smrg GXX=no 6450e35772b2Smrg with_gnu_ld=no 6451e35772b2Smrg wlarc= 6452e35772b2Smrg fi 645372b676d7Smrg 6454e35772b2Smrg # PORTME: fill in a description of your system's C++ link characteristics 6455e35772b2Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6456e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6457e35772b2Smrg case $host_os in 6458e35772b2Smrg aix3*) 6459e35772b2Smrg # FIXME: insert proper C++ library support 6460e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6461e35772b2Smrg ;; 6462e35772b2Smrg aix[[4-9]]*) 646321525869Smrg if test ia64 = "$host_cpu"; then 6464e35772b2Smrg # On IA64, the linker does run time linking by default, so we don't 6465e35772b2Smrg # have to do anything special. 6466e35772b2Smrg aix_use_runtimelinking=no 6467e35772b2Smrg exp_sym_flag='-Bexport' 646821525869Smrg no_entry_flag= 6469e35772b2Smrg else 6470e35772b2Smrg aix_use_runtimelinking=no 6471e35772b2Smrg 6472e35772b2Smrg # Test if we are trying to use run time linking or normal 6473e35772b2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 647421525869Smrg # have runtime linking enabled, and use it for executables. 647521525869Smrg # For shared libraries, we enable/disable runtime linking 647621525869Smrg # depending on the kind of the shared library created - 647721525869Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 647821525869Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 647921525869Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 648021525869Smrg # lib.a static archive 648121525869Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 648221525869Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 648321525869Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 648421525869Smrg # lib.a(lib.so.V) shared, rtl:no 648521525869Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 648621525869Smrg # lib.a static archive 6487e35772b2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6488e35772b2Smrg for ld_flag in $LDFLAGS; do 6489e35772b2Smrg case $ld_flag in 6490e35772b2Smrg *-brtl*) 6491e35772b2Smrg aix_use_runtimelinking=yes 6492e35772b2Smrg break 6493e35772b2Smrg ;; 6494e35772b2Smrg esac 6495e35772b2Smrg done 649621525869Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 649721525869Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 649821525869Smrg # so we don't have lib.a shared libs to link our executables. 649921525869Smrg # We have to force runtime linking in this case. 650021525869Smrg aix_use_runtimelinking=yes 650121525869Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 650221525869Smrg fi 6503e35772b2Smrg ;; 6504e35772b2Smrg esac 650572b676d7Smrg 6506e35772b2Smrg exp_sym_flag='-bexport' 6507e35772b2Smrg no_entry_flag='-bnoentry' 6508e35772b2Smrg fi 650972b676d7Smrg 6510e35772b2Smrg # When large executables or shared objects are built, AIX ld can 6511e35772b2Smrg # have problems creating the table of contents. If linking a library 6512e35772b2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6513e35772b2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6514e35772b2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6515e35772b2Smrg 6516e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='' 6517e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6518e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6519e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6520e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 652121525869Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 652221525869Smrg case $with_aix_soname,$aix_use_runtimelinking in 652321525869Smrg aix,*) ;; # no import file 652421525869Smrg svr4,* | *,yes) # use import file 652521525869Smrg # The Import File defines what to hardcode. 652621525869Smrg _LT_TAGVAR(hardcode_direct, $1)=no 652721525869Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 652821525869Smrg ;; 652921525869Smrg esac 6530e35772b2Smrg 653121525869Smrg if test yes = "$GXX"; then 6532e35772b2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6533e35772b2Smrg # We only want to do this on AIX 4.2 and lower, the check 6534e35772b2Smrg # below for broken collect2 doesn't work under 4.3+ 653521525869Smrg collect2name=`$CC -print-prog-name=collect2` 6536e35772b2Smrg if test -f "$collect2name" && 6537e35772b2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6538e35772b2Smrg then 6539e35772b2Smrg # We have reworked collect2 6540e35772b2Smrg : 6541e35772b2Smrg else 6542e35772b2Smrg # We have old collect2 6543e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6544e35772b2Smrg # It fails to find uninstalled libraries when the uninstalled 6545e35772b2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6546e35772b2Smrg # to unsupported forces relinking 6547e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6548e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6549e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6550e35772b2Smrg fi 6551e35772b2Smrg esac 6552e35772b2Smrg shared_flag='-shared' 655321525869Smrg if test yes = "$aix_use_runtimelinking"; then 655421525869Smrg shared_flag=$shared_flag' $wl-G' 6555e35772b2Smrg fi 655621525869Smrg # Need to ensure runtime linking is disabled for the traditional 655721525869Smrg # shared library, or the linker may eventually find shared libraries 655821525869Smrg # /with/ Import File - we do not want to mix them. 655921525869Smrg shared_flag_aix='-shared' 656021525869Smrg shared_flag_svr4='-shared $wl-G' 6561e35772b2Smrg else 6562e35772b2Smrg # not using gcc 656321525869Smrg if test ia64 = "$host_cpu"; then 6564e35772b2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6565e35772b2Smrg # chokes on -Wl,-G. The following line is correct: 6566e35772b2Smrg shared_flag='-G' 6567e35772b2Smrg else 656821525869Smrg if test yes = "$aix_use_runtimelinking"; then 656921525869Smrg shared_flag='$wl-G' 6570e35772b2Smrg else 657121525869Smrg shared_flag='$wl-bM:SRE' 6572e35772b2Smrg fi 657321525869Smrg shared_flag_aix='$wl-bM:SRE' 657421525869Smrg shared_flag_svr4='$wl-G' 6575e35772b2Smrg fi 6576e35772b2Smrg fi 657772b676d7Smrg 657821525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6579e35772b2Smrg # It seems that -bexpall does not export symbols beginning with 6580e35772b2Smrg # underscore (_), so it is better to generate a list of symbols to 6581e35772b2Smrg # export. 6582e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 658321525869Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6584e35772b2Smrg # Warning - without using the other runtime loading flags (-brtl), 6585e35772b2Smrg # -berok will link without error, but may produce a broken library. 658621525869Smrg # The "-G" linker flag allows undefined symbols. 658721525869Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6588e35772b2Smrg # Determine the default libpath from the value encoded in an empty 6589e35772b2Smrg # executable. 659074c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 659121525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6592e35772b2Smrg 659321525869Smrg _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 6594e35772b2Smrg else 659521525869Smrg if test ia64 = "$host_cpu"; then 659621525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6597e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 659821525869Smrg _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" 6599e35772b2Smrg else 6600e35772b2Smrg # Determine the default libpath from the value encoded in an 6601e35772b2Smrg # empty executable. 660274c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 660321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6604e35772b2Smrg # Warning - without using the other run time loading flags, 6605e35772b2Smrg # -berok will link without error, but may produce a broken library. 660621525869Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 660721525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 660821525869Smrg if test yes = "$with_gnu_ld"; then 660974c14cd6Smrg # We only use this code for GNU lds that support --whole-archive. 661021525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 661174c14cd6Smrg else 661274c14cd6Smrg # Exported symbols can be pulled into shared objects from archives 661374c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 661474c14cd6Smrg fi 6615e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 661621525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 661721525869Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 661821525869Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 661921525869Smrg if test svr4 != "$with_aix_soname"; then 662021525869Smrg # This is similar to how AIX traditionally builds its shared 662121525869Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 662221525869Smrg _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' 662321525869Smrg fi 662421525869Smrg if test aix != "$with_aix_soname"; then 662521525869Smrg _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' 662621525869Smrg else 662721525869Smrg # used by -dlpreopen to get the symbols 662821525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 662921525869Smrg fi 663021525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6631e35772b2Smrg fi 6632e35772b2Smrg fi 6633e35772b2Smrg ;; 663472b676d7Smrg 6635e35772b2Smrg beos*) 6636e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6637e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6638e35772b2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6639e35772b2Smrg # support --undefined. This deserves some investigation. FIXME 664021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6641e35772b2Smrg else 6642e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6643e35772b2Smrg fi 6644e35772b2Smrg ;; 664572b676d7Smrg 6646e35772b2Smrg chorus*) 6647e35772b2Smrg case $cc_basename in 6648e35772b2Smrg *) 6649e35772b2Smrg # FIXME: insert proper C++ library support 6650e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6651e35772b2Smrg ;; 6652e35772b2Smrg esac 6653e35772b2Smrg ;; 665472b676d7Smrg 6655e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 665674c14cd6Smrg case $GXX,$cc_basename in 665774c14cd6Smrg ,cl* | no,cl*) 665874c14cd6Smrg # Native MSVC 665974c14cd6Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 666074c14cd6Smrg # no search path for DLLs. 666174c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 666274c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 666374c14cd6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 666474c14cd6Smrg _LT_TAGVAR(file_list_spec, $1)='@' 666574c14cd6Smrg # Tell ltmain to make .lib files, not .a files. 666674c14cd6Smrg libext=lib 666774c14cd6Smrg # Tell ltmain to make .dll files, not .so files. 666821525869Smrg shrext_cmds=.dll 666974c14cd6Smrg # FIXME: Setting linknames here is a bad hack. 667021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 667121525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 667221525869Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 667321525869Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 667421525869Smrg else 667521525869Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 667621525869Smrg fi~ 667721525869Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 667821525869Smrg linknames=' 667974c14cd6Smrg # The linker will not automatically build a static lib if we build a DLL. 668074c14cd6Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 668174c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 668274c14cd6Smrg # Don't use ranlib 668374c14cd6Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 668474c14cd6Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 668521525869Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 668621525869Smrg case $lt_outputfile in 668721525869Smrg *.exe|*.EXE) ;; 668821525869Smrg *) 668921525869Smrg lt_outputfile=$lt_outputfile.exe 669021525869Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 669121525869Smrg ;; 669221525869Smrg esac~ 669321525869Smrg func_to_tool_file "$lt_outputfile"~ 669421525869Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 669521525869Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 669621525869Smrg $RM "$lt_outputfile.manifest"; 669721525869Smrg fi' 669874c14cd6Smrg ;; 669974c14cd6Smrg *) 670074c14cd6Smrg # g++ 670174c14cd6Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 670274c14cd6Smrg # as there is no search path for DLLs. 670374c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 670421525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 670574c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 670674c14cd6Smrg _LT_TAGVAR(always_export_symbols, $1)=no 670774c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 670874c14cd6Smrg 670974c14cd6Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 671021525869Smrg _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' 671121525869Smrg # If the export-symbols file already is a .def file, use it as 671221525869Smrg # is; otherwise, prepend EXPORTS... 671321525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 671421525869Smrg cp $export_symbols $output_objdir/$soname.def; 671521525869Smrg else 671621525869Smrg echo EXPORTS > $output_objdir/$soname.def; 671721525869Smrg cat $export_symbols >> $output_objdir/$soname.def; 671821525869Smrg fi~ 671921525869Smrg $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' 672074c14cd6Smrg else 672174c14cd6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 672274c14cd6Smrg fi 672374c14cd6Smrg ;; 672474c14cd6Smrg esac 672574c14cd6Smrg ;; 6726e35772b2Smrg darwin* | rhapsody*) 6727e35772b2Smrg _LT_DARWIN_LINKER_FEATURES($1) 6728e35772b2Smrg ;; 672972b676d7Smrg 673021525869Smrg os2*) 673121525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 673221525869Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 673321525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 673421525869Smrg shrext_cmds=.dll 673521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 673621525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 673721525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 673821525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 673921525869Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 674021525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 674121525869Smrg emximp -o $lib $output_objdir/$libname.def' 674221525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 674321525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 674421525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 674521525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 674621525869Smrg prefix_cmds="$SED"~ 674721525869Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 674821525869Smrg prefix_cmds="$prefix_cmds -e 1d"; 674921525869Smrg fi~ 675021525869Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 675121525869Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 675221525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 675321525869Smrg emximp -o $lib $output_objdir/$libname.def' 675421525869Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 675521525869Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 675621525869Smrg ;; 675721525869Smrg 6758e35772b2Smrg dgux*) 6759e35772b2Smrg case $cc_basename in 6760e35772b2Smrg ec++*) 6761e35772b2Smrg # FIXME: insert proper C++ library support 6762e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6763e35772b2Smrg ;; 6764e35772b2Smrg ghcx*) 6765e35772b2Smrg # Green Hills C++ Compiler 6766e35772b2Smrg # FIXME: insert proper C++ library support 6767e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6768e35772b2Smrg ;; 6769e35772b2Smrg *) 6770e35772b2Smrg # FIXME: insert proper C++ library support 6771e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6772e35772b2Smrg ;; 6773e35772b2Smrg esac 6774e35772b2Smrg ;; 677572b676d7Smrg 677674c14cd6Smrg freebsd2.*) 6777e35772b2Smrg # C++ shared libraries reported to be fairly broken before 6778e35772b2Smrg # switch to ELF 6779e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6780e35772b2Smrg ;; 678172b676d7Smrg 6782e35772b2Smrg freebsd-elf*) 6783e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6784e35772b2Smrg ;; 678572b676d7Smrg 6786e35772b2Smrg freebsd* | dragonfly*) 6787e35772b2Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6788e35772b2Smrg # conventions 6789e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6790e35772b2Smrg ;; 679172b676d7Smrg 679274c14cd6Smrg haiku*) 679321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 679474c14cd6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 679574c14cd6Smrg ;; 679674c14cd6Smrg 6797e35772b2Smrg hpux9*) 679821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6799e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 680021525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6801e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6802e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6803e35772b2Smrg # but as the default 6804e35772b2Smrg # location of the library. 6805e35772b2Smrg 6806e35772b2Smrg case $cc_basename in 6807e35772b2Smrg CC*) 6808e35772b2Smrg # FIXME: insert proper C++ library support 6809e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6810e35772b2Smrg ;; 6811e35772b2Smrg aCC*) 681221525869Smrg _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' 6813e35772b2Smrg # Commands to make compiler produce verbose output that lists 6814e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6815e35772b2Smrg # linking a shared library. 6816e35772b2Smrg # 6817e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6818e35772b2Smrg # explicitly linking system object files so we need to strip them 6819e35772b2Smrg # from the output so that they don't get included in the library 6820e35772b2Smrg # dependencies. 682121525869Smrg 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"' 6822e35772b2Smrg ;; 6823e35772b2Smrg *) 682421525869Smrg if test yes = "$GXX"; then 682521525869Smrg _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' 6826e35772b2Smrg else 6827e35772b2Smrg # FIXME: insert proper C++ library support 6828e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6829e35772b2Smrg fi 6830e35772b2Smrg ;; 6831e35772b2Smrg esac 6832e35772b2Smrg ;; 683372b676d7Smrg 6834e35772b2Smrg hpux10*|hpux11*) 683521525869Smrg if test no = "$with_gnu_ld"; then 683621525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6837e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6838e35772b2Smrg 6839e35772b2Smrg case $host_cpu in 6840e35772b2Smrg hppa*64*|ia64*) 6841e35772b2Smrg ;; 6842e35772b2Smrg *) 684321525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6844e35772b2Smrg ;; 6845e35772b2Smrg esac 6846e35772b2Smrg fi 6847e35772b2Smrg case $host_cpu in 6848e35772b2Smrg hppa*64*|ia64*) 6849e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6850e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6851e35772b2Smrg ;; 6852e35772b2Smrg *) 6853e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6854e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6855e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6856e35772b2Smrg # but as the default 6857e35772b2Smrg # location of the library. 6858e35772b2Smrg ;; 6859e35772b2Smrg esac 6860e35772b2Smrg 6861e35772b2Smrg case $cc_basename in 6862e35772b2Smrg CC*) 6863e35772b2Smrg # FIXME: insert proper C++ library support 6864e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6865e35772b2Smrg ;; 6866e35772b2Smrg aCC*) 6867e35772b2Smrg case $host_cpu in 6868e35772b2Smrg hppa*64*) 686921525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6870e35772b2Smrg ;; 6871e35772b2Smrg ia64*) 687221525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6873e35772b2Smrg ;; 6874e35772b2Smrg *) 687521525869Smrg _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' 6876e35772b2Smrg ;; 6877e35772b2Smrg esac 6878e35772b2Smrg # Commands to make compiler produce verbose output that lists 6879e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6880e35772b2Smrg # linking a shared library. 6881e35772b2Smrg # 6882e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6883e35772b2Smrg # explicitly linking system object files so we need to strip them 6884e35772b2Smrg # from the output so that they don't get included in the library 6885e35772b2Smrg # dependencies. 688621525869Smrg 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"' 6887e35772b2Smrg ;; 6888e35772b2Smrg *) 688921525869Smrg if test yes = "$GXX"; then 689021525869Smrg if test no = "$with_gnu_ld"; then 6891e35772b2Smrg case $host_cpu in 6892e35772b2Smrg hppa*64*) 689321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6894e35772b2Smrg ;; 6895e35772b2Smrg ia64*) 689621525869Smrg _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' 6897e35772b2Smrg ;; 6898e35772b2Smrg *) 689921525869Smrg _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' 6900e35772b2Smrg ;; 6901e35772b2Smrg esac 6902e35772b2Smrg fi 6903e35772b2Smrg else 6904e35772b2Smrg # FIXME: insert proper C++ library support 6905e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6906e35772b2Smrg fi 6907e35772b2Smrg ;; 6908e35772b2Smrg esac 6909e35772b2Smrg ;; 691072b676d7Smrg 6911e35772b2Smrg interix[[3-9]]*) 6912e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6913e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 691421525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 691521525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6916e35772b2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6917e35772b2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6918e35772b2Smrg # default) and relocated if they conflict, which is a slow very memory 6919e35772b2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6920e35772b2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6921e35772b2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 692221525869Smrg _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' 692321525869Smrg _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' 6924e35772b2Smrg ;; 6925e35772b2Smrg irix5* | irix6*) 6926e35772b2Smrg case $cc_basename in 6927e35772b2Smrg CC*) 6928e35772b2Smrg # SGI C++ 692921525869Smrg _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' 6930e35772b2Smrg 6931e35772b2Smrg # Archives containing C++ object files must be created using 6932e35772b2Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6933e35772b2Smrg # necessary to make sure instantiated templates are included 6934e35772b2Smrg # in the archive. 6935e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6936e35772b2Smrg ;; 6937e35772b2Smrg *) 693821525869Smrg if test yes = "$GXX"; then 693921525869Smrg if test no = "$with_gnu_ld"; then 694021525869Smrg _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' 6941e35772b2Smrg else 694221525869Smrg _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' 6943e35772b2Smrg fi 6944e35772b2Smrg fi 6945e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6946e35772b2Smrg ;; 6947e35772b2Smrg esac 694821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6949e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6950e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6951e35772b2Smrg ;; 69521fd23544Smrg 695321525869Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6954e35772b2Smrg case $cc_basename in 6955e35772b2Smrg KCC*) 6956e35772b2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6957e35772b2Smrg 6958e35772b2Smrg # KCC will only create a shared library if the output file 6959e35772b2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6960e35772b2Smrg # to its proper name (with version) after linking. 696121525869Smrg _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' 696221525869Smrg _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' 6963e35772b2Smrg # Commands to make compiler produce verbose output that lists 6964e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6965e35772b2Smrg # linking a shared library. 6966e35772b2Smrg # 6967e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6968e35772b2Smrg # explicitly linking system object files so we need to strip them 6969e35772b2Smrg # from the output so that they don't get included in the library 6970e35772b2Smrg # dependencies. 697121525869Smrg 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"' 6972e35772b2Smrg 697321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 697421525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6975e35772b2Smrg 6976e35772b2Smrg # Archives containing C++ object files must be created using 6977e35772b2Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6978e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6979e35772b2Smrg ;; 6980e35772b2Smrg icpc* | ecpc* ) 6981e35772b2Smrg # Intel C++ 6982e35772b2Smrg with_gnu_ld=yes 6983e35772b2Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6984e35772b2Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6985e35772b2Smrg # earlier do not add the objects themselves. 6986e35772b2Smrg case `$CC -V 2>&1` in 6987e35772b2Smrg *"Version 7."*) 698821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 698921525869Smrg _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' 6990e35772b2Smrg ;; 6991e35772b2Smrg *) # Version 8.0 or newer 6992e35772b2Smrg tmp_idyn= 6993e35772b2Smrg case $host_cpu in 6994e35772b2Smrg ia64*) tmp_idyn=' -i_dynamic';; 6995e35772b2Smrg esac 699621525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 699721525869Smrg _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' 6998e35772b2Smrg ;; 6999e35772b2Smrg esac 7000e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 700121525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 700221525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 700321525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7004e35772b2Smrg ;; 7005e35772b2Smrg pgCC* | pgcpp*) 7006e35772b2Smrg # Portland Group C++ compiler 7007e35772b2Smrg case `$CC -V` in 700874c14cd6Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7009e35772b2Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 701021525869Smrg rm -rf $tpldir~ 701121525869Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 701221525869Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7013e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 701421525869Smrg rm -rf $tpldir~ 701521525869Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 701621525869Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 701721525869Smrg $RANLIB $oldlib' 7018e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 701921525869Smrg rm -rf $tpldir~ 702021525869Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 702121525869Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7022e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 702321525869Smrg rm -rf $tpldir~ 702421525869Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 702521525869Smrg $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' 7026e35772b2Smrg ;; 702774c14cd6Smrg *) # Version 6 and above use weak symbols 702821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 702921525869Smrg _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' 7030e35772b2Smrg ;; 7031e35772b2Smrg esac 703272b676d7Smrg 703321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 703421525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 703521525869Smrg _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' 7036e35772b2Smrg ;; 7037e35772b2Smrg cxx*) 7038e35772b2Smrg # Compaq C++ 703921525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 704021525869Smrg _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' 704172b676d7Smrg 7042e35772b2Smrg runpath_var=LD_RUN_PATH 7043e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7044e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 704572b676d7Smrg 7046e35772b2Smrg # Commands to make compiler produce verbose output that lists 7047e35772b2Smrg # what "hidden" libraries, object files and flags are used when 7048e35772b2Smrg # linking a shared library. 7049e35772b2Smrg # 7050e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 7051e35772b2Smrg # explicitly linking system object files so we need to strip them 7052e35772b2Smrg # from the output so that they don't get included in the library 7053e35772b2Smrg # dependencies. 705421525869Smrg 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' 7055e35772b2Smrg ;; 705674c14cd6Smrg xl* | mpixl* | bgxl*) 7057e35772b2Smrg # IBM XL 8.0 on PPC, with GNU ld 705821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 705921525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 706021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 706121525869Smrg if test yes = "$supports_anon_versioning"; then 7062e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 706321525869Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 706421525869Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 706521525869Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7066e35772b2Smrg fi 7067e35772b2Smrg ;; 7068e35772b2Smrg *) 7069e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 7070e35772b2Smrg *Sun\ C*) 7071e35772b2Smrg # Sun C++ 5.9 7072e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 707321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 707421525869Smrg _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' 7075e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 707621525869Smrg _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' 7077e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7078e35772b2Smrg 7079e35772b2Smrg # Not sure whether something based on 7080e35772b2Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7081e35772b2Smrg # would be better. 708274c14cd6Smrg output_verbose_link_cmd='func_echo_all' 7083e35772b2Smrg 7084e35772b2Smrg # Archives containing C++ object files must be created using 7085e35772b2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7086e35772b2Smrg # necessary to make sure instantiated templates are included 7087e35772b2Smrg # in the archive. 7088e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7089e35772b2Smrg ;; 7090e35772b2Smrg esac 7091e35772b2Smrg ;; 7092e35772b2Smrg esac 7093e35772b2Smrg ;; 709472b676d7Smrg 7095e35772b2Smrg lynxos*) 7096e35772b2Smrg # FIXME: insert proper C++ library support 7097e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7098e35772b2Smrg ;; 709972b676d7Smrg 7100e35772b2Smrg m88k*) 7101e35772b2Smrg # FIXME: insert proper C++ library support 7102e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7103e35772b2Smrg ;; 710472b676d7Smrg 7105e35772b2Smrg mvs*) 7106e35772b2Smrg case $cc_basename in 7107e35772b2Smrg cxx*) 7108e35772b2Smrg # FIXME: insert proper C++ library support 7109e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7110e35772b2Smrg ;; 7111e35772b2Smrg *) 7112e35772b2Smrg # FIXME: insert proper C++ library support 7113e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7114e35772b2Smrg ;; 7115e35772b2Smrg esac 7116e35772b2Smrg ;; 711772b676d7Smrg 7118e35772b2Smrg netbsd*) 7119e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7120e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7121e35772b2Smrg wlarc= 7122e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7123e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7124e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7125e35772b2Smrg fi 7126e35772b2Smrg # Workaround some broken pre-1.5 toolchains 7127e35772b2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7128e35772b2Smrg ;; 712972b676d7Smrg 7130e35772b2Smrg *nto* | *qnx*) 7131e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7132e35772b2Smrg ;; 713372b676d7Smrg 713421525869Smrg openbsd* | bitrig*) 7135e35772b2Smrg if test -f /usr/libexec/ld.so; then 7136e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7137e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7138e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7139e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 714021525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 714121525869Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 714221525869Smrg _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' 714321525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 714421525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7145e35772b2Smrg fi 714674c14cd6Smrg output_verbose_link_cmd=func_echo_all 7147e35772b2Smrg else 7148e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7149e35772b2Smrg fi 7150e35772b2Smrg ;; 715172b676d7Smrg 7152e35772b2Smrg osf3* | osf4* | osf5*) 7153e35772b2Smrg case $cc_basename in 7154e35772b2Smrg KCC*) 7155e35772b2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7156e35772b2Smrg 7157e35772b2Smrg # KCC will only create a shared library if the output file 7158e35772b2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7159e35772b2Smrg # to its proper name (with version) after linking. 716021525869Smrg _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' 7161e35772b2Smrg 716221525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7163e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7164e35772b2Smrg 7165e35772b2Smrg # Archives containing C++ object files must be created using 7166e35772b2Smrg # the KAI C++ compiler. 7167e35772b2Smrg case $host in 7168e35772b2Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7169e35772b2Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7170e35772b2Smrg esac 7171e35772b2Smrg ;; 7172e35772b2Smrg RCC*) 7173e35772b2Smrg # Rational C++ 2.4.1 7174e35772b2Smrg # FIXME: insert proper C++ library support 7175e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7176e35772b2Smrg ;; 7177e35772b2Smrg cxx*) 7178e35772b2Smrg case $host in 7179e35772b2Smrg osf3*) 718021525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 718121525869Smrg _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' 718221525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7183e35772b2Smrg ;; 7184e35772b2Smrg *) 7185e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 718621525869Smrg _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' 7187e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 718821525869Smrg echo "-hidden">> $lib.exp~ 718921525869Smrg $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~ 719021525869Smrg $RM $lib.exp' 7191e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7192e35772b2Smrg ;; 7193e35772b2Smrg esac 719472b676d7Smrg 7195e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 719672b676d7Smrg 7197e35772b2Smrg # Commands to make compiler produce verbose output that lists 7198e35772b2Smrg # what "hidden" libraries, object files and flags are used when 7199e35772b2Smrg # linking a shared library. 7200e35772b2Smrg # 7201e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 7202e35772b2Smrg # explicitly linking system object files so we need to strip them 7203e35772b2Smrg # from the output so that they don't get included in the library 7204e35772b2Smrg # dependencies. 720521525869Smrg 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"' 7206e35772b2Smrg ;; 7207e35772b2Smrg *) 720821525869Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 720921525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7210e35772b2Smrg case $host in 7211e35772b2Smrg osf3*) 721221525869Smrg _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' 7213e35772b2Smrg ;; 7214e35772b2Smrg *) 721521525869Smrg _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' 7216e35772b2Smrg ;; 7217e35772b2Smrg esac 7218e35772b2Smrg 721921525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7220e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7221e35772b2Smrg 7222e35772b2Smrg # Commands to make compiler produce verbose output that lists 7223e35772b2Smrg # what "hidden" libraries, object files and flags are used when 7224e35772b2Smrg # linking a shared library. 722574c14cd6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7226e35772b2Smrg 7227e35772b2Smrg else 7228e35772b2Smrg # FIXME: insert proper C++ library support 7229e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7230e35772b2Smrg fi 7231e35772b2Smrg ;; 7232e35772b2Smrg esac 7233e35772b2Smrg ;; 723472b676d7Smrg 7235e35772b2Smrg psos*) 7236e35772b2Smrg # FIXME: insert proper C++ library support 7237e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7238e35772b2Smrg ;; 723972b676d7Smrg 7240e35772b2Smrg sunos4*) 7241e35772b2Smrg case $cc_basename in 7242e35772b2Smrg CC*) 7243e35772b2Smrg # Sun C++ 4.x 7244e35772b2Smrg # FIXME: insert proper C++ library support 7245e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7246e35772b2Smrg ;; 7247e35772b2Smrg lcc*) 7248e35772b2Smrg # Lucid 7249e35772b2Smrg # FIXME: insert proper C++ library support 7250e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7251e35772b2Smrg ;; 7252e35772b2Smrg *) 7253e35772b2Smrg # FIXME: insert proper C++ library support 7254e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7255e35772b2Smrg ;; 7256e35772b2Smrg esac 7257e35772b2Smrg ;; 725872b676d7Smrg 7259e35772b2Smrg solaris*) 7260e35772b2Smrg case $cc_basename in 726174c14cd6Smrg CC* | sunCC*) 7262e35772b2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7263e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7264e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 726521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7266e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 726721525869Smrg $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' 7268e35772b2Smrg 7269e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7270e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7271e35772b2Smrg case $host_os in 7272e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7273e35772b2Smrg *) 7274e35772b2Smrg # The compiler driver will combine and reorder linker options, 727521525869Smrg # but understands '-z linker_flag'. 7276e35772b2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7277e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7278e35772b2Smrg ;; 7279e35772b2Smrg esac 7280e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 728172b676d7Smrg 728274c14cd6Smrg output_verbose_link_cmd='func_echo_all' 728372b676d7Smrg 7284e35772b2Smrg # Archives containing C++ object files must be created using 7285e35772b2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7286e35772b2Smrg # necessary to make sure instantiated templates are included 7287e35772b2Smrg # in the archive. 7288e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7289e35772b2Smrg ;; 7290e35772b2Smrg gcx*) 7291e35772b2Smrg # Green Hills C++ Compiler 729221525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 729372b676d7Smrg 7294e35772b2Smrg # The C++ compiler must be used to create the archive. 7295e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7296e35772b2Smrg ;; 7297e35772b2Smrg *) 7298e35772b2Smrg # GNU C++ compiler with Solaris linker 729921525869Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 730021525869Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7301e35772b2Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 730221525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7303e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 730421525869Smrg $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' 7305e35772b2Smrg 7306e35772b2Smrg # Commands to make compiler produce verbose output that lists 7307e35772b2Smrg # what "hidden" libraries, object files and flags are used when 7308e35772b2Smrg # linking a shared library. 730974c14cd6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7310e35772b2Smrg else 731121525869Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 7312e35772b2Smrg # platform. 731321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7314e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 731521525869Smrg $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' 7316e35772b2Smrg 7317e35772b2Smrg # Commands to make compiler produce verbose output that lists 7318e35772b2Smrg # what "hidden" libraries, object files and flags are used when 7319e35772b2Smrg # linking a shared library. 732074c14cd6Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7321e35772b2Smrg fi 7322e35772b2Smrg 732321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7324e35772b2Smrg case $host_os in 7325e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7326e35772b2Smrg *) 732721525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7328e35772b2Smrg ;; 7329e35772b2Smrg esac 7330e35772b2Smrg fi 7331e35772b2Smrg ;; 7332e35772b2Smrg esac 7333e35772b2Smrg ;; 733472b676d7Smrg 7335e35772b2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 733621525869Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7337e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7338e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7339e35772b2Smrg runpath_var='LD_RUN_PATH' 734072b676d7Smrg 7341e35772b2Smrg case $cc_basename in 7342e35772b2Smrg CC*) 734321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734421525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7345e35772b2Smrg ;; 7346e35772b2Smrg *) 734721525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734821525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7349e35772b2Smrg ;; 7350e35772b2Smrg esac 7351e35772b2Smrg ;; 735272b676d7Smrg 7353e35772b2Smrg sysv5* | sco3.2v5* | sco5v6*) 735421525869Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 7355e35772b2Smrg # link with -lc, and that would cause any symbols used from libc to 7356e35772b2Smrg # always be unresolved, which means just about no library would 7357e35772b2Smrg # ever link correctly. If we're not using GNU ld we use -z text 7358e35772b2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7359e35772b2Smrg # as -z defs. 736021525869Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 736121525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7362e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7363e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 736421525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7365e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7366e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 736721525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7368e35772b2Smrg runpath_var='LD_RUN_PATH' 736972b676d7Smrg 7370e35772b2Smrg case $cc_basename in 7371e35772b2Smrg CC*) 737221525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737321525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737474c14cd6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 737521525869Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 737674c14cd6Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 737721525869Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 7378e35772b2Smrg ;; 7379e35772b2Smrg *) 738021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 738121525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7382e35772b2Smrg ;; 7383e35772b2Smrg esac 7384e35772b2Smrg ;; 738572b676d7Smrg 7386e35772b2Smrg tandem*) 7387e35772b2Smrg case $cc_basename in 7388e35772b2Smrg NCC*) 7389e35772b2Smrg # NonStop-UX NCC 3.20 7390e35772b2Smrg # FIXME: insert proper C++ library support 7391e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7392e35772b2Smrg ;; 7393e35772b2Smrg *) 7394e35772b2Smrg # FIXME: insert proper C++ library support 7395e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7396e35772b2Smrg ;; 7397e35772b2Smrg esac 7398e35772b2Smrg ;; 739972b676d7Smrg 7400e35772b2Smrg vxworks*) 7401e35772b2Smrg # FIXME: insert proper C++ library support 7402e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7403e35772b2Smrg ;; 740472b676d7Smrg 7405e35772b2Smrg *) 7406e35772b2Smrg # FIXME: insert proper C++ library support 7407e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7408e35772b2Smrg ;; 7409e35772b2Smrg esac 741072b676d7Smrg 7411e35772b2Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 741221525869Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7413e35772b2Smrg 741421525869Smrg _LT_TAGVAR(GCC, $1)=$GXX 741521525869Smrg _LT_TAGVAR(LD, $1)=$LD 7416e35772b2Smrg 7417e35772b2Smrg ## CAVEAT EMPTOR: 7418e35772b2Smrg ## There is no encapsulation within the following macros, do not change 7419e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 7420e35772b2Smrg ## what you are doing... 7421e35772b2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7422e35772b2Smrg _LT_COMPILER_PIC($1) 7423e35772b2Smrg _LT_COMPILER_C_O($1) 7424e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 7425e35772b2Smrg _LT_LINKER_SHLIBS($1) 7426e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 7427e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7428e35772b2Smrg 7429e35772b2Smrg _LT_CONFIG($1) 7430e35772b2Smrg fi # test -n "$compiler" 7431e35772b2Smrg 7432e35772b2Smrg CC=$lt_save_CC 743374c14cd6Smrg CFLAGS=$lt_save_CFLAGS 7434e35772b2Smrg LDCXX=$LD 7435e35772b2Smrg LD=$lt_save_LD 7436e35772b2Smrg GCC=$lt_save_GCC 7437e35772b2Smrg with_gnu_ld=$lt_save_with_gnu_ld 7438e35772b2Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 7439e35772b2Smrg lt_cv_path_LD=$lt_save_path_LD 7440e35772b2Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7441e35772b2Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 744221525869Smrgfi # test yes != "$_lt_caught_CXX_error" 744372b676d7Smrg 7444e35772b2SmrgAC_LANG_POP 7445e35772b2Smrg])# _LT_LANG_CXX_CONFIG 744672b676d7Smrg 744772b676d7Smrg 744874c14cd6Smrg# _LT_FUNC_STRIPNAME_CNF 744974c14cd6Smrg# ---------------------- 745074c14cd6Smrg# func_stripname_cnf prefix suffix name 745174c14cd6Smrg# strip PREFIX and SUFFIX off of NAME. 745274c14cd6Smrg# PREFIX and SUFFIX must not contain globbing or regex special 745374c14cd6Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 745474c14cd6Smrg# dot (in which case that matches only a dot). 745574c14cd6Smrg# 745674c14cd6Smrg# This function is identical to the (non-XSI) version of func_stripname, 745774c14cd6Smrg# except this one can be used by m4 code that may be executed by configure, 745874c14cd6Smrg# rather than the libtool script. 745974c14cd6Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 746074c14cd6SmrgAC_REQUIRE([_LT_DECL_SED]) 746174c14cd6SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 746274c14cd6Smrgfunc_stripname_cnf () 746374c14cd6Smrg{ 746421525869Smrg case @S|@2 in 746521525869Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 746621525869Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 746774c14cd6Smrg esac 746874c14cd6Smrg} # func_stripname_cnf 746974c14cd6Smrg])# _LT_FUNC_STRIPNAME_CNF 747074c14cd6Smrg 747121525869Smrg 7472e35772b2Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7473e35772b2Smrg# --------------------------------- 7474e35772b2Smrg# Figure out "hidden" library dependencies from verbose 7475e35772b2Smrg# compiler output when linking a shared library. 7476e35772b2Smrg# Parse the compiler output and extract the necessary 7477e35772b2Smrg# objects, libraries and library flags. 7478e35772b2Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7479e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 748074c14cd6SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7481e35772b2Smrg# Dependencies to place before and after the object being linked: 7482e35772b2Smrg_LT_TAGVAR(predep_objects, $1)= 7483e35772b2Smrg_LT_TAGVAR(postdep_objects, $1)= 7484e35772b2Smrg_LT_TAGVAR(predeps, $1)= 7485e35772b2Smrg_LT_TAGVAR(postdeps, $1)= 7486e35772b2Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 748772b676d7Smrg 7488e35772b2Smrgdnl we can't use the lt_simple_compile_test_code here, 7489e35772b2Smrgdnl because it contains code intended for an executable, 7490e35772b2Smrgdnl not a library. It's possible we should let each 7491e35772b2Smrgdnl tag define a new lt_????_link_test_code variable, 7492e35772b2Smrgdnl but it's only used here... 7493e35772b2Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7494e35772b2Smrgint a; 7495e35772b2Smrgvoid foo (void) { a = 0; } 7496e35772b2Smrg_LT_EOF 7497e35772b2Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7498e35772b2Smrgclass Foo 7499e35772b2Smrg{ 7500e35772b2Smrgpublic: 7501e35772b2Smrg Foo (void) { a = 0; } 7502e35772b2Smrgprivate: 7503e35772b2Smrg int a; 7504e35772b2Smrg}; 7505e35772b2Smrg_LT_EOF 7506e35772b2Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7507e35772b2Smrg subroutine foo 7508e35772b2Smrg implicit none 7509e35772b2Smrg integer*4 a 7510e35772b2Smrg a=0 7511e35772b2Smrg return 7512e35772b2Smrg end 7513e35772b2Smrg_LT_EOF 7514e35772b2Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7515e35772b2Smrg subroutine foo 7516e35772b2Smrg implicit none 7517e35772b2Smrg integer a 7518e35772b2Smrg a=0 7519e35772b2Smrg return 7520e35772b2Smrg end 7521e35772b2Smrg_LT_EOF 7522e35772b2Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7523e35772b2Smrgpublic class foo { 7524e35772b2Smrg private int a; 7525e35772b2Smrg public void bar (void) { 7526e35772b2Smrg a = 0; 7527e35772b2Smrg } 7528e35772b2Smrg}; 7529e35772b2Smrg_LT_EOF 753074c14cd6Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 753174c14cd6Smrgpackage foo 753274c14cd6Smrgfunc foo() { 753374c14cd6Smrg} 753474c14cd6Smrg_LT_EOF 7535e35772b2Smrg]) 753674c14cd6Smrg 753774c14cd6Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 753874c14cd6Smrgcase "$CC $CFLAGS " in #( 753974c14cd6Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 754074c14cd6Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 754174c14cd6Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 754274c14cd6Smrgesac 754374c14cd6Smrg 7544e35772b2Smrgdnl Parse the compiler output and extract the necessary 7545e35772b2Smrgdnl objects, libraries and library flags. 7546e35772b2Smrgif AC_TRY_EVAL(ac_compile); then 7547e35772b2Smrg # Parse the compiler output and extract the necessary 7548e35772b2Smrg # objects, libraries and library flags. 754972b676d7Smrg 7550e35772b2Smrg # Sentinel used to keep track of whether or not we are before 7551e35772b2Smrg # the conftest object file. 7552e35772b2Smrg pre_test_object_deps_done=no 755372b676d7Smrg 7554e35772b2Smrg for p in `eval "$output_verbose_link_cmd"`; do 755521525869Smrg case $prev$p in 755672b676d7Smrg 7557e35772b2Smrg -L* | -R* | -l*) 7558e35772b2Smrg # Some compilers place space between "-{L,R}" and the path. 7559e35772b2Smrg # Remove the space. 756021525869Smrg if test x-L = "$p" || 756121525869Smrg test x-R = "$p"; then 7562e35772b2Smrg prev=$p 7563e35772b2Smrg continue 7564e35772b2Smrg fi 756572b676d7Smrg 756674c14cd6Smrg # Expand the sysroot to ease extracting the directories later. 756774c14cd6Smrg if test -z "$prev"; then 756874c14cd6Smrg case $p in 756974c14cd6Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 757074c14cd6Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 757174c14cd6Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 757274c14cd6Smrg esac 757374c14cd6Smrg fi 757474c14cd6Smrg case $p in 757574c14cd6Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 757674c14cd6Smrg esac 757721525869Smrg if test no = "$pre_test_object_deps_done"; then 757821525869Smrg case $prev in 757974c14cd6Smrg -L | -R) 7580e35772b2Smrg # Internal compiler library paths should come after those 7581e35772b2Smrg # provided the user. The postdeps already come after the 7582e35772b2Smrg # user supplied libs so there is no need to process them. 7583e35772b2Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 758421525869Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7585e35772b2Smrg else 758621525869Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7587e35772b2Smrg fi 7588e35772b2Smrg ;; 7589e35772b2Smrg # The "-l" case would never come before the object being 7590e35772b2Smrg # linked, so don't bother handling this case. 7591e35772b2Smrg esac 7592e35772b2Smrg else 7593e35772b2Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 759421525869Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 7595e35772b2Smrg else 759621525869Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7597e35772b2Smrg fi 7598e35772b2Smrg fi 759974c14cd6Smrg prev= 7600e35772b2Smrg ;; 760172b676d7Smrg 760274c14cd6Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 7603e35772b2Smrg *.$objext) 7604e35772b2Smrg # This assumes that the test object file only shows up 7605e35772b2Smrg # once in the compiler output. 7606e35772b2Smrg if test "$p" = "conftest.$objext"; then 7607e35772b2Smrg pre_test_object_deps_done=yes 7608e35772b2Smrg continue 7609e35772b2Smrg fi 761072b676d7Smrg 761121525869Smrg if test no = "$pre_test_object_deps_done"; then 7612e35772b2Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 761321525869Smrg _LT_TAGVAR(predep_objects, $1)=$p 7614e35772b2Smrg else 7615e35772b2Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7616e35772b2Smrg fi 7617e35772b2Smrg else 7618e35772b2Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 761921525869Smrg _LT_TAGVAR(postdep_objects, $1)=$p 7620e35772b2Smrg else 7621e35772b2Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7622e35772b2Smrg fi 7623e35772b2Smrg fi 7624e35772b2Smrg ;; 762572b676d7Smrg 7626e35772b2Smrg *) ;; # Ignore the rest. 762772b676d7Smrg 7628e35772b2Smrg esac 7629e35772b2Smrg done 763072b676d7Smrg 7631e35772b2Smrg # Clean up. 7632e35772b2Smrg rm -f a.out a.exe 7633e35772b2Smrgelse 7634e35772b2Smrg echo "libtool.m4: error: problem compiling $1 test program" 763572b676d7Smrgfi 763672b676d7Smrg 7637e35772b2Smrg$RM -f confest.$objext 763874c14cd6SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 763972b676d7Smrg 7640e35772b2Smrg# PORTME: override above test on systems where it is broken 7641e35772b2Smrgm4_if([$1], [CXX], 7642e35772b2Smrg[case $host_os in 7643e35772b2Smrginterix[[3-9]]*) 7644e35772b2Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7645e35772b2Smrg # hack all around it, let's just trust "g++" to DTRT. 7646e35772b2Smrg _LT_TAGVAR(predep_objects,$1)= 7647e35772b2Smrg _LT_TAGVAR(postdep_objects,$1)= 7648e35772b2Smrg _LT_TAGVAR(postdeps,$1)= 7649e35772b2Smrg ;; 765072b676d7Smrgesac 7651e35772b2Smrg]) 765272b676d7Smrg 7653e35772b2Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7654e35772b2Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 765572b676d7Smrgesac 7656e35772b2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7657e35772b2Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 765821525869Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7659e35772b2Smrgfi 7660e35772b2Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7661e35772b2Smrg [The directories searched by this compiler when creating a shared library]) 7662e35772b2Smrg_LT_TAGDECL([], [predep_objects], [1], 7663e35772b2Smrg [Dependencies to place before and after the objects being linked to 7664e35772b2Smrg create a shared library]) 7665e35772b2Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7666e35772b2Smrg_LT_TAGDECL([], [predeps], [1]) 7667e35772b2Smrg_LT_TAGDECL([], [postdeps], [1]) 7668e35772b2Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7669e35772b2Smrg [The library search path used internally by the compiler when linking 7670e35772b2Smrg a shared library]) 7671e35772b2Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7672e35772b2Smrg 7673e35772b2Smrg 7674e35772b2Smrg# _LT_LANG_F77_CONFIG([TAG]) 7675e35772b2Smrg# -------------------------- 7676e35772b2Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7677e35772b2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 767821525869Smrg# to write the compiler configuration to 'libtool'. 7679e35772b2Smrgm4_defun([_LT_LANG_F77_CONFIG], 768074c14cd6Smrg[AC_LANG_PUSH(Fortran 77) 768121525869Smrgif test -z "$F77" || test no = "$F77"; then 768274c14cd6Smrg _lt_disable_F77=yes 768374c14cd6Smrgfi 768472b676d7Smrg 7685e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7686e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7687e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7688e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7689e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7690e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7691e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7692e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7693e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7694e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7695e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7696e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7697e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 7698e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7699e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7700e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 770174c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 770274c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7703e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7704e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7705e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 770672b676d7Smrg 7707e35772b2Smrg# Source file extension for f77 test sources. 7708e35772b2Smrgac_ext=f 770972b676d7Smrg 7710e35772b2Smrg# Object file extension for compiled f77 test sources. 7711e35772b2Smrgobjext=o 7712e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 7713e35772b2Smrg 7714e35772b2Smrg# No sense in running all these tests if we already determined that 7715e35772b2Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7716e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 7717e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 771821525869Smrgif test yes != "$_lt_disable_F77"; then 7719e35772b2Smrg # Code to be used in simple compile tests 7720e35772b2Smrg lt_simple_compile_test_code="\ 7721e35772b2Smrg subroutine t 7722e35772b2Smrg return 7723e35772b2Smrg end 7724e35772b2Smrg" 772572b676d7Smrg 7726e35772b2Smrg # Code to be used in simple link tests 7727e35772b2Smrg lt_simple_link_test_code="\ 7728e35772b2Smrg program t 7729e35772b2Smrg end 7730e35772b2Smrg" 773172b676d7Smrg 7732e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7733e35772b2Smrg _LT_TAG_COMPILER 773472b676d7Smrg 7735e35772b2Smrg # save warnings/boilerplate of simple test code 7736e35772b2Smrg _LT_COMPILER_BOILERPLATE 7737e35772b2Smrg _LT_LINKER_BOILERPLATE 773872b676d7Smrg 7739e35772b2Smrg # Allow CC to be a program name with arguments. 774021525869Smrg lt_save_CC=$CC 7741e35772b2Smrg lt_save_GCC=$GCC 774274c14cd6Smrg lt_save_CFLAGS=$CFLAGS 7743e35772b2Smrg CC=${F77-"f77"} 774474c14cd6Smrg CFLAGS=$FFLAGS 7745e35772b2Smrg compiler=$CC 7746e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 7747e35772b2Smrg _LT_CC_BASENAME([$compiler]) 7748e35772b2Smrg GCC=$G77 7749e35772b2Smrg if test -n "$compiler"; then 7750e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7751e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 775272b676d7Smrg 7753e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 775421525869Smrg test no = "$can_build_shared" && enable_shared=no 7755e35772b2Smrg 7756e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7757e35772b2Smrg # are all built from PIC. 7758e35772b2Smrg case $host_os in 7759e35772b2Smrg aix3*) 776021525869Smrg test yes = "$enable_shared" && enable_static=no 7761e35772b2Smrg if test -n "$RANLIB"; then 7762e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7763e35772b2Smrg postinstall_cmds='$RANLIB $lib' 7764e35772b2Smrg fi 7765e35772b2Smrg ;; 7766e35772b2Smrg aix[[4-9]]*) 776721525869Smrg if test ia64 != "$host_cpu"; then 776821525869Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 776921525869Smrg yes,aix,yes) ;; # shared object as lib.so file only 777021525869Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 777121525869Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 777221525869Smrg esac 777372b676d7Smrg fi 7774e35772b2Smrg ;; 7775e35772b2Smrg esac 7776e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 7777e35772b2Smrg 7778e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 7779e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 778021525869Smrg test yes = "$enable_shared" || enable_static=yes 7781e35772b2Smrg AC_MSG_RESULT([$enable_static]) 7782e35772b2Smrg 778321525869Smrg _LT_TAGVAR(GCC, $1)=$G77 778421525869Smrg _LT_TAGVAR(LD, $1)=$LD 7785e35772b2Smrg 7786e35772b2Smrg ## CAVEAT EMPTOR: 7787e35772b2Smrg ## There is no encapsulation within the following macros, do not change 7788e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 7789e35772b2Smrg ## what you are doing... 7790e35772b2Smrg _LT_COMPILER_PIC($1) 7791e35772b2Smrg _LT_COMPILER_C_O($1) 7792e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 7793e35772b2Smrg _LT_LINKER_SHLIBS($1) 7794e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 7795e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7796e35772b2Smrg 7797e35772b2Smrg _LT_CONFIG($1) 7798e35772b2Smrg fi # test -n "$compiler" 7799e35772b2Smrg 7800e35772b2Smrg GCC=$lt_save_GCC 780121525869Smrg CC=$lt_save_CC 780221525869Smrg CFLAGS=$lt_save_CFLAGS 780321525869Smrgfi # test yes != "$_lt_disable_F77" 780472b676d7Smrg 7805e35772b2SmrgAC_LANG_POP 7806e35772b2Smrg])# _LT_LANG_F77_CONFIG 7807e35772b2Smrg 7808e35772b2Smrg 7809e35772b2Smrg# _LT_LANG_FC_CONFIG([TAG]) 7810e35772b2Smrg# ------------------------- 7811e35772b2Smrg# Ensure that the configuration variables for a Fortran compiler are 7812e35772b2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 781321525869Smrg# to write the compiler configuration to 'libtool'. 7814e35772b2Smrgm4_defun([_LT_LANG_FC_CONFIG], 781574c14cd6Smrg[AC_LANG_PUSH(Fortran) 781674c14cd6Smrg 781721525869Smrgif test -z "$FC" || test no = "$FC"; then 781874c14cd6Smrg _lt_disable_FC=yes 781974c14cd6Smrgfi 7820e35772b2Smrg 7821e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7822e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7823e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7824e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7825e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7826e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7827e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7828e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7829e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7830e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7831e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7832e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7833e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 7834e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7835e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7836e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 783774c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 783874c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7839e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7840e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7841e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7842e35772b2Smrg 7843e35772b2Smrg# Source file extension for fc test sources. 7844e35772b2Smrgac_ext=${ac_fc_srcext-f} 7845e35772b2Smrg 7846e35772b2Smrg# Object file extension for compiled fc test sources. 7847e35772b2Smrgobjext=o 7848e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 7849e35772b2Smrg 7850e35772b2Smrg# No sense in running all these tests if we already determined that 7851e35772b2Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7852e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 7853e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 785421525869Smrgif test yes != "$_lt_disable_FC"; then 7855e35772b2Smrg # Code to be used in simple compile tests 7856e35772b2Smrg lt_simple_compile_test_code="\ 7857e35772b2Smrg subroutine t 7858e35772b2Smrg return 7859e35772b2Smrg end 7860e35772b2Smrg" 7861e35772b2Smrg 7862e35772b2Smrg # Code to be used in simple link tests 7863e35772b2Smrg lt_simple_link_test_code="\ 7864e35772b2Smrg program t 7865e35772b2Smrg end 7866e35772b2Smrg" 7867e35772b2Smrg 7868e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7869e35772b2Smrg _LT_TAG_COMPILER 787072b676d7Smrg 7871e35772b2Smrg # save warnings/boilerplate of simple test code 7872e35772b2Smrg _LT_COMPILER_BOILERPLATE 7873e35772b2Smrg _LT_LINKER_BOILERPLATE 7874e35772b2Smrg 7875e35772b2Smrg # Allow CC to be a program name with arguments. 787621525869Smrg lt_save_CC=$CC 7877e35772b2Smrg lt_save_GCC=$GCC 787874c14cd6Smrg lt_save_CFLAGS=$CFLAGS 7879e35772b2Smrg CC=${FC-"f95"} 788074c14cd6Smrg CFLAGS=$FCFLAGS 7881e35772b2Smrg compiler=$CC 7882e35772b2Smrg GCC=$ac_cv_fc_compiler_gnu 7883e35772b2Smrg 7884e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 7885e35772b2Smrg _LT_CC_BASENAME([$compiler]) 7886e35772b2Smrg 7887e35772b2Smrg if test -n "$compiler"; then 7888e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7889e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 7890e35772b2Smrg 7891e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 789221525869Smrg test no = "$can_build_shared" && enable_shared=no 7893e35772b2Smrg 7894e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7895e35772b2Smrg # are all built from PIC. 789672b676d7Smrg case $host_os in 7897e35772b2Smrg aix3*) 789821525869Smrg test yes = "$enable_shared" && enable_static=no 7899e35772b2Smrg if test -n "$RANLIB"; then 7900e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7901e35772b2Smrg postinstall_cmds='$RANLIB $lib' 7902e35772b2Smrg fi 7903e35772b2Smrg ;; 79041fd23544Smrg aix[[4-9]]*) 790521525869Smrg if test ia64 != "$host_cpu"; then 790621525869Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 790721525869Smrg yes,aix,yes) ;; # shared object as lib.so file only 790821525869Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 790921525869Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 791021525869Smrg esac 791172b676d7Smrg fi 7912e35772b2Smrg ;; 791372b676d7Smrg esac 7914e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 7915e35772b2Smrg 7916e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 7917e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 791821525869Smrg test yes = "$enable_shared" || enable_static=yes 7919e35772b2Smrg AC_MSG_RESULT([$enable_static]) 7920e35772b2Smrg 792121525869Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 792221525869Smrg _LT_TAGVAR(LD, $1)=$LD 7923e35772b2Smrg 7924e35772b2Smrg ## CAVEAT EMPTOR: 7925e35772b2Smrg ## There is no encapsulation within the following macros, do not change 7926e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 7927e35772b2Smrg ## what you are doing... 7928e35772b2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7929e35772b2Smrg _LT_COMPILER_PIC($1) 7930e35772b2Smrg _LT_COMPILER_C_O($1) 7931e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 7932e35772b2Smrg _LT_LINKER_SHLIBS($1) 7933e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 7934e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7935e35772b2Smrg 7936e35772b2Smrg _LT_CONFIG($1) 7937e35772b2Smrg fi # test -n "$compiler" 7938e35772b2Smrg 7939e35772b2Smrg GCC=$lt_save_GCC 794074c14cd6Smrg CC=$lt_save_CC 794174c14cd6Smrg CFLAGS=$lt_save_CFLAGS 794221525869Smrgfi # test yes != "$_lt_disable_FC" 794372b676d7Smrg 7944e35772b2SmrgAC_LANG_POP 7945e35772b2Smrg])# _LT_LANG_FC_CONFIG 794672b676d7Smrg 794772b676d7Smrg 7948e35772b2Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7949e35772b2Smrg# -------------------------- 7950e35772b2Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7951e35772b2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 795221525869Smrg# to write the compiler configuration to 'libtool'. 7953e35772b2Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7954e35772b2Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7955e35772b2SmrgAC_LANG_SAVE 795672b676d7Smrg 7957e35772b2Smrg# Source file extension for Java test sources. 7958e35772b2Smrgac_ext=java 795972b676d7Smrg 7960e35772b2Smrg# Object file extension for compiled Java test sources. 7961e35772b2Smrgobjext=o 7962e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 796372b676d7Smrg 7964e35772b2Smrg# Code to be used in simple compile tests 7965e35772b2Smrglt_simple_compile_test_code="class foo {}" 796672b676d7Smrg 7967e35772b2Smrg# Code to be used in simple link tests 7968e35772b2Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 796972b676d7Smrg 7970e35772b2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7971e35772b2Smrg_LT_TAG_COMPILER 797272b676d7Smrg 7973e35772b2Smrg# save warnings/boilerplate of simple test code 7974e35772b2Smrg_LT_COMPILER_BOILERPLATE 7975e35772b2Smrg_LT_LINKER_BOILERPLATE 797672b676d7Smrg 7977e35772b2Smrg# Allow CC to be a program name with arguments. 797874c14cd6Smrglt_save_CC=$CC 797974c14cd6Smrglt_save_CFLAGS=$CFLAGS 7980e35772b2Smrglt_save_GCC=$GCC 7981e35772b2SmrgGCC=yes 7982e35772b2SmrgCC=${GCJ-"gcj"} 798374c14cd6SmrgCFLAGS=$GCJFLAGS 7984e35772b2Smrgcompiler=$CC 7985e35772b2Smrg_LT_TAGVAR(compiler, $1)=$CC 798621525869Smrg_LT_TAGVAR(LD, $1)=$LD 7987e35772b2Smrg_LT_CC_BASENAME([$compiler]) 798872b676d7Smrg 7989e35772b2Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7990e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 799172b676d7Smrg 7992e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 799374c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 799474c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 799572b676d7Smrg 7996e35772b2Smrgif test -n "$compiler"; then 7997e35772b2Smrg _LT_COMPILER_NO_RTTI($1) 7998e35772b2Smrg _LT_COMPILER_PIC($1) 7999e35772b2Smrg _LT_COMPILER_C_O($1) 8000e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 8001e35772b2Smrg _LT_LINKER_SHLIBS($1) 8002e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 800372b676d7Smrg 8004e35772b2Smrg _LT_CONFIG($1) 8005e35772b2Smrgfi 800672b676d7Smrg 8007e35772b2SmrgAC_LANG_RESTORE 800872b676d7Smrg 8009e35772b2SmrgGCC=$lt_save_GCC 801074c14cd6SmrgCC=$lt_save_CC 801174c14cd6SmrgCFLAGS=$lt_save_CFLAGS 8012e35772b2Smrg])# _LT_LANG_GCJ_CONFIG 801372b676d7Smrg 80141fd23544Smrg 801574c14cd6Smrg# _LT_LANG_GO_CONFIG([TAG]) 801674c14cd6Smrg# -------------------------- 801774c14cd6Smrg# Ensure that the configuration variables for the GNU Go compiler 8018e35772b2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 801921525869Smrg# to write the compiler configuration to 'libtool'. 802074c14cd6Smrgm4_defun([_LT_LANG_GO_CONFIG], 802174c14cd6Smrg[AC_REQUIRE([LT_PROG_GO])dnl 8022e35772b2SmrgAC_LANG_SAVE 8023e35772b2Smrg 802474c14cd6Smrg# Source file extension for Go test sources. 802574c14cd6Smrgac_ext=go 8026e35772b2Smrg 802774c14cd6Smrg# Object file extension for compiled Go test sources. 8028e35772b2Smrgobjext=o 8029e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 8030e35772b2Smrg 8031e35772b2Smrg# Code to be used in simple compile tests 803274c14cd6Smrglt_simple_compile_test_code="package main; func main() { }" 8033e35772b2Smrg 8034e35772b2Smrg# Code to be used in simple link tests 803574c14cd6Smrglt_simple_link_test_code='package main; func main() { }' 8036e35772b2Smrg 8037e35772b2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8038e35772b2Smrg_LT_TAG_COMPILER 8039e35772b2Smrg 8040e35772b2Smrg# save warnings/boilerplate of simple test code 8041e35772b2Smrg_LT_COMPILER_BOILERPLATE 8042e35772b2Smrg_LT_LINKER_BOILERPLATE 8043e35772b2Smrg 8044e35772b2Smrg# Allow CC to be a program name with arguments. 804574c14cd6Smrglt_save_CC=$CC 804674c14cd6Smrglt_save_CFLAGS=$CFLAGS 8047e35772b2Smrglt_save_GCC=$GCC 804874c14cd6SmrgGCC=yes 804974c14cd6SmrgCC=${GOC-"gccgo"} 805074c14cd6SmrgCFLAGS=$GOFLAGS 8051e35772b2Smrgcompiler=$CC 8052e35772b2Smrg_LT_TAGVAR(compiler, $1)=$CC 805321525869Smrg_LT_TAGVAR(LD, $1)=$LD 8054e35772b2Smrg_LT_CC_BASENAME([$compiler]) 805574c14cd6Smrg 805674c14cd6Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 805774c14cd6Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 805874c14cd6Smrg 805974c14cd6Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 806074c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 806174c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8062e35772b2Smrg 8063e35772b2Smrgif test -n "$compiler"; then 806474c14cd6Smrg _LT_COMPILER_NO_RTTI($1) 806574c14cd6Smrg _LT_COMPILER_PIC($1) 806674c14cd6Smrg _LT_COMPILER_C_O($1) 806774c14cd6Smrg _LT_COMPILER_FILE_LOCKS($1) 806874c14cd6Smrg _LT_LINKER_SHLIBS($1) 806974c14cd6Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 807074c14cd6Smrg 8071e35772b2Smrg _LT_CONFIG($1) 8072e35772b2Smrgfi 8073e35772b2Smrg 8074e35772b2SmrgAC_LANG_RESTORE 8075e35772b2Smrg 807674c14cd6SmrgGCC=$lt_save_GCC 807774c14cd6SmrgCC=$lt_save_CC 807874c14cd6SmrgCFLAGS=$lt_save_CFLAGS 807974c14cd6Smrg])# _LT_LANG_GO_CONFIG 8080e35772b2Smrg 808174c14cd6Smrg 808274c14cd6Smrg# _LT_LANG_RC_CONFIG([TAG]) 808374c14cd6Smrg# ------------------------- 808474c14cd6Smrg# Ensure that the configuration variables for the Windows resource compiler 808574c14cd6Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 808621525869Smrg# to write the compiler configuration to 'libtool'. 808774c14cd6Smrgm4_defun([_LT_LANG_RC_CONFIG], 808874c14cd6Smrg[AC_REQUIRE([LT_PROG_RC])dnl 808974c14cd6SmrgAC_LANG_SAVE 809074c14cd6Smrg 809174c14cd6Smrg# Source file extension for RC test sources. 809274c14cd6Smrgac_ext=rc 809374c14cd6Smrg 809474c14cd6Smrg# Object file extension for compiled RC test sources. 809574c14cd6Smrgobjext=o 809674c14cd6Smrg_LT_TAGVAR(objext, $1)=$objext 809774c14cd6Smrg 809874c14cd6Smrg# Code to be used in simple compile tests 809974c14cd6Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 810074c14cd6Smrg 810174c14cd6Smrg# Code to be used in simple link tests 810221525869Smrglt_simple_link_test_code=$lt_simple_compile_test_code 810374c14cd6Smrg 810474c14cd6Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 810574c14cd6Smrg_LT_TAG_COMPILER 810674c14cd6Smrg 810774c14cd6Smrg# save warnings/boilerplate of simple test code 810874c14cd6Smrg_LT_COMPILER_BOILERPLATE 810974c14cd6Smrg_LT_LINKER_BOILERPLATE 811074c14cd6Smrg 811174c14cd6Smrg# Allow CC to be a program name with arguments. 811221525869Smrglt_save_CC=$CC 811374c14cd6Smrglt_save_CFLAGS=$CFLAGS 811474c14cd6Smrglt_save_GCC=$GCC 811574c14cd6SmrgGCC= 811674c14cd6SmrgCC=${RC-"windres"} 811774c14cd6SmrgCFLAGS= 811874c14cd6Smrgcompiler=$CC 811974c14cd6Smrg_LT_TAGVAR(compiler, $1)=$CC 812074c14cd6Smrg_LT_CC_BASENAME([$compiler]) 812174c14cd6Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 812274c14cd6Smrg 812374c14cd6Smrgif test -n "$compiler"; then 812474c14cd6Smrg : 812574c14cd6Smrg _LT_CONFIG($1) 812674c14cd6Smrgfi 812774c14cd6Smrg 812874c14cd6SmrgGCC=$lt_save_GCC 812974c14cd6SmrgAC_LANG_RESTORE 813074c14cd6SmrgCC=$lt_save_CC 813174c14cd6SmrgCFLAGS=$lt_save_CFLAGS 813274c14cd6Smrg])# _LT_LANG_RC_CONFIG 813374c14cd6Smrg 813474c14cd6Smrg 813574c14cd6Smrg# LT_PROG_GCJ 813674c14cd6Smrg# ----------- 813774c14cd6SmrgAC_DEFUN([LT_PROG_GCJ], 813874c14cd6Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8139e35772b2Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8140e35772b2Smrg [AC_CHECK_TOOL(GCJ, gcj,) 814121525869Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8142e35772b2Smrg AC_SUBST(GCJFLAGS)])])[]dnl 8143e35772b2Smrg]) 8144e35772b2Smrg 8145e35772b2Smrg# Old name: 8146e35772b2SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8147e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8148e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8149e35772b2Smrg 8150e35772b2Smrg 815174c14cd6Smrg# LT_PROG_GO 815274c14cd6Smrg# ---------- 815374c14cd6SmrgAC_DEFUN([LT_PROG_GO], 815474c14cd6Smrg[AC_CHECK_TOOL(GOC, gccgo,) 815574c14cd6Smrg]) 815674c14cd6Smrg 815774c14cd6Smrg 8158e35772b2Smrg# LT_PROG_RC 8159e35772b2Smrg# ---------- 8160e35772b2SmrgAC_DEFUN([LT_PROG_RC], 8161e35772b2Smrg[AC_CHECK_TOOL(RC, windres,) 8162e35772b2Smrg]) 8163e35772b2Smrg 8164e35772b2Smrg# Old name: 8165e35772b2SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8166e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8167e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8168e35772b2Smrg 8169e35772b2Smrg 8170e35772b2Smrg# _LT_DECL_EGREP 8171e35772b2Smrg# -------------- 8172e35772b2Smrg# If we don't have a new enough Autoconf to choose the best grep 8173e35772b2Smrg# available, choose the one first in the user's PATH. 8174e35772b2Smrgm4_defun([_LT_DECL_EGREP], 8175e35772b2Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8176e35772b2SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8177e35772b2Smrgtest -z "$GREP" && GREP=grep 8178e35772b2Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8179e35772b2Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8180e35772b2Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8181e35772b2Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8182e35772b2SmrgAC_SUBST([GREP]) 8183e35772b2Smrg]) 8184e35772b2Smrg 8185e35772b2Smrg 8186e35772b2Smrg# _LT_DECL_OBJDUMP 8187e35772b2Smrg# -------------- 8188e35772b2Smrg# If we don't have a new enough Autoconf to choose the best objdump 8189e35772b2Smrg# available, choose the one first in the user's PATH. 8190e35772b2Smrgm4_defun([_LT_DECL_OBJDUMP], 8191e35772b2Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8192e35772b2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8193e35772b2Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8194e35772b2SmrgAC_SUBST([OBJDUMP]) 8195e35772b2Smrg]) 8196e35772b2Smrg 819774c14cd6Smrg# _LT_DECL_DLLTOOL 819874c14cd6Smrg# ---------------- 819974c14cd6Smrg# Ensure DLLTOOL variable is set. 820074c14cd6Smrgm4_defun([_LT_DECL_DLLTOOL], 820174c14cd6Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 820274c14cd6Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 820374c14cd6Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 820474c14cd6SmrgAC_SUBST([DLLTOOL]) 820574c14cd6Smrg]) 8206e35772b2Smrg 8207e35772b2Smrg# _LT_DECL_SED 8208e35772b2Smrg# ------------ 8209e35772b2Smrg# Check for a fully-functional sed program, that truncates 8210e35772b2Smrg# as few characters as possible. Prefer GNU sed if found. 8211e35772b2Smrgm4_defun([_LT_DECL_SED], 8212e35772b2Smrg[AC_PROG_SED 8213e35772b2Smrgtest -z "$SED" && SED=sed 8214e35772b2SmrgXsed="$SED -e 1s/^X//" 8215e35772b2Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8216e35772b2Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8217e35772b2Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8218e35772b2Smrg])# _LT_DECL_SED 8219e35772b2Smrg 8220e35772b2Smrgm4_ifndef([AC_PROG_SED], [ 8221e35772b2Smrg# NOTE: This macro has been submitted for inclusion into # 8222e35772b2Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8223e35772b2Smrg# a released version of Autoconf we should remove this # 8224e35772b2Smrg# macro and use it instead. # 8225e35772b2Smrg 8226e35772b2Smrgm4_defun([AC_PROG_SED], 8227e35772b2Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8228e35772b2SmrgAC_CACHE_VAL(lt_cv_path_SED, 8229e35772b2Smrg[# Loop through the user's path and test for sed and gsed. 8230e35772b2Smrg# Then use that list of sed's as ones to test for truncation. 8231e35772b2Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8232e35772b2Smrgfor as_dir in $PATH 8233e35772b2Smrgdo 8234e35772b2Smrg IFS=$as_save_IFS 8235e35772b2Smrg test -z "$as_dir" && as_dir=. 8236e35772b2Smrg for lt_ac_prog in sed gsed; do 8237e35772b2Smrg for ac_exec_ext in '' $ac_executable_extensions; do 8238e35772b2Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8239e35772b2Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8240e35772b2Smrg fi 8241e35772b2Smrg done 8242e35772b2Smrg done 8243e35772b2Smrgdone 8244e35772b2SmrgIFS=$as_save_IFS 8245e35772b2Smrglt_ac_max=0 8246e35772b2Smrglt_ac_count=0 8247e35772b2Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8248e35772b2Smrg# along with /bin/sed that truncates output. 8249e35772b2Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 825021525869Smrg test ! -f "$lt_ac_sed" && continue 8251e35772b2Smrg cat /dev/null > conftest.in 8252e35772b2Smrg lt_ac_count=0 8253e35772b2Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8254e35772b2Smrg # Check for GNU sed and select it if it is found. 8255e35772b2Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8256e35772b2Smrg lt_cv_path_SED=$lt_ac_sed 8257e35772b2Smrg break 8258e35772b2Smrg fi 8259e35772b2Smrg while true; do 8260e35772b2Smrg cat conftest.in conftest.in >conftest.tmp 8261e35772b2Smrg mv conftest.tmp conftest.in 8262e35772b2Smrg cp conftest.in conftest.nl 8263e35772b2Smrg echo >>conftest.nl 8264e35772b2Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8265e35772b2Smrg cmp -s conftest.out conftest.nl || break 8266e35772b2Smrg # 10000 chars as input seems more than enough 826721525869Smrg test 10 -lt "$lt_ac_count" && break 8268e35772b2Smrg lt_ac_count=`expr $lt_ac_count + 1` 826921525869Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8270e35772b2Smrg lt_ac_max=$lt_ac_count 8271e35772b2Smrg lt_cv_path_SED=$lt_ac_sed 8272e35772b2Smrg fi 8273e35772b2Smrg done 8274e35772b2Smrgdone 8275e35772b2Smrg]) 8276e35772b2SmrgSED=$lt_cv_path_SED 8277e35772b2SmrgAC_SUBST([SED]) 8278e35772b2SmrgAC_MSG_RESULT([$SED]) 8279e35772b2Smrg])#AC_PROG_SED 8280e35772b2Smrg])#m4_ifndef 8281e35772b2Smrg 8282e35772b2Smrg# Old name: 8283e35772b2SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8284e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8285e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8286e35772b2Smrg 8287e35772b2Smrg 8288e35772b2Smrg# _LT_CHECK_SHELL_FEATURES 8289e35772b2Smrg# ------------------------ 8290e35772b2Smrg# Find out whether the shell is Bourne or XSI compatible, 8291e35772b2Smrg# or has some other useful features. 8292e35772b2Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 829321525869Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8294e35772b2Smrg lt_unset=unset 8295e35772b2Smrgelse 8296e35772b2Smrg lt_unset=false 8297e35772b2Smrgfi 8298e35772b2Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8299e35772b2Smrg 8300e35772b2Smrg# test EBCDIC or ASCII 8301e35772b2Smrgcase `echo X|tr X '\101'` in 8302e35772b2Smrg A) # ASCII based system 8303e35772b2Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8304e35772b2Smrg lt_SP2NL='tr \040 \012' 8305e35772b2Smrg lt_NL2SP='tr \015\012 \040\040' 8306e35772b2Smrg ;; 8307e35772b2Smrg *) # EBCDIC based system 8308e35772b2Smrg lt_SP2NL='tr \100 \n' 8309e35772b2Smrg lt_NL2SP='tr \r\n \100\100' 8310e35772b2Smrg ;; 8311e35772b2Smrgesac 8312e35772b2Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8313e35772b2Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8314e35772b2Smrg])# _LT_CHECK_SHELL_FEATURES 8315e35772b2Smrg 8316e35772b2Smrg 831774c14cd6Smrg# _LT_PATH_CONVERSION_FUNCTIONS 831874c14cd6Smrg# ----------------------------- 831921525869Smrg# Determine what file name conversion functions should be used by 832074c14cd6Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 832174c14cd6Smrg# for certain cross-compile configurations and native mingw. 832274c14cd6Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 832374c14cd6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 832474c14cd6SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 832574c14cd6SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 832674c14cd6SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 832774c14cd6Smrg[case $host in 832874c14cd6Smrg *-*-mingw* ) 832974c14cd6Smrg case $build in 833074c14cd6Smrg *-*-mingw* ) # actually msys 833174c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 833274c14cd6Smrg ;; 833374c14cd6Smrg *-*-cygwin* ) 833474c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 833574c14cd6Smrg ;; 833674c14cd6Smrg * ) # otherwise, assume *nix 833774c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 833874c14cd6Smrg ;; 833974c14cd6Smrg esac 8340e35772b2Smrg ;; 834174c14cd6Smrg *-*-cygwin* ) 834274c14cd6Smrg case $build in 834374c14cd6Smrg *-*-mingw* ) # actually msys 834474c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 834574c14cd6Smrg ;; 834674c14cd6Smrg *-*-cygwin* ) 834774c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 834874c14cd6Smrg ;; 834974c14cd6Smrg * ) # otherwise, assume *nix 835074c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 835174c14cd6Smrg ;; 835274c14cd6Smrg esac 8353e35772b2Smrg ;; 835474c14cd6Smrg * ) # unhandled hosts (and "normal" native builds) 835574c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 835674c14cd6Smrg ;; 835774c14cd6Smrgesac 8358e35772b2Smrg]) 835974c14cd6Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 836074c14cd6SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 836174c14cd6Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 836274c14cd6Smrg [0], [convert $build file names to $host format])dnl 836374c14cd6Smrg 836474c14cd6SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 836574c14cd6SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 836674c14cd6Smrg[#assume ordinary cross tools, or native build. 836774c14cd6Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 836874c14cd6Smrgcase $host in 836974c14cd6Smrg *-*-mingw* ) 837074c14cd6Smrg case $build in 837174c14cd6Smrg *-*-mingw* ) # actually msys 837274c14cd6Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 837374c14cd6Smrg ;; 837474c14cd6Smrg esac 837574c14cd6Smrg ;; 837674c14cd6Smrgesac 837774c14cd6Smrg]) 837874c14cd6Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 837974c14cd6SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 838074c14cd6Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 838174c14cd6Smrg [0], [convert $build files to toolchain format])dnl 838274c14cd6Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 838372b676d7Smrg 8384e35772b2Smrg# Helper functions for option handling. -*- Autoconf -*- 8385e35772b2Smrg# 838621525869Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 838721525869Smrg# Foundation, Inc. 8388e35772b2Smrg# Written by Gary V. Vaughan, 2004 8389e35772b2Smrg# 8390e35772b2Smrg# This file is free software; the Free Software Foundation gives 8391e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8392e35772b2Smrg# modifications, as long as this notice is preserved. 839372b676d7Smrg 839421525869Smrg# serial 8 ltoptions.m4 839572b676d7Smrg 8396e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8397e35772b2SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 839872b676d7Smrg 839972b676d7Smrg 8400e35772b2Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8401e35772b2Smrg# ------------------------------------------ 8402e35772b2Smrgm4_define([_LT_MANGLE_OPTION], 8403e35772b2Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 840472b676d7Smrg 840572b676d7Smrg 8406e35772b2Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8407e35772b2Smrg# --------------------------------------- 8408e35772b2Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8409e35772b2Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8410e35772b2Smrg# saved as a flag. 8411e35772b2Smrgm4_define([_LT_SET_OPTION], 8412e35772b2Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8413e35772b2Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8414e35772b2Smrg _LT_MANGLE_DEFUN([$1], [$2]), 841521525869Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 8416e35772b2Smrg]) 8417e35772b2Smrg 8418e35772b2Smrg 8419e35772b2Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8420e35772b2Smrg# ------------------------------------------------------------ 8421e35772b2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8422e35772b2Smrgm4_define([_LT_IF_OPTION], 8423e35772b2Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8424e35772b2Smrg 8425e35772b2Smrg 8426e35772b2Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8427e35772b2Smrg# ------------------------------------------------------- 8428e35772b2Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8429e35772b2Smrg# are set. 8430e35772b2Smrgm4_define([_LT_UNLESS_OPTIONS], 8431e35772b2Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8432e35772b2Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8433e35772b2Smrg [m4_define([$0_found])])])[]dnl 8434e35772b2Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8435e35772b2Smrg])[]dnl 8436e35772b2Smrg]) 8437e35772b2Smrg 843872b676d7Smrg 8439e35772b2Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8440e35772b2Smrg# ---------------------------------------- 8441e35772b2Smrg# OPTION-LIST is a space-separated list of Libtool options associated 8442e35772b2Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8443e35772b2Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8444e35772b2Smrg# the unknown option and exit. 8445e35772b2Smrgm4_defun([_LT_SET_OPTIONS], 8446e35772b2Smrg[# Set options 8447e35772b2Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8448e35772b2Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 8449e35772b2Smrg 8450e35772b2Smrgm4_if([$1],[LT_INIT],[ 8451e35772b2Smrg dnl 8452e35772b2Smrg dnl Simply set some default values (i.e off) if boolean options were not 8453e35772b2Smrg dnl specified: 8454e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8455e35772b2Smrg ]) 8456e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8457e35772b2Smrg ]) 8458e35772b2Smrg dnl 8459e35772b2Smrg dnl If no reference was made to various pairs of opposing options, then 8460e35772b2Smrg dnl we run the default mode handler for the pair. For example, if neither 846121525869Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8462e35772b2Smrg dnl archives by default: 8463e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8464e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8465e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8466e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 846721525869Smrg [_LT_ENABLE_FAST_INSTALL]) 846821525869Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 846921525869Smrg [_LT_WITH_AIX_SONAME([aix])]) 8470e35772b2Smrg ]) 8471e35772b2Smrg])# _LT_SET_OPTIONS 847272b676d7Smrg 847372b676d7Smrg 847472b676d7Smrg 8475e35772b2Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8476e35772b2Smrg# ----------------------------------------- 8477e35772b2Smrgm4_define([_LT_MANGLE_DEFUN], 8478e35772b2Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 847972b676d7Smrg 848072b676d7Smrg 8481e35772b2Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8482e35772b2Smrg# ----------------------------------------------- 8483e35772b2Smrgm4_define([LT_OPTION_DEFINE], 8484e35772b2Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8485e35772b2Smrg])# LT_OPTION_DEFINE 848672b676d7Smrg 848772b676d7Smrg 8488e35772b2Smrg# dlopen 8489e35772b2Smrg# ------ 8490e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8491e35772b2Smrg]) 849272b676d7Smrg 8493e35772b2SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8494e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8495e35772b2SmrgAC_DIAGNOSE([obsolete], 8496e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 849721525869Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 8498e35772b2Smrg]) 849972b676d7Smrg 8500e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8501e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 850272b676d7Smrg 850372b676d7Smrg 8504e35772b2Smrg# win32-dll 8505e35772b2Smrg# --------- 8506e35772b2Smrg# Declare package support for building win32 dll's. 8507e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8508e35772b2Smrg[enable_win32_dll=yes 850972b676d7Smrg 8510e35772b2Smrgcase $host in 851174c14cd6Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8512e35772b2Smrg AC_CHECK_TOOL(AS, as, false) 8513e35772b2Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8514e35772b2Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8515e35772b2Smrg ;; 8516e35772b2Smrgesac 851772b676d7Smrg 8518e35772b2Smrgtest -z "$AS" && AS=as 851974c14cd6Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 852072b676d7Smrg 8521e35772b2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 852274c14cd6Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 852372b676d7Smrg 8524e35772b2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 852574c14cd6Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8526e35772b2Smrg])# win32-dll 852772b676d7Smrg 8528e35772b2SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8529e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8530e35772b2Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8531e35772b2SmrgAC_DIAGNOSE([obsolete], 8532e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 853321525869Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 8534e35772b2Smrg]) 853572b676d7Smrg 8536e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8537e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 853872b676d7Smrg 8539e35772b2Smrg 8540e35772b2Smrg# _LT_ENABLE_SHARED([DEFAULT]) 8541e35772b2Smrg# ---------------------------- 854221525869Smrg# implement the --enable-shared flag, and supports the 'shared' and 854321525869Smrg# 'disable-shared' LT_INIT options. 854421525869Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8545e35772b2Smrgm4_define([_LT_ENABLE_SHARED], 8546e35772b2Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8547e35772b2SmrgAC_ARG_ENABLE([shared], 8548e35772b2Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8549e35772b2Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8550e35772b2Smrg [p=${PACKAGE-default} 8551e35772b2Smrg case $enableval in 8552e35772b2Smrg yes) enable_shared=yes ;; 8553e35772b2Smrg no) enable_shared=no ;; 8554e35772b2Smrg *) 8555e35772b2Smrg enable_shared=no 8556e35772b2Smrg # Look at the argument we got. We use all the common list separators. 855721525869Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8558e35772b2Smrg for pkg in $enableval; do 855921525869Smrg IFS=$lt_save_ifs 8560e35772b2Smrg if test "X$pkg" = "X$p"; then 8561e35772b2Smrg enable_shared=yes 8562e35772b2Smrg fi 8563e35772b2Smrg done 856421525869Smrg IFS=$lt_save_ifs 856572b676d7Smrg ;; 8566e35772b2Smrg esac], 8567e35772b2Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 856872b676d7Smrg 8569e35772b2Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8570e35772b2Smrg [Whether or not to build shared libraries]) 8571e35772b2Smrg])# _LT_ENABLE_SHARED 857272b676d7Smrg 8573e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8574e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 857572b676d7Smrg 8576e35772b2Smrg# Old names: 8577e35772b2SmrgAC_DEFUN([AC_ENABLE_SHARED], 8578e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8579e35772b2Smrg]) 8580e35772b2Smrg 8581e35772b2SmrgAC_DEFUN([AC_DISABLE_SHARED], 8582e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8583e35772b2Smrg]) 858472b676d7Smrg 8585e35772b2SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8586e35772b2SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 858772b676d7Smrg 8588e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8589e35772b2Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8590e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 859172b676d7Smrg 859272b676d7Smrg 859372b676d7Smrg 8594e35772b2Smrg# _LT_ENABLE_STATIC([DEFAULT]) 8595e35772b2Smrg# ---------------------------- 859621525869Smrg# implement the --enable-static flag, and support the 'static' and 859721525869Smrg# 'disable-static' LT_INIT options. 859821525869Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8599e35772b2Smrgm4_define([_LT_ENABLE_STATIC], 8600e35772b2Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8601e35772b2SmrgAC_ARG_ENABLE([static], 8602e35772b2Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8603e35772b2Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8604e35772b2Smrg [p=${PACKAGE-default} 8605e35772b2Smrg case $enableval in 8606e35772b2Smrg yes) enable_static=yes ;; 8607e35772b2Smrg no) enable_static=no ;; 8608e35772b2Smrg *) 8609e35772b2Smrg enable_static=no 8610e35772b2Smrg # Look at the argument we got. We use all the common list separators. 861121525869Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8612e35772b2Smrg for pkg in $enableval; do 861321525869Smrg IFS=$lt_save_ifs 8614e35772b2Smrg if test "X$pkg" = "X$p"; then 8615e35772b2Smrg enable_static=yes 8616e35772b2Smrg fi 8617e35772b2Smrg done 861821525869Smrg IFS=$lt_save_ifs 861972b676d7Smrg ;; 8620e35772b2Smrg esac], 8621e35772b2Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 862272b676d7Smrg 8623e35772b2Smrg _LT_DECL([build_old_libs], [enable_static], [0], 8624e35772b2Smrg [Whether or not to build static libraries]) 8625e35772b2Smrg])# _LT_ENABLE_STATIC 862672b676d7Smrg 8627e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8628e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 862972b676d7Smrg 8630e35772b2Smrg# Old names: 8631e35772b2SmrgAC_DEFUN([AC_ENABLE_STATIC], 8632e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8633e35772b2Smrg]) 863472b676d7Smrg 8635e35772b2SmrgAC_DEFUN([AC_DISABLE_STATIC], 8636e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8637e35772b2Smrg]) 863872b676d7Smrg 8639e35772b2SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8640e35772b2SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 864172b676d7Smrg 8642e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8643e35772b2Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8644e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 864572b676d7Smrg 864672b676d7Smrg 864772b676d7Smrg 8648e35772b2Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8649e35772b2Smrg# ---------------------------------- 865021525869Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 865121525869Smrg# and 'disable-fast-install' LT_INIT options. 865221525869Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8653e35772b2Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 8654e35772b2Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8655e35772b2SmrgAC_ARG_ENABLE([fast-install], 8656e35772b2Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8657e35772b2Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8658e35772b2Smrg [p=${PACKAGE-default} 8659e35772b2Smrg case $enableval in 8660e35772b2Smrg yes) enable_fast_install=yes ;; 8661e35772b2Smrg no) enable_fast_install=no ;; 8662e35772b2Smrg *) 8663e35772b2Smrg enable_fast_install=no 8664e35772b2Smrg # Look at the argument we got. We use all the common list separators. 866521525869Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8666e35772b2Smrg for pkg in $enableval; do 866721525869Smrg IFS=$lt_save_ifs 8668e35772b2Smrg if test "X$pkg" = "X$p"; then 8669e35772b2Smrg enable_fast_install=yes 86701fd23544Smrg fi 8671e35772b2Smrg done 867221525869Smrg IFS=$lt_save_ifs 867372b676d7Smrg ;; 8674e35772b2Smrg esac], 8675e35772b2Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 867672b676d7Smrg 8677e35772b2Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 8678e35772b2Smrg [Whether or not to optimize for fast installation])dnl 8679e35772b2Smrg])# _LT_ENABLE_FAST_INSTALL 868072b676d7Smrg 8681e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8682e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 868372b676d7Smrg 8684e35772b2Smrg# Old names: 8685e35772b2SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8686e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8687e35772b2SmrgAC_DIAGNOSE([obsolete], 8688e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 868921525869Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 8690e35772b2Smrg]) 869172b676d7Smrg 8692e35772b2SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8693e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8694e35772b2SmrgAC_DIAGNOSE([obsolete], 8695e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 869621525869Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 8697e35772b2Smrg]) 869872b676d7Smrg 8699e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8700e35772b2Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8701e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 870272b676d7Smrg 870372b676d7Smrg 870421525869Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 870521525869Smrg# ---------------------------------- 870621525869Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 870721525869Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 870821525869Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 870921525869Smrgm4_define([_LT_WITH_AIX_SONAME], 871021525869Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 871121525869Smrgshared_archive_member_spec= 871221525869Smrgcase $host,$enable_shared in 871321525869Smrgpower*-*-aix[[5-9]]*,yes) 871421525869Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 871521525869Smrg AC_ARG_WITH([aix-soname], 871621525869Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 871721525869Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 871821525869Smrg [case $withval in 871921525869Smrg aix|svr4|both) 872021525869Smrg ;; 872121525869Smrg *) 872221525869Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 872321525869Smrg ;; 872421525869Smrg esac 872521525869Smrg lt_cv_with_aix_soname=$with_aix_soname], 872621525869Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 872721525869Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 872821525869Smrg with_aix_soname=$lt_cv_with_aix_soname]) 872921525869Smrg AC_MSG_RESULT([$with_aix_soname]) 873021525869Smrg if test aix != "$with_aix_soname"; then 873121525869Smrg # For the AIX way of multilib, we name the shared archive member 873221525869Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 873321525869Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 873421525869Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 873521525869Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 873621525869Smrg if test 64 = "${OBJECT_MODE-32}"; then 873721525869Smrg shared_archive_member_spec=shr_64 873821525869Smrg else 873921525869Smrg shared_archive_member_spec=shr 874021525869Smrg fi 874121525869Smrg fi 874221525869Smrg ;; 874321525869Smrg*) 874421525869Smrg with_aix_soname=aix 874521525869Smrg ;; 874621525869Smrgesac 874721525869Smrg 874821525869Smrg_LT_DECL([], [shared_archive_member_spec], [0], 874921525869Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 875021525869Smrg])# _LT_WITH_AIX_SONAME 875121525869Smrg 875221525869SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 875321525869SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 875421525869SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 875521525869Smrg 875621525869Smrg 8757e35772b2Smrg# _LT_WITH_PIC([MODE]) 8758e35772b2Smrg# -------------------- 875921525869Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8760e35772b2Smrg# LT_INIT options. 876121525869Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8762e35772b2Smrgm4_define([_LT_WITH_PIC], 8763e35772b2Smrg[AC_ARG_WITH([pic], 876474c14cd6Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8765e35772b2Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 876674c14cd6Smrg [lt_p=${PACKAGE-default} 876774c14cd6Smrg case $withval in 876874c14cd6Smrg yes|no) pic_mode=$withval ;; 876974c14cd6Smrg *) 877074c14cd6Smrg pic_mode=default 877174c14cd6Smrg # Look at the argument we got. We use all the common list separators. 877221525869Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 877374c14cd6Smrg for lt_pkg in $withval; do 877421525869Smrg IFS=$lt_save_ifs 877574c14cd6Smrg if test "X$lt_pkg" = "X$lt_p"; then 877674c14cd6Smrg pic_mode=yes 877774c14cd6Smrg fi 877874c14cd6Smrg done 877921525869Smrg IFS=$lt_save_ifs 878074c14cd6Smrg ;; 878174c14cd6Smrg esac], 878221525869Smrg [pic_mode=m4_default([$1], [default])]) 878372b676d7Smrg 8784e35772b2Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8785e35772b2Smrg])# _LT_WITH_PIC 878672b676d7Smrg 8787e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8788e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8789e35772b2Smrg 8790e35772b2Smrg# Old name: 8791e35772b2SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8792e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8793e35772b2SmrgAC_DIAGNOSE([obsolete], 8794e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 879521525869Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 879672b676d7Smrg]) 879772b676d7Smrg 8798e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8799e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8800e35772b2Smrg 8801e35772b2Smrg 8802e35772b2Smrgm4_define([_LTDL_MODE], []) 8803e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8804e35772b2Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8805e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8806e35772b2Smrg [m4_define([_LTDL_MODE], [recursive])]) 8807e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8808e35772b2Smrg [m4_define([_LTDL_MODE], [subproject])]) 8809e35772b2Smrg 8810e35772b2Smrgm4_define([_LTDL_TYPE], []) 8811e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8812e35772b2Smrg [m4_define([_LTDL_TYPE], [installable])]) 8813e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8814e35772b2Smrg [m4_define([_LTDL_TYPE], [convenience])]) 8815e35772b2Smrg 8816e35772b2Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 881772b676d7Smrg# 881821525869Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 881921525869Smrg# Foundation, Inc. 8820e35772b2Smrg# Written by Gary V. Vaughan, 2004 882172b676d7Smrg# 8822e35772b2Smrg# This file is free software; the Free Software Foundation gives 8823e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8824e35772b2Smrg# modifications, as long as this notice is preserved. 882572b676d7Smrg 8826e35772b2Smrg# serial 6 ltsugar.m4 882772b676d7Smrg 8828e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8829e35772b2SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 883072b676d7Smrg 883172b676d7Smrg 8832e35772b2Smrg# lt_join(SEP, ARG1, [ARG2...]) 8833e35772b2Smrg# ----------------------------- 8834e35772b2Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8835e35772b2Smrg# associated separator. 8836e35772b2Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8837e35772b2Smrg# versions in m4sugar had bugs. 8838e35772b2Smrgm4_define([lt_join], 8839e35772b2Smrg[m4_if([$#], [1], [], 8840e35772b2Smrg [$#], [2], [[$2]], 8841e35772b2Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8842e35772b2Smrgm4_define([_lt_join], 8843e35772b2Smrg[m4_if([$#$2], [2], [], 8844e35772b2Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8845e35772b2Smrg 8846e35772b2Smrg 8847e35772b2Smrg# lt_car(LIST) 8848e35772b2Smrg# lt_cdr(LIST) 8849e35772b2Smrg# ------------ 8850e35772b2Smrg# Manipulate m4 lists. 8851e35772b2Smrg# These macros are necessary as long as will still need to support 885221525869Smrg# Autoconf-2.59, which quotes differently. 8853e35772b2Smrgm4_define([lt_car], [[$1]]) 8854e35772b2Smrgm4_define([lt_cdr], 8855e35772b2Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8856e35772b2Smrg [$#], 1, [], 8857e35772b2Smrg [m4_dquote(m4_shift($@))])]) 8858e35772b2Smrgm4_define([lt_unquote], $1) 8859e35772b2Smrg 8860e35772b2Smrg 8861e35772b2Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8862e35772b2Smrg# ------------------------------------------ 886321525869Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8864e35772b2Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8865e35772b2Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8866e35772b2Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8867e35772b2Smrg# than defined and empty). 8868e35772b2Smrg# 8869e35772b2Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8870e35772b2Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8871e35772b2Smrgm4_define([lt_append], 8872e35772b2Smrg[m4_define([$1], 8873e35772b2Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8874e35772b2Smrg 8875e35772b2Smrg 8876e35772b2Smrg 8877e35772b2Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8878e35772b2Smrg# ---------------------------------------------------------- 8879e35772b2Smrg# Produce a SEP delimited list of all paired combinations of elements of 8880e35772b2Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8881e35772b2Smrg# has the form PREFIXmINFIXSUFFIXn. 8882e35772b2Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8883e35772b2Smrgm4_define([lt_combine], 8884e35772b2Smrg[m4_if(m4_eval([$# > 3]), [1], 8885e35772b2Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8886e35772b2Smrg[[m4_foreach([_Lt_prefix], [$2], 8887e35772b2Smrg [m4_foreach([_Lt_suffix], 8888e35772b2Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8889e35772b2Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8890e35772b2Smrg 8891e35772b2Smrg 8892e35772b2Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8893e35772b2Smrg# ----------------------------------------------------------------------- 8894e35772b2Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8895e35772b2Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8896e35772b2Smrgm4_define([lt_if_append_uniq], 8897e35772b2Smrg[m4_ifdef([$1], 8898e35772b2Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8899e35772b2Smrg [lt_append([$1], [$2], [$3])$4], 8900e35772b2Smrg [$5])], 8901e35772b2Smrg [lt_append([$1], [$2], [$3])$4])]) 8902e35772b2Smrg 8903e35772b2Smrg 8904e35772b2Smrg# lt_dict_add(DICT, KEY, VALUE) 8905e35772b2Smrg# ----------------------------- 8906e35772b2Smrgm4_define([lt_dict_add], 8907e35772b2Smrg[m4_define([$1($2)], [$3])]) 890872b676d7Smrg 890972b676d7Smrg 8910e35772b2Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8911e35772b2Smrg# -------------------------------------------- 8912e35772b2Smrgm4_define([lt_dict_add_subkey], 8913e35772b2Smrg[m4_define([$1($2:$3)], [$4])]) 891472b676d7Smrg 891572b676d7Smrg 8916e35772b2Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8917e35772b2Smrg# ---------------------------------- 8918e35772b2Smrgm4_define([lt_dict_fetch], 8919e35772b2Smrg[m4_ifval([$3], 8920e35772b2Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8921e35772b2Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8922e35772b2Smrg 892372b676d7Smrg 8924e35772b2Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8925e35772b2Smrg# ----------------------------------------------------------------- 8926e35772b2Smrgm4_define([lt_if_dict_fetch], 8927e35772b2Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8928e35772b2Smrg [$5], 8929e35772b2Smrg [$6])]) 8930e35772b2Smrg 8931e35772b2Smrg 8932e35772b2Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8933e35772b2Smrg# -------------------------------------------------------------- 8934e35772b2Smrgm4_define([lt_dict_filter], 8935e35772b2Smrg[m4_if([$5], [], [], 8936e35772b2Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8937e35772b2Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8938e35772b2Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 893972b676d7Smrg]) 894072b676d7Smrg 8941e35772b2Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8942e35772b2Smrg# 894321525869Smrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 8944e35772b2Smrg# Written by Scott James Remnant, 2004 8945e35772b2Smrg# 8946e35772b2Smrg# This file is free software; the Free Software Foundation gives 8947e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8948e35772b2Smrg# modifications, as long as this notice is preserved. 89491fd23544Smrg 895074c14cd6Smrg# @configure_input@ 89511fd23544Smrg 895221525869Smrg# serial 4179 ltversion.m4 8953e35772b2Smrg# This file is part of GNU Libtool 89541fd23544Smrg 895521525869Smrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 895621525869Smrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 89571fd23544Smrg 8958e35772b2SmrgAC_DEFUN([LTVERSION_VERSION], 895921525869Smrg[macro_version='2.4.6' 896021525869Smrgmacro_revision='2.4.6' 8961e35772b2Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8962e35772b2Smrg_LT_DECL(, macro_revision, 0) 896372b676d7Smrg]) 896472b676d7Smrg 8965e35772b2Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8966e35772b2Smrg# 896721525869Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 896821525869Smrg# Foundation, Inc. 8969e35772b2Smrg# Written by Scott James Remnant, 2004. 8970e35772b2Smrg# 8971e35772b2Smrg# This file is free software; the Free Software Foundation gives 8972e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8973e35772b2Smrg# modifications, as long as this notice is preserved. 8974e35772b2Smrg 897574c14cd6Smrg# serial 5 lt~obsolete.m4 8976e35772b2Smrg 8977e35772b2Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8978e35772b2Smrg# 897921525869Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8980e35772b2Smrg# which have later been changed to m4_define as they aren't part of the 8981e35772b2Smrg# exported API, or moved to Autoconf or Automake where they belong. 8982e35772b2Smrg# 8983e35772b2Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8984e35772b2Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8985e35772b2Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8986e35772b2Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8987e35772b2Smrg# and doesn't know about Autoconf macros at all.) 8988e35772b2Smrg# 8989e35772b2Smrg# So we provide this file, which has a silly filename so it's always 8990e35772b2Smrg# included after everything else. This provides aclocal with the 8991e35772b2Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8992e35772b2Smrg# because those macros already exist, or will be overwritten later. 899321525869Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8994e35772b2Smrg# 8995e35772b2Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8996e35772b2Smrg# Yes, that means every name once taken will need to remain here until 8997e35772b2Smrg# we give up compatibility with versions before 1.7, at which point 8998e35772b2Smrg# we need to keep only those names which we still refer to. 8999e35772b2Smrg 9000e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9001e35772b2SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9002e35772b2Smrg 9003e35772b2Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9004e35772b2Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9005e35772b2Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9006e35772b2Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9007e35772b2Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9008e35772b2Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9009e35772b2Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9010e35772b2Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9011e35772b2Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9012e35772b2Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9013e35772b2Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9014e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9015e35772b2Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9016e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9017e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9018e35772b2Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9019e35772b2Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9020e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9021e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9022e35772b2Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9023e35772b2Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9024e35772b2Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9025e35772b2Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9026e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9027e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9028e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9029e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9030e35772b2Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9031e35772b2Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9032e35772b2Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9033e35772b2Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9034e35772b2Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9035e35772b2Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9036e35772b2Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9037e35772b2Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9038e35772b2Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9039e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9040e35772b2Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9041e35772b2Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9042e35772b2Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9043e35772b2Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9044e35772b2Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9045e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9046e35772b2Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9047e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9048e35772b2Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9049e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9050e35772b2Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9051e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9052e35772b2Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9053e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9054e35772b2Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9055e35772b2Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9056e35772b2Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 905774c14cd6Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 905874c14cd6Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 905974c14cd6Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 906074c14cd6Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 906174c14cd6Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 906274c14cd6Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 906374c14cd6Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9064e35772b2Smrg 906572b676d7Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 906674c14cd6Smrg# serial 1 (pkg-config-0.24) 906772b676d7Smrg# 906872b676d7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 906972b676d7Smrg# 907072b676d7Smrg# This program is free software; you can redistribute it and/or modify 907172b676d7Smrg# it under the terms of the GNU General Public License as published by 907272b676d7Smrg# the Free Software Foundation; either version 2 of the License, or 907372b676d7Smrg# (at your option) any later version. 907472b676d7Smrg# 907572b676d7Smrg# This program is distributed in the hope that it will be useful, but 907672b676d7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 907772b676d7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 907872b676d7Smrg# General Public License for more details. 907972b676d7Smrg# 908072b676d7Smrg# You should have received a copy of the GNU General Public License 908172b676d7Smrg# along with this program; if not, write to the Free Software 908272b676d7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 908372b676d7Smrg# 908472b676d7Smrg# As a special exception to the GNU General Public License, if you 908572b676d7Smrg# distribute this file as part of a program that contains a 908672b676d7Smrg# configuration script generated by Autoconf, you may include it under 908772b676d7Smrg# the same distribution terms that you use for the rest of that program. 908872b676d7Smrg 908972b676d7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 909072b676d7Smrg# ---------------------------------- 909172b676d7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 909272b676d7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 909321525869Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 909421525869Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 909574c14cd6SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 909674c14cd6SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 909774c14cd6SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 909874c14cd6Smrg 909972b676d7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 910072b676d7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 910172b676d7Smrgfi 910272b676d7Smrgif test -n "$PKG_CONFIG"; then 910372b676d7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 910472b676d7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 910572b676d7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 910672b676d7Smrg AC_MSG_RESULT([yes]) 910772b676d7Smrg else 910872b676d7Smrg AC_MSG_RESULT([no]) 910972b676d7Smrg PKG_CONFIG="" 911072b676d7Smrg fi 911172b676d7Smrgfi[]dnl 911272b676d7Smrg])# PKG_PROG_PKG_CONFIG 911372b676d7Smrg 911472b676d7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 911572b676d7Smrg# 911672b676d7Smrg# Check to see whether a particular set of modules exists. Similar 911772b676d7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 911872b676d7Smrg# 911974c14cd6Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 912074c14cd6Smrg# only at the first occurence in configure.ac, so if the first place 912174c14cd6Smrg# it's called might be skipped (such as if it is within an "if", you 912274c14cd6Smrg# have to call PKG_CHECK_EXISTS manually 912372b676d7Smrg# -------------------------------------------------------------- 912472b676d7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 912572b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 912672b676d7Smrgif test -n "$PKG_CONFIG" && \ 912772b676d7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 912874c14cd6Smrg m4_default([$2], [:]) 912972b676d7Smrgm4_ifvaln([$3], [else 913072b676d7Smrg $3])dnl 913172b676d7Smrgfi]) 913272b676d7Smrg 913372b676d7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 913472b676d7Smrg# --------------------------------------------- 913572b676d7Smrgm4_define([_PKG_CONFIG], 91361fd23544Smrg[if test -n "$$1"; then 91371fd23544Smrg pkg_cv_[]$1="$$1" 91381fd23544Smrg elif test -n "$PKG_CONFIG"; then 91391fd23544Smrg PKG_CHECK_EXISTS([$3], 914021525869Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 914121525869Smrg test "x$?" != "x0" && pkg_failed=yes ], 91421fd23544Smrg [pkg_failed=yes]) 91431fd23544Smrg else 91441fd23544Smrg pkg_failed=untried 914572b676d7Smrgfi[]dnl 914672b676d7Smrg])# _PKG_CONFIG 914772b676d7Smrg 914872b676d7Smrg# _PKG_SHORT_ERRORS_SUPPORTED 914972b676d7Smrg# ----------------------------- 915072b676d7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 915172b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 915272b676d7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 915372b676d7Smrg _pkg_short_errors_supported=yes 915472b676d7Smrgelse 915572b676d7Smrg _pkg_short_errors_supported=no 915672b676d7Smrgfi[]dnl 915772b676d7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 915872b676d7Smrg 915972b676d7Smrg 916072b676d7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 916172b676d7Smrg# [ACTION-IF-NOT-FOUND]) 916272b676d7Smrg# 916372b676d7Smrg# 916472b676d7Smrg# Note that if there is a possibility the first call to 916572b676d7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 916672b676d7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 916772b676d7Smrg# 916872b676d7Smrg# 916972b676d7Smrg# -------------------------------------------------------------- 917072b676d7SmrgAC_DEFUN([PKG_CHECK_MODULES], 917172b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 917272b676d7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 917372b676d7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 917472b676d7Smrg 917572b676d7Smrgpkg_failed=no 917672b676d7SmrgAC_MSG_CHECKING([for $1]) 917772b676d7Smrg 917872b676d7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 917972b676d7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 918072b676d7Smrg 918172b676d7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 918272b676d7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 918372b676d7SmrgSee the pkg-config man page for more details.]) 918472b676d7Smrg 918572b676d7Smrgif test $pkg_failed = yes; then 918674c14cd6Smrg AC_MSG_RESULT([no]) 918772b676d7Smrg _PKG_SHORT_ERRORS_SUPPORTED 918872b676d7Smrg if test $_pkg_short_errors_supported = yes; then 918921525869Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 919072b676d7Smrg else 919121525869Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 919272b676d7Smrg fi 919372b676d7Smrg # Put the nasty error message in config.log where it belongs 919472b676d7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 919572b676d7Smrg 919674c14cd6Smrg m4_default([$4], [AC_MSG_ERROR( 919772b676d7Smrg[Package requirements ($2) were not met: 919872b676d7Smrg 919972b676d7Smrg$$1_PKG_ERRORS 920072b676d7Smrg 920172b676d7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 920272b676d7Smrginstalled software in a non-standard prefix. 920372b676d7Smrg 920421525869Smrg_PKG_TEXT])[]dnl 920574c14cd6Smrg ]) 920672b676d7Smrgelif test $pkg_failed = untried; then 920774c14cd6Smrg AC_MSG_RESULT([no]) 920874c14cd6Smrg m4_default([$4], [AC_MSG_FAILURE( 920972b676d7Smrg[The pkg-config script could not be found or is too old. Make sure it 921072b676d7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 921172b676d7Smrgpath to pkg-config. 921272b676d7Smrg 921372b676d7Smrg_PKG_TEXT 921472b676d7Smrg 921521525869SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 921674c14cd6Smrg ]) 921772b676d7Smrgelse 921872b676d7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 921972b676d7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 922072b676d7Smrg AC_MSG_RESULT([yes]) 922174c14cd6Smrg $3 922272b676d7Smrgfi[]dnl 922372b676d7Smrg])# PKG_CHECK_MODULES 922472b676d7Smrg 922521525869Smrg 922621525869Smrg# PKG_INSTALLDIR(DIRECTORY) 922721525869Smrg# ------------------------- 922821525869Smrg# Substitutes the variable pkgconfigdir as the location where a module 922921525869Smrg# should install pkg-config .pc files. By default the directory is 923021525869Smrg# $libdir/pkgconfig, but the default can be changed by passing 923121525869Smrg# DIRECTORY. The user can override through the --with-pkgconfigdir 923221525869Smrg# parameter. 923321525869SmrgAC_DEFUN([PKG_INSTALLDIR], 923421525869Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 923521525869Smrgm4_pushdef([pkg_description], 923621525869Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 923721525869SmrgAC_ARG_WITH([pkgconfigdir], 923821525869Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 923921525869Smrg [with_pkgconfigdir=]pkg_default) 924021525869SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 924121525869Smrgm4_popdef([pkg_default]) 924221525869Smrgm4_popdef([pkg_description]) 924321525869Smrg]) dnl PKG_INSTALLDIR 924421525869Smrg 924521525869Smrg 924621525869Smrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 924721525869Smrg# ------------------------- 924821525869Smrg# Substitutes the variable noarch_pkgconfigdir as the location where a 924921525869Smrg# module should install arch-independent pkg-config .pc files. By 925021525869Smrg# default the directory is $datadir/pkgconfig, but the default can be 925121525869Smrg# changed by passing DIRECTORY. The user can override through the 925221525869Smrg# --with-noarch-pkgconfigdir parameter. 925321525869SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 925421525869Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 925521525869Smrgm4_pushdef([pkg_description], 925621525869Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 925721525869SmrgAC_ARG_WITH([noarch-pkgconfigdir], 925821525869Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 925921525869Smrg [with_noarch_pkgconfigdir=]pkg_default) 926021525869SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 926121525869Smrgm4_popdef([pkg_default]) 926221525869Smrgm4_popdef([pkg_description]) 926321525869Smrg]) dnl PKG_NOARCH_INSTALLDIR 926421525869Smrg 926521525869Smrg 926621525869Smrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 926721525869Smrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 926821525869Smrg# ------------------------------------------- 926921525869Smrg# Retrieves the value of the pkg-config variable for the given module. 927021525869SmrgAC_DEFUN([PKG_CHECK_VAR], 927121525869Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 927221525869SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 927321525869Smrg 927421525869Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 927521525869SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 927621525869Smrg 927721525869SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 927821525869Smrg])# PKG_CHECK_VAR 927921525869Smrg 9280e47418d9Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 928172b676d7Smrgdnl 928274c14cd6Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 928321525869Smrgdnl 928472b676d7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9285e35772b2Smrgdnl copy of this software and associated documentation files (the "Software"), 9286e35772b2Smrgdnl to deal in the Software without restriction, including without limitation 9287e35772b2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9288e35772b2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9289e35772b2Smrgdnl Software is furnished to do so, subject to the following conditions: 929072b676d7Smrgdnl 9291e35772b2Smrgdnl The above copyright notice and this permission notice (including the next 9292e35772b2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9293e35772b2Smrgdnl Software. 929472b676d7Smrgdnl 9295e35772b2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9296e35772b2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9297e35772b2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9298e35772b2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9299e35772b2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9300e35772b2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9301e35772b2Smrgdnl DEALINGS IN THE SOFTWARE. 930272b676d7Smrg 930372b676d7Smrg# XORG_MACROS_VERSION(required-version) 930472b676d7Smrg# ------------------------------------- 930572b676d7Smrg# Minimum version: 1.1.0 930672b676d7Smrg# 930772b676d7Smrg# If you're using a macro added in Version 1.1 or newer, include this in 930872b676d7Smrg# your configure.ac with the minimum required version, such as: 930972b676d7Smrg# XORG_MACROS_VERSION(1.1) 931072b676d7Smrg# 9311e35772b2Smrg# To ensure that this macro is defined, also add: 9312e35772b2Smrg# m4_ifndef([XORG_MACROS_VERSION], 9313e35772b2Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 931472b676d7Smrg# 931572b676d7Smrg# 931621525869Smrg# See the "minimum version" comment for each macro you use to see what 931772b676d7Smrg# version you require. 9318e35772b2Smrgm4_defun([XORG_MACROS_VERSION],[ 931921525869Smrgm4_define([vers_have], [1.19.0]) 9320e35772b2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9321e35772b2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9322e35772b2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9323e35772b2Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9324e35772b2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9325e35772b2Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9326e35772b2Smrgm4_undefine([vers_have]) 9327e35772b2Smrgm4_undefine([maj_have]) 9328e35772b2Smrgm4_undefine([maj_needed]) 932972b676d7Smrg]) # XORG_MACROS_VERSION 933072b676d7Smrg 933172b676d7Smrg# XORG_PROG_RAWCPP() 933272b676d7Smrg# ------------------ 933372b676d7Smrg# Minimum version: 1.0.0 933472b676d7Smrg# 933572b676d7Smrg# Find cpp program and necessary flags for use in pre-processing text files 933672b676d7Smrg# such as man pages and config files 933772b676d7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 933872b676d7SmrgAC_REQUIRE([AC_PROG_CPP]) 933921525869SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 934072b676d7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 934172b676d7Smrg 934272b676d7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 934372b676d7Smrg# which is not the best choice for supporting other OS'es, but covers most 934472b676d7Smrg# of the ones we need for now. 934572b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 934674c14cd6SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 934772b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 934872b676d7Smrg AC_MSG_RESULT([no]) 934972b676d7Smrgelse 935072b676d7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 935172b676d7Smrg RAWCPPFLAGS=-undef 935272b676d7Smrg AC_MSG_RESULT([yes]) 9353e47418d9Smrg # under Cygwin unix is still defined even with -undef 9354e47418d9Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9355e47418d9Smrg RAWCPPFLAGS="-undef -ansi" 9356e47418d9Smrg AC_MSG_RESULT([yes, with -ansi]) 935772b676d7Smrg else 935872b676d7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 935972b676d7Smrg fi 936072b676d7Smrgfi 936172b676d7Smrgrm -f conftest.$ac_ext 936272b676d7Smrg 936372b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 936474c14cd6SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 936572b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 936672b676d7Smrg AC_MSG_RESULT([no]) 936772b676d7Smrgelse 936872b676d7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 936921525869Smrg TRADITIONALCPPFLAGS="-traditional" 937072b676d7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 937172b676d7Smrg AC_MSG_RESULT([yes]) 937272b676d7Smrg else 937372b676d7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 937472b676d7Smrg fi 937572b676d7Smrgfi 937672b676d7Smrgrm -f conftest.$ac_ext 937772b676d7SmrgAC_SUBST(RAWCPPFLAGS) 937821525869SmrgAC_SUBST(TRADITIONALCPPFLAGS) 937972b676d7Smrg]) # XORG_PROG_RAWCPP 938072b676d7Smrg 938172b676d7Smrg# XORG_MANPAGE_SECTIONS() 938272b676d7Smrg# ----------------------- 938372b676d7Smrg# Minimum version: 1.0.0 938472b676d7Smrg# 938572b676d7Smrg# Determine which sections man pages go in for the different man page types 938672b676d7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 938772b676d7Smrg# Not sure if there's any better way than just hardcoding by OS name. 938872b676d7Smrg# Override default settings by setting environment variables 9389e35772b2Smrg# Added MAN_SUBSTS in version 1.8 9390e35772b2Smrg# Added AC_PROG_SED in version 1.8 939172b676d7Smrg 939272b676d7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 939372b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9394e35772b2SmrgAC_REQUIRE([AC_PROG_SED]) 939572b676d7Smrg 939672b676d7Smrgif test x$APP_MAN_SUFFIX = x ; then 939772b676d7Smrg APP_MAN_SUFFIX=1 939872b676d7Smrgfi 939972b676d7Smrgif test x$APP_MAN_DIR = x ; then 940072b676d7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 940172b676d7Smrgfi 940272b676d7Smrg 940372b676d7Smrgif test x$LIB_MAN_SUFFIX = x ; then 940472b676d7Smrg LIB_MAN_SUFFIX=3 940572b676d7Smrgfi 940672b676d7Smrgif test x$LIB_MAN_DIR = x ; then 940772b676d7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 940872b676d7Smrgfi 940972b676d7Smrg 941072b676d7Smrgif test x$FILE_MAN_SUFFIX = x ; then 941172b676d7Smrg case $host_os in 941272b676d7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 941372b676d7Smrg *) FILE_MAN_SUFFIX=5 ;; 941472b676d7Smrg esac 941572b676d7Smrgfi 941672b676d7Smrgif test x$FILE_MAN_DIR = x ; then 941772b676d7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 941872b676d7Smrgfi 941972b676d7Smrg 942072b676d7Smrgif test x$MISC_MAN_SUFFIX = x ; then 942172b676d7Smrg case $host_os in 942272b676d7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 942372b676d7Smrg *) MISC_MAN_SUFFIX=7 ;; 942472b676d7Smrg esac 942572b676d7Smrgfi 942672b676d7Smrgif test x$MISC_MAN_DIR = x ; then 942772b676d7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 942872b676d7Smrgfi 942972b676d7Smrg 943072b676d7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 943172b676d7Smrg case $host_os in 943272b676d7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 943372b676d7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 943472b676d7Smrg esac 943572b676d7Smrgfi 943672b676d7Smrgif test x$DRIVER_MAN_DIR = x ; then 943772b676d7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 943872b676d7Smrgfi 943972b676d7Smrg 944072b676d7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 944172b676d7Smrg case $host_os in 944272b676d7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 944372b676d7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 944472b676d7Smrg esac 944572b676d7Smrgfi 944672b676d7Smrgif test x$ADMIN_MAN_DIR = x ; then 944772b676d7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 944872b676d7Smrgfi 944972b676d7Smrg 945072b676d7Smrg 945172b676d7SmrgAC_SUBST([APP_MAN_SUFFIX]) 945272b676d7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 945372b676d7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 945472b676d7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 945572b676d7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 945672b676d7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 945772b676d7SmrgAC_SUBST([APP_MAN_DIR]) 945872b676d7SmrgAC_SUBST([LIB_MAN_DIR]) 945972b676d7SmrgAC_SUBST([FILE_MAN_DIR]) 946072b676d7SmrgAC_SUBST([MISC_MAN_DIR]) 946172b676d7SmrgAC_SUBST([DRIVER_MAN_DIR]) 946272b676d7SmrgAC_SUBST([ADMIN_MAN_DIR]) 9463e35772b2Smrg 9464e35772b2SmrgXORG_MAN_PAGE="X Version 11" 9465e35772b2SmrgAC_SUBST([XORG_MAN_PAGE]) 9466e35772b2SmrgMAN_SUBSTS="\ 9467e35772b2Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9468e35772b2Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9469e35772b2Smrg -e 's|__xservername__|Xorg|g' \ 9470e35772b2Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9471e35772b2Smrg -e 's|__projectroot__|\$(prefix)|g' \ 947274c14cd6Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9473e35772b2Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9474e35772b2Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9475e35772b2Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9476e35772b2Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9477e35772b2Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9478e35772b2Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9479e35772b2SmrgAC_SUBST([MAN_SUBSTS]) 9480e35772b2Smrg 948172b676d7Smrg]) # XORG_MANPAGE_SECTIONS 948272b676d7Smrg 9483e35772b2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9484e35772b2Smrg# ------------------------ 9485e35772b2Smrg# Minimum version: 1.7.0 9486e35772b2Smrg# 9487e35772b2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9488e35772b2Smrg# provided by xorg-sgml-doctools, if installed. 9489e35772b2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9490e35772b2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9491e35772b2SmrgXORG_SGML_PATH= 9492e35772b2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9493e35772b2Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9494e35772b2Smrg [m4_ifval([$1],[:], 9495e35772b2Smrg [if test x"$cross_compiling" != x"yes" ; then 9496e35772b2Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9497e35772b2Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9498e35772b2Smrg fi]) 9499e35772b2Smrg ]) 9500e35772b2Smrg 950174c14cd6Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 950274c14cd6Smrg# the path and the name of the doc stylesheet 9503e35772b2Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9504e35772b2Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 950574c14cd6Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 950674c14cd6Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9507e35772b2Smrgelse 9508e35772b2Smrg AC_MSG_RESULT([no]) 9509e35772b2Smrgfi 9510e35772b2Smrg 9511e35772b2SmrgAC_SUBST(XORG_SGML_PATH) 951274c14cd6SmrgAC_SUBST(STYLESHEET_SRCDIR) 951374c14cd6SmrgAC_SUBST(XSL_STYLESHEET) 951474c14cd6SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9515e35772b2Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9516e35772b2Smrg 951772b676d7Smrg# XORG_CHECK_LINUXDOC 951872b676d7Smrg# ------------------- 951972b676d7Smrg# Minimum version: 1.0.0 952072b676d7Smrg# 952172b676d7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 952272b676d7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 952372b676d7Smrg# Whether or not the necessary tools and files are found can be checked 952472b676d7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 952572b676d7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9526e35772b2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9527e35772b2SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 952872b676d7Smrg 952972b676d7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 953072b676d7Smrg 9531e35772b2SmrgAC_MSG_CHECKING([whether to build documentation]) 953272b676d7Smrg 9533e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 953472b676d7Smrg BUILDDOC=yes 953572b676d7Smrgelse 953672b676d7Smrg BUILDDOC=no 953772b676d7Smrgfi 953872b676d7Smrg 953972b676d7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 954072b676d7Smrg 954172b676d7SmrgAC_MSG_RESULT([$BUILDDOC]) 954272b676d7Smrg 9543e35772b2SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 954472b676d7Smrg 9545e35772b2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 954672b676d7Smrg BUILDPDFDOC=yes 954772b676d7Smrgelse 954872b676d7Smrg BUILDPDFDOC=no 954972b676d7Smrgfi 955072b676d7Smrg 955172b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 955272b676d7Smrg 955372b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 955472b676d7Smrg 9555e35772b2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 955672b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 955772b676d7SmrgMAKE_PDF="$PS2PDF" 955872b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 955972b676d7Smrg 956072b676d7SmrgAC_SUBST(MAKE_TEXT) 956172b676d7SmrgAC_SUBST(MAKE_PS) 956272b676d7SmrgAC_SUBST(MAKE_PDF) 956372b676d7SmrgAC_SUBST(MAKE_HTML) 956472b676d7Smrg]) # XORG_CHECK_LINUXDOC 956572b676d7Smrg 956672b676d7Smrg# XORG_CHECK_DOCBOOK 956772b676d7Smrg# ------------------- 956872b676d7Smrg# Minimum version: 1.0.0 956972b676d7Smrg# 957072b676d7Smrg# Checks for the ability to build output formats from SGML DocBook source. 957172b676d7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 957272b676d7Smrg# indicates whether the necessary tools and files are found and, if set, 957372b676d7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 957472b676d7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9575e35772b2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9576e35772b2Smrg 957772b676d7SmrgBUILDTXTDOC=no 957872b676d7SmrgBUILDPDFDOC=no 957972b676d7SmrgBUILDPSDOC=no 958072b676d7SmrgBUILDHTMLDOC=no 958172b676d7Smrg 958272b676d7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 958372b676d7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 958472b676d7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 958572b676d7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 958672b676d7Smrg 9587e35772b2SmrgAC_MSG_CHECKING([whether to build text documentation]) 9588e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 958972b676d7Smrg test x$BUILD_TXTDOC != xno; then 959072b676d7Smrg BUILDTXTDOC=yes 959172b676d7Smrgfi 959272b676d7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 959372b676d7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 959472b676d7Smrg 9595e35772b2SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9596e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 959772b676d7Smrg test x$BUILD_PDFDOC != xno; then 959872b676d7Smrg BUILDPDFDOC=yes 959972b676d7Smrgfi 960072b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 960172b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 960272b676d7Smrg 9603e35772b2SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9604e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 960572b676d7Smrg test x$BUILD_PSDOC != xno; then 960672b676d7Smrg BUILDPSDOC=yes 960772b676d7Smrgfi 960872b676d7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 960972b676d7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 961072b676d7Smrg 9611e35772b2SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9612e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 961372b676d7Smrg test x$BUILD_HTMLDOC != xno; then 961472b676d7Smrg BUILDHTMLDOC=yes 961572b676d7Smrgfi 961672b676d7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 961772b676d7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 961872b676d7Smrg 961972b676d7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 962072b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 962172b676d7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 962272b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 962372b676d7Smrg 962472b676d7SmrgAC_SUBST(MAKE_TEXT) 962572b676d7SmrgAC_SUBST(MAKE_PS) 962672b676d7SmrgAC_SUBST(MAKE_PDF) 962772b676d7SmrgAC_SUBST(MAKE_HTML) 962872b676d7Smrg]) # XORG_CHECK_DOCBOOK 962972b676d7Smrg 963074c14cd6Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9631e35772b2Smrg# ---------------- 9632e35772b2Smrg# Minimum version: 1.5.0 963374c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9634e35772b2Smrg# 9635e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9636e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9637e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9638e35772b2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 963974c14cd6Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 964074c14cd6Smrg# --with-xmlto assumes 'auto'. 9641e35772b2Smrg# 9642e35772b2Smrg# Interface to module: 9643e35772b2Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9644e35772b2Smrg# XMLTO: returns the path of the xmlto program found 9645e35772b2Smrg# returns the path set by the user in the environment 9646e35772b2Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9647e35772b2Smrg# 'no' user instructs the module not to use xmlto 9648e35772b2Smrg# 964974c14cd6Smrg# Added in version 1.10.0 965074c14cd6Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 965174c14cd6Smrg# xmlto for text output requires either lynx, links, or w3m browsers 965274c14cd6Smrg# 9653e35772b2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9654e35772b2Smrg# 9655e35772b2SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9656e35772b2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 965774c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9658e35772b2SmrgAC_ARG_WITH(xmlto, 9659e35772b2Smrg AS_HELP_STRING([--with-xmlto], 966074c14cd6Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 966174c14cd6Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 966274c14cd6Smrgm4_undefine([_defopt]) 9663e35772b2Smrg 9664e35772b2Smrgif test "x$use_xmlto" = x"auto"; then 9665e35772b2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9666e35772b2Smrg if test "x$XMLTO" = "x"; then 9667e35772b2Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9668e35772b2Smrg have_xmlto=no 9669e35772b2Smrg else 9670e35772b2Smrg have_xmlto=yes 9671e35772b2Smrg fi 9672e35772b2Smrgelif test "x$use_xmlto" = x"yes" ; then 9673e35772b2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9674e35772b2Smrg if test "x$XMLTO" = "x"; then 9675e35772b2Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9676e35772b2Smrg fi 9677e35772b2Smrg have_xmlto=yes 9678e35772b2Smrgelif test "x$use_xmlto" = x"no" ; then 9679e35772b2Smrg if test "x$XMLTO" != "x"; then 9680e35772b2Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9681e35772b2Smrg fi 9682e35772b2Smrg have_xmlto=no 9683e35772b2Smrgelse 9684e35772b2Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9685e35772b2Smrgfi 968674c14cd6Smrg 968774c14cd6Smrg# Test for a minimum version of xmlto, if provided. 9688e35772b2Smrgm4_ifval([$1], 9689e35772b2Smrg[if test "$have_xmlto" = yes; then 9690e35772b2Smrg # scrape the xmlto version 9691e35772b2Smrg AC_MSG_CHECKING([the xmlto version]) 9692e35772b2Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9693e35772b2Smrg AC_MSG_RESULT([$xmlto_version]) 9694e35772b2Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9695e35772b2Smrg [if test "x$use_xmlto" = xauto; then 9696e35772b2Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9697e35772b2Smrg have_xmlto=no 9698e35772b2Smrg else 9699e35772b2Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9700e35772b2Smrg fi]) 9701e35772b2Smrgfi]) 970274c14cd6Smrg 970374c14cd6Smrg# Test for the ability of xmlto to generate a text target 970474c14cd6Smrghave_xmlto_text=no 970574c14cd6Smrgcat > conftest.xml << "EOF" 970674c14cd6SmrgEOF 970774c14cd6SmrgAS_IF([test "$have_xmlto" = yes], 970874c14cd6Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 970974c14cd6Smrg [have_xmlto_text=yes], 971074c14cd6Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 971174c14cd6Smrgrm -f conftest.xml 971274c14cd6SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9713e35772b2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9714e35772b2Smrg]) # XORG_WITH_XMLTO 9715e35772b2Smrg 971674c14cd6Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 971774c14cd6Smrg# -------------------------------------------- 971874c14cd6Smrg# Minimum version: 1.12.0 971974c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.12.0 972074c14cd6Smrg# 972174c14cd6Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 972274c14cd6Smrg# XML-based language used for the transformation of XML documents. 972374c14cd6Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 972474c14cd6Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 972574c14cd6Smrg# The XSLT processor is often used as a standalone tool for transformations. 972674c14cd6Smrg# It should not be assumed that this tool is used only to work with documnetation. 972774c14cd6Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 972874c14cd6Smrg# 972974c14cd6Smrg# Interface to module: 973074c14cd6Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 973174c14cd6Smrg# XSLTPROC: returns the path of the xsltproc program found 973274c14cd6Smrg# returns the path set by the user in the environment 973374c14cd6Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 973474c14cd6Smrg# 'no' user instructs the module not to use xsltproc 973574c14cd6Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 973674c14cd6Smrg# 973774c14cd6Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 973874c14cd6Smrg# 973974c14cd6SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 974074c14cd6SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 974174c14cd6Smrg# Preserves the interface, should it be implemented later 974274c14cd6Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 974374c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 974474c14cd6SmrgAC_ARG_WITH(xsltproc, 974574c14cd6Smrg AS_HELP_STRING([--with-xsltproc], 974674c14cd6Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 974774c14cd6Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 974874c14cd6Smrgm4_undefine([_defopt]) 974974c14cd6Smrg 975074c14cd6Smrgif test "x$use_xsltproc" = x"auto"; then 975174c14cd6Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 975274c14cd6Smrg if test "x$XSLTPROC" = "x"; then 975374c14cd6Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 975474c14cd6Smrg have_xsltproc=no 975574c14cd6Smrg else 975674c14cd6Smrg have_xsltproc=yes 975774c14cd6Smrg fi 975874c14cd6Smrgelif test "x$use_xsltproc" = x"yes" ; then 975974c14cd6Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 976074c14cd6Smrg if test "x$XSLTPROC" = "x"; then 976174c14cd6Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 976274c14cd6Smrg fi 976374c14cd6Smrg have_xsltproc=yes 976474c14cd6Smrgelif test "x$use_xsltproc" = x"no" ; then 976574c14cd6Smrg if test "x$XSLTPROC" != "x"; then 976674c14cd6Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 976774c14cd6Smrg fi 976874c14cd6Smrg have_xsltproc=no 976974c14cd6Smrgelse 977074c14cd6Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 977174c14cd6Smrgfi 977274c14cd6Smrg 977374c14cd6SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 977474c14cd6Smrg]) # XORG_WITH_XSLTPROC 977574c14cd6Smrg 977674c14cd6Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 977774c14cd6Smrg# ---------------------------------------- 977874c14cd6Smrg# Minimum version: 1.15.0 977974c14cd6Smrg# 978074c14cd6Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 978174c14cd6Smrg# scanning arbitrary text files, extracting information from those text files, 978274c14cd6Smrg# and printing reports based on that information. 978374c14cd6Smrg# 978474c14cd6Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 978574c14cd6Smrg# 978674c14cd6Smrg# Interface to module: 978774c14cd6Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 978874c14cd6Smrg# PERL: returns the path of the perl program found 978974c14cd6Smrg# returns the path set by the user in the environment 979074c14cd6Smrg# --with-perl: 'yes' user instructs the module to use perl 979174c14cd6Smrg# 'no' user instructs the module not to use perl 979274c14cd6Smrg# have_perl: returns yes if perl found in PATH or no 979374c14cd6Smrg# 979474c14cd6Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 979574c14cd6Smrg# 979674c14cd6SmrgAC_DEFUN([XORG_WITH_PERL],[ 979774c14cd6SmrgAC_ARG_VAR([PERL], [Path to perl command]) 979874c14cd6Smrg# Preserves the interface, should it be implemented later 979974c14cd6Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 980074c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 980174c14cd6SmrgAC_ARG_WITH(perl, 980274c14cd6Smrg AS_HELP_STRING([--with-perl], 980374c14cd6Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 980474c14cd6Smrg [use_perl=$withval], [use_perl=]_defopt) 980574c14cd6Smrgm4_undefine([_defopt]) 980674c14cd6Smrg 980774c14cd6Smrgif test "x$use_perl" = x"auto"; then 980874c14cd6Smrg AC_PATH_PROG([PERL], [perl]) 980974c14cd6Smrg if test "x$PERL" = "x"; then 981074c14cd6Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 981174c14cd6Smrg have_perl=no 981274c14cd6Smrg else 981374c14cd6Smrg have_perl=yes 981474c14cd6Smrg fi 981574c14cd6Smrgelif test "x$use_perl" = x"yes" ; then 981674c14cd6Smrg AC_PATH_PROG([PERL], [perl]) 981774c14cd6Smrg if test "x$PERL" = "x"; then 981874c14cd6Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 981974c14cd6Smrg fi 982074c14cd6Smrg have_perl=yes 982174c14cd6Smrgelif test "x$use_perl" = x"no" ; then 982274c14cd6Smrg if test "x$PERL" != "x"; then 982374c14cd6Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 982474c14cd6Smrg fi 982574c14cd6Smrg have_perl=no 982674c14cd6Smrgelse 982774c14cd6Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 982874c14cd6Smrgfi 982974c14cd6Smrg 983074c14cd6SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 983174c14cd6Smrg]) # XORG_WITH_PERL 983274c14cd6Smrg 983374c14cd6Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9834e35772b2Smrg# ---------------- 9835e35772b2Smrg# Minimum version: 1.5.0 983674c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9837e35772b2Smrg# 9838e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9839e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9840e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9841e35772b2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 984274c14cd6Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 984374c14cd6Smrg# --with-asciidoc assumes 'auto'. 9844e35772b2Smrg# 9845e35772b2Smrg# Interface to module: 9846e35772b2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9847e35772b2Smrg# ASCIIDOC: returns the path of the asciidoc program found 9848e35772b2Smrg# returns the path set by the user in the environment 9849e35772b2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9850e35772b2Smrg# 'no' user instructs the module not to use asciidoc 9851e35772b2Smrg# 9852e35772b2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9853e35772b2Smrg# 9854e35772b2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9855e35772b2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 985674c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9857e35772b2SmrgAC_ARG_WITH(asciidoc, 9858e35772b2Smrg AS_HELP_STRING([--with-asciidoc], 985974c14cd6Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 986074c14cd6Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 986174c14cd6Smrgm4_undefine([_defopt]) 9862e35772b2Smrg 9863e35772b2Smrgif test "x$use_asciidoc" = x"auto"; then 9864e35772b2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9865e35772b2Smrg if test "x$ASCIIDOC" = "x"; then 9866e35772b2Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9867e35772b2Smrg have_asciidoc=no 9868e35772b2Smrg else 9869e35772b2Smrg have_asciidoc=yes 9870e35772b2Smrg fi 9871e35772b2Smrgelif test "x$use_asciidoc" = x"yes" ; then 9872e35772b2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9873e35772b2Smrg if test "x$ASCIIDOC" = "x"; then 9874e35772b2Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9875e35772b2Smrg fi 9876e35772b2Smrg have_asciidoc=yes 9877e35772b2Smrgelif test "x$use_asciidoc" = x"no" ; then 9878e35772b2Smrg if test "x$ASCIIDOC" != "x"; then 9879e35772b2Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9880e35772b2Smrg fi 9881e35772b2Smrg have_asciidoc=no 9882e35772b2Smrgelse 9883e35772b2Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9884e35772b2Smrgfi 9885e35772b2Smrgm4_ifval([$1], 9886e35772b2Smrg[if test "$have_asciidoc" = yes; then 9887e35772b2Smrg # scrape the asciidoc version 9888e35772b2Smrg AC_MSG_CHECKING([the asciidoc version]) 9889e35772b2Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9890e35772b2Smrg AC_MSG_RESULT([$asciidoc_version]) 9891e35772b2Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9892e35772b2Smrg [if test "x$use_asciidoc" = xauto; then 9893e35772b2Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9894e35772b2Smrg have_asciidoc=no 9895e35772b2Smrg else 9896e35772b2Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9897e35772b2Smrg fi]) 9898e35772b2Smrgfi]) 9899e35772b2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9900e35772b2Smrg]) # XORG_WITH_ASCIIDOC 9901e35772b2Smrg 990274c14cd6Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 990321525869Smrg# ------------------------------------------- 9904e35772b2Smrg# Minimum version: 1.5.0 990574c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 990621525869Smrg# Minimum version for optional DOT checking: 1.18.0 9907e35772b2Smrg# 9908e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9909e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9910e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9911e35772b2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 991274c14cd6Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 991374c14cd6Smrg# --with-doxygen assumes 'auto'. 9914e35772b2Smrg# 9915e35772b2Smrg# Interface to module: 9916e35772b2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9917e35772b2Smrg# DOXYGEN: returns the path of the doxygen program found 9918e35772b2Smrg# returns the path set by the user in the environment 9919e35772b2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9920e35772b2Smrg# 'no' user instructs the module not to use doxygen 9921e35772b2Smrg# 9922e35772b2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 9923e35772b2Smrg# 9924e35772b2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 9925e35772b2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 992621525869SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 992774c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9928e35772b2SmrgAC_ARG_WITH(doxygen, 9929e35772b2Smrg AS_HELP_STRING([--with-doxygen], 993074c14cd6Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 993174c14cd6Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 993274c14cd6Smrgm4_undefine([_defopt]) 9933e35772b2Smrg 9934e35772b2Smrgif test "x$use_doxygen" = x"auto"; then 9935e35772b2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9936e35772b2Smrg if test "x$DOXYGEN" = "x"; then 9937e35772b2Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 9938e35772b2Smrg have_doxygen=no 9939e35772b2Smrg else 9940e35772b2Smrg have_doxygen=yes 9941e35772b2Smrg fi 9942e35772b2Smrgelif test "x$use_doxygen" = x"yes" ; then 9943e35772b2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 9944e35772b2Smrg if test "x$DOXYGEN" = "x"; then 9945e35772b2Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 9946e35772b2Smrg fi 9947e35772b2Smrg have_doxygen=yes 9948e35772b2Smrgelif test "x$use_doxygen" = x"no" ; then 9949e35772b2Smrg if test "x$DOXYGEN" != "x"; then 9950e35772b2Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 9951e35772b2Smrg fi 9952e35772b2Smrg have_doxygen=no 9953e35772b2Smrgelse 9954e35772b2Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 9955e35772b2Smrgfi 9956e35772b2Smrgm4_ifval([$1], 9957e35772b2Smrg[if test "$have_doxygen" = yes; then 9958e35772b2Smrg # scrape the doxygen version 9959e35772b2Smrg AC_MSG_CHECKING([the doxygen version]) 9960e35772b2Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 9961e35772b2Smrg AC_MSG_RESULT([$doxygen_version]) 9962e35772b2Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 9963e35772b2Smrg [if test "x$use_doxygen" = xauto; then 9964e35772b2Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 9965e35772b2Smrg have_doxygen=no 9966e35772b2Smrg else 9967e35772b2Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 9968e35772b2Smrg fi]) 9969e35772b2Smrgfi]) 997021525869Smrg 997121525869Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 997221525869Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 997321525869Smrgdnl HAVE_DOT = @HAVE_DOT@ 997421525869SmrgHAVE_DOT=no 997521525869Smrgif test "x$have_doxygen" = "xyes"; then 997621525869Smrg AC_PATH_PROG([DOT], [dot]) 997721525869Smrg if test "x$DOT" != "x"; then 997821525869Smrg HAVE_DOT=yes 997921525869Smrg fi 998021525869Smrgfi 998121525869Smrg 998221525869SmrgAC_SUBST([HAVE_DOT]) 998321525869SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 9984e35772b2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 9985e35772b2Smrg]) # XORG_WITH_DOXYGEN 9986e35772b2Smrg 998774c14cd6Smrg# XORG_WITH_GROFF([DEFAULT]) 9988e35772b2Smrg# ---------------- 9989e35772b2Smrg# Minimum version: 1.6.0 999074c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9991e35772b2Smrg# 9992e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9993e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9994e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9995e35772b2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 999674c14cd6Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 999774c14cd6Smrg# --with-groff assumes 'auto'. 9998e35772b2Smrg# 9999e35772b2Smrg# Interface to module: 10000e35772b2Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10001e35772b2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10002e35772b2Smrg# HAVE_GROFF_MS: the -ms macros package 10003e35772b2Smrg# GROFF: returns the path of the groff program found 10004e35772b2Smrg# returns the path set by the user in the environment 10005e35772b2Smrg# --with-groff: 'yes' user instructs the module to use groff 10006e35772b2Smrg# 'no' user instructs the module not to use groff 10007e35772b2Smrg# 1000874c14cd6Smrg# Added in version 1.9.0: 1000974c14cd6Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1001074c14cd6Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1001174c14cd6Smrg# psselect from the psutils package. 1001274c14cd6Smrg# the ghostcript package. Refer to the grohtml man pages 1001374c14cd6Smrg# 10014e35772b2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10015e35772b2Smrg# 10016e35772b2Smrg# OS and distros often splits groff in a basic and full package, the former 10017e35772b2Smrg# having the groff program and the later having devices, fonts and macros 10018e35772b2Smrg# Checking for the groff executable is not enough. 10019e35772b2Smrg# 10020e35772b2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10021e35772b2Smrg# unset HAVE_GROFF or GROFF env variables. 10022e35772b2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10023e35772b2Smrg# 10024e35772b2SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10025e35772b2SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1002674c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 10027e35772b2SmrgAC_ARG_WITH(groff, 10028e35772b2Smrg AS_HELP_STRING([--with-groff], 1002974c14cd6Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1003074c14cd6Smrg [use_groff=$withval], [use_groff=]_defopt) 1003174c14cd6Smrgm4_undefine([_defopt]) 10032e35772b2Smrg 10033e35772b2Smrgif test "x$use_groff" = x"auto"; then 10034e35772b2Smrg AC_PATH_PROG([GROFF], [groff]) 10035e35772b2Smrg if test "x$GROFF" = "x"; then 10036e35772b2Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10037e35772b2Smrg have_groff=no 10038e35772b2Smrg else 10039e35772b2Smrg have_groff=yes 10040e35772b2Smrg fi 10041e35772b2Smrgelif test "x$use_groff" = x"yes" ; then 10042e35772b2Smrg AC_PATH_PROG([GROFF], [groff]) 10043e35772b2Smrg if test "x$GROFF" = "x"; then 10044e35772b2Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10045e35772b2Smrg fi 10046e35772b2Smrg have_groff=yes 10047e35772b2Smrgelif test "x$use_groff" = x"no" ; then 10048e35772b2Smrg if test "x$GROFF" != "x"; then 10049e35772b2Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10050e35772b2Smrg fi 10051e35772b2Smrg have_groff=no 10052e35772b2Smrgelse 10053e35772b2Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10054e35772b2Smrgfi 1005574c14cd6Smrg 10056e35772b2Smrg# We have groff, test for the presence of the macro packages 10057e35772b2Smrgif test "x$have_groff" = x"yes"; then 10058e35772b2Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10059e35772b2Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10060e35772b2Smrg groff_ms_works=yes 10061e35772b2Smrg else 10062e35772b2Smrg groff_ms_works=no 10063e35772b2Smrg fi 10064e35772b2Smrg AC_MSG_RESULT([$groff_ms_works]) 10065e35772b2Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10066e35772b2Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10067e35772b2Smrg groff_mm_works=yes 10068e35772b2Smrg else 10069e35772b2Smrg groff_mm_works=no 10070e35772b2Smrg fi 10071e35772b2Smrg AC_MSG_RESULT([$groff_mm_works]) 10072e35772b2Smrgfi 1007374c14cd6Smrg 1007474c14cd6Smrg# We have groff, test for HTML dependencies, one command per package 1007574c14cd6Smrgif test "x$have_groff" = x"yes"; then 1007674c14cd6Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1007774c14cd6Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1007874c14cd6Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1007974c14cd6Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1008074c14cd6Smrg have_groff_html=yes 1008174c14cd6Smrg else 1008274c14cd6Smrg have_groff_html=no 1008374c14cd6Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1008474c14cd6Smrg fi 1008574c14cd6Smrgfi 1008674c14cd6Smrg 1008774c14cd6Smrg# Set Automake conditionals for Makefiles 10088e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10089e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10090e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1009174c14cd6SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10092e35772b2Smrg]) # XORG_WITH_GROFF 10093e35772b2Smrg 1009474c14cd6Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1009574c14cd6Smrg# --------------------------------------- 10096e35772b2Smrg# Minimum version: 1.6.0 1009774c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1009874c14cd6Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10099e35772b2Smrg# 10100e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 10101e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 10102e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10103e35772b2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1010474c14cd6Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1010574c14cd6Smrg# --with-fop assumes 'auto'. 10106e35772b2Smrg# 10107e35772b2Smrg# Interface to module: 10108e35772b2Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10109e35772b2Smrg# FOP: returns the path of the fop program found 10110e35772b2Smrg# returns the path set by the user in the environment 10111e35772b2Smrg# --with-fop: 'yes' user instructs the module to use fop 10112e35772b2Smrg# 'no' user instructs the module not to use fop 10113e35772b2Smrg# 10114e35772b2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10115e35772b2Smrg# 10116e35772b2SmrgAC_DEFUN([XORG_WITH_FOP],[ 10117e35772b2SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1011874c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 10119e35772b2SmrgAC_ARG_WITH(fop, 10120e35772b2Smrg AS_HELP_STRING([--with-fop], 1012174c14cd6Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1012274c14cd6Smrg [use_fop=$withval], [use_fop=]_defopt) 1012374c14cd6Smrgm4_undefine([_defopt]) 10124e35772b2Smrg 10125e35772b2Smrgif test "x$use_fop" = x"auto"; then 10126e35772b2Smrg AC_PATH_PROG([FOP], [fop]) 10127e35772b2Smrg if test "x$FOP" = "x"; then 10128e35772b2Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10129e35772b2Smrg have_fop=no 10130e35772b2Smrg else 10131e35772b2Smrg have_fop=yes 10132e35772b2Smrg fi 10133e35772b2Smrgelif test "x$use_fop" = x"yes" ; then 10134e35772b2Smrg AC_PATH_PROG([FOP], [fop]) 10135e35772b2Smrg if test "x$FOP" = "x"; then 10136e35772b2Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10137e35772b2Smrg fi 10138e35772b2Smrg have_fop=yes 10139e35772b2Smrgelif test "x$use_fop" = x"no" ; then 10140e35772b2Smrg if test "x$FOP" != "x"; then 10141e35772b2Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10142e35772b2Smrg fi 10143e35772b2Smrg have_fop=no 10144e35772b2Smrgelse 10145e35772b2Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10146e35772b2Smrgfi 1014774c14cd6Smrg 1014874c14cd6Smrg# Test for a minimum version of fop, if provided. 1014974c14cd6Smrgm4_ifval([$1], 1015074c14cd6Smrg[if test "$have_fop" = yes; then 1015174c14cd6Smrg # scrape the fop version 1015274c14cd6Smrg AC_MSG_CHECKING([for fop minimum version]) 1015374c14cd6Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1015474c14cd6Smrg AC_MSG_RESULT([$fop_version]) 1015574c14cd6Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1015674c14cd6Smrg [if test "x$use_fop" = xauto; then 1015774c14cd6Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1015874c14cd6Smrg have_fop=no 1015974c14cd6Smrg else 1016074c14cd6Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1016174c14cd6Smrg fi]) 1016274c14cd6Smrgfi]) 10163e35772b2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10164e35772b2Smrg]) # XORG_WITH_FOP 10165e35772b2Smrg 1016621525869Smrg# XORG_WITH_M4([MIN-VERSION]) 1016721525869Smrg# --------------------------- 1016821525869Smrg# Minimum version: 1.19.0 1016921525869Smrg# 1017021525869Smrg# This macro attempts to locate an m4 macro processor which supports 1017121525869Smrg# -I option and is only useful for modules relying on M4 in order to 1017221525869Smrg# expand macros in source code files. 1017321525869Smrg# 1017421525869Smrg# Interface to module: 1017521525869Smrg# M4: returns the path of the m4 program found 1017621525869Smrg# returns the path set by the user in the environment 1017721525869Smrg# 1017821525869SmrgAC_DEFUN([XORG_WITH_M4], [ 1017921525869SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 1018021525869Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 1018121525869Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 1018221525869Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 1018321525869Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 1018421525869Smrg [$PATH:/usr/gnu/bin])]) 1018521525869Smrg 1018621525869SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 1018721525869Smrg]) # XORG_WITH_M4 1018821525869Smrg 1018974c14cd6Smrg# XORG_WITH_PS2PDF([DEFAULT]) 10190e35772b2Smrg# ---------------- 10191e35772b2Smrg# Minimum version: 1.6.0 1019274c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10193e35772b2Smrg# 10194e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 10195e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 10196e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10197e35772b2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1019874c14cd6Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1019974c14cd6Smrg# --with-ps2pdf assumes 'auto'. 10200e35772b2Smrg# 10201e35772b2Smrg# Interface to module: 10202e35772b2Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10203e35772b2Smrg# PS2PDF: returns the path of the ps2pdf program found 10204e35772b2Smrg# returns the path set by the user in the environment 10205e35772b2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10206e35772b2Smrg# 'no' user instructs the module not to use ps2pdf 10207e35772b2Smrg# 10208e35772b2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10209e35772b2Smrg# 10210e35772b2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10211e35772b2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1021274c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 10213e35772b2SmrgAC_ARG_WITH(ps2pdf, 10214e35772b2Smrg AS_HELP_STRING([--with-ps2pdf], 1021574c14cd6Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1021674c14cd6Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1021774c14cd6Smrgm4_undefine([_defopt]) 10218e35772b2Smrg 10219e35772b2Smrgif test "x$use_ps2pdf" = x"auto"; then 10220e35772b2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10221e35772b2Smrg if test "x$PS2PDF" = "x"; then 10222e35772b2Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10223e35772b2Smrg have_ps2pdf=no 10224e35772b2Smrg else 10225e35772b2Smrg have_ps2pdf=yes 10226e35772b2Smrg fi 10227e35772b2Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10228e35772b2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10229e35772b2Smrg if test "x$PS2PDF" = "x"; then 10230e35772b2Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10231e35772b2Smrg fi 10232e35772b2Smrg have_ps2pdf=yes 10233e35772b2Smrgelif test "x$use_ps2pdf" = x"no" ; then 10234e35772b2Smrg if test "x$PS2PDF" != "x"; then 10235e35772b2Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10236e35772b2Smrg fi 10237e35772b2Smrg have_ps2pdf=no 10238e35772b2Smrgelse 10239e35772b2Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10240e35772b2Smrgfi 10241e35772b2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10242e35772b2Smrg]) # XORG_WITH_PS2PDF 10243e35772b2Smrg 10244e35772b2Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10245e35772b2Smrg# ---------------- 10246e35772b2Smrg# Minimum version: 1.6.0 10247e35772b2Smrg# 10248e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 10249e35772b2Smrg# not at the appropriate level. This macro enables a builder to skip all 10250e35772b2Smrg# documentation targets except traditional man pages. 10251e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10252e35772b2Smrg# maximum flexibilty in controlling documentation building. 10253e35772b2Smrg# Refer to: 10254e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 10255e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10256e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 10257e35772b2Smrg# XORG_WITH_FOP --with-fop 10258e35772b2Smrg# XORG_WITH_GROFF --with-groff 10259e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10260e35772b2Smrg# 10261e35772b2Smrg# Interface to module: 10262e35772b2Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10263e35772b2Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10264e35772b2Smrg# 'no' user instructs the module not to generate docs 10265e35772b2Smrg# parm1: specify the default value, yes or no. 10266e35772b2Smrg# 10267e35772b2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1026874c14cd6Smrgm4_define([docs_default], m4_default([$1], [yes])) 10269e35772b2SmrgAC_ARG_ENABLE(docs, 10270e35772b2Smrg AS_HELP_STRING([--enable-docs], 1027174c14cd6Smrg [Enable building the documentation (default: ]docs_default[)]), 1027274c14cd6Smrg [build_docs=$enableval], [build_docs=]docs_default) 1027374c14cd6Smrgm4_undefine([docs_default]) 10274e35772b2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10275e35772b2SmrgAC_MSG_CHECKING([whether to build documentation]) 10276e35772b2SmrgAC_MSG_RESULT([$build_docs]) 10277e35772b2Smrg]) # XORG_ENABLE_DOCS 10278e35772b2Smrg 10279e35772b2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10280e35772b2Smrg# ---------------- 10281e35772b2Smrg# Minimum version: 1.6.0 10282e35772b2Smrg# 10283e35772b2Smrg# This macro enables a builder to skip all developer documentation. 10284e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10285e35772b2Smrg# maximum flexibilty in controlling documentation building. 10286e35772b2Smrg# Refer to: 10287e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 10288e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10289e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 10290e35772b2Smrg# XORG_WITH_FOP --with-fop 10291e35772b2Smrg# XORG_WITH_GROFF --with-groff 10292e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10293e35772b2Smrg# 10294e35772b2Smrg# Interface to module: 10295e35772b2Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10296e35772b2Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10297e35772b2Smrg# 'no' user instructs the module not to generate developer docs 10298e35772b2Smrg# parm1: specify the default value, yes or no. 10299e35772b2Smrg# 10300e35772b2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1030174c14cd6Smrgm4_define([devel_default], m4_default([$1], [yes])) 10302e35772b2SmrgAC_ARG_ENABLE(devel-docs, 10303e35772b2Smrg AS_HELP_STRING([--enable-devel-docs], 1030474c14cd6Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1030574c14cd6Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1030674c14cd6Smrgm4_undefine([devel_default]) 10307e35772b2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10308e35772b2SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10309e35772b2SmrgAC_MSG_RESULT([$build_devel_docs]) 10310e35772b2Smrg]) # XORG_ENABLE_DEVEL_DOCS 10311e35772b2Smrg 10312e35772b2Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10313e35772b2Smrg# ---------------- 10314e35772b2Smrg# Minimum version: 1.6.0 10315e35772b2Smrg# 10316e35772b2Smrg# This macro enables a builder to skip all functional specification targets. 10317e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10318e35772b2Smrg# maximum flexibilty in controlling documentation building. 10319e35772b2Smrg# Refer to: 10320e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 10321e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10322e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 10323e35772b2Smrg# XORG_WITH_FOP --with-fop 10324e35772b2Smrg# XORG_WITH_GROFF --with-groff 10325e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10326e35772b2Smrg# 10327e35772b2Smrg# Interface to module: 10328e35772b2Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10329e35772b2Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10330e35772b2Smrg# 'no' user instructs the module not to generate specs 10331e35772b2Smrg# parm1: specify the default value, yes or no. 10332e35772b2Smrg# 10333e35772b2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1033474c14cd6Smrgm4_define([spec_default], m4_default([$1], [yes])) 10335e35772b2SmrgAC_ARG_ENABLE(specs, 10336e35772b2Smrg AS_HELP_STRING([--enable-specs], 1033774c14cd6Smrg [Enable building the specs (default: ]spec_default[)]), 1033874c14cd6Smrg [build_specs=$enableval], [build_specs=]spec_default) 1033974c14cd6Smrgm4_undefine([spec_default]) 10340e35772b2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10341e35772b2SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10342e35772b2SmrgAC_MSG_RESULT([$build_specs]) 10343e35772b2Smrg]) # XORG_ENABLE_SPECS 10344e35772b2Smrg 1034574c14cd6Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1034674c14cd6Smrg# ---------------------------------------------- 1034774c14cd6Smrg# Minimum version: 1.13.0 1034874c14cd6Smrg# 1034974c14cd6Smrg# This macro enables a builder to enable/disable unit testing 1035074c14cd6Smrg# It makes no assumption about the test cases implementation 1035174c14cd6Smrg# Test cases may or may not use Automake "Support for test suites" 1035274c14cd6Smrg# They may or may not use the software utility library GLib 1035374c14cd6Smrg# 1035474c14cd6Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1035574c14cd6Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1035674c14cd6Smrg# The variable enable_unit_tests is used by other macros in this file. 1035774c14cd6Smrg# 1035874c14cd6Smrg# Interface to module: 1035974c14cd6Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1036074c14cd6Smrg# enable_unit_tests: used in configure.ac for additional configuration 1036174c14cd6Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1036274c14cd6Smrg# 'no' user instructs the module not to build tests 1036374c14cd6Smrg# parm1: specify the default value, yes or no. 1036474c14cd6Smrg# 1036574c14cd6SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1036674c14cd6SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1036774c14cd6SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1036874c14cd6SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1036974c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 1037074c14cd6SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1037174c14cd6Smrg [Enable building unit test cases (default: ]_defopt[)]), 1037274c14cd6Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1037374c14cd6Smrgm4_undefine([_defopt]) 1037474c14cd6SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1037574c14cd6SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1037674c14cd6SmrgAC_MSG_RESULT([$enable_unit_tests]) 1037774c14cd6Smrg]) # XORG_ENABLE_UNIT_TESTS 1037874c14cd6Smrg 1037974c14cd6Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1038074c14cd6Smrg# ------------------------------------------------------ 1038174c14cd6Smrg# Minimum version: 1.17.0 1038274c14cd6Smrg# 1038374c14cd6Smrg# This macro enables a builder to enable/disable integration testing 1038474c14cd6Smrg# It makes no assumption about the test cases' implementation 1038574c14cd6Smrg# Test cases may or may not use Automake "Support for test suites" 1038674c14cd6Smrg# 1038774c14cd6Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1038874c14cd6Smrg# usually requires less dependencies and may be built and run under less 1038974c14cd6Smrg# stringent environments than integration tests. 1039074c14cd6Smrg# 1039174c14cd6Smrg# Interface to module: 1039274c14cd6Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1039374c14cd6Smrg# enable_integration_tests: used in configure.ac for additional configuration 1039474c14cd6Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1039574c14cd6Smrg# 'no' user instructs the module not to build tests 1039674c14cd6Smrg# parm1: specify the default value, yes or no. 1039774c14cd6Smrg# 1039874c14cd6SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1039974c14cd6SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1040074c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 1040174c14cd6SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1040274c14cd6Smrg [Enable building integration test cases (default: ]_defopt[)]), 1040374c14cd6Smrg [enable_integration_tests=$enableval], 1040474c14cd6Smrg [enable_integration_tests=]_defopt) 1040574c14cd6Smrgm4_undefine([_defopt]) 1040674c14cd6SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1040774c14cd6Smrg [test "x$enable_integration_tests" != xno]) 1040874c14cd6SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1040974c14cd6SmrgAC_MSG_RESULT([$enable_integration_tests]) 1041074c14cd6Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 1041174c14cd6Smrg 1041274c14cd6Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1041374c14cd6Smrg# ---------------------------------------- 1041474c14cd6Smrg# Minimum version: 1.13.0 1041574c14cd6Smrg# 1041674c14cd6Smrg# GLib is a library which provides advanced data structures and functions. 1041774c14cd6Smrg# This macro enables a module to test for the presence of Glib. 1041874c14cd6Smrg# 1041974c14cd6Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1042074c14cd6Smrg# Otherwise the value of $enable_unit_tests is blank. 1042174c14cd6Smrg# 1042274c14cd6Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1042374c14cd6Smrg# test support usually requires less dependencies and may be built and run under 1042474c14cd6Smrg# less stringent environments than integration tests. 1042574c14cd6Smrg# 1042674c14cd6Smrg# Interface to module: 1042774c14cd6Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1042874c14cd6Smrg# with_glib: used in configure.ac to know if GLib has been found 1042974c14cd6Smrg# --with-glib: 'yes' user instructs the module to use glib 1043074c14cd6Smrg# 'no' user instructs the module not to use glib 1043174c14cd6Smrg# 1043274c14cd6SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1043374c14cd6SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1043474c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 1043574c14cd6SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1043674c14cd6Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1043774c14cd6Smrg [with_glib=$withval], [with_glib=]_defopt) 1043874c14cd6Smrgm4_undefine([_defopt]) 1043974c14cd6Smrg 1044074c14cd6Smrghave_glib=no 1044174c14cd6Smrg# Do not probe GLib if user explicitly disabled unit testing 1044274c14cd6Smrgif test "x$enable_unit_tests" != x"no"; then 1044374c14cd6Smrg # Do not probe GLib if user explicitly disabled it 1044474c14cd6Smrg if test "x$with_glib" != x"no"; then 1044574c14cd6Smrg m4_ifval( 1044674c14cd6Smrg [$1], 1044774c14cd6Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1044874c14cd6Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1044974c14cd6Smrg ) 1045074c14cd6Smrg fi 1045174c14cd6Smrgfi 1045274c14cd6Smrg 1045374c14cd6Smrg# Not having GLib when unit testing has been explicitly requested is an error 1045474c14cd6Smrgif test "x$enable_unit_tests" = x"yes"; then 1045574c14cd6Smrg if test "x$have_glib" = x"no"; then 1045674c14cd6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1045774c14cd6Smrg fi 1045874c14cd6Smrgfi 1045974c14cd6Smrg 1046074c14cd6Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1046174c14cd6Smrgif test "x$enable_unit_tests" = x"no"; then 1046274c14cd6Smrg if test "x$with_glib" = x"yes"; then 1046374c14cd6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1046474c14cd6Smrg fi 1046574c14cd6Smrgfi 1046674c14cd6Smrg 1046774c14cd6Smrg# Not having GLib when it has been explicitly requested is an error 1046874c14cd6Smrgif test "x$with_glib" = x"yes"; then 1046974c14cd6Smrg if test "x$have_glib" = x"no"; then 1047074c14cd6Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1047174c14cd6Smrg fi 1047274c14cd6Smrgfi 1047374c14cd6Smrg 1047474c14cd6SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1047574c14cd6Smrg]) # XORG_WITH_GLIB 1047674c14cd6Smrg 1047774c14cd6Smrg# XORG_LD_WRAP([required|optional]) 1047874c14cd6Smrg# --------------------------------- 1047974c14cd6Smrg# Minimum version: 1.13.0 1048074c14cd6Smrg# 1048174c14cd6Smrg# Check if linker supports -wrap, passed via compiler flags 1048274c14cd6Smrg# 1048374c14cd6Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1048474c14cd6Smrg# Otherwise the value of $enable_unit_tests is blank. 1048574c14cd6Smrg# 1048674c14cd6Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1048774c14cd6Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1048874c14cd6Smrg# available, an argument of "optional" allows use when some unit tests require 1048974c14cd6Smrg# ld -wrap and others do not. 1049074c14cd6Smrg# 1049174c14cd6SmrgAC_DEFUN([XORG_LD_WRAP],[ 1049274c14cd6SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1049374c14cd6Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1049474c14cd6Smrg void __wrap_exit(int status) { return; }], 1049574c14cd6Smrg [exit(0);])]) 1049674c14cd6Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1049774c14cd6Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1049874c14cd6Smrg if test "x$have_ld_wrap" = x"no"; then 1049974c14cd6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1050074c14cd6Smrg fi 1050174c14cd6Smrgfi 1050274c14cd6SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1050374c14cd6Smrg# 1050474c14cd6Smrg]) # XORG_LD_WRAP 1050574c14cd6Smrg 1050674c14cd6Smrg# XORG_CHECK_LINKER_FLAGS 1050774c14cd6Smrg# ----------------------- 1050874c14cd6Smrg# SYNOPSIS 1050974c14cd6Smrg# 1051074c14cd6Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1051174c14cd6Smrg# 1051274c14cd6Smrg# DESCRIPTION 1051374c14cd6Smrg# 1051474c14cd6Smrg# Check whether the given linker FLAGS work with the current language's 1051574c14cd6Smrg# linker, or whether they give an error. 1051674c14cd6Smrg# 1051774c14cd6Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1051874c14cd6Smrg# success/failure. 1051974c14cd6Smrg# 1052074c14cd6Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1052174c14cd6Smrg# 1052274c14cd6Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1052374c14cd6Smrg# 1052474c14cd6Smrg# LICENSE 1052574c14cd6Smrg# 1052674c14cd6Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1052774c14cd6Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1052874c14cd6Smrg# Copyright (c) 2009 Matteo Frigo 1052974c14cd6Smrg# 1053074c14cd6Smrg# This program is free software: you can redistribute it and/or modify it 1053174c14cd6Smrg# under the terms of the GNU General Public License as published by the 1053274c14cd6Smrg# Free Software Foundation, either version 3 of the License, or (at your 1053374c14cd6Smrg# option) any later version. 1053474c14cd6Smrg# 1053574c14cd6Smrg# This program is distributed in the hope that it will be useful, but 1053674c14cd6Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1053774c14cd6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1053874c14cd6Smrg# Public License for more details. 1053974c14cd6Smrg# 1054074c14cd6Smrg# You should have received a copy of the GNU General Public License along 1054174c14cd6Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1054274c14cd6Smrg# 1054374c14cd6Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1054474c14cd6Smrg# gives unlimited permission to copy, distribute and modify the configure 1054574c14cd6Smrg# scripts that are the output of Autoconf when processing the Macro. You 1054674c14cd6Smrg# need not follow the terms of the GNU General Public License when using 1054774c14cd6Smrg# or distributing such scripts, even though portions of the text of the 1054874c14cd6Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1054974c14cd6Smrg# all other use of the material that constitutes the Autoconf Macro. 1055074c14cd6Smrg# 1055174c14cd6Smrg# This special exception to the GPL applies to versions of the Autoconf 1055274c14cd6Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1055374c14cd6Smrg# modified version of the Autoconf Macro, you may extend this special 1055474c14cd6Smrg# exception to the GPL to apply to your modified version as well.# 1055574c14cd6SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1055674c14cd6Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1055774c14cd6Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1055874c14cd6SmrgAS_LITERAL_IF([$1], 1055974c14cd6Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1056074c14cd6Smrg ax_save_FLAGS=$LDFLAGS 1056174c14cd6Smrg LDFLAGS="$1" 1056274c14cd6Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1056374c14cd6Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1056474c14cd6Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1056574c14cd6Smrg LDFLAGS=$ax_save_FLAGS])], 1056674c14cd6Smrg [ax_save_FLAGS=$LDFLAGS 1056774c14cd6Smrg LDFLAGS="$1" 1056874c14cd6Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1056974c14cd6Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1057074c14cd6Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1057174c14cd6Smrg LDFLAGS=$ax_save_FLAGS]) 1057274c14cd6Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1057374c14cd6SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1057474c14cd6Smrgif test "x$xorg_check_linker_flags" = xyes; then 1057574c14cd6Smrg m4_default([$2], :) 1057674c14cd6Smrgelse 1057774c14cd6Smrg m4_default([$3], :) 1057874c14cd6Smrgfi 1057974c14cd6Smrg]) # XORG_CHECK_LINKER_FLAGS 1058074c14cd6Smrg 1058174c14cd6Smrg# XORG_MEMORY_CHECK_FLAGS 1058274c14cd6Smrg# ----------------------- 1058374c14cd6Smrg# Minimum version: 1.16.0 1058474c14cd6Smrg# 1058574c14cd6Smrg# This macro attempts to find appropriate memory checking functionality 1058674c14cd6Smrg# for various platforms which unit testing code may use to catch various 1058774c14cd6Smrg# forms of memory allocation and access errors in testing. 1058874c14cd6Smrg# 1058974c14cd6Smrg# Interface to module: 1059074c14cd6Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1059174c14cd6Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1059274c14cd6Smrg# 1059374c14cd6Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1059474c14cd6Smrg# 1059574c14cd6SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1059674c14cd6Smrg 1059774c14cd6SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1059874c14cd6SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1059974c14cd6Smrg [Environment variables to enable memory checking in tests]) 1060074c14cd6Smrg 1060174c14cd6Smrg# Check for different types of support on different platforms 1060274c14cd6Smrgcase $host_os in 1060374c14cd6Smrg solaris*) 1060474c14cd6Smrg AC_CHECK_LIB([umem], [umem_alloc], 1060574c14cd6Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1060674c14cd6Smrg ;; 1060774c14cd6Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1060874c14cd6Smrg # both directly and inverted, so should not be 0 or 255. 1060974c14cd6Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1061074c14cd6Smrg ;; 1061174c14cd6Smrg darwin*) 1061274c14cd6Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1061374c14cd6Smrg ;; 1061474c14cd6Smrg *bsd*) 1061574c14cd6Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1061674c14cd6Smrg ;; 1061774c14cd6Smrgesac 1061874c14cd6Smrg 1061974c14cd6Smrg# User supplied flags override default flags 1062074c14cd6Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1062174c14cd6Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1062274c14cd6Smrgfi 1062374c14cd6Smrg 1062474c14cd6SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1062574c14cd6Smrg]) # XORG_WITH_LINT 1062674c14cd6Smrg 1062772b676d7Smrg# XORG_CHECK_MALLOC_ZERO 1062872b676d7Smrg# ---------------------- 1062972b676d7Smrg# Minimum version: 1.0.0 1063072b676d7Smrg# 1063172b676d7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1063272b676d7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1063372b676d7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1063472b676d7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1063572b676d7SmrgAC_ARG_ENABLE(malloc0returnsnull, 10636e35772b2Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1063772b676d7Smrg [malloc(0) returns NULL (default: auto)]), 1063872b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1063972b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1064072b676d7Smrg 1064172b676d7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1064272b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1064321525869SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 1064421525869Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1064574c14cd6Smrg#include <stdlib.h> 1064674c14cd6Smrg],[ 1064772b676d7Smrg char *m0, *r0, *c0, *p; 1064872b676d7Smrg m0 = malloc(0); 1064972b676d7Smrg p = malloc(10); 1065072b676d7Smrg r0 = realloc(p,0); 1065174c14cd6Smrg c0 = calloc(0,10); 1065274c14cd6Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1065374c14cd6Smrg])], 1065421525869Smrg [xorg_cv_malloc0_returns_null=yes], 1065521525869Smrg [xorg_cv_malloc0_returns_null=no])]) 1065621525869SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 1065772b676d7Smrgfi 1065872b676d7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1065972b676d7Smrg 1066072b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1066172b676d7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1066272b676d7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1066372b676d7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1066472b676d7Smrgelse 1066572b676d7Smrg MALLOC_ZERO_CFLAGS="" 1066672b676d7Smrg XMALLOC_ZERO_CFLAGS="" 1066772b676d7Smrg XTMALLOC_ZERO_CFLAGS="" 1066872b676d7Smrgfi 1066972b676d7Smrg 1067072b676d7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1067172b676d7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1067272b676d7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1067372b676d7Smrg]) # XORG_CHECK_MALLOC_ZERO 1067472b676d7Smrg 1067572b676d7Smrg# XORG_WITH_LINT() 1067672b676d7Smrg# ---------------- 1067772b676d7Smrg# Minimum version: 1.1.0 1067872b676d7Smrg# 10679e35772b2Smrg# This macro enables the use of a tool that flags some suspicious and 10680e35772b2Smrg# non-portable constructs (likely to be bugs) in C language source code. 10681e35772b2Smrg# It will attempt to locate the tool and use appropriate options. 10682e35772b2Smrg# There are various lint type tools on different platforms. 10683e35772b2Smrg# 10684e35772b2Smrg# Interface to module: 10685e35772b2Smrg# LINT: returns the path to the tool found on the platform 10686e35772b2Smrg# or the value set to LINT on the configure cmd line 10687e35772b2Smrg# also an Automake conditional 10688e35772b2Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10689e35772b2Smrg# 10690e35772b2Smrg# --with-lint: 'yes' user instructs the module to use lint 10691e35772b2Smrg# 'no' user instructs the module not to use lint (default) 10692e35772b2Smrg# 10693e35772b2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10694e35772b2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1069572b676d7Smrg# 1069672b676d7SmrgAC_DEFUN([XORG_WITH_LINT],[ 1069772b676d7Smrg 10698e35772b2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10699e35772b2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10700e35772b2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1070172b676d7Smrg [Use a lint-style source code checker (default: disabled)])], 1070272b676d7Smrg [use_lint=$withval], [use_lint=no]) 10703e35772b2Smrg 10704e35772b2Smrg# Obtain platform specific info like program name and options 10705e35772b2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10706e35772b2Smrgcase $host_os in 10707e35772b2Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10708e35772b2Smrg lint_name=splint 10709e35772b2Smrg lint_options="-badflag" 10710e35772b2Smrg ;; 10711e35772b2Smrg *freebsd* | *netbsd*) 10712e35772b2Smrg lint_name=lint 10713e35772b2Smrg lint_options="-u -b" 10714e35772b2Smrg ;; 10715e35772b2Smrg *solaris*) 10716e35772b2Smrg lint_name=lint 10717e35772b2Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10718e35772b2Smrg ;; 10719e35772b2Smrgesac 10720e35772b2Smrg 10721e35772b2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10722e35772b2Smrgif test "x$use_lint" = x"yes" ; then 10723e35772b2Smrg AC_PATH_PROG([LINT], [$lint_name]) 10724e35772b2Smrg if test "x$LINT" = "x"; then 10725e35772b2Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10726e35772b2Smrg fi 10727e35772b2Smrgelif test "x$use_lint" = x"no" ; then 10728e35772b2Smrg if test "x$LINT" != "x"; then 10729e35772b2Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10730e35772b2Smrg fi 1073172b676d7Smrgelse 10732e35772b2Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1073372b676d7Smrgfi 10734e35772b2Smrg 10735e35772b2Smrg# User supplied flags override default flags 10736e35772b2Smrgif test "x$LINT_FLAGS" != "x"; then 10737e35772b2Smrg lint_options=$LINT_FLAGS 1073872b676d7Smrgfi 1073972b676d7Smrg 10740e35772b2SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10741e35772b2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1074272b676d7Smrg 1074372b676d7Smrg]) # XORG_WITH_LINT 1074472b676d7Smrg 1074572b676d7Smrg# XORG_LINT_LIBRARY(LIBNAME) 1074672b676d7Smrg# -------------------------- 1074772b676d7Smrg# Minimum version: 1.1.0 1074872b676d7Smrg# 1074972b676d7Smrg# Sets up flags for building lint libraries for checking programs that call 1075072b676d7Smrg# functions in the library. 1075172b676d7Smrg# 10752e35772b2Smrg# Interface to module: 10753e35772b2Smrg# LINTLIB - Automake variable with the name of lint library file to make 10754e35772b2Smrg# MAKE_LINT_LIB - Automake conditional 10755e35772b2Smrg# 10756e35772b2Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10757e35772b2Smrg# - 'no' user instructs the module not to create a lint library (default) 1075872b676d7Smrg 1075972b676d7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1076072b676d7SmrgAC_REQUIRE([XORG_WITH_LINT]) 10761e35772b2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1076272b676d7Smrg [Create lint library (default: disabled)])], 1076372b676d7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10764e35772b2Smrg 10765e35772b2Smrgif test "x$make_lint_lib" = x"yes" ; then 10766e35772b2Smrg LINTLIB=llib-l$1.ln 10767e35772b2Smrg if test "x$LINT" = "x"; then 10768e35772b2Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10769e35772b2Smrg fi 10770e35772b2Smrgelif test "x$make_lint_lib" != x"no" ; then 10771e35772b2Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1077272b676d7Smrgfi 10773e35772b2Smrg 1077472b676d7SmrgAC_SUBST(LINTLIB) 1077572b676d7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1077672b676d7Smrg 1077772b676d7Smrg]) # XORG_LINT_LIBRARY 1077872b676d7Smrg 1077974c14cd6Smrg# XORG_COMPILER_BRAND 1078074c14cd6Smrg# ------------------- 1078174c14cd6Smrg# Minimum version: 1.14.0 1078274c14cd6Smrg# 1078374c14cd6Smrg# Checks for various brands of compilers and sets flags as appropriate: 1078474c14cd6Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1078574c14cd6Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1078674c14cd6Smrg# clang compiler - sets CLANGCC to "yes" 1078774c14cd6Smrg# Intel compiler - sets INTELCC to "yes" 1078874c14cd6Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1078974c14cd6Smrg# 1079074c14cd6SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1079174c14cd6SmrgAC_LANG_CASE( 1079274c14cd6Smrg [C], [ 1079374c14cd6Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1079474c14cd6Smrg ], 1079574c14cd6Smrg [C++], [ 1079674c14cd6Smrg AC_REQUIRE([AC_PROG_CXX]) 1079774c14cd6Smrg ] 1079874c14cd6Smrg) 1079974c14cd6SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1080074c14cd6SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1080174c14cd6SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1080274c14cd6Smrg]) # XORG_COMPILER_BRAND 1080374c14cd6Smrg 1080474c14cd6Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1080574c14cd6Smrg# --------------- 1080674c14cd6Smrg# Minimum version: 1.16.0 1080774c14cd6Smrg# 1080874c14cd6Smrg# Test if the compiler works when passed the given flag as a command line argument. 1080974c14cd6Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1081074c14cd6Smrg# next flag in the list until there are no more options. 1081174c14cd6Smrg# 1081274c14cd6Smrg# Note that this does not guarantee that the compiler supports the flag as some 1081374c14cd6Smrg# compilers will simply ignore arguments that they do not understand, but we do 1081474c14cd6Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1081574c14cd6Smrg# -Werror=unused-command-line-argument 1081674c14cd6Smrg# 1081774c14cd6SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1081874c14cd6Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1081974c14cd6Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1082074c14cd6Smrg 1082174c14cd6SmrgAC_LANG_COMPILER_REQUIRE 1082274c14cd6Smrg 1082374c14cd6SmrgAC_LANG_CASE( 1082474c14cd6Smrg [C], [ 1082574c14cd6Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1082674c14cd6Smrg define([PREFIX], [C]) 1082774c14cd6Smrg define([CACHE_PREFIX], [cc]) 1082874c14cd6Smrg define([COMPILER], [$CC]) 1082974c14cd6Smrg ], 1083074c14cd6Smrg [C++], [ 1083174c14cd6Smrg define([PREFIX], [CXX]) 1083274c14cd6Smrg define([CACHE_PREFIX], [cxx]) 1083374c14cd6Smrg define([COMPILER], [$CXX]) 1083474c14cd6Smrg ] 1083574c14cd6Smrg) 1083674c14cd6Smrg 1083774c14cd6Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1083874c14cd6Smrg 1083974c14cd6Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1084074c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1084174c14cd6Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1084274c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1084374c14cd6Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1084474c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1084574c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1084674c14cd6Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1084774c14cd6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1084874c14cd6Smrgfi 1084974c14cd6Smrg 1085074c14cd6Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1085174c14cd6Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1085274c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1085374c14cd6Smrg fi 1085474c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1085574c14cd6Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1085674c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1085774c14cd6Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1085874c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1085974c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1086074c14cd6Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1086174c14cd6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1086274c14cd6Smrgfi 1086374c14cd6Smrg 1086474c14cd6Smrgfound="no" 1086574c14cd6Smrgm4_foreach([flag], m4_cdr($@), [ 1086674c14cd6Smrg if test $found = "no" ; then 1086721525869Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 1086874c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1086974c14cd6Smrg fi 1087074c14cd6Smrg 1087121525869Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 1087274c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1087374c14cd6Smrg fi 1087474c14cd6Smrg 1087574c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1087674c14cd6Smrg 1087774c14cd6Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1087874c14cd6Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1087974c14cd6Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1088074c14cd6Smrg AC_CACHE_VAL($cacheid, 1088174c14cd6Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1088274c14cd6Smrg [eval $cacheid=yes], 1088374c14cd6Smrg [eval $cacheid=no])]) 1088474c14cd6Smrg 1088574c14cd6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1088674c14cd6Smrg 1088774c14cd6Smrg eval supported=\$$cacheid 1088874c14cd6Smrg AC_MSG_RESULT([$supported]) 1088974c14cd6Smrg if test "$supported" = "yes" ; then 1089074c14cd6Smrg $1="$$1 ]flag[" 1089174c14cd6Smrg found="yes" 1089274c14cd6Smrg fi 1089374c14cd6Smrg fi 1089474c14cd6Smrg]) 1089574c14cd6Smrg]) # XORG_TESTSET_CFLAG 1089674c14cd6Smrg 1089774c14cd6Smrg# XORG_COMPILER_FLAGS 1089874c14cd6Smrg# --------------- 1089974c14cd6Smrg# Minimum version: 1.16.0 1090074c14cd6Smrg# 1090174c14cd6Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1090274c14cd6Smrg# arguments supported by the selected compiler which do NOT alter the generated 1090374c14cd6Smrg# code. These arguments will cause the compiler to print various warnings 1090474c14cd6Smrg# during compilation AND turn a conservative set of warnings into errors. 1090574c14cd6Smrg# 1090674c14cd6Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1090774c14cd6Smrg# future versions of util-macros as options are added to new compilers. 1090874c14cd6Smrg# 1090974c14cd6SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1091074c14cd6SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1091174c14cd6Smrg 1091274c14cd6SmrgAC_ARG_ENABLE(selective-werror, 1091374c14cd6Smrg AS_HELP_STRING([--disable-selective-werror], 1091474c14cd6Smrg [Turn off selective compiler errors. (default: enabled)]), 1091574c14cd6Smrg [SELECTIVE_WERROR=$enableval], 1091674c14cd6Smrg [SELECTIVE_WERROR=yes]) 1091774c14cd6Smrg 1091874c14cd6SmrgAC_LANG_CASE( 1091974c14cd6Smrg [C], [ 1092074c14cd6Smrg define([PREFIX], [C]) 1092174c14cd6Smrg ], 1092274c14cd6Smrg [C++], [ 1092374c14cd6Smrg define([PREFIX], [CXX]) 1092474c14cd6Smrg ] 1092574c14cd6Smrg) 1092674c14cd6Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1092774c14cd6Smrgif test "x$SUNCC" = "xyes"; then 1092874c14cd6Smrg [BASE_]PREFIX[FLAGS]="-v" 1092974c14cd6Smrgelse 1093074c14cd6Smrg [BASE_]PREFIX[FLAGS]="" 1093174c14cd6Smrgfi 1093274c14cd6Smrg 1093374c14cd6Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1093474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1093574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1093674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1093774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1093874c14cd6Smrg 1093974c14cd6SmrgAC_LANG_CASE( 1094074c14cd6Smrg [C], [ 1094174c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1094274c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1094374c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1094474c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1094521525869Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 1094674c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1094774c14cd6Smrg ] 1094874c14cd6Smrg) 1094974c14cd6Smrg 1095074c14cd6Smrg# This chunk adds additional warnings that could catch undesired effects. 1095174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1095274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1095374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1095474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1095574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1095674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1095721525869SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1095874c14cd6Smrg 1095974c14cd6Smrg# These are currently disabled because they are noisy. They will be enabled 1096074c14cd6Smrg# in the future once the codebase is sufficiently modernized to silence 1096174c14cd6Smrg# them. For now, I don't want them to drown out the other warnings. 1096274c14cd6Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1096374c14cd6Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1096421525869Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1096574c14cd6Smrg 1096674c14cd6Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1096774c14cd6Smrg# when there are problems that should be fixed. 1096874c14cd6Smrg 1096974c14cd6Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1097074c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1097174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1097274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1097374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1097474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1097574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1097674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1097774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1097874c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1097974c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1098074c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1098174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1098274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1098374c14cd6Smrgelse 1098474c14cd6SmrgAC_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]) 1098574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1098674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1098774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1098874c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1098974c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1099074c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1099174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1099274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1099374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1099474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1099574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1099674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1099774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1099874c14cd6Smrgfi 1099974c14cd6Smrg 1100074c14cd6SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1100174c14cd6Smrg]) # XORG_COMPILER_FLAGS 1100274c14cd6Smrg 11003e47418d9Smrg# XORG_CWARNFLAGS 11004e47418d9Smrg# --------------- 11005e47418d9Smrg# Minimum version: 1.2.0 1100674c14cd6Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11007e47418d9Smrg# 11008e47418d9Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11009e47418d9Smrg# 1101074c14cd6Smrg# This function is deprecated because it defines -fno-strict-aliasing 1101174c14cd6Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1101274c14cd6Smrg# is needed, then it should be added explicitly in the module when 1101374c14cd6Smrg# it is updated to use BASE_CFLAGS. 1101474c14cd6Smrg# 11015e47418d9SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1101674c14cd6SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1101774c14cd6SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1101874c14cd6SmrgAC_LANG_CASE( 1101974c14cd6Smrg [C], [ 1102074c14cd6Smrg CWARNFLAGS="$BASE_CFLAGS" 1102174c14cd6Smrg if test "x$GCC" = xyes ; then 1102274c14cd6Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1102374c14cd6Smrg fi 1102474c14cd6Smrg AC_SUBST(CWARNFLAGS) 1102574c14cd6Smrg ] 1102674c14cd6Smrg) 11027e47418d9Smrg]) # XORG_CWARNFLAGS 11028e35772b2Smrg 11029e35772b2Smrg# XORG_STRICT_OPTION 11030e35772b2Smrg# ----------------------- 11031e35772b2Smrg# Minimum version: 1.3.0 11032e35772b2Smrg# 1103374c14cd6Smrg# Add configure option to enable strict compilation flags, such as treating 1103474c14cd6Smrg# warnings as fatal errors. 1103574c14cd6Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1103674c14cd6Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1103774c14cd6Smrg# 1103874c14cd6Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1103974c14cd6Smrg# when strict compilation is unconditionally desired. 11040e35772b2SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11041e35772b2SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1104274c14cd6SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11043e35772b2Smrg 11044e35772b2SmrgAC_ARG_ENABLE(strict-compilation, 11045e35772b2Smrg AS_HELP_STRING([--enable-strict-compilation], 11046e35772b2Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11047e35772b2Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1104874c14cd6Smrg 1104974c14cd6SmrgAC_LANG_CASE( 1105074c14cd6Smrg [C], [ 1105174c14cd6Smrg define([PREFIX], [C]) 1105274c14cd6Smrg ], 1105374c14cd6Smrg [C++], [ 1105474c14cd6Smrg define([PREFIX], [CXX]) 1105574c14cd6Smrg ] 1105674c14cd6Smrg) 1105774c14cd6Smrg 1105874c14cd6Smrg[STRICT_]PREFIX[FLAGS]="" 1105974c14cd6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1106074c14cd6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1106174c14cd6Smrg 1106274c14cd6Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1106374c14cd6Smrg# activate it with -Werror, so we add it here explicitly. 1106474c14cd6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1106574c14cd6Smrg 11066e35772b2Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1106774c14cd6Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1106874c14cd6Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11069e35772b2Smrgfi 1107074c14cd6SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1107174c14cd6SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1107274c14cd6SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11073e35772b2Smrg]) # XORG_STRICT_OPTION 11074e35772b2Smrg 11075e35772b2Smrg# XORG_DEFAULT_OPTIONS 11076e35772b2Smrg# -------------------- 11077e35772b2Smrg# Minimum version: 1.3.0 11078e35772b2Smrg# 11079e35772b2Smrg# Defines default options for X.Org modules. 11080e35772b2Smrg# 11081e35772b2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11082e35772b2SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1108374c14cd6SmrgXORG_COMPILER_FLAGS 11084e35772b2SmrgXORG_CWARNFLAGS 11085e35772b2SmrgXORG_STRICT_OPTION 11086e35772b2SmrgXORG_RELEASE_VERSION 11087e35772b2SmrgXORG_CHANGELOG 11088e35772b2SmrgXORG_INSTALL 11089e35772b2SmrgXORG_MANPAGE_SECTIONS 11090e35772b2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11091e35772b2Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11092e35772b2Smrg]) # XORG_DEFAULT_OPTIONS 11093e35772b2Smrg 11094e35772b2Smrg# XORG_INSTALL() 11095e35772b2Smrg# ---------------- 11096e35772b2Smrg# Minimum version: 1.4.0 11097e35772b2Smrg# 11098e35772b2Smrg# Defines the variable INSTALL_CMD as the command to copy 11099e35772b2Smrg# INSTALL from $prefix/share/util-macros. 11100e35772b2Smrg# 11101e35772b2SmrgAC_DEFUN([XORG_INSTALL], [ 11102e35772b2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11103e35772b2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11104e35772b2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11105e35772b2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11106e35772b2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11107e35772b2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11108e35772b2SmrgAC_SUBST([INSTALL_CMD]) 11109e35772b2Smrg]) # XORG_INSTALL 1111072b676d7Smrgdnl Copyright 2005 Red Hat, Inc 1111172b676d7Smrgdnl 1111272b676d7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1111372b676d7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1111472b676d7Smrgdnl the above copyright notice appear in all copies and that both that 1111572b676d7Smrgdnl copyright notice and this permission notice appear in supporting 1111672b676d7Smrgdnl documentation. 1111772b676d7Smrgdnl 1111872b676d7Smrgdnl The above copyright notice and this permission notice shall be included 1111972b676d7Smrgdnl in all copies or substantial portions of the Software. 1112072b676d7Smrgdnl 1112172b676d7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1112272b676d7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1112372b676d7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1112472b676d7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1112572b676d7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1112672b676d7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1112772b676d7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1112872b676d7Smrgdnl 1112972b676d7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1113072b676d7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1113172b676d7Smrgdnl other dealings in this Software without prior written authorization 1113272b676d7Smrgdnl from the copyright holders. 1113372b676d7Smrgdnl 1113472b676d7Smrg 1113572b676d7Smrg# XORG_RELEASE_VERSION 1113672b676d7Smrg# -------------------- 11137e35772b2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1113821525869Smrg 1113972b676d7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 111401fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 111411fd23544Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 111421fd23544Smrg [Major version of this package]) 111431fd23544Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 111441fd23544Smrg if test "x$PVM" = "x"; then 111451fd23544Smrg PVM="0" 111461fd23544Smrg fi 111471fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 111481fd23544Smrg [$PVM], 111491fd23544Smrg [Minor version of this package]) 111501fd23544Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 111511fd23544Smrg if test "x$PVP" = "x"; then 111521fd23544Smrg PVP="0" 111531fd23544Smrg fi 111541fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 111551fd23544Smrg [$PVP], 111561fd23544Smrg [Patch version of this package]) 1115772b676d7Smrg]) 1115872b676d7Smrg 11159e47418d9Smrg# XORG_CHANGELOG() 11160e47418d9Smrg# ---------------- 11161e47418d9Smrg# Minimum version: 1.2.0 11162e47418d9Smrg# 11163e47418d9Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11164e47418d9Smrg# ChangeLog from git. 11165e47418d9Smrg# 11166e47418d9Smrg# 11167e47418d9SmrgAC_DEFUN([XORG_CHANGELOG], [ 11168e35772b2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11169e35772b2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11170e35772b2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11171e47418d9Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11172e47418d9SmrgAC_SUBST([CHANGELOG_CMD]) 11173e47418d9Smrg]) # XORG_CHANGELOG 11174e47418d9Smrg 11175e35772b2Smrgdnl Copyright 2005 Red Hat, Inc 11176e35772b2Smrgdnl 11177e35772b2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11178e35772b2Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11179e35772b2Smrgdnl the above copyright notice appear in all copies and that both that 11180e35772b2Smrgdnl copyright notice and this permission notice appear in supporting 11181e35772b2Smrgdnl documentation. 11182e35772b2Smrgdnl 11183e35772b2Smrgdnl The above copyright notice and this permission notice shall be included 11184e35772b2Smrgdnl in all copies or substantial portions of the Software. 11185e35772b2Smrgdnl 11186e35772b2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11187e35772b2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11188e35772b2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11189e35772b2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11190e35772b2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11191e35772b2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11192e35772b2Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11193e35772b2Smrgdnl 11194e35772b2Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11195e35772b2Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11196e35772b2Smrgdnl other dealings in this Software without prior written authorization 11197e35772b2Smrgdnl from the copyright holders. 11198e35772b2Smrgdnl 11199e35772b2Smrg 1120021525869Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11201e35772b2Smrg# -------------------------- 1120221525869Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 1120321525869Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 11204e35772b2Smrg 11205e35772b2SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11206e35772b2Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11207e35772b2Smrg SAVE_CFLAGS="$CFLAGS" 11208e35772b2Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11209e35772b2Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11210e35772b2Smrg#include "xorg-server.h" 11211e35772b2Smrg#if !defined $1 11212e35772b2Smrg#error $1 not defined 11213e35772b2Smrg#endif 11214e35772b2Smrg ]])], 11215e35772b2Smrg [_EXT_CHECK=yes], 11216e35772b2Smrg [_EXT_CHECK=no]) 11217e35772b2Smrg CFLAGS="$SAVE_CFLAGS" 11218e35772b2Smrg AC_MSG_CHECKING([if $1 is defined]) 11219e35772b2Smrg AC_MSG_RESULT([$_EXT_CHECK]) 11220e35772b2Smrg if test "$_EXT_CHECK" != no; then 11221e35772b2Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11222e35772b2Smrg fi 11223e35772b2Smrg]) 11224e35772b2Smrg 1122593d9adc1Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 1122672b676d7Smrg# 1122772b676d7Smrg# This file is free software; the Free Software Foundation 1122872b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1122972b676d7Smrg# with or without modifications, as long as this notice is preserved. 1123072b676d7Smrg 1123172b676d7Smrg# AM_AUTOMAKE_VERSION(VERSION) 1123272b676d7Smrg# ---------------------------- 1123372b676d7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1123472b676d7Smrg# generated from the m4 files accompanying Automake X.Y. 112351fd23544Smrg# (This private macro should not be called outside this file.) 112361fd23544SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 1123793d9adc1Smrg[am__api_version='1.15' 112381fd23544Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 112391fd23544Smrgdnl require some minimum version. Point them to the right macro. 1124093d9adc1Smrgm4_if([$1], [1.15], [], 112411fd23544Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 112421fd23544Smrg]) 112431fd23544Smrg 112441fd23544Smrg# _AM_AUTOCONF_VERSION(VERSION) 112451fd23544Smrg# ----------------------------- 112461fd23544Smrg# aclocal traces this macro to find the Autoconf version. 112471fd23544Smrg# This is a private macro too. Using m4_define simplifies 112481fd23544Smrg# the logic in aclocal, which can simply ignore this definition. 112491fd23544Smrgm4_define([_AM_AUTOCONF_VERSION], []) 1125072b676d7Smrg 1125172b676d7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1125272b676d7Smrg# ------------------------------- 112531fd23544Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11254e47418d9Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1125572b676d7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1125693d9adc1Smrg[AM_AUTOMAKE_VERSION([1.15])dnl 112571fd23544Smrgm4_ifndef([AC_AUTOCONF_VERSION], 112581fd23544Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11259e47418d9Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1126072b676d7Smrg 1126172b676d7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1126272b676d7Smrg 1126393d9adc1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 1126472b676d7Smrg# 1126572b676d7Smrg# This file is free software; the Free Software Foundation 1126672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1126772b676d7Smrg# with or without modifications, as long as this notice is preserved. 1126872b676d7Smrg 1126972b676d7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1127093d9adc1Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 1127193d9adc1Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 1127272b676d7Smrg# 1127372b676d7Smrg# Of course, Automake must honor this variable whenever it calls a 1127472b676d7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 1127572b676d7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 1127672b676d7Smrg# depending on how configure is run. This is pretty annoying, since 1127772b676d7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1127872b676d7Smrg# source directory, any form will work fine, but in subdirectories a 1127972b676d7Smrg# relative path needs to be adjusted first. 1128072b676d7Smrg# 1128172b676d7Smrg# $ac_aux_dir/missing 1128272b676d7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 1128372b676d7Smrg# $top_srcdir/$ac_aux_dir/missing 1128472b676d7Smrg# fails if $ac_aux_dir is absolute, 1128572b676d7Smrg# fails when called from a subdirectory in a VPATH build with 1128672b676d7Smrg# a relative $ac_aux_dir 1128772b676d7Smrg# 1128872b676d7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1128972b676d7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 1129093d9adc1Smrg# harmless because $srcdir is '.', but things will broke when you 1129172b676d7Smrg# start a VPATH build or use an absolute $srcdir. 1129272b676d7Smrg# 1129372b676d7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1129472b676d7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1129572b676d7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1129672b676d7Smrg# and then we would define $MISSING as 1129772b676d7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 1129872b676d7Smrg# This will work as long as MISSING is not called from configure, because 1129972b676d7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 1130072b676d7Smrg# However there are other variables, like CC, which are often used in 1130172b676d7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1130272b676d7Smrg# 1130372b676d7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1130472b676d7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1130572b676d7Smrg# configured tree to be moved without reconfiguration. 1130672b676d7Smrg 1130772b676d7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1130893d9adc1Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1130993d9adc1Smrg# Expand $ac_aux_dir to an absolute path. 1131093d9adc1Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1131172b676d7Smrg]) 1131272b676d7Smrg 1131372b676d7Smrg# AM_CONDITIONAL -*- Autoconf -*- 1131472b676d7Smrg 1131593d9adc1Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 1131672b676d7Smrg# 1131772b676d7Smrg# This file is free software; the Free Software Foundation 1131872b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1131972b676d7Smrg# with or without modifications, as long as this notice is preserved. 1132072b676d7Smrg 1132172b676d7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1132272b676d7Smrg# ------------------------------------- 1132372b676d7Smrg# Define a conditional. 1132472b676d7SmrgAC_DEFUN([AM_CONDITIONAL], 1132593d9adc1Smrg[AC_PREREQ([2.52])dnl 1132693d9adc1Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1132793d9adc1Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 113281fd23544SmrgAC_SUBST([$1_TRUE])dnl 113291fd23544SmrgAC_SUBST([$1_FALSE])dnl 113301fd23544Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 113311fd23544Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11332e47418d9Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1133372b676d7Smrgif $2; then 1133472b676d7Smrg $1_TRUE= 1133572b676d7Smrg $1_FALSE='#' 1133672b676d7Smrgelse 1133772b676d7Smrg $1_TRUE='#' 1133872b676d7Smrg $1_FALSE= 1133972b676d7Smrgfi 1134072b676d7SmrgAC_CONFIG_COMMANDS_PRE( 1134172b676d7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1134272b676d7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1134372b676d7SmrgUsually this means the macro was only invoked conditionally.]]) 1134472b676d7Smrgfi])]) 1134572b676d7Smrg 1134693d9adc1Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 1134772b676d7Smrg# 1134872b676d7Smrg# This file is free software; the Free Software Foundation 1134972b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1135072b676d7Smrg# with or without modifications, as long as this notice is preserved. 1135172b676d7Smrg 1135272b676d7Smrg 1135393d9adc1Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1135472b676d7Smrg# written in clear, in which case automake, when reading aclocal.m4, 1135572b676d7Smrg# will think it sees a *use*, and therefore will trigger all it's 1135672b676d7Smrg# C support machinery. Also note that it means that autoscan, seeing 1135772b676d7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1135872b676d7Smrg 1135972b676d7Smrg 1136072b676d7Smrg# _AM_DEPENDENCIES(NAME) 1136172b676d7Smrg# ---------------------- 1136272b676d7Smrg# See how the compiler implements dependency checking. 1136393d9adc1Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1136472b676d7Smrg# We try a few techniques and use that to set a single cache variable. 1136572b676d7Smrg# 1136672b676d7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1136772b676d7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1136872b676d7Smrg# dependency, and given that the user is not expected to run this macro, 1136972b676d7Smrg# just rely on AC_PROG_CC. 1137072b676d7SmrgAC_DEFUN([_AM_DEPENDENCIES], 1137172b676d7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1137272b676d7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1137372b676d7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1137472b676d7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1137572b676d7Smrg 1137693d9adc1Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1137793d9adc1Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1137893d9adc1Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1137993d9adc1Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1138093d9adc1Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1138193d9adc1Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1138293d9adc1Smrg [depcc="$$1" am_compiler_list=]) 1138372b676d7Smrg 1138472b676d7SmrgAC_CACHE_CHECK([dependency style of $depcc], 1138572b676d7Smrg [am_cv_$1_dependencies_compiler_type], 1138672b676d7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1138772b676d7Smrg # We make a subdir and do the tests there. Otherwise we can end up 1138872b676d7Smrg # making bogus files that we don't know about and never remove. For 1138972b676d7Smrg # instance it was reported that on HP-UX the gcc test will end up 1139093d9adc1Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 1139193d9adc1Smrg # in D". 1139274c14cd6Smrg rm -rf conftest.dir 1139372b676d7Smrg mkdir conftest.dir 1139472b676d7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1139572b676d7Smrg # using a relative directory. 1139672b676d7Smrg cp "$am_depcomp" conftest.dir 1139772b676d7Smrg cd conftest.dir 1139872b676d7Smrg # We will build objects and dependencies in a subdirectory because 1139972b676d7Smrg # it helps to detect inapplicable dependency modes. For instance 1140072b676d7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 1140172b676d7Smrg # side effect of compilation, but ICC will put the dependencies in 1140272b676d7Smrg # the current directory while Tru64 will put them in the object 1140372b676d7Smrg # directory. 1140472b676d7Smrg mkdir sub 1140572b676d7Smrg 1140672b676d7Smrg am_cv_$1_dependencies_compiler_type=none 1140772b676d7Smrg if test "$am_compiler_list" = ""; then 1140872b676d7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1140972b676d7Smrg fi 11410e47418d9Smrg am__universal=false 11411e47418d9Smrg m4_case([$1], [CC], 11412e47418d9Smrg [case " $depcc " in #( 11413e47418d9Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11414e47418d9Smrg esac], 11415e47418d9Smrg [CXX], 11416e47418d9Smrg [case " $depcc " in #( 11417e47418d9Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11418e47418d9Smrg esac]) 11419e47418d9Smrg 1142072b676d7Smrg for depmode in $am_compiler_list; do 1142172b676d7Smrg # Setup a source with many dependencies, because some compilers 1142272b676d7Smrg # like to wrap large dependency lists on column 80 (with \), and 1142372b676d7Smrg # we should not choose a depcomp mode which is confused by this. 1142472b676d7Smrg # 1142572b676d7Smrg # We need to recreate these files for each test, as the compiler may 1142672b676d7Smrg # overwrite some of them when testing with obscure command lines. 1142772b676d7Smrg # This happens at least with the AIX C compiler. 1142872b676d7Smrg : > sub/conftest.c 1142972b676d7Smrg for i in 1 2 3 4 5 6; do 1143072b676d7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 1143193d9adc1Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 1143293d9adc1Smrg # Solaris 10 /bin/sh. 1143393d9adc1Smrg echo '/* dummy */' > sub/conftst$i.h 1143472b676d7Smrg done 1143572b676d7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1143672b676d7Smrg 1143793d9adc1Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 11438e47418d9Smrg # mode. It turns out that the SunPro C++ compiler does not properly 1143993d9adc1Smrg # handle '-M -o', and we need to detect this. Also, some Intel 1144093d9adc1Smrg # versions had trouble with output in subdirs. 11441e47418d9Smrg am__obj=sub/conftest.${OBJEXT-o} 11442e47418d9Smrg am__minus_obj="-o $am__obj" 1144372b676d7Smrg case $depmode in 11444e47418d9Smrg gcc) 11445e47418d9Smrg # This depmode causes a compiler race in universal mode. 11446e47418d9Smrg test "$am__universal" = false || continue 11447e47418d9Smrg ;; 1144872b676d7Smrg nosideeffect) 1144993d9adc1Smrg # After this tag, mechanisms are not by side-effect, so they'll 1145093d9adc1Smrg # only be used when explicitly requested. 1145172b676d7Smrg if test "x$enable_dependency_tracking" = xyes; then 1145272b676d7Smrg continue 1145372b676d7Smrg else 1145472b676d7Smrg break 1145572b676d7Smrg fi 1145672b676d7Smrg ;; 1145774c14cd6Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1145893d9adc1Smrg # This compiler won't grok '-c -o', but also, the minuso test has 11459e47418d9Smrg # not run yet. These depmodes are late enough in the game, and 11460e47418d9Smrg # so weak that their functioning should not be impacted. 11461e47418d9Smrg am__obj=conftest.${OBJEXT-o} 11462e47418d9Smrg am__minus_obj= 11463e47418d9Smrg ;; 1146472b676d7Smrg none) break ;; 1146572b676d7Smrg esac 1146672b676d7Smrg if depmode=$depmode \ 11467e47418d9Smrg source=sub/conftest.c object=$am__obj \ 1146872b676d7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11469e47418d9Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1147072b676d7Smrg >/dev/null 2>conftest.err && 114711fd23544Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1147272b676d7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11473e47418d9Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1147472b676d7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1147572b676d7Smrg # icc doesn't choke on unknown options, it will just issue warnings 1147672b676d7Smrg # or remarks (even with -Werror). So we grep stderr for any message 1147772b676d7Smrg # that says an option was ignored or not supported. 1147872b676d7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 1147972b676d7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 1148072b676d7Smrg # The diagnosis changed in icc 8.0: 1148172b676d7Smrg # icc: Command line remark: option '-MP' not supported 1148272b676d7Smrg if (grep 'ignoring option' conftest.err || 1148372b676d7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1148472b676d7Smrg am_cv_$1_dependencies_compiler_type=$depmode 1148572b676d7Smrg break 1148672b676d7Smrg fi 1148772b676d7Smrg fi 1148872b676d7Smrg done 1148972b676d7Smrg 1149072b676d7Smrg cd .. 1149172b676d7Smrg rm -rf conftest.dir 1149272b676d7Smrgelse 1149372b676d7Smrg am_cv_$1_dependencies_compiler_type=none 1149472b676d7Smrgfi 1149572b676d7Smrg]) 1149672b676d7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1149772b676d7SmrgAM_CONDITIONAL([am__fastdep$1], [ 1149872b676d7Smrg test "x$enable_dependency_tracking" != xno \ 1149972b676d7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1150072b676d7Smrg]) 1150172b676d7Smrg 1150272b676d7Smrg 1150372b676d7Smrg# AM_SET_DEPDIR 1150472b676d7Smrg# ------------- 1150572b676d7Smrg# Choose a directory name for dependency files. 1150693d9adc1Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 1150772b676d7SmrgAC_DEFUN([AM_SET_DEPDIR], 1150872b676d7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1150972b676d7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1151072b676d7Smrg]) 1151172b676d7Smrg 1151272b676d7Smrg 1151372b676d7Smrg# AM_DEP_TRACK 1151472b676d7Smrg# ------------ 1151572b676d7SmrgAC_DEFUN([AM_DEP_TRACK], 1151693d9adc1Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 1151793d9adc1SmrgAS_HELP_STRING( 1151893d9adc1Smrg [--enable-dependency-tracking], 1151993d9adc1Smrg [do not reject slow dependency extractors]) 1152093d9adc1SmrgAS_HELP_STRING( 1152193d9adc1Smrg [--disable-dependency-tracking], 1152293d9adc1Smrg [speeds up one-time build])]) 1152372b676d7Smrgif test "x$enable_dependency_tracking" != xno; then 1152472b676d7Smrg am_depcomp="$ac_aux_dir/depcomp" 1152572b676d7Smrg AMDEPBACKSLASH='\' 1152674c14cd6Smrg am__nodep='_no' 1152772b676d7Smrgfi 1152872b676d7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 115291fd23544SmrgAC_SUBST([AMDEPBACKSLASH])dnl 115301fd23544Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1153174c14cd6SmrgAC_SUBST([am__nodep])dnl 1153274c14cd6Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 1153372b676d7Smrg]) 1153472b676d7Smrg 1153572b676d7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1153672b676d7Smrg 1153793d9adc1Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 1153872b676d7Smrg# 1153972b676d7Smrg# This file is free software; the Free Software Foundation 1154072b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1154172b676d7Smrg# with or without modifications, as long as this notice is preserved. 1154272b676d7Smrg 1154372b676d7Smrg 1154472b676d7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 1154572b676d7Smrg# ------------------------------ 1154672b676d7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11547e47418d9Smrg[{ 1154893d9adc1Smrg # Older Autoconf quotes --file arguments for eval, but not when files 11549e47418d9Smrg # are listed without --file. Let's play safe and only enable the eval 11550e47418d9Smrg # if we detect the quoting. 11551e47418d9Smrg case $CONFIG_FILES in 11552e47418d9Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11553e47418d9Smrg *) set x $CONFIG_FILES ;; 11554e47418d9Smrg esac 11555e47418d9Smrg shift 11556e47418d9Smrg for mf 11557e47418d9Smrg do 11558e47418d9Smrg # Strip MF so we end up with the name of the file. 11559e47418d9Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11560e47418d9Smrg # Check whether this is an Automake generated Makefile or not. 1156193d9adc1Smrg # We used to match only the files named 'Makefile.in', but 11562e47418d9Smrg # some people rename them; so instead we look at the file content. 11563e47418d9Smrg # Grep'ing the first line is not enough: some people post-process 11564e47418d9Smrg # each Makefile.in and add a new line on top of each file to say so. 11565e47418d9Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11566e47418d9Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11567e47418d9Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11568e47418d9Smrg dirpart=`AS_DIRNAME("$mf")` 11569e47418d9Smrg else 11570e47418d9Smrg continue 11571e47418d9Smrg fi 11572e47418d9Smrg # Extract the definition of DEPDIR, am__include, and am__quote 1157393d9adc1Smrg # from the Makefile without running 'make'. 11574e47418d9Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11575e47418d9Smrg test -z "$DEPDIR" && continue 11576e47418d9Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 1157793d9adc1Smrg test -z "$am__include" && continue 11578e47418d9Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11579e47418d9Smrg # Find all dependency output files, they are included files with 11580e47418d9Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11581e47418d9Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11582e47418d9Smrg # expansion. 11583e47418d9Smrg for file in `sed -n " 11584e47418d9Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 1158593d9adc1Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11586e47418d9Smrg # Make sure the directory exists. 11587e47418d9Smrg test -f "$dirpart/$file" && continue 11588e47418d9Smrg fdir=`AS_DIRNAME(["$file"])` 11589e47418d9Smrg AS_MKDIR_P([$dirpart/$fdir]) 11590e47418d9Smrg # echo "creating $dirpart/$file" 11591e47418d9Smrg echo '# dummy' > "$dirpart/$file" 11592e47418d9Smrg done 1159372b676d7Smrg done 11594e47418d9Smrg} 1159572b676d7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1159672b676d7Smrg 1159772b676d7Smrg 1159872b676d7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 1159972b676d7Smrg# ----------------------------- 1160072b676d7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 1160172b676d7Smrg# 1160272b676d7Smrg# This code is only required when automatic dependency tracking 1160393d9adc1Smrg# is enabled. FIXME. This creates each '.P' file that we will 1160472b676d7Smrg# need in order to bootstrap the dependency handling code. 1160572b676d7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1160672b676d7Smrg[AC_CONFIG_COMMANDS([depfiles], 1160772b676d7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1160872b676d7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1160972b676d7Smrg]) 1161072b676d7Smrg 1161172b676d7Smrg# Do all the work for Automake. -*- Autoconf -*- 1161272b676d7Smrg 1161393d9adc1Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 1161472b676d7Smrg# 1161572b676d7Smrg# This file is free software; the Free Software Foundation 1161672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1161772b676d7Smrg# with or without modifications, as long as this notice is preserved. 1161872b676d7Smrg 1161972b676d7Smrg# This macro actually does too much. Some checks are only needed if 1162072b676d7Smrg# your package does certain things. But this isn't really a big deal. 1162172b676d7Smrg 1162293d9adc1Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 1162393d9adc1Smrgm4_define([AC_PROG_CC], 1162493d9adc1Smrgm4_defn([AC_PROG_CC]) 1162593d9adc1Smrg[_AM_PROG_CC_C_O 1162693d9adc1Smrg]) 1162793d9adc1Smrg 1162872b676d7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1162972b676d7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 1163072b676d7Smrg# ----------------------------------------------- 1163172b676d7Smrg# The call with PACKAGE and VERSION arguments is the old style 1163272b676d7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 1163372b676d7Smrg# and VERSION should now be passed to AC_INIT and removed from 1163472b676d7Smrg# the call to AM_INIT_AUTOMAKE. 1163572b676d7Smrg# We support both call styles for the transition. After 1163672b676d7Smrg# the next Automake release, Autoconf can make the AC_INIT 1163772b676d7Smrg# arguments mandatory, and then we can depend on a new Autoconf 1163872b676d7Smrg# release and drop the old call support. 1163972b676d7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 1164093d9adc1Smrg[AC_PREREQ([2.65])dnl 1164172b676d7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 1164272b676d7Smrgdnl the ones we care about. 1164372b676d7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1164472b676d7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1164572b676d7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 116461fd23544Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 116471fd23544Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 116481fd23544Smrg # is not polluted with repeated "-I." 116491fd23544Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 116501fd23544Smrg # test to see if srcdir already configured 116511fd23544Smrg if test -f $srcdir/config.status; then 116521fd23544Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 116531fd23544Smrg fi 1165472b676d7Smrgfi 1165572b676d7Smrg 1165672b676d7Smrg# test whether we have cygpath 1165772b676d7Smrgif test -z "$CYGPATH_W"; then 1165872b676d7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 1165972b676d7Smrg CYGPATH_W='cygpath -w' 1166072b676d7Smrg else 1166172b676d7Smrg CYGPATH_W=echo 1166272b676d7Smrg fi 1166372b676d7Smrgfi 1166472b676d7SmrgAC_SUBST([CYGPATH_W]) 1166572b676d7Smrg 1166672b676d7Smrg# Define the identity of the package. 1166772b676d7Smrgdnl Distinguish between old-style and new-style calls. 1166872b676d7Smrgm4_ifval([$2], 1166993d9adc1Smrg[AC_DIAGNOSE([obsolete], 1167093d9adc1Smrg [$0: two- and three-arguments forms are deprecated.]) 1167193d9adc1Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1167272b676d7Smrg AC_SUBST([PACKAGE], [$1])dnl 1167372b676d7Smrg AC_SUBST([VERSION], [$2])], 1167472b676d7Smrg[_AM_SET_OPTIONS([$1])dnl 116751fd23544Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1167693d9adc1Smrgm4_if( 1167793d9adc1Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 1167893d9adc1Smrg [ok:ok],, 116791fd23544Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1168072b676d7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1168172b676d7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1168272b676d7Smrg 1168372b676d7Smrg_AM_IF_OPTION([no-define],, 1168493d9adc1Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 1168593d9adc1Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 1168672b676d7Smrg 1168772b676d7Smrg# Some tools Automake needs. 1168872b676d7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 1168972b676d7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 1169093d9adc1SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 1169193d9adc1SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 1169293d9adc1SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 1169393d9adc1SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 1169493d9adc1SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11695e47418d9SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11696e47418d9SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1169793d9adc1SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1169893d9adc1Smrg# For better backward compatibility. To be removed once Automake 1.9.x 1169993d9adc1Smrg# dies out for good. For more background, see: 1170093d9adc1Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 1170193d9adc1Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 1170293d9adc1SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1170393d9adc1Smrg# We need awk for the "check" target (and possibly the TAP driver). The 1170493d9adc1Smrg# system "awk" is bad on some platforms. 1170572b676d7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 1170672b676d7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1170772b676d7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1170872b676d7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11709e47418d9Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11710e47418d9Smrg [_AM_PROG_TAR([v7])])]) 1171172b676d7Smrg_AM_IF_OPTION([no-dependencies],, 1171272b676d7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1171393d9adc1Smrg [_AM_DEPENDENCIES([CC])], 1171493d9adc1Smrg [m4_define([AC_PROG_CC], 1171593d9adc1Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 1171672b676d7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1171793d9adc1Smrg [_AM_DEPENDENCIES([CXX])], 1171893d9adc1Smrg [m4_define([AC_PROG_CXX], 1171993d9adc1Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 117201fd23544SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 1172193d9adc1Smrg [_AM_DEPENDENCIES([OBJC])], 1172293d9adc1Smrg [m4_define([AC_PROG_OBJC], 1172393d9adc1Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 1172493d9adc1SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 1172593d9adc1Smrg [_AM_DEPENDENCIES([OBJCXX])], 1172693d9adc1Smrg [m4_define([AC_PROG_OBJCXX], 1172793d9adc1Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1172872b676d7Smrg]) 1172993d9adc1SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 1173093d9adc1Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 1173193d9adc1Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 1173293d9adc1Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11733e47418d9SmrgAC_CONFIG_COMMANDS_PRE(dnl 11734e47418d9Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11735e47418d9Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1173693d9adc1Smrg 1173793d9adc1Smrg# POSIX will say in a future version that running "rm -f" with no argument 1173893d9adc1Smrg# is OK; and we want to be able to make that assumption in our Makefile 1173993d9adc1Smrg# recipes. So use an aggressive probe to check that the usage we want is 1174093d9adc1Smrg# actually supported "in the wild" to an acceptable degree. 1174193d9adc1Smrg# See automake bug#10828. 1174293d9adc1Smrg# To make any issue more visible, cause the running configure to be aborted 1174393d9adc1Smrg# by default if the 'rm' program in use doesn't match our expectations; the 1174493d9adc1Smrg# user can still override this though. 1174593d9adc1Smrgif rm -f && rm -fr && rm -rf; then : OK; else 1174693d9adc1Smrg cat >&2 <<'END' 1174793d9adc1SmrgOops! 1174893d9adc1Smrg 1174993d9adc1SmrgYour 'rm' program seems unable to run without file operands specified 1175093d9adc1Smrgon the command line, even when the '-f' option is present. This is contrary 1175193d9adc1Smrgto the behaviour of most rm programs out there, and not conforming with 1175293d9adc1Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 1175393d9adc1Smrg 1175493d9adc1SmrgPlease tell bug-automake@gnu.org about your system, including the value 1175593d9adc1Smrgof your $PATH and any error possibly output before this message. This 1175693d9adc1Smrgcan help us improve future automake versions. 1175793d9adc1Smrg 1175893d9adc1SmrgEND 1175993d9adc1Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 1176093d9adc1Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 1176193d9adc1Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 1176293d9adc1Smrg echo >&2 1176393d9adc1Smrg else 1176493d9adc1Smrg cat >&2 <<'END' 1176593d9adc1SmrgAborting the configuration process, to ensure you take notice of the issue. 1176693d9adc1Smrg 1176793d9adc1SmrgYou can download and install GNU coreutils to get an 'rm' implementation 1176893d9adc1Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 1176993d9adc1Smrg 1177093d9adc1SmrgIf you want to complete the configuration process using your problematic 1177193d9adc1Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 1177293d9adc1Smrgto "yes", and re-run configure. 1177393d9adc1Smrg 1177493d9adc1SmrgEND 1177593d9adc1Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 1177693d9adc1Smrg fi 1177793d9adc1Smrgfi 1177893d9adc1Smrgdnl The trailing newline in this macro's definition is deliberate, for 1177993d9adc1Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 1178093d9adc1Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 1178172b676d7Smrg]) 1178272b676d7Smrg 1178393d9adc1Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11784e47418d9Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11785e47418d9Smrgdnl mangled by Autoconf and run in a shell conditional statement. 11786e47418d9Smrgm4_define([_AC_COMPILER_EXEEXT], 11787e47418d9Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11788e47418d9Smrg 1178972b676d7Smrg# When config.status generates a header, we must update the stamp-h file. 1179072b676d7Smrg# This file resides in the same directory as the config header 1179172b676d7Smrg# that is generated. The stamp files are numbered to have different names. 1179272b676d7Smrg 1179372b676d7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1179472b676d7Smrg# loop where config.status creates the headers, so we can generate 1179572b676d7Smrg# our stamp files there. 1179672b676d7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1179772b676d7Smrg[# Compute $1's index in $config_headers. 117981fd23544Smrg_am_arg=$1 1179972b676d7Smrg_am_stamp_count=1 1180072b676d7Smrgfor _am_header in $config_headers :; do 1180172b676d7Smrg case $_am_header in 118021fd23544Smrg $_am_arg | $_am_arg:* ) 1180372b676d7Smrg break ;; 1180472b676d7Smrg * ) 1180572b676d7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1180672b676d7Smrg esac 1180772b676d7Smrgdone 118081fd23544Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1180972b676d7Smrg 1181093d9adc1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 1181172b676d7Smrg# 1181272b676d7Smrg# This file is free software; the Free Software Foundation 1181372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1181472b676d7Smrg# with or without modifications, as long as this notice is preserved. 1181572b676d7Smrg 1181672b676d7Smrg# AM_PROG_INSTALL_SH 1181772b676d7Smrg# ------------------ 1181872b676d7Smrg# Define $install_sh. 1181972b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 1182072b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1182193d9adc1Smrgif test x"${install_sh+set}" != xset; then 11822e47418d9Smrg case $am_aux_dir in 11823e47418d9Smrg *\ * | *\ *) 11824e47418d9Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11825e47418d9Smrg *) 11826e47418d9Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11827e47418d9Smrg esac 11828e47418d9Smrgfi 1182993d9adc1SmrgAC_SUBST([install_sh])]) 1183072b676d7Smrg 1183193d9adc1Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 1183272b676d7Smrg# 1183372b676d7Smrg# This file is free software; the Free Software Foundation 1183472b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1183572b676d7Smrg# with or without modifications, as long as this notice is preserved. 1183672b676d7Smrg 1183772b676d7Smrg# Check whether the underlying file-system supports filenames 1183872b676d7Smrg# with a leading dot. For instance MS-DOS doesn't. 1183972b676d7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 1184072b676d7Smrg[rm -rf .tst 2>/dev/null 1184172b676d7Smrgmkdir .tst 2>/dev/null 1184272b676d7Smrgif test -d .tst; then 1184372b676d7Smrg am__leading_dot=. 1184472b676d7Smrgelse 1184572b676d7Smrg am__leading_dot=_ 1184672b676d7Smrgfi 1184772b676d7Smrgrmdir .tst 2>/dev/null 1184872b676d7SmrgAC_SUBST([am__leading_dot])]) 1184972b676d7Smrg 1185072b676d7Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 1185172b676d7Smrg# From Jim Meyering 1185272b676d7Smrg 1185393d9adc1Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 1185472b676d7Smrg# 1185572b676d7Smrg# This file is free software; the Free Software Foundation 1185672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1185772b676d7Smrg# with or without modifications, as long as this notice is preserved. 1185872b676d7Smrg 11859e47418d9Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11860e47418d9Smrg# ---------------------------------- 11861e47418d9Smrg# Control maintainer-specific portions of Makefiles. 1186293d9adc1Smrg# Default is to disable them, unless 'enable' is passed literally. 1186393d9adc1Smrg# For symmetry, 'disable' may be passed as well. Anyway, the user 11864e47418d9Smrg# can override the default with the --enable/--disable switch. 1186572b676d7SmrgAC_DEFUN([AM_MAINTAINER_MODE], 11866e47418d9Smrg[m4_case(m4_default([$1], [disable]), 11867e47418d9Smrg [enable], [m4_define([am_maintainer_other], [disable])], 11868e47418d9Smrg [disable], [m4_define([am_maintainer_other], [enable])], 11869e47418d9Smrg [m4_define([am_maintainer_other], [enable]) 11870e47418d9Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 1187174c14cd6SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11872e47418d9Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11873e47418d9Smrg AC_ARG_ENABLE([maintainer-mode], 1187493d9adc1Smrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 1187593d9adc1Smrg am_maintainer_other[ make rules and dependencies not useful 1187693d9adc1Smrg (and sometimes confusing) to the casual installer])], 1187793d9adc1Smrg [USE_MAINTAINER_MODE=$enableval], 1187893d9adc1Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 1187972b676d7Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11880e47418d9Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 1188172b676d7Smrg MAINT=$MAINTAINER_MODE_TRUE 11882e47418d9Smrg AC_SUBST([MAINT])dnl 1188372b676d7Smrg] 1188472b676d7Smrg) 1188572b676d7Smrg 1188672b676d7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1188772b676d7Smrg 1188893d9adc1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 1188972b676d7Smrg# 1189072b676d7Smrg# This file is free software; the Free Software Foundation 1189172b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1189272b676d7Smrg# with or without modifications, as long as this notice is preserved. 1189372b676d7Smrg 1189472b676d7Smrg# AM_MAKE_INCLUDE() 1189572b676d7Smrg# ----------------- 1189672b676d7Smrg# Check to see how make treats includes. 1189772b676d7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 1189872b676d7Smrg[am_make=${MAKE-make} 1189972b676d7Smrgcat > confinc << 'END' 1190072b676d7Smrgam__doit: 11901e47418d9Smrg @echo this is the am__doit target 1190272b676d7Smrg.PHONY: am__doit 1190372b676d7SmrgEND 1190472b676d7Smrg# If we don't find an include directive, just comment out the code. 1190572b676d7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 1190672b676d7Smrgam__include="#" 1190772b676d7Smrgam__quote= 1190872b676d7Smrg_am_result=none 1190972b676d7Smrg# First try GNU make style include. 1191072b676d7Smrgecho "include confinc" > confmf 1191193d9adc1Smrg# Ignore all kinds of additional output from 'make'. 11912e47418d9Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11913e47418d9Smrg*the\ am__doit\ target*) 11914e47418d9Smrg am__include=include 11915e47418d9Smrg am__quote= 11916e47418d9Smrg _am_result=GNU 11917e47418d9Smrg ;; 11918e47418d9Smrgesac 1191972b676d7Smrg# Now try BSD make style include. 1192072b676d7Smrgif test "$am__include" = "#"; then 1192172b676d7Smrg echo '.include "confinc"' > confmf 11922e47418d9Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 11923e47418d9Smrg *the\ am__doit\ target*) 11924e47418d9Smrg am__include=.include 11925e47418d9Smrg am__quote="\"" 11926e47418d9Smrg _am_result=BSD 11927e47418d9Smrg ;; 11928e47418d9Smrg esac 1192972b676d7Smrgfi 1193072b676d7SmrgAC_SUBST([am__include]) 1193172b676d7SmrgAC_SUBST([am__quote]) 1193272b676d7SmrgAC_MSG_RESULT([$_am_result]) 1193372b676d7Smrgrm -f confinc confmf 1193472b676d7Smrg]) 1193572b676d7Smrg 1193672b676d7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1193772b676d7Smrg 1193893d9adc1Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 1193972b676d7Smrg# 1194072b676d7Smrg# This file is free software; the Free Software Foundation 1194172b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1194272b676d7Smrg# with or without modifications, as long as this notice is preserved. 1194372b676d7Smrg 1194472b676d7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 1194572b676d7Smrg# ------------------------------ 1194672b676d7SmrgAC_DEFUN([AM_MISSING_PROG], 1194772b676d7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1194872b676d7Smrg$1=${$1-"${am_missing_run}$2"} 1194972b676d7SmrgAC_SUBST($1)]) 1195072b676d7Smrg 1195172b676d7Smrg# AM_MISSING_HAS_RUN 1195272b676d7Smrg# ------------------ 1195393d9adc1Smrg# Define MISSING if not defined so far and test if it is modern enough. 1195493d9adc1Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 1195572b676d7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1195672b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 119571fd23544SmrgAC_REQUIRE_AUX_FILE([missing])dnl 11958e47418d9Smrgif test x"${MISSING+set}" != xset; then 11959e47418d9Smrg case $am_aux_dir in 11960e47418d9Smrg *\ * | *\ *) 11961e47418d9Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 11962e47418d9Smrg *) 11963e47418d9Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 11964e47418d9Smrg esac 11965e47418d9Smrgfi 1196672b676d7Smrg# Use eval to expand $SHELL 1196793d9adc1Smrgif eval "$MISSING --is-lightweight"; then 1196893d9adc1Smrg am_missing_run="$MISSING " 1196972b676d7Smrgelse 1197072b676d7Smrg am_missing_run= 1197193d9adc1Smrg AC_MSG_WARN(['missing' script is too old or missing]) 1197272b676d7Smrgfi 1197372b676d7Smrg]) 1197472b676d7Smrg 1197572b676d7Smrg# Helper functions for option handling. -*- Autoconf -*- 1197672b676d7Smrg 1197793d9adc1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 1197872b676d7Smrg# 1197972b676d7Smrg# This file is free software; the Free Software Foundation 1198072b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1198172b676d7Smrg# with or without modifications, as long as this notice is preserved. 1198272b676d7Smrg 1198372b676d7Smrg# _AM_MANGLE_OPTION(NAME) 1198472b676d7Smrg# ----------------------- 1198572b676d7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1198672b676d7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1198772b676d7Smrg 1198872b676d7Smrg# _AM_SET_OPTION(NAME) 1198974c14cd6Smrg# -------------------- 1199072b676d7Smrg# Set option NAME. Presently that only means defining a flag for this option. 1199172b676d7SmrgAC_DEFUN([_AM_SET_OPTION], 1199293d9adc1Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 1199372b676d7Smrg 1199472b676d7Smrg# _AM_SET_OPTIONS(OPTIONS) 1199574c14cd6Smrg# ------------------------ 1199672b676d7Smrg# OPTIONS is a space-separated list of Automake options. 1199772b676d7SmrgAC_DEFUN([_AM_SET_OPTIONS], 11998e47418d9Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1199972b676d7Smrg 1200072b676d7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1200172b676d7Smrg# ------------------------------------------- 1200272b676d7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1200372b676d7SmrgAC_DEFUN([_AM_IF_OPTION], 1200472b676d7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1200572b676d7Smrg 1200693d9adc1Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 1200793d9adc1Smrg# 1200893d9adc1Smrg# This file is free software; the Free Software Foundation 1200993d9adc1Smrg# gives unlimited permission to copy and/or distribute it, 1201093d9adc1Smrg# with or without modifications, as long as this notice is preserved. 1201172b676d7Smrg 1201293d9adc1Smrg# _AM_PROG_CC_C_O 1201393d9adc1Smrg# --------------- 1201493d9adc1Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 1201593d9adc1Smrg# to automatically call this. 1201693d9adc1SmrgAC_DEFUN([_AM_PROG_CC_C_O], 1201793d9adc1Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1201893d9adc1SmrgAC_REQUIRE_AUX_FILE([compile])dnl 1201993d9adc1SmrgAC_LANG_PUSH([C])dnl 1202093d9adc1SmrgAC_CACHE_CHECK( 1202193d9adc1Smrg [whether $CC understands -c and -o together], 1202293d9adc1Smrg [am_cv_prog_cc_c_o], 1202393d9adc1Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 1202493d9adc1Smrg # Make sure it works both with $CC and with simple cc. 1202593d9adc1Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 1202693d9adc1Smrg # compilers refuse to overwrite an existing .o file with -o, 1202793d9adc1Smrg # though they will create one. 1202893d9adc1Smrg am_cv_prog_cc_c_o=yes 1202993d9adc1Smrg for am_i in 1 2; do 1203093d9adc1Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 1203193d9adc1Smrg && test -f conftest2.$ac_objext; then 1203293d9adc1Smrg : OK 1203393d9adc1Smrg else 1203493d9adc1Smrg am_cv_prog_cc_c_o=no 1203593d9adc1Smrg break 1203693d9adc1Smrg fi 1203793d9adc1Smrg done 1203893d9adc1Smrg rm -f core conftest* 1203993d9adc1Smrg unset am_i]) 1204093d9adc1Smrgif test "$am_cv_prog_cc_c_o" != yes; then 1204193d9adc1Smrg # Losing compiler, so override with the script. 1204293d9adc1Smrg # FIXME: It is wrong to rewrite CC. 1204393d9adc1Smrg # But if we don't then we get into trouble of one sort or another. 1204493d9adc1Smrg # A longer-term fix would be to have automake use am__CC in this case, 1204593d9adc1Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 1204693d9adc1Smrg CC="$am_aux_dir/compile $CC" 1204793d9adc1Smrgfi 1204893d9adc1SmrgAC_LANG_POP([C])]) 1204993d9adc1Smrg 1205093d9adc1Smrg# For backward compatibility. 1205193d9adc1SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 1205293d9adc1Smrg 1205393d9adc1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 1205472b676d7Smrg# 1205572b676d7Smrg# This file is free software; the Free Software Foundation 1205672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1205772b676d7Smrg# with or without modifications, as long as this notice is preserved. 1205872b676d7Smrg 1205993d9adc1Smrg# AM_RUN_LOG(COMMAND) 1206093d9adc1Smrg# ------------------- 1206193d9adc1Smrg# Run COMMAND, save the exit status in ac_status, and log it. 1206293d9adc1Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1206393d9adc1SmrgAC_DEFUN([AM_RUN_LOG], 1206493d9adc1Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1206593d9adc1Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1206693d9adc1Smrg ac_status=$? 1206793d9adc1Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1206893d9adc1Smrg (exit $ac_status); }]) 1206993d9adc1Smrg 1207093d9adc1Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1207193d9adc1Smrg 1207293d9adc1Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 1207393d9adc1Smrg# 1207493d9adc1Smrg# This file is free software; the Free Software Foundation 1207593d9adc1Smrg# gives unlimited permission to copy and/or distribute it, 1207693d9adc1Smrg# with or without modifications, as long as this notice is preserved. 1207772b676d7Smrg 1207872b676d7Smrg# AM_SANITY_CHECK 1207972b676d7Smrg# --------------- 1208072b676d7SmrgAC_DEFUN([AM_SANITY_CHECK], 1208172b676d7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 12082e47418d9Smrg# Reject unsafe characters in $srcdir or the absolute working directory 12083e47418d9Smrg# name. Accept space and tab only in the latter. 12084e47418d9Smrgam_lf=' 12085e47418d9Smrg' 12086e47418d9Smrgcase `pwd` in 12087e47418d9Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 12088e47418d9Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 12089e47418d9Smrgesac 12090e47418d9Smrgcase $srcdir in 12091e47418d9Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1209293d9adc1Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12093e47418d9Smrgesac 12094e47418d9Smrg 1209593d9adc1Smrg# Do 'set' in a subshell so we don't clobber the current shell's 1209672b676d7Smrg# arguments. Must try -L first in case configure is actually a 1209772b676d7Smrg# symlink; some systems play weird games with the mod time of symlinks 1209872b676d7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 1209972b676d7Smrg# directory). 1210072b676d7Smrgif ( 1210193d9adc1Smrg am_has_slept=no 1210293d9adc1Smrg for am_try in 1 2; do 1210393d9adc1Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 1210493d9adc1Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1210593d9adc1Smrg if test "$[*]" = "X"; then 1210693d9adc1Smrg # -L didn't work. 1210793d9adc1Smrg set X `ls -t "$srcdir/configure" conftest.file` 1210893d9adc1Smrg fi 1210993d9adc1Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1211093d9adc1Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1211193d9adc1Smrg 1211293d9adc1Smrg # If neither matched, then we have a broken ls. This can happen 1211393d9adc1Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1211493d9adc1Smrg # broken ls alias from the environment. This has actually 1211593d9adc1Smrg # happened. Such a system could not be considered "sane". 1211693d9adc1Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1211793d9adc1Smrg alias in your environment]) 1211893d9adc1Smrg fi 1211993d9adc1Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 1212093d9adc1Smrg break 1212193d9adc1Smrg fi 1212293d9adc1Smrg # Just in case. 1212393d9adc1Smrg sleep 1 1212493d9adc1Smrg am_has_slept=yes 1212593d9adc1Smrg done 1212672b676d7Smrg test "$[2]" = conftest.file 1212772b676d7Smrg ) 1212872b676d7Smrgthen 1212972b676d7Smrg # Ok. 1213072b676d7Smrg : 1213172b676d7Smrgelse 1213272b676d7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 1213372b676d7SmrgCheck your system clock]) 1213472b676d7Smrgfi 1213593d9adc1SmrgAC_MSG_RESULT([yes]) 1213693d9adc1Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 1213793d9adc1Smrg# generated files are strictly newer. 1213893d9adc1Smrgam_sleep_pid= 1213993d9adc1Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 1214093d9adc1Smrg ( sleep 1 ) & 1214193d9adc1Smrg am_sleep_pid=$! 1214293d9adc1Smrgfi 1214393d9adc1SmrgAC_CONFIG_COMMANDS_PRE( 1214493d9adc1Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 1214593d9adc1Smrg if test -n "$am_sleep_pid"; then 1214693d9adc1Smrg # Hide warnings about reused PIDs. 1214793d9adc1Smrg wait $am_sleep_pid 2>/dev/null 1214893d9adc1Smrg fi 1214993d9adc1Smrg AC_MSG_RESULT([done])]) 1215093d9adc1Smrgrm -f conftest.file 1215193d9adc1Smrg]) 1215272b676d7Smrg 1215393d9adc1Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 12154e35772b2Smrg# 12155e35772b2Smrg# This file is free software; the Free Software Foundation 12156e35772b2Smrg# gives unlimited permission to copy and/or distribute it, 12157e35772b2Smrg# with or without modifications, as long as this notice is preserved. 12158e35772b2Smrg 12159e35772b2Smrg# AM_SILENT_RULES([DEFAULT]) 12160e35772b2Smrg# -------------------------- 12161e35772b2Smrg# Enable less verbose build rules; with the default set to DEFAULT 1216293d9adc1Smrg# ("yes" being less verbose, "no" or empty being verbose). 12163e35772b2SmrgAC_DEFUN([AM_SILENT_RULES], 1216493d9adc1Smrg[AC_ARG_ENABLE([silent-rules], [dnl 1216593d9adc1SmrgAS_HELP_STRING( 1216693d9adc1Smrg [--enable-silent-rules], 1216793d9adc1Smrg [less verbose build output (undo: "make V=1")]) 1216893d9adc1SmrgAS_HELP_STRING( 1216993d9adc1Smrg [--disable-silent-rules], 1217093d9adc1Smrg [verbose build output (undo: "make V=0")])dnl 1217193d9adc1Smrg]) 1217293d9adc1Smrgcase $enable_silent_rules in @%:@ ((( 1217393d9adc1Smrg yes) AM_DEFAULT_VERBOSITY=0;; 1217493d9adc1Smrg no) AM_DEFAULT_VERBOSITY=1;; 1217593d9adc1Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12176e35772b2Smrgesac 1217774c14cd6Smrgdnl 1217893d9adc1Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 1217974c14cd6Smrgdnl do not support nested variable expansions. 1218074c14cd6Smrgdnl See automake bug#9928 and bug#10237. 1218174c14cd6Smrgam_make=${MAKE-make} 1218274c14cd6SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 1218374c14cd6Smrg [am_cv_make_support_nested_variables], 1218474c14cd6Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 1218574c14cd6SmrgBAR0=false 1218674c14cd6SmrgBAR1=true 1218774c14cd6SmrgV=1 1218874c14cd6Smrgam__doit: 1218974c14cd6Smrg @$(TRUE) 1219074c14cd6Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1219174c14cd6Smrg am_cv_make_support_nested_variables=yes 1219274c14cd6Smrgelse 1219374c14cd6Smrg am_cv_make_support_nested_variables=no 1219474c14cd6Smrgfi]) 1219574c14cd6Smrgif test $am_cv_make_support_nested_variables = yes; then 1219693d9adc1Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 1219774c14cd6Smrg AM_V='$(V)' 1219874c14cd6Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1219974c14cd6Smrgelse 1220074c14cd6Smrg AM_V=$AM_DEFAULT_VERBOSITY 1220174c14cd6Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1220274c14cd6Smrgfi 1220374c14cd6SmrgAC_SUBST([AM_V])dnl 1220474c14cd6SmrgAM_SUBST_NOTMAKE([AM_V])dnl 1220574c14cd6SmrgAC_SUBST([AM_DEFAULT_V])dnl 1220674c14cd6SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12207e35772b2SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12208e35772b2SmrgAM_BACKSLASH='\' 12209e35772b2SmrgAC_SUBST([AM_BACKSLASH])dnl 12210e35772b2Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12211e35772b2Smrg]) 12212e35772b2Smrg 1221393d9adc1Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 1221472b676d7Smrg# 1221572b676d7Smrg# This file is free software; the Free Software Foundation 1221672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1221772b676d7Smrg# with or without modifications, as long as this notice is preserved. 1221872b676d7Smrg 1221972b676d7Smrg# AM_PROG_INSTALL_STRIP 1222072b676d7Smrg# --------------------- 1222193d9adc1Smrg# One issue with vendor 'install' (even GNU) is that you can't 1222272b676d7Smrg# specify the program used to strip binaries. This is especially 1222372b676d7Smrg# annoying in cross-compiling environments, where the build's strip 1222472b676d7Smrg# is unlikely to handle the host's binaries. 1222572b676d7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1222693d9adc1Smrg# always use install-sh in "make install-strip", and initialize 1222772b676d7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 1222872b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1222972b676d7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1223093d9adc1Smrg# Installed binaries are usually stripped using 'strip' when the user 1223193d9adc1Smrg# run "make install-strip". However 'strip' might not be the right 1223272b676d7Smrg# tool to use in cross-compilation environments, therefore Automake 1223393d9adc1Smrg# will honor the 'STRIP' environment variable to overrule this program. 1223493d9adc1Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1223572b676d7Smrgif test "$cross_compiling" != no; then 1223672b676d7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1223772b676d7Smrgfi 122381fd23544SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1223972b676d7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1224072b676d7Smrg 1224193d9adc1Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 122421fd23544Smrg# 122431fd23544Smrg# This file is free software; the Free Software Foundation 122441fd23544Smrg# gives unlimited permission to copy and/or distribute it, 122451fd23544Smrg# with or without modifications, as long as this notice is preserved. 122461fd23544Smrg 122471fd23544Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 122481fd23544Smrg# --------------------------- 122491fd23544Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 122501fd23544Smrg# This macro is traced by Automake. 122511fd23544SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 122521fd23544Smrg 12253e47418d9Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1225474c14cd6Smrg# -------------------------- 12255e47418d9Smrg# Public sister of _AM_SUBST_NOTMAKE. 12256e47418d9SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12257e47418d9Smrg 1225872b676d7Smrg# Check how to create a tarball. -*- Autoconf -*- 1225972b676d7Smrg 1226093d9adc1Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 1226172b676d7Smrg# 1226272b676d7Smrg# This file is free software; the Free Software Foundation 1226372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1226472b676d7Smrg# with or without modifications, as long as this notice is preserved. 1226572b676d7Smrg 1226672b676d7Smrg# _AM_PROG_TAR(FORMAT) 1226772b676d7Smrg# -------------------- 1226872b676d7Smrg# Check how to create a tarball in format FORMAT. 1226993d9adc1Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1227072b676d7Smrg# 1227172b676d7Smrg# Substitute a variable $(am__tar) that is a command 1227272b676d7Smrg# writing to stdout a FORMAT-tarball containing the directory 1227372b676d7Smrg# $tardir. 1227472b676d7Smrg# tardir=directory && $(am__tar) > result.tar 1227572b676d7Smrg# 1227672b676d7Smrg# Substitute a variable $(am__untar) that extract such 1227772b676d7Smrg# a tarball read from stdin. 1227872b676d7Smrg# $(am__untar) < result.tar 1227993d9adc1Smrg# 1228072b676d7SmrgAC_DEFUN([_AM_PROG_TAR], 1228174c14cd6Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1228274c14cd6Smrg# in the wild :-( We should find a proper way to deprecate it ... 1228374c14cd6SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1228493d9adc1Smrg 1228593d9adc1Smrg# We'll loop over all known methods to create a tar archive until one works. 1228672b676d7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1228772b676d7Smrg 1228893d9adc1Smrgm4_if([$1], [v7], 1228993d9adc1Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1229093d9adc1Smrg 1229193d9adc1Smrg [m4_case([$1], 1229293d9adc1Smrg [ustar], 1229393d9adc1Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1229493d9adc1Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1229593d9adc1Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1229693d9adc1Smrg # and bug#13588). 1229793d9adc1Smrg am_max_uid=2097151 # 2^21 - 1 1229893d9adc1Smrg am_max_gid=$am_max_uid 1229993d9adc1Smrg # The $UID and $GID variables are not portable, so we need to resort 1230093d9adc1Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1230193d9adc1Smrg # below are definitely unexpected, so allow the users to see them 1230293d9adc1Smrg # (that is, avoid stderr redirection). 1230393d9adc1Smrg am_uid=`id -u || echo unknown` 1230493d9adc1Smrg am_gid=`id -g || echo unknown` 1230593d9adc1Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1230693d9adc1Smrg if test $am_uid -le $am_max_uid; then 1230793d9adc1Smrg AC_MSG_RESULT([yes]) 1230893d9adc1Smrg else 1230993d9adc1Smrg AC_MSG_RESULT([no]) 1231093d9adc1Smrg _am_tools=none 1231193d9adc1Smrg fi 1231293d9adc1Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1231393d9adc1Smrg if test $am_gid -le $am_max_gid; then 1231493d9adc1Smrg AC_MSG_RESULT([yes]) 1231593d9adc1Smrg else 1231693d9adc1Smrg AC_MSG_RESULT([no]) 1231793d9adc1Smrg _am_tools=none 1231893d9adc1Smrg fi], 1231972b676d7Smrg 1232093d9adc1Smrg [pax], 1232193d9adc1Smrg [], 1232293d9adc1Smrg 1232393d9adc1Smrg [m4_fatal([Unknown tar format])]) 1232493d9adc1Smrg 1232593d9adc1Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1232693d9adc1Smrg 1232793d9adc1Smrg # Go ahead even if we have the value already cached. We do so because we 1232893d9adc1Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1232993d9adc1Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1233093d9adc1Smrg 1233193d9adc1Smrg for _am_tool in $_am_tools; do 1233293d9adc1Smrg case $_am_tool in 1233393d9adc1Smrg gnutar) 1233493d9adc1Smrg for _am_tar in tar gnutar gtar; do 1233593d9adc1Smrg AM_RUN_LOG([$_am_tar --version]) && break 1233693d9adc1Smrg done 1233793d9adc1Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1233893d9adc1Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1233993d9adc1Smrg am__untar="$_am_tar -xf -" 1234093d9adc1Smrg ;; 1234193d9adc1Smrg plaintar) 1234293d9adc1Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1234393d9adc1Smrg # ustar tarball either. 1234493d9adc1Smrg (tar --version) >/dev/null 2>&1 && continue 1234593d9adc1Smrg am__tar='tar chf - "$$tardir"' 1234693d9adc1Smrg am__tar_='tar chf - "$tardir"' 1234793d9adc1Smrg am__untar='tar xf -' 1234893d9adc1Smrg ;; 1234993d9adc1Smrg pax) 1235093d9adc1Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1235193d9adc1Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1235293d9adc1Smrg am__untar='pax -r' 1235393d9adc1Smrg ;; 1235493d9adc1Smrg cpio) 1235593d9adc1Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1235693d9adc1Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1235793d9adc1Smrg am__untar='cpio -i -H $1 -d' 1235893d9adc1Smrg ;; 1235993d9adc1Smrg none) 1236093d9adc1Smrg am__tar=false 1236193d9adc1Smrg am__tar_=false 1236293d9adc1Smrg am__untar=false 1236393d9adc1Smrg ;; 1236493d9adc1Smrg esac 1236593d9adc1Smrg 1236693d9adc1Smrg # If the value was cached, stop now. We just wanted to have am__tar 1236793d9adc1Smrg # and am__untar set. 1236893d9adc1Smrg test -n "${am_cv_prog_tar_$1}" && break 1236993d9adc1Smrg 1237093d9adc1Smrg # tar/untar a dummy directory, and stop if the command works. 1237193d9adc1Smrg rm -rf conftest.dir 1237293d9adc1Smrg mkdir conftest.dir 1237393d9adc1Smrg echo GrepMe > conftest.dir/file 1237493d9adc1Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1237593d9adc1Smrg rm -rf conftest.dir 1237693d9adc1Smrg if test -s conftest.tar; then 1237793d9adc1Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1237893d9adc1Smrg AM_RUN_LOG([cat conftest.dir/file]) 1237993d9adc1Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1238093d9adc1Smrg fi 1238193d9adc1Smrg done 1238272b676d7Smrg rm -rf conftest.dir 1238372b676d7Smrg 1238493d9adc1Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1238593d9adc1Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1238693d9adc1Smrg 1238772b676d7SmrgAC_SUBST([am__tar]) 1238872b676d7SmrgAC_SUBST([am__untar]) 1238972b676d7Smrg]) # _AM_PROG_TAR 1239072b676d7Smrg 12391