aclocal.m4 revision 74fcc364
174fcc364Smrg# generated automatically by aclocal 1.15.1 -*- Autoconf -*- 293d9adc1Smrg 374fcc364Smrg# Copyright (C) 1996-2017 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# NOTE: Changes made to this file will be lost: look at ltmain.sh. 74821525869Smrg 74921525869Smrg# Provide generalized library-building support services. 75021525869Smrg# Written by Gordon Matzigkeit, 1996 75121525869Smrg 752e35772b2Smrg_LT_COPYING 753e35772b2Smrg_LT_LIBTOOL_TAGS 754e35772b2Smrg 75521525869Smrg# Configured defaults for sys_lib_dlsearch_path munging. 75621525869Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 75721525869Smrg 758e35772b2Smrg# ### BEGIN LIBTOOL CONFIG 759e35772b2Smrg_LT_LIBTOOL_CONFIG_VARS 760e35772b2Smrg_LT_LIBTOOL_TAG_VARS 761e35772b2Smrg# ### END LIBTOOL CONFIG 762e35772b2Smrg 76321525869Smrg_LT_EOF 76421525869Smrg 76521525869Smrg cat <<'_LT_EOF' >> "$cfgfile" 76621525869Smrg 76721525869Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 76821525869Smrg 76921525869Smrg_LT_PREPARE_MUNGE_PATH_LIST 77021525869Smrg_LT_PREPARE_CC_BASENAME 77121525869Smrg 77221525869Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 77321525869Smrg 774e35772b2Smrg_LT_EOF 775e35772b2Smrg 776e35772b2Smrg case $host_os in 777e35772b2Smrg aix3*) 778e35772b2Smrg cat <<\_LT_EOF >> "$cfgfile" 779e35772b2Smrg# AIX sometimes has problems with the GCC collect2 program. For some 780e35772b2Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 781e35772b2Smrg# vanish in a puff of smoke. 78221525869Smrgif test set != "${COLLECT_NAMES+set}"; then 783e35772b2Smrg COLLECT_NAMES= 784e35772b2Smrg export COLLECT_NAMES 785e35772b2Smrgfi 786e35772b2Smrg_LT_EOF 787e35772b2Smrg ;; 788e35772b2Smrg esac 789e35772b2Smrg 790e35772b2Smrg _LT_PROG_LTMAIN 791e35772b2Smrg 792e35772b2Smrg # We use sed instead of cat because bash on DJGPP gets confused if 793e35772b2Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 794e35772b2Smrg # text mode, it properly converts lines to CR/LF. This bash problem 795e35772b2Smrg # is reportedly fixed, but why not run on old versions too? 79674c14cd6Smrg sed '$q' "$ltmain" >> "$cfgfile" \ 79774c14cd6Smrg || (rm -f "$cfgfile"; exit 1) 798e35772b2Smrg 79974c14cd6Smrg mv -f "$cfgfile" "$ofile" || 800e35772b2Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 801e35772b2Smrg chmod +x "$ofile" 802e35772b2Smrg], 803e35772b2Smrg[cat <<_LT_EOF >> "$ofile" 804e35772b2Smrg 805e35772b2Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 806e35772b2Smrgdnl in a comment (ie after a #). 807e35772b2Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 808e35772b2Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 809e35772b2Smrg# ### END LIBTOOL TAG CONFIG: $1 810e35772b2Smrg_LT_EOF 811e35772b2Smrg])dnl /m4_if 812e35772b2Smrg], 813e35772b2Smrg[m4_if([$1], [], [ 814e35772b2Smrg PACKAGE='$PACKAGE' 815e35772b2Smrg VERSION='$VERSION' 816e35772b2Smrg RM='$RM' 817e35772b2Smrg ofile='$ofile'], []) 818e35772b2Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 819e35772b2Smrg])# _LT_CONFIG 820e35772b2Smrg 821e35772b2Smrg 822e35772b2Smrg# LT_SUPPORTED_TAG(TAG) 823e35772b2Smrg# --------------------- 824e35772b2Smrg# Trace this macro to discover what tags are supported by the libtool 825e35772b2Smrg# --tag option, using: 826e35772b2Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 827e35772b2SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 828e35772b2Smrg 829e35772b2Smrg 830e35772b2Smrg# C support is built-in for now 831e35772b2Smrgm4_define([_LT_LANG_C_enabled], []) 832e35772b2Smrgm4_define([_LT_TAGS], []) 833e35772b2Smrg 834e35772b2Smrg 835e35772b2Smrg# LT_LANG(LANG) 836e35772b2Smrg# ------------- 837e35772b2Smrg# Enable libtool support for the given language if not already enabled. 838e35772b2SmrgAC_DEFUN([LT_LANG], 839e35772b2Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 840e35772b2Smrgm4_case([$1], 841e35772b2Smrg [C], [_LT_LANG(C)], 842e35772b2Smrg [C++], [_LT_LANG(CXX)], 84374c14cd6Smrg [Go], [_LT_LANG(GO)], 844e35772b2Smrg [Java], [_LT_LANG(GCJ)], 845e35772b2Smrg [Fortran 77], [_LT_LANG(F77)], 846e35772b2Smrg [Fortran], [_LT_LANG(FC)], 847e35772b2Smrg [Windows Resource], [_LT_LANG(RC)], 848e35772b2Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 849e35772b2Smrg [_LT_LANG($1)], 850e35772b2Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 851e35772b2Smrg])# LT_LANG 852e35772b2Smrg 853e35772b2Smrg 854e35772b2Smrg# _LT_LANG(LANGNAME) 855e35772b2Smrg# ------------------ 856e35772b2Smrgm4_defun([_LT_LANG], 857e35772b2Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 858e35772b2Smrg [LT_SUPPORTED_TAG([$1])dnl 859e35772b2Smrg m4_append([_LT_TAGS], [$1 ])dnl 860e35772b2Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 861e35772b2Smrg _LT_LANG_$1_CONFIG($1)])dnl 862e35772b2Smrg])# _LT_LANG 863e35772b2Smrg 864e35772b2Smrg 86574c14cd6Smrgm4_ifndef([AC_PROG_GO], [ 86674c14cd6Smrg# NOTE: This macro has been submitted for inclusion into # 86774c14cd6Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 86874c14cd6Smrg# a released version of Autoconf we should remove this # 86974c14cd6Smrg# macro and use it instead. # 87074c14cd6Smrgm4_defun([AC_PROG_GO], 87174c14cd6Smrg[AC_LANG_PUSH(Go)dnl 87274c14cd6SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 87374c14cd6SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 87474c14cd6Smrg_AC_ARG_VAR_LDFLAGS()dnl 87574c14cd6SmrgAC_CHECK_TOOL(GOC, gccgo) 87674c14cd6Smrgif test -z "$GOC"; then 87774c14cd6Smrg if test -n "$ac_tool_prefix"; then 87874c14cd6Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 87974c14cd6Smrg fi 88074c14cd6Smrgfi 88174c14cd6Smrgif test -z "$GOC"; then 88274c14cd6Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 88374c14cd6Smrgfi 88474c14cd6Smrg])#m4_defun 88574c14cd6Smrg])#m4_ifndef 88674c14cd6Smrg 88774c14cd6Smrg 888e35772b2Smrg# _LT_LANG_DEFAULT_CONFIG 889e35772b2Smrg# ----------------------- 890e35772b2Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 891e35772b2Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 892e35772b2Smrg [LT_LANG(CXX)], 893e35772b2Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 894e35772b2Smrg 895e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 896e35772b2Smrg [LT_LANG(F77)], 897e35772b2Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 898e35772b2Smrg 899e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 900e35772b2Smrg [LT_LANG(FC)], 901e35772b2Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 902e35772b2Smrg 903e35772b2Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 904e35772b2Smrgdnl pulling things in needlessly. 905e35772b2SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 906e35772b2Smrg [LT_LANG(GCJ)], 907e35772b2Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 908e35772b2Smrg [LT_LANG(GCJ)], 909e35772b2Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 910e35772b2Smrg [LT_LANG(GCJ)], 911e35772b2Smrg [m4_ifdef([AC_PROG_GCJ], 912e35772b2Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 913e35772b2Smrg m4_ifdef([A][M_PROG_GCJ], 914e35772b2Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 915e35772b2Smrg m4_ifdef([LT_PROG_GCJ], 916e35772b2Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 917e35772b2Smrg 91874c14cd6SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 91974c14cd6Smrg [LT_LANG(GO)], 92074c14cd6Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 92174c14cd6Smrg 922e35772b2SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 923e35772b2Smrg [LT_LANG(RC)], 924e35772b2Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 925e35772b2Smrg])# _LT_LANG_DEFAULT_CONFIG 926e35772b2Smrg 927e35772b2Smrg# Obsolete macros: 928e35772b2SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 929e35772b2SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 930e35772b2SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 931e35772b2SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 93274c14cd6SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 933e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 934e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 935e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 936e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 937e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 93874c14cd6Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 939e35772b2Smrg 940e35772b2Smrg 941e35772b2Smrg# _LT_TAG_COMPILER 942e35772b2Smrg# ---------------- 943e35772b2Smrgm4_defun([_LT_TAG_COMPILER], 94472b676d7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 94572b676d7Smrg 946e35772b2Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 947e35772b2Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 948e35772b2Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 949e35772b2Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 950e35772b2Smrg 95172b676d7Smrg# If no C compiler was specified, use CC. 95272b676d7SmrgLTCC=${LTCC-"$CC"} 95372b676d7Smrg 95472b676d7Smrg# If no C compiler flags were specified, use CFLAGS. 95572b676d7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 95672b676d7Smrg 95772b676d7Smrg# Allow CC to be a program name with arguments. 95872b676d7Smrgcompiler=$CC 959e35772b2Smrg])# _LT_TAG_COMPILER 96072b676d7Smrg 96172b676d7Smrg 96272b676d7Smrg# _LT_COMPILER_BOILERPLATE 96372b676d7Smrg# ------------------------ 96472b676d7Smrg# Check for compiler boilerplate output or warnings with 96572b676d7Smrg# the simple compiler test code. 966e35772b2Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 967e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 9681fd23544Smrgac_outfile=conftest.$ac_objext 9691fd23544Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 97072b676d7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 97172b676d7Smrg_lt_compiler_boilerplate=`cat conftest.err` 972e35772b2Smrg$RM conftest* 97372b676d7Smrg])# _LT_COMPILER_BOILERPLATE 97472b676d7Smrg 97572b676d7Smrg 97672b676d7Smrg# _LT_LINKER_BOILERPLATE 97772b676d7Smrg# ---------------------- 97872b676d7Smrg# Check for linker boilerplate output or warnings with 97972b676d7Smrg# the simple link test code. 980e35772b2Smrgm4_defun([_LT_LINKER_BOILERPLATE], 981e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 9821fd23544Smrgac_outfile=conftest.$ac_objext 9831fd23544Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 98472b676d7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 98572b676d7Smrg_lt_linker_boilerplate=`cat conftest.err` 986e35772b2Smrg$RM -r conftest* 98772b676d7Smrg])# _LT_LINKER_BOILERPLATE 98872b676d7Smrg 9891fd23544Smrg# _LT_REQUIRED_DARWIN_CHECKS 990e35772b2Smrg# ------------------------- 991e35772b2Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9921fd23544Smrg case $host_os in 9931fd23544Smrg rhapsody* | darwin*) 9941fd23544Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9951fd23544Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 996e35772b2Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 997e35772b2Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 998e35772b2Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 999e35772b2Smrg _LT_DECL([], [DSYMUTIL], [1], 1000e35772b2Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1001e35772b2Smrg _LT_DECL([], [NMEDIT], [1], 1002e35772b2Smrg [Tool to change global to local symbols on Mac OS X]) 1003e35772b2Smrg _LT_DECL([], [LIPO], [1], 1004e35772b2Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 1005e35772b2Smrg _LT_DECL([], [OTOOL], [1], 1006e35772b2Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1007e35772b2Smrg _LT_DECL([], [OTOOL64], [1], 1008e35772b2Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 10091fd23544Smrg 10101fd23544Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 10111fd23544Smrg [lt_cv_apple_cc_single_mod=no 101221525869Smrg if test -z "$LT_MULTI_MODULE"; then 1013e35772b2Smrg # By default we will add the -single_module flag. You can override 1014e35772b2Smrg # by either setting the environment variable LT_MULTI_MODULE 1015e35772b2Smrg # non-empty at configure time, or by adding -multi_module to the 1016e35772b2Smrg # link flags. 1017e35772b2Smrg rm -rf libconftest.dylib* 1018e35772b2Smrg echo "int foo(void){return 1;}" > conftest.c 1019e35772b2Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1020e35772b2Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1021e35772b2Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1022e35772b2Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1023e35772b2Smrg _lt_result=$? 102474c14cd6Smrg # If there is a non-empty error log, and "single_module" 102574c14cd6Smrg # appears in it, assume the flag caused a linker warning 102674c14cd6Smrg if test -s conftest.err && $GREP single_module conftest.err; then 102774c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 102874c14cd6Smrg # Otherwise, if the output was created with a 0 exit code from 102974c14cd6Smrg # the compiler, it worked. 103021525869Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1031e35772b2Smrg lt_cv_apple_cc_single_mod=yes 1032e35772b2Smrg else 1033e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1034e35772b2Smrg fi 1035e35772b2Smrg rm -rf libconftest.dylib* 1036e35772b2Smrg rm -f conftest.* 10371fd23544Smrg fi]) 103874c14cd6Smrg 10391fd23544Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10401fd23544Smrg [lt_cv_ld_exported_symbols_list], 10411fd23544Smrg [lt_cv_ld_exported_symbols_list=no 10421fd23544Smrg save_LDFLAGS=$LDFLAGS 10431fd23544Smrg echo "_main" > conftest.sym 10441fd23544Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10451fd23544Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1046e35772b2Smrg [lt_cv_ld_exported_symbols_list=yes], 1047e35772b2Smrg [lt_cv_ld_exported_symbols_list=no]) 104821525869Smrg LDFLAGS=$save_LDFLAGS 10491fd23544Smrg ]) 105074c14cd6Smrg 105174c14cd6Smrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 105274c14cd6Smrg [lt_cv_ld_force_load=no 105374c14cd6Smrg cat > conftest.c << _LT_EOF 105474c14cd6Smrgint forced_loaded() { return 2;} 105574c14cd6Smrg_LT_EOF 105674c14cd6Smrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 105774c14cd6Smrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 105874c14cd6Smrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 105974c14cd6Smrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 106074c14cd6Smrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 106174c14cd6Smrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 106274c14cd6Smrg cat > conftest.c << _LT_EOF 106374c14cd6Smrgint main() { return 0;} 106474c14cd6Smrg_LT_EOF 106574c14cd6Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 106674c14cd6Smrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 106774c14cd6Smrg _lt_result=$? 106874c14cd6Smrg if test -s conftest.err && $GREP force_load conftest.err; then 106974c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 107021525869Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 107174c14cd6Smrg lt_cv_ld_force_load=yes 107274c14cd6Smrg else 107374c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 107474c14cd6Smrg fi 107574c14cd6Smrg rm -f conftest.err libconftest.a conftest conftest.c 107674c14cd6Smrg rm -rf conftest.dSYM 107774c14cd6Smrg ]) 10781fd23544Smrg case $host_os in 1079e35772b2Smrg rhapsody* | darwin1.[[012]]) 108021525869Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 10811fd23544Smrg darwin1.*) 108221525869Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1083e35772b2Smrg darwin*) # darwin 5.x on 10841fd23544Smrg # if running on 10.5 or later, the deployment target defaults 10851fd23544Smrg # to the OS version, if on x86, and 10.4, the deployment 10861fd23544Smrg # target defaults to 10.4. Don't you love it? 10871fd23544Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1088e35772b2Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 108921525869Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 109021525869Smrg 10.[[012]][[,.]]*) 109121525869Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1092e35772b2Smrg 10.*) 109321525869Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10941fd23544Smrg esac 10951fd23544Smrg ;; 10961fd23544Smrg esac 109721525869Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 10981fd23544Smrg _lt_dar_single_mod='$single_module' 10991fd23544Smrg fi 110021525869Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 110121525869Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 11021fd23544Smrg else 110321525869Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 11041fd23544Smrg fi 110521525869Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1106e35772b2Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 11071fd23544Smrg else 11081fd23544Smrg _lt_dsymutil= 11091fd23544Smrg fi 11101fd23544Smrg ;; 11111fd23544Smrg esac 11121fd23544Smrg]) 111372b676d7Smrg 1114e35772b2Smrg 111574c14cd6Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 111674c14cd6Smrg# --------------------------------- 1117e35772b2Smrg# Checks for linker and compiler features on darwin 1118e35772b2Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1119e35772b2Smrg[ 1120e35772b2Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1121e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1122e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1123e35772b2Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1124e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 112521525869Smrg if test yes = "$lt_cv_ld_force_load"; then 112621525869Smrg _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\"`' 112774c14cd6Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 112874c14cd6Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 112974c14cd6Smrg else 113074c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 113174c14cd6Smrg fi 1132e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 113321525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1134e35772b2Smrg case $cc_basename in 113521525869Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1136e35772b2Smrg *) _lt_dar_can_shared=$GCC ;; 1137e35772b2Smrg esac 113821525869Smrg if test yes = "$_lt_dar_can_shared"; then 113974c14cd6Smrg output_verbose_link_cmd=func_echo_all 114021525869Smrg _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" 114121525869Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 114221525869Smrg _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" 114321525869Smrg _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" 1144e35772b2Smrg m4_if([$1], [CXX], 114521525869Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 114621525869Smrg _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" 114721525869Smrg _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" 1148e35772b2Smrg fi 1149e35772b2Smrg],[]) 1150e35772b2Smrg else 1151e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1152e35772b2Smrg fi 1153e35772b2Smrg]) 1154e35772b2Smrg 115574c14cd6Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 115674c14cd6Smrg# ---------------------------------- 115772b676d7Smrg# Links a minimal program and checks the executable 115872b676d7Smrg# for the system default hardcoded library path. In most cases, 115972b676d7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 116072b676d7Smrg# the location of the communication and MPI libs are included too. 116172b676d7Smrg# If we don't find anything, use the default library path according 116272b676d7Smrg# to the aix ld manual. 116374c14cd6Smrg# Store the results from the different compilers for each TAGNAME. 116474c14cd6Smrg# Allow to override them for all tags through lt_cv_aix_libpath. 1165e35772b2Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1166e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 116721525869Smrgif test set = "${lt_cv_aix_libpath+set}"; then 116874c14cd6Smrg aix_libpath=$lt_cv_aix_libpath 116974c14cd6Smrgelse 117074c14cd6Smrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 117174c14cd6Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 117274c14cd6Smrg lt_aix_libpath_sed='[ 117374c14cd6Smrg /Import File Strings/,/^$/ { 117474c14cd6Smrg /^0/ { 117574c14cd6Smrg s/^0 *\([^ ]*\) *$/\1/ 117674c14cd6Smrg p 117774c14cd6Smrg } 117874c14cd6Smrg }]' 117974c14cd6Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 118074c14cd6Smrg # Check for a 64-bit object if we didn't find anything. 118174c14cd6Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 118274c14cd6Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 118374c14cd6Smrg fi],[]) 118474c14cd6Smrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 118521525869Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 118674c14cd6Smrg fi 118774c14cd6Smrg ]) 118874c14cd6Smrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 118974c14cd6Smrgfi 1190e35772b2Smrg])# _LT_SYS_MODULE_PATH_AIX 119172b676d7Smrg 119272b676d7Smrg 1193e35772b2Smrg# _LT_SHELL_INIT(ARG) 1194e35772b2Smrg# ------------------- 1195e35772b2Smrgm4_define([_LT_SHELL_INIT], 119674c14cd6Smrg[m4_divert_text([M4SH-INIT], [$1 119774c14cd6Smrg])])# _LT_SHELL_INIT 119874c14cd6Smrg 119972b676d7Smrg 120072b676d7Smrg 1201e35772b2Smrg# _LT_PROG_ECHO_BACKSLASH 1202e35772b2Smrg# ----------------------- 120374c14cd6Smrg# Find how we can fake an echo command that does not interpret backslash. 120474c14cd6Smrg# In particular, with Autoconf 2.60 or later we add some code to the start 120521525869Smrg# of the generated configure script that will find a shell with a builtin 120621525869Smrg# printf (that we can use as an echo command). 1207e35772b2Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 120874c14cd6Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 120974c14cd6SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 121074c14cd6SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 121174c14cd6Smrg 121274c14cd6SmrgAC_MSG_CHECKING([how to print strings]) 121374c14cd6Smrg# Test print first, because it will be a builtin if present. 121474c14cd6Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 121574c14cd6Smrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 121674c14cd6Smrg ECHO='print -r --' 121774c14cd6Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 121874c14cd6Smrg ECHO='printf %s\n' 121972b676d7Smrgelse 122074c14cd6Smrg # Use this function as a fallback that always works. 122174c14cd6Smrg func_fallback_echo () 122274c14cd6Smrg { 122374c14cd6Smrg eval 'cat <<_LTECHO_EOF 122474c14cd6Smrg$[]1 122574c14cd6Smrg_LTECHO_EOF' 122674c14cd6Smrg } 122774c14cd6Smrg ECHO='func_fallback_echo' 122872b676d7Smrgfi 122972b676d7Smrg 123074c14cd6Smrg# func_echo_all arg... 123174c14cd6Smrg# Invoke $ECHO with all args, space-separated. 123274c14cd6Smrgfunc_echo_all () 123374c14cd6Smrg{ 123421525869Smrg $ECHO "$*" 123574c14cd6Smrg} 123672b676d7Smrg 123721525869Smrgcase $ECHO in 123874c14cd6Smrg printf*) AC_MSG_RESULT([printf]) ;; 123974c14cd6Smrg print*) AC_MSG_RESULT([print -r]) ;; 124074c14cd6Smrg *) AC_MSG_RESULT([cat]) ;; 124174c14cd6Smrgesac 124272b676d7Smrg 124374c14cd6Smrgm4_ifdef([_AS_DETECT_SUGGESTED], 124474c14cd6Smrg[_AS_DETECT_SUGGESTED([ 124574c14cd6Smrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 124674c14cd6Smrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 124774c14cd6Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 124874c14cd6Smrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 124974c14cd6Smrg PATH=/empty FPATH=/empty; export PATH FPATH 125074c14cd6Smrg test "X`printf %s $ECHO`" = "X$ECHO" \ 125174c14cd6Smrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 125272b676d7Smrg 1253e35772b2Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 125474c14cd6Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1255e35772b2Smrg])# _LT_PROG_ECHO_BACKSLASH 125672b676d7Smrg 125772b676d7Smrg 125874c14cd6Smrg# _LT_WITH_SYSROOT 125974c14cd6Smrg# ---------------- 126074c14cd6SmrgAC_DEFUN([_LT_WITH_SYSROOT], 126174c14cd6Smrg[AC_MSG_CHECKING([for sysroot]) 126274c14cd6SmrgAC_ARG_WITH([sysroot], 126321525869Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 126421525869Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 126521525869Smrg if not specified).])], 126674c14cd6Smrg[], [with_sysroot=no]) 126774c14cd6Smrg 126874c14cd6Smrgdnl lt_sysroot will always be passed unquoted. We quote it here 126974c14cd6Smrgdnl in case the user passed a directory name. 127074c14cd6Smrglt_sysroot= 127121525869Smrgcase $with_sysroot in #( 127274c14cd6Smrg yes) 127321525869Smrg if test yes = "$GCC"; then 127474c14cd6Smrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 127574c14cd6Smrg fi 127674c14cd6Smrg ;; #( 127774c14cd6Smrg /*) 127874c14cd6Smrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 127974c14cd6Smrg ;; #( 128074c14cd6Smrg no|'') 128174c14cd6Smrg ;; #( 128274c14cd6Smrg *) 128321525869Smrg AC_MSG_RESULT([$with_sysroot]) 128474c14cd6Smrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 128574c14cd6Smrg ;; 128674c14cd6Smrgesac 128774c14cd6Smrg 128874c14cd6Smrg AC_MSG_RESULT([${lt_sysroot:-no}]) 128974c14cd6Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 129021525869Smrg[dependent libraries, and where our libraries should be installed.])]) 129174c14cd6Smrg 1292e35772b2Smrg# _LT_ENABLE_LOCK 1293e35772b2Smrg# --------------- 1294e35772b2Smrgm4_defun([_LT_ENABLE_LOCK], 129572b676d7Smrg[AC_ARG_ENABLE([libtool-lock], 1296e35772b2Smrg [AS_HELP_STRING([--disable-libtool-lock], 1297e35772b2Smrg [avoid locking (might break parallel builds)])]) 129821525869Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 129972b676d7Smrg 130072b676d7Smrg# Some flags need to be propagated to the compiler or linker for good 130172b676d7Smrg# libtool support. 130272b676d7Smrgcase $host in 130372b676d7Smrgia64-*-hpux*) 130421525869Smrg # Find out what ABI is being produced by ac_compile, and set mode 130521525869Smrg # options accordingly. 130672b676d7Smrg echo 'int i;' > conftest.$ac_ext 130772b676d7Smrg if AC_TRY_EVAL(ac_compile); then 130872b676d7Smrg case `/usr/bin/file conftest.$ac_objext` in 1309e35772b2Smrg *ELF-32*) 131021525869Smrg HPUX_IA64_MODE=32 1311e35772b2Smrg ;; 1312e35772b2Smrg *ELF-64*) 131321525869Smrg HPUX_IA64_MODE=64 1314e35772b2Smrg ;; 131572b676d7Smrg esac 131672b676d7Smrg fi 131772b676d7Smrg rm -rf conftest* 131872b676d7Smrg ;; 131972b676d7Smrg*-*-irix6*) 132021525869Smrg # Find out what ABI is being produced by ac_compile, and set linker 132121525869Smrg # options accordingly. 132274c14cd6Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 132372b676d7Smrg if AC_TRY_EVAL(ac_compile); then 132421525869Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 1325e35772b2Smrg case `/usr/bin/file conftest.$ac_objext` in 1326e35772b2Smrg *32-bit*) 1327e35772b2Smrg LD="${LD-ld} -melf32bsmip" 1328e35772b2Smrg ;; 1329e35772b2Smrg *N32*) 1330e35772b2Smrg LD="${LD-ld} -melf32bmipn32" 1331e35772b2Smrg ;; 1332e35772b2Smrg *64-bit*) 1333e35772b2Smrg LD="${LD-ld} -melf64bmip" 1334e35772b2Smrg ;; 1335e35772b2Smrg esac 1336e35772b2Smrg else 1337e35772b2Smrg case `/usr/bin/file conftest.$ac_objext` in 1338e35772b2Smrg *32-bit*) 1339e35772b2Smrg LD="${LD-ld} -32" 1340e35772b2Smrg ;; 1341e35772b2Smrg *N32*) 1342e35772b2Smrg LD="${LD-ld} -n32" 1343e35772b2Smrg ;; 1344e35772b2Smrg *64-bit*) 1345e35772b2Smrg LD="${LD-ld} -64" 1346e35772b2Smrg ;; 1347e35772b2Smrg esac 1348e35772b2Smrg fi 134972b676d7Smrg fi 135072b676d7Smrg rm -rf conftest* 135172b676d7Smrg ;; 135272b676d7Smrg 135321525869Smrgmips64*-*linux*) 135421525869Smrg # Find out what ABI is being produced by ac_compile, and set linker 135521525869Smrg # options accordingly. 135621525869Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 135721525869Smrg if AC_TRY_EVAL(ac_compile); then 135821525869Smrg emul=elf 135921525869Smrg case `/usr/bin/file conftest.$ac_objext` in 136021525869Smrg *32-bit*) 136121525869Smrg emul="${emul}32" 136221525869Smrg ;; 136321525869Smrg *64-bit*) 136421525869Smrg emul="${emul}64" 136521525869Smrg ;; 136621525869Smrg esac 136721525869Smrg case `/usr/bin/file conftest.$ac_objext` in 136821525869Smrg *MSB*) 136921525869Smrg emul="${emul}btsmip" 137021525869Smrg ;; 137121525869Smrg *LSB*) 137221525869Smrg emul="${emul}ltsmip" 137321525869Smrg ;; 137421525869Smrg esac 137521525869Smrg case `/usr/bin/file conftest.$ac_objext` in 137621525869Smrg *N32*) 137721525869Smrg emul="${emul}n32" 137821525869Smrg ;; 137921525869Smrg esac 138021525869Smrg LD="${LD-ld} -m $emul" 138121525869Smrg fi 138221525869Smrg rm -rf conftest* 138321525869Smrg ;; 138421525869Smrg 138521525869Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1386e35772b2Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 138721525869Smrg # Find out what ABI is being produced by ac_compile, and set linker 138821525869Smrg # options accordingly. Note that the listed cases only cover the 138921525869Smrg # situations where additional linker options are needed (such as when 139021525869Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 139121525869Smrg # vice versa); the common cases where no linker options are needed do 139221525869Smrg # not appear in the list. 139372b676d7Smrg echo 'int i;' > conftest.$ac_ext 139472b676d7Smrg if AC_TRY_EVAL(ac_compile); then 139572b676d7Smrg case `/usr/bin/file conftest.o` in 1396e35772b2Smrg *32-bit*) 1397e35772b2Smrg case $host in 1398e35772b2Smrg x86_64-*kfreebsd*-gnu) 1399e35772b2Smrg LD="${LD-ld} -m elf_i386_fbsd" 1400e35772b2Smrg ;; 1401e35772b2Smrg x86_64-*linux*) 140221525869Smrg case `/usr/bin/file conftest.o` in 140321525869Smrg *x86-64*) 140421525869Smrg LD="${LD-ld} -m elf32_x86_64" 140521525869Smrg ;; 140621525869Smrg *) 140721525869Smrg LD="${LD-ld} -m elf_i386" 140821525869Smrg ;; 140921525869Smrg esac 1410e35772b2Smrg ;; 141121525869Smrg powerpc64le-*linux*) 141221525869Smrg LD="${LD-ld} -m elf32lppclinux" 141321525869Smrg ;; 141421525869Smrg powerpc64-*linux*) 1415e35772b2Smrg LD="${LD-ld} -m elf32ppclinux" 1416e35772b2Smrg ;; 1417e35772b2Smrg s390x-*linux*) 1418e35772b2Smrg LD="${LD-ld} -m elf_s390" 1419e35772b2Smrg ;; 1420e35772b2Smrg sparc64-*linux*) 1421e35772b2Smrg LD="${LD-ld} -m elf32_sparc" 1422e35772b2Smrg ;; 1423e35772b2Smrg esac 1424e35772b2Smrg ;; 1425e35772b2Smrg *64-bit*) 1426e35772b2Smrg case $host in 1427e35772b2Smrg x86_64-*kfreebsd*-gnu) 1428e35772b2Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1429e35772b2Smrg ;; 1430e35772b2Smrg x86_64-*linux*) 1431e35772b2Smrg LD="${LD-ld} -m elf_x86_64" 1432e35772b2Smrg ;; 143321525869Smrg powerpcle-*linux*) 143421525869Smrg LD="${LD-ld} -m elf64lppc" 143521525869Smrg ;; 143621525869Smrg powerpc-*linux*) 1437e35772b2Smrg LD="${LD-ld} -m elf64ppc" 1438e35772b2Smrg ;; 1439e35772b2Smrg s390*-*linux*|s390*-*tpf*) 1440e35772b2Smrg LD="${LD-ld} -m elf64_s390" 1441e35772b2Smrg ;; 1442e35772b2Smrg sparc*-*linux*) 1443e35772b2Smrg LD="${LD-ld} -m elf64_sparc" 1444e35772b2Smrg ;; 1445e35772b2Smrg esac 1446e35772b2Smrg ;; 144772b676d7Smrg esac 144872b676d7Smrg fi 144972b676d7Smrg rm -rf conftest* 145072b676d7Smrg ;; 145172b676d7Smrg 145272b676d7Smrg*-*-sco3.2v5*) 145372b676d7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 145421525869Smrg SAVE_CFLAGS=$CFLAGS 145572b676d7Smrg CFLAGS="$CFLAGS -belf" 145672b676d7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 145772b676d7Smrg [AC_LANG_PUSH(C) 1458e35772b2Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 145972b676d7Smrg AC_LANG_POP]) 146021525869Smrg if test yes != "$lt_cv_cc_needs_belf"; then 146172b676d7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 146221525869Smrg CFLAGS=$SAVE_CFLAGS 146372b676d7Smrg fi 146472b676d7Smrg ;; 146574c14cd6Smrg*-*solaris*) 146621525869Smrg # Find out what ABI is being produced by ac_compile, and set linker 146721525869Smrg # options accordingly. 146872b676d7Smrg echo 'int i;' > conftest.$ac_ext 146972b676d7Smrg if AC_TRY_EVAL(ac_compile); then 147072b676d7Smrg case `/usr/bin/file conftest.o` in 147172b676d7Smrg *64-bit*) 147272b676d7Smrg case $lt_cv_prog_gnu_ld in 147374c14cd6Smrg yes*) 147474c14cd6Smrg case $host in 147521525869Smrg i?86-*-solaris*|x86_64-*-solaris*) 147674c14cd6Smrg LD="${LD-ld} -m elf_x86_64" 147774c14cd6Smrg ;; 147874c14cd6Smrg sparc*-*-solaris*) 147974c14cd6Smrg LD="${LD-ld} -m elf64_sparc" 148074c14cd6Smrg ;; 148174c14cd6Smrg esac 148274c14cd6Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 148374c14cd6Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 148421525869Smrg LD=${LD-ld}_sol2 148574c14cd6Smrg fi 148674c14cd6Smrg ;; 14871fd23544Smrg *) 1488e35772b2Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14891fd23544Smrg LD="${LD-ld} -64" 14901fd23544Smrg fi 14911fd23544Smrg ;; 149272b676d7Smrg esac 149372b676d7Smrg ;; 149472b676d7Smrg esac 149572b676d7Smrg fi 149672b676d7Smrg rm -rf conftest* 149772b676d7Smrg ;; 149872b676d7Smrgesac 149972b676d7Smrg 150021525869Smrgneed_locks=$enable_libtool_lock 1501e35772b2Smrg])# _LT_ENABLE_LOCK 1502e35772b2Smrg 1503e35772b2Smrg 150474c14cd6Smrg# _LT_PROG_AR 150574c14cd6Smrg# ----------- 150674c14cd6Smrgm4_defun([_LT_PROG_AR], 150774c14cd6Smrg[AC_CHECK_TOOLS(AR, [ar], false) 150874c14cd6Smrg: ${AR=ar} 150974c14cd6Smrg: ${AR_FLAGS=cru} 151074c14cd6Smrg_LT_DECL([], [AR], [1], [The archiver]) 151174c14cd6Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 151274c14cd6Smrg 151374c14cd6SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 151474c14cd6Smrg [lt_cv_ar_at_file=no 151574c14cd6Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 151674c14cd6Smrg [echo conftest.$ac_objext > conftest.lst 151774c14cd6Smrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 151874c14cd6Smrg AC_TRY_EVAL([lt_ar_try]) 151921525869Smrg if test 0 -eq "$ac_status"; then 152074c14cd6Smrg # Ensure the archiver fails upon bogus file names. 152174c14cd6Smrg rm -f conftest.$ac_objext libconftest.a 152274c14cd6Smrg AC_TRY_EVAL([lt_ar_try]) 152321525869Smrg if test 0 -ne "$ac_status"; then 152474c14cd6Smrg lt_cv_ar_at_file=@ 152574c14cd6Smrg fi 152674c14cd6Smrg fi 152774c14cd6Smrg rm -f conftest.* libconftest.a 152874c14cd6Smrg ]) 152974c14cd6Smrg ]) 153074c14cd6Smrg 153121525869Smrgif test no = "$lt_cv_ar_at_file"; then 153274c14cd6Smrg archiver_list_spec= 153374c14cd6Smrgelse 153474c14cd6Smrg archiver_list_spec=$lt_cv_ar_at_file 153574c14cd6Smrgfi 153674c14cd6Smrg_LT_DECL([], [archiver_list_spec], [1], 153774c14cd6Smrg [How to feed a file listing to the archiver]) 153874c14cd6Smrg])# _LT_PROG_AR 153974c14cd6Smrg 154074c14cd6Smrg 1541e35772b2Smrg# _LT_CMD_OLD_ARCHIVE 1542e35772b2Smrg# ------------------- 1543e35772b2Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 154474c14cd6Smrg[_LT_PROG_AR 1545e35772b2Smrg 1546e35772b2SmrgAC_CHECK_TOOL(STRIP, strip, :) 1547e35772b2Smrgtest -z "$STRIP" && STRIP=: 1548e35772b2Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1549e35772b2Smrg 1550e35772b2SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1551e35772b2Smrgtest -z "$RANLIB" && RANLIB=: 1552e35772b2Smrg_LT_DECL([], [RANLIB], [1], 1553e35772b2Smrg [Commands used to install an old-style archive]) 1554e35772b2Smrg 1555e35772b2Smrg# Determine commands to create old-style static archives. 1556e35772b2Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1557e35772b2Smrgold_postinstall_cmds='chmod 644 $oldlib' 1558e35772b2Smrgold_postuninstall_cmds= 155972b676d7Smrg 1560e35772b2Smrgif test -n "$RANLIB"; then 1561e35772b2Smrg case $host_os in 156221525869Smrg bitrig* | openbsd*) 156374c14cd6Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1564e35772b2Smrg ;; 1565e35772b2Smrg *) 156674c14cd6Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1567e35772b2Smrg ;; 1568e35772b2Smrg esac 156974c14cd6Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1570e35772b2Smrgfi 157174c14cd6Smrg 157274c14cd6Smrgcase $host_os in 157374c14cd6Smrg darwin*) 157474c14cd6Smrg lock_old_archive_extraction=yes ;; 157574c14cd6Smrg *) 157674c14cd6Smrg lock_old_archive_extraction=no ;; 157774c14cd6Smrgesac 1578e35772b2Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1579e35772b2Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1580e35772b2Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1581e35772b2Smrg [Commands used to build an old-style archive]) 158274c14cd6Smrg_LT_DECL([], [lock_old_archive_extraction], [0], 158374c14cd6Smrg [Whether to use a lock for old archive extraction]) 1584e35772b2Smrg])# _LT_CMD_OLD_ARCHIVE 158572b676d7Smrg 158672b676d7Smrg 1587e35772b2Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 158872b676d7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 158972b676d7Smrg# ---------------------------------------------------------------- 159072b676d7Smrg# Check whether the given compiler option works 1591e35772b2SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1592e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1593e35772b2Smrgm4_require([_LT_DECL_SED])dnl 159472b676d7SmrgAC_CACHE_CHECK([$1], [$2], 159572b676d7Smrg [$2=no 1596e35772b2Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15971fd23544Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 159821525869Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 159972b676d7Smrg # Insert the option either (1) after the last *FLAGS variable, or 160072b676d7Smrg # (2) before a word containing "conftest.", or (3) at the end. 160172b676d7Smrg # Note that $ac_compile itself does not contain backslashes and begins 160272b676d7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 160372b676d7Smrg # The option is referenced via a variable to avoid confusing sed. 160472b676d7Smrg lt_compile=`echo "$ac_compile" | $SED \ 160572b676d7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 160672b676d7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 160772b676d7Smrg -e 's:$: $lt_compiler_flag:'` 160874c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 160972b676d7Smrg (eval "$lt_compile" 2>conftest.err) 161072b676d7Smrg ac_status=$? 161172b676d7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 161274c14cd6Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 161372b676d7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 161472b676d7Smrg # The compiler can only warn and ignore the option if not recognized 161572b676d7Smrg # So say no if there are warnings other than the usual output. 161674c14cd6Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 161772b676d7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 161872b676d7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 161972b676d7Smrg $2=yes 162072b676d7Smrg fi 162172b676d7Smrg fi 1622e35772b2Smrg $RM conftest* 162372b676d7Smrg]) 162472b676d7Smrg 162521525869Smrgif test yes = "[$]$2"; then 1626e35772b2Smrg m4_if([$5], , :, [$5]) 162772b676d7Smrgelse 1628e35772b2Smrg m4_if([$6], , :, [$6]) 162972b676d7Smrgfi 1630e35772b2Smrg])# _LT_COMPILER_OPTION 163172b676d7Smrg 1632e35772b2Smrg# Old name: 1633e35772b2SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1634e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1635e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 163672b676d7Smrg 1637e35772b2Smrg 1638e35772b2Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1639e35772b2Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1640e35772b2Smrg# ---------------------------------------------------- 1641e35772b2Smrg# Check whether the given linker option works 1642e35772b2SmrgAC_DEFUN([_LT_LINKER_OPTION], 1643e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1644e35772b2Smrgm4_require([_LT_DECL_SED])dnl 16451fd23544SmrgAC_CACHE_CHECK([$1], [$2], 164672b676d7Smrg [$2=no 164721525869Smrg save_LDFLAGS=$LDFLAGS 164872b676d7Smrg LDFLAGS="$LDFLAGS $3" 16491fd23544Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 165072b676d7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 165172b676d7Smrg # The linker can only warn and ignore the option if not recognized 165272b676d7Smrg # So say no if there are warnings 165372b676d7Smrg if test -s conftest.err; then 165472b676d7Smrg # Append any errors to the config.log. 165572b676d7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 165674c14cd6Smrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 165772b676d7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 165872b676d7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 165972b676d7Smrg $2=yes 166072b676d7Smrg fi 166172b676d7Smrg else 166272b676d7Smrg $2=yes 166372b676d7Smrg fi 166472b676d7Smrg fi 1665e35772b2Smrg $RM -r conftest* 166621525869Smrg LDFLAGS=$save_LDFLAGS 166772b676d7Smrg]) 166872b676d7Smrg 166921525869Smrgif test yes = "[$]$2"; then 1670e35772b2Smrg m4_if([$4], , :, [$4]) 167172b676d7Smrgelse 1672e35772b2Smrg m4_if([$5], , :, [$5]) 167372b676d7Smrgfi 1674e35772b2Smrg])# _LT_LINKER_OPTION 167572b676d7Smrg 1676e35772b2Smrg# Old name: 1677e35772b2SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1678e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1679e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 168072b676d7Smrg 1681e35772b2Smrg 1682e35772b2Smrg# LT_CMD_MAX_LEN 1683e35772b2Smrg#--------------- 1684e35772b2SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1685e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1686e35772b2Smrg# find the maximum length of command line arguments 168772b676d7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 168872b676d7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 168972b676d7Smrg i=0 169021525869Smrg teststring=ABCD 169172b676d7Smrg 169272b676d7Smrg case $build_os in 169372b676d7Smrg msdosdjgpp*) 169472b676d7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 169572b676d7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 169672b676d7Smrg # during glob expansion). Even if it were fixed, the result of this 169772b676d7Smrg # check would be larger than it should be. 169872b676d7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 169972b676d7Smrg ;; 170072b676d7Smrg 170172b676d7Smrg gnu*) 170272b676d7Smrg # Under GNU Hurd, this test is not required because there is 170372b676d7Smrg # no limit to the length of command line arguments. 170472b676d7Smrg # Libtool will interpret -1 as no limit whatsoever 170572b676d7Smrg lt_cv_sys_max_cmd_len=-1; 170672b676d7Smrg ;; 170772b676d7Smrg 1708e35772b2Smrg cygwin* | mingw* | cegcc*) 170972b676d7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 171072b676d7Smrg # about 5 minutes as the teststring grows exponentially. 171172b676d7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 171272b676d7Smrg # you end up with a "frozen" computer, even though with patience 171372b676d7Smrg # the test eventually succeeds (with a max line length of 256k). 171472b676d7Smrg # Instead, let's just punt: use the minimum linelength reported by 171572b676d7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 171672b676d7Smrg lt_cv_sys_max_cmd_len=8192; 171772b676d7Smrg ;; 171872b676d7Smrg 171974c14cd6Smrg mint*) 172074c14cd6Smrg # On MiNT this can take a long time and run out of memory. 172174c14cd6Smrg lt_cv_sys_max_cmd_len=8192; 172274c14cd6Smrg ;; 172374c14cd6Smrg 172472b676d7Smrg amigaos*) 172572b676d7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 172672b676d7Smrg # So we just punt and use a minimum line length of 8192. 172772b676d7Smrg lt_cv_sys_max_cmd_len=8192; 172872b676d7Smrg ;; 172972b676d7Smrg 173021525869Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 173172b676d7Smrg # This has been around since 386BSD, at least. Likely further. 173272b676d7Smrg if test -x /sbin/sysctl; then 173372b676d7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 173472b676d7Smrg elif test -x /usr/sbin/sysctl; then 173572b676d7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 173672b676d7Smrg else 173772b676d7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 173872b676d7Smrg fi 173972b676d7Smrg # And add a safety zone 174072b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 174172b676d7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 174272b676d7Smrg ;; 174372b676d7Smrg 174472b676d7Smrg interix*) 174572b676d7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 174672b676d7Smrg lt_cv_sys_max_cmd_len=196608 174772b676d7Smrg ;; 174872b676d7Smrg 174974c14cd6Smrg os2*) 175074c14cd6Smrg # The test takes a long time on OS/2. 175174c14cd6Smrg lt_cv_sys_max_cmd_len=8192 175274c14cd6Smrg ;; 175374c14cd6Smrg 175472b676d7Smrg osf*) 175572b676d7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 175672b676d7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 175772b676d7Smrg # nice to cause kernel panics so lets avoid the loop below. 175872b676d7Smrg # First set a reasonable default. 175972b676d7Smrg lt_cv_sys_max_cmd_len=16384 176072b676d7Smrg # 176172b676d7Smrg if test -x /sbin/sysconfig; then 176272b676d7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 176372b676d7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 176472b676d7Smrg esac 176572b676d7Smrg fi 176672b676d7Smrg ;; 176772b676d7Smrg sco3.2v5*) 176872b676d7Smrg lt_cv_sys_max_cmd_len=102400 176972b676d7Smrg ;; 177072b676d7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 177172b676d7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 177272b676d7Smrg if test -n "$kargmax"; then 1773e35772b2Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 177472b676d7Smrg else 177572b676d7Smrg lt_cv_sys_max_cmd_len=32768 177672b676d7Smrg fi 177772b676d7Smrg ;; 177872b676d7Smrg *) 17791fd23544Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 178021525869Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 178121525869Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 17821fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17831fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17841fd23544Smrg else 1785e35772b2Smrg # Make teststring a little bigger before we do anything with it. 1786e35772b2Smrg # a 1K string should be a reasonable start. 178721525869Smrg for i in 1 2 3 4 5 6 7 8; do 1788e35772b2Smrg teststring=$teststring$teststring 1789e35772b2Smrg done 17901fd23544Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1791e35772b2Smrg # If test is not a shell built-in, we'll probably end up computing a 1792e35772b2Smrg # maximum length that is only half of the actual maximum length, but 1793e35772b2Smrg # we can't tell. 179421525869Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 179574c14cd6Smrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 179621525869Smrg test 17 != "$i" # 1/2 MB should be enough 17971fd23544Smrg do 17981fd23544Smrg i=`expr $i + 1` 17991fd23544Smrg teststring=$teststring$teststring 18001fd23544Smrg done 1801e35772b2Smrg # Only check the string length outside the loop. 1802e35772b2Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 18031fd23544Smrg teststring= 1804e35772b2Smrg # Add a significant safety factor because C++ compilers can tack on 1805e35772b2Smrg # massive amounts of additional arguments before passing them to the 1806e35772b2Smrg # linker. It appears as though 1/2 is a usable value. 18071fd23544Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 18081fd23544Smrg fi 180972b676d7Smrg ;; 181072b676d7Smrg esac 181172b676d7Smrg]) 181221525869Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 181372b676d7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 181472b676d7Smrgelse 181572b676d7Smrg AC_MSG_RESULT(none) 181672b676d7Smrgfi 1817e35772b2Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1818e35772b2Smrg_LT_DECL([], [max_cmd_len], [0], 1819e35772b2Smrg [What is the maximum length of a command?]) 1820e35772b2Smrg])# LT_CMD_MAX_LEN 182172b676d7Smrg 1822e35772b2Smrg# Old name: 1823e35772b2SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1824e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 1825e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 182672b676d7Smrg 1827e35772b2Smrg 1828e35772b2Smrg# _LT_HEADER_DLFCN 1829e35772b2Smrg# ---------------- 1830e35772b2Smrgm4_defun([_LT_HEADER_DLFCN], 1831e35772b2Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1832e35772b2Smrg])# _LT_HEADER_DLFCN 183372b676d7Smrg 183472b676d7Smrg 1835e35772b2Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1836e35772b2Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1837e35772b2Smrg# ---------------------------------------------------------------- 1838e35772b2Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1839e35772b2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 184021525869Smrgif test yes = "$cross_compiling"; then : 184172b676d7Smrg [$4] 184272b676d7Smrgelse 184372b676d7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 184472b676d7Smrg lt_status=$lt_dlunknown 1845e35772b2Smrg cat > conftest.$ac_ext <<_LT_EOF 184674c14cd6Smrg[#line $LINENO "configure" 184772b676d7Smrg#include "confdefs.h" 184872b676d7Smrg 184972b676d7Smrg#if HAVE_DLFCN_H 185072b676d7Smrg#include <dlfcn.h> 185172b676d7Smrg#endif 185272b676d7Smrg 185372b676d7Smrg#include <stdio.h> 185472b676d7Smrg 185572b676d7Smrg#ifdef RTLD_GLOBAL 185672b676d7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 185772b676d7Smrg#else 185872b676d7Smrg# ifdef DL_GLOBAL 185972b676d7Smrg# define LT_DLGLOBAL DL_GLOBAL 186072b676d7Smrg# else 186172b676d7Smrg# define LT_DLGLOBAL 0 186272b676d7Smrg# endif 186372b676d7Smrg#endif 186472b676d7Smrg 186572b676d7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 186672b676d7Smrg find out it does not work in some platform. */ 186772b676d7Smrg#ifndef LT_DLLAZY_OR_NOW 186872b676d7Smrg# ifdef RTLD_LAZY 186972b676d7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 187072b676d7Smrg# else 187172b676d7Smrg# ifdef DL_LAZY 187272b676d7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 187372b676d7Smrg# else 187472b676d7Smrg# ifdef RTLD_NOW 187572b676d7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 187672b676d7Smrg# else 187772b676d7Smrg# ifdef DL_NOW 187872b676d7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 187972b676d7Smrg# else 188072b676d7Smrg# define LT_DLLAZY_OR_NOW 0 188172b676d7Smrg# endif 188272b676d7Smrg# endif 188372b676d7Smrg# endif 188472b676d7Smrg# endif 188572b676d7Smrg#endif 188672b676d7Smrg 188721525869Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 188874c14cd6Smrg correspondingly for the symbols needed. */ 188921525869Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 189074c14cd6Smrgint fnord () __attribute__((visibility("default"))); 189174c14cd6Smrg#endif 189274c14cd6Smrg 189374c14cd6Smrgint fnord () { return 42; } 189472b676d7Smrgint main () 189572b676d7Smrg{ 189672b676d7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 189772b676d7Smrg int status = $lt_dlunknown; 189872b676d7Smrg 189972b676d7Smrg if (self) 190072b676d7Smrg { 190172b676d7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 190274c14cd6Smrg else 190374c14cd6Smrg { 190474c14cd6Smrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 190574c14cd6Smrg else puts (dlerror ()); 190674c14cd6Smrg } 190772b676d7Smrg /* dlclose (self); */ 190872b676d7Smrg } 190972b676d7Smrg else 191072b676d7Smrg puts (dlerror ()); 191172b676d7Smrg 1912e35772b2Smrg return status; 191372b676d7Smrg}] 1914e35772b2Smrg_LT_EOF 191521525869Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 191672b676d7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 191772b676d7Smrg lt_status=$? 191872b676d7Smrg case x$lt_status in 191972b676d7Smrg x$lt_dlno_uscore) $1 ;; 192072b676d7Smrg x$lt_dlneed_uscore) $2 ;; 192172b676d7Smrg x$lt_dlunknown|x*) $3 ;; 192272b676d7Smrg esac 192372b676d7Smrg else : 192472b676d7Smrg # compilation failed 192572b676d7Smrg $3 192672b676d7Smrg fi 192772b676d7Smrgfi 192872b676d7Smrgrm -fr conftest* 1929e35772b2Smrg])# _LT_TRY_DLOPEN_SELF 193072b676d7Smrg 193172b676d7Smrg 1932e35772b2Smrg# LT_SYS_DLOPEN_SELF 1933e35772b2Smrg# ------------------ 1934e35772b2SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1935e35772b2Smrg[m4_require([_LT_HEADER_DLFCN])dnl 193621525869Smrgif test yes != "$enable_dlopen"; then 193772b676d7Smrg enable_dlopen=unknown 193872b676d7Smrg enable_dlopen_self=unknown 193972b676d7Smrg enable_dlopen_self_static=unknown 194072b676d7Smrgelse 194172b676d7Smrg lt_cv_dlopen=no 194272b676d7Smrg lt_cv_dlopen_libs= 194372b676d7Smrg 194472b676d7Smrg case $host_os in 194572b676d7Smrg beos*) 194621525869Smrg lt_cv_dlopen=load_add_on 194772b676d7Smrg lt_cv_dlopen_libs= 194872b676d7Smrg lt_cv_dlopen_self=yes 194972b676d7Smrg ;; 195072b676d7Smrg 1951e35772b2Smrg mingw* | pw32* | cegcc*) 195221525869Smrg lt_cv_dlopen=LoadLibrary 195372b676d7Smrg lt_cv_dlopen_libs= 1954e35772b2Smrg ;; 195572b676d7Smrg 195672b676d7Smrg cygwin*) 195721525869Smrg lt_cv_dlopen=dlopen 195872b676d7Smrg lt_cv_dlopen_libs= 1959e35772b2Smrg ;; 196072b676d7Smrg 196172b676d7Smrg darwin*) 196221525869Smrg # if libdl is installed we need to link against it 196372b676d7Smrg AC_CHECK_LIB([dl], [dlopen], 196421525869Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 196521525869Smrg lt_cv_dlopen=dyld 196672b676d7Smrg lt_cv_dlopen_libs= 196772b676d7Smrg lt_cv_dlopen_self=yes 196872b676d7Smrg ]) 1969e35772b2Smrg ;; 197072b676d7Smrg 197121525869Smrg tpf*) 197221525869Smrg # Don't try to run any link tests for TPF. We know it's impossible 197321525869Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 197421525869Smrg lt_cv_dlopen=dlopen 197521525869Smrg lt_cv_dlopen_libs= 197621525869Smrg lt_cv_dlopen_self=no 197721525869Smrg ;; 197821525869Smrg 197972b676d7Smrg *) 198072b676d7Smrg AC_CHECK_FUNC([shl_load], 198121525869Smrg [lt_cv_dlopen=shl_load], 198272b676d7Smrg [AC_CHECK_LIB([dld], [shl_load], 198321525869Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 198472b676d7Smrg [AC_CHECK_FUNC([dlopen], 198521525869Smrg [lt_cv_dlopen=dlopen], 198672b676d7Smrg [AC_CHECK_LIB([dl], [dlopen], 198721525869Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 198872b676d7Smrg [AC_CHECK_LIB([svld], [dlopen], 198921525869Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 199072b676d7Smrg [AC_CHECK_LIB([dld], [dld_link], 199121525869Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 199272b676d7Smrg ]) 199372b676d7Smrg ]) 199472b676d7Smrg ]) 199572b676d7Smrg ]) 199672b676d7Smrg ]) 199772b676d7Smrg ;; 199872b676d7Smrg esac 199972b676d7Smrg 200021525869Smrg if test no = "$lt_cv_dlopen"; then 200172b676d7Smrg enable_dlopen=no 200221525869Smrg else 200321525869Smrg enable_dlopen=yes 200472b676d7Smrg fi 200572b676d7Smrg 200672b676d7Smrg case $lt_cv_dlopen in 200772b676d7Smrg dlopen) 200821525869Smrg save_CPPFLAGS=$CPPFLAGS 200921525869Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 201072b676d7Smrg 201121525869Smrg save_LDFLAGS=$LDFLAGS 201272b676d7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 201372b676d7Smrg 201421525869Smrg save_LIBS=$LIBS 201572b676d7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 201672b676d7Smrg 201772b676d7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 201872b676d7Smrg lt_cv_dlopen_self, [dnl 2019e35772b2Smrg _LT_TRY_DLOPEN_SELF( 202072b676d7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 202172b676d7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 202272b676d7Smrg ]) 202372b676d7Smrg 202421525869Smrg if test yes = "$lt_cv_dlopen_self"; then 202572b676d7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 202672b676d7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2027e35772b2Smrg lt_cv_dlopen_self_static, [dnl 2028e35772b2Smrg _LT_TRY_DLOPEN_SELF( 202972b676d7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 203072b676d7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 203172b676d7Smrg ]) 203272b676d7Smrg fi 203372b676d7Smrg 203421525869Smrg CPPFLAGS=$save_CPPFLAGS 203521525869Smrg LDFLAGS=$save_LDFLAGS 203621525869Smrg LIBS=$save_LIBS 203772b676d7Smrg ;; 203872b676d7Smrg esac 203972b676d7Smrg 204072b676d7Smrg case $lt_cv_dlopen_self in 204172b676d7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 204272b676d7Smrg *) enable_dlopen_self=unknown ;; 204372b676d7Smrg esac 204472b676d7Smrg 204572b676d7Smrg case $lt_cv_dlopen_self_static in 204672b676d7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 204772b676d7Smrg *) enable_dlopen_self_static=unknown ;; 204872b676d7Smrg esac 204972b676d7Smrgfi 2050e35772b2Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2051e35772b2Smrg [Whether dlopen is supported]) 2052e35772b2Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2053e35772b2Smrg [Whether dlopen of programs is supported]) 2054e35772b2Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2055e35772b2Smrg [Whether dlopen of statically linked programs is supported]) 2056e35772b2Smrg])# LT_SYS_DLOPEN_SELF 205772b676d7Smrg 2058e35772b2Smrg# Old name: 2059e35772b2SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2060e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 2061e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 206272b676d7Smrg 2063e35772b2Smrg 2064e35772b2Smrg# _LT_COMPILER_C_O([TAGNAME]) 2065e35772b2Smrg# --------------------------- 2066e35772b2Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 2067e35772b2Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2068e35772b2Smrgm4_defun([_LT_COMPILER_C_O], 2069e35772b2Smrg[m4_require([_LT_DECL_SED])dnl 2070e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2071e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 207272b676d7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2073e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2074e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2075e35772b2Smrg $RM -r conftest 2>/dev/null 207672b676d7Smrg mkdir conftest 207772b676d7Smrg cd conftest 207872b676d7Smrg mkdir out 20791fd23544Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 208072b676d7Smrg 208172b676d7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 208272b676d7Smrg # Insert the option either (1) after the last *FLAGS variable, or 208372b676d7Smrg # (2) before a word containing "conftest.", or (3) at the end. 208472b676d7Smrg # Note that $ac_compile itself does not contain backslashes and begins 208572b676d7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 208672b676d7Smrg lt_compile=`echo "$ac_compile" | $SED \ 208772b676d7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 208872b676d7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 208972b676d7Smrg -e 's:$: $lt_compiler_flag:'` 209074c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 209172b676d7Smrg (eval "$lt_compile" 2>out/conftest.err) 209272b676d7Smrg ac_status=$? 209372b676d7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 209474c14cd6Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 209572b676d7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 209672b676d7Smrg then 209772b676d7Smrg # The compiler can only warn and ignore the option if not recognized 209872b676d7Smrg # So say no if there are warnings 209974c14cd6Smrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 210072b676d7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 210172b676d7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2102e35772b2Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 210372b676d7Smrg fi 210472b676d7Smrg fi 210572b676d7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2106e35772b2Smrg $RM conftest* 210772b676d7Smrg # SGI C++ compiler will create directory out/ii_files/ for 210872b676d7Smrg # template instantiation 2109e35772b2Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2110e35772b2Smrg $RM out/* && rmdir out 211172b676d7Smrg cd .. 2112e35772b2Smrg $RM -r conftest 2113e35772b2Smrg $RM conftest* 211472b676d7Smrg]) 2115e35772b2Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2116e35772b2Smrg [Does compiler simultaneously support -c and -o options?]) 2117e35772b2Smrg])# _LT_COMPILER_C_O 211872b676d7Smrg 211972b676d7Smrg 2120e35772b2Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2121e35772b2Smrg# ---------------------------------- 212272b676d7Smrg# Check to see if we can do hard links to lock some files if needed 2123e35772b2Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2124e35772b2Smrg[m4_require([_LT_ENABLE_LOCK])dnl 2125e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2126e35772b2Smrg_LT_COMPILER_C_O([$1]) 212772b676d7Smrg 212821525869Smrghard_links=nottested 212921525869Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 213072b676d7Smrg # do not overwrite the value of need_locks provided by the user 213172b676d7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 213272b676d7Smrg hard_links=yes 2133e35772b2Smrg $RM conftest* 213472b676d7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213572b676d7Smrg touch conftest.a 213672b676d7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 213772b676d7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 213872b676d7Smrg AC_MSG_RESULT([$hard_links]) 213921525869Smrg if test no = "$hard_links"; then 214021525869Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 214172b676d7Smrg need_locks=warn 214272b676d7Smrg fi 214372b676d7Smrgelse 214472b676d7Smrg need_locks=no 214572b676d7Smrgfi 2146e35772b2Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2147e35772b2Smrg])# _LT_COMPILER_FILE_LOCKS 214872b676d7Smrg 214972b676d7Smrg 2150e35772b2Smrg# _LT_CHECK_OBJDIR 2151e35772b2Smrg# ---------------- 2152e35772b2Smrgm4_defun([_LT_CHECK_OBJDIR], 215372b676d7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 215472b676d7Smrg[rm -f .libs 2>/dev/null 215572b676d7Smrgmkdir .libs 2>/dev/null 215672b676d7Smrgif test -d .libs; then 215772b676d7Smrg lt_cv_objdir=.libs 215872b676d7Smrgelse 215972b676d7Smrg # MS-DOS does not allow filenames that begin with a dot. 216072b676d7Smrg lt_cv_objdir=_libs 216172b676d7Smrgfi 216272b676d7Smrgrmdir .libs 2>/dev/null]) 216372b676d7Smrgobjdir=$lt_cv_objdir 2164e35772b2Smrg_LT_DECL([], [objdir], [0], 2165e35772b2Smrg [The name of the directory that contains temporary libtool files])dnl 2166e35772b2Smrgm4_pattern_allow([LT_OBJDIR])dnl 216721525869SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 216821525869Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2169e35772b2Smrg])# _LT_CHECK_OBJDIR 217072b676d7Smrg 217172b676d7Smrg 2172e35772b2Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2173e35772b2Smrg# -------------------------------------- 217472b676d7Smrg# Check hardcoding attributes. 2175e35772b2Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 217672b676d7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2177e35772b2Smrg_LT_TAGVAR(hardcode_action, $1)= 2178e35772b2Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2179e35772b2Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 218021525869Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 218172b676d7Smrg 2182e35772b2Smrg # We can hardcode non-existent directories. 218321525869Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 218472b676d7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 218572b676d7Smrg # have to relink, otherwise we might link with an installed library 218672b676d7Smrg # when we should be linking with a yet-to-be-installed one 218721525869Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 218821525869Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 218972b676d7Smrg # Linking always hardcodes the temporary library directory. 2190e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=relink 219172b676d7Smrg else 219272b676d7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2193e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 219472b676d7Smrg fi 219572b676d7Smrgelse 219672b676d7Smrg # We cannot hardcode anything, or else we can only hardcode existing 219772b676d7Smrg # directories. 2198e35772b2Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 219972b676d7Smrgfi 2200e35772b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 220172b676d7Smrg 220221525869Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 220321525869Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 220472b676d7Smrg # Fast installation is not supported 220572b676d7Smrg enable_fast_install=no 220621525869Smrgelif test yes = "$shlibpath_overrides_runpath" || 220721525869Smrg test no = "$enable_shared"; then 220872b676d7Smrg # Fast installation is not necessary 220972b676d7Smrg enable_fast_install=needless 221072b676d7Smrgfi 2211e35772b2Smrg_LT_TAGDECL([], [hardcode_action], [0], 2212e35772b2Smrg [How to hardcode a shared library path into an executable]) 2213e35772b2Smrg])# _LT_LINKER_HARDCODE_LIBPATH 221472b676d7Smrg 221572b676d7Smrg 2216e35772b2Smrg# _LT_CMD_STRIPLIB 2217e35772b2Smrg# ---------------- 2218e35772b2Smrgm4_defun([_LT_CMD_STRIPLIB], 2219e35772b2Smrg[m4_require([_LT_DECL_EGREP]) 2220e35772b2Smrgstriplib= 222172b676d7Smrgold_striplib= 222272b676d7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2223e35772b2Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 222472b676d7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 222572b676d7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 222672b676d7Smrg AC_MSG_RESULT([yes]) 222772b676d7Smrgelse 222872b676d7Smrg# FIXME - insert some real tests, host_os isn't really good enough 222972b676d7Smrg case $host_os in 2230e35772b2Smrg darwin*) 223121525869Smrg if test -n "$STRIP"; then 2232e35772b2Smrg striplib="$STRIP -x" 2233e35772b2Smrg old_striplib="$STRIP -S" 2234e35772b2Smrg AC_MSG_RESULT([yes]) 2235e35772b2Smrg else 2236e35772b2Smrg AC_MSG_RESULT([no]) 2237e35772b2Smrg fi 2238e35772b2Smrg ;; 2239e35772b2Smrg *) 2240e35772b2Smrg AC_MSG_RESULT([no]) 224172b676d7Smrg ;; 224272b676d7Smrg esac 224372b676d7Smrgfi 2244e35772b2Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2245e35772b2Smrg_LT_DECL([], [striplib], [1]) 2246e35772b2Smrg])# _LT_CMD_STRIPLIB 224772b676d7Smrg 224872b676d7Smrg 224921525869Smrg# _LT_PREPARE_MUNGE_PATH_LIST 225021525869Smrg# --------------------------- 225121525869Smrg# Make sure func_munge_path_list() is defined correctly. 225221525869Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 225321525869Smrg[[# func_munge_path_list VARIABLE PATH 225421525869Smrg# ----------------------------------- 225521525869Smrg# VARIABLE is name of variable containing _space_ separated list of 225621525869Smrg# directories to be munged by the contents of PATH, which is string 225721525869Smrg# having a format: 225821525869Smrg# "DIR[:DIR]:" 225921525869Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 226021525869Smrg# ":DIR[:DIR]" 226121525869Smrg# string "DIR[ DIR]" will be appended to VARIABLE 226221525869Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 226321525869Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 226421525869Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 226521525869Smrg# "DIR[:DIR]" 226621525869Smrg# VARIABLE will be replaced by "DIR[ DIR]" 226721525869Smrgfunc_munge_path_list () 226821525869Smrg{ 226921525869Smrg case x@S|@2 in 227021525869Smrg x) 227121525869Smrg ;; 227221525869Smrg *:) 227321525869Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 227421525869Smrg ;; 227521525869Smrg x:*) 227621525869Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 227721525869Smrg ;; 227821525869Smrg *::*) 227921525869Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 228021525869Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 228121525869Smrg ;; 228221525869Smrg *) 228321525869Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 228421525869Smrg ;; 228521525869Smrg esac 228621525869Smrg} 228721525869Smrg]])# _LT_PREPARE_PATH_LIST 228821525869Smrg 228921525869Smrg 2290e35772b2Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 229172b676d7Smrg# ----------------------------- 229272b676d7Smrg# PORTME Fill in your ld.so characteristics 2293e35772b2Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2294e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2295e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 2296e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2297e35772b2Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2298e35772b2Smrgm4_require([_LT_DECL_SED])dnl 229974c14cd6Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 230021525869Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 23011fd23544SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2302e35772b2Smrgm4_if([$1], 2303e35772b2Smrg [], [ 230421525869Smrgif test yes = "$GCC"; then 23051fd23544Smrg case $host_os in 230621525869Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 230721525869Smrg *) lt_awk_arg='/^libraries:/' ;; 23081fd23544Smrg esac 230974c14cd6Smrg case $host_os in 231021525869Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 231121525869Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 231274c14cd6Smrg esac 231374c14cd6Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 231474c14cd6Smrg case $lt_search_path_spec in 231574c14cd6Smrg *\;*) 231672b676d7Smrg # if the path contains ";" then we assume it to be the separator 231772b676d7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 231872b676d7Smrg # assumed that no part of a normal pathname contains ";" but that should 231972b676d7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 232074c14cd6Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 232174c14cd6Smrg ;; 232274c14cd6Smrg *) 232374c14cd6Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 232474c14cd6Smrg ;; 232574c14cd6Smrg esac 23261fd23544Smrg # Ok, now we have the path, separated by spaces, we can step through it 232721525869Smrg # and add multilib dir if necessary... 23281fd23544Smrg lt_tmp_lt_search_path_spec= 232921525869Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 233021525869Smrg # ...but if some path component already ends with the multilib dir we assume 233121525869Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 233221525869Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 233321525869Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 233421525869Smrg lt_multi_os_dir= 233521525869Smrg ;; 233621525869Smrg esac 23371fd23544Smrg for lt_sys_path in $lt_search_path_spec; do 233821525869Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 233921525869Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 234021525869Smrg elif test -n "$lt_multi_os_dir"; then 23411fd23544Smrg test -d "$lt_sys_path" && \ 23421fd23544Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 23431fd23544Smrg fi 23441fd23544Smrg done 234574c14cd6Smrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 234621525869SmrgBEGIN {RS = " "; FS = "/|\n";} { 234721525869Smrg lt_foo = ""; 234821525869Smrg lt_count = 0; 23491fd23544Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 23501fd23544Smrg if ($lt_i != "" && $lt_i != ".") { 23511fd23544Smrg if ($lt_i == "..") { 23521fd23544Smrg lt_count++; 23531fd23544Smrg } else { 23541fd23544Smrg if (lt_count == 0) { 235521525869Smrg lt_foo = "/" $lt_i lt_foo; 23561fd23544Smrg } else { 23571fd23544Smrg lt_count--; 23581fd23544Smrg } 23591fd23544Smrg } 23601fd23544Smrg } 23611fd23544Smrg } 23621fd23544Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 23631fd23544Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 23641fd23544Smrg}'` 236574c14cd6Smrg # AWK program above erroneously prepends '/' to C:/dos/paths 236674c14cd6Smrg # for these hosts. 236774c14cd6Smrg case $host_os in 236874c14cd6Smrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 236921525869Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 237074c14cd6Smrg esac 237174c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 237272b676d7Smrgelse 237372b676d7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 23741fd23544Smrgfi]) 2375e35772b2Smrglibrary_names_spec= 2376e35772b2Smrglibname_spec='lib$name' 2377e35772b2Smrgsoname_spec= 237821525869Smrgshrext_cmds=.so 2379e35772b2Smrgpostinstall_cmds= 2380e35772b2Smrgpostuninstall_cmds= 2381e35772b2Smrgfinish_cmds= 2382e35772b2Smrgfinish_eval= 2383e35772b2Smrgshlibpath_var= 2384e35772b2Smrgshlibpath_overrides_runpath=unknown 2385e35772b2Smrgversion_type=none 2386e35772b2Smrgdynamic_linker="$host_os ld.so" 2387e35772b2Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 238872b676d7Smrgneed_lib_prefix=unknown 238972b676d7Smrghardcode_into_libs=no 239072b676d7Smrg 239172b676d7Smrg# when you set need_version to no, make sure it does not cause -set_version 239272b676d7Smrg# flags to be left without arguments 239372b676d7Smrgneed_version=unknown 239472b676d7Smrg 239521525869SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 239621525869Smrg[User-defined run-time library search path.]) 239721525869Smrg 239872b676d7Smrgcase $host_os in 239972b676d7Smrgaix3*) 240074c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 240121525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 240272b676d7Smrg shlibpath_var=LIBPATH 240372b676d7Smrg 240472b676d7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 240521525869Smrg soname_spec='$libname$release$shared_ext$major' 240672b676d7Smrg ;; 240772b676d7Smrg 24081fd23544Smrgaix[[4-9]]*) 240974c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 241072b676d7Smrg need_lib_prefix=no 241172b676d7Smrg need_version=no 241272b676d7Smrg hardcode_into_libs=yes 241321525869Smrg if test ia64 = "$host_cpu"; then 241472b676d7Smrg # AIX 5 supports IA64 241521525869Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 241672b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 241772b676d7Smrg else 241872b676d7Smrg # With GCC up to 2.95.x, collect2 would create an import file 241972b676d7Smrg # for dependence libraries. The import file would start with 242021525869Smrg # the line '#! .'. This would cause the generated library to 242121525869Smrg # depend on '.', always an invalid library. This was fixed in 242272b676d7Smrg # development snapshots of GCC prior to 3.0. 242372b676d7Smrg case $host_os in 242472b676d7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 242572b676d7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 242672b676d7Smrg echo ' yes ' 242721525869Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 242872b676d7Smrg : 242972b676d7Smrg else 243072b676d7Smrg can_build_shared=no 243172b676d7Smrg fi 243272b676d7Smrg ;; 243372b676d7Smrg esac 243421525869Smrg # Using Import Files as archive members, it is possible to support 243521525869Smrg # filename-based versioning of shared library archives on AIX. While 243621525869Smrg # this would work for both with and without runtime linking, it will 243721525869Smrg # prevent static linking of such archives. So we do filename-based 243821525869Smrg # shared library versioning with .so extension only, which is used 243921525869Smrg # when both runtime linking and shared linking is enabled. 244021525869Smrg # Unfortunately, runtime linking may impact performance, so we do 244121525869Smrg # not want this to be the default eventually. Also, we use the 244221525869Smrg # versioned .so libs for executables only if there is the -brtl 244321525869Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 244421525869Smrg # To allow for filename-based versioning support, we need to create 244521525869Smrg # libNAME.so.V as an archive file, containing: 244621525869Smrg # *) an Import File, referring to the versioned filename of the 244721525869Smrg # archive as well as the shared archive member, telling the 244821525869Smrg # bitwidth (32 or 64) of that shared object, and providing the 244921525869Smrg # list of exported symbols of that shared object, eventually 245021525869Smrg # decorated with the 'weak' keyword 245121525869Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 245221525869Smrg # it being seen by the linker. 245321525869Smrg # At run time we better use the real file rather than another symlink, 245421525869Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 245521525869Smrg 245621525869Smrg case $with_aix_soname,$aix_use_runtimelinking in 245721525869Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 245872b676d7Smrg # soname into executable. Probably we can add versioning support to 245972b676d7Smrg # collect2, so additional links can be useful in future. 246021525869Smrg aix,yes) # traditional libtool 246121525869Smrg dynamic_linker='AIX unversionable lib.so' 246272b676d7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 246372b676d7Smrg # instead of lib<name>.a to let people know that these are not 246472b676d7Smrg # typical AIX shared libraries. 246521525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 246621525869Smrg ;; 246721525869Smrg aix,no) # traditional AIX only 246821525869Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 246972b676d7Smrg # We preserve .a as extension for shared libraries through AIX4.2 247072b676d7Smrg # and later when we are not doing run time linking. 247121525869Smrg library_names_spec='$libname$release.a $libname.a' 247221525869Smrg soname_spec='$libname$release$shared_ext$major' 247321525869Smrg ;; 247421525869Smrg svr4,*) # full svr4 only 247521525869Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 247621525869Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 247721525869Smrg # We do not specify a path in Import Files, so LIBPATH fires. 247821525869Smrg shlibpath_overrides_runpath=yes 247921525869Smrg ;; 248021525869Smrg *,yes) # both, prefer svr4 248121525869Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 248221525869Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 248321525869Smrg # unpreferred sharedlib libNAME.a needs extra handling 248421525869Smrg 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"' 248521525869Smrg 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"' 248621525869Smrg # We do not specify a path in Import Files, so LIBPATH fires. 248721525869Smrg shlibpath_overrides_runpath=yes 248821525869Smrg ;; 248921525869Smrg *,no) # both, prefer aix 249021525869Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 249121525869Smrg library_names_spec='$libname$release.a $libname.a' 249221525869Smrg soname_spec='$libname$release$shared_ext$major' 249321525869Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 249421525869Smrg 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)' 249521525869Smrg 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"' 249621525869Smrg ;; 249721525869Smrg esac 249872b676d7Smrg shlibpath_var=LIBPATH 249972b676d7Smrg fi 250072b676d7Smrg ;; 250172b676d7Smrg 250272b676d7Smrgamigaos*) 2503e35772b2Smrg case $host_cpu in 2504e35772b2Smrg powerpc) 2505e35772b2Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2506e35772b2Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 250721525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2508e35772b2Smrg ;; 2509e35772b2Smrg m68k) 2510e35772b2Smrg library_names_spec='$libname.ixlibrary $libname.a' 2511e35772b2Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 251221525869Smrg 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' 2513e35772b2Smrg ;; 2514e35772b2Smrg esac 251572b676d7Smrg ;; 251672b676d7Smrg 251772b676d7Smrgbeos*) 251821525869Smrg library_names_spec='$libname$shared_ext' 251972b676d7Smrg dynamic_linker="$host_os ld.so" 252072b676d7Smrg shlibpath_var=LIBRARY_PATH 252172b676d7Smrg ;; 252272b676d7Smrg 252372b676d7Smrgbsdi[[45]]*) 252474c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 252572b676d7Smrg need_version=no 252621525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 252721525869Smrg soname_spec='$libname$release$shared_ext$major' 252872b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 252972b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 253072b676d7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 253172b676d7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 253272b676d7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 253372b676d7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 253472b676d7Smrg # libtool to hard-code these into programs 253572b676d7Smrg ;; 253672b676d7Smrg 2537e35772b2Smrgcygwin* | mingw* | pw32* | cegcc*) 253872b676d7Smrg version_type=windows 253921525869Smrg shrext_cmds=.dll 254072b676d7Smrg need_version=no 254172b676d7Smrg need_lib_prefix=no 254272b676d7Smrg 254374c14cd6Smrg case $GCC,$cc_basename in 254474c14cd6Smrg yes,*) 254574c14cd6Smrg # gcc 254672b676d7Smrg library_names_spec='$libname.dll.a' 254772b676d7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 254821525869Smrg postinstall_cmds='base_file=`basename \$file`~ 254921525869Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 255072b676d7Smrg dldir=$destdir/`dirname \$dlpath`~ 255172b676d7Smrg test -d \$dldir || mkdir -p \$dldir~ 255272b676d7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2553e35772b2Smrg chmod a+x \$dldir/$dlname~ 2554e35772b2Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2555e35772b2Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2556e35772b2Smrg fi' 255772b676d7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 255872b676d7Smrg dlpath=$dir/\$dldll~ 2559e35772b2Smrg $RM \$dlpath' 256072b676d7Smrg shlibpath_overrides_runpath=yes 256172b676d7Smrg 256272b676d7Smrg case $host_os in 256372b676d7Smrg cygwin*) 256472b676d7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 256521525869Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 256674c14cd6Smrgm4_if([$1], [],[ 256774c14cd6Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 256872b676d7Smrg ;; 2569e35772b2Smrg mingw* | cegcc*) 257072b676d7Smrg # MinGW DLLs use traditional 'lib' prefix 257121525869Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257272b676d7Smrg ;; 257372b676d7Smrg pw32*) 257472b676d7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 257521525869Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 257672b676d7Smrg ;; 257772b676d7Smrg esac 257874c14cd6Smrg dynamic_linker='Win32 ld.exe' 257974c14cd6Smrg ;; 258074c14cd6Smrg 258174c14cd6Smrg *,cl*) 258274c14cd6Smrg # Native MSVC 258374c14cd6Smrg libname_spec='$name' 258421525869Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 258521525869Smrg library_names_spec='$libname.dll.lib' 258674c14cd6Smrg 258774c14cd6Smrg case $build_os in 258874c14cd6Smrg mingw*) 258974c14cd6Smrg sys_lib_search_path_spec= 259074c14cd6Smrg lt_save_ifs=$IFS 259174c14cd6Smrg IFS=';' 259274c14cd6Smrg for lt_path in $LIB 259374c14cd6Smrg do 259474c14cd6Smrg IFS=$lt_save_ifs 259574c14cd6Smrg # Let DOS variable expansion print the short 8.3 style file name. 259674c14cd6Smrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 259774c14cd6Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 259874c14cd6Smrg done 259974c14cd6Smrg IFS=$lt_save_ifs 260074c14cd6Smrg # Convert to MSYS style. 260174c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 260274c14cd6Smrg ;; 260374c14cd6Smrg cygwin*) 260474c14cd6Smrg # Convert to unix form, then to dos form, then back to unix form 260574c14cd6Smrg # but this time dos style (no spaces!) so that the unix form looks 260674c14cd6Smrg # like /cygdrive/c/PROGRA~1:/cygdr... 260774c14cd6Smrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 260874c14cd6Smrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 260974c14cd6Smrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 261074c14cd6Smrg ;; 261174c14cd6Smrg *) 261221525869Smrg sys_lib_search_path_spec=$LIB 261374c14cd6Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 261474c14cd6Smrg # It is most probably a Windows format PATH. 261574c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 261674c14cd6Smrg else 261774c14cd6Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 261874c14cd6Smrg fi 261974c14cd6Smrg # FIXME: find the short name or the path components, as spaces are 262074c14cd6Smrg # common. (e.g. "Program Files" -> "PROGRA~1") 262174c14cd6Smrg ;; 262274c14cd6Smrg esac 262374c14cd6Smrg 262474c14cd6Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 262521525869Smrg postinstall_cmds='base_file=`basename \$file`~ 262621525869Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 262774c14cd6Smrg dldir=$destdir/`dirname \$dlpath`~ 262874c14cd6Smrg test -d \$dldir || mkdir -p \$dldir~ 262974c14cd6Smrg $install_prog $dir/$dlname \$dldir/$dlname' 263074c14cd6Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 263174c14cd6Smrg dlpath=$dir/\$dldll~ 263274c14cd6Smrg $RM \$dlpath' 263374c14cd6Smrg shlibpath_overrides_runpath=yes 263474c14cd6Smrg dynamic_linker='Win32 link.exe' 263572b676d7Smrg ;; 263672b676d7Smrg 263772b676d7Smrg *) 263874c14cd6Smrg # Assume MSVC wrapper 263921525869Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 264074c14cd6Smrg dynamic_linker='Win32 ld.exe' 264172b676d7Smrg ;; 264272b676d7Smrg esac 264372b676d7Smrg # FIXME: first we should search . and the directory the executable is in 264472b676d7Smrg shlibpath_var=PATH 264572b676d7Smrg ;; 264672b676d7Smrg 264772b676d7Smrgdarwin* | rhapsody*) 264872b676d7Smrg dynamic_linker="$host_os dyld" 264972b676d7Smrg version_type=darwin 265072b676d7Smrg need_lib_prefix=no 265172b676d7Smrg need_version=no 265221525869Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 265321525869Smrg soname_spec='$libname$release$major$shared_ext' 265472b676d7Smrg shlibpath_overrides_runpath=yes 265572b676d7Smrg shlibpath_var=DYLD_LIBRARY_PATH 265672b676d7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2657e35772b2Smrgm4_if([$1], [],[ 2658e35772b2Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 265972b676d7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 266072b676d7Smrg ;; 266172b676d7Smrg 266272b676d7Smrgdgux*) 266374c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 266472b676d7Smrg need_lib_prefix=no 266572b676d7Smrg need_version=no 266621525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 266721525869Smrg soname_spec='$libname$release$shared_ext$major' 266872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 266972b676d7Smrg ;; 267072b676d7Smrg 267172b676d7Smrgfreebsd* | dragonfly*) 267272b676d7Smrg # DragonFly does not have aout. When/if they implement a new 267372b676d7Smrg # versioning mechanism, adjust this. 267472b676d7Smrg if test -x /usr/bin/objformat; then 267572b676d7Smrg objformat=`/usr/bin/objformat` 267672b676d7Smrg else 267772b676d7Smrg case $host_os in 267874c14cd6Smrg freebsd[[23]].*) objformat=aout ;; 267972b676d7Smrg *) objformat=elf ;; 268072b676d7Smrg esac 268172b676d7Smrg fi 268274fcc364Smrg version_type=freebsd-$objformat 268372b676d7Smrg case $version_type in 268472b676d7Smrg freebsd-elf*) 268521525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 268621525869Smrg soname_spec='$libname$release$shared_ext$major' 268772b676d7Smrg need_version=no 268872b676d7Smrg need_lib_prefix=no 268972b676d7Smrg ;; 269072b676d7Smrg freebsd-*) 269121525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 269272b676d7Smrg need_version=yes 269372b676d7Smrg ;; 269472b676d7Smrg esac 269572b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 269672b676d7Smrg case $host_os in 269774c14cd6Smrg freebsd2.*) 269872b676d7Smrg shlibpath_overrides_runpath=yes 269972b676d7Smrg ;; 270072b676d7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 270172b676d7Smrg shlibpath_overrides_runpath=yes 270272b676d7Smrg hardcode_into_libs=yes 270372b676d7Smrg ;; 270472b676d7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 270572b676d7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 270672b676d7Smrg shlibpath_overrides_runpath=no 270772b676d7Smrg hardcode_into_libs=yes 270872b676d7Smrg ;; 27091fd23544Smrg *) # from 4.6 on, and DragonFly 271072b676d7Smrg shlibpath_overrides_runpath=yes 271172b676d7Smrg hardcode_into_libs=yes 271272b676d7Smrg ;; 271372b676d7Smrg esac 271472b676d7Smrg ;; 271572b676d7Smrg 271674c14cd6Smrghaiku*) 271774c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 271874c14cd6Smrg need_lib_prefix=no 271974c14cd6Smrg need_version=no 272074c14cd6Smrg dynamic_linker="$host_os runtime_loader" 272121525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 272221525869Smrg soname_spec='$libname$release$shared_ext$major' 272374c14cd6Smrg shlibpath_var=LIBRARY_PATH 272421525869Smrg shlibpath_overrides_runpath=no 272574c14cd6Smrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 272672b676d7Smrg hardcode_into_libs=yes 272772b676d7Smrg ;; 272872b676d7Smrg 272972b676d7Smrghpux9* | hpux10* | hpux11*) 273072b676d7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 273172b676d7Smrg # link against other versions. 273272b676d7Smrg version_type=sunos 273372b676d7Smrg need_lib_prefix=no 273472b676d7Smrg need_version=no 273572b676d7Smrg case $host_cpu in 273672b676d7Smrg ia64*) 273772b676d7Smrg shrext_cmds='.so' 273872b676d7Smrg hardcode_into_libs=yes 273972b676d7Smrg dynamic_linker="$host_os dld.so" 274072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 274172b676d7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 274221525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 274321525869Smrg soname_spec='$libname$release$shared_ext$major' 274421525869Smrg if test 32 = "$HPUX_IA64_MODE"; then 274572b676d7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 274621525869Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 274772b676d7Smrg else 274872b676d7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 274921525869Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 275072b676d7Smrg fi 275172b676d7Smrg ;; 2752e35772b2Smrg hppa*64*) 2753e35772b2Smrg shrext_cmds='.sl' 2754e35772b2Smrg hardcode_into_libs=yes 2755e35772b2Smrg dynamic_linker="$host_os dld.sl" 2756e35772b2Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2757e35772b2Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 275821525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 275921525869Smrg soname_spec='$libname$release$shared_ext$major' 2760e35772b2Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2761e35772b2Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2762e35772b2Smrg ;; 2763e35772b2Smrg *) 276472b676d7Smrg shrext_cmds='.sl' 276572b676d7Smrg dynamic_linker="$host_os dld.sl" 276672b676d7Smrg shlibpath_var=SHLIB_PATH 276772b676d7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 276821525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 276921525869Smrg soname_spec='$libname$release$shared_ext$major' 277072b676d7Smrg ;; 277172b676d7Smrg esac 277274c14cd6Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 277372b676d7Smrg postinstall_cmds='chmod 555 $lib' 277474c14cd6Smrg # or fails outright, so override atomically: 277574c14cd6Smrg install_override_mode=555 277672b676d7Smrg ;; 277772b676d7Smrg 27781fd23544Smrginterix[[3-9]]*) 277974c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 278072b676d7Smrg need_lib_prefix=no 278172b676d7Smrg need_version=no 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 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 278572b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 278672b676d7Smrg shlibpath_overrides_runpath=no 278772b676d7Smrg hardcode_into_libs=yes 278872b676d7Smrg ;; 278972b676d7Smrg 279072b676d7Smrgirix5* | irix6* | nonstopux*) 279172b676d7Smrg case $host_os in 279272b676d7Smrg nonstopux*) version_type=nonstopux ;; 279372b676d7Smrg *) 279421525869Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 279574c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 279672b676d7Smrg else 279772b676d7Smrg version_type=irix 279872b676d7Smrg fi ;; 279972b676d7Smrg esac 280072b676d7Smrg need_lib_prefix=no 280172b676d7Smrg need_version=no 280221525869Smrg soname_spec='$libname$release$shared_ext$major' 280321525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 280472b676d7Smrg case $host_os in 280572b676d7Smrg irix5* | nonstopux*) 280672b676d7Smrg libsuff= shlibsuff= 280772b676d7Smrg ;; 280872b676d7Smrg *) 280972b676d7Smrg case $LD in # libtool.m4 will add one of these switches to LD 281072b676d7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 281172b676d7Smrg libsuff= shlibsuff= libmagic=32-bit;; 281272b676d7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 281372b676d7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 281472b676d7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 281572b676d7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 281672b676d7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 281772b676d7Smrg esac 281872b676d7Smrg ;; 281972b676d7Smrg esac 282072b676d7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 282172b676d7Smrg shlibpath_overrides_runpath=no 282221525869Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 282321525869Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 282472b676d7Smrg hardcode_into_libs=yes 282572b676d7Smrg ;; 282672b676d7Smrg 282772b676d7Smrg# No shared lib support for Linux oldld, aout, or coff. 282872b676d7Smrglinux*oldld* | linux*aout* | linux*coff*) 282972b676d7Smrg dynamic_linker=no 283072b676d7Smrg ;; 283172b676d7Smrg 283221525869Smrglinux*android*) 283321525869Smrg version_type=none # Android doesn't support versioned libraries. 283421525869Smrg need_lib_prefix=no 283521525869Smrg need_version=no 283621525869Smrg library_names_spec='$libname$release$shared_ext' 283721525869Smrg soname_spec='$libname$release$shared_ext' 283821525869Smrg finish_cmds= 283921525869Smrg shlibpath_var=LD_LIBRARY_PATH 284021525869Smrg shlibpath_overrides_runpath=yes 284121525869Smrg 284221525869Smrg # This implies no fast_install, which is unacceptable. 284321525869Smrg # Some rework will be needed to allow for fast_install 284421525869Smrg # before this can be enabled. 284521525869Smrg hardcode_into_libs=yes 284621525869Smrg 284721525869Smrg dynamic_linker='Android linker' 284821525869Smrg # Don't embed -rpath directories since the linker doesn't support them. 284921525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 285021525869Smrg ;; 285121525869Smrg 285274c14cd6Smrg# This must be glibc/ELF. 285321525869Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 285474c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 285572b676d7Smrg need_lib_prefix=no 285672b676d7Smrg need_version=no 285721525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 285821525869Smrg soname_spec='$libname$release$shared_ext$major' 285972b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 286072b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 286172b676d7Smrg shlibpath_overrides_runpath=no 286274c14cd6Smrg 2863e35772b2Smrg # Some binutils ld are patched to set DT_RUNPATH 286474c14cd6Smrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 286574c14cd6Smrg [lt_cv_shlibpath_overrides_runpath=no 286674c14cd6Smrg save_LDFLAGS=$LDFLAGS 286774c14cd6Smrg save_libdir=$libdir 286874c14cd6Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 286974c14cd6Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 287074c14cd6Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 287174c14cd6Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 287274c14cd6Smrg [lt_cv_shlibpath_overrides_runpath=yes])]) 287374c14cd6Smrg LDFLAGS=$save_LDFLAGS 287474c14cd6Smrg libdir=$save_libdir 287574c14cd6Smrg ]) 287674c14cd6Smrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2877e35772b2Smrg 287872b676d7Smrg # This implies no fast_install, which is unacceptable. 287972b676d7Smrg # Some rework will be needed to allow for fast_install 288072b676d7Smrg # before this can be enabled. 288172b676d7Smrg hardcode_into_libs=yes 2882e35772b2Smrg 288321525869Smrg # Ideally, we could use ldconfig to report *all* directores which are 288421525869Smrg # searched for libraries, however this is still not possible. Aside from not 288521525869Smrg # being certain /sbin/ldconfig is available, command 288621525869Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 288721525869Smrg # even though it is searched at run-time. Try to do the best guess by 288821525869Smrg # appending ld.so.conf contents (and includes) to the search path. 288972b676d7Smrg if test -f /etc/ld.so.conf; then 289074c14cd6Smrg 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' ' '` 289121525869Smrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 289272b676d7Smrg fi 289372b676d7Smrg 289472b676d7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 289572b676d7Smrg # powerpc, because MkLinux only supported shared libraries with the 289672b676d7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 289772b676d7Smrg # most powerpc-linux boxes support dynamic linking these days and 289872b676d7Smrg # people can always --disable-shared, the test was removed, and we 289972b676d7Smrg # assume the GNU/Linux dynamic linker is in use. 290072b676d7Smrg dynamic_linker='GNU/Linux ld.so' 290172b676d7Smrg ;; 290272b676d7Smrg 290374fcc364Smrgnetbsdelf*-gnu) 290474fcc364Smrg version_type=linux 290574fcc364Smrg need_lib_prefix=no 290674fcc364Smrg need_version=no 290774fcc364Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 290874fcc364Smrg soname_spec='${libname}${release}${shared_ext}$major' 290974fcc364Smrg shlibpath_var=LD_LIBRARY_PATH 291074fcc364Smrg shlibpath_overrides_runpath=no 291174fcc364Smrg hardcode_into_libs=yes 291274fcc364Smrg dynamic_linker='NetBSD ld.elf_so' 291374fcc364Smrg ;; 291474fcc364Smrg 291572b676d7Smrgnetbsd*) 291672b676d7Smrg version_type=sunos 291772b676d7Smrg need_lib_prefix=no 291872b676d7Smrg need_version=no 2919e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 292021525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 292172b676d7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 292272b676d7Smrg dynamic_linker='NetBSD (a.out) ld.so' 292372b676d7Smrg else 292421525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 292521525869Smrg soname_spec='$libname$release$shared_ext$major' 292672b676d7Smrg dynamic_linker='NetBSD ld.elf_so' 292772b676d7Smrg fi 292872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 292972b676d7Smrg shlibpath_overrides_runpath=yes 293072b676d7Smrg hardcode_into_libs=yes 293172b676d7Smrg ;; 293272b676d7Smrg 293372b676d7Smrgnewsos6) 293474c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 293521525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 293672b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 293772b676d7Smrg shlibpath_overrides_runpath=yes 293872b676d7Smrg ;; 293972b676d7Smrg 2940e35772b2Smrg*nto* | *qnx*) 2941e35772b2Smrg version_type=qnx 294272b676d7Smrg need_lib_prefix=no 294372b676d7Smrg need_version=no 294421525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 294521525869Smrg soname_spec='$libname$release$shared_ext$major' 294672b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 2947e35772b2Smrg shlibpath_overrides_runpath=no 2948e35772b2Smrg hardcode_into_libs=yes 2949e35772b2Smrg dynamic_linker='ldqnx.so' 295072b676d7Smrg ;; 295172b676d7Smrg 295221525869Smrgopenbsd* | bitrig*) 295372b676d7Smrg version_type=sunos 295421525869Smrg sys_lib_dlsearch_path_spec=/usr/lib 295572b676d7Smrg need_lib_prefix=no 295621525869Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 295721525869Smrg need_version=no 295872b676d7Smrg else 295921525869Smrg need_version=yes 296072b676d7Smrg fi 296121525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 296221525869Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 296321525869Smrg shlibpath_var=LD_LIBRARY_PATH 296421525869Smrg shlibpath_overrides_runpath=yes 296572b676d7Smrg ;; 296672b676d7Smrg 296772b676d7Smrgos2*) 296872b676d7Smrg libname_spec='$name' 296921525869Smrg version_type=windows 297021525869Smrg shrext_cmds=.dll 297121525869Smrg need_version=no 297272b676d7Smrg need_lib_prefix=no 297321525869Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 297421525869Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 297521525869Smrg v=$($ECHO $release$versuffix | tr -d .-); 297621525869Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 297721525869Smrg $ECHO $n$v`$shared_ext' 297821525869Smrg library_names_spec='${libname}_dll.$libext' 297972b676d7Smrg dynamic_linker='OS/2 ld.exe' 298021525869Smrg shlibpath_var=BEGINLIBPATH 298121525869Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 298221525869Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 298321525869Smrg postinstall_cmds='base_file=`basename \$file`~ 298421525869Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 298521525869Smrg dldir=$destdir/`dirname \$dlpath`~ 298621525869Smrg test -d \$dldir || mkdir -p \$dldir~ 298721525869Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 298821525869Smrg chmod a+x \$dldir/$dlname~ 298921525869Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 299021525869Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 299121525869Smrg fi' 299221525869Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 299321525869Smrg dlpath=$dir/\$dldll~ 299421525869Smrg $RM \$dlpath' 299572b676d7Smrg ;; 299672b676d7Smrg 299772b676d7Smrgosf3* | osf4* | osf5*) 299872b676d7Smrg version_type=osf 299972b676d7Smrg need_lib_prefix=no 300072b676d7Smrg need_version=no 300121525869Smrg soname_spec='$libname$release$shared_ext$major' 300221525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 300372b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 300472b676d7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 300521525869Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 300672b676d7Smrg ;; 300772b676d7Smrg 30081fd23544Smrgrdos*) 30091fd23544Smrg dynamic_linker=no 30101fd23544Smrg ;; 30111fd23544Smrg 301272b676d7Smrgsolaris*) 301374c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 301472b676d7Smrg need_lib_prefix=no 301572b676d7Smrg need_version=no 301621525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 301721525869Smrg soname_spec='$libname$release$shared_ext$major' 301872b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 301972b676d7Smrg shlibpath_overrides_runpath=yes 302072b676d7Smrg hardcode_into_libs=yes 302172b676d7Smrg # ldd complains unless libraries are executable 302272b676d7Smrg postinstall_cmds='chmod +x $lib' 302372b676d7Smrg ;; 302472b676d7Smrg 302572b676d7Smrgsunos4*) 302672b676d7Smrg version_type=sunos 302721525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 302872b676d7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 302972b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 303072b676d7Smrg shlibpath_overrides_runpath=yes 303121525869Smrg if test yes = "$with_gnu_ld"; then 303272b676d7Smrg need_lib_prefix=no 303372b676d7Smrg fi 303472b676d7Smrg need_version=yes 303572b676d7Smrg ;; 303672b676d7Smrg 303772b676d7Smrgsysv4 | sysv4.3*) 303874c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 303921525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 304021525869Smrg soname_spec='$libname$release$shared_ext$major' 304172b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 304272b676d7Smrg case $host_vendor in 304372b676d7Smrg sni) 304472b676d7Smrg shlibpath_overrides_runpath=no 304572b676d7Smrg need_lib_prefix=no 304672b676d7Smrg runpath_var=LD_RUN_PATH 304772b676d7Smrg ;; 304872b676d7Smrg siemens) 304972b676d7Smrg need_lib_prefix=no 305072b676d7Smrg ;; 305172b676d7Smrg motorola) 305272b676d7Smrg need_lib_prefix=no 305372b676d7Smrg need_version=no 305472b676d7Smrg shlibpath_overrides_runpath=no 305572b676d7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 305672b676d7Smrg ;; 305772b676d7Smrg esac 305872b676d7Smrg ;; 305972b676d7Smrg 306072b676d7Smrgsysv4*MP*) 306121525869Smrg if test -d /usr/nec; then 306274c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 306321525869Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 306421525869Smrg soname_spec='$libname$shared_ext.$major' 306572b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 306672b676d7Smrg fi 306772b676d7Smrg ;; 306872b676d7Smrg 306972b676d7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 307021525869Smrg version_type=sco 307172b676d7Smrg need_lib_prefix=no 307272b676d7Smrg need_version=no 307321525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 307421525869Smrg soname_spec='$libname$release$shared_ext$major' 307572b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 3076e35772b2Smrg shlibpath_overrides_runpath=yes 307772b676d7Smrg hardcode_into_libs=yes 307821525869Smrg if test yes = "$with_gnu_ld"; then 307972b676d7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 308072b676d7Smrg else 308172b676d7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 308272b676d7Smrg case $host_os in 308372b676d7Smrg sco3.2v5*) 308472b676d7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 308572b676d7Smrg ;; 308672b676d7Smrg esac 308772b676d7Smrg fi 308872b676d7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 308972b676d7Smrg ;; 309072b676d7Smrg 3091e35772b2Smrgtpf*) 3092e35772b2Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 309374c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 3094e35772b2Smrg need_lib_prefix=no 3095e35772b2Smrg need_version=no 309621525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3097e35772b2Smrg shlibpath_var=LD_LIBRARY_PATH 3098e35772b2Smrg shlibpath_overrides_runpath=no 3099e35772b2Smrg hardcode_into_libs=yes 3100e35772b2Smrg ;; 3101e35772b2Smrg 310272b676d7Smrguts4*) 310374c14cd6Smrg version_type=linux # correct to gnu/linux during the next big refactor 310421525869Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 310521525869Smrg soname_spec='$libname$release$shared_ext$major' 310672b676d7Smrg shlibpath_var=LD_LIBRARY_PATH 310772b676d7Smrg ;; 310872b676d7Smrg 310972b676d7Smrg*) 311072b676d7Smrg dynamic_linker=no 311172b676d7Smrg ;; 311272b676d7Smrgesac 311372b676d7SmrgAC_MSG_RESULT([$dynamic_linker]) 311421525869Smrgtest no = "$dynamic_linker" && can_build_shared=no 311572b676d7Smrg 311672b676d7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 311721525869Smrgif test yes = "$GCC"; then 311872b676d7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 311972b676d7Smrgfi 312072b676d7Smrg 312121525869Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 312221525869Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3123e35772b2Smrgfi 312421525869Smrg 312521525869Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 312621525869Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3127e35772b2Smrgfi 312872b676d7Smrg 312921525869Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 313021525869Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 313121525869Smrg 313221525869Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 313321525869Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 313421525869Smrg 313521525869Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 313621525869Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 313721525869Smrg 3138e35772b2Smrg_LT_DECL([], [variables_saved_for_relink], [1], 3139e35772b2Smrg [Variables whose values should be saved in libtool wrapper scripts and 3140e35772b2Smrg restored at link time]) 3141e35772b2Smrg_LT_DECL([], [need_lib_prefix], [0], 3142e35772b2Smrg [Do we need the "lib" prefix for modules?]) 3143e35772b2Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3144e35772b2Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3145e35772b2Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3146e35772b2Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3147e35772b2Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3148e35772b2Smrg [Is shlibpath searched before the hard-coded library search path?]) 3149e35772b2Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3150e35772b2Smrg_LT_DECL([], [library_names_spec], [1], 3151e35772b2Smrg [[List of archive names. First name is the real one, the rest are links. 3152e35772b2Smrg The last name is the one that the linker finds with -lNAME]]) 3153e35772b2Smrg_LT_DECL([], [soname_spec], [1], 3154e35772b2Smrg [[The coded name of the library, if different from the real name]]) 315574c14cd6Smrg_LT_DECL([], [install_override_mode], [1], 315674c14cd6Smrg [Permission mode override for installation of shared libraries]) 3157e35772b2Smrg_LT_DECL([], [postinstall_cmds], [2], 3158e35772b2Smrg [Command to use after installation of a shared archive]) 3159e35772b2Smrg_LT_DECL([], [postuninstall_cmds], [2], 3160e35772b2Smrg [Command to use after uninstallation of a shared archive]) 3161e35772b2Smrg_LT_DECL([], [finish_cmds], [2], 3162e35772b2Smrg [Commands used to finish a libtool library installation in a directory]) 3163e35772b2Smrg_LT_DECL([], [finish_eval], [1], 3164e35772b2Smrg [[As "finish_cmds", except a single script fragment to be evaled but 3165e35772b2Smrg not shown]]) 3166e35772b2Smrg_LT_DECL([], [hardcode_into_libs], [0], 3167e35772b2Smrg [Whether we should hardcode library paths into libraries]) 3168e35772b2Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3169e35772b2Smrg [Compile-time system search path for libraries]) 317021525869Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 317121525869Smrg [Detected run-time system search path for libraries]) 317221525869Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 317321525869Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3174e35772b2Smrg])# _LT_SYS_DYNAMIC_LINKER 3175e35772b2Smrg 3176e35772b2Smrg 3177e35772b2Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 317872b676d7Smrg# -------------------------- 317921525869Smrg# find a file program that can recognize shared library 3180e35772b2SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3181e35772b2Smrg[m4_require([_LT_DECL_EGREP])dnl 318272b676d7SmrgAC_MSG_CHECKING([for $1]) 318372b676d7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 318472b676d7Smrg[case $MAGIC_CMD in 318572b676d7Smrg[[\\/*] | ?:[\\/]*]) 318621525869Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 318772b676d7Smrg ;; 318872b676d7Smrg*) 318921525869Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 319021525869Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 319172b676d7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 319272b676d7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 319372b676d7Smrgdnl not every word. This closes a longstanding sh security hole. 3194e35772b2Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 319572b676d7Smrg for ac_dir in $ac_dummy; do 319621525869Smrg IFS=$lt_save_ifs 319772b676d7Smrg test -z "$ac_dir" && ac_dir=. 319821525869Smrg if test -f "$ac_dir/$1"; then 319921525869Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 320072b676d7Smrg if test -n "$file_magic_test_file"; then 320172b676d7Smrg case $deplibs_check_method in 320272b676d7Smrg "file_magic "*) 320372b676d7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 320421525869Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 320572b676d7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 320672b676d7Smrg $EGREP "$file_magic_regex" > /dev/null; then 320772b676d7Smrg : 320872b676d7Smrg else 3209e35772b2Smrg cat <<_LT_EOF 1>&2 321072b676d7Smrg 321172b676d7Smrg*** Warning: the command libtool uses to detect shared libraries, 321272b676d7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 321372b676d7Smrg*** The result is that libtool may fail to recognize shared libraries 321472b676d7Smrg*** as such. This will affect the creation of libtool libraries that 321572b676d7Smrg*** depend on shared libraries, but programs linked with such libtool 321672b676d7Smrg*** libraries will work regardless of this problem. Nevertheless, you 321772b676d7Smrg*** may want to report the problem to your system manager and/or to 321872b676d7Smrg*** bug-libtool@gnu.org 321972b676d7Smrg 3220e35772b2Smrg_LT_EOF 322172b676d7Smrg fi ;; 322272b676d7Smrg esac 322372b676d7Smrg fi 322472b676d7Smrg break 322572b676d7Smrg fi 322672b676d7Smrg done 322721525869Smrg IFS=$lt_save_ifs 322821525869Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 322972b676d7Smrg ;; 323072b676d7Smrgesac]) 323121525869SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 323272b676d7Smrgif test -n "$MAGIC_CMD"; then 323372b676d7Smrg AC_MSG_RESULT($MAGIC_CMD) 323472b676d7Smrgelse 323572b676d7Smrg AC_MSG_RESULT(no) 323672b676d7Smrgfi 3237e35772b2Smrg_LT_DECL([], [MAGIC_CMD], [0], 3238e35772b2Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3239e35772b2Smrg])# _LT_PATH_TOOL_PREFIX 324072b676d7Smrg 3241e35772b2Smrg# Old name: 3242e35772b2SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3243e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3244e35772b2Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 324572b676d7Smrg 3246e35772b2Smrg 3247e35772b2Smrg# _LT_PATH_MAGIC 3248e35772b2Smrg# -------------- 324921525869Smrg# find a file program that can recognize a shared library 3250e35772b2Smrgm4_defun([_LT_PATH_MAGIC], 3251e35772b2Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 325272b676d7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 325372b676d7Smrg if test -n "$ac_tool_prefix"; then 3254e35772b2Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 325572b676d7Smrg else 325672b676d7Smrg MAGIC_CMD=: 325772b676d7Smrg fi 325872b676d7Smrgfi 3259e35772b2Smrg])# _LT_PATH_MAGIC 326072b676d7Smrg 326172b676d7Smrg 3262e35772b2Smrg# LT_PATH_LD 326372b676d7Smrg# ---------- 326472b676d7Smrg# find the pathname to the GNU or non-GNU linker 3265e35772b2SmrgAC_DEFUN([LT_PATH_LD], 3266e35772b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 326772b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 326872b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3269e35772b2Smrgm4_require([_LT_DECL_SED])dnl 3270e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 327174c14cd6Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3272e35772b2Smrg 3273e35772b2SmrgAC_ARG_WITH([gnu-ld], 3274e35772b2Smrg [AS_HELP_STRING([--with-gnu-ld], 3275e35772b2Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 327621525869Smrg [test no = "$withval" || with_gnu_ld=yes], 3277e35772b2Smrg [with_gnu_ld=no])dnl 3278e35772b2Smrg 327972b676d7Smrgac_prog=ld 328021525869Smrgif test yes = "$GCC"; then 328172b676d7Smrg # Check if gcc -print-prog-name=ld gives a path. 328272b676d7Smrg AC_MSG_CHECKING([for ld used by $CC]) 328372b676d7Smrg case $host in 328472b676d7Smrg *-*-mingw*) 328521525869Smrg # gcc leaves a trailing carriage return, which upsets mingw 328672b676d7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 328772b676d7Smrg *) 328872b676d7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 328972b676d7Smrg esac 329072b676d7Smrg case $ac_prog in 329172b676d7Smrg # Accept absolute paths. 329272b676d7Smrg [[\\/]]* | ?:[[\\/]]*) 329372b676d7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 329472b676d7Smrg # Canonicalize the pathname of ld 3295e35772b2Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3296e35772b2Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3297e35772b2Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 329872b676d7Smrg done 329921525869Smrg test -z "$LD" && LD=$ac_prog 330072b676d7Smrg ;; 330172b676d7Smrg "") 330272b676d7Smrg # If it fails, then pretend we aren't using GCC. 330372b676d7Smrg ac_prog=ld 330472b676d7Smrg ;; 330572b676d7Smrg *) 330672b676d7Smrg # If it is relative, then search for the first ld in PATH. 330772b676d7Smrg with_gnu_ld=unknown 330872b676d7Smrg ;; 330972b676d7Smrg esac 331021525869Smrgelif test yes = "$with_gnu_ld"; then 331172b676d7Smrg AC_MSG_CHECKING([for GNU ld]) 331272b676d7Smrgelse 331372b676d7Smrg AC_MSG_CHECKING([for non-GNU ld]) 331472b676d7Smrgfi 331572b676d7SmrgAC_CACHE_VAL(lt_cv_path_LD, 331672b676d7Smrg[if test -z "$LD"; then 331721525869Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 331872b676d7Smrg for ac_dir in $PATH; do 331921525869Smrg IFS=$lt_save_ifs 332072b676d7Smrg test -z "$ac_dir" && ac_dir=. 332172b676d7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 332221525869Smrg lt_cv_path_LD=$ac_dir/$ac_prog 332372b676d7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 332472b676d7Smrg # but apparently some variants of GNU ld only accept -v. 332572b676d7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 332672b676d7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 332772b676d7Smrg *GNU* | *'with BFD'*) 332821525869Smrg test no != "$with_gnu_ld" && break 332972b676d7Smrg ;; 333072b676d7Smrg *) 333121525869Smrg test yes != "$with_gnu_ld" && break 333272b676d7Smrg ;; 333372b676d7Smrg esac 333472b676d7Smrg fi 333572b676d7Smrg done 333621525869Smrg IFS=$lt_save_ifs 333772b676d7Smrgelse 333821525869Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 333972b676d7Smrgfi]) 334021525869SmrgLD=$lt_cv_path_LD 334172b676d7Smrgif test -n "$LD"; then 334272b676d7Smrg AC_MSG_RESULT($LD) 334372b676d7Smrgelse 334472b676d7Smrg AC_MSG_RESULT(no) 334572b676d7Smrgfi 334672b676d7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3347e35772b2Smrg_LT_PATH_LD_GNU 3348e35772b2SmrgAC_SUBST([LD]) 334972b676d7Smrg 3350e35772b2Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3351e35772b2Smrg])# LT_PATH_LD 335272b676d7Smrg 3353e35772b2Smrg# Old names: 3354e35772b2SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3355e35772b2SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3356e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3357e35772b2Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3358e35772b2Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3359e35772b2Smrg 3360e35772b2Smrg 3361e35772b2Smrg# _LT_PATH_LD_GNU 3362e35772b2Smrg#- -------------- 3363e35772b2Smrgm4_defun([_LT_PATH_LD_GNU], 3364e35772b2Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 336572b676d7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 336672b676d7Smrgcase `$LD -v 2>&1 </dev/null` in 336772b676d7Smrg*GNU* | *'with BFD'*) 336872b676d7Smrg lt_cv_prog_gnu_ld=yes 336972b676d7Smrg ;; 337072b676d7Smrg*) 337172b676d7Smrg lt_cv_prog_gnu_ld=no 337272b676d7Smrg ;; 337372b676d7Smrgesac]) 337472b676d7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3375e35772b2Smrg])# _LT_PATH_LD_GNU 337672b676d7Smrg 337772b676d7Smrg 3378e35772b2Smrg# _LT_CMD_RELOAD 3379e35772b2Smrg# -------------- 338072b676d7Smrg# find reload flag for linker 338172b676d7Smrg# -- PORTME Some linkers may need a different reload flag. 3382e35772b2Smrgm4_defun([_LT_CMD_RELOAD], 338372b676d7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 338472b676d7Smrg lt_cv_ld_reload_flag, 338572b676d7Smrg [lt_cv_ld_reload_flag='-r']) 338672b676d7Smrgreload_flag=$lt_cv_ld_reload_flag 338772b676d7Smrgcase $reload_flag in 338872b676d7Smrg"" | " "*) ;; 338972b676d7Smrg*) reload_flag=" $reload_flag" ;; 339072b676d7Smrgesac 339172b676d7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 339272b676d7Smrgcase $host_os in 339374c14cd6Smrg cygwin* | mingw* | pw32* | cegcc*) 339421525869Smrg if test yes != "$GCC"; then 339574c14cd6Smrg reload_cmds=false 339674c14cd6Smrg fi 339774c14cd6Smrg ;; 339872b676d7Smrg darwin*) 339921525869Smrg if test yes = "$GCC"; then 340021525869Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 340172b676d7Smrg else 340272b676d7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 340372b676d7Smrg fi 340472b676d7Smrg ;; 340572b676d7Smrgesac 340674c14cd6Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 340774c14cd6Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3408e35772b2Smrg])# _LT_CMD_RELOAD 340972b676d7Smrg 341072b676d7Smrg 341121525869Smrg# _LT_PATH_DD 341221525869Smrg# ----------- 341321525869Smrg# find a working dd 341421525869Smrgm4_defun([_LT_PATH_DD], 341521525869Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 341621525869Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 341721525869Smrgcat conftest.i conftest.i >conftest2.i 341821525869Smrg: ${lt_DD:=$DD} 341921525869SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 342021525869Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 342121525869Smrg cmp -s conftest.i conftest.out \ 342221525869Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 342321525869Smrgfi]) 342421525869Smrgrm -f conftest.i conftest2.i conftest.out]) 342521525869Smrg])# _LT_PATH_DD 342621525869Smrg 342721525869Smrg 342821525869Smrg# _LT_CMD_TRUNCATE 342921525869Smrg# ---------------- 343021525869Smrg# find command to truncate a binary pipe 343121525869Smrgm4_defun([_LT_CMD_TRUNCATE], 343221525869Smrg[m4_require([_LT_PATH_DD]) 343321525869SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 343421525869Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 343521525869Smrgcat conftest.i conftest.i >conftest2.i 343621525869Smrglt_cv_truncate_bin= 343721525869Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 343821525869Smrg cmp -s conftest.i conftest.out \ 343921525869Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 344021525869Smrgfi 344121525869Smrgrm -f conftest.i conftest2.i conftest.out 344221525869Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 344321525869Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 344421525869Smrg [Command to truncate a binary pipe]) 344521525869Smrg])# _LT_CMD_TRUNCATE 344621525869Smrg 344721525869Smrg 3448e35772b2Smrg# _LT_CHECK_MAGIC_METHOD 3449e35772b2Smrg# ---------------------- 345072b676d7Smrg# how to check for library dependencies 345172b676d7Smrg# -- PORTME fill in with the dynamic library characteristics 3452e35772b2Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3453e35772b2Smrg[m4_require([_LT_DECL_EGREP]) 3454e35772b2Smrgm4_require([_LT_DECL_OBJDUMP]) 3455e35772b2SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 345672b676d7Smrglt_cv_deplibs_check_method, 345772b676d7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 345872b676d7Smrglt_cv_file_magic_test_file= 345972b676d7Smrglt_cv_deplibs_check_method='unknown' 346072b676d7Smrg# Need to set the preceding variable on all platforms that support 346172b676d7Smrg# interlibrary dependencies. 346272b676d7Smrg# 'none' -- dependencies not supported. 346321525869Smrg# 'unknown' -- same as none, but documents that we really don't know. 346472b676d7Smrg# 'pass_all' -- all dependencies passed with no checks. 346572b676d7Smrg# 'test_compile' -- check by making test program. 346672b676d7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 346721525869Smrg# that responds to the $file_magic_cmd with a given extended regex. 346821525869Smrg# If you have 'file' or equivalent on your system and you're not sure 346921525869Smrg# whether 'pass_all' will *always* work, you probably want this one. 347072b676d7Smrg 347172b676d7Smrgcase $host_os in 34721fd23544Smrgaix[[4-9]]*) 347372b676d7Smrg lt_cv_deplibs_check_method=pass_all 347472b676d7Smrg ;; 347572b676d7Smrg 347672b676d7Smrgbeos*) 347772b676d7Smrg lt_cv_deplibs_check_method=pass_all 347872b676d7Smrg ;; 347972b676d7Smrg 348072b676d7Smrgbsdi[[45]]*) 348172b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 348272b676d7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 348372b676d7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 348472b676d7Smrg ;; 348572b676d7Smrg 348672b676d7Smrgcygwin*) 348772b676d7Smrg # func_win32_libid is a shell function defined in ltmain.sh 348872b676d7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 348972b676d7Smrg lt_cv_file_magic_cmd='func_win32_libid' 349072b676d7Smrg ;; 349172b676d7Smrg 349272b676d7Smrgmingw* | pw32*) 349372b676d7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 34941fd23544Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 34951fd23544Smrg # unless we find 'file', for example because we are cross-compiling. 349621525869Smrg if ( file / ) >/dev/null 2>&1; then 34971fd23544Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 34981fd23544Smrg lt_cv_file_magic_cmd='func_win32_libid' 34991fd23544Smrg else 350074c14cd6Smrg # Keep this pattern in sync with the one in func_win32_libid. 350174c14cd6Smrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 35021fd23544Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 35031fd23544Smrg fi 350472b676d7Smrg ;; 350572b676d7Smrg 350674c14cd6Smrgcegcc*) 3507e35772b2Smrg # use the weaker test based on 'objdump'. See mingw*. 3508e35772b2Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3509e35772b2Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3510e35772b2Smrg ;; 3511e35772b2Smrg 351272b676d7Smrgdarwin* | rhapsody*) 351372b676d7Smrg lt_cv_deplibs_check_method=pass_all 351472b676d7Smrg ;; 351572b676d7Smrg 351672b676d7Smrgfreebsd* | dragonfly*) 3517e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 351872b676d7Smrg case $host_cpu in 351972b676d7Smrg i*86 ) 352072b676d7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 352172b676d7Smrg # Let's accept both of them until this is cleared up. 352272b676d7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 352372b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 352472b676d7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 352572b676d7Smrg ;; 352672b676d7Smrg esac 352772b676d7Smrg else 352872b676d7Smrg lt_cv_deplibs_check_method=pass_all 352972b676d7Smrg fi 353072b676d7Smrg ;; 353172b676d7Smrg 353274c14cd6Smrghaiku*) 353374c14cd6Smrg lt_cv_deplibs_check_method=pass_all 353474c14cd6Smrg ;; 353574c14cd6Smrg 353672b676d7Smrghpux10.20* | hpux11*) 353772b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 353872b676d7Smrg case $host_cpu in 353972b676d7Smrg ia64*) 354072b676d7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 354172b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 354272b676d7Smrg ;; 354372b676d7Smrg hppa*64*) 354474c14cd6Smrg [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]'] 354572b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 354672b676d7Smrg ;; 354772b676d7Smrg *) 354874c14cd6Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 354972b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 355072b676d7Smrg ;; 355172b676d7Smrg esac 355272b676d7Smrg ;; 355372b676d7Smrg 35541fd23544Smrginterix[[3-9]]*) 355572b676d7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 355672b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 355772b676d7Smrg ;; 355872b676d7Smrg 355972b676d7Smrgirix5* | irix6* | nonstopux*) 356072b676d7Smrg case $LD in 356172b676d7Smrg *-32|*"-32 ") libmagic=32-bit;; 356272b676d7Smrg *-n32|*"-n32 ") libmagic=N32;; 356372b676d7Smrg *-64|*"-64 ") libmagic=64-bit;; 356472b676d7Smrg *) libmagic=never-match;; 356572b676d7Smrg esac 356672b676d7Smrg lt_cv_deplibs_check_method=pass_all 356772b676d7Smrg ;; 356872b676d7Smrg 356974c14cd6Smrg# This must be glibc/ELF. 357021525869Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 357172b676d7Smrg lt_cv_deplibs_check_method=pass_all 357272b676d7Smrg ;; 357372b676d7Smrg 357474fcc364Smrgnetbsd* | netbsdelf*-gnu) 3575e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 357672b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 357772b676d7Smrg else 357872b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 357972b676d7Smrg fi 358072b676d7Smrg ;; 358172b676d7Smrg 358272b676d7Smrgnewos6*) 358372b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 358472b676d7Smrg lt_cv_file_magic_cmd=/usr/bin/file 358572b676d7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 358672b676d7Smrg ;; 358772b676d7Smrg 3588e35772b2Smrg*nto* | *qnx*) 3589e35772b2Smrg lt_cv_deplibs_check_method=pass_all 359072b676d7Smrg ;; 359172b676d7Smrg 359221525869Smrgopenbsd* | bitrig*) 359321525869Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 359472b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 359572b676d7Smrg else 359672b676d7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 359772b676d7Smrg fi 359872b676d7Smrg ;; 359972b676d7Smrg 360072b676d7Smrgosf3* | osf4* | osf5*) 360172b676d7Smrg lt_cv_deplibs_check_method=pass_all 360272b676d7Smrg ;; 360372b676d7Smrg 36041fd23544Smrgrdos*) 36051fd23544Smrg lt_cv_deplibs_check_method=pass_all 36061fd23544Smrg ;; 36071fd23544Smrg 360872b676d7Smrgsolaris*) 360972b676d7Smrg lt_cv_deplibs_check_method=pass_all 361072b676d7Smrg ;; 361172b676d7Smrg 3612e35772b2Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3613e35772b2Smrg lt_cv_deplibs_check_method=pass_all 3614e35772b2Smrg ;; 3615e35772b2Smrg 361672b676d7Smrgsysv4 | sysv4.3*) 361772b676d7Smrg case $host_vendor in 361872b676d7Smrg motorola) 361972b676d7Smrg 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]]' 362072b676d7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 362172b676d7Smrg ;; 362272b676d7Smrg ncr) 362372b676d7Smrg lt_cv_deplibs_check_method=pass_all 362472b676d7Smrg ;; 362572b676d7Smrg sequent) 362672b676d7Smrg lt_cv_file_magic_cmd='/bin/file' 362772b676d7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 362872b676d7Smrg ;; 362972b676d7Smrg sni) 363072b676d7Smrg lt_cv_file_magic_cmd='/bin/file' 363172b676d7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 363272b676d7Smrg lt_cv_file_magic_test_file=/lib/libc.so 363372b676d7Smrg ;; 363472b676d7Smrg siemens) 363572b676d7Smrg lt_cv_deplibs_check_method=pass_all 363672b676d7Smrg ;; 363772b676d7Smrg pc) 363872b676d7Smrg lt_cv_deplibs_check_method=pass_all 363972b676d7Smrg ;; 364072b676d7Smrg esac 364172b676d7Smrg ;; 364272b676d7Smrg 3643e35772b2Smrgtpf*) 364472b676d7Smrg lt_cv_deplibs_check_method=pass_all 364572b676d7Smrg ;; 364621525869Smrgos2*) 364721525869Smrg lt_cv_deplibs_check_method=pass_all 364821525869Smrg ;; 364972b676d7Smrgesac 365072b676d7Smrg]) 365174c14cd6Smrg 365274c14cd6Smrgfile_magic_glob= 365374c14cd6Smrgwant_nocaseglob=no 365474c14cd6Smrgif test "$build" = "$host"; then 365574c14cd6Smrg case $host_os in 365674c14cd6Smrg mingw* | pw32*) 365774c14cd6Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 365874c14cd6Smrg want_nocaseglob=yes 365974c14cd6Smrg else 366074c14cd6Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 366174c14cd6Smrg fi 366274c14cd6Smrg ;; 366374c14cd6Smrg esac 366474c14cd6Smrgfi 366574c14cd6Smrg 366672b676d7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 366772b676d7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 366872b676d7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 366972b676d7Smrg 3670e35772b2Smrg_LT_DECL([], [deplibs_check_method], [1], 3671e35772b2Smrg [Method to check whether dependent libraries are shared objects]) 3672e35772b2Smrg_LT_DECL([], [file_magic_cmd], [1], 367374c14cd6Smrg [Command to use when deplibs_check_method = "file_magic"]) 367474c14cd6Smrg_LT_DECL([], [file_magic_glob], [1], 367574c14cd6Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 367674c14cd6Smrg_LT_DECL([], [want_nocaseglob], [1], 367774c14cd6Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3678e35772b2Smrg])# _LT_CHECK_MAGIC_METHOD 367972b676d7Smrg 3680e35772b2Smrg 3681e35772b2Smrg# LT_PATH_NM 368272b676d7Smrg# ---------- 3683e35772b2Smrg# find the pathname to a BSD- or MS-compatible name lister 3684e35772b2SmrgAC_DEFUN([LT_PATH_NM], 3685e35772b2Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3686e35772b2SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 368772b676d7Smrg[if test -n "$NM"; then 368872b676d7Smrg # Let the user override the test. 368921525869Smrg lt_cv_path_NM=$NM 369072b676d7Smrgelse 369121525869Smrg lt_nm_to_check=${ac_tool_prefix}nm 36921fd23544Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 369372b676d7Smrg lt_nm_to_check="$lt_nm_to_check nm" 369472b676d7Smrg fi 369572b676d7Smrg for lt_tmp_nm in $lt_nm_to_check; do 369621525869Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 369772b676d7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 369821525869Smrg IFS=$lt_save_ifs 369972b676d7Smrg test -z "$ac_dir" && ac_dir=. 370021525869Smrg tmp_nm=$ac_dir/$lt_tmp_nm 370121525869Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 370272b676d7Smrg # Check to see if the nm accepts a BSD-compat flag. 370321525869Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 370472b676d7Smrg # nm: unknown option "B" ignored 370572b676d7Smrg # Tru64's nm complains that /dev/null is an invalid object file 370621525869Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 370721525869Smrg case $build_os in 370821525869Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 370921525869Smrg *) lt_bad_file=/dev/null ;; 371021525869Smrg esac 371121525869Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 371221525869Smrg *$lt_bad_file* | *'Invalid file or object type'*) 371372b676d7Smrg lt_cv_path_NM="$tmp_nm -B" 371421525869Smrg break 2 371572b676d7Smrg ;; 371672b676d7Smrg *) 371772b676d7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 371872b676d7Smrg */dev/null*) 371972b676d7Smrg lt_cv_path_NM="$tmp_nm -p" 372021525869Smrg break 2 372172b676d7Smrg ;; 372272b676d7Smrg *) 372372b676d7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 372472b676d7Smrg continue # so that we can try to find one that supports BSD flags 372572b676d7Smrg ;; 372672b676d7Smrg esac 372772b676d7Smrg ;; 372872b676d7Smrg esac 372972b676d7Smrg fi 373072b676d7Smrg done 373121525869Smrg IFS=$lt_save_ifs 373272b676d7Smrg done 3733e35772b2Smrg : ${lt_cv_path_NM=no} 373472b676d7Smrgfi]) 373521525869Smrgif test no != "$lt_cv_path_NM"; then 373621525869Smrg NM=$lt_cv_path_NM 3737e35772b2Smrgelse 3738e35772b2Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 373974c14cd6Smrg if test -n "$DUMPBIN"; then : 374074c14cd6Smrg # Let the user override the test. 374174c14cd6Smrg else 374274c14cd6Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 374321525869Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 374474c14cd6Smrg *COFF*) 374521525869Smrg DUMPBIN="$DUMPBIN -symbols -headers" 374674c14cd6Smrg ;; 374774c14cd6Smrg *) 374874c14cd6Smrg DUMPBIN=: 374974c14cd6Smrg ;; 375074c14cd6Smrg esac 375174c14cd6Smrg fi 3752e35772b2Smrg AC_SUBST([DUMPBIN]) 375321525869Smrg if test : != "$DUMPBIN"; then 375421525869Smrg NM=$DUMPBIN 3755e35772b2Smrg fi 3756e35772b2Smrgfi 3757e35772b2Smrgtest -z "$NM" && NM=nm 3758e35772b2SmrgAC_SUBST([NM]) 3759e35772b2Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3760e35772b2Smrg 3761e35772b2SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3762e35772b2Smrg [lt_cv_nm_interface="BSD nm" 3763e35772b2Smrg echo "int some_variable = 0;" > conftest.$ac_ext 376474c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3765e35772b2Smrg (eval "$ac_compile" 2>conftest.err) 3766e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 376774c14cd6Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3768e35772b2Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3769e35772b2Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 377074c14cd6Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3771e35772b2Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3772e35772b2Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3773e35772b2Smrg lt_cv_nm_interface="MS dumpbin" 3774e35772b2Smrg fi 3775e35772b2Smrg rm -f conftest*]) 3776e35772b2Smrg])# LT_PATH_NM 377772b676d7Smrg 3778e35772b2Smrg# Old names: 3779e35772b2SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3780e35772b2SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3781e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3782e35772b2Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3783e35772b2Smrgdnl AC_DEFUN([AC_PROG_NM], []) 378472b676d7Smrg 378574c14cd6Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 378674c14cd6Smrg# -------------------------------- 378774c14cd6Smrg# how to determine the name of the shared library 378874c14cd6Smrg# associated with a specific link library. 378974c14cd6Smrg# -- PORTME fill in with the dynamic library characteristics 379074c14cd6Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 379174c14cd6Smrg[m4_require([_LT_DECL_EGREP]) 379274c14cd6Smrgm4_require([_LT_DECL_OBJDUMP]) 379374c14cd6Smrgm4_require([_LT_DECL_DLLTOOL]) 379474c14cd6SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 379574c14cd6Smrglt_cv_sharedlib_from_linklib_cmd, 379674c14cd6Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 379774c14cd6Smrg 379874c14cd6Smrgcase $host_os in 379974c14cd6Smrgcygwin* | mingw* | pw32* | cegcc*) 380021525869Smrg # two different shell functions defined in ltmain.sh; 380121525869Smrg # decide which one to use based on capabilities of $DLLTOOL 380274c14cd6Smrg case `$DLLTOOL --help 2>&1` in 380374c14cd6Smrg *--identify-strict*) 380474c14cd6Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 380574c14cd6Smrg ;; 380674c14cd6Smrg *) 380774c14cd6Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 380874c14cd6Smrg ;; 380974c14cd6Smrg esac 381074c14cd6Smrg ;; 381174c14cd6Smrg*) 381274c14cd6Smrg # fallback: assume linklib IS sharedlib 381321525869Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 381474c14cd6Smrg ;; 381574c14cd6Smrgesac 381674c14cd6Smrg]) 381774c14cd6Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 381874c14cd6Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 381974c14cd6Smrg 382074c14cd6Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 382174c14cd6Smrg [Command to associate shared and link libraries]) 382274c14cd6Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 382374c14cd6Smrg 382474c14cd6Smrg 382574c14cd6Smrg# _LT_PATH_MANIFEST_TOOL 382674c14cd6Smrg# ---------------------- 382774c14cd6Smrg# locate the manifest tool 382874c14cd6Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 382974c14cd6Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 383074c14cd6Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 383174c14cd6SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 383274c14cd6Smrg [lt_cv_path_mainfest_tool=no 383374c14cd6Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 383474c14cd6Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 383574c14cd6Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 383674c14cd6Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 383774c14cd6Smrg lt_cv_path_mainfest_tool=yes 383874c14cd6Smrg fi 383974c14cd6Smrg rm -f conftest*]) 384021525869Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 384174c14cd6Smrg MANIFEST_TOOL=: 384274c14cd6Smrgfi 384374c14cd6Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 384474c14cd6Smrg])# _LT_PATH_MANIFEST_TOOL 384574c14cd6Smrg 3846e35772b2Smrg 384721525869Smrg# _LT_DLL_DEF_P([FILE]) 384821525869Smrg# --------------------- 384921525869Smrg# True iff FILE is a Windows DLL '.def' file. 385021525869Smrg# Keep in sync with func_dll_def_p in the libtool script 385121525869SmrgAC_DEFUN([_LT_DLL_DEF_P], 385221525869Smrg[dnl 385321525869Smrg test DEF = "`$SED -n dnl 385421525869Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 385521525869Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 385621525869Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 385721525869Smrg -e q dnl Only consider the first "real" line 385821525869Smrg $1`" dnl 385921525869Smrg])# _LT_DLL_DEF_P 386021525869Smrg 386121525869Smrg 3862e35772b2Smrg# LT_LIB_M 3863e35772b2Smrg# -------- 386472b676d7Smrg# check for math library 3865e35772b2SmrgAC_DEFUN([LT_LIB_M], 386672b676d7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 386772b676d7SmrgLIBM= 386872b676d7Smrgcase $host in 386974c14cd6Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 387072b676d7Smrg # These system don't have libm, or don't need it 387172b676d7Smrg ;; 387272b676d7Smrg*-ncr-sysv4.3*) 387321525869Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 387472b676d7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 387572b676d7Smrg ;; 387672b676d7Smrg*) 387721525869Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 387872b676d7Smrg ;; 387972b676d7Smrgesac 3880e35772b2SmrgAC_SUBST([LIBM]) 3881e35772b2Smrg])# LT_LIB_M 388272b676d7Smrg 3883e35772b2Smrg# Old name: 3884e35772b2SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3885e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 3886e35772b2Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 388772b676d7Smrg 388872b676d7Smrg 3889e35772b2Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3890e35772b2Smrg# ------------------------------- 3891e35772b2Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3892e35772b2Smrg[m4_require([_LT_TAG_COMPILER])dnl 389372b676d7Smrg 3894e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 389572b676d7Smrg 389621525869Smrgif test yes = "$GCC"; then 389774c14cd6Smrg case $cc_basename in 389874c14cd6Smrg nvcc*) 389974c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 390074c14cd6Smrg *) 390174c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 390274c14cd6Smrg esac 390372b676d7Smrg 3904e35772b2Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3905e35772b2Smrg lt_cv_prog_compiler_rtti_exceptions, 3906e35772b2Smrg [-fno-rtti -fno-exceptions], [], 3907e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3908e35772b2Smrgfi 3909e35772b2Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3910e35772b2Smrg [Compiler flag to turn off builtin functions]) 3911e35772b2Smrg])# _LT_COMPILER_NO_RTTI 391272b676d7Smrg 391372b676d7Smrg 3914e35772b2Smrg# _LT_CMD_GLOBAL_SYMBOLS 3915e35772b2Smrg# ---------------------- 3916e35772b2Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3917e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3918e35772b2SmrgAC_REQUIRE([AC_PROG_CC])dnl 391974c14cd6SmrgAC_REQUIRE([AC_PROG_AWK])dnl 3920e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 3921e35772b2SmrgAC_REQUIRE([LT_PATH_LD])dnl 3922e35772b2Smrgm4_require([_LT_DECL_SED])dnl 3923e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 3924e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 392572b676d7Smrg 3926e35772b2Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3927e35772b2SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3928e35772b2SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 392972b676d7Smrg[ 3930e35772b2Smrg# These are sane defaults that work on at least a few old systems. 3931e35772b2Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 393272b676d7Smrg 3933e35772b2Smrg# Character class describing NM global symbol codes. 3934e35772b2Smrgsymcode='[[BCDEGRST]]' 393572b676d7Smrg 3936e35772b2Smrg# Regexp to match symbols that can be accessed directly from C. 3937e35772b2Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 393872b676d7Smrg 3939e35772b2Smrg# Define system-specific variables. 3940e35772b2Smrgcase $host_os in 3941e35772b2Smrgaix*) 3942e35772b2Smrg symcode='[[BCDT]]' 3943e35772b2Smrg ;; 3944e35772b2Smrgcygwin* | mingw* | pw32* | cegcc*) 3945e35772b2Smrg symcode='[[ABCDGISTW]]' 3946e35772b2Smrg ;; 3947e35772b2Smrghpux*) 394821525869Smrg if test ia64 = "$host_cpu"; then 3949e35772b2Smrg symcode='[[ABCDEGRST]]' 3950e35772b2Smrg fi 3951e35772b2Smrg ;; 3952e35772b2Smrgirix* | nonstopux*) 3953e35772b2Smrg symcode='[[BCDEGRST]]' 3954e35772b2Smrg ;; 3955e35772b2Smrgosf*) 3956e35772b2Smrg symcode='[[BCDEGQRST]]' 3957e35772b2Smrg ;; 3958e35772b2Smrgsolaris*) 3959e35772b2Smrg symcode='[[BDRT]]' 3960e35772b2Smrg ;; 3961e35772b2Smrgsco3.2v5*) 3962e35772b2Smrg symcode='[[DT]]' 3963e35772b2Smrg ;; 3964e35772b2Smrgsysv4.2uw2*) 3965e35772b2Smrg symcode='[[DT]]' 3966e35772b2Smrg ;; 3967e35772b2Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3968e35772b2Smrg symcode='[[ABDT]]' 3969e35772b2Smrg ;; 3970e35772b2Smrgsysv4) 3971e35772b2Smrg symcode='[[DFNSTU]]' 3972e35772b2Smrg ;; 3973e35772b2Smrgesac 397472b676d7Smrg 3975e35772b2Smrg# If we're using GNU nm, then use its standard symbol codes. 3976e35772b2Smrgcase `$NM -V 2>&1` in 3977e35772b2Smrg*GNU* | *'with BFD'*) 3978e35772b2Smrg symcode='[[ABCDGIRSTW]]' ;; 3979e35772b2Smrgesac 398072b676d7Smrg 398121525869Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 398221525869Smrg # Gets list of data symbols to import. 398321525869Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 398421525869Smrg # Adjust the below global symbol transforms to fixup imported variables. 398521525869Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 398621525869Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 398721525869Smrg lt_c_name_lib_hook="\ 398821525869Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 398921525869Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 399021525869Smrgelse 399121525869Smrg # Disable hooks by default. 399221525869Smrg lt_cv_sys_global_symbol_to_import= 399321525869Smrg lt_cdecl_hook= 399421525869Smrg lt_c_name_hook= 399521525869Smrg lt_c_name_lib_hook= 399621525869Smrgfi 399721525869Smrg 3998e35772b2Smrg# Transform an extracted symbol line into a proper C declaration. 3999e35772b2Smrg# Some systems (esp. on ia64) link data and code symbols differently, 4000e35772b2Smrg# so use this general approach. 400121525869Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 400221525869Smrg$lt_cdecl_hook\ 400321525869Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 400421525869Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 400572b676d7Smrg 4006e35772b2Smrg# Transform an extracted symbol line into symbol name and symbol address 400721525869Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 400821525869Smrg$lt_c_name_hook\ 400921525869Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 401021525869Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 401121525869Smrg 401221525869Smrg# Transform an extracted symbol line into symbol name with lib prefix and 401321525869Smrg# symbol address. 401421525869Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 401521525869Smrg$lt_c_name_lib_hook\ 401621525869Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 401721525869Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 401821525869Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 401972b676d7Smrg 4020e35772b2Smrg# Handle CRLF in mingw tool chain 4021e35772b2Smrgopt_cr= 4022e35772b2Smrgcase $build_os in 4023e35772b2Smrgmingw*) 4024e35772b2Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4025e35772b2Smrg ;; 4026e35772b2Smrgesac 402772b676d7Smrg 4028e35772b2Smrg# Try without a prefix underscore, then with it. 4029e35772b2Smrgfor ac_symprfx in "" "_"; do 403072b676d7Smrg 4031e35772b2Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4032e35772b2Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 403372b676d7Smrg 4034e35772b2Smrg # Write the raw and C identifiers. 4035e35772b2Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 403621525869Smrg # Fake it for dumpbin and say T for any non-static function, 403721525869Smrg # D for any global variable and I for any imported variable. 4038e35772b2Smrg # Also find C++ and __fastcall symbols from MSVC++, 4039e35772b2Smrg # which start with @ or ?. 4040e35772b2Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4041e35772b2Smrg" {last_section=section; section=\$ 3};"\ 404274c14cd6Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4043e35772b2Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 404421525869Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 404521525869Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 404621525869Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4047e35772b2Smrg" \$ 0!~/External *\|/{next};"\ 4048e35772b2Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4049e35772b2Smrg" {if(hide[section]) next};"\ 405021525869Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 405121525869Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 405221525869Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 405321525869Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4054e35772b2Smrg" ' prfx=^$ac_symprfx]" 4055e35772b2Smrg else 4056e35772b2Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 405772b676d7Smrg fi 405874c14cd6Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 405972b676d7Smrg 4060e35772b2Smrg # Check to see that the pipe works correctly. 4061e35772b2Smrg pipe_works=no 406272b676d7Smrg 4063e35772b2Smrg rm -f conftest* 4064e35772b2Smrg cat > conftest.$ac_ext <<_LT_EOF 4065e35772b2Smrg#ifdef __cplusplus 4066e35772b2Smrgextern "C" { 4067e35772b2Smrg#endif 4068e35772b2Smrgchar nm_test_var; 4069e35772b2Smrgvoid nm_test_func(void); 4070e35772b2Smrgvoid nm_test_func(void){} 4071e35772b2Smrg#ifdef __cplusplus 4072e35772b2Smrg} 4073e35772b2Smrg#endif 4074e35772b2Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 4075e35772b2Smrg_LT_EOF 407672b676d7Smrg 4077e35772b2Smrg if AC_TRY_EVAL(ac_compile); then 4078e35772b2Smrg # Now try to grab the symbols. 4079e35772b2Smrg nlist=conftest.nm 408074c14cd6Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4081e35772b2Smrg # Try sorting and uniquifying the output. 4082e35772b2Smrg if sort "$nlist" | uniq > "$nlist"T; then 4083e35772b2Smrg mv -f "$nlist"T "$nlist" 4084e35772b2Smrg else 4085e35772b2Smrg rm -f "$nlist"T 4086e35772b2Smrg fi 408772b676d7Smrg 4088e35772b2Smrg # Make sure that we snagged all the symbols we need. 4089e35772b2Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4090e35772b2Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4091e35772b2Smrg cat <<_LT_EOF > conftest.$ac_ext 409274c14cd6Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 409321525869Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 409421525869Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 409574c14cd6Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 409674c14cd6Smrg# define LT@&t@_DLSYM_CONST 409721525869Smrg#elif defined __osf__ 409874c14cd6Smrg/* This system does not cope well with relocations in const data. */ 409974c14cd6Smrg# define LT@&t@_DLSYM_CONST 410074c14cd6Smrg#else 410174c14cd6Smrg# define LT@&t@_DLSYM_CONST const 410274c14cd6Smrg#endif 410374c14cd6Smrg 4104e35772b2Smrg#ifdef __cplusplus 4105e35772b2Smrgextern "C" { 4106e35772b2Smrg#endif 410772b676d7Smrg 4108e35772b2Smrg_LT_EOF 4109e35772b2Smrg # Now generate the symbol file. 4110e35772b2Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 411172b676d7Smrg 4112e35772b2Smrg cat <<_LT_EOF >> conftest.$ac_ext 411372b676d7Smrg 4114e35772b2Smrg/* The mapping between symbol names and symbols. */ 411574c14cd6SmrgLT@&t@_DLSYM_CONST struct { 4116e35772b2Smrg const char *name; 4117e35772b2Smrg void *address; 4118e35772b2Smrg} 4119e35772b2Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4120e35772b2Smrg{ 4121e35772b2Smrg { "@PROGRAM@", (void *) 0 }, 4122e35772b2Smrg_LT_EOF 412321525869Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4124e35772b2Smrg cat <<\_LT_EOF >> conftest.$ac_ext 4125e35772b2Smrg {0, (void *) 0} 4126e35772b2Smrg}; 412772b676d7Smrg 4128e35772b2Smrg/* This works around a problem in FreeBSD linker */ 4129e35772b2Smrg#ifdef FREEBSD_WORKAROUND 4130e35772b2Smrgstatic const void *lt_preloaded_setup() { 4131e35772b2Smrg return lt__PROGRAM__LTX_preloaded_symbols; 4132e35772b2Smrg} 4133e35772b2Smrg#endif 413472b676d7Smrg 4135e35772b2Smrg#ifdef __cplusplus 4136e35772b2Smrg} 4137e35772b2Smrg#endif 4138e35772b2Smrg_LT_EOF 4139e35772b2Smrg # Now try linking the two files. 4140e35772b2Smrg mv conftest.$ac_objext conftstm.$ac_objext 414174c14cd6Smrg lt_globsym_save_LIBS=$LIBS 414274c14cd6Smrg lt_globsym_save_CFLAGS=$CFLAGS 414321525869Smrg LIBS=conftstm.$ac_objext 4144e35772b2Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 414521525869Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4146e35772b2Smrg pipe_works=yes 4147e35772b2Smrg fi 414874c14cd6Smrg LIBS=$lt_globsym_save_LIBS 414974c14cd6Smrg CFLAGS=$lt_globsym_save_CFLAGS 4150e35772b2Smrg else 4151e35772b2Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4152e35772b2Smrg fi 4153e35772b2Smrg else 4154e35772b2Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4155e35772b2Smrg fi 415672b676d7Smrg else 4157e35772b2Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 415872b676d7Smrg fi 415972b676d7Smrg else 4160e35772b2Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4161e35772b2Smrg cat conftest.$ac_ext >&5 416272b676d7Smrg fi 4163e35772b2Smrg rm -rf conftest* conftst* 416472b676d7Smrg 4165e35772b2Smrg # Do not use the global_symbol_pipe unless it works. 416621525869Smrg if test yes = "$pipe_works"; then 4167e35772b2Smrg break 4168e35772b2Smrg else 4169e35772b2Smrg lt_cv_sys_global_symbol_pipe= 4170e35772b2Smrg fi 4171e35772b2Smrgdone 4172e35772b2Smrg]) 4173e35772b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4174e35772b2Smrg lt_cv_sys_global_symbol_to_cdecl= 4175e35772b2Smrgfi 4176e35772b2Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4177e35772b2Smrg AC_MSG_RESULT(failed) 417872b676d7Smrgelse 4179e35772b2Smrg AC_MSG_RESULT(ok) 418072b676d7Smrgfi 418172b676d7Smrg 418274c14cd6Smrg# Response file support. 418374c14cd6Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 418474c14cd6Smrg nm_file_list_spec='@' 418574c14cd6Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 418674c14cd6Smrg nm_file_list_spec='@' 418774c14cd6Smrgfi 418874c14cd6Smrg 4189e35772b2Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4190e35772b2Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 4191e35772b2Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4192e35772b2Smrg [Transform the output of nm in a proper C declaration]) 419321525869Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 419421525869Smrg [Transform the output of nm into a list of symbols to manually relocate]) 4195e35772b2Smrg_LT_DECL([global_symbol_to_c_name_address], 4196e35772b2Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4197e35772b2Smrg [Transform the output of nm in a C name address pair]) 4198e35772b2Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4199e35772b2Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4200e35772b2Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 420121525869Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 420221525869Smrg [The name lister interface]) 420374c14cd6Smrg_LT_DECL([], [nm_file_list_spec], [1], 420474c14cd6Smrg [Specify filename containing input files for $NM]) 4205e35772b2Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 420672b676d7Smrg 420772b676d7Smrg 4208e35772b2Smrg# _LT_COMPILER_PIC([TAGNAME]) 4209e35772b2Smrg# --------------------------- 4210e35772b2Smrgm4_defun([_LT_COMPILER_PIC], 4211e35772b2Smrg[m4_require([_LT_TAG_COMPILER])dnl 4212e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4213e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4214e35772b2Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 421572b676d7Smrg 4216e35772b2Smrgm4_if([$1], [CXX], [ 4217e35772b2Smrg # C++ specific cases for pic, static, wl, etc. 421821525869Smrg if test yes = "$GXX"; then 4219e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4220e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 422172b676d7Smrg 4222e35772b2Smrg case $host_os in 4223e35772b2Smrg aix*) 4224e35772b2Smrg # All AIX code is PIC. 422521525869Smrg if test ia64 = "$host_cpu"; then 4226e35772b2Smrg # AIX 5 now supports IA64 processor 4227e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 422872b676d7Smrg fi 422921525869Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 423072b676d7Smrg ;; 423172b676d7Smrg 4232e35772b2Smrg amigaos*) 423372b676d7Smrg case $host_cpu in 4234e35772b2Smrg powerpc) 4235e35772b2Smrg # see comment about AmigaOS4 .so support 4236e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4237e35772b2Smrg ;; 4238e35772b2Smrg m68k) 4239e35772b2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 424021525869Smrg # adding the '-m68020' flag to GCC prevents building anything better, 424121525869Smrg # like '-m68040'. 4242e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 424372b676d7Smrg ;; 424472b676d7Smrg esac 424572b676d7Smrg ;; 424672b676d7Smrg 4247e35772b2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4248e35772b2Smrg # PIC is the default for these OSes. 4249e35772b2Smrg ;; 4250e35772b2Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4251e35772b2Smrg # This hack is so that the source file can tell whether it is being 4252e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 4253e35772b2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4254e35772b2Smrg # (--disable-auto-import) libraries 4255e35772b2Smrg m4_if([$1], [GCJ], [], 4256e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 425721525869Smrg case $host_os in 425821525869Smrg os2*) 425921525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 426021525869Smrg ;; 426121525869Smrg esac 4262e35772b2Smrg ;; 4263e35772b2Smrg darwin* | rhapsody*) 4264e35772b2Smrg # PIC is the default on this platform 4265e35772b2Smrg # Common symbols not allowed in MH_DYLIB files 4266e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4267e35772b2Smrg ;; 4268e35772b2Smrg *djgpp*) 4269e35772b2Smrg # DJGPP does not support shared libraries at all 4270e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4271e35772b2Smrg ;; 427274c14cd6Smrg haiku*) 427374c14cd6Smrg # PIC is the default for Haiku. 427474c14cd6Smrg # The "-static" flag exists, but is broken. 427574c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 427674c14cd6Smrg ;; 4277e35772b2Smrg interix[[3-9]]*) 4278e35772b2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4279e35772b2Smrg # Instead, we relocate shared libraries at runtime. 4280e35772b2Smrg ;; 4281e35772b2Smrg sysv4*MP*) 4282e35772b2Smrg if test -d /usr/nec; then 4283e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4284e35772b2Smrg fi 4285e35772b2Smrg ;; 4286e35772b2Smrg hpux*) 4287e35772b2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4288e35772b2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4289e35772b2Smrg # sets the default TLS model and affects inlining. 4290e35772b2Smrg case $host_cpu in 4291e35772b2Smrg hppa*64*) 429272b676d7Smrg ;; 429372b676d7Smrg *) 4294e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 429572b676d7Smrg ;; 4296e35772b2Smrg esac 4297e35772b2Smrg ;; 4298e35772b2Smrg *qnx* | *nto*) 4299e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4300e35772b2Smrg # it will coredump. 4301e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4302e35772b2Smrg ;; 4303e35772b2Smrg *) 4304e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4305e35772b2Smrg ;; 430672b676d7Smrg esac 4307e35772b2Smrg else 4308e35772b2Smrg case $host_os in 4309e35772b2Smrg aix[[4-9]]*) 4310e35772b2Smrg # All AIX code is PIC. 431121525869Smrg if test ia64 = "$host_cpu"; then 4312e35772b2Smrg # AIX 5 now supports IA64 processor 4313e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4314e35772b2Smrg else 4315e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 431672b676d7Smrg fi 431772b676d7Smrg ;; 4318e35772b2Smrg chorus*) 4319e35772b2Smrg case $cc_basename in 4320e35772b2Smrg cxch68*) 4321e35772b2Smrg # Green Hills C++ Compiler 4322e35772b2Smrg # _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" 432372b676d7Smrg ;; 432472b676d7Smrg esac 432572b676d7Smrg ;; 432674c14cd6Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 432774c14cd6Smrg # This hack is so that the source file can tell whether it is being 432874c14cd6Smrg # built for inclusion in a dll (and should export symbols for example). 432974c14cd6Smrg m4_if([$1], [GCJ], [], 433074c14cd6Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 433174c14cd6Smrg ;; 4332e35772b2Smrg dgux*) 4333e35772b2Smrg case $cc_basename in 4334e35772b2Smrg ec++*) 4335e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4336e35772b2Smrg ;; 4337e35772b2Smrg ghcx*) 4338e35772b2Smrg # Green Hills C++ Compiler 4339e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4340e35772b2Smrg ;; 4341e35772b2Smrg *) 4342e35772b2Smrg ;; 43431fd23544Smrg esac 43441fd23544Smrg ;; 4345e35772b2Smrg freebsd* | dragonfly*) 4346e35772b2Smrg # FreeBSD uses GNU C++ 434772b676d7Smrg ;; 4348e35772b2Smrg hpux9* | hpux10* | hpux11*) 4349e35772b2Smrg case $cc_basename in 4350e35772b2Smrg CC*) 4351e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 435221525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 435321525869Smrg if test ia64 != "$host_cpu"; then 4354e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4355e35772b2Smrg fi 4356e35772b2Smrg ;; 4357e35772b2Smrg aCC*) 4358e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 435921525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4360e35772b2Smrg case $host_cpu in 4361e35772b2Smrg hppa*64*|ia64*) 4362e35772b2Smrg # +Z the default 4363e35772b2Smrg ;; 4364e35772b2Smrg *) 4365e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4366e35772b2Smrg ;; 4367e35772b2Smrg esac 4368e35772b2Smrg ;; 4369e35772b2Smrg *) 4370e35772b2Smrg ;; 4371e35772b2Smrg esac 437272b676d7Smrg ;; 4373e35772b2Smrg interix*) 4374e35772b2Smrg # This is c89, which is MS Visual C++ (no shared libs) 4375e35772b2Smrg # Anyone wants to do a port? 437672b676d7Smrg ;; 4377e35772b2Smrg irix5* | irix6* | nonstopux*) 4378e35772b2Smrg case $cc_basename in 4379e35772b2Smrg CC*) 4380e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4381e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4382e35772b2Smrg # CC pic flag -KPIC is the default. 4383e35772b2Smrg ;; 4384e35772b2Smrg *) 4385e35772b2Smrg ;; 4386e35772b2Smrg esac 438772b676d7Smrg ;; 438821525869Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4389e35772b2Smrg case $cc_basename in 4390e35772b2Smrg KCC*) 4391e35772b2Smrg # KAI C++ Compiler 4392e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4393e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4394e35772b2Smrg ;; 4395e35772b2Smrg ecpc* ) 439621525869Smrg # old Intel C++ for x86_64, which still supported -KPIC. 4397e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4398e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4399e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4400e35772b2Smrg ;; 4401e35772b2Smrg icpc* ) 4402e35772b2Smrg # Intel C++, used to be incompatible with GCC. 4403e35772b2Smrg # ICC 10 doesn't accept -KPIC any more. 4404e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4405e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4406e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4407e35772b2Smrg ;; 4408e35772b2Smrg pgCC* | pgcpp*) 4409e35772b2Smrg # Portland Group C++ compiler 4410e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4411e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4412e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4413e35772b2Smrg ;; 4414e35772b2Smrg cxx*) 4415e35772b2Smrg # Compaq C++ 4416e35772b2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4417e35772b2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4418e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4419e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4420e35772b2Smrg ;; 442174c14cd6Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 442274c14cd6Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4423e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4424e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4425e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4426e35772b2Smrg ;; 4427e35772b2Smrg *) 4428e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 4429e35772b2Smrg *Sun\ C*) 4430e35772b2Smrg # Sun C++ 5.9 4431e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4432e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4433e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4434e35772b2Smrg ;; 4435e35772b2Smrg esac 4436e35772b2Smrg ;; 4437e35772b2Smrg esac 443872b676d7Smrg ;; 4439e35772b2Smrg lynxos*) 444072b676d7Smrg ;; 4441e35772b2Smrg m88k*) 444272b676d7Smrg ;; 4443e35772b2Smrg mvs*) 4444e35772b2Smrg case $cc_basename in 4445e35772b2Smrg cxx*) 4446e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4447e35772b2Smrg ;; 4448e35772b2Smrg *) 4449e35772b2Smrg ;; 4450e35772b2Smrg esac 445172b676d7Smrg ;; 445274fcc364Smrg netbsd* | netbsdelf*-gnu) 445372b676d7Smrg ;; 4454e35772b2Smrg *qnx* | *nto*) 4455e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4456e35772b2Smrg # it will coredump. 4457e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4458e35772b2Smrg ;; 4459e35772b2Smrg osf3* | osf4* | osf5*) 4460e35772b2Smrg case $cc_basename in 4461e35772b2Smrg KCC*) 4462e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4463e35772b2Smrg ;; 4464e35772b2Smrg RCC*) 4465e35772b2Smrg # Rational C++ 2.4.1 4466e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4467e35772b2Smrg ;; 4468e35772b2Smrg cxx*) 4469e35772b2Smrg # Digital/Compaq C++ 4470e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4471e35772b2Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4472e35772b2Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4473e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4474e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4475e35772b2Smrg ;; 4476e35772b2Smrg *) 4477e35772b2Smrg ;; 4478e35772b2Smrg esac 447972b676d7Smrg ;; 4480e35772b2Smrg psos*) 448172b676d7Smrg ;; 4482e35772b2Smrg solaris*) 4483e35772b2Smrg case $cc_basename in 448474c14cd6Smrg CC* | sunCC*) 4485e35772b2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4486e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4487e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4488e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4489e35772b2Smrg ;; 4490e35772b2Smrg gcx*) 4491e35772b2Smrg # Green Hills C++ Compiler 4492e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4493e35772b2Smrg ;; 4494e35772b2Smrg *) 4495e35772b2Smrg ;; 4496e35772b2Smrg esac 449772b676d7Smrg ;; 4498e35772b2Smrg sunos4*) 4499e35772b2Smrg case $cc_basename in 4500e35772b2Smrg CC*) 4501e35772b2Smrg # Sun C++ 4.x 4502e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4503e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4504e35772b2Smrg ;; 4505e35772b2Smrg lcc*) 4506e35772b2Smrg # Lucid 4507e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4508e35772b2Smrg ;; 450972b676d7Smrg *) 451072b676d7Smrg ;; 451172b676d7Smrg esac 451272b676d7Smrg ;; 4513e35772b2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4514e35772b2Smrg case $cc_basename in 4515e35772b2Smrg CC*) 4516e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4517e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4518e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4519e35772b2Smrg ;; 4520e35772b2Smrg esac 452172b676d7Smrg ;; 4522e35772b2Smrg tandem*) 4523e35772b2Smrg case $cc_basename in 4524e35772b2Smrg NCC*) 4525e35772b2Smrg # NonStop-UX NCC 3.20 4526e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4527e35772b2Smrg ;; 45281fd23544Smrg *) 45291fd23544Smrg ;; 4530e35772b2Smrg esac 453172b676d7Smrg ;; 4532e35772b2Smrg vxworks*) 453372b676d7Smrg ;; 453472b676d7Smrg *) 4535e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 453672b676d7Smrg ;; 453772b676d7Smrg esac 4538e35772b2Smrg fi 4539e35772b2Smrg], 4540e35772b2Smrg[ 454121525869Smrg if test yes = "$GCC"; then 4542e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4543e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4544e35772b2Smrg 4545e35772b2Smrg case $host_os in 4546e35772b2Smrg aix*) 4547e35772b2Smrg # All AIX code is PIC. 454821525869Smrg if test ia64 = "$host_cpu"; then 4549e35772b2Smrg # AIX 5 now supports IA64 processor 4550e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4551e35772b2Smrg fi 455221525869Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4553e35772b2Smrg ;; 4554e35772b2Smrg 4555e35772b2Smrg amigaos*) 4556e35772b2Smrg case $host_cpu in 4557e35772b2Smrg powerpc) 4558e35772b2Smrg # see comment about AmigaOS4 .so support 4559e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4560e35772b2Smrg ;; 4561e35772b2Smrg m68k) 4562e35772b2Smrg # FIXME: we need at least 68020 code to build shared libraries, but 456321525869Smrg # adding the '-m68020' flag to GCC prevents building anything better, 456421525869Smrg # like '-m68040'. 4565e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4566e35772b2Smrg ;; 4567e35772b2Smrg esac 4568e35772b2Smrg ;; 4569e35772b2Smrg 4570e35772b2Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4571e35772b2Smrg # PIC is the default for these OSes. 4572e35772b2Smrg ;; 4573e35772b2Smrg 4574e35772b2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4575e35772b2Smrg # This hack is so that the source file can tell whether it is being 4576e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 4577e35772b2Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4578e35772b2Smrg # (--disable-auto-import) libraries 4579e35772b2Smrg m4_if([$1], [GCJ], [], 4580e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 458121525869Smrg case $host_os in 458221525869Smrg os2*) 458321525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 458421525869Smrg ;; 458521525869Smrg esac 4586e35772b2Smrg ;; 4587e35772b2Smrg 4588e35772b2Smrg darwin* | rhapsody*) 4589e35772b2Smrg # PIC is the default on this platform 4590e35772b2Smrg # Common symbols not allowed in MH_DYLIB files 4591e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4592e35772b2Smrg ;; 4593e35772b2Smrg 459474c14cd6Smrg haiku*) 459574c14cd6Smrg # PIC is the default for Haiku. 459674c14cd6Smrg # The "-static" flag exists, but is broken. 459774c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 459874c14cd6Smrg ;; 459974c14cd6Smrg 4600e35772b2Smrg hpux*) 4601e35772b2Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4602e35772b2Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4603e35772b2Smrg # sets the default TLS model and affects inlining. 4604e35772b2Smrg case $host_cpu in 4605e35772b2Smrg hppa*64*) 4606e35772b2Smrg # +Z the default 460772b676d7Smrg ;; 460872b676d7Smrg *) 4609e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 461072b676d7Smrg ;; 4611e35772b2Smrg esac 4612e35772b2Smrg ;; 4613e35772b2Smrg 4614e35772b2Smrg interix[[3-9]]*) 4615e35772b2Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4616e35772b2Smrg # Instead, we relocate shared libraries at runtime. 4617e35772b2Smrg ;; 4618e35772b2Smrg 4619e35772b2Smrg msdosdjgpp*) 4620e35772b2Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4621e35772b2Smrg # on systems that don't support them. 4622e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4623e35772b2Smrg enable_shared=no 4624e35772b2Smrg ;; 4625e35772b2Smrg 4626e35772b2Smrg *nto* | *qnx*) 4627e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4628e35772b2Smrg # it will coredump. 4629e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4630e35772b2Smrg ;; 4631e35772b2Smrg 4632e35772b2Smrg sysv4*MP*) 4633e35772b2Smrg if test -d /usr/nec; then 4634e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4635e35772b2Smrg fi 4636e35772b2Smrg ;; 4637e35772b2Smrg 4638e35772b2Smrg *) 4639e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4640e35772b2Smrg ;; 464172b676d7Smrg esac 464274c14cd6Smrg 464374c14cd6Smrg case $cc_basename in 464474c14cd6Smrg nvcc*) # Cuda Compiler Driver 2.2 464574c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 464674c14cd6Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 464774c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 464874c14cd6Smrg fi 464974c14cd6Smrg ;; 465074c14cd6Smrg esac 4651e35772b2Smrg else 4652e35772b2Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4653e35772b2Smrg case $host_os in 4654e35772b2Smrg aix*) 4655e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 465621525869Smrg if test ia64 = "$host_cpu"; then 4657e35772b2Smrg # AIX 5 now supports IA64 processor 4658e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4659e35772b2Smrg else 4660e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4661e35772b2Smrg fi 4662e35772b2Smrg ;; 4663e35772b2Smrg 466421525869Smrg darwin* | rhapsody*) 466521525869Smrg # PIC is the default on this platform 466621525869Smrg # Common symbols not allowed in MH_DYLIB files 466721525869Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 466821525869Smrg case $cc_basename in 466921525869Smrg nagfor*) 467021525869Smrg # NAG Fortran compiler 467121525869Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 467221525869Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 467321525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 467421525869Smrg ;; 467521525869Smrg esac 467621525869Smrg ;; 467721525869Smrg 4678e35772b2Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4679e35772b2Smrg # This hack is so that the source file can tell whether it is being 4680e35772b2Smrg # built for inclusion in a dll (and should export symbols for example). 4681e35772b2Smrg m4_if([$1], [GCJ], [], 4682e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 468321525869Smrg case $host_os in 468421525869Smrg os2*) 468521525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 468621525869Smrg ;; 468721525869Smrg esac 4688e35772b2Smrg ;; 4689e35772b2Smrg 4690e35772b2Smrg hpux9* | hpux10* | hpux11*) 4691e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4692e35772b2Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4693e35772b2Smrg # not for PA HP-UX. 4694e35772b2Smrg case $host_cpu in 4695e35772b2Smrg hppa*64*|ia64*) 4696e35772b2Smrg # +Z the default 469772b676d7Smrg ;; 469872b676d7Smrg *) 4699e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 470072b676d7Smrg ;; 4701e35772b2Smrg esac 4702e35772b2Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 470321525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4704e35772b2Smrg ;; 470572b676d7Smrg 4706e35772b2Smrg irix5* | irix6* | nonstopux*) 4707e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4708e35772b2Smrg # PIC (with -KPIC) is the default. 4709e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4710e35772b2Smrg ;; 471172b676d7Smrg 471221525869Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4713e35772b2Smrg case $cc_basename in 471421525869Smrg # old Intel for x86_64, which still supported -KPIC. 4715e35772b2Smrg ecc*) 4716e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4717e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4718e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4719e35772b2Smrg ;; 4720e35772b2Smrg # icc used to be incompatible with GCC. 4721e35772b2Smrg # ICC 10 doesn't accept -KPIC any more. 4722e35772b2Smrg icc* | ifort*) 4723e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4724e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4725e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4726e35772b2Smrg ;; 4727e35772b2Smrg # Lahey Fortran 8.1. 4728e35772b2Smrg lf95*) 4729e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4730e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4731e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4732e35772b2Smrg ;; 473374c14cd6Smrg nagfor*) 473474c14cd6Smrg # NAG Fortran compiler 473574c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 473674c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 473774c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 473874c14cd6Smrg ;; 473921525869Smrg tcc*) 474021525869Smrg # Fabrice Bellard et al's Tiny C Compiler 474121525869Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 474221525869Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 474321525869Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 474421525869Smrg ;; 474574c14cd6Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4746e35772b2Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4747e35772b2Smrg # which looks to be a dead project) 4748e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4749e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4750e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4751e35772b2Smrg ;; 4752e35772b2Smrg ccc*) 4753e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4754e35772b2Smrg # All Alpha code is PIC. 4755e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4756e35772b2Smrg ;; 475774c14cd6Smrg xl* | bgxl* | bgf* | mpixl*) 475874c14cd6Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4759e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4760e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4761e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4762e35772b2Smrg ;; 4763e35772b2Smrg *) 4764e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 476574c14cd6Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 476674c14cd6Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 476774c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 476874c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 476974c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 477074c14cd6Smrg ;; 477174c14cd6Smrg *Sun\ F* | *Sun*Fortran*) 477274c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 477374c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 477474c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 477574c14cd6Smrg ;; 4776e35772b2Smrg *Sun\ C*) 4777e35772b2Smrg # Sun C 5.9 4778e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4779e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4780e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4781e35772b2Smrg ;; 478274c14cd6Smrg *Intel*\ [[CF]]*Compiler*) 478374c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 478474c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 478574c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 478674c14cd6Smrg ;; 478774c14cd6Smrg *Portland\ Group*) 478874c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 478974c14cd6Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4790e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4791e35772b2Smrg ;; 4792e35772b2Smrg esac 4793e35772b2Smrg ;; 4794e35772b2Smrg esac 4795e35772b2Smrg ;; 479672b676d7Smrg 4797e35772b2Smrg newsos6) 4798e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4799e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4800e35772b2Smrg ;; 480172b676d7Smrg 4802e35772b2Smrg *nto* | *qnx*) 4803e35772b2Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4804e35772b2Smrg # it will coredump. 4805e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4806e35772b2Smrg ;; 480772b676d7Smrg 4808e35772b2Smrg osf3* | osf4* | osf5*) 4809e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4810e35772b2Smrg # All OSF/1 code is PIC. 4811e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4812e35772b2Smrg ;; 481372b676d7Smrg 4814e35772b2Smrg rdos*) 4815e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4816e35772b2Smrg ;; 481772b676d7Smrg 4818e35772b2Smrg solaris*) 4819e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4820e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4821e35772b2Smrg case $cc_basename in 482274c14cd6Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4823e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4824e35772b2Smrg *) 4825e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4826e35772b2Smrg esac 4827e35772b2Smrg ;; 482872b676d7Smrg 4829e35772b2Smrg sunos4*) 4830e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4831e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4832e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4833e35772b2Smrg ;; 483472b676d7Smrg 4835e35772b2Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4836e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4837e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4838e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4839e35772b2Smrg ;; 484072b676d7Smrg 4841e35772b2Smrg sysv4*MP*) 484221525869Smrg if test -d /usr/nec; then 4843e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4844e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4845e35772b2Smrg fi 4846e35772b2Smrg ;; 484772b676d7Smrg 4848e35772b2Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4849e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4850e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4851e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4852e35772b2Smrg ;; 485372b676d7Smrg 4854e35772b2Smrg unicos*) 4855e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4856e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4857e35772b2Smrg ;; 485872b676d7Smrg 4859e35772b2Smrg uts4*) 4860e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4861e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4862e35772b2Smrg ;; 486372b676d7Smrg 4864e35772b2Smrg *) 4865e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4866e35772b2Smrg ;; 4867e35772b2Smrg esac 4868e35772b2Smrg fi 4869e35772b2Smrg]) 4870e35772b2Smrgcase $host_os in 487121525869Smrg # For platforms that do not support PIC, -DPIC is meaningless: 4872e35772b2Smrg *djgpp*) 4873e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4874e35772b2Smrg ;; 4875e35772b2Smrg *) 4876e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4877e35772b2Smrg ;; 4878e35772b2Smrgesac 487974c14cd6Smrg 488074c14cd6SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 488174c14cd6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 488274c14cd6Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 488374c14cd6Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 488472b676d7Smrg 4885e35772b2Smrg# 4886e35772b2Smrg# Check to make sure the PIC flag actually works. 4887e35772b2Smrg# 4888e35772b2Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4889e35772b2Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4890e35772b2Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4891e35772b2Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4892e35772b2Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4893e35772b2Smrg "" | " "*) ;; 4894e35772b2Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4895e35772b2Smrg esac], 4896e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4897e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 48981fd23544Smrgfi 4899e35772b2Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4900e35772b2Smrg [Additional compiler flags for building library objects]) 49011fd23544Smrg 490274c14cd6Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 490374c14cd6Smrg [How to pass a linker flag through the compiler]) 4904e35772b2Smrg# 4905e35772b2Smrg# Check to make sure the static flag actually works. 4906e35772b2Smrg# 4907e35772b2Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4908e35772b2Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4909e35772b2Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4910e35772b2Smrg $lt_tmp_static_flag, 4911e35772b2Smrg [], 4912e35772b2Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4913e35772b2Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4914e35772b2Smrg [Compiler flag to prevent dynamic linking]) 4915e35772b2Smrg])# _LT_COMPILER_PIC 491672b676d7Smrg 4917e35772b2Smrg 4918e35772b2Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4919e35772b2Smrg# ---------------------------- 4920e35772b2Smrg# See if the linker supports building shared libraries. 4921e35772b2Smrgm4_defun([_LT_LINKER_SHLIBS], 4922e35772b2Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4923e35772b2SmrgAC_REQUIRE([LT_PATH_NM])dnl 492474c14cd6Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4925e35772b2Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4926e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 4927e35772b2Smrgm4_require([_LT_DECL_SED])dnl 4928e35772b2Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4929e35772b2Smrgm4_require([_LT_TAG_COMPILER])dnl 4930e35772b2SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4931e35772b2Smrgm4_if([$1], [CXX], [ 4932e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 493374c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4934e35772b2Smrg case $host_os in 4935e35772b2Smrg aix[[4-9]]*) 4936e35772b2Smrg # If we're using GNU nm, then we don't want the "-C" option. 493721525869Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 493821525869Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 493921525869Smrg # weak defined symbols like other global defined symbols, whereas 494021525869Smrg # GNU nm marks them as "W". 494121525869Smrg # While the 'weak' keyword is ignored in the Export File, we need 494221525869Smrg # it in the Import File for the 'aix-soname' feature, so we have 494321525869Smrg # to replace the "-B" option with "-P" for AIX nm. 4944e35772b2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 494521525869Smrg _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' 4946e35772b2Smrg else 494721525869Smrg _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' 49481fd23544Smrg fi 49491fd23544Smrg ;; 4950e35772b2Smrg pw32*) 495121525869Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 495274c14cd6Smrg ;; 4953e35772b2Smrg cygwin* | mingw* | cegcc*) 495474c14cd6Smrg case $cc_basename in 495574c14cd6Smrg cl*) 495674c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 495774c14cd6Smrg ;; 495874c14cd6Smrg *) 495974c14cd6Smrg _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' 496074c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 496174c14cd6Smrg ;; 496274c14cd6Smrg esac 496374c14cd6Smrg ;; 496474fcc364Smrg linux* | k*bsd*-gnu | gnu*) 496574fcc364Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 496674fcc364Smrg ;; 4967e35772b2Smrg *) 4968e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 496974c14cd6Smrg ;; 4970e35772b2Smrg esac 4971e35772b2Smrg], [ 4972e35772b2Smrg runpath_var= 4973e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4974e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4975e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)= 4976e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4977e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4978e35772b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4979e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4980e35772b2Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4981e35772b2Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4982e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4983e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4984e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4985e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4986e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4987e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4988e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4989e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4990e35772b2Smrg _LT_TAGVAR(module_cmds, $1)= 4991e35772b2Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4992e35772b2Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4993e35772b2Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4994e35772b2Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4995e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4996e35772b2Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4997e35772b2Smrg # included in the symbol list 4998e35772b2Smrg _LT_TAGVAR(include_expsyms, $1)= 4999e35772b2Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 500021525869Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 500121525869Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 500221525869Smrg # as well as any symbol that contains 'd'. 5003e35772b2Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5004e35772b2Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5005e35772b2Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 5006e35772b2Smrg # the symbol is explicitly referenced. Since portable code cannot 5007e35772b2Smrg # rely on this symbol name, it's probably fine to never include it in 5008e35772b2Smrg # preloaded symbol tables. 5009e35772b2Smrg # Exclude shared library initialization/finalization symbols. 5010e35772b2Smrgdnl Note also adjust exclude_expsyms for C++ above. 5011e35772b2Smrg extract_expsyms_cmds= 50121fd23544Smrg 5013e35772b2Smrg case $host_os in 5014e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 5015e35772b2Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5016e35772b2Smrg # When not using gcc, we currently assume that we are using 5017e35772b2Smrg # Microsoft Visual C++. 501821525869Smrg if test yes != "$GCC"; then 5019e35772b2Smrg with_gnu_ld=no 50201fd23544Smrg fi 502172b676d7Smrg ;; 5022e35772b2Smrg interix*) 5023e35772b2Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5024e35772b2Smrg with_gnu_ld=yes 5025e35772b2Smrg ;; 502621525869Smrg openbsd* | bitrig*) 5027e35772b2Smrg with_gnu_ld=no 5028e35772b2Smrg ;; 502974fcc364Smrg linux* | k*bsd*-gnu | gnu*) 503074fcc364Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 503174fcc364Smrg ;; 503272b676d7Smrg esac 503372b676d7Smrg 5034e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 503574c14cd6Smrg 503674c14cd6Smrg # On some targets, GNU ld is compatible enough with the native linker 503774c14cd6Smrg # that we're better off using the native interface for both. 503874c14cd6Smrg lt_use_gnu_ld_interface=no 503921525869Smrg if test yes = "$with_gnu_ld"; then 504074c14cd6Smrg case $host_os in 504174c14cd6Smrg aix*) 504274c14cd6Smrg # The AIX port of GNU ld has always aspired to compatibility 504374c14cd6Smrg # with the native linker. However, as the warning in the GNU ld 504474c14cd6Smrg # block says, versions before 2.19.5* couldn't really create working 504574c14cd6Smrg # shared libraries, regardless of the interface used. 504674c14cd6Smrg case `$LD -v 2>&1` in 504774c14cd6Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 504874c14cd6Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 504974c14cd6Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 505074c14cd6Smrg *) 505174c14cd6Smrg lt_use_gnu_ld_interface=yes 505274c14cd6Smrg ;; 505374c14cd6Smrg esac 505474c14cd6Smrg ;; 505574c14cd6Smrg *) 505674c14cd6Smrg lt_use_gnu_ld_interface=yes 505774c14cd6Smrg ;; 505874c14cd6Smrg esac 505974c14cd6Smrg fi 506074c14cd6Smrg 506121525869Smrg if test yes = "$lt_use_gnu_ld_interface"; then 5062e35772b2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 506321525869Smrg wlarc='$wl' 506472b676d7Smrg 5065e35772b2Smrg # Set some defaults for GNU ld with shared library support. These 5066e35772b2Smrg # are reset later if shared libraries are not supported. Putting them 5067e35772b2Smrg # here allows them to be overridden if necessary. 5068e35772b2Smrg runpath_var=LD_RUN_PATH 506921525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 507021525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5071e35772b2Smrg # ancient GNU ld didn't support --whole-archive et. al. 5072e35772b2Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 507321525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5074e35772b2Smrg else 5075e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5076e35772b2Smrg fi 5077e35772b2Smrg supports_anon_versioning=no 507821525869Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 507974c14cd6Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 5080e35772b2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5081e35772b2Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5082e35772b2Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5083e35772b2Smrg *\ 2.11.*) ;; # other 2.11 versions 5084e35772b2Smrg *) supports_anon_versioning=yes ;; 5085e35772b2Smrg esac 508672b676d7Smrg 5087e35772b2Smrg # See if GNU ld supports shared libraries. 5088e35772b2Smrg case $host_os in 5089e35772b2Smrg aix[[3-9]]*) 5090e35772b2Smrg # On AIX/PPC, the GNU linker is very broken 509121525869Smrg if test ia64 != "$host_cpu"; then 5092e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5093e35772b2Smrg cat <<_LT_EOF 1>&2 509472b676d7Smrg 509574c14cd6Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5096e35772b2Smrg*** to be unable to reliably create shared libraries on AIX. 5097e35772b2Smrg*** Therefore, libtool is disabling shared libraries support. If you 509874c14cd6Smrg*** really care for shared libraries, you may want to install binutils 509974c14cd6Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 510074c14cd6Smrg*** You will then need to restart the configuration process. 510172b676d7Smrg 5102e35772b2Smrg_LT_EOF 5103e35772b2Smrg fi 5104e35772b2Smrg ;; 510572b676d7Smrg 5106e35772b2Smrg amigaos*) 5107e35772b2Smrg case $host_cpu in 5108e35772b2Smrg powerpc) 5109e35772b2Smrg # see comment about AmigaOS4 .so support 511021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5111e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5112e35772b2Smrg ;; 5113e35772b2Smrg m68k) 5114e35772b2Smrg _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)' 5115e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5116e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5117e35772b2Smrg ;; 5118e35772b2Smrg esac 5119e35772b2Smrg ;; 512072b676d7Smrg 5121e35772b2Smrg beos*) 5122e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5123e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5124e35772b2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5125e35772b2Smrg # support --undefined. This deserves some investigation. FIXME 512621525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5127e35772b2Smrg else 5128e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5129e35772b2Smrg fi 5130e35772b2Smrg ;; 513172b676d7Smrg 5132e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 5133e35772b2Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5134e35772b2Smrg # as there is no search path for DLLs. 5135e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 513621525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5137e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5138e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5139e35772b2Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 514074c14cd6Smrg _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' 514174c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5142e35772b2Smrg 5143e35772b2Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 514421525869Smrg _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' 514521525869Smrg # If the export-symbols file already is a .def file, use it as 514621525869Smrg # is; otherwise, prepend EXPORTS... 514721525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 514821525869Smrg cp $export_symbols $output_objdir/$soname.def; 514921525869Smrg else 515021525869Smrg echo EXPORTS > $output_objdir/$soname.def; 515121525869Smrg cat $export_symbols >> $output_objdir/$soname.def; 515221525869Smrg fi~ 515321525869Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5154e35772b2Smrg else 5155e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5156e35772b2Smrg fi 5157e35772b2Smrg ;; 515872b676d7Smrg 515974c14cd6Smrg haiku*) 516021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 516174c14cd6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 516274c14cd6Smrg ;; 516374c14cd6Smrg 516421525869Smrg os2*) 516521525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 516621525869Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 516721525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 516821525869Smrg shrext_cmds=.dll 516921525869Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 517021525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 517121525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 517221525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 517321525869Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 517421525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 517521525869Smrg emximp -o $lib $output_objdir/$libname.def' 517621525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 517721525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 517821525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 517921525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 518021525869Smrg prefix_cmds="$SED"~ 518121525869Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 518221525869Smrg prefix_cmds="$prefix_cmds -e 1d"; 518321525869Smrg fi~ 518421525869Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 518521525869Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 518621525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 518721525869Smrg emximp -o $lib $output_objdir/$libname.def' 518821525869Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 518921525869Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 519021525869Smrg ;; 519121525869Smrg 5192e35772b2Smrg interix[[3-9]]*) 5193e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5194e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 519521525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 519621525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5197e35772b2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5198e35772b2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5199e35772b2Smrg # default) and relocated if they conflict, which is a slow very memory 5200e35772b2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5201e35772b2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5202e35772b2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 520321525869Smrg _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' 520421525869Smrg _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' 5205e35772b2Smrg ;; 520672b676d7Smrg 520774c14cd6Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5208e35772b2Smrg tmp_diet=no 520921525869Smrg if test linux-dietlibc = "$host_os"; then 5210e35772b2Smrg case $cc_basename in 5211e35772b2Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5212e35772b2Smrg esac 5213e35772b2Smrg fi 5214e35772b2Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 521521525869Smrg && test no = "$tmp_diet" 5216e35772b2Smrg then 521774c14cd6Smrg tmp_addflag=' $pic_flag' 5218e35772b2Smrg tmp_sharedflag='-shared' 5219e35772b2Smrg case $cc_basename,$host_cpu in 5220e35772b2Smrg pgcc*) # Portland Group C compiler 522121525869Smrg _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' 5222e35772b2Smrg tmp_addflag=' $pic_flag' 5223e35772b2Smrg ;; 522474c14cd6Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 522574c14cd6Smrg # Portland Group f77 and f90 compilers 522621525869Smrg _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' 5227e35772b2Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 5228e35772b2Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5229e35772b2Smrg tmp_addflag=' -i_dynamic' ;; 5230e35772b2Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5231e35772b2Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5232e35772b2Smrg ifc* | ifort*) # Intel Fortran compiler 5233e35772b2Smrg tmp_addflag=' -nofor_main' ;; 5234e35772b2Smrg lf95*) # Lahey Fortran 8.1 5235e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5236e35772b2Smrg tmp_sharedflag='--shared' ;; 523721525869Smrg nagfor*) # NAGFOR 5.3 523821525869Smrg tmp_sharedflag='-Wl,-shared' ;; 523974c14cd6Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5240e35772b2Smrg tmp_sharedflag='-qmkshrobj' 5241e35772b2Smrg tmp_addflag= ;; 524274c14cd6Smrg nvcc*) # Cuda Compiler Driver 2.2 524321525869Smrg _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' 524474c14cd6Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 524574c14cd6Smrg ;; 5246e35772b2Smrg esac 5247e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 5248e35772b2Smrg *Sun\ C*) # Sun C 5.9 524921525869Smrg _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' 5250e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5251e35772b2Smrg tmp_sharedflag='-G' ;; 5252e35772b2Smrg *Sun\ F*) # Sun Fortran 8.3 5253e35772b2Smrg tmp_sharedflag='-G' ;; 5254e35772b2Smrg esac 525521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 525672b676d7Smrg 525721525869Smrg if test yes = "$supports_anon_versioning"; then 5258e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 525921525869Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 526021525869Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 526121525869Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5262e35772b2Smrg fi 526372b676d7Smrg 5264e35772b2Smrg case $cc_basename in 526521525869Smrg tcc*) 526621525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 526721525869Smrg ;; 526874c14cd6Smrg xlf* | bgf* | bgxlf* | mpixlf*) 5269e35772b2Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5270e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 527121525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 527274c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 527321525869Smrg if test yes = "$supports_anon_versioning"; then 5274e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 527521525869Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 527621525869Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 527721525869Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5278e35772b2Smrg fi 5279e35772b2Smrg ;; 5280e35772b2Smrg esac 5281e35772b2Smrg else 5282e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5283e35772b2Smrg fi 5284e35772b2Smrg ;; 528572b676d7Smrg 528674fcc364Smrg netbsd* | netbsdelf*-gnu) 5287e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5288e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5289e35772b2Smrg wlarc= 5290e35772b2Smrg else 529121525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 529221525869Smrg _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' 5293e35772b2Smrg fi 5294e35772b2Smrg ;; 529572b676d7Smrg 5296e35772b2Smrg solaris*) 5297e35772b2Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5298e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5299e35772b2Smrg cat <<_LT_EOF 1>&2 530072b676d7Smrg 5301e35772b2Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5302e35772b2Smrg*** create shared libraries on Solaris systems. Therefore, libtool 5303e35772b2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5304e35772b2Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 5305e35772b2Smrg*** your PATH or compiler configuration so that the native linker is 5306e35772b2Smrg*** used, and then restart. 530772b676d7Smrg 5308e35772b2Smrg_LT_EOF 5309e35772b2Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 531021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 531121525869Smrg _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' 5312e35772b2Smrg else 5313e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5314e35772b2Smrg fi 5315e35772b2Smrg ;; 531672b676d7Smrg 5317e35772b2Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5318e35772b2Smrg case `$LD -v 2>&1` in 5319e35772b2Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5320e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5321e35772b2Smrg cat <<_LT_EOF 1>&2 532272b676d7Smrg 532321525869Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5324e35772b2Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5325e35772b2Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 5326e35772b2Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5327e35772b2Smrg*** your PATH or compiler configuration so that the native linker is 5328e35772b2Smrg*** used, and then restart. 532972b676d7Smrg 5330e35772b2Smrg_LT_EOF 5331e35772b2Smrg ;; 5332e35772b2Smrg *) 5333e35772b2Smrg # For security reasons, it is highly recommended that you always 5334e35772b2Smrg # use absolute paths for naming shared libraries, and exclude the 5335e35772b2Smrg # DT_RUNPATH tag from executables and libraries. But doing so 5336e35772b2Smrg # requires that you compile everything twice, which is a pain. 5337e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 533821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 533921525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 534021525869Smrg _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' 5341e35772b2Smrg else 5342e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5343e35772b2Smrg fi 5344e35772b2Smrg ;; 5345e35772b2Smrg esac 5346e35772b2Smrg ;; 534772b676d7Smrg 5348e35772b2Smrg sunos4*) 5349e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5350e35772b2Smrg wlarc= 5351e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5352e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5353e35772b2Smrg ;; 535472b676d7Smrg 5355e35772b2Smrg *) 5356e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 535721525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 535821525869Smrg _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' 5359e35772b2Smrg else 5360e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5361e35772b2Smrg fi 5362e35772b2Smrg ;; 5363e35772b2Smrg esac 536472b676d7Smrg 536521525869Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5366e35772b2Smrg runpath_var= 5367e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5368e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5369e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5370e35772b2Smrg fi 5371e35772b2Smrg else 5372e35772b2Smrg # PORTME fill in a description of your system's linker (not GNU ld) 5373e35772b2Smrg case $host_os in 5374e35772b2Smrg aix3*) 5375e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5376e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5377e35772b2Smrg _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' 5378e35772b2Smrg # Note: this linker hardcodes the directories in LIBPATH if there 5379e35772b2Smrg # are no directories specified by -L. 5380e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 538121525869Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5382e35772b2Smrg # Neither direct hardcoding nor static linking is supported with a 5383e35772b2Smrg # broken collect2. 5384e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5385e35772b2Smrg fi 5386e35772b2Smrg ;; 538772b676d7Smrg 5388e35772b2Smrg aix[[4-9]]*) 538921525869Smrg if test ia64 = "$host_cpu"; then 5390e35772b2Smrg # On IA64, the linker does run time linking by default, so we don't 5391e35772b2Smrg # have to do anything special. 5392e35772b2Smrg aix_use_runtimelinking=no 5393e35772b2Smrg exp_sym_flag='-Bexport' 539421525869Smrg no_entry_flag= 5395e35772b2Smrg else 5396e35772b2Smrg # If we're using GNU nm, then we don't want the "-C" option. 539721525869Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 539821525869Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 539921525869Smrg # weak defined symbols like other global defined symbols, whereas 540021525869Smrg # GNU nm marks them as "W". 540121525869Smrg # While the 'weak' keyword is ignored in the Export File, we need 540221525869Smrg # it in the Import File for the 'aix-soname' feature, so we have 540321525869Smrg # to replace the "-B" option with "-P" for AIX nm. 5404e35772b2Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 540521525869Smrg _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' 5406e35772b2Smrg else 540721525869Smrg _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' 5408e35772b2Smrg fi 5409e35772b2Smrg aix_use_runtimelinking=no 541072b676d7Smrg 5411e35772b2Smrg # Test if we are trying to use run time linking or normal 5412e35772b2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 541321525869Smrg # have runtime linking enabled, and use it for executables. 541421525869Smrg # For shared libraries, we enable/disable runtime linking 541521525869Smrg # depending on the kind of the shared library created - 541621525869Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 541721525869Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 541821525869Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 541921525869Smrg # lib.a static archive 542021525869Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 542121525869Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 542221525869Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 542321525869Smrg # lib.a(lib.so.V) shared, rtl:no 542421525869Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 542521525869Smrg # lib.a static archive 5426e35772b2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5427e35772b2Smrg for ld_flag in $LDFLAGS; do 542821525869Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5429e35772b2Smrg aix_use_runtimelinking=yes 5430e35772b2Smrg break 5431e35772b2Smrg fi 5432e35772b2Smrg done 543321525869Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 543421525869Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 543521525869Smrg # so we don't have lib.a shared libs to link our executables. 543621525869Smrg # We have to force runtime linking in this case. 543721525869Smrg aix_use_runtimelinking=yes 543821525869Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 543921525869Smrg fi 5440e35772b2Smrg ;; 5441e35772b2Smrg esac 544272b676d7Smrg 5443e35772b2Smrg exp_sym_flag='-bexport' 5444e35772b2Smrg no_entry_flag='-bnoentry' 5445e35772b2Smrg fi 544672b676d7Smrg 5447e35772b2Smrg # When large executables or shared objects are built, AIX ld can 5448e35772b2Smrg # have problems creating the table of contents. If linking a library 5449e35772b2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5450e35772b2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5451e35772b2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 545272b676d7Smrg 5453e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='' 5454e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5455e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5456e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5457e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 545821525869Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 545921525869Smrg case $with_aix_soname,$aix_use_runtimelinking in 546021525869Smrg aix,*) ;; # traditional, no import file 546121525869Smrg svr4,* | *,yes) # use import file 546221525869Smrg # The Import File defines what to hardcode. 546321525869Smrg _LT_TAGVAR(hardcode_direct, $1)=no 546421525869Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 546521525869Smrg ;; 546621525869Smrg esac 546772b676d7Smrg 546821525869Smrg if test yes = "$GCC"; then 5469e35772b2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5470e35772b2Smrg # We only want to do this on AIX 4.2 and lower, the check 5471e35772b2Smrg # below for broken collect2 doesn't work under 4.3+ 547221525869Smrg collect2name=`$CC -print-prog-name=collect2` 5473e35772b2Smrg if test -f "$collect2name" && 5474e35772b2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5475e35772b2Smrg then 5476e35772b2Smrg # We have reworked collect2 5477e35772b2Smrg : 5478e35772b2Smrg else 5479e35772b2Smrg # We have old collect2 5480e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5481e35772b2Smrg # It fails to find uninstalled libraries when the uninstalled 5482e35772b2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5483e35772b2Smrg # to unsupported forces relinking 5484e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5485e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5486e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5487e35772b2Smrg fi 5488e35772b2Smrg ;; 5489e35772b2Smrg esac 5490e35772b2Smrg shared_flag='-shared' 549121525869Smrg if test yes = "$aix_use_runtimelinking"; then 549221525869Smrg shared_flag="$shared_flag "'$wl-G' 5493e35772b2Smrg fi 549421525869Smrg # Need to ensure runtime linking is disabled for the traditional 549521525869Smrg # shared library, or the linker may eventually find shared libraries 549621525869Smrg # /with/ Import File - we do not want to mix them. 549721525869Smrg shared_flag_aix='-shared' 549821525869Smrg shared_flag_svr4='-shared $wl-G' 5499e35772b2Smrg else 5500e35772b2Smrg # not using gcc 550121525869Smrg if test ia64 = "$host_cpu"; then 5502e35772b2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5503e35772b2Smrg # chokes on -Wl,-G. The following line is correct: 5504e35772b2Smrg shared_flag='-G' 5505e35772b2Smrg else 550621525869Smrg if test yes = "$aix_use_runtimelinking"; then 550721525869Smrg shared_flag='$wl-G' 5508e35772b2Smrg else 550921525869Smrg shared_flag='$wl-bM:SRE' 5510e35772b2Smrg fi 551121525869Smrg shared_flag_aix='$wl-bM:SRE' 551221525869Smrg shared_flag_svr4='$wl-G' 5513e35772b2Smrg fi 5514e35772b2Smrg fi 551572b676d7Smrg 551621525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5517e35772b2Smrg # It seems that -bexpall does not export symbols beginning with 5518e35772b2Smrg # underscore (_), so it is better to generate a list of symbols to export. 5519e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 552021525869Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5521e35772b2Smrg # Warning - without using the other runtime loading flags (-brtl), 5522e35772b2Smrg # -berok will link without error, but may produce a broken library. 5523e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5524e35772b2Smrg # Determine the default libpath from the value encoded in an 5525e35772b2Smrg # empty executable. 552674c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 552721525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 552821525869Smrg _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 5529e35772b2Smrg else 553021525869Smrg if test ia64 = "$host_cpu"; then 553121525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5532e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 553321525869Smrg _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" 5534e35772b2Smrg else 5535e35772b2Smrg # Determine the default libpath from the value encoded in an 5536e35772b2Smrg # empty executable. 553774c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 553821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5539e35772b2Smrg # Warning - without using the other run time loading flags, 5540e35772b2Smrg # -berok will link without error, but may produce a broken library. 554121525869Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 554221525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 554321525869Smrg if test yes = "$with_gnu_ld"; then 554474c14cd6Smrg # We only use this code for GNU lds that support --whole-archive. 554521525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 554674c14cd6Smrg else 554774c14cd6Smrg # Exported symbols can be pulled into shared objects from archives 554874c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 554974c14cd6Smrg fi 5550e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 555121525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 555221525869Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 555321525869Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 555421525869Smrg if test svr4 != "$with_aix_soname"; then 555521525869Smrg # This is similar to how AIX traditionally builds its shared libraries. 555621525869Smrg _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' 555721525869Smrg fi 555821525869Smrg if test aix != "$with_aix_soname"; then 555921525869Smrg _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' 556021525869Smrg else 556121525869Smrg # used by -dlpreopen to get the symbols 556221525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 556321525869Smrg fi 556421525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5565e35772b2Smrg fi 5566e35772b2Smrg fi 5567e35772b2Smrg ;; 556872b676d7Smrg 5569e35772b2Smrg amigaos*) 5570e35772b2Smrg case $host_cpu in 5571e35772b2Smrg powerpc) 5572e35772b2Smrg # see comment about AmigaOS4 .so support 557321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5574e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5575e35772b2Smrg ;; 5576e35772b2Smrg m68k) 5577e35772b2Smrg _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)' 5578e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5579e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5580e35772b2Smrg ;; 5581e35772b2Smrg esac 5582e35772b2Smrg ;; 558372b676d7Smrg 5584e35772b2Smrg bsdi[[45]]*) 5585e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5586e35772b2Smrg ;; 558772b676d7Smrg 5588e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 5589e35772b2Smrg # When not using gcc, we currently assume that we are using 5590e35772b2Smrg # Microsoft Visual C++. 5591e35772b2Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5592e35772b2Smrg # no search path for DLLs. 559374c14cd6Smrg case $cc_basename in 559474c14cd6Smrg cl*) 559574c14cd6Smrg # Native MSVC 559674c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 559774c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 559874c14cd6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 559974c14cd6Smrg _LT_TAGVAR(file_list_spec, $1)='@' 560074c14cd6Smrg # Tell ltmain to make .lib files, not .a files. 560174c14cd6Smrg libext=lib 560274c14cd6Smrg # Tell ltmain to make .dll files, not .so files. 560321525869Smrg shrext_cmds=.dll 560474c14cd6Smrg # FIXME: Setting linknames here is a bad hack. 560521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 560621525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 560721525869Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 560821525869Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 560921525869Smrg else 561021525869Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 561121525869Smrg fi~ 561221525869Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 561321525869Smrg linknames=' 561474c14cd6Smrg # The linker will not automatically build a static lib if we build a DLL. 561574c14cd6Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 561674c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 561774c14cd6Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 561874c14cd6Smrg _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' 561974c14cd6Smrg # Don't use ranlib 562074c14cd6Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 562174c14cd6Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 562221525869Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 562321525869Smrg case $lt_outputfile in 562421525869Smrg *.exe|*.EXE) ;; 562521525869Smrg *) 562621525869Smrg lt_outputfile=$lt_outputfile.exe 562721525869Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 562821525869Smrg ;; 562921525869Smrg esac~ 563021525869Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 563121525869Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 563221525869Smrg $RM "$lt_outputfile.manifest"; 563321525869Smrg fi' 563474c14cd6Smrg ;; 563574c14cd6Smrg *) 563674c14cd6Smrg # Assume MSVC wrapper 563774c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 563874c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 563974c14cd6Smrg # Tell ltmain to make .lib files, not .a files. 564074c14cd6Smrg libext=lib 564174c14cd6Smrg # Tell ltmain to make .dll files, not .so files. 564221525869Smrg shrext_cmds=.dll 564374c14cd6Smrg # FIXME: Setting linknames here is a bad hack. 564474c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 564574c14cd6Smrg # The linker will automatically build a .lib file if we build a DLL. 564674c14cd6Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 564774c14cd6Smrg # FIXME: Should let the user specify the lib program. 564874c14cd6Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 564974c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 565074c14cd6Smrg ;; 565174c14cd6Smrg esac 5652e35772b2Smrg ;; 565372b676d7Smrg 5654e35772b2Smrg darwin* | rhapsody*) 5655e35772b2Smrg _LT_DARWIN_LINKER_FEATURES($1) 5656e35772b2Smrg ;; 565772b676d7Smrg 5658e35772b2Smrg dgux*) 5659e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5660e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5661e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5662e35772b2Smrg ;; 566372b676d7Smrg 5664e35772b2Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5665e35772b2Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5666e35772b2Smrg # does not break anything, and helps significantly (at the cost of a little 5667e35772b2Smrg # extra space). 5668e35772b2Smrg freebsd2.2*) 5669e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5670e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5671e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5672e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5673e35772b2Smrg ;; 567472b676d7Smrg 5675e35772b2Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 567674c14cd6Smrg freebsd2.*) 5677e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5678e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5679e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5680e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5681e35772b2Smrg ;; 568272b676d7Smrg 5683e35772b2Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5684e35772b2Smrg freebsd* | dragonfly*) 568574c14cd6Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5686e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5687e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5688e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5689e35772b2Smrg ;; 569072b676d7Smrg 5691e35772b2Smrg hpux9*) 569221525869Smrg if test yes = "$GCC"; then 569321525869Smrg _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' 5694e35772b2Smrg else 569521525869Smrg _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' 5696e35772b2Smrg fi 569721525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5698e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5699e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 570072b676d7Smrg 5701e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 5702e35772b2Smrg # but as the default location of the library. 5703e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 570421525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5705e35772b2Smrg ;; 570672b676d7Smrg 5707e35772b2Smrg hpux10*) 570821525869Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 570921525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5710e35772b2Smrg else 5711e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5712e35772b2Smrg fi 571321525869Smrg if test no = "$with_gnu_ld"; then 571421525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5715e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5716e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5717e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 571821525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5719e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 5720e35772b2Smrg # but as the default location of the library. 5721e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5722e35772b2Smrg fi 572372b676d7Smrg ;; 5724e35772b2Smrg 5725e35772b2Smrg hpux11*) 572621525869Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 5727e35772b2Smrg case $host_cpu in 5728e35772b2Smrg hppa*64*) 572921525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5730e35772b2Smrg ;; 5731e35772b2Smrg ia64*) 573221525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5733e35772b2Smrg ;; 5734e35772b2Smrg *) 573521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5736e35772b2Smrg ;; 5737e35772b2Smrg esac 5738e35772b2Smrg else 5739e35772b2Smrg case $host_cpu in 5740e35772b2Smrg hppa*64*) 574121525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5742e35772b2Smrg ;; 5743e35772b2Smrg ia64*) 574421525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5745e35772b2Smrg ;; 5746e35772b2Smrg *) 574774c14cd6Smrg m4_if($1, [], [ 574874c14cd6Smrg # Older versions of the 11.00 compiler do not understand -b yet 574974c14cd6Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 575074c14cd6Smrg _LT_LINKER_OPTION([if $CC understands -b], 575174c14cd6Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 575221525869Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 575374c14cd6Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 575421525869Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5755e35772b2Smrg ;; 5756e35772b2Smrg esac 5757e35772b2Smrg fi 575821525869Smrg if test no = "$with_gnu_ld"; then 575921525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5760e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5761e35772b2Smrg 5762e35772b2Smrg case $host_cpu in 5763e35772b2Smrg hppa*64*|ia64*) 5764e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5765e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5766e35772b2Smrg ;; 5767e35772b2Smrg *) 5768e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5769e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 577021525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5771e35772b2Smrg 5772e35772b2Smrg # hardcode_minus_L: Not really in the search PATH, 5773e35772b2Smrg # but as the default location of the library. 5774e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5775e35772b2Smrg ;; 5776e35772b2Smrg esac 5777e35772b2Smrg fi 577872b676d7Smrg ;; 577972b676d7Smrg 5780e35772b2Smrg irix5* | irix6* | nonstopux*) 578121525869Smrg if test yes = "$GCC"; then 578221525869Smrg _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' 5783e35772b2Smrg # Try to use the -exported_symbol ld option, if it does not 5784e35772b2Smrg # work, assume that -exports_file does not work either and 5785e35772b2Smrg # implicitly export all symbols. 578674c14cd6Smrg # This should be the same for all languages, so no per-tag cache variable. 578774c14cd6Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 578874c14cd6Smrg [lt_cv_irix_exported_symbol], 578921525869Smrg [save_LDFLAGS=$LDFLAGS 579021525869Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 579174c14cd6Smrg AC_LINK_IFELSE( 579274c14cd6Smrg [AC_LANG_SOURCE( 579374c14cd6Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 579474c14cd6Smrg [C++], [[int foo (void) { return 0; }]], 579574c14cd6Smrg [Fortran 77], [[ 579674c14cd6Smrg subroutine foo 579774c14cd6Smrg end]], 579874c14cd6Smrg [Fortran], [[ 579974c14cd6Smrg subroutine foo 580074c14cd6Smrg end]])])], 580174c14cd6Smrg [lt_cv_irix_exported_symbol=yes], 580274c14cd6Smrg [lt_cv_irix_exported_symbol=no]) 580321525869Smrg LDFLAGS=$save_LDFLAGS]) 580421525869Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 580521525869Smrg _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' 580674c14cd6Smrg fi 580774fcc364Smrg _LT_TAGVAR(link_all_deplibs, $1)=no 5808e35772b2Smrg else 580921525869Smrg _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' 581021525869Smrg _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' 5811e35772b2Smrg fi 5812e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 581321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5814e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5815e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5816e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5817e35772b2Smrg ;; 581872b676d7Smrg 581921525869Smrg linux*) 582021525869Smrg case $cc_basename in 582121525869Smrg tcc*) 582221525869Smrg # Fabrice Bellard et al's Tiny C Compiler 582321525869Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 582421525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 582521525869Smrg ;; 582621525869Smrg esac 582721525869Smrg ;; 582821525869Smrg 582974fcc364Smrg netbsd* | netbsdelf*-gnu) 5830e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5831e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5832e35772b2Smrg else 5833e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5834e35772b2Smrg fi 5835e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5836e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5837e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5838e35772b2Smrg ;; 583972b676d7Smrg 5840e35772b2Smrg newsos6) 5841e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5842e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 584321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5844e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5845e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5846e35772b2Smrg ;; 584772b676d7Smrg 5848e35772b2Smrg *nto* | *qnx*) 5849e35772b2Smrg ;; 585072b676d7Smrg 585121525869Smrg openbsd* | bitrig*) 5852e35772b2Smrg if test -f /usr/libexec/ld.so; then 5853e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5854e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5855e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 585621525869Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5857e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 585821525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 585921525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 586021525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5861e35772b2Smrg else 586221525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 586321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5864e35772b2Smrg fi 5865e35772b2Smrg else 5866e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5867e35772b2Smrg fi 5868e35772b2Smrg ;; 586972b676d7Smrg 5870e35772b2Smrg os2*) 5871e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5872e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5873e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 587421525869Smrg shrext_cmds=.dll 587521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 587621525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 587721525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 587821525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 587921525869Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 588021525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 588121525869Smrg emximp -o $lib $output_objdir/$libname.def' 588221525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 588321525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 588421525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 588521525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 588621525869Smrg prefix_cmds="$SED"~ 588721525869Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 588821525869Smrg prefix_cmds="$prefix_cmds -e 1d"; 588921525869Smrg fi~ 589021525869Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 589121525869Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 589221525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 589321525869Smrg emximp -o $lib $output_objdir/$libname.def' 589421525869Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 589521525869Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5896e35772b2Smrg ;; 589772b676d7Smrg 5898e35772b2Smrg osf3*) 589921525869Smrg if test yes = "$GCC"; then 590021525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 590121525869Smrg _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' 5902e35772b2Smrg else 5903e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 590421525869Smrg _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' 5905e35772b2Smrg fi 5906e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 590721525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5908e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5909e35772b2Smrg ;; 591072b676d7Smrg 5911e35772b2Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 591221525869Smrg if test yes = "$GCC"; then 591321525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 591421525869Smrg _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' 591521525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5916e35772b2Smrg else 5917e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 591821525869Smrg _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' 5919e35772b2Smrg _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~ 592021525869Smrg $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' 592172b676d7Smrg 5922e35772b2Smrg # Both c and cxx compiler support -rpath directly 5923e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5924e35772b2Smrg fi 5925e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5926e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5927e35772b2Smrg ;; 592872b676d7Smrg 5929e35772b2Smrg solaris*) 5930e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 593121525869Smrg if test yes = "$GCC"; then 593221525869Smrg wlarc='$wl' 593321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5934e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593521525869Smrg $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' 5936e35772b2Smrg else 5937e35772b2Smrg case `$CC -V 2>&1` in 5938e35772b2Smrg *"Compilers 5.0"*) 5939e35772b2Smrg wlarc='' 594021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5941e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 594221525869Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5943e35772b2Smrg ;; 5944e35772b2Smrg *) 594521525869Smrg wlarc='$wl' 594621525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5947e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 594821525869Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5949e35772b2Smrg ;; 5950e35772b2Smrg esac 5951e35772b2Smrg fi 5952e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5953e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5954e35772b2Smrg case $host_os in 5955e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5956e35772b2Smrg *) 5957e35772b2Smrg # The compiler driver will combine and reorder linker options, 595821525869Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 5959e35772b2Smrg # but is careful enough not to reorder. 5960e35772b2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 596121525869Smrg if test yes = "$GCC"; then 596221525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5963e35772b2Smrg else 5964e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5965e35772b2Smrg fi 5966e35772b2Smrg ;; 5967e35772b2Smrg esac 5968e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5969e35772b2Smrg ;; 597072b676d7Smrg 5971e35772b2Smrg sunos4*) 597221525869Smrg if test sequent = "$host_vendor"; then 5973e35772b2Smrg # Use $CC to link under sequent, because it throws in some extra .o 5974e35772b2Smrg # files that make .init and .fini sections work. 597521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5976e35772b2Smrg else 5977e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5978e35772b2Smrg fi 5979e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5980e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5981e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5982e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5983e35772b2Smrg ;; 598472b676d7Smrg 5985e35772b2Smrg sysv4) 5986e35772b2Smrg case $host_vendor in 5987e35772b2Smrg sni) 5988e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5989e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5990e35772b2Smrg ;; 5991e35772b2Smrg siemens) 5992e35772b2Smrg ## LD is ld it makes a PLAMLIB 5993e35772b2Smrg ## CC just makes a GrossModule. 5994e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5995e35772b2Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5996e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5997e35772b2Smrg ;; 5998e35772b2Smrg motorola) 5999e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6000e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6001e35772b2Smrg ;; 6002e35772b2Smrg esac 6003e35772b2Smrg runpath_var='LD_RUN_PATH' 6004e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6005e35772b2Smrg ;; 600672b676d7Smrg 6007e35772b2Smrg sysv4.3*) 6008e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6009e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6010e35772b2Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6011e35772b2Smrg ;; 601272b676d7Smrg 6013e35772b2Smrg sysv4*MP*) 6014e35772b2Smrg if test -d /usr/nec; then 6015e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6016e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6017e35772b2Smrg runpath_var=LD_RUN_PATH 6018e35772b2Smrg hardcode_runpath_var=yes 6019e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6020e35772b2Smrg fi 6021e35772b2Smrg ;; 602272b676d7Smrg 6023e35772b2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 602421525869Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6025e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6026e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6027e35772b2Smrg runpath_var='LD_RUN_PATH' 602872b676d7Smrg 602921525869Smrg if test yes = "$GCC"; then 603021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 603121525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6032e35772b2Smrg else 603321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 603421525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6035e35772b2Smrg fi 6036e35772b2Smrg ;; 603772b676d7Smrg 6038e35772b2Smrg sysv5* | sco3.2v5* | sco5v6*) 603921525869Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 6040e35772b2Smrg # link with -lc, and that would cause any symbols used from libc to 6041e35772b2Smrg # always be unresolved, which means just about no library would 6042e35772b2Smrg # ever link correctly. If we're not using GNU ld we use -z text 6043e35772b2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6044e35772b2Smrg # as -z defs. 604521525869Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 604621525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6047e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6048e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 604921525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6050e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6051e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 605221525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6053e35772b2Smrg runpath_var='LD_RUN_PATH' 605472b676d7Smrg 605521525869Smrg if test yes = "$GCC"; then 605621525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 605721525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6058e35772b2Smrg else 605921525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 606021525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6061e35772b2Smrg fi 6062e35772b2Smrg ;; 606372b676d7Smrg 6064e35772b2Smrg uts4*) 6065e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6066e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6067e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6068e35772b2Smrg ;; 606972b676d7Smrg 6070e35772b2Smrg *) 6071e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6072e35772b2Smrg ;; 6073e35772b2Smrg esac 607472b676d7Smrg 607521525869Smrg if test sni = "$host_vendor"; then 6076e35772b2Smrg case $host in 6077e35772b2Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 607821525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6079e35772b2Smrg ;; 6080e35772b2Smrg esac 6081e35772b2Smrg fi 6082e35772b2Smrg fi 6083e35772b2Smrg]) 6084e35772b2SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 608521525869Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 608672b676d7Smrg 6087e35772b2Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 608872b676d7Smrg 6089e35772b2Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6090e35772b2Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6091e35772b2Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 6092e35772b2Smrg [The commands to extract the exported symbol list from a shared archive]) 609372b676d7Smrg 6094e35772b2Smrg# 6095e35772b2Smrg# Do we need to explicitly link libc? 6096e35772b2Smrg# 6097e35772b2Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6098e35772b2Smrgx|xyes) 6099e35772b2Smrg # Assume -lc should be added 6100e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 610172b676d7Smrg 610221525869Smrg if test yes,yes = "$GCC,$enable_shared"; then 6103e35772b2Smrg case $_LT_TAGVAR(archive_cmds, $1) in 6104e35772b2Smrg *'~'*) 6105e35772b2Smrg # FIXME: we may have to deal with multi-command sequences. 6106e35772b2Smrg ;; 6107e35772b2Smrg '$CC '*) 6108e35772b2Smrg # Test whether the compiler implicitly links with -lc since on some 6109e35772b2Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6110e35772b2Smrg # to ld, don't add -lc before -lgcc. 611174c14cd6Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 611274c14cd6Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 611374c14cd6Smrg [$RM conftest* 611474c14cd6Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 611574c14cd6Smrg 611674c14cd6Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 611774c14cd6Smrg soname=conftest 611874c14cd6Smrg lib=conftest 611974c14cd6Smrg libobjs=conftest.$ac_objext 612074c14cd6Smrg deplibs= 612174c14cd6Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 612274c14cd6Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 612374c14cd6Smrg compiler_flags=-v 612474c14cd6Smrg linker_flags=-v 612574c14cd6Smrg verstring= 612674c14cd6Smrg output_objdir=. 612774c14cd6Smrg libname=conftest 612874c14cd6Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 612974c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 613074c14cd6Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 613174c14cd6Smrg then 613274c14cd6Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 613374c14cd6Smrg else 613474c14cd6Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 613574c14cd6Smrg fi 613674c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 613774c14cd6Smrg else 613874c14cd6Smrg cat conftest.err 1>&5 613974c14cd6Smrg fi 614074c14cd6Smrg $RM conftest* 614174c14cd6Smrg ]) 614274c14cd6Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6143e35772b2Smrg ;; 6144e35772b2Smrg esac 6145e35772b2Smrg fi 6146e35772b2Smrg ;; 6147e35772b2Smrgesac 614872b676d7Smrg 6149e35772b2Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6150e35772b2Smrg [Whether or not to add -lc for building shared libraries]) 6151e35772b2Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6152e35772b2Smrg [enable_shared_with_static_runtimes], [0], 6153e35772b2Smrg [Whether or not to disallow shared libs when runtime libs are static]) 6154e35772b2Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6155e35772b2Smrg [Compiler flag to allow reflexive dlopens]) 6156e35772b2Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6157e35772b2Smrg [Compiler flag to generate shared objects directly from archives]) 6158e35772b2Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 6159e35772b2Smrg [Whether the compiler copes with passing no objects directly]) 6160e35772b2Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6161e35772b2Smrg [Create an old-style archive from a shared archive]) 6162e35772b2Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6163e35772b2Smrg [Create a temporary old-style archive to link instead of a shared archive]) 6164e35772b2Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6165e35772b2Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6166e35772b2Smrg_LT_TAGDECL([], [module_cmds], [2], 6167e35772b2Smrg [Commands used to build a loadable module if different from building 6168e35772b2Smrg a shared archive.]) 6169e35772b2Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6170e35772b2Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 6171e35772b2Smrg [Whether we are building with GNU ld or not]) 6172e35772b2Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6173e35772b2Smrg [Flag that allows shared libraries with undefined symbols to be built]) 6174e35772b2Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 6175e35772b2Smrg [Flag that enforces no undefined symbols]) 6176e35772b2Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6177e35772b2Smrg [Flag to hardcode $libdir into a binary during linking. 6178e35772b2Smrg This must work even if $libdir does not exist]) 6179e35772b2Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6180e35772b2Smrg [Whether we need a single "-rpath" flag with a separated argument]) 6181e35772b2Smrg_LT_TAGDECL([], [hardcode_direct], [0], 618221525869Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6183e35772b2Smrg DIR into the resulting binary]) 6184e35772b2Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 618521525869Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6186e35772b2Smrg DIR into the resulting binary and the resulting library dependency is 618721525869Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 6188e35772b2Smrg library is relocated]) 6189e35772b2Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6190e35772b2Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6191e35772b2Smrg into the resulting binary]) 6192e35772b2Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6193e35772b2Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6194e35772b2Smrg into the resulting binary]) 6195e35772b2Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 6196e35772b2Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 6197e35772b2Smrg into the library and all subsequent libraries and executables linked 6198e35772b2Smrg against it]) 6199e35772b2Smrg_LT_TAGDECL([], [inherit_rpath], [0], 6200e35772b2Smrg [Set to yes if linker adds runtime paths of dependent libraries 6201e35772b2Smrg to runtime path list]) 6202e35772b2Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 6203e35772b2Smrg [Whether libtool must link a program against all its dependency libraries]) 6204e35772b2Smrg_LT_TAGDECL([], [always_export_symbols], [0], 6205e35772b2Smrg [Set to "yes" if exported symbols are required]) 6206e35772b2Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6207e35772b2Smrg [The commands to list exported symbols]) 6208e35772b2Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 6209e35772b2Smrg [Symbols that should not be listed in the preloaded symbols]) 6210e35772b2Smrg_LT_TAGDECL([], [include_expsyms], [1], 6211e35772b2Smrg [Symbols that must always be exported]) 6212e35772b2Smrg_LT_TAGDECL([], [prelink_cmds], [2], 6213e35772b2Smrg [Commands necessary for linking programs (against libraries) with templates]) 621474c14cd6Smrg_LT_TAGDECL([], [postlink_cmds], [2], 621574c14cd6Smrg [Commands necessary for finishing linking programs]) 6216e35772b2Smrg_LT_TAGDECL([], [file_list_spec], [1], 6217e35772b2Smrg [Specify filename containing input files]) 6218e35772b2Smrgdnl FIXME: Not yet implemented 6219e35772b2Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6220e35772b2Smrgdnl [Compiler flag to generate thread safe objects]) 6221e35772b2Smrg])# _LT_LINKER_SHLIBS 6222e35772b2Smrg 6223e35772b2Smrg 6224e35772b2Smrg# _LT_LANG_C_CONFIG([TAG]) 6225e35772b2Smrg# ------------------------ 6226e35772b2Smrg# Ensure that the configuration variables for a C compiler are suitably 6227e35772b2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 622821525869Smrg# the compiler configuration to 'libtool'. 6229e35772b2Smrgm4_defun([_LT_LANG_C_CONFIG], 6230e35772b2Smrg[m4_require([_LT_DECL_EGREP])dnl 623121525869Smrglt_save_CC=$CC 6232e35772b2SmrgAC_LANG_PUSH(C) 623372b676d7Smrg 6234e35772b2Smrg# Source file extension for C test sources. 6235e35772b2Smrgac_ext=c 623672b676d7Smrg 6237e35772b2Smrg# Object file extension for compiled C test sources. 6238e35772b2Smrgobjext=o 6239e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 624072b676d7Smrg 6241e35772b2Smrg# Code to be used in simple compile tests 6242e35772b2Smrglt_simple_compile_test_code="int some_variable = 0;" 624372b676d7Smrg 6244e35772b2Smrg# Code to be used in simple link tests 6245e35772b2Smrglt_simple_link_test_code='int main(){return(0);}' 624672b676d7Smrg 6247e35772b2Smrg_LT_TAG_COMPILER 6248e35772b2Smrg# Save the default compiler, since it gets overwritten when the other 6249e35772b2Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6250e35772b2Smrgcompiler_DEFAULT=$CC 625172b676d7Smrg 6252e35772b2Smrg# save warnings/boilerplate of simple test code 6253e35772b2Smrg_LT_COMPILER_BOILERPLATE 6254e35772b2Smrg_LT_LINKER_BOILERPLATE 625572b676d7Smrg 6256e35772b2Smrgif test -n "$compiler"; then 6257e35772b2Smrg _LT_COMPILER_NO_RTTI($1) 6258e35772b2Smrg _LT_COMPILER_PIC($1) 6259e35772b2Smrg _LT_COMPILER_C_O($1) 6260e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 6261e35772b2Smrg _LT_LINKER_SHLIBS($1) 6262e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 6263e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6264e35772b2Smrg LT_SYS_DLOPEN_SELF 6265e35772b2Smrg _LT_CMD_STRIPLIB 6266e35772b2Smrg 626721525869Smrg # Report what library types will actually be built 6268e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6269e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 6270e35772b2Smrg 6271e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 627221525869Smrg test no = "$can_build_shared" && enable_shared=no 6273e35772b2Smrg 6274e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6275e35772b2Smrg # are all built from PIC. 6276e35772b2Smrg case $host_os in 6277e35772b2Smrg aix3*) 627821525869Smrg test yes = "$enable_shared" && enable_static=no 6279e35772b2Smrg if test -n "$RANLIB"; then 6280e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6281e35772b2Smrg postinstall_cmds='$RANLIB $lib' 6282e35772b2Smrg fi 6283e35772b2Smrg ;; 628472b676d7Smrg 6285e35772b2Smrg aix[[4-9]]*) 628621525869Smrg if test ia64 != "$host_cpu"; then 628721525869Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 628821525869Smrg yes,aix,yes) ;; # shared object as lib.so file only 628921525869Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 629021525869Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 629121525869Smrg esac 6292e35772b2Smrg fi 6293e35772b2Smrg ;; 6294e35772b2Smrg esac 6295e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 629672b676d7Smrg 6297e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 6298e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 629921525869Smrg test yes = "$enable_shared" || enable_static=yes 6300e35772b2Smrg AC_MSG_RESULT([$enable_static]) 630172b676d7Smrg 6302e35772b2Smrg _LT_CONFIG($1) 6303e35772b2Smrgfi 6304e35772b2SmrgAC_LANG_POP 630521525869SmrgCC=$lt_save_CC 6306e35772b2Smrg])# _LT_LANG_C_CONFIG 630772b676d7Smrg 630872b676d7Smrg 6309e35772b2Smrg# _LT_LANG_CXX_CONFIG([TAG]) 6310e35772b2Smrg# -------------------------- 6311e35772b2Smrg# Ensure that the configuration variables for a C++ compiler are suitably 6312e35772b2Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 631321525869Smrg# the compiler configuration to 'libtool'. 6314e35772b2Smrgm4_defun([_LT_LANG_CXX_CONFIG], 631574c14cd6Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6316e35772b2Smrgm4_require([_LT_DECL_EGREP])dnl 631774c14cd6Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 631821525869Smrgif test -n "$CXX" && ( test no != "$CXX" && 631921525869Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 632021525869Smrg (test g++ != "$CXX"))); then 632174c14cd6Smrg AC_PROG_CXXCPP 632274c14cd6Smrgelse 632374c14cd6Smrg _lt_caught_CXX_error=yes 632474c14cd6Smrgfi 6325e35772b2Smrg 6326e35772b2SmrgAC_LANG_PUSH(C++) 6327e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6328e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6329e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6330e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6331e35772b2Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6332e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6333e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6334e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6335e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6336e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6337e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6338e35772b2Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6339e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6340e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6341e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 6342e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6343e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6344e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 634574c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 634674c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6347e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6348e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6349e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 635072b676d7Smrg 6351e35772b2Smrg# Source file extension for C++ test sources. 6352e35772b2Smrgac_ext=cpp 635372b676d7Smrg 6354e35772b2Smrg# Object file extension for compiled C++ test sources. 6355e35772b2Smrgobjext=o 6356e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 6357e35772b2Smrg 6358e35772b2Smrg# No sense in running all these tests if we already determined that 6359e35772b2Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6360e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 6361e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 636221525869Smrgif test yes != "$_lt_caught_CXX_error"; then 6363e35772b2Smrg # Code to be used in simple compile tests 6364e35772b2Smrg lt_simple_compile_test_code="int some_variable = 0;" 6365e35772b2Smrg 6366e35772b2Smrg # Code to be used in simple link tests 6367e35772b2Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6368e35772b2Smrg 6369e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6370e35772b2Smrg _LT_TAG_COMPILER 6371e35772b2Smrg 6372e35772b2Smrg # save warnings/boilerplate of simple test code 6373e35772b2Smrg _LT_COMPILER_BOILERPLATE 6374e35772b2Smrg _LT_LINKER_BOILERPLATE 6375e35772b2Smrg 6376e35772b2Smrg # Allow CC to be a program name with arguments. 6377e35772b2Smrg lt_save_CC=$CC 637874c14cd6Smrg lt_save_CFLAGS=$CFLAGS 6379e35772b2Smrg lt_save_LD=$LD 6380e35772b2Smrg lt_save_GCC=$GCC 6381e35772b2Smrg GCC=$GXX 6382e35772b2Smrg lt_save_with_gnu_ld=$with_gnu_ld 6383e35772b2Smrg lt_save_path_LD=$lt_cv_path_LD 6384e35772b2Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6385e35772b2Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6386e35772b2Smrg else 6387e35772b2Smrg $as_unset lt_cv_prog_gnu_ld 6388e35772b2Smrg fi 6389e35772b2Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 6390e35772b2Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 6391e35772b2Smrg else 6392e35772b2Smrg $as_unset lt_cv_path_LD 6393e35772b2Smrg fi 6394e35772b2Smrg test -z "${LDCXX+set}" || LD=$LDCXX 6395e35772b2Smrg CC=${CXX-"c++"} 639674c14cd6Smrg CFLAGS=$CXXFLAGS 6397e35772b2Smrg compiler=$CC 6398e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 6399e35772b2Smrg _LT_CC_BASENAME([$compiler]) 640072b676d7Smrg 6401e35772b2Smrg if test -n "$compiler"; then 6402e35772b2Smrg # We don't want -fno-exception when compiling C++ code, so set the 6403e35772b2Smrg # no_builtin_flag separately 640421525869Smrg if test yes = "$GXX"; then 6405e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6406e35772b2Smrg else 6407e35772b2Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6408e35772b2Smrg fi 640972b676d7Smrg 641021525869Smrg if test yes = "$GXX"; then 6411e35772b2Smrg # Set up default GNU C++ configuration 641272b676d7Smrg 6413e35772b2Smrg LT_PATH_LD 641472b676d7Smrg 6415e35772b2Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6416e35772b2Smrg # archiving commands below assume that GNU ld is being used. 641721525869Smrg if test yes = "$with_gnu_ld"; then 641821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 641921525869Smrg _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' 642072b676d7Smrg 642121525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 642221525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 642372b676d7Smrg 6424e35772b2Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 6425e35772b2Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6426e35772b2Smrg # investigate it a little bit more. (MM) 642721525869Smrg wlarc='$wl' 642872b676d7Smrg 6429e35772b2Smrg # ancient GNU ld didn't support --whole-archive et. al. 6430e35772b2Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6431e35772b2Smrg $GREP 'no-whole-archive' > /dev/null; then 643221525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6433e35772b2Smrg else 6434e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6435e35772b2Smrg fi 6436e35772b2Smrg else 6437e35772b2Smrg with_gnu_ld=no 6438e35772b2Smrg wlarc= 6439e35772b2Smrg 6440e35772b2Smrg # A generic and very simple default shared library creation 6441e35772b2Smrg # command for GNU C++ for the case where it uses the native 6442e35772b2Smrg # linker, instead of GNU ld. If possible, this setting should 6443e35772b2Smrg # overridden to take advantage of the native linker features on 6444e35772b2Smrg # the platform it is being used on. 6445e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6446e35772b2Smrg fi 644772b676d7Smrg 6448e35772b2Smrg # Commands to make compiler produce verbose output that lists 6449e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6450e35772b2Smrg # linking a shared library. 645174c14cd6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 645272b676d7Smrg 6453e35772b2Smrg else 6454e35772b2Smrg GXX=no 6455e35772b2Smrg with_gnu_ld=no 6456e35772b2Smrg wlarc= 6457e35772b2Smrg fi 645872b676d7Smrg 6459e35772b2Smrg # PORTME: fill in a description of your system's C++ link characteristics 6460e35772b2Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6461e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6462e35772b2Smrg case $host_os in 6463e35772b2Smrg aix3*) 6464e35772b2Smrg # FIXME: insert proper C++ library support 6465e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6466e35772b2Smrg ;; 6467e35772b2Smrg aix[[4-9]]*) 646821525869Smrg if test ia64 = "$host_cpu"; then 6469e35772b2Smrg # On IA64, the linker does run time linking by default, so we don't 6470e35772b2Smrg # have to do anything special. 6471e35772b2Smrg aix_use_runtimelinking=no 6472e35772b2Smrg exp_sym_flag='-Bexport' 647321525869Smrg no_entry_flag= 6474e35772b2Smrg else 6475e35772b2Smrg aix_use_runtimelinking=no 6476e35772b2Smrg 6477e35772b2Smrg # Test if we are trying to use run time linking or normal 6478e35772b2Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 647921525869Smrg # have runtime linking enabled, and use it for executables. 648021525869Smrg # For shared libraries, we enable/disable runtime linking 648121525869Smrg # depending on the kind of the shared library created - 648221525869Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 648321525869Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 648421525869Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 648521525869Smrg # lib.a static archive 648621525869Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 648721525869Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 648821525869Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 648921525869Smrg # lib.a(lib.so.V) shared, rtl:no 649021525869Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 649121525869Smrg # lib.a static archive 6492e35772b2Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6493e35772b2Smrg for ld_flag in $LDFLAGS; do 6494e35772b2Smrg case $ld_flag in 6495e35772b2Smrg *-brtl*) 6496e35772b2Smrg aix_use_runtimelinking=yes 6497e35772b2Smrg break 6498e35772b2Smrg ;; 6499e35772b2Smrg esac 6500e35772b2Smrg done 650121525869Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 650221525869Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 650321525869Smrg # so we don't have lib.a shared libs to link our executables. 650421525869Smrg # We have to force runtime linking in this case. 650521525869Smrg aix_use_runtimelinking=yes 650621525869Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 650721525869Smrg fi 6508e35772b2Smrg ;; 6509e35772b2Smrg esac 651072b676d7Smrg 6511e35772b2Smrg exp_sym_flag='-bexport' 6512e35772b2Smrg no_entry_flag='-bnoentry' 6513e35772b2Smrg fi 651472b676d7Smrg 6515e35772b2Smrg # When large executables or shared objects are built, AIX ld can 6516e35772b2Smrg # have problems creating the table of contents. If linking a library 6517e35772b2Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6518e35772b2Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6519e35772b2Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6520e35772b2Smrg 6521e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='' 6522e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6523e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6524e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6525e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 652621525869Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 652721525869Smrg case $with_aix_soname,$aix_use_runtimelinking in 652821525869Smrg aix,*) ;; # no import file 652921525869Smrg svr4,* | *,yes) # use import file 653021525869Smrg # The Import File defines what to hardcode. 653121525869Smrg _LT_TAGVAR(hardcode_direct, $1)=no 653221525869Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 653321525869Smrg ;; 653421525869Smrg esac 6535e35772b2Smrg 653621525869Smrg if test yes = "$GXX"; then 6537e35772b2Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6538e35772b2Smrg # We only want to do this on AIX 4.2 and lower, the check 6539e35772b2Smrg # below for broken collect2 doesn't work under 4.3+ 654021525869Smrg collect2name=`$CC -print-prog-name=collect2` 6541e35772b2Smrg if test -f "$collect2name" && 6542e35772b2Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6543e35772b2Smrg then 6544e35772b2Smrg # We have reworked collect2 6545e35772b2Smrg : 6546e35772b2Smrg else 6547e35772b2Smrg # We have old collect2 6548e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6549e35772b2Smrg # It fails to find uninstalled libraries when the uninstalled 6550e35772b2Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6551e35772b2Smrg # to unsupported forces relinking 6552e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6553e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6554e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6555e35772b2Smrg fi 6556e35772b2Smrg esac 6557e35772b2Smrg shared_flag='-shared' 655821525869Smrg if test yes = "$aix_use_runtimelinking"; then 655921525869Smrg shared_flag=$shared_flag' $wl-G' 6560e35772b2Smrg fi 656121525869Smrg # Need to ensure runtime linking is disabled for the traditional 656221525869Smrg # shared library, or the linker may eventually find shared libraries 656321525869Smrg # /with/ Import File - we do not want to mix them. 656421525869Smrg shared_flag_aix='-shared' 656521525869Smrg shared_flag_svr4='-shared $wl-G' 6566e35772b2Smrg else 6567e35772b2Smrg # not using gcc 656821525869Smrg if test ia64 = "$host_cpu"; then 6569e35772b2Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6570e35772b2Smrg # chokes on -Wl,-G. The following line is correct: 6571e35772b2Smrg shared_flag='-G' 6572e35772b2Smrg else 657321525869Smrg if test yes = "$aix_use_runtimelinking"; then 657421525869Smrg shared_flag='$wl-G' 6575e35772b2Smrg else 657621525869Smrg shared_flag='$wl-bM:SRE' 6577e35772b2Smrg fi 657821525869Smrg shared_flag_aix='$wl-bM:SRE' 657921525869Smrg shared_flag_svr4='$wl-G' 6580e35772b2Smrg fi 6581e35772b2Smrg fi 658272b676d7Smrg 658321525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6584e35772b2Smrg # It seems that -bexpall does not export symbols beginning with 6585e35772b2Smrg # underscore (_), so it is better to generate a list of symbols to 6586e35772b2Smrg # export. 6587e35772b2Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 658821525869Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6589e35772b2Smrg # Warning - without using the other runtime loading flags (-brtl), 6590e35772b2Smrg # -berok will link without error, but may produce a broken library. 659121525869Smrg # The "-G" linker flag allows undefined symbols. 659221525869Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6593e35772b2Smrg # Determine the default libpath from the value encoded in an empty 6594e35772b2Smrg # executable. 659574c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 659621525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6597e35772b2Smrg 659821525869Smrg _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 6599e35772b2Smrg else 660021525869Smrg if test ia64 = "$host_cpu"; then 660121525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6602e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 660321525869Smrg _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" 6604e35772b2Smrg else 6605e35772b2Smrg # Determine the default libpath from the value encoded in an 6606e35772b2Smrg # empty executable. 660774c14cd6Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 660821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6609e35772b2Smrg # Warning - without using the other run time loading flags, 6610e35772b2Smrg # -berok will link without error, but may produce a broken library. 661121525869Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 661221525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 661321525869Smrg if test yes = "$with_gnu_ld"; then 661474c14cd6Smrg # We only use this code for GNU lds that support --whole-archive. 661521525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 661674c14cd6Smrg else 661774c14cd6Smrg # Exported symbols can be pulled into shared objects from archives 661874c14cd6Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 661974c14cd6Smrg fi 6620e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 662121525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 662221525869Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 662321525869Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 662421525869Smrg if test svr4 != "$with_aix_soname"; then 662521525869Smrg # This is similar to how AIX traditionally builds its shared 662621525869Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 662721525869Smrg _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' 662821525869Smrg fi 662921525869Smrg if test aix != "$with_aix_soname"; then 663021525869Smrg _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' 663121525869Smrg else 663221525869Smrg # used by -dlpreopen to get the symbols 663321525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 663421525869Smrg fi 663521525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6636e35772b2Smrg fi 6637e35772b2Smrg fi 6638e35772b2Smrg ;; 663972b676d7Smrg 6640e35772b2Smrg beos*) 6641e35772b2Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6642e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6643e35772b2Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6644e35772b2Smrg # support --undefined. This deserves some investigation. FIXME 664521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6646e35772b2Smrg else 6647e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6648e35772b2Smrg fi 6649e35772b2Smrg ;; 665072b676d7Smrg 6651e35772b2Smrg chorus*) 6652e35772b2Smrg case $cc_basename in 6653e35772b2Smrg *) 6654e35772b2Smrg # FIXME: insert proper C++ library support 6655e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6656e35772b2Smrg ;; 6657e35772b2Smrg esac 6658e35772b2Smrg ;; 665972b676d7Smrg 6660e35772b2Smrg cygwin* | mingw* | pw32* | cegcc*) 666174c14cd6Smrg case $GXX,$cc_basename in 666274c14cd6Smrg ,cl* | no,cl*) 666374c14cd6Smrg # Native MSVC 666474c14cd6Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 666574c14cd6Smrg # no search path for DLLs. 666674c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 666774c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 666874c14cd6Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 666974c14cd6Smrg _LT_TAGVAR(file_list_spec, $1)='@' 667074c14cd6Smrg # Tell ltmain to make .lib files, not .a files. 667174c14cd6Smrg libext=lib 667274c14cd6Smrg # Tell ltmain to make .dll files, not .so files. 667321525869Smrg shrext_cmds=.dll 667474c14cd6Smrg # FIXME: Setting linknames here is a bad hack. 667521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 667621525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 667721525869Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 667821525869Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 667921525869Smrg else 668021525869Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 668121525869Smrg fi~ 668221525869Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 668321525869Smrg linknames=' 668474c14cd6Smrg # The linker will not automatically build a static lib if we build a DLL. 668574c14cd6Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 668674c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 668774c14cd6Smrg # Don't use ranlib 668874c14cd6Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 668974c14cd6Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 669021525869Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 669121525869Smrg case $lt_outputfile in 669221525869Smrg *.exe|*.EXE) ;; 669321525869Smrg *) 669421525869Smrg lt_outputfile=$lt_outputfile.exe 669521525869Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 669621525869Smrg ;; 669721525869Smrg esac~ 669821525869Smrg func_to_tool_file "$lt_outputfile"~ 669921525869Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 670021525869Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 670121525869Smrg $RM "$lt_outputfile.manifest"; 670221525869Smrg fi' 670374c14cd6Smrg ;; 670474c14cd6Smrg *) 670574c14cd6Smrg # g++ 670674c14cd6Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 670774c14cd6Smrg # as there is no search path for DLLs. 670874c14cd6Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 670921525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 671074c14cd6Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 671174c14cd6Smrg _LT_TAGVAR(always_export_symbols, $1)=no 671274c14cd6Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 671374c14cd6Smrg 671474c14cd6Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 671521525869Smrg _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' 671621525869Smrg # If the export-symbols file already is a .def file, use it as 671721525869Smrg # is; otherwise, prepend EXPORTS... 671821525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 671921525869Smrg cp $export_symbols $output_objdir/$soname.def; 672021525869Smrg else 672121525869Smrg echo EXPORTS > $output_objdir/$soname.def; 672221525869Smrg cat $export_symbols >> $output_objdir/$soname.def; 672321525869Smrg fi~ 672421525869Smrg $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' 672574c14cd6Smrg else 672674c14cd6Smrg _LT_TAGVAR(ld_shlibs, $1)=no 672774c14cd6Smrg fi 672874c14cd6Smrg ;; 672974c14cd6Smrg esac 673074c14cd6Smrg ;; 6731e35772b2Smrg darwin* | rhapsody*) 6732e35772b2Smrg _LT_DARWIN_LINKER_FEATURES($1) 6733e35772b2Smrg ;; 673472b676d7Smrg 673521525869Smrg os2*) 673621525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 673721525869Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 673821525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 673921525869Smrg shrext_cmds=.dll 674021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 674121525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 674221525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 674321525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 674421525869Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 674521525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 674621525869Smrg emximp -o $lib $output_objdir/$libname.def' 674721525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 674821525869Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 674921525869Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 675021525869Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 675121525869Smrg prefix_cmds="$SED"~ 675221525869Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 675321525869Smrg prefix_cmds="$prefix_cmds -e 1d"; 675421525869Smrg fi~ 675521525869Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 675621525869Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 675721525869Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 675821525869Smrg emximp -o $lib $output_objdir/$libname.def' 675921525869Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 676021525869Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 676121525869Smrg ;; 676221525869Smrg 6763e35772b2Smrg dgux*) 6764e35772b2Smrg case $cc_basename in 6765e35772b2Smrg ec++*) 6766e35772b2Smrg # FIXME: insert proper C++ library support 6767e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6768e35772b2Smrg ;; 6769e35772b2Smrg ghcx*) 6770e35772b2Smrg # Green Hills C++ Compiler 6771e35772b2Smrg # FIXME: insert proper C++ library support 6772e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6773e35772b2Smrg ;; 6774e35772b2Smrg *) 6775e35772b2Smrg # FIXME: insert proper C++ library support 6776e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6777e35772b2Smrg ;; 6778e35772b2Smrg esac 6779e35772b2Smrg ;; 678072b676d7Smrg 678174c14cd6Smrg freebsd2.*) 6782e35772b2Smrg # C++ shared libraries reported to be fairly broken before 6783e35772b2Smrg # switch to ELF 6784e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6785e35772b2Smrg ;; 678672b676d7Smrg 6787e35772b2Smrg freebsd-elf*) 6788e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6789e35772b2Smrg ;; 679072b676d7Smrg 6791e35772b2Smrg freebsd* | dragonfly*) 6792e35772b2Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6793e35772b2Smrg # conventions 6794e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6795e35772b2Smrg ;; 679672b676d7Smrg 679774c14cd6Smrg haiku*) 679821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 679974c14cd6Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 680074c14cd6Smrg ;; 680174c14cd6Smrg 6802e35772b2Smrg hpux9*) 680321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6804e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 680521525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6806e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6807e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6808e35772b2Smrg # but as the default 6809e35772b2Smrg # location of the library. 6810e35772b2Smrg 6811e35772b2Smrg case $cc_basename in 6812e35772b2Smrg CC*) 6813e35772b2Smrg # FIXME: insert proper C++ library support 6814e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6815e35772b2Smrg ;; 6816e35772b2Smrg aCC*) 681721525869Smrg _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' 6818e35772b2Smrg # Commands to make compiler produce verbose output that lists 6819e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6820e35772b2Smrg # linking a shared library. 6821e35772b2Smrg # 6822e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6823e35772b2Smrg # explicitly linking system object files so we need to strip them 6824e35772b2Smrg # from the output so that they don't get included in the library 6825e35772b2Smrg # dependencies. 682621525869Smrg 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"' 6827e35772b2Smrg ;; 6828e35772b2Smrg *) 682921525869Smrg if test yes = "$GXX"; then 683021525869Smrg _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' 6831e35772b2Smrg else 6832e35772b2Smrg # FIXME: insert proper C++ library support 6833e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6834e35772b2Smrg fi 6835e35772b2Smrg ;; 6836e35772b2Smrg esac 6837e35772b2Smrg ;; 683872b676d7Smrg 6839e35772b2Smrg hpux10*|hpux11*) 684021525869Smrg if test no = "$with_gnu_ld"; then 684121525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6842e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6843e35772b2Smrg 6844e35772b2Smrg case $host_cpu in 6845e35772b2Smrg hppa*64*|ia64*) 6846e35772b2Smrg ;; 6847e35772b2Smrg *) 684821525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6849e35772b2Smrg ;; 6850e35772b2Smrg esac 6851e35772b2Smrg fi 6852e35772b2Smrg case $host_cpu in 6853e35772b2Smrg hppa*64*|ia64*) 6854e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6855e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6856e35772b2Smrg ;; 6857e35772b2Smrg *) 6858e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6859e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6860e35772b2Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6861e35772b2Smrg # but as the default 6862e35772b2Smrg # location of the library. 6863e35772b2Smrg ;; 6864e35772b2Smrg esac 6865e35772b2Smrg 6866e35772b2Smrg case $cc_basename in 6867e35772b2Smrg CC*) 6868e35772b2Smrg # FIXME: insert proper C++ library support 6869e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6870e35772b2Smrg ;; 6871e35772b2Smrg aCC*) 6872e35772b2Smrg case $host_cpu in 6873e35772b2Smrg hppa*64*) 687421525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6875e35772b2Smrg ;; 6876e35772b2Smrg ia64*) 687721525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6878e35772b2Smrg ;; 6879e35772b2Smrg *) 688021525869Smrg _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' 6881e35772b2Smrg ;; 6882e35772b2Smrg esac 6883e35772b2Smrg # Commands to make compiler produce verbose output that lists 6884e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6885e35772b2Smrg # linking a shared library. 6886e35772b2Smrg # 6887e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6888e35772b2Smrg # explicitly linking system object files so we need to strip them 6889e35772b2Smrg # from the output so that they don't get included in the library 6890e35772b2Smrg # dependencies. 689121525869Smrg 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"' 6892e35772b2Smrg ;; 6893e35772b2Smrg *) 689421525869Smrg if test yes = "$GXX"; then 689521525869Smrg if test no = "$with_gnu_ld"; then 6896e35772b2Smrg case $host_cpu in 6897e35772b2Smrg hppa*64*) 689821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6899e35772b2Smrg ;; 6900e35772b2Smrg ia64*) 690121525869Smrg _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' 6902e35772b2Smrg ;; 6903e35772b2Smrg *) 690421525869Smrg _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' 6905e35772b2Smrg ;; 6906e35772b2Smrg esac 6907e35772b2Smrg fi 6908e35772b2Smrg else 6909e35772b2Smrg # FIXME: insert proper C++ library support 6910e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6911e35772b2Smrg fi 6912e35772b2Smrg ;; 6913e35772b2Smrg esac 6914e35772b2Smrg ;; 691572b676d7Smrg 6916e35772b2Smrg interix[[3-9]]*) 6917e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6918e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 691921525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 692021525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6921e35772b2Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6922e35772b2Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6923e35772b2Smrg # default) and relocated if they conflict, which is a slow very memory 6924e35772b2Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6925e35772b2Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6926e35772b2Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 692721525869Smrg _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' 692821525869Smrg _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' 6929e35772b2Smrg ;; 6930e35772b2Smrg irix5* | irix6*) 6931e35772b2Smrg case $cc_basename in 6932e35772b2Smrg CC*) 6933e35772b2Smrg # SGI C++ 693421525869Smrg _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' 6935e35772b2Smrg 6936e35772b2Smrg # Archives containing C++ object files must be created using 6937e35772b2Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6938e35772b2Smrg # necessary to make sure instantiated templates are included 6939e35772b2Smrg # in the archive. 6940e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6941e35772b2Smrg ;; 6942e35772b2Smrg *) 694321525869Smrg if test yes = "$GXX"; then 694421525869Smrg if test no = "$with_gnu_ld"; then 694521525869Smrg _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' 6946e35772b2Smrg else 694721525869Smrg _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' 6948e35772b2Smrg fi 6949e35772b2Smrg fi 6950e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6951e35772b2Smrg ;; 6952e35772b2Smrg esac 695321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6954e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6955e35772b2Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6956e35772b2Smrg ;; 69571fd23544Smrg 695821525869Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6959e35772b2Smrg case $cc_basename in 6960e35772b2Smrg KCC*) 6961e35772b2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6962e35772b2Smrg 6963e35772b2Smrg # KCC will only create a shared library if the output file 6964e35772b2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6965e35772b2Smrg # to its proper name (with version) after linking. 696621525869Smrg _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' 696721525869Smrg _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' 6968e35772b2Smrg # Commands to make compiler produce verbose output that lists 6969e35772b2Smrg # what "hidden" libraries, object files and flags are used when 6970e35772b2Smrg # linking a shared library. 6971e35772b2Smrg # 6972e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 6973e35772b2Smrg # explicitly linking system object files so we need to strip them 6974e35772b2Smrg # from the output so that they don't get included in the library 6975e35772b2Smrg # dependencies. 697621525869Smrg 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"' 6977e35772b2Smrg 697821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 697921525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6980e35772b2Smrg 6981e35772b2Smrg # Archives containing C++ object files must be created using 6982e35772b2Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6983e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6984e35772b2Smrg ;; 6985e35772b2Smrg icpc* | ecpc* ) 6986e35772b2Smrg # Intel C++ 6987e35772b2Smrg with_gnu_ld=yes 6988e35772b2Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6989e35772b2Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6990e35772b2Smrg # earlier do not add the objects themselves. 6991e35772b2Smrg case `$CC -V 2>&1` in 6992e35772b2Smrg *"Version 7."*) 699321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 699421525869Smrg _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' 6995e35772b2Smrg ;; 6996e35772b2Smrg *) # Version 8.0 or newer 6997e35772b2Smrg tmp_idyn= 6998e35772b2Smrg case $host_cpu in 6999e35772b2Smrg ia64*) tmp_idyn=' -i_dynamic';; 7000e35772b2Smrg esac 700121525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 700221525869Smrg _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' 7003e35772b2Smrg ;; 7004e35772b2Smrg esac 7005e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 700621525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 700721525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 700821525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7009e35772b2Smrg ;; 7010e35772b2Smrg pgCC* | pgcpp*) 7011e35772b2Smrg # Portland Group C++ compiler 7012e35772b2Smrg case `$CC -V` in 701374c14cd6Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7014e35772b2Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 701521525869Smrg rm -rf $tpldir~ 701621525869Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 701721525869Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7018e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 701921525869Smrg rm -rf $tpldir~ 702021525869Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 702121525869Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 702221525869Smrg $RANLIB $oldlib' 7023e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 702421525869Smrg rm -rf $tpldir~ 702521525869Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 702621525869Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7027e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 702821525869Smrg rm -rf $tpldir~ 702921525869Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 703021525869Smrg $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' 7031e35772b2Smrg ;; 703274c14cd6Smrg *) # Version 6 and above use weak symbols 703321525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 703421525869Smrg _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' 7035e35772b2Smrg ;; 7036e35772b2Smrg esac 703772b676d7Smrg 703821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 703921525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 704021525869Smrg _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' 7041e35772b2Smrg ;; 7042e35772b2Smrg cxx*) 7043e35772b2Smrg # Compaq C++ 704421525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 704521525869Smrg _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' 704672b676d7Smrg 7047e35772b2Smrg runpath_var=LD_RUN_PATH 7048e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7049e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 705072b676d7Smrg 7051e35772b2Smrg # Commands to make compiler produce verbose output that lists 7052e35772b2Smrg # what "hidden" libraries, object files and flags are used when 7053e35772b2Smrg # linking a shared library. 7054e35772b2Smrg # 7055e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 7056e35772b2Smrg # explicitly linking system object files so we need to strip them 7057e35772b2Smrg # from the output so that they don't get included in the library 7058e35772b2Smrg # dependencies. 705921525869Smrg 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' 7060e35772b2Smrg ;; 706174c14cd6Smrg xl* | mpixl* | bgxl*) 7062e35772b2Smrg # IBM XL 8.0 on PPC, with GNU ld 706321525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 706421525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 706521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 706621525869Smrg if test yes = "$supports_anon_versioning"; then 7067e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 706821525869Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 706921525869Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 707021525869Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7071e35772b2Smrg fi 7072e35772b2Smrg ;; 7073e35772b2Smrg *) 7074e35772b2Smrg case `$CC -V 2>&1 | sed 5q` in 7075e35772b2Smrg *Sun\ C*) 7076e35772b2Smrg # Sun C++ 5.9 7077e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 707821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 707921525869Smrg _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' 7080e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 708121525869Smrg _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' 7082e35772b2Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7083e35772b2Smrg 7084e35772b2Smrg # Not sure whether something based on 7085e35772b2Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7086e35772b2Smrg # would be better. 708774c14cd6Smrg output_verbose_link_cmd='func_echo_all' 7088e35772b2Smrg 7089e35772b2Smrg # Archives containing C++ object files must be created using 7090e35772b2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7091e35772b2Smrg # necessary to make sure instantiated templates are included 7092e35772b2Smrg # in the archive. 7093e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7094e35772b2Smrg ;; 7095e35772b2Smrg esac 7096e35772b2Smrg ;; 7097e35772b2Smrg esac 7098e35772b2Smrg ;; 709972b676d7Smrg 7100e35772b2Smrg lynxos*) 7101e35772b2Smrg # FIXME: insert proper C++ library support 7102e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7103e35772b2Smrg ;; 710472b676d7Smrg 7105e35772b2Smrg m88k*) 7106e35772b2Smrg # FIXME: insert proper C++ library support 7107e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7108e35772b2Smrg ;; 710972b676d7Smrg 7110e35772b2Smrg mvs*) 7111e35772b2Smrg case $cc_basename in 7112e35772b2Smrg cxx*) 7113e35772b2Smrg # FIXME: insert proper C++ library support 7114e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7115e35772b2Smrg ;; 7116e35772b2Smrg *) 7117e35772b2Smrg # FIXME: insert proper C++ library support 7118e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7119e35772b2Smrg ;; 7120e35772b2Smrg esac 7121e35772b2Smrg ;; 712272b676d7Smrg 7123e35772b2Smrg netbsd*) 7124e35772b2Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7125e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7126e35772b2Smrg wlarc= 7127e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7128e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7129e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7130e35772b2Smrg fi 7131e35772b2Smrg # Workaround some broken pre-1.5 toolchains 7132e35772b2Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7133e35772b2Smrg ;; 713472b676d7Smrg 7135e35772b2Smrg *nto* | *qnx*) 7136e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 7137e35772b2Smrg ;; 713872b676d7Smrg 713921525869Smrg openbsd* | bitrig*) 7140e35772b2Smrg if test -f /usr/libexec/ld.so; then 7141e35772b2Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 7142e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7143e35772b2Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7144e35772b2Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 714521525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 714621525869Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 714721525869Smrg _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' 714821525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 714921525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7150e35772b2Smrg fi 715174c14cd6Smrg output_verbose_link_cmd=func_echo_all 7152e35772b2Smrg else 7153e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7154e35772b2Smrg fi 7155e35772b2Smrg ;; 715672b676d7Smrg 7157e35772b2Smrg osf3* | osf4* | osf5*) 7158e35772b2Smrg case $cc_basename in 7159e35772b2Smrg KCC*) 7160e35772b2Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7161e35772b2Smrg 7162e35772b2Smrg # KCC will only create a shared library if the output file 7163e35772b2Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7164e35772b2Smrg # to its proper name (with version) after linking. 716521525869Smrg _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' 7166e35772b2Smrg 716721525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7168e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7169e35772b2Smrg 7170e35772b2Smrg # Archives containing C++ object files must be created using 7171e35772b2Smrg # the KAI C++ compiler. 7172e35772b2Smrg case $host in 7173e35772b2Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7174e35772b2Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7175e35772b2Smrg esac 7176e35772b2Smrg ;; 7177e35772b2Smrg RCC*) 7178e35772b2Smrg # Rational C++ 2.4.1 7179e35772b2Smrg # FIXME: insert proper C++ library support 7180e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7181e35772b2Smrg ;; 7182e35772b2Smrg cxx*) 7183e35772b2Smrg case $host in 7184e35772b2Smrg osf3*) 718521525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 718621525869Smrg _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' 718721525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7188e35772b2Smrg ;; 7189e35772b2Smrg *) 7190e35772b2Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 719121525869Smrg _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' 7192e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 719321525869Smrg echo "-hidden">> $lib.exp~ 719421525869Smrg $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~ 719521525869Smrg $RM $lib.exp' 7196e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7197e35772b2Smrg ;; 7198e35772b2Smrg esac 719972b676d7Smrg 7200e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 720172b676d7Smrg 7202e35772b2Smrg # Commands to make compiler produce verbose output that lists 7203e35772b2Smrg # what "hidden" libraries, object files and flags are used when 7204e35772b2Smrg # linking a shared library. 7205e35772b2Smrg # 7206e35772b2Smrg # There doesn't appear to be a way to prevent this compiler from 7207e35772b2Smrg # explicitly linking system object files so we need to strip them 7208e35772b2Smrg # from the output so that they don't get included in the library 7209e35772b2Smrg # dependencies. 721021525869Smrg 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"' 7211e35772b2Smrg ;; 7212e35772b2Smrg *) 721321525869Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 721421525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7215e35772b2Smrg case $host in 7216e35772b2Smrg osf3*) 721721525869Smrg _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' 7218e35772b2Smrg ;; 7219e35772b2Smrg *) 722021525869Smrg _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' 7221e35772b2Smrg ;; 7222e35772b2Smrg esac 7223e35772b2Smrg 722421525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7225e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7226e35772b2Smrg 7227e35772b2Smrg # Commands to make compiler produce verbose output that lists 7228e35772b2Smrg # what "hidden" libraries, object files and flags are used when 7229e35772b2Smrg # linking a shared library. 723074c14cd6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7231e35772b2Smrg 7232e35772b2Smrg else 7233e35772b2Smrg # FIXME: insert proper C++ library support 7234e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7235e35772b2Smrg fi 7236e35772b2Smrg ;; 7237e35772b2Smrg esac 7238e35772b2Smrg ;; 723972b676d7Smrg 7240e35772b2Smrg psos*) 7241e35772b2Smrg # FIXME: insert proper C++ library support 7242e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7243e35772b2Smrg ;; 724472b676d7Smrg 7245e35772b2Smrg sunos4*) 7246e35772b2Smrg case $cc_basename in 7247e35772b2Smrg CC*) 7248e35772b2Smrg # Sun C++ 4.x 7249e35772b2Smrg # FIXME: insert proper C++ library support 7250e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7251e35772b2Smrg ;; 7252e35772b2Smrg lcc*) 7253e35772b2Smrg # Lucid 7254e35772b2Smrg # FIXME: insert proper C++ library support 7255e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7256e35772b2Smrg ;; 7257e35772b2Smrg *) 7258e35772b2Smrg # FIXME: insert proper C++ library support 7259e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7260e35772b2Smrg ;; 7261e35772b2Smrg esac 7262e35772b2Smrg ;; 726372b676d7Smrg 7264e35772b2Smrg solaris*) 7265e35772b2Smrg case $cc_basename in 726674c14cd6Smrg CC* | sunCC*) 7267e35772b2Smrg # Sun C++ 4.2, 5.x and Centerline C++ 7268e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7269e35772b2Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 727021525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7271e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 727221525869Smrg $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' 7273e35772b2Smrg 7274e35772b2Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7275e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7276e35772b2Smrg case $host_os in 7277e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7278e35772b2Smrg *) 7279e35772b2Smrg # The compiler driver will combine and reorder linker options, 728021525869Smrg # but understands '-z linker_flag'. 7281e35772b2Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7282e35772b2Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7283e35772b2Smrg ;; 7284e35772b2Smrg esac 7285e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 728672b676d7Smrg 728774c14cd6Smrg output_verbose_link_cmd='func_echo_all' 728872b676d7Smrg 7289e35772b2Smrg # Archives containing C++ object files must be created using 7290e35772b2Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7291e35772b2Smrg # necessary to make sure instantiated templates are included 7292e35772b2Smrg # in the archive. 7293e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7294e35772b2Smrg ;; 7295e35772b2Smrg gcx*) 7296e35772b2Smrg # Green Hills C++ Compiler 729721525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 729872b676d7Smrg 7299e35772b2Smrg # The C++ compiler must be used to create the archive. 7300e35772b2Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7301e35772b2Smrg ;; 7302e35772b2Smrg *) 7303e35772b2Smrg # GNU C++ compiler with Solaris linker 730421525869Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 730521525869Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7306e35772b2Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 730721525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7308e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 730921525869Smrg $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' 7310e35772b2Smrg 7311e35772b2Smrg # Commands to make compiler produce verbose output that lists 7312e35772b2Smrg # what "hidden" libraries, object files and flags are used when 7313e35772b2Smrg # linking a shared library. 731474c14cd6Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7315e35772b2Smrg else 731621525869Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 7317e35772b2Smrg # platform. 731821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7319e35772b2Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 732021525869Smrg $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' 7321e35772b2Smrg 7322e35772b2Smrg # Commands to make compiler produce verbose output that lists 7323e35772b2Smrg # what "hidden" libraries, object files and flags are used when 7324e35772b2Smrg # linking a shared library. 732574c14cd6Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7326e35772b2Smrg fi 7327e35772b2Smrg 732821525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7329e35772b2Smrg case $host_os in 7330e35772b2Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7331e35772b2Smrg *) 733221525869Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7333e35772b2Smrg ;; 7334e35772b2Smrg esac 7335e35772b2Smrg fi 7336e35772b2Smrg ;; 7337e35772b2Smrg esac 7338e35772b2Smrg ;; 733972b676d7Smrg 7340e35772b2Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 734121525869Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7342e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7343e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7344e35772b2Smrg runpath_var='LD_RUN_PATH' 734572b676d7Smrg 7346e35772b2Smrg case $cc_basename in 7347e35772b2Smrg CC*) 734821525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 734921525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7350e35772b2Smrg ;; 7351e35772b2Smrg *) 735221525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 735321525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7354e35772b2Smrg ;; 7355e35772b2Smrg esac 7356e35772b2Smrg ;; 735772b676d7Smrg 7358e35772b2Smrg sysv5* | sco3.2v5* | sco5v6*) 735921525869Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 7360e35772b2Smrg # link with -lc, and that would cause any symbols used from libc to 7361e35772b2Smrg # always be unresolved, which means just about no library would 7362e35772b2Smrg # ever link correctly. If we're not using GNU ld we use -z text 7363e35772b2Smrg # though, which does catch some bad symbols but isn't as heavy-handed 7364e35772b2Smrg # as -z defs. 736521525869Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 736621525869Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7367e35772b2Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7368e35772b2Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 736921525869Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7370e35772b2Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7371e35772b2Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 737221525869Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7373e35772b2Smrg runpath_var='LD_RUN_PATH' 737472b676d7Smrg 7375e35772b2Smrg case $cc_basename in 7376e35772b2Smrg CC*) 737721525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737821525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737974c14cd6Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 738021525869Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 738174c14cd6Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 738221525869Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 7383e35772b2Smrg ;; 7384e35772b2Smrg *) 738521525869Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 738621525869Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7387e35772b2Smrg ;; 7388e35772b2Smrg esac 7389e35772b2Smrg ;; 739072b676d7Smrg 7391e35772b2Smrg tandem*) 7392e35772b2Smrg case $cc_basename in 7393e35772b2Smrg NCC*) 7394e35772b2Smrg # NonStop-UX NCC 3.20 7395e35772b2Smrg # FIXME: insert proper C++ library support 7396e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7397e35772b2Smrg ;; 7398e35772b2Smrg *) 7399e35772b2Smrg # FIXME: insert proper C++ library support 7400e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7401e35772b2Smrg ;; 7402e35772b2Smrg esac 7403e35772b2Smrg ;; 740472b676d7Smrg 7405e35772b2Smrg vxworks*) 7406e35772b2Smrg # FIXME: insert proper C++ library support 7407e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7408e35772b2Smrg ;; 740972b676d7Smrg 7410e35772b2Smrg *) 7411e35772b2Smrg # FIXME: insert proper C++ library support 7412e35772b2Smrg _LT_TAGVAR(ld_shlibs, $1)=no 7413e35772b2Smrg ;; 7414e35772b2Smrg esac 741572b676d7Smrg 7416e35772b2Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 741721525869Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7418e35772b2Smrg 741921525869Smrg _LT_TAGVAR(GCC, $1)=$GXX 742021525869Smrg _LT_TAGVAR(LD, $1)=$LD 7421e35772b2Smrg 7422e35772b2Smrg ## CAVEAT EMPTOR: 7423e35772b2Smrg ## There is no encapsulation within the following macros, do not change 7424e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 7425e35772b2Smrg ## what you are doing... 7426e35772b2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7427e35772b2Smrg _LT_COMPILER_PIC($1) 7428e35772b2Smrg _LT_COMPILER_C_O($1) 7429e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 7430e35772b2Smrg _LT_LINKER_SHLIBS($1) 7431e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 7432e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7433e35772b2Smrg 7434e35772b2Smrg _LT_CONFIG($1) 7435e35772b2Smrg fi # test -n "$compiler" 7436e35772b2Smrg 7437e35772b2Smrg CC=$lt_save_CC 743874c14cd6Smrg CFLAGS=$lt_save_CFLAGS 7439e35772b2Smrg LDCXX=$LD 7440e35772b2Smrg LD=$lt_save_LD 7441e35772b2Smrg GCC=$lt_save_GCC 7442e35772b2Smrg with_gnu_ld=$lt_save_with_gnu_ld 7443e35772b2Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 7444e35772b2Smrg lt_cv_path_LD=$lt_save_path_LD 7445e35772b2Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7446e35772b2Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 744721525869Smrgfi # test yes != "$_lt_caught_CXX_error" 744872b676d7Smrg 7449e35772b2SmrgAC_LANG_POP 7450e35772b2Smrg])# _LT_LANG_CXX_CONFIG 745172b676d7Smrg 745272b676d7Smrg 745374c14cd6Smrg# _LT_FUNC_STRIPNAME_CNF 745474c14cd6Smrg# ---------------------- 745574c14cd6Smrg# func_stripname_cnf prefix suffix name 745674c14cd6Smrg# strip PREFIX and SUFFIX off of NAME. 745774c14cd6Smrg# PREFIX and SUFFIX must not contain globbing or regex special 745874c14cd6Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 745974c14cd6Smrg# dot (in which case that matches only a dot). 746074c14cd6Smrg# 746174c14cd6Smrg# This function is identical to the (non-XSI) version of func_stripname, 746274c14cd6Smrg# except this one can be used by m4 code that may be executed by configure, 746374c14cd6Smrg# rather than the libtool script. 746474c14cd6Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 746574c14cd6SmrgAC_REQUIRE([_LT_DECL_SED]) 746674c14cd6SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 746774c14cd6Smrgfunc_stripname_cnf () 746874c14cd6Smrg{ 746921525869Smrg case @S|@2 in 747021525869Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 747121525869Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 747274c14cd6Smrg esac 747374c14cd6Smrg} # func_stripname_cnf 747474c14cd6Smrg])# _LT_FUNC_STRIPNAME_CNF 747574c14cd6Smrg 747621525869Smrg 7477e35772b2Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7478e35772b2Smrg# --------------------------------- 7479e35772b2Smrg# Figure out "hidden" library dependencies from verbose 7480e35772b2Smrg# compiler output when linking a shared library. 7481e35772b2Smrg# Parse the compiler output and extract the necessary 7482e35772b2Smrg# objects, libraries and library flags. 7483e35772b2Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7484e35772b2Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 748574c14cd6SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7486e35772b2Smrg# Dependencies to place before and after the object being linked: 7487e35772b2Smrg_LT_TAGVAR(predep_objects, $1)= 7488e35772b2Smrg_LT_TAGVAR(postdep_objects, $1)= 7489e35772b2Smrg_LT_TAGVAR(predeps, $1)= 7490e35772b2Smrg_LT_TAGVAR(postdeps, $1)= 7491e35772b2Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 749272b676d7Smrg 7493e35772b2Smrgdnl we can't use the lt_simple_compile_test_code here, 7494e35772b2Smrgdnl because it contains code intended for an executable, 7495e35772b2Smrgdnl not a library. It's possible we should let each 7496e35772b2Smrgdnl tag define a new lt_????_link_test_code variable, 7497e35772b2Smrgdnl but it's only used here... 7498e35772b2Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7499e35772b2Smrgint a; 7500e35772b2Smrgvoid foo (void) { a = 0; } 7501e35772b2Smrg_LT_EOF 7502e35772b2Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7503e35772b2Smrgclass Foo 7504e35772b2Smrg{ 7505e35772b2Smrgpublic: 7506e35772b2Smrg Foo (void) { a = 0; } 7507e35772b2Smrgprivate: 7508e35772b2Smrg int a; 7509e35772b2Smrg}; 7510e35772b2Smrg_LT_EOF 7511e35772b2Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7512e35772b2Smrg subroutine foo 7513e35772b2Smrg implicit none 7514e35772b2Smrg integer*4 a 7515e35772b2Smrg a=0 7516e35772b2Smrg return 7517e35772b2Smrg end 7518e35772b2Smrg_LT_EOF 7519e35772b2Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7520e35772b2Smrg subroutine foo 7521e35772b2Smrg implicit none 7522e35772b2Smrg integer a 7523e35772b2Smrg a=0 7524e35772b2Smrg return 7525e35772b2Smrg end 7526e35772b2Smrg_LT_EOF 7527e35772b2Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7528e35772b2Smrgpublic class foo { 7529e35772b2Smrg private int a; 7530e35772b2Smrg public void bar (void) { 7531e35772b2Smrg a = 0; 7532e35772b2Smrg } 7533e35772b2Smrg}; 7534e35772b2Smrg_LT_EOF 753574c14cd6Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 753674c14cd6Smrgpackage foo 753774c14cd6Smrgfunc foo() { 753874c14cd6Smrg} 753974c14cd6Smrg_LT_EOF 7540e35772b2Smrg]) 754174c14cd6Smrg 754274c14cd6Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 754374c14cd6Smrgcase "$CC $CFLAGS " in #( 754474c14cd6Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 754574c14cd6Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 754674c14cd6Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 754774c14cd6Smrgesac 754874c14cd6Smrg 7549e35772b2Smrgdnl Parse the compiler output and extract the necessary 7550e35772b2Smrgdnl objects, libraries and library flags. 7551e35772b2Smrgif AC_TRY_EVAL(ac_compile); then 7552e35772b2Smrg # Parse the compiler output and extract the necessary 7553e35772b2Smrg # objects, libraries and library flags. 755472b676d7Smrg 7555e35772b2Smrg # Sentinel used to keep track of whether or not we are before 7556e35772b2Smrg # the conftest object file. 7557e35772b2Smrg pre_test_object_deps_done=no 755872b676d7Smrg 7559e35772b2Smrg for p in `eval "$output_verbose_link_cmd"`; do 756021525869Smrg case $prev$p in 756172b676d7Smrg 7562e35772b2Smrg -L* | -R* | -l*) 7563e35772b2Smrg # Some compilers place space between "-{L,R}" and the path. 7564e35772b2Smrg # Remove the space. 756521525869Smrg if test x-L = "$p" || 756621525869Smrg test x-R = "$p"; then 7567e35772b2Smrg prev=$p 7568e35772b2Smrg continue 7569e35772b2Smrg fi 757072b676d7Smrg 757174c14cd6Smrg # Expand the sysroot to ease extracting the directories later. 757274c14cd6Smrg if test -z "$prev"; then 757374c14cd6Smrg case $p in 757474c14cd6Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 757574c14cd6Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 757674c14cd6Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 757774c14cd6Smrg esac 757874c14cd6Smrg fi 757974c14cd6Smrg case $p in 758074c14cd6Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 758174c14cd6Smrg esac 758221525869Smrg if test no = "$pre_test_object_deps_done"; then 758321525869Smrg case $prev in 758474c14cd6Smrg -L | -R) 7585e35772b2Smrg # Internal compiler library paths should come after those 7586e35772b2Smrg # provided the user. The postdeps already come after the 7587e35772b2Smrg # user supplied libs so there is no need to process them. 7588e35772b2Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 758921525869Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7590e35772b2Smrg else 759121525869Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7592e35772b2Smrg fi 7593e35772b2Smrg ;; 7594e35772b2Smrg # The "-l" case would never come before the object being 7595e35772b2Smrg # linked, so don't bother handling this case. 7596e35772b2Smrg esac 7597e35772b2Smrg else 7598e35772b2Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 759921525869Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 7600e35772b2Smrg else 760121525869Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7602e35772b2Smrg fi 7603e35772b2Smrg fi 760474c14cd6Smrg prev= 7605e35772b2Smrg ;; 760672b676d7Smrg 760774c14cd6Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 7608e35772b2Smrg *.$objext) 7609e35772b2Smrg # This assumes that the test object file only shows up 7610e35772b2Smrg # once in the compiler output. 7611e35772b2Smrg if test "$p" = "conftest.$objext"; then 7612e35772b2Smrg pre_test_object_deps_done=yes 7613e35772b2Smrg continue 7614e35772b2Smrg fi 761572b676d7Smrg 761621525869Smrg if test no = "$pre_test_object_deps_done"; then 7617e35772b2Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 761821525869Smrg _LT_TAGVAR(predep_objects, $1)=$p 7619e35772b2Smrg else 7620e35772b2Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7621e35772b2Smrg fi 7622e35772b2Smrg else 7623e35772b2Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 762421525869Smrg _LT_TAGVAR(postdep_objects, $1)=$p 7625e35772b2Smrg else 7626e35772b2Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7627e35772b2Smrg fi 7628e35772b2Smrg fi 7629e35772b2Smrg ;; 763072b676d7Smrg 7631e35772b2Smrg *) ;; # Ignore the rest. 763272b676d7Smrg 7633e35772b2Smrg esac 7634e35772b2Smrg done 763572b676d7Smrg 7636e35772b2Smrg # Clean up. 7637e35772b2Smrg rm -f a.out a.exe 7638e35772b2Smrgelse 7639e35772b2Smrg echo "libtool.m4: error: problem compiling $1 test program" 764072b676d7Smrgfi 764172b676d7Smrg 7642e35772b2Smrg$RM -f confest.$objext 764374c14cd6SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 764472b676d7Smrg 7645e35772b2Smrg# PORTME: override above test on systems where it is broken 7646e35772b2Smrgm4_if([$1], [CXX], 7647e35772b2Smrg[case $host_os in 7648e35772b2Smrginterix[[3-9]]*) 7649e35772b2Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7650e35772b2Smrg # hack all around it, let's just trust "g++" to DTRT. 7651e35772b2Smrg _LT_TAGVAR(predep_objects,$1)= 7652e35772b2Smrg _LT_TAGVAR(postdep_objects,$1)= 7653e35772b2Smrg _LT_TAGVAR(postdeps,$1)= 7654e35772b2Smrg ;; 765572b676d7Smrgesac 7656e35772b2Smrg]) 765772b676d7Smrg 7658e35772b2Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7659e35772b2Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 766072b676d7Smrgesac 7661e35772b2Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7662e35772b2Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 766321525869Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7664e35772b2Smrgfi 7665e35772b2Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7666e35772b2Smrg [The directories searched by this compiler when creating a shared library]) 7667e35772b2Smrg_LT_TAGDECL([], [predep_objects], [1], 7668e35772b2Smrg [Dependencies to place before and after the objects being linked to 7669e35772b2Smrg create a shared library]) 7670e35772b2Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7671e35772b2Smrg_LT_TAGDECL([], [predeps], [1]) 7672e35772b2Smrg_LT_TAGDECL([], [postdeps], [1]) 7673e35772b2Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7674e35772b2Smrg [The library search path used internally by the compiler when linking 7675e35772b2Smrg a shared library]) 7676e35772b2Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7677e35772b2Smrg 7678e35772b2Smrg 7679e35772b2Smrg# _LT_LANG_F77_CONFIG([TAG]) 7680e35772b2Smrg# -------------------------- 7681e35772b2Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7682e35772b2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 768321525869Smrg# to write the compiler configuration to 'libtool'. 7684e35772b2Smrgm4_defun([_LT_LANG_F77_CONFIG], 768574c14cd6Smrg[AC_LANG_PUSH(Fortran 77) 768621525869Smrgif test -z "$F77" || test no = "$F77"; then 768774c14cd6Smrg _lt_disable_F77=yes 768874c14cd6Smrgfi 768972b676d7Smrg 7690e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7691e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7692e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7693e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7694e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7695e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7696e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7697e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7698e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7699e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7700e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7701e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7702e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 7703e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7704e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7705e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 770674c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 770774c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7708e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7709e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7710e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 771172b676d7Smrg 7712e35772b2Smrg# Source file extension for f77 test sources. 7713e35772b2Smrgac_ext=f 771472b676d7Smrg 7715e35772b2Smrg# Object file extension for compiled f77 test sources. 7716e35772b2Smrgobjext=o 7717e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 7718e35772b2Smrg 7719e35772b2Smrg# No sense in running all these tests if we already determined that 7720e35772b2Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7721e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 7722e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 772321525869Smrgif test yes != "$_lt_disable_F77"; then 7724e35772b2Smrg # Code to be used in simple compile tests 7725e35772b2Smrg lt_simple_compile_test_code="\ 7726e35772b2Smrg subroutine t 7727e35772b2Smrg return 7728e35772b2Smrg end 7729e35772b2Smrg" 773072b676d7Smrg 7731e35772b2Smrg # Code to be used in simple link tests 7732e35772b2Smrg lt_simple_link_test_code="\ 7733e35772b2Smrg program t 7734e35772b2Smrg end 7735e35772b2Smrg" 773672b676d7Smrg 7737e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7738e35772b2Smrg _LT_TAG_COMPILER 773972b676d7Smrg 7740e35772b2Smrg # save warnings/boilerplate of simple test code 7741e35772b2Smrg _LT_COMPILER_BOILERPLATE 7742e35772b2Smrg _LT_LINKER_BOILERPLATE 774372b676d7Smrg 7744e35772b2Smrg # Allow CC to be a program name with arguments. 774521525869Smrg lt_save_CC=$CC 7746e35772b2Smrg lt_save_GCC=$GCC 774774c14cd6Smrg lt_save_CFLAGS=$CFLAGS 7748e35772b2Smrg CC=${F77-"f77"} 774974c14cd6Smrg CFLAGS=$FFLAGS 7750e35772b2Smrg compiler=$CC 7751e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 7752e35772b2Smrg _LT_CC_BASENAME([$compiler]) 7753e35772b2Smrg GCC=$G77 7754e35772b2Smrg if test -n "$compiler"; then 7755e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7756e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 775772b676d7Smrg 7758e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 775921525869Smrg test no = "$can_build_shared" && enable_shared=no 7760e35772b2Smrg 7761e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7762e35772b2Smrg # are all built from PIC. 7763e35772b2Smrg case $host_os in 7764e35772b2Smrg aix3*) 776521525869Smrg test yes = "$enable_shared" && enable_static=no 7766e35772b2Smrg if test -n "$RANLIB"; then 7767e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7768e35772b2Smrg postinstall_cmds='$RANLIB $lib' 7769e35772b2Smrg fi 7770e35772b2Smrg ;; 7771e35772b2Smrg aix[[4-9]]*) 777221525869Smrg if test ia64 != "$host_cpu"; then 777321525869Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 777421525869Smrg yes,aix,yes) ;; # shared object as lib.so file only 777521525869Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 777621525869Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 777721525869Smrg esac 777872b676d7Smrg fi 7779e35772b2Smrg ;; 7780e35772b2Smrg esac 7781e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 7782e35772b2Smrg 7783e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 7784e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 778521525869Smrg test yes = "$enable_shared" || enable_static=yes 7786e35772b2Smrg AC_MSG_RESULT([$enable_static]) 7787e35772b2Smrg 778821525869Smrg _LT_TAGVAR(GCC, $1)=$G77 778921525869Smrg _LT_TAGVAR(LD, $1)=$LD 7790e35772b2Smrg 7791e35772b2Smrg ## CAVEAT EMPTOR: 7792e35772b2Smrg ## There is no encapsulation within the following macros, do not change 7793e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 7794e35772b2Smrg ## what you are doing... 7795e35772b2Smrg _LT_COMPILER_PIC($1) 7796e35772b2Smrg _LT_COMPILER_C_O($1) 7797e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 7798e35772b2Smrg _LT_LINKER_SHLIBS($1) 7799e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 7800e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7801e35772b2Smrg 7802e35772b2Smrg _LT_CONFIG($1) 7803e35772b2Smrg fi # test -n "$compiler" 7804e35772b2Smrg 7805e35772b2Smrg GCC=$lt_save_GCC 780621525869Smrg CC=$lt_save_CC 780721525869Smrg CFLAGS=$lt_save_CFLAGS 780821525869Smrgfi # test yes != "$_lt_disable_F77" 780972b676d7Smrg 7810e35772b2SmrgAC_LANG_POP 7811e35772b2Smrg])# _LT_LANG_F77_CONFIG 7812e35772b2Smrg 7813e35772b2Smrg 7814e35772b2Smrg# _LT_LANG_FC_CONFIG([TAG]) 7815e35772b2Smrg# ------------------------- 7816e35772b2Smrg# Ensure that the configuration variables for a Fortran compiler are 7817e35772b2Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 781821525869Smrg# to write the compiler configuration to 'libtool'. 7819e35772b2Smrgm4_defun([_LT_LANG_FC_CONFIG], 782074c14cd6Smrg[AC_LANG_PUSH(Fortran) 782174c14cd6Smrg 782221525869Smrgif test -z "$FC" || test no = "$FC"; then 782374c14cd6Smrg _lt_disable_FC=yes 782474c14cd6Smrgfi 7825e35772b2Smrg 7826e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7827e35772b2Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7828e35772b2Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7829e35772b2Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7830e35772b2Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7831e35772b2Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7832e35772b2Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7833e35772b2Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7834e35772b2Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7835e35772b2Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7836e35772b2Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7837e35772b2Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7838e35772b2Smrg_LT_TAGVAR(module_cmds, $1)= 7839e35772b2Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7840e35772b2Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7841e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 784274c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 784374c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7844e35772b2Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7845e35772b2Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7846e35772b2Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7847e35772b2Smrg 7848e35772b2Smrg# Source file extension for fc test sources. 7849e35772b2Smrgac_ext=${ac_fc_srcext-f} 7850e35772b2Smrg 7851e35772b2Smrg# Object file extension for compiled fc test sources. 7852e35772b2Smrgobjext=o 7853e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 7854e35772b2Smrg 7855e35772b2Smrg# No sense in running all these tests if we already determined that 7856e35772b2Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7857e35772b2Smrg# are currently assumed to apply to all compilers on this platform, 7858e35772b2Smrg# and will be corrupted by setting them based on a non-working compiler. 785921525869Smrgif test yes != "$_lt_disable_FC"; then 7860e35772b2Smrg # Code to be used in simple compile tests 7861e35772b2Smrg lt_simple_compile_test_code="\ 7862e35772b2Smrg subroutine t 7863e35772b2Smrg return 7864e35772b2Smrg end 7865e35772b2Smrg" 7866e35772b2Smrg 7867e35772b2Smrg # Code to be used in simple link tests 7868e35772b2Smrg lt_simple_link_test_code="\ 7869e35772b2Smrg program t 7870e35772b2Smrg end 7871e35772b2Smrg" 7872e35772b2Smrg 7873e35772b2Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7874e35772b2Smrg _LT_TAG_COMPILER 787572b676d7Smrg 7876e35772b2Smrg # save warnings/boilerplate of simple test code 7877e35772b2Smrg _LT_COMPILER_BOILERPLATE 7878e35772b2Smrg _LT_LINKER_BOILERPLATE 7879e35772b2Smrg 7880e35772b2Smrg # Allow CC to be a program name with arguments. 788121525869Smrg lt_save_CC=$CC 7882e35772b2Smrg lt_save_GCC=$GCC 788374c14cd6Smrg lt_save_CFLAGS=$CFLAGS 7884e35772b2Smrg CC=${FC-"f95"} 788574c14cd6Smrg CFLAGS=$FCFLAGS 7886e35772b2Smrg compiler=$CC 7887e35772b2Smrg GCC=$ac_cv_fc_compiler_gnu 7888e35772b2Smrg 7889e35772b2Smrg _LT_TAGVAR(compiler, $1)=$CC 7890e35772b2Smrg _LT_CC_BASENAME([$compiler]) 7891e35772b2Smrg 7892e35772b2Smrg if test -n "$compiler"; then 7893e35772b2Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7894e35772b2Smrg AC_MSG_RESULT([$can_build_shared]) 7895e35772b2Smrg 7896e35772b2Smrg AC_MSG_CHECKING([whether to build shared libraries]) 789721525869Smrg test no = "$can_build_shared" && enable_shared=no 7898e35772b2Smrg 7899e35772b2Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7900e35772b2Smrg # are all built from PIC. 790172b676d7Smrg case $host_os in 7902e35772b2Smrg aix3*) 790321525869Smrg test yes = "$enable_shared" && enable_static=no 7904e35772b2Smrg if test -n "$RANLIB"; then 7905e35772b2Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7906e35772b2Smrg postinstall_cmds='$RANLIB $lib' 7907e35772b2Smrg fi 7908e35772b2Smrg ;; 79091fd23544Smrg aix[[4-9]]*) 791021525869Smrg if test ia64 != "$host_cpu"; then 791121525869Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 791221525869Smrg yes,aix,yes) ;; # shared object as lib.so file only 791321525869Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 791421525869Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 791521525869Smrg esac 791672b676d7Smrg fi 7917e35772b2Smrg ;; 791872b676d7Smrg esac 7919e35772b2Smrg AC_MSG_RESULT([$enable_shared]) 7920e35772b2Smrg 7921e35772b2Smrg AC_MSG_CHECKING([whether to build static libraries]) 7922e35772b2Smrg # Make sure either enable_shared or enable_static is yes. 792321525869Smrg test yes = "$enable_shared" || enable_static=yes 7924e35772b2Smrg AC_MSG_RESULT([$enable_static]) 7925e35772b2Smrg 792621525869Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 792721525869Smrg _LT_TAGVAR(LD, $1)=$LD 7928e35772b2Smrg 7929e35772b2Smrg ## CAVEAT EMPTOR: 7930e35772b2Smrg ## There is no encapsulation within the following macros, do not change 7931e35772b2Smrg ## the running order or otherwise move them around unless you know exactly 7932e35772b2Smrg ## what you are doing... 7933e35772b2Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7934e35772b2Smrg _LT_COMPILER_PIC($1) 7935e35772b2Smrg _LT_COMPILER_C_O($1) 7936e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 7937e35772b2Smrg _LT_LINKER_SHLIBS($1) 7938e35772b2Smrg _LT_SYS_DYNAMIC_LINKER($1) 7939e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7940e35772b2Smrg 7941e35772b2Smrg _LT_CONFIG($1) 7942e35772b2Smrg fi # test -n "$compiler" 7943e35772b2Smrg 7944e35772b2Smrg GCC=$lt_save_GCC 794574c14cd6Smrg CC=$lt_save_CC 794674c14cd6Smrg CFLAGS=$lt_save_CFLAGS 794721525869Smrgfi # test yes != "$_lt_disable_FC" 794872b676d7Smrg 7949e35772b2SmrgAC_LANG_POP 7950e35772b2Smrg])# _LT_LANG_FC_CONFIG 795172b676d7Smrg 795272b676d7Smrg 7953e35772b2Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7954e35772b2Smrg# -------------------------- 7955e35772b2Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7956e35772b2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 795721525869Smrg# to write the compiler configuration to 'libtool'. 7958e35772b2Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7959e35772b2Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7960e35772b2SmrgAC_LANG_SAVE 796172b676d7Smrg 7962e35772b2Smrg# Source file extension for Java test sources. 7963e35772b2Smrgac_ext=java 796472b676d7Smrg 7965e35772b2Smrg# Object file extension for compiled Java test sources. 7966e35772b2Smrgobjext=o 7967e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 796872b676d7Smrg 7969e35772b2Smrg# Code to be used in simple compile tests 7970e35772b2Smrglt_simple_compile_test_code="class foo {}" 797172b676d7Smrg 7972e35772b2Smrg# Code to be used in simple link tests 7973e35772b2Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 797472b676d7Smrg 7975e35772b2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7976e35772b2Smrg_LT_TAG_COMPILER 797772b676d7Smrg 7978e35772b2Smrg# save warnings/boilerplate of simple test code 7979e35772b2Smrg_LT_COMPILER_BOILERPLATE 7980e35772b2Smrg_LT_LINKER_BOILERPLATE 798172b676d7Smrg 7982e35772b2Smrg# Allow CC to be a program name with arguments. 798374c14cd6Smrglt_save_CC=$CC 798474c14cd6Smrglt_save_CFLAGS=$CFLAGS 7985e35772b2Smrglt_save_GCC=$GCC 7986e35772b2SmrgGCC=yes 7987e35772b2SmrgCC=${GCJ-"gcj"} 798874c14cd6SmrgCFLAGS=$GCJFLAGS 7989e35772b2Smrgcompiler=$CC 7990e35772b2Smrg_LT_TAGVAR(compiler, $1)=$CC 799121525869Smrg_LT_TAGVAR(LD, $1)=$LD 7992e35772b2Smrg_LT_CC_BASENAME([$compiler]) 799372b676d7Smrg 7994e35772b2Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7995e35772b2Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 799672b676d7Smrg 7997e35772b2Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 799874c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 799974c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 800072b676d7Smrg 8001e35772b2Smrgif test -n "$compiler"; then 8002e35772b2Smrg _LT_COMPILER_NO_RTTI($1) 8003e35772b2Smrg _LT_COMPILER_PIC($1) 8004e35772b2Smrg _LT_COMPILER_C_O($1) 8005e35772b2Smrg _LT_COMPILER_FILE_LOCKS($1) 8006e35772b2Smrg _LT_LINKER_SHLIBS($1) 8007e35772b2Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 800872b676d7Smrg 8009e35772b2Smrg _LT_CONFIG($1) 8010e35772b2Smrgfi 801172b676d7Smrg 8012e35772b2SmrgAC_LANG_RESTORE 801372b676d7Smrg 8014e35772b2SmrgGCC=$lt_save_GCC 801574c14cd6SmrgCC=$lt_save_CC 801674c14cd6SmrgCFLAGS=$lt_save_CFLAGS 8017e35772b2Smrg])# _LT_LANG_GCJ_CONFIG 801872b676d7Smrg 80191fd23544Smrg 802074c14cd6Smrg# _LT_LANG_GO_CONFIG([TAG]) 802174c14cd6Smrg# -------------------------- 802274c14cd6Smrg# Ensure that the configuration variables for the GNU Go compiler 8023e35772b2Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 802421525869Smrg# to write the compiler configuration to 'libtool'. 802574c14cd6Smrgm4_defun([_LT_LANG_GO_CONFIG], 802674c14cd6Smrg[AC_REQUIRE([LT_PROG_GO])dnl 8027e35772b2SmrgAC_LANG_SAVE 8028e35772b2Smrg 802974c14cd6Smrg# Source file extension for Go test sources. 803074c14cd6Smrgac_ext=go 8031e35772b2Smrg 803274c14cd6Smrg# Object file extension for compiled Go test sources. 8033e35772b2Smrgobjext=o 8034e35772b2Smrg_LT_TAGVAR(objext, $1)=$objext 8035e35772b2Smrg 8036e35772b2Smrg# Code to be used in simple compile tests 803774c14cd6Smrglt_simple_compile_test_code="package main; func main() { }" 8038e35772b2Smrg 8039e35772b2Smrg# Code to be used in simple link tests 804074c14cd6Smrglt_simple_link_test_code='package main; func main() { }' 8041e35772b2Smrg 8042e35772b2Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8043e35772b2Smrg_LT_TAG_COMPILER 8044e35772b2Smrg 8045e35772b2Smrg# save warnings/boilerplate of simple test code 8046e35772b2Smrg_LT_COMPILER_BOILERPLATE 8047e35772b2Smrg_LT_LINKER_BOILERPLATE 8048e35772b2Smrg 8049e35772b2Smrg# Allow CC to be a program name with arguments. 805074c14cd6Smrglt_save_CC=$CC 805174c14cd6Smrglt_save_CFLAGS=$CFLAGS 8052e35772b2Smrglt_save_GCC=$GCC 805374c14cd6SmrgGCC=yes 805474c14cd6SmrgCC=${GOC-"gccgo"} 805574c14cd6SmrgCFLAGS=$GOFLAGS 8056e35772b2Smrgcompiler=$CC 8057e35772b2Smrg_LT_TAGVAR(compiler, $1)=$CC 805821525869Smrg_LT_TAGVAR(LD, $1)=$LD 8059e35772b2Smrg_LT_CC_BASENAME([$compiler]) 806074c14cd6Smrg 806174c14cd6Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 806274c14cd6Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 806374c14cd6Smrg 806474c14cd6Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 806574c14cd6Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 806674c14cd6Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8067e35772b2Smrg 8068e35772b2Smrgif test -n "$compiler"; then 806974c14cd6Smrg _LT_COMPILER_NO_RTTI($1) 807074c14cd6Smrg _LT_COMPILER_PIC($1) 807174c14cd6Smrg _LT_COMPILER_C_O($1) 807274c14cd6Smrg _LT_COMPILER_FILE_LOCKS($1) 807374c14cd6Smrg _LT_LINKER_SHLIBS($1) 807474c14cd6Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 807574c14cd6Smrg 8076e35772b2Smrg _LT_CONFIG($1) 8077e35772b2Smrgfi 8078e35772b2Smrg 8079e35772b2SmrgAC_LANG_RESTORE 8080e35772b2Smrg 808174c14cd6SmrgGCC=$lt_save_GCC 808274c14cd6SmrgCC=$lt_save_CC 808374c14cd6SmrgCFLAGS=$lt_save_CFLAGS 808474c14cd6Smrg])# _LT_LANG_GO_CONFIG 8085e35772b2Smrg 808674c14cd6Smrg 808774c14cd6Smrg# _LT_LANG_RC_CONFIG([TAG]) 808874c14cd6Smrg# ------------------------- 808974c14cd6Smrg# Ensure that the configuration variables for the Windows resource compiler 809074c14cd6Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 809121525869Smrg# to write the compiler configuration to 'libtool'. 809274c14cd6Smrgm4_defun([_LT_LANG_RC_CONFIG], 809374c14cd6Smrg[AC_REQUIRE([LT_PROG_RC])dnl 809474c14cd6SmrgAC_LANG_SAVE 809574c14cd6Smrg 809674c14cd6Smrg# Source file extension for RC test sources. 809774c14cd6Smrgac_ext=rc 809874c14cd6Smrg 809974c14cd6Smrg# Object file extension for compiled RC test sources. 810074c14cd6Smrgobjext=o 810174c14cd6Smrg_LT_TAGVAR(objext, $1)=$objext 810274c14cd6Smrg 810374c14cd6Smrg# Code to be used in simple compile tests 810474c14cd6Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 810574c14cd6Smrg 810674c14cd6Smrg# Code to be used in simple link tests 810721525869Smrglt_simple_link_test_code=$lt_simple_compile_test_code 810874c14cd6Smrg 810974c14cd6Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 811074c14cd6Smrg_LT_TAG_COMPILER 811174c14cd6Smrg 811274c14cd6Smrg# save warnings/boilerplate of simple test code 811374c14cd6Smrg_LT_COMPILER_BOILERPLATE 811474c14cd6Smrg_LT_LINKER_BOILERPLATE 811574c14cd6Smrg 811674c14cd6Smrg# Allow CC to be a program name with arguments. 811721525869Smrglt_save_CC=$CC 811874c14cd6Smrglt_save_CFLAGS=$CFLAGS 811974c14cd6Smrglt_save_GCC=$GCC 812074c14cd6SmrgGCC= 812174c14cd6SmrgCC=${RC-"windres"} 812274c14cd6SmrgCFLAGS= 812374c14cd6Smrgcompiler=$CC 812474c14cd6Smrg_LT_TAGVAR(compiler, $1)=$CC 812574c14cd6Smrg_LT_CC_BASENAME([$compiler]) 812674c14cd6Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 812774c14cd6Smrg 812874c14cd6Smrgif test -n "$compiler"; then 812974c14cd6Smrg : 813074c14cd6Smrg _LT_CONFIG($1) 813174c14cd6Smrgfi 813274c14cd6Smrg 813374c14cd6SmrgGCC=$lt_save_GCC 813474c14cd6SmrgAC_LANG_RESTORE 813574c14cd6SmrgCC=$lt_save_CC 813674c14cd6SmrgCFLAGS=$lt_save_CFLAGS 813774c14cd6Smrg])# _LT_LANG_RC_CONFIG 813874c14cd6Smrg 813974c14cd6Smrg 814074c14cd6Smrg# LT_PROG_GCJ 814174c14cd6Smrg# ----------- 814274c14cd6SmrgAC_DEFUN([LT_PROG_GCJ], 814374c14cd6Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8144e35772b2Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8145e35772b2Smrg [AC_CHECK_TOOL(GCJ, gcj,) 814621525869Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8147e35772b2Smrg AC_SUBST(GCJFLAGS)])])[]dnl 8148e35772b2Smrg]) 8149e35772b2Smrg 8150e35772b2Smrg# Old name: 8151e35772b2SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8152e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8153e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8154e35772b2Smrg 8155e35772b2Smrg 815674c14cd6Smrg# LT_PROG_GO 815774c14cd6Smrg# ---------- 815874c14cd6SmrgAC_DEFUN([LT_PROG_GO], 815974c14cd6Smrg[AC_CHECK_TOOL(GOC, gccgo,) 816074c14cd6Smrg]) 816174c14cd6Smrg 816274c14cd6Smrg 8163e35772b2Smrg# LT_PROG_RC 8164e35772b2Smrg# ---------- 8165e35772b2SmrgAC_DEFUN([LT_PROG_RC], 8166e35772b2Smrg[AC_CHECK_TOOL(RC, windres,) 8167e35772b2Smrg]) 8168e35772b2Smrg 8169e35772b2Smrg# Old name: 8170e35772b2SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8171e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8172e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8173e35772b2Smrg 8174e35772b2Smrg 8175e35772b2Smrg# _LT_DECL_EGREP 8176e35772b2Smrg# -------------- 8177e35772b2Smrg# If we don't have a new enough Autoconf to choose the best grep 8178e35772b2Smrg# available, choose the one first in the user's PATH. 8179e35772b2Smrgm4_defun([_LT_DECL_EGREP], 8180e35772b2Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8181e35772b2SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8182e35772b2Smrgtest -z "$GREP" && GREP=grep 8183e35772b2Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8184e35772b2Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8185e35772b2Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8186e35772b2Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8187e35772b2SmrgAC_SUBST([GREP]) 8188e35772b2Smrg]) 8189e35772b2Smrg 8190e35772b2Smrg 8191e35772b2Smrg# _LT_DECL_OBJDUMP 8192e35772b2Smrg# -------------- 8193e35772b2Smrg# If we don't have a new enough Autoconf to choose the best objdump 8194e35772b2Smrg# available, choose the one first in the user's PATH. 8195e35772b2Smrgm4_defun([_LT_DECL_OBJDUMP], 8196e35772b2Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8197e35772b2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8198e35772b2Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8199e35772b2SmrgAC_SUBST([OBJDUMP]) 8200e35772b2Smrg]) 8201e35772b2Smrg 820274c14cd6Smrg# _LT_DECL_DLLTOOL 820374c14cd6Smrg# ---------------- 820474c14cd6Smrg# Ensure DLLTOOL variable is set. 820574c14cd6Smrgm4_defun([_LT_DECL_DLLTOOL], 820674c14cd6Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 820774c14cd6Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 820874c14cd6Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 820974c14cd6SmrgAC_SUBST([DLLTOOL]) 821074c14cd6Smrg]) 8211e35772b2Smrg 8212e35772b2Smrg# _LT_DECL_SED 8213e35772b2Smrg# ------------ 8214e35772b2Smrg# Check for a fully-functional sed program, that truncates 8215e35772b2Smrg# as few characters as possible. Prefer GNU sed if found. 8216e35772b2Smrgm4_defun([_LT_DECL_SED], 8217e35772b2Smrg[AC_PROG_SED 8218e35772b2Smrgtest -z "$SED" && SED=sed 8219e35772b2SmrgXsed="$SED -e 1s/^X//" 8220e35772b2Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8221e35772b2Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8222e35772b2Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8223e35772b2Smrg])# _LT_DECL_SED 8224e35772b2Smrg 8225e35772b2Smrgm4_ifndef([AC_PROG_SED], [ 8226e35772b2Smrg# NOTE: This macro has been submitted for inclusion into # 8227e35772b2Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8228e35772b2Smrg# a released version of Autoconf we should remove this # 8229e35772b2Smrg# macro and use it instead. # 8230e35772b2Smrg 8231e35772b2Smrgm4_defun([AC_PROG_SED], 8232e35772b2Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8233e35772b2SmrgAC_CACHE_VAL(lt_cv_path_SED, 8234e35772b2Smrg[# Loop through the user's path and test for sed and gsed. 8235e35772b2Smrg# Then use that list of sed's as ones to test for truncation. 8236e35772b2Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8237e35772b2Smrgfor as_dir in $PATH 8238e35772b2Smrgdo 8239e35772b2Smrg IFS=$as_save_IFS 8240e35772b2Smrg test -z "$as_dir" && as_dir=. 8241e35772b2Smrg for lt_ac_prog in sed gsed; do 8242e35772b2Smrg for ac_exec_ext in '' $ac_executable_extensions; do 8243e35772b2Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8244e35772b2Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8245e35772b2Smrg fi 8246e35772b2Smrg done 8247e35772b2Smrg done 8248e35772b2Smrgdone 8249e35772b2SmrgIFS=$as_save_IFS 8250e35772b2Smrglt_ac_max=0 8251e35772b2Smrglt_ac_count=0 8252e35772b2Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8253e35772b2Smrg# along with /bin/sed that truncates output. 8254e35772b2Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 825521525869Smrg test ! -f "$lt_ac_sed" && continue 8256e35772b2Smrg cat /dev/null > conftest.in 8257e35772b2Smrg lt_ac_count=0 8258e35772b2Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8259e35772b2Smrg # Check for GNU sed and select it if it is found. 8260e35772b2Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8261e35772b2Smrg lt_cv_path_SED=$lt_ac_sed 8262e35772b2Smrg break 8263e35772b2Smrg fi 8264e35772b2Smrg while true; do 8265e35772b2Smrg cat conftest.in conftest.in >conftest.tmp 8266e35772b2Smrg mv conftest.tmp conftest.in 8267e35772b2Smrg cp conftest.in conftest.nl 8268e35772b2Smrg echo >>conftest.nl 8269e35772b2Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8270e35772b2Smrg cmp -s conftest.out conftest.nl || break 8271e35772b2Smrg # 10000 chars as input seems more than enough 827221525869Smrg test 10 -lt "$lt_ac_count" && break 8273e35772b2Smrg lt_ac_count=`expr $lt_ac_count + 1` 827421525869Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8275e35772b2Smrg lt_ac_max=$lt_ac_count 8276e35772b2Smrg lt_cv_path_SED=$lt_ac_sed 8277e35772b2Smrg fi 8278e35772b2Smrg done 8279e35772b2Smrgdone 8280e35772b2Smrg]) 8281e35772b2SmrgSED=$lt_cv_path_SED 8282e35772b2SmrgAC_SUBST([SED]) 8283e35772b2SmrgAC_MSG_RESULT([$SED]) 8284e35772b2Smrg])#AC_PROG_SED 8285e35772b2Smrg])#m4_ifndef 8286e35772b2Smrg 8287e35772b2Smrg# Old name: 8288e35772b2SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8289e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8290e35772b2Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8291e35772b2Smrg 8292e35772b2Smrg 8293e35772b2Smrg# _LT_CHECK_SHELL_FEATURES 8294e35772b2Smrg# ------------------------ 8295e35772b2Smrg# Find out whether the shell is Bourne or XSI compatible, 8296e35772b2Smrg# or has some other useful features. 8297e35772b2Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 829821525869Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8299e35772b2Smrg lt_unset=unset 8300e35772b2Smrgelse 8301e35772b2Smrg lt_unset=false 8302e35772b2Smrgfi 8303e35772b2Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8304e35772b2Smrg 8305e35772b2Smrg# test EBCDIC or ASCII 8306e35772b2Smrgcase `echo X|tr X '\101'` in 8307e35772b2Smrg A) # ASCII based system 8308e35772b2Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8309e35772b2Smrg lt_SP2NL='tr \040 \012' 8310e35772b2Smrg lt_NL2SP='tr \015\012 \040\040' 8311e35772b2Smrg ;; 8312e35772b2Smrg *) # EBCDIC based system 8313e35772b2Smrg lt_SP2NL='tr \100 \n' 8314e35772b2Smrg lt_NL2SP='tr \r\n \100\100' 8315e35772b2Smrg ;; 8316e35772b2Smrgesac 8317e35772b2Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8318e35772b2Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8319e35772b2Smrg])# _LT_CHECK_SHELL_FEATURES 8320e35772b2Smrg 8321e35772b2Smrg 832274c14cd6Smrg# _LT_PATH_CONVERSION_FUNCTIONS 832374c14cd6Smrg# ----------------------------- 832421525869Smrg# Determine what file name conversion functions should be used by 832574c14cd6Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 832674c14cd6Smrg# for certain cross-compile configurations and native mingw. 832774c14cd6Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 832874c14cd6Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 832974c14cd6SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 833074c14cd6SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 833174c14cd6SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 833274c14cd6Smrg[case $host in 833374c14cd6Smrg *-*-mingw* ) 833474c14cd6Smrg case $build in 833574c14cd6Smrg *-*-mingw* ) # actually msys 833674c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 833774c14cd6Smrg ;; 833874c14cd6Smrg *-*-cygwin* ) 833974c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 834074c14cd6Smrg ;; 834174c14cd6Smrg * ) # otherwise, assume *nix 834274c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 834374c14cd6Smrg ;; 834474c14cd6Smrg esac 8345e35772b2Smrg ;; 834674c14cd6Smrg *-*-cygwin* ) 834774c14cd6Smrg case $build in 834874c14cd6Smrg *-*-mingw* ) # actually msys 834974c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 835074c14cd6Smrg ;; 835174c14cd6Smrg *-*-cygwin* ) 835274c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 835374c14cd6Smrg ;; 835474c14cd6Smrg * ) # otherwise, assume *nix 835574c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 835674c14cd6Smrg ;; 835774c14cd6Smrg esac 8358e35772b2Smrg ;; 835974c14cd6Smrg * ) # unhandled hosts (and "normal" native builds) 836074c14cd6Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 836174c14cd6Smrg ;; 836274c14cd6Smrgesac 8363e35772b2Smrg]) 836474c14cd6Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 836574c14cd6SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 836674c14cd6Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 836774c14cd6Smrg [0], [convert $build file names to $host format])dnl 836874c14cd6Smrg 836974c14cd6SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 837074c14cd6SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 837174c14cd6Smrg[#assume ordinary cross tools, or native build. 837274c14cd6Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 837374c14cd6Smrgcase $host in 837474c14cd6Smrg *-*-mingw* ) 837574c14cd6Smrg case $build in 837674c14cd6Smrg *-*-mingw* ) # actually msys 837774c14cd6Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 837874c14cd6Smrg ;; 837974c14cd6Smrg esac 838074c14cd6Smrg ;; 838174c14cd6Smrgesac 838274c14cd6Smrg]) 838374c14cd6Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 838474c14cd6SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 838574c14cd6Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 838674c14cd6Smrg [0], [convert $build files to toolchain format])dnl 838774c14cd6Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 838872b676d7Smrg 8389e35772b2Smrg# Helper functions for option handling. -*- Autoconf -*- 8390e35772b2Smrg# 839121525869Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 839221525869Smrg# Foundation, Inc. 8393e35772b2Smrg# Written by Gary V. Vaughan, 2004 8394e35772b2Smrg# 8395e35772b2Smrg# This file is free software; the Free Software Foundation gives 8396e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8397e35772b2Smrg# modifications, as long as this notice is preserved. 839872b676d7Smrg 839921525869Smrg# serial 8 ltoptions.m4 840072b676d7Smrg 8401e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8402e35772b2SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 840372b676d7Smrg 840472b676d7Smrg 8405e35772b2Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8406e35772b2Smrg# ------------------------------------------ 8407e35772b2Smrgm4_define([_LT_MANGLE_OPTION], 8408e35772b2Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 840972b676d7Smrg 841072b676d7Smrg 8411e35772b2Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8412e35772b2Smrg# --------------------------------------- 8413e35772b2Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8414e35772b2Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8415e35772b2Smrg# saved as a flag. 8416e35772b2Smrgm4_define([_LT_SET_OPTION], 8417e35772b2Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8418e35772b2Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8419e35772b2Smrg _LT_MANGLE_DEFUN([$1], [$2]), 842021525869Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 8421e35772b2Smrg]) 8422e35772b2Smrg 8423e35772b2Smrg 8424e35772b2Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8425e35772b2Smrg# ------------------------------------------------------------ 8426e35772b2Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8427e35772b2Smrgm4_define([_LT_IF_OPTION], 8428e35772b2Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8429e35772b2Smrg 8430e35772b2Smrg 8431e35772b2Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8432e35772b2Smrg# ------------------------------------------------------- 8433e35772b2Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8434e35772b2Smrg# are set. 8435e35772b2Smrgm4_define([_LT_UNLESS_OPTIONS], 8436e35772b2Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8437e35772b2Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8438e35772b2Smrg [m4_define([$0_found])])])[]dnl 8439e35772b2Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8440e35772b2Smrg])[]dnl 8441e35772b2Smrg]) 8442e35772b2Smrg 844372b676d7Smrg 8444e35772b2Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8445e35772b2Smrg# ---------------------------------------- 8446e35772b2Smrg# OPTION-LIST is a space-separated list of Libtool options associated 8447e35772b2Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8448e35772b2Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8449e35772b2Smrg# the unknown option and exit. 8450e35772b2Smrgm4_defun([_LT_SET_OPTIONS], 8451e35772b2Smrg[# Set options 8452e35772b2Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8453e35772b2Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 8454e35772b2Smrg 8455e35772b2Smrgm4_if([$1],[LT_INIT],[ 8456e35772b2Smrg dnl 8457e35772b2Smrg dnl Simply set some default values (i.e off) if boolean options were not 8458e35772b2Smrg dnl specified: 8459e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8460e35772b2Smrg ]) 8461e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8462e35772b2Smrg ]) 8463e35772b2Smrg dnl 8464e35772b2Smrg dnl If no reference was made to various pairs of opposing options, then 8465e35772b2Smrg dnl we run the default mode handler for the pair. For example, if neither 846621525869Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8467e35772b2Smrg dnl archives by default: 8468e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8469e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8470e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8471e35772b2Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 847221525869Smrg [_LT_ENABLE_FAST_INSTALL]) 847321525869Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 847421525869Smrg [_LT_WITH_AIX_SONAME([aix])]) 8475e35772b2Smrg ]) 8476e35772b2Smrg])# _LT_SET_OPTIONS 847772b676d7Smrg 847872b676d7Smrg 847972b676d7Smrg 8480e35772b2Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8481e35772b2Smrg# ----------------------------------------- 8482e35772b2Smrgm4_define([_LT_MANGLE_DEFUN], 8483e35772b2Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 848472b676d7Smrg 848572b676d7Smrg 8486e35772b2Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8487e35772b2Smrg# ----------------------------------------------- 8488e35772b2Smrgm4_define([LT_OPTION_DEFINE], 8489e35772b2Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8490e35772b2Smrg])# LT_OPTION_DEFINE 849172b676d7Smrg 849272b676d7Smrg 8493e35772b2Smrg# dlopen 8494e35772b2Smrg# ------ 8495e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8496e35772b2Smrg]) 849772b676d7Smrg 8498e35772b2SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8499e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8500e35772b2SmrgAC_DIAGNOSE([obsolete], 8501e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 850221525869Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 8503e35772b2Smrg]) 850472b676d7Smrg 8505e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8506e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 850772b676d7Smrg 850872b676d7Smrg 8509e35772b2Smrg# win32-dll 8510e35772b2Smrg# --------- 8511e35772b2Smrg# Declare package support for building win32 dll's. 8512e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8513e35772b2Smrg[enable_win32_dll=yes 851472b676d7Smrg 8515e35772b2Smrgcase $host in 851674c14cd6Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8517e35772b2Smrg AC_CHECK_TOOL(AS, as, false) 8518e35772b2Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8519e35772b2Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8520e35772b2Smrg ;; 8521e35772b2Smrgesac 852272b676d7Smrg 8523e35772b2Smrgtest -z "$AS" && AS=as 852474c14cd6Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 852572b676d7Smrg 8526e35772b2Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 852774c14cd6Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 852872b676d7Smrg 8529e35772b2Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 853074c14cd6Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8531e35772b2Smrg])# win32-dll 853272b676d7Smrg 8533e35772b2SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8534e35772b2Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8535e35772b2Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8536e35772b2SmrgAC_DIAGNOSE([obsolete], 8537e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 853821525869Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 8539e35772b2Smrg]) 854072b676d7Smrg 8541e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8542e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 854372b676d7Smrg 8544e35772b2Smrg 8545e35772b2Smrg# _LT_ENABLE_SHARED([DEFAULT]) 8546e35772b2Smrg# ---------------------------- 854721525869Smrg# implement the --enable-shared flag, and supports the 'shared' and 854821525869Smrg# 'disable-shared' LT_INIT options. 854921525869Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8550e35772b2Smrgm4_define([_LT_ENABLE_SHARED], 8551e35772b2Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8552e35772b2SmrgAC_ARG_ENABLE([shared], 8553e35772b2Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8554e35772b2Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8555e35772b2Smrg [p=${PACKAGE-default} 8556e35772b2Smrg case $enableval in 8557e35772b2Smrg yes) enable_shared=yes ;; 8558e35772b2Smrg no) enable_shared=no ;; 8559e35772b2Smrg *) 8560e35772b2Smrg enable_shared=no 8561e35772b2Smrg # Look at the argument we got. We use all the common list separators. 856221525869Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8563e35772b2Smrg for pkg in $enableval; do 856421525869Smrg IFS=$lt_save_ifs 8565e35772b2Smrg if test "X$pkg" = "X$p"; then 8566e35772b2Smrg enable_shared=yes 8567e35772b2Smrg fi 8568e35772b2Smrg done 856921525869Smrg IFS=$lt_save_ifs 857072b676d7Smrg ;; 8571e35772b2Smrg esac], 8572e35772b2Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 857372b676d7Smrg 8574e35772b2Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8575e35772b2Smrg [Whether or not to build shared libraries]) 8576e35772b2Smrg])# _LT_ENABLE_SHARED 857772b676d7Smrg 8578e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8579e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 858072b676d7Smrg 8581e35772b2Smrg# Old names: 8582e35772b2SmrgAC_DEFUN([AC_ENABLE_SHARED], 8583e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8584e35772b2Smrg]) 8585e35772b2Smrg 8586e35772b2SmrgAC_DEFUN([AC_DISABLE_SHARED], 8587e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8588e35772b2Smrg]) 858972b676d7Smrg 8590e35772b2SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8591e35772b2SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 859272b676d7Smrg 8593e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8594e35772b2Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8595e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 859672b676d7Smrg 859772b676d7Smrg 859872b676d7Smrg 8599e35772b2Smrg# _LT_ENABLE_STATIC([DEFAULT]) 8600e35772b2Smrg# ---------------------------- 860121525869Smrg# implement the --enable-static flag, and support the 'static' and 860221525869Smrg# 'disable-static' LT_INIT options. 860321525869Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8604e35772b2Smrgm4_define([_LT_ENABLE_STATIC], 8605e35772b2Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8606e35772b2SmrgAC_ARG_ENABLE([static], 8607e35772b2Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8608e35772b2Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8609e35772b2Smrg [p=${PACKAGE-default} 8610e35772b2Smrg case $enableval in 8611e35772b2Smrg yes) enable_static=yes ;; 8612e35772b2Smrg no) enable_static=no ;; 8613e35772b2Smrg *) 8614e35772b2Smrg enable_static=no 8615e35772b2Smrg # Look at the argument we got. We use all the common list separators. 861621525869Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8617e35772b2Smrg for pkg in $enableval; do 861821525869Smrg IFS=$lt_save_ifs 8619e35772b2Smrg if test "X$pkg" = "X$p"; then 8620e35772b2Smrg enable_static=yes 8621e35772b2Smrg fi 8622e35772b2Smrg done 862321525869Smrg IFS=$lt_save_ifs 862472b676d7Smrg ;; 8625e35772b2Smrg esac], 8626e35772b2Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 862772b676d7Smrg 8628e35772b2Smrg _LT_DECL([build_old_libs], [enable_static], [0], 8629e35772b2Smrg [Whether or not to build static libraries]) 8630e35772b2Smrg])# _LT_ENABLE_STATIC 863172b676d7Smrg 8632e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8633e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 863472b676d7Smrg 8635e35772b2Smrg# Old names: 8636e35772b2SmrgAC_DEFUN([AC_ENABLE_STATIC], 8637e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8638e35772b2Smrg]) 863972b676d7Smrg 8640e35772b2SmrgAC_DEFUN([AC_DISABLE_STATIC], 8641e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8642e35772b2Smrg]) 864372b676d7Smrg 8644e35772b2SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8645e35772b2SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 864672b676d7Smrg 8647e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8648e35772b2Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8649e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 865072b676d7Smrg 865172b676d7Smrg 865272b676d7Smrg 8653e35772b2Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8654e35772b2Smrg# ---------------------------------- 865521525869Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 865621525869Smrg# and 'disable-fast-install' LT_INIT options. 865721525869Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8658e35772b2Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 8659e35772b2Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8660e35772b2SmrgAC_ARG_ENABLE([fast-install], 8661e35772b2Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8662e35772b2Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8663e35772b2Smrg [p=${PACKAGE-default} 8664e35772b2Smrg case $enableval in 8665e35772b2Smrg yes) enable_fast_install=yes ;; 8666e35772b2Smrg no) enable_fast_install=no ;; 8667e35772b2Smrg *) 8668e35772b2Smrg enable_fast_install=no 8669e35772b2Smrg # Look at the argument we got. We use all the common list separators. 867021525869Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8671e35772b2Smrg for pkg in $enableval; do 867221525869Smrg IFS=$lt_save_ifs 8673e35772b2Smrg if test "X$pkg" = "X$p"; then 8674e35772b2Smrg enable_fast_install=yes 86751fd23544Smrg fi 8676e35772b2Smrg done 867721525869Smrg IFS=$lt_save_ifs 867872b676d7Smrg ;; 8679e35772b2Smrg esac], 8680e35772b2Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 868172b676d7Smrg 8682e35772b2Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 8683e35772b2Smrg [Whether or not to optimize for fast installation])dnl 8684e35772b2Smrg])# _LT_ENABLE_FAST_INSTALL 868572b676d7Smrg 8686e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8687e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 868872b676d7Smrg 8689e35772b2Smrg# Old names: 8690e35772b2SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8691e35772b2Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8692e35772b2SmrgAC_DIAGNOSE([obsolete], 8693e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 869421525869Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 8695e35772b2Smrg]) 869672b676d7Smrg 8697e35772b2SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8698e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8699e35772b2SmrgAC_DIAGNOSE([obsolete], 8700e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 870121525869Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 8702e35772b2Smrg]) 870372b676d7Smrg 8704e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8705e35772b2Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8706e35772b2Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 870772b676d7Smrg 870872b676d7Smrg 870921525869Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 871021525869Smrg# ---------------------------------- 871121525869Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 871221525869Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 871321525869Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 871421525869Smrgm4_define([_LT_WITH_AIX_SONAME], 871521525869Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 871621525869Smrgshared_archive_member_spec= 871721525869Smrgcase $host,$enable_shared in 871821525869Smrgpower*-*-aix[[5-9]]*,yes) 871921525869Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 872021525869Smrg AC_ARG_WITH([aix-soname], 872121525869Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 872221525869Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 872321525869Smrg [case $withval in 872421525869Smrg aix|svr4|both) 872521525869Smrg ;; 872621525869Smrg *) 872721525869Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 872821525869Smrg ;; 872921525869Smrg esac 873021525869Smrg lt_cv_with_aix_soname=$with_aix_soname], 873121525869Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 873221525869Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 873321525869Smrg with_aix_soname=$lt_cv_with_aix_soname]) 873421525869Smrg AC_MSG_RESULT([$with_aix_soname]) 873521525869Smrg if test aix != "$with_aix_soname"; then 873621525869Smrg # For the AIX way of multilib, we name the shared archive member 873721525869Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 873821525869Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 873921525869Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 874021525869Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 874121525869Smrg if test 64 = "${OBJECT_MODE-32}"; then 874221525869Smrg shared_archive_member_spec=shr_64 874321525869Smrg else 874421525869Smrg shared_archive_member_spec=shr 874521525869Smrg fi 874621525869Smrg fi 874721525869Smrg ;; 874821525869Smrg*) 874921525869Smrg with_aix_soname=aix 875021525869Smrg ;; 875121525869Smrgesac 875221525869Smrg 875321525869Smrg_LT_DECL([], [shared_archive_member_spec], [0], 875421525869Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 875521525869Smrg])# _LT_WITH_AIX_SONAME 875621525869Smrg 875721525869SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 875821525869SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 875921525869SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 876021525869Smrg 876121525869Smrg 8762e35772b2Smrg# _LT_WITH_PIC([MODE]) 8763e35772b2Smrg# -------------------- 876421525869Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8765e35772b2Smrg# LT_INIT options. 876621525869Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8767e35772b2Smrgm4_define([_LT_WITH_PIC], 8768e35772b2Smrg[AC_ARG_WITH([pic], 876974c14cd6Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8770e35772b2Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 877174c14cd6Smrg [lt_p=${PACKAGE-default} 877274c14cd6Smrg case $withval in 877374c14cd6Smrg yes|no) pic_mode=$withval ;; 877474c14cd6Smrg *) 877574c14cd6Smrg pic_mode=default 877674c14cd6Smrg # Look at the argument we got. We use all the common list separators. 877721525869Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 877874c14cd6Smrg for lt_pkg in $withval; do 877921525869Smrg IFS=$lt_save_ifs 878074c14cd6Smrg if test "X$lt_pkg" = "X$lt_p"; then 878174c14cd6Smrg pic_mode=yes 878274c14cd6Smrg fi 878374c14cd6Smrg done 878421525869Smrg IFS=$lt_save_ifs 878574c14cd6Smrg ;; 878674c14cd6Smrg esac], 878721525869Smrg [pic_mode=m4_default([$1], [default])]) 878872b676d7Smrg 8789e35772b2Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8790e35772b2Smrg])# _LT_WITH_PIC 879172b676d7Smrg 8792e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8793e35772b2SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8794e35772b2Smrg 8795e35772b2Smrg# Old name: 8796e35772b2SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8797e35772b2Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8798e35772b2SmrgAC_DIAGNOSE([obsolete], 8799e35772b2Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 880021525869Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 880172b676d7Smrg]) 880272b676d7Smrg 8803e35772b2Smrgdnl aclocal-1.4 backwards compatibility: 8804e35772b2Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8805e35772b2Smrg 8806e35772b2Smrg 8807e35772b2Smrgm4_define([_LTDL_MODE], []) 8808e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8809e35772b2Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8810e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8811e35772b2Smrg [m4_define([_LTDL_MODE], [recursive])]) 8812e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8813e35772b2Smrg [m4_define([_LTDL_MODE], [subproject])]) 8814e35772b2Smrg 8815e35772b2Smrgm4_define([_LTDL_TYPE], []) 8816e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8817e35772b2Smrg [m4_define([_LTDL_TYPE], [installable])]) 8818e35772b2SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8819e35772b2Smrg [m4_define([_LTDL_TYPE], [convenience])]) 8820e35772b2Smrg 8821e35772b2Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 882272b676d7Smrg# 882321525869Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 882421525869Smrg# Foundation, Inc. 8825e35772b2Smrg# Written by Gary V. Vaughan, 2004 882672b676d7Smrg# 8827e35772b2Smrg# This file is free software; the Free Software Foundation gives 8828e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8829e35772b2Smrg# modifications, as long as this notice is preserved. 883072b676d7Smrg 8831e35772b2Smrg# serial 6 ltsugar.m4 883272b676d7Smrg 8833e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8834e35772b2SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 883572b676d7Smrg 883672b676d7Smrg 8837e35772b2Smrg# lt_join(SEP, ARG1, [ARG2...]) 8838e35772b2Smrg# ----------------------------- 8839e35772b2Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8840e35772b2Smrg# associated separator. 8841e35772b2Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8842e35772b2Smrg# versions in m4sugar had bugs. 8843e35772b2Smrgm4_define([lt_join], 8844e35772b2Smrg[m4_if([$#], [1], [], 8845e35772b2Smrg [$#], [2], [[$2]], 8846e35772b2Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8847e35772b2Smrgm4_define([_lt_join], 8848e35772b2Smrg[m4_if([$#$2], [2], [], 8849e35772b2Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8850e35772b2Smrg 8851e35772b2Smrg 8852e35772b2Smrg# lt_car(LIST) 8853e35772b2Smrg# lt_cdr(LIST) 8854e35772b2Smrg# ------------ 8855e35772b2Smrg# Manipulate m4 lists. 8856e35772b2Smrg# These macros are necessary as long as will still need to support 885721525869Smrg# Autoconf-2.59, which quotes differently. 8858e35772b2Smrgm4_define([lt_car], [[$1]]) 8859e35772b2Smrgm4_define([lt_cdr], 8860e35772b2Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8861e35772b2Smrg [$#], 1, [], 8862e35772b2Smrg [m4_dquote(m4_shift($@))])]) 8863e35772b2Smrgm4_define([lt_unquote], $1) 8864e35772b2Smrg 8865e35772b2Smrg 8866e35772b2Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8867e35772b2Smrg# ------------------------------------------ 886821525869Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8869e35772b2Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8870e35772b2Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8871e35772b2Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8872e35772b2Smrg# than defined and empty). 8873e35772b2Smrg# 8874e35772b2Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8875e35772b2Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8876e35772b2Smrgm4_define([lt_append], 8877e35772b2Smrg[m4_define([$1], 8878e35772b2Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8879e35772b2Smrg 8880e35772b2Smrg 8881e35772b2Smrg 8882e35772b2Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8883e35772b2Smrg# ---------------------------------------------------------- 8884e35772b2Smrg# Produce a SEP delimited list of all paired combinations of elements of 8885e35772b2Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8886e35772b2Smrg# has the form PREFIXmINFIXSUFFIXn. 8887e35772b2Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8888e35772b2Smrgm4_define([lt_combine], 8889e35772b2Smrg[m4_if(m4_eval([$# > 3]), [1], 8890e35772b2Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8891e35772b2Smrg[[m4_foreach([_Lt_prefix], [$2], 8892e35772b2Smrg [m4_foreach([_Lt_suffix], 8893e35772b2Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8894e35772b2Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8895e35772b2Smrg 8896e35772b2Smrg 8897e35772b2Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8898e35772b2Smrg# ----------------------------------------------------------------------- 8899e35772b2Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8900e35772b2Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8901e35772b2Smrgm4_define([lt_if_append_uniq], 8902e35772b2Smrg[m4_ifdef([$1], 8903e35772b2Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8904e35772b2Smrg [lt_append([$1], [$2], [$3])$4], 8905e35772b2Smrg [$5])], 8906e35772b2Smrg [lt_append([$1], [$2], [$3])$4])]) 8907e35772b2Smrg 8908e35772b2Smrg 8909e35772b2Smrg# lt_dict_add(DICT, KEY, VALUE) 8910e35772b2Smrg# ----------------------------- 8911e35772b2Smrgm4_define([lt_dict_add], 8912e35772b2Smrg[m4_define([$1($2)], [$3])]) 891372b676d7Smrg 891472b676d7Smrg 8915e35772b2Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8916e35772b2Smrg# -------------------------------------------- 8917e35772b2Smrgm4_define([lt_dict_add_subkey], 8918e35772b2Smrg[m4_define([$1($2:$3)], [$4])]) 891972b676d7Smrg 892072b676d7Smrg 8921e35772b2Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8922e35772b2Smrg# ---------------------------------- 8923e35772b2Smrgm4_define([lt_dict_fetch], 8924e35772b2Smrg[m4_ifval([$3], 8925e35772b2Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8926e35772b2Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8927e35772b2Smrg 892872b676d7Smrg 8929e35772b2Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8930e35772b2Smrg# ----------------------------------------------------------------- 8931e35772b2Smrgm4_define([lt_if_dict_fetch], 8932e35772b2Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8933e35772b2Smrg [$5], 8934e35772b2Smrg [$6])]) 8935e35772b2Smrg 8936e35772b2Smrg 8937e35772b2Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8938e35772b2Smrg# -------------------------------------------------------------- 8939e35772b2Smrgm4_define([lt_dict_filter], 8940e35772b2Smrg[m4_if([$5], [], [], 8941e35772b2Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8942e35772b2Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8943e35772b2Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 894472b676d7Smrg]) 894572b676d7Smrg 8946e35772b2Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8947e35772b2Smrg# 894821525869Smrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 8949e35772b2Smrg# Written by Scott James Remnant, 2004 8950e35772b2Smrg# 8951e35772b2Smrg# This file is free software; the Free Software Foundation gives 8952e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8953e35772b2Smrg# modifications, as long as this notice is preserved. 89541fd23544Smrg 895574c14cd6Smrg# @configure_input@ 89561fd23544Smrg 895721525869Smrg# serial 4179 ltversion.m4 8958e35772b2Smrg# This file is part of GNU Libtool 89591fd23544Smrg 896021525869Smrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 896121525869Smrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 89621fd23544Smrg 8963e35772b2SmrgAC_DEFUN([LTVERSION_VERSION], 896421525869Smrg[macro_version='2.4.6' 896521525869Smrgmacro_revision='2.4.6' 8966e35772b2Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8967e35772b2Smrg_LT_DECL(, macro_revision, 0) 896872b676d7Smrg]) 896972b676d7Smrg 8970e35772b2Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8971e35772b2Smrg# 897221525869Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 897321525869Smrg# Foundation, Inc. 8974e35772b2Smrg# Written by Scott James Remnant, 2004. 8975e35772b2Smrg# 8976e35772b2Smrg# This file is free software; the Free Software Foundation gives 8977e35772b2Smrg# unlimited permission to copy and/or distribute it, with or without 8978e35772b2Smrg# modifications, as long as this notice is preserved. 8979e35772b2Smrg 898074c14cd6Smrg# serial 5 lt~obsolete.m4 8981e35772b2Smrg 8982e35772b2Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8983e35772b2Smrg# 898421525869Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8985e35772b2Smrg# which have later been changed to m4_define as they aren't part of the 8986e35772b2Smrg# exported API, or moved to Autoconf or Automake where they belong. 8987e35772b2Smrg# 8988e35772b2Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8989e35772b2Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8990e35772b2Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8991e35772b2Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8992e35772b2Smrg# and doesn't know about Autoconf macros at all.) 8993e35772b2Smrg# 8994e35772b2Smrg# So we provide this file, which has a silly filename so it's always 8995e35772b2Smrg# included after everything else. This provides aclocal with the 8996e35772b2Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8997e35772b2Smrg# because those macros already exist, or will be overwritten later. 899821525869Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8999e35772b2Smrg# 9000e35772b2Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9001e35772b2Smrg# Yes, that means every name once taken will need to remain here until 9002e35772b2Smrg# we give up compatibility with versions before 1.7, at which point 9003e35772b2Smrg# we need to keep only those names which we still refer to. 9004e35772b2Smrg 9005e35772b2Smrg# This is to help aclocal find these macros, as it can't see m4_define. 9006e35772b2SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9007e35772b2Smrg 9008e35772b2Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9009e35772b2Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9010e35772b2Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9011e35772b2Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9012e35772b2Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9013e35772b2Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9014e35772b2Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9015e35772b2Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9016e35772b2Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9017e35772b2Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9018e35772b2Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9019e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9020e35772b2Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9021e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9022e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9023e35772b2Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9024e35772b2Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9025e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9026e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9027e35772b2Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9028e35772b2Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9029e35772b2Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9030e35772b2Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9031e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9032e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9033e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9034e35772b2Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9035e35772b2Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9036e35772b2Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9037e35772b2Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9038e35772b2Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9039e35772b2Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9040e35772b2Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9041e35772b2Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9042e35772b2Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9043e35772b2Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9044e35772b2Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9045e35772b2Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9046e35772b2Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9047e35772b2Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9048e35772b2Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9049e35772b2Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9050e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9051e35772b2Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9052e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9053e35772b2Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9054e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9055e35772b2Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9056e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9057e35772b2Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9058e35772b2Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9059e35772b2Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9060e35772b2Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9061e35772b2Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 906274c14cd6Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 906374c14cd6Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 906474c14cd6Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 906574c14cd6Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 906674c14cd6Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 906774c14cd6Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 906874c14cd6Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9069e35772b2Smrg 907074fcc364Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 907174fcc364Smrgdnl serial 11 (pkg-config-0.29.1) 907274fcc364Smrgdnl 907374fcc364Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 907474fcc364Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 907574fcc364Smrgdnl 907674fcc364Smrgdnl This program is free software; you can redistribute it and/or modify 907774fcc364Smrgdnl it under the terms of the GNU General Public License as published by 907874fcc364Smrgdnl the Free Software Foundation; either version 2 of the License, or 907974fcc364Smrgdnl (at your option) any later version. 908074fcc364Smrgdnl 908174fcc364Smrgdnl This program is distributed in the hope that it will be useful, but 908274fcc364Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 908374fcc364Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 908474fcc364Smrgdnl General Public License for more details. 908574fcc364Smrgdnl 908674fcc364Smrgdnl You should have received a copy of the GNU General Public License 908774fcc364Smrgdnl along with this program; if not, write to the Free Software 908874fcc364Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 908974fcc364Smrgdnl 02111-1307, USA. 909074fcc364Smrgdnl 909174fcc364Smrgdnl As a special exception to the GNU General Public License, if you 909274fcc364Smrgdnl distribute this file as part of a program that contains a 909374fcc364Smrgdnl configuration script generated by Autoconf, you may include it under 909474fcc364Smrgdnl the same distribution terms that you use for the rest of that 909574fcc364Smrgdnl program. 909674fcc364Smrg 909774fcc364Smrgdnl PKG_PREREQ(MIN-VERSION) 909874fcc364Smrgdnl ----------------------- 909974fcc364Smrgdnl Since: 0.29 910074fcc364Smrgdnl 910174fcc364Smrgdnl Verify that the version of the pkg-config macros are at least 910274fcc364Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 910374fcc364Smrgdnl installed version of pkg-config, this checks the developer's version 910474fcc364Smrgdnl of pkg.m4 when generating configure. 910574fcc364Smrgdnl 910674fcc364Smrgdnl To ensure that this macro is defined, also add: 910774fcc364Smrgdnl m4_ifndef([PKG_PREREQ], 910874fcc364Smrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 910974fcc364Smrgdnl 911074fcc364Smrgdnl See the "Since" comment for each macro you use to see what version 911174fcc364Smrgdnl of the macros you require. 911274fcc364Smrgm4_defun([PKG_PREREQ], 911374fcc364Smrg[m4_define([PKG_MACROS_VERSION], [0.29.1]) 911474fcc364Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 911574fcc364Smrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 911674fcc364Smrg])dnl PKG_PREREQ 911774fcc364Smrg 911874fcc364Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 911974fcc364Smrgdnl ---------------------------------- 912074fcc364Smrgdnl Since: 0.16 912174fcc364Smrgdnl 912274fcc364Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 912374fcc364Smrgdnl first found in the path. Checks that the version of pkg-config found 912474fcc364Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 912574fcc364Smrgdnl used since that's the first version where most current features of 912674fcc364Smrgdnl pkg-config existed. 912772b676d7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 912872b676d7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 912921525869Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 913021525869Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 913174c14cd6SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 913274c14cd6SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 913374c14cd6SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 913474c14cd6Smrg 913572b676d7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 913672b676d7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 913772b676d7Smrgfi 913872b676d7Smrgif test -n "$PKG_CONFIG"; then 913972b676d7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 914072b676d7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 914172b676d7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 914272b676d7Smrg AC_MSG_RESULT([yes]) 914372b676d7Smrg else 914472b676d7Smrg AC_MSG_RESULT([no]) 914572b676d7Smrg PKG_CONFIG="" 914672b676d7Smrg fi 914772b676d7Smrgfi[]dnl 914874fcc364Smrg])dnl PKG_PROG_PKG_CONFIG 914972b676d7Smrg 915074fcc364Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 915174fcc364Smrgdnl ------------------------------------------------------------------- 915274fcc364Smrgdnl Since: 0.18 915374fcc364Smrgdnl 915474fcc364Smrgdnl Check to see whether a particular set of modules exists. Similar to 915574fcc364Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 915674fcc364Smrgdnl 915774fcc364Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 915874fcc364Smrgdnl only at the first occurence in configure.ac, so if the first place 915974fcc364Smrgdnl it's called might be skipped (such as if it is within an "if", you 916074fcc364Smrgdnl have to call PKG_CHECK_EXISTS manually 916172b676d7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 916272b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 916372b676d7Smrgif test -n "$PKG_CONFIG" && \ 916472b676d7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 916574c14cd6Smrg m4_default([$2], [:]) 916672b676d7Smrgm4_ifvaln([$3], [else 916772b676d7Smrg $3])dnl 916872b676d7Smrgfi]) 916972b676d7Smrg 917074fcc364Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 917174fcc364Smrgdnl --------------------------------------------- 917274fcc364Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 917374fcc364Smrgdnl pkg_failed based on the result. 917472b676d7Smrgm4_define([_PKG_CONFIG], 91751fd23544Smrg[if test -n "$$1"; then 91761fd23544Smrg pkg_cv_[]$1="$$1" 91771fd23544Smrg elif test -n "$PKG_CONFIG"; then 91781fd23544Smrg PKG_CHECK_EXISTS([$3], 917921525869Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 918021525869Smrg test "x$?" != "x0" && pkg_failed=yes ], 91811fd23544Smrg [pkg_failed=yes]) 91821fd23544Smrg else 91831fd23544Smrg pkg_failed=untried 918472b676d7Smrgfi[]dnl 918574fcc364Smrg])dnl _PKG_CONFIG 918672b676d7Smrg 918774fcc364Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED 918874fcc364Smrgdnl --------------------------- 918974fcc364Smrgdnl Internal check to see if pkg-config supports short errors. 919072b676d7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 919172b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 919272b676d7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 919372b676d7Smrg _pkg_short_errors_supported=yes 919472b676d7Smrgelse 919572b676d7Smrg _pkg_short_errors_supported=no 919672b676d7Smrgfi[]dnl 919774fcc364Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 919872b676d7Smrg 919972b676d7Smrg 920074fcc364Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 920174fcc364Smrgdnl [ACTION-IF-NOT-FOUND]) 920274fcc364Smrgdnl -------------------------------------------------------------- 920374fcc364Smrgdnl Since: 0.4.0 920474fcc364Smrgdnl 920574fcc364Smrgdnl Note that if there is a possibility the first call to 920674fcc364Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 920774fcc364Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 920872b676d7SmrgAC_DEFUN([PKG_CHECK_MODULES], 920972b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 921072b676d7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 921172b676d7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 921272b676d7Smrg 921372b676d7Smrgpkg_failed=no 921472b676d7SmrgAC_MSG_CHECKING([for $1]) 921572b676d7Smrg 921672b676d7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 921772b676d7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 921872b676d7Smrg 921972b676d7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 922072b676d7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 922172b676d7SmrgSee the pkg-config man page for more details.]) 922272b676d7Smrg 922372b676d7Smrgif test $pkg_failed = yes; then 922474c14cd6Smrg AC_MSG_RESULT([no]) 922572b676d7Smrg _PKG_SHORT_ERRORS_SUPPORTED 922672b676d7Smrg if test $_pkg_short_errors_supported = yes; then 922721525869Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 922872b676d7Smrg else 922921525869Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 923072b676d7Smrg fi 923172b676d7Smrg # Put the nasty error message in config.log where it belongs 923272b676d7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 923372b676d7Smrg 923474c14cd6Smrg m4_default([$4], [AC_MSG_ERROR( 923572b676d7Smrg[Package requirements ($2) were not met: 923672b676d7Smrg 923772b676d7Smrg$$1_PKG_ERRORS 923872b676d7Smrg 923972b676d7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 924072b676d7Smrginstalled software in a non-standard prefix. 924172b676d7Smrg 924221525869Smrg_PKG_TEXT])[]dnl 924374c14cd6Smrg ]) 924472b676d7Smrgelif test $pkg_failed = untried; then 924574c14cd6Smrg AC_MSG_RESULT([no]) 924674c14cd6Smrg m4_default([$4], [AC_MSG_FAILURE( 924772b676d7Smrg[The pkg-config script could not be found or is too old. Make sure it 924872b676d7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 924972b676d7Smrgpath to pkg-config. 925072b676d7Smrg 925172b676d7Smrg_PKG_TEXT 925272b676d7Smrg 925321525869SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 925474c14cd6Smrg ]) 925572b676d7Smrgelse 925672b676d7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 925772b676d7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 925872b676d7Smrg AC_MSG_RESULT([yes]) 925974c14cd6Smrg $3 926072b676d7Smrgfi[]dnl 926174fcc364Smrg])dnl PKG_CHECK_MODULES 926272b676d7Smrg 926321525869Smrg 926474fcc364Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 926574fcc364Smrgdnl [ACTION-IF-NOT-FOUND]) 926674fcc364Smrgdnl --------------------------------------------------------------------- 926774fcc364Smrgdnl Since: 0.29 926874fcc364Smrgdnl 926974fcc364Smrgdnl Checks for existence of MODULES and gathers its build flags with 927074fcc364Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 927174fcc364Smrgdnl and VARIABLE-PREFIX_LIBS from --libs. 927274fcc364Smrgdnl 927374fcc364Smrgdnl Note that if there is a possibility the first call to 927474fcc364Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 927574fcc364Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 927674fcc364Smrgdnl configure.ac. 927774fcc364SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 927874fcc364Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 927974fcc364Smrg_save_PKG_CONFIG=$PKG_CONFIG 928074fcc364SmrgPKG_CONFIG="$PKG_CONFIG --static" 928174fcc364SmrgPKG_CHECK_MODULES($@) 928274fcc364SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 928374fcc364Smrg])dnl PKG_CHECK_MODULES_STATIC 928474fcc364Smrg 928574fcc364Smrg 928674fcc364Smrgdnl PKG_INSTALLDIR([DIRECTORY]) 928774fcc364Smrgdnl ------------------------- 928874fcc364Smrgdnl Since: 0.27 928974fcc364Smrgdnl 929074fcc364Smrgdnl Substitutes the variable pkgconfigdir as the location where a module 929174fcc364Smrgdnl should install pkg-config .pc files. By default the directory is 929274fcc364Smrgdnl $libdir/pkgconfig, but the default can be changed by passing 929374fcc364Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 929474fcc364Smrgdnl parameter. 929521525869SmrgAC_DEFUN([PKG_INSTALLDIR], 929621525869Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 929721525869Smrgm4_pushdef([pkg_description], 929821525869Smrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 929921525869SmrgAC_ARG_WITH([pkgconfigdir], 930021525869Smrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 930121525869Smrg [with_pkgconfigdir=]pkg_default) 930221525869SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 930321525869Smrgm4_popdef([pkg_default]) 930421525869Smrgm4_popdef([pkg_description]) 930574fcc364Smrg])dnl PKG_INSTALLDIR 930621525869Smrg 930721525869Smrg 930874fcc364Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 930974fcc364Smrgdnl -------------------------------- 931074fcc364Smrgdnl Since: 0.27 931174fcc364Smrgdnl 931274fcc364Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 931374fcc364Smrgdnl module should install arch-independent pkg-config .pc files. By 931474fcc364Smrgdnl default the directory is $datadir/pkgconfig, but the default can be 931574fcc364Smrgdnl changed by passing DIRECTORY. The user can override through the 931674fcc364Smrgdnl --with-noarch-pkgconfigdir parameter. 931721525869SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 931821525869Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 931921525869Smrgm4_pushdef([pkg_description], 932021525869Smrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 932121525869SmrgAC_ARG_WITH([noarch-pkgconfigdir], 932221525869Smrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 932321525869Smrg [with_noarch_pkgconfigdir=]pkg_default) 932421525869SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 932521525869Smrgm4_popdef([pkg_default]) 932621525869Smrgm4_popdef([pkg_description]) 932774fcc364Smrg])dnl PKG_NOARCH_INSTALLDIR 932821525869Smrg 932921525869Smrg 933074fcc364Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 933174fcc364Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 933274fcc364Smrgdnl ------------------------------------------- 933374fcc364Smrgdnl Since: 0.28 933474fcc364Smrgdnl 933574fcc364Smrgdnl Retrieves the value of the pkg-config variable for the given module. 933621525869SmrgAC_DEFUN([PKG_CHECK_VAR], 933721525869Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 933821525869SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 933921525869Smrg 934021525869Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 934121525869SmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 934221525869Smrg 934321525869SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 934474fcc364Smrg])dnl PKG_CHECK_VAR 934521525869Smrg 9346e47418d9Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 934772b676d7Smrgdnl 934874c14cd6Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 934921525869Smrgdnl 935072b676d7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9351e35772b2Smrgdnl copy of this software and associated documentation files (the "Software"), 9352e35772b2Smrgdnl to deal in the Software without restriction, including without limitation 9353e35772b2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9354e35772b2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9355e35772b2Smrgdnl Software is furnished to do so, subject to the following conditions: 935672b676d7Smrgdnl 9357e35772b2Smrgdnl The above copyright notice and this permission notice (including the next 9358e35772b2Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9359e35772b2Smrgdnl Software. 936072b676d7Smrgdnl 9361e35772b2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9362e35772b2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9363e35772b2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9364e35772b2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9365e35772b2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9366e35772b2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9367e35772b2Smrgdnl DEALINGS IN THE SOFTWARE. 936872b676d7Smrg 936972b676d7Smrg# XORG_MACROS_VERSION(required-version) 937072b676d7Smrg# ------------------------------------- 937172b676d7Smrg# Minimum version: 1.1.0 937272b676d7Smrg# 937372b676d7Smrg# If you're using a macro added in Version 1.1 or newer, include this in 937472b676d7Smrg# your configure.ac with the minimum required version, such as: 937572b676d7Smrg# XORG_MACROS_VERSION(1.1) 937672b676d7Smrg# 9377e35772b2Smrg# To ensure that this macro is defined, also add: 9378e35772b2Smrg# m4_ifndef([XORG_MACROS_VERSION], 9379e35772b2Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 938072b676d7Smrg# 938172b676d7Smrg# 938221525869Smrg# See the "minimum version" comment for each macro you use to see what 938372b676d7Smrg# version you require. 9384e35772b2Smrgm4_defun([XORG_MACROS_VERSION],[ 938521525869Smrgm4_define([vers_have], [1.19.0]) 9386e35772b2Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9387e35772b2Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9388e35772b2Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9389e35772b2Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9390e35772b2Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9391e35772b2Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9392e35772b2Smrgm4_undefine([vers_have]) 9393e35772b2Smrgm4_undefine([maj_have]) 9394e35772b2Smrgm4_undefine([maj_needed]) 939572b676d7Smrg]) # XORG_MACROS_VERSION 939672b676d7Smrg 939772b676d7Smrg# XORG_PROG_RAWCPP() 939872b676d7Smrg# ------------------ 939972b676d7Smrg# Minimum version: 1.0.0 940072b676d7Smrg# 940172b676d7Smrg# Find cpp program and necessary flags for use in pre-processing text files 940272b676d7Smrg# such as man pages and config files 940372b676d7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 940472b676d7SmrgAC_REQUIRE([AC_PROG_CPP]) 940521525869SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 940672b676d7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 940772b676d7Smrg 940872b676d7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 940972b676d7Smrg# which is not the best choice for supporting other OS'es, but covers most 941072b676d7Smrg# of the ones we need for now. 941172b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 941274c14cd6SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 941372b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 941472b676d7Smrg AC_MSG_RESULT([no]) 941572b676d7Smrgelse 941672b676d7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 941772b676d7Smrg RAWCPPFLAGS=-undef 941872b676d7Smrg AC_MSG_RESULT([yes]) 9419e47418d9Smrg # under Cygwin unix is still defined even with -undef 9420e47418d9Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9421e47418d9Smrg RAWCPPFLAGS="-undef -ansi" 9422e47418d9Smrg AC_MSG_RESULT([yes, with -ansi]) 942372b676d7Smrg else 942472b676d7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 942572b676d7Smrg fi 942672b676d7Smrgfi 942772b676d7Smrgrm -f conftest.$ac_ext 942872b676d7Smrg 942972b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 943074c14cd6SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 943172b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 943272b676d7Smrg AC_MSG_RESULT([no]) 943372b676d7Smrgelse 943472b676d7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 943521525869Smrg TRADITIONALCPPFLAGS="-traditional" 943672b676d7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 943772b676d7Smrg AC_MSG_RESULT([yes]) 943872b676d7Smrg else 943972b676d7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 944072b676d7Smrg fi 944172b676d7Smrgfi 944272b676d7Smrgrm -f conftest.$ac_ext 944372b676d7SmrgAC_SUBST(RAWCPPFLAGS) 944421525869SmrgAC_SUBST(TRADITIONALCPPFLAGS) 944572b676d7Smrg]) # XORG_PROG_RAWCPP 944672b676d7Smrg 944772b676d7Smrg# XORG_MANPAGE_SECTIONS() 944872b676d7Smrg# ----------------------- 944972b676d7Smrg# Minimum version: 1.0.0 945072b676d7Smrg# 945172b676d7Smrg# Determine which sections man pages go in for the different man page types 945272b676d7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 945372b676d7Smrg# Not sure if there's any better way than just hardcoding by OS name. 945472b676d7Smrg# Override default settings by setting environment variables 9455e35772b2Smrg# Added MAN_SUBSTS in version 1.8 9456e35772b2Smrg# Added AC_PROG_SED in version 1.8 945772b676d7Smrg 945872b676d7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 945972b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9460e35772b2SmrgAC_REQUIRE([AC_PROG_SED]) 946172b676d7Smrg 946272b676d7Smrgif test x$APP_MAN_SUFFIX = x ; then 946372b676d7Smrg APP_MAN_SUFFIX=1 946472b676d7Smrgfi 946572b676d7Smrgif test x$APP_MAN_DIR = x ; then 946672b676d7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 946772b676d7Smrgfi 946872b676d7Smrg 946972b676d7Smrgif test x$LIB_MAN_SUFFIX = x ; then 947072b676d7Smrg LIB_MAN_SUFFIX=3 947172b676d7Smrgfi 947272b676d7Smrgif test x$LIB_MAN_DIR = x ; then 947372b676d7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 947472b676d7Smrgfi 947572b676d7Smrg 947672b676d7Smrgif test x$FILE_MAN_SUFFIX = x ; then 947772b676d7Smrg case $host_os in 947872b676d7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 947972b676d7Smrg *) FILE_MAN_SUFFIX=5 ;; 948072b676d7Smrg esac 948172b676d7Smrgfi 948272b676d7Smrgif test x$FILE_MAN_DIR = x ; then 948372b676d7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 948472b676d7Smrgfi 948572b676d7Smrg 948672b676d7Smrgif test x$MISC_MAN_SUFFIX = x ; then 948772b676d7Smrg case $host_os in 948872b676d7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 948972b676d7Smrg *) MISC_MAN_SUFFIX=7 ;; 949072b676d7Smrg esac 949172b676d7Smrgfi 949272b676d7Smrgif test x$MISC_MAN_DIR = x ; then 949372b676d7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 949472b676d7Smrgfi 949572b676d7Smrg 949672b676d7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 949772b676d7Smrg case $host_os in 949872b676d7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 949972b676d7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 950072b676d7Smrg esac 950172b676d7Smrgfi 950272b676d7Smrgif test x$DRIVER_MAN_DIR = x ; then 950372b676d7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 950472b676d7Smrgfi 950572b676d7Smrg 950672b676d7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 950772b676d7Smrg case $host_os in 950872b676d7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 950972b676d7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 951072b676d7Smrg esac 951172b676d7Smrgfi 951272b676d7Smrgif test x$ADMIN_MAN_DIR = x ; then 951372b676d7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 951472b676d7Smrgfi 951572b676d7Smrg 951672b676d7Smrg 951772b676d7SmrgAC_SUBST([APP_MAN_SUFFIX]) 951872b676d7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 951972b676d7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 952072b676d7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 952172b676d7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 952272b676d7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 952372b676d7SmrgAC_SUBST([APP_MAN_DIR]) 952472b676d7SmrgAC_SUBST([LIB_MAN_DIR]) 952572b676d7SmrgAC_SUBST([FILE_MAN_DIR]) 952672b676d7SmrgAC_SUBST([MISC_MAN_DIR]) 952772b676d7SmrgAC_SUBST([DRIVER_MAN_DIR]) 952872b676d7SmrgAC_SUBST([ADMIN_MAN_DIR]) 9529e35772b2Smrg 9530e35772b2SmrgXORG_MAN_PAGE="X Version 11" 9531e35772b2SmrgAC_SUBST([XORG_MAN_PAGE]) 9532e35772b2SmrgMAN_SUBSTS="\ 9533e35772b2Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9534e35772b2Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9535e35772b2Smrg -e 's|__xservername__|Xorg|g' \ 9536e35772b2Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9537e35772b2Smrg -e 's|__projectroot__|\$(prefix)|g' \ 953874c14cd6Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9539e35772b2Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9540e35772b2Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9541e35772b2Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9542e35772b2Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9543e35772b2Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9544e35772b2Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9545e35772b2SmrgAC_SUBST([MAN_SUBSTS]) 9546e35772b2Smrg 954772b676d7Smrg]) # XORG_MANPAGE_SECTIONS 954872b676d7Smrg 9549e35772b2Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9550e35772b2Smrg# ------------------------ 9551e35772b2Smrg# Minimum version: 1.7.0 9552e35772b2Smrg# 9553e35772b2Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9554e35772b2Smrg# provided by xorg-sgml-doctools, if installed. 9555e35772b2SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9556e35772b2SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9557e35772b2SmrgXORG_SGML_PATH= 9558e35772b2SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9559e35772b2Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9560e35772b2Smrg [m4_ifval([$1],[:], 9561e35772b2Smrg [if test x"$cross_compiling" != x"yes" ; then 9562e35772b2Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9563e35772b2Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9564e35772b2Smrg fi]) 9565e35772b2Smrg ]) 9566e35772b2Smrg 956774c14cd6Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 956874c14cd6Smrg# the path and the name of the doc stylesheet 9569e35772b2Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9570e35772b2Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 957174c14cd6Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 957274c14cd6Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9573e35772b2Smrgelse 9574e35772b2Smrg AC_MSG_RESULT([no]) 9575e35772b2Smrgfi 9576e35772b2Smrg 9577e35772b2SmrgAC_SUBST(XORG_SGML_PATH) 957874c14cd6SmrgAC_SUBST(STYLESHEET_SRCDIR) 957974c14cd6SmrgAC_SUBST(XSL_STYLESHEET) 958074c14cd6SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9581e35772b2Smrg]) # XORG_CHECK_SGML_DOCTOOLS 9582e35772b2Smrg 958372b676d7Smrg# XORG_CHECK_LINUXDOC 958472b676d7Smrg# ------------------- 958572b676d7Smrg# Minimum version: 1.0.0 958672b676d7Smrg# 958772b676d7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 958872b676d7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 958972b676d7Smrg# Whether or not the necessary tools and files are found can be checked 959072b676d7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 959172b676d7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9592e35772b2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9593e35772b2SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 959472b676d7Smrg 959572b676d7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 959672b676d7Smrg 9597e35772b2SmrgAC_MSG_CHECKING([whether to build documentation]) 959872b676d7Smrg 9599e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 960072b676d7Smrg BUILDDOC=yes 960172b676d7Smrgelse 960272b676d7Smrg BUILDDOC=no 960372b676d7Smrgfi 960472b676d7Smrg 960572b676d7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 960672b676d7Smrg 960772b676d7SmrgAC_MSG_RESULT([$BUILDDOC]) 960872b676d7Smrg 9609e35772b2SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 961072b676d7Smrg 9611e35772b2Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 961272b676d7Smrg BUILDPDFDOC=yes 961372b676d7Smrgelse 961472b676d7Smrg BUILDPDFDOC=no 961572b676d7Smrgfi 961672b676d7Smrg 961772b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 961872b676d7Smrg 961972b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 962072b676d7Smrg 9621e35772b2SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 962272b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 962372b676d7SmrgMAKE_PDF="$PS2PDF" 962472b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 962572b676d7Smrg 962672b676d7SmrgAC_SUBST(MAKE_TEXT) 962772b676d7SmrgAC_SUBST(MAKE_PS) 962872b676d7SmrgAC_SUBST(MAKE_PDF) 962972b676d7SmrgAC_SUBST(MAKE_HTML) 963072b676d7Smrg]) # XORG_CHECK_LINUXDOC 963172b676d7Smrg 963272b676d7Smrg# XORG_CHECK_DOCBOOK 963372b676d7Smrg# ------------------- 963472b676d7Smrg# Minimum version: 1.0.0 963572b676d7Smrg# 963672b676d7Smrg# Checks for the ability to build output formats from SGML DocBook source. 963772b676d7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 963872b676d7Smrg# indicates whether the necessary tools and files are found and, if set, 963972b676d7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 964072b676d7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9641e35772b2SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9642e35772b2Smrg 964372b676d7SmrgBUILDTXTDOC=no 964472b676d7SmrgBUILDPDFDOC=no 964572b676d7SmrgBUILDPSDOC=no 964672b676d7SmrgBUILDHTMLDOC=no 964772b676d7Smrg 964872b676d7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 964972b676d7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 965072b676d7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 965172b676d7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 965272b676d7Smrg 9653e35772b2SmrgAC_MSG_CHECKING([whether to build text documentation]) 9654e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 965572b676d7Smrg test x$BUILD_TXTDOC != xno; then 965672b676d7Smrg BUILDTXTDOC=yes 965772b676d7Smrgfi 965872b676d7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 965972b676d7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 966072b676d7Smrg 9661e35772b2SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9662e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 966372b676d7Smrg test x$BUILD_PDFDOC != xno; then 966472b676d7Smrg BUILDPDFDOC=yes 966572b676d7Smrgfi 966672b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 966772b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 966872b676d7Smrg 9669e35772b2SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9670e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 967172b676d7Smrg test x$BUILD_PSDOC != xno; then 967272b676d7Smrg BUILDPSDOC=yes 967372b676d7Smrgfi 967472b676d7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 967572b676d7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 967672b676d7Smrg 9677e35772b2SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9678e35772b2Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 967972b676d7Smrg test x$BUILD_HTMLDOC != xno; then 968072b676d7Smrg BUILDHTMLDOC=yes 968172b676d7Smrgfi 968272b676d7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 968372b676d7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 968472b676d7Smrg 968572b676d7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 968672b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 968772b676d7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 968872b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 968972b676d7Smrg 969072b676d7SmrgAC_SUBST(MAKE_TEXT) 969172b676d7SmrgAC_SUBST(MAKE_PS) 969272b676d7SmrgAC_SUBST(MAKE_PDF) 969372b676d7SmrgAC_SUBST(MAKE_HTML) 969472b676d7Smrg]) # XORG_CHECK_DOCBOOK 969572b676d7Smrg 969674c14cd6Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9697e35772b2Smrg# ---------------- 9698e35772b2Smrg# Minimum version: 1.5.0 969974c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9700e35772b2Smrg# 9701e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9702e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9703e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9704e35772b2Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 970574c14cd6Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 970674c14cd6Smrg# --with-xmlto assumes 'auto'. 9707e35772b2Smrg# 9708e35772b2Smrg# Interface to module: 9709e35772b2Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9710e35772b2Smrg# XMLTO: returns the path of the xmlto program found 9711e35772b2Smrg# returns the path set by the user in the environment 9712e35772b2Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9713e35772b2Smrg# 'no' user instructs the module not to use xmlto 9714e35772b2Smrg# 971574c14cd6Smrg# Added in version 1.10.0 971674c14cd6Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 971774c14cd6Smrg# xmlto for text output requires either lynx, links, or w3m browsers 971874c14cd6Smrg# 9719e35772b2Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9720e35772b2Smrg# 9721e35772b2SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9722e35772b2SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 972374c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9724e35772b2SmrgAC_ARG_WITH(xmlto, 9725e35772b2Smrg AS_HELP_STRING([--with-xmlto], 972674c14cd6Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 972774c14cd6Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 972874c14cd6Smrgm4_undefine([_defopt]) 9729e35772b2Smrg 9730e35772b2Smrgif test "x$use_xmlto" = x"auto"; then 9731e35772b2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9732e35772b2Smrg if test "x$XMLTO" = "x"; then 9733e35772b2Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9734e35772b2Smrg have_xmlto=no 9735e35772b2Smrg else 9736e35772b2Smrg have_xmlto=yes 9737e35772b2Smrg fi 9738e35772b2Smrgelif test "x$use_xmlto" = x"yes" ; then 9739e35772b2Smrg AC_PATH_PROG([XMLTO], [xmlto]) 9740e35772b2Smrg if test "x$XMLTO" = "x"; then 9741e35772b2Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9742e35772b2Smrg fi 9743e35772b2Smrg have_xmlto=yes 9744e35772b2Smrgelif test "x$use_xmlto" = x"no" ; then 9745e35772b2Smrg if test "x$XMLTO" != "x"; then 9746e35772b2Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9747e35772b2Smrg fi 9748e35772b2Smrg have_xmlto=no 9749e35772b2Smrgelse 9750e35772b2Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9751e35772b2Smrgfi 975274c14cd6Smrg 975374c14cd6Smrg# Test for a minimum version of xmlto, if provided. 9754e35772b2Smrgm4_ifval([$1], 9755e35772b2Smrg[if test "$have_xmlto" = yes; then 9756e35772b2Smrg # scrape the xmlto version 9757e35772b2Smrg AC_MSG_CHECKING([the xmlto version]) 9758e35772b2Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9759e35772b2Smrg AC_MSG_RESULT([$xmlto_version]) 9760e35772b2Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9761e35772b2Smrg [if test "x$use_xmlto" = xauto; then 9762e35772b2Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9763e35772b2Smrg have_xmlto=no 9764e35772b2Smrg else 9765e35772b2Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9766e35772b2Smrg fi]) 9767e35772b2Smrgfi]) 976874c14cd6Smrg 976974c14cd6Smrg# Test for the ability of xmlto to generate a text target 977074fcc364Smrg# 977174fcc364Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 977274fcc364Smrg# following test for empty XML docbook files. 977374fcc364Smrg# For compatibility reasons use the following empty XML docbook file and if 977474fcc364Smrg# it fails try it again with a non-empty XML file. 977574c14cd6Smrghave_xmlto_text=no 977674c14cd6Smrgcat > conftest.xml << "EOF" 977774c14cd6SmrgEOF 977874c14cd6SmrgAS_IF([test "$have_xmlto" = yes], 977974c14cd6Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 978074c14cd6Smrg [have_xmlto_text=yes], 978174fcc364Smrg [# Try it again with a non-empty XML file. 978274fcc364Smrg cat > conftest.xml << "EOF" 978374fcc364Smrg<x></x> 978474fcc364SmrgEOF 978574fcc364Smrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 978674fcc364Smrg [have_xmlto_text=yes], 978774fcc364Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 978874c14cd6Smrgrm -f conftest.xml 978974c14cd6SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9790e35772b2SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9791e35772b2Smrg]) # XORG_WITH_XMLTO 9792e35772b2Smrg 979374c14cd6Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 979474c14cd6Smrg# -------------------------------------------- 979574c14cd6Smrg# Minimum version: 1.12.0 979674c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.12.0 979774c14cd6Smrg# 979874c14cd6Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 979974c14cd6Smrg# XML-based language used for the transformation of XML documents. 980074c14cd6Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 980174c14cd6Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 980274c14cd6Smrg# The XSLT processor is often used as a standalone tool for transformations. 980374c14cd6Smrg# It should not be assumed that this tool is used only to work with documnetation. 980474c14cd6Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 980574c14cd6Smrg# 980674c14cd6Smrg# Interface to module: 980774c14cd6Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 980874c14cd6Smrg# XSLTPROC: returns the path of the xsltproc program found 980974c14cd6Smrg# returns the path set by the user in the environment 981074c14cd6Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 981174c14cd6Smrg# 'no' user instructs the module not to use xsltproc 981274c14cd6Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 981374c14cd6Smrg# 981474c14cd6Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 981574c14cd6Smrg# 981674c14cd6SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 981774c14cd6SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 981874c14cd6Smrg# Preserves the interface, should it be implemented later 981974c14cd6Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 982074c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 982174c14cd6SmrgAC_ARG_WITH(xsltproc, 982274c14cd6Smrg AS_HELP_STRING([--with-xsltproc], 982374c14cd6Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 982474c14cd6Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 982574c14cd6Smrgm4_undefine([_defopt]) 982674c14cd6Smrg 982774c14cd6Smrgif test "x$use_xsltproc" = x"auto"; then 982874c14cd6Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 982974c14cd6Smrg if test "x$XSLTPROC" = "x"; then 983074c14cd6Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 983174c14cd6Smrg have_xsltproc=no 983274c14cd6Smrg else 983374c14cd6Smrg have_xsltproc=yes 983474c14cd6Smrg fi 983574c14cd6Smrgelif test "x$use_xsltproc" = x"yes" ; then 983674c14cd6Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 983774c14cd6Smrg if test "x$XSLTPROC" = "x"; then 983874c14cd6Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 983974c14cd6Smrg fi 984074c14cd6Smrg have_xsltproc=yes 984174c14cd6Smrgelif test "x$use_xsltproc" = x"no" ; then 984274c14cd6Smrg if test "x$XSLTPROC" != "x"; then 984374c14cd6Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 984474c14cd6Smrg fi 984574c14cd6Smrg have_xsltproc=no 984674c14cd6Smrgelse 984774c14cd6Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 984874c14cd6Smrgfi 984974c14cd6Smrg 985074c14cd6SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 985174c14cd6Smrg]) # XORG_WITH_XSLTPROC 985274c14cd6Smrg 985374c14cd6Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 985474c14cd6Smrg# ---------------------------------------- 985574c14cd6Smrg# Minimum version: 1.15.0 985674c14cd6Smrg# 985774c14cd6Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 985874c14cd6Smrg# scanning arbitrary text files, extracting information from those text files, 985974c14cd6Smrg# and printing reports based on that information. 986074c14cd6Smrg# 986174c14cd6Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 986274c14cd6Smrg# 986374c14cd6Smrg# Interface to module: 986474c14cd6Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 986574c14cd6Smrg# PERL: returns the path of the perl program found 986674c14cd6Smrg# returns the path set by the user in the environment 986774c14cd6Smrg# --with-perl: 'yes' user instructs the module to use perl 986874c14cd6Smrg# 'no' user instructs the module not to use perl 986974c14cd6Smrg# have_perl: returns yes if perl found in PATH or no 987074c14cd6Smrg# 987174c14cd6Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 987274c14cd6Smrg# 987374c14cd6SmrgAC_DEFUN([XORG_WITH_PERL],[ 987474c14cd6SmrgAC_ARG_VAR([PERL], [Path to perl command]) 987574c14cd6Smrg# Preserves the interface, should it be implemented later 987674c14cd6Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 987774c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 987874c14cd6SmrgAC_ARG_WITH(perl, 987974c14cd6Smrg AS_HELP_STRING([--with-perl], 988074c14cd6Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 988174c14cd6Smrg [use_perl=$withval], [use_perl=]_defopt) 988274c14cd6Smrgm4_undefine([_defopt]) 988374c14cd6Smrg 988474c14cd6Smrgif test "x$use_perl" = x"auto"; then 988574c14cd6Smrg AC_PATH_PROG([PERL], [perl]) 988674c14cd6Smrg if test "x$PERL" = "x"; then 988774c14cd6Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 988874c14cd6Smrg have_perl=no 988974c14cd6Smrg else 989074c14cd6Smrg have_perl=yes 989174c14cd6Smrg fi 989274c14cd6Smrgelif test "x$use_perl" = x"yes" ; then 989374c14cd6Smrg AC_PATH_PROG([PERL], [perl]) 989474c14cd6Smrg if test "x$PERL" = "x"; then 989574c14cd6Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 989674c14cd6Smrg fi 989774c14cd6Smrg have_perl=yes 989874c14cd6Smrgelif test "x$use_perl" = x"no" ; then 989974c14cd6Smrg if test "x$PERL" != "x"; then 990074c14cd6Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 990174c14cd6Smrg fi 990274c14cd6Smrg have_perl=no 990374c14cd6Smrgelse 990474c14cd6Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 990574c14cd6Smrgfi 990674c14cd6Smrg 990774c14cd6SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 990874c14cd6Smrg]) # XORG_WITH_PERL 990974c14cd6Smrg 991074c14cd6Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9911e35772b2Smrg# ---------------- 9912e35772b2Smrg# Minimum version: 1.5.0 991374c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 9914e35772b2Smrg# 9915e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9916e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9917e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9918e35772b2Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 991974c14cd6Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 992074c14cd6Smrg# --with-asciidoc assumes 'auto'. 9921e35772b2Smrg# 9922e35772b2Smrg# Interface to module: 9923e35772b2Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9924e35772b2Smrg# ASCIIDOC: returns the path of the asciidoc program found 9925e35772b2Smrg# returns the path set by the user in the environment 9926e35772b2Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9927e35772b2Smrg# 'no' user instructs the module not to use asciidoc 9928e35772b2Smrg# 9929e35772b2Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9930e35772b2Smrg# 9931e35772b2SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9932e35772b2SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 993374c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 9934e35772b2SmrgAC_ARG_WITH(asciidoc, 9935e35772b2Smrg AS_HELP_STRING([--with-asciidoc], 993674c14cd6Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 993774c14cd6Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 993874c14cd6Smrgm4_undefine([_defopt]) 9939e35772b2Smrg 9940e35772b2Smrgif test "x$use_asciidoc" = x"auto"; then 9941e35772b2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9942e35772b2Smrg if test "x$ASCIIDOC" = "x"; then 9943e35772b2Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9944e35772b2Smrg have_asciidoc=no 9945e35772b2Smrg else 9946e35772b2Smrg have_asciidoc=yes 9947e35772b2Smrg fi 9948e35772b2Smrgelif test "x$use_asciidoc" = x"yes" ; then 9949e35772b2Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9950e35772b2Smrg if test "x$ASCIIDOC" = "x"; then 9951e35772b2Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9952e35772b2Smrg fi 9953e35772b2Smrg have_asciidoc=yes 9954e35772b2Smrgelif test "x$use_asciidoc" = x"no" ; then 9955e35772b2Smrg if test "x$ASCIIDOC" != "x"; then 9956e35772b2Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9957e35772b2Smrg fi 9958e35772b2Smrg have_asciidoc=no 9959e35772b2Smrgelse 9960e35772b2Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9961e35772b2Smrgfi 9962e35772b2Smrgm4_ifval([$1], 9963e35772b2Smrg[if test "$have_asciidoc" = yes; then 9964e35772b2Smrg # scrape the asciidoc version 9965e35772b2Smrg AC_MSG_CHECKING([the asciidoc version]) 9966e35772b2Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9967e35772b2Smrg AC_MSG_RESULT([$asciidoc_version]) 9968e35772b2Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9969e35772b2Smrg [if test "x$use_asciidoc" = xauto; then 9970e35772b2Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9971e35772b2Smrg have_asciidoc=no 9972e35772b2Smrg else 9973e35772b2Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9974e35772b2Smrg fi]) 9975e35772b2Smrgfi]) 9976e35772b2SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9977e35772b2Smrg]) # XORG_WITH_ASCIIDOC 9978e35772b2Smrg 997974c14cd6Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 998021525869Smrg# ------------------------------------------- 9981e35772b2Smrg# Minimum version: 1.5.0 998274c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 998321525869Smrg# Minimum version for optional DOT checking: 1.18.0 9984e35772b2Smrg# 9985e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 9986e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 9987e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 9988e35772b2Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 998974c14cd6Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 999074c14cd6Smrg# --with-doxygen assumes 'auto'. 9991e35772b2Smrg# 9992e35772b2Smrg# Interface to module: 9993e35772b2Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9994e35772b2Smrg# DOXYGEN: returns the path of the doxygen program found 9995e35772b2Smrg# returns the path set by the user in the environment 9996e35772b2Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9997e35772b2Smrg# 'no' user instructs the module not to use doxygen 9998e35772b2Smrg# 9999e35772b2Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10000e35772b2Smrg# 10001e35772b2SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10002e35772b2SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1000321525869SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 1000474c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 10005e35772b2SmrgAC_ARG_WITH(doxygen, 10006e35772b2Smrg AS_HELP_STRING([--with-doxygen], 1000774c14cd6Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1000874c14cd6Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1000974c14cd6Smrgm4_undefine([_defopt]) 10010e35772b2Smrg 10011e35772b2Smrgif test "x$use_doxygen" = x"auto"; then 10012e35772b2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10013e35772b2Smrg if test "x$DOXYGEN" = "x"; then 10014e35772b2Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10015e35772b2Smrg have_doxygen=no 10016e35772b2Smrg else 10017e35772b2Smrg have_doxygen=yes 10018e35772b2Smrg fi 10019e35772b2Smrgelif test "x$use_doxygen" = x"yes" ; then 10020e35772b2Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10021e35772b2Smrg if test "x$DOXYGEN" = "x"; then 10022e35772b2Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10023e35772b2Smrg fi 10024e35772b2Smrg have_doxygen=yes 10025e35772b2Smrgelif test "x$use_doxygen" = x"no" ; then 10026e35772b2Smrg if test "x$DOXYGEN" != "x"; then 10027e35772b2Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10028e35772b2Smrg fi 10029e35772b2Smrg have_doxygen=no 10030e35772b2Smrgelse 10031e35772b2Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10032e35772b2Smrgfi 10033e35772b2Smrgm4_ifval([$1], 10034e35772b2Smrg[if test "$have_doxygen" = yes; then 10035e35772b2Smrg # scrape the doxygen version 10036e35772b2Smrg AC_MSG_CHECKING([the doxygen version]) 10037e35772b2Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10038e35772b2Smrg AC_MSG_RESULT([$doxygen_version]) 10039e35772b2Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10040e35772b2Smrg [if test "x$use_doxygen" = xauto; then 10041e35772b2Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10042e35772b2Smrg have_doxygen=no 10043e35772b2Smrg else 10044e35772b2Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10045e35772b2Smrg fi]) 10046e35772b2Smrgfi]) 1004721525869Smrg 1004821525869Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 1004921525869Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 1005021525869Smrgdnl HAVE_DOT = @HAVE_DOT@ 1005121525869SmrgHAVE_DOT=no 1005221525869Smrgif test "x$have_doxygen" = "xyes"; then 1005321525869Smrg AC_PATH_PROG([DOT], [dot]) 1005421525869Smrg if test "x$DOT" != "x"; then 1005521525869Smrg HAVE_DOT=yes 1005621525869Smrg fi 1005721525869Smrgfi 1005821525869Smrg 1005921525869SmrgAC_SUBST([HAVE_DOT]) 1006021525869SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10061e35772b2SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10062e35772b2Smrg]) # XORG_WITH_DOXYGEN 10063e35772b2Smrg 1006474c14cd6Smrg# XORG_WITH_GROFF([DEFAULT]) 10065e35772b2Smrg# ---------------- 10066e35772b2Smrg# Minimum version: 1.6.0 1006774c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10068e35772b2Smrg# 10069e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 10070e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 10071e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10072e35772b2Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1007374c14cd6Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1007474c14cd6Smrg# --with-groff assumes 'auto'. 10075e35772b2Smrg# 10076e35772b2Smrg# Interface to module: 10077e35772b2Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10078e35772b2Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10079e35772b2Smrg# HAVE_GROFF_MS: the -ms macros package 10080e35772b2Smrg# GROFF: returns the path of the groff program found 10081e35772b2Smrg# returns the path set by the user in the environment 10082e35772b2Smrg# --with-groff: 'yes' user instructs the module to use groff 10083e35772b2Smrg# 'no' user instructs the module not to use groff 10084e35772b2Smrg# 1008574c14cd6Smrg# Added in version 1.9.0: 1008674c14cd6Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1008774c14cd6Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1008874c14cd6Smrg# psselect from the psutils package. 1008974c14cd6Smrg# the ghostcript package. Refer to the grohtml man pages 1009074c14cd6Smrg# 10091e35772b2Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10092e35772b2Smrg# 10093e35772b2Smrg# OS and distros often splits groff in a basic and full package, the former 10094e35772b2Smrg# having the groff program and the later having devices, fonts and macros 10095e35772b2Smrg# Checking for the groff executable is not enough. 10096e35772b2Smrg# 10097e35772b2Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10098e35772b2Smrg# unset HAVE_GROFF or GROFF env variables. 10099e35772b2Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10100e35772b2Smrg# 10101e35772b2SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10102e35772b2SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1010374c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 10104e35772b2SmrgAC_ARG_WITH(groff, 10105e35772b2Smrg AS_HELP_STRING([--with-groff], 1010674c14cd6Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1010774c14cd6Smrg [use_groff=$withval], [use_groff=]_defopt) 1010874c14cd6Smrgm4_undefine([_defopt]) 10109e35772b2Smrg 10110e35772b2Smrgif test "x$use_groff" = x"auto"; then 10111e35772b2Smrg AC_PATH_PROG([GROFF], [groff]) 10112e35772b2Smrg if test "x$GROFF" = "x"; then 10113e35772b2Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10114e35772b2Smrg have_groff=no 10115e35772b2Smrg else 10116e35772b2Smrg have_groff=yes 10117e35772b2Smrg fi 10118e35772b2Smrgelif test "x$use_groff" = x"yes" ; then 10119e35772b2Smrg AC_PATH_PROG([GROFF], [groff]) 10120e35772b2Smrg if test "x$GROFF" = "x"; then 10121e35772b2Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10122e35772b2Smrg fi 10123e35772b2Smrg have_groff=yes 10124e35772b2Smrgelif test "x$use_groff" = x"no" ; then 10125e35772b2Smrg if test "x$GROFF" != "x"; then 10126e35772b2Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10127e35772b2Smrg fi 10128e35772b2Smrg have_groff=no 10129e35772b2Smrgelse 10130e35772b2Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10131e35772b2Smrgfi 1013274c14cd6Smrg 10133e35772b2Smrg# We have groff, test for the presence of the macro packages 10134e35772b2Smrgif test "x$have_groff" = x"yes"; then 10135e35772b2Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10136e35772b2Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10137e35772b2Smrg groff_ms_works=yes 10138e35772b2Smrg else 10139e35772b2Smrg groff_ms_works=no 10140e35772b2Smrg fi 10141e35772b2Smrg AC_MSG_RESULT([$groff_ms_works]) 10142e35772b2Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10143e35772b2Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10144e35772b2Smrg groff_mm_works=yes 10145e35772b2Smrg else 10146e35772b2Smrg groff_mm_works=no 10147e35772b2Smrg fi 10148e35772b2Smrg AC_MSG_RESULT([$groff_mm_works]) 10149e35772b2Smrgfi 1015074c14cd6Smrg 1015174c14cd6Smrg# We have groff, test for HTML dependencies, one command per package 1015274c14cd6Smrgif test "x$have_groff" = x"yes"; then 1015374c14cd6Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1015474c14cd6Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1015574c14cd6Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1015674c14cd6Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1015774c14cd6Smrg have_groff_html=yes 1015874c14cd6Smrg else 1015974c14cd6Smrg have_groff_html=no 1016074c14cd6Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1016174c14cd6Smrg fi 1016274c14cd6Smrgfi 1016374c14cd6Smrg 1016474c14cd6Smrg# Set Automake conditionals for Makefiles 10165e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10166e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10167e35772b2SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1016874c14cd6SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10169e35772b2Smrg]) # XORG_WITH_GROFF 10170e35772b2Smrg 1017174c14cd6Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1017274c14cd6Smrg# --------------------------------------- 10173e35772b2Smrg# Minimum version: 1.6.0 1017474c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1017574c14cd6Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10176e35772b2Smrg# 10177e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 10178e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 10179e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10180e35772b2Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1018174c14cd6Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1018274c14cd6Smrg# --with-fop assumes 'auto'. 10183e35772b2Smrg# 10184e35772b2Smrg# Interface to module: 10185e35772b2Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10186e35772b2Smrg# FOP: returns the path of the fop program found 10187e35772b2Smrg# returns the path set by the user in the environment 10188e35772b2Smrg# --with-fop: 'yes' user instructs the module to use fop 10189e35772b2Smrg# 'no' user instructs the module not to use fop 10190e35772b2Smrg# 10191e35772b2Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10192e35772b2Smrg# 10193e35772b2SmrgAC_DEFUN([XORG_WITH_FOP],[ 10194e35772b2SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1019574c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 10196e35772b2SmrgAC_ARG_WITH(fop, 10197e35772b2Smrg AS_HELP_STRING([--with-fop], 1019874c14cd6Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1019974c14cd6Smrg [use_fop=$withval], [use_fop=]_defopt) 1020074c14cd6Smrgm4_undefine([_defopt]) 10201e35772b2Smrg 10202e35772b2Smrgif test "x$use_fop" = x"auto"; then 10203e35772b2Smrg AC_PATH_PROG([FOP], [fop]) 10204e35772b2Smrg if test "x$FOP" = "x"; then 10205e35772b2Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10206e35772b2Smrg have_fop=no 10207e35772b2Smrg else 10208e35772b2Smrg have_fop=yes 10209e35772b2Smrg fi 10210e35772b2Smrgelif test "x$use_fop" = x"yes" ; then 10211e35772b2Smrg AC_PATH_PROG([FOP], [fop]) 10212e35772b2Smrg if test "x$FOP" = "x"; then 10213e35772b2Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10214e35772b2Smrg fi 10215e35772b2Smrg have_fop=yes 10216e35772b2Smrgelif test "x$use_fop" = x"no" ; then 10217e35772b2Smrg if test "x$FOP" != "x"; then 10218e35772b2Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10219e35772b2Smrg fi 10220e35772b2Smrg have_fop=no 10221e35772b2Smrgelse 10222e35772b2Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10223e35772b2Smrgfi 1022474c14cd6Smrg 1022574c14cd6Smrg# Test for a minimum version of fop, if provided. 1022674c14cd6Smrgm4_ifval([$1], 1022774c14cd6Smrg[if test "$have_fop" = yes; then 1022874c14cd6Smrg # scrape the fop version 1022974c14cd6Smrg AC_MSG_CHECKING([for fop minimum version]) 1023074c14cd6Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1023174c14cd6Smrg AC_MSG_RESULT([$fop_version]) 1023274c14cd6Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1023374c14cd6Smrg [if test "x$use_fop" = xauto; then 1023474c14cd6Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1023574c14cd6Smrg have_fop=no 1023674c14cd6Smrg else 1023774c14cd6Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1023874c14cd6Smrg fi]) 1023974c14cd6Smrgfi]) 10240e35772b2SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10241e35772b2Smrg]) # XORG_WITH_FOP 10242e35772b2Smrg 1024321525869Smrg# XORG_WITH_M4([MIN-VERSION]) 1024421525869Smrg# --------------------------- 1024521525869Smrg# Minimum version: 1.19.0 1024621525869Smrg# 1024721525869Smrg# This macro attempts to locate an m4 macro processor which supports 1024821525869Smrg# -I option and is only useful for modules relying on M4 in order to 1024921525869Smrg# expand macros in source code files. 1025021525869Smrg# 1025121525869Smrg# Interface to module: 1025221525869Smrg# M4: returns the path of the m4 program found 1025321525869Smrg# returns the path set by the user in the environment 1025421525869Smrg# 1025521525869SmrgAC_DEFUN([XORG_WITH_M4], [ 1025621525869SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 1025721525869Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 1025821525869Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 1025921525869Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 1026021525869Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 1026121525869Smrg [$PATH:/usr/gnu/bin])]) 1026221525869Smrg 1026321525869SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 1026421525869Smrg]) # XORG_WITH_M4 1026521525869Smrg 1026674c14cd6Smrg# XORG_WITH_PS2PDF([DEFAULT]) 10267e35772b2Smrg# ---------------- 10268e35772b2Smrg# Minimum version: 1.6.0 1026974c14cd6Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10270e35772b2Smrg# 10271e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 10272e35772b2Smrg# not at the appropriate level. This macro enables a module to test for the 10273e35772b2Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10274e35772b2Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1027574c14cd6Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1027674c14cd6Smrg# --with-ps2pdf assumes 'auto'. 10277e35772b2Smrg# 10278e35772b2Smrg# Interface to module: 10279e35772b2Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10280e35772b2Smrg# PS2PDF: returns the path of the ps2pdf program found 10281e35772b2Smrg# returns the path set by the user in the environment 10282e35772b2Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10283e35772b2Smrg# 'no' user instructs the module not to use ps2pdf 10284e35772b2Smrg# 10285e35772b2Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10286e35772b2Smrg# 10287e35772b2SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10288e35772b2SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1028974c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 10290e35772b2SmrgAC_ARG_WITH(ps2pdf, 10291e35772b2Smrg AS_HELP_STRING([--with-ps2pdf], 1029274c14cd6Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1029374c14cd6Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1029474c14cd6Smrgm4_undefine([_defopt]) 10295e35772b2Smrg 10296e35772b2Smrgif test "x$use_ps2pdf" = x"auto"; then 10297e35772b2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10298e35772b2Smrg if test "x$PS2PDF" = "x"; then 10299e35772b2Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10300e35772b2Smrg have_ps2pdf=no 10301e35772b2Smrg else 10302e35772b2Smrg have_ps2pdf=yes 10303e35772b2Smrg fi 10304e35772b2Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10305e35772b2Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10306e35772b2Smrg if test "x$PS2PDF" = "x"; then 10307e35772b2Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10308e35772b2Smrg fi 10309e35772b2Smrg have_ps2pdf=yes 10310e35772b2Smrgelif test "x$use_ps2pdf" = x"no" ; then 10311e35772b2Smrg if test "x$PS2PDF" != "x"; then 10312e35772b2Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10313e35772b2Smrg fi 10314e35772b2Smrg have_ps2pdf=no 10315e35772b2Smrgelse 10316e35772b2Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10317e35772b2Smrgfi 10318e35772b2SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10319e35772b2Smrg]) # XORG_WITH_PS2PDF 10320e35772b2Smrg 10321e35772b2Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10322e35772b2Smrg# ---------------- 10323e35772b2Smrg# Minimum version: 1.6.0 10324e35772b2Smrg# 10325e35772b2Smrg# Documentation tools are not always available on all platforms and sometimes 10326e35772b2Smrg# not at the appropriate level. This macro enables a builder to skip all 10327e35772b2Smrg# documentation targets except traditional man pages. 10328e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10329e35772b2Smrg# maximum flexibilty in controlling documentation building. 10330e35772b2Smrg# Refer to: 10331e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 10332e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10333e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 10334e35772b2Smrg# XORG_WITH_FOP --with-fop 10335e35772b2Smrg# XORG_WITH_GROFF --with-groff 10336e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10337e35772b2Smrg# 10338e35772b2Smrg# Interface to module: 10339e35772b2Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10340e35772b2Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10341e35772b2Smrg# 'no' user instructs the module not to generate docs 10342e35772b2Smrg# parm1: specify the default value, yes or no. 10343e35772b2Smrg# 10344e35772b2SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1034574c14cd6Smrgm4_define([docs_default], m4_default([$1], [yes])) 10346e35772b2SmrgAC_ARG_ENABLE(docs, 10347e35772b2Smrg AS_HELP_STRING([--enable-docs], 1034874c14cd6Smrg [Enable building the documentation (default: ]docs_default[)]), 1034974c14cd6Smrg [build_docs=$enableval], [build_docs=]docs_default) 1035074c14cd6Smrgm4_undefine([docs_default]) 10351e35772b2SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10352e35772b2SmrgAC_MSG_CHECKING([whether to build documentation]) 10353e35772b2SmrgAC_MSG_RESULT([$build_docs]) 10354e35772b2Smrg]) # XORG_ENABLE_DOCS 10355e35772b2Smrg 10356e35772b2Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10357e35772b2Smrg# ---------------- 10358e35772b2Smrg# Minimum version: 1.6.0 10359e35772b2Smrg# 10360e35772b2Smrg# This macro enables a builder to skip all developer documentation. 10361e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10362e35772b2Smrg# maximum flexibilty in controlling documentation building. 10363e35772b2Smrg# Refer to: 10364e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 10365e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10366e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 10367e35772b2Smrg# XORG_WITH_FOP --with-fop 10368e35772b2Smrg# XORG_WITH_GROFF --with-groff 10369e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10370e35772b2Smrg# 10371e35772b2Smrg# Interface to module: 10372e35772b2Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10373e35772b2Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10374e35772b2Smrg# 'no' user instructs the module not to generate developer docs 10375e35772b2Smrg# parm1: specify the default value, yes or no. 10376e35772b2Smrg# 10377e35772b2SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1037874c14cd6Smrgm4_define([devel_default], m4_default([$1], [yes])) 10379e35772b2SmrgAC_ARG_ENABLE(devel-docs, 10380e35772b2Smrg AS_HELP_STRING([--enable-devel-docs], 1038174c14cd6Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1038274c14cd6Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1038374c14cd6Smrgm4_undefine([devel_default]) 10384e35772b2SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10385e35772b2SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10386e35772b2SmrgAC_MSG_RESULT([$build_devel_docs]) 10387e35772b2Smrg]) # XORG_ENABLE_DEVEL_DOCS 10388e35772b2Smrg 10389e35772b2Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10390e35772b2Smrg# ---------------- 10391e35772b2Smrg# Minimum version: 1.6.0 10392e35772b2Smrg# 10393e35772b2Smrg# This macro enables a builder to skip all functional specification targets. 10394e35772b2Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10395e35772b2Smrg# maximum flexibilty in controlling documentation building. 10396e35772b2Smrg# Refer to: 10397e35772b2Smrg# XORG_WITH_XMLTO --with-xmlto 10398e35772b2Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10399e35772b2Smrg# XORG_WITH_DOXYGEN --with-doxygen 10400e35772b2Smrg# XORG_WITH_FOP --with-fop 10401e35772b2Smrg# XORG_WITH_GROFF --with-groff 10402e35772b2Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10403e35772b2Smrg# 10404e35772b2Smrg# Interface to module: 10405e35772b2Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10406e35772b2Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10407e35772b2Smrg# 'no' user instructs the module not to generate specs 10408e35772b2Smrg# parm1: specify the default value, yes or no. 10409e35772b2Smrg# 10410e35772b2SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1041174c14cd6Smrgm4_define([spec_default], m4_default([$1], [yes])) 10412e35772b2SmrgAC_ARG_ENABLE(specs, 10413e35772b2Smrg AS_HELP_STRING([--enable-specs], 1041474c14cd6Smrg [Enable building the specs (default: ]spec_default[)]), 1041574c14cd6Smrg [build_specs=$enableval], [build_specs=]spec_default) 1041674c14cd6Smrgm4_undefine([spec_default]) 10417e35772b2SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10418e35772b2SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10419e35772b2SmrgAC_MSG_RESULT([$build_specs]) 10420e35772b2Smrg]) # XORG_ENABLE_SPECS 10421e35772b2Smrg 1042274c14cd6Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1042374c14cd6Smrg# ---------------------------------------------- 1042474c14cd6Smrg# Minimum version: 1.13.0 1042574c14cd6Smrg# 1042674c14cd6Smrg# This macro enables a builder to enable/disable unit testing 1042774c14cd6Smrg# It makes no assumption about the test cases implementation 1042874c14cd6Smrg# Test cases may or may not use Automake "Support for test suites" 1042974c14cd6Smrg# They may or may not use the software utility library GLib 1043074c14cd6Smrg# 1043174c14cd6Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1043274c14cd6Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1043374c14cd6Smrg# The variable enable_unit_tests is used by other macros in this file. 1043474c14cd6Smrg# 1043574c14cd6Smrg# Interface to module: 1043674c14cd6Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1043774c14cd6Smrg# enable_unit_tests: used in configure.ac for additional configuration 1043874c14cd6Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1043974c14cd6Smrg# 'no' user instructs the module not to build tests 1044074c14cd6Smrg# parm1: specify the default value, yes or no. 1044174c14cd6Smrg# 1044274c14cd6SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1044374c14cd6SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1044474c14cd6SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1044574c14cd6SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1044674c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 1044774c14cd6SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1044874c14cd6Smrg [Enable building unit test cases (default: ]_defopt[)]), 1044974c14cd6Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1045074c14cd6Smrgm4_undefine([_defopt]) 1045174c14cd6SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1045274c14cd6SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1045374c14cd6SmrgAC_MSG_RESULT([$enable_unit_tests]) 1045474c14cd6Smrg]) # XORG_ENABLE_UNIT_TESTS 1045574c14cd6Smrg 1045674c14cd6Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1045774c14cd6Smrg# ------------------------------------------------------ 1045874c14cd6Smrg# Minimum version: 1.17.0 1045974c14cd6Smrg# 1046074c14cd6Smrg# This macro enables a builder to enable/disable integration testing 1046174c14cd6Smrg# It makes no assumption about the test cases' implementation 1046274c14cd6Smrg# Test cases may or may not use Automake "Support for test suites" 1046374c14cd6Smrg# 1046474c14cd6Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1046574c14cd6Smrg# usually requires less dependencies and may be built and run under less 1046674c14cd6Smrg# stringent environments than integration tests. 1046774c14cd6Smrg# 1046874c14cd6Smrg# Interface to module: 1046974c14cd6Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1047074c14cd6Smrg# enable_integration_tests: used in configure.ac for additional configuration 1047174c14cd6Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1047274c14cd6Smrg# 'no' user instructs the module not to build tests 1047374c14cd6Smrg# parm1: specify the default value, yes or no. 1047474c14cd6Smrg# 1047574c14cd6SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1047674c14cd6SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1047774c14cd6Smrgm4_define([_defopt], m4_default([$1], [auto])) 1047874c14cd6SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1047974c14cd6Smrg [Enable building integration test cases (default: ]_defopt[)]), 1048074c14cd6Smrg [enable_integration_tests=$enableval], 1048174c14cd6Smrg [enable_integration_tests=]_defopt) 1048274c14cd6Smrgm4_undefine([_defopt]) 1048374c14cd6SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1048474c14cd6Smrg [test "x$enable_integration_tests" != xno]) 1048574c14cd6SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1048674c14cd6SmrgAC_MSG_RESULT([$enable_integration_tests]) 1048774c14cd6Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 1048874c14cd6Smrg 1048974c14cd6Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1049074c14cd6Smrg# ---------------------------------------- 1049174c14cd6Smrg# Minimum version: 1.13.0 1049274c14cd6Smrg# 1049374c14cd6Smrg# GLib is a library which provides advanced data structures and functions. 1049474c14cd6Smrg# This macro enables a module to test for the presence of Glib. 1049574c14cd6Smrg# 1049674c14cd6Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1049774c14cd6Smrg# Otherwise the value of $enable_unit_tests is blank. 1049874c14cd6Smrg# 1049974c14cd6Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1050074c14cd6Smrg# test support usually requires less dependencies and may be built and run under 1050174c14cd6Smrg# less stringent environments than integration tests. 1050274c14cd6Smrg# 1050374c14cd6Smrg# Interface to module: 1050474c14cd6Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1050574c14cd6Smrg# with_glib: used in configure.ac to know if GLib has been found 1050674c14cd6Smrg# --with-glib: 'yes' user instructs the module to use glib 1050774c14cd6Smrg# 'no' user instructs the module not to use glib 1050874c14cd6Smrg# 1050974c14cd6SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1051074c14cd6SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1051174c14cd6Smrgm4_define([_defopt], m4_default([$2], [auto])) 1051274c14cd6SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1051374c14cd6Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1051474c14cd6Smrg [with_glib=$withval], [with_glib=]_defopt) 1051574c14cd6Smrgm4_undefine([_defopt]) 1051674c14cd6Smrg 1051774c14cd6Smrghave_glib=no 1051874c14cd6Smrg# Do not probe GLib if user explicitly disabled unit testing 1051974c14cd6Smrgif test "x$enable_unit_tests" != x"no"; then 1052074c14cd6Smrg # Do not probe GLib if user explicitly disabled it 1052174c14cd6Smrg if test "x$with_glib" != x"no"; then 1052274c14cd6Smrg m4_ifval( 1052374c14cd6Smrg [$1], 1052474c14cd6Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1052574c14cd6Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1052674c14cd6Smrg ) 1052774c14cd6Smrg fi 1052874c14cd6Smrgfi 1052974c14cd6Smrg 1053074c14cd6Smrg# Not having GLib when unit testing has been explicitly requested is an error 1053174c14cd6Smrgif test "x$enable_unit_tests" = x"yes"; then 1053274c14cd6Smrg if test "x$have_glib" = x"no"; then 1053374c14cd6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1053474c14cd6Smrg fi 1053574c14cd6Smrgfi 1053674c14cd6Smrg 1053774c14cd6Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1053874c14cd6Smrgif test "x$enable_unit_tests" = x"no"; then 1053974c14cd6Smrg if test "x$with_glib" = x"yes"; then 1054074c14cd6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1054174c14cd6Smrg fi 1054274c14cd6Smrgfi 1054374c14cd6Smrg 1054474c14cd6Smrg# Not having GLib when it has been explicitly requested is an error 1054574c14cd6Smrgif test "x$with_glib" = x"yes"; then 1054674c14cd6Smrg if test "x$have_glib" = x"no"; then 1054774c14cd6Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1054874c14cd6Smrg fi 1054974c14cd6Smrgfi 1055074c14cd6Smrg 1055174c14cd6SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1055274c14cd6Smrg]) # XORG_WITH_GLIB 1055374c14cd6Smrg 1055474c14cd6Smrg# XORG_LD_WRAP([required|optional]) 1055574c14cd6Smrg# --------------------------------- 1055674c14cd6Smrg# Minimum version: 1.13.0 1055774c14cd6Smrg# 1055874c14cd6Smrg# Check if linker supports -wrap, passed via compiler flags 1055974c14cd6Smrg# 1056074c14cd6Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1056174c14cd6Smrg# Otherwise the value of $enable_unit_tests is blank. 1056274c14cd6Smrg# 1056374c14cd6Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1056474c14cd6Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1056574c14cd6Smrg# available, an argument of "optional" allows use when some unit tests require 1056674c14cd6Smrg# ld -wrap and others do not. 1056774c14cd6Smrg# 1056874c14cd6SmrgAC_DEFUN([XORG_LD_WRAP],[ 1056974c14cd6SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1057074c14cd6Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1057174c14cd6Smrg void __wrap_exit(int status) { return; }], 1057274c14cd6Smrg [exit(0);])]) 1057374c14cd6Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1057474c14cd6Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1057574c14cd6Smrg if test "x$have_ld_wrap" = x"no"; then 1057674c14cd6Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1057774c14cd6Smrg fi 1057874c14cd6Smrgfi 1057974c14cd6SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1058074c14cd6Smrg# 1058174c14cd6Smrg]) # XORG_LD_WRAP 1058274c14cd6Smrg 1058374c14cd6Smrg# XORG_CHECK_LINKER_FLAGS 1058474c14cd6Smrg# ----------------------- 1058574c14cd6Smrg# SYNOPSIS 1058674c14cd6Smrg# 1058774c14cd6Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1058874c14cd6Smrg# 1058974c14cd6Smrg# DESCRIPTION 1059074c14cd6Smrg# 1059174c14cd6Smrg# Check whether the given linker FLAGS work with the current language's 1059274c14cd6Smrg# linker, or whether they give an error. 1059374c14cd6Smrg# 1059474c14cd6Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1059574c14cd6Smrg# success/failure. 1059674c14cd6Smrg# 1059774c14cd6Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1059874c14cd6Smrg# 1059974c14cd6Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1060074c14cd6Smrg# 1060174c14cd6Smrg# LICENSE 1060274c14cd6Smrg# 1060374c14cd6Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1060474c14cd6Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1060574c14cd6Smrg# Copyright (c) 2009 Matteo Frigo 1060674c14cd6Smrg# 1060774c14cd6Smrg# This program is free software: you can redistribute it and/or modify it 1060874c14cd6Smrg# under the terms of the GNU General Public License as published by the 1060974c14cd6Smrg# Free Software Foundation, either version 3 of the License, or (at your 1061074c14cd6Smrg# option) any later version. 1061174c14cd6Smrg# 1061274c14cd6Smrg# This program is distributed in the hope that it will be useful, but 1061374c14cd6Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1061474c14cd6Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1061574c14cd6Smrg# Public License for more details. 1061674c14cd6Smrg# 1061774c14cd6Smrg# You should have received a copy of the GNU General Public License along 1061874c14cd6Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1061974c14cd6Smrg# 1062074c14cd6Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1062174c14cd6Smrg# gives unlimited permission to copy, distribute and modify the configure 1062274c14cd6Smrg# scripts that are the output of Autoconf when processing the Macro. You 1062374c14cd6Smrg# need not follow the terms of the GNU General Public License when using 1062474c14cd6Smrg# or distributing such scripts, even though portions of the text of the 1062574c14cd6Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1062674c14cd6Smrg# all other use of the material that constitutes the Autoconf Macro. 1062774c14cd6Smrg# 1062874c14cd6Smrg# This special exception to the GPL applies to versions of the Autoconf 1062974c14cd6Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1063074c14cd6Smrg# modified version of the Autoconf Macro, you may extend this special 1063174c14cd6Smrg# exception to the GPL to apply to your modified version as well.# 1063274c14cd6SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1063374c14cd6Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1063474c14cd6Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1063574c14cd6SmrgAS_LITERAL_IF([$1], 1063674c14cd6Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1063774c14cd6Smrg ax_save_FLAGS=$LDFLAGS 1063874c14cd6Smrg LDFLAGS="$1" 1063974c14cd6Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1064074c14cd6Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1064174c14cd6Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1064274c14cd6Smrg LDFLAGS=$ax_save_FLAGS])], 1064374c14cd6Smrg [ax_save_FLAGS=$LDFLAGS 1064474c14cd6Smrg LDFLAGS="$1" 1064574c14cd6Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1064674c14cd6Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1064774c14cd6Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1064874c14cd6Smrg LDFLAGS=$ax_save_FLAGS]) 1064974c14cd6Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1065074c14cd6SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1065174c14cd6Smrgif test "x$xorg_check_linker_flags" = xyes; then 1065274c14cd6Smrg m4_default([$2], :) 1065374c14cd6Smrgelse 1065474c14cd6Smrg m4_default([$3], :) 1065574c14cd6Smrgfi 1065674c14cd6Smrg]) # XORG_CHECK_LINKER_FLAGS 1065774c14cd6Smrg 1065874c14cd6Smrg# XORG_MEMORY_CHECK_FLAGS 1065974c14cd6Smrg# ----------------------- 1066074c14cd6Smrg# Minimum version: 1.16.0 1066174c14cd6Smrg# 1066274c14cd6Smrg# This macro attempts to find appropriate memory checking functionality 1066374c14cd6Smrg# for various platforms which unit testing code may use to catch various 1066474c14cd6Smrg# forms of memory allocation and access errors in testing. 1066574c14cd6Smrg# 1066674c14cd6Smrg# Interface to module: 1066774c14cd6Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1066874c14cd6Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1066974c14cd6Smrg# 1067074c14cd6Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1067174c14cd6Smrg# 1067274c14cd6SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1067374c14cd6Smrg 1067474c14cd6SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1067574c14cd6SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1067674c14cd6Smrg [Environment variables to enable memory checking in tests]) 1067774c14cd6Smrg 1067874c14cd6Smrg# Check for different types of support on different platforms 1067974c14cd6Smrgcase $host_os in 1068074c14cd6Smrg solaris*) 1068174c14cd6Smrg AC_CHECK_LIB([umem], [umem_alloc], 1068274c14cd6Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1068374c14cd6Smrg ;; 1068474c14cd6Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1068574c14cd6Smrg # both directly and inverted, so should not be 0 or 255. 1068674c14cd6Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1068774c14cd6Smrg ;; 1068874c14cd6Smrg darwin*) 1068974c14cd6Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1069074c14cd6Smrg ;; 1069174c14cd6Smrg *bsd*) 1069274c14cd6Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1069374c14cd6Smrg ;; 1069474c14cd6Smrgesac 1069574c14cd6Smrg 1069674c14cd6Smrg# User supplied flags override default flags 1069774c14cd6Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1069874c14cd6Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1069974c14cd6Smrgfi 1070074c14cd6Smrg 1070174c14cd6SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1070274c14cd6Smrg]) # XORG_WITH_LINT 1070374c14cd6Smrg 1070472b676d7Smrg# XORG_CHECK_MALLOC_ZERO 1070572b676d7Smrg# ---------------------- 1070672b676d7Smrg# Minimum version: 1.0.0 1070772b676d7Smrg# 1070872b676d7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1070972b676d7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1071072b676d7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1071172b676d7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1071272b676d7SmrgAC_ARG_ENABLE(malloc0returnsnull, 10713e35772b2Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1071472b676d7Smrg [malloc(0) returns NULL (default: auto)]), 1071572b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1071672b676d7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 1071772b676d7Smrg 1071872b676d7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1071972b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1072021525869SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 1072121525869Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1072274c14cd6Smrg#include <stdlib.h> 1072374c14cd6Smrg],[ 1072472b676d7Smrg char *m0, *r0, *c0, *p; 1072572b676d7Smrg m0 = malloc(0); 1072672b676d7Smrg p = malloc(10); 1072772b676d7Smrg r0 = realloc(p,0); 1072874c14cd6Smrg c0 = calloc(0,10); 1072974c14cd6Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1073074c14cd6Smrg])], 1073121525869Smrg [xorg_cv_malloc0_returns_null=yes], 1073221525869Smrg [xorg_cv_malloc0_returns_null=no])]) 1073321525869SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 1073472b676d7Smrgfi 1073572b676d7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 1073672b676d7Smrg 1073772b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1073872b676d7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1073972b676d7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1074072b676d7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1074172b676d7Smrgelse 1074272b676d7Smrg MALLOC_ZERO_CFLAGS="" 1074372b676d7Smrg XMALLOC_ZERO_CFLAGS="" 1074472b676d7Smrg XTMALLOC_ZERO_CFLAGS="" 1074572b676d7Smrgfi 1074672b676d7Smrg 1074772b676d7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1074872b676d7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1074972b676d7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1075072b676d7Smrg]) # XORG_CHECK_MALLOC_ZERO 1075172b676d7Smrg 1075272b676d7Smrg# XORG_WITH_LINT() 1075372b676d7Smrg# ---------------- 1075472b676d7Smrg# Minimum version: 1.1.0 1075572b676d7Smrg# 10756e35772b2Smrg# This macro enables the use of a tool that flags some suspicious and 10757e35772b2Smrg# non-portable constructs (likely to be bugs) in C language source code. 10758e35772b2Smrg# It will attempt to locate the tool and use appropriate options. 10759e35772b2Smrg# There are various lint type tools on different platforms. 10760e35772b2Smrg# 10761e35772b2Smrg# Interface to module: 10762e35772b2Smrg# LINT: returns the path to the tool found on the platform 10763e35772b2Smrg# or the value set to LINT on the configure cmd line 10764e35772b2Smrg# also an Automake conditional 10765e35772b2Smrg# LINT_FLAGS: an Automake variable with appropriate flags 10766e35772b2Smrg# 10767e35772b2Smrg# --with-lint: 'yes' user instructs the module to use lint 10768e35772b2Smrg# 'no' user instructs the module not to use lint (default) 10769e35772b2Smrg# 10770e35772b2Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10771e35772b2Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1077272b676d7Smrg# 1077372b676d7SmrgAC_DEFUN([XORG_WITH_LINT],[ 1077472b676d7Smrg 10775e35772b2SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10776e35772b2SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10777e35772b2SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1077872b676d7Smrg [Use a lint-style source code checker (default: disabled)])], 1077972b676d7Smrg [use_lint=$withval], [use_lint=no]) 10780e35772b2Smrg 10781e35772b2Smrg# Obtain platform specific info like program name and options 10782e35772b2Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10783e35772b2Smrgcase $host_os in 10784e35772b2Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10785e35772b2Smrg lint_name=splint 10786e35772b2Smrg lint_options="-badflag" 10787e35772b2Smrg ;; 10788e35772b2Smrg *freebsd* | *netbsd*) 10789e35772b2Smrg lint_name=lint 10790e35772b2Smrg lint_options="-u -b" 10791e35772b2Smrg ;; 10792e35772b2Smrg *solaris*) 10793e35772b2Smrg lint_name=lint 10794e35772b2Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10795e35772b2Smrg ;; 10796e35772b2Smrgesac 10797e35772b2Smrg 10798e35772b2Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10799e35772b2Smrgif test "x$use_lint" = x"yes" ; then 10800e35772b2Smrg AC_PATH_PROG([LINT], [$lint_name]) 10801e35772b2Smrg if test "x$LINT" = "x"; then 10802e35772b2Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10803e35772b2Smrg fi 10804e35772b2Smrgelif test "x$use_lint" = x"no" ; then 10805e35772b2Smrg if test "x$LINT" != "x"; then 10806e35772b2Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10807e35772b2Smrg fi 1080872b676d7Smrgelse 10809e35772b2Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 1081072b676d7Smrgfi 10811e35772b2Smrg 10812e35772b2Smrg# User supplied flags override default flags 10813e35772b2Smrgif test "x$LINT_FLAGS" != "x"; then 10814e35772b2Smrg lint_options=$LINT_FLAGS 1081572b676d7Smrgfi 1081672b676d7Smrg 10817e35772b2SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10818e35772b2SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 1081972b676d7Smrg 1082072b676d7Smrg]) # XORG_WITH_LINT 1082172b676d7Smrg 1082272b676d7Smrg# XORG_LINT_LIBRARY(LIBNAME) 1082372b676d7Smrg# -------------------------- 1082472b676d7Smrg# Minimum version: 1.1.0 1082572b676d7Smrg# 1082672b676d7Smrg# Sets up flags for building lint libraries for checking programs that call 1082772b676d7Smrg# functions in the library. 1082872b676d7Smrg# 10829e35772b2Smrg# Interface to module: 10830e35772b2Smrg# LINTLIB - Automake variable with the name of lint library file to make 10831e35772b2Smrg# MAKE_LINT_LIB - Automake conditional 10832e35772b2Smrg# 10833e35772b2Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10834e35772b2Smrg# - 'no' user instructs the module not to create a lint library (default) 1083572b676d7Smrg 1083672b676d7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1083772b676d7SmrgAC_REQUIRE([XORG_WITH_LINT]) 10838e35772b2SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1083972b676d7Smrg [Create lint library (default: disabled)])], 1084072b676d7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10841e35772b2Smrg 10842e35772b2Smrgif test "x$make_lint_lib" = x"yes" ; then 10843e35772b2Smrg LINTLIB=llib-l$1.ln 10844e35772b2Smrg if test "x$LINT" = "x"; then 10845e35772b2Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10846e35772b2Smrg fi 10847e35772b2Smrgelif test "x$make_lint_lib" != x"no" ; then 10848e35772b2Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1084972b676d7Smrgfi 10850e35772b2Smrg 1085172b676d7SmrgAC_SUBST(LINTLIB) 1085272b676d7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1085372b676d7Smrg 1085472b676d7Smrg]) # XORG_LINT_LIBRARY 1085572b676d7Smrg 1085674c14cd6Smrg# XORG_COMPILER_BRAND 1085774c14cd6Smrg# ------------------- 1085874c14cd6Smrg# Minimum version: 1.14.0 1085974c14cd6Smrg# 1086074c14cd6Smrg# Checks for various brands of compilers and sets flags as appropriate: 1086174c14cd6Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1086274c14cd6Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1086374c14cd6Smrg# clang compiler - sets CLANGCC to "yes" 1086474c14cd6Smrg# Intel compiler - sets INTELCC to "yes" 1086574c14cd6Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1086674c14cd6Smrg# 1086774c14cd6SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1086874c14cd6SmrgAC_LANG_CASE( 1086974c14cd6Smrg [C], [ 1087074c14cd6Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1087174c14cd6Smrg ], 1087274c14cd6Smrg [C++], [ 1087374c14cd6Smrg AC_REQUIRE([AC_PROG_CXX]) 1087474c14cd6Smrg ] 1087574c14cd6Smrg) 1087674c14cd6SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1087774c14cd6SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1087874c14cd6SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1087974c14cd6Smrg]) # XORG_COMPILER_BRAND 1088074c14cd6Smrg 1088174c14cd6Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1088274c14cd6Smrg# --------------- 1088374c14cd6Smrg# Minimum version: 1.16.0 1088474c14cd6Smrg# 1088574c14cd6Smrg# Test if the compiler works when passed the given flag as a command line argument. 1088674c14cd6Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1088774c14cd6Smrg# next flag in the list until there are no more options. 1088874c14cd6Smrg# 1088974c14cd6Smrg# Note that this does not guarantee that the compiler supports the flag as some 1089074c14cd6Smrg# compilers will simply ignore arguments that they do not understand, but we do 1089174c14cd6Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1089274c14cd6Smrg# -Werror=unused-command-line-argument 1089374c14cd6Smrg# 1089474c14cd6SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1089574c14cd6Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1089674c14cd6Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1089774c14cd6Smrg 1089874c14cd6SmrgAC_LANG_COMPILER_REQUIRE 1089974c14cd6Smrg 1090074c14cd6SmrgAC_LANG_CASE( 1090174c14cd6Smrg [C], [ 1090274c14cd6Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1090374c14cd6Smrg define([PREFIX], [C]) 1090474c14cd6Smrg define([CACHE_PREFIX], [cc]) 1090574c14cd6Smrg define([COMPILER], [$CC]) 1090674c14cd6Smrg ], 1090774c14cd6Smrg [C++], [ 1090874c14cd6Smrg define([PREFIX], [CXX]) 1090974c14cd6Smrg define([CACHE_PREFIX], [cxx]) 1091074c14cd6Smrg define([COMPILER], [$CXX]) 1091174c14cd6Smrg ] 1091274c14cd6Smrg) 1091374c14cd6Smrg 1091474c14cd6Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1091574c14cd6Smrg 1091674c14cd6Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1091774c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1091874c14cd6Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1091974c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1092074c14cd6Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1092174c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1092274c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1092374c14cd6Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1092474c14cd6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1092574c14cd6Smrgfi 1092674c14cd6Smrg 1092774c14cd6Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1092874c14cd6Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1092974c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1093074c14cd6Smrg fi 1093174c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1093274c14cd6Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1093374c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1093474c14cd6Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1093574c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1093674c14cd6Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1093774c14cd6Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1093874c14cd6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1093974c14cd6Smrgfi 1094074c14cd6Smrg 1094174c14cd6Smrgfound="no" 1094274c14cd6Smrgm4_foreach([flag], m4_cdr($@), [ 1094374c14cd6Smrg if test $found = "no" ; then 1094421525869Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 1094574c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1094674c14cd6Smrg fi 1094774c14cd6Smrg 1094821525869Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 1094974c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1095074c14cd6Smrg fi 1095174c14cd6Smrg 1095274c14cd6Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1095374c14cd6Smrg 1095474c14cd6Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1095574c14cd6Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1095674c14cd6Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1095774c14cd6Smrg AC_CACHE_VAL($cacheid, 1095874c14cd6Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1095974c14cd6Smrg [eval $cacheid=yes], 1096074c14cd6Smrg [eval $cacheid=no])]) 1096174c14cd6Smrg 1096274c14cd6Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1096374c14cd6Smrg 1096474c14cd6Smrg eval supported=\$$cacheid 1096574c14cd6Smrg AC_MSG_RESULT([$supported]) 1096674c14cd6Smrg if test "$supported" = "yes" ; then 1096774c14cd6Smrg $1="$$1 ]flag[" 1096874c14cd6Smrg found="yes" 1096974c14cd6Smrg fi 1097074c14cd6Smrg fi 1097174c14cd6Smrg]) 1097274c14cd6Smrg]) # XORG_TESTSET_CFLAG 1097374c14cd6Smrg 1097474c14cd6Smrg# XORG_COMPILER_FLAGS 1097574c14cd6Smrg# --------------- 1097674c14cd6Smrg# Minimum version: 1.16.0 1097774c14cd6Smrg# 1097874c14cd6Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1097974c14cd6Smrg# arguments supported by the selected compiler which do NOT alter the generated 1098074c14cd6Smrg# code. These arguments will cause the compiler to print various warnings 1098174c14cd6Smrg# during compilation AND turn a conservative set of warnings into errors. 1098274c14cd6Smrg# 1098374c14cd6Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1098474c14cd6Smrg# future versions of util-macros as options are added to new compilers. 1098574c14cd6Smrg# 1098674c14cd6SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1098774c14cd6SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1098874c14cd6Smrg 1098974c14cd6SmrgAC_ARG_ENABLE(selective-werror, 1099074c14cd6Smrg AS_HELP_STRING([--disable-selective-werror], 1099174c14cd6Smrg [Turn off selective compiler errors. (default: enabled)]), 1099274c14cd6Smrg [SELECTIVE_WERROR=$enableval], 1099374c14cd6Smrg [SELECTIVE_WERROR=yes]) 1099474c14cd6Smrg 1099574c14cd6SmrgAC_LANG_CASE( 1099674c14cd6Smrg [C], [ 1099774c14cd6Smrg define([PREFIX], [C]) 1099874c14cd6Smrg ], 1099974c14cd6Smrg [C++], [ 1100074c14cd6Smrg define([PREFIX], [CXX]) 1100174c14cd6Smrg ] 1100274c14cd6Smrg) 1100374c14cd6Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1100474c14cd6Smrgif test "x$SUNCC" = "xyes"; then 1100574c14cd6Smrg [BASE_]PREFIX[FLAGS]="-v" 1100674c14cd6Smrgelse 1100774c14cd6Smrg [BASE_]PREFIX[FLAGS]="" 1100874c14cd6Smrgfi 1100974c14cd6Smrg 1101074c14cd6Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1101174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1101274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1101374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1101474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1101574c14cd6Smrg 1101674c14cd6SmrgAC_LANG_CASE( 1101774c14cd6Smrg [C], [ 1101874c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1101974c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1102074c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1102174c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1102221525869Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 1102374c14cd6Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1102474c14cd6Smrg ] 1102574c14cd6Smrg) 1102674c14cd6Smrg 1102774c14cd6Smrg# This chunk adds additional warnings that could catch undesired effects. 1102874c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1102974c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1103074c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1103174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1103274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1103374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1103421525869SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1103574c14cd6Smrg 1103674c14cd6Smrg# These are currently disabled because they are noisy. They will be enabled 1103774c14cd6Smrg# in the future once the codebase is sufficiently modernized to silence 1103874c14cd6Smrg# them. For now, I don't want them to drown out the other warnings. 1103974c14cd6Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1104074c14cd6Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1104121525869Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1104274c14cd6Smrg 1104374c14cd6Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1104474c14cd6Smrg# when there are problems that should be fixed. 1104574c14cd6Smrg 1104674c14cd6Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1104774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1104874c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1104974c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1105074c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1105174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1105274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1105374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1105474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1105574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1105674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1105774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1105874c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1105974c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1106074c14cd6Smrgelse 1106174c14cd6SmrgAC_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]) 1106274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1106374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1106474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1106574c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1106674c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1106774c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1106874c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1106974c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1107074c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1107174c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1107274c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1107374c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1107474c14cd6SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1107574c14cd6Smrgfi 1107674c14cd6Smrg 1107774c14cd6SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1107874c14cd6Smrg]) # XORG_COMPILER_FLAGS 1107974c14cd6Smrg 11080e47418d9Smrg# XORG_CWARNFLAGS 11081e47418d9Smrg# --------------- 11082e47418d9Smrg# Minimum version: 1.2.0 1108374c14cd6Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11084e47418d9Smrg# 11085e47418d9Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11086e47418d9Smrg# 1108774c14cd6Smrg# This function is deprecated because it defines -fno-strict-aliasing 1108874c14cd6Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1108974c14cd6Smrg# is needed, then it should be added explicitly in the module when 1109074c14cd6Smrg# it is updated to use BASE_CFLAGS. 1109174c14cd6Smrg# 11092e47418d9SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1109374c14cd6SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1109474c14cd6SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1109574c14cd6SmrgAC_LANG_CASE( 1109674c14cd6Smrg [C], [ 1109774c14cd6Smrg CWARNFLAGS="$BASE_CFLAGS" 1109874c14cd6Smrg if test "x$GCC" = xyes ; then 1109974c14cd6Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1110074c14cd6Smrg fi 1110174c14cd6Smrg AC_SUBST(CWARNFLAGS) 1110274c14cd6Smrg ] 1110374c14cd6Smrg) 11104e47418d9Smrg]) # XORG_CWARNFLAGS 11105e35772b2Smrg 11106e35772b2Smrg# XORG_STRICT_OPTION 11107e35772b2Smrg# ----------------------- 11108e35772b2Smrg# Minimum version: 1.3.0 11109e35772b2Smrg# 1111074c14cd6Smrg# Add configure option to enable strict compilation flags, such as treating 1111174c14cd6Smrg# warnings as fatal errors. 1111274c14cd6Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1111374c14cd6Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1111474c14cd6Smrg# 1111574c14cd6Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1111674c14cd6Smrg# when strict compilation is unconditionally desired. 11117e35772b2SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11118e35772b2SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1111974c14cd6SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11120e35772b2Smrg 11121e35772b2SmrgAC_ARG_ENABLE(strict-compilation, 11122e35772b2Smrg AS_HELP_STRING([--enable-strict-compilation], 11123e35772b2Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11124e35772b2Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1112574c14cd6Smrg 1112674c14cd6SmrgAC_LANG_CASE( 1112774c14cd6Smrg [C], [ 1112874c14cd6Smrg define([PREFIX], [C]) 1112974c14cd6Smrg ], 1113074c14cd6Smrg [C++], [ 1113174c14cd6Smrg define([PREFIX], [CXX]) 1113274c14cd6Smrg ] 1113374c14cd6Smrg) 1113474c14cd6Smrg 1113574c14cd6Smrg[STRICT_]PREFIX[FLAGS]="" 1113674c14cd6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1113774c14cd6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1113874c14cd6Smrg 1113974c14cd6Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1114074c14cd6Smrg# activate it with -Werror, so we add it here explicitly. 1114174c14cd6SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1114274c14cd6Smrg 11143e35772b2Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1114474c14cd6Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1114574c14cd6Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11146e35772b2Smrgfi 1114774c14cd6SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1114874c14cd6SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1114974c14cd6SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11150e35772b2Smrg]) # XORG_STRICT_OPTION 11151e35772b2Smrg 11152e35772b2Smrg# XORG_DEFAULT_OPTIONS 11153e35772b2Smrg# -------------------- 11154e35772b2Smrg# Minimum version: 1.3.0 11155e35772b2Smrg# 11156e35772b2Smrg# Defines default options for X.Org modules. 11157e35772b2Smrg# 11158e35772b2SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11159e35772b2SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1116074c14cd6SmrgXORG_COMPILER_FLAGS 11161e35772b2SmrgXORG_CWARNFLAGS 11162e35772b2SmrgXORG_STRICT_OPTION 11163e35772b2SmrgXORG_RELEASE_VERSION 11164e35772b2SmrgXORG_CHANGELOG 11165e35772b2SmrgXORG_INSTALL 11166e35772b2SmrgXORG_MANPAGE_SECTIONS 11167e35772b2Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11168e35772b2Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11169e35772b2Smrg]) # XORG_DEFAULT_OPTIONS 11170e35772b2Smrg 11171e35772b2Smrg# XORG_INSTALL() 11172e35772b2Smrg# ---------------- 11173e35772b2Smrg# Minimum version: 1.4.0 11174e35772b2Smrg# 11175e35772b2Smrg# Defines the variable INSTALL_CMD as the command to copy 11176e35772b2Smrg# INSTALL from $prefix/share/util-macros. 11177e35772b2Smrg# 11178e35772b2SmrgAC_DEFUN([XORG_INSTALL], [ 11179e35772b2SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11180e35772b2Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11181e35772b2SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11182e35772b2Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11183e35772b2Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11184e35772b2Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11185e35772b2SmrgAC_SUBST([INSTALL_CMD]) 11186e35772b2Smrg]) # XORG_INSTALL 1118772b676d7Smrgdnl Copyright 2005 Red Hat, Inc 1118872b676d7Smrgdnl 1118972b676d7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1119072b676d7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1119172b676d7Smrgdnl the above copyright notice appear in all copies and that both that 1119272b676d7Smrgdnl copyright notice and this permission notice appear in supporting 1119372b676d7Smrgdnl documentation. 1119472b676d7Smrgdnl 1119572b676d7Smrgdnl The above copyright notice and this permission notice shall be included 1119672b676d7Smrgdnl in all copies or substantial portions of the Software. 1119772b676d7Smrgdnl 1119872b676d7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1119972b676d7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1120072b676d7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1120172b676d7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1120272b676d7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1120372b676d7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1120472b676d7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1120572b676d7Smrgdnl 1120672b676d7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1120772b676d7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1120872b676d7Smrgdnl other dealings in this Software without prior written authorization 1120972b676d7Smrgdnl from the copyright holders. 1121072b676d7Smrgdnl 1121172b676d7Smrg 1121272b676d7Smrg# XORG_RELEASE_VERSION 1121372b676d7Smrg# -------------------- 11214e35772b2Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 1121521525869Smrg 1121672b676d7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 112171fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 112181fd23544Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 112191fd23544Smrg [Major version of this package]) 112201fd23544Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 112211fd23544Smrg if test "x$PVM" = "x"; then 112221fd23544Smrg PVM="0" 112231fd23544Smrg fi 112241fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 112251fd23544Smrg [$PVM], 112261fd23544Smrg [Minor version of this package]) 112271fd23544Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 112281fd23544Smrg if test "x$PVP" = "x"; then 112291fd23544Smrg PVP="0" 112301fd23544Smrg fi 112311fd23544Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 112321fd23544Smrg [$PVP], 112331fd23544Smrg [Patch version of this package]) 1123472b676d7Smrg]) 1123572b676d7Smrg 11236e47418d9Smrg# XORG_CHANGELOG() 11237e47418d9Smrg# ---------------- 11238e47418d9Smrg# Minimum version: 1.2.0 11239e47418d9Smrg# 11240e47418d9Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11241e47418d9Smrg# ChangeLog from git. 11242e47418d9Smrg# 11243e47418d9Smrg# 11244e47418d9SmrgAC_DEFUN([XORG_CHANGELOG], [ 11245e35772b2SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11246e35772b2Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11247e35772b2Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11248e47418d9Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11249e47418d9SmrgAC_SUBST([CHANGELOG_CMD]) 11250e47418d9Smrg]) # XORG_CHANGELOG 11251e47418d9Smrg 11252e35772b2Smrgdnl Copyright 2005 Red Hat, Inc 11253e35772b2Smrgdnl 11254e35772b2Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11255e35772b2Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11256e35772b2Smrgdnl the above copyright notice appear in all copies and that both that 11257e35772b2Smrgdnl copyright notice and this permission notice appear in supporting 11258e35772b2Smrgdnl documentation. 11259e35772b2Smrgdnl 11260e35772b2Smrgdnl The above copyright notice and this permission notice shall be included 11261e35772b2Smrgdnl in all copies or substantial portions of the Software. 11262e35772b2Smrgdnl 11263e35772b2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11264e35772b2Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11265e35772b2Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11266e35772b2Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11267e35772b2Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11268e35772b2Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11269e35772b2Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11270e35772b2Smrgdnl 11271e35772b2Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11272e35772b2Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11273e35772b2Smrgdnl other dealings in this Software without prior written authorization 11274e35772b2Smrgdnl from the copyright holders. 11275e35772b2Smrgdnl 11276e35772b2Smrg 1127721525869Smrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11278e35772b2Smrg# -------------------------- 1127921525869Smrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 1128021525869Smrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 11281e35772b2Smrg 11282e35772b2SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11283e35772b2Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11284e35772b2Smrg SAVE_CFLAGS="$CFLAGS" 11285e35772b2Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11286e35772b2Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11287e35772b2Smrg#include "xorg-server.h" 11288e35772b2Smrg#if !defined $1 11289e35772b2Smrg#error $1 not defined 11290e35772b2Smrg#endif 11291e35772b2Smrg ]])], 11292e35772b2Smrg [_EXT_CHECK=yes], 11293e35772b2Smrg [_EXT_CHECK=no]) 11294e35772b2Smrg CFLAGS="$SAVE_CFLAGS" 11295e35772b2Smrg AC_MSG_CHECKING([if $1 is defined]) 11296e35772b2Smrg AC_MSG_RESULT([$_EXT_CHECK]) 11297e35772b2Smrg if test "$_EXT_CHECK" != no; then 11298e35772b2Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11299e35772b2Smrg fi 11300e35772b2Smrg]) 11301e35772b2Smrg 1130274fcc364Smrg# Copyright (C) 2002-2017 Free Software Foundation, Inc. 1130372b676d7Smrg# 1130472b676d7Smrg# This file is free software; the Free Software Foundation 1130572b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1130672b676d7Smrg# with or without modifications, as long as this notice is preserved. 1130772b676d7Smrg 1130872b676d7Smrg# AM_AUTOMAKE_VERSION(VERSION) 1130972b676d7Smrg# ---------------------------- 1131072b676d7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 1131172b676d7Smrg# generated from the m4 files accompanying Automake X.Y. 113121fd23544Smrg# (This private macro should not be called outside this file.) 113131fd23544SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 1131493d9adc1Smrg[am__api_version='1.15' 113151fd23544Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 113161fd23544Smrgdnl require some minimum version. Point them to the right macro. 1131774fcc364Smrgm4_if([$1], [1.15.1], [], 113181fd23544Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 113191fd23544Smrg]) 113201fd23544Smrg 113211fd23544Smrg# _AM_AUTOCONF_VERSION(VERSION) 113221fd23544Smrg# ----------------------------- 113231fd23544Smrg# aclocal traces this macro to find the Autoconf version. 113241fd23544Smrg# This is a private macro too. Using m4_define simplifies 113251fd23544Smrg# the logic in aclocal, which can simply ignore this definition. 113261fd23544Smrgm4_define([_AM_AUTOCONF_VERSION], []) 1132772b676d7Smrg 1132872b676d7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 1132972b676d7Smrg# ------------------------------- 113301fd23544Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11331e47418d9Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 1133272b676d7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 1133374fcc364Smrg[AM_AUTOMAKE_VERSION([1.15.1])dnl 113341fd23544Smrgm4_ifndef([AC_AUTOCONF_VERSION], 113351fd23544Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11336e47418d9Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 1133772b676d7Smrg 1133872b676d7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 1133972b676d7Smrg 1134074fcc364Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1134172b676d7Smrg# 1134272b676d7Smrg# This file is free software; the Free Software Foundation 1134372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1134472b676d7Smrg# with or without modifications, as long as this notice is preserved. 1134572b676d7Smrg 1134672b676d7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 1134793d9adc1Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 1134893d9adc1Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 1134972b676d7Smrg# 1135072b676d7Smrg# Of course, Automake must honor this variable whenever it calls a 1135172b676d7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 1135272b676d7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 1135372b676d7Smrg# depending on how configure is run. This is pretty annoying, since 1135472b676d7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 1135572b676d7Smrg# source directory, any form will work fine, but in subdirectories a 1135672b676d7Smrg# relative path needs to be adjusted first. 1135772b676d7Smrg# 1135872b676d7Smrg# $ac_aux_dir/missing 1135972b676d7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 1136072b676d7Smrg# $top_srcdir/$ac_aux_dir/missing 1136172b676d7Smrg# fails if $ac_aux_dir is absolute, 1136272b676d7Smrg# fails when called from a subdirectory in a VPATH build with 1136372b676d7Smrg# a relative $ac_aux_dir 1136472b676d7Smrg# 1136572b676d7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 1136672b676d7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 1136793d9adc1Smrg# harmless because $srcdir is '.', but things will broke when you 1136872b676d7Smrg# start a VPATH build or use an absolute $srcdir. 1136972b676d7Smrg# 1137072b676d7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 1137172b676d7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 1137272b676d7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 1137372b676d7Smrg# and then we would define $MISSING as 1137472b676d7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 1137572b676d7Smrg# This will work as long as MISSING is not called from configure, because 1137672b676d7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 1137772b676d7Smrg# However there are other variables, like CC, which are often used in 1137872b676d7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 1137972b676d7Smrg# 1138072b676d7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 1138172b676d7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 1138272b676d7Smrg# configured tree to be moved without reconfiguration. 1138372b676d7Smrg 1138472b676d7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 1138593d9adc1Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 1138693d9adc1Smrg# Expand $ac_aux_dir to an absolute path. 1138793d9adc1Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 1138872b676d7Smrg]) 1138972b676d7Smrg 1139072b676d7Smrg# AM_CONDITIONAL -*- Autoconf -*- 1139172b676d7Smrg 1139274fcc364Smrg# Copyright (C) 1997-2017 Free Software Foundation, Inc. 1139372b676d7Smrg# 1139472b676d7Smrg# This file is free software; the Free Software Foundation 1139572b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1139672b676d7Smrg# with or without modifications, as long as this notice is preserved. 1139772b676d7Smrg 1139872b676d7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 1139972b676d7Smrg# ------------------------------------- 1140072b676d7Smrg# Define a conditional. 1140172b676d7SmrgAC_DEFUN([AM_CONDITIONAL], 1140293d9adc1Smrg[AC_PREREQ([2.52])dnl 1140393d9adc1Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 1140493d9adc1Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 114051fd23544SmrgAC_SUBST([$1_TRUE])dnl 114061fd23544SmrgAC_SUBST([$1_FALSE])dnl 114071fd23544Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 114081fd23544Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11409e47418d9Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 1141072b676d7Smrgif $2; then 1141172b676d7Smrg $1_TRUE= 1141272b676d7Smrg $1_FALSE='#' 1141372b676d7Smrgelse 1141472b676d7Smrg $1_TRUE='#' 1141572b676d7Smrg $1_FALSE= 1141672b676d7Smrgfi 1141772b676d7SmrgAC_CONFIG_COMMANDS_PRE( 1141872b676d7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 1141972b676d7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 1142072b676d7SmrgUsually this means the macro was only invoked conditionally.]]) 1142172b676d7Smrgfi])]) 1142272b676d7Smrg 1142374fcc364Smrg# Copyright (C) 1999-2017 Free Software Foundation, Inc. 1142472b676d7Smrg# 1142572b676d7Smrg# This file is free software; the Free Software Foundation 1142672b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1142772b676d7Smrg# with or without modifications, as long as this notice is preserved. 1142872b676d7Smrg 1142972b676d7Smrg 1143093d9adc1Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 1143172b676d7Smrg# written in clear, in which case automake, when reading aclocal.m4, 1143272b676d7Smrg# will think it sees a *use*, and therefore will trigger all it's 1143372b676d7Smrg# C support machinery. Also note that it means that autoscan, seeing 1143472b676d7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 1143572b676d7Smrg 1143672b676d7Smrg 1143772b676d7Smrg# _AM_DEPENDENCIES(NAME) 1143872b676d7Smrg# ---------------------- 1143972b676d7Smrg# See how the compiler implements dependency checking. 1144093d9adc1Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 1144172b676d7Smrg# We try a few techniques and use that to set a single cache variable. 1144272b676d7Smrg# 1144372b676d7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 1144472b676d7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 1144572b676d7Smrg# dependency, and given that the user is not expected to run this macro, 1144672b676d7Smrg# just rely on AC_PROG_CC. 1144772b676d7SmrgAC_DEFUN([_AM_DEPENDENCIES], 1144872b676d7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 1144972b676d7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 1145072b676d7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 1145172b676d7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 1145272b676d7Smrg 1145393d9adc1Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 1145493d9adc1Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 1145593d9adc1Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 1145693d9adc1Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 1145793d9adc1Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 1145893d9adc1Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 1145993d9adc1Smrg [depcc="$$1" am_compiler_list=]) 1146072b676d7Smrg 1146172b676d7SmrgAC_CACHE_CHECK([dependency style of $depcc], 1146272b676d7Smrg [am_cv_$1_dependencies_compiler_type], 1146372b676d7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 1146472b676d7Smrg # We make a subdir and do the tests there. Otherwise we can end up 1146572b676d7Smrg # making bogus files that we don't know about and never remove. For 1146672b676d7Smrg # instance it was reported that on HP-UX the gcc test will end up 1146793d9adc1Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 1146893d9adc1Smrg # in D". 1146974c14cd6Smrg rm -rf conftest.dir 1147072b676d7Smrg mkdir conftest.dir 1147172b676d7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 1147272b676d7Smrg # using a relative directory. 1147372b676d7Smrg cp "$am_depcomp" conftest.dir 1147472b676d7Smrg cd conftest.dir 1147572b676d7Smrg # We will build objects and dependencies in a subdirectory because 1147672b676d7Smrg # it helps to detect inapplicable dependency modes. For instance 1147772b676d7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 1147872b676d7Smrg # side effect of compilation, but ICC will put the dependencies in 1147972b676d7Smrg # the current directory while Tru64 will put them in the object 1148072b676d7Smrg # directory. 1148172b676d7Smrg mkdir sub 1148272b676d7Smrg 1148372b676d7Smrg am_cv_$1_dependencies_compiler_type=none 1148472b676d7Smrg if test "$am_compiler_list" = ""; then 1148572b676d7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 1148672b676d7Smrg fi 11487e47418d9Smrg am__universal=false 11488e47418d9Smrg m4_case([$1], [CC], 11489e47418d9Smrg [case " $depcc " in #( 11490e47418d9Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11491e47418d9Smrg esac], 11492e47418d9Smrg [CXX], 11493e47418d9Smrg [case " $depcc " in #( 11494e47418d9Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11495e47418d9Smrg esac]) 11496e47418d9Smrg 1149772b676d7Smrg for depmode in $am_compiler_list; do 1149872b676d7Smrg # Setup a source with many dependencies, because some compilers 1149972b676d7Smrg # like to wrap large dependency lists on column 80 (with \), and 1150072b676d7Smrg # we should not choose a depcomp mode which is confused by this. 1150172b676d7Smrg # 1150272b676d7Smrg # We need to recreate these files for each test, as the compiler may 1150372b676d7Smrg # overwrite some of them when testing with obscure command lines. 1150472b676d7Smrg # This happens at least with the AIX C compiler. 1150572b676d7Smrg : > sub/conftest.c 1150672b676d7Smrg for i in 1 2 3 4 5 6; do 1150772b676d7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 1150893d9adc1Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 1150993d9adc1Smrg # Solaris 10 /bin/sh. 1151093d9adc1Smrg echo '/* dummy */' > sub/conftst$i.h 1151172b676d7Smrg done 1151272b676d7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 1151372b676d7Smrg 1151493d9adc1Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 11515e47418d9Smrg # mode. It turns out that the SunPro C++ compiler does not properly 1151693d9adc1Smrg # handle '-M -o', and we need to detect this. Also, some Intel 1151793d9adc1Smrg # versions had trouble with output in subdirs. 11518e47418d9Smrg am__obj=sub/conftest.${OBJEXT-o} 11519e47418d9Smrg am__minus_obj="-o $am__obj" 1152072b676d7Smrg case $depmode in 11521e47418d9Smrg gcc) 11522e47418d9Smrg # This depmode causes a compiler race in universal mode. 11523e47418d9Smrg test "$am__universal" = false || continue 11524e47418d9Smrg ;; 1152572b676d7Smrg nosideeffect) 1152693d9adc1Smrg # After this tag, mechanisms are not by side-effect, so they'll 1152793d9adc1Smrg # only be used when explicitly requested. 1152872b676d7Smrg if test "x$enable_dependency_tracking" = xyes; then 1152972b676d7Smrg continue 1153072b676d7Smrg else 1153172b676d7Smrg break 1153272b676d7Smrg fi 1153372b676d7Smrg ;; 1153474c14cd6Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 1153593d9adc1Smrg # This compiler won't grok '-c -o', but also, the minuso test has 11536e47418d9Smrg # not run yet. These depmodes are late enough in the game, and 11537e47418d9Smrg # so weak that their functioning should not be impacted. 11538e47418d9Smrg am__obj=conftest.${OBJEXT-o} 11539e47418d9Smrg am__minus_obj= 11540e47418d9Smrg ;; 1154172b676d7Smrg none) break ;; 1154272b676d7Smrg esac 1154372b676d7Smrg if depmode=$depmode \ 11544e47418d9Smrg source=sub/conftest.c object=$am__obj \ 1154572b676d7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11546e47418d9Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 1154772b676d7Smrg >/dev/null 2>conftest.err && 115481fd23544Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 1154972b676d7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11550e47418d9Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 1155172b676d7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 1155272b676d7Smrg # icc doesn't choke on unknown options, it will just issue warnings 1155372b676d7Smrg # or remarks (even with -Werror). So we grep stderr for any message 1155472b676d7Smrg # that says an option was ignored or not supported. 1155572b676d7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 1155672b676d7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 1155772b676d7Smrg # The diagnosis changed in icc 8.0: 1155872b676d7Smrg # icc: Command line remark: option '-MP' not supported 1155972b676d7Smrg if (grep 'ignoring option' conftest.err || 1156072b676d7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 1156172b676d7Smrg am_cv_$1_dependencies_compiler_type=$depmode 1156272b676d7Smrg break 1156372b676d7Smrg fi 1156472b676d7Smrg fi 1156572b676d7Smrg done 1156672b676d7Smrg 1156772b676d7Smrg cd .. 1156872b676d7Smrg rm -rf conftest.dir 1156972b676d7Smrgelse 1157072b676d7Smrg am_cv_$1_dependencies_compiler_type=none 1157172b676d7Smrgfi 1157272b676d7Smrg]) 1157372b676d7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 1157472b676d7SmrgAM_CONDITIONAL([am__fastdep$1], [ 1157572b676d7Smrg test "x$enable_dependency_tracking" != xno \ 1157672b676d7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 1157772b676d7Smrg]) 1157872b676d7Smrg 1157972b676d7Smrg 1158072b676d7Smrg# AM_SET_DEPDIR 1158172b676d7Smrg# ------------- 1158272b676d7Smrg# Choose a directory name for dependency files. 1158393d9adc1Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 1158472b676d7SmrgAC_DEFUN([AM_SET_DEPDIR], 1158572b676d7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 1158672b676d7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 1158772b676d7Smrg]) 1158872b676d7Smrg 1158972b676d7Smrg 1159072b676d7Smrg# AM_DEP_TRACK 1159172b676d7Smrg# ------------ 1159272b676d7SmrgAC_DEFUN([AM_DEP_TRACK], 1159393d9adc1Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 1159493d9adc1SmrgAS_HELP_STRING( 1159593d9adc1Smrg [--enable-dependency-tracking], 1159693d9adc1Smrg [do not reject slow dependency extractors]) 1159793d9adc1SmrgAS_HELP_STRING( 1159893d9adc1Smrg [--disable-dependency-tracking], 1159993d9adc1Smrg [speeds up one-time build])]) 1160072b676d7Smrgif test "x$enable_dependency_tracking" != xno; then 1160172b676d7Smrg am_depcomp="$ac_aux_dir/depcomp" 1160272b676d7Smrg AMDEPBACKSLASH='\' 1160374c14cd6Smrg am__nodep='_no' 1160472b676d7Smrgfi 1160572b676d7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 116061fd23544SmrgAC_SUBST([AMDEPBACKSLASH])dnl 116071fd23544Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 1160874c14cd6SmrgAC_SUBST([am__nodep])dnl 1160974c14cd6Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 1161072b676d7Smrg]) 1161172b676d7Smrg 1161272b676d7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 1161372b676d7Smrg 1161474fcc364Smrg# Copyright (C) 1999-2017 Free Software Foundation, Inc. 1161572b676d7Smrg# 1161672b676d7Smrg# This file is free software; the Free Software Foundation 1161772b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1161872b676d7Smrg# with or without modifications, as long as this notice is preserved. 1161972b676d7Smrg 1162072b676d7Smrg 1162172b676d7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 1162272b676d7Smrg# ------------------------------ 1162372b676d7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11624e47418d9Smrg[{ 1162593d9adc1Smrg # Older Autoconf quotes --file arguments for eval, but not when files 11626e47418d9Smrg # are listed without --file. Let's play safe and only enable the eval 11627e47418d9Smrg # if we detect the quoting. 11628e47418d9Smrg case $CONFIG_FILES in 11629e47418d9Smrg *\'*) eval set x "$CONFIG_FILES" ;; 11630e47418d9Smrg *) set x $CONFIG_FILES ;; 11631e47418d9Smrg esac 11632e47418d9Smrg shift 11633e47418d9Smrg for mf 11634e47418d9Smrg do 11635e47418d9Smrg # Strip MF so we end up with the name of the file. 11636e47418d9Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11637e47418d9Smrg # Check whether this is an Automake generated Makefile or not. 1163893d9adc1Smrg # We used to match only the files named 'Makefile.in', but 11639e47418d9Smrg # some people rename them; so instead we look at the file content. 11640e47418d9Smrg # Grep'ing the first line is not enough: some people post-process 11641e47418d9Smrg # each Makefile.in and add a new line on top of each file to say so. 11642e47418d9Smrg # Grep'ing the whole file is not good either: AIX grep has a line 11643e47418d9Smrg # limit of 2048, but all sed's we know have understand at least 4000. 11644e47418d9Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11645e47418d9Smrg dirpart=`AS_DIRNAME("$mf")` 11646e47418d9Smrg else 11647e47418d9Smrg continue 11648e47418d9Smrg fi 11649e47418d9Smrg # Extract the definition of DEPDIR, am__include, and am__quote 1165093d9adc1Smrg # from the Makefile without running 'make'. 11651e47418d9Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11652e47418d9Smrg test -z "$DEPDIR" && continue 11653e47418d9Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 1165493d9adc1Smrg test -z "$am__include" && continue 11655e47418d9Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11656e47418d9Smrg # Find all dependency output files, they are included files with 11657e47418d9Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11658e47418d9Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 11659e47418d9Smrg # expansion. 11660e47418d9Smrg for file in `sed -n " 11661e47418d9Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 1166293d9adc1Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11663e47418d9Smrg # Make sure the directory exists. 11664e47418d9Smrg test -f "$dirpart/$file" && continue 11665e47418d9Smrg fdir=`AS_DIRNAME(["$file"])` 11666e47418d9Smrg AS_MKDIR_P([$dirpart/$fdir]) 11667e47418d9Smrg # echo "creating $dirpart/$file" 11668e47418d9Smrg echo '# dummy' > "$dirpart/$file" 11669e47418d9Smrg done 1167072b676d7Smrg done 11671e47418d9Smrg} 1167272b676d7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 1167372b676d7Smrg 1167472b676d7Smrg 1167572b676d7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 1167672b676d7Smrg# ----------------------------- 1167772b676d7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 1167872b676d7Smrg# 1167972b676d7Smrg# This code is only required when automatic dependency tracking 1168093d9adc1Smrg# is enabled. FIXME. This creates each '.P' file that we will 1168172b676d7Smrg# need in order to bootstrap the dependency handling code. 1168272b676d7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 1168372b676d7Smrg[AC_CONFIG_COMMANDS([depfiles], 1168472b676d7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 1168572b676d7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 1168672b676d7Smrg]) 1168772b676d7Smrg 1168872b676d7Smrg# Do all the work for Automake. -*- Autoconf -*- 1168972b676d7Smrg 1169074fcc364Smrg# Copyright (C) 1996-2017 Free Software Foundation, Inc. 1169172b676d7Smrg# 1169272b676d7Smrg# This file is free software; the Free Software Foundation 1169372b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1169472b676d7Smrg# with or without modifications, as long as this notice is preserved. 1169572b676d7Smrg 1169672b676d7Smrg# This macro actually does too much. Some checks are only needed if 1169772b676d7Smrg# your package does certain things. But this isn't really a big deal. 1169872b676d7Smrg 1169993d9adc1Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 1170093d9adc1Smrgm4_define([AC_PROG_CC], 1170193d9adc1Smrgm4_defn([AC_PROG_CC]) 1170293d9adc1Smrg[_AM_PROG_CC_C_O 1170393d9adc1Smrg]) 1170493d9adc1Smrg 1170572b676d7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 1170672b676d7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 1170772b676d7Smrg# ----------------------------------------------- 1170872b676d7Smrg# The call with PACKAGE and VERSION arguments is the old style 1170972b676d7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 1171072b676d7Smrg# and VERSION should now be passed to AC_INIT and removed from 1171172b676d7Smrg# the call to AM_INIT_AUTOMAKE. 1171272b676d7Smrg# We support both call styles for the transition. After 1171372b676d7Smrg# the next Automake release, Autoconf can make the AC_INIT 1171472b676d7Smrg# arguments mandatory, and then we can depend on a new Autoconf 1171572b676d7Smrg# release and drop the old call support. 1171672b676d7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 1171793d9adc1Smrg[AC_PREREQ([2.65])dnl 1171872b676d7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 1171972b676d7Smrgdnl the ones we care about. 1172072b676d7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 1172172b676d7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 1172272b676d7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 117231fd23544Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 117241fd23544Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 117251fd23544Smrg # is not polluted with repeated "-I." 117261fd23544Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 117271fd23544Smrg # test to see if srcdir already configured 117281fd23544Smrg if test -f $srcdir/config.status; then 117291fd23544Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 117301fd23544Smrg fi 1173172b676d7Smrgfi 1173272b676d7Smrg 1173372b676d7Smrg# test whether we have cygpath 1173472b676d7Smrgif test -z "$CYGPATH_W"; then 1173572b676d7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 1173672b676d7Smrg CYGPATH_W='cygpath -w' 1173772b676d7Smrg else 1173872b676d7Smrg CYGPATH_W=echo 1173972b676d7Smrg fi 1174072b676d7Smrgfi 1174172b676d7SmrgAC_SUBST([CYGPATH_W]) 1174272b676d7Smrg 1174372b676d7Smrg# Define the identity of the package. 1174472b676d7Smrgdnl Distinguish between old-style and new-style calls. 1174572b676d7Smrgm4_ifval([$2], 1174693d9adc1Smrg[AC_DIAGNOSE([obsolete], 1174793d9adc1Smrg [$0: two- and three-arguments forms are deprecated.]) 1174893d9adc1Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 1174972b676d7Smrg AC_SUBST([PACKAGE], [$1])dnl 1175072b676d7Smrg AC_SUBST([VERSION], [$2])], 1175172b676d7Smrg[_AM_SET_OPTIONS([$1])dnl 117521fd23544Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 1175393d9adc1Smrgm4_if( 1175493d9adc1Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 1175593d9adc1Smrg [ok:ok],, 117561fd23544Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 1175772b676d7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 1175872b676d7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 1175972b676d7Smrg 1176072b676d7Smrg_AM_IF_OPTION([no-define],, 1176193d9adc1Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 1176293d9adc1Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 1176372b676d7Smrg 1176472b676d7Smrg# Some tools Automake needs. 1176572b676d7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 1176672b676d7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 1176793d9adc1SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 1176893d9adc1SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 1176993d9adc1SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 1177093d9adc1SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 1177193d9adc1SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11772e47418d9SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11773e47418d9SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 1177493d9adc1SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 1177593d9adc1Smrg# For better backward compatibility. To be removed once Automake 1.9.x 1177693d9adc1Smrg# dies out for good. For more background, see: 1177793d9adc1Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 1177893d9adc1Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 1177993d9adc1SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 1178093d9adc1Smrg# We need awk for the "check" target (and possibly the TAP driver). The 1178193d9adc1Smrg# system "awk" is bad on some platforms. 1178272b676d7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 1178372b676d7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 1178472b676d7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 1178572b676d7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11786e47418d9Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11787e47418d9Smrg [_AM_PROG_TAR([v7])])]) 1178872b676d7Smrg_AM_IF_OPTION([no-dependencies],, 1178972b676d7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 1179093d9adc1Smrg [_AM_DEPENDENCIES([CC])], 1179193d9adc1Smrg [m4_define([AC_PROG_CC], 1179293d9adc1Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 1179372b676d7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 1179493d9adc1Smrg [_AM_DEPENDENCIES([CXX])], 1179593d9adc1Smrg [m4_define([AC_PROG_CXX], 1179693d9adc1Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 117971fd23544SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 1179893d9adc1Smrg [_AM_DEPENDENCIES([OBJC])], 1179993d9adc1Smrg [m4_define([AC_PROG_OBJC], 1180093d9adc1Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 1180193d9adc1SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 1180293d9adc1Smrg [_AM_DEPENDENCIES([OBJCXX])], 1180393d9adc1Smrg [m4_define([AC_PROG_OBJCXX], 1180493d9adc1Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 1180572b676d7Smrg]) 1180693d9adc1SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 1180793d9adc1Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 1180893d9adc1Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 1180993d9adc1Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11810e47418d9SmrgAC_CONFIG_COMMANDS_PRE(dnl 11811e47418d9Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11812e47418d9Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 1181393d9adc1Smrg 1181493d9adc1Smrg# POSIX will say in a future version that running "rm -f" with no argument 1181593d9adc1Smrg# is OK; and we want to be able to make that assumption in our Makefile 1181693d9adc1Smrg# recipes. So use an aggressive probe to check that the usage we want is 1181793d9adc1Smrg# actually supported "in the wild" to an acceptable degree. 1181893d9adc1Smrg# See automake bug#10828. 1181993d9adc1Smrg# To make any issue more visible, cause the running configure to be aborted 1182093d9adc1Smrg# by default if the 'rm' program in use doesn't match our expectations; the 1182193d9adc1Smrg# user can still override this though. 1182293d9adc1Smrgif rm -f && rm -fr && rm -rf; then : OK; else 1182393d9adc1Smrg cat >&2 <<'END' 1182493d9adc1SmrgOops! 1182593d9adc1Smrg 1182693d9adc1SmrgYour 'rm' program seems unable to run without file operands specified 1182793d9adc1Smrgon the command line, even when the '-f' option is present. This is contrary 1182893d9adc1Smrgto the behaviour of most rm programs out there, and not conforming with 1182993d9adc1Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 1183093d9adc1Smrg 1183193d9adc1SmrgPlease tell bug-automake@gnu.org about your system, including the value 1183293d9adc1Smrgof your $PATH and any error possibly output before this message. This 1183393d9adc1Smrgcan help us improve future automake versions. 1183493d9adc1Smrg 1183593d9adc1SmrgEND 1183693d9adc1Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 1183793d9adc1Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 1183893d9adc1Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 1183993d9adc1Smrg echo >&2 1184093d9adc1Smrg else 1184193d9adc1Smrg cat >&2 <<'END' 1184293d9adc1SmrgAborting the configuration process, to ensure you take notice of the issue. 1184393d9adc1Smrg 1184493d9adc1SmrgYou can download and install GNU coreutils to get an 'rm' implementation 1184593d9adc1Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 1184693d9adc1Smrg 1184793d9adc1SmrgIf you want to complete the configuration process using your problematic 1184893d9adc1Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 1184993d9adc1Smrgto "yes", and re-run configure. 1185093d9adc1Smrg 1185193d9adc1SmrgEND 1185293d9adc1Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 1185393d9adc1Smrg fi 1185493d9adc1Smrgfi 1185593d9adc1Smrgdnl The trailing newline in this macro's definition is deliberate, for 1185693d9adc1Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 1185793d9adc1Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 1185872b676d7Smrg]) 1185972b676d7Smrg 1186093d9adc1Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11861e47418d9Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11862e47418d9Smrgdnl mangled by Autoconf and run in a shell conditional statement. 11863e47418d9Smrgm4_define([_AC_COMPILER_EXEEXT], 11864e47418d9Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11865e47418d9Smrg 1186672b676d7Smrg# When config.status generates a header, we must update the stamp-h file. 1186772b676d7Smrg# This file resides in the same directory as the config header 1186872b676d7Smrg# that is generated. The stamp files are numbered to have different names. 1186972b676d7Smrg 1187072b676d7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 1187172b676d7Smrg# loop where config.status creates the headers, so we can generate 1187272b676d7Smrg# our stamp files there. 1187372b676d7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 1187472b676d7Smrg[# Compute $1's index in $config_headers. 118751fd23544Smrg_am_arg=$1 1187672b676d7Smrg_am_stamp_count=1 1187772b676d7Smrgfor _am_header in $config_headers :; do 1187872b676d7Smrg case $_am_header in 118791fd23544Smrg $_am_arg | $_am_arg:* ) 1188072b676d7Smrg break ;; 1188172b676d7Smrg * ) 1188272b676d7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 1188372b676d7Smrg esac 1188472b676d7Smrgdone 118851fd23544Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 1188672b676d7Smrg 1188774fcc364Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1188872b676d7Smrg# 1188972b676d7Smrg# This file is free software; the Free Software Foundation 1189072b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1189172b676d7Smrg# with or without modifications, as long as this notice is preserved. 1189272b676d7Smrg 1189372b676d7Smrg# AM_PROG_INSTALL_SH 1189472b676d7Smrg# ------------------ 1189572b676d7Smrg# Define $install_sh. 1189672b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 1189772b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1189893d9adc1Smrgif test x"${install_sh+set}" != xset; then 11899e47418d9Smrg case $am_aux_dir in 11900e47418d9Smrg *\ * | *\ *) 11901e47418d9Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11902e47418d9Smrg *) 11903e47418d9Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11904e47418d9Smrg esac 11905e47418d9Smrgfi 1190693d9adc1SmrgAC_SUBST([install_sh])]) 1190772b676d7Smrg 1190874fcc364Smrg# Copyright (C) 2003-2017 Free Software Foundation, Inc. 1190972b676d7Smrg# 1191072b676d7Smrg# This file is free software; the Free Software Foundation 1191172b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1191272b676d7Smrg# with or without modifications, as long as this notice is preserved. 1191372b676d7Smrg 1191472b676d7Smrg# Check whether the underlying file-system supports filenames 1191572b676d7Smrg# with a leading dot. For instance MS-DOS doesn't. 1191672b676d7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 1191772b676d7Smrg[rm -rf .tst 2>/dev/null 1191872b676d7Smrgmkdir .tst 2>/dev/null 1191972b676d7Smrgif test -d .tst; then 1192072b676d7Smrg am__leading_dot=. 1192172b676d7Smrgelse 1192272b676d7Smrg am__leading_dot=_ 1192372b676d7Smrgfi 1192472b676d7Smrgrmdir .tst 2>/dev/null 1192572b676d7SmrgAC_SUBST([am__leading_dot])]) 1192672b676d7Smrg 1192772b676d7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 1192872b676d7Smrg 1192974fcc364Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1193072b676d7Smrg# 1193172b676d7Smrg# This file is free software; the Free Software Foundation 1193272b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1193372b676d7Smrg# with or without modifications, as long as this notice is preserved. 1193472b676d7Smrg 1193572b676d7Smrg# AM_MAKE_INCLUDE() 1193672b676d7Smrg# ----------------- 1193772b676d7Smrg# Check to see how make treats includes. 1193872b676d7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 1193972b676d7Smrg[am_make=${MAKE-make} 1194072b676d7Smrgcat > confinc << 'END' 1194172b676d7Smrgam__doit: 11942e47418d9Smrg @echo this is the am__doit target 1194372b676d7Smrg.PHONY: am__doit 1194472b676d7SmrgEND 1194572b676d7Smrg# If we don't find an include directive, just comment out the code. 1194672b676d7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 1194772b676d7Smrgam__include="#" 1194872b676d7Smrgam__quote= 1194972b676d7Smrg_am_result=none 1195072b676d7Smrg# First try GNU make style include. 1195172b676d7Smrgecho "include confinc" > confmf 1195293d9adc1Smrg# Ignore all kinds of additional output from 'make'. 11953e47418d9Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11954e47418d9Smrg*the\ am__doit\ target*) 11955e47418d9Smrg am__include=include 11956e47418d9Smrg am__quote= 11957e47418d9Smrg _am_result=GNU 11958e47418d9Smrg ;; 11959e47418d9Smrgesac 1196072b676d7Smrg# Now try BSD make style include. 1196172b676d7Smrgif test "$am__include" = "#"; then 1196272b676d7Smrg echo '.include "confinc"' > confmf 11963e47418d9Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 11964e47418d9Smrg *the\ am__doit\ target*) 11965e47418d9Smrg am__include=.include 11966e47418d9Smrg am__quote="\"" 11967e47418d9Smrg _am_result=BSD 11968e47418d9Smrg ;; 11969e47418d9Smrg esac 1197072b676d7Smrgfi 1197172b676d7SmrgAC_SUBST([am__include]) 1197272b676d7SmrgAC_SUBST([am__quote]) 1197372b676d7SmrgAC_MSG_RESULT([$_am_result]) 1197472b676d7Smrgrm -f confinc confmf 1197572b676d7Smrg]) 1197672b676d7Smrg 1197772b676d7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 1197872b676d7Smrg 1197974fcc364Smrg# Copyright (C) 1997-2017 Free Software Foundation, Inc. 1198072b676d7Smrg# 1198172b676d7Smrg# This file is free software; the Free Software Foundation 1198272b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1198372b676d7Smrg# with or without modifications, as long as this notice is preserved. 1198472b676d7Smrg 1198572b676d7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 1198672b676d7Smrg# ------------------------------ 1198772b676d7SmrgAC_DEFUN([AM_MISSING_PROG], 1198872b676d7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 1198972b676d7Smrg$1=${$1-"${am_missing_run}$2"} 1199072b676d7SmrgAC_SUBST($1)]) 1199172b676d7Smrg 1199272b676d7Smrg# AM_MISSING_HAS_RUN 1199372b676d7Smrg# ------------------ 1199493d9adc1Smrg# Define MISSING if not defined so far and test if it is modern enough. 1199593d9adc1Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 1199672b676d7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 1199772b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 119981fd23544SmrgAC_REQUIRE_AUX_FILE([missing])dnl 11999e47418d9Smrgif test x"${MISSING+set}" != xset; then 12000e47418d9Smrg case $am_aux_dir in 12001e47418d9Smrg *\ * | *\ *) 12002e47418d9Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 12003e47418d9Smrg *) 12004e47418d9Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 12005e47418d9Smrg esac 12006e47418d9Smrgfi 1200772b676d7Smrg# Use eval to expand $SHELL 1200893d9adc1Smrgif eval "$MISSING --is-lightweight"; then 1200993d9adc1Smrg am_missing_run="$MISSING " 1201072b676d7Smrgelse 1201172b676d7Smrg am_missing_run= 1201293d9adc1Smrg AC_MSG_WARN(['missing' script is too old or missing]) 1201372b676d7Smrgfi 1201472b676d7Smrg]) 1201572b676d7Smrg 1201672b676d7Smrg# Helper functions for option handling. -*- Autoconf -*- 1201772b676d7Smrg 1201874fcc364Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1201972b676d7Smrg# 1202072b676d7Smrg# This file is free software; the Free Software Foundation 1202172b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1202272b676d7Smrg# with or without modifications, as long as this notice is preserved. 1202372b676d7Smrg 1202472b676d7Smrg# _AM_MANGLE_OPTION(NAME) 1202572b676d7Smrg# ----------------------- 1202672b676d7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 1202772b676d7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 1202872b676d7Smrg 1202972b676d7Smrg# _AM_SET_OPTION(NAME) 1203074c14cd6Smrg# -------------------- 1203172b676d7Smrg# Set option NAME. Presently that only means defining a flag for this option. 1203272b676d7SmrgAC_DEFUN([_AM_SET_OPTION], 1203393d9adc1Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 1203472b676d7Smrg 1203572b676d7Smrg# _AM_SET_OPTIONS(OPTIONS) 1203674c14cd6Smrg# ------------------------ 1203772b676d7Smrg# OPTIONS is a space-separated list of Automake options. 1203872b676d7SmrgAC_DEFUN([_AM_SET_OPTIONS], 12039e47418d9Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1204072b676d7Smrg 1204172b676d7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1204272b676d7Smrg# ------------------------------------------- 1204372b676d7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1204472b676d7SmrgAC_DEFUN([_AM_IF_OPTION], 1204572b676d7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1204672b676d7Smrg 1204774fcc364Smrg# Copyright (C) 1999-2017 Free Software Foundation, Inc. 1204893d9adc1Smrg# 1204993d9adc1Smrg# This file is free software; the Free Software Foundation 1205093d9adc1Smrg# gives unlimited permission to copy and/or distribute it, 1205193d9adc1Smrg# with or without modifications, as long as this notice is preserved. 1205272b676d7Smrg 1205393d9adc1Smrg# _AM_PROG_CC_C_O 1205493d9adc1Smrg# --------------- 1205593d9adc1Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 1205693d9adc1Smrg# to automatically call this. 1205793d9adc1SmrgAC_DEFUN([_AM_PROG_CC_C_O], 1205893d9adc1Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1205993d9adc1SmrgAC_REQUIRE_AUX_FILE([compile])dnl 1206093d9adc1SmrgAC_LANG_PUSH([C])dnl 1206193d9adc1SmrgAC_CACHE_CHECK( 1206293d9adc1Smrg [whether $CC understands -c and -o together], 1206393d9adc1Smrg [am_cv_prog_cc_c_o], 1206493d9adc1Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 1206593d9adc1Smrg # Make sure it works both with $CC and with simple cc. 1206693d9adc1Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 1206793d9adc1Smrg # compilers refuse to overwrite an existing .o file with -o, 1206893d9adc1Smrg # though they will create one. 1206993d9adc1Smrg am_cv_prog_cc_c_o=yes 1207093d9adc1Smrg for am_i in 1 2; do 1207193d9adc1Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 1207293d9adc1Smrg && test -f conftest2.$ac_objext; then 1207393d9adc1Smrg : OK 1207493d9adc1Smrg else 1207593d9adc1Smrg am_cv_prog_cc_c_o=no 1207693d9adc1Smrg break 1207793d9adc1Smrg fi 1207893d9adc1Smrg done 1207993d9adc1Smrg rm -f core conftest* 1208093d9adc1Smrg unset am_i]) 1208193d9adc1Smrgif test "$am_cv_prog_cc_c_o" != yes; then 1208293d9adc1Smrg # Losing compiler, so override with the script. 1208393d9adc1Smrg # FIXME: It is wrong to rewrite CC. 1208493d9adc1Smrg # But if we don't then we get into trouble of one sort or another. 1208593d9adc1Smrg # A longer-term fix would be to have automake use am__CC in this case, 1208693d9adc1Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 1208793d9adc1Smrg CC="$am_aux_dir/compile $CC" 1208893d9adc1Smrgfi 1208993d9adc1SmrgAC_LANG_POP([C])]) 1209093d9adc1Smrg 1209193d9adc1Smrg# For backward compatibility. 1209293d9adc1SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 1209393d9adc1Smrg 1209474fcc364Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1209572b676d7Smrg# 1209672b676d7Smrg# This file is free software; the Free Software Foundation 1209772b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1209872b676d7Smrg# with or without modifications, as long as this notice is preserved. 1209972b676d7Smrg 1210093d9adc1Smrg# AM_RUN_LOG(COMMAND) 1210193d9adc1Smrg# ------------------- 1210293d9adc1Smrg# Run COMMAND, save the exit status in ac_status, and log it. 1210393d9adc1Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1210493d9adc1SmrgAC_DEFUN([AM_RUN_LOG], 1210593d9adc1Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1210693d9adc1Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1210793d9adc1Smrg ac_status=$? 1210893d9adc1Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1210993d9adc1Smrg (exit $ac_status); }]) 1211093d9adc1Smrg 1211193d9adc1Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1211293d9adc1Smrg 1211374fcc364Smrg# Copyright (C) 1996-2017 Free Software Foundation, Inc. 1211493d9adc1Smrg# 1211593d9adc1Smrg# This file is free software; the Free Software Foundation 1211693d9adc1Smrg# gives unlimited permission to copy and/or distribute it, 1211793d9adc1Smrg# with or without modifications, as long as this notice is preserved. 1211872b676d7Smrg 1211972b676d7Smrg# AM_SANITY_CHECK 1212072b676d7Smrg# --------------- 1212172b676d7SmrgAC_DEFUN([AM_SANITY_CHECK], 1212272b676d7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 12123e47418d9Smrg# Reject unsafe characters in $srcdir or the absolute working directory 12124e47418d9Smrg# name. Accept space and tab only in the latter. 12125e47418d9Smrgam_lf=' 12126e47418d9Smrg' 12127e47418d9Smrgcase `pwd` in 12128e47418d9Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 12129e47418d9Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 12130e47418d9Smrgesac 12131e47418d9Smrgcase $srcdir in 12132e47418d9Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1213393d9adc1Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12134e47418d9Smrgesac 12135e47418d9Smrg 1213693d9adc1Smrg# Do 'set' in a subshell so we don't clobber the current shell's 1213772b676d7Smrg# arguments. Must try -L first in case configure is actually a 1213872b676d7Smrg# symlink; some systems play weird games with the mod time of symlinks 1213972b676d7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 1214072b676d7Smrg# directory). 1214172b676d7Smrgif ( 1214293d9adc1Smrg am_has_slept=no 1214393d9adc1Smrg for am_try in 1 2; do 1214493d9adc1Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 1214593d9adc1Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1214693d9adc1Smrg if test "$[*]" = "X"; then 1214793d9adc1Smrg # -L didn't work. 1214893d9adc1Smrg set X `ls -t "$srcdir/configure" conftest.file` 1214993d9adc1Smrg fi 1215093d9adc1Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1215193d9adc1Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1215293d9adc1Smrg 1215393d9adc1Smrg # If neither matched, then we have a broken ls. This can happen 1215493d9adc1Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1215593d9adc1Smrg # broken ls alias from the environment. This has actually 1215693d9adc1Smrg # happened. Such a system could not be considered "sane". 1215793d9adc1Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1215893d9adc1Smrg alias in your environment]) 1215993d9adc1Smrg fi 1216093d9adc1Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 1216193d9adc1Smrg break 1216293d9adc1Smrg fi 1216393d9adc1Smrg # Just in case. 1216493d9adc1Smrg sleep 1 1216593d9adc1Smrg am_has_slept=yes 1216693d9adc1Smrg done 1216772b676d7Smrg test "$[2]" = conftest.file 1216872b676d7Smrg ) 1216972b676d7Smrgthen 1217072b676d7Smrg # Ok. 1217172b676d7Smrg : 1217272b676d7Smrgelse 1217372b676d7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 1217472b676d7SmrgCheck your system clock]) 1217572b676d7Smrgfi 1217693d9adc1SmrgAC_MSG_RESULT([yes]) 1217793d9adc1Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 1217893d9adc1Smrg# generated files are strictly newer. 1217993d9adc1Smrgam_sleep_pid= 1218093d9adc1Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 1218193d9adc1Smrg ( sleep 1 ) & 1218293d9adc1Smrg am_sleep_pid=$! 1218393d9adc1Smrgfi 1218493d9adc1SmrgAC_CONFIG_COMMANDS_PRE( 1218593d9adc1Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 1218693d9adc1Smrg if test -n "$am_sleep_pid"; then 1218793d9adc1Smrg # Hide warnings about reused PIDs. 1218893d9adc1Smrg wait $am_sleep_pid 2>/dev/null 1218993d9adc1Smrg fi 1219093d9adc1Smrg AC_MSG_RESULT([done])]) 1219193d9adc1Smrgrm -f conftest.file 1219293d9adc1Smrg]) 1219372b676d7Smrg 1219474fcc364Smrg# Copyright (C) 2009-2017 Free Software Foundation, Inc. 12195e35772b2Smrg# 12196e35772b2Smrg# This file is free software; the Free Software Foundation 12197e35772b2Smrg# gives unlimited permission to copy and/or distribute it, 12198e35772b2Smrg# with or without modifications, as long as this notice is preserved. 12199e35772b2Smrg 12200e35772b2Smrg# AM_SILENT_RULES([DEFAULT]) 12201e35772b2Smrg# -------------------------- 12202e35772b2Smrg# Enable less verbose build rules; with the default set to DEFAULT 1220393d9adc1Smrg# ("yes" being less verbose, "no" or empty being verbose). 12204e35772b2SmrgAC_DEFUN([AM_SILENT_RULES], 1220593d9adc1Smrg[AC_ARG_ENABLE([silent-rules], [dnl 1220693d9adc1SmrgAS_HELP_STRING( 1220793d9adc1Smrg [--enable-silent-rules], 1220893d9adc1Smrg [less verbose build output (undo: "make V=1")]) 1220993d9adc1SmrgAS_HELP_STRING( 1221093d9adc1Smrg [--disable-silent-rules], 1221193d9adc1Smrg [verbose build output (undo: "make V=0")])dnl 1221293d9adc1Smrg]) 1221393d9adc1Smrgcase $enable_silent_rules in @%:@ ((( 1221493d9adc1Smrg yes) AM_DEFAULT_VERBOSITY=0;; 1221593d9adc1Smrg no) AM_DEFAULT_VERBOSITY=1;; 1221693d9adc1Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12217e35772b2Smrgesac 1221874c14cd6Smrgdnl 1221993d9adc1Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 1222074c14cd6Smrgdnl do not support nested variable expansions. 1222174c14cd6Smrgdnl See automake bug#9928 and bug#10237. 1222274c14cd6Smrgam_make=${MAKE-make} 1222374c14cd6SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 1222474c14cd6Smrg [am_cv_make_support_nested_variables], 1222574c14cd6Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 1222674c14cd6SmrgBAR0=false 1222774c14cd6SmrgBAR1=true 1222874c14cd6SmrgV=1 1222974c14cd6Smrgam__doit: 1223074c14cd6Smrg @$(TRUE) 1223174c14cd6Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1223274c14cd6Smrg am_cv_make_support_nested_variables=yes 1223374c14cd6Smrgelse 1223474c14cd6Smrg am_cv_make_support_nested_variables=no 1223574c14cd6Smrgfi]) 1223674c14cd6Smrgif test $am_cv_make_support_nested_variables = yes; then 1223793d9adc1Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 1223874c14cd6Smrg AM_V='$(V)' 1223974c14cd6Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1224074c14cd6Smrgelse 1224174c14cd6Smrg AM_V=$AM_DEFAULT_VERBOSITY 1224274c14cd6Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1224374c14cd6Smrgfi 1224474c14cd6SmrgAC_SUBST([AM_V])dnl 1224574c14cd6SmrgAM_SUBST_NOTMAKE([AM_V])dnl 1224674c14cd6SmrgAC_SUBST([AM_DEFAULT_V])dnl 1224774c14cd6SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12248e35772b2SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12249e35772b2SmrgAM_BACKSLASH='\' 12250e35772b2SmrgAC_SUBST([AM_BACKSLASH])dnl 12251e35772b2Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12252e35772b2Smrg]) 12253e35772b2Smrg 1225474fcc364Smrg# Copyright (C) 2001-2017 Free Software Foundation, Inc. 1225572b676d7Smrg# 1225672b676d7Smrg# This file is free software; the Free Software Foundation 1225772b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1225872b676d7Smrg# with or without modifications, as long as this notice is preserved. 1225972b676d7Smrg 1226072b676d7Smrg# AM_PROG_INSTALL_STRIP 1226172b676d7Smrg# --------------------- 1226293d9adc1Smrg# One issue with vendor 'install' (even GNU) is that you can't 1226372b676d7Smrg# specify the program used to strip binaries. This is especially 1226472b676d7Smrg# annoying in cross-compiling environments, where the build's strip 1226572b676d7Smrg# is unlikely to handle the host's binaries. 1226672b676d7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1226793d9adc1Smrg# always use install-sh in "make install-strip", and initialize 1226872b676d7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 1226972b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1227072b676d7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1227193d9adc1Smrg# Installed binaries are usually stripped using 'strip' when the user 1227293d9adc1Smrg# run "make install-strip". However 'strip' might not be the right 1227372b676d7Smrg# tool to use in cross-compilation environments, therefore Automake 1227493d9adc1Smrg# will honor the 'STRIP' environment variable to overrule this program. 1227593d9adc1Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1227672b676d7Smrgif test "$cross_compiling" != no; then 1227772b676d7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1227872b676d7Smrgfi 122791fd23544SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1228072b676d7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1228172b676d7Smrg 1228274fcc364Smrg# Copyright (C) 2006-2017 Free Software Foundation, Inc. 122831fd23544Smrg# 122841fd23544Smrg# This file is free software; the Free Software Foundation 122851fd23544Smrg# gives unlimited permission to copy and/or distribute it, 122861fd23544Smrg# with or without modifications, as long as this notice is preserved. 122871fd23544Smrg 122881fd23544Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 122891fd23544Smrg# --------------------------- 122901fd23544Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 122911fd23544Smrg# This macro is traced by Automake. 122921fd23544SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 122931fd23544Smrg 12294e47418d9Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1229574c14cd6Smrg# -------------------------- 12296e47418d9Smrg# Public sister of _AM_SUBST_NOTMAKE. 12297e47418d9SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12298e47418d9Smrg 1229972b676d7Smrg# Check how to create a tarball. -*- Autoconf -*- 1230072b676d7Smrg 1230174fcc364Smrg# Copyright (C) 2004-2017 Free Software Foundation, Inc. 1230272b676d7Smrg# 1230372b676d7Smrg# This file is free software; the Free Software Foundation 1230472b676d7Smrg# gives unlimited permission to copy and/or distribute it, 1230572b676d7Smrg# with or without modifications, as long as this notice is preserved. 1230672b676d7Smrg 1230772b676d7Smrg# _AM_PROG_TAR(FORMAT) 1230872b676d7Smrg# -------------------- 1230972b676d7Smrg# Check how to create a tarball in format FORMAT. 1231093d9adc1Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1231172b676d7Smrg# 1231272b676d7Smrg# Substitute a variable $(am__tar) that is a command 1231372b676d7Smrg# writing to stdout a FORMAT-tarball containing the directory 1231472b676d7Smrg# $tardir. 1231572b676d7Smrg# tardir=directory && $(am__tar) > result.tar 1231672b676d7Smrg# 1231772b676d7Smrg# Substitute a variable $(am__untar) that extract such 1231872b676d7Smrg# a tarball read from stdin. 1231972b676d7Smrg# $(am__untar) < result.tar 1232093d9adc1Smrg# 1232172b676d7SmrgAC_DEFUN([_AM_PROG_TAR], 1232274c14cd6Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1232374c14cd6Smrg# in the wild :-( We should find a proper way to deprecate it ... 1232474c14cd6SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1232593d9adc1Smrg 1232693d9adc1Smrg# We'll loop over all known methods to create a tar archive until one works. 1232772b676d7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 1232872b676d7Smrg 1232993d9adc1Smrgm4_if([$1], [v7], 1233093d9adc1Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 1233193d9adc1Smrg 1233293d9adc1Smrg [m4_case([$1], 1233393d9adc1Smrg [ustar], 1233493d9adc1Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1233593d9adc1Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1233693d9adc1Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1233793d9adc1Smrg # and bug#13588). 1233893d9adc1Smrg am_max_uid=2097151 # 2^21 - 1 1233993d9adc1Smrg am_max_gid=$am_max_uid 1234093d9adc1Smrg # The $UID and $GID variables are not portable, so we need to resort 1234193d9adc1Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1234293d9adc1Smrg # below are definitely unexpected, so allow the users to see them 1234393d9adc1Smrg # (that is, avoid stderr redirection). 1234493d9adc1Smrg am_uid=`id -u || echo unknown` 1234593d9adc1Smrg am_gid=`id -g || echo unknown` 1234693d9adc1Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1234793d9adc1Smrg if test $am_uid -le $am_max_uid; then 1234893d9adc1Smrg AC_MSG_RESULT([yes]) 1234993d9adc1Smrg else 1235093d9adc1Smrg AC_MSG_RESULT([no]) 1235193d9adc1Smrg _am_tools=none 1235293d9adc1Smrg fi 1235393d9adc1Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1235493d9adc1Smrg if test $am_gid -le $am_max_gid; then 1235593d9adc1Smrg AC_MSG_RESULT([yes]) 1235693d9adc1Smrg else 1235793d9adc1Smrg AC_MSG_RESULT([no]) 1235893d9adc1Smrg _am_tools=none 1235993d9adc1Smrg fi], 1236072b676d7Smrg 1236193d9adc1Smrg [pax], 1236293d9adc1Smrg [], 1236393d9adc1Smrg 1236493d9adc1Smrg [m4_fatal([Unknown tar format])]) 1236593d9adc1Smrg 1236693d9adc1Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 1236793d9adc1Smrg 1236893d9adc1Smrg # Go ahead even if we have the value already cached. We do so because we 1236993d9adc1Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1237093d9adc1Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 1237193d9adc1Smrg 1237293d9adc1Smrg for _am_tool in $_am_tools; do 1237393d9adc1Smrg case $_am_tool in 1237493d9adc1Smrg gnutar) 1237593d9adc1Smrg for _am_tar in tar gnutar gtar; do 1237693d9adc1Smrg AM_RUN_LOG([$_am_tar --version]) && break 1237793d9adc1Smrg done 1237893d9adc1Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1237993d9adc1Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1238093d9adc1Smrg am__untar="$_am_tar -xf -" 1238193d9adc1Smrg ;; 1238293d9adc1Smrg plaintar) 1238393d9adc1Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1238493d9adc1Smrg # ustar tarball either. 1238593d9adc1Smrg (tar --version) >/dev/null 2>&1 && continue 1238693d9adc1Smrg am__tar='tar chf - "$$tardir"' 1238793d9adc1Smrg am__tar_='tar chf - "$tardir"' 1238893d9adc1Smrg am__untar='tar xf -' 1238993d9adc1Smrg ;; 1239093d9adc1Smrg pax) 1239193d9adc1Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1239293d9adc1Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1239393d9adc1Smrg am__untar='pax -r' 1239493d9adc1Smrg ;; 1239593d9adc1Smrg cpio) 1239693d9adc1Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1239793d9adc1Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1239893d9adc1Smrg am__untar='cpio -i -H $1 -d' 1239993d9adc1Smrg ;; 1240093d9adc1Smrg none) 1240193d9adc1Smrg am__tar=false 1240293d9adc1Smrg am__tar_=false 1240393d9adc1Smrg am__untar=false 1240493d9adc1Smrg ;; 1240593d9adc1Smrg esac 1240693d9adc1Smrg 1240793d9adc1Smrg # If the value was cached, stop now. We just wanted to have am__tar 1240893d9adc1Smrg # and am__untar set. 1240993d9adc1Smrg test -n "${am_cv_prog_tar_$1}" && break 1241093d9adc1Smrg 1241193d9adc1Smrg # tar/untar a dummy directory, and stop if the command works. 1241293d9adc1Smrg rm -rf conftest.dir 1241393d9adc1Smrg mkdir conftest.dir 1241493d9adc1Smrg echo GrepMe > conftest.dir/file 1241593d9adc1Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1241693d9adc1Smrg rm -rf conftest.dir 1241793d9adc1Smrg if test -s conftest.tar; then 1241893d9adc1Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1241993d9adc1Smrg AM_RUN_LOG([cat conftest.dir/file]) 1242093d9adc1Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1242193d9adc1Smrg fi 1242293d9adc1Smrg done 1242372b676d7Smrg rm -rf conftest.dir 1242472b676d7Smrg 1242593d9adc1Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1242693d9adc1Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 1242793d9adc1Smrg 1242872b676d7SmrgAC_SUBST([am__tar]) 1242972b676d7SmrgAC_SUBST([am__untar]) 1243072b676d7Smrg]) # _AM_PROG_TAR 1243172b676d7Smrg 12432