aclocal.m4 revision d6c0b56e
1d6c0b56eSmrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 2d6c0b56eSmrg 3d6c0b56eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4d6c0b56eSmrg 5d6c0b56eSmrg# This file is free software; the Free Software Foundation 6d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 7d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 8d6c0b56eSmrg 9d6c0b56eSmrg# This program is distributed in the hope that it will be useful, 10d6c0b56eSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11d6c0b56eSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12d6c0b56eSmrg# PARTICULAR PURPOSE. 13d6c0b56eSmrg 14d6c0b56eSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 15d6c0b56eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 16d6c0b56eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17d6c0b56eSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18d6c0b56eSmrg[m4_warning([this file was generated for autoconf 2.69. 19d6c0b56eSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20d6c0b56eSmrgIf you have problems, you may need to regenerate the build system entirely. 21d6c0b56eSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22d6c0b56eSmrg 23d6c0b56eSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24d6c0b56eSmrg# 25d6c0b56eSmrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 26d6c0b56eSmrg# Written by Gordon Matzigkeit, 1996 27d6c0b56eSmrg# 28d6c0b56eSmrg# This file is free software; the Free Software Foundation gives 29d6c0b56eSmrg# unlimited permission to copy and/or distribute it, with or without 30d6c0b56eSmrg# modifications, as long as this notice is preserved. 31d6c0b56eSmrg 32d6c0b56eSmrgm4_define([_LT_COPYING], [dnl 33d6c0b56eSmrg# Copyright (C) 2014 Free Software Foundation, Inc. 34d6c0b56eSmrg# This is free software; see the source for copying conditions. There is NO 35d6c0b56eSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 36d6c0b56eSmrg 37d6c0b56eSmrg# GNU Libtool is free software; you can redistribute it and/or modify 38d6c0b56eSmrg# it under the terms of the GNU General Public License as published by 39d6c0b56eSmrg# the Free Software Foundation; either version 2 of of the License, or 40d6c0b56eSmrg# (at your option) any later version. 41d6c0b56eSmrg# 42d6c0b56eSmrg# As a special exception to the GNU General Public License, if you 43d6c0b56eSmrg# distribute this file as part of a program or library that is built 44d6c0b56eSmrg# using GNU Libtool, you may include this file under the same 45d6c0b56eSmrg# distribution terms that you use for the rest of that program. 46d6c0b56eSmrg# 47d6c0b56eSmrg# GNU Libtool is distributed in the hope that it will be useful, but 48d6c0b56eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 49d6c0b56eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50d6c0b56eSmrg# GNU General Public License for more details. 51d6c0b56eSmrg# 52d6c0b56eSmrg# You should have received a copy of the GNU General Public License 53d6c0b56eSmrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54d6c0b56eSmrg]) 55d6c0b56eSmrg 56d6c0b56eSmrg# serial 58 LT_INIT 57d6c0b56eSmrg 58d6c0b56eSmrg 59d6c0b56eSmrg# LT_PREREQ(VERSION) 60d6c0b56eSmrg# ------------------ 61d6c0b56eSmrg# Complain and exit if this libtool version is less that VERSION. 62d6c0b56eSmrgm4_defun([LT_PREREQ], 63d6c0b56eSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64d6c0b56eSmrg [m4_default([$3], 65d6c0b56eSmrg [m4_fatal([Libtool version $1 or higher is required], 66d6c0b56eSmrg 63)])], 67d6c0b56eSmrg [$2])]) 68d6c0b56eSmrg 69d6c0b56eSmrg 70d6c0b56eSmrg# _LT_CHECK_BUILDDIR 71d6c0b56eSmrg# ------------------ 72d6c0b56eSmrg# Complain if the absolute build directory name contains unusual characters 73d6c0b56eSmrgm4_defun([_LT_CHECK_BUILDDIR], 74d6c0b56eSmrg[case `pwd` in 75d6c0b56eSmrg *\ * | *\ *) 76d6c0b56eSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77d6c0b56eSmrgesac 78d6c0b56eSmrg]) 79d6c0b56eSmrg 80d6c0b56eSmrg 81d6c0b56eSmrg# LT_INIT([OPTIONS]) 82d6c0b56eSmrg# ------------------ 83d6c0b56eSmrgAC_DEFUN([LT_INIT], 84d6c0b56eSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85d6c0b56eSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86d6c0b56eSmrgAC_BEFORE([$0], [LT_LANG])dnl 87d6c0b56eSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 88d6c0b56eSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 89d6c0b56eSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 90d6c0b56eSmrg 91d6c0b56eSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 92d6c0b56eSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93d6c0b56eSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94d6c0b56eSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95d6c0b56eSmrgdnl unless we require an AC_DEFUNed macro: 96d6c0b56eSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 97d6c0b56eSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 98d6c0b56eSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 99d6c0b56eSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 100d6c0b56eSmrgm4_require([_LT_PROG_LTMAIN])dnl 101d6c0b56eSmrg 102d6c0b56eSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 103d6c0b56eSmrg 104d6c0b56eSmrgdnl Parse OPTIONS 105d6c0b56eSmrg_LT_SET_OPTIONS([$0], [$1]) 106d6c0b56eSmrg 107d6c0b56eSmrg# This can be used to rebuild libtool when needed 108d6c0b56eSmrgLIBTOOL_DEPS=$ltmain 109d6c0b56eSmrg 110d6c0b56eSmrg# Always use our own libtool. 111d6c0b56eSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112d6c0b56eSmrgAC_SUBST(LIBTOOL)dnl 113d6c0b56eSmrg 114d6c0b56eSmrg_LT_SETUP 115d6c0b56eSmrg 116d6c0b56eSmrg# Only expand once: 117d6c0b56eSmrgm4_define([LT_INIT]) 118d6c0b56eSmrg])# LT_INIT 119d6c0b56eSmrg 120d6c0b56eSmrg# Old names: 121d6c0b56eSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122d6c0b56eSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 124d6c0b56eSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125d6c0b56eSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126d6c0b56eSmrg 127d6c0b56eSmrg 128d6c0b56eSmrg# _LT_PREPARE_CC_BASENAME 129d6c0b56eSmrg# ----------------------- 130d6c0b56eSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 131d6c0b56eSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 132d6c0b56eSmrgfunc_cc_basename () 133d6c0b56eSmrg{ 134d6c0b56eSmrg for cc_temp in @S|@*""; do 135d6c0b56eSmrg case $cc_temp in 136d6c0b56eSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137d6c0b56eSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138d6c0b56eSmrg \-*) ;; 139d6c0b56eSmrg *) break;; 140d6c0b56eSmrg esac 141d6c0b56eSmrg done 142d6c0b56eSmrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 143d6c0b56eSmrg} 144d6c0b56eSmrg])# _LT_PREPARE_CC_BASENAME 145d6c0b56eSmrg 146d6c0b56eSmrg 147d6c0b56eSmrg# _LT_CC_BASENAME(CC) 148d6c0b56eSmrg# ------------------- 149d6c0b56eSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 150d6c0b56eSmrg# but that macro is also expanded into generated libtool script, which 151d6c0b56eSmrg# arranges for $SED and $ECHO to be set by different means. 152d6c0b56eSmrgm4_defun([_LT_CC_BASENAME], 153d6c0b56eSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 154d6c0b56eSmrgAC_REQUIRE([_LT_DECL_SED])dnl 155d6c0b56eSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 156d6c0b56eSmrgfunc_cc_basename $1 157d6c0b56eSmrgcc_basename=$func_cc_basename_result 158d6c0b56eSmrg]) 159d6c0b56eSmrg 160d6c0b56eSmrg 161d6c0b56eSmrg# _LT_FILEUTILS_DEFAULTS 162d6c0b56eSmrg# ---------------------- 163d6c0b56eSmrg# It is okay to use these file commands and assume they have been set 164d6c0b56eSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165d6c0b56eSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 166d6c0b56eSmrg[: ${CP="cp -f"} 167d6c0b56eSmrg: ${MV="mv -f"} 168d6c0b56eSmrg: ${RM="rm -f"} 169d6c0b56eSmrg])# _LT_FILEUTILS_DEFAULTS 170d6c0b56eSmrg 171d6c0b56eSmrg 172d6c0b56eSmrg# _LT_SETUP 173d6c0b56eSmrg# --------- 174d6c0b56eSmrgm4_defun([_LT_SETUP], 175d6c0b56eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176d6c0b56eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 177d6c0b56eSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178d6c0b56eSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179d6c0b56eSmrg 180d6c0b56eSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181d6c0b56eSmrgdnl 182d6c0b56eSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 183d6c0b56eSmrg_LT_DECL([], [host], [0])dnl 184d6c0b56eSmrg_LT_DECL([], [host_os], [0])dnl 185d6c0b56eSmrgdnl 186d6c0b56eSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 187d6c0b56eSmrg_LT_DECL([], [build], [0])dnl 188d6c0b56eSmrg_LT_DECL([], [build_os], [0])dnl 189d6c0b56eSmrgdnl 190d6c0b56eSmrgAC_REQUIRE([AC_PROG_CC])dnl 191d6c0b56eSmrgAC_REQUIRE([LT_PATH_LD])dnl 192d6c0b56eSmrgAC_REQUIRE([LT_PATH_NM])dnl 193d6c0b56eSmrgdnl 194d6c0b56eSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 195d6c0b56eSmrgtest -z "$LN_S" && LN_S="ln -s" 196d6c0b56eSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197d6c0b56eSmrgdnl 198d6c0b56eSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 199d6c0b56eSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200d6c0b56eSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201d6c0b56eSmrgdnl 202d6c0b56eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 203d6c0b56eSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 204d6c0b56eSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205d6c0b56eSmrgm4_require([_LT_CMD_RELOAD])dnl 206d6c0b56eSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 207d6c0b56eSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208d6c0b56eSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 209d6c0b56eSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210d6c0b56eSmrgm4_require([_LT_WITH_SYSROOT])dnl 211d6c0b56eSmrgm4_require([_LT_CMD_TRUNCATE])dnl 212d6c0b56eSmrg 213d6c0b56eSmrg_LT_CONFIG_LIBTOOL_INIT([ 214d6c0b56eSmrg# See if we are running on zsh, and set the options that allow our 215d6c0b56eSmrg# commands through without removal of \ escapes INIT. 216d6c0b56eSmrgif test -n "\${ZSH_VERSION+set}"; then 217d6c0b56eSmrg setopt NO_GLOB_SUBST 218d6c0b56eSmrgfi 219d6c0b56eSmrg]) 220d6c0b56eSmrgif test -n "${ZSH_VERSION+set}"; then 221d6c0b56eSmrg setopt NO_GLOB_SUBST 222d6c0b56eSmrgfi 223d6c0b56eSmrg 224d6c0b56eSmrg_LT_CHECK_OBJDIR 225d6c0b56eSmrg 226d6c0b56eSmrgm4_require([_LT_TAG_COMPILER])dnl 227d6c0b56eSmrg 228d6c0b56eSmrgcase $host_os in 229d6c0b56eSmrgaix3*) 230d6c0b56eSmrg # AIX sometimes has problems with the GCC collect2 program. For some 231d6c0b56eSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 232d6c0b56eSmrg # vanish in a puff of smoke. 233d6c0b56eSmrg if test set != "${COLLECT_NAMES+set}"; then 234d6c0b56eSmrg COLLECT_NAMES= 235d6c0b56eSmrg export COLLECT_NAMES 236d6c0b56eSmrg fi 237d6c0b56eSmrg ;; 238d6c0b56eSmrgesac 239d6c0b56eSmrg 240d6c0b56eSmrg# Global variables: 241d6c0b56eSmrgofile=libtool 242d6c0b56eSmrgcan_build_shared=yes 243d6c0b56eSmrg 244d6c0b56eSmrg# All known linkers require a '.a' archive for static linking (except MSVC, 245d6c0b56eSmrg# which needs '.lib'). 246d6c0b56eSmrglibext=a 247d6c0b56eSmrg 248d6c0b56eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 249d6c0b56eSmrg 250d6c0b56eSmrgold_CC=$CC 251d6c0b56eSmrgold_CFLAGS=$CFLAGS 252d6c0b56eSmrg 253d6c0b56eSmrg# Set sane defaults for various variables 254d6c0b56eSmrgtest -z "$CC" && CC=cc 255d6c0b56eSmrgtest -z "$LTCC" && LTCC=$CC 256d6c0b56eSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257d6c0b56eSmrgtest -z "$LD" && LD=ld 258d6c0b56eSmrgtest -z "$ac_objext" && ac_objext=o 259d6c0b56eSmrg 260d6c0b56eSmrg_LT_CC_BASENAME([$compiler]) 261d6c0b56eSmrg 262d6c0b56eSmrg# Only perform the check for file, if the check method requires it 263d6c0b56eSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 264d6c0b56eSmrgcase $deplibs_check_method in 265d6c0b56eSmrgfile_magic*) 266d6c0b56eSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267d6c0b56eSmrg _LT_PATH_MAGIC 268d6c0b56eSmrg fi 269d6c0b56eSmrg ;; 270d6c0b56eSmrgesac 271d6c0b56eSmrg 272d6c0b56eSmrg# Use C for the default configuration in the libtool script 273d6c0b56eSmrgLT_SUPPORTED_TAG([CC]) 274d6c0b56eSmrg_LT_LANG_C_CONFIG 275d6c0b56eSmrg_LT_LANG_DEFAULT_CONFIG 276d6c0b56eSmrg_LT_CONFIG_COMMANDS 277d6c0b56eSmrg])# _LT_SETUP 278d6c0b56eSmrg 279d6c0b56eSmrg 280d6c0b56eSmrg# _LT_PREPARE_SED_QUOTE_VARS 281d6c0b56eSmrg# -------------------------- 282d6c0b56eSmrg# Define a few sed substitution that help us do robust quoting. 283d6c0b56eSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284d6c0b56eSmrg[# Backslashify metacharacters that are still active within 285d6c0b56eSmrg# double-quoted strings. 286d6c0b56eSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287d6c0b56eSmrg 288d6c0b56eSmrg# Same as above, but do not quote variable references. 289d6c0b56eSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 290d6c0b56eSmrg 291d6c0b56eSmrg# Sed substitution to delay expansion of an escaped shell variable in a 292d6c0b56eSmrg# double_quote_subst'ed string. 293d6c0b56eSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294d6c0b56eSmrg 295d6c0b56eSmrg# Sed substitution to delay expansion of an escaped single quote. 296d6c0b56eSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297d6c0b56eSmrg 298d6c0b56eSmrg# Sed substitution to avoid accidental globbing in evaled expressions 299d6c0b56eSmrgno_glob_subst='s/\*/\\\*/g' 300d6c0b56eSmrg]) 301d6c0b56eSmrg 302d6c0b56eSmrg# _LT_PROG_LTMAIN 303d6c0b56eSmrg# --------------- 304d6c0b56eSmrg# Note that this code is called both from 'configure', and 'config.status' 305d6c0b56eSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 306d6c0b56eSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307d6c0b56eSmrg# so we pass a copy along to make sure it has a sensible value anyway. 308d6c0b56eSmrgm4_defun([_LT_PROG_LTMAIN], 309d6c0b56eSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310d6c0b56eSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 311d6c0b56eSmrgltmain=$ac_aux_dir/ltmain.sh 312d6c0b56eSmrg])# _LT_PROG_LTMAIN 313d6c0b56eSmrg 314d6c0b56eSmrg 315d6c0b56eSmrg 316d6c0b56eSmrg# So that we can recreate a full libtool script including additional 317d6c0b56eSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 318d6c0b56eSmrg# in macros and then make a single call at the end using the 'libtool' 319d6c0b56eSmrg# label. 320d6c0b56eSmrg 321d6c0b56eSmrg 322d6c0b56eSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323d6c0b56eSmrg# ---------------------------------------- 324d6c0b56eSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325d6c0b56eSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 326d6c0b56eSmrg[m4_ifval([$1], 327d6c0b56eSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328d6c0b56eSmrg [$1 329d6c0b56eSmrg])])]) 330d6c0b56eSmrg 331d6c0b56eSmrg# Initialize. 332d6c0b56eSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333d6c0b56eSmrg 334d6c0b56eSmrg 335d6c0b56eSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 336d6c0b56eSmrg# ------------------------------ 337d6c0b56eSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338d6c0b56eSmrgm4_define([_LT_CONFIG_LIBTOOL], 339d6c0b56eSmrg[m4_ifval([$1], 340d6c0b56eSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341d6c0b56eSmrg [$1 342d6c0b56eSmrg])])]) 343d6c0b56eSmrg 344d6c0b56eSmrg# Initialize. 345d6c0b56eSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 346d6c0b56eSmrg 347d6c0b56eSmrg 348d6c0b56eSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349d6c0b56eSmrg# ----------------------------------------------------- 350d6c0b56eSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 351d6c0b56eSmrg[_LT_CONFIG_LIBTOOL([$1]) 352d6c0b56eSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 353d6c0b56eSmrg]) 354d6c0b56eSmrg 355d6c0b56eSmrg 356d6c0b56eSmrg# _LT_FORMAT_COMMENT([COMMENT]) 357d6c0b56eSmrg# ----------------------------- 358d6c0b56eSmrg# Add leading comment marks to the start of each line, and a trailing 359d6c0b56eSmrg# full-stop to the whole comment if one is not present already. 360d6c0b56eSmrgm4_define([_LT_FORMAT_COMMENT], 361d6c0b56eSmrg[m4_ifval([$1], [ 362d6c0b56eSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363d6c0b56eSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364d6c0b56eSmrg)]) 365d6c0b56eSmrg 366d6c0b56eSmrg 367d6c0b56eSmrg 368d6c0b56eSmrg 369d6c0b56eSmrg 370d6c0b56eSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371d6c0b56eSmrg# ------------------------------------------------------------------- 372d6c0b56eSmrg# CONFIGNAME is the name given to the value in the libtool script. 373d6c0b56eSmrg# VARNAME is the (base) name used in the configure script. 374d6c0b56eSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375d6c0b56eSmrg# VARNAME. Any other value will be used directly. 376d6c0b56eSmrgm4_define([_LT_DECL], 377d6c0b56eSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378d6c0b56eSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379d6c0b56eSmrg [m4_ifval([$1], [$1], [$2])]) 380d6c0b56eSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381d6c0b56eSmrg m4_ifval([$4], 382d6c0b56eSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383d6c0b56eSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 384d6c0b56eSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 385d6c0b56eSmrg]) 386d6c0b56eSmrg 387d6c0b56eSmrg 388d6c0b56eSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389d6c0b56eSmrg# -------------------------------------------------------- 390d6c0b56eSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391d6c0b56eSmrg 392d6c0b56eSmrg 393d6c0b56eSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394d6c0b56eSmrg# ------------------------------------------------ 395d6c0b56eSmrgm4_define([lt_decl_tag_varnames], 396d6c0b56eSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 397d6c0b56eSmrg 398d6c0b56eSmrg 399d6c0b56eSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400d6c0b56eSmrg# --------------------------------------------------------- 401d6c0b56eSmrgm4_define([_lt_decl_filter], 402d6c0b56eSmrg[m4_case([$#], 403d6c0b56eSmrg [0], [m4_fatal([$0: too few arguments: $#])], 404d6c0b56eSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 405d6c0b56eSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406d6c0b56eSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407d6c0b56eSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 408d6c0b56eSmrg]) 409d6c0b56eSmrg 410d6c0b56eSmrg 411d6c0b56eSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412d6c0b56eSmrg# -------------------------------------------------- 413d6c0b56eSmrgm4_define([lt_decl_quote_varnames], 414d6c0b56eSmrg[_lt_decl_filter([value], [1], $@)]) 415d6c0b56eSmrg 416d6c0b56eSmrg 417d6c0b56eSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418d6c0b56eSmrg# --------------------------------------------------- 419d6c0b56eSmrgm4_define([lt_decl_dquote_varnames], 420d6c0b56eSmrg[_lt_decl_filter([value], [2], $@)]) 421d6c0b56eSmrg 422d6c0b56eSmrg 423d6c0b56eSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424d6c0b56eSmrg# --------------------------------------------------- 425d6c0b56eSmrgm4_define([lt_decl_varnames_tagged], 426d6c0b56eSmrg[m4_assert([$# <= 2])dnl 427d6c0b56eSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 428d6c0b56eSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429d6c0b56eSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430d6c0b56eSmrgm4_define([_lt_decl_varnames_tagged], 431d6c0b56eSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432d6c0b56eSmrg 433d6c0b56eSmrg 434d6c0b56eSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435d6c0b56eSmrg# ------------------------------------------------ 436d6c0b56eSmrgm4_define([lt_decl_all_varnames], 437d6c0b56eSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 438d6c0b56eSmrg m4_if([$2], [], 439d6c0b56eSmrg m4_quote(lt_decl_varnames), 440d6c0b56eSmrg m4_quote(m4_shift($@))))[]dnl 441d6c0b56eSmrg]) 442d6c0b56eSmrgm4_define([_lt_decl_all_varnames], 443d6c0b56eSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 444d6c0b56eSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 445d6c0b56eSmrg]) 446d6c0b56eSmrg 447d6c0b56eSmrg 448d6c0b56eSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449d6c0b56eSmrg# ------------------------------------ 450d6c0b56eSmrg# Quote a variable value, and forward it to 'config.status' so that its 451d6c0b56eSmrg# declaration there will have the same value as in 'configure'. VARNAME 452d6c0b56eSmrg# must have a single quote delimited value for this to work. 453d6c0b56eSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 454d6c0b56eSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 455d6c0b56eSmrg 456d6c0b56eSmrg 457d6c0b56eSmrg# _LT_CONFIG_STATUS_DECLARATIONS 458d6c0b56eSmrg# ------------------------------ 459d6c0b56eSmrg# We delimit libtool config variables with single quotes, so when 460d6c0b56eSmrg# we write them to config.status, we have to be sure to quote all 461d6c0b56eSmrg# embedded single quotes properly. In configure, this macro expands 462d6c0b56eSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 463d6c0b56eSmrg# 464d6c0b56eSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465d6c0b56eSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466d6c0b56eSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467d6c0b56eSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 468d6c0b56eSmrg 469d6c0b56eSmrg 470d6c0b56eSmrg# _LT_LIBTOOL_TAGS 471d6c0b56eSmrg# ---------------- 472d6c0b56eSmrg# Output comment and list of tags supported by the script 473d6c0b56eSmrgm4_defun([_LT_LIBTOOL_TAGS], 474d6c0b56eSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 475d6c0b56eSmrgavailable_tags='_LT_TAGS'dnl 476d6c0b56eSmrg]) 477d6c0b56eSmrg 478d6c0b56eSmrg 479d6c0b56eSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480d6c0b56eSmrg# ----------------------------------- 481d6c0b56eSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 482d6c0b56eSmrg# expand to a commented shell variable setting: 483d6c0b56eSmrg# 484d6c0b56eSmrg# # Some comment about what VAR is for. 485d6c0b56eSmrg# visible_name=$lt_internal_name 486d6c0b56eSmrgm4_define([_LT_LIBTOOL_DECLARE], 487d6c0b56eSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488d6c0b56eSmrg [description])))[]dnl 489d6c0b56eSmrgm4_pushdef([_libtool_name], 490d6c0b56eSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491d6c0b56eSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492d6c0b56eSmrg [0], [_libtool_name=[$]$1], 493d6c0b56eSmrg [1], [_libtool_name=$lt_[]$1], 494d6c0b56eSmrg [2], [_libtool_name=$lt_[]$1], 495d6c0b56eSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496d6c0b56eSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497d6c0b56eSmrg]) 498d6c0b56eSmrg 499d6c0b56eSmrg 500d6c0b56eSmrg# _LT_LIBTOOL_CONFIG_VARS 501d6c0b56eSmrg# ----------------------- 502d6c0b56eSmrg# Produce commented declarations of non-tagged libtool config variables 503d6c0b56eSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504d6c0b56eSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505d6c0b56eSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 506d6c0b56eSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 507d6c0b56eSmrg[m4_foreach([_lt_var], 508d6c0b56eSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509d6c0b56eSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 510d6c0b56eSmrg 511d6c0b56eSmrg 512d6c0b56eSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 513d6c0b56eSmrg# ------------------------- 514d6c0b56eSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 515d6c0b56eSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516d6c0b56eSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 517d6c0b56eSmrg 518d6c0b56eSmrg 519d6c0b56eSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 520d6c0b56eSmrg# ------------------------------ 521d6c0b56eSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 522d6c0b56eSmrg 523d6c0b56eSmrg 524d6c0b56eSmrg# _LT_CONFIG_COMMANDS 525d6c0b56eSmrg# ------------------- 526d6c0b56eSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527d6c0b56eSmrg# variables for single and double quote escaping we saved from calls 528d6c0b56eSmrg# to _LT_DECL, we can put quote escaped variables declarations 529d6c0b56eSmrg# into 'config.status', and then the shell code to quote escape them in 530d6c0b56eSmrg# for loops in 'config.status'. Finally, any additional code accumulated 531d6c0b56eSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532d6c0b56eSmrgm4_defun([_LT_CONFIG_COMMANDS], 533d6c0b56eSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 534d6c0b56eSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 535d6c0b56eSmrg dnl instead of duplicating it all over again into config.status, 536d6c0b56eSmrg dnl then we will have config.status run $CONFIG_LT later, so it 537d6c0b56eSmrg dnl needs to know what name is stored there: 538d6c0b56eSmrg [AC_CONFIG_COMMANDS([libtool], 539d6c0b56eSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540d6c0b56eSmrg dnl If the libtool generation code is destined for config.status, 541d6c0b56eSmrg dnl expand the accumulated commands and init code now: 542d6c0b56eSmrg [AC_CONFIG_COMMANDS([libtool], 543d6c0b56eSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544d6c0b56eSmrg])#_LT_CONFIG_COMMANDS 545d6c0b56eSmrg 546d6c0b56eSmrg 547d6c0b56eSmrg# Initialize. 548d6c0b56eSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549d6c0b56eSmrg[ 550d6c0b56eSmrg 551d6c0b56eSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 552d6c0b56eSmrg# if CDPATH is set. 553d6c0b56eSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 554d6c0b56eSmrg 555d6c0b56eSmrgsed_quote_subst='$sed_quote_subst' 556d6c0b56eSmrgdouble_quote_subst='$double_quote_subst' 557d6c0b56eSmrgdelay_variable_subst='$delay_variable_subst' 558d6c0b56eSmrg_LT_CONFIG_STATUS_DECLARATIONS 559d6c0b56eSmrgLTCC='$LTCC' 560d6c0b56eSmrgLTCFLAGS='$LTCFLAGS' 561d6c0b56eSmrgcompiler='$compiler_DEFAULT' 562d6c0b56eSmrg 563d6c0b56eSmrg# A function that is used when there is no print builtin or printf. 564d6c0b56eSmrgfunc_fallback_echo () 565d6c0b56eSmrg{ 566d6c0b56eSmrg eval 'cat <<_LTECHO_EOF 567d6c0b56eSmrg\$[]1 568d6c0b56eSmrg_LTECHO_EOF' 569d6c0b56eSmrg} 570d6c0b56eSmrg 571d6c0b56eSmrg# Quote evaled strings. 572d6c0b56eSmrgfor var in lt_decl_all_varnames([[ \ 573d6c0b56eSmrg]], lt_decl_quote_varnames); do 574d6c0b56eSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575d6c0b56eSmrg *[[\\\\\\\`\\"\\\$]]*) 576d6c0b56eSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577d6c0b56eSmrg ;; 578d6c0b56eSmrg *) 579d6c0b56eSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580d6c0b56eSmrg ;; 581d6c0b56eSmrg esac 582d6c0b56eSmrgdone 583d6c0b56eSmrg 584d6c0b56eSmrg# Double-quote double-evaled strings. 585d6c0b56eSmrgfor var in lt_decl_all_varnames([[ \ 586d6c0b56eSmrg]], lt_decl_dquote_varnames); do 587d6c0b56eSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588d6c0b56eSmrg *[[\\\\\\\`\\"\\\$]]*) 589d6c0b56eSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590d6c0b56eSmrg ;; 591d6c0b56eSmrg *) 592d6c0b56eSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593d6c0b56eSmrg ;; 594d6c0b56eSmrg esac 595d6c0b56eSmrgdone 596d6c0b56eSmrg 597d6c0b56eSmrg_LT_OUTPUT_LIBTOOL_INIT 598d6c0b56eSmrg]) 599d6c0b56eSmrg 600d6c0b56eSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601d6c0b56eSmrg# ------------------------------------ 602d6c0b56eSmrg# Generate a child script FILE with all initialization necessary to 603d6c0b56eSmrg# reuse the environment learned by the parent script, and make the 604d6c0b56eSmrg# file executable. If COMMENT is supplied, it is inserted after the 605d6c0b56eSmrg# '#!' sequence but before initialization text begins. After this 606d6c0b56eSmrg# macro, additional text can be appended to FILE to form the body of 607d6c0b56eSmrg# the child script. The macro ends with non-zero status if the 608d6c0b56eSmrg# file could not be fully written (such as if the disk is full). 609d6c0b56eSmrgm4_ifdef([AS_INIT_GENERATED], 610d6c0b56eSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611d6c0b56eSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 612d6c0b56eSmrg[m4_require([AS_PREPARE])]dnl 613d6c0b56eSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614d6c0b56eSmrg[lt_write_fail=0 615d6c0b56eSmrgcat >$1 <<_ASEOF || lt_write_fail=1 616d6c0b56eSmrg#! $SHELL 617d6c0b56eSmrg# Generated by $as_me. 618d6c0b56eSmrg$2 619d6c0b56eSmrgSHELL=\${CONFIG_SHELL-$SHELL} 620d6c0b56eSmrgexport SHELL 621d6c0b56eSmrg_ASEOF 622d6c0b56eSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 623d6c0b56eSmrgAS_SHELL_SANITIZE 624d6c0b56eSmrg_AS_PREPARE 625d6c0b56eSmrgexec AS_MESSAGE_FD>&1 626d6c0b56eSmrg_ASEOF 627d6c0b56eSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 628d6c0b56eSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629d6c0b56eSmrg 630d6c0b56eSmrg# LT_OUTPUT 631d6c0b56eSmrg# --------- 632d6c0b56eSmrg# This macro allows early generation of the libtool script (before 633d6c0b56eSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 634d6c0b56eSmrg# tests. 635d6c0b56eSmrgAC_DEFUN([LT_OUTPUT], 636d6c0b56eSmrg[: ${CONFIG_LT=./config.lt} 637d6c0b56eSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 638d6c0b56eSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639d6c0b56eSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 640d6c0b56eSmrg 641d6c0b56eSmrgcat >>"$CONFIG_LT" <<\_LTEOF 642d6c0b56eSmrglt_cl_silent=false 643d6c0b56eSmrgexec AS_MESSAGE_LOG_FD>>config.log 644d6c0b56eSmrg{ 645d6c0b56eSmrg echo 646d6c0b56eSmrg AS_BOX([Running $as_me.]) 647d6c0b56eSmrg} >&AS_MESSAGE_LOG_FD 648d6c0b56eSmrg 649d6c0b56eSmrglt_cl_help="\ 650d6c0b56eSmrg'$as_me' creates a local libtool stub from the current configuration, 651d6c0b56eSmrgfor use in further configure time tests before the real libtool is 652d6c0b56eSmrggenerated. 653d6c0b56eSmrg 654d6c0b56eSmrgUsage: $[0] [[OPTIONS]] 655d6c0b56eSmrg 656d6c0b56eSmrg -h, --help print this help, then exit 657d6c0b56eSmrg -V, --version print version number, then exit 658d6c0b56eSmrg -q, --quiet do not print progress messages 659d6c0b56eSmrg -d, --debug don't remove temporary files 660d6c0b56eSmrg 661d6c0b56eSmrgReport bugs to <bug-libtool@gnu.org>." 662d6c0b56eSmrg 663d6c0b56eSmrglt_cl_version="\ 664d6c0b56eSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665d6c0b56eSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666d6c0b56eSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 667d6c0b56eSmrg 668d6c0b56eSmrgCopyright (C) 2011 Free Software Foundation, Inc. 669d6c0b56eSmrgThis config.lt script is free software; the Free Software Foundation 670d6c0b56eSmrggives unlimited permision to copy, distribute and modify it." 671d6c0b56eSmrg 672d6c0b56eSmrgwhile test 0 != $[#] 673d6c0b56eSmrgdo 674d6c0b56eSmrg case $[1] in 675d6c0b56eSmrg --version | --v* | -V ) 676d6c0b56eSmrg echo "$lt_cl_version"; exit 0 ;; 677d6c0b56eSmrg --help | --h* | -h ) 678d6c0b56eSmrg echo "$lt_cl_help"; exit 0 ;; 679d6c0b56eSmrg --debug | --d* | -d ) 680d6c0b56eSmrg debug=: ;; 681d6c0b56eSmrg --quiet | --q* | --silent | --s* | -q ) 682d6c0b56eSmrg lt_cl_silent=: ;; 683d6c0b56eSmrg 684d6c0b56eSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 685d6c0b56eSmrgTry '$[0] --help' for more information.]) ;; 686d6c0b56eSmrg 687d6c0b56eSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 688d6c0b56eSmrgTry '$[0] --help' for more information.]) ;; 689d6c0b56eSmrg esac 690d6c0b56eSmrg shift 691d6c0b56eSmrgdone 692d6c0b56eSmrg 693d6c0b56eSmrgif $lt_cl_silent; then 694d6c0b56eSmrg exec AS_MESSAGE_FD>/dev/null 695d6c0b56eSmrgfi 696d6c0b56eSmrg_LTEOF 697d6c0b56eSmrg 698d6c0b56eSmrgcat >>"$CONFIG_LT" <<_LTEOF 699d6c0b56eSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700d6c0b56eSmrg_LTEOF 701d6c0b56eSmrg 702d6c0b56eSmrgcat >>"$CONFIG_LT" <<\_LTEOF 703d6c0b56eSmrgAC_MSG_NOTICE([creating $ofile]) 704d6c0b56eSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 705d6c0b56eSmrgAS_EXIT(0) 706d6c0b56eSmrg_LTEOF 707d6c0b56eSmrgchmod +x "$CONFIG_LT" 708d6c0b56eSmrg 709d6c0b56eSmrg# configure is writing to config.log, but config.lt does its own redirection, 710d6c0b56eSmrg# appending to config.log, which fails on DOS, as config.log is still kept 711d6c0b56eSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 712d6c0b56eSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 713d6c0b56eSmrglt_cl_success=: 714d6c0b56eSmrgtest yes = "$silent" && 715d6c0b56eSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 716d6c0b56eSmrgexec AS_MESSAGE_LOG_FD>/dev/null 717d6c0b56eSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718d6c0b56eSmrgexec AS_MESSAGE_LOG_FD>>config.log 719d6c0b56eSmrg$lt_cl_success || AS_EXIT(1) 720d6c0b56eSmrg])# LT_OUTPUT 721d6c0b56eSmrg 722d6c0b56eSmrg 723d6c0b56eSmrg# _LT_CONFIG(TAG) 724d6c0b56eSmrg# --------------- 725d6c0b56eSmrg# If TAG is the built-in tag, create an initial libtool script with a 726d6c0b56eSmrg# default configuration from the untagged config vars. Otherwise add code 727d6c0b56eSmrg# to config.status for appending the configuration named by TAG from the 728d6c0b56eSmrg# matching tagged config vars. 729d6c0b56eSmrgm4_defun([_LT_CONFIG], 730d6c0b56eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731d6c0b56eSmrg_LT_CONFIG_SAVE_COMMANDS([ 732d6c0b56eSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733d6c0b56eSmrg m4_if(_LT_TAG, [C], [ 734d6c0b56eSmrg # See if we are running on zsh, and set the options that allow our 735d6c0b56eSmrg # commands through without removal of \ escapes. 736d6c0b56eSmrg if test -n "${ZSH_VERSION+set}"; then 737d6c0b56eSmrg setopt NO_GLOB_SUBST 738d6c0b56eSmrg fi 739d6c0b56eSmrg 740d6c0b56eSmrg cfgfile=${ofile}T 741d6c0b56eSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742d6c0b56eSmrg $RM "$cfgfile" 743d6c0b56eSmrg 744d6c0b56eSmrg cat <<_LT_EOF >> "$cfgfile" 745d6c0b56eSmrg#! $SHELL 746d6c0b56eSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION 747d6c0b56eSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748d6c0b56eSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 749d6c0b56eSmrg 750d6c0b56eSmrg# Provide generalized library-building support services. 751d6c0b56eSmrg# Written by Gordon Matzigkeit, 1996 752d6c0b56eSmrg 753d6c0b56eSmrg_LT_COPYING 754d6c0b56eSmrg_LT_LIBTOOL_TAGS 755d6c0b56eSmrg 756d6c0b56eSmrg# Configured defaults for sys_lib_dlsearch_path munging. 757d6c0b56eSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 758d6c0b56eSmrg 759d6c0b56eSmrg# ### BEGIN LIBTOOL CONFIG 760d6c0b56eSmrg_LT_LIBTOOL_CONFIG_VARS 761d6c0b56eSmrg_LT_LIBTOOL_TAG_VARS 762d6c0b56eSmrg# ### END LIBTOOL CONFIG 763d6c0b56eSmrg 764d6c0b56eSmrg_LT_EOF 765d6c0b56eSmrg 766d6c0b56eSmrg cat <<'_LT_EOF' >> "$cfgfile" 767d6c0b56eSmrg 768d6c0b56eSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 769d6c0b56eSmrg 770d6c0b56eSmrg_LT_PREPARE_MUNGE_PATH_LIST 771d6c0b56eSmrg_LT_PREPARE_CC_BASENAME 772d6c0b56eSmrg 773d6c0b56eSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE 774d6c0b56eSmrg 775d6c0b56eSmrg_LT_EOF 776d6c0b56eSmrg 777d6c0b56eSmrg case $host_os in 778d6c0b56eSmrg aix3*) 779d6c0b56eSmrg cat <<\_LT_EOF >> "$cfgfile" 780d6c0b56eSmrg# AIX sometimes has problems with the GCC collect2 program. For some 781d6c0b56eSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 782d6c0b56eSmrg# vanish in a puff of smoke. 783d6c0b56eSmrgif test set != "${COLLECT_NAMES+set}"; then 784d6c0b56eSmrg COLLECT_NAMES= 785d6c0b56eSmrg export COLLECT_NAMES 786d6c0b56eSmrgfi 787d6c0b56eSmrg_LT_EOF 788d6c0b56eSmrg ;; 789d6c0b56eSmrg esac 790d6c0b56eSmrg 791d6c0b56eSmrg _LT_PROG_LTMAIN 792d6c0b56eSmrg 793d6c0b56eSmrg # We use sed instead of cat because bash on DJGPP gets confused if 794d6c0b56eSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 795d6c0b56eSmrg # text mode, it properly converts lines to CR/LF. This bash problem 796d6c0b56eSmrg # is reportedly fixed, but why not run on old versions too? 797d6c0b56eSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 798d6c0b56eSmrg || (rm -f "$cfgfile"; exit 1) 799d6c0b56eSmrg 800d6c0b56eSmrg mv -f "$cfgfile" "$ofile" || 801d6c0b56eSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802d6c0b56eSmrg chmod +x "$ofile" 803d6c0b56eSmrg], 804d6c0b56eSmrg[cat <<_LT_EOF >> "$ofile" 805d6c0b56eSmrg 806d6c0b56eSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807d6c0b56eSmrgdnl in a comment (ie after a #). 808d6c0b56eSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 809d6c0b56eSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810d6c0b56eSmrg# ### END LIBTOOL TAG CONFIG: $1 811d6c0b56eSmrg_LT_EOF 812d6c0b56eSmrg])dnl /m4_if 813d6c0b56eSmrg], 814d6c0b56eSmrg[m4_if([$1], [], [ 815d6c0b56eSmrg PACKAGE='$PACKAGE' 816d6c0b56eSmrg VERSION='$VERSION' 817d6c0b56eSmrg RM='$RM' 818d6c0b56eSmrg ofile='$ofile'], []) 819d6c0b56eSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 820d6c0b56eSmrg])# _LT_CONFIG 821d6c0b56eSmrg 822d6c0b56eSmrg 823d6c0b56eSmrg# LT_SUPPORTED_TAG(TAG) 824d6c0b56eSmrg# --------------------- 825d6c0b56eSmrg# Trace this macro to discover what tags are supported by the libtool 826d6c0b56eSmrg# --tag option, using: 827d6c0b56eSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828d6c0b56eSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829d6c0b56eSmrg 830d6c0b56eSmrg 831d6c0b56eSmrg# C support is built-in for now 832d6c0b56eSmrgm4_define([_LT_LANG_C_enabled], []) 833d6c0b56eSmrgm4_define([_LT_TAGS], []) 834d6c0b56eSmrg 835d6c0b56eSmrg 836d6c0b56eSmrg# LT_LANG(LANG) 837d6c0b56eSmrg# ------------- 838d6c0b56eSmrg# Enable libtool support for the given language if not already enabled. 839d6c0b56eSmrgAC_DEFUN([LT_LANG], 840d6c0b56eSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 841d6c0b56eSmrgm4_case([$1], 842d6c0b56eSmrg [C], [_LT_LANG(C)], 843d6c0b56eSmrg [C++], [_LT_LANG(CXX)], 844d6c0b56eSmrg [Go], [_LT_LANG(GO)], 845d6c0b56eSmrg [Java], [_LT_LANG(GCJ)], 846d6c0b56eSmrg [Fortran 77], [_LT_LANG(F77)], 847d6c0b56eSmrg [Fortran], [_LT_LANG(FC)], 848d6c0b56eSmrg [Windows Resource], [_LT_LANG(RC)], 849d6c0b56eSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850d6c0b56eSmrg [_LT_LANG($1)], 851d6c0b56eSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 852d6c0b56eSmrg])# LT_LANG 853d6c0b56eSmrg 854d6c0b56eSmrg 855d6c0b56eSmrg# _LT_LANG(LANGNAME) 856d6c0b56eSmrg# ------------------ 857d6c0b56eSmrgm4_defun([_LT_LANG], 858d6c0b56eSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859d6c0b56eSmrg [LT_SUPPORTED_TAG([$1])dnl 860d6c0b56eSmrg m4_append([_LT_TAGS], [$1 ])dnl 861d6c0b56eSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 862d6c0b56eSmrg _LT_LANG_$1_CONFIG($1)])dnl 863d6c0b56eSmrg])# _LT_LANG 864d6c0b56eSmrg 865d6c0b56eSmrg 866d6c0b56eSmrgm4_ifndef([AC_PROG_GO], [ 867d6c0b56eSmrg# NOTE: This macro has been submitted for inclusion into # 868d6c0b56eSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 869d6c0b56eSmrg# a released version of Autoconf we should remove this # 870d6c0b56eSmrg# macro and use it instead. # 871d6c0b56eSmrgm4_defun([AC_PROG_GO], 872d6c0b56eSmrg[AC_LANG_PUSH(Go)dnl 873d6c0b56eSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 874d6c0b56eSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875d6c0b56eSmrg_AC_ARG_VAR_LDFLAGS()dnl 876d6c0b56eSmrgAC_CHECK_TOOL(GOC, gccgo) 877d6c0b56eSmrgif test -z "$GOC"; then 878d6c0b56eSmrg if test -n "$ac_tool_prefix"; then 879d6c0b56eSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880d6c0b56eSmrg fi 881d6c0b56eSmrgfi 882d6c0b56eSmrgif test -z "$GOC"; then 883d6c0b56eSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884d6c0b56eSmrgfi 885d6c0b56eSmrg])#m4_defun 886d6c0b56eSmrg])#m4_ifndef 887d6c0b56eSmrg 888d6c0b56eSmrg 889d6c0b56eSmrg# _LT_LANG_DEFAULT_CONFIG 890d6c0b56eSmrg# ----------------------- 891d6c0b56eSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 892d6c0b56eSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893d6c0b56eSmrg [LT_LANG(CXX)], 894d6c0b56eSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895d6c0b56eSmrg 896d6c0b56eSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 897d6c0b56eSmrg [LT_LANG(F77)], 898d6c0b56eSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899d6c0b56eSmrg 900d6c0b56eSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 901d6c0b56eSmrg [LT_LANG(FC)], 902d6c0b56eSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903d6c0b56eSmrg 904d6c0b56eSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905d6c0b56eSmrgdnl pulling things in needlessly. 906d6c0b56eSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 907d6c0b56eSmrg [LT_LANG(GCJ)], 908d6c0b56eSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909d6c0b56eSmrg [LT_LANG(GCJ)], 910d6c0b56eSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911d6c0b56eSmrg [LT_LANG(GCJ)], 912d6c0b56eSmrg [m4_ifdef([AC_PROG_GCJ], 913d6c0b56eSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914d6c0b56eSmrg m4_ifdef([A][M_PROG_GCJ], 915d6c0b56eSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916d6c0b56eSmrg m4_ifdef([LT_PROG_GCJ], 917d6c0b56eSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918d6c0b56eSmrg 919d6c0b56eSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 920d6c0b56eSmrg [LT_LANG(GO)], 921d6c0b56eSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 922d6c0b56eSmrg 923d6c0b56eSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 924d6c0b56eSmrg [LT_LANG(RC)], 925d6c0b56eSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926d6c0b56eSmrg])# _LT_LANG_DEFAULT_CONFIG 927d6c0b56eSmrg 928d6c0b56eSmrg# Obsolete macros: 929d6c0b56eSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930d6c0b56eSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931d6c0b56eSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932d6c0b56eSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933d6c0b56eSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 935d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 937d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 938d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 940d6c0b56eSmrg 941d6c0b56eSmrg 942d6c0b56eSmrg# _LT_TAG_COMPILER 943d6c0b56eSmrg# ---------------- 944d6c0b56eSmrgm4_defun([_LT_TAG_COMPILER], 945d6c0b56eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 946d6c0b56eSmrg 947d6c0b56eSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948d6c0b56eSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949d6c0b56eSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950d6c0b56eSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 951d6c0b56eSmrg 952d6c0b56eSmrg# If no C compiler was specified, use CC. 953d6c0b56eSmrgLTCC=${LTCC-"$CC"} 954d6c0b56eSmrg 955d6c0b56eSmrg# If no C compiler flags were specified, use CFLAGS. 956d6c0b56eSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 957d6c0b56eSmrg 958d6c0b56eSmrg# Allow CC to be a program name with arguments. 959d6c0b56eSmrgcompiler=$CC 960d6c0b56eSmrg])# _LT_TAG_COMPILER 961d6c0b56eSmrg 962d6c0b56eSmrg 963d6c0b56eSmrg# _LT_COMPILER_BOILERPLATE 964d6c0b56eSmrg# ------------------------ 965d6c0b56eSmrg# Check for compiler boilerplate output or warnings with 966d6c0b56eSmrg# the simple compiler test code. 967d6c0b56eSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 968d6c0b56eSmrg[m4_require([_LT_DECL_SED])dnl 969d6c0b56eSmrgac_outfile=conftest.$ac_objext 970d6c0b56eSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 971d6c0b56eSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972d6c0b56eSmrg_lt_compiler_boilerplate=`cat conftest.err` 973d6c0b56eSmrg$RM conftest* 974d6c0b56eSmrg])# _LT_COMPILER_BOILERPLATE 975d6c0b56eSmrg 976d6c0b56eSmrg 977d6c0b56eSmrg# _LT_LINKER_BOILERPLATE 978d6c0b56eSmrg# ---------------------- 979d6c0b56eSmrg# Check for linker boilerplate output or warnings with 980d6c0b56eSmrg# the simple link test code. 981d6c0b56eSmrgm4_defun([_LT_LINKER_BOILERPLATE], 982d6c0b56eSmrg[m4_require([_LT_DECL_SED])dnl 983d6c0b56eSmrgac_outfile=conftest.$ac_objext 984d6c0b56eSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 985d6c0b56eSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 986d6c0b56eSmrg_lt_linker_boilerplate=`cat conftest.err` 987d6c0b56eSmrg$RM -r conftest* 988d6c0b56eSmrg])# _LT_LINKER_BOILERPLATE 989d6c0b56eSmrg 990d6c0b56eSmrg# _LT_REQUIRED_DARWIN_CHECKS 991d6c0b56eSmrg# ------------------------- 992d6c0b56eSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 993d6c0b56eSmrg case $host_os in 994d6c0b56eSmrg rhapsody* | darwin*) 995d6c0b56eSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 996d6c0b56eSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997d6c0b56eSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 998d6c0b56eSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 999d6c0b56eSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000d6c0b56eSmrg _LT_DECL([], [DSYMUTIL], [1], 1001d6c0b56eSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002d6c0b56eSmrg _LT_DECL([], [NMEDIT], [1], 1003d6c0b56eSmrg [Tool to change global to local symbols on Mac OS X]) 1004d6c0b56eSmrg _LT_DECL([], [LIPO], [1], 1005d6c0b56eSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 1006d6c0b56eSmrg _LT_DECL([], [OTOOL], [1], 1007d6c0b56eSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008d6c0b56eSmrg _LT_DECL([], [OTOOL64], [1], 1009d6c0b56eSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1010d6c0b56eSmrg 1011d6c0b56eSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1012d6c0b56eSmrg [lt_cv_apple_cc_single_mod=no 1013d6c0b56eSmrg if test -z "$LT_MULTI_MODULE"; then 1014d6c0b56eSmrg # By default we will add the -single_module flag. You can override 1015d6c0b56eSmrg # by either setting the environment variable LT_MULTI_MODULE 1016d6c0b56eSmrg # non-empty at configure time, or by adding -multi_module to the 1017d6c0b56eSmrg # link flags. 1018d6c0b56eSmrg rm -rf libconftest.dylib* 1019d6c0b56eSmrg echo "int foo(void){return 1;}" > conftest.c 1020d6c0b56eSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021d6c0b56eSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022d6c0b56eSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023d6c0b56eSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024d6c0b56eSmrg _lt_result=$? 1025d6c0b56eSmrg # If there is a non-empty error log, and "single_module" 1026d6c0b56eSmrg # appears in it, assume the flag caused a linker warning 1027d6c0b56eSmrg if test -s conftest.err && $GREP single_module conftest.err; then 1028d6c0b56eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1029d6c0b56eSmrg # Otherwise, if the output was created with a 0 exit code from 1030d6c0b56eSmrg # the compiler, it worked. 1031d6c0b56eSmrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032d6c0b56eSmrg lt_cv_apple_cc_single_mod=yes 1033d6c0b56eSmrg else 1034d6c0b56eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1035d6c0b56eSmrg fi 1036d6c0b56eSmrg rm -rf libconftest.dylib* 1037d6c0b56eSmrg rm -f conftest.* 1038d6c0b56eSmrg fi]) 1039d6c0b56eSmrg 1040d6c0b56eSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1041d6c0b56eSmrg [lt_cv_ld_exported_symbols_list], 1042d6c0b56eSmrg [lt_cv_ld_exported_symbols_list=no 1043d6c0b56eSmrg save_LDFLAGS=$LDFLAGS 1044d6c0b56eSmrg echo "_main" > conftest.sym 1045d6c0b56eSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1046d6c0b56eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047d6c0b56eSmrg [lt_cv_ld_exported_symbols_list=yes], 1048d6c0b56eSmrg [lt_cv_ld_exported_symbols_list=no]) 1049d6c0b56eSmrg LDFLAGS=$save_LDFLAGS 1050d6c0b56eSmrg ]) 1051d6c0b56eSmrg 1052d6c0b56eSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053d6c0b56eSmrg [lt_cv_ld_force_load=no 1054d6c0b56eSmrg cat > conftest.c << _LT_EOF 1055d6c0b56eSmrgint forced_loaded() { return 2;} 1056d6c0b56eSmrg_LT_EOF 1057d6c0b56eSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058d6c0b56eSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059d6c0b56eSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060d6c0b56eSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061d6c0b56eSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062d6c0b56eSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063d6c0b56eSmrg cat > conftest.c << _LT_EOF 1064d6c0b56eSmrgint main() { return 0;} 1065d6c0b56eSmrg_LT_EOF 1066d6c0b56eSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067d6c0b56eSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068d6c0b56eSmrg _lt_result=$? 1069d6c0b56eSmrg if test -s conftest.err && $GREP force_load conftest.err; then 1070d6c0b56eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1071d6c0b56eSmrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072d6c0b56eSmrg lt_cv_ld_force_load=yes 1073d6c0b56eSmrg else 1074d6c0b56eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1075d6c0b56eSmrg fi 1076d6c0b56eSmrg rm -f conftest.err libconftest.a conftest conftest.c 1077d6c0b56eSmrg rm -rf conftest.dSYM 1078d6c0b56eSmrg ]) 1079d6c0b56eSmrg case $host_os in 1080d6c0b56eSmrg rhapsody* | darwin1.[[012]]) 1081d6c0b56eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1082d6c0b56eSmrg darwin1.*) 1083d6c0b56eSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084d6c0b56eSmrg darwin*) # darwin 5.x on 1085d6c0b56eSmrg # if running on 10.5 or later, the deployment target defaults 1086d6c0b56eSmrg # to the OS version, if on x86, and 10.4, the deployment 1087d6c0b56eSmrg # target defaults to 10.4. Don't you love it? 1088d6c0b56eSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089d6c0b56eSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1090d6c0b56eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1091d6c0b56eSmrg 10.[[012]][[,.]]*) 1092d6c0b56eSmrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093d6c0b56eSmrg 10.*) 1094d6c0b56eSmrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1095d6c0b56eSmrg esac 1096d6c0b56eSmrg ;; 1097d6c0b56eSmrg esac 1098d6c0b56eSmrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1099d6c0b56eSmrg _lt_dar_single_mod='$single_module' 1100d6c0b56eSmrg fi 1101d6c0b56eSmrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 1102d6c0b56eSmrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1103d6c0b56eSmrg else 1104d6c0b56eSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1105d6c0b56eSmrg fi 1106d6c0b56eSmrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107d6c0b56eSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1108d6c0b56eSmrg else 1109d6c0b56eSmrg _lt_dsymutil= 1110d6c0b56eSmrg fi 1111d6c0b56eSmrg ;; 1112d6c0b56eSmrg esac 1113d6c0b56eSmrg]) 1114d6c0b56eSmrg 1115d6c0b56eSmrg 1116d6c0b56eSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117d6c0b56eSmrg# --------------------------------- 1118d6c0b56eSmrg# Checks for linker and compiler features on darwin 1119d6c0b56eSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1120d6c0b56eSmrg[ 1121d6c0b56eSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1124d6c0b56eSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1125d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1126d6c0b56eSmrg if test yes = "$lt_cv_ld_force_load"; then 1127d6c0b56eSmrg _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\"`' 1128d6c0b56eSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129d6c0b56eSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130d6c0b56eSmrg else 1131d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132d6c0b56eSmrg fi 1133d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1134d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135d6c0b56eSmrg case $cc_basename in 1136d6c0b56eSmrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137d6c0b56eSmrg *) _lt_dar_can_shared=$GCC ;; 1138d6c0b56eSmrg esac 1139d6c0b56eSmrg if test yes = "$_lt_dar_can_shared"; then 1140d6c0b56eSmrg output_verbose_link_cmd=func_echo_all 1141d6c0b56eSmrg _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" 1142d6c0b56eSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 1143d6c0b56eSmrg _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" 1144d6c0b56eSmrg _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" 1145d6c0b56eSmrg m4_if([$1], [CXX], 1146d6c0b56eSmrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 1147d6c0b56eSmrg _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" 1148d6c0b56eSmrg _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" 1149d6c0b56eSmrg fi 1150d6c0b56eSmrg],[]) 1151d6c0b56eSmrg else 1152d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1153d6c0b56eSmrg fi 1154d6c0b56eSmrg]) 1155d6c0b56eSmrg 1156d6c0b56eSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157d6c0b56eSmrg# ---------------------------------- 1158d6c0b56eSmrg# Links a minimal program and checks the executable 1159d6c0b56eSmrg# for the system default hardcoded library path. In most cases, 1160d6c0b56eSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1161d6c0b56eSmrg# the location of the communication and MPI libs are included too. 1162d6c0b56eSmrg# If we don't find anything, use the default library path according 1163d6c0b56eSmrg# to the aix ld manual. 1164d6c0b56eSmrg# Store the results from the different compilers for each TAGNAME. 1165d6c0b56eSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1166d6c0b56eSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1167d6c0b56eSmrg[m4_require([_LT_DECL_SED])dnl 1168d6c0b56eSmrgif test set = "${lt_cv_aix_libpath+set}"; then 1169d6c0b56eSmrg aix_libpath=$lt_cv_aix_libpath 1170d6c0b56eSmrgelse 1171d6c0b56eSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172d6c0b56eSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173d6c0b56eSmrg lt_aix_libpath_sed='[ 1174d6c0b56eSmrg /Import File Strings/,/^$/ { 1175d6c0b56eSmrg /^0/ { 1176d6c0b56eSmrg s/^0 *\([^ ]*\) *$/\1/ 1177d6c0b56eSmrg p 1178d6c0b56eSmrg } 1179d6c0b56eSmrg }]' 1180d6c0b56eSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181d6c0b56eSmrg # Check for a 64-bit object if we didn't find anything. 1182d6c0b56eSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183d6c0b56eSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184d6c0b56eSmrg fi],[]) 1185d6c0b56eSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1186d6c0b56eSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187d6c0b56eSmrg fi 1188d6c0b56eSmrg ]) 1189d6c0b56eSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190d6c0b56eSmrgfi 1191d6c0b56eSmrg])# _LT_SYS_MODULE_PATH_AIX 1192d6c0b56eSmrg 1193d6c0b56eSmrg 1194d6c0b56eSmrg# _LT_SHELL_INIT(ARG) 1195d6c0b56eSmrg# ------------------- 1196d6c0b56eSmrgm4_define([_LT_SHELL_INIT], 1197d6c0b56eSmrg[m4_divert_text([M4SH-INIT], [$1 1198d6c0b56eSmrg])])# _LT_SHELL_INIT 1199d6c0b56eSmrg 1200d6c0b56eSmrg 1201d6c0b56eSmrg 1202d6c0b56eSmrg# _LT_PROG_ECHO_BACKSLASH 1203d6c0b56eSmrg# ----------------------- 1204d6c0b56eSmrg# Find how we can fake an echo command that does not interpret backslash. 1205d6c0b56eSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1206d6c0b56eSmrg# of the generated configure script that will find a shell with a builtin 1207d6c0b56eSmrg# printf (that we can use as an echo command). 1208d6c0b56eSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1209d6c0b56eSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210d6c0b56eSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211d6c0b56eSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212d6c0b56eSmrg 1213d6c0b56eSmrgAC_MSG_CHECKING([how to print strings]) 1214d6c0b56eSmrg# Test print first, because it will be a builtin if present. 1215d6c0b56eSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216d6c0b56eSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217d6c0b56eSmrg ECHO='print -r --' 1218d6c0b56eSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219d6c0b56eSmrg ECHO='printf %s\n' 1220d6c0b56eSmrgelse 1221d6c0b56eSmrg # Use this function as a fallback that always works. 1222d6c0b56eSmrg func_fallback_echo () 1223d6c0b56eSmrg { 1224d6c0b56eSmrg eval 'cat <<_LTECHO_EOF 1225d6c0b56eSmrg$[]1 1226d6c0b56eSmrg_LTECHO_EOF' 1227d6c0b56eSmrg } 1228d6c0b56eSmrg ECHO='func_fallback_echo' 1229d6c0b56eSmrgfi 1230d6c0b56eSmrg 1231d6c0b56eSmrg# func_echo_all arg... 1232d6c0b56eSmrg# Invoke $ECHO with all args, space-separated. 1233d6c0b56eSmrgfunc_echo_all () 1234d6c0b56eSmrg{ 1235d6c0b56eSmrg $ECHO "$*" 1236d6c0b56eSmrg} 1237d6c0b56eSmrg 1238d6c0b56eSmrgcase $ECHO in 1239d6c0b56eSmrg printf*) AC_MSG_RESULT([printf]) ;; 1240d6c0b56eSmrg print*) AC_MSG_RESULT([print -r]) ;; 1241d6c0b56eSmrg *) AC_MSG_RESULT([cat]) ;; 1242d6c0b56eSmrgesac 1243d6c0b56eSmrg 1244d6c0b56eSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1245d6c0b56eSmrg[_AS_DETECT_SUGGESTED([ 1246d6c0b56eSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247d6c0b56eSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248d6c0b56eSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249d6c0b56eSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250d6c0b56eSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1251d6c0b56eSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1252d6c0b56eSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253d6c0b56eSmrg 1254d6c0b56eSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255d6c0b56eSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256d6c0b56eSmrg])# _LT_PROG_ECHO_BACKSLASH 1257d6c0b56eSmrg 1258d6c0b56eSmrg 1259d6c0b56eSmrg# _LT_WITH_SYSROOT 1260d6c0b56eSmrg# ---------------- 1261d6c0b56eSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1262d6c0b56eSmrg[AC_MSG_CHECKING([for sysroot]) 1263d6c0b56eSmrgAC_ARG_WITH([sysroot], 1264d6c0b56eSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 1265d6c0b56eSmrg [Search for dependent libraries within DIR (or the compiler's sysroot 1266d6c0b56eSmrg if not specified).])], 1267d6c0b56eSmrg[], [with_sysroot=no]) 1268d6c0b56eSmrg 1269d6c0b56eSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1270d6c0b56eSmrgdnl in case the user passed a directory name. 1271d6c0b56eSmrglt_sysroot= 1272d6c0b56eSmrgcase $with_sysroot in #( 1273d6c0b56eSmrg yes) 1274d6c0b56eSmrg if test yes = "$GCC"; then 1275d6c0b56eSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276d6c0b56eSmrg fi 1277d6c0b56eSmrg ;; #( 1278d6c0b56eSmrg /*) 1279d6c0b56eSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280d6c0b56eSmrg ;; #( 1281d6c0b56eSmrg no|'') 1282d6c0b56eSmrg ;; #( 1283d6c0b56eSmrg *) 1284d6c0b56eSmrg AC_MSG_RESULT([$with_sysroot]) 1285d6c0b56eSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286d6c0b56eSmrg ;; 1287d6c0b56eSmrgesac 1288d6c0b56eSmrg 1289d6c0b56eSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1290d6c0b56eSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1291d6c0b56eSmrg[dependent libraries, and where our libraries should be installed.])]) 1292d6c0b56eSmrg 1293d6c0b56eSmrg# _LT_ENABLE_LOCK 1294d6c0b56eSmrg# --------------- 1295d6c0b56eSmrgm4_defun([_LT_ENABLE_LOCK], 1296d6c0b56eSmrg[AC_ARG_ENABLE([libtool-lock], 1297d6c0b56eSmrg [AS_HELP_STRING([--disable-libtool-lock], 1298d6c0b56eSmrg [avoid locking (might break parallel builds)])]) 1299d6c0b56eSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1300d6c0b56eSmrg 1301d6c0b56eSmrg# Some flags need to be propagated to the compiler or linker for good 1302d6c0b56eSmrg# libtool support. 1303d6c0b56eSmrgcase $host in 1304d6c0b56eSmrgia64-*-hpux*) 1305d6c0b56eSmrg # Find out what ABI is being produced by ac_compile, and set mode 1306d6c0b56eSmrg # options accordingly. 1307d6c0b56eSmrg echo 'int i;' > conftest.$ac_ext 1308d6c0b56eSmrg if AC_TRY_EVAL(ac_compile); then 1309d6c0b56eSmrg case `/usr/bin/file conftest.$ac_objext` in 1310d6c0b56eSmrg *ELF-32*) 1311d6c0b56eSmrg HPUX_IA64_MODE=32 1312d6c0b56eSmrg ;; 1313d6c0b56eSmrg *ELF-64*) 1314d6c0b56eSmrg HPUX_IA64_MODE=64 1315d6c0b56eSmrg ;; 1316d6c0b56eSmrg esac 1317d6c0b56eSmrg fi 1318d6c0b56eSmrg rm -rf conftest* 1319d6c0b56eSmrg ;; 1320d6c0b56eSmrg*-*-irix6*) 1321d6c0b56eSmrg # Find out what ABI is being produced by ac_compile, and set linker 1322d6c0b56eSmrg # options accordingly. 1323d6c0b56eSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1324d6c0b56eSmrg if AC_TRY_EVAL(ac_compile); then 1325d6c0b56eSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 1326d6c0b56eSmrg case `/usr/bin/file conftest.$ac_objext` in 1327d6c0b56eSmrg *32-bit*) 1328d6c0b56eSmrg LD="${LD-ld} -melf32bsmip" 1329d6c0b56eSmrg ;; 1330d6c0b56eSmrg *N32*) 1331d6c0b56eSmrg LD="${LD-ld} -melf32bmipn32" 1332d6c0b56eSmrg ;; 1333d6c0b56eSmrg *64-bit*) 1334d6c0b56eSmrg LD="${LD-ld} -melf64bmip" 1335d6c0b56eSmrg ;; 1336d6c0b56eSmrg esac 1337d6c0b56eSmrg else 1338d6c0b56eSmrg case `/usr/bin/file conftest.$ac_objext` in 1339d6c0b56eSmrg *32-bit*) 1340d6c0b56eSmrg LD="${LD-ld} -32" 1341d6c0b56eSmrg ;; 1342d6c0b56eSmrg *N32*) 1343d6c0b56eSmrg LD="${LD-ld} -n32" 1344d6c0b56eSmrg ;; 1345d6c0b56eSmrg *64-bit*) 1346d6c0b56eSmrg LD="${LD-ld} -64" 1347d6c0b56eSmrg ;; 1348d6c0b56eSmrg esac 1349d6c0b56eSmrg fi 1350d6c0b56eSmrg fi 1351d6c0b56eSmrg rm -rf conftest* 1352d6c0b56eSmrg ;; 1353d6c0b56eSmrg 1354d6c0b56eSmrgmips64*-*linux*) 1355d6c0b56eSmrg # Find out what ABI is being produced by ac_compile, and set linker 1356d6c0b56eSmrg # options accordingly. 1357d6c0b56eSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1358d6c0b56eSmrg if AC_TRY_EVAL(ac_compile); then 1359d6c0b56eSmrg emul=elf 1360d6c0b56eSmrg case `/usr/bin/file conftest.$ac_objext` in 1361d6c0b56eSmrg *32-bit*) 1362d6c0b56eSmrg emul="${emul}32" 1363d6c0b56eSmrg ;; 1364d6c0b56eSmrg *64-bit*) 1365d6c0b56eSmrg emul="${emul}64" 1366d6c0b56eSmrg ;; 1367d6c0b56eSmrg esac 1368d6c0b56eSmrg case `/usr/bin/file conftest.$ac_objext` in 1369d6c0b56eSmrg *MSB*) 1370d6c0b56eSmrg emul="${emul}btsmip" 1371d6c0b56eSmrg ;; 1372d6c0b56eSmrg *LSB*) 1373d6c0b56eSmrg emul="${emul}ltsmip" 1374d6c0b56eSmrg ;; 1375d6c0b56eSmrg esac 1376d6c0b56eSmrg case `/usr/bin/file conftest.$ac_objext` in 1377d6c0b56eSmrg *N32*) 1378d6c0b56eSmrg emul="${emul}n32" 1379d6c0b56eSmrg ;; 1380d6c0b56eSmrg esac 1381d6c0b56eSmrg LD="${LD-ld} -m $emul" 1382d6c0b56eSmrg fi 1383d6c0b56eSmrg rm -rf conftest* 1384d6c0b56eSmrg ;; 1385d6c0b56eSmrg 1386d6c0b56eSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1387d6c0b56eSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1388d6c0b56eSmrg # Find out what ABI is being produced by ac_compile, and set linker 1389d6c0b56eSmrg # options accordingly. Note that the listed cases only cover the 1390d6c0b56eSmrg # situations where additional linker options are needed (such as when 1391d6c0b56eSmrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 1392d6c0b56eSmrg # vice versa); the common cases where no linker options are needed do 1393d6c0b56eSmrg # not appear in the list. 1394d6c0b56eSmrg echo 'int i;' > conftest.$ac_ext 1395d6c0b56eSmrg if AC_TRY_EVAL(ac_compile); then 1396d6c0b56eSmrg case `/usr/bin/file conftest.o` in 1397d6c0b56eSmrg *32-bit*) 1398d6c0b56eSmrg case $host in 1399d6c0b56eSmrg x86_64-*kfreebsd*-gnu) 1400d6c0b56eSmrg LD="${LD-ld} -m elf_i386_fbsd" 1401d6c0b56eSmrg ;; 1402d6c0b56eSmrg x86_64-*linux*) 1403d6c0b56eSmrg case `/usr/bin/file conftest.o` in 1404d6c0b56eSmrg *x86-64*) 1405d6c0b56eSmrg LD="${LD-ld} -m elf32_x86_64" 1406d6c0b56eSmrg ;; 1407d6c0b56eSmrg *) 1408d6c0b56eSmrg LD="${LD-ld} -m elf_i386" 1409d6c0b56eSmrg ;; 1410d6c0b56eSmrg esac 1411d6c0b56eSmrg ;; 1412d6c0b56eSmrg powerpc64le-*linux*) 1413d6c0b56eSmrg LD="${LD-ld} -m elf32lppclinux" 1414d6c0b56eSmrg ;; 1415d6c0b56eSmrg powerpc64-*linux*) 1416d6c0b56eSmrg LD="${LD-ld} -m elf32ppclinux" 1417d6c0b56eSmrg ;; 1418d6c0b56eSmrg s390x-*linux*) 1419d6c0b56eSmrg LD="${LD-ld} -m elf_s390" 1420d6c0b56eSmrg ;; 1421d6c0b56eSmrg sparc64-*linux*) 1422d6c0b56eSmrg LD="${LD-ld} -m elf32_sparc" 1423d6c0b56eSmrg ;; 1424d6c0b56eSmrg esac 1425d6c0b56eSmrg ;; 1426d6c0b56eSmrg *64-bit*) 1427d6c0b56eSmrg case $host in 1428d6c0b56eSmrg x86_64-*kfreebsd*-gnu) 1429d6c0b56eSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1430d6c0b56eSmrg ;; 1431d6c0b56eSmrg x86_64-*linux*) 1432d6c0b56eSmrg LD="${LD-ld} -m elf_x86_64" 1433d6c0b56eSmrg ;; 1434d6c0b56eSmrg powerpcle-*linux*) 1435d6c0b56eSmrg LD="${LD-ld} -m elf64lppc" 1436d6c0b56eSmrg ;; 1437d6c0b56eSmrg powerpc-*linux*) 1438d6c0b56eSmrg LD="${LD-ld} -m elf64ppc" 1439d6c0b56eSmrg ;; 1440d6c0b56eSmrg s390*-*linux*|s390*-*tpf*) 1441d6c0b56eSmrg LD="${LD-ld} -m elf64_s390" 1442d6c0b56eSmrg ;; 1443d6c0b56eSmrg sparc*-*linux*) 1444d6c0b56eSmrg LD="${LD-ld} -m elf64_sparc" 1445d6c0b56eSmrg ;; 1446d6c0b56eSmrg esac 1447d6c0b56eSmrg ;; 1448d6c0b56eSmrg esac 1449d6c0b56eSmrg fi 1450d6c0b56eSmrg rm -rf conftest* 1451d6c0b56eSmrg ;; 1452d6c0b56eSmrg 1453d6c0b56eSmrg*-*-sco3.2v5*) 1454d6c0b56eSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1455d6c0b56eSmrg SAVE_CFLAGS=$CFLAGS 1456d6c0b56eSmrg CFLAGS="$CFLAGS -belf" 1457d6c0b56eSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1458d6c0b56eSmrg [AC_LANG_PUSH(C) 1459d6c0b56eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1460d6c0b56eSmrg AC_LANG_POP]) 1461d6c0b56eSmrg if test yes != "$lt_cv_cc_needs_belf"; then 1462d6c0b56eSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1463d6c0b56eSmrg CFLAGS=$SAVE_CFLAGS 1464d6c0b56eSmrg fi 1465d6c0b56eSmrg ;; 1466d6c0b56eSmrg*-*solaris*) 1467d6c0b56eSmrg # Find out what ABI is being produced by ac_compile, and set linker 1468d6c0b56eSmrg # options accordingly. 1469d6c0b56eSmrg echo 'int i;' > conftest.$ac_ext 1470d6c0b56eSmrg if AC_TRY_EVAL(ac_compile); then 1471d6c0b56eSmrg case `/usr/bin/file conftest.o` in 1472d6c0b56eSmrg *64-bit*) 1473d6c0b56eSmrg case $lt_cv_prog_gnu_ld in 1474d6c0b56eSmrg yes*) 1475d6c0b56eSmrg case $host in 1476d6c0b56eSmrg i?86-*-solaris*|x86_64-*-solaris*) 1477d6c0b56eSmrg LD="${LD-ld} -m elf_x86_64" 1478d6c0b56eSmrg ;; 1479d6c0b56eSmrg sparc*-*-solaris*) 1480d6c0b56eSmrg LD="${LD-ld} -m elf64_sparc" 1481d6c0b56eSmrg ;; 1482d6c0b56eSmrg esac 1483d6c0b56eSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484d6c0b56eSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 1485d6c0b56eSmrg LD=${LD-ld}_sol2 1486d6c0b56eSmrg fi 1487d6c0b56eSmrg ;; 1488d6c0b56eSmrg *) 1489d6c0b56eSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1490d6c0b56eSmrg LD="${LD-ld} -64" 1491d6c0b56eSmrg fi 1492d6c0b56eSmrg ;; 1493d6c0b56eSmrg esac 1494d6c0b56eSmrg ;; 1495d6c0b56eSmrg esac 1496d6c0b56eSmrg fi 1497d6c0b56eSmrg rm -rf conftest* 1498d6c0b56eSmrg ;; 1499d6c0b56eSmrgesac 1500d6c0b56eSmrg 1501d6c0b56eSmrgneed_locks=$enable_libtool_lock 1502d6c0b56eSmrg])# _LT_ENABLE_LOCK 1503d6c0b56eSmrg 1504d6c0b56eSmrg 1505d6c0b56eSmrg# _LT_PROG_AR 1506d6c0b56eSmrg# ----------- 1507d6c0b56eSmrgm4_defun([_LT_PROG_AR], 1508d6c0b56eSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1509d6c0b56eSmrg: ${AR=ar} 1510d6c0b56eSmrg: ${AR_FLAGS=cru} 1511d6c0b56eSmrg_LT_DECL([], [AR], [1], [The archiver]) 1512d6c0b56eSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1513d6c0b56eSmrg 1514d6c0b56eSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1515d6c0b56eSmrg [lt_cv_ar_at_file=no 1516d6c0b56eSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1517d6c0b56eSmrg [echo conftest.$ac_objext > conftest.lst 1518d6c0b56eSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1519d6c0b56eSmrg AC_TRY_EVAL([lt_ar_try]) 1520d6c0b56eSmrg if test 0 -eq "$ac_status"; then 1521d6c0b56eSmrg # Ensure the archiver fails upon bogus file names. 1522d6c0b56eSmrg rm -f conftest.$ac_objext libconftest.a 1523d6c0b56eSmrg AC_TRY_EVAL([lt_ar_try]) 1524d6c0b56eSmrg if test 0 -ne "$ac_status"; then 1525d6c0b56eSmrg lt_cv_ar_at_file=@ 1526d6c0b56eSmrg fi 1527d6c0b56eSmrg fi 1528d6c0b56eSmrg rm -f conftest.* libconftest.a 1529d6c0b56eSmrg ]) 1530d6c0b56eSmrg ]) 1531d6c0b56eSmrg 1532d6c0b56eSmrgif test no = "$lt_cv_ar_at_file"; then 1533d6c0b56eSmrg archiver_list_spec= 1534d6c0b56eSmrgelse 1535d6c0b56eSmrg archiver_list_spec=$lt_cv_ar_at_file 1536d6c0b56eSmrgfi 1537d6c0b56eSmrg_LT_DECL([], [archiver_list_spec], [1], 1538d6c0b56eSmrg [How to feed a file listing to the archiver]) 1539d6c0b56eSmrg])# _LT_PROG_AR 1540d6c0b56eSmrg 1541d6c0b56eSmrg 1542d6c0b56eSmrg# _LT_CMD_OLD_ARCHIVE 1543d6c0b56eSmrg# ------------------- 1544d6c0b56eSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1545d6c0b56eSmrg[_LT_PROG_AR 1546d6c0b56eSmrg 1547d6c0b56eSmrgAC_CHECK_TOOL(STRIP, strip, :) 1548d6c0b56eSmrgtest -z "$STRIP" && STRIP=: 1549d6c0b56eSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1550d6c0b56eSmrg 1551d6c0b56eSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1552d6c0b56eSmrgtest -z "$RANLIB" && RANLIB=: 1553d6c0b56eSmrg_LT_DECL([], [RANLIB], [1], 1554d6c0b56eSmrg [Commands used to install an old-style archive]) 1555d6c0b56eSmrg 1556d6c0b56eSmrg# Determine commands to create old-style static archives. 1557d6c0b56eSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1558d6c0b56eSmrgold_postinstall_cmds='chmod 644 $oldlib' 1559d6c0b56eSmrgold_postuninstall_cmds= 1560d6c0b56eSmrg 1561d6c0b56eSmrgif test -n "$RANLIB"; then 1562d6c0b56eSmrg case $host_os in 1563d6c0b56eSmrg bitrig* | openbsd*) 1564d6c0b56eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1565d6c0b56eSmrg ;; 1566d6c0b56eSmrg *) 1567d6c0b56eSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1568d6c0b56eSmrg ;; 1569d6c0b56eSmrg esac 1570d6c0b56eSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1571d6c0b56eSmrgfi 1572d6c0b56eSmrg 1573d6c0b56eSmrgcase $host_os in 1574d6c0b56eSmrg darwin*) 1575d6c0b56eSmrg lock_old_archive_extraction=yes ;; 1576d6c0b56eSmrg *) 1577d6c0b56eSmrg lock_old_archive_extraction=no ;; 1578d6c0b56eSmrgesac 1579d6c0b56eSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1580d6c0b56eSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1581d6c0b56eSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1582d6c0b56eSmrg [Commands used to build an old-style archive]) 1583d6c0b56eSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1584d6c0b56eSmrg [Whether to use a lock for old archive extraction]) 1585d6c0b56eSmrg])# _LT_CMD_OLD_ARCHIVE 1586d6c0b56eSmrg 1587d6c0b56eSmrg 1588d6c0b56eSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1589d6c0b56eSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1590d6c0b56eSmrg# ---------------------------------------------------------------- 1591d6c0b56eSmrg# Check whether the given compiler option works 1592d6c0b56eSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1593d6c0b56eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1594d6c0b56eSmrgm4_require([_LT_DECL_SED])dnl 1595d6c0b56eSmrgAC_CACHE_CHECK([$1], [$2], 1596d6c0b56eSmrg [$2=no 1597d6c0b56eSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1598d6c0b56eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1599d6c0b56eSmrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1600d6c0b56eSmrg # Insert the option either (1) after the last *FLAGS variable, or 1601d6c0b56eSmrg # (2) before a word containing "conftest.", or (3) at the end. 1602d6c0b56eSmrg # Note that $ac_compile itself does not contain backslashes and begins 1603d6c0b56eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1604d6c0b56eSmrg # The option is referenced via a variable to avoid confusing sed. 1605d6c0b56eSmrg lt_compile=`echo "$ac_compile" | $SED \ 1606d6c0b56eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1607d6c0b56eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1608d6c0b56eSmrg -e 's:$: $lt_compiler_flag:'` 1609d6c0b56eSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1610d6c0b56eSmrg (eval "$lt_compile" 2>conftest.err) 1611d6c0b56eSmrg ac_status=$? 1612d6c0b56eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1613d6c0b56eSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1614d6c0b56eSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1615d6c0b56eSmrg # The compiler can only warn and ignore the option if not recognized 1616d6c0b56eSmrg # So say no if there are warnings other than the usual output. 1617d6c0b56eSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1618d6c0b56eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1619d6c0b56eSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1620d6c0b56eSmrg $2=yes 1621d6c0b56eSmrg fi 1622d6c0b56eSmrg fi 1623d6c0b56eSmrg $RM conftest* 1624d6c0b56eSmrg]) 1625d6c0b56eSmrg 1626d6c0b56eSmrgif test yes = "[$]$2"; then 1627d6c0b56eSmrg m4_if([$5], , :, [$5]) 1628d6c0b56eSmrgelse 1629d6c0b56eSmrg m4_if([$6], , :, [$6]) 1630d6c0b56eSmrgfi 1631d6c0b56eSmrg])# _LT_COMPILER_OPTION 1632d6c0b56eSmrg 1633d6c0b56eSmrg# Old name: 1634d6c0b56eSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1635d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 1636d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1637d6c0b56eSmrg 1638d6c0b56eSmrg 1639d6c0b56eSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1640d6c0b56eSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1641d6c0b56eSmrg# ---------------------------------------------------- 1642d6c0b56eSmrg# Check whether the given linker option works 1643d6c0b56eSmrgAC_DEFUN([_LT_LINKER_OPTION], 1644d6c0b56eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1645d6c0b56eSmrgm4_require([_LT_DECL_SED])dnl 1646d6c0b56eSmrgAC_CACHE_CHECK([$1], [$2], 1647d6c0b56eSmrg [$2=no 1648d6c0b56eSmrg save_LDFLAGS=$LDFLAGS 1649d6c0b56eSmrg LDFLAGS="$LDFLAGS $3" 1650d6c0b56eSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1651d6c0b56eSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1652d6c0b56eSmrg # The linker can only warn and ignore the option if not recognized 1653d6c0b56eSmrg # So say no if there are warnings 1654d6c0b56eSmrg if test -s conftest.err; then 1655d6c0b56eSmrg # Append any errors to the config.log. 1656d6c0b56eSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1657d6c0b56eSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1658d6c0b56eSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1659d6c0b56eSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1660d6c0b56eSmrg $2=yes 1661d6c0b56eSmrg fi 1662d6c0b56eSmrg else 1663d6c0b56eSmrg $2=yes 1664d6c0b56eSmrg fi 1665d6c0b56eSmrg fi 1666d6c0b56eSmrg $RM -r conftest* 1667d6c0b56eSmrg LDFLAGS=$save_LDFLAGS 1668d6c0b56eSmrg]) 1669d6c0b56eSmrg 1670d6c0b56eSmrgif test yes = "[$]$2"; then 1671d6c0b56eSmrg m4_if([$4], , :, [$4]) 1672d6c0b56eSmrgelse 1673d6c0b56eSmrg m4_if([$5], , :, [$5]) 1674d6c0b56eSmrgfi 1675d6c0b56eSmrg])# _LT_LINKER_OPTION 1676d6c0b56eSmrg 1677d6c0b56eSmrg# Old name: 1678d6c0b56eSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1679d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 1680d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1681d6c0b56eSmrg 1682d6c0b56eSmrg 1683d6c0b56eSmrg# LT_CMD_MAX_LEN 1684d6c0b56eSmrg#--------------- 1685d6c0b56eSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1686d6c0b56eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1687d6c0b56eSmrg# find the maximum length of command line arguments 1688d6c0b56eSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1689d6c0b56eSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1690d6c0b56eSmrg i=0 1691d6c0b56eSmrg teststring=ABCD 1692d6c0b56eSmrg 1693d6c0b56eSmrg case $build_os in 1694d6c0b56eSmrg msdosdjgpp*) 1695d6c0b56eSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1696d6c0b56eSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1697d6c0b56eSmrg # during glob expansion). Even if it were fixed, the result of this 1698d6c0b56eSmrg # check would be larger than it should be. 1699d6c0b56eSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1700d6c0b56eSmrg ;; 1701d6c0b56eSmrg 1702d6c0b56eSmrg gnu*) 1703d6c0b56eSmrg # Under GNU Hurd, this test is not required because there is 1704d6c0b56eSmrg # no limit to the length of command line arguments. 1705d6c0b56eSmrg # Libtool will interpret -1 as no limit whatsoever 1706d6c0b56eSmrg lt_cv_sys_max_cmd_len=-1; 1707d6c0b56eSmrg ;; 1708d6c0b56eSmrg 1709d6c0b56eSmrg cygwin* | mingw* | cegcc*) 1710d6c0b56eSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1711d6c0b56eSmrg # about 5 minutes as the teststring grows exponentially. 1712d6c0b56eSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1713d6c0b56eSmrg # you end up with a "frozen" computer, even though with patience 1714d6c0b56eSmrg # the test eventually succeeds (with a max line length of 256k). 1715d6c0b56eSmrg # Instead, let's just punt: use the minimum linelength reported by 1716d6c0b56eSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1717d6c0b56eSmrg lt_cv_sys_max_cmd_len=8192; 1718d6c0b56eSmrg ;; 1719d6c0b56eSmrg 1720d6c0b56eSmrg mint*) 1721d6c0b56eSmrg # On MiNT this can take a long time and run out of memory. 1722d6c0b56eSmrg lt_cv_sys_max_cmd_len=8192; 1723d6c0b56eSmrg ;; 1724d6c0b56eSmrg 1725d6c0b56eSmrg amigaos*) 1726d6c0b56eSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1727d6c0b56eSmrg # So we just punt and use a minimum line length of 8192. 1728d6c0b56eSmrg lt_cv_sys_max_cmd_len=8192; 1729d6c0b56eSmrg ;; 1730d6c0b56eSmrg 1731d6c0b56eSmrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1732d6c0b56eSmrg # This has been around since 386BSD, at least. Likely further. 1733d6c0b56eSmrg if test -x /sbin/sysctl; then 1734d6c0b56eSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1735d6c0b56eSmrg elif test -x /usr/sbin/sysctl; then 1736d6c0b56eSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1737d6c0b56eSmrg else 1738d6c0b56eSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1739d6c0b56eSmrg fi 1740d6c0b56eSmrg # And add a safety zone 1741d6c0b56eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1742d6c0b56eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1743d6c0b56eSmrg ;; 1744d6c0b56eSmrg 1745d6c0b56eSmrg interix*) 1746d6c0b56eSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1747d6c0b56eSmrg lt_cv_sys_max_cmd_len=196608 1748d6c0b56eSmrg ;; 1749d6c0b56eSmrg 1750d6c0b56eSmrg os2*) 1751d6c0b56eSmrg # The test takes a long time on OS/2. 1752d6c0b56eSmrg lt_cv_sys_max_cmd_len=8192 1753d6c0b56eSmrg ;; 1754d6c0b56eSmrg 1755d6c0b56eSmrg osf*) 1756d6c0b56eSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1757d6c0b56eSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1758d6c0b56eSmrg # nice to cause kernel panics so lets avoid the loop below. 1759d6c0b56eSmrg # First set a reasonable default. 1760d6c0b56eSmrg lt_cv_sys_max_cmd_len=16384 1761d6c0b56eSmrg # 1762d6c0b56eSmrg if test -x /sbin/sysconfig; then 1763d6c0b56eSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1764d6c0b56eSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1765d6c0b56eSmrg esac 1766d6c0b56eSmrg fi 1767d6c0b56eSmrg ;; 1768d6c0b56eSmrg sco3.2v5*) 1769d6c0b56eSmrg lt_cv_sys_max_cmd_len=102400 1770d6c0b56eSmrg ;; 1771d6c0b56eSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1772d6c0b56eSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1773d6c0b56eSmrg if test -n "$kargmax"; then 1774d6c0b56eSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1775d6c0b56eSmrg else 1776d6c0b56eSmrg lt_cv_sys_max_cmd_len=32768 1777d6c0b56eSmrg fi 1778d6c0b56eSmrg ;; 1779d6c0b56eSmrg *) 1780d6c0b56eSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1781d6c0b56eSmrg if test -n "$lt_cv_sys_max_cmd_len" && \ 1782d6c0b56eSmrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1783d6c0b56eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1784d6c0b56eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1785d6c0b56eSmrg else 1786d6c0b56eSmrg # Make teststring a little bigger before we do anything with it. 1787d6c0b56eSmrg # a 1K string should be a reasonable start. 1788d6c0b56eSmrg for i in 1 2 3 4 5 6 7 8; do 1789d6c0b56eSmrg teststring=$teststring$teststring 1790d6c0b56eSmrg done 1791d6c0b56eSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1792d6c0b56eSmrg # If test is not a shell built-in, we'll probably end up computing a 1793d6c0b56eSmrg # maximum length that is only half of the actual maximum length, but 1794d6c0b56eSmrg # we can't tell. 1795d6c0b56eSmrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1796d6c0b56eSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 1797d6c0b56eSmrg test 17 != "$i" # 1/2 MB should be enough 1798d6c0b56eSmrg do 1799d6c0b56eSmrg i=`expr $i + 1` 1800d6c0b56eSmrg teststring=$teststring$teststring 1801d6c0b56eSmrg done 1802d6c0b56eSmrg # Only check the string length outside the loop. 1803d6c0b56eSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1804d6c0b56eSmrg teststring= 1805d6c0b56eSmrg # Add a significant safety factor because C++ compilers can tack on 1806d6c0b56eSmrg # massive amounts of additional arguments before passing them to the 1807d6c0b56eSmrg # linker. It appears as though 1/2 is a usable value. 1808d6c0b56eSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1809d6c0b56eSmrg fi 1810d6c0b56eSmrg ;; 1811d6c0b56eSmrg esac 1812d6c0b56eSmrg]) 1813d6c0b56eSmrgif test -n "$lt_cv_sys_max_cmd_len"; then 1814d6c0b56eSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1815d6c0b56eSmrgelse 1816d6c0b56eSmrg AC_MSG_RESULT(none) 1817d6c0b56eSmrgfi 1818d6c0b56eSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1819d6c0b56eSmrg_LT_DECL([], [max_cmd_len], [0], 1820d6c0b56eSmrg [What is the maximum length of a command?]) 1821d6c0b56eSmrg])# LT_CMD_MAX_LEN 1822d6c0b56eSmrg 1823d6c0b56eSmrg# Old name: 1824d6c0b56eSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1825d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 1826d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827d6c0b56eSmrg 1828d6c0b56eSmrg 1829d6c0b56eSmrg# _LT_HEADER_DLFCN 1830d6c0b56eSmrg# ---------------- 1831d6c0b56eSmrgm4_defun([_LT_HEADER_DLFCN], 1832d6c0b56eSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1833d6c0b56eSmrg])# _LT_HEADER_DLFCN 1834d6c0b56eSmrg 1835d6c0b56eSmrg 1836d6c0b56eSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1837d6c0b56eSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1838d6c0b56eSmrg# ---------------------------------------------------------------- 1839d6c0b56eSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1840d6c0b56eSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1841d6c0b56eSmrgif test yes = "$cross_compiling"; then : 1842d6c0b56eSmrg [$4] 1843d6c0b56eSmrgelse 1844d6c0b56eSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1845d6c0b56eSmrg lt_status=$lt_dlunknown 1846d6c0b56eSmrg cat > conftest.$ac_ext <<_LT_EOF 1847d6c0b56eSmrg[#line $LINENO "configure" 1848d6c0b56eSmrg#include "confdefs.h" 1849d6c0b56eSmrg 1850d6c0b56eSmrg#if HAVE_DLFCN_H 1851d6c0b56eSmrg#include <dlfcn.h> 1852d6c0b56eSmrg#endif 1853d6c0b56eSmrg 1854d6c0b56eSmrg#include <stdio.h> 1855d6c0b56eSmrg 1856d6c0b56eSmrg#ifdef RTLD_GLOBAL 1857d6c0b56eSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1858d6c0b56eSmrg#else 1859d6c0b56eSmrg# ifdef DL_GLOBAL 1860d6c0b56eSmrg# define LT_DLGLOBAL DL_GLOBAL 1861d6c0b56eSmrg# else 1862d6c0b56eSmrg# define LT_DLGLOBAL 0 1863d6c0b56eSmrg# endif 1864d6c0b56eSmrg#endif 1865d6c0b56eSmrg 1866d6c0b56eSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1867d6c0b56eSmrg find out it does not work in some platform. */ 1868d6c0b56eSmrg#ifndef LT_DLLAZY_OR_NOW 1869d6c0b56eSmrg# ifdef RTLD_LAZY 1870d6c0b56eSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1871d6c0b56eSmrg# else 1872d6c0b56eSmrg# ifdef DL_LAZY 1873d6c0b56eSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1874d6c0b56eSmrg# else 1875d6c0b56eSmrg# ifdef RTLD_NOW 1876d6c0b56eSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1877d6c0b56eSmrg# else 1878d6c0b56eSmrg# ifdef DL_NOW 1879d6c0b56eSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1880d6c0b56eSmrg# else 1881d6c0b56eSmrg# define LT_DLLAZY_OR_NOW 0 1882d6c0b56eSmrg# endif 1883d6c0b56eSmrg# endif 1884d6c0b56eSmrg# endif 1885d6c0b56eSmrg# endif 1886d6c0b56eSmrg#endif 1887d6c0b56eSmrg 1888d6c0b56eSmrg/* When -fvisibility=hidden is used, assume the code has been annotated 1889d6c0b56eSmrg correspondingly for the symbols needed. */ 1890d6c0b56eSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1891d6c0b56eSmrgint fnord () __attribute__((visibility("default"))); 1892d6c0b56eSmrg#endif 1893d6c0b56eSmrg 1894d6c0b56eSmrgint fnord () { return 42; } 1895d6c0b56eSmrgint main () 1896d6c0b56eSmrg{ 1897d6c0b56eSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1898d6c0b56eSmrg int status = $lt_dlunknown; 1899d6c0b56eSmrg 1900d6c0b56eSmrg if (self) 1901d6c0b56eSmrg { 1902d6c0b56eSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1903d6c0b56eSmrg else 1904d6c0b56eSmrg { 1905d6c0b56eSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1906d6c0b56eSmrg else puts (dlerror ()); 1907d6c0b56eSmrg } 1908d6c0b56eSmrg /* dlclose (self); */ 1909d6c0b56eSmrg } 1910d6c0b56eSmrg else 1911d6c0b56eSmrg puts (dlerror ()); 1912d6c0b56eSmrg 1913d6c0b56eSmrg return status; 1914d6c0b56eSmrg}] 1915d6c0b56eSmrg_LT_EOF 1916d6c0b56eSmrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1917d6c0b56eSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1918d6c0b56eSmrg lt_status=$? 1919d6c0b56eSmrg case x$lt_status in 1920d6c0b56eSmrg x$lt_dlno_uscore) $1 ;; 1921d6c0b56eSmrg x$lt_dlneed_uscore) $2 ;; 1922d6c0b56eSmrg x$lt_dlunknown|x*) $3 ;; 1923d6c0b56eSmrg esac 1924d6c0b56eSmrg else : 1925d6c0b56eSmrg # compilation failed 1926d6c0b56eSmrg $3 1927d6c0b56eSmrg fi 1928d6c0b56eSmrgfi 1929d6c0b56eSmrgrm -fr conftest* 1930d6c0b56eSmrg])# _LT_TRY_DLOPEN_SELF 1931d6c0b56eSmrg 1932d6c0b56eSmrg 1933d6c0b56eSmrg# LT_SYS_DLOPEN_SELF 1934d6c0b56eSmrg# ------------------ 1935d6c0b56eSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1936d6c0b56eSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1937d6c0b56eSmrgif test yes != "$enable_dlopen"; then 1938d6c0b56eSmrg enable_dlopen=unknown 1939d6c0b56eSmrg enable_dlopen_self=unknown 1940d6c0b56eSmrg enable_dlopen_self_static=unknown 1941d6c0b56eSmrgelse 1942d6c0b56eSmrg lt_cv_dlopen=no 1943d6c0b56eSmrg lt_cv_dlopen_libs= 1944d6c0b56eSmrg 1945d6c0b56eSmrg case $host_os in 1946d6c0b56eSmrg beos*) 1947d6c0b56eSmrg lt_cv_dlopen=load_add_on 1948d6c0b56eSmrg lt_cv_dlopen_libs= 1949d6c0b56eSmrg lt_cv_dlopen_self=yes 1950d6c0b56eSmrg ;; 1951d6c0b56eSmrg 1952d6c0b56eSmrg mingw* | pw32* | cegcc*) 1953d6c0b56eSmrg lt_cv_dlopen=LoadLibrary 1954d6c0b56eSmrg lt_cv_dlopen_libs= 1955d6c0b56eSmrg ;; 1956d6c0b56eSmrg 1957d6c0b56eSmrg cygwin*) 1958d6c0b56eSmrg lt_cv_dlopen=dlopen 1959d6c0b56eSmrg lt_cv_dlopen_libs= 1960d6c0b56eSmrg ;; 1961d6c0b56eSmrg 1962d6c0b56eSmrg darwin*) 1963d6c0b56eSmrg # if libdl is installed we need to link against it 1964d6c0b56eSmrg AC_CHECK_LIB([dl], [dlopen], 1965d6c0b56eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 1966d6c0b56eSmrg lt_cv_dlopen=dyld 1967d6c0b56eSmrg lt_cv_dlopen_libs= 1968d6c0b56eSmrg lt_cv_dlopen_self=yes 1969d6c0b56eSmrg ]) 1970d6c0b56eSmrg ;; 1971d6c0b56eSmrg 1972d6c0b56eSmrg tpf*) 1973d6c0b56eSmrg # Don't try to run any link tests for TPF. We know it's impossible 1974d6c0b56eSmrg # because TPF is a cross-compiler, and we know how we open DSOs. 1975d6c0b56eSmrg lt_cv_dlopen=dlopen 1976d6c0b56eSmrg lt_cv_dlopen_libs= 1977d6c0b56eSmrg lt_cv_dlopen_self=no 1978d6c0b56eSmrg ;; 1979d6c0b56eSmrg 1980d6c0b56eSmrg *) 1981d6c0b56eSmrg AC_CHECK_FUNC([shl_load], 1982d6c0b56eSmrg [lt_cv_dlopen=shl_load], 1983d6c0b56eSmrg [AC_CHECK_LIB([dld], [shl_load], 1984d6c0b56eSmrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1985d6c0b56eSmrg [AC_CHECK_FUNC([dlopen], 1986d6c0b56eSmrg [lt_cv_dlopen=dlopen], 1987d6c0b56eSmrg [AC_CHECK_LIB([dl], [dlopen], 1988d6c0b56eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1989d6c0b56eSmrg [AC_CHECK_LIB([svld], [dlopen], 1990d6c0b56eSmrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1991d6c0b56eSmrg [AC_CHECK_LIB([dld], [dld_link], 1992d6c0b56eSmrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1993d6c0b56eSmrg ]) 1994d6c0b56eSmrg ]) 1995d6c0b56eSmrg ]) 1996d6c0b56eSmrg ]) 1997d6c0b56eSmrg ]) 1998d6c0b56eSmrg ;; 1999d6c0b56eSmrg esac 2000d6c0b56eSmrg 2001d6c0b56eSmrg if test no = "$lt_cv_dlopen"; then 2002d6c0b56eSmrg enable_dlopen=no 2003d6c0b56eSmrg else 2004d6c0b56eSmrg enable_dlopen=yes 2005d6c0b56eSmrg fi 2006d6c0b56eSmrg 2007d6c0b56eSmrg case $lt_cv_dlopen in 2008d6c0b56eSmrg dlopen) 2009d6c0b56eSmrg save_CPPFLAGS=$CPPFLAGS 2010d6c0b56eSmrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011d6c0b56eSmrg 2012d6c0b56eSmrg save_LDFLAGS=$LDFLAGS 2013d6c0b56eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014d6c0b56eSmrg 2015d6c0b56eSmrg save_LIBS=$LIBS 2016d6c0b56eSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2017d6c0b56eSmrg 2018d6c0b56eSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 2019d6c0b56eSmrg lt_cv_dlopen_self, [dnl 2020d6c0b56eSmrg _LT_TRY_DLOPEN_SELF( 2021d6c0b56eSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2022d6c0b56eSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2023d6c0b56eSmrg ]) 2024d6c0b56eSmrg 2025d6c0b56eSmrg if test yes = "$lt_cv_dlopen_self"; then 2026d6c0b56eSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2027d6c0b56eSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2028d6c0b56eSmrg lt_cv_dlopen_self_static, [dnl 2029d6c0b56eSmrg _LT_TRY_DLOPEN_SELF( 2030d6c0b56eSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2031d6c0b56eSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2032d6c0b56eSmrg ]) 2033d6c0b56eSmrg fi 2034d6c0b56eSmrg 2035d6c0b56eSmrg CPPFLAGS=$save_CPPFLAGS 2036d6c0b56eSmrg LDFLAGS=$save_LDFLAGS 2037d6c0b56eSmrg LIBS=$save_LIBS 2038d6c0b56eSmrg ;; 2039d6c0b56eSmrg esac 2040d6c0b56eSmrg 2041d6c0b56eSmrg case $lt_cv_dlopen_self in 2042d6c0b56eSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2043d6c0b56eSmrg *) enable_dlopen_self=unknown ;; 2044d6c0b56eSmrg esac 2045d6c0b56eSmrg 2046d6c0b56eSmrg case $lt_cv_dlopen_self_static in 2047d6c0b56eSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2048d6c0b56eSmrg *) enable_dlopen_self_static=unknown ;; 2049d6c0b56eSmrg esac 2050d6c0b56eSmrgfi 2051d6c0b56eSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2052d6c0b56eSmrg [Whether dlopen is supported]) 2053d6c0b56eSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2054d6c0b56eSmrg [Whether dlopen of programs is supported]) 2055d6c0b56eSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2056d6c0b56eSmrg [Whether dlopen of statically linked programs is supported]) 2057d6c0b56eSmrg])# LT_SYS_DLOPEN_SELF 2058d6c0b56eSmrg 2059d6c0b56eSmrg# Old name: 2060d6c0b56eSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2061d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 2062d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063d6c0b56eSmrg 2064d6c0b56eSmrg 2065d6c0b56eSmrg# _LT_COMPILER_C_O([TAGNAME]) 2066d6c0b56eSmrg# --------------------------- 2067d6c0b56eSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 2068d6c0b56eSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2069d6c0b56eSmrgm4_defun([_LT_COMPILER_C_O], 2070d6c0b56eSmrg[m4_require([_LT_DECL_SED])dnl 2071d6c0b56eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2072d6c0b56eSmrgm4_require([_LT_TAG_COMPILER])dnl 2073d6c0b56eSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2074d6c0b56eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2075d6c0b56eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2076d6c0b56eSmrg $RM -r conftest 2>/dev/null 2077d6c0b56eSmrg mkdir conftest 2078d6c0b56eSmrg cd conftest 2079d6c0b56eSmrg mkdir out 2080d6c0b56eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081d6c0b56eSmrg 2082d6c0b56eSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2083d6c0b56eSmrg # Insert the option either (1) after the last *FLAGS variable, or 2084d6c0b56eSmrg # (2) before a word containing "conftest.", or (3) at the end. 2085d6c0b56eSmrg # Note that $ac_compile itself does not contain backslashes and begins 2086d6c0b56eSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2087d6c0b56eSmrg lt_compile=`echo "$ac_compile" | $SED \ 2088d6c0b56eSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2089d6c0b56eSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2090d6c0b56eSmrg -e 's:$: $lt_compiler_flag:'` 2091d6c0b56eSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2092d6c0b56eSmrg (eval "$lt_compile" 2>out/conftest.err) 2093d6c0b56eSmrg ac_status=$? 2094d6c0b56eSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2095d6c0b56eSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2096d6c0b56eSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2097d6c0b56eSmrg then 2098d6c0b56eSmrg # The compiler can only warn and ignore the option if not recognized 2099d6c0b56eSmrg # So say no if there are warnings 2100d6c0b56eSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2101d6c0b56eSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2102d6c0b56eSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2103d6c0b56eSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2104d6c0b56eSmrg fi 2105d6c0b56eSmrg fi 2106d6c0b56eSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2107d6c0b56eSmrg $RM conftest* 2108d6c0b56eSmrg # SGI C++ compiler will create directory out/ii_files/ for 2109d6c0b56eSmrg # template instantiation 2110d6c0b56eSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2111d6c0b56eSmrg $RM out/* && rmdir out 2112d6c0b56eSmrg cd .. 2113d6c0b56eSmrg $RM -r conftest 2114d6c0b56eSmrg $RM conftest* 2115d6c0b56eSmrg]) 2116d6c0b56eSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2117d6c0b56eSmrg [Does compiler simultaneously support -c and -o options?]) 2118d6c0b56eSmrg])# _LT_COMPILER_C_O 2119d6c0b56eSmrg 2120d6c0b56eSmrg 2121d6c0b56eSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2122d6c0b56eSmrg# ---------------------------------- 2123d6c0b56eSmrg# Check to see if we can do hard links to lock some files if needed 2124d6c0b56eSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2125d6c0b56eSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2126d6c0b56eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2127d6c0b56eSmrg_LT_COMPILER_C_O([$1]) 2128d6c0b56eSmrg 2129d6c0b56eSmrghard_links=nottested 2130d6c0b56eSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2131d6c0b56eSmrg # do not overwrite the value of need_locks provided by the user 2132d6c0b56eSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2133d6c0b56eSmrg hard_links=yes 2134d6c0b56eSmrg $RM conftest* 2135d6c0b56eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2136d6c0b56eSmrg touch conftest.a 2137d6c0b56eSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2138d6c0b56eSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2139d6c0b56eSmrg AC_MSG_RESULT([$hard_links]) 2140d6c0b56eSmrg if test no = "$hard_links"; then 2141d6c0b56eSmrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2142d6c0b56eSmrg need_locks=warn 2143d6c0b56eSmrg fi 2144d6c0b56eSmrgelse 2145d6c0b56eSmrg need_locks=no 2146d6c0b56eSmrgfi 2147d6c0b56eSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2148d6c0b56eSmrg])# _LT_COMPILER_FILE_LOCKS 2149d6c0b56eSmrg 2150d6c0b56eSmrg 2151d6c0b56eSmrg# _LT_CHECK_OBJDIR 2152d6c0b56eSmrg# ---------------- 2153d6c0b56eSmrgm4_defun([_LT_CHECK_OBJDIR], 2154d6c0b56eSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2155d6c0b56eSmrg[rm -f .libs 2>/dev/null 2156d6c0b56eSmrgmkdir .libs 2>/dev/null 2157d6c0b56eSmrgif test -d .libs; then 2158d6c0b56eSmrg lt_cv_objdir=.libs 2159d6c0b56eSmrgelse 2160d6c0b56eSmrg # MS-DOS does not allow filenames that begin with a dot. 2161d6c0b56eSmrg lt_cv_objdir=_libs 2162d6c0b56eSmrgfi 2163d6c0b56eSmrgrmdir .libs 2>/dev/null]) 2164d6c0b56eSmrgobjdir=$lt_cv_objdir 2165d6c0b56eSmrg_LT_DECL([], [objdir], [0], 2166d6c0b56eSmrg [The name of the directory that contains temporary libtool files])dnl 2167d6c0b56eSmrgm4_pattern_allow([LT_OBJDIR])dnl 2168d6c0b56eSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 2169d6c0b56eSmrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2170d6c0b56eSmrg])# _LT_CHECK_OBJDIR 2171d6c0b56eSmrg 2172d6c0b56eSmrg 2173d6c0b56eSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2174d6c0b56eSmrg# -------------------------------------- 2175d6c0b56eSmrg# Check hardcoding attributes. 2176d6c0b56eSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2177d6c0b56eSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2178d6c0b56eSmrg_LT_TAGVAR(hardcode_action, $1)= 2179d6c0b56eSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2180d6c0b56eSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2181d6c0b56eSmrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2182d6c0b56eSmrg 2183d6c0b56eSmrg # We can hardcode non-existent directories. 2184d6c0b56eSmrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2185d6c0b56eSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2186d6c0b56eSmrg # have to relink, otherwise we might link with an installed library 2187d6c0b56eSmrg # when we should be linking with a yet-to-be-installed one 2188d6c0b56eSmrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 2189d6c0b56eSmrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2190d6c0b56eSmrg # Linking always hardcodes the temporary library directory. 2191d6c0b56eSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2192d6c0b56eSmrg else 2193d6c0b56eSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2194d6c0b56eSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2195d6c0b56eSmrg fi 2196d6c0b56eSmrgelse 2197d6c0b56eSmrg # We cannot hardcode anything, or else we can only hardcode existing 2198d6c0b56eSmrg # directories. 2199d6c0b56eSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2200d6c0b56eSmrgfi 2201d6c0b56eSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202d6c0b56eSmrg 2203d6c0b56eSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 2204d6c0b56eSmrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2205d6c0b56eSmrg # Fast installation is not supported 2206d6c0b56eSmrg enable_fast_install=no 2207d6c0b56eSmrgelif test yes = "$shlibpath_overrides_runpath" || 2208d6c0b56eSmrg test no = "$enable_shared"; then 2209d6c0b56eSmrg # Fast installation is not necessary 2210d6c0b56eSmrg enable_fast_install=needless 2211d6c0b56eSmrgfi 2212d6c0b56eSmrg_LT_TAGDECL([], [hardcode_action], [0], 2213d6c0b56eSmrg [How to hardcode a shared library path into an executable]) 2214d6c0b56eSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2215d6c0b56eSmrg 2216d6c0b56eSmrg 2217d6c0b56eSmrg# _LT_CMD_STRIPLIB 2218d6c0b56eSmrg# ---------------- 2219d6c0b56eSmrgm4_defun([_LT_CMD_STRIPLIB], 2220d6c0b56eSmrg[m4_require([_LT_DECL_EGREP]) 2221d6c0b56eSmrgstriplib= 2222d6c0b56eSmrgold_striplib= 2223d6c0b56eSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2224d6c0b56eSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225d6c0b56eSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2226d6c0b56eSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2227d6c0b56eSmrg AC_MSG_RESULT([yes]) 2228d6c0b56eSmrgelse 2229d6c0b56eSmrg# FIXME - insert some real tests, host_os isn't really good enough 2230d6c0b56eSmrg case $host_os in 2231d6c0b56eSmrg darwin*) 2232d6c0b56eSmrg if test -n "$STRIP"; then 2233d6c0b56eSmrg striplib="$STRIP -x" 2234d6c0b56eSmrg old_striplib="$STRIP -S" 2235d6c0b56eSmrg AC_MSG_RESULT([yes]) 2236d6c0b56eSmrg else 2237d6c0b56eSmrg AC_MSG_RESULT([no]) 2238d6c0b56eSmrg fi 2239d6c0b56eSmrg ;; 2240d6c0b56eSmrg *) 2241d6c0b56eSmrg AC_MSG_RESULT([no]) 2242d6c0b56eSmrg ;; 2243d6c0b56eSmrg esac 2244d6c0b56eSmrgfi 2245d6c0b56eSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2246d6c0b56eSmrg_LT_DECL([], [striplib], [1]) 2247d6c0b56eSmrg])# _LT_CMD_STRIPLIB 2248d6c0b56eSmrg 2249d6c0b56eSmrg 2250d6c0b56eSmrg# _LT_PREPARE_MUNGE_PATH_LIST 2251d6c0b56eSmrg# --------------------------- 2252d6c0b56eSmrg# Make sure func_munge_path_list() is defined correctly. 2253d6c0b56eSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 2254d6c0b56eSmrg[[# func_munge_path_list VARIABLE PATH 2255d6c0b56eSmrg# ----------------------------------- 2256d6c0b56eSmrg# VARIABLE is name of variable containing _space_ separated list of 2257d6c0b56eSmrg# directories to be munged by the contents of PATH, which is string 2258d6c0b56eSmrg# having a format: 2259d6c0b56eSmrg# "DIR[:DIR]:" 2260d6c0b56eSmrg# string "DIR[ DIR]" will be prepended to VARIABLE 2261d6c0b56eSmrg# ":DIR[:DIR]" 2262d6c0b56eSmrg# string "DIR[ DIR]" will be appended to VARIABLE 2263d6c0b56eSmrg# "DIRP[:DIRP]::[DIRA:]DIRA" 2264d6c0b56eSmrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 2265d6c0b56eSmrg# "DIRA[ DIRA]" will be appended to VARIABLE 2266d6c0b56eSmrg# "DIR[:DIR]" 2267d6c0b56eSmrg# VARIABLE will be replaced by "DIR[ DIR]" 2268d6c0b56eSmrgfunc_munge_path_list () 2269d6c0b56eSmrg{ 2270d6c0b56eSmrg case x@S|@2 in 2271d6c0b56eSmrg x) 2272d6c0b56eSmrg ;; 2273d6c0b56eSmrg *:) 2274d6c0b56eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 2275d6c0b56eSmrg ;; 2276d6c0b56eSmrg x:*) 2277d6c0b56eSmrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 2278d6c0b56eSmrg ;; 2279d6c0b56eSmrg *::*) 2280d6c0b56eSmrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 2281d6c0b56eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 2282d6c0b56eSmrg ;; 2283d6c0b56eSmrg *) 2284d6c0b56eSmrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 2285d6c0b56eSmrg ;; 2286d6c0b56eSmrg esac 2287d6c0b56eSmrg} 2288d6c0b56eSmrg]])# _LT_PREPARE_PATH_LIST 2289d6c0b56eSmrg 2290d6c0b56eSmrg 2291d6c0b56eSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2292d6c0b56eSmrg# ----------------------------- 2293d6c0b56eSmrg# PORTME Fill in your ld.so characteristics 2294d6c0b56eSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2295d6c0b56eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2296d6c0b56eSmrgm4_require([_LT_DECL_EGREP])dnl 2297d6c0b56eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2298d6c0b56eSmrgm4_require([_LT_DECL_OBJDUMP])dnl 2299d6c0b56eSmrgm4_require([_LT_DECL_SED])dnl 2300d6c0b56eSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 2301d6c0b56eSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2302d6c0b56eSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2303d6c0b56eSmrgm4_if([$1], 2304d6c0b56eSmrg [], [ 2305d6c0b56eSmrgif test yes = "$GCC"; then 2306d6c0b56eSmrg case $host_os in 2307d6c0b56eSmrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 2308d6c0b56eSmrg *) lt_awk_arg='/^libraries:/' ;; 2309d6c0b56eSmrg esac 2310d6c0b56eSmrg case $host_os in 2311d6c0b56eSmrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 2312d6c0b56eSmrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2313d6c0b56eSmrg esac 2314d6c0b56eSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2315d6c0b56eSmrg case $lt_search_path_spec in 2316d6c0b56eSmrg *\;*) 2317d6c0b56eSmrg # if the path contains ";" then we assume it to be the separator 2318d6c0b56eSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2319d6c0b56eSmrg # assumed that no part of a normal pathname contains ";" but that should 2320d6c0b56eSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2321d6c0b56eSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2322d6c0b56eSmrg ;; 2323d6c0b56eSmrg *) 2324d6c0b56eSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2325d6c0b56eSmrg ;; 2326d6c0b56eSmrg esac 2327d6c0b56eSmrg # Ok, now we have the path, separated by spaces, we can step through it 2328d6c0b56eSmrg # and add multilib dir if necessary... 2329d6c0b56eSmrg lt_tmp_lt_search_path_spec= 2330d6c0b56eSmrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2331d6c0b56eSmrg # ...but if some path component already ends with the multilib dir we assume 2332d6c0b56eSmrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 2333d6c0b56eSmrg case "$lt_multi_os_dir; $lt_search_path_spec " in 2334d6c0b56eSmrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 2335d6c0b56eSmrg lt_multi_os_dir= 2336d6c0b56eSmrg ;; 2337d6c0b56eSmrg esac 2338d6c0b56eSmrg for lt_sys_path in $lt_search_path_spec; do 2339d6c0b56eSmrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 2340d6c0b56eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 2341d6c0b56eSmrg elif test -n "$lt_multi_os_dir"; then 2342d6c0b56eSmrg test -d "$lt_sys_path" && \ 2343d6c0b56eSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2344d6c0b56eSmrg fi 2345d6c0b56eSmrg done 2346d6c0b56eSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 2347d6c0b56eSmrgBEGIN {RS = " "; FS = "/|\n";} { 2348d6c0b56eSmrg lt_foo = ""; 2349d6c0b56eSmrg lt_count = 0; 2350d6c0b56eSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2351d6c0b56eSmrg if ($lt_i != "" && $lt_i != ".") { 2352d6c0b56eSmrg if ($lt_i == "..") { 2353d6c0b56eSmrg lt_count++; 2354d6c0b56eSmrg } else { 2355d6c0b56eSmrg if (lt_count == 0) { 2356d6c0b56eSmrg lt_foo = "/" $lt_i lt_foo; 2357d6c0b56eSmrg } else { 2358d6c0b56eSmrg lt_count--; 2359d6c0b56eSmrg } 2360d6c0b56eSmrg } 2361d6c0b56eSmrg } 2362d6c0b56eSmrg } 2363d6c0b56eSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2364d6c0b56eSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2365d6c0b56eSmrg}'` 2366d6c0b56eSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2367d6c0b56eSmrg # for these hosts. 2368d6c0b56eSmrg case $host_os in 2369d6c0b56eSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2370d6c0b56eSmrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2371d6c0b56eSmrg esac 2372d6c0b56eSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2373d6c0b56eSmrgelse 2374d6c0b56eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2375d6c0b56eSmrgfi]) 2376d6c0b56eSmrglibrary_names_spec= 2377d6c0b56eSmrglibname_spec='lib$name' 2378d6c0b56eSmrgsoname_spec= 2379d6c0b56eSmrgshrext_cmds=.so 2380d6c0b56eSmrgpostinstall_cmds= 2381d6c0b56eSmrgpostuninstall_cmds= 2382d6c0b56eSmrgfinish_cmds= 2383d6c0b56eSmrgfinish_eval= 2384d6c0b56eSmrgshlibpath_var= 2385d6c0b56eSmrgshlibpath_overrides_runpath=unknown 2386d6c0b56eSmrgversion_type=none 2387d6c0b56eSmrgdynamic_linker="$host_os ld.so" 2388d6c0b56eSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2389d6c0b56eSmrgneed_lib_prefix=unknown 2390d6c0b56eSmrghardcode_into_libs=no 2391d6c0b56eSmrg 2392d6c0b56eSmrg# when you set need_version to no, make sure it does not cause -set_version 2393d6c0b56eSmrg# flags to be left without arguments 2394d6c0b56eSmrgneed_version=unknown 2395d6c0b56eSmrg 2396d6c0b56eSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 2397d6c0b56eSmrg[User-defined run-time library search path.]) 2398d6c0b56eSmrg 2399d6c0b56eSmrgcase $host_os in 2400d6c0b56eSmrgaix3*) 2401d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2402d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2403d6c0b56eSmrg shlibpath_var=LIBPATH 2404d6c0b56eSmrg 2405d6c0b56eSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2406d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2407d6c0b56eSmrg ;; 2408d6c0b56eSmrg 2409d6c0b56eSmrgaix[[4-9]]*) 2410d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2411d6c0b56eSmrg need_lib_prefix=no 2412d6c0b56eSmrg need_version=no 2413d6c0b56eSmrg hardcode_into_libs=yes 2414d6c0b56eSmrg if test ia64 = "$host_cpu"; then 2415d6c0b56eSmrg # AIX 5 supports IA64 2416d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2417d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2418d6c0b56eSmrg else 2419d6c0b56eSmrg # With GCC up to 2.95.x, collect2 would create an import file 2420d6c0b56eSmrg # for dependence libraries. The import file would start with 2421d6c0b56eSmrg # the line '#! .'. This would cause the generated library to 2422d6c0b56eSmrg # depend on '.', always an invalid library. This was fixed in 2423d6c0b56eSmrg # development snapshots of GCC prior to 3.0. 2424d6c0b56eSmrg case $host_os in 2425d6c0b56eSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2426d6c0b56eSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2427d6c0b56eSmrg echo ' yes ' 2428d6c0b56eSmrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2429d6c0b56eSmrg : 2430d6c0b56eSmrg else 2431d6c0b56eSmrg can_build_shared=no 2432d6c0b56eSmrg fi 2433d6c0b56eSmrg ;; 2434d6c0b56eSmrg esac 2435d6c0b56eSmrg # Using Import Files as archive members, it is possible to support 2436d6c0b56eSmrg # filename-based versioning of shared library archives on AIX. While 2437d6c0b56eSmrg # this would work for both with and without runtime linking, it will 2438d6c0b56eSmrg # prevent static linking of such archives. So we do filename-based 2439d6c0b56eSmrg # shared library versioning with .so extension only, which is used 2440d6c0b56eSmrg # when both runtime linking and shared linking is enabled. 2441d6c0b56eSmrg # Unfortunately, runtime linking may impact performance, so we do 2442d6c0b56eSmrg # not want this to be the default eventually. Also, we use the 2443d6c0b56eSmrg # versioned .so libs for executables only if there is the -brtl 2444d6c0b56eSmrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 2445d6c0b56eSmrg # To allow for filename-based versioning support, we need to create 2446d6c0b56eSmrg # libNAME.so.V as an archive file, containing: 2447d6c0b56eSmrg # *) an Import File, referring to the versioned filename of the 2448d6c0b56eSmrg # archive as well as the shared archive member, telling the 2449d6c0b56eSmrg # bitwidth (32 or 64) of that shared object, and providing the 2450d6c0b56eSmrg # list of exported symbols of that shared object, eventually 2451d6c0b56eSmrg # decorated with the 'weak' keyword 2452d6c0b56eSmrg # *) the shared object with the F_LOADONLY flag set, to really avoid 2453d6c0b56eSmrg # it being seen by the linker. 2454d6c0b56eSmrg # At run time we better use the real file rather than another symlink, 2455d6c0b56eSmrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 2456d6c0b56eSmrg 2457d6c0b56eSmrg case $with_aix_soname,$aix_use_runtimelinking in 2458d6c0b56eSmrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2459d6c0b56eSmrg # soname into executable. Probably we can add versioning support to 2460d6c0b56eSmrg # collect2, so additional links can be useful in future. 2461d6c0b56eSmrg aix,yes) # traditional libtool 2462d6c0b56eSmrg dynamic_linker='AIX unversionable lib.so' 2463d6c0b56eSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2464d6c0b56eSmrg # instead of lib<name>.a to let people know that these are not 2465d6c0b56eSmrg # typical AIX shared libraries. 2466d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2467d6c0b56eSmrg ;; 2468d6c0b56eSmrg aix,no) # traditional AIX only 2469d6c0b56eSmrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2470d6c0b56eSmrg # We preserve .a as extension for shared libraries through AIX4.2 2471d6c0b56eSmrg # and later when we are not doing run time linking. 2472d6c0b56eSmrg library_names_spec='$libname$release.a $libname.a' 2473d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2474d6c0b56eSmrg ;; 2475d6c0b56eSmrg svr4,*) # full svr4 only 2476d6c0b56eSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 2477d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2478d6c0b56eSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2479d6c0b56eSmrg shlibpath_overrides_runpath=yes 2480d6c0b56eSmrg ;; 2481d6c0b56eSmrg *,yes) # both, prefer svr4 2482d6c0b56eSmrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 2483d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 2484d6c0b56eSmrg # unpreferred sharedlib libNAME.a needs extra handling 2485d6c0b56eSmrg 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"' 2486d6c0b56eSmrg 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"' 2487d6c0b56eSmrg # We do not specify a path in Import Files, so LIBPATH fires. 2488d6c0b56eSmrg shlibpath_overrides_runpath=yes 2489d6c0b56eSmrg ;; 2490d6c0b56eSmrg *,no) # both, prefer aix 2491d6c0b56eSmrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 2492d6c0b56eSmrg library_names_spec='$libname$release.a $libname.a' 2493d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2494d6c0b56eSmrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 2495d6c0b56eSmrg 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)' 2496d6c0b56eSmrg 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"' 2497d6c0b56eSmrg ;; 2498d6c0b56eSmrg esac 2499d6c0b56eSmrg shlibpath_var=LIBPATH 2500d6c0b56eSmrg fi 2501d6c0b56eSmrg ;; 2502d6c0b56eSmrg 2503d6c0b56eSmrgamigaos*) 2504d6c0b56eSmrg case $host_cpu in 2505d6c0b56eSmrg powerpc) 2506d6c0b56eSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2507d6c0b56eSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2508d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2509d6c0b56eSmrg ;; 2510d6c0b56eSmrg m68k) 2511d6c0b56eSmrg library_names_spec='$libname.ixlibrary $libname.a' 2512d6c0b56eSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2513d6c0b56eSmrg 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' 2514d6c0b56eSmrg ;; 2515d6c0b56eSmrg esac 2516d6c0b56eSmrg ;; 2517d6c0b56eSmrg 2518d6c0b56eSmrgbeos*) 2519d6c0b56eSmrg library_names_spec='$libname$shared_ext' 2520d6c0b56eSmrg dynamic_linker="$host_os ld.so" 2521d6c0b56eSmrg shlibpath_var=LIBRARY_PATH 2522d6c0b56eSmrg ;; 2523d6c0b56eSmrg 2524d6c0b56eSmrgbsdi[[45]]*) 2525d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2526d6c0b56eSmrg need_version=no 2527d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2528d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2529d6c0b56eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2530d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2531d6c0b56eSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2532d6c0b56eSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2533d6c0b56eSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2534d6c0b56eSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2535d6c0b56eSmrg # libtool to hard-code these into programs 2536d6c0b56eSmrg ;; 2537d6c0b56eSmrg 2538d6c0b56eSmrgcygwin* | mingw* | pw32* | cegcc*) 2539d6c0b56eSmrg version_type=windows 2540d6c0b56eSmrg shrext_cmds=.dll 2541d6c0b56eSmrg need_version=no 2542d6c0b56eSmrg need_lib_prefix=no 2543d6c0b56eSmrg 2544d6c0b56eSmrg case $GCC,$cc_basename in 2545d6c0b56eSmrg yes,*) 2546d6c0b56eSmrg # gcc 2547d6c0b56eSmrg library_names_spec='$libname.dll.a' 2548d6c0b56eSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2549d6c0b56eSmrg postinstall_cmds='base_file=`basename \$file`~ 2550d6c0b56eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2551d6c0b56eSmrg dldir=$destdir/`dirname \$dlpath`~ 2552d6c0b56eSmrg test -d \$dldir || mkdir -p \$dldir~ 2553d6c0b56eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2554d6c0b56eSmrg chmod a+x \$dldir/$dlname~ 2555d6c0b56eSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2556d6c0b56eSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2557d6c0b56eSmrg fi' 2558d6c0b56eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2559d6c0b56eSmrg dlpath=$dir/\$dldll~ 2560d6c0b56eSmrg $RM \$dlpath' 2561d6c0b56eSmrg shlibpath_overrides_runpath=yes 2562d6c0b56eSmrg 2563d6c0b56eSmrg case $host_os in 2564d6c0b56eSmrg cygwin*) 2565d6c0b56eSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2566d6c0b56eSmrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2567d6c0b56eSmrgm4_if([$1], [],[ 2568d6c0b56eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2569d6c0b56eSmrg ;; 2570d6c0b56eSmrg mingw* | cegcc*) 2571d6c0b56eSmrg # MinGW DLLs use traditional 'lib' prefix 2572d6c0b56eSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2573d6c0b56eSmrg ;; 2574d6c0b56eSmrg pw32*) 2575d6c0b56eSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2576d6c0b56eSmrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2577d6c0b56eSmrg ;; 2578d6c0b56eSmrg esac 2579d6c0b56eSmrg dynamic_linker='Win32 ld.exe' 2580d6c0b56eSmrg ;; 2581d6c0b56eSmrg 2582d6c0b56eSmrg *,cl*) 2583d6c0b56eSmrg # Native MSVC 2584d6c0b56eSmrg libname_spec='$name' 2585d6c0b56eSmrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2586d6c0b56eSmrg library_names_spec='$libname.dll.lib' 2587d6c0b56eSmrg 2588d6c0b56eSmrg case $build_os in 2589d6c0b56eSmrg mingw*) 2590d6c0b56eSmrg sys_lib_search_path_spec= 2591d6c0b56eSmrg lt_save_ifs=$IFS 2592d6c0b56eSmrg IFS=';' 2593d6c0b56eSmrg for lt_path in $LIB 2594d6c0b56eSmrg do 2595d6c0b56eSmrg IFS=$lt_save_ifs 2596d6c0b56eSmrg # Let DOS variable expansion print the short 8.3 style file name. 2597d6c0b56eSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2598d6c0b56eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2599d6c0b56eSmrg done 2600d6c0b56eSmrg IFS=$lt_save_ifs 2601d6c0b56eSmrg # Convert to MSYS style. 2602d6c0b56eSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2603d6c0b56eSmrg ;; 2604d6c0b56eSmrg cygwin*) 2605d6c0b56eSmrg # Convert to unix form, then to dos form, then back to unix form 2606d6c0b56eSmrg # but this time dos style (no spaces!) so that the unix form looks 2607d6c0b56eSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2608d6c0b56eSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2609d6c0b56eSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2610d6c0b56eSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2611d6c0b56eSmrg ;; 2612d6c0b56eSmrg *) 2613d6c0b56eSmrg sys_lib_search_path_spec=$LIB 2614d6c0b56eSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2615d6c0b56eSmrg # It is most probably a Windows format PATH. 2616d6c0b56eSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2617d6c0b56eSmrg else 2618d6c0b56eSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2619d6c0b56eSmrg fi 2620d6c0b56eSmrg # FIXME: find the short name or the path components, as spaces are 2621d6c0b56eSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2622d6c0b56eSmrg ;; 2623d6c0b56eSmrg esac 2624d6c0b56eSmrg 2625d6c0b56eSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2626d6c0b56eSmrg postinstall_cmds='base_file=`basename \$file`~ 2627d6c0b56eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2628d6c0b56eSmrg dldir=$destdir/`dirname \$dlpath`~ 2629d6c0b56eSmrg test -d \$dldir || mkdir -p \$dldir~ 2630d6c0b56eSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2631d6c0b56eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2632d6c0b56eSmrg dlpath=$dir/\$dldll~ 2633d6c0b56eSmrg $RM \$dlpath' 2634d6c0b56eSmrg shlibpath_overrides_runpath=yes 2635d6c0b56eSmrg dynamic_linker='Win32 link.exe' 2636d6c0b56eSmrg ;; 2637d6c0b56eSmrg 2638d6c0b56eSmrg *) 2639d6c0b56eSmrg # Assume MSVC wrapper 2640d6c0b56eSmrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2641d6c0b56eSmrg dynamic_linker='Win32 ld.exe' 2642d6c0b56eSmrg ;; 2643d6c0b56eSmrg esac 2644d6c0b56eSmrg # FIXME: first we should search . and the directory the executable is in 2645d6c0b56eSmrg shlibpath_var=PATH 2646d6c0b56eSmrg ;; 2647d6c0b56eSmrg 2648d6c0b56eSmrgdarwin* | rhapsody*) 2649d6c0b56eSmrg dynamic_linker="$host_os dyld" 2650d6c0b56eSmrg version_type=darwin 2651d6c0b56eSmrg need_lib_prefix=no 2652d6c0b56eSmrg need_version=no 2653d6c0b56eSmrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 2654d6c0b56eSmrg soname_spec='$libname$release$major$shared_ext' 2655d6c0b56eSmrg shlibpath_overrides_runpath=yes 2656d6c0b56eSmrg shlibpath_var=DYLD_LIBRARY_PATH 2657d6c0b56eSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2658d6c0b56eSmrgm4_if([$1], [],[ 2659d6c0b56eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2660d6c0b56eSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2661d6c0b56eSmrg ;; 2662d6c0b56eSmrg 2663d6c0b56eSmrgdgux*) 2664d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2665d6c0b56eSmrg need_lib_prefix=no 2666d6c0b56eSmrg need_version=no 2667d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2668d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2669d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2670d6c0b56eSmrg ;; 2671d6c0b56eSmrg 2672d6c0b56eSmrgfreebsd* | dragonfly*) 2673d6c0b56eSmrg # DragonFly does not have aout. When/if they implement a new 2674d6c0b56eSmrg # versioning mechanism, adjust this. 2675d6c0b56eSmrg if test -x /usr/bin/objformat; then 2676d6c0b56eSmrg objformat=`/usr/bin/objformat` 2677d6c0b56eSmrg else 2678d6c0b56eSmrg case $host_os in 2679d6c0b56eSmrg freebsd[[23]].*) objformat=aout ;; 2680d6c0b56eSmrg *) objformat=elf ;; 2681d6c0b56eSmrg esac 2682d6c0b56eSmrg fi 2683d6c0b56eSmrg version_type=freebsd-$objformat 2684d6c0b56eSmrg case $version_type in 2685d6c0b56eSmrg freebsd-elf*) 2686d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2687d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2688d6c0b56eSmrg need_version=no 2689d6c0b56eSmrg need_lib_prefix=no 2690d6c0b56eSmrg ;; 2691d6c0b56eSmrg freebsd-*) 2692d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2693d6c0b56eSmrg need_version=yes 2694d6c0b56eSmrg ;; 2695d6c0b56eSmrg esac 2696d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2697d6c0b56eSmrg case $host_os in 2698d6c0b56eSmrg freebsd2.*) 2699d6c0b56eSmrg shlibpath_overrides_runpath=yes 2700d6c0b56eSmrg ;; 2701d6c0b56eSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2702d6c0b56eSmrg shlibpath_overrides_runpath=yes 2703d6c0b56eSmrg hardcode_into_libs=yes 2704d6c0b56eSmrg ;; 2705d6c0b56eSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2706d6c0b56eSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2707d6c0b56eSmrg shlibpath_overrides_runpath=no 2708d6c0b56eSmrg hardcode_into_libs=yes 2709d6c0b56eSmrg ;; 2710d6c0b56eSmrg *) # from 4.6 on, and DragonFly 2711d6c0b56eSmrg shlibpath_overrides_runpath=yes 2712d6c0b56eSmrg hardcode_into_libs=yes 2713d6c0b56eSmrg ;; 2714d6c0b56eSmrg esac 2715d6c0b56eSmrg ;; 2716d6c0b56eSmrg 2717d6c0b56eSmrghaiku*) 2718d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2719d6c0b56eSmrg need_lib_prefix=no 2720d6c0b56eSmrg need_version=no 2721d6c0b56eSmrg dynamic_linker="$host_os runtime_loader" 2722d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2723d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2724d6c0b56eSmrg shlibpath_var=LIBRARY_PATH 2725d6c0b56eSmrg shlibpath_overrides_runpath=no 2726d6c0b56eSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2727d6c0b56eSmrg hardcode_into_libs=yes 2728d6c0b56eSmrg ;; 2729d6c0b56eSmrg 2730d6c0b56eSmrghpux9* | hpux10* | hpux11*) 2731d6c0b56eSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2732d6c0b56eSmrg # link against other versions. 2733d6c0b56eSmrg version_type=sunos 2734d6c0b56eSmrg need_lib_prefix=no 2735d6c0b56eSmrg need_version=no 2736d6c0b56eSmrg case $host_cpu in 2737d6c0b56eSmrg ia64*) 2738d6c0b56eSmrg shrext_cmds='.so' 2739d6c0b56eSmrg hardcode_into_libs=yes 2740d6c0b56eSmrg dynamic_linker="$host_os dld.so" 2741d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2742d6c0b56eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2743d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2744d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2745d6c0b56eSmrg if test 32 = "$HPUX_IA64_MODE"; then 2746d6c0b56eSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2747d6c0b56eSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2748d6c0b56eSmrg else 2749d6c0b56eSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2750d6c0b56eSmrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 2751d6c0b56eSmrg fi 2752d6c0b56eSmrg ;; 2753d6c0b56eSmrg hppa*64*) 2754d6c0b56eSmrg shrext_cmds='.sl' 2755d6c0b56eSmrg hardcode_into_libs=yes 2756d6c0b56eSmrg dynamic_linker="$host_os dld.sl" 2757d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2758d6c0b56eSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2759d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2760d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2761d6c0b56eSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2762d6c0b56eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2763d6c0b56eSmrg ;; 2764d6c0b56eSmrg *) 2765d6c0b56eSmrg shrext_cmds='.sl' 2766d6c0b56eSmrg dynamic_linker="$host_os dld.sl" 2767d6c0b56eSmrg shlibpath_var=SHLIB_PATH 2768d6c0b56eSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2769d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2770d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2771d6c0b56eSmrg ;; 2772d6c0b56eSmrg esac 2773d6c0b56eSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2774d6c0b56eSmrg postinstall_cmds='chmod 555 $lib' 2775d6c0b56eSmrg # or fails outright, so override atomically: 2776d6c0b56eSmrg install_override_mode=555 2777d6c0b56eSmrg ;; 2778d6c0b56eSmrg 2779d6c0b56eSmrginterix[[3-9]]*) 2780d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2781d6c0b56eSmrg need_lib_prefix=no 2782d6c0b56eSmrg need_version=no 2783d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2784d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2785d6c0b56eSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2786d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2787d6c0b56eSmrg shlibpath_overrides_runpath=no 2788d6c0b56eSmrg hardcode_into_libs=yes 2789d6c0b56eSmrg ;; 2790d6c0b56eSmrg 2791d6c0b56eSmrgirix5* | irix6* | nonstopux*) 2792d6c0b56eSmrg case $host_os in 2793d6c0b56eSmrg nonstopux*) version_type=nonstopux ;; 2794d6c0b56eSmrg *) 2795d6c0b56eSmrg if test yes = "$lt_cv_prog_gnu_ld"; then 2796d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2797d6c0b56eSmrg else 2798d6c0b56eSmrg version_type=irix 2799d6c0b56eSmrg fi ;; 2800d6c0b56eSmrg esac 2801d6c0b56eSmrg need_lib_prefix=no 2802d6c0b56eSmrg need_version=no 2803d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2804d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2805d6c0b56eSmrg case $host_os in 2806d6c0b56eSmrg irix5* | nonstopux*) 2807d6c0b56eSmrg libsuff= shlibsuff= 2808d6c0b56eSmrg ;; 2809d6c0b56eSmrg *) 2810d6c0b56eSmrg case $LD in # libtool.m4 will add one of these switches to LD 2811d6c0b56eSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2812d6c0b56eSmrg libsuff= shlibsuff= libmagic=32-bit;; 2813d6c0b56eSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2814d6c0b56eSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2815d6c0b56eSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2816d6c0b56eSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2817d6c0b56eSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2818d6c0b56eSmrg esac 2819d6c0b56eSmrg ;; 2820d6c0b56eSmrg esac 2821d6c0b56eSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2822d6c0b56eSmrg shlibpath_overrides_runpath=no 2823d6c0b56eSmrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 2824d6c0b56eSmrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2825d6c0b56eSmrg hardcode_into_libs=yes 2826d6c0b56eSmrg ;; 2827d6c0b56eSmrg 2828d6c0b56eSmrg# No shared lib support for Linux oldld, aout, or coff. 2829d6c0b56eSmrglinux*oldld* | linux*aout* | linux*coff*) 2830d6c0b56eSmrg dynamic_linker=no 2831d6c0b56eSmrg ;; 2832d6c0b56eSmrg 2833d6c0b56eSmrglinux*android*) 2834d6c0b56eSmrg version_type=none # Android doesn't support versioned libraries. 2835d6c0b56eSmrg need_lib_prefix=no 2836d6c0b56eSmrg need_version=no 2837d6c0b56eSmrg library_names_spec='$libname$release$shared_ext' 2838d6c0b56eSmrg soname_spec='$libname$release$shared_ext' 2839d6c0b56eSmrg finish_cmds= 2840d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2841d6c0b56eSmrg shlibpath_overrides_runpath=yes 2842d6c0b56eSmrg 2843d6c0b56eSmrg # This implies no fast_install, which is unacceptable. 2844d6c0b56eSmrg # Some rework will be needed to allow for fast_install 2845d6c0b56eSmrg # before this can be enabled. 2846d6c0b56eSmrg hardcode_into_libs=yes 2847d6c0b56eSmrg 2848d6c0b56eSmrg dynamic_linker='Android linker' 2849d6c0b56eSmrg # Don't embed -rpath directories since the linker doesn't support them. 2850d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 2851d6c0b56eSmrg ;; 2852d6c0b56eSmrg 2853d6c0b56eSmrg# This must be glibc/ELF. 2854d6c0b56eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2855d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2856d6c0b56eSmrg need_lib_prefix=no 2857d6c0b56eSmrg need_version=no 2858d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2859d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2860d6c0b56eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2861d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2862d6c0b56eSmrg shlibpath_overrides_runpath=no 2863d6c0b56eSmrg 2864d6c0b56eSmrg # Some binutils ld are patched to set DT_RUNPATH 2865d6c0b56eSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2866d6c0b56eSmrg [lt_cv_shlibpath_overrides_runpath=no 2867d6c0b56eSmrg save_LDFLAGS=$LDFLAGS 2868d6c0b56eSmrg save_libdir=$libdir 2869d6c0b56eSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2870d6c0b56eSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2871d6c0b56eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2872d6c0b56eSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2873d6c0b56eSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2874d6c0b56eSmrg LDFLAGS=$save_LDFLAGS 2875d6c0b56eSmrg libdir=$save_libdir 2876d6c0b56eSmrg ]) 2877d6c0b56eSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2878d6c0b56eSmrg 2879d6c0b56eSmrg # This implies no fast_install, which is unacceptable. 2880d6c0b56eSmrg # Some rework will be needed to allow for fast_install 2881d6c0b56eSmrg # before this can be enabled. 2882d6c0b56eSmrg hardcode_into_libs=yes 2883d6c0b56eSmrg 2884d6c0b56eSmrg # Ideally, we could use ldconfig to report *all* directores which are 2885d6c0b56eSmrg # searched for libraries, however this is still not possible. Aside from not 2886d6c0b56eSmrg # being certain /sbin/ldconfig is available, command 2887d6c0b56eSmrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 2888d6c0b56eSmrg # even though it is searched at run-time. Try to do the best guess by 2889d6c0b56eSmrg # appending ld.so.conf contents (and includes) to the search path. 2890d6c0b56eSmrg if test -f /etc/ld.so.conf; then 2891d6c0b56eSmrg 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' ' '` 2892d6c0b56eSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2893d6c0b56eSmrg fi 2894d6c0b56eSmrg 2895d6c0b56eSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2896d6c0b56eSmrg # powerpc, because MkLinux only supported shared libraries with the 2897d6c0b56eSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2898d6c0b56eSmrg # most powerpc-linux boxes support dynamic linking these days and 2899d6c0b56eSmrg # people can always --disable-shared, the test was removed, and we 2900d6c0b56eSmrg # assume the GNU/Linux dynamic linker is in use. 2901d6c0b56eSmrg dynamic_linker='GNU/Linux ld.so' 2902d6c0b56eSmrg ;; 2903d6c0b56eSmrg 2904d6c0b56eSmrgnetbsdelf*-gnu) 2905d6c0b56eSmrg version_type=linux 2906d6c0b56eSmrg need_lib_prefix=no 2907d6c0b56eSmrg need_version=no 2908d6c0b56eSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2909d6c0b56eSmrg soname_spec='${libname}${release}${shared_ext}$major' 2910d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2911d6c0b56eSmrg shlibpath_overrides_runpath=no 2912d6c0b56eSmrg hardcode_into_libs=yes 2913d6c0b56eSmrg dynamic_linker='NetBSD ld.elf_so' 2914d6c0b56eSmrg ;; 2915d6c0b56eSmrg 2916d6c0b56eSmrgnetbsd*) 2917d6c0b56eSmrg version_type=sunos 2918d6c0b56eSmrg need_lib_prefix=no 2919d6c0b56eSmrg need_version=no 2920d6c0b56eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2921d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2922d6c0b56eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2923d6c0b56eSmrg dynamic_linker='NetBSD (a.out) ld.so' 2924d6c0b56eSmrg else 2925d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2926d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2927d6c0b56eSmrg dynamic_linker='NetBSD ld.elf_so' 2928d6c0b56eSmrg fi 2929d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2930d6c0b56eSmrg shlibpath_overrides_runpath=yes 2931d6c0b56eSmrg hardcode_into_libs=yes 2932d6c0b56eSmrg ;; 2933d6c0b56eSmrg 2934d6c0b56eSmrgnewsos6) 2935d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 2936d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2937d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2938d6c0b56eSmrg shlibpath_overrides_runpath=yes 2939d6c0b56eSmrg ;; 2940d6c0b56eSmrg 2941d6c0b56eSmrg*nto* | *qnx*) 2942d6c0b56eSmrg version_type=qnx 2943d6c0b56eSmrg need_lib_prefix=no 2944d6c0b56eSmrg need_version=no 2945d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2946d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 2947d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2948d6c0b56eSmrg shlibpath_overrides_runpath=no 2949d6c0b56eSmrg hardcode_into_libs=yes 2950d6c0b56eSmrg dynamic_linker='ldqnx.so' 2951d6c0b56eSmrg ;; 2952d6c0b56eSmrg 2953d6c0b56eSmrgopenbsd* | bitrig*) 2954d6c0b56eSmrg version_type=sunos 2955d6c0b56eSmrg sys_lib_dlsearch_path_spec=/usr/lib 2956d6c0b56eSmrg need_lib_prefix=no 2957d6c0b56eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 2958d6c0b56eSmrg need_version=no 2959d6c0b56eSmrg else 2960d6c0b56eSmrg need_version=yes 2961d6c0b56eSmrg fi 2962d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2963d6c0b56eSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2964d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 2965d6c0b56eSmrg shlibpath_overrides_runpath=yes 2966d6c0b56eSmrg ;; 2967d6c0b56eSmrg 2968d6c0b56eSmrgos2*) 2969d6c0b56eSmrg libname_spec='$name' 2970d6c0b56eSmrg version_type=windows 2971d6c0b56eSmrg shrext_cmds=.dll 2972d6c0b56eSmrg need_version=no 2973d6c0b56eSmrg need_lib_prefix=no 2974d6c0b56eSmrg # OS/2 can only load a DLL with a base name of 8 characters or less. 2975d6c0b56eSmrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 2976d6c0b56eSmrg v=$($ECHO $release$versuffix | tr -d .-); 2977d6c0b56eSmrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 2978d6c0b56eSmrg $ECHO $n$v`$shared_ext' 2979d6c0b56eSmrg library_names_spec='${libname}_dll.$libext' 2980d6c0b56eSmrg dynamic_linker='OS/2 ld.exe' 2981d6c0b56eSmrg shlibpath_var=BEGINLIBPATH 2982d6c0b56eSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2983d6c0b56eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2984d6c0b56eSmrg postinstall_cmds='base_file=`basename \$file`~ 2985d6c0b56eSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 2986d6c0b56eSmrg dldir=$destdir/`dirname \$dlpath`~ 2987d6c0b56eSmrg test -d \$dldir || mkdir -p \$dldir~ 2988d6c0b56eSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2989d6c0b56eSmrg chmod a+x \$dldir/$dlname~ 2990d6c0b56eSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2991d6c0b56eSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2992d6c0b56eSmrg fi' 2993d6c0b56eSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 2994d6c0b56eSmrg dlpath=$dir/\$dldll~ 2995d6c0b56eSmrg $RM \$dlpath' 2996d6c0b56eSmrg ;; 2997d6c0b56eSmrg 2998d6c0b56eSmrgosf3* | osf4* | osf5*) 2999d6c0b56eSmrg version_type=osf 3000d6c0b56eSmrg need_lib_prefix=no 3001d6c0b56eSmrg need_version=no 3002d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 3003d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3004d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 3005d6c0b56eSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 3006d6c0b56eSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 3007d6c0b56eSmrg ;; 3008d6c0b56eSmrg 3009d6c0b56eSmrgrdos*) 3010d6c0b56eSmrg dynamic_linker=no 3011d6c0b56eSmrg ;; 3012d6c0b56eSmrg 3013d6c0b56eSmrgsolaris*) 3014d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 3015d6c0b56eSmrg need_lib_prefix=no 3016d6c0b56eSmrg need_version=no 3017d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3018d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 3019d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 3020d6c0b56eSmrg shlibpath_overrides_runpath=yes 3021d6c0b56eSmrg hardcode_into_libs=yes 3022d6c0b56eSmrg # ldd complains unless libraries are executable 3023d6c0b56eSmrg postinstall_cmds='chmod +x $lib' 3024d6c0b56eSmrg ;; 3025d6c0b56eSmrg 3026d6c0b56eSmrgsunos4*) 3027d6c0b56eSmrg version_type=sunos 3028d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3029d6c0b56eSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3030d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 3031d6c0b56eSmrg shlibpath_overrides_runpath=yes 3032d6c0b56eSmrg if test yes = "$with_gnu_ld"; then 3033d6c0b56eSmrg need_lib_prefix=no 3034d6c0b56eSmrg fi 3035d6c0b56eSmrg need_version=yes 3036d6c0b56eSmrg ;; 3037d6c0b56eSmrg 3038d6c0b56eSmrgsysv4 | sysv4.3*) 3039d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 3040d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3041d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 3042d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 3043d6c0b56eSmrg case $host_vendor in 3044d6c0b56eSmrg sni) 3045d6c0b56eSmrg shlibpath_overrides_runpath=no 3046d6c0b56eSmrg need_lib_prefix=no 3047d6c0b56eSmrg runpath_var=LD_RUN_PATH 3048d6c0b56eSmrg ;; 3049d6c0b56eSmrg siemens) 3050d6c0b56eSmrg need_lib_prefix=no 3051d6c0b56eSmrg ;; 3052d6c0b56eSmrg motorola) 3053d6c0b56eSmrg need_lib_prefix=no 3054d6c0b56eSmrg need_version=no 3055d6c0b56eSmrg shlibpath_overrides_runpath=no 3056d6c0b56eSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 3057d6c0b56eSmrg ;; 3058d6c0b56eSmrg esac 3059d6c0b56eSmrg ;; 3060d6c0b56eSmrg 3061d6c0b56eSmrgsysv4*MP*) 3062d6c0b56eSmrg if test -d /usr/nec; then 3063d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 3064d6c0b56eSmrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 3065d6c0b56eSmrg soname_spec='$libname$shared_ext.$major' 3066d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 3067d6c0b56eSmrg fi 3068d6c0b56eSmrg ;; 3069d6c0b56eSmrg 3070d6c0b56eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3071d6c0b56eSmrg version_type=sco 3072d6c0b56eSmrg need_lib_prefix=no 3073d6c0b56eSmrg need_version=no 3074d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 3075d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 3076d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 3077d6c0b56eSmrg shlibpath_overrides_runpath=yes 3078d6c0b56eSmrg hardcode_into_libs=yes 3079d6c0b56eSmrg if test yes = "$with_gnu_ld"; then 3080d6c0b56eSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3081d6c0b56eSmrg else 3082d6c0b56eSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 3083d6c0b56eSmrg case $host_os in 3084d6c0b56eSmrg sco3.2v5*) 3085d6c0b56eSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3086d6c0b56eSmrg ;; 3087d6c0b56eSmrg esac 3088d6c0b56eSmrg fi 3089d6c0b56eSmrg sys_lib_dlsearch_path_spec='/usr/lib' 3090d6c0b56eSmrg ;; 3091d6c0b56eSmrg 3092d6c0b56eSmrgtpf*) 3093d6c0b56eSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 3094d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 3095d6c0b56eSmrg need_lib_prefix=no 3096d6c0b56eSmrg need_version=no 3097d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3098d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 3099d6c0b56eSmrg shlibpath_overrides_runpath=no 3100d6c0b56eSmrg hardcode_into_libs=yes 3101d6c0b56eSmrg ;; 3102d6c0b56eSmrg 3103d6c0b56eSmrguts4*) 3104d6c0b56eSmrg version_type=linux # correct to gnu/linux during the next big refactor 3105d6c0b56eSmrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 3106d6c0b56eSmrg soname_spec='$libname$release$shared_ext$major' 3107d6c0b56eSmrg shlibpath_var=LD_LIBRARY_PATH 3108d6c0b56eSmrg ;; 3109d6c0b56eSmrg 3110d6c0b56eSmrg*) 3111d6c0b56eSmrg dynamic_linker=no 3112d6c0b56eSmrg ;; 3113d6c0b56eSmrgesac 3114d6c0b56eSmrgAC_MSG_RESULT([$dynamic_linker]) 3115d6c0b56eSmrgtest no = "$dynamic_linker" && can_build_shared=no 3116d6c0b56eSmrg 3117d6c0b56eSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 3118d6c0b56eSmrgif test yes = "$GCC"; then 3119d6c0b56eSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3120d6c0b56eSmrgfi 3121d6c0b56eSmrg 3122d6c0b56eSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 3123d6c0b56eSmrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3124d6c0b56eSmrgfi 3125d6c0b56eSmrg 3126d6c0b56eSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 3127d6c0b56eSmrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3128d6c0b56eSmrgfi 3129d6c0b56eSmrg 3130d6c0b56eSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 3131d6c0b56eSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 3132d6c0b56eSmrg 3133d6c0b56eSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 3134d6c0b56eSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 3135d6c0b56eSmrg 3136d6c0b56eSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 3137d6c0b56eSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 3138d6c0b56eSmrg 3139d6c0b56eSmrg_LT_DECL([], [variables_saved_for_relink], [1], 3140d6c0b56eSmrg [Variables whose values should be saved in libtool wrapper scripts and 3141d6c0b56eSmrg restored at link time]) 3142d6c0b56eSmrg_LT_DECL([], [need_lib_prefix], [0], 3143d6c0b56eSmrg [Do we need the "lib" prefix for modules?]) 3144d6c0b56eSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3145d6c0b56eSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3146d6c0b56eSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3147d6c0b56eSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3148d6c0b56eSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3149d6c0b56eSmrg [Is shlibpath searched before the hard-coded library search path?]) 3150d6c0b56eSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3151d6c0b56eSmrg_LT_DECL([], [library_names_spec], [1], 3152d6c0b56eSmrg [[List of archive names. First name is the real one, the rest are links. 3153d6c0b56eSmrg The last name is the one that the linker finds with -lNAME]]) 3154d6c0b56eSmrg_LT_DECL([], [soname_spec], [1], 3155d6c0b56eSmrg [[The coded name of the library, if different from the real name]]) 3156d6c0b56eSmrg_LT_DECL([], [install_override_mode], [1], 3157d6c0b56eSmrg [Permission mode override for installation of shared libraries]) 3158d6c0b56eSmrg_LT_DECL([], [postinstall_cmds], [2], 3159d6c0b56eSmrg [Command to use after installation of a shared archive]) 3160d6c0b56eSmrg_LT_DECL([], [postuninstall_cmds], [2], 3161d6c0b56eSmrg [Command to use after uninstallation of a shared archive]) 3162d6c0b56eSmrg_LT_DECL([], [finish_cmds], [2], 3163d6c0b56eSmrg [Commands used to finish a libtool library installation in a directory]) 3164d6c0b56eSmrg_LT_DECL([], [finish_eval], [1], 3165d6c0b56eSmrg [[As "finish_cmds", except a single script fragment to be evaled but 3166d6c0b56eSmrg not shown]]) 3167d6c0b56eSmrg_LT_DECL([], [hardcode_into_libs], [0], 3168d6c0b56eSmrg [Whether we should hardcode library paths into libraries]) 3169d6c0b56eSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3170d6c0b56eSmrg [Compile-time system search path for libraries]) 3171d6c0b56eSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 3172d6c0b56eSmrg [Detected run-time system search path for libraries]) 3173d6c0b56eSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 3174d6c0b56eSmrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3175d6c0b56eSmrg])# _LT_SYS_DYNAMIC_LINKER 3176d6c0b56eSmrg 3177d6c0b56eSmrg 3178d6c0b56eSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 3179d6c0b56eSmrg# -------------------------- 3180d6c0b56eSmrg# find a file program that can recognize shared library 3181d6c0b56eSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3182d6c0b56eSmrg[m4_require([_LT_DECL_EGREP])dnl 3183d6c0b56eSmrgAC_MSG_CHECKING([for $1]) 3184d6c0b56eSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3185d6c0b56eSmrg[case $MAGIC_CMD in 3186d6c0b56eSmrg[[\\/*] | ?:[\\/]*]) 3187d6c0b56eSmrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3188d6c0b56eSmrg ;; 3189d6c0b56eSmrg*) 3190d6c0b56eSmrg lt_save_MAGIC_CMD=$MAGIC_CMD 3191d6c0b56eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3192d6c0b56eSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3193d6c0b56eSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3194d6c0b56eSmrgdnl not every word. This closes a longstanding sh security hole. 3195d6c0b56eSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3196d6c0b56eSmrg for ac_dir in $ac_dummy; do 3197d6c0b56eSmrg IFS=$lt_save_ifs 3198d6c0b56eSmrg test -z "$ac_dir" && ac_dir=. 3199d6c0b56eSmrg if test -f "$ac_dir/$1"; then 3200d6c0b56eSmrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3201d6c0b56eSmrg if test -n "$file_magic_test_file"; then 3202d6c0b56eSmrg case $deplibs_check_method in 3203d6c0b56eSmrg "file_magic "*) 3204d6c0b56eSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 3205d6c0b56eSmrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3206d6c0b56eSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3207d6c0b56eSmrg $EGREP "$file_magic_regex" > /dev/null; then 3208d6c0b56eSmrg : 3209d6c0b56eSmrg else 3210d6c0b56eSmrg cat <<_LT_EOF 1>&2 3211d6c0b56eSmrg 3212d6c0b56eSmrg*** Warning: the command libtool uses to detect shared libraries, 3213d6c0b56eSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3214d6c0b56eSmrg*** The result is that libtool may fail to recognize shared libraries 3215d6c0b56eSmrg*** as such. This will affect the creation of libtool libraries that 3216d6c0b56eSmrg*** depend on shared libraries, but programs linked with such libtool 3217d6c0b56eSmrg*** libraries will work regardless of this problem. Nevertheless, you 3218d6c0b56eSmrg*** may want to report the problem to your system manager and/or to 3219d6c0b56eSmrg*** bug-libtool@gnu.org 3220d6c0b56eSmrg 3221d6c0b56eSmrg_LT_EOF 3222d6c0b56eSmrg fi ;; 3223d6c0b56eSmrg esac 3224d6c0b56eSmrg fi 3225d6c0b56eSmrg break 3226d6c0b56eSmrg fi 3227d6c0b56eSmrg done 3228d6c0b56eSmrg IFS=$lt_save_ifs 3229d6c0b56eSmrg MAGIC_CMD=$lt_save_MAGIC_CMD 3230d6c0b56eSmrg ;; 3231d6c0b56eSmrgesac]) 3232d6c0b56eSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3233d6c0b56eSmrgif test -n "$MAGIC_CMD"; then 3234d6c0b56eSmrg AC_MSG_RESULT($MAGIC_CMD) 3235d6c0b56eSmrgelse 3236d6c0b56eSmrg AC_MSG_RESULT(no) 3237d6c0b56eSmrgfi 3238d6c0b56eSmrg_LT_DECL([], [MAGIC_CMD], [0], 3239d6c0b56eSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3240d6c0b56eSmrg])# _LT_PATH_TOOL_PREFIX 3241d6c0b56eSmrg 3242d6c0b56eSmrg# Old name: 3243d6c0b56eSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3244d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 3245d6c0b56eSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3246d6c0b56eSmrg 3247d6c0b56eSmrg 3248d6c0b56eSmrg# _LT_PATH_MAGIC 3249d6c0b56eSmrg# -------------- 3250d6c0b56eSmrg# find a file program that can recognize a shared library 3251d6c0b56eSmrgm4_defun([_LT_PATH_MAGIC], 3252d6c0b56eSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3253d6c0b56eSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3254d6c0b56eSmrg if test -n "$ac_tool_prefix"; then 3255d6c0b56eSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 3256d6c0b56eSmrg else 3257d6c0b56eSmrg MAGIC_CMD=: 3258d6c0b56eSmrg fi 3259d6c0b56eSmrgfi 3260d6c0b56eSmrg])# _LT_PATH_MAGIC 3261d6c0b56eSmrg 3262d6c0b56eSmrg 3263d6c0b56eSmrg# LT_PATH_LD 3264d6c0b56eSmrg# ---------- 3265d6c0b56eSmrg# find the pathname to the GNU or non-GNU linker 3266d6c0b56eSmrgAC_DEFUN([LT_PATH_LD], 3267d6c0b56eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3268d6c0b56eSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3269d6c0b56eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3270d6c0b56eSmrgm4_require([_LT_DECL_SED])dnl 3271d6c0b56eSmrgm4_require([_LT_DECL_EGREP])dnl 3272d6c0b56eSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3273d6c0b56eSmrg 3274d6c0b56eSmrgAC_ARG_WITH([gnu-ld], 3275d6c0b56eSmrg [AS_HELP_STRING([--with-gnu-ld], 3276d6c0b56eSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3277d6c0b56eSmrg [test no = "$withval" || with_gnu_ld=yes], 3278d6c0b56eSmrg [with_gnu_ld=no])dnl 3279d6c0b56eSmrg 3280d6c0b56eSmrgac_prog=ld 3281d6c0b56eSmrgif test yes = "$GCC"; then 3282d6c0b56eSmrg # Check if gcc -print-prog-name=ld gives a path. 3283d6c0b56eSmrg AC_MSG_CHECKING([for ld used by $CC]) 3284d6c0b56eSmrg case $host in 3285d6c0b56eSmrg *-*-mingw*) 3286d6c0b56eSmrg # gcc leaves a trailing carriage return, which upsets mingw 3287d6c0b56eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3288d6c0b56eSmrg *) 3289d6c0b56eSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 3290d6c0b56eSmrg esac 3291d6c0b56eSmrg case $ac_prog in 3292d6c0b56eSmrg # Accept absolute paths. 3293d6c0b56eSmrg [[\\/]]* | ?:[[\\/]]*) 3294d6c0b56eSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3295d6c0b56eSmrg # Canonicalize the pathname of ld 3296d6c0b56eSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3297d6c0b56eSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3298d6c0b56eSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3299d6c0b56eSmrg done 3300d6c0b56eSmrg test -z "$LD" && LD=$ac_prog 3301d6c0b56eSmrg ;; 3302d6c0b56eSmrg "") 3303d6c0b56eSmrg # If it fails, then pretend we aren't using GCC. 3304d6c0b56eSmrg ac_prog=ld 3305d6c0b56eSmrg ;; 3306d6c0b56eSmrg *) 3307d6c0b56eSmrg # If it is relative, then search for the first ld in PATH. 3308d6c0b56eSmrg with_gnu_ld=unknown 3309d6c0b56eSmrg ;; 3310d6c0b56eSmrg esac 3311d6c0b56eSmrgelif test yes = "$with_gnu_ld"; then 3312d6c0b56eSmrg AC_MSG_CHECKING([for GNU ld]) 3313d6c0b56eSmrgelse 3314d6c0b56eSmrg AC_MSG_CHECKING([for non-GNU ld]) 3315d6c0b56eSmrgfi 3316d6c0b56eSmrgAC_CACHE_VAL(lt_cv_path_LD, 3317d6c0b56eSmrg[if test -z "$LD"; then 3318d6c0b56eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3319d6c0b56eSmrg for ac_dir in $PATH; do 3320d6c0b56eSmrg IFS=$lt_save_ifs 3321d6c0b56eSmrg test -z "$ac_dir" && ac_dir=. 3322d6c0b56eSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 3323d6c0b56eSmrg lt_cv_path_LD=$ac_dir/$ac_prog 3324d6c0b56eSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3325d6c0b56eSmrg # but apparently some variants of GNU ld only accept -v. 3326d6c0b56eSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3327d6c0b56eSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3328d6c0b56eSmrg *GNU* | *'with BFD'*) 3329d6c0b56eSmrg test no != "$with_gnu_ld" && break 3330d6c0b56eSmrg ;; 3331d6c0b56eSmrg *) 3332d6c0b56eSmrg test yes != "$with_gnu_ld" && break 3333d6c0b56eSmrg ;; 3334d6c0b56eSmrg esac 3335d6c0b56eSmrg fi 3336d6c0b56eSmrg done 3337d6c0b56eSmrg IFS=$lt_save_ifs 3338d6c0b56eSmrgelse 3339d6c0b56eSmrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3340d6c0b56eSmrgfi]) 3341d6c0b56eSmrgLD=$lt_cv_path_LD 3342d6c0b56eSmrgif test -n "$LD"; then 3343d6c0b56eSmrg AC_MSG_RESULT($LD) 3344d6c0b56eSmrgelse 3345d6c0b56eSmrg AC_MSG_RESULT(no) 3346d6c0b56eSmrgfi 3347d6c0b56eSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3348d6c0b56eSmrg_LT_PATH_LD_GNU 3349d6c0b56eSmrgAC_SUBST([LD]) 3350d6c0b56eSmrg 3351d6c0b56eSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3352d6c0b56eSmrg])# LT_PATH_LD 3353d6c0b56eSmrg 3354d6c0b56eSmrg# Old names: 3355d6c0b56eSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3356d6c0b56eSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3357d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 3358d6c0b56eSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3359d6c0b56eSmrgdnl AC_DEFUN([AC_PROG_LD], []) 3360d6c0b56eSmrg 3361d6c0b56eSmrg 3362d6c0b56eSmrg# _LT_PATH_LD_GNU 3363d6c0b56eSmrg#- -------------- 3364d6c0b56eSmrgm4_defun([_LT_PATH_LD_GNU], 3365d6c0b56eSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3366d6c0b56eSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3367d6c0b56eSmrgcase `$LD -v 2>&1 </dev/null` in 3368d6c0b56eSmrg*GNU* | *'with BFD'*) 3369d6c0b56eSmrg lt_cv_prog_gnu_ld=yes 3370d6c0b56eSmrg ;; 3371d6c0b56eSmrg*) 3372d6c0b56eSmrg lt_cv_prog_gnu_ld=no 3373d6c0b56eSmrg ;; 3374d6c0b56eSmrgesac]) 3375d6c0b56eSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3376d6c0b56eSmrg])# _LT_PATH_LD_GNU 3377d6c0b56eSmrg 3378d6c0b56eSmrg 3379d6c0b56eSmrg# _LT_CMD_RELOAD 3380d6c0b56eSmrg# -------------- 3381d6c0b56eSmrg# find reload flag for linker 3382d6c0b56eSmrg# -- PORTME Some linkers may need a different reload flag. 3383d6c0b56eSmrgm4_defun([_LT_CMD_RELOAD], 3384d6c0b56eSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3385d6c0b56eSmrg lt_cv_ld_reload_flag, 3386d6c0b56eSmrg [lt_cv_ld_reload_flag='-r']) 3387d6c0b56eSmrgreload_flag=$lt_cv_ld_reload_flag 3388d6c0b56eSmrgcase $reload_flag in 3389d6c0b56eSmrg"" | " "*) ;; 3390d6c0b56eSmrg*) reload_flag=" $reload_flag" ;; 3391d6c0b56eSmrgesac 3392d6c0b56eSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3393d6c0b56eSmrgcase $host_os in 3394d6c0b56eSmrg cygwin* | mingw* | pw32* | cegcc*) 3395d6c0b56eSmrg if test yes != "$GCC"; then 3396d6c0b56eSmrg reload_cmds=false 3397d6c0b56eSmrg fi 3398d6c0b56eSmrg ;; 3399d6c0b56eSmrg darwin*) 3400d6c0b56eSmrg if test yes = "$GCC"; then 3401d6c0b56eSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3402d6c0b56eSmrg else 3403d6c0b56eSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3404d6c0b56eSmrg fi 3405d6c0b56eSmrg ;; 3406d6c0b56eSmrgesac 3407d6c0b56eSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3408d6c0b56eSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3409d6c0b56eSmrg])# _LT_CMD_RELOAD 3410d6c0b56eSmrg 3411d6c0b56eSmrg 3412d6c0b56eSmrg# _LT_PATH_DD 3413d6c0b56eSmrg# ----------- 3414d6c0b56eSmrg# find a working dd 3415d6c0b56eSmrgm4_defun([_LT_PATH_DD], 3416d6c0b56eSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 3417d6c0b56eSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3418d6c0b56eSmrgcat conftest.i conftest.i >conftest2.i 3419d6c0b56eSmrg: ${lt_DD:=$DD} 3420d6c0b56eSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 3421d6c0b56eSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3422d6c0b56eSmrg cmp -s conftest.i conftest.out \ 3423d6c0b56eSmrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 3424d6c0b56eSmrgfi]) 3425d6c0b56eSmrgrm -f conftest.i conftest2.i conftest.out]) 3426d6c0b56eSmrg])# _LT_PATH_DD 3427d6c0b56eSmrg 3428d6c0b56eSmrg 3429d6c0b56eSmrg# _LT_CMD_TRUNCATE 3430d6c0b56eSmrg# ---------------- 3431d6c0b56eSmrg# find command to truncate a binary pipe 3432d6c0b56eSmrgm4_defun([_LT_CMD_TRUNCATE], 3433d6c0b56eSmrg[m4_require([_LT_PATH_DD]) 3434d6c0b56eSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 3435d6c0b56eSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i 3436d6c0b56eSmrgcat conftest.i conftest.i >conftest2.i 3437d6c0b56eSmrglt_cv_truncate_bin= 3438d6c0b56eSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 3439d6c0b56eSmrg cmp -s conftest.i conftest.out \ 3440d6c0b56eSmrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 3441d6c0b56eSmrgfi 3442d6c0b56eSmrgrm -f conftest.i conftest2.i conftest.out 3443d6c0b56eSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 3444d6c0b56eSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 3445d6c0b56eSmrg [Command to truncate a binary pipe]) 3446d6c0b56eSmrg])# _LT_CMD_TRUNCATE 3447d6c0b56eSmrg 3448d6c0b56eSmrg 3449d6c0b56eSmrg# _LT_CHECK_MAGIC_METHOD 3450d6c0b56eSmrg# ---------------------- 3451d6c0b56eSmrg# how to check for library dependencies 3452d6c0b56eSmrg# -- PORTME fill in with the dynamic library characteristics 3453d6c0b56eSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3454d6c0b56eSmrg[m4_require([_LT_DECL_EGREP]) 3455d6c0b56eSmrgm4_require([_LT_DECL_OBJDUMP]) 3456d6c0b56eSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3457d6c0b56eSmrglt_cv_deplibs_check_method, 3458d6c0b56eSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3459d6c0b56eSmrglt_cv_file_magic_test_file= 3460d6c0b56eSmrglt_cv_deplibs_check_method='unknown' 3461d6c0b56eSmrg# Need to set the preceding variable on all platforms that support 3462d6c0b56eSmrg# interlibrary dependencies. 3463d6c0b56eSmrg# 'none' -- dependencies not supported. 3464d6c0b56eSmrg# 'unknown' -- same as none, but documents that we really don't know. 3465d6c0b56eSmrg# 'pass_all' -- all dependencies passed with no checks. 3466d6c0b56eSmrg# 'test_compile' -- check by making test program. 3467d6c0b56eSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 3468d6c0b56eSmrg# that responds to the $file_magic_cmd with a given extended regex. 3469d6c0b56eSmrg# If you have 'file' or equivalent on your system and you're not sure 3470d6c0b56eSmrg# whether 'pass_all' will *always* work, you probably want this one. 3471d6c0b56eSmrg 3472d6c0b56eSmrgcase $host_os in 3473d6c0b56eSmrgaix[[4-9]]*) 3474d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3475d6c0b56eSmrg ;; 3476d6c0b56eSmrg 3477d6c0b56eSmrgbeos*) 3478d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3479d6c0b56eSmrg ;; 3480d6c0b56eSmrg 3481d6c0b56eSmrgbsdi[[45]]*) 3482d6c0b56eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3483d6c0b56eSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3484d6c0b56eSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3485d6c0b56eSmrg ;; 3486d6c0b56eSmrg 3487d6c0b56eSmrgcygwin*) 3488d6c0b56eSmrg # func_win32_libid is a shell function defined in ltmain.sh 3489d6c0b56eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3490d6c0b56eSmrg lt_cv_file_magic_cmd='func_win32_libid' 3491d6c0b56eSmrg ;; 3492d6c0b56eSmrg 3493d6c0b56eSmrgmingw* | pw32*) 3494d6c0b56eSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3495d6c0b56eSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3496d6c0b56eSmrg # unless we find 'file', for example because we are cross-compiling. 3497d6c0b56eSmrg if ( file / ) >/dev/null 2>&1; then 3498d6c0b56eSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3499d6c0b56eSmrg lt_cv_file_magic_cmd='func_win32_libid' 3500d6c0b56eSmrg else 3501d6c0b56eSmrg # Keep this pattern in sync with the one in func_win32_libid. 3502d6c0b56eSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3503d6c0b56eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3504d6c0b56eSmrg fi 3505d6c0b56eSmrg ;; 3506d6c0b56eSmrg 3507d6c0b56eSmrgcegcc*) 3508d6c0b56eSmrg # use the weaker test based on 'objdump'. See mingw*. 3509d6c0b56eSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3510d6c0b56eSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3511d6c0b56eSmrg ;; 3512d6c0b56eSmrg 3513d6c0b56eSmrgdarwin* | rhapsody*) 3514d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3515d6c0b56eSmrg ;; 3516d6c0b56eSmrg 3517d6c0b56eSmrgfreebsd* | dragonfly*) 3518d6c0b56eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3519d6c0b56eSmrg case $host_cpu in 3520d6c0b56eSmrg i*86 ) 3521d6c0b56eSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3522d6c0b56eSmrg # Let's accept both of them until this is cleared up. 3523d6c0b56eSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3524d6c0b56eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3525d6c0b56eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3526d6c0b56eSmrg ;; 3527d6c0b56eSmrg esac 3528d6c0b56eSmrg else 3529d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3530d6c0b56eSmrg fi 3531d6c0b56eSmrg ;; 3532d6c0b56eSmrg 3533d6c0b56eSmrghaiku*) 3534d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3535d6c0b56eSmrg ;; 3536d6c0b56eSmrg 3537d6c0b56eSmrghpux10.20* | hpux11*) 3538d6c0b56eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3539d6c0b56eSmrg case $host_cpu in 3540d6c0b56eSmrg ia64*) 3541d6c0b56eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3542d6c0b56eSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3543d6c0b56eSmrg ;; 3544d6c0b56eSmrg hppa*64*) 3545d6c0b56eSmrg [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]'] 3546d6c0b56eSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3547d6c0b56eSmrg ;; 3548d6c0b56eSmrg *) 3549d6c0b56eSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 3550d6c0b56eSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3551d6c0b56eSmrg ;; 3552d6c0b56eSmrg esac 3553d6c0b56eSmrg ;; 3554d6c0b56eSmrg 3555d6c0b56eSmrginterix[[3-9]]*) 3556d6c0b56eSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3557d6c0b56eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3558d6c0b56eSmrg ;; 3559d6c0b56eSmrg 3560d6c0b56eSmrgirix5* | irix6* | nonstopux*) 3561d6c0b56eSmrg case $LD in 3562d6c0b56eSmrg *-32|*"-32 ") libmagic=32-bit;; 3563d6c0b56eSmrg *-n32|*"-n32 ") libmagic=N32;; 3564d6c0b56eSmrg *-64|*"-64 ") libmagic=64-bit;; 3565d6c0b56eSmrg *) libmagic=never-match;; 3566d6c0b56eSmrg esac 3567d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3568d6c0b56eSmrg ;; 3569d6c0b56eSmrg 3570d6c0b56eSmrg# This must be glibc/ELF. 3571d6c0b56eSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 3572d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3573d6c0b56eSmrg ;; 3574d6c0b56eSmrg 3575d6c0b56eSmrgnetbsd* | netbsdelf*-gnu) 3576d6c0b56eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3577d6c0b56eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3578d6c0b56eSmrg else 3579d6c0b56eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3580d6c0b56eSmrg fi 3581d6c0b56eSmrg ;; 3582d6c0b56eSmrg 3583d6c0b56eSmrgnewos6*) 3584d6c0b56eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3585d6c0b56eSmrg lt_cv_file_magic_cmd=/usr/bin/file 3586d6c0b56eSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3587d6c0b56eSmrg ;; 3588d6c0b56eSmrg 3589d6c0b56eSmrg*nto* | *qnx*) 3590d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3591d6c0b56eSmrg ;; 3592d6c0b56eSmrg 3593d6c0b56eSmrgopenbsd* | bitrig*) 3594d6c0b56eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 3595d6c0b56eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3596d6c0b56eSmrg else 3597d6c0b56eSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3598d6c0b56eSmrg fi 3599d6c0b56eSmrg ;; 3600d6c0b56eSmrg 3601d6c0b56eSmrgosf3* | osf4* | osf5*) 3602d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3603d6c0b56eSmrg ;; 3604d6c0b56eSmrg 3605d6c0b56eSmrgrdos*) 3606d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3607d6c0b56eSmrg ;; 3608d6c0b56eSmrg 3609d6c0b56eSmrgsolaris*) 3610d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3611d6c0b56eSmrg ;; 3612d6c0b56eSmrg 3613d6c0b56eSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3614d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3615d6c0b56eSmrg ;; 3616d6c0b56eSmrg 3617d6c0b56eSmrgsysv4 | sysv4.3*) 3618d6c0b56eSmrg case $host_vendor in 3619d6c0b56eSmrg motorola) 3620d6c0b56eSmrg 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]]' 3621d6c0b56eSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3622d6c0b56eSmrg ;; 3623d6c0b56eSmrg ncr) 3624d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3625d6c0b56eSmrg ;; 3626d6c0b56eSmrg sequent) 3627d6c0b56eSmrg lt_cv_file_magic_cmd='/bin/file' 3628d6c0b56eSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3629d6c0b56eSmrg ;; 3630d6c0b56eSmrg sni) 3631d6c0b56eSmrg lt_cv_file_magic_cmd='/bin/file' 3632d6c0b56eSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3633d6c0b56eSmrg lt_cv_file_magic_test_file=/lib/libc.so 3634d6c0b56eSmrg ;; 3635d6c0b56eSmrg siemens) 3636d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3637d6c0b56eSmrg ;; 3638d6c0b56eSmrg pc) 3639d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3640d6c0b56eSmrg ;; 3641d6c0b56eSmrg esac 3642d6c0b56eSmrg ;; 3643d6c0b56eSmrg 3644d6c0b56eSmrgtpf*) 3645d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3646d6c0b56eSmrg ;; 3647d6c0b56eSmrgos2*) 3648d6c0b56eSmrg lt_cv_deplibs_check_method=pass_all 3649d6c0b56eSmrg ;; 3650d6c0b56eSmrgesac 3651d6c0b56eSmrg]) 3652d6c0b56eSmrg 3653d6c0b56eSmrgfile_magic_glob= 3654d6c0b56eSmrgwant_nocaseglob=no 3655d6c0b56eSmrgif test "$build" = "$host"; then 3656d6c0b56eSmrg case $host_os in 3657d6c0b56eSmrg mingw* | pw32*) 3658d6c0b56eSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3659d6c0b56eSmrg want_nocaseglob=yes 3660d6c0b56eSmrg else 3661d6c0b56eSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3662d6c0b56eSmrg fi 3663d6c0b56eSmrg ;; 3664d6c0b56eSmrg esac 3665d6c0b56eSmrgfi 3666d6c0b56eSmrg 3667d6c0b56eSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3668d6c0b56eSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3669d6c0b56eSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3670d6c0b56eSmrg 3671d6c0b56eSmrg_LT_DECL([], [deplibs_check_method], [1], 3672d6c0b56eSmrg [Method to check whether dependent libraries are shared objects]) 3673d6c0b56eSmrg_LT_DECL([], [file_magic_cmd], [1], 3674d6c0b56eSmrg [Command to use when deplibs_check_method = "file_magic"]) 3675d6c0b56eSmrg_LT_DECL([], [file_magic_glob], [1], 3676d6c0b56eSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 3677d6c0b56eSmrg_LT_DECL([], [want_nocaseglob], [1], 3678d6c0b56eSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3679d6c0b56eSmrg])# _LT_CHECK_MAGIC_METHOD 3680d6c0b56eSmrg 3681d6c0b56eSmrg 3682d6c0b56eSmrg# LT_PATH_NM 3683d6c0b56eSmrg# ---------- 3684d6c0b56eSmrg# find the pathname to a BSD- or MS-compatible name lister 3685d6c0b56eSmrgAC_DEFUN([LT_PATH_NM], 3686d6c0b56eSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3687d6c0b56eSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3688d6c0b56eSmrg[if test -n "$NM"; then 3689d6c0b56eSmrg # Let the user override the test. 3690d6c0b56eSmrg lt_cv_path_NM=$NM 3691d6c0b56eSmrgelse 3692d6c0b56eSmrg lt_nm_to_check=${ac_tool_prefix}nm 3693d6c0b56eSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3694d6c0b56eSmrg lt_nm_to_check="$lt_nm_to_check nm" 3695d6c0b56eSmrg fi 3696d6c0b56eSmrg for lt_tmp_nm in $lt_nm_to_check; do 3697d6c0b56eSmrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3698d6c0b56eSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3699d6c0b56eSmrg IFS=$lt_save_ifs 3700d6c0b56eSmrg test -z "$ac_dir" && ac_dir=. 3701d6c0b56eSmrg tmp_nm=$ac_dir/$lt_tmp_nm 3702d6c0b56eSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 3703d6c0b56eSmrg # Check to see if the nm accepts a BSD-compat flag. 3704d6c0b56eSmrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 3705d6c0b56eSmrg # nm: unknown option "B" ignored 3706d6c0b56eSmrg # Tru64's nm complains that /dev/null is an invalid object file 3707d6c0b56eSmrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 3708d6c0b56eSmrg case $build_os in 3709d6c0b56eSmrg mingw*) lt_bad_file=conftest.nm/nofile ;; 3710d6c0b56eSmrg *) lt_bad_file=/dev/null ;; 3711d6c0b56eSmrg esac 3712d6c0b56eSmrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 3713d6c0b56eSmrg *$lt_bad_file* | *'Invalid file or object type'*) 3714d6c0b56eSmrg lt_cv_path_NM="$tmp_nm -B" 3715d6c0b56eSmrg break 2 3716d6c0b56eSmrg ;; 3717d6c0b56eSmrg *) 3718d6c0b56eSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3719d6c0b56eSmrg */dev/null*) 3720d6c0b56eSmrg lt_cv_path_NM="$tmp_nm -p" 3721d6c0b56eSmrg break 2 3722d6c0b56eSmrg ;; 3723d6c0b56eSmrg *) 3724d6c0b56eSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3725d6c0b56eSmrg continue # so that we can try to find one that supports BSD flags 3726d6c0b56eSmrg ;; 3727d6c0b56eSmrg esac 3728d6c0b56eSmrg ;; 3729d6c0b56eSmrg esac 3730d6c0b56eSmrg fi 3731d6c0b56eSmrg done 3732d6c0b56eSmrg IFS=$lt_save_ifs 3733d6c0b56eSmrg done 3734d6c0b56eSmrg : ${lt_cv_path_NM=no} 3735d6c0b56eSmrgfi]) 3736d6c0b56eSmrgif test no != "$lt_cv_path_NM"; then 3737d6c0b56eSmrg NM=$lt_cv_path_NM 3738d6c0b56eSmrgelse 3739d6c0b56eSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3740d6c0b56eSmrg if test -n "$DUMPBIN"; then : 3741d6c0b56eSmrg # Let the user override the test. 3742d6c0b56eSmrg else 3743d6c0b56eSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3744d6c0b56eSmrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 3745d6c0b56eSmrg *COFF*) 3746d6c0b56eSmrg DUMPBIN="$DUMPBIN -symbols -headers" 3747d6c0b56eSmrg ;; 3748d6c0b56eSmrg *) 3749d6c0b56eSmrg DUMPBIN=: 3750d6c0b56eSmrg ;; 3751d6c0b56eSmrg esac 3752d6c0b56eSmrg fi 3753d6c0b56eSmrg AC_SUBST([DUMPBIN]) 3754d6c0b56eSmrg if test : != "$DUMPBIN"; then 3755d6c0b56eSmrg NM=$DUMPBIN 3756d6c0b56eSmrg fi 3757d6c0b56eSmrgfi 3758d6c0b56eSmrgtest -z "$NM" && NM=nm 3759d6c0b56eSmrgAC_SUBST([NM]) 3760d6c0b56eSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3761d6c0b56eSmrg 3762d6c0b56eSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3763d6c0b56eSmrg [lt_cv_nm_interface="BSD nm" 3764d6c0b56eSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3765d6c0b56eSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3766d6c0b56eSmrg (eval "$ac_compile" 2>conftest.err) 3767d6c0b56eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3768d6c0b56eSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3769d6c0b56eSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3770d6c0b56eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3771d6c0b56eSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3772d6c0b56eSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3773d6c0b56eSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3774d6c0b56eSmrg lt_cv_nm_interface="MS dumpbin" 3775d6c0b56eSmrg fi 3776d6c0b56eSmrg rm -f conftest*]) 3777d6c0b56eSmrg])# LT_PATH_NM 3778d6c0b56eSmrg 3779d6c0b56eSmrg# Old names: 3780d6c0b56eSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3781d6c0b56eSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3782d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 3783d6c0b56eSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3784d6c0b56eSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3785d6c0b56eSmrg 3786d6c0b56eSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3787d6c0b56eSmrg# -------------------------------- 3788d6c0b56eSmrg# how to determine the name of the shared library 3789d6c0b56eSmrg# associated with a specific link library. 3790d6c0b56eSmrg# -- PORTME fill in with the dynamic library characteristics 3791d6c0b56eSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3792d6c0b56eSmrg[m4_require([_LT_DECL_EGREP]) 3793d6c0b56eSmrgm4_require([_LT_DECL_OBJDUMP]) 3794d6c0b56eSmrgm4_require([_LT_DECL_DLLTOOL]) 3795d6c0b56eSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3796d6c0b56eSmrglt_cv_sharedlib_from_linklib_cmd, 3797d6c0b56eSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3798d6c0b56eSmrg 3799d6c0b56eSmrgcase $host_os in 3800d6c0b56eSmrgcygwin* | mingw* | pw32* | cegcc*) 3801d6c0b56eSmrg # two different shell functions defined in ltmain.sh; 3802d6c0b56eSmrg # decide which one to use based on capabilities of $DLLTOOL 3803d6c0b56eSmrg case `$DLLTOOL --help 2>&1` in 3804d6c0b56eSmrg *--identify-strict*) 3805d6c0b56eSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3806d6c0b56eSmrg ;; 3807d6c0b56eSmrg *) 3808d6c0b56eSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3809d6c0b56eSmrg ;; 3810d6c0b56eSmrg esac 3811d6c0b56eSmrg ;; 3812d6c0b56eSmrg*) 3813d6c0b56eSmrg # fallback: assume linklib IS sharedlib 3814d6c0b56eSmrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 3815d6c0b56eSmrg ;; 3816d6c0b56eSmrgesac 3817d6c0b56eSmrg]) 3818d6c0b56eSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3819d6c0b56eSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3820d6c0b56eSmrg 3821d6c0b56eSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3822d6c0b56eSmrg [Command to associate shared and link libraries]) 3823d6c0b56eSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3824d6c0b56eSmrg 3825d6c0b56eSmrg 3826d6c0b56eSmrg# _LT_PATH_MANIFEST_TOOL 3827d6c0b56eSmrg# ---------------------- 3828d6c0b56eSmrg# locate the manifest tool 3829d6c0b56eSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3830d6c0b56eSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3831d6c0b56eSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3832d6c0b56eSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3833d6c0b56eSmrg [lt_cv_path_mainfest_tool=no 3834d6c0b56eSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3835d6c0b56eSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3836d6c0b56eSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3837d6c0b56eSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3838d6c0b56eSmrg lt_cv_path_mainfest_tool=yes 3839d6c0b56eSmrg fi 3840d6c0b56eSmrg rm -f conftest*]) 3841d6c0b56eSmrgif test yes != "$lt_cv_path_mainfest_tool"; then 3842d6c0b56eSmrg MANIFEST_TOOL=: 3843d6c0b56eSmrgfi 3844d6c0b56eSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3845d6c0b56eSmrg])# _LT_PATH_MANIFEST_TOOL 3846d6c0b56eSmrg 3847d6c0b56eSmrg 3848d6c0b56eSmrg# _LT_DLL_DEF_P([FILE]) 3849d6c0b56eSmrg# --------------------- 3850d6c0b56eSmrg# True iff FILE is a Windows DLL '.def' file. 3851d6c0b56eSmrg# Keep in sync with func_dll_def_p in the libtool script 3852d6c0b56eSmrgAC_DEFUN([_LT_DLL_DEF_P], 3853d6c0b56eSmrg[dnl 3854d6c0b56eSmrg test DEF = "`$SED -n dnl 3855d6c0b56eSmrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 3856d6c0b56eSmrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 3857d6c0b56eSmrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 3858d6c0b56eSmrg -e q dnl Only consider the first "real" line 3859d6c0b56eSmrg $1`" dnl 3860d6c0b56eSmrg])# _LT_DLL_DEF_P 3861d6c0b56eSmrg 3862d6c0b56eSmrg 3863d6c0b56eSmrg# LT_LIB_M 3864d6c0b56eSmrg# -------- 3865d6c0b56eSmrg# check for math library 3866d6c0b56eSmrgAC_DEFUN([LT_LIB_M], 3867d6c0b56eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3868d6c0b56eSmrgLIBM= 3869d6c0b56eSmrgcase $host in 3870d6c0b56eSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 3871d6c0b56eSmrg # These system don't have libm, or don't need it 3872d6c0b56eSmrg ;; 3873d6c0b56eSmrg*-ncr-sysv4.3*) 3874d6c0b56eSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 3875d6c0b56eSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3876d6c0b56eSmrg ;; 3877d6c0b56eSmrg*) 3878d6c0b56eSmrg AC_CHECK_LIB(m, cos, LIBM=-lm) 3879d6c0b56eSmrg ;; 3880d6c0b56eSmrgesac 3881d6c0b56eSmrgAC_SUBST([LIBM]) 3882d6c0b56eSmrg])# LT_LIB_M 3883d6c0b56eSmrg 3884d6c0b56eSmrg# Old name: 3885d6c0b56eSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3886d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 3887d6c0b56eSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3888d6c0b56eSmrg 3889d6c0b56eSmrg 3890d6c0b56eSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3891d6c0b56eSmrg# ------------------------------- 3892d6c0b56eSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3893d6c0b56eSmrg[m4_require([_LT_TAG_COMPILER])dnl 3894d6c0b56eSmrg 3895d6c0b56eSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3896d6c0b56eSmrg 3897d6c0b56eSmrgif test yes = "$GCC"; then 3898d6c0b56eSmrg case $cc_basename in 3899d6c0b56eSmrg nvcc*) 3900d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3901d6c0b56eSmrg *) 3902d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3903d6c0b56eSmrg esac 3904d6c0b56eSmrg 3905d6c0b56eSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3906d6c0b56eSmrg lt_cv_prog_compiler_rtti_exceptions, 3907d6c0b56eSmrg [-fno-rtti -fno-exceptions], [], 3908d6c0b56eSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3909d6c0b56eSmrgfi 3910d6c0b56eSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3911d6c0b56eSmrg [Compiler flag to turn off builtin functions]) 3912d6c0b56eSmrg])# _LT_COMPILER_NO_RTTI 3913d6c0b56eSmrg 3914d6c0b56eSmrg 3915d6c0b56eSmrg# _LT_CMD_GLOBAL_SYMBOLS 3916d6c0b56eSmrg# ---------------------- 3917d6c0b56eSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3918d6c0b56eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3919d6c0b56eSmrgAC_REQUIRE([AC_PROG_CC])dnl 3920d6c0b56eSmrgAC_REQUIRE([AC_PROG_AWK])dnl 3921d6c0b56eSmrgAC_REQUIRE([LT_PATH_NM])dnl 3922d6c0b56eSmrgAC_REQUIRE([LT_PATH_LD])dnl 3923d6c0b56eSmrgm4_require([_LT_DECL_SED])dnl 3924d6c0b56eSmrgm4_require([_LT_DECL_EGREP])dnl 3925d6c0b56eSmrgm4_require([_LT_TAG_COMPILER])dnl 3926d6c0b56eSmrg 3927d6c0b56eSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3928d6c0b56eSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3929d6c0b56eSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3930d6c0b56eSmrg[ 3931d6c0b56eSmrg# These are sane defaults that work on at least a few old systems. 3932d6c0b56eSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3933d6c0b56eSmrg 3934d6c0b56eSmrg# Character class describing NM global symbol codes. 3935d6c0b56eSmrgsymcode='[[BCDEGRST]]' 3936d6c0b56eSmrg 3937d6c0b56eSmrg# Regexp to match symbols that can be accessed directly from C. 3938d6c0b56eSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3939d6c0b56eSmrg 3940d6c0b56eSmrg# Define system-specific variables. 3941d6c0b56eSmrgcase $host_os in 3942d6c0b56eSmrgaix*) 3943d6c0b56eSmrg symcode='[[BCDT]]' 3944d6c0b56eSmrg ;; 3945d6c0b56eSmrgcygwin* | mingw* | pw32* | cegcc*) 3946d6c0b56eSmrg symcode='[[ABCDGISTW]]' 3947d6c0b56eSmrg ;; 3948d6c0b56eSmrghpux*) 3949d6c0b56eSmrg if test ia64 = "$host_cpu"; then 3950d6c0b56eSmrg symcode='[[ABCDEGRST]]' 3951d6c0b56eSmrg fi 3952d6c0b56eSmrg ;; 3953d6c0b56eSmrgirix* | nonstopux*) 3954d6c0b56eSmrg symcode='[[BCDEGRST]]' 3955d6c0b56eSmrg ;; 3956d6c0b56eSmrgosf*) 3957d6c0b56eSmrg symcode='[[BCDEGQRST]]' 3958d6c0b56eSmrg ;; 3959d6c0b56eSmrgsolaris*) 3960d6c0b56eSmrg symcode='[[BDRT]]' 3961d6c0b56eSmrg ;; 3962d6c0b56eSmrgsco3.2v5*) 3963d6c0b56eSmrg symcode='[[DT]]' 3964d6c0b56eSmrg ;; 3965d6c0b56eSmrgsysv4.2uw2*) 3966d6c0b56eSmrg symcode='[[DT]]' 3967d6c0b56eSmrg ;; 3968d6c0b56eSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3969d6c0b56eSmrg symcode='[[ABDT]]' 3970d6c0b56eSmrg ;; 3971d6c0b56eSmrgsysv4) 3972d6c0b56eSmrg symcode='[[DFNSTU]]' 3973d6c0b56eSmrg ;; 3974d6c0b56eSmrgesac 3975d6c0b56eSmrg 3976d6c0b56eSmrg# If we're using GNU nm, then use its standard symbol codes. 3977d6c0b56eSmrgcase `$NM -V 2>&1` in 3978d6c0b56eSmrg*GNU* | *'with BFD'*) 3979d6c0b56eSmrg symcode='[[ABCDGIRSTW]]' ;; 3980d6c0b56eSmrgesac 3981d6c0b56eSmrg 3982d6c0b56eSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3983d6c0b56eSmrg # Gets list of data symbols to import. 3984d6c0b56eSmrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 3985d6c0b56eSmrg # Adjust the below global symbol transforms to fixup imported variables. 3986d6c0b56eSmrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 3987d6c0b56eSmrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 3988d6c0b56eSmrg lt_c_name_lib_hook="\ 3989d6c0b56eSmrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 3990d6c0b56eSmrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 3991d6c0b56eSmrgelse 3992d6c0b56eSmrg # Disable hooks by default. 3993d6c0b56eSmrg lt_cv_sys_global_symbol_to_import= 3994d6c0b56eSmrg lt_cdecl_hook= 3995d6c0b56eSmrg lt_c_name_hook= 3996d6c0b56eSmrg lt_c_name_lib_hook= 3997d6c0b56eSmrgfi 3998d6c0b56eSmrg 3999d6c0b56eSmrg# Transform an extracted symbol line into a proper C declaration. 4000d6c0b56eSmrg# Some systems (esp. on ia64) link data and code symbols differently, 4001d6c0b56eSmrg# so use this general approach. 4002d6c0b56eSmrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 4003d6c0b56eSmrg$lt_cdecl_hook\ 4004d6c0b56eSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 4005d6c0b56eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 4006d6c0b56eSmrg 4007d6c0b56eSmrg# Transform an extracted symbol line into symbol name and symbol address 4008d6c0b56eSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 4009d6c0b56eSmrg$lt_c_name_hook\ 4010d6c0b56eSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4011d6c0b56eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 4012d6c0b56eSmrg 4013d6c0b56eSmrg# Transform an extracted symbol line into symbol name with lib prefix and 4014d6c0b56eSmrg# symbol address. 4015d6c0b56eSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 4016d6c0b56eSmrg$lt_c_name_lib_hook\ 4017d6c0b56eSmrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 4018d6c0b56eSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 4019d6c0b56eSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4020d6c0b56eSmrg 4021d6c0b56eSmrg# Handle CRLF in mingw tool chain 4022d6c0b56eSmrgopt_cr= 4023d6c0b56eSmrgcase $build_os in 4024d6c0b56eSmrgmingw*) 4025d6c0b56eSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 4026d6c0b56eSmrg ;; 4027d6c0b56eSmrgesac 4028d6c0b56eSmrg 4029d6c0b56eSmrg# Try without a prefix underscore, then with it. 4030d6c0b56eSmrgfor ac_symprfx in "" "_"; do 4031d6c0b56eSmrg 4032d6c0b56eSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 4033d6c0b56eSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 4034d6c0b56eSmrg 4035d6c0b56eSmrg # Write the raw and C identifiers. 4036d6c0b56eSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 4037d6c0b56eSmrg # Fake it for dumpbin and say T for any non-static function, 4038d6c0b56eSmrg # D for any global variable and I for any imported variable. 4039d6c0b56eSmrg # Also find C++ and __fastcall symbols from MSVC++, 4040d6c0b56eSmrg # which start with @ or ?. 4041d6c0b56eSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 4042d6c0b56eSmrg" {last_section=section; section=\$ 3};"\ 4043d6c0b56eSmrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 4044d6c0b56eSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 4045d6c0b56eSmrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 4046d6c0b56eSmrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 4047d6c0b56eSmrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 4048d6c0b56eSmrg" \$ 0!~/External *\|/{next};"\ 4049d6c0b56eSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 4050d6c0b56eSmrg" {if(hide[section]) next};"\ 4051d6c0b56eSmrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 4052d6c0b56eSmrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 4053d6c0b56eSmrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 4054d6c0b56eSmrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 4055d6c0b56eSmrg" ' prfx=^$ac_symprfx]" 4056d6c0b56eSmrg else 4057d6c0b56eSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 4058d6c0b56eSmrg fi 4059d6c0b56eSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4060d6c0b56eSmrg 4061d6c0b56eSmrg # Check to see that the pipe works correctly. 4062d6c0b56eSmrg pipe_works=no 4063d6c0b56eSmrg 4064d6c0b56eSmrg rm -f conftest* 4065d6c0b56eSmrg cat > conftest.$ac_ext <<_LT_EOF 4066d6c0b56eSmrg#ifdef __cplusplus 4067d6c0b56eSmrgextern "C" { 4068d6c0b56eSmrg#endif 4069d6c0b56eSmrgchar nm_test_var; 4070d6c0b56eSmrgvoid nm_test_func(void); 4071d6c0b56eSmrgvoid nm_test_func(void){} 4072d6c0b56eSmrg#ifdef __cplusplus 4073d6c0b56eSmrg} 4074d6c0b56eSmrg#endif 4075d6c0b56eSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 4076d6c0b56eSmrg_LT_EOF 4077d6c0b56eSmrg 4078d6c0b56eSmrg if AC_TRY_EVAL(ac_compile); then 4079d6c0b56eSmrg # Now try to grab the symbols. 4080d6c0b56eSmrg nlist=conftest.nm 4081d6c0b56eSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 4082d6c0b56eSmrg # Try sorting and uniquifying the output. 4083d6c0b56eSmrg if sort "$nlist" | uniq > "$nlist"T; then 4084d6c0b56eSmrg mv -f "$nlist"T "$nlist" 4085d6c0b56eSmrg else 4086d6c0b56eSmrg rm -f "$nlist"T 4087d6c0b56eSmrg fi 4088d6c0b56eSmrg 4089d6c0b56eSmrg # Make sure that we snagged all the symbols we need. 4090d6c0b56eSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 4091d6c0b56eSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 4092d6c0b56eSmrg cat <<_LT_EOF > conftest.$ac_ext 4093d6c0b56eSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 4094d6c0b56eSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 4095d6c0b56eSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 4096d6c0b56eSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 4097d6c0b56eSmrg# define LT@&t@_DLSYM_CONST 4098d6c0b56eSmrg#elif defined __osf__ 4099d6c0b56eSmrg/* This system does not cope well with relocations in const data. */ 4100d6c0b56eSmrg# define LT@&t@_DLSYM_CONST 4101d6c0b56eSmrg#else 4102d6c0b56eSmrg# define LT@&t@_DLSYM_CONST const 4103d6c0b56eSmrg#endif 4104d6c0b56eSmrg 4105d6c0b56eSmrg#ifdef __cplusplus 4106d6c0b56eSmrgextern "C" { 4107d6c0b56eSmrg#endif 4108d6c0b56eSmrg 4109d6c0b56eSmrg_LT_EOF 4110d6c0b56eSmrg # Now generate the symbol file. 4111d6c0b56eSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4112d6c0b56eSmrg 4113d6c0b56eSmrg cat <<_LT_EOF >> conftest.$ac_ext 4114d6c0b56eSmrg 4115d6c0b56eSmrg/* The mapping between symbol names and symbols. */ 4116d6c0b56eSmrgLT@&t@_DLSYM_CONST struct { 4117d6c0b56eSmrg const char *name; 4118d6c0b56eSmrg void *address; 4119d6c0b56eSmrg} 4120d6c0b56eSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 4121d6c0b56eSmrg{ 4122d6c0b56eSmrg { "@PROGRAM@", (void *) 0 }, 4123d6c0b56eSmrg_LT_EOF 4124d6c0b56eSmrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 4125d6c0b56eSmrg cat <<\_LT_EOF >> conftest.$ac_ext 4126d6c0b56eSmrg {0, (void *) 0} 4127d6c0b56eSmrg}; 4128d6c0b56eSmrg 4129d6c0b56eSmrg/* This works around a problem in FreeBSD linker */ 4130d6c0b56eSmrg#ifdef FREEBSD_WORKAROUND 4131d6c0b56eSmrgstatic const void *lt_preloaded_setup() { 4132d6c0b56eSmrg return lt__PROGRAM__LTX_preloaded_symbols; 4133d6c0b56eSmrg} 4134d6c0b56eSmrg#endif 4135d6c0b56eSmrg 4136d6c0b56eSmrg#ifdef __cplusplus 4137d6c0b56eSmrg} 4138d6c0b56eSmrg#endif 4139d6c0b56eSmrg_LT_EOF 4140d6c0b56eSmrg # Now try linking the two files. 4141d6c0b56eSmrg mv conftest.$ac_objext conftstm.$ac_objext 4142d6c0b56eSmrg lt_globsym_save_LIBS=$LIBS 4143d6c0b56eSmrg lt_globsym_save_CFLAGS=$CFLAGS 4144d6c0b56eSmrg LIBS=conftstm.$ac_objext 4145d6c0b56eSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 4146d6c0b56eSmrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 4147d6c0b56eSmrg pipe_works=yes 4148d6c0b56eSmrg fi 4149d6c0b56eSmrg LIBS=$lt_globsym_save_LIBS 4150d6c0b56eSmrg CFLAGS=$lt_globsym_save_CFLAGS 4151d6c0b56eSmrg else 4152d6c0b56eSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 4153d6c0b56eSmrg fi 4154d6c0b56eSmrg else 4155d6c0b56eSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 4156d6c0b56eSmrg fi 4157d6c0b56eSmrg else 4158d6c0b56eSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4159d6c0b56eSmrg fi 4160d6c0b56eSmrg else 4161d6c0b56eSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 4162d6c0b56eSmrg cat conftest.$ac_ext >&5 4163d6c0b56eSmrg fi 4164d6c0b56eSmrg rm -rf conftest* conftst* 4165d6c0b56eSmrg 4166d6c0b56eSmrg # Do not use the global_symbol_pipe unless it works. 4167d6c0b56eSmrg if test yes = "$pipe_works"; then 4168d6c0b56eSmrg break 4169d6c0b56eSmrg else 4170d6c0b56eSmrg lt_cv_sys_global_symbol_pipe= 4171d6c0b56eSmrg fi 4172d6c0b56eSmrgdone 4173d6c0b56eSmrg]) 4174d6c0b56eSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 4175d6c0b56eSmrg lt_cv_sys_global_symbol_to_cdecl= 4176d6c0b56eSmrgfi 4177d6c0b56eSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 4178d6c0b56eSmrg AC_MSG_RESULT(failed) 4179d6c0b56eSmrgelse 4180d6c0b56eSmrg AC_MSG_RESULT(ok) 4181d6c0b56eSmrgfi 4182d6c0b56eSmrg 4183d6c0b56eSmrg# Response file support. 4184d6c0b56eSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 4185d6c0b56eSmrg nm_file_list_spec='@' 4186d6c0b56eSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 4187d6c0b56eSmrg nm_file_list_spec='@' 4188d6c0b56eSmrgfi 4189d6c0b56eSmrg 4190d6c0b56eSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 4191d6c0b56eSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 4192d6c0b56eSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 4193d6c0b56eSmrg [Transform the output of nm in a proper C declaration]) 4194d6c0b56eSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 4195d6c0b56eSmrg [Transform the output of nm into a list of symbols to manually relocate]) 4196d6c0b56eSmrg_LT_DECL([global_symbol_to_c_name_address], 4197d6c0b56eSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 4198d6c0b56eSmrg [Transform the output of nm in a C name address pair]) 4199d6c0b56eSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 4200d6c0b56eSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 4201d6c0b56eSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 4202d6c0b56eSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 4203d6c0b56eSmrg [The name lister interface]) 4204d6c0b56eSmrg_LT_DECL([], [nm_file_list_spec], [1], 4205d6c0b56eSmrg [Specify filename containing input files for $NM]) 4206d6c0b56eSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 4207d6c0b56eSmrg 4208d6c0b56eSmrg 4209d6c0b56eSmrg# _LT_COMPILER_PIC([TAGNAME]) 4210d6c0b56eSmrg# --------------------------- 4211d6c0b56eSmrgm4_defun([_LT_COMPILER_PIC], 4212d6c0b56eSmrg[m4_require([_LT_TAG_COMPILER])dnl 4213d6c0b56eSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 4214d6c0b56eSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4215d6c0b56eSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4216d6c0b56eSmrg 4217d6c0b56eSmrgm4_if([$1], [CXX], [ 4218d6c0b56eSmrg # C++ specific cases for pic, static, wl, etc. 4219d6c0b56eSmrg if test yes = "$GXX"; then 4220d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4221d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4222d6c0b56eSmrg 4223d6c0b56eSmrg case $host_os in 4224d6c0b56eSmrg aix*) 4225d6c0b56eSmrg # All AIX code is PIC. 4226d6c0b56eSmrg if test ia64 = "$host_cpu"; then 4227d6c0b56eSmrg # AIX 5 now supports IA64 processor 4228d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4229d6c0b56eSmrg fi 4230d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4231d6c0b56eSmrg ;; 4232d6c0b56eSmrg 4233d6c0b56eSmrg amigaos*) 4234d6c0b56eSmrg case $host_cpu in 4235d6c0b56eSmrg powerpc) 4236d6c0b56eSmrg # see comment about AmigaOS4 .so support 4237d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4238d6c0b56eSmrg ;; 4239d6c0b56eSmrg m68k) 4240d6c0b56eSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4241d6c0b56eSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4242d6c0b56eSmrg # like '-m68040'. 4243d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4244d6c0b56eSmrg ;; 4245d6c0b56eSmrg esac 4246d6c0b56eSmrg ;; 4247d6c0b56eSmrg 4248d6c0b56eSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4249d6c0b56eSmrg # PIC is the default for these OSes. 4250d6c0b56eSmrg ;; 4251d6c0b56eSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4252d6c0b56eSmrg # This hack is so that the source file can tell whether it is being 4253d6c0b56eSmrg # built for inclusion in a dll (and should export symbols for example). 4254d6c0b56eSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4255d6c0b56eSmrg # (--disable-auto-import) libraries 4256d6c0b56eSmrg m4_if([$1], [GCJ], [], 4257d6c0b56eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4258d6c0b56eSmrg case $host_os in 4259d6c0b56eSmrg os2*) 4260d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4261d6c0b56eSmrg ;; 4262d6c0b56eSmrg esac 4263d6c0b56eSmrg ;; 4264d6c0b56eSmrg darwin* | rhapsody*) 4265d6c0b56eSmrg # PIC is the default on this platform 4266d6c0b56eSmrg # Common symbols not allowed in MH_DYLIB files 4267d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4268d6c0b56eSmrg ;; 4269d6c0b56eSmrg *djgpp*) 4270d6c0b56eSmrg # DJGPP does not support shared libraries at all 4271d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4272d6c0b56eSmrg ;; 4273d6c0b56eSmrg haiku*) 4274d6c0b56eSmrg # PIC is the default for Haiku. 4275d6c0b56eSmrg # The "-static" flag exists, but is broken. 4276d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4277d6c0b56eSmrg ;; 4278d6c0b56eSmrg interix[[3-9]]*) 4279d6c0b56eSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4280d6c0b56eSmrg # Instead, we relocate shared libraries at runtime. 4281d6c0b56eSmrg ;; 4282d6c0b56eSmrg sysv4*MP*) 4283d6c0b56eSmrg if test -d /usr/nec; then 4284d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4285d6c0b56eSmrg fi 4286d6c0b56eSmrg ;; 4287d6c0b56eSmrg hpux*) 4288d6c0b56eSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4289d6c0b56eSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4290d6c0b56eSmrg # sets the default TLS model and affects inlining. 4291d6c0b56eSmrg case $host_cpu in 4292d6c0b56eSmrg hppa*64*) 4293d6c0b56eSmrg ;; 4294d6c0b56eSmrg *) 4295d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4296d6c0b56eSmrg ;; 4297d6c0b56eSmrg esac 4298d6c0b56eSmrg ;; 4299d6c0b56eSmrg *qnx* | *nto*) 4300d6c0b56eSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4301d6c0b56eSmrg # it will coredump. 4302d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4303d6c0b56eSmrg ;; 4304d6c0b56eSmrg *) 4305d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4306d6c0b56eSmrg ;; 4307d6c0b56eSmrg esac 4308d6c0b56eSmrg else 4309d6c0b56eSmrg case $host_os in 4310d6c0b56eSmrg aix[[4-9]]*) 4311d6c0b56eSmrg # All AIX code is PIC. 4312d6c0b56eSmrg if test ia64 = "$host_cpu"; then 4313d6c0b56eSmrg # AIX 5 now supports IA64 processor 4314d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4315d6c0b56eSmrg else 4316d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4317d6c0b56eSmrg fi 4318d6c0b56eSmrg ;; 4319d6c0b56eSmrg chorus*) 4320d6c0b56eSmrg case $cc_basename in 4321d6c0b56eSmrg cxch68*) 4322d6c0b56eSmrg # Green Hills C++ Compiler 4323d6c0b56eSmrg # _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" 4324d6c0b56eSmrg ;; 4325d6c0b56eSmrg esac 4326d6c0b56eSmrg ;; 4327d6c0b56eSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 4328d6c0b56eSmrg # This hack is so that the source file can tell whether it is being 4329d6c0b56eSmrg # built for inclusion in a dll (and should export symbols for example). 4330d6c0b56eSmrg m4_if([$1], [GCJ], [], 4331d6c0b56eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4332d6c0b56eSmrg ;; 4333d6c0b56eSmrg dgux*) 4334d6c0b56eSmrg case $cc_basename in 4335d6c0b56eSmrg ec++*) 4336d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4337d6c0b56eSmrg ;; 4338d6c0b56eSmrg ghcx*) 4339d6c0b56eSmrg # Green Hills C++ Compiler 4340d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4341d6c0b56eSmrg ;; 4342d6c0b56eSmrg *) 4343d6c0b56eSmrg ;; 4344d6c0b56eSmrg esac 4345d6c0b56eSmrg ;; 4346d6c0b56eSmrg freebsd* | dragonfly*) 4347d6c0b56eSmrg # FreeBSD uses GNU C++ 4348d6c0b56eSmrg ;; 4349d6c0b56eSmrg hpux9* | hpux10* | hpux11*) 4350d6c0b56eSmrg case $cc_basename in 4351d6c0b56eSmrg CC*) 4352d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4353d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4354d6c0b56eSmrg if test ia64 != "$host_cpu"; then 4355d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4356d6c0b56eSmrg fi 4357d6c0b56eSmrg ;; 4358d6c0b56eSmrg aCC*) 4359d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4360d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4361d6c0b56eSmrg case $host_cpu in 4362d6c0b56eSmrg hppa*64*|ia64*) 4363d6c0b56eSmrg # +Z the default 4364d6c0b56eSmrg ;; 4365d6c0b56eSmrg *) 4366d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4367d6c0b56eSmrg ;; 4368d6c0b56eSmrg esac 4369d6c0b56eSmrg ;; 4370d6c0b56eSmrg *) 4371d6c0b56eSmrg ;; 4372d6c0b56eSmrg esac 4373d6c0b56eSmrg ;; 4374d6c0b56eSmrg interix*) 4375d6c0b56eSmrg # This is c89, which is MS Visual C++ (no shared libs) 4376d6c0b56eSmrg # Anyone wants to do a port? 4377d6c0b56eSmrg ;; 4378d6c0b56eSmrg irix5* | irix6* | nonstopux*) 4379d6c0b56eSmrg case $cc_basename in 4380d6c0b56eSmrg CC*) 4381d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4382d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4383d6c0b56eSmrg # CC pic flag -KPIC is the default. 4384d6c0b56eSmrg ;; 4385d6c0b56eSmrg *) 4386d6c0b56eSmrg ;; 4387d6c0b56eSmrg esac 4388d6c0b56eSmrg ;; 4389d6c0b56eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4390d6c0b56eSmrg case $cc_basename in 4391d6c0b56eSmrg KCC*) 4392d6c0b56eSmrg # KAI C++ Compiler 4393d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4394d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4395d6c0b56eSmrg ;; 4396d6c0b56eSmrg ecpc* ) 4397d6c0b56eSmrg # old Intel C++ for x86_64, which still supported -KPIC. 4398d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4400d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4401d6c0b56eSmrg ;; 4402d6c0b56eSmrg icpc* ) 4403d6c0b56eSmrg # Intel C++, used to be incompatible with GCC. 4404d6c0b56eSmrg # ICC 10 doesn't accept -KPIC any more. 4405d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4406d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4407d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4408d6c0b56eSmrg ;; 4409d6c0b56eSmrg pgCC* | pgcpp*) 4410d6c0b56eSmrg # Portland Group C++ compiler 4411d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4412d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4413d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4414d6c0b56eSmrg ;; 4415d6c0b56eSmrg cxx*) 4416d6c0b56eSmrg # Compaq C++ 4417d6c0b56eSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4418d6c0b56eSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4419d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4420d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4421d6c0b56eSmrg ;; 4422d6c0b56eSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4423d6c0b56eSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4424d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4425d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4426d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4427d6c0b56eSmrg ;; 4428d6c0b56eSmrg *) 4429d6c0b56eSmrg case `$CC -V 2>&1 | sed 5q` in 4430d6c0b56eSmrg *Sun\ C*) 4431d6c0b56eSmrg # Sun C++ 5.9 4432d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4433d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4434d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4435d6c0b56eSmrg ;; 4436d6c0b56eSmrg esac 4437d6c0b56eSmrg ;; 4438d6c0b56eSmrg esac 4439d6c0b56eSmrg ;; 4440d6c0b56eSmrg lynxos*) 4441d6c0b56eSmrg ;; 4442d6c0b56eSmrg m88k*) 4443d6c0b56eSmrg ;; 4444d6c0b56eSmrg mvs*) 4445d6c0b56eSmrg case $cc_basename in 4446d6c0b56eSmrg cxx*) 4447d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4448d6c0b56eSmrg ;; 4449d6c0b56eSmrg *) 4450d6c0b56eSmrg ;; 4451d6c0b56eSmrg esac 4452d6c0b56eSmrg ;; 4453d6c0b56eSmrg netbsd* | netbsdelf*-gnu) 4454d6c0b56eSmrg ;; 4455d6c0b56eSmrg *qnx* | *nto*) 4456d6c0b56eSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4457d6c0b56eSmrg # it will coredump. 4458d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4459d6c0b56eSmrg ;; 4460d6c0b56eSmrg osf3* | osf4* | osf5*) 4461d6c0b56eSmrg case $cc_basename in 4462d6c0b56eSmrg KCC*) 4463d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4464d6c0b56eSmrg ;; 4465d6c0b56eSmrg RCC*) 4466d6c0b56eSmrg # Rational C++ 2.4.1 4467d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4468d6c0b56eSmrg ;; 4469d6c0b56eSmrg cxx*) 4470d6c0b56eSmrg # Digital/Compaq C++ 4471d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4472d6c0b56eSmrg # Make sure the PIC flag is empty. It appears that all Alpha 4473d6c0b56eSmrg # Linux and Compaq Tru64 Unix objects are PIC. 4474d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4475d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4476d6c0b56eSmrg ;; 4477d6c0b56eSmrg *) 4478d6c0b56eSmrg ;; 4479d6c0b56eSmrg esac 4480d6c0b56eSmrg ;; 4481d6c0b56eSmrg psos*) 4482d6c0b56eSmrg ;; 4483d6c0b56eSmrg solaris*) 4484d6c0b56eSmrg case $cc_basename in 4485d6c0b56eSmrg CC* | sunCC*) 4486d6c0b56eSmrg # Sun C++ 4.2, 5.x and Centerline C++ 4487d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4488d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4489d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4490d6c0b56eSmrg ;; 4491d6c0b56eSmrg gcx*) 4492d6c0b56eSmrg # Green Hills C++ Compiler 4493d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4494d6c0b56eSmrg ;; 4495d6c0b56eSmrg *) 4496d6c0b56eSmrg ;; 4497d6c0b56eSmrg esac 4498d6c0b56eSmrg ;; 4499d6c0b56eSmrg sunos4*) 4500d6c0b56eSmrg case $cc_basename in 4501d6c0b56eSmrg CC*) 4502d6c0b56eSmrg # Sun C++ 4.x 4503d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4504d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4505d6c0b56eSmrg ;; 4506d6c0b56eSmrg lcc*) 4507d6c0b56eSmrg # Lucid 4508d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4509d6c0b56eSmrg ;; 4510d6c0b56eSmrg *) 4511d6c0b56eSmrg ;; 4512d6c0b56eSmrg esac 4513d6c0b56eSmrg ;; 4514d6c0b56eSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4515d6c0b56eSmrg case $cc_basename in 4516d6c0b56eSmrg CC*) 4517d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4518d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4519d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4520d6c0b56eSmrg ;; 4521d6c0b56eSmrg esac 4522d6c0b56eSmrg ;; 4523d6c0b56eSmrg tandem*) 4524d6c0b56eSmrg case $cc_basename in 4525d6c0b56eSmrg NCC*) 4526d6c0b56eSmrg # NonStop-UX NCC 3.20 4527d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4528d6c0b56eSmrg ;; 4529d6c0b56eSmrg *) 4530d6c0b56eSmrg ;; 4531d6c0b56eSmrg esac 4532d6c0b56eSmrg ;; 4533d6c0b56eSmrg vxworks*) 4534d6c0b56eSmrg ;; 4535d6c0b56eSmrg *) 4536d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4537d6c0b56eSmrg ;; 4538d6c0b56eSmrg esac 4539d6c0b56eSmrg fi 4540d6c0b56eSmrg], 4541d6c0b56eSmrg[ 4542d6c0b56eSmrg if test yes = "$GCC"; then 4543d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4544d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4545d6c0b56eSmrg 4546d6c0b56eSmrg case $host_os in 4547d6c0b56eSmrg aix*) 4548d6c0b56eSmrg # All AIX code is PIC. 4549d6c0b56eSmrg if test ia64 = "$host_cpu"; then 4550d6c0b56eSmrg # AIX 5 now supports IA64 processor 4551d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4552d6c0b56eSmrg fi 4553d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4554d6c0b56eSmrg ;; 4555d6c0b56eSmrg 4556d6c0b56eSmrg amigaos*) 4557d6c0b56eSmrg case $host_cpu in 4558d6c0b56eSmrg powerpc) 4559d6c0b56eSmrg # see comment about AmigaOS4 .so support 4560d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4561d6c0b56eSmrg ;; 4562d6c0b56eSmrg m68k) 4563d6c0b56eSmrg # FIXME: we need at least 68020 code to build shared libraries, but 4564d6c0b56eSmrg # adding the '-m68020' flag to GCC prevents building anything better, 4565d6c0b56eSmrg # like '-m68040'. 4566d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4567d6c0b56eSmrg ;; 4568d6c0b56eSmrg esac 4569d6c0b56eSmrg ;; 4570d6c0b56eSmrg 4571d6c0b56eSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4572d6c0b56eSmrg # PIC is the default for these OSes. 4573d6c0b56eSmrg ;; 4574d6c0b56eSmrg 4575d6c0b56eSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4576d6c0b56eSmrg # This hack is so that the source file can tell whether it is being 4577d6c0b56eSmrg # built for inclusion in a dll (and should export symbols for example). 4578d6c0b56eSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4579d6c0b56eSmrg # (--disable-auto-import) libraries 4580d6c0b56eSmrg m4_if([$1], [GCJ], [], 4581d6c0b56eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4582d6c0b56eSmrg case $host_os in 4583d6c0b56eSmrg os2*) 4584d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4585d6c0b56eSmrg ;; 4586d6c0b56eSmrg esac 4587d6c0b56eSmrg ;; 4588d6c0b56eSmrg 4589d6c0b56eSmrg darwin* | rhapsody*) 4590d6c0b56eSmrg # PIC is the default on this platform 4591d6c0b56eSmrg # Common symbols not allowed in MH_DYLIB files 4592d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4593d6c0b56eSmrg ;; 4594d6c0b56eSmrg 4595d6c0b56eSmrg haiku*) 4596d6c0b56eSmrg # PIC is the default for Haiku. 4597d6c0b56eSmrg # The "-static" flag exists, but is broken. 4598d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4599d6c0b56eSmrg ;; 4600d6c0b56eSmrg 4601d6c0b56eSmrg hpux*) 4602d6c0b56eSmrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4603d6c0b56eSmrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4604d6c0b56eSmrg # sets the default TLS model and affects inlining. 4605d6c0b56eSmrg case $host_cpu in 4606d6c0b56eSmrg hppa*64*) 4607d6c0b56eSmrg # +Z the default 4608d6c0b56eSmrg ;; 4609d6c0b56eSmrg *) 4610d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4611d6c0b56eSmrg ;; 4612d6c0b56eSmrg esac 4613d6c0b56eSmrg ;; 4614d6c0b56eSmrg 4615d6c0b56eSmrg interix[[3-9]]*) 4616d6c0b56eSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4617d6c0b56eSmrg # Instead, we relocate shared libraries at runtime. 4618d6c0b56eSmrg ;; 4619d6c0b56eSmrg 4620d6c0b56eSmrg msdosdjgpp*) 4621d6c0b56eSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4622d6c0b56eSmrg # on systems that don't support them. 4623d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4624d6c0b56eSmrg enable_shared=no 4625d6c0b56eSmrg ;; 4626d6c0b56eSmrg 4627d6c0b56eSmrg *nto* | *qnx*) 4628d6c0b56eSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4629d6c0b56eSmrg # it will coredump. 4630d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4631d6c0b56eSmrg ;; 4632d6c0b56eSmrg 4633d6c0b56eSmrg sysv4*MP*) 4634d6c0b56eSmrg if test -d /usr/nec; then 4635d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4636d6c0b56eSmrg fi 4637d6c0b56eSmrg ;; 4638d6c0b56eSmrg 4639d6c0b56eSmrg *) 4640d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4641d6c0b56eSmrg ;; 4642d6c0b56eSmrg esac 4643d6c0b56eSmrg 4644d6c0b56eSmrg case $cc_basename in 4645d6c0b56eSmrg nvcc*) # Cuda Compiler Driver 2.2 4646d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 4647d6c0b56eSmrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4648d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 4649d6c0b56eSmrg fi 4650d6c0b56eSmrg ;; 4651d6c0b56eSmrg esac 4652d6c0b56eSmrg else 4653d6c0b56eSmrg # PORTME Check for flag to pass linker flags through the system compiler. 4654d6c0b56eSmrg case $host_os in 4655d6c0b56eSmrg aix*) 4656d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4657d6c0b56eSmrg if test ia64 = "$host_cpu"; then 4658d6c0b56eSmrg # AIX 5 now supports IA64 processor 4659d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4660d6c0b56eSmrg else 4661d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4662d6c0b56eSmrg fi 4663d6c0b56eSmrg ;; 4664d6c0b56eSmrg 4665d6c0b56eSmrg darwin* | rhapsody*) 4666d6c0b56eSmrg # PIC is the default on this platform 4667d6c0b56eSmrg # Common symbols not allowed in MH_DYLIB files 4668d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4669d6c0b56eSmrg case $cc_basename in 4670d6c0b56eSmrg nagfor*) 4671d6c0b56eSmrg # NAG Fortran compiler 4672d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4673d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4674d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4675d6c0b56eSmrg ;; 4676d6c0b56eSmrg esac 4677d6c0b56eSmrg ;; 4678d6c0b56eSmrg 4679d6c0b56eSmrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4680d6c0b56eSmrg # This hack is so that the source file can tell whether it is being 4681d6c0b56eSmrg # built for inclusion in a dll (and should export symbols for example). 4682d6c0b56eSmrg m4_if([$1], [GCJ], [], 4683d6c0b56eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4684d6c0b56eSmrg case $host_os in 4685d6c0b56eSmrg os2*) 4686d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 4687d6c0b56eSmrg ;; 4688d6c0b56eSmrg esac 4689d6c0b56eSmrg ;; 4690d6c0b56eSmrg 4691d6c0b56eSmrg hpux9* | hpux10* | hpux11*) 4692d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4693d6c0b56eSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4694d6c0b56eSmrg # not for PA HP-UX. 4695d6c0b56eSmrg case $host_cpu in 4696d6c0b56eSmrg hppa*64*|ia64*) 4697d6c0b56eSmrg # +Z the default 4698d6c0b56eSmrg ;; 4699d6c0b56eSmrg *) 4700d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4701d6c0b56eSmrg ;; 4702d6c0b56eSmrg esac 4703d6c0b56eSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4704d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 4705d6c0b56eSmrg ;; 4706d6c0b56eSmrg 4707d6c0b56eSmrg irix5* | irix6* | nonstopux*) 4708d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4709d6c0b56eSmrg # PIC (with -KPIC) is the default. 4710d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4711d6c0b56eSmrg ;; 4712d6c0b56eSmrg 4713d6c0b56eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 4714d6c0b56eSmrg case $cc_basename in 4715d6c0b56eSmrg # old Intel for x86_64, which still supported -KPIC. 4716d6c0b56eSmrg ecc*) 4717d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4718d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4719d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4720d6c0b56eSmrg ;; 4721d6c0b56eSmrg # icc used to be incompatible with GCC. 4722d6c0b56eSmrg # ICC 10 doesn't accept -KPIC any more. 4723d6c0b56eSmrg icc* | ifort*) 4724d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4725d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4726d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4727d6c0b56eSmrg ;; 4728d6c0b56eSmrg # Lahey Fortran 8.1. 4729d6c0b56eSmrg lf95*) 4730d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4731d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4732d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4733d6c0b56eSmrg ;; 4734d6c0b56eSmrg nagfor*) 4735d6c0b56eSmrg # NAG Fortran compiler 4736d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4737d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4738d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4739d6c0b56eSmrg ;; 4740d6c0b56eSmrg tcc*) 4741d6c0b56eSmrg # Fabrice Bellard et al's Tiny C Compiler 4742d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4743d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4744d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4745d6c0b56eSmrg ;; 4746d6c0b56eSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4747d6c0b56eSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 4748d6c0b56eSmrg # which looks to be a dead project) 4749d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4750d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4751d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4752d6c0b56eSmrg ;; 4753d6c0b56eSmrg ccc*) 4754d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4755d6c0b56eSmrg # All Alpha code is PIC. 4756d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4757d6c0b56eSmrg ;; 4758d6c0b56eSmrg xl* | bgxl* | bgf* | mpixl*) 4759d6c0b56eSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4760d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4761d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4762d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4763d6c0b56eSmrg ;; 4764d6c0b56eSmrg *) 4765d6c0b56eSmrg case `$CC -V 2>&1 | sed 5q` in 4766d6c0b56eSmrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4767d6c0b56eSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4768d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4769d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4770d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4771d6c0b56eSmrg ;; 4772d6c0b56eSmrg *Sun\ F* | *Sun*Fortran*) 4773d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4774d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4775d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4776d6c0b56eSmrg ;; 4777d6c0b56eSmrg *Sun\ C*) 4778d6c0b56eSmrg # Sun C 5.9 4779d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4780d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4781d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4782d6c0b56eSmrg ;; 4783d6c0b56eSmrg *Intel*\ [[CF]]*Compiler*) 4784d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4785d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4786d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4787d6c0b56eSmrg ;; 4788d6c0b56eSmrg *Portland\ Group*) 4789d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4790d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4791d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4792d6c0b56eSmrg ;; 4793d6c0b56eSmrg esac 4794d6c0b56eSmrg ;; 4795d6c0b56eSmrg esac 4796d6c0b56eSmrg ;; 4797d6c0b56eSmrg 4798d6c0b56eSmrg newsos6) 4799d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4800d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4801d6c0b56eSmrg ;; 4802d6c0b56eSmrg 4803d6c0b56eSmrg *nto* | *qnx*) 4804d6c0b56eSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4805d6c0b56eSmrg # it will coredump. 4806d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4807d6c0b56eSmrg ;; 4808d6c0b56eSmrg 4809d6c0b56eSmrg osf3* | osf4* | osf5*) 4810d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4811d6c0b56eSmrg # All OSF/1 code is PIC. 4812d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4813d6c0b56eSmrg ;; 4814d6c0b56eSmrg 4815d6c0b56eSmrg rdos*) 4816d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4817d6c0b56eSmrg ;; 4818d6c0b56eSmrg 4819d6c0b56eSmrg solaris*) 4820d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4821d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4822d6c0b56eSmrg case $cc_basename in 4823d6c0b56eSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4824d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4825d6c0b56eSmrg *) 4826d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4827d6c0b56eSmrg esac 4828d6c0b56eSmrg ;; 4829d6c0b56eSmrg 4830d6c0b56eSmrg sunos4*) 4831d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4832d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4833d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4834d6c0b56eSmrg ;; 4835d6c0b56eSmrg 4836d6c0b56eSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4837d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4838d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4839d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4840d6c0b56eSmrg ;; 4841d6c0b56eSmrg 4842d6c0b56eSmrg sysv4*MP*) 4843d6c0b56eSmrg if test -d /usr/nec; then 4844d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4845d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4846d6c0b56eSmrg fi 4847d6c0b56eSmrg ;; 4848d6c0b56eSmrg 4849d6c0b56eSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4850d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4851d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4852d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4853d6c0b56eSmrg ;; 4854d6c0b56eSmrg 4855d6c0b56eSmrg unicos*) 4856d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4857d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4858d6c0b56eSmrg ;; 4859d6c0b56eSmrg 4860d6c0b56eSmrg uts4*) 4861d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4862d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4863d6c0b56eSmrg ;; 4864d6c0b56eSmrg 4865d6c0b56eSmrg *) 4866d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4867d6c0b56eSmrg ;; 4868d6c0b56eSmrg esac 4869d6c0b56eSmrg fi 4870d6c0b56eSmrg]) 4871d6c0b56eSmrgcase $host_os in 4872d6c0b56eSmrg # For platforms that do not support PIC, -DPIC is meaningless: 4873d6c0b56eSmrg *djgpp*) 4874d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4875d6c0b56eSmrg ;; 4876d6c0b56eSmrg *) 4877d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4878d6c0b56eSmrg ;; 4879d6c0b56eSmrgesac 4880d6c0b56eSmrg 4881d6c0b56eSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4882d6c0b56eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4883d6c0b56eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4884d6c0b56eSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4885d6c0b56eSmrg 4886d6c0b56eSmrg# 4887d6c0b56eSmrg# Check to make sure the PIC flag actually works. 4888d6c0b56eSmrg# 4889d6c0b56eSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4890d6c0b56eSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4891d6c0b56eSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4892d6c0b56eSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4893d6c0b56eSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4894d6c0b56eSmrg "" | " "*) ;; 4895d6c0b56eSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4896d6c0b56eSmrg esac], 4897d6c0b56eSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4898d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4899d6c0b56eSmrgfi 4900d6c0b56eSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4901d6c0b56eSmrg [Additional compiler flags for building library objects]) 4902d6c0b56eSmrg 4903d6c0b56eSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4904d6c0b56eSmrg [How to pass a linker flag through the compiler]) 4905d6c0b56eSmrg# 4906d6c0b56eSmrg# Check to make sure the static flag actually works. 4907d6c0b56eSmrg# 4908d6c0b56eSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4909d6c0b56eSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4910d6c0b56eSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4911d6c0b56eSmrg $lt_tmp_static_flag, 4912d6c0b56eSmrg [], 4913d6c0b56eSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4914d6c0b56eSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4915d6c0b56eSmrg [Compiler flag to prevent dynamic linking]) 4916d6c0b56eSmrg])# _LT_COMPILER_PIC 4917d6c0b56eSmrg 4918d6c0b56eSmrg 4919d6c0b56eSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4920d6c0b56eSmrg# ---------------------------- 4921d6c0b56eSmrg# See if the linker supports building shared libraries. 4922d6c0b56eSmrgm4_defun([_LT_LINKER_SHLIBS], 4923d6c0b56eSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4924d6c0b56eSmrgAC_REQUIRE([LT_PATH_NM])dnl 4925d6c0b56eSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4926d6c0b56eSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4927d6c0b56eSmrgm4_require([_LT_DECL_EGREP])dnl 4928d6c0b56eSmrgm4_require([_LT_DECL_SED])dnl 4929d6c0b56eSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4930d6c0b56eSmrgm4_require([_LT_TAG_COMPILER])dnl 4931d6c0b56eSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4932d6c0b56eSmrgm4_if([$1], [CXX], [ 4933d6c0b56eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4934d6c0b56eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4935d6c0b56eSmrg case $host_os in 4936d6c0b56eSmrg aix[[4-9]]*) 4937d6c0b56eSmrg # If we're using GNU nm, then we don't want the "-C" option. 4938d6c0b56eSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 4939d6c0b56eSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 4940d6c0b56eSmrg # weak defined symbols like other global defined symbols, whereas 4941d6c0b56eSmrg # GNU nm marks them as "W". 4942d6c0b56eSmrg # While the 'weak' keyword is ignored in the Export File, we need 4943d6c0b56eSmrg # it in the Import File for the 'aix-soname' feature, so we have 4944d6c0b56eSmrg # to replace the "-B" option with "-P" for AIX nm. 4945d6c0b56eSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4946d6c0b56eSmrg _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' 4947d6c0b56eSmrg else 4948d6c0b56eSmrg _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' 4949d6c0b56eSmrg fi 4950d6c0b56eSmrg ;; 4951d6c0b56eSmrg pw32*) 4952d6c0b56eSmrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 4953d6c0b56eSmrg ;; 4954d6c0b56eSmrg cygwin* | mingw* | cegcc*) 4955d6c0b56eSmrg case $cc_basename in 4956d6c0b56eSmrg cl*) 4957d6c0b56eSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 4958d6c0b56eSmrg ;; 4959d6c0b56eSmrg *) 4960d6c0b56eSmrg _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' 4961d6c0b56eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4962d6c0b56eSmrg ;; 4963d6c0b56eSmrg esac 4964d6c0b56eSmrg ;; 4965d6c0b56eSmrg linux* | k*bsd*-gnu | gnu*) 4966d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 4967d6c0b56eSmrg ;; 4968d6c0b56eSmrg *) 4969d6c0b56eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4970d6c0b56eSmrg ;; 4971d6c0b56eSmrg esac 4972d6c0b56eSmrg], [ 4973d6c0b56eSmrg runpath_var= 4974d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4975d6c0b56eSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4976d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)= 4977d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4978d6c0b56eSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4979d6c0b56eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4980d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4981d6c0b56eSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4982d6c0b56eSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4983d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4984d6c0b56eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4985d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4986d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4987d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4988d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4989d6c0b56eSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4990d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4991d6c0b56eSmrg _LT_TAGVAR(module_cmds, $1)= 4992d6c0b56eSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4993d6c0b56eSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4994d6c0b56eSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4995d6c0b56eSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4996d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4997d6c0b56eSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4998d6c0b56eSmrg # included in the symbol list 4999d6c0b56eSmrg _LT_TAGVAR(include_expsyms, $1)= 5000d6c0b56eSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 5001d6c0b56eSmrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 5002d6c0b56eSmrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 5003d6c0b56eSmrg # as well as any symbol that contains 'd'. 5004d6c0b56eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 5005d6c0b56eSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 5006d6c0b56eSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 5007d6c0b56eSmrg # the symbol is explicitly referenced. Since portable code cannot 5008d6c0b56eSmrg # rely on this symbol name, it's probably fine to never include it in 5009d6c0b56eSmrg # preloaded symbol tables. 5010d6c0b56eSmrg # Exclude shared library initialization/finalization symbols. 5011d6c0b56eSmrgdnl Note also adjust exclude_expsyms for C++ above. 5012d6c0b56eSmrg extract_expsyms_cmds= 5013d6c0b56eSmrg 5014d6c0b56eSmrg case $host_os in 5015d6c0b56eSmrg cygwin* | mingw* | pw32* | cegcc*) 5016d6c0b56eSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 5017d6c0b56eSmrg # When not using gcc, we currently assume that we are using 5018d6c0b56eSmrg # Microsoft Visual C++. 5019d6c0b56eSmrg if test yes != "$GCC"; then 5020d6c0b56eSmrg with_gnu_ld=no 5021d6c0b56eSmrg fi 5022d6c0b56eSmrg ;; 5023d6c0b56eSmrg interix*) 5024d6c0b56eSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 5025d6c0b56eSmrg with_gnu_ld=yes 5026d6c0b56eSmrg ;; 5027d6c0b56eSmrg openbsd* | bitrig*) 5028d6c0b56eSmrg with_gnu_ld=no 5029d6c0b56eSmrg ;; 5030d6c0b56eSmrg linux* | k*bsd*-gnu | gnu*) 5031d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 5032d6c0b56eSmrg ;; 5033d6c0b56eSmrg esac 5034d6c0b56eSmrg 5035d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5036d6c0b56eSmrg 5037d6c0b56eSmrg # On some targets, GNU ld is compatible enough with the native linker 5038d6c0b56eSmrg # that we're better off using the native interface for both. 5039d6c0b56eSmrg lt_use_gnu_ld_interface=no 5040d6c0b56eSmrg if test yes = "$with_gnu_ld"; then 5041d6c0b56eSmrg case $host_os in 5042d6c0b56eSmrg aix*) 5043d6c0b56eSmrg # The AIX port of GNU ld has always aspired to compatibility 5044d6c0b56eSmrg # with the native linker. However, as the warning in the GNU ld 5045d6c0b56eSmrg # block says, versions before 2.19.5* couldn't really create working 5046d6c0b56eSmrg # shared libraries, regardless of the interface used. 5047d6c0b56eSmrg case `$LD -v 2>&1` in 5048d6c0b56eSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 5049d6c0b56eSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 5050d6c0b56eSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5051d6c0b56eSmrg *) 5052d6c0b56eSmrg lt_use_gnu_ld_interface=yes 5053d6c0b56eSmrg ;; 5054d6c0b56eSmrg esac 5055d6c0b56eSmrg ;; 5056d6c0b56eSmrg *) 5057d6c0b56eSmrg lt_use_gnu_ld_interface=yes 5058d6c0b56eSmrg ;; 5059d6c0b56eSmrg esac 5060d6c0b56eSmrg fi 5061d6c0b56eSmrg 5062d6c0b56eSmrg if test yes = "$lt_use_gnu_ld_interface"; then 5063d6c0b56eSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5064d6c0b56eSmrg wlarc='$wl' 5065d6c0b56eSmrg 5066d6c0b56eSmrg # Set some defaults for GNU ld with shared library support. These 5067d6c0b56eSmrg # are reset later if shared libraries are not supported. Putting them 5068d6c0b56eSmrg # here allows them to be overridden if necessary. 5069d6c0b56eSmrg runpath_var=LD_RUN_PATH 5070d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5071d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 5072d6c0b56eSmrg # ancient GNU ld didn't support --whole-archive et. al. 5073d6c0b56eSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 5074d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 5075d6c0b56eSmrg else 5076d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5077d6c0b56eSmrg fi 5078d6c0b56eSmrg supports_anon_versioning=no 5079d6c0b56eSmrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 5080d6c0b56eSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 5081d6c0b56eSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 5082d6c0b56eSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 5083d6c0b56eSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 5084d6c0b56eSmrg *\ 2.11.*) ;; # other 2.11 versions 5085d6c0b56eSmrg *) supports_anon_versioning=yes ;; 5086d6c0b56eSmrg esac 5087d6c0b56eSmrg 5088d6c0b56eSmrg # See if GNU ld supports shared libraries. 5089d6c0b56eSmrg case $host_os in 5090d6c0b56eSmrg aix[[3-9]]*) 5091d6c0b56eSmrg # On AIX/PPC, the GNU linker is very broken 5092d6c0b56eSmrg if test ia64 != "$host_cpu"; then 5093d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5094d6c0b56eSmrg cat <<_LT_EOF 1>&2 5095d6c0b56eSmrg 5096d6c0b56eSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 5097d6c0b56eSmrg*** to be unable to reliably create shared libraries on AIX. 5098d6c0b56eSmrg*** Therefore, libtool is disabling shared libraries support. If you 5099d6c0b56eSmrg*** really care for shared libraries, you may want to install binutils 5100d6c0b56eSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 5101d6c0b56eSmrg*** You will then need to restart the configuration process. 5102d6c0b56eSmrg 5103d6c0b56eSmrg_LT_EOF 5104d6c0b56eSmrg fi 5105d6c0b56eSmrg ;; 5106d6c0b56eSmrg 5107d6c0b56eSmrg amigaos*) 5108d6c0b56eSmrg case $host_cpu in 5109d6c0b56eSmrg powerpc) 5110d6c0b56eSmrg # see comment about AmigaOS4 .so support 5111d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5112d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5113d6c0b56eSmrg ;; 5114d6c0b56eSmrg m68k) 5115d6c0b56eSmrg _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)' 5116d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5117d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5118d6c0b56eSmrg ;; 5119d6c0b56eSmrg esac 5120d6c0b56eSmrg ;; 5121d6c0b56eSmrg 5122d6c0b56eSmrg beos*) 5123d6c0b56eSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5124d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5125d6c0b56eSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5126d6c0b56eSmrg # support --undefined. This deserves some investigation. FIXME 5127d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5128d6c0b56eSmrg else 5129d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5130d6c0b56eSmrg fi 5131d6c0b56eSmrg ;; 5132d6c0b56eSmrg 5133d6c0b56eSmrg cygwin* | mingw* | pw32* | cegcc*) 5134d6c0b56eSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5135d6c0b56eSmrg # as there is no search path for DLLs. 5136d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5137d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 5138d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5139d6c0b56eSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5140d6c0b56eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5141d6c0b56eSmrg _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' 5142d6c0b56eSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 5143d6c0b56eSmrg 5144d6c0b56eSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5145d6c0b56eSmrg _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' 5146d6c0b56eSmrg # If the export-symbols file already is a .def file, use it as 5147d6c0b56eSmrg # is; otherwise, prepend EXPORTS... 5148d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5149d6c0b56eSmrg cp $export_symbols $output_objdir/$soname.def; 5150d6c0b56eSmrg else 5151d6c0b56eSmrg echo EXPORTS > $output_objdir/$soname.def; 5152d6c0b56eSmrg cat $export_symbols >> $output_objdir/$soname.def; 5153d6c0b56eSmrg fi~ 5154d6c0b56eSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 5155d6c0b56eSmrg else 5156d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5157d6c0b56eSmrg fi 5158d6c0b56eSmrg ;; 5159d6c0b56eSmrg 5160d6c0b56eSmrg haiku*) 5161d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5162d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5163d6c0b56eSmrg ;; 5164d6c0b56eSmrg 5165d6c0b56eSmrg os2*) 5166d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5167d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5168d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5169d6c0b56eSmrg shrext_cmds=.dll 5170d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5171d6c0b56eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5172d6c0b56eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5173d6c0b56eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5174d6c0b56eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5175d6c0b56eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5176d6c0b56eSmrg emximp -o $lib $output_objdir/$libname.def' 5177d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5178d6c0b56eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5179d6c0b56eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5180d6c0b56eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5181d6c0b56eSmrg prefix_cmds="$SED"~ 5182d6c0b56eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5183d6c0b56eSmrg prefix_cmds="$prefix_cmds -e 1d"; 5184d6c0b56eSmrg fi~ 5185d6c0b56eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5186d6c0b56eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5187d6c0b56eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5188d6c0b56eSmrg emximp -o $lib $output_objdir/$libname.def' 5189d6c0b56eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5190d6c0b56eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5191d6c0b56eSmrg ;; 5192d6c0b56eSmrg 5193d6c0b56eSmrg interix[[3-9]]*) 5194d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5195d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5196d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5197d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5198d6c0b56eSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5199d6c0b56eSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5200d6c0b56eSmrg # default) and relocated if they conflict, which is a slow very memory 5201d6c0b56eSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5202d6c0b56eSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5203d6c0b56eSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5204d6c0b56eSmrg _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' 5205d6c0b56eSmrg _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' 5206d6c0b56eSmrg ;; 5207d6c0b56eSmrg 5208d6c0b56eSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 5209d6c0b56eSmrg tmp_diet=no 5210d6c0b56eSmrg if test linux-dietlibc = "$host_os"; then 5211d6c0b56eSmrg case $cc_basename in 5212d6c0b56eSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 5213d6c0b56eSmrg esac 5214d6c0b56eSmrg fi 5215d6c0b56eSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 5216d6c0b56eSmrg && test no = "$tmp_diet" 5217d6c0b56eSmrg then 5218d6c0b56eSmrg tmp_addflag=' $pic_flag' 5219d6c0b56eSmrg tmp_sharedflag='-shared' 5220d6c0b56eSmrg case $cc_basename,$host_cpu in 5221d6c0b56eSmrg pgcc*) # Portland Group C compiler 5222d6c0b56eSmrg _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' 5223d6c0b56eSmrg tmp_addflag=' $pic_flag' 5224d6c0b56eSmrg ;; 5225d6c0b56eSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 5226d6c0b56eSmrg # Portland Group f77 and f90 compilers 5227d6c0b56eSmrg _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' 5228d6c0b56eSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 5229d6c0b56eSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 5230d6c0b56eSmrg tmp_addflag=' -i_dynamic' ;; 5231d6c0b56eSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 5232d6c0b56eSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 5233d6c0b56eSmrg ifc* | ifort*) # Intel Fortran compiler 5234d6c0b56eSmrg tmp_addflag=' -nofor_main' ;; 5235d6c0b56eSmrg lf95*) # Lahey Fortran 8.1 5236d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5237d6c0b56eSmrg tmp_sharedflag='--shared' ;; 5238d6c0b56eSmrg nagfor*) # NAGFOR 5.3 5239d6c0b56eSmrg tmp_sharedflag='-Wl,-shared' ;; 5240d6c0b56eSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 5241d6c0b56eSmrg tmp_sharedflag='-qmkshrobj' 5242d6c0b56eSmrg tmp_addflag= ;; 5243d6c0b56eSmrg nvcc*) # Cuda Compiler Driver 2.2 5244d6c0b56eSmrg _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' 5245d6c0b56eSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5246d6c0b56eSmrg ;; 5247d6c0b56eSmrg esac 5248d6c0b56eSmrg case `$CC -V 2>&1 | sed 5q` in 5249d6c0b56eSmrg *Sun\ C*) # Sun C 5.9 5250d6c0b56eSmrg _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' 5251d6c0b56eSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5252d6c0b56eSmrg tmp_sharedflag='-G' ;; 5253d6c0b56eSmrg *Sun\ F*) # Sun Fortran 8.3 5254d6c0b56eSmrg tmp_sharedflag='-G' ;; 5255d6c0b56eSmrg esac 5256d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5257d6c0b56eSmrg 5258d6c0b56eSmrg if test yes = "$supports_anon_versioning"; then 5259d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5260d6c0b56eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5261d6c0b56eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5262d6c0b56eSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 5263d6c0b56eSmrg fi 5264d6c0b56eSmrg 5265d6c0b56eSmrg case $cc_basename in 5266d6c0b56eSmrg tcc*) 5267d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 5268d6c0b56eSmrg ;; 5269d6c0b56eSmrg xlf* | bgf* | bgxlf* | mpixlf*) 5270d6c0b56eSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 5271d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 5272d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5273d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 5274d6c0b56eSmrg if test yes = "$supports_anon_versioning"; then 5275d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5276d6c0b56eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5277d6c0b56eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5278d6c0b56eSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5279d6c0b56eSmrg fi 5280d6c0b56eSmrg ;; 5281d6c0b56eSmrg esac 5282d6c0b56eSmrg else 5283d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5284d6c0b56eSmrg fi 5285d6c0b56eSmrg ;; 5286d6c0b56eSmrg 5287d6c0b56eSmrg netbsd* | netbsdelf*-gnu) 5288d6c0b56eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5289d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 5290d6c0b56eSmrg wlarc= 5291d6c0b56eSmrg else 5292d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5293d6c0b56eSmrg _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' 5294d6c0b56eSmrg fi 5295d6c0b56eSmrg ;; 5296d6c0b56eSmrg 5297d6c0b56eSmrg solaris*) 5298d6c0b56eSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 5299d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5300d6c0b56eSmrg cat <<_LT_EOF 1>&2 5301d6c0b56eSmrg 5302d6c0b56eSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 5303d6c0b56eSmrg*** create shared libraries on Solaris systems. Therefore, libtool 5304d6c0b56eSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5305d6c0b56eSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 5306d6c0b56eSmrg*** your PATH or compiler configuration so that the native linker is 5307d6c0b56eSmrg*** used, and then restart. 5308d6c0b56eSmrg 5309d6c0b56eSmrg_LT_EOF 5310d6c0b56eSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5311d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5312d6c0b56eSmrg _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' 5313d6c0b56eSmrg else 5314d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5315d6c0b56eSmrg fi 5316d6c0b56eSmrg ;; 5317d6c0b56eSmrg 5318d6c0b56eSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 5319d6c0b56eSmrg case `$LD -v 2>&1` in 5320d6c0b56eSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 5321d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5322d6c0b56eSmrg cat <<_LT_EOF 1>&2 5323d6c0b56eSmrg 5324d6c0b56eSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 5325d6c0b56eSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 5326d6c0b56eSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 5327d6c0b56eSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 5328d6c0b56eSmrg*** your PATH or compiler configuration so that the native linker is 5329d6c0b56eSmrg*** used, and then restart. 5330d6c0b56eSmrg 5331d6c0b56eSmrg_LT_EOF 5332d6c0b56eSmrg ;; 5333d6c0b56eSmrg *) 5334d6c0b56eSmrg # For security reasons, it is highly recommended that you always 5335d6c0b56eSmrg # use absolute paths for naming shared libraries, and exclude the 5336d6c0b56eSmrg # DT_RUNPATH tag from executables and libraries. But doing so 5337d6c0b56eSmrg # requires that you compile everything twice, which is a pain. 5338d6c0b56eSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5339d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5340d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5341d6c0b56eSmrg _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' 5342d6c0b56eSmrg else 5343d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5344d6c0b56eSmrg fi 5345d6c0b56eSmrg ;; 5346d6c0b56eSmrg esac 5347d6c0b56eSmrg ;; 5348d6c0b56eSmrg 5349d6c0b56eSmrg sunos4*) 5350d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5351d6c0b56eSmrg wlarc= 5352d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5353d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5354d6c0b56eSmrg ;; 5355d6c0b56eSmrg 5356d6c0b56eSmrg *) 5357d6c0b56eSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5358d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5359d6c0b56eSmrg _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' 5360d6c0b56eSmrg else 5361d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5362d6c0b56eSmrg fi 5363d6c0b56eSmrg ;; 5364d6c0b56eSmrg esac 5365d6c0b56eSmrg 5366d6c0b56eSmrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 5367d6c0b56eSmrg runpath_var= 5368d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5369d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 5370d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5371d6c0b56eSmrg fi 5372d6c0b56eSmrg else 5373d6c0b56eSmrg # PORTME fill in a description of your system's linker (not GNU ld) 5374d6c0b56eSmrg case $host_os in 5375d6c0b56eSmrg aix3*) 5376d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5377d6c0b56eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5378d6c0b56eSmrg _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' 5379d6c0b56eSmrg # Note: this linker hardcodes the directories in LIBPATH if there 5380d6c0b56eSmrg # are no directories specified by -L. 5381d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5382d6c0b56eSmrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 5383d6c0b56eSmrg # Neither direct hardcoding nor static linking is supported with a 5384d6c0b56eSmrg # broken collect2. 5385d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5386d6c0b56eSmrg fi 5387d6c0b56eSmrg ;; 5388d6c0b56eSmrg 5389d6c0b56eSmrg aix[[4-9]]*) 5390d6c0b56eSmrg if test ia64 = "$host_cpu"; then 5391d6c0b56eSmrg # On IA64, the linker does run time linking by default, so we don't 5392d6c0b56eSmrg # have to do anything special. 5393d6c0b56eSmrg aix_use_runtimelinking=no 5394d6c0b56eSmrg exp_sym_flag='-Bexport' 5395d6c0b56eSmrg no_entry_flag= 5396d6c0b56eSmrg else 5397d6c0b56eSmrg # If we're using GNU nm, then we don't want the "-C" option. 5398d6c0b56eSmrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 5399d6c0b56eSmrg # Without the "-l" option, or with the "-B" option, AIX nm treats 5400d6c0b56eSmrg # weak defined symbols like other global defined symbols, whereas 5401d6c0b56eSmrg # GNU nm marks them as "W". 5402d6c0b56eSmrg # While the 'weak' keyword is ignored in the Export File, we need 5403d6c0b56eSmrg # it in the Import File for the 'aix-soname' feature, so we have 5404d6c0b56eSmrg # to replace the "-B" option with "-P" for AIX nm. 5405d6c0b56eSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 5406d6c0b56eSmrg _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' 5407d6c0b56eSmrg else 5408d6c0b56eSmrg _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' 5409d6c0b56eSmrg fi 5410d6c0b56eSmrg aix_use_runtimelinking=no 5411d6c0b56eSmrg 5412d6c0b56eSmrg # Test if we are trying to use run time linking or normal 5413d6c0b56eSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5414d6c0b56eSmrg # have runtime linking enabled, and use it for executables. 5415d6c0b56eSmrg # For shared libraries, we enable/disable runtime linking 5416d6c0b56eSmrg # depending on the kind of the shared library created - 5417d6c0b56eSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 5418d6c0b56eSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 5419d6c0b56eSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 5420d6c0b56eSmrg # lib.a static archive 5421d6c0b56eSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 5422d6c0b56eSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 5423d6c0b56eSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 5424d6c0b56eSmrg # lib.a(lib.so.V) shared, rtl:no 5425d6c0b56eSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 5426d6c0b56eSmrg # lib.a static archive 5427d6c0b56eSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5428d6c0b56eSmrg for ld_flag in $LDFLAGS; do 5429d6c0b56eSmrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 5430d6c0b56eSmrg aix_use_runtimelinking=yes 5431d6c0b56eSmrg break 5432d6c0b56eSmrg fi 5433d6c0b56eSmrg done 5434d6c0b56eSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 5435d6c0b56eSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 5436d6c0b56eSmrg # so we don't have lib.a shared libs to link our executables. 5437d6c0b56eSmrg # We have to force runtime linking in this case. 5438d6c0b56eSmrg aix_use_runtimelinking=yes 5439d6c0b56eSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 5440d6c0b56eSmrg fi 5441d6c0b56eSmrg ;; 5442d6c0b56eSmrg esac 5443d6c0b56eSmrg 5444d6c0b56eSmrg exp_sym_flag='-bexport' 5445d6c0b56eSmrg no_entry_flag='-bnoentry' 5446d6c0b56eSmrg fi 5447d6c0b56eSmrg 5448d6c0b56eSmrg # When large executables or shared objects are built, AIX ld can 5449d6c0b56eSmrg # have problems creating the table of contents. If linking a library 5450d6c0b56eSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5451d6c0b56eSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5452d6c0b56eSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5453d6c0b56eSmrg 5454d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='' 5455d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5456d6c0b56eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5457d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5458d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5459d6c0b56eSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 5460d6c0b56eSmrg case $with_aix_soname,$aix_use_runtimelinking in 5461d6c0b56eSmrg aix,*) ;; # traditional, no import file 5462d6c0b56eSmrg svr4,* | *,yes) # use import file 5463d6c0b56eSmrg # The Import File defines what to hardcode. 5464d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5465d6c0b56eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 5466d6c0b56eSmrg ;; 5467d6c0b56eSmrg esac 5468d6c0b56eSmrg 5469d6c0b56eSmrg if test yes = "$GCC"; then 5470d6c0b56eSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5471d6c0b56eSmrg # We only want to do this on AIX 4.2 and lower, the check 5472d6c0b56eSmrg # below for broken collect2 doesn't work under 4.3+ 5473d6c0b56eSmrg collect2name=`$CC -print-prog-name=collect2` 5474d6c0b56eSmrg if test -f "$collect2name" && 5475d6c0b56eSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5476d6c0b56eSmrg then 5477d6c0b56eSmrg # We have reworked collect2 5478d6c0b56eSmrg : 5479d6c0b56eSmrg else 5480d6c0b56eSmrg # We have old collect2 5481d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5482d6c0b56eSmrg # It fails to find uninstalled libraries when the uninstalled 5483d6c0b56eSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5484d6c0b56eSmrg # to unsupported forces relinking 5485d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5486d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5487d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5488d6c0b56eSmrg fi 5489d6c0b56eSmrg ;; 5490d6c0b56eSmrg esac 5491d6c0b56eSmrg shared_flag='-shared' 5492d6c0b56eSmrg if test yes = "$aix_use_runtimelinking"; then 5493d6c0b56eSmrg shared_flag="$shared_flag "'$wl-G' 5494d6c0b56eSmrg fi 5495d6c0b56eSmrg # Need to ensure runtime linking is disabled for the traditional 5496d6c0b56eSmrg # shared library, or the linker may eventually find shared libraries 5497d6c0b56eSmrg # /with/ Import File - we do not want to mix them. 5498d6c0b56eSmrg shared_flag_aix='-shared' 5499d6c0b56eSmrg shared_flag_svr4='-shared $wl-G' 5500d6c0b56eSmrg else 5501d6c0b56eSmrg # not using gcc 5502d6c0b56eSmrg if test ia64 = "$host_cpu"; then 5503d6c0b56eSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5504d6c0b56eSmrg # chokes on -Wl,-G. The following line is correct: 5505d6c0b56eSmrg shared_flag='-G' 5506d6c0b56eSmrg else 5507d6c0b56eSmrg if test yes = "$aix_use_runtimelinking"; then 5508d6c0b56eSmrg shared_flag='$wl-G' 5509d6c0b56eSmrg else 5510d6c0b56eSmrg shared_flag='$wl-bM:SRE' 5511d6c0b56eSmrg fi 5512d6c0b56eSmrg shared_flag_aix='$wl-bM:SRE' 5513d6c0b56eSmrg shared_flag_svr4='$wl-G' 5514d6c0b56eSmrg fi 5515d6c0b56eSmrg fi 5516d6c0b56eSmrg 5517d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 5518d6c0b56eSmrg # It seems that -bexpall does not export symbols beginning with 5519d6c0b56eSmrg # underscore (_), so it is better to generate a list of symbols to export. 5520d6c0b56eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5521d6c0b56eSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 5522d6c0b56eSmrg # Warning - without using the other runtime loading flags (-brtl), 5523d6c0b56eSmrg # -berok will link without error, but may produce a broken library. 5524d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5525d6c0b56eSmrg # Determine the default libpath from the value encoded in an 5526d6c0b56eSmrg # empty executable. 5527d6c0b56eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5528d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5529d6c0b56eSmrg _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 5530d6c0b56eSmrg else 5531d6c0b56eSmrg if test ia64 = "$host_cpu"; then 5532d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 5533d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5534d6c0b56eSmrg _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" 5535d6c0b56eSmrg else 5536d6c0b56eSmrg # Determine the default libpath from the value encoded in an 5537d6c0b56eSmrg # empty executable. 5538d6c0b56eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5539d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 5540d6c0b56eSmrg # Warning - without using the other run time loading flags, 5541d6c0b56eSmrg # -berok will link without error, but may produce a broken library. 5542d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 5543d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 5544d6c0b56eSmrg if test yes = "$with_gnu_ld"; then 5545d6c0b56eSmrg # We only use this code for GNU lds that support --whole-archive. 5546d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 5547d6c0b56eSmrg else 5548d6c0b56eSmrg # Exported symbols can be pulled into shared objects from archives 5549d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5550d6c0b56eSmrg fi 5551d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5552d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 5553d6c0b56eSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 5554d6c0b56eSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 5555d6c0b56eSmrg if test svr4 != "$with_aix_soname"; then 5556d6c0b56eSmrg # This is similar to how AIX traditionally builds its shared libraries. 5557d6c0b56eSmrg _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' 5558d6c0b56eSmrg fi 5559d6c0b56eSmrg if test aix != "$with_aix_soname"; then 5560d6c0b56eSmrg _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' 5561d6c0b56eSmrg else 5562d6c0b56eSmrg # used by -dlpreopen to get the symbols 5563d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 5564d6c0b56eSmrg fi 5565d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 5566d6c0b56eSmrg fi 5567d6c0b56eSmrg fi 5568d6c0b56eSmrg ;; 5569d6c0b56eSmrg 5570d6c0b56eSmrg amigaos*) 5571d6c0b56eSmrg case $host_cpu in 5572d6c0b56eSmrg powerpc) 5573d6c0b56eSmrg # see comment about AmigaOS4 .so support 5574d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5575d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5576d6c0b56eSmrg ;; 5577d6c0b56eSmrg m68k) 5578d6c0b56eSmrg _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)' 5579d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5580d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5581d6c0b56eSmrg ;; 5582d6c0b56eSmrg esac 5583d6c0b56eSmrg ;; 5584d6c0b56eSmrg 5585d6c0b56eSmrg bsdi[[45]]*) 5586d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5587d6c0b56eSmrg ;; 5588d6c0b56eSmrg 5589d6c0b56eSmrg cygwin* | mingw* | pw32* | cegcc*) 5590d6c0b56eSmrg # When not using gcc, we currently assume that we are using 5591d6c0b56eSmrg # Microsoft Visual C++. 5592d6c0b56eSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5593d6c0b56eSmrg # no search path for DLLs. 5594d6c0b56eSmrg case $cc_basename in 5595d6c0b56eSmrg cl*) 5596d6c0b56eSmrg # Native MSVC 5597d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5598d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5599d6c0b56eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5600d6c0b56eSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5601d6c0b56eSmrg # Tell ltmain to make .lib files, not .a files. 5602d6c0b56eSmrg libext=lib 5603d6c0b56eSmrg # Tell ltmain to make .dll files, not .so files. 5604d6c0b56eSmrg shrext_cmds=.dll 5605d6c0b56eSmrg # FIXME: Setting linknames here is a bad hack. 5606d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 5607d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 5608d6c0b56eSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 5609d6c0b56eSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 5610d6c0b56eSmrg else 5611d6c0b56eSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 5612d6c0b56eSmrg fi~ 5613d6c0b56eSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5614d6c0b56eSmrg linknames=' 5615d6c0b56eSmrg # The linker will not automatically build a static lib if we build a DLL. 5616d6c0b56eSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5617d6c0b56eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5618d6c0b56eSmrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5619d6c0b56eSmrg _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' 5620d6c0b56eSmrg # Don't use ranlib 5621d6c0b56eSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5622d6c0b56eSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5623d6c0b56eSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5624d6c0b56eSmrg case $lt_outputfile in 5625d6c0b56eSmrg *.exe|*.EXE) ;; 5626d6c0b56eSmrg *) 5627d6c0b56eSmrg lt_outputfile=$lt_outputfile.exe 5628d6c0b56eSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 5629d6c0b56eSmrg ;; 5630d6c0b56eSmrg esac~ 5631d6c0b56eSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 5632d6c0b56eSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5633d6c0b56eSmrg $RM "$lt_outputfile.manifest"; 5634d6c0b56eSmrg fi' 5635d6c0b56eSmrg ;; 5636d6c0b56eSmrg *) 5637d6c0b56eSmrg # Assume MSVC wrapper 5638d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5639d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5640d6c0b56eSmrg # Tell ltmain to make .lib files, not .a files. 5641d6c0b56eSmrg libext=lib 5642d6c0b56eSmrg # Tell ltmain to make .dll files, not .so files. 5643d6c0b56eSmrg shrext_cmds=.dll 5644d6c0b56eSmrg # FIXME: Setting linknames here is a bad hack. 5645d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5646d6c0b56eSmrg # The linker will automatically build a .lib file if we build a DLL. 5647d6c0b56eSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5648d6c0b56eSmrg # FIXME: Should let the user specify the lib program. 5649d6c0b56eSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5650d6c0b56eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5651d6c0b56eSmrg ;; 5652d6c0b56eSmrg esac 5653d6c0b56eSmrg ;; 5654d6c0b56eSmrg 5655d6c0b56eSmrg darwin* | rhapsody*) 5656d6c0b56eSmrg _LT_DARWIN_LINKER_FEATURES($1) 5657d6c0b56eSmrg ;; 5658d6c0b56eSmrg 5659d6c0b56eSmrg dgux*) 5660d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5661d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5662d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5663d6c0b56eSmrg ;; 5664d6c0b56eSmrg 5665d6c0b56eSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5666d6c0b56eSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 5667d6c0b56eSmrg # does not break anything, and helps significantly (at the cost of a little 5668d6c0b56eSmrg # extra space). 5669d6c0b56eSmrg freebsd2.2*) 5670d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5671d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5672d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5673d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5674d6c0b56eSmrg ;; 5675d6c0b56eSmrg 5676d6c0b56eSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 5677d6c0b56eSmrg freebsd2.*) 5678d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5679d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5680d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5681d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5682d6c0b56eSmrg ;; 5683d6c0b56eSmrg 5684d6c0b56eSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5685d6c0b56eSmrg freebsd* | dragonfly*) 5686d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5687d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5688d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5689d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5690d6c0b56eSmrg ;; 5691d6c0b56eSmrg 5692d6c0b56eSmrg hpux9*) 5693d6c0b56eSmrg if test yes = "$GCC"; then 5694d6c0b56eSmrg _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' 5695d6c0b56eSmrg else 5696d6c0b56eSmrg _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' 5697d6c0b56eSmrg fi 5698d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5699d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5700d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5701d6c0b56eSmrg 5702d6c0b56eSmrg # hardcode_minus_L: Not really in the search PATH, 5703d6c0b56eSmrg # but as the default location of the library. 5704d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5705d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5706d6c0b56eSmrg ;; 5707d6c0b56eSmrg 5708d6c0b56eSmrg hpux10*) 5709d6c0b56eSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5710d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5711d6c0b56eSmrg else 5712d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5713d6c0b56eSmrg fi 5714d6c0b56eSmrg if test no = "$with_gnu_ld"; then 5715d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5716d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5717d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5718d6c0b56eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5719d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5720d6c0b56eSmrg # hardcode_minus_L: Not really in the search PATH, 5721d6c0b56eSmrg # but as the default location of the library. 5722d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5723d6c0b56eSmrg fi 5724d6c0b56eSmrg ;; 5725d6c0b56eSmrg 5726d6c0b56eSmrg hpux11*) 5727d6c0b56eSmrg if test yes,no = "$GCC,$with_gnu_ld"; then 5728d6c0b56eSmrg case $host_cpu in 5729d6c0b56eSmrg hppa*64*) 5730d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5731d6c0b56eSmrg ;; 5732d6c0b56eSmrg ia64*) 5733d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5734d6c0b56eSmrg ;; 5735d6c0b56eSmrg *) 5736d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5737d6c0b56eSmrg ;; 5738d6c0b56eSmrg esac 5739d6c0b56eSmrg else 5740d6c0b56eSmrg case $host_cpu in 5741d6c0b56eSmrg hppa*64*) 5742d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5743d6c0b56eSmrg ;; 5744d6c0b56eSmrg ia64*) 5745d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5746d6c0b56eSmrg ;; 5747d6c0b56eSmrg *) 5748d6c0b56eSmrg m4_if($1, [], [ 5749d6c0b56eSmrg # Older versions of the 11.00 compiler do not understand -b yet 5750d6c0b56eSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5751d6c0b56eSmrg _LT_LINKER_OPTION([if $CC understands -b], 5752d6c0b56eSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5753d6c0b56eSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5754d6c0b56eSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5755d6c0b56eSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5756d6c0b56eSmrg ;; 5757d6c0b56eSmrg esac 5758d6c0b56eSmrg fi 5759d6c0b56eSmrg if test no = "$with_gnu_ld"; then 5760d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 5761d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5762d6c0b56eSmrg 5763d6c0b56eSmrg case $host_cpu in 5764d6c0b56eSmrg hppa*64*|ia64*) 5765d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5766d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5767d6c0b56eSmrg ;; 5768d6c0b56eSmrg *) 5769d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5770d6c0b56eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5771d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5772d6c0b56eSmrg 5773d6c0b56eSmrg # hardcode_minus_L: Not really in the search PATH, 5774d6c0b56eSmrg # but as the default location of the library. 5775d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5776d6c0b56eSmrg ;; 5777d6c0b56eSmrg esac 5778d6c0b56eSmrg fi 5779d6c0b56eSmrg ;; 5780d6c0b56eSmrg 5781d6c0b56eSmrg irix5* | irix6* | nonstopux*) 5782d6c0b56eSmrg if test yes = "$GCC"; then 5783d6c0b56eSmrg _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' 5784d6c0b56eSmrg # Try to use the -exported_symbol ld option, if it does not 5785d6c0b56eSmrg # work, assume that -exports_file does not work either and 5786d6c0b56eSmrg # implicitly export all symbols. 5787d6c0b56eSmrg # This should be the same for all languages, so no per-tag cache variable. 5788d6c0b56eSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5789d6c0b56eSmrg [lt_cv_irix_exported_symbol], 5790d6c0b56eSmrg [save_LDFLAGS=$LDFLAGS 5791d6c0b56eSmrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 5792d6c0b56eSmrg AC_LINK_IFELSE( 5793d6c0b56eSmrg [AC_LANG_SOURCE( 5794d6c0b56eSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5795d6c0b56eSmrg [C++], [[int foo (void) { return 0; }]], 5796d6c0b56eSmrg [Fortran 77], [[ 5797d6c0b56eSmrg subroutine foo 5798d6c0b56eSmrg end]], 5799d6c0b56eSmrg [Fortran], [[ 5800d6c0b56eSmrg subroutine foo 5801d6c0b56eSmrg end]])])], 5802d6c0b56eSmrg [lt_cv_irix_exported_symbol=yes], 5803d6c0b56eSmrg [lt_cv_irix_exported_symbol=no]) 5804d6c0b56eSmrg LDFLAGS=$save_LDFLAGS]) 5805d6c0b56eSmrg if test yes = "$lt_cv_irix_exported_symbol"; then 5806d6c0b56eSmrg _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' 5807d6c0b56eSmrg fi 5808d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 5809d6c0b56eSmrg else 5810d6c0b56eSmrg _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' 5811d6c0b56eSmrg _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' 5812d6c0b56eSmrg fi 5813d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5814d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5815d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5816d6c0b56eSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5817d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5818d6c0b56eSmrg ;; 5819d6c0b56eSmrg 5820d6c0b56eSmrg linux*) 5821d6c0b56eSmrg case $cc_basename in 5822d6c0b56eSmrg tcc*) 5823d6c0b56eSmrg # Fabrice Bellard et al's Tiny C Compiler 5824d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5825d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5826d6c0b56eSmrg ;; 5827d6c0b56eSmrg esac 5828d6c0b56eSmrg ;; 5829d6c0b56eSmrg 5830d6c0b56eSmrg netbsd* | netbsdelf*-gnu) 5831d6c0b56eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5832d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5833d6c0b56eSmrg else 5834d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5835d6c0b56eSmrg fi 5836d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5837d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5838d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5839d6c0b56eSmrg ;; 5840d6c0b56eSmrg 5841d6c0b56eSmrg newsos6) 5842d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5843d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5844d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5845d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5846d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5847d6c0b56eSmrg ;; 5848d6c0b56eSmrg 5849d6c0b56eSmrg *nto* | *qnx*) 5850d6c0b56eSmrg ;; 5851d6c0b56eSmrg 5852d6c0b56eSmrg openbsd* | bitrig*) 5853d6c0b56eSmrg if test -f /usr/libexec/ld.so; then 5854d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5855d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5856d6c0b56eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5857d6c0b56eSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 5858d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5859d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 5860d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5861d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 5862d6c0b56eSmrg else 5863d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5864d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 5865d6c0b56eSmrg fi 5866d6c0b56eSmrg else 5867d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5868d6c0b56eSmrg fi 5869d6c0b56eSmrg ;; 5870d6c0b56eSmrg 5871d6c0b56eSmrg os2*) 5872d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5873d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5874d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5875d6c0b56eSmrg shrext_cmds=.dll 5876d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5877d6c0b56eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5878d6c0b56eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5879d6c0b56eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5880d6c0b56eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 5881d6c0b56eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5882d6c0b56eSmrg emximp -o $lib $output_objdir/$libname.def' 5883d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 5884d6c0b56eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 5885d6c0b56eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 5886d6c0b56eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 5887d6c0b56eSmrg prefix_cmds="$SED"~ 5888d6c0b56eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 5889d6c0b56eSmrg prefix_cmds="$prefix_cmds -e 1d"; 5890d6c0b56eSmrg fi~ 5891d6c0b56eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 5892d6c0b56eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 5893d6c0b56eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 5894d6c0b56eSmrg emximp -o $lib $output_objdir/$libname.def' 5895d6c0b56eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 5896d6c0b56eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5897d6c0b56eSmrg ;; 5898d6c0b56eSmrg 5899d6c0b56eSmrg osf3*) 5900d6c0b56eSmrg if test yes = "$GCC"; then 5901d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5902d6c0b56eSmrg _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' 5903d6c0b56eSmrg else 5904d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5905d6c0b56eSmrg _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' 5906d6c0b56eSmrg fi 5907d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5908d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5909d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5910d6c0b56eSmrg ;; 5911d6c0b56eSmrg 5912d6c0b56eSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5913d6c0b56eSmrg if test yes = "$GCC"; then 5914d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 5915d6c0b56eSmrg _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' 5916d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 5917d6c0b56eSmrg else 5918d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5919d6c0b56eSmrg _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' 5920d6c0b56eSmrg _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~ 5921d6c0b56eSmrg $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' 5922d6c0b56eSmrg 5923d6c0b56eSmrg # Both c and cxx compiler support -rpath directly 5924d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5925d6c0b56eSmrg fi 5926d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5927d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5928d6c0b56eSmrg ;; 5929d6c0b56eSmrg 5930d6c0b56eSmrg solaris*) 5931d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5932d6c0b56eSmrg if test yes = "$GCC"; then 5933d6c0b56eSmrg wlarc='$wl' 5934d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 5935d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5936d6c0b56eSmrg $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' 5937d6c0b56eSmrg else 5938d6c0b56eSmrg case `$CC -V 2>&1` in 5939d6c0b56eSmrg *"Compilers 5.0"*) 5940d6c0b56eSmrg wlarc='' 5941d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 5942d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5943d6c0b56eSmrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5944d6c0b56eSmrg ;; 5945d6c0b56eSmrg *) 5946d6c0b56eSmrg wlarc='$wl' 5947d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5948d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5949d6c0b56eSmrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5950d6c0b56eSmrg ;; 5951d6c0b56eSmrg esac 5952d6c0b56eSmrg fi 5953d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5954d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5955d6c0b56eSmrg case $host_os in 5956d6c0b56eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5957d6c0b56eSmrg *) 5958d6c0b56eSmrg # The compiler driver will combine and reorder linker options, 5959d6c0b56eSmrg # but understands '-z linker_flag'. GCC discards it without '$wl', 5960d6c0b56eSmrg # but is careful enough not to reorder. 5961d6c0b56eSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5962d6c0b56eSmrg if test yes = "$GCC"; then 5963d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 5964d6c0b56eSmrg else 5965d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5966d6c0b56eSmrg fi 5967d6c0b56eSmrg ;; 5968d6c0b56eSmrg esac 5969d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5970d6c0b56eSmrg ;; 5971d6c0b56eSmrg 5972d6c0b56eSmrg sunos4*) 5973d6c0b56eSmrg if test sequent = "$host_vendor"; then 5974d6c0b56eSmrg # Use $CC to link under sequent, because it throws in some extra .o 5975d6c0b56eSmrg # files that make .init and .fini sections work. 5976d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5977d6c0b56eSmrg else 5978d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5979d6c0b56eSmrg fi 5980d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5981d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5982d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5983d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5984d6c0b56eSmrg ;; 5985d6c0b56eSmrg 5986d6c0b56eSmrg sysv4) 5987d6c0b56eSmrg case $host_vendor in 5988d6c0b56eSmrg sni) 5989d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5990d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5991d6c0b56eSmrg ;; 5992d6c0b56eSmrg siemens) 5993d6c0b56eSmrg ## LD is ld it makes a PLAMLIB 5994d6c0b56eSmrg ## CC just makes a GrossModule. 5995d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5996d6c0b56eSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5997d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5998d6c0b56eSmrg ;; 5999d6c0b56eSmrg motorola) 6000d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6001d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 6002d6c0b56eSmrg ;; 6003d6c0b56eSmrg esac 6004d6c0b56eSmrg runpath_var='LD_RUN_PATH' 6005d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6006d6c0b56eSmrg ;; 6007d6c0b56eSmrg 6008d6c0b56eSmrg sysv4.3*) 6009d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6010d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6011d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 6012d6c0b56eSmrg ;; 6013d6c0b56eSmrg 6014d6c0b56eSmrg sysv4*MP*) 6015d6c0b56eSmrg if test -d /usr/nec; then 6016d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6017d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6018d6c0b56eSmrg runpath_var=LD_RUN_PATH 6019d6c0b56eSmrg hardcode_runpath_var=yes 6020d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6021d6c0b56eSmrg fi 6022d6c0b56eSmrg ;; 6023d6c0b56eSmrg 6024d6c0b56eSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6025d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6026d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6027d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6028d6c0b56eSmrg runpath_var='LD_RUN_PATH' 6029d6c0b56eSmrg 6030d6c0b56eSmrg if test yes = "$GCC"; then 6031d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6032d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6033d6c0b56eSmrg else 6034d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6035d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6036d6c0b56eSmrg fi 6037d6c0b56eSmrg ;; 6038d6c0b56eSmrg 6039d6c0b56eSmrg sysv5* | sco3.2v5* | sco5v6*) 6040d6c0b56eSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 6041d6c0b56eSmrg # link with -lc, and that would cause any symbols used from libc to 6042d6c0b56eSmrg # always be unresolved, which means just about no library would 6043d6c0b56eSmrg # ever link correctly. If we're not using GNU ld we use -z text 6044d6c0b56eSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6045d6c0b56eSmrg # as -z defs. 6046d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 6047d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 6048d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6049d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6050d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 6051d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6052d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6053d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 6054d6c0b56eSmrg runpath_var='LD_RUN_PATH' 6055d6c0b56eSmrg 6056d6c0b56eSmrg if test yes = "$GCC"; then 6057d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6058d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6059d6c0b56eSmrg else 6060d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6061d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6062d6c0b56eSmrg fi 6063d6c0b56eSmrg ;; 6064d6c0b56eSmrg 6065d6c0b56eSmrg uts4*) 6066d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 6067d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6068d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6069d6c0b56eSmrg ;; 6070d6c0b56eSmrg 6071d6c0b56eSmrg *) 6072d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6073d6c0b56eSmrg ;; 6074d6c0b56eSmrg esac 6075d6c0b56eSmrg 6076d6c0b56eSmrg if test sni = "$host_vendor"; then 6077d6c0b56eSmrg case $host in 6078d6c0b56eSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 6079d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 6080d6c0b56eSmrg ;; 6081d6c0b56eSmrg esac 6082d6c0b56eSmrg fi 6083d6c0b56eSmrg fi 6084d6c0b56eSmrg]) 6085d6c0b56eSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6086d6c0b56eSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6087d6c0b56eSmrg 6088d6c0b56eSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 6089d6c0b56eSmrg 6090d6c0b56eSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 6091d6c0b56eSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 6092d6c0b56eSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 6093d6c0b56eSmrg [The commands to extract the exported symbol list from a shared archive]) 6094d6c0b56eSmrg 6095d6c0b56eSmrg# 6096d6c0b56eSmrg# Do we need to explicitly link libc? 6097d6c0b56eSmrg# 6098d6c0b56eSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 6099d6c0b56eSmrgx|xyes) 6100d6c0b56eSmrg # Assume -lc should be added 6101d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6102d6c0b56eSmrg 6103d6c0b56eSmrg if test yes,yes = "$GCC,$enable_shared"; then 6104d6c0b56eSmrg case $_LT_TAGVAR(archive_cmds, $1) in 6105d6c0b56eSmrg *'~'*) 6106d6c0b56eSmrg # FIXME: we may have to deal with multi-command sequences. 6107d6c0b56eSmrg ;; 6108d6c0b56eSmrg '$CC '*) 6109d6c0b56eSmrg # Test whether the compiler implicitly links with -lc since on some 6110d6c0b56eSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 6111d6c0b56eSmrg # to ld, don't add -lc before -lgcc. 6112d6c0b56eSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 6113d6c0b56eSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 6114d6c0b56eSmrg [$RM conftest* 6115d6c0b56eSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 6116d6c0b56eSmrg 6117d6c0b56eSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 6118d6c0b56eSmrg soname=conftest 6119d6c0b56eSmrg lib=conftest 6120d6c0b56eSmrg libobjs=conftest.$ac_objext 6121d6c0b56eSmrg deplibs= 6122d6c0b56eSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 6123d6c0b56eSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 6124d6c0b56eSmrg compiler_flags=-v 6125d6c0b56eSmrg linker_flags=-v 6126d6c0b56eSmrg verstring= 6127d6c0b56eSmrg output_objdir=. 6128d6c0b56eSmrg libname=conftest 6129d6c0b56eSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 6130d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 6131d6c0b56eSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 6132d6c0b56eSmrg then 6133d6c0b56eSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6134d6c0b56eSmrg else 6135d6c0b56eSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6136d6c0b56eSmrg fi 6137d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 6138d6c0b56eSmrg else 6139d6c0b56eSmrg cat conftest.err 1>&5 6140d6c0b56eSmrg fi 6141d6c0b56eSmrg $RM conftest* 6142d6c0b56eSmrg ]) 6143d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 6144d6c0b56eSmrg ;; 6145d6c0b56eSmrg esac 6146d6c0b56eSmrg fi 6147d6c0b56eSmrg ;; 6148d6c0b56eSmrgesac 6149d6c0b56eSmrg 6150d6c0b56eSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 6151d6c0b56eSmrg [Whether or not to add -lc for building shared libraries]) 6152d6c0b56eSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 6153d6c0b56eSmrg [enable_shared_with_static_runtimes], [0], 6154d6c0b56eSmrg [Whether or not to disallow shared libs when runtime libs are static]) 6155d6c0b56eSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 6156d6c0b56eSmrg [Compiler flag to allow reflexive dlopens]) 6157d6c0b56eSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 6158d6c0b56eSmrg [Compiler flag to generate shared objects directly from archives]) 6159d6c0b56eSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 6160d6c0b56eSmrg [Whether the compiler copes with passing no objects directly]) 6161d6c0b56eSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 6162d6c0b56eSmrg [Create an old-style archive from a shared archive]) 6163d6c0b56eSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 6164d6c0b56eSmrg [Create a temporary old-style archive to link instead of a shared archive]) 6165d6c0b56eSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 6166d6c0b56eSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 6167d6c0b56eSmrg_LT_TAGDECL([], [module_cmds], [2], 6168d6c0b56eSmrg [Commands used to build a loadable module if different from building 6169d6c0b56eSmrg a shared archive.]) 6170d6c0b56eSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 6171d6c0b56eSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 6172d6c0b56eSmrg [Whether we are building with GNU ld or not]) 6173d6c0b56eSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 6174d6c0b56eSmrg [Flag that allows shared libraries with undefined symbols to be built]) 6175d6c0b56eSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 6176d6c0b56eSmrg [Flag that enforces no undefined symbols]) 6177d6c0b56eSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 6178d6c0b56eSmrg [Flag to hardcode $libdir into a binary during linking. 6179d6c0b56eSmrg This must work even if $libdir does not exist]) 6180d6c0b56eSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 6181d6c0b56eSmrg [Whether we need a single "-rpath" flag with a separated argument]) 6182d6c0b56eSmrg_LT_TAGDECL([], [hardcode_direct], [0], 6183d6c0b56eSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6184d6c0b56eSmrg DIR into the resulting binary]) 6185d6c0b56eSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 6186d6c0b56eSmrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 6187d6c0b56eSmrg DIR into the resulting binary and the resulting library dependency is 6188d6c0b56eSmrg "absolute", i.e impossible to change by setting $shlibpath_var if the 6189d6c0b56eSmrg library is relocated]) 6190d6c0b56eSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 6191d6c0b56eSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 6192d6c0b56eSmrg into the resulting binary]) 6193d6c0b56eSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 6194d6c0b56eSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 6195d6c0b56eSmrg into the resulting binary]) 6196d6c0b56eSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 6197d6c0b56eSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 6198d6c0b56eSmrg into the library and all subsequent libraries and executables linked 6199d6c0b56eSmrg against it]) 6200d6c0b56eSmrg_LT_TAGDECL([], [inherit_rpath], [0], 6201d6c0b56eSmrg [Set to yes if linker adds runtime paths of dependent libraries 6202d6c0b56eSmrg to runtime path list]) 6203d6c0b56eSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 6204d6c0b56eSmrg [Whether libtool must link a program against all its dependency libraries]) 6205d6c0b56eSmrg_LT_TAGDECL([], [always_export_symbols], [0], 6206d6c0b56eSmrg [Set to "yes" if exported symbols are required]) 6207d6c0b56eSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 6208d6c0b56eSmrg [The commands to list exported symbols]) 6209d6c0b56eSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 6210d6c0b56eSmrg [Symbols that should not be listed in the preloaded symbols]) 6211d6c0b56eSmrg_LT_TAGDECL([], [include_expsyms], [1], 6212d6c0b56eSmrg [Symbols that must always be exported]) 6213d6c0b56eSmrg_LT_TAGDECL([], [prelink_cmds], [2], 6214d6c0b56eSmrg [Commands necessary for linking programs (against libraries) with templates]) 6215d6c0b56eSmrg_LT_TAGDECL([], [postlink_cmds], [2], 6216d6c0b56eSmrg [Commands necessary for finishing linking programs]) 6217d6c0b56eSmrg_LT_TAGDECL([], [file_list_spec], [1], 6218d6c0b56eSmrg [Specify filename containing input files]) 6219d6c0b56eSmrgdnl FIXME: Not yet implemented 6220d6c0b56eSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 6221d6c0b56eSmrgdnl [Compiler flag to generate thread safe objects]) 6222d6c0b56eSmrg])# _LT_LINKER_SHLIBS 6223d6c0b56eSmrg 6224d6c0b56eSmrg 6225d6c0b56eSmrg# _LT_LANG_C_CONFIG([TAG]) 6226d6c0b56eSmrg# ------------------------ 6227d6c0b56eSmrg# Ensure that the configuration variables for a C compiler are suitably 6228d6c0b56eSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6229d6c0b56eSmrg# the compiler configuration to 'libtool'. 6230d6c0b56eSmrgm4_defun([_LT_LANG_C_CONFIG], 6231d6c0b56eSmrg[m4_require([_LT_DECL_EGREP])dnl 6232d6c0b56eSmrglt_save_CC=$CC 6233d6c0b56eSmrgAC_LANG_PUSH(C) 6234d6c0b56eSmrg 6235d6c0b56eSmrg# Source file extension for C test sources. 6236d6c0b56eSmrgac_ext=c 6237d6c0b56eSmrg 6238d6c0b56eSmrg# Object file extension for compiled C test sources. 6239d6c0b56eSmrgobjext=o 6240d6c0b56eSmrg_LT_TAGVAR(objext, $1)=$objext 6241d6c0b56eSmrg 6242d6c0b56eSmrg# Code to be used in simple compile tests 6243d6c0b56eSmrglt_simple_compile_test_code="int some_variable = 0;" 6244d6c0b56eSmrg 6245d6c0b56eSmrg# Code to be used in simple link tests 6246d6c0b56eSmrglt_simple_link_test_code='int main(){return(0);}' 6247d6c0b56eSmrg 6248d6c0b56eSmrg_LT_TAG_COMPILER 6249d6c0b56eSmrg# Save the default compiler, since it gets overwritten when the other 6250d6c0b56eSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 6251d6c0b56eSmrgcompiler_DEFAULT=$CC 6252d6c0b56eSmrg 6253d6c0b56eSmrg# save warnings/boilerplate of simple test code 6254d6c0b56eSmrg_LT_COMPILER_BOILERPLATE 6255d6c0b56eSmrg_LT_LINKER_BOILERPLATE 6256d6c0b56eSmrg 6257d6c0b56eSmrgif test -n "$compiler"; then 6258d6c0b56eSmrg _LT_COMPILER_NO_RTTI($1) 6259d6c0b56eSmrg _LT_COMPILER_PIC($1) 6260d6c0b56eSmrg _LT_COMPILER_C_O($1) 6261d6c0b56eSmrg _LT_COMPILER_FILE_LOCKS($1) 6262d6c0b56eSmrg _LT_LINKER_SHLIBS($1) 6263d6c0b56eSmrg _LT_SYS_DYNAMIC_LINKER($1) 6264d6c0b56eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6265d6c0b56eSmrg LT_SYS_DLOPEN_SELF 6266d6c0b56eSmrg _LT_CMD_STRIPLIB 6267d6c0b56eSmrg 6268d6c0b56eSmrg # Report what library types will actually be built 6269d6c0b56eSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6270d6c0b56eSmrg AC_MSG_RESULT([$can_build_shared]) 6271d6c0b56eSmrg 6272d6c0b56eSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6273d6c0b56eSmrg test no = "$can_build_shared" && enable_shared=no 6274d6c0b56eSmrg 6275d6c0b56eSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6276d6c0b56eSmrg # are all built from PIC. 6277d6c0b56eSmrg case $host_os in 6278d6c0b56eSmrg aix3*) 6279d6c0b56eSmrg test yes = "$enable_shared" && enable_static=no 6280d6c0b56eSmrg if test -n "$RANLIB"; then 6281d6c0b56eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6282d6c0b56eSmrg postinstall_cmds='$RANLIB $lib' 6283d6c0b56eSmrg fi 6284d6c0b56eSmrg ;; 6285d6c0b56eSmrg 6286d6c0b56eSmrg aix[[4-9]]*) 6287d6c0b56eSmrg if test ia64 != "$host_cpu"; then 6288d6c0b56eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 6289d6c0b56eSmrg yes,aix,yes) ;; # shared object as lib.so file only 6290d6c0b56eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 6291d6c0b56eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 6292d6c0b56eSmrg esac 6293d6c0b56eSmrg fi 6294d6c0b56eSmrg ;; 6295d6c0b56eSmrg esac 6296d6c0b56eSmrg AC_MSG_RESULT([$enable_shared]) 6297d6c0b56eSmrg 6298d6c0b56eSmrg AC_MSG_CHECKING([whether to build static libraries]) 6299d6c0b56eSmrg # Make sure either enable_shared or enable_static is yes. 6300d6c0b56eSmrg test yes = "$enable_shared" || enable_static=yes 6301d6c0b56eSmrg AC_MSG_RESULT([$enable_static]) 6302d6c0b56eSmrg 6303d6c0b56eSmrg _LT_CONFIG($1) 6304d6c0b56eSmrgfi 6305d6c0b56eSmrgAC_LANG_POP 6306d6c0b56eSmrgCC=$lt_save_CC 6307d6c0b56eSmrg])# _LT_LANG_C_CONFIG 6308d6c0b56eSmrg 6309d6c0b56eSmrg 6310d6c0b56eSmrg# _LT_LANG_CXX_CONFIG([TAG]) 6311d6c0b56eSmrg# -------------------------- 6312d6c0b56eSmrg# Ensure that the configuration variables for a C++ compiler are suitably 6313d6c0b56eSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 6314d6c0b56eSmrg# the compiler configuration to 'libtool'. 6315d6c0b56eSmrgm4_defun([_LT_LANG_CXX_CONFIG], 6316d6c0b56eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6317d6c0b56eSmrgm4_require([_LT_DECL_EGREP])dnl 6318d6c0b56eSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 6319d6c0b56eSmrgif test -n "$CXX" && ( test no != "$CXX" && 6320d6c0b56eSmrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 6321d6c0b56eSmrg (test g++ != "$CXX"))); then 6322d6c0b56eSmrg AC_PROG_CXXCPP 6323d6c0b56eSmrgelse 6324d6c0b56eSmrg _lt_caught_CXX_error=yes 6325d6c0b56eSmrgfi 6326d6c0b56eSmrg 6327d6c0b56eSmrgAC_LANG_PUSH(C++) 6328d6c0b56eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6329d6c0b56eSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6330d6c0b56eSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6331d6c0b56eSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6332d6c0b56eSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 6333d6c0b56eSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6334d6c0b56eSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6335d6c0b56eSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6336d6c0b56eSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6337d6c0b56eSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6338d6c0b56eSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6339d6c0b56eSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6340d6c0b56eSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6341d6c0b56eSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6342d6c0b56eSmrg_LT_TAGVAR(module_cmds, $1)= 6343d6c0b56eSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6344d6c0b56eSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6345d6c0b56eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6346d6c0b56eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 6347d6c0b56eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6348d6c0b56eSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6349d6c0b56eSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6350d6c0b56eSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6351d6c0b56eSmrg 6352d6c0b56eSmrg# Source file extension for C++ test sources. 6353d6c0b56eSmrgac_ext=cpp 6354d6c0b56eSmrg 6355d6c0b56eSmrg# Object file extension for compiled C++ test sources. 6356d6c0b56eSmrgobjext=o 6357d6c0b56eSmrg_LT_TAGVAR(objext, $1)=$objext 6358d6c0b56eSmrg 6359d6c0b56eSmrg# No sense in running all these tests if we already determined that 6360d6c0b56eSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 6361d6c0b56eSmrg# are currently assumed to apply to all compilers on this platform, 6362d6c0b56eSmrg# and will be corrupted by setting them based on a non-working compiler. 6363d6c0b56eSmrgif test yes != "$_lt_caught_CXX_error"; then 6364d6c0b56eSmrg # Code to be used in simple compile tests 6365d6c0b56eSmrg lt_simple_compile_test_code="int some_variable = 0;" 6366d6c0b56eSmrg 6367d6c0b56eSmrg # Code to be used in simple link tests 6368d6c0b56eSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6369d6c0b56eSmrg 6370d6c0b56eSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6371d6c0b56eSmrg _LT_TAG_COMPILER 6372d6c0b56eSmrg 6373d6c0b56eSmrg # save warnings/boilerplate of simple test code 6374d6c0b56eSmrg _LT_COMPILER_BOILERPLATE 6375d6c0b56eSmrg _LT_LINKER_BOILERPLATE 6376d6c0b56eSmrg 6377d6c0b56eSmrg # Allow CC to be a program name with arguments. 6378d6c0b56eSmrg lt_save_CC=$CC 6379d6c0b56eSmrg lt_save_CFLAGS=$CFLAGS 6380d6c0b56eSmrg lt_save_LD=$LD 6381d6c0b56eSmrg lt_save_GCC=$GCC 6382d6c0b56eSmrg GCC=$GXX 6383d6c0b56eSmrg lt_save_with_gnu_ld=$with_gnu_ld 6384d6c0b56eSmrg lt_save_path_LD=$lt_cv_path_LD 6385d6c0b56eSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 6386d6c0b56eSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 6387d6c0b56eSmrg else 6388d6c0b56eSmrg $as_unset lt_cv_prog_gnu_ld 6389d6c0b56eSmrg fi 6390d6c0b56eSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 6391d6c0b56eSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 6392d6c0b56eSmrg else 6393d6c0b56eSmrg $as_unset lt_cv_path_LD 6394d6c0b56eSmrg fi 6395d6c0b56eSmrg test -z "${LDCXX+set}" || LD=$LDCXX 6396d6c0b56eSmrg CC=${CXX-"c++"} 6397d6c0b56eSmrg CFLAGS=$CXXFLAGS 6398d6c0b56eSmrg compiler=$CC 6399d6c0b56eSmrg _LT_TAGVAR(compiler, $1)=$CC 6400d6c0b56eSmrg _LT_CC_BASENAME([$compiler]) 6401d6c0b56eSmrg 6402d6c0b56eSmrg if test -n "$compiler"; then 6403d6c0b56eSmrg # We don't want -fno-exception when compiling C++ code, so set the 6404d6c0b56eSmrg # no_builtin_flag separately 6405d6c0b56eSmrg if test yes = "$GXX"; then 6406d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 6407d6c0b56eSmrg else 6408d6c0b56eSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 6409d6c0b56eSmrg fi 6410d6c0b56eSmrg 6411d6c0b56eSmrg if test yes = "$GXX"; then 6412d6c0b56eSmrg # Set up default GNU C++ configuration 6413d6c0b56eSmrg 6414d6c0b56eSmrg LT_PATH_LD 6415d6c0b56eSmrg 6416d6c0b56eSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 6417d6c0b56eSmrg # archiving commands below assume that GNU ld is being used. 6418d6c0b56eSmrg if test yes = "$with_gnu_ld"; then 6419d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6420d6c0b56eSmrg _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' 6421d6c0b56eSmrg 6422d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6423d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6424d6c0b56eSmrg 6425d6c0b56eSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 6426d6c0b56eSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 6427d6c0b56eSmrg # investigate it a little bit more. (MM) 6428d6c0b56eSmrg wlarc='$wl' 6429d6c0b56eSmrg 6430d6c0b56eSmrg # ancient GNU ld didn't support --whole-archive et. al. 6431d6c0b56eSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 6432d6c0b56eSmrg $GREP 'no-whole-archive' > /dev/null; then 6433d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 6434d6c0b56eSmrg else 6435d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 6436d6c0b56eSmrg fi 6437d6c0b56eSmrg else 6438d6c0b56eSmrg with_gnu_ld=no 6439d6c0b56eSmrg wlarc= 6440d6c0b56eSmrg 6441d6c0b56eSmrg # A generic and very simple default shared library creation 6442d6c0b56eSmrg # command for GNU C++ for the case where it uses the native 6443d6c0b56eSmrg # linker, instead of GNU ld. If possible, this setting should 6444d6c0b56eSmrg # overridden to take advantage of the native linker features on 6445d6c0b56eSmrg # the platform it is being used on. 6446d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6447d6c0b56eSmrg fi 6448d6c0b56eSmrg 6449d6c0b56eSmrg # Commands to make compiler produce verbose output that lists 6450d6c0b56eSmrg # what "hidden" libraries, object files and flags are used when 6451d6c0b56eSmrg # linking a shared library. 6452d6c0b56eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6453d6c0b56eSmrg 6454d6c0b56eSmrg else 6455d6c0b56eSmrg GXX=no 6456d6c0b56eSmrg with_gnu_ld=no 6457d6c0b56eSmrg wlarc= 6458d6c0b56eSmrg fi 6459d6c0b56eSmrg 6460d6c0b56eSmrg # PORTME: fill in a description of your system's C++ link characteristics 6461d6c0b56eSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 6462d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6463d6c0b56eSmrg case $host_os in 6464d6c0b56eSmrg aix3*) 6465d6c0b56eSmrg # FIXME: insert proper C++ library support 6466d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6467d6c0b56eSmrg ;; 6468d6c0b56eSmrg aix[[4-9]]*) 6469d6c0b56eSmrg if test ia64 = "$host_cpu"; then 6470d6c0b56eSmrg # On IA64, the linker does run time linking by default, so we don't 6471d6c0b56eSmrg # have to do anything special. 6472d6c0b56eSmrg aix_use_runtimelinking=no 6473d6c0b56eSmrg exp_sym_flag='-Bexport' 6474d6c0b56eSmrg no_entry_flag= 6475d6c0b56eSmrg else 6476d6c0b56eSmrg aix_use_runtimelinking=no 6477d6c0b56eSmrg 6478d6c0b56eSmrg # Test if we are trying to use run time linking or normal 6479d6c0b56eSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 6480d6c0b56eSmrg # have runtime linking enabled, and use it for executables. 6481d6c0b56eSmrg # For shared libraries, we enable/disable runtime linking 6482d6c0b56eSmrg # depending on the kind of the shared library created - 6483d6c0b56eSmrg # when "with_aix_soname,aix_use_runtimelinking" is: 6484d6c0b56eSmrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 6485d6c0b56eSmrg # "aix,yes" lib.so shared, rtl:yes, for executables 6486d6c0b56eSmrg # lib.a static archive 6487d6c0b56eSmrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 6488d6c0b56eSmrg # lib.a(lib.so.V) shared, rtl:no, for executables 6489d6c0b56eSmrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 6490d6c0b56eSmrg # lib.a(lib.so.V) shared, rtl:no 6491d6c0b56eSmrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 6492d6c0b56eSmrg # lib.a static archive 6493d6c0b56eSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 6494d6c0b56eSmrg for ld_flag in $LDFLAGS; do 6495d6c0b56eSmrg case $ld_flag in 6496d6c0b56eSmrg *-brtl*) 6497d6c0b56eSmrg aix_use_runtimelinking=yes 6498d6c0b56eSmrg break 6499d6c0b56eSmrg ;; 6500d6c0b56eSmrg esac 6501d6c0b56eSmrg done 6502d6c0b56eSmrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 6503d6c0b56eSmrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 6504d6c0b56eSmrg # so we don't have lib.a shared libs to link our executables. 6505d6c0b56eSmrg # We have to force runtime linking in this case. 6506d6c0b56eSmrg aix_use_runtimelinking=yes 6507d6c0b56eSmrg LDFLAGS="$LDFLAGS -Wl,-brtl" 6508d6c0b56eSmrg fi 6509d6c0b56eSmrg ;; 6510d6c0b56eSmrg esac 6511d6c0b56eSmrg 6512d6c0b56eSmrg exp_sym_flag='-bexport' 6513d6c0b56eSmrg no_entry_flag='-bnoentry' 6514d6c0b56eSmrg fi 6515d6c0b56eSmrg 6516d6c0b56eSmrg # When large executables or shared objects are built, AIX ld can 6517d6c0b56eSmrg # have problems creating the table of contents. If linking a library 6518d6c0b56eSmrg # or program results in "error TOC overflow" add -mminimal-toc to 6519d6c0b56eSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6520d6c0b56eSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6521d6c0b56eSmrg 6522d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='' 6523d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6524d6c0b56eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6525d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6526d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6527d6c0b56eSmrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 6528d6c0b56eSmrg case $with_aix_soname,$aix_use_runtimelinking in 6529d6c0b56eSmrg aix,*) ;; # no import file 6530d6c0b56eSmrg svr4,* | *,yes) # use import file 6531d6c0b56eSmrg # The Import File defines what to hardcode. 6532d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6533d6c0b56eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 6534d6c0b56eSmrg ;; 6535d6c0b56eSmrg esac 6536d6c0b56eSmrg 6537d6c0b56eSmrg if test yes = "$GXX"; then 6538d6c0b56eSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6539d6c0b56eSmrg # We only want to do this on AIX 4.2 and lower, the check 6540d6c0b56eSmrg # below for broken collect2 doesn't work under 4.3+ 6541d6c0b56eSmrg collect2name=`$CC -print-prog-name=collect2` 6542d6c0b56eSmrg if test -f "$collect2name" && 6543d6c0b56eSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6544d6c0b56eSmrg then 6545d6c0b56eSmrg # We have reworked collect2 6546d6c0b56eSmrg : 6547d6c0b56eSmrg else 6548d6c0b56eSmrg # We have old collect2 6549d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6550d6c0b56eSmrg # It fails to find uninstalled libraries when the uninstalled 6551d6c0b56eSmrg # path is not listed in the libpath. Setting hardcode_minus_L 6552d6c0b56eSmrg # to unsupported forces relinking 6553d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6554d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6555d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6556d6c0b56eSmrg fi 6557d6c0b56eSmrg esac 6558d6c0b56eSmrg shared_flag='-shared' 6559d6c0b56eSmrg if test yes = "$aix_use_runtimelinking"; then 6560d6c0b56eSmrg shared_flag=$shared_flag' $wl-G' 6561d6c0b56eSmrg fi 6562d6c0b56eSmrg # Need to ensure runtime linking is disabled for the traditional 6563d6c0b56eSmrg # shared library, or the linker may eventually find shared libraries 6564d6c0b56eSmrg # /with/ Import File - we do not want to mix them. 6565d6c0b56eSmrg shared_flag_aix='-shared' 6566d6c0b56eSmrg shared_flag_svr4='-shared $wl-G' 6567d6c0b56eSmrg else 6568d6c0b56eSmrg # not using gcc 6569d6c0b56eSmrg if test ia64 = "$host_cpu"; then 6570d6c0b56eSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6571d6c0b56eSmrg # chokes on -Wl,-G. The following line is correct: 6572d6c0b56eSmrg shared_flag='-G' 6573d6c0b56eSmrg else 6574d6c0b56eSmrg if test yes = "$aix_use_runtimelinking"; then 6575d6c0b56eSmrg shared_flag='$wl-G' 6576d6c0b56eSmrg else 6577d6c0b56eSmrg shared_flag='$wl-bM:SRE' 6578d6c0b56eSmrg fi 6579d6c0b56eSmrg shared_flag_aix='$wl-bM:SRE' 6580d6c0b56eSmrg shared_flag_svr4='$wl-G' 6581d6c0b56eSmrg fi 6582d6c0b56eSmrg fi 6583d6c0b56eSmrg 6584d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 6585d6c0b56eSmrg # It seems that -bexpall does not export symbols beginning with 6586d6c0b56eSmrg # underscore (_), so it is better to generate a list of symbols to 6587d6c0b56eSmrg # export. 6588d6c0b56eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6589d6c0b56eSmrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 6590d6c0b56eSmrg # Warning - without using the other runtime loading flags (-brtl), 6591d6c0b56eSmrg # -berok will link without error, but may produce a broken library. 6592d6c0b56eSmrg # The "-G" linker flag allows undefined symbols. 6593d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 6594d6c0b56eSmrg # Determine the default libpath from the value encoded in an empty 6595d6c0b56eSmrg # executable. 6596d6c0b56eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6597d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6598d6c0b56eSmrg 6599d6c0b56eSmrg _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 6600d6c0b56eSmrg else 6601d6c0b56eSmrg if test ia64 = "$host_cpu"; then 6602d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 6603d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6604d6c0b56eSmrg _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" 6605d6c0b56eSmrg else 6606d6c0b56eSmrg # Determine the default libpath from the value encoded in an 6607d6c0b56eSmrg # empty executable. 6608d6c0b56eSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6609d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 6610d6c0b56eSmrg # Warning - without using the other run time loading flags, 6611d6c0b56eSmrg # -berok will link without error, but may produce a broken library. 6612d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 6613d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 6614d6c0b56eSmrg if test yes = "$with_gnu_ld"; then 6615d6c0b56eSmrg # We only use this code for GNU lds that support --whole-archive. 6616d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 6617d6c0b56eSmrg else 6618d6c0b56eSmrg # Exported symbols can be pulled into shared objects from archives 6619d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6620d6c0b56eSmrg fi 6621d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6622d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 6623d6c0b56eSmrg # -brtl affects multiple linker settings, -berok does not and is overridden later 6624d6c0b56eSmrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 6625d6c0b56eSmrg if test svr4 != "$with_aix_soname"; then 6626d6c0b56eSmrg # This is similar to how AIX traditionally builds its shared 6627d6c0b56eSmrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 6628d6c0b56eSmrg _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' 6629d6c0b56eSmrg fi 6630d6c0b56eSmrg if test aix != "$with_aix_soname"; then 6631d6c0b56eSmrg _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' 6632d6c0b56eSmrg else 6633d6c0b56eSmrg # used by -dlpreopen to get the symbols 6634d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 6635d6c0b56eSmrg fi 6636d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 6637d6c0b56eSmrg fi 6638d6c0b56eSmrg fi 6639d6c0b56eSmrg ;; 6640d6c0b56eSmrg 6641d6c0b56eSmrg beos*) 6642d6c0b56eSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6643d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6644d6c0b56eSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6645d6c0b56eSmrg # support --undefined. This deserves some investigation. FIXME 6646d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6647d6c0b56eSmrg else 6648d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6649d6c0b56eSmrg fi 6650d6c0b56eSmrg ;; 6651d6c0b56eSmrg 6652d6c0b56eSmrg chorus*) 6653d6c0b56eSmrg case $cc_basename in 6654d6c0b56eSmrg *) 6655d6c0b56eSmrg # FIXME: insert proper C++ library support 6656d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6657d6c0b56eSmrg ;; 6658d6c0b56eSmrg esac 6659d6c0b56eSmrg ;; 6660d6c0b56eSmrg 6661d6c0b56eSmrg cygwin* | mingw* | pw32* | cegcc*) 6662d6c0b56eSmrg case $GXX,$cc_basename in 6663d6c0b56eSmrg ,cl* | no,cl*) 6664d6c0b56eSmrg # Native MSVC 6665d6c0b56eSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6666d6c0b56eSmrg # no search path for DLLs. 6667d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6668d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6669d6c0b56eSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6670d6c0b56eSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6671d6c0b56eSmrg # Tell ltmain to make .lib files, not .a files. 6672d6c0b56eSmrg libext=lib 6673d6c0b56eSmrg # Tell ltmain to make .dll files, not .so files. 6674d6c0b56eSmrg shrext_cmds=.dll 6675d6c0b56eSmrg # FIXME: Setting linknames here is a bad hack. 6676d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 6677d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6678d6c0b56eSmrg cp "$export_symbols" "$output_objdir/$soname.def"; 6679d6c0b56eSmrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 6680d6c0b56eSmrg else 6681d6c0b56eSmrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 6682d6c0b56eSmrg fi~ 6683d6c0b56eSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6684d6c0b56eSmrg linknames=' 6685d6c0b56eSmrg # The linker will not automatically build a static lib if we build a DLL. 6686d6c0b56eSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6687d6c0b56eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6688d6c0b56eSmrg # Don't use ranlib 6689d6c0b56eSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6690d6c0b56eSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6691d6c0b56eSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6692d6c0b56eSmrg case $lt_outputfile in 6693d6c0b56eSmrg *.exe|*.EXE) ;; 6694d6c0b56eSmrg *) 6695d6c0b56eSmrg lt_outputfile=$lt_outputfile.exe 6696d6c0b56eSmrg lt_tool_outputfile=$lt_tool_outputfile.exe 6697d6c0b56eSmrg ;; 6698d6c0b56eSmrg esac~ 6699d6c0b56eSmrg func_to_tool_file "$lt_outputfile"~ 6700d6c0b56eSmrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 6701d6c0b56eSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6702d6c0b56eSmrg $RM "$lt_outputfile.manifest"; 6703d6c0b56eSmrg fi' 6704d6c0b56eSmrg ;; 6705d6c0b56eSmrg *) 6706d6c0b56eSmrg # g++ 6707d6c0b56eSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6708d6c0b56eSmrg # as there is no search path for DLLs. 6709d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6710d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 6711d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6712d6c0b56eSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6713d6c0b56eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6714d6c0b56eSmrg 6715d6c0b56eSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6716d6c0b56eSmrg _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' 6717d6c0b56eSmrg # If the export-symbols file already is a .def file, use it as 6718d6c0b56eSmrg # is; otherwise, prepend EXPORTS... 6719d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 6720d6c0b56eSmrg cp $export_symbols $output_objdir/$soname.def; 6721d6c0b56eSmrg else 6722d6c0b56eSmrg echo EXPORTS > $output_objdir/$soname.def; 6723d6c0b56eSmrg cat $export_symbols >> $output_objdir/$soname.def; 6724d6c0b56eSmrg fi~ 6725d6c0b56eSmrg $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' 6726d6c0b56eSmrg else 6727d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6728d6c0b56eSmrg fi 6729d6c0b56eSmrg ;; 6730d6c0b56eSmrg esac 6731d6c0b56eSmrg ;; 6732d6c0b56eSmrg darwin* | rhapsody*) 6733d6c0b56eSmrg _LT_DARWIN_LINKER_FEATURES($1) 6734d6c0b56eSmrg ;; 6735d6c0b56eSmrg 6736d6c0b56eSmrg os2*) 6737d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6738d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6739d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6740d6c0b56eSmrg shrext_cmds=.dll 6741d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6742d6c0b56eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6743d6c0b56eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6744d6c0b56eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6745d6c0b56eSmrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 6746d6c0b56eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6747d6c0b56eSmrg emximp -o $lib $output_objdir/$libname.def' 6748d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 6749d6c0b56eSmrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 6750d6c0b56eSmrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 6751d6c0b56eSmrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 6752d6c0b56eSmrg prefix_cmds="$SED"~ 6753d6c0b56eSmrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 6754d6c0b56eSmrg prefix_cmds="$prefix_cmds -e 1d"; 6755d6c0b56eSmrg fi~ 6756d6c0b56eSmrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 6757d6c0b56eSmrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 6758d6c0b56eSmrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 6759d6c0b56eSmrg emximp -o $lib $output_objdir/$libname.def' 6760d6c0b56eSmrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 6761d6c0b56eSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6762d6c0b56eSmrg ;; 6763d6c0b56eSmrg 6764d6c0b56eSmrg dgux*) 6765d6c0b56eSmrg case $cc_basename in 6766d6c0b56eSmrg ec++*) 6767d6c0b56eSmrg # FIXME: insert proper C++ library support 6768d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6769d6c0b56eSmrg ;; 6770d6c0b56eSmrg ghcx*) 6771d6c0b56eSmrg # Green Hills C++ Compiler 6772d6c0b56eSmrg # FIXME: insert proper C++ library support 6773d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6774d6c0b56eSmrg ;; 6775d6c0b56eSmrg *) 6776d6c0b56eSmrg # FIXME: insert proper C++ library support 6777d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6778d6c0b56eSmrg ;; 6779d6c0b56eSmrg esac 6780d6c0b56eSmrg ;; 6781d6c0b56eSmrg 6782d6c0b56eSmrg freebsd2.*) 6783d6c0b56eSmrg # C++ shared libraries reported to be fairly broken before 6784d6c0b56eSmrg # switch to ELF 6785d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6786d6c0b56eSmrg ;; 6787d6c0b56eSmrg 6788d6c0b56eSmrg freebsd-elf*) 6789d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6790d6c0b56eSmrg ;; 6791d6c0b56eSmrg 6792d6c0b56eSmrg freebsd* | dragonfly*) 6793d6c0b56eSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6794d6c0b56eSmrg # conventions 6795d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6796d6c0b56eSmrg ;; 6797d6c0b56eSmrg 6798d6c0b56eSmrg haiku*) 6799d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 6800d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6801d6c0b56eSmrg ;; 6802d6c0b56eSmrg 6803d6c0b56eSmrg hpux9*) 6804d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6805d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6806d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6807d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6808d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6809d6c0b56eSmrg # but as the default 6810d6c0b56eSmrg # location of the library. 6811d6c0b56eSmrg 6812d6c0b56eSmrg case $cc_basename in 6813d6c0b56eSmrg CC*) 6814d6c0b56eSmrg # FIXME: insert proper C++ library support 6815d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6816d6c0b56eSmrg ;; 6817d6c0b56eSmrg aCC*) 6818d6c0b56eSmrg _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' 6819d6c0b56eSmrg # Commands to make compiler produce verbose output that lists 6820d6c0b56eSmrg # what "hidden" libraries, object files and flags are used when 6821d6c0b56eSmrg # linking a shared library. 6822d6c0b56eSmrg # 6823d6c0b56eSmrg # There doesn't appear to be a way to prevent this compiler from 6824d6c0b56eSmrg # explicitly linking system object files so we need to strip them 6825d6c0b56eSmrg # from the output so that they don't get included in the library 6826d6c0b56eSmrg # dependencies. 6827d6c0b56eSmrg 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"' 6828d6c0b56eSmrg ;; 6829d6c0b56eSmrg *) 6830d6c0b56eSmrg if test yes = "$GXX"; then 6831d6c0b56eSmrg _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' 6832d6c0b56eSmrg else 6833d6c0b56eSmrg # FIXME: insert proper C++ library support 6834d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6835d6c0b56eSmrg fi 6836d6c0b56eSmrg ;; 6837d6c0b56eSmrg esac 6838d6c0b56eSmrg ;; 6839d6c0b56eSmrg 6840d6c0b56eSmrg hpux10*|hpux11*) 6841d6c0b56eSmrg if test no = "$with_gnu_ld"; then 6842d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 6843d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6844d6c0b56eSmrg 6845d6c0b56eSmrg case $host_cpu in 6846d6c0b56eSmrg hppa*64*|ia64*) 6847d6c0b56eSmrg ;; 6848d6c0b56eSmrg *) 6849d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6850d6c0b56eSmrg ;; 6851d6c0b56eSmrg esac 6852d6c0b56eSmrg fi 6853d6c0b56eSmrg case $host_cpu in 6854d6c0b56eSmrg hppa*64*|ia64*) 6855d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6856d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6857d6c0b56eSmrg ;; 6858d6c0b56eSmrg *) 6859d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6860d6c0b56eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6861d6c0b56eSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6862d6c0b56eSmrg # but as the default 6863d6c0b56eSmrg # location of the library. 6864d6c0b56eSmrg ;; 6865d6c0b56eSmrg esac 6866d6c0b56eSmrg 6867d6c0b56eSmrg case $cc_basename in 6868d6c0b56eSmrg CC*) 6869d6c0b56eSmrg # FIXME: insert proper C++ library support 6870d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6871d6c0b56eSmrg ;; 6872d6c0b56eSmrg aCC*) 6873d6c0b56eSmrg case $host_cpu in 6874d6c0b56eSmrg hppa*64*) 6875d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6876d6c0b56eSmrg ;; 6877d6c0b56eSmrg ia64*) 6878d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6879d6c0b56eSmrg ;; 6880d6c0b56eSmrg *) 6881d6c0b56eSmrg _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' 6882d6c0b56eSmrg ;; 6883d6c0b56eSmrg esac 6884d6c0b56eSmrg # Commands to make compiler produce verbose output that lists 6885d6c0b56eSmrg # what "hidden" libraries, object files and flags are used when 6886d6c0b56eSmrg # linking a shared library. 6887d6c0b56eSmrg # 6888d6c0b56eSmrg # There doesn't appear to be a way to prevent this compiler from 6889d6c0b56eSmrg # explicitly linking system object files so we need to strip them 6890d6c0b56eSmrg # from the output so that they don't get included in the library 6891d6c0b56eSmrg # dependencies. 6892d6c0b56eSmrg 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"' 6893d6c0b56eSmrg ;; 6894d6c0b56eSmrg *) 6895d6c0b56eSmrg if test yes = "$GXX"; then 6896d6c0b56eSmrg if test no = "$with_gnu_ld"; then 6897d6c0b56eSmrg case $host_cpu in 6898d6c0b56eSmrg hppa*64*) 6899d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6900d6c0b56eSmrg ;; 6901d6c0b56eSmrg ia64*) 6902d6c0b56eSmrg _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' 6903d6c0b56eSmrg ;; 6904d6c0b56eSmrg *) 6905d6c0b56eSmrg _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' 6906d6c0b56eSmrg ;; 6907d6c0b56eSmrg esac 6908d6c0b56eSmrg fi 6909d6c0b56eSmrg else 6910d6c0b56eSmrg # FIXME: insert proper C++ library support 6911d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6912d6c0b56eSmrg fi 6913d6c0b56eSmrg ;; 6914d6c0b56eSmrg esac 6915d6c0b56eSmrg ;; 6916d6c0b56eSmrg 6917d6c0b56eSmrg interix[[3-9]]*) 6918d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=no 6919d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6920d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6921d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 6922d6c0b56eSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6923d6c0b56eSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6924d6c0b56eSmrg # default) and relocated if they conflict, which is a slow very memory 6925d6c0b56eSmrg # consuming and fragmenting process. To avoid this, we pick a random, 6926d6c0b56eSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6927d6c0b56eSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6928d6c0b56eSmrg _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' 6929d6c0b56eSmrg _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' 6930d6c0b56eSmrg ;; 6931d6c0b56eSmrg irix5* | irix6*) 6932d6c0b56eSmrg case $cc_basename in 6933d6c0b56eSmrg CC*) 6934d6c0b56eSmrg # SGI C++ 6935d6c0b56eSmrg _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' 6936d6c0b56eSmrg 6937d6c0b56eSmrg # Archives containing C++ object files must be created using 6938d6c0b56eSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6939d6c0b56eSmrg # necessary to make sure instantiated templates are included 6940d6c0b56eSmrg # in the archive. 6941d6c0b56eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6942d6c0b56eSmrg ;; 6943d6c0b56eSmrg *) 6944d6c0b56eSmrg if test yes = "$GXX"; then 6945d6c0b56eSmrg if test no = "$with_gnu_ld"; then 6946d6c0b56eSmrg _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' 6947d6c0b56eSmrg else 6948d6c0b56eSmrg _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' 6949d6c0b56eSmrg fi 6950d6c0b56eSmrg fi 6951d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6952d6c0b56eSmrg ;; 6953d6c0b56eSmrg esac 6954d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 6955d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6956d6c0b56eSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 6957d6c0b56eSmrg ;; 6958d6c0b56eSmrg 6959d6c0b56eSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 6960d6c0b56eSmrg case $cc_basename in 6961d6c0b56eSmrg KCC*) 6962d6c0b56eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6963d6c0b56eSmrg 6964d6c0b56eSmrg # KCC will only create a shared library if the output file 6965d6c0b56eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6966d6c0b56eSmrg # to its proper name (with version) after linking. 6967d6c0b56eSmrg _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' 6968d6c0b56eSmrg _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' 6969d6c0b56eSmrg # Commands to make compiler produce verbose output that lists 6970d6c0b56eSmrg # what "hidden" libraries, object files and flags are used when 6971d6c0b56eSmrg # linking a shared library. 6972d6c0b56eSmrg # 6973d6c0b56eSmrg # There doesn't appear to be a way to prevent this compiler from 6974d6c0b56eSmrg # explicitly linking system object files so we need to strip them 6975d6c0b56eSmrg # from the output so that they don't get included in the library 6976d6c0b56eSmrg # dependencies. 6977d6c0b56eSmrg 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"' 6978d6c0b56eSmrg 6979d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 6980d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6981d6c0b56eSmrg 6982d6c0b56eSmrg # Archives containing C++ object files must be created using 6983d6c0b56eSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6984d6c0b56eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6985d6c0b56eSmrg ;; 6986d6c0b56eSmrg icpc* | ecpc* ) 6987d6c0b56eSmrg # Intel C++ 6988d6c0b56eSmrg with_gnu_ld=yes 6989d6c0b56eSmrg # version 8.0 and above of icpc choke on multiply defined symbols 6990d6c0b56eSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6991d6c0b56eSmrg # earlier do not add the objects themselves. 6992d6c0b56eSmrg case `$CC -V 2>&1` in 6993d6c0b56eSmrg *"Version 7."*) 6994d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 6995d6c0b56eSmrg _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' 6996d6c0b56eSmrg ;; 6997d6c0b56eSmrg *) # Version 8.0 or newer 6998d6c0b56eSmrg tmp_idyn= 6999d6c0b56eSmrg case $host_cpu in 7000d6c0b56eSmrg ia64*) tmp_idyn=' -i_dynamic';; 7001d6c0b56eSmrg esac 7002d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7003d6c0b56eSmrg _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' 7004d6c0b56eSmrg ;; 7005d6c0b56eSmrg esac 7006d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7007d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7008d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7009d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 7010d6c0b56eSmrg ;; 7011d6c0b56eSmrg pgCC* | pgcpp*) 7012d6c0b56eSmrg # Portland Group C++ compiler 7013d6c0b56eSmrg case `$CC -V` in 7014d6c0b56eSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 7015d6c0b56eSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 7016d6c0b56eSmrg rm -rf $tpldir~ 7017d6c0b56eSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 7018d6c0b56eSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 7019d6c0b56eSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 7020d6c0b56eSmrg rm -rf $tpldir~ 7021d6c0b56eSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 7022d6c0b56eSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 7023d6c0b56eSmrg $RANLIB $oldlib' 7024d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 7025d6c0b56eSmrg rm -rf $tpldir~ 7026d6c0b56eSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7027d6c0b56eSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7028d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 7029d6c0b56eSmrg rm -rf $tpldir~ 7030d6c0b56eSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 7031d6c0b56eSmrg $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' 7032d6c0b56eSmrg ;; 7033d6c0b56eSmrg *) # Version 6 and above use weak symbols 7034d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7035d6c0b56eSmrg _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' 7036d6c0b56eSmrg ;; 7037d6c0b56eSmrg esac 7038d6c0b56eSmrg 7039d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 7040d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7041d6c0b56eSmrg _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' 7042d6c0b56eSmrg ;; 7043d6c0b56eSmrg cxx*) 7044d6c0b56eSmrg # Compaq C++ 7045d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 7046d6c0b56eSmrg _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' 7047d6c0b56eSmrg 7048d6c0b56eSmrg runpath_var=LD_RUN_PATH 7049d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7050d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7051d6c0b56eSmrg 7052d6c0b56eSmrg # Commands to make compiler produce verbose output that lists 7053d6c0b56eSmrg # what "hidden" libraries, object files and flags are used when 7054d6c0b56eSmrg # linking a shared library. 7055d6c0b56eSmrg # 7056d6c0b56eSmrg # There doesn't appear to be a way to prevent this compiler from 7057d6c0b56eSmrg # explicitly linking system object files so we need to strip them 7058d6c0b56eSmrg # from the output so that they don't get included in the library 7059d6c0b56eSmrg # dependencies. 7060d6c0b56eSmrg 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' 7061d6c0b56eSmrg ;; 7062d6c0b56eSmrg xl* | mpixl* | bgxl*) 7063d6c0b56eSmrg # IBM XL 8.0 on PPC, with GNU ld 7064d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7065d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 7066d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 7067d6c0b56eSmrg if test yes = "$supports_anon_versioning"; then 7068d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 7069d6c0b56eSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 7070d6c0b56eSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 7071d6c0b56eSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 7072d6c0b56eSmrg fi 7073d6c0b56eSmrg ;; 7074d6c0b56eSmrg *) 7075d6c0b56eSmrg case `$CC -V 2>&1 | sed 5q` in 7076d6c0b56eSmrg *Sun\ C*) 7077d6c0b56eSmrg # Sun C++ 5.9 7078d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7079d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7080d6c0b56eSmrg _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' 7081d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7082d6c0b56eSmrg _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' 7083d6c0b56eSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7084d6c0b56eSmrg 7085d6c0b56eSmrg # Not sure whether something based on 7086d6c0b56eSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 7087d6c0b56eSmrg # would be better. 7088d6c0b56eSmrg output_verbose_link_cmd='func_echo_all' 7089d6c0b56eSmrg 7090d6c0b56eSmrg # Archives containing C++ object files must be created using 7091d6c0b56eSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7092d6c0b56eSmrg # necessary to make sure instantiated templates are included 7093d6c0b56eSmrg # in the archive. 7094d6c0b56eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7095d6c0b56eSmrg ;; 7096d6c0b56eSmrg esac 7097d6c0b56eSmrg ;; 7098d6c0b56eSmrg esac 7099d6c0b56eSmrg ;; 7100d6c0b56eSmrg 7101d6c0b56eSmrg lynxos*) 7102d6c0b56eSmrg # FIXME: insert proper C++ library support 7103d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7104d6c0b56eSmrg ;; 7105d6c0b56eSmrg 7106d6c0b56eSmrg m88k*) 7107d6c0b56eSmrg # FIXME: insert proper C++ library support 7108d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7109d6c0b56eSmrg ;; 7110d6c0b56eSmrg 7111d6c0b56eSmrg mvs*) 7112d6c0b56eSmrg case $cc_basename in 7113d6c0b56eSmrg cxx*) 7114d6c0b56eSmrg # FIXME: insert proper C++ library support 7115d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7116d6c0b56eSmrg ;; 7117d6c0b56eSmrg *) 7118d6c0b56eSmrg # FIXME: insert proper C++ library support 7119d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7120d6c0b56eSmrg ;; 7121d6c0b56eSmrg esac 7122d6c0b56eSmrg ;; 7123d6c0b56eSmrg 7124d6c0b56eSmrg netbsd*) 7125d6c0b56eSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 7126d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 7127d6c0b56eSmrg wlarc= 7128d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7129d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7130d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7131d6c0b56eSmrg fi 7132d6c0b56eSmrg # Workaround some broken pre-1.5 toolchains 7133d6c0b56eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 7134d6c0b56eSmrg ;; 7135d6c0b56eSmrg 7136d6c0b56eSmrg *nto* | *qnx*) 7137d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 7138d6c0b56eSmrg ;; 7139d6c0b56eSmrg 7140d6c0b56eSmrg openbsd* | bitrig*) 7141d6c0b56eSmrg if test -f /usr/libexec/ld.so; then 7142d6c0b56eSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 7143d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7144d6c0b56eSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 7145d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 7146d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7147d6c0b56eSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 7148d6c0b56eSmrg _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' 7149d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 7150d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 7151d6c0b56eSmrg fi 7152d6c0b56eSmrg output_verbose_link_cmd=func_echo_all 7153d6c0b56eSmrg else 7154d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7155d6c0b56eSmrg fi 7156d6c0b56eSmrg ;; 7157d6c0b56eSmrg 7158d6c0b56eSmrg osf3* | osf4* | osf5*) 7159d6c0b56eSmrg case $cc_basename in 7160d6c0b56eSmrg KCC*) 7161d6c0b56eSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 7162d6c0b56eSmrg 7163d6c0b56eSmrg # KCC will only create a shared library if the output file 7164d6c0b56eSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 7165d6c0b56eSmrg # to its proper name (with version) after linking. 7166d6c0b56eSmrg _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' 7167d6c0b56eSmrg 7168d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 7169d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7170d6c0b56eSmrg 7171d6c0b56eSmrg # Archives containing C++ object files must be created using 7172d6c0b56eSmrg # the KAI C++ compiler. 7173d6c0b56eSmrg case $host in 7174d6c0b56eSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 7175d6c0b56eSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 7176d6c0b56eSmrg esac 7177d6c0b56eSmrg ;; 7178d6c0b56eSmrg RCC*) 7179d6c0b56eSmrg # Rational C++ 2.4.1 7180d6c0b56eSmrg # FIXME: insert proper C++ library support 7181d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7182d6c0b56eSmrg ;; 7183d6c0b56eSmrg cxx*) 7184d6c0b56eSmrg case $host in 7185d6c0b56eSmrg osf3*) 7186d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7187d6c0b56eSmrg _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' 7188d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7189d6c0b56eSmrg ;; 7190d6c0b56eSmrg *) 7191d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 7192d6c0b56eSmrg _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' 7193d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 7194d6c0b56eSmrg echo "-hidden">> $lib.exp~ 7195d6c0b56eSmrg $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~ 7196d6c0b56eSmrg $RM $lib.exp' 7197d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 7198d6c0b56eSmrg ;; 7199d6c0b56eSmrg esac 7200d6c0b56eSmrg 7201d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7202d6c0b56eSmrg 7203d6c0b56eSmrg # Commands to make compiler produce verbose output that lists 7204d6c0b56eSmrg # what "hidden" libraries, object files and flags are used when 7205d6c0b56eSmrg # linking a shared library. 7206d6c0b56eSmrg # 7207d6c0b56eSmrg # There doesn't appear to be a way to prevent this compiler from 7208d6c0b56eSmrg # explicitly linking system object files so we need to strip them 7209d6c0b56eSmrg # from the output so that they don't get included in the library 7210d6c0b56eSmrg # dependencies. 7211d6c0b56eSmrg 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"' 7212d6c0b56eSmrg ;; 7213d6c0b56eSmrg *) 7214d6c0b56eSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7215d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 7216d6c0b56eSmrg case $host in 7217d6c0b56eSmrg osf3*) 7218d6c0b56eSmrg _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' 7219d6c0b56eSmrg ;; 7220d6c0b56eSmrg *) 7221d6c0b56eSmrg _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' 7222d6c0b56eSmrg ;; 7223d6c0b56eSmrg esac 7224d6c0b56eSmrg 7225d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 7226d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7227d6c0b56eSmrg 7228d6c0b56eSmrg # Commands to make compiler produce verbose output that lists 7229d6c0b56eSmrg # what "hidden" libraries, object files and flags are used when 7230d6c0b56eSmrg # linking a shared library. 7231d6c0b56eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7232d6c0b56eSmrg 7233d6c0b56eSmrg else 7234d6c0b56eSmrg # FIXME: insert proper C++ library support 7235d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7236d6c0b56eSmrg fi 7237d6c0b56eSmrg ;; 7238d6c0b56eSmrg esac 7239d6c0b56eSmrg ;; 7240d6c0b56eSmrg 7241d6c0b56eSmrg psos*) 7242d6c0b56eSmrg # FIXME: insert proper C++ library support 7243d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7244d6c0b56eSmrg ;; 7245d6c0b56eSmrg 7246d6c0b56eSmrg sunos4*) 7247d6c0b56eSmrg case $cc_basename in 7248d6c0b56eSmrg CC*) 7249d6c0b56eSmrg # Sun C++ 4.x 7250d6c0b56eSmrg # FIXME: insert proper C++ library support 7251d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7252d6c0b56eSmrg ;; 7253d6c0b56eSmrg lcc*) 7254d6c0b56eSmrg # Lucid 7255d6c0b56eSmrg # FIXME: insert proper C++ library support 7256d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7257d6c0b56eSmrg ;; 7258d6c0b56eSmrg *) 7259d6c0b56eSmrg # FIXME: insert proper C++ library support 7260d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7261d6c0b56eSmrg ;; 7262d6c0b56eSmrg esac 7263d6c0b56eSmrg ;; 7264d6c0b56eSmrg 7265d6c0b56eSmrg solaris*) 7266d6c0b56eSmrg case $cc_basename in 7267d6c0b56eSmrg CC* | sunCC*) 7268d6c0b56eSmrg # Sun C++ 4.2, 5.x and Centerline C++ 7269d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 7270d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 7271d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 7272d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7273d6c0b56eSmrg $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' 7274d6c0b56eSmrg 7275d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 7276d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7277d6c0b56eSmrg case $host_os in 7278d6c0b56eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7279d6c0b56eSmrg *) 7280d6c0b56eSmrg # The compiler driver will combine and reorder linker options, 7281d6c0b56eSmrg # but understands '-z linker_flag'. 7282d6c0b56eSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 7283d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 7284d6c0b56eSmrg ;; 7285d6c0b56eSmrg esac 7286d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7287d6c0b56eSmrg 7288d6c0b56eSmrg output_verbose_link_cmd='func_echo_all' 7289d6c0b56eSmrg 7290d6c0b56eSmrg # Archives containing C++ object files must be created using 7291d6c0b56eSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 7292d6c0b56eSmrg # necessary to make sure instantiated templates are included 7293d6c0b56eSmrg # in the archive. 7294d6c0b56eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 7295d6c0b56eSmrg ;; 7296d6c0b56eSmrg gcx*) 7297d6c0b56eSmrg # Green Hills C++ Compiler 7298d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7299d6c0b56eSmrg 7300d6c0b56eSmrg # The C++ compiler must be used to create the archive. 7301d6c0b56eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 7302d6c0b56eSmrg ;; 7303d6c0b56eSmrg *) 7304d6c0b56eSmrg # GNU C++ compiler with Solaris linker 7305d6c0b56eSmrg if test yes,no = "$GXX,$with_gnu_ld"; then 7306d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 7307d6c0b56eSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 7308d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7309d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7310d6c0b56eSmrg $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' 7311d6c0b56eSmrg 7312d6c0b56eSmrg # Commands to make compiler produce verbose output that lists 7313d6c0b56eSmrg # what "hidden" libraries, object files and flags are used when 7314d6c0b56eSmrg # linking a shared library. 7315d6c0b56eSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7316d6c0b56eSmrg else 7317d6c0b56eSmrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 7318d6c0b56eSmrg # platform. 7319d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 7320d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 7321d6c0b56eSmrg $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' 7322d6c0b56eSmrg 7323d6c0b56eSmrg # Commands to make compiler produce verbose output that lists 7324d6c0b56eSmrg # what "hidden" libraries, object files and flags are used when 7325d6c0b56eSmrg # linking a shared library. 7326d6c0b56eSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 7327d6c0b56eSmrg fi 7328d6c0b56eSmrg 7329d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 7330d6c0b56eSmrg case $host_os in 7331d6c0b56eSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 7332d6c0b56eSmrg *) 7333d6c0b56eSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 7334d6c0b56eSmrg ;; 7335d6c0b56eSmrg esac 7336d6c0b56eSmrg fi 7337d6c0b56eSmrg ;; 7338d6c0b56eSmrg esac 7339d6c0b56eSmrg ;; 7340d6c0b56eSmrg 7341d6c0b56eSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 7342d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7343d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7344d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7345d6c0b56eSmrg runpath_var='LD_RUN_PATH' 7346d6c0b56eSmrg 7347d6c0b56eSmrg case $cc_basename in 7348d6c0b56eSmrg CC*) 7349d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7350d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7351d6c0b56eSmrg ;; 7352d6c0b56eSmrg *) 7353d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7354d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7355d6c0b56eSmrg ;; 7356d6c0b56eSmrg esac 7357d6c0b56eSmrg ;; 7358d6c0b56eSmrg 7359d6c0b56eSmrg sysv5* | sco3.2v5* | sco5v6*) 7360d6c0b56eSmrg # Note: We CANNOT use -z defs as we might desire, because we do not 7361d6c0b56eSmrg # link with -lc, and that would cause any symbols used from libc to 7362d6c0b56eSmrg # always be unresolved, which means just about no library would 7363d6c0b56eSmrg # ever link correctly. If we're not using GNU ld we use -z text 7364d6c0b56eSmrg # though, which does catch some bad symbols but isn't as heavy-handed 7365d6c0b56eSmrg # as -z defs. 7366d6c0b56eSmrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 7367d6c0b56eSmrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 7368d6c0b56eSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 7369d6c0b56eSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 7370d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 7371d6c0b56eSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 7372d6c0b56eSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7373d6c0b56eSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 7374d6c0b56eSmrg runpath_var='LD_RUN_PATH' 7375d6c0b56eSmrg 7376d6c0b56eSmrg case $cc_basename in 7377d6c0b56eSmrg CC*) 7378d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7379d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7380d6c0b56eSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 7381d6c0b56eSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 7382d6c0b56eSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 7383d6c0b56eSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 7384d6c0b56eSmrg ;; 7385d6c0b56eSmrg *) 7386d6c0b56eSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7387d6c0b56eSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 7388d6c0b56eSmrg ;; 7389d6c0b56eSmrg esac 7390d6c0b56eSmrg ;; 7391d6c0b56eSmrg 7392d6c0b56eSmrg tandem*) 7393d6c0b56eSmrg case $cc_basename in 7394d6c0b56eSmrg NCC*) 7395d6c0b56eSmrg # NonStop-UX NCC 3.20 7396d6c0b56eSmrg # FIXME: insert proper C++ library support 7397d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7398d6c0b56eSmrg ;; 7399d6c0b56eSmrg *) 7400d6c0b56eSmrg # FIXME: insert proper C++ library support 7401d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7402d6c0b56eSmrg ;; 7403d6c0b56eSmrg esac 7404d6c0b56eSmrg ;; 7405d6c0b56eSmrg 7406d6c0b56eSmrg vxworks*) 7407d6c0b56eSmrg # FIXME: insert proper C++ library support 7408d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7409d6c0b56eSmrg ;; 7410d6c0b56eSmrg 7411d6c0b56eSmrg *) 7412d6c0b56eSmrg # FIXME: insert proper C++ library support 7413d6c0b56eSmrg _LT_TAGVAR(ld_shlibs, $1)=no 7414d6c0b56eSmrg ;; 7415d6c0b56eSmrg esac 7416d6c0b56eSmrg 7417d6c0b56eSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 7418d6c0b56eSmrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7419d6c0b56eSmrg 7420d6c0b56eSmrg _LT_TAGVAR(GCC, $1)=$GXX 7421d6c0b56eSmrg _LT_TAGVAR(LD, $1)=$LD 7422d6c0b56eSmrg 7423d6c0b56eSmrg ## CAVEAT EMPTOR: 7424d6c0b56eSmrg ## There is no encapsulation within the following macros, do not change 7425d6c0b56eSmrg ## the running order or otherwise move them around unless you know exactly 7426d6c0b56eSmrg ## what you are doing... 7427d6c0b56eSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7428d6c0b56eSmrg _LT_COMPILER_PIC($1) 7429d6c0b56eSmrg _LT_COMPILER_C_O($1) 7430d6c0b56eSmrg _LT_COMPILER_FILE_LOCKS($1) 7431d6c0b56eSmrg _LT_LINKER_SHLIBS($1) 7432d6c0b56eSmrg _LT_SYS_DYNAMIC_LINKER($1) 7433d6c0b56eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7434d6c0b56eSmrg 7435d6c0b56eSmrg _LT_CONFIG($1) 7436d6c0b56eSmrg fi # test -n "$compiler" 7437d6c0b56eSmrg 7438d6c0b56eSmrg CC=$lt_save_CC 7439d6c0b56eSmrg CFLAGS=$lt_save_CFLAGS 7440d6c0b56eSmrg LDCXX=$LD 7441d6c0b56eSmrg LD=$lt_save_LD 7442d6c0b56eSmrg GCC=$lt_save_GCC 7443d6c0b56eSmrg with_gnu_ld=$lt_save_with_gnu_ld 7444d6c0b56eSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 7445d6c0b56eSmrg lt_cv_path_LD=$lt_save_path_LD 7446d6c0b56eSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 7447d6c0b56eSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 7448d6c0b56eSmrgfi # test yes != "$_lt_caught_CXX_error" 7449d6c0b56eSmrg 7450d6c0b56eSmrgAC_LANG_POP 7451d6c0b56eSmrg])# _LT_LANG_CXX_CONFIG 7452d6c0b56eSmrg 7453d6c0b56eSmrg 7454d6c0b56eSmrg# _LT_FUNC_STRIPNAME_CNF 7455d6c0b56eSmrg# ---------------------- 7456d6c0b56eSmrg# func_stripname_cnf prefix suffix name 7457d6c0b56eSmrg# strip PREFIX and SUFFIX off of NAME. 7458d6c0b56eSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7459d6c0b56eSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7460d6c0b56eSmrg# dot (in which case that matches only a dot). 7461d6c0b56eSmrg# 7462d6c0b56eSmrg# This function is identical to the (non-XSI) version of func_stripname, 7463d6c0b56eSmrg# except this one can be used by m4 code that may be executed by configure, 7464d6c0b56eSmrg# rather than the libtool script. 7465d6c0b56eSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 7466d6c0b56eSmrgAC_REQUIRE([_LT_DECL_SED]) 7467d6c0b56eSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 7468d6c0b56eSmrgfunc_stripname_cnf () 7469d6c0b56eSmrg{ 7470d6c0b56eSmrg case @S|@2 in 7471d6c0b56eSmrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 7472d6c0b56eSmrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 7473d6c0b56eSmrg esac 7474d6c0b56eSmrg} # func_stripname_cnf 7475d6c0b56eSmrg])# _LT_FUNC_STRIPNAME_CNF 7476d6c0b56eSmrg 7477d6c0b56eSmrg 7478d6c0b56eSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 7479d6c0b56eSmrg# --------------------------------- 7480d6c0b56eSmrg# Figure out "hidden" library dependencies from verbose 7481d6c0b56eSmrg# compiler output when linking a shared library. 7482d6c0b56eSmrg# Parse the compiler output and extract the necessary 7483d6c0b56eSmrg# objects, libraries and library flags. 7484d6c0b56eSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 7485d6c0b56eSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 7486d6c0b56eSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 7487d6c0b56eSmrg# Dependencies to place before and after the object being linked: 7488d6c0b56eSmrg_LT_TAGVAR(predep_objects, $1)= 7489d6c0b56eSmrg_LT_TAGVAR(postdep_objects, $1)= 7490d6c0b56eSmrg_LT_TAGVAR(predeps, $1)= 7491d6c0b56eSmrg_LT_TAGVAR(postdeps, $1)= 7492d6c0b56eSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7493d6c0b56eSmrg 7494d6c0b56eSmrgdnl we can't use the lt_simple_compile_test_code here, 7495d6c0b56eSmrgdnl because it contains code intended for an executable, 7496d6c0b56eSmrgdnl not a library. It's possible we should let each 7497d6c0b56eSmrgdnl tag define a new lt_????_link_test_code variable, 7498d6c0b56eSmrgdnl but it's only used here... 7499d6c0b56eSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 7500d6c0b56eSmrgint a; 7501d6c0b56eSmrgvoid foo (void) { a = 0; } 7502d6c0b56eSmrg_LT_EOF 7503d6c0b56eSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 7504d6c0b56eSmrgclass Foo 7505d6c0b56eSmrg{ 7506d6c0b56eSmrgpublic: 7507d6c0b56eSmrg Foo (void) { a = 0; } 7508d6c0b56eSmrgprivate: 7509d6c0b56eSmrg int a; 7510d6c0b56eSmrg}; 7511d6c0b56eSmrg_LT_EOF 7512d6c0b56eSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 7513d6c0b56eSmrg subroutine foo 7514d6c0b56eSmrg implicit none 7515d6c0b56eSmrg integer*4 a 7516d6c0b56eSmrg a=0 7517d6c0b56eSmrg return 7518d6c0b56eSmrg end 7519d6c0b56eSmrg_LT_EOF 7520d6c0b56eSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 7521d6c0b56eSmrg subroutine foo 7522d6c0b56eSmrg implicit none 7523d6c0b56eSmrg integer a 7524d6c0b56eSmrg a=0 7525d6c0b56eSmrg return 7526d6c0b56eSmrg end 7527d6c0b56eSmrg_LT_EOF 7528d6c0b56eSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 7529d6c0b56eSmrgpublic class foo { 7530d6c0b56eSmrg private int a; 7531d6c0b56eSmrg public void bar (void) { 7532d6c0b56eSmrg a = 0; 7533d6c0b56eSmrg } 7534d6c0b56eSmrg}; 7535d6c0b56eSmrg_LT_EOF 7536d6c0b56eSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 7537d6c0b56eSmrgpackage foo 7538d6c0b56eSmrgfunc foo() { 7539d6c0b56eSmrg} 7540d6c0b56eSmrg_LT_EOF 7541d6c0b56eSmrg]) 7542d6c0b56eSmrg 7543d6c0b56eSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 7544d6c0b56eSmrgcase "$CC $CFLAGS " in #( 7545d6c0b56eSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 7546d6c0b56eSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 7547d6c0b56eSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 7548d6c0b56eSmrgesac 7549d6c0b56eSmrg 7550d6c0b56eSmrgdnl Parse the compiler output and extract the necessary 7551d6c0b56eSmrgdnl objects, libraries and library flags. 7552d6c0b56eSmrgif AC_TRY_EVAL(ac_compile); then 7553d6c0b56eSmrg # Parse the compiler output and extract the necessary 7554d6c0b56eSmrg # objects, libraries and library flags. 7555d6c0b56eSmrg 7556d6c0b56eSmrg # Sentinel used to keep track of whether or not we are before 7557d6c0b56eSmrg # the conftest object file. 7558d6c0b56eSmrg pre_test_object_deps_done=no 7559d6c0b56eSmrg 7560d6c0b56eSmrg for p in `eval "$output_verbose_link_cmd"`; do 7561d6c0b56eSmrg case $prev$p in 7562d6c0b56eSmrg 7563d6c0b56eSmrg -L* | -R* | -l*) 7564d6c0b56eSmrg # Some compilers place space between "-{L,R}" and the path. 7565d6c0b56eSmrg # Remove the space. 7566d6c0b56eSmrg if test x-L = "$p" || 7567d6c0b56eSmrg test x-R = "$p"; then 7568d6c0b56eSmrg prev=$p 7569d6c0b56eSmrg continue 7570d6c0b56eSmrg fi 7571d6c0b56eSmrg 7572d6c0b56eSmrg # Expand the sysroot to ease extracting the directories later. 7573d6c0b56eSmrg if test -z "$prev"; then 7574d6c0b56eSmrg case $p in 7575d6c0b56eSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7576d6c0b56eSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7577d6c0b56eSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7578d6c0b56eSmrg esac 7579d6c0b56eSmrg fi 7580d6c0b56eSmrg case $p in 7581d6c0b56eSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7582d6c0b56eSmrg esac 7583d6c0b56eSmrg if test no = "$pre_test_object_deps_done"; then 7584d6c0b56eSmrg case $prev in 7585d6c0b56eSmrg -L | -R) 7586d6c0b56eSmrg # Internal compiler library paths should come after those 7587d6c0b56eSmrg # provided the user. The postdeps already come after the 7588d6c0b56eSmrg # user supplied libs so there is no need to process them. 7589d6c0b56eSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7590d6c0b56eSmrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 7591d6c0b56eSmrg else 7592d6c0b56eSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 7593d6c0b56eSmrg fi 7594d6c0b56eSmrg ;; 7595d6c0b56eSmrg # The "-l" case would never come before the object being 7596d6c0b56eSmrg # linked, so don't bother handling this case. 7597d6c0b56eSmrg esac 7598d6c0b56eSmrg else 7599d6c0b56eSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7600d6c0b56eSmrg _LT_TAGVAR(postdeps, $1)=$prev$p 7601d6c0b56eSmrg else 7602d6c0b56eSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 7603d6c0b56eSmrg fi 7604d6c0b56eSmrg fi 7605d6c0b56eSmrg prev= 7606d6c0b56eSmrg ;; 7607d6c0b56eSmrg 7608d6c0b56eSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 7609d6c0b56eSmrg *.$objext) 7610d6c0b56eSmrg # This assumes that the test object file only shows up 7611d6c0b56eSmrg # once in the compiler output. 7612d6c0b56eSmrg if test "$p" = "conftest.$objext"; then 7613d6c0b56eSmrg pre_test_object_deps_done=yes 7614d6c0b56eSmrg continue 7615d6c0b56eSmrg fi 7616d6c0b56eSmrg 7617d6c0b56eSmrg if test no = "$pre_test_object_deps_done"; then 7618d6c0b56eSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7619d6c0b56eSmrg _LT_TAGVAR(predep_objects, $1)=$p 7620d6c0b56eSmrg else 7621d6c0b56eSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7622d6c0b56eSmrg fi 7623d6c0b56eSmrg else 7624d6c0b56eSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7625d6c0b56eSmrg _LT_TAGVAR(postdep_objects, $1)=$p 7626d6c0b56eSmrg else 7627d6c0b56eSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7628d6c0b56eSmrg fi 7629d6c0b56eSmrg fi 7630d6c0b56eSmrg ;; 7631d6c0b56eSmrg 7632d6c0b56eSmrg *) ;; # Ignore the rest. 7633d6c0b56eSmrg 7634d6c0b56eSmrg esac 7635d6c0b56eSmrg done 7636d6c0b56eSmrg 7637d6c0b56eSmrg # Clean up. 7638d6c0b56eSmrg rm -f a.out a.exe 7639d6c0b56eSmrgelse 7640d6c0b56eSmrg echo "libtool.m4: error: problem compiling $1 test program" 7641d6c0b56eSmrgfi 7642d6c0b56eSmrg 7643d6c0b56eSmrg$RM -f confest.$objext 7644d6c0b56eSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 7645d6c0b56eSmrg 7646d6c0b56eSmrg# PORTME: override above test on systems where it is broken 7647d6c0b56eSmrgm4_if([$1], [CXX], 7648d6c0b56eSmrg[case $host_os in 7649d6c0b56eSmrginterix[[3-9]]*) 7650d6c0b56eSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7651d6c0b56eSmrg # hack all around it, let's just trust "g++" to DTRT. 7652d6c0b56eSmrg _LT_TAGVAR(predep_objects,$1)= 7653d6c0b56eSmrg _LT_TAGVAR(postdep_objects,$1)= 7654d6c0b56eSmrg _LT_TAGVAR(postdeps,$1)= 7655d6c0b56eSmrg ;; 7656d6c0b56eSmrgesac 7657d6c0b56eSmrg]) 7658d6c0b56eSmrg 7659d6c0b56eSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 7660d6c0b56eSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7661d6c0b56eSmrgesac 7662d6c0b56eSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7663d6c0b56eSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7664d6c0b56eSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 7665d6c0b56eSmrgfi 7666d6c0b56eSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7667d6c0b56eSmrg [The directories searched by this compiler when creating a shared library]) 7668d6c0b56eSmrg_LT_TAGDECL([], [predep_objects], [1], 7669d6c0b56eSmrg [Dependencies to place before and after the objects being linked to 7670d6c0b56eSmrg create a shared library]) 7671d6c0b56eSmrg_LT_TAGDECL([], [postdep_objects], [1]) 7672d6c0b56eSmrg_LT_TAGDECL([], [predeps], [1]) 7673d6c0b56eSmrg_LT_TAGDECL([], [postdeps], [1]) 7674d6c0b56eSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7675d6c0b56eSmrg [The library search path used internally by the compiler when linking 7676d6c0b56eSmrg a shared library]) 7677d6c0b56eSmrg])# _LT_SYS_HIDDEN_LIBDEPS 7678d6c0b56eSmrg 7679d6c0b56eSmrg 7680d6c0b56eSmrg# _LT_LANG_F77_CONFIG([TAG]) 7681d6c0b56eSmrg# -------------------------- 7682d6c0b56eSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 7683d6c0b56eSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7684d6c0b56eSmrg# to write the compiler configuration to 'libtool'. 7685d6c0b56eSmrgm4_defun([_LT_LANG_F77_CONFIG], 7686d6c0b56eSmrg[AC_LANG_PUSH(Fortran 77) 7687d6c0b56eSmrgif test -z "$F77" || test no = "$F77"; then 7688d6c0b56eSmrg _lt_disable_F77=yes 7689d6c0b56eSmrgfi 7690d6c0b56eSmrg 7691d6c0b56eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7692d6c0b56eSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7693d6c0b56eSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7694d6c0b56eSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7695d6c0b56eSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7696d6c0b56eSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7697d6c0b56eSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7698d6c0b56eSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7699d6c0b56eSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7700d6c0b56eSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7701d6c0b56eSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7702d6c0b56eSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7703d6c0b56eSmrg_LT_TAGVAR(module_cmds, $1)= 7704d6c0b56eSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7705d6c0b56eSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7706d6c0b56eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7707d6c0b56eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7708d6c0b56eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7709d6c0b56eSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7710d6c0b56eSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7711d6c0b56eSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7712d6c0b56eSmrg 7713d6c0b56eSmrg# Source file extension for f77 test sources. 7714d6c0b56eSmrgac_ext=f 7715d6c0b56eSmrg 7716d6c0b56eSmrg# Object file extension for compiled f77 test sources. 7717d6c0b56eSmrgobjext=o 7718d6c0b56eSmrg_LT_TAGVAR(objext, $1)=$objext 7719d6c0b56eSmrg 7720d6c0b56eSmrg# No sense in running all these tests if we already determined that 7721d6c0b56eSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 7722d6c0b56eSmrg# are currently assumed to apply to all compilers on this platform, 7723d6c0b56eSmrg# and will be corrupted by setting them based on a non-working compiler. 7724d6c0b56eSmrgif test yes != "$_lt_disable_F77"; then 7725d6c0b56eSmrg # Code to be used in simple compile tests 7726d6c0b56eSmrg lt_simple_compile_test_code="\ 7727d6c0b56eSmrg subroutine t 7728d6c0b56eSmrg return 7729d6c0b56eSmrg end 7730d6c0b56eSmrg" 7731d6c0b56eSmrg 7732d6c0b56eSmrg # Code to be used in simple link tests 7733d6c0b56eSmrg lt_simple_link_test_code="\ 7734d6c0b56eSmrg program t 7735d6c0b56eSmrg end 7736d6c0b56eSmrg" 7737d6c0b56eSmrg 7738d6c0b56eSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7739d6c0b56eSmrg _LT_TAG_COMPILER 7740d6c0b56eSmrg 7741d6c0b56eSmrg # save warnings/boilerplate of simple test code 7742d6c0b56eSmrg _LT_COMPILER_BOILERPLATE 7743d6c0b56eSmrg _LT_LINKER_BOILERPLATE 7744d6c0b56eSmrg 7745d6c0b56eSmrg # Allow CC to be a program name with arguments. 7746d6c0b56eSmrg lt_save_CC=$CC 7747d6c0b56eSmrg lt_save_GCC=$GCC 7748d6c0b56eSmrg lt_save_CFLAGS=$CFLAGS 7749d6c0b56eSmrg CC=${F77-"f77"} 7750d6c0b56eSmrg CFLAGS=$FFLAGS 7751d6c0b56eSmrg compiler=$CC 7752d6c0b56eSmrg _LT_TAGVAR(compiler, $1)=$CC 7753d6c0b56eSmrg _LT_CC_BASENAME([$compiler]) 7754d6c0b56eSmrg GCC=$G77 7755d6c0b56eSmrg if test -n "$compiler"; then 7756d6c0b56eSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7757d6c0b56eSmrg AC_MSG_RESULT([$can_build_shared]) 7758d6c0b56eSmrg 7759d6c0b56eSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7760d6c0b56eSmrg test no = "$can_build_shared" && enable_shared=no 7761d6c0b56eSmrg 7762d6c0b56eSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7763d6c0b56eSmrg # are all built from PIC. 7764d6c0b56eSmrg case $host_os in 7765d6c0b56eSmrg aix3*) 7766d6c0b56eSmrg test yes = "$enable_shared" && enable_static=no 7767d6c0b56eSmrg if test -n "$RANLIB"; then 7768d6c0b56eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7769d6c0b56eSmrg postinstall_cmds='$RANLIB $lib' 7770d6c0b56eSmrg fi 7771d6c0b56eSmrg ;; 7772d6c0b56eSmrg aix[[4-9]]*) 7773d6c0b56eSmrg if test ia64 != "$host_cpu"; then 7774d6c0b56eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7775d6c0b56eSmrg yes,aix,yes) ;; # shared object as lib.so file only 7776d6c0b56eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7777d6c0b56eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7778d6c0b56eSmrg esac 7779d6c0b56eSmrg fi 7780d6c0b56eSmrg ;; 7781d6c0b56eSmrg esac 7782d6c0b56eSmrg AC_MSG_RESULT([$enable_shared]) 7783d6c0b56eSmrg 7784d6c0b56eSmrg AC_MSG_CHECKING([whether to build static libraries]) 7785d6c0b56eSmrg # Make sure either enable_shared or enable_static is yes. 7786d6c0b56eSmrg test yes = "$enable_shared" || enable_static=yes 7787d6c0b56eSmrg AC_MSG_RESULT([$enable_static]) 7788d6c0b56eSmrg 7789d6c0b56eSmrg _LT_TAGVAR(GCC, $1)=$G77 7790d6c0b56eSmrg _LT_TAGVAR(LD, $1)=$LD 7791d6c0b56eSmrg 7792d6c0b56eSmrg ## CAVEAT EMPTOR: 7793d6c0b56eSmrg ## There is no encapsulation within the following macros, do not change 7794d6c0b56eSmrg ## the running order or otherwise move them around unless you know exactly 7795d6c0b56eSmrg ## what you are doing... 7796d6c0b56eSmrg _LT_COMPILER_PIC($1) 7797d6c0b56eSmrg _LT_COMPILER_C_O($1) 7798d6c0b56eSmrg _LT_COMPILER_FILE_LOCKS($1) 7799d6c0b56eSmrg _LT_LINKER_SHLIBS($1) 7800d6c0b56eSmrg _LT_SYS_DYNAMIC_LINKER($1) 7801d6c0b56eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7802d6c0b56eSmrg 7803d6c0b56eSmrg _LT_CONFIG($1) 7804d6c0b56eSmrg fi # test -n "$compiler" 7805d6c0b56eSmrg 7806d6c0b56eSmrg GCC=$lt_save_GCC 7807d6c0b56eSmrg CC=$lt_save_CC 7808d6c0b56eSmrg CFLAGS=$lt_save_CFLAGS 7809d6c0b56eSmrgfi # test yes != "$_lt_disable_F77" 7810d6c0b56eSmrg 7811d6c0b56eSmrgAC_LANG_POP 7812d6c0b56eSmrg])# _LT_LANG_F77_CONFIG 7813d6c0b56eSmrg 7814d6c0b56eSmrg 7815d6c0b56eSmrg# _LT_LANG_FC_CONFIG([TAG]) 7816d6c0b56eSmrg# ------------------------- 7817d6c0b56eSmrg# Ensure that the configuration variables for a Fortran compiler are 7818d6c0b56eSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7819d6c0b56eSmrg# to write the compiler configuration to 'libtool'. 7820d6c0b56eSmrgm4_defun([_LT_LANG_FC_CONFIG], 7821d6c0b56eSmrg[AC_LANG_PUSH(Fortran) 7822d6c0b56eSmrg 7823d6c0b56eSmrgif test -z "$FC" || test no = "$FC"; then 7824d6c0b56eSmrg _lt_disable_FC=yes 7825d6c0b56eSmrgfi 7826d6c0b56eSmrg 7827d6c0b56eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7828d6c0b56eSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 7829d6c0b56eSmrg_LT_TAGVAR(always_export_symbols, $1)=no 7830d6c0b56eSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7831d6c0b56eSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7832d6c0b56eSmrg_LT_TAGVAR(hardcode_direct, $1)=no 7833d6c0b56eSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7834d6c0b56eSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7835d6c0b56eSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7836d6c0b56eSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7837d6c0b56eSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 7838d6c0b56eSmrg_LT_TAGVAR(inherit_rpath, $1)=no 7839d6c0b56eSmrg_LT_TAGVAR(module_cmds, $1)= 7840d6c0b56eSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 7841d6c0b56eSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7842d6c0b56eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7843d6c0b56eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7844d6c0b56eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7845d6c0b56eSmrg_LT_TAGVAR(no_undefined_flag, $1)= 7846d6c0b56eSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7847d6c0b56eSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7848d6c0b56eSmrg 7849d6c0b56eSmrg# Source file extension for fc test sources. 7850d6c0b56eSmrgac_ext=${ac_fc_srcext-f} 7851d6c0b56eSmrg 7852d6c0b56eSmrg# Object file extension for compiled fc test sources. 7853d6c0b56eSmrgobjext=o 7854d6c0b56eSmrg_LT_TAGVAR(objext, $1)=$objext 7855d6c0b56eSmrg 7856d6c0b56eSmrg# No sense in running all these tests if we already determined that 7857d6c0b56eSmrg# the FC compiler isn't working. Some variables (like enable_shared) 7858d6c0b56eSmrg# are currently assumed to apply to all compilers on this platform, 7859d6c0b56eSmrg# and will be corrupted by setting them based on a non-working compiler. 7860d6c0b56eSmrgif test yes != "$_lt_disable_FC"; then 7861d6c0b56eSmrg # Code to be used in simple compile tests 7862d6c0b56eSmrg lt_simple_compile_test_code="\ 7863d6c0b56eSmrg subroutine t 7864d6c0b56eSmrg return 7865d6c0b56eSmrg end 7866d6c0b56eSmrg" 7867d6c0b56eSmrg 7868d6c0b56eSmrg # Code to be used in simple link tests 7869d6c0b56eSmrg lt_simple_link_test_code="\ 7870d6c0b56eSmrg program t 7871d6c0b56eSmrg end 7872d6c0b56eSmrg" 7873d6c0b56eSmrg 7874d6c0b56eSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7875d6c0b56eSmrg _LT_TAG_COMPILER 7876d6c0b56eSmrg 7877d6c0b56eSmrg # save warnings/boilerplate of simple test code 7878d6c0b56eSmrg _LT_COMPILER_BOILERPLATE 7879d6c0b56eSmrg _LT_LINKER_BOILERPLATE 7880d6c0b56eSmrg 7881d6c0b56eSmrg # Allow CC to be a program name with arguments. 7882d6c0b56eSmrg lt_save_CC=$CC 7883d6c0b56eSmrg lt_save_GCC=$GCC 7884d6c0b56eSmrg lt_save_CFLAGS=$CFLAGS 7885d6c0b56eSmrg CC=${FC-"f95"} 7886d6c0b56eSmrg CFLAGS=$FCFLAGS 7887d6c0b56eSmrg compiler=$CC 7888d6c0b56eSmrg GCC=$ac_cv_fc_compiler_gnu 7889d6c0b56eSmrg 7890d6c0b56eSmrg _LT_TAGVAR(compiler, $1)=$CC 7891d6c0b56eSmrg _LT_CC_BASENAME([$compiler]) 7892d6c0b56eSmrg 7893d6c0b56eSmrg if test -n "$compiler"; then 7894d6c0b56eSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7895d6c0b56eSmrg AC_MSG_RESULT([$can_build_shared]) 7896d6c0b56eSmrg 7897d6c0b56eSmrg AC_MSG_CHECKING([whether to build shared libraries]) 7898d6c0b56eSmrg test no = "$can_build_shared" && enable_shared=no 7899d6c0b56eSmrg 7900d6c0b56eSmrg # On AIX, shared libraries and static libraries use the same namespace, and 7901d6c0b56eSmrg # are all built from PIC. 7902d6c0b56eSmrg case $host_os in 7903d6c0b56eSmrg aix3*) 7904d6c0b56eSmrg test yes = "$enable_shared" && enable_static=no 7905d6c0b56eSmrg if test -n "$RANLIB"; then 7906d6c0b56eSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7907d6c0b56eSmrg postinstall_cmds='$RANLIB $lib' 7908d6c0b56eSmrg fi 7909d6c0b56eSmrg ;; 7910d6c0b56eSmrg aix[[4-9]]*) 7911d6c0b56eSmrg if test ia64 != "$host_cpu"; then 7912d6c0b56eSmrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 7913d6c0b56eSmrg yes,aix,yes) ;; # shared object as lib.so file only 7914d6c0b56eSmrg yes,svr4,*) ;; # shared object as lib.so archive member only 7915d6c0b56eSmrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 7916d6c0b56eSmrg esac 7917d6c0b56eSmrg fi 7918d6c0b56eSmrg ;; 7919d6c0b56eSmrg esac 7920d6c0b56eSmrg AC_MSG_RESULT([$enable_shared]) 7921d6c0b56eSmrg 7922d6c0b56eSmrg AC_MSG_CHECKING([whether to build static libraries]) 7923d6c0b56eSmrg # Make sure either enable_shared or enable_static is yes. 7924d6c0b56eSmrg test yes = "$enable_shared" || enable_static=yes 7925d6c0b56eSmrg AC_MSG_RESULT([$enable_static]) 7926d6c0b56eSmrg 7927d6c0b56eSmrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 7928d6c0b56eSmrg _LT_TAGVAR(LD, $1)=$LD 7929d6c0b56eSmrg 7930d6c0b56eSmrg ## CAVEAT EMPTOR: 7931d6c0b56eSmrg ## There is no encapsulation within the following macros, do not change 7932d6c0b56eSmrg ## the running order or otherwise move them around unless you know exactly 7933d6c0b56eSmrg ## what you are doing... 7934d6c0b56eSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 7935d6c0b56eSmrg _LT_COMPILER_PIC($1) 7936d6c0b56eSmrg _LT_COMPILER_C_O($1) 7937d6c0b56eSmrg _LT_COMPILER_FILE_LOCKS($1) 7938d6c0b56eSmrg _LT_LINKER_SHLIBS($1) 7939d6c0b56eSmrg _LT_SYS_DYNAMIC_LINKER($1) 7940d6c0b56eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 7941d6c0b56eSmrg 7942d6c0b56eSmrg _LT_CONFIG($1) 7943d6c0b56eSmrg fi # test -n "$compiler" 7944d6c0b56eSmrg 7945d6c0b56eSmrg GCC=$lt_save_GCC 7946d6c0b56eSmrg CC=$lt_save_CC 7947d6c0b56eSmrg CFLAGS=$lt_save_CFLAGS 7948d6c0b56eSmrgfi # test yes != "$_lt_disable_FC" 7949d6c0b56eSmrg 7950d6c0b56eSmrgAC_LANG_POP 7951d6c0b56eSmrg])# _LT_LANG_FC_CONFIG 7952d6c0b56eSmrg 7953d6c0b56eSmrg 7954d6c0b56eSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 7955d6c0b56eSmrg# -------------------------- 7956d6c0b56eSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7957d6c0b56eSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7958d6c0b56eSmrg# to write the compiler configuration to 'libtool'. 7959d6c0b56eSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 7960d6c0b56eSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7961d6c0b56eSmrgAC_LANG_SAVE 7962d6c0b56eSmrg 7963d6c0b56eSmrg# Source file extension for Java test sources. 7964d6c0b56eSmrgac_ext=java 7965d6c0b56eSmrg 7966d6c0b56eSmrg# Object file extension for compiled Java test sources. 7967d6c0b56eSmrgobjext=o 7968d6c0b56eSmrg_LT_TAGVAR(objext, $1)=$objext 7969d6c0b56eSmrg 7970d6c0b56eSmrg# Code to be used in simple compile tests 7971d6c0b56eSmrglt_simple_compile_test_code="class foo {}" 7972d6c0b56eSmrg 7973d6c0b56eSmrg# Code to be used in simple link tests 7974d6c0b56eSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 7975d6c0b56eSmrg 7976d6c0b56eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7977d6c0b56eSmrg_LT_TAG_COMPILER 7978d6c0b56eSmrg 7979d6c0b56eSmrg# save warnings/boilerplate of simple test code 7980d6c0b56eSmrg_LT_COMPILER_BOILERPLATE 7981d6c0b56eSmrg_LT_LINKER_BOILERPLATE 7982d6c0b56eSmrg 7983d6c0b56eSmrg# Allow CC to be a program name with arguments. 7984d6c0b56eSmrglt_save_CC=$CC 7985d6c0b56eSmrglt_save_CFLAGS=$CFLAGS 7986d6c0b56eSmrglt_save_GCC=$GCC 7987d6c0b56eSmrgGCC=yes 7988d6c0b56eSmrgCC=${GCJ-"gcj"} 7989d6c0b56eSmrgCFLAGS=$GCJFLAGS 7990d6c0b56eSmrgcompiler=$CC 7991d6c0b56eSmrg_LT_TAGVAR(compiler, $1)=$CC 7992d6c0b56eSmrg_LT_TAGVAR(LD, $1)=$LD 7993d6c0b56eSmrg_LT_CC_BASENAME([$compiler]) 7994d6c0b56eSmrg 7995d6c0b56eSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7996d6c0b56eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7997d6c0b56eSmrg 7998d6c0b56eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7999d6c0b56eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8000d6c0b56eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8001d6c0b56eSmrg 8002d6c0b56eSmrgif test -n "$compiler"; then 8003d6c0b56eSmrg _LT_COMPILER_NO_RTTI($1) 8004d6c0b56eSmrg _LT_COMPILER_PIC($1) 8005d6c0b56eSmrg _LT_COMPILER_C_O($1) 8006d6c0b56eSmrg _LT_COMPILER_FILE_LOCKS($1) 8007d6c0b56eSmrg _LT_LINKER_SHLIBS($1) 8008d6c0b56eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8009d6c0b56eSmrg 8010d6c0b56eSmrg _LT_CONFIG($1) 8011d6c0b56eSmrgfi 8012d6c0b56eSmrg 8013d6c0b56eSmrgAC_LANG_RESTORE 8014d6c0b56eSmrg 8015d6c0b56eSmrgGCC=$lt_save_GCC 8016d6c0b56eSmrgCC=$lt_save_CC 8017d6c0b56eSmrgCFLAGS=$lt_save_CFLAGS 8018d6c0b56eSmrg])# _LT_LANG_GCJ_CONFIG 8019d6c0b56eSmrg 8020d6c0b56eSmrg 8021d6c0b56eSmrg# _LT_LANG_GO_CONFIG([TAG]) 8022d6c0b56eSmrg# -------------------------- 8023d6c0b56eSmrg# Ensure that the configuration variables for the GNU Go compiler 8024d6c0b56eSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8025d6c0b56eSmrg# to write the compiler configuration to 'libtool'. 8026d6c0b56eSmrgm4_defun([_LT_LANG_GO_CONFIG], 8027d6c0b56eSmrg[AC_REQUIRE([LT_PROG_GO])dnl 8028d6c0b56eSmrgAC_LANG_SAVE 8029d6c0b56eSmrg 8030d6c0b56eSmrg# Source file extension for Go test sources. 8031d6c0b56eSmrgac_ext=go 8032d6c0b56eSmrg 8033d6c0b56eSmrg# Object file extension for compiled Go test sources. 8034d6c0b56eSmrgobjext=o 8035d6c0b56eSmrg_LT_TAGVAR(objext, $1)=$objext 8036d6c0b56eSmrg 8037d6c0b56eSmrg# Code to be used in simple compile tests 8038d6c0b56eSmrglt_simple_compile_test_code="package main; func main() { }" 8039d6c0b56eSmrg 8040d6c0b56eSmrg# Code to be used in simple link tests 8041d6c0b56eSmrglt_simple_link_test_code='package main; func main() { }' 8042d6c0b56eSmrg 8043d6c0b56eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8044d6c0b56eSmrg_LT_TAG_COMPILER 8045d6c0b56eSmrg 8046d6c0b56eSmrg# save warnings/boilerplate of simple test code 8047d6c0b56eSmrg_LT_COMPILER_BOILERPLATE 8048d6c0b56eSmrg_LT_LINKER_BOILERPLATE 8049d6c0b56eSmrg 8050d6c0b56eSmrg# Allow CC to be a program name with arguments. 8051d6c0b56eSmrglt_save_CC=$CC 8052d6c0b56eSmrglt_save_CFLAGS=$CFLAGS 8053d6c0b56eSmrglt_save_GCC=$GCC 8054d6c0b56eSmrgGCC=yes 8055d6c0b56eSmrgCC=${GOC-"gccgo"} 8056d6c0b56eSmrgCFLAGS=$GOFLAGS 8057d6c0b56eSmrgcompiler=$CC 8058d6c0b56eSmrg_LT_TAGVAR(compiler, $1)=$CC 8059d6c0b56eSmrg_LT_TAGVAR(LD, $1)=$LD 8060d6c0b56eSmrg_LT_CC_BASENAME([$compiler]) 8061d6c0b56eSmrg 8062d6c0b56eSmrg# Go did not exist at the time GCC didn't implicitly link libc in. 8063d6c0b56eSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 8064d6c0b56eSmrg 8065d6c0b56eSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 8066d6c0b56eSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 8067d6c0b56eSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 8068d6c0b56eSmrg 8069d6c0b56eSmrgif test -n "$compiler"; then 8070d6c0b56eSmrg _LT_COMPILER_NO_RTTI($1) 8071d6c0b56eSmrg _LT_COMPILER_PIC($1) 8072d6c0b56eSmrg _LT_COMPILER_C_O($1) 8073d6c0b56eSmrg _LT_COMPILER_FILE_LOCKS($1) 8074d6c0b56eSmrg _LT_LINKER_SHLIBS($1) 8075d6c0b56eSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 8076d6c0b56eSmrg 8077d6c0b56eSmrg _LT_CONFIG($1) 8078d6c0b56eSmrgfi 8079d6c0b56eSmrg 8080d6c0b56eSmrgAC_LANG_RESTORE 8081d6c0b56eSmrg 8082d6c0b56eSmrgGCC=$lt_save_GCC 8083d6c0b56eSmrgCC=$lt_save_CC 8084d6c0b56eSmrgCFLAGS=$lt_save_CFLAGS 8085d6c0b56eSmrg])# _LT_LANG_GO_CONFIG 8086d6c0b56eSmrg 8087d6c0b56eSmrg 8088d6c0b56eSmrg# _LT_LANG_RC_CONFIG([TAG]) 8089d6c0b56eSmrg# ------------------------- 8090d6c0b56eSmrg# Ensure that the configuration variables for the Windows resource compiler 8091d6c0b56eSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 8092d6c0b56eSmrg# to write the compiler configuration to 'libtool'. 8093d6c0b56eSmrgm4_defun([_LT_LANG_RC_CONFIG], 8094d6c0b56eSmrg[AC_REQUIRE([LT_PROG_RC])dnl 8095d6c0b56eSmrgAC_LANG_SAVE 8096d6c0b56eSmrg 8097d6c0b56eSmrg# Source file extension for RC test sources. 8098d6c0b56eSmrgac_ext=rc 8099d6c0b56eSmrg 8100d6c0b56eSmrg# Object file extension for compiled RC test sources. 8101d6c0b56eSmrgobjext=o 8102d6c0b56eSmrg_LT_TAGVAR(objext, $1)=$objext 8103d6c0b56eSmrg 8104d6c0b56eSmrg# Code to be used in simple compile tests 8105d6c0b56eSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8106d6c0b56eSmrg 8107d6c0b56eSmrg# Code to be used in simple link tests 8108d6c0b56eSmrglt_simple_link_test_code=$lt_simple_compile_test_code 8109d6c0b56eSmrg 8110d6c0b56eSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 8111d6c0b56eSmrg_LT_TAG_COMPILER 8112d6c0b56eSmrg 8113d6c0b56eSmrg# save warnings/boilerplate of simple test code 8114d6c0b56eSmrg_LT_COMPILER_BOILERPLATE 8115d6c0b56eSmrg_LT_LINKER_BOILERPLATE 8116d6c0b56eSmrg 8117d6c0b56eSmrg# Allow CC to be a program name with arguments. 8118d6c0b56eSmrglt_save_CC=$CC 8119d6c0b56eSmrglt_save_CFLAGS=$CFLAGS 8120d6c0b56eSmrglt_save_GCC=$GCC 8121d6c0b56eSmrgGCC= 8122d6c0b56eSmrgCC=${RC-"windres"} 8123d6c0b56eSmrgCFLAGS= 8124d6c0b56eSmrgcompiler=$CC 8125d6c0b56eSmrg_LT_TAGVAR(compiler, $1)=$CC 8126d6c0b56eSmrg_LT_CC_BASENAME([$compiler]) 8127d6c0b56eSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8128d6c0b56eSmrg 8129d6c0b56eSmrgif test -n "$compiler"; then 8130d6c0b56eSmrg : 8131d6c0b56eSmrg _LT_CONFIG($1) 8132d6c0b56eSmrgfi 8133d6c0b56eSmrg 8134d6c0b56eSmrgGCC=$lt_save_GCC 8135d6c0b56eSmrgAC_LANG_RESTORE 8136d6c0b56eSmrgCC=$lt_save_CC 8137d6c0b56eSmrgCFLAGS=$lt_save_CFLAGS 8138d6c0b56eSmrg])# _LT_LANG_RC_CONFIG 8139d6c0b56eSmrg 8140d6c0b56eSmrg 8141d6c0b56eSmrg# LT_PROG_GCJ 8142d6c0b56eSmrg# ----------- 8143d6c0b56eSmrgAC_DEFUN([LT_PROG_GCJ], 8144d6c0b56eSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 8145d6c0b56eSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 8146d6c0b56eSmrg [AC_CHECK_TOOL(GCJ, gcj,) 8147d6c0b56eSmrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 8148d6c0b56eSmrg AC_SUBST(GCJFLAGS)])])[]dnl 8149d6c0b56eSmrg]) 8150d6c0b56eSmrg 8151d6c0b56eSmrg# Old name: 8152d6c0b56eSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 8153d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 8154d6c0b56eSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 8155d6c0b56eSmrg 8156d6c0b56eSmrg 8157d6c0b56eSmrg# LT_PROG_GO 8158d6c0b56eSmrg# ---------- 8159d6c0b56eSmrgAC_DEFUN([LT_PROG_GO], 8160d6c0b56eSmrg[AC_CHECK_TOOL(GOC, gccgo,) 8161d6c0b56eSmrg]) 8162d6c0b56eSmrg 8163d6c0b56eSmrg 8164d6c0b56eSmrg# LT_PROG_RC 8165d6c0b56eSmrg# ---------- 8166d6c0b56eSmrgAC_DEFUN([LT_PROG_RC], 8167d6c0b56eSmrg[AC_CHECK_TOOL(RC, windres,) 8168d6c0b56eSmrg]) 8169d6c0b56eSmrg 8170d6c0b56eSmrg# Old name: 8171d6c0b56eSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 8172d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 8173d6c0b56eSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 8174d6c0b56eSmrg 8175d6c0b56eSmrg 8176d6c0b56eSmrg# _LT_DECL_EGREP 8177d6c0b56eSmrg# -------------- 8178d6c0b56eSmrg# If we don't have a new enough Autoconf to choose the best grep 8179d6c0b56eSmrg# available, choose the one first in the user's PATH. 8180d6c0b56eSmrgm4_defun([_LT_DECL_EGREP], 8181d6c0b56eSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 8182d6c0b56eSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 8183d6c0b56eSmrgtest -z "$GREP" && GREP=grep 8184d6c0b56eSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 8185d6c0b56eSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 8186d6c0b56eSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 8187d6c0b56eSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 8188d6c0b56eSmrgAC_SUBST([GREP]) 8189d6c0b56eSmrg]) 8190d6c0b56eSmrg 8191d6c0b56eSmrg 8192d6c0b56eSmrg# _LT_DECL_OBJDUMP 8193d6c0b56eSmrg# -------------- 8194d6c0b56eSmrg# If we don't have a new enough Autoconf to choose the best objdump 8195d6c0b56eSmrg# available, choose the one first in the user's PATH. 8196d6c0b56eSmrgm4_defun([_LT_DECL_OBJDUMP], 8197d6c0b56eSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 8198d6c0b56eSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8199d6c0b56eSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 8200d6c0b56eSmrgAC_SUBST([OBJDUMP]) 8201d6c0b56eSmrg]) 8202d6c0b56eSmrg 8203d6c0b56eSmrg# _LT_DECL_DLLTOOL 8204d6c0b56eSmrg# ---------------- 8205d6c0b56eSmrg# Ensure DLLTOOL variable is set. 8206d6c0b56eSmrgm4_defun([_LT_DECL_DLLTOOL], 8207d6c0b56eSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8208d6c0b56eSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8209d6c0b56eSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 8210d6c0b56eSmrgAC_SUBST([DLLTOOL]) 8211d6c0b56eSmrg]) 8212d6c0b56eSmrg 8213d6c0b56eSmrg# _LT_DECL_SED 8214d6c0b56eSmrg# ------------ 8215d6c0b56eSmrg# Check for a fully-functional sed program, that truncates 8216d6c0b56eSmrg# as few characters as possible. Prefer GNU sed if found. 8217d6c0b56eSmrgm4_defun([_LT_DECL_SED], 8218d6c0b56eSmrg[AC_PROG_SED 8219d6c0b56eSmrgtest -z "$SED" && SED=sed 8220d6c0b56eSmrgXsed="$SED -e 1s/^X//" 8221d6c0b56eSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 8222d6c0b56eSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 8223d6c0b56eSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 8224d6c0b56eSmrg])# _LT_DECL_SED 8225d6c0b56eSmrg 8226d6c0b56eSmrgm4_ifndef([AC_PROG_SED], [ 8227d6c0b56eSmrg# NOTE: This macro has been submitted for inclusion into # 8228d6c0b56eSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 8229d6c0b56eSmrg# a released version of Autoconf we should remove this # 8230d6c0b56eSmrg# macro and use it instead. # 8231d6c0b56eSmrg 8232d6c0b56eSmrgm4_defun([AC_PROG_SED], 8233d6c0b56eSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 8234d6c0b56eSmrgAC_CACHE_VAL(lt_cv_path_SED, 8235d6c0b56eSmrg[# Loop through the user's path and test for sed and gsed. 8236d6c0b56eSmrg# Then use that list of sed's as ones to test for truncation. 8237d6c0b56eSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8238d6c0b56eSmrgfor as_dir in $PATH 8239d6c0b56eSmrgdo 8240d6c0b56eSmrg IFS=$as_save_IFS 8241d6c0b56eSmrg test -z "$as_dir" && as_dir=. 8242d6c0b56eSmrg for lt_ac_prog in sed gsed; do 8243d6c0b56eSmrg for ac_exec_ext in '' $ac_executable_extensions; do 8244d6c0b56eSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 8245d6c0b56eSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 8246d6c0b56eSmrg fi 8247d6c0b56eSmrg done 8248d6c0b56eSmrg done 8249d6c0b56eSmrgdone 8250d6c0b56eSmrgIFS=$as_save_IFS 8251d6c0b56eSmrglt_ac_max=0 8252d6c0b56eSmrglt_ac_count=0 8253d6c0b56eSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 8254d6c0b56eSmrg# along with /bin/sed that truncates output. 8255d6c0b56eSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 8256d6c0b56eSmrg test ! -f "$lt_ac_sed" && continue 8257d6c0b56eSmrg cat /dev/null > conftest.in 8258d6c0b56eSmrg lt_ac_count=0 8259d6c0b56eSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 8260d6c0b56eSmrg # Check for GNU sed and select it if it is found. 8261d6c0b56eSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 8262d6c0b56eSmrg lt_cv_path_SED=$lt_ac_sed 8263d6c0b56eSmrg break 8264d6c0b56eSmrg fi 8265d6c0b56eSmrg while true; do 8266d6c0b56eSmrg cat conftest.in conftest.in >conftest.tmp 8267d6c0b56eSmrg mv conftest.tmp conftest.in 8268d6c0b56eSmrg cp conftest.in conftest.nl 8269d6c0b56eSmrg echo >>conftest.nl 8270d6c0b56eSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 8271d6c0b56eSmrg cmp -s conftest.out conftest.nl || break 8272d6c0b56eSmrg # 10000 chars as input seems more than enough 8273d6c0b56eSmrg test 10 -lt "$lt_ac_count" && break 8274d6c0b56eSmrg lt_ac_count=`expr $lt_ac_count + 1` 8275d6c0b56eSmrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 8276d6c0b56eSmrg lt_ac_max=$lt_ac_count 8277d6c0b56eSmrg lt_cv_path_SED=$lt_ac_sed 8278d6c0b56eSmrg fi 8279d6c0b56eSmrg done 8280d6c0b56eSmrgdone 8281d6c0b56eSmrg]) 8282d6c0b56eSmrgSED=$lt_cv_path_SED 8283d6c0b56eSmrgAC_SUBST([SED]) 8284d6c0b56eSmrgAC_MSG_RESULT([$SED]) 8285d6c0b56eSmrg])#AC_PROG_SED 8286d6c0b56eSmrg])#m4_ifndef 8287d6c0b56eSmrg 8288d6c0b56eSmrg# Old name: 8289d6c0b56eSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 8290d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 8291d6c0b56eSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8292d6c0b56eSmrg 8293d6c0b56eSmrg 8294d6c0b56eSmrg# _LT_CHECK_SHELL_FEATURES 8295d6c0b56eSmrg# ------------------------ 8296d6c0b56eSmrg# Find out whether the shell is Bourne or XSI compatible, 8297d6c0b56eSmrg# or has some other useful features. 8298d6c0b56eSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 8299d6c0b56eSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 8300d6c0b56eSmrg lt_unset=unset 8301d6c0b56eSmrgelse 8302d6c0b56eSmrg lt_unset=false 8303d6c0b56eSmrgfi 8304d6c0b56eSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 8305d6c0b56eSmrg 8306d6c0b56eSmrg# test EBCDIC or ASCII 8307d6c0b56eSmrgcase `echo X|tr X '\101'` in 8308d6c0b56eSmrg A) # ASCII based system 8309d6c0b56eSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 8310d6c0b56eSmrg lt_SP2NL='tr \040 \012' 8311d6c0b56eSmrg lt_NL2SP='tr \015\012 \040\040' 8312d6c0b56eSmrg ;; 8313d6c0b56eSmrg *) # EBCDIC based system 8314d6c0b56eSmrg lt_SP2NL='tr \100 \n' 8315d6c0b56eSmrg lt_NL2SP='tr \r\n \100\100' 8316d6c0b56eSmrg ;; 8317d6c0b56eSmrgesac 8318d6c0b56eSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 8319d6c0b56eSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 8320d6c0b56eSmrg])# _LT_CHECK_SHELL_FEATURES 8321d6c0b56eSmrg 8322d6c0b56eSmrg 8323d6c0b56eSmrg# _LT_PATH_CONVERSION_FUNCTIONS 8324d6c0b56eSmrg# ----------------------------- 8325d6c0b56eSmrg# Determine what file name conversion functions should be used by 8326d6c0b56eSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 8327d6c0b56eSmrg# for certain cross-compile configurations and native mingw. 8328d6c0b56eSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 8329d6c0b56eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8330d6c0b56eSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 8331d6c0b56eSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 8332d6c0b56eSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 8333d6c0b56eSmrg[case $host in 8334d6c0b56eSmrg *-*-mingw* ) 8335d6c0b56eSmrg case $build in 8336d6c0b56eSmrg *-*-mingw* ) # actually msys 8337d6c0b56eSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 8338d6c0b56eSmrg ;; 8339d6c0b56eSmrg *-*-cygwin* ) 8340d6c0b56eSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 8341d6c0b56eSmrg ;; 8342d6c0b56eSmrg * ) # otherwise, assume *nix 8343d6c0b56eSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 8344d6c0b56eSmrg ;; 8345d6c0b56eSmrg esac 8346d6c0b56eSmrg ;; 8347d6c0b56eSmrg *-*-cygwin* ) 8348d6c0b56eSmrg case $build in 8349d6c0b56eSmrg *-*-mingw* ) # actually msys 8350d6c0b56eSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 8351d6c0b56eSmrg ;; 8352d6c0b56eSmrg *-*-cygwin* ) 8353d6c0b56eSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 8354d6c0b56eSmrg ;; 8355d6c0b56eSmrg * ) # otherwise, assume *nix 8356d6c0b56eSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 8357d6c0b56eSmrg ;; 8358d6c0b56eSmrg esac 8359d6c0b56eSmrg ;; 8360d6c0b56eSmrg * ) # unhandled hosts (and "normal" native builds) 8361d6c0b56eSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 8362d6c0b56eSmrg ;; 8363d6c0b56eSmrgesac 8364d6c0b56eSmrg]) 8365d6c0b56eSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 8366d6c0b56eSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 8367d6c0b56eSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 8368d6c0b56eSmrg [0], [convert $build file names to $host format])dnl 8369d6c0b56eSmrg 8370d6c0b56eSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 8371d6c0b56eSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 8372d6c0b56eSmrg[#assume ordinary cross tools, or native build. 8373d6c0b56eSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 8374d6c0b56eSmrgcase $host in 8375d6c0b56eSmrg *-*-mingw* ) 8376d6c0b56eSmrg case $build in 8377d6c0b56eSmrg *-*-mingw* ) # actually msys 8378d6c0b56eSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 8379d6c0b56eSmrg ;; 8380d6c0b56eSmrg esac 8381d6c0b56eSmrg ;; 8382d6c0b56eSmrgesac 8383d6c0b56eSmrg]) 8384d6c0b56eSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 8385d6c0b56eSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 8386d6c0b56eSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 8387d6c0b56eSmrg [0], [convert $build files to toolchain format])dnl 8388d6c0b56eSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 8389d6c0b56eSmrg 8390d6c0b56eSmrg# Helper functions for option handling. -*- Autoconf -*- 8391d6c0b56eSmrg# 8392d6c0b56eSmrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 8393d6c0b56eSmrg# Foundation, Inc. 8394d6c0b56eSmrg# Written by Gary V. Vaughan, 2004 8395d6c0b56eSmrg# 8396d6c0b56eSmrg# This file is free software; the Free Software Foundation gives 8397d6c0b56eSmrg# unlimited permission to copy and/or distribute it, with or without 8398d6c0b56eSmrg# modifications, as long as this notice is preserved. 8399d6c0b56eSmrg 8400d6c0b56eSmrg# serial 8 ltoptions.m4 8401d6c0b56eSmrg 8402d6c0b56eSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8403d6c0b56eSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8404d6c0b56eSmrg 8405d6c0b56eSmrg 8406d6c0b56eSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8407d6c0b56eSmrg# ------------------------------------------ 8408d6c0b56eSmrgm4_define([_LT_MANGLE_OPTION], 8409d6c0b56eSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 8410d6c0b56eSmrg 8411d6c0b56eSmrg 8412d6c0b56eSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8413d6c0b56eSmrg# --------------------------------------- 8414d6c0b56eSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8415d6c0b56eSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8416d6c0b56eSmrg# saved as a flag. 8417d6c0b56eSmrgm4_define([_LT_SET_OPTION], 8418d6c0b56eSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8419d6c0b56eSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8420d6c0b56eSmrg _LT_MANGLE_DEFUN([$1], [$2]), 8421d6c0b56eSmrg [m4_warning([Unknown $1 option '$2'])])[]dnl 8422d6c0b56eSmrg]) 8423d6c0b56eSmrg 8424d6c0b56eSmrg 8425d6c0b56eSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8426d6c0b56eSmrg# ------------------------------------------------------------ 8427d6c0b56eSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8428d6c0b56eSmrgm4_define([_LT_IF_OPTION], 8429d6c0b56eSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8430d6c0b56eSmrg 8431d6c0b56eSmrg 8432d6c0b56eSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8433d6c0b56eSmrg# ------------------------------------------------------- 8434d6c0b56eSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8435d6c0b56eSmrg# are set. 8436d6c0b56eSmrgm4_define([_LT_UNLESS_OPTIONS], 8437d6c0b56eSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8438d6c0b56eSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8439d6c0b56eSmrg [m4_define([$0_found])])])[]dnl 8440d6c0b56eSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8441d6c0b56eSmrg])[]dnl 8442d6c0b56eSmrg]) 8443d6c0b56eSmrg 8444d6c0b56eSmrg 8445d6c0b56eSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8446d6c0b56eSmrg# ---------------------------------------- 8447d6c0b56eSmrg# OPTION-LIST is a space-separated list of Libtool options associated 8448d6c0b56eSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8449d6c0b56eSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8450d6c0b56eSmrg# the unknown option and exit. 8451d6c0b56eSmrgm4_defun([_LT_SET_OPTIONS], 8452d6c0b56eSmrg[# Set options 8453d6c0b56eSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8454d6c0b56eSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 8455d6c0b56eSmrg 8456d6c0b56eSmrgm4_if([$1],[LT_INIT],[ 8457d6c0b56eSmrg dnl 8458d6c0b56eSmrg dnl Simply set some default values (i.e off) if boolean options were not 8459d6c0b56eSmrg dnl specified: 8460d6c0b56eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8461d6c0b56eSmrg ]) 8462d6c0b56eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8463d6c0b56eSmrg ]) 8464d6c0b56eSmrg dnl 8465d6c0b56eSmrg dnl If no reference was made to various pairs of opposing options, then 8466d6c0b56eSmrg dnl we run the default mode handler for the pair. For example, if neither 8467d6c0b56eSmrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 8468d6c0b56eSmrg dnl archives by default: 8469d6c0b56eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8470d6c0b56eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8471d6c0b56eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8472d6c0b56eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8473d6c0b56eSmrg [_LT_ENABLE_FAST_INSTALL]) 8474d6c0b56eSmrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 8475d6c0b56eSmrg [_LT_WITH_AIX_SONAME([aix])]) 8476d6c0b56eSmrg ]) 8477d6c0b56eSmrg])# _LT_SET_OPTIONS 8478d6c0b56eSmrg 8479d6c0b56eSmrg 8480d6c0b56eSmrg 8481d6c0b56eSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8482d6c0b56eSmrg# ----------------------------------------- 8483d6c0b56eSmrgm4_define([_LT_MANGLE_DEFUN], 8484d6c0b56eSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8485d6c0b56eSmrg 8486d6c0b56eSmrg 8487d6c0b56eSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8488d6c0b56eSmrg# ----------------------------------------------- 8489d6c0b56eSmrgm4_define([LT_OPTION_DEFINE], 8490d6c0b56eSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8491d6c0b56eSmrg])# LT_OPTION_DEFINE 8492d6c0b56eSmrg 8493d6c0b56eSmrg 8494d6c0b56eSmrg# dlopen 8495d6c0b56eSmrg# ------ 8496d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8497d6c0b56eSmrg]) 8498d6c0b56eSmrg 8499d6c0b56eSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8500d6c0b56eSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8501d6c0b56eSmrgAC_DIAGNOSE([obsolete], 8502d6c0b56eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8503d6c0b56eSmrgput the 'dlopen' option into LT_INIT's first parameter.]) 8504d6c0b56eSmrg]) 8505d6c0b56eSmrg 8506d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 8507d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8508d6c0b56eSmrg 8509d6c0b56eSmrg 8510d6c0b56eSmrg# win32-dll 8511d6c0b56eSmrg# --------- 8512d6c0b56eSmrg# Declare package support for building win32 dll's. 8513d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8514d6c0b56eSmrg[enable_win32_dll=yes 8515d6c0b56eSmrg 8516d6c0b56eSmrgcase $host in 8517d6c0b56eSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8518d6c0b56eSmrg AC_CHECK_TOOL(AS, as, false) 8519d6c0b56eSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8520d6c0b56eSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8521d6c0b56eSmrg ;; 8522d6c0b56eSmrgesac 8523d6c0b56eSmrg 8524d6c0b56eSmrgtest -z "$AS" && AS=as 8525d6c0b56eSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 8526d6c0b56eSmrg 8527d6c0b56eSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8528d6c0b56eSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 8529d6c0b56eSmrg 8530d6c0b56eSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8531d6c0b56eSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8532d6c0b56eSmrg])# win32-dll 8533d6c0b56eSmrg 8534d6c0b56eSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8535d6c0b56eSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8536d6c0b56eSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8537d6c0b56eSmrgAC_DIAGNOSE([obsolete], 8538d6c0b56eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8539d6c0b56eSmrgput the 'win32-dll' option into LT_INIT's first parameter.]) 8540d6c0b56eSmrg]) 8541d6c0b56eSmrg 8542d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 8543d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8544d6c0b56eSmrg 8545d6c0b56eSmrg 8546d6c0b56eSmrg# _LT_ENABLE_SHARED([DEFAULT]) 8547d6c0b56eSmrg# ---------------------------- 8548d6c0b56eSmrg# implement the --enable-shared flag, and supports the 'shared' and 8549d6c0b56eSmrg# 'disable-shared' LT_INIT options. 8550d6c0b56eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8551d6c0b56eSmrgm4_define([_LT_ENABLE_SHARED], 8552d6c0b56eSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8553d6c0b56eSmrgAC_ARG_ENABLE([shared], 8554d6c0b56eSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8555d6c0b56eSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8556d6c0b56eSmrg [p=${PACKAGE-default} 8557d6c0b56eSmrg case $enableval in 8558d6c0b56eSmrg yes) enable_shared=yes ;; 8559d6c0b56eSmrg no) enable_shared=no ;; 8560d6c0b56eSmrg *) 8561d6c0b56eSmrg enable_shared=no 8562d6c0b56eSmrg # Look at the argument we got. We use all the common list separators. 8563d6c0b56eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8564d6c0b56eSmrg for pkg in $enableval; do 8565d6c0b56eSmrg IFS=$lt_save_ifs 8566d6c0b56eSmrg if test "X$pkg" = "X$p"; then 8567d6c0b56eSmrg enable_shared=yes 8568d6c0b56eSmrg fi 8569d6c0b56eSmrg done 8570d6c0b56eSmrg IFS=$lt_save_ifs 8571d6c0b56eSmrg ;; 8572d6c0b56eSmrg esac], 8573d6c0b56eSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8574d6c0b56eSmrg 8575d6c0b56eSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8576d6c0b56eSmrg [Whether or not to build shared libraries]) 8577d6c0b56eSmrg])# _LT_ENABLE_SHARED 8578d6c0b56eSmrg 8579d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8580d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8581d6c0b56eSmrg 8582d6c0b56eSmrg# Old names: 8583d6c0b56eSmrgAC_DEFUN([AC_ENABLE_SHARED], 8584d6c0b56eSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8585d6c0b56eSmrg]) 8586d6c0b56eSmrg 8587d6c0b56eSmrgAC_DEFUN([AC_DISABLE_SHARED], 8588d6c0b56eSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8589d6c0b56eSmrg]) 8590d6c0b56eSmrg 8591d6c0b56eSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8592d6c0b56eSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8593d6c0b56eSmrg 8594d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 8595d6c0b56eSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8596d6c0b56eSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8597d6c0b56eSmrg 8598d6c0b56eSmrg 8599d6c0b56eSmrg 8600d6c0b56eSmrg# _LT_ENABLE_STATIC([DEFAULT]) 8601d6c0b56eSmrg# ---------------------------- 8602d6c0b56eSmrg# implement the --enable-static flag, and support the 'static' and 8603d6c0b56eSmrg# 'disable-static' LT_INIT options. 8604d6c0b56eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8605d6c0b56eSmrgm4_define([_LT_ENABLE_STATIC], 8606d6c0b56eSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8607d6c0b56eSmrgAC_ARG_ENABLE([static], 8608d6c0b56eSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8609d6c0b56eSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8610d6c0b56eSmrg [p=${PACKAGE-default} 8611d6c0b56eSmrg case $enableval in 8612d6c0b56eSmrg yes) enable_static=yes ;; 8613d6c0b56eSmrg no) enable_static=no ;; 8614d6c0b56eSmrg *) 8615d6c0b56eSmrg enable_static=no 8616d6c0b56eSmrg # Look at the argument we got. We use all the common list separators. 8617d6c0b56eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8618d6c0b56eSmrg for pkg in $enableval; do 8619d6c0b56eSmrg IFS=$lt_save_ifs 8620d6c0b56eSmrg if test "X$pkg" = "X$p"; then 8621d6c0b56eSmrg enable_static=yes 8622d6c0b56eSmrg fi 8623d6c0b56eSmrg done 8624d6c0b56eSmrg IFS=$lt_save_ifs 8625d6c0b56eSmrg ;; 8626d6c0b56eSmrg esac], 8627d6c0b56eSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 8628d6c0b56eSmrg 8629d6c0b56eSmrg _LT_DECL([build_old_libs], [enable_static], [0], 8630d6c0b56eSmrg [Whether or not to build static libraries]) 8631d6c0b56eSmrg])# _LT_ENABLE_STATIC 8632d6c0b56eSmrg 8633d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8634d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8635d6c0b56eSmrg 8636d6c0b56eSmrg# Old names: 8637d6c0b56eSmrgAC_DEFUN([AC_ENABLE_STATIC], 8638d6c0b56eSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8639d6c0b56eSmrg]) 8640d6c0b56eSmrg 8641d6c0b56eSmrgAC_DEFUN([AC_DISABLE_STATIC], 8642d6c0b56eSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8643d6c0b56eSmrg]) 8644d6c0b56eSmrg 8645d6c0b56eSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8646d6c0b56eSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8647d6c0b56eSmrg 8648d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 8649d6c0b56eSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8650d6c0b56eSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8651d6c0b56eSmrg 8652d6c0b56eSmrg 8653d6c0b56eSmrg 8654d6c0b56eSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8655d6c0b56eSmrg# ---------------------------------- 8656d6c0b56eSmrg# implement the --enable-fast-install flag, and support the 'fast-install' 8657d6c0b56eSmrg# and 'disable-fast-install' LT_INIT options. 8658d6c0b56eSmrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 8659d6c0b56eSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 8660d6c0b56eSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8661d6c0b56eSmrgAC_ARG_ENABLE([fast-install], 8662d6c0b56eSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8663d6c0b56eSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8664d6c0b56eSmrg [p=${PACKAGE-default} 8665d6c0b56eSmrg case $enableval in 8666d6c0b56eSmrg yes) enable_fast_install=yes ;; 8667d6c0b56eSmrg no) enable_fast_install=no ;; 8668d6c0b56eSmrg *) 8669d6c0b56eSmrg enable_fast_install=no 8670d6c0b56eSmrg # Look at the argument we got. We use all the common list separators. 8671d6c0b56eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8672d6c0b56eSmrg for pkg in $enableval; do 8673d6c0b56eSmrg IFS=$lt_save_ifs 8674d6c0b56eSmrg if test "X$pkg" = "X$p"; then 8675d6c0b56eSmrg enable_fast_install=yes 8676d6c0b56eSmrg fi 8677d6c0b56eSmrg done 8678d6c0b56eSmrg IFS=$lt_save_ifs 8679d6c0b56eSmrg ;; 8680d6c0b56eSmrg esac], 8681d6c0b56eSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 8682d6c0b56eSmrg 8683d6c0b56eSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 8684d6c0b56eSmrg [Whether or not to optimize for fast installation])dnl 8685d6c0b56eSmrg])# _LT_ENABLE_FAST_INSTALL 8686d6c0b56eSmrg 8687d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8688d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8689d6c0b56eSmrg 8690d6c0b56eSmrg# Old names: 8691d6c0b56eSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8692d6c0b56eSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8693d6c0b56eSmrgAC_DIAGNOSE([obsolete], 8694d6c0b56eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8695d6c0b56eSmrgthe 'fast-install' option into LT_INIT's first parameter.]) 8696d6c0b56eSmrg]) 8697d6c0b56eSmrg 8698d6c0b56eSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8699d6c0b56eSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8700d6c0b56eSmrgAC_DIAGNOSE([obsolete], 8701d6c0b56eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8702d6c0b56eSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 8703d6c0b56eSmrg]) 8704d6c0b56eSmrg 8705d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 8706d6c0b56eSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8707d6c0b56eSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 8708d6c0b56eSmrg 8709d6c0b56eSmrg 8710d6c0b56eSmrg# _LT_WITH_AIX_SONAME([DEFAULT]) 8711d6c0b56eSmrg# ---------------------------------- 8712d6c0b56eSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 8713d6c0b56eSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 8714d6c0b56eSmrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 8715d6c0b56eSmrgm4_define([_LT_WITH_AIX_SONAME], 8716d6c0b56eSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 8717d6c0b56eSmrgshared_archive_member_spec= 8718d6c0b56eSmrgcase $host,$enable_shared in 8719d6c0b56eSmrgpower*-*-aix[[5-9]]*,yes) 8720d6c0b56eSmrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 8721d6c0b56eSmrg AC_ARG_WITH([aix-soname], 8722d6c0b56eSmrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 8723d6c0b56eSmrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 8724d6c0b56eSmrg [case $withval in 8725d6c0b56eSmrg aix|svr4|both) 8726d6c0b56eSmrg ;; 8727d6c0b56eSmrg *) 8728d6c0b56eSmrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 8729d6c0b56eSmrg ;; 8730d6c0b56eSmrg esac 8731d6c0b56eSmrg lt_cv_with_aix_soname=$with_aix_soname], 8732d6c0b56eSmrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 8733d6c0b56eSmrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 8734d6c0b56eSmrg with_aix_soname=$lt_cv_with_aix_soname]) 8735d6c0b56eSmrg AC_MSG_RESULT([$with_aix_soname]) 8736d6c0b56eSmrg if test aix != "$with_aix_soname"; then 8737d6c0b56eSmrg # For the AIX way of multilib, we name the shared archive member 8738d6c0b56eSmrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 8739d6c0b56eSmrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 8740d6c0b56eSmrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 8741d6c0b56eSmrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 8742d6c0b56eSmrg if test 64 = "${OBJECT_MODE-32}"; then 8743d6c0b56eSmrg shared_archive_member_spec=shr_64 8744d6c0b56eSmrg else 8745d6c0b56eSmrg shared_archive_member_spec=shr 8746d6c0b56eSmrg fi 8747d6c0b56eSmrg fi 8748d6c0b56eSmrg ;; 8749d6c0b56eSmrg*) 8750d6c0b56eSmrg with_aix_soname=aix 8751d6c0b56eSmrg ;; 8752d6c0b56eSmrgesac 8753d6c0b56eSmrg 8754d6c0b56eSmrg_LT_DECL([], [shared_archive_member_spec], [0], 8755d6c0b56eSmrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 8756d6c0b56eSmrg])# _LT_WITH_AIX_SONAME 8757d6c0b56eSmrg 8758d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 8759d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 8760d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 8761d6c0b56eSmrg 8762d6c0b56eSmrg 8763d6c0b56eSmrg# _LT_WITH_PIC([MODE]) 8764d6c0b56eSmrg# -------------------- 8765d6c0b56eSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 8766d6c0b56eSmrg# LT_INIT options. 8767d6c0b56eSmrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 8768d6c0b56eSmrgm4_define([_LT_WITH_PIC], 8769d6c0b56eSmrg[AC_ARG_WITH([pic], 8770d6c0b56eSmrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8771d6c0b56eSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 8772d6c0b56eSmrg [lt_p=${PACKAGE-default} 8773d6c0b56eSmrg case $withval in 8774d6c0b56eSmrg yes|no) pic_mode=$withval ;; 8775d6c0b56eSmrg *) 8776d6c0b56eSmrg pic_mode=default 8777d6c0b56eSmrg # Look at the argument we got. We use all the common list separators. 8778d6c0b56eSmrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 8779d6c0b56eSmrg for lt_pkg in $withval; do 8780d6c0b56eSmrg IFS=$lt_save_ifs 8781d6c0b56eSmrg if test "X$lt_pkg" = "X$lt_p"; then 8782d6c0b56eSmrg pic_mode=yes 8783d6c0b56eSmrg fi 8784d6c0b56eSmrg done 8785d6c0b56eSmrg IFS=$lt_save_ifs 8786d6c0b56eSmrg ;; 8787d6c0b56eSmrg esac], 8788d6c0b56eSmrg [pic_mode=m4_default([$1], [default])]) 8789d6c0b56eSmrg 8790d6c0b56eSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8791d6c0b56eSmrg])# _LT_WITH_PIC 8792d6c0b56eSmrg 8793d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8794d6c0b56eSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8795d6c0b56eSmrg 8796d6c0b56eSmrg# Old name: 8797d6c0b56eSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8798d6c0b56eSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8799d6c0b56eSmrgAC_DIAGNOSE([obsolete], 8800d6c0b56eSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8801d6c0b56eSmrgput the 'pic-only' option into LT_INIT's first parameter.]) 8802d6c0b56eSmrg]) 8803d6c0b56eSmrg 8804d6c0b56eSmrgdnl aclocal-1.4 backwards compatibility: 8805d6c0b56eSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8806d6c0b56eSmrg 8807d6c0b56eSmrg 8808d6c0b56eSmrgm4_define([_LTDL_MODE], []) 8809d6c0b56eSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8810d6c0b56eSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8811d6c0b56eSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8812d6c0b56eSmrg [m4_define([_LTDL_MODE], [recursive])]) 8813d6c0b56eSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8814d6c0b56eSmrg [m4_define([_LTDL_MODE], [subproject])]) 8815d6c0b56eSmrg 8816d6c0b56eSmrgm4_define([_LTDL_TYPE], []) 8817d6c0b56eSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8818d6c0b56eSmrg [m4_define([_LTDL_TYPE], [installable])]) 8819d6c0b56eSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8820d6c0b56eSmrg [m4_define([_LTDL_TYPE], [convenience])]) 8821d6c0b56eSmrg 8822d6c0b56eSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8823d6c0b56eSmrg# 8824d6c0b56eSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 8825d6c0b56eSmrg# Foundation, Inc. 8826d6c0b56eSmrg# Written by Gary V. Vaughan, 2004 8827d6c0b56eSmrg# 8828d6c0b56eSmrg# This file is free software; the Free Software Foundation gives 8829d6c0b56eSmrg# unlimited permission to copy and/or distribute it, with or without 8830d6c0b56eSmrg# modifications, as long as this notice is preserved. 8831d6c0b56eSmrg 8832d6c0b56eSmrg# serial 6 ltsugar.m4 8833d6c0b56eSmrg 8834d6c0b56eSmrg# This is to help aclocal find these macros, as it can't see m4_define. 8835d6c0b56eSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 8836d6c0b56eSmrg 8837d6c0b56eSmrg 8838d6c0b56eSmrg# lt_join(SEP, ARG1, [ARG2...]) 8839d6c0b56eSmrg# ----------------------------- 8840d6c0b56eSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8841d6c0b56eSmrg# associated separator. 8842d6c0b56eSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8843d6c0b56eSmrg# versions in m4sugar had bugs. 8844d6c0b56eSmrgm4_define([lt_join], 8845d6c0b56eSmrg[m4_if([$#], [1], [], 8846d6c0b56eSmrg [$#], [2], [[$2]], 8847d6c0b56eSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8848d6c0b56eSmrgm4_define([_lt_join], 8849d6c0b56eSmrg[m4_if([$#$2], [2], [], 8850d6c0b56eSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8851d6c0b56eSmrg 8852d6c0b56eSmrg 8853d6c0b56eSmrg# lt_car(LIST) 8854d6c0b56eSmrg# lt_cdr(LIST) 8855d6c0b56eSmrg# ------------ 8856d6c0b56eSmrg# Manipulate m4 lists. 8857d6c0b56eSmrg# These macros are necessary as long as will still need to support 8858d6c0b56eSmrg# Autoconf-2.59, which quotes differently. 8859d6c0b56eSmrgm4_define([lt_car], [[$1]]) 8860d6c0b56eSmrgm4_define([lt_cdr], 8861d6c0b56eSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8862d6c0b56eSmrg [$#], 1, [], 8863d6c0b56eSmrg [m4_dquote(m4_shift($@))])]) 8864d6c0b56eSmrgm4_define([lt_unquote], $1) 8865d6c0b56eSmrg 8866d6c0b56eSmrg 8867d6c0b56eSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8868d6c0b56eSmrg# ------------------------------------------ 8869d6c0b56eSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 8870d6c0b56eSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8871d6c0b56eSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8872d6c0b56eSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8873d6c0b56eSmrg# than defined and empty). 8874d6c0b56eSmrg# 8875d6c0b56eSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8876d6c0b56eSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8877d6c0b56eSmrgm4_define([lt_append], 8878d6c0b56eSmrg[m4_define([$1], 8879d6c0b56eSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8880d6c0b56eSmrg 8881d6c0b56eSmrg 8882d6c0b56eSmrg 8883d6c0b56eSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8884d6c0b56eSmrg# ---------------------------------------------------------- 8885d6c0b56eSmrg# Produce a SEP delimited list of all paired combinations of elements of 8886d6c0b56eSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8887d6c0b56eSmrg# has the form PREFIXmINFIXSUFFIXn. 8888d6c0b56eSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8889d6c0b56eSmrgm4_define([lt_combine], 8890d6c0b56eSmrg[m4_if(m4_eval([$# > 3]), [1], 8891d6c0b56eSmrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8892d6c0b56eSmrg[[m4_foreach([_Lt_prefix], [$2], 8893d6c0b56eSmrg [m4_foreach([_Lt_suffix], 8894d6c0b56eSmrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8895d6c0b56eSmrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8896d6c0b56eSmrg 8897d6c0b56eSmrg 8898d6c0b56eSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8899d6c0b56eSmrg# ----------------------------------------------------------------------- 8900d6c0b56eSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8901d6c0b56eSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8902d6c0b56eSmrgm4_define([lt_if_append_uniq], 8903d6c0b56eSmrg[m4_ifdef([$1], 8904d6c0b56eSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8905d6c0b56eSmrg [lt_append([$1], [$2], [$3])$4], 8906d6c0b56eSmrg [$5])], 8907d6c0b56eSmrg [lt_append([$1], [$2], [$3])$4])]) 8908d6c0b56eSmrg 8909d6c0b56eSmrg 8910d6c0b56eSmrg# lt_dict_add(DICT, KEY, VALUE) 8911d6c0b56eSmrg# ----------------------------- 8912d6c0b56eSmrgm4_define([lt_dict_add], 8913d6c0b56eSmrg[m4_define([$1($2)], [$3])]) 8914d6c0b56eSmrg 8915d6c0b56eSmrg 8916d6c0b56eSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8917d6c0b56eSmrg# -------------------------------------------- 8918d6c0b56eSmrgm4_define([lt_dict_add_subkey], 8919d6c0b56eSmrg[m4_define([$1($2:$3)], [$4])]) 8920d6c0b56eSmrg 8921d6c0b56eSmrg 8922d6c0b56eSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8923d6c0b56eSmrg# ---------------------------------- 8924d6c0b56eSmrgm4_define([lt_dict_fetch], 8925d6c0b56eSmrg[m4_ifval([$3], 8926d6c0b56eSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8927d6c0b56eSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8928d6c0b56eSmrg 8929d6c0b56eSmrg 8930d6c0b56eSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8931d6c0b56eSmrg# ----------------------------------------------------------------- 8932d6c0b56eSmrgm4_define([lt_if_dict_fetch], 8933d6c0b56eSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8934d6c0b56eSmrg [$5], 8935d6c0b56eSmrg [$6])]) 8936d6c0b56eSmrg 8937d6c0b56eSmrg 8938d6c0b56eSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8939d6c0b56eSmrg# -------------------------------------------------------------- 8940d6c0b56eSmrgm4_define([lt_dict_filter], 8941d6c0b56eSmrg[m4_if([$5], [], [], 8942d6c0b56eSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8943d6c0b56eSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8944d6c0b56eSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 8945d6c0b56eSmrg]) 8946d6c0b56eSmrg 8947d6c0b56eSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8948d6c0b56eSmrg# 8949d6c0b56eSmrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 8950d6c0b56eSmrg# Written by Scott James Remnant, 2004 8951d6c0b56eSmrg# 8952d6c0b56eSmrg# This file is free software; the Free Software Foundation gives 8953d6c0b56eSmrg# unlimited permission to copy and/or distribute it, with or without 8954d6c0b56eSmrg# modifications, as long as this notice is preserved. 8955d6c0b56eSmrg 8956d6c0b56eSmrg# @configure_input@ 8957d6c0b56eSmrg 8958d6c0b56eSmrg# serial 4179 ltversion.m4 8959d6c0b56eSmrg# This file is part of GNU Libtool 8960d6c0b56eSmrg 8961d6c0b56eSmrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 8962d6c0b56eSmrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 8963d6c0b56eSmrg 8964d6c0b56eSmrgAC_DEFUN([LTVERSION_VERSION], 8965d6c0b56eSmrg[macro_version='2.4.6' 8966d6c0b56eSmrgmacro_revision='2.4.6' 8967d6c0b56eSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8968d6c0b56eSmrg_LT_DECL(, macro_revision, 0) 8969d6c0b56eSmrg]) 8970d6c0b56eSmrg 8971d6c0b56eSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8972d6c0b56eSmrg# 8973d6c0b56eSmrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 8974d6c0b56eSmrg# Foundation, Inc. 8975d6c0b56eSmrg# Written by Scott James Remnant, 2004. 8976d6c0b56eSmrg# 8977d6c0b56eSmrg# This file is free software; the Free Software Foundation gives 8978d6c0b56eSmrg# unlimited permission to copy and/or distribute it, with or without 8979d6c0b56eSmrg# modifications, as long as this notice is preserved. 8980d6c0b56eSmrg 8981d6c0b56eSmrg# serial 5 lt~obsolete.m4 8982d6c0b56eSmrg 8983d6c0b56eSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 8984d6c0b56eSmrg# 8985d6c0b56eSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 8986d6c0b56eSmrg# which have later been changed to m4_define as they aren't part of the 8987d6c0b56eSmrg# exported API, or moved to Autoconf or Automake where they belong. 8988d6c0b56eSmrg# 8989d6c0b56eSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8990d6c0b56eSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8991d6c0b56eSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 8992d6c0b56eSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8993d6c0b56eSmrg# and doesn't know about Autoconf macros at all.) 8994d6c0b56eSmrg# 8995d6c0b56eSmrg# So we provide this file, which has a silly filename so it's always 8996d6c0b56eSmrg# included after everything else. This provides aclocal with the 8997d6c0b56eSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8998d6c0b56eSmrg# because those macros already exist, or will be overwritten later. 8999d6c0b56eSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 9000d6c0b56eSmrg# 9001d6c0b56eSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 9002d6c0b56eSmrg# Yes, that means every name once taken will need to remain here until 9003d6c0b56eSmrg# we give up compatibility with versions before 1.7, at which point 9004d6c0b56eSmrg# we need to keep only those names which we still refer to. 9005d6c0b56eSmrg 9006d6c0b56eSmrg# This is to help aclocal find these macros, as it can't see m4_define. 9007d6c0b56eSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 9008d6c0b56eSmrg 9009d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 9010d6c0b56eSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 9011d6c0b56eSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 9012d6c0b56eSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 9013d6c0b56eSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 9014d6c0b56eSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 9015d6c0b56eSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 9016d6c0b56eSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 9017d6c0b56eSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 9018d6c0b56eSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 9019d6c0b56eSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 9020d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 9021d6c0b56eSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 9022d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 9023d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 9024d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 9025d6c0b56eSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 9026d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 9027d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 9028d6c0b56eSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 9029d6c0b56eSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 9030d6c0b56eSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 9031d6c0b56eSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 9032d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 9033d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 9034d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 9035d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 9036d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 9037d6c0b56eSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 9038d6c0b56eSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 9039d6c0b56eSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 9040d6c0b56eSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 9041d6c0b56eSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 9042d6c0b56eSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 9043d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 9044d6c0b56eSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 9045d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 9046d6c0b56eSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 9047d6c0b56eSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 9048d6c0b56eSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 9049d6c0b56eSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 9050d6c0b56eSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 9051d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 9052d6c0b56eSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 9053d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 9054d6c0b56eSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 9055d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 9056d6c0b56eSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 9057d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 9058d6c0b56eSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 9059d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 9060d6c0b56eSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 9061d6c0b56eSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 9062d6c0b56eSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 9063d6c0b56eSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 9064d6c0b56eSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 9065d6c0b56eSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 9066d6c0b56eSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 9067d6c0b56eSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 9068d6c0b56eSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 9069d6c0b56eSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 9070d6c0b56eSmrg 9071d6c0b56eSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 9072d6c0b56eSmrgdnl serial 11 (pkg-config-0.29) 9073d6c0b56eSmrgdnl 9074d6c0b56eSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9075d6c0b56eSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com> 9076d6c0b56eSmrgdnl 9077d6c0b56eSmrgdnl This program is free software; you can redistribute it and/or modify 9078d6c0b56eSmrgdnl it under the terms of the GNU General Public License as published by 9079d6c0b56eSmrgdnl the Free Software Foundation; either version 2 of the License, or 9080d6c0b56eSmrgdnl (at your option) any later version. 9081d6c0b56eSmrgdnl 9082d6c0b56eSmrgdnl This program is distributed in the hope that it will be useful, but 9083d6c0b56eSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of 9084d6c0b56eSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 9085d6c0b56eSmrgdnl General Public License for more details. 9086d6c0b56eSmrgdnl 9087d6c0b56eSmrgdnl You should have received a copy of the GNU General Public License 9088d6c0b56eSmrgdnl along with this program; if not, write to the Free Software 9089d6c0b56eSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 9090d6c0b56eSmrgdnl 02111-1307, USA. 9091d6c0b56eSmrgdnl 9092d6c0b56eSmrgdnl As a special exception to the GNU General Public License, if you 9093d6c0b56eSmrgdnl distribute this file as part of a program that contains a 9094d6c0b56eSmrgdnl configuration script generated by Autoconf, you may include it under 9095d6c0b56eSmrgdnl the same distribution terms that you use for the rest of that 9096d6c0b56eSmrgdnl program. 9097d6c0b56eSmrg 9098d6c0b56eSmrgdnl PKG_PREREQ(MIN-VERSION) 9099d6c0b56eSmrgdnl ----------------------- 9100d6c0b56eSmrgdnl Since: 0.29 9101d6c0b56eSmrgdnl 9102d6c0b56eSmrgdnl Verify that the version of the pkg-config macros are at least 9103d6c0b56eSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's 9104d6c0b56eSmrgdnl installed version of pkg-config, this checks the developer's version 9105d6c0b56eSmrgdnl of pkg.m4 when generating configure. 9106d6c0b56eSmrgdnl 9107d6c0b56eSmrgdnl To ensure that this macro is defined, also add: 9108d6c0b56eSmrgdnl m4_ifndef([PKG_PREREQ], 9109d6c0b56eSmrgdnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) 9110d6c0b56eSmrgdnl 9111d6c0b56eSmrgdnl See the "Since" comment for each macro you use to see what version 9112d6c0b56eSmrgdnl of the macros you require. 9113d6c0b56eSmrgm4_defun([PKG_PREREQ], 9114d6c0b56eSmrg[m4_define([PKG_MACROS_VERSION], [0.29]) 9115d6c0b56eSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, 9116d6c0b56eSmrg [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) 9117d6c0b56eSmrg])dnl PKG_PREREQ 9118d6c0b56eSmrg 9119d6c0b56eSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) 9120d6c0b56eSmrgdnl ---------------------------------- 9121d6c0b56eSmrgdnl Since: 0.16 9122d6c0b56eSmrgdnl 9123d6c0b56eSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to 9124d6c0b56eSmrgdnl first found in the path. Checks that the version of pkg-config found 9125d6c0b56eSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is 9126d6c0b56eSmrgdnl used since that's the first version where most current features of 9127d6c0b56eSmrgdnl pkg-config existed. 9128d6c0b56eSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 9129d6c0b56eSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9130d6c0b56eSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9131d6c0b56eSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 9132d6c0b56eSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 9133d6c0b56eSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 9134d6c0b56eSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 9135d6c0b56eSmrg 9136d6c0b56eSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 9137d6c0b56eSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 9138d6c0b56eSmrgfi 9139d6c0b56eSmrgif test -n "$PKG_CONFIG"; then 9140d6c0b56eSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 9141d6c0b56eSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 9142d6c0b56eSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 9143d6c0b56eSmrg AC_MSG_RESULT([yes]) 9144d6c0b56eSmrg else 9145d6c0b56eSmrg AC_MSG_RESULT([no]) 9146d6c0b56eSmrg PKG_CONFIG="" 9147d6c0b56eSmrg fi 9148d6c0b56eSmrgfi[]dnl 9149d6c0b56eSmrg])dnl PKG_PROG_PKG_CONFIG 9150d6c0b56eSmrg 9151d6c0b56eSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9152d6c0b56eSmrgdnl ------------------------------------------------------------------- 9153d6c0b56eSmrgdnl Since: 0.18 9154d6c0b56eSmrgdnl 9155d6c0b56eSmrgdnl Check to see whether a particular set of modules exists. Similar to 9156d6c0b56eSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors. 9157d6c0b56eSmrgdnl 9158d6c0b56eSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9159d6c0b56eSmrgdnl only at the first occurence in configure.ac, so if the first place 9160d6c0b56eSmrgdnl it's called might be skipped (such as if it is within an "if", you 9161d6c0b56eSmrgdnl have to call PKG_CHECK_EXISTS manually 9162d6c0b56eSmrgAC_DEFUN([PKG_CHECK_EXISTS], 9163d6c0b56eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9164d6c0b56eSmrgif test -n "$PKG_CONFIG" && \ 9165d6c0b56eSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 9166d6c0b56eSmrg m4_default([$2], [:]) 9167d6c0b56eSmrgm4_ifvaln([$3], [else 9168d6c0b56eSmrg $3])dnl 9169d6c0b56eSmrgfi]) 9170d6c0b56eSmrg 9171d6c0b56eSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 9172d6c0b56eSmrgdnl --------------------------------------------- 9173d6c0b56eSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting 9174d6c0b56eSmrgdnl pkg_failed based on the result. 9175d6c0b56eSmrgm4_define([_PKG_CONFIG], 9176d6c0b56eSmrg[if test -n "$$1"; then 9177d6c0b56eSmrg pkg_cv_[]$1="$$1" 9178d6c0b56eSmrg elif test -n "$PKG_CONFIG"; then 9179d6c0b56eSmrg PKG_CHECK_EXISTS([$3], 9180d6c0b56eSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9181d6c0b56eSmrg test "x$?" != "x0" && pkg_failed=yes ], 9182d6c0b56eSmrg [pkg_failed=yes]) 9183d6c0b56eSmrg else 9184d6c0b56eSmrg pkg_failed=untried 9185d6c0b56eSmrgfi[]dnl 9186d6c0b56eSmrg])dnl _PKG_CONFIG 9187d6c0b56eSmrg 9188d6c0b56eSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED 9189d6c0b56eSmrgdnl --------------------------- 9190d6c0b56eSmrgdnl Internal check to see if pkg-config supports short errors. 9191d6c0b56eSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 9192d6c0b56eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 9193d6c0b56eSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9194d6c0b56eSmrg _pkg_short_errors_supported=yes 9195d6c0b56eSmrgelse 9196d6c0b56eSmrg _pkg_short_errors_supported=no 9197d6c0b56eSmrgfi[]dnl 9198d6c0b56eSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED 9199d6c0b56eSmrg 9200d6c0b56eSmrg 9201d6c0b56eSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9202d6c0b56eSmrgdnl [ACTION-IF-NOT-FOUND]) 9203d6c0b56eSmrgdnl -------------------------------------------------------------- 9204d6c0b56eSmrgdnl Since: 0.4.0 9205d6c0b56eSmrgdnl 9206d6c0b56eSmrgdnl Note that if there is a possibility the first call to 9207d6c0b56eSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an 9208d6c0b56eSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9209d6c0b56eSmrgAC_DEFUN([PKG_CHECK_MODULES], 9210d6c0b56eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9211d6c0b56eSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 9212d6c0b56eSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9213d6c0b56eSmrg 9214d6c0b56eSmrgpkg_failed=no 9215d6c0b56eSmrgAC_MSG_CHECKING([for $1]) 9216d6c0b56eSmrg 9217d6c0b56eSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 9218d6c0b56eSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 9219d6c0b56eSmrg 9220d6c0b56eSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 9221d6c0b56eSmrgand $1[]_LIBS to avoid the need to call pkg-config. 9222d6c0b56eSmrgSee the pkg-config man page for more details.]) 9223d6c0b56eSmrg 9224d6c0b56eSmrgif test $pkg_failed = yes; then 9225d6c0b56eSmrg AC_MSG_RESULT([no]) 9226d6c0b56eSmrg _PKG_SHORT_ERRORS_SUPPORTED 9227d6c0b56eSmrg if test $_pkg_short_errors_supported = yes; then 9228d6c0b56eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 9229d6c0b56eSmrg else 9230d6c0b56eSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 9231d6c0b56eSmrg fi 9232d6c0b56eSmrg # Put the nasty error message in config.log where it belongs 9233d6c0b56eSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 9234d6c0b56eSmrg 9235d6c0b56eSmrg m4_default([$4], [AC_MSG_ERROR( 9236d6c0b56eSmrg[Package requirements ($2) were not met: 9237d6c0b56eSmrg 9238d6c0b56eSmrg$$1_PKG_ERRORS 9239d6c0b56eSmrg 9240d6c0b56eSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 9241d6c0b56eSmrginstalled software in a non-standard prefix. 9242d6c0b56eSmrg 9243d6c0b56eSmrg_PKG_TEXT])[]dnl 9244d6c0b56eSmrg ]) 9245d6c0b56eSmrgelif test $pkg_failed = untried; then 9246d6c0b56eSmrg AC_MSG_RESULT([no]) 9247d6c0b56eSmrg m4_default([$4], [AC_MSG_FAILURE( 9248d6c0b56eSmrg[The pkg-config script could not be found or is too old. Make sure it 9249d6c0b56eSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 9250d6c0b56eSmrgpath to pkg-config. 9251d6c0b56eSmrg 9252d6c0b56eSmrg_PKG_TEXT 9253d6c0b56eSmrg 9254d6c0b56eSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 9255d6c0b56eSmrg ]) 9256d6c0b56eSmrgelse 9257d6c0b56eSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 9258d6c0b56eSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 9259d6c0b56eSmrg AC_MSG_RESULT([yes]) 9260d6c0b56eSmrg $3 9261d6c0b56eSmrgfi[]dnl 9262d6c0b56eSmrg])dnl PKG_CHECK_MODULES 9263d6c0b56eSmrg 9264d6c0b56eSmrg 9265d6c0b56eSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 9266d6c0b56eSmrgdnl [ACTION-IF-NOT-FOUND]) 9267d6c0b56eSmrgdnl --------------------------------------------------------------------- 9268d6c0b56eSmrgdnl Since: 0.29 9269d6c0b56eSmrgdnl 9270d6c0b56eSmrgdnl Checks for existence of MODULES and gathers its build flags with 9271d6c0b56eSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags 9272d6c0b56eSmrgdnl and VARIABLE-PREFIX_LIBS from --libs. 9273d6c0b56eSmrgdnl 9274d6c0b56eSmrgdnl Note that if there is a possibility the first call to 9275d6c0b56eSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to 9276d6c0b56eSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your 9277d6c0b56eSmrgdnl configure.ac. 9278d6c0b56eSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC], 9279d6c0b56eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9280d6c0b56eSmrg_save_PKG_CONFIG=$PKG_CONFIG 9281d6c0b56eSmrgPKG_CONFIG="$PKG_CONFIG --static" 9282d6c0b56eSmrgPKG_CHECK_MODULES($@) 9283d6c0b56eSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl 9284d6c0b56eSmrg])dnl PKG_CHECK_MODULES_STATIC 9285d6c0b56eSmrg 9286d6c0b56eSmrg 9287d6c0b56eSmrgdnl PKG_INSTALLDIR([DIRECTORY]) 9288d6c0b56eSmrgdnl ------------------------- 9289d6c0b56eSmrgdnl Since: 0.27 9290d6c0b56eSmrgdnl 9291d6c0b56eSmrgdnl Substitutes the variable pkgconfigdir as the location where a module 9292d6c0b56eSmrgdnl should install pkg-config .pc files. By default the directory is 9293d6c0b56eSmrgdnl $libdir/pkgconfig, but the default can be changed by passing 9294d6c0b56eSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir 9295d6c0b56eSmrgdnl parameter. 9296d6c0b56eSmrgAC_DEFUN([PKG_INSTALLDIR], 9297d6c0b56eSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9298d6c0b56eSmrgm4_pushdef([pkg_description], 9299d6c0b56eSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 9300d6c0b56eSmrgAC_ARG_WITH([pkgconfigdir], 9301d6c0b56eSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9302d6c0b56eSmrg [with_pkgconfigdir=]pkg_default) 9303d6c0b56eSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9304d6c0b56eSmrgm4_popdef([pkg_default]) 9305d6c0b56eSmrgm4_popdef([pkg_description]) 9306d6c0b56eSmrg])dnl PKG_INSTALLDIR 9307d6c0b56eSmrg 9308d6c0b56eSmrg 9309d6c0b56eSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) 9310d6c0b56eSmrgdnl -------------------------------- 9311d6c0b56eSmrgdnl Since: 0.27 9312d6c0b56eSmrgdnl 9313d6c0b56eSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a 9314d6c0b56eSmrgdnl module should install arch-independent pkg-config .pc files. By 9315d6c0b56eSmrgdnl default the directory is $datadir/pkgconfig, but the default can be 9316d6c0b56eSmrgdnl changed by passing DIRECTORY. The user can override through the 9317d6c0b56eSmrgdnl --with-noarch-pkgconfigdir parameter. 9318d6c0b56eSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 9319d6c0b56eSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9320d6c0b56eSmrgm4_pushdef([pkg_description], 9321d6c0b56eSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9322d6c0b56eSmrgAC_ARG_WITH([noarch-pkgconfigdir], 9323d6c0b56eSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9324d6c0b56eSmrg [with_noarch_pkgconfigdir=]pkg_default) 9325d6c0b56eSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9326d6c0b56eSmrgm4_popdef([pkg_default]) 9327d6c0b56eSmrgm4_popdef([pkg_description]) 9328d6c0b56eSmrg])dnl PKG_NOARCH_INSTALLDIR 9329d6c0b56eSmrg 9330d6c0b56eSmrg 9331d6c0b56eSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9332d6c0b56eSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9333d6c0b56eSmrgdnl ------------------------------------------- 9334d6c0b56eSmrgdnl Since: 0.28 9335d6c0b56eSmrgdnl 9336d6c0b56eSmrgdnl Retrieves the value of the pkg-config variable for the given module. 9337d6c0b56eSmrgAC_DEFUN([PKG_CHECK_VAR], 9338d6c0b56eSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9339d6c0b56eSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9340d6c0b56eSmrg 9341d6c0b56eSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9342d6c0b56eSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 9343d6c0b56eSmrg 9344d6c0b56eSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9345d6c0b56eSmrg])dnl PKG_CHECK_VAR 9346d6c0b56eSmrg 9347d6c0b56eSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9348d6c0b56eSmrgdnl 9349d6c0b56eSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 9350d6c0b56eSmrgdnl 9351d6c0b56eSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9352d6c0b56eSmrgdnl copy of this software and associated documentation files (the "Software"), 9353d6c0b56eSmrgdnl to deal in the Software without restriction, including without limitation 9354d6c0b56eSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9355d6c0b56eSmrgdnl and/or sell copies of the Software, and to permit persons to whom the 9356d6c0b56eSmrgdnl Software is furnished to do so, subject to the following conditions: 9357d6c0b56eSmrgdnl 9358d6c0b56eSmrgdnl The above copyright notice and this permission notice (including the next 9359d6c0b56eSmrgdnl paragraph) shall be included in all copies or substantial portions of the 9360d6c0b56eSmrgdnl Software. 9361d6c0b56eSmrgdnl 9362d6c0b56eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9363d6c0b56eSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9364d6c0b56eSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9365d6c0b56eSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9366d6c0b56eSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9367d6c0b56eSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9368d6c0b56eSmrgdnl DEALINGS IN THE SOFTWARE. 9369d6c0b56eSmrg 9370d6c0b56eSmrg# XORG_MACROS_VERSION(required-version) 9371d6c0b56eSmrg# ------------------------------------- 9372d6c0b56eSmrg# Minimum version: 1.1.0 9373d6c0b56eSmrg# 9374d6c0b56eSmrg# If you're using a macro added in Version 1.1 or newer, include this in 9375d6c0b56eSmrg# your configure.ac with the minimum required version, such as: 9376d6c0b56eSmrg# XORG_MACROS_VERSION(1.1) 9377d6c0b56eSmrg# 9378d6c0b56eSmrg# To ensure that this macro is defined, also add: 9379d6c0b56eSmrg# m4_ifndef([XORG_MACROS_VERSION], 9380d6c0b56eSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9381d6c0b56eSmrg# 9382d6c0b56eSmrg# 9383d6c0b56eSmrg# See the "minimum version" comment for each macro you use to see what 9384d6c0b56eSmrg# version you require. 9385d6c0b56eSmrgm4_defun([XORG_MACROS_VERSION],[ 9386d6c0b56eSmrgm4_define([vers_have], [1.19.0]) 9387d6c0b56eSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9388d6c0b56eSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9389d6c0b56eSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9390d6c0b56eSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9391d6c0b56eSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9392d6c0b56eSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9393d6c0b56eSmrgm4_undefine([vers_have]) 9394d6c0b56eSmrgm4_undefine([maj_have]) 9395d6c0b56eSmrgm4_undefine([maj_needed]) 9396d6c0b56eSmrg]) # XORG_MACROS_VERSION 9397d6c0b56eSmrg 9398d6c0b56eSmrg# XORG_PROG_RAWCPP() 9399d6c0b56eSmrg# ------------------ 9400d6c0b56eSmrg# Minimum version: 1.0.0 9401d6c0b56eSmrg# 9402d6c0b56eSmrg# Find cpp program and necessary flags for use in pre-processing text files 9403d6c0b56eSmrg# such as man pages and config files 9404d6c0b56eSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9405d6c0b56eSmrgAC_REQUIRE([AC_PROG_CPP]) 9406d6c0b56eSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9407d6c0b56eSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9408d6c0b56eSmrg 9409d6c0b56eSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9410d6c0b56eSmrg# which is not the best choice for supporting other OS'es, but covers most 9411d6c0b56eSmrg# of the ones we need for now. 9412d6c0b56eSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9413d6c0b56eSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 9414d6c0b56eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9415d6c0b56eSmrg AC_MSG_RESULT([no]) 9416d6c0b56eSmrgelse 9417d6c0b56eSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9418d6c0b56eSmrg RAWCPPFLAGS=-undef 9419d6c0b56eSmrg AC_MSG_RESULT([yes]) 9420d6c0b56eSmrg # under Cygwin unix is still defined even with -undef 9421d6c0b56eSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9422d6c0b56eSmrg RAWCPPFLAGS="-undef -ansi" 9423d6c0b56eSmrg AC_MSG_RESULT([yes, with -ansi]) 9424d6c0b56eSmrg else 9425d6c0b56eSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9426d6c0b56eSmrg fi 9427d6c0b56eSmrgfi 9428d6c0b56eSmrgrm -f conftest.$ac_ext 9429d6c0b56eSmrg 9430d6c0b56eSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9431d6c0b56eSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 9432d6c0b56eSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9433d6c0b56eSmrg AC_MSG_RESULT([no]) 9434d6c0b56eSmrgelse 9435d6c0b56eSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9436d6c0b56eSmrg TRADITIONALCPPFLAGS="-traditional" 9437d6c0b56eSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9438d6c0b56eSmrg AC_MSG_RESULT([yes]) 9439d6c0b56eSmrg else 9440d6c0b56eSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9441d6c0b56eSmrg fi 9442d6c0b56eSmrgfi 9443d6c0b56eSmrgrm -f conftest.$ac_ext 9444d6c0b56eSmrgAC_SUBST(RAWCPPFLAGS) 9445d6c0b56eSmrgAC_SUBST(TRADITIONALCPPFLAGS) 9446d6c0b56eSmrg]) # XORG_PROG_RAWCPP 9447d6c0b56eSmrg 9448d6c0b56eSmrg# XORG_MANPAGE_SECTIONS() 9449d6c0b56eSmrg# ----------------------- 9450d6c0b56eSmrg# Minimum version: 1.0.0 9451d6c0b56eSmrg# 9452d6c0b56eSmrg# Determine which sections man pages go in for the different man page types 9453d6c0b56eSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9454d6c0b56eSmrg# Not sure if there's any better way than just hardcoding by OS name. 9455d6c0b56eSmrg# Override default settings by setting environment variables 9456d6c0b56eSmrg# Added MAN_SUBSTS in version 1.8 9457d6c0b56eSmrg# Added AC_PROG_SED in version 1.8 9458d6c0b56eSmrg 9459d6c0b56eSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9460d6c0b56eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9461d6c0b56eSmrgAC_REQUIRE([AC_PROG_SED]) 9462d6c0b56eSmrg 9463d6c0b56eSmrgif test x$APP_MAN_SUFFIX = x ; then 9464d6c0b56eSmrg APP_MAN_SUFFIX=1 9465d6c0b56eSmrgfi 9466d6c0b56eSmrgif test x$APP_MAN_DIR = x ; then 9467d6c0b56eSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9468d6c0b56eSmrgfi 9469d6c0b56eSmrg 9470d6c0b56eSmrgif test x$LIB_MAN_SUFFIX = x ; then 9471d6c0b56eSmrg LIB_MAN_SUFFIX=3 9472d6c0b56eSmrgfi 9473d6c0b56eSmrgif test x$LIB_MAN_DIR = x ; then 9474d6c0b56eSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9475d6c0b56eSmrgfi 9476d6c0b56eSmrg 9477d6c0b56eSmrgif test x$FILE_MAN_SUFFIX = x ; then 9478d6c0b56eSmrg case $host_os in 9479d6c0b56eSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 9480d6c0b56eSmrg *) FILE_MAN_SUFFIX=5 ;; 9481d6c0b56eSmrg esac 9482d6c0b56eSmrgfi 9483d6c0b56eSmrgif test x$FILE_MAN_DIR = x ; then 9484d6c0b56eSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9485d6c0b56eSmrgfi 9486d6c0b56eSmrg 9487d6c0b56eSmrgif test x$MISC_MAN_SUFFIX = x ; then 9488d6c0b56eSmrg case $host_os in 9489d6c0b56eSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 9490d6c0b56eSmrg *) MISC_MAN_SUFFIX=7 ;; 9491d6c0b56eSmrg esac 9492d6c0b56eSmrgfi 9493d6c0b56eSmrgif test x$MISC_MAN_DIR = x ; then 9494d6c0b56eSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9495d6c0b56eSmrgfi 9496d6c0b56eSmrg 9497d6c0b56eSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 9498d6c0b56eSmrg case $host_os in 9499d6c0b56eSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9500d6c0b56eSmrg *) DRIVER_MAN_SUFFIX=4 ;; 9501d6c0b56eSmrg esac 9502d6c0b56eSmrgfi 9503d6c0b56eSmrgif test x$DRIVER_MAN_DIR = x ; then 9504d6c0b56eSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9505d6c0b56eSmrgfi 9506d6c0b56eSmrg 9507d6c0b56eSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 9508d6c0b56eSmrg case $host_os in 9509d6c0b56eSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9510d6c0b56eSmrg *) ADMIN_MAN_SUFFIX=8 ;; 9511d6c0b56eSmrg esac 9512d6c0b56eSmrgfi 9513d6c0b56eSmrgif test x$ADMIN_MAN_DIR = x ; then 9514d6c0b56eSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9515d6c0b56eSmrgfi 9516d6c0b56eSmrg 9517d6c0b56eSmrg 9518d6c0b56eSmrgAC_SUBST([APP_MAN_SUFFIX]) 9519d6c0b56eSmrgAC_SUBST([LIB_MAN_SUFFIX]) 9520d6c0b56eSmrgAC_SUBST([FILE_MAN_SUFFIX]) 9521d6c0b56eSmrgAC_SUBST([MISC_MAN_SUFFIX]) 9522d6c0b56eSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9523d6c0b56eSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9524d6c0b56eSmrgAC_SUBST([APP_MAN_DIR]) 9525d6c0b56eSmrgAC_SUBST([LIB_MAN_DIR]) 9526d6c0b56eSmrgAC_SUBST([FILE_MAN_DIR]) 9527d6c0b56eSmrgAC_SUBST([MISC_MAN_DIR]) 9528d6c0b56eSmrgAC_SUBST([DRIVER_MAN_DIR]) 9529d6c0b56eSmrgAC_SUBST([ADMIN_MAN_DIR]) 9530d6c0b56eSmrg 9531d6c0b56eSmrgXORG_MAN_PAGE="X Version 11" 9532d6c0b56eSmrgAC_SUBST([XORG_MAN_PAGE]) 9533d6c0b56eSmrgMAN_SUBSTS="\ 9534d6c0b56eSmrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9535d6c0b56eSmrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9536d6c0b56eSmrg -e 's|__xservername__|Xorg|g' \ 9537d6c0b56eSmrg -e 's|__xconfigfile__|xorg.conf|g' \ 9538d6c0b56eSmrg -e 's|__projectroot__|\$(prefix)|g' \ 9539d6c0b56eSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9540d6c0b56eSmrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9541d6c0b56eSmrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9542d6c0b56eSmrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9543d6c0b56eSmrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9544d6c0b56eSmrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9545d6c0b56eSmrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9546d6c0b56eSmrgAC_SUBST([MAN_SUBSTS]) 9547d6c0b56eSmrg 9548d6c0b56eSmrg]) # XORG_MANPAGE_SECTIONS 9549d6c0b56eSmrg 9550d6c0b56eSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9551d6c0b56eSmrg# ------------------------ 9552d6c0b56eSmrg# Minimum version: 1.7.0 9553d6c0b56eSmrg# 9554d6c0b56eSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9555d6c0b56eSmrg# provided by xorg-sgml-doctools, if installed. 9556d6c0b56eSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9557d6c0b56eSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9558d6c0b56eSmrgXORG_SGML_PATH= 9559d6c0b56eSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9560d6c0b56eSmrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9561d6c0b56eSmrg [m4_ifval([$1],[:], 9562d6c0b56eSmrg [if test x"$cross_compiling" != x"yes" ; then 9563d6c0b56eSmrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9564d6c0b56eSmrg [XORG_SGML_PATH=$prefix/share/sgml]) 9565d6c0b56eSmrg fi]) 9566d6c0b56eSmrg ]) 9567d6c0b56eSmrg 9568d6c0b56eSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9569d6c0b56eSmrg# the path and the name of the doc stylesheet 9570d6c0b56eSmrgif test "x$XORG_SGML_PATH" != "x" ; then 9571d6c0b56eSmrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9572d6c0b56eSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9573d6c0b56eSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9574d6c0b56eSmrgelse 9575d6c0b56eSmrg AC_MSG_RESULT([no]) 9576d6c0b56eSmrgfi 9577d6c0b56eSmrg 9578d6c0b56eSmrgAC_SUBST(XORG_SGML_PATH) 9579d6c0b56eSmrgAC_SUBST(STYLESHEET_SRCDIR) 9580d6c0b56eSmrgAC_SUBST(XSL_STYLESHEET) 9581d6c0b56eSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 9582d6c0b56eSmrg]) # XORG_CHECK_SGML_DOCTOOLS 9583d6c0b56eSmrg 9584d6c0b56eSmrg# XORG_CHECK_LINUXDOC 9585d6c0b56eSmrg# ------------------- 9586d6c0b56eSmrg# Minimum version: 1.0.0 9587d6c0b56eSmrg# 9588d6c0b56eSmrg# Defines the variable MAKE_TEXT if the necessary tools and 9589d6c0b56eSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9590d6c0b56eSmrg# Whether or not the necessary tools and files are found can be checked 9591d6c0b56eSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9592d6c0b56eSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9593d6c0b56eSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9594d6c0b56eSmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 9595d6c0b56eSmrg 9596d6c0b56eSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9597d6c0b56eSmrg 9598d6c0b56eSmrgAC_MSG_CHECKING([whether to build documentation]) 9599d6c0b56eSmrg 9600d6c0b56eSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 9601d6c0b56eSmrg BUILDDOC=yes 9602d6c0b56eSmrgelse 9603d6c0b56eSmrg BUILDDOC=no 9604d6c0b56eSmrgfi 9605d6c0b56eSmrg 9606d6c0b56eSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9607d6c0b56eSmrg 9608d6c0b56eSmrgAC_MSG_RESULT([$BUILDDOC]) 9609d6c0b56eSmrg 9610d6c0b56eSmrgAC_MSG_CHECKING([whether to build pdf documentation]) 9611d6c0b56eSmrg 9612d6c0b56eSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 9613d6c0b56eSmrg BUILDPDFDOC=yes 9614d6c0b56eSmrgelse 9615d6c0b56eSmrg BUILDPDFDOC=no 9616d6c0b56eSmrgfi 9617d6c0b56eSmrg 9618d6c0b56eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9619d6c0b56eSmrg 9620d6c0b56eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9621d6c0b56eSmrg 9622d6c0b56eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 9623d6c0b56eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9624d6c0b56eSmrgMAKE_PDF="$PS2PDF" 9625d6c0b56eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9626d6c0b56eSmrg 9627d6c0b56eSmrgAC_SUBST(MAKE_TEXT) 9628d6c0b56eSmrgAC_SUBST(MAKE_PS) 9629d6c0b56eSmrgAC_SUBST(MAKE_PDF) 9630d6c0b56eSmrgAC_SUBST(MAKE_HTML) 9631d6c0b56eSmrg]) # XORG_CHECK_LINUXDOC 9632d6c0b56eSmrg 9633d6c0b56eSmrg# XORG_CHECK_DOCBOOK 9634d6c0b56eSmrg# ------------------- 9635d6c0b56eSmrg# Minimum version: 1.0.0 9636d6c0b56eSmrg# 9637d6c0b56eSmrg# Checks for the ability to build output formats from SGML DocBook source. 9638d6c0b56eSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9639d6c0b56eSmrg# indicates whether the necessary tools and files are found and, if set, 9640d6c0b56eSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9641d6c0b56eSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9642d6c0b56eSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 9643d6c0b56eSmrg 9644d6c0b56eSmrgBUILDTXTDOC=no 9645d6c0b56eSmrgBUILDPDFDOC=no 9646d6c0b56eSmrgBUILDPSDOC=no 9647d6c0b56eSmrgBUILDHTMLDOC=no 9648d6c0b56eSmrg 9649d6c0b56eSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9650d6c0b56eSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9651d6c0b56eSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9652d6c0b56eSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9653d6c0b56eSmrg 9654d6c0b56eSmrgAC_MSG_CHECKING([whether to build text documentation]) 9655d6c0b56eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 9656d6c0b56eSmrg test x$BUILD_TXTDOC != xno; then 9657d6c0b56eSmrg BUILDTXTDOC=yes 9658d6c0b56eSmrgfi 9659d6c0b56eSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9660d6c0b56eSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9661d6c0b56eSmrg 9662d6c0b56eSmrgAC_MSG_CHECKING([whether to build PDF documentation]) 9663d6c0b56eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 9664d6c0b56eSmrg test x$BUILD_PDFDOC != xno; then 9665d6c0b56eSmrg BUILDPDFDOC=yes 9666d6c0b56eSmrgfi 9667d6c0b56eSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9668d6c0b56eSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9669d6c0b56eSmrg 9670d6c0b56eSmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 9671d6c0b56eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 9672d6c0b56eSmrg test x$BUILD_PSDOC != xno; then 9673d6c0b56eSmrg BUILDPSDOC=yes 9674d6c0b56eSmrgfi 9675d6c0b56eSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9676d6c0b56eSmrgAC_MSG_RESULT([$BUILDPSDOC]) 9677d6c0b56eSmrg 9678d6c0b56eSmrgAC_MSG_CHECKING([whether to build HTML documentation]) 9679d6c0b56eSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 9680d6c0b56eSmrg test x$BUILD_HTMLDOC != xno; then 9681d6c0b56eSmrg BUILDHTMLDOC=yes 9682d6c0b56eSmrgfi 9683d6c0b56eSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9684d6c0b56eSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9685d6c0b56eSmrg 9686d6c0b56eSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9687d6c0b56eSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9688d6c0b56eSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9689d6c0b56eSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9690d6c0b56eSmrg 9691d6c0b56eSmrgAC_SUBST(MAKE_TEXT) 9692d6c0b56eSmrgAC_SUBST(MAKE_PS) 9693d6c0b56eSmrgAC_SUBST(MAKE_PDF) 9694d6c0b56eSmrgAC_SUBST(MAKE_HTML) 9695d6c0b56eSmrg]) # XORG_CHECK_DOCBOOK 9696d6c0b56eSmrg 9697d6c0b56eSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 9698d6c0b56eSmrg# ---------------- 9699d6c0b56eSmrg# Minimum version: 1.5.0 9700d6c0b56eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9701d6c0b56eSmrg# 9702d6c0b56eSmrg# Documentation tools are not always available on all platforms and sometimes 9703d6c0b56eSmrg# not at the appropriate level. This macro enables a module to test for the 9704d6c0b56eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9705d6c0b56eSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 9706d6c0b56eSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 9707d6c0b56eSmrg# --with-xmlto assumes 'auto'. 9708d6c0b56eSmrg# 9709d6c0b56eSmrg# Interface to module: 9710d6c0b56eSmrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 9711d6c0b56eSmrg# XMLTO: returns the path of the xmlto program found 9712d6c0b56eSmrg# returns the path set by the user in the environment 9713d6c0b56eSmrg# --with-xmlto: 'yes' user instructs the module to use xmlto 9714d6c0b56eSmrg# 'no' user instructs the module not to use xmlto 9715d6c0b56eSmrg# 9716d6c0b56eSmrg# Added in version 1.10.0 9717d6c0b56eSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 9718d6c0b56eSmrg# xmlto for text output requires either lynx, links, or w3m browsers 9719d6c0b56eSmrg# 9720d6c0b56eSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 9721d6c0b56eSmrg# 9722d6c0b56eSmrgAC_DEFUN([XORG_WITH_XMLTO],[ 9723d6c0b56eSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 9724d6c0b56eSmrgm4_define([_defopt], m4_default([$2], [auto])) 9725d6c0b56eSmrgAC_ARG_WITH(xmlto, 9726d6c0b56eSmrg AS_HELP_STRING([--with-xmlto], 9727d6c0b56eSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 9728d6c0b56eSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 9729d6c0b56eSmrgm4_undefine([_defopt]) 9730d6c0b56eSmrg 9731d6c0b56eSmrgif test "x$use_xmlto" = x"auto"; then 9732d6c0b56eSmrg AC_PATH_PROG([XMLTO], [xmlto]) 9733d6c0b56eSmrg if test "x$XMLTO" = "x"; then 9734d6c0b56eSmrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 9735d6c0b56eSmrg have_xmlto=no 9736d6c0b56eSmrg else 9737d6c0b56eSmrg have_xmlto=yes 9738d6c0b56eSmrg fi 9739d6c0b56eSmrgelif test "x$use_xmlto" = x"yes" ; then 9740d6c0b56eSmrg AC_PATH_PROG([XMLTO], [xmlto]) 9741d6c0b56eSmrg if test "x$XMLTO" = "x"; then 9742d6c0b56eSmrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 9743d6c0b56eSmrg fi 9744d6c0b56eSmrg have_xmlto=yes 9745d6c0b56eSmrgelif test "x$use_xmlto" = x"no" ; then 9746d6c0b56eSmrg if test "x$XMLTO" != "x"; then 9747d6c0b56eSmrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 9748d6c0b56eSmrg fi 9749d6c0b56eSmrg have_xmlto=no 9750d6c0b56eSmrgelse 9751d6c0b56eSmrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 9752d6c0b56eSmrgfi 9753d6c0b56eSmrg 9754d6c0b56eSmrg# Test for a minimum version of xmlto, if provided. 9755d6c0b56eSmrgm4_ifval([$1], 9756d6c0b56eSmrg[if test "$have_xmlto" = yes; then 9757d6c0b56eSmrg # scrape the xmlto version 9758d6c0b56eSmrg AC_MSG_CHECKING([the xmlto version]) 9759d6c0b56eSmrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 9760d6c0b56eSmrg AC_MSG_RESULT([$xmlto_version]) 9761d6c0b56eSmrg AS_VERSION_COMPARE([$xmlto_version], [$1], 9762d6c0b56eSmrg [if test "x$use_xmlto" = xauto; then 9763d6c0b56eSmrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 9764d6c0b56eSmrg have_xmlto=no 9765d6c0b56eSmrg else 9766d6c0b56eSmrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 9767d6c0b56eSmrg fi]) 9768d6c0b56eSmrgfi]) 9769d6c0b56eSmrg 9770d6c0b56eSmrg# Test for the ability of xmlto to generate a text target 9771d6c0b56eSmrg# 9772d6c0b56eSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the 9773d6c0b56eSmrg# following test for empty XML docbook files. 9774d6c0b56eSmrg# For compatibility reasons use the following empty XML docbook file and if 9775d6c0b56eSmrg# it fails try it again with a non-empty XML file. 9776d6c0b56eSmrghave_xmlto_text=no 9777d6c0b56eSmrgcat > conftest.xml << "EOF" 9778d6c0b56eSmrgEOF 9779d6c0b56eSmrgAS_IF([test "$have_xmlto" = yes], 9780d6c0b56eSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9781d6c0b56eSmrg [have_xmlto_text=yes], 9782d6c0b56eSmrg [# Try it again with a non-empty XML file. 9783d6c0b56eSmrg cat > conftest.xml << "EOF" 9784d6c0b56eSmrg<x></x> 9785d6c0b56eSmrgEOF 9786d6c0b56eSmrg AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 9787d6c0b56eSmrg [have_xmlto_text=yes], 9788d6c0b56eSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])]) 9789d6c0b56eSmrgrm -f conftest.xml 9790d6c0b56eSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 9791d6c0b56eSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 9792d6c0b56eSmrg]) # XORG_WITH_XMLTO 9793d6c0b56eSmrg 9794d6c0b56eSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 9795d6c0b56eSmrg# -------------------------------------------- 9796d6c0b56eSmrg# Minimum version: 1.12.0 9797d6c0b56eSmrg# Minimum version for optional DEFAULT argument: 1.12.0 9798d6c0b56eSmrg# 9799d6c0b56eSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 9800d6c0b56eSmrg# XML-based language used for the transformation of XML documents. 9801d6c0b56eSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 9802d6c0b56eSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 9803d6c0b56eSmrg# The XSLT processor is often used as a standalone tool for transformations. 9804d6c0b56eSmrg# It should not be assumed that this tool is used only to work with documnetation. 9805d6c0b56eSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 9806d6c0b56eSmrg# 9807d6c0b56eSmrg# Interface to module: 9808d6c0b56eSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 9809d6c0b56eSmrg# XSLTPROC: returns the path of the xsltproc program found 9810d6c0b56eSmrg# returns the path set by the user in the environment 9811d6c0b56eSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 9812d6c0b56eSmrg# 'no' user instructs the module not to use xsltproc 9813d6c0b56eSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 9814d6c0b56eSmrg# 9815d6c0b56eSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 9816d6c0b56eSmrg# 9817d6c0b56eSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 9818d6c0b56eSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 9819d6c0b56eSmrg# Preserves the interface, should it be implemented later 9820d6c0b56eSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 9821d6c0b56eSmrgm4_define([_defopt], m4_default([$2], [auto])) 9822d6c0b56eSmrgAC_ARG_WITH(xsltproc, 9823d6c0b56eSmrg AS_HELP_STRING([--with-xsltproc], 9824d6c0b56eSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 9825d6c0b56eSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 9826d6c0b56eSmrgm4_undefine([_defopt]) 9827d6c0b56eSmrg 9828d6c0b56eSmrgif test "x$use_xsltproc" = x"auto"; then 9829d6c0b56eSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9830d6c0b56eSmrg if test "x$XSLTPROC" = "x"; then 9831d6c0b56eSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 9832d6c0b56eSmrg have_xsltproc=no 9833d6c0b56eSmrg else 9834d6c0b56eSmrg have_xsltproc=yes 9835d6c0b56eSmrg fi 9836d6c0b56eSmrgelif test "x$use_xsltproc" = x"yes" ; then 9837d6c0b56eSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 9838d6c0b56eSmrg if test "x$XSLTPROC" = "x"; then 9839d6c0b56eSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 9840d6c0b56eSmrg fi 9841d6c0b56eSmrg have_xsltproc=yes 9842d6c0b56eSmrgelif test "x$use_xsltproc" = x"no" ; then 9843d6c0b56eSmrg if test "x$XSLTPROC" != "x"; then 9844d6c0b56eSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 9845d6c0b56eSmrg fi 9846d6c0b56eSmrg have_xsltproc=no 9847d6c0b56eSmrgelse 9848d6c0b56eSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 9849d6c0b56eSmrgfi 9850d6c0b56eSmrg 9851d6c0b56eSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 9852d6c0b56eSmrg]) # XORG_WITH_XSLTPROC 9853d6c0b56eSmrg 9854d6c0b56eSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 9855d6c0b56eSmrg# ---------------------------------------- 9856d6c0b56eSmrg# Minimum version: 1.15.0 9857d6c0b56eSmrg# 9858d6c0b56eSmrg# PERL (Practical Extraction and Report Language) is a language optimized for 9859d6c0b56eSmrg# scanning arbitrary text files, extracting information from those text files, 9860d6c0b56eSmrg# and printing reports based on that information. 9861d6c0b56eSmrg# 9862d6c0b56eSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 9863d6c0b56eSmrg# 9864d6c0b56eSmrg# Interface to module: 9865d6c0b56eSmrg# HAVE_PERL: used in makefiles to conditionally scan text files 9866d6c0b56eSmrg# PERL: returns the path of the perl program found 9867d6c0b56eSmrg# returns the path set by the user in the environment 9868d6c0b56eSmrg# --with-perl: 'yes' user instructs the module to use perl 9869d6c0b56eSmrg# 'no' user instructs the module not to use perl 9870d6c0b56eSmrg# have_perl: returns yes if perl found in PATH or no 9871d6c0b56eSmrg# 9872d6c0b56eSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 9873d6c0b56eSmrg# 9874d6c0b56eSmrgAC_DEFUN([XORG_WITH_PERL],[ 9875d6c0b56eSmrgAC_ARG_VAR([PERL], [Path to perl command]) 9876d6c0b56eSmrg# Preserves the interface, should it be implemented later 9877d6c0b56eSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 9878d6c0b56eSmrgm4_define([_defopt], m4_default([$2], [auto])) 9879d6c0b56eSmrgAC_ARG_WITH(perl, 9880d6c0b56eSmrg AS_HELP_STRING([--with-perl], 9881d6c0b56eSmrg [Use perl for extracting information from files (default: ]_defopt[)]), 9882d6c0b56eSmrg [use_perl=$withval], [use_perl=]_defopt) 9883d6c0b56eSmrgm4_undefine([_defopt]) 9884d6c0b56eSmrg 9885d6c0b56eSmrgif test "x$use_perl" = x"auto"; then 9886d6c0b56eSmrg AC_PATH_PROG([PERL], [perl]) 9887d6c0b56eSmrg if test "x$PERL" = "x"; then 9888d6c0b56eSmrg AC_MSG_WARN([perl not found - cannot extract information and report]) 9889d6c0b56eSmrg have_perl=no 9890d6c0b56eSmrg else 9891d6c0b56eSmrg have_perl=yes 9892d6c0b56eSmrg fi 9893d6c0b56eSmrgelif test "x$use_perl" = x"yes" ; then 9894d6c0b56eSmrg AC_PATH_PROG([PERL], [perl]) 9895d6c0b56eSmrg if test "x$PERL" = "x"; then 9896d6c0b56eSmrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 9897d6c0b56eSmrg fi 9898d6c0b56eSmrg have_perl=yes 9899d6c0b56eSmrgelif test "x$use_perl" = x"no" ; then 9900d6c0b56eSmrg if test "x$PERL" != "x"; then 9901d6c0b56eSmrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 9902d6c0b56eSmrg fi 9903d6c0b56eSmrg have_perl=no 9904d6c0b56eSmrgelse 9905d6c0b56eSmrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 9906d6c0b56eSmrgfi 9907d6c0b56eSmrg 9908d6c0b56eSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 9909d6c0b56eSmrg]) # XORG_WITH_PERL 9910d6c0b56eSmrg 9911d6c0b56eSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 9912d6c0b56eSmrg# ---------------- 9913d6c0b56eSmrg# Minimum version: 1.5.0 9914d6c0b56eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9915d6c0b56eSmrg# 9916d6c0b56eSmrg# Documentation tools are not always available on all platforms and sometimes 9917d6c0b56eSmrg# not at the appropriate level. This macro enables a module to test for the 9918d6c0b56eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9919d6c0b56eSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 9920d6c0b56eSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 9921d6c0b56eSmrg# --with-asciidoc assumes 'auto'. 9922d6c0b56eSmrg# 9923d6c0b56eSmrg# Interface to module: 9924d6c0b56eSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 9925d6c0b56eSmrg# ASCIIDOC: returns the path of the asciidoc program found 9926d6c0b56eSmrg# returns the path set by the user in the environment 9927d6c0b56eSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 9928d6c0b56eSmrg# 'no' user instructs the module not to use asciidoc 9929d6c0b56eSmrg# 9930d6c0b56eSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 9931d6c0b56eSmrg# 9932d6c0b56eSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 9933d6c0b56eSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 9934d6c0b56eSmrgm4_define([_defopt], m4_default([$2], [auto])) 9935d6c0b56eSmrgAC_ARG_WITH(asciidoc, 9936d6c0b56eSmrg AS_HELP_STRING([--with-asciidoc], 9937d6c0b56eSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 9938d6c0b56eSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 9939d6c0b56eSmrgm4_undefine([_defopt]) 9940d6c0b56eSmrg 9941d6c0b56eSmrgif test "x$use_asciidoc" = x"auto"; then 9942d6c0b56eSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9943d6c0b56eSmrg if test "x$ASCIIDOC" = "x"; then 9944d6c0b56eSmrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 9945d6c0b56eSmrg have_asciidoc=no 9946d6c0b56eSmrg else 9947d6c0b56eSmrg have_asciidoc=yes 9948d6c0b56eSmrg fi 9949d6c0b56eSmrgelif test "x$use_asciidoc" = x"yes" ; then 9950d6c0b56eSmrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 9951d6c0b56eSmrg if test "x$ASCIIDOC" = "x"; then 9952d6c0b56eSmrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 9953d6c0b56eSmrg fi 9954d6c0b56eSmrg have_asciidoc=yes 9955d6c0b56eSmrgelif test "x$use_asciidoc" = x"no" ; then 9956d6c0b56eSmrg if test "x$ASCIIDOC" != "x"; then 9957d6c0b56eSmrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 9958d6c0b56eSmrg fi 9959d6c0b56eSmrg have_asciidoc=no 9960d6c0b56eSmrgelse 9961d6c0b56eSmrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 9962d6c0b56eSmrgfi 9963d6c0b56eSmrgm4_ifval([$1], 9964d6c0b56eSmrg[if test "$have_asciidoc" = yes; then 9965d6c0b56eSmrg # scrape the asciidoc version 9966d6c0b56eSmrg AC_MSG_CHECKING([the asciidoc version]) 9967d6c0b56eSmrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 9968d6c0b56eSmrg AC_MSG_RESULT([$asciidoc_version]) 9969d6c0b56eSmrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 9970d6c0b56eSmrg [if test "x$use_asciidoc" = xauto; then 9971d6c0b56eSmrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 9972d6c0b56eSmrg have_asciidoc=no 9973d6c0b56eSmrg else 9974d6c0b56eSmrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 9975d6c0b56eSmrg fi]) 9976d6c0b56eSmrgfi]) 9977d6c0b56eSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 9978d6c0b56eSmrg]) # XORG_WITH_ASCIIDOC 9979d6c0b56eSmrg 9980d6c0b56eSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 9981d6c0b56eSmrg# ------------------------------------------- 9982d6c0b56eSmrg# Minimum version: 1.5.0 9983d6c0b56eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 9984d6c0b56eSmrg# Minimum version for optional DOT checking: 1.18.0 9985d6c0b56eSmrg# 9986d6c0b56eSmrg# Documentation tools are not always available on all platforms and sometimes 9987d6c0b56eSmrg# not at the appropriate level. This macro enables a module to test for the 9988d6c0b56eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 9989d6c0b56eSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 9990d6c0b56eSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 9991d6c0b56eSmrg# --with-doxygen assumes 'auto'. 9992d6c0b56eSmrg# 9993d6c0b56eSmrg# Interface to module: 9994d6c0b56eSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 9995d6c0b56eSmrg# DOXYGEN: returns the path of the doxygen program found 9996d6c0b56eSmrg# returns the path set by the user in the environment 9997d6c0b56eSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen 9998d6c0b56eSmrg# 'no' user instructs the module not to use doxygen 9999d6c0b56eSmrg# 10000d6c0b56eSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10001d6c0b56eSmrg# 10002d6c0b56eSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10003d6c0b56eSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10004d6c0b56eSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 10005d6c0b56eSmrgm4_define([_defopt], m4_default([$2], [auto])) 10006d6c0b56eSmrgAC_ARG_WITH(doxygen, 10007d6c0b56eSmrg AS_HELP_STRING([--with-doxygen], 10008d6c0b56eSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10009d6c0b56eSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 10010d6c0b56eSmrgm4_undefine([_defopt]) 10011d6c0b56eSmrg 10012d6c0b56eSmrgif test "x$use_doxygen" = x"auto"; then 10013d6c0b56eSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10014d6c0b56eSmrg if test "x$DOXYGEN" = "x"; then 10015d6c0b56eSmrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10016d6c0b56eSmrg have_doxygen=no 10017d6c0b56eSmrg else 10018d6c0b56eSmrg have_doxygen=yes 10019d6c0b56eSmrg fi 10020d6c0b56eSmrgelif test "x$use_doxygen" = x"yes" ; then 10021d6c0b56eSmrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10022d6c0b56eSmrg if test "x$DOXYGEN" = "x"; then 10023d6c0b56eSmrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10024d6c0b56eSmrg fi 10025d6c0b56eSmrg have_doxygen=yes 10026d6c0b56eSmrgelif test "x$use_doxygen" = x"no" ; then 10027d6c0b56eSmrg if test "x$DOXYGEN" != "x"; then 10028d6c0b56eSmrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10029d6c0b56eSmrg fi 10030d6c0b56eSmrg have_doxygen=no 10031d6c0b56eSmrgelse 10032d6c0b56eSmrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10033d6c0b56eSmrgfi 10034d6c0b56eSmrgm4_ifval([$1], 10035d6c0b56eSmrg[if test "$have_doxygen" = yes; then 10036d6c0b56eSmrg # scrape the doxygen version 10037d6c0b56eSmrg AC_MSG_CHECKING([the doxygen version]) 10038d6c0b56eSmrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10039d6c0b56eSmrg AC_MSG_RESULT([$doxygen_version]) 10040d6c0b56eSmrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10041d6c0b56eSmrg [if test "x$use_doxygen" = xauto; then 10042d6c0b56eSmrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10043d6c0b56eSmrg have_doxygen=no 10044d6c0b56eSmrg else 10045d6c0b56eSmrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10046d6c0b56eSmrg fi]) 10047d6c0b56eSmrgfi]) 10048d6c0b56eSmrg 10049d6c0b56eSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 10050d6c0b56eSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 10051d6c0b56eSmrgdnl HAVE_DOT = @HAVE_DOT@ 10052d6c0b56eSmrgHAVE_DOT=no 10053d6c0b56eSmrgif test "x$have_doxygen" = "xyes"; then 10054d6c0b56eSmrg AC_PATH_PROG([DOT], [dot]) 10055d6c0b56eSmrg if test "x$DOT" != "x"; then 10056d6c0b56eSmrg HAVE_DOT=yes 10057d6c0b56eSmrg fi 10058d6c0b56eSmrgfi 10059d6c0b56eSmrg 10060d6c0b56eSmrgAC_SUBST([HAVE_DOT]) 10061d6c0b56eSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 10062d6c0b56eSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10063d6c0b56eSmrg]) # XORG_WITH_DOXYGEN 10064d6c0b56eSmrg 10065d6c0b56eSmrg# XORG_WITH_GROFF([DEFAULT]) 10066d6c0b56eSmrg# ---------------- 10067d6c0b56eSmrg# Minimum version: 1.6.0 10068d6c0b56eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10069d6c0b56eSmrg# 10070d6c0b56eSmrg# Documentation tools are not always available on all platforms and sometimes 10071d6c0b56eSmrg# not at the appropriate level. This macro enables a module to test for the 10072d6c0b56eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10073d6c0b56eSmrg# the --with-groff option, it allows maximum flexibilty in making decisions 10074d6c0b56eSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 10075d6c0b56eSmrg# --with-groff assumes 'auto'. 10076d6c0b56eSmrg# 10077d6c0b56eSmrg# Interface to module: 10078d6c0b56eSmrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10079d6c0b56eSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10080d6c0b56eSmrg# HAVE_GROFF_MS: the -ms macros package 10081d6c0b56eSmrg# GROFF: returns the path of the groff program found 10082d6c0b56eSmrg# returns the path set by the user in the environment 10083d6c0b56eSmrg# --with-groff: 'yes' user instructs the module to use groff 10084d6c0b56eSmrg# 'no' user instructs the module not to use groff 10085d6c0b56eSmrg# 10086d6c0b56eSmrg# Added in version 1.9.0: 10087d6c0b56eSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10088d6c0b56eSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10089d6c0b56eSmrg# psselect from the psutils package. 10090d6c0b56eSmrg# the ghostcript package. Refer to the grohtml man pages 10091d6c0b56eSmrg# 10092d6c0b56eSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10093d6c0b56eSmrg# 10094d6c0b56eSmrg# OS and distros often splits groff in a basic and full package, the former 10095d6c0b56eSmrg# having the groff program and the later having devices, fonts and macros 10096d6c0b56eSmrg# Checking for the groff executable is not enough. 10097d6c0b56eSmrg# 10098d6c0b56eSmrg# If macros are missing, we cannot assume that groff is useless, so we don't 10099d6c0b56eSmrg# unset HAVE_GROFF or GROFF env variables. 10100d6c0b56eSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10101d6c0b56eSmrg# 10102d6c0b56eSmrgAC_DEFUN([XORG_WITH_GROFF],[ 10103d6c0b56eSmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10104d6c0b56eSmrgm4_define([_defopt], m4_default([$1], [auto])) 10105d6c0b56eSmrgAC_ARG_WITH(groff, 10106d6c0b56eSmrg AS_HELP_STRING([--with-groff], 10107d6c0b56eSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10108d6c0b56eSmrg [use_groff=$withval], [use_groff=]_defopt) 10109d6c0b56eSmrgm4_undefine([_defopt]) 10110d6c0b56eSmrg 10111d6c0b56eSmrgif test "x$use_groff" = x"auto"; then 10112d6c0b56eSmrg AC_PATH_PROG([GROFF], [groff]) 10113d6c0b56eSmrg if test "x$GROFF" = "x"; then 10114d6c0b56eSmrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10115d6c0b56eSmrg have_groff=no 10116d6c0b56eSmrg else 10117d6c0b56eSmrg have_groff=yes 10118d6c0b56eSmrg fi 10119d6c0b56eSmrgelif test "x$use_groff" = x"yes" ; then 10120d6c0b56eSmrg AC_PATH_PROG([GROFF], [groff]) 10121d6c0b56eSmrg if test "x$GROFF" = "x"; then 10122d6c0b56eSmrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10123d6c0b56eSmrg fi 10124d6c0b56eSmrg have_groff=yes 10125d6c0b56eSmrgelif test "x$use_groff" = x"no" ; then 10126d6c0b56eSmrg if test "x$GROFF" != "x"; then 10127d6c0b56eSmrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10128d6c0b56eSmrg fi 10129d6c0b56eSmrg have_groff=no 10130d6c0b56eSmrgelse 10131d6c0b56eSmrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10132d6c0b56eSmrgfi 10133d6c0b56eSmrg 10134d6c0b56eSmrg# We have groff, test for the presence of the macro packages 10135d6c0b56eSmrgif test "x$have_groff" = x"yes"; then 10136d6c0b56eSmrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10137d6c0b56eSmrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10138d6c0b56eSmrg groff_ms_works=yes 10139d6c0b56eSmrg else 10140d6c0b56eSmrg groff_ms_works=no 10141d6c0b56eSmrg fi 10142d6c0b56eSmrg AC_MSG_RESULT([$groff_ms_works]) 10143d6c0b56eSmrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10144d6c0b56eSmrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10145d6c0b56eSmrg groff_mm_works=yes 10146d6c0b56eSmrg else 10147d6c0b56eSmrg groff_mm_works=no 10148d6c0b56eSmrg fi 10149d6c0b56eSmrg AC_MSG_RESULT([$groff_mm_works]) 10150d6c0b56eSmrgfi 10151d6c0b56eSmrg 10152d6c0b56eSmrg# We have groff, test for HTML dependencies, one command per package 10153d6c0b56eSmrgif test "x$have_groff" = x"yes"; then 10154d6c0b56eSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10155d6c0b56eSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10156d6c0b56eSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10157d6c0b56eSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10158d6c0b56eSmrg have_groff_html=yes 10159d6c0b56eSmrg else 10160d6c0b56eSmrg have_groff_html=no 10161d6c0b56eSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10162d6c0b56eSmrg fi 10163d6c0b56eSmrgfi 10164d6c0b56eSmrg 10165d6c0b56eSmrg# Set Automake conditionals for Makefiles 10166d6c0b56eSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10167d6c0b56eSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10168d6c0b56eSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10169d6c0b56eSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10170d6c0b56eSmrg]) # XORG_WITH_GROFF 10171d6c0b56eSmrg 10172d6c0b56eSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 10173d6c0b56eSmrg# --------------------------------------- 10174d6c0b56eSmrg# Minimum version: 1.6.0 10175d6c0b56eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10176d6c0b56eSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10177d6c0b56eSmrg# 10178d6c0b56eSmrg# Documentation tools are not always available on all platforms and sometimes 10179d6c0b56eSmrg# not at the appropriate level. This macro enables a module to test for the 10180d6c0b56eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10181d6c0b56eSmrg# the --with-fop option, it allows maximum flexibilty in making decisions 10182d6c0b56eSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 10183d6c0b56eSmrg# --with-fop assumes 'auto'. 10184d6c0b56eSmrg# 10185d6c0b56eSmrg# Interface to module: 10186d6c0b56eSmrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10187d6c0b56eSmrg# FOP: returns the path of the fop program found 10188d6c0b56eSmrg# returns the path set by the user in the environment 10189d6c0b56eSmrg# --with-fop: 'yes' user instructs the module to use fop 10190d6c0b56eSmrg# 'no' user instructs the module not to use fop 10191d6c0b56eSmrg# 10192d6c0b56eSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10193d6c0b56eSmrg# 10194d6c0b56eSmrgAC_DEFUN([XORG_WITH_FOP],[ 10195d6c0b56eSmrgAC_ARG_VAR([FOP], [Path to fop command]) 10196d6c0b56eSmrgm4_define([_defopt], m4_default([$2], [auto])) 10197d6c0b56eSmrgAC_ARG_WITH(fop, 10198d6c0b56eSmrg AS_HELP_STRING([--with-fop], 10199d6c0b56eSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10200d6c0b56eSmrg [use_fop=$withval], [use_fop=]_defopt) 10201d6c0b56eSmrgm4_undefine([_defopt]) 10202d6c0b56eSmrg 10203d6c0b56eSmrgif test "x$use_fop" = x"auto"; then 10204d6c0b56eSmrg AC_PATH_PROG([FOP], [fop]) 10205d6c0b56eSmrg if test "x$FOP" = "x"; then 10206d6c0b56eSmrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10207d6c0b56eSmrg have_fop=no 10208d6c0b56eSmrg else 10209d6c0b56eSmrg have_fop=yes 10210d6c0b56eSmrg fi 10211d6c0b56eSmrgelif test "x$use_fop" = x"yes" ; then 10212d6c0b56eSmrg AC_PATH_PROG([FOP], [fop]) 10213d6c0b56eSmrg if test "x$FOP" = "x"; then 10214d6c0b56eSmrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10215d6c0b56eSmrg fi 10216d6c0b56eSmrg have_fop=yes 10217d6c0b56eSmrgelif test "x$use_fop" = x"no" ; then 10218d6c0b56eSmrg if test "x$FOP" != "x"; then 10219d6c0b56eSmrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10220d6c0b56eSmrg fi 10221d6c0b56eSmrg have_fop=no 10222d6c0b56eSmrgelse 10223d6c0b56eSmrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10224d6c0b56eSmrgfi 10225d6c0b56eSmrg 10226d6c0b56eSmrg# Test for a minimum version of fop, if provided. 10227d6c0b56eSmrgm4_ifval([$1], 10228d6c0b56eSmrg[if test "$have_fop" = yes; then 10229d6c0b56eSmrg # scrape the fop version 10230d6c0b56eSmrg AC_MSG_CHECKING([for fop minimum version]) 10231d6c0b56eSmrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 10232d6c0b56eSmrg AC_MSG_RESULT([$fop_version]) 10233d6c0b56eSmrg AS_VERSION_COMPARE([$fop_version], [$1], 10234d6c0b56eSmrg [if test "x$use_fop" = xauto; then 10235d6c0b56eSmrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 10236d6c0b56eSmrg have_fop=no 10237d6c0b56eSmrg else 10238d6c0b56eSmrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 10239d6c0b56eSmrg fi]) 10240d6c0b56eSmrgfi]) 10241d6c0b56eSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10242d6c0b56eSmrg]) # XORG_WITH_FOP 10243d6c0b56eSmrg 10244d6c0b56eSmrg# XORG_WITH_M4([MIN-VERSION]) 10245d6c0b56eSmrg# --------------------------- 10246d6c0b56eSmrg# Minimum version: 1.19.0 10247d6c0b56eSmrg# 10248d6c0b56eSmrg# This macro attempts to locate an m4 macro processor which supports 10249d6c0b56eSmrg# -I option and is only useful for modules relying on M4 in order to 10250d6c0b56eSmrg# expand macros in source code files. 10251d6c0b56eSmrg# 10252d6c0b56eSmrg# Interface to module: 10253d6c0b56eSmrg# M4: returns the path of the m4 program found 10254d6c0b56eSmrg# returns the path set by the user in the environment 10255d6c0b56eSmrg# 10256d6c0b56eSmrgAC_DEFUN([XORG_WITH_M4], [ 10257d6c0b56eSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 10258d6c0b56eSmrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 10259d6c0b56eSmrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 10260d6c0b56eSmrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 10261d6c0b56eSmrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 10262d6c0b56eSmrg [$PATH:/usr/gnu/bin])]) 10263d6c0b56eSmrg 10264d6c0b56eSmrgAC_SUBST([M4], [$ac_cv_path_M4]) 10265d6c0b56eSmrg]) # XORG_WITH_M4 10266d6c0b56eSmrg 10267d6c0b56eSmrg# XORG_WITH_PS2PDF([DEFAULT]) 10268d6c0b56eSmrg# ---------------- 10269d6c0b56eSmrg# Minimum version: 1.6.0 10270d6c0b56eSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10271d6c0b56eSmrg# 10272d6c0b56eSmrg# Documentation tools are not always available on all platforms and sometimes 10273d6c0b56eSmrg# not at the appropriate level. This macro enables a module to test for the 10274d6c0b56eSmrg# presence of the tool and obtain it's path in separate variables. Coupled with 10275d6c0b56eSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10276d6c0b56eSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10277d6c0b56eSmrg# --with-ps2pdf assumes 'auto'. 10278d6c0b56eSmrg# 10279d6c0b56eSmrg# Interface to module: 10280d6c0b56eSmrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10281d6c0b56eSmrg# PS2PDF: returns the path of the ps2pdf program found 10282d6c0b56eSmrg# returns the path set by the user in the environment 10283d6c0b56eSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10284d6c0b56eSmrg# 'no' user instructs the module not to use ps2pdf 10285d6c0b56eSmrg# 10286d6c0b56eSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10287d6c0b56eSmrg# 10288d6c0b56eSmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10289d6c0b56eSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10290d6c0b56eSmrgm4_define([_defopt], m4_default([$1], [auto])) 10291d6c0b56eSmrgAC_ARG_WITH(ps2pdf, 10292d6c0b56eSmrg AS_HELP_STRING([--with-ps2pdf], 10293d6c0b56eSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10294d6c0b56eSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10295d6c0b56eSmrgm4_undefine([_defopt]) 10296d6c0b56eSmrg 10297d6c0b56eSmrgif test "x$use_ps2pdf" = x"auto"; then 10298d6c0b56eSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10299d6c0b56eSmrg if test "x$PS2PDF" = "x"; then 10300d6c0b56eSmrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10301d6c0b56eSmrg have_ps2pdf=no 10302d6c0b56eSmrg else 10303d6c0b56eSmrg have_ps2pdf=yes 10304d6c0b56eSmrg fi 10305d6c0b56eSmrgelif test "x$use_ps2pdf" = x"yes" ; then 10306d6c0b56eSmrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10307d6c0b56eSmrg if test "x$PS2PDF" = "x"; then 10308d6c0b56eSmrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10309d6c0b56eSmrg fi 10310d6c0b56eSmrg have_ps2pdf=yes 10311d6c0b56eSmrgelif test "x$use_ps2pdf" = x"no" ; then 10312d6c0b56eSmrg if test "x$PS2PDF" != "x"; then 10313d6c0b56eSmrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10314d6c0b56eSmrg fi 10315d6c0b56eSmrg have_ps2pdf=no 10316d6c0b56eSmrgelse 10317d6c0b56eSmrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10318d6c0b56eSmrgfi 10319d6c0b56eSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10320d6c0b56eSmrg]) # XORG_WITH_PS2PDF 10321d6c0b56eSmrg 10322d6c0b56eSmrg# XORG_ENABLE_DOCS (enable_docs=yes) 10323d6c0b56eSmrg# ---------------- 10324d6c0b56eSmrg# Minimum version: 1.6.0 10325d6c0b56eSmrg# 10326d6c0b56eSmrg# Documentation tools are not always available on all platforms and sometimes 10327d6c0b56eSmrg# not at the appropriate level. This macro enables a builder to skip all 10328d6c0b56eSmrg# documentation targets except traditional man pages. 10329d6c0b56eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10330d6c0b56eSmrg# maximum flexibilty in controlling documentation building. 10331d6c0b56eSmrg# Refer to: 10332d6c0b56eSmrg# XORG_WITH_XMLTO --with-xmlto 10333d6c0b56eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10334d6c0b56eSmrg# XORG_WITH_DOXYGEN --with-doxygen 10335d6c0b56eSmrg# XORG_WITH_FOP --with-fop 10336d6c0b56eSmrg# XORG_WITH_GROFF --with-groff 10337d6c0b56eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10338d6c0b56eSmrg# 10339d6c0b56eSmrg# Interface to module: 10340d6c0b56eSmrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10341d6c0b56eSmrg# --enable-docs: 'yes' user instructs the module to generate docs 10342d6c0b56eSmrg# 'no' user instructs the module not to generate docs 10343d6c0b56eSmrg# parm1: specify the default value, yes or no. 10344d6c0b56eSmrg# 10345d6c0b56eSmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10346d6c0b56eSmrgm4_define([docs_default], m4_default([$1], [yes])) 10347d6c0b56eSmrgAC_ARG_ENABLE(docs, 10348d6c0b56eSmrg AS_HELP_STRING([--enable-docs], 10349d6c0b56eSmrg [Enable building the documentation (default: ]docs_default[)]), 10350d6c0b56eSmrg [build_docs=$enableval], [build_docs=]docs_default) 10351d6c0b56eSmrgm4_undefine([docs_default]) 10352d6c0b56eSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10353d6c0b56eSmrgAC_MSG_CHECKING([whether to build documentation]) 10354d6c0b56eSmrgAC_MSG_RESULT([$build_docs]) 10355d6c0b56eSmrg]) # XORG_ENABLE_DOCS 10356d6c0b56eSmrg 10357d6c0b56eSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10358d6c0b56eSmrg# ---------------- 10359d6c0b56eSmrg# Minimum version: 1.6.0 10360d6c0b56eSmrg# 10361d6c0b56eSmrg# This macro enables a builder to skip all developer documentation. 10362d6c0b56eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10363d6c0b56eSmrg# maximum flexibilty in controlling documentation building. 10364d6c0b56eSmrg# Refer to: 10365d6c0b56eSmrg# XORG_WITH_XMLTO --with-xmlto 10366d6c0b56eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10367d6c0b56eSmrg# XORG_WITH_DOXYGEN --with-doxygen 10368d6c0b56eSmrg# XORG_WITH_FOP --with-fop 10369d6c0b56eSmrg# XORG_WITH_GROFF --with-groff 10370d6c0b56eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10371d6c0b56eSmrg# 10372d6c0b56eSmrg# Interface to module: 10373d6c0b56eSmrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10374d6c0b56eSmrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10375d6c0b56eSmrg# 'no' user instructs the module not to generate developer docs 10376d6c0b56eSmrg# parm1: specify the default value, yes or no. 10377d6c0b56eSmrg# 10378d6c0b56eSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10379d6c0b56eSmrgm4_define([devel_default], m4_default([$1], [yes])) 10380d6c0b56eSmrgAC_ARG_ENABLE(devel-docs, 10381d6c0b56eSmrg AS_HELP_STRING([--enable-devel-docs], 10382d6c0b56eSmrg [Enable building the developer documentation (default: ]devel_default[)]), 10383d6c0b56eSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10384d6c0b56eSmrgm4_undefine([devel_default]) 10385d6c0b56eSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10386d6c0b56eSmrgAC_MSG_CHECKING([whether to build developer documentation]) 10387d6c0b56eSmrgAC_MSG_RESULT([$build_devel_docs]) 10388d6c0b56eSmrg]) # XORG_ENABLE_DEVEL_DOCS 10389d6c0b56eSmrg 10390d6c0b56eSmrg# XORG_ENABLE_SPECS (enable_specs=yes) 10391d6c0b56eSmrg# ---------------- 10392d6c0b56eSmrg# Minimum version: 1.6.0 10393d6c0b56eSmrg# 10394d6c0b56eSmrg# This macro enables a builder to skip all functional specification targets. 10395d6c0b56eSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10396d6c0b56eSmrg# maximum flexibilty in controlling documentation building. 10397d6c0b56eSmrg# Refer to: 10398d6c0b56eSmrg# XORG_WITH_XMLTO --with-xmlto 10399d6c0b56eSmrg# XORG_WITH_ASCIIDOC --with-asciidoc 10400d6c0b56eSmrg# XORG_WITH_DOXYGEN --with-doxygen 10401d6c0b56eSmrg# XORG_WITH_FOP --with-fop 10402d6c0b56eSmrg# XORG_WITH_GROFF --with-groff 10403d6c0b56eSmrg# XORG_WITH_PS2PDF --with-ps2pdf 10404d6c0b56eSmrg# 10405d6c0b56eSmrg# Interface to module: 10406d6c0b56eSmrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10407d6c0b56eSmrg# --enable-specs: 'yes' user instructs the module to generate specs 10408d6c0b56eSmrg# 'no' user instructs the module not to generate specs 10409d6c0b56eSmrg# parm1: specify the default value, yes or no. 10410d6c0b56eSmrg# 10411d6c0b56eSmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10412d6c0b56eSmrgm4_define([spec_default], m4_default([$1], [yes])) 10413d6c0b56eSmrgAC_ARG_ENABLE(specs, 10414d6c0b56eSmrg AS_HELP_STRING([--enable-specs], 10415d6c0b56eSmrg [Enable building the specs (default: ]spec_default[)]), 10416d6c0b56eSmrg [build_specs=$enableval], [build_specs=]spec_default) 10417d6c0b56eSmrgm4_undefine([spec_default]) 10418d6c0b56eSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10419d6c0b56eSmrgAC_MSG_CHECKING([whether to build functional specifications]) 10420d6c0b56eSmrgAC_MSG_RESULT([$build_specs]) 10421d6c0b56eSmrg]) # XORG_ENABLE_SPECS 10422d6c0b56eSmrg 10423d6c0b56eSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10424d6c0b56eSmrg# ---------------------------------------------- 10425d6c0b56eSmrg# Minimum version: 1.13.0 10426d6c0b56eSmrg# 10427d6c0b56eSmrg# This macro enables a builder to enable/disable unit testing 10428d6c0b56eSmrg# It makes no assumption about the test cases implementation 10429d6c0b56eSmrg# Test cases may or may not use Automake "Support for test suites" 10430d6c0b56eSmrg# They may or may not use the software utility library GLib 10431d6c0b56eSmrg# 10432d6c0b56eSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10433d6c0b56eSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10434d6c0b56eSmrg# The variable enable_unit_tests is used by other macros in this file. 10435d6c0b56eSmrg# 10436d6c0b56eSmrg# Interface to module: 10437d6c0b56eSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10438d6c0b56eSmrg# enable_unit_tests: used in configure.ac for additional configuration 10439d6c0b56eSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10440d6c0b56eSmrg# 'no' user instructs the module not to build tests 10441d6c0b56eSmrg# parm1: specify the default value, yes or no. 10442d6c0b56eSmrg# 10443d6c0b56eSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10444d6c0b56eSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10445d6c0b56eSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 10446d6c0b56eSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10447d6c0b56eSmrgm4_define([_defopt], m4_default([$1], [auto])) 10448d6c0b56eSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10449d6c0b56eSmrg [Enable building unit test cases (default: ]_defopt[)]), 10450d6c0b56eSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10451d6c0b56eSmrgm4_undefine([_defopt]) 10452d6c0b56eSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10453d6c0b56eSmrgAC_MSG_CHECKING([whether to build unit test cases]) 10454d6c0b56eSmrgAC_MSG_RESULT([$enable_unit_tests]) 10455d6c0b56eSmrg]) # XORG_ENABLE_UNIT_TESTS 10456d6c0b56eSmrg 10457d6c0b56eSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 10458d6c0b56eSmrg# ------------------------------------------------------ 10459d6c0b56eSmrg# Minimum version: 1.17.0 10460d6c0b56eSmrg# 10461d6c0b56eSmrg# This macro enables a builder to enable/disable integration testing 10462d6c0b56eSmrg# It makes no assumption about the test cases' implementation 10463d6c0b56eSmrg# Test cases may or may not use Automake "Support for test suites" 10464d6c0b56eSmrg# 10465d6c0b56eSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 10466d6c0b56eSmrg# usually requires less dependencies and may be built and run under less 10467d6c0b56eSmrg# stringent environments than integration tests. 10468d6c0b56eSmrg# 10469d6c0b56eSmrg# Interface to module: 10470d6c0b56eSmrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 10471d6c0b56eSmrg# enable_integration_tests: used in configure.ac for additional configuration 10472d6c0b56eSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests 10473d6c0b56eSmrg# 'no' user instructs the module not to build tests 10474d6c0b56eSmrg# parm1: specify the default value, yes or no. 10475d6c0b56eSmrg# 10476d6c0b56eSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 10477d6c0b56eSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10478d6c0b56eSmrgm4_define([_defopt], m4_default([$1], [auto])) 10479d6c0b56eSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 10480d6c0b56eSmrg [Enable building integration test cases (default: ]_defopt[)]), 10481d6c0b56eSmrg [enable_integration_tests=$enableval], 10482d6c0b56eSmrg [enable_integration_tests=]_defopt) 10483d6c0b56eSmrgm4_undefine([_defopt]) 10484d6c0b56eSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 10485d6c0b56eSmrg [test "x$enable_integration_tests" != xno]) 10486d6c0b56eSmrgAC_MSG_CHECKING([whether to build unit test cases]) 10487d6c0b56eSmrgAC_MSG_RESULT([$enable_integration_tests]) 10488d6c0b56eSmrg]) # XORG_ENABLE_INTEGRATION_TESTS 10489d6c0b56eSmrg 10490d6c0b56eSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10491d6c0b56eSmrg# ---------------------------------------- 10492d6c0b56eSmrg# Minimum version: 1.13.0 10493d6c0b56eSmrg# 10494d6c0b56eSmrg# GLib is a library which provides advanced data structures and functions. 10495d6c0b56eSmrg# This macro enables a module to test for the presence of Glib. 10496d6c0b56eSmrg# 10497d6c0b56eSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10498d6c0b56eSmrg# Otherwise the value of $enable_unit_tests is blank. 10499d6c0b56eSmrg# 10500d6c0b56eSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 10501d6c0b56eSmrg# test support usually requires less dependencies and may be built and run under 10502d6c0b56eSmrg# less stringent environments than integration tests. 10503d6c0b56eSmrg# 10504d6c0b56eSmrg# Interface to module: 10505d6c0b56eSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 10506d6c0b56eSmrg# with_glib: used in configure.ac to know if GLib has been found 10507d6c0b56eSmrg# --with-glib: 'yes' user instructs the module to use glib 10508d6c0b56eSmrg# 'no' user instructs the module not to use glib 10509d6c0b56eSmrg# 10510d6c0b56eSmrgAC_DEFUN([XORG_WITH_GLIB],[ 10511d6c0b56eSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10512d6c0b56eSmrgm4_define([_defopt], m4_default([$2], [auto])) 10513d6c0b56eSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10514d6c0b56eSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 10515d6c0b56eSmrg [with_glib=$withval], [with_glib=]_defopt) 10516d6c0b56eSmrgm4_undefine([_defopt]) 10517d6c0b56eSmrg 10518d6c0b56eSmrghave_glib=no 10519d6c0b56eSmrg# Do not probe GLib if user explicitly disabled unit testing 10520d6c0b56eSmrgif test "x$enable_unit_tests" != x"no"; then 10521d6c0b56eSmrg # Do not probe GLib if user explicitly disabled it 10522d6c0b56eSmrg if test "x$with_glib" != x"no"; then 10523d6c0b56eSmrg m4_ifval( 10524d6c0b56eSmrg [$1], 10525d6c0b56eSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10526d6c0b56eSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10527d6c0b56eSmrg ) 10528d6c0b56eSmrg fi 10529d6c0b56eSmrgfi 10530d6c0b56eSmrg 10531d6c0b56eSmrg# Not having GLib when unit testing has been explicitly requested is an error 10532d6c0b56eSmrgif test "x$enable_unit_tests" = x"yes"; then 10533d6c0b56eSmrg if test "x$have_glib" = x"no"; then 10534d6c0b56eSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10535d6c0b56eSmrg fi 10536d6c0b56eSmrgfi 10537d6c0b56eSmrg 10538d6c0b56eSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 10539d6c0b56eSmrgif test "x$enable_unit_tests" = x"no"; then 10540d6c0b56eSmrg if test "x$with_glib" = x"yes"; then 10541d6c0b56eSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10542d6c0b56eSmrg fi 10543d6c0b56eSmrgfi 10544d6c0b56eSmrg 10545d6c0b56eSmrg# Not having GLib when it has been explicitly requested is an error 10546d6c0b56eSmrgif test "x$with_glib" = x"yes"; then 10547d6c0b56eSmrg if test "x$have_glib" = x"no"; then 10548d6c0b56eSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10549d6c0b56eSmrg fi 10550d6c0b56eSmrgfi 10551d6c0b56eSmrg 10552d6c0b56eSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10553d6c0b56eSmrg]) # XORG_WITH_GLIB 10554d6c0b56eSmrg 10555d6c0b56eSmrg# XORG_LD_WRAP([required|optional]) 10556d6c0b56eSmrg# --------------------------------- 10557d6c0b56eSmrg# Minimum version: 1.13.0 10558d6c0b56eSmrg# 10559d6c0b56eSmrg# Check if linker supports -wrap, passed via compiler flags 10560d6c0b56eSmrg# 10561d6c0b56eSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10562d6c0b56eSmrg# Otherwise the value of $enable_unit_tests is blank. 10563d6c0b56eSmrg# 10564d6c0b56eSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior 10565d6c0b56eSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 10566d6c0b56eSmrg# available, an argument of "optional" allows use when some unit tests require 10567d6c0b56eSmrg# ld -wrap and others do not. 10568d6c0b56eSmrg# 10569d6c0b56eSmrgAC_DEFUN([XORG_LD_WRAP],[ 10570d6c0b56eSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 10571d6c0b56eSmrg [AC_LANG_PROGRAM([#include <stdlib.h> 10572d6c0b56eSmrg void __wrap_exit(int status) { return; }], 10573d6c0b56eSmrg [exit(0);])]) 10574d6c0b56eSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 10575d6c0b56eSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10576d6c0b56eSmrg if test "x$have_ld_wrap" = x"no"; then 10577d6c0b56eSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10578d6c0b56eSmrg fi 10579d6c0b56eSmrgfi 10580d6c0b56eSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10581d6c0b56eSmrg# 10582d6c0b56eSmrg]) # XORG_LD_WRAP 10583d6c0b56eSmrg 10584d6c0b56eSmrg# XORG_CHECK_LINKER_FLAGS 10585d6c0b56eSmrg# ----------------------- 10586d6c0b56eSmrg# SYNOPSIS 10587d6c0b56eSmrg# 10588d6c0b56eSmrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10589d6c0b56eSmrg# 10590d6c0b56eSmrg# DESCRIPTION 10591d6c0b56eSmrg# 10592d6c0b56eSmrg# Check whether the given linker FLAGS work with the current language's 10593d6c0b56eSmrg# linker, or whether they give an error. 10594d6c0b56eSmrg# 10595d6c0b56eSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10596d6c0b56eSmrg# success/failure. 10597d6c0b56eSmrg# 10598d6c0b56eSmrg# PROGRAM-SOURCE is the program source to link with, if needed 10599d6c0b56eSmrg# 10600d6c0b56eSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10601d6c0b56eSmrg# 10602d6c0b56eSmrg# LICENSE 10603d6c0b56eSmrg# 10604d6c0b56eSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10605d6c0b56eSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10606d6c0b56eSmrg# Copyright (c) 2009 Matteo Frigo 10607d6c0b56eSmrg# 10608d6c0b56eSmrg# This program is free software: you can redistribute it and/or modify it 10609d6c0b56eSmrg# under the terms of the GNU General Public License as published by the 10610d6c0b56eSmrg# Free Software Foundation, either version 3 of the License, or (at your 10611d6c0b56eSmrg# option) any later version. 10612d6c0b56eSmrg# 10613d6c0b56eSmrg# This program is distributed in the hope that it will be useful, but 10614d6c0b56eSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10615d6c0b56eSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10616d6c0b56eSmrg# Public License for more details. 10617d6c0b56eSmrg# 10618d6c0b56eSmrg# You should have received a copy of the GNU General Public License along 10619d6c0b56eSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10620d6c0b56eSmrg# 10621d6c0b56eSmrg# As a special exception, the respective Autoconf Macro's copyright owner 10622d6c0b56eSmrg# gives unlimited permission to copy, distribute and modify the configure 10623d6c0b56eSmrg# scripts that are the output of Autoconf when processing the Macro. You 10624d6c0b56eSmrg# need not follow the terms of the GNU General Public License when using 10625d6c0b56eSmrg# or distributing such scripts, even though portions of the text of the 10626d6c0b56eSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 10627d6c0b56eSmrg# all other use of the material that constitutes the Autoconf Macro. 10628d6c0b56eSmrg# 10629d6c0b56eSmrg# This special exception to the GPL applies to versions of the Autoconf 10630d6c0b56eSmrg# Macro released by the Autoconf Archive. When you make and distribute a 10631d6c0b56eSmrg# modified version of the Autoconf Macro, you may extend this special 10632d6c0b56eSmrg# exception to the GPL to apply to your modified version as well.# 10633d6c0b56eSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 10634d6c0b56eSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 10635d6c0b56eSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 10636d6c0b56eSmrgAS_LITERAL_IF([$1], 10637d6c0b56eSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 10638d6c0b56eSmrg ax_save_FLAGS=$LDFLAGS 10639d6c0b56eSmrg LDFLAGS="$1" 10640d6c0b56eSmrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 10641d6c0b56eSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10642d6c0b56eSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10643d6c0b56eSmrg LDFLAGS=$ax_save_FLAGS])], 10644d6c0b56eSmrg [ax_save_FLAGS=$LDFLAGS 10645d6c0b56eSmrg LDFLAGS="$1" 10646d6c0b56eSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 10647d6c0b56eSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 10648d6c0b56eSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 10649d6c0b56eSmrg LDFLAGS=$ax_save_FLAGS]) 10650d6c0b56eSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 10651d6c0b56eSmrgAC_MSG_RESULT($xorg_check_linker_flags) 10652d6c0b56eSmrgif test "x$xorg_check_linker_flags" = xyes; then 10653d6c0b56eSmrg m4_default([$2], :) 10654d6c0b56eSmrgelse 10655d6c0b56eSmrg m4_default([$3], :) 10656d6c0b56eSmrgfi 10657d6c0b56eSmrg]) # XORG_CHECK_LINKER_FLAGS 10658d6c0b56eSmrg 10659d6c0b56eSmrg# XORG_MEMORY_CHECK_FLAGS 10660d6c0b56eSmrg# ----------------------- 10661d6c0b56eSmrg# Minimum version: 1.16.0 10662d6c0b56eSmrg# 10663d6c0b56eSmrg# This macro attempts to find appropriate memory checking functionality 10664d6c0b56eSmrg# for various platforms which unit testing code may use to catch various 10665d6c0b56eSmrg# forms of memory allocation and access errors in testing. 10666d6c0b56eSmrg# 10667d6c0b56eSmrg# Interface to module: 10668d6c0b56eSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 10669d6c0b56eSmrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 10670d6c0b56eSmrg# 10671d6c0b56eSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 10672d6c0b56eSmrg# 10673d6c0b56eSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 10674d6c0b56eSmrg 10675d6c0b56eSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 10676d6c0b56eSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 10677d6c0b56eSmrg [Environment variables to enable memory checking in tests]) 10678d6c0b56eSmrg 10679d6c0b56eSmrg# Check for different types of support on different platforms 10680d6c0b56eSmrgcase $host_os in 10681d6c0b56eSmrg solaris*) 10682d6c0b56eSmrg AC_CHECK_LIB([umem], [umem_alloc], 10683d6c0b56eSmrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 10684d6c0b56eSmrg ;; 10685d6c0b56eSmrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 10686d6c0b56eSmrg # both directly and inverted, so should not be 0 or 255. 10687d6c0b56eSmrg malloc_debug_env='MALLOC_PERTURB_=15' 10688d6c0b56eSmrg ;; 10689d6c0b56eSmrg darwin*) 10690d6c0b56eSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 10691d6c0b56eSmrg ;; 10692d6c0b56eSmrg *bsd*) 10693d6c0b56eSmrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 10694d6c0b56eSmrg ;; 10695d6c0b56eSmrgesac 10696d6c0b56eSmrg 10697d6c0b56eSmrg# User supplied flags override default flags 10698d6c0b56eSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 10699d6c0b56eSmrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 10700d6c0b56eSmrgfi 10701d6c0b56eSmrg 10702d6c0b56eSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 10703d6c0b56eSmrg]) # XORG_WITH_LINT 10704d6c0b56eSmrg 10705d6c0b56eSmrg# XORG_CHECK_MALLOC_ZERO 10706d6c0b56eSmrg# ---------------------- 10707d6c0b56eSmrg# Minimum version: 1.0.0 10708d6c0b56eSmrg# 10709d6c0b56eSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 10710d6c0b56eSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 10711d6c0b56eSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 10712d6c0b56eSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 10713d6c0b56eSmrgAC_ARG_ENABLE(malloc0returnsnull, 10714d6c0b56eSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 10715d6c0b56eSmrg [malloc(0) returns NULL (default: auto)]), 10716d6c0b56eSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 10717d6c0b56eSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 10718d6c0b56eSmrg 10719d6c0b56eSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 10720d6c0b56eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 10721d6c0b56eSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 10722d6c0b56eSmrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 10723d6c0b56eSmrg#include <stdlib.h> 10724d6c0b56eSmrg],[ 10725d6c0b56eSmrg char *m0, *r0, *c0, *p; 10726d6c0b56eSmrg m0 = malloc(0); 10727d6c0b56eSmrg p = malloc(10); 10728d6c0b56eSmrg r0 = realloc(p,0); 10729d6c0b56eSmrg c0 = calloc(0,10); 10730d6c0b56eSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 10731d6c0b56eSmrg])], 10732d6c0b56eSmrg [xorg_cv_malloc0_returns_null=yes], 10733d6c0b56eSmrg [xorg_cv_malloc0_returns_null=no])]) 10734d6c0b56eSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 10735d6c0b56eSmrgfi 10736d6c0b56eSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 10737d6c0b56eSmrg 10738d6c0b56eSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 10739d6c0b56eSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 10740d6c0b56eSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 10741d6c0b56eSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 10742d6c0b56eSmrgelse 10743d6c0b56eSmrg MALLOC_ZERO_CFLAGS="" 10744d6c0b56eSmrg XMALLOC_ZERO_CFLAGS="" 10745d6c0b56eSmrg XTMALLOC_ZERO_CFLAGS="" 10746d6c0b56eSmrgfi 10747d6c0b56eSmrg 10748d6c0b56eSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 10749d6c0b56eSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 10750d6c0b56eSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 10751d6c0b56eSmrg]) # XORG_CHECK_MALLOC_ZERO 10752d6c0b56eSmrg 10753d6c0b56eSmrg# XORG_WITH_LINT() 10754d6c0b56eSmrg# ---------------- 10755d6c0b56eSmrg# Minimum version: 1.1.0 10756d6c0b56eSmrg# 10757d6c0b56eSmrg# This macro enables the use of a tool that flags some suspicious and 10758d6c0b56eSmrg# non-portable constructs (likely to be bugs) in C language source code. 10759d6c0b56eSmrg# It will attempt to locate the tool and use appropriate options. 10760d6c0b56eSmrg# There are various lint type tools on different platforms. 10761d6c0b56eSmrg# 10762d6c0b56eSmrg# Interface to module: 10763d6c0b56eSmrg# LINT: returns the path to the tool found on the platform 10764d6c0b56eSmrg# or the value set to LINT on the configure cmd line 10765d6c0b56eSmrg# also an Automake conditional 10766d6c0b56eSmrg# LINT_FLAGS: an Automake variable with appropriate flags 10767d6c0b56eSmrg# 10768d6c0b56eSmrg# --with-lint: 'yes' user instructs the module to use lint 10769d6c0b56eSmrg# 'no' user instructs the module not to use lint (default) 10770d6c0b56eSmrg# 10771d6c0b56eSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 10772d6c0b56eSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 10773d6c0b56eSmrg# 10774d6c0b56eSmrgAC_DEFUN([XORG_WITH_LINT],[ 10775d6c0b56eSmrg 10776d6c0b56eSmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 10777d6c0b56eSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 10778d6c0b56eSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 10779d6c0b56eSmrg [Use a lint-style source code checker (default: disabled)])], 10780d6c0b56eSmrg [use_lint=$withval], [use_lint=no]) 10781d6c0b56eSmrg 10782d6c0b56eSmrg# Obtain platform specific info like program name and options 10783d6c0b56eSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 10784d6c0b56eSmrgcase $host_os in 10785d6c0b56eSmrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 10786d6c0b56eSmrg lint_name=splint 10787d6c0b56eSmrg lint_options="-badflag" 10788d6c0b56eSmrg ;; 10789d6c0b56eSmrg *freebsd* | *netbsd*) 10790d6c0b56eSmrg lint_name=lint 10791d6c0b56eSmrg lint_options="-u -b" 10792d6c0b56eSmrg ;; 10793d6c0b56eSmrg *solaris*) 10794d6c0b56eSmrg lint_name=lint 10795d6c0b56eSmrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 10796d6c0b56eSmrg ;; 10797d6c0b56eSmrgesac 10798d6c0b56eSmrg 10799d6c0b56eSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 10800d6c0b56eSmrgif test "x$use_lint" = x"yes" ; then 10801d6c0b56eSmrg AC_PATH_PROG([LINT], [$lint_name]) 10802d6c0b56eSmrg if test "x$LINT" = "x"; then 10803d6c0b56eSmrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 10804d6c0b56eSmrg fi 10805d6c0b56eSmrgelif test "x$use_lint" = x"no" ; then 10806d6c0b56eSmrg if test "x$LINT" != "x"; then 10807d6c0b56eSmrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 10808d6c0b56eSmrg fi 10809d6c0b56eSmrgelse 10810d6c0b56eSmrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 10811d6c0b56eSmrgfi 10812d6c0b56eSmrg 10813d6c0b56eSmrg# User supplied flags override default flags 10814d6c0b56eSmrgif test "x$LINT_FLAGS" != "x"; then 10815d6c0b56eSmrg lint_options=$LINT_FLAGS 10816d6c0b56eSmrgfi 10817d6c0b56eSmrg 10818d6c0b56eSmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 10819d6c0b56eSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 10820d6c0b56eSmrg 10821d6c0b56eSmrg]) # XORG_WITH_LINT 10822d6c0b56eSmrg 10823d6c0b56eSmrg# XORG_LINT_LIBRARY(LIBNAME) 10824d6c0b56eSmrg# -------------------------- 10825d6c0b56eSmrg# Minimum version: 1.1.0 10826d6c0b56eSmrg# 10827d6c0b56eSmrg# Sets up flags for building lint libraries for checking programs that call 10828d6c0b56eSmrg# functions in the library. 10829d6c0b56eSmrg# 10830d6c0b56eSmrg# Interface to module: 10831d6c0b56eSmrg# LINTLIB - Automake variable with the name of lint library file to make 10832d6c0b56eSmrg# MAKE_LINT_LIB - Automake conditional 10833d6c0b56eSmrg# 10834d6c0b56eSmrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 10835d6c0b56eSmrg# - 'no' user instructs the module not to create a lint library (default) 10836d6c0b56eSmrg 10837d6c0b56eSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 10838d6c0b56eSmrgAC_REQUIRE([XORG_WITH_LINT]) 10839d6c0b56eSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 10840d6c0b56eSmrg [Create lint library (default: disabled)])], 10841d6c0b56eSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 10842d6c0b56eSmrg 10843d6c0b56eSmrgif test "x$make_lint_lib" = x"yes" ; then 10844d6c0b56eSmrg LINTLIB=llib-l$1.ln 10845d6c0b56eSmrg if test "x$LINT" = "x"; then 10846d6c0b56eSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 10847d6c0b56eSmrg fi 10848d6c0b56eSmrgelif test "x$make_lint_lib" != x"no" ; then 10849d6c0b56eSmrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 10850d6c0b56eSmrgfi 10851d6c0b56eSmrg 10852d6c0b56eSmrgAC_SUBST(LINTLIB) 10853d6c0b56eSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 10854d6c0b56eSmrg 10855d6c0b56eSmrg]) # XORG_LINT_LIBRARY 10856d6c0b56eSmrg 10857d6c0b56eSmrg# XORG_COMPILER_BRAND 10858d6c0b56eSmrg# ------------------- 10859d6c0b56eSmrg# Minimum version: 1.14.0 10860d6c0b56eSmrg# 10861d6c0b56eSmrg# Checks for various brands of compilers and sets flags as appropriate: 10862d6c0b56eSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 10863d6c0b56eSmrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 10864d6c0b56eSmrg# clang compiler - sets CLANGCC to "yes" 10865d6c0b56eSmrg# Intel compiler - sets INTELCC to "yes" 10866d6c0b56eSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 10867d6c0b56eSmrg# 10868d6c0b56eSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 10869d6c0b56eSmrgAC_LANG_CASE( 10870d6c0b56eSmrg [C], [ 10871d6c0b56eSmrg AC_REQUIRE([AC_PROG_CC_C99]) 10872d6c0b56eSmrg ], 10873d6c0b56eSmrg [C++], [ 10874d6c0b56eSmrg AC_REQUIRE([AC_PROG_CXX]) 10875d6c0b56eSmrg ] 10876d6c0b56eSmrg) 10877d6c0b56eSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 10878d6c0b56eSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 10879d6c0b56eSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 10880d6c0b56eSmrg]) # XORG_COMPILER_BRAND 10881d6c0b56eSmrg 10882d6c0b56eSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 10883d6c0b56eSmrg# --------------- 10884d6c0b56eSmrg# Minimum version: 1.16.0 10885d6c0b56eSmrg# 10886d6c0b56eSmrg# Test if the compiler works when passed the given flag as a command line argument. 10887d6c0b56eSmrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 10888d6c0b56eSmrg# next flag in the list until there are no more options. 10889d6c0b56eSmrg# 10890d6c0b56eSmrg# Note that this does not guarantee that the compiler supports the flag as some 10891d6c0b56eSmrg# compilers will simply ignore arguments that they do not understand, but we do 10892d6c0b56eSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 10893d6c0b56eSmrg# -Werror=unused-command-line-argument 10894d6c0b56eSmrg# 10895d6c0b56eSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 10896d6c0b56eSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10897d6c0b56eSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 10898d6c0b56eSmrg 10899d6c0b56eSmrgAC_LANG_COMPILER_REQUIRE 10900d6c0b56eSmrg 10901d6c0b56eSmrgAC_LANG_CASE( 10902d6c0b56eSmrg [C], [ 10903d6c0b56eSmrg AC_REQUIRE([AC_PROG_CC_C99]) 10904d6c0b56eSmrg define([PREFIX], [C]) 10905d6c0b56eSmrg define([CACHE_PREFIX], [cc]) 10906d6c0b56eSmrg define([COMPILER], [$CC]) 10907d6c0b56eSmrg ], 10908d6c0b56eSmrg [C++], [ 10909d6c0b56eSmrg define([PREFIX], [CXX]) 10910d6c0b56eSmrg define([CACHE_PREFIX], [cxx]) 10911d6c0b56eSmrg define([COMPILER], [$CXX]) 10912d6c0b56eSmrg ] 10913d6c0b56eSmrg) 10914d6c0b56eSmrg 10915d6c0b56eSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 10916d6c0b56eSmrg 10917d6c0b56eSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 10918d6c0b56eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10919d6c0b56eSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 10920d6c0b56eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 10921d6c0b56eSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10922d6c0b56eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 10923d6c0b56eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 10924d6c0b56eSmrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 10925d6c0b56eSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10926d6c0b56eSmrgfi 10927d6c0b56eSmrg 10928d6c0b56eSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 10929d6c0b56eSmrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 10930d6c0b56eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10931d6c0b56eSmrg fi 10932d6c0b56eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10933d6c0b56eSmrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 10934d6c0b56eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 10935d6c0b56eSmrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 10936d6c0b56eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 10937d6c0b56eSmrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 10938d6c0b56eSmrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 10939d6c0b56eSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10940d6c0b56eSmrgfi 10941d6c0b56eSmrg 10942d6c0b56eSmrgfound="no" 10943d6c0b56eSmrgm4_foreach([flag], m4_cdr($@), [ 10944d6c0b56eSmrg if test $found = "no" ; then 10945d6c0b56eSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 10946d6c0b56eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 10947d6c0b56eSmrg fi 10948d6c0b56eSmrg 10949d6c0b56eSmrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 10950d6c0b56eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 10951d6c0b56eSmrg fi 10952d6c0b56eSmrg 10953d6c0b56eSmrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 10954d6c0b56eSmrg 10955d6c0b56eSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 10956d6c0b56eSmrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 10957d6c0b56eSmrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 10958d6c0b56eSmrg AC_CACHE_VAL($cacheid, 10959d6c0b56eSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 10960d6c0b56eSmrg [eval $cacheid=yes], 10961d6c0b56eSmrg [eval $cacheid=no])]) 10962d6c0b56eSmrg 10963d6c0b56eSmrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 10964d6c0b56eSmrg 10965d6c0b56eSmrg eval supported=\$$cacheid 10966d6c0b56eSmrg AC_MSG_RESULT([$supported]) 10967d6c0b56eSmrg if test "$supported" = "yes" ; then 10968d6c0b56eSmrg $1="$$1 ]flag[" 10969d6c0b56eSmrg found="yes" 10970d6c0b56eSmrg fi 10971d6c0b56eSmrg fi 10972d6c0b56eSmrg]) 10973d6c0b56eSmrg]) # XORG_TESTSET_CFLAG 10974d6c0b56eSmrg 10975d6c0b56eSmrg# XORG_COMPILER_FLAGS 10976d6c0b56eSmrg# --------------- 10977d6c0b56eSmrg# Minimum version: 1.16.0 10978d6c0b56eSmrg# 10979d6c0b56eSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 10980d6c0b56eSmrg# arguments supported by the selected compiler which do NOT alter the generated 10981d6c0b56eSmrg# code. These arguments will cause the compiler to print various warnings 10982d6c0b56eSmrg# during compilation AND turn a conservative set of warnings into errors. 10983d6c0b56eSmrg# 10984d6c0b56eSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 10985d6c0b56eSmrg# future versions of util-macros as options are added to new compilers. 10986d6c0b56eSmrg# 10987d6c0b56eSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 10988d6c0b56eSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 10989d6c0b56eSmrg 10990d6c0b56eSmrgAC_ARG_ENABLE(selective-werror, 10991d6c0b56eSmrg AS_HELP_STRING([--disable-selective-werror], 10992d6c0b56eSmrg [Turn off selective compiler errors. (default: enabled)]), 10993d6c0b56eSmrg [SELECTIVE_WERROR=$enableval], 10994d6c0b56eSmrg [SELECTIVE_WERROR=yes]) 10995d6c0b56eSmrg 10996d6c0b56eSmrgAC_LANG_CASE( 10997d6c0b56eSmrg [C], [ 10998d6c0b56eSmrg define([PREFIX], [C]) 10999d6c0b56eSmrg ], 11000d6c0b56eSmrg [C++], [ 11001d6c0b56eSmrg define([PREFIX], [CXX]) 11002d6c0b56eSmrg ] 11003d6c0b56eSmrg) 11004d6c0b56eSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 11005d6c0b56eSmrgif test "x$SUNCC" = "xyes"; then 11006d6c0b56eSmrg [BASE_]PREFIX[FLAGS]="-v" 11007d6c0b56eSmrgelse 11008d6c0b56eSmrg [BASE_]PREFIX[FLAGS]="" 11009d6c0b56eSmrgfi 11010d6c0b56eSmrg 11011d6c0b56eSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 11012d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 11013d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 11014d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 11015d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 11016d6c0b56eSmrg 11017d6c0b56eSmrgAC_LANG_CASE( 11018d6c0b56eSmrg [C], [ 11019d6c0b56eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 11020d6c0b56eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 11021d6c0b56eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 11022d6c0b56eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 11023d6c0b56eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 11024d6c0b56eSmrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 11025d6c0b56eSmrg ] 11026d6c0b56eSmrg) 11027d6c0b56eSmrg 11028d6c0b56eSmrg# This chunk adds additional warnings that could catch undesired effects. 11029d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 11030d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 11031d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 11032d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 11033d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 11034d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 11035d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 11036d6c0b56eSmrg 11037d6c0b56eSmrg# These are currently disabled because they are noisy. They will be enabled 11038d6c0b56eSmrg# in the future once the codebase is sufficiently modernized to silence 11039d6c0b56eSmrg# them. For now, I don't want them to drown out the other warnings. 11040d6c0b56eSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 11041d6c0b56eSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 11042d6c0b56eSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 11043d6c0b56eSmrg 11044d6c0b56eSmrg# Turn some warnings into errors, so we don't accidently get successful builds 11045d6c0b56eSmrg# when there are problems that should be fixed. 11046d6c0b56eSmrg 11047d6c0b56eSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 11048d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 11049d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 11050d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 11051d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 11052d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 11053d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 11054d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 11055d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 11056d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 11057d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 11058d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 11059d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 11060d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 11061d6c0b56eSmrgelse 11062d6c0b56eSmrgAC_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]) 11063d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 11064d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 11065d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 11066d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 11067d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 11068d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 11069d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 11070d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 11071d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 11072d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 11073d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 11074d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 11075d6c0b56eSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 11076d6c0b56eSmrgfi 11077d6c0b56eSmrg 11078d6c0b56eSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11079d6c0b56eSmrg]) # XORG_COMPILER_FLAGS 11080d6c0b56eSmrg 11081d6c0b56eSmrg# XORG_CWARNFLAGS 11082d6c0b56eSmrg# --------------- 11083d6c0b56eSmrg# Minimum version: 1.2.0 11084d6c0b56eSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11085d6c0b56eSmrg# 11086d6c0b56eSmrg# Defines CWARNFLAGS to enable C compiler warnings. 11087d6c0b56eSmrg# 11088d6c0b56eSmrg# This function is deprecated because it defines -fno-strict-aliasing 11089d6c0b56eSmrg# which alters the code generated by the compiler. If -fno-strict-aliasing 11090d6c0b56eSmrg# is needed, then it should be added explicitly in the module when 11091d6c0b56eSmrg# it is updated to use BASE_CFLAGS. 11092d6c0b56eSmrg# 11093d6c0b56eSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 11094d6c0b56eSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11095d6c0b56eSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 11096d6c0b56eSmrgAC_LANG_CASE( 11097d6c0b56eSmrg [C], [ 11098d6c0b56eSmrg CWARNFLAGS="$BASE_CFLAGS" 11099d6c0b56eSmrg if test "x$GCC" = xyes ; then 11100d6c0b56eSmrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 11101d6c0b56eSmrg fi 11102d6c0b56eSmrg AC_SUBST(CWARNFLAGS) 11103d6c0b56eSmrg ] 11104d6c0b56eSmrg) 11105d6c0b56eSmrg]) # XORG_CWARNFLAGS 11106d6c0b56eSmrg 11107d6c0b56eSmrg# XORG_STRICT_OPTION 11108d6c0b56eSmrg# ----------------------- 11109d6c0b56eSmrg# Minimum version: 1.3.0 11110d6c0b56eSmrg# 11111d6c0b56eSmrg# Add configure option to enable strict compilation flags, such as treating 11112d6c0b56eSmrg# warnings as fatal errors. 11113d6c0b56eSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 11114d6c0b56eSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11115d6c0b56eSmrg# 11116d6c0b56eSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11117d6c0b56eSmrg# when strict compilation is unconditionally desired. 11118d6c0b56eSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11119d6c0b56eSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 11120d6c0b56eSmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11121d6c0b56eSmrg 11122d6c0b56eSmrgAC_ARG_ENABLE(strict-compilation, 11123d6c0b56eSmrg AS_HELP_STRING([--enable-strict-compilation], 11124d6c0b56eSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11125d6c0b56eSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 11126d6c0b56eSmrg 11127d6c0b56eSmrgAC_LANG_CASE( 11128d6c0b56eSmrg [C], [ 11129d6c0b56eSmrg define([PREFIX], [C]) 11130d6c0b56eSmrg ], 11131d6c0b56eSmrg [C++], [ 11132d6c0b56eSmrg define([PREFIX], [CXX]) 11133d6c0b56eSmrg ] 11134d6c0b56eSmrg) 11135d6c0b56eSmrg 11136d6c0b56eSmrg[STRICT_]PREFIX[FLAGS]="" 11137d6c0b56eSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 11138d6c0b56eSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 11139d6c0b56eSmrg 11140d6c0b56eSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 11141d6c0b56eSmrg# activate it with -Werror, so we add it here explicitly. 11142d6c0b56eSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 11143d6c0b56eSmrg 11144d6c0b56eSmrgif test "x$STRICT_COMPILE" = "xyes"; then 11145d6c0b56eSmrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 11146d6c0b56eSmrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11147d6c0b56eSmrgfi 11148d6c0b56eSmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 11149d6c0b56eSmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 11150d6c0b56eSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11151d6c0b56eSmrg]) # XORG_STRICT_OPTION 11152d6c0b56eSmrg 11153d6c0b56eSmrg# XORG_DEFAULT_OPTIONS 11154d6c0b56eSmrg# -------------------- 11155d6c0b56eSmrg# Minimum version: 1.3.0 11156d6c0b56eSmrg# 11157d6c0b56eSmrg# Defines default options for X.Org modules. 11158d6c0b56eSmrg# 11159d6c0b56eSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11160d6c0b56eSmrgAC_REQUIRE([AC_PROG_INSTALL]) 11161d6c0b56eSmrgXORG_COMPILER_FLAGS 11162d6c0b56eSmrgXORG_CWARNFLAGS 11163d6c0b56eSmrgXORG_STRICT_OPTION 11164d6c0b56eSmrgXORG_RELEASE_VERSION 11165d6c0b56eSmrgXORG_CHANGELOG 11166d6c0b56eSmrgXORG_INSTALL 11167d6c0b56eSmrgXORG_MANPAGE_SECTIONS 11168d6c0b56eSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11169d6c0b56eSmrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11170d6c0b56eSmrg]) # XORG_DEFAULT_OPTIONS 11171d6c0b56eSmrg 11172d6c0b56eSmrg# XORG_INSTALL() 11173d6c0b56eSmrg# ---------------- 11174d6c0b56eSmrg# Minimum version: 1.4.0 11175d6c0b56eSmrg# 11176d6c0b56eSmrg# Defines the variable INSTALL_CMD as the command to copy 11177d6c0b56eSmrg# INSTALL from $prefix/share/util-macros. 11178d6c0b56eSmrg# 11179d6c0b56eSmrgAC_DEFUN([XORG_INSTALL], [ 11180d6c0b56eSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11181d6c0b56eSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11182d6c0b56eSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11183d6c0b56eSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11184d6c0b56eSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11185d6c0b56eSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11186d6c0b56eSmrgAC_SUBST([INSTALL_CMD]) 11187d6c0b56eSmrg]) # XORG_INSTALL 11188d6c0b56eSmrgdnl Copyright 2005 Red Hat, Inc 11189d6c0b56eSmrgdnl 11190d6c0b56eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11191d6c0b56eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 11192d6c0b56eSmrgdnl the above copyright notice appear in all copies and that both that 11193d6c0b56eSmrgdnl copyright notice and this permission notice appear in supporting 11194d6c0b56eSmrgdnl documentation. 11195d6c0b56eSmrgdnl 11196d6c0b56eSmrgdnl The above copyright notice and this permission notice shall be included 11197d6c0b56eSmrgdnl in all copies or substantial portions of the Software. 11198d6c0b56eSmrgdnl 11199d6c0b56eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11200d6c0b56eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11201d6c0b56eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11202d6c0b56eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11203d6c0b56eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11204d6c0b56eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11205d6c0b56eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 11206d6c0b56eSmrgdnl 11207d6c0b56eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 11208d6c0b56eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 11209d6c0b56eSmrgdnl other dealings in this Software without prior written authorization 11210d6c0b56eSmrgdnl from the copyright holders. 11211d6c0b56eSmrgdnl 11212d6c0b56eSmrg 11213d6c0b56eSmrg# XORG_RELEASE_VERSION 11214d6c0b56eSmrg# -------------------- 11215d6c0b56eSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 11216d6c0b56eSmrg 11217d6c0b56eSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 11218d6c0b56eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 11219d6c0b56eSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 11220d6c0b56eSmrg [Major version of this package]) 11221d6c0b56eSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 11222d6c0b56eSmrg if test "x$PVM" = "x"; then 11223d6c0b56eSmrg PVM="0" 11224d6c0b56eSmrg fi 11225d6c0b56eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 11226d6c0b56eSmrg [$PVM], 11227d6c0b56eSmrg [Minor version of this package]) 11228d6c0b56eSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 11229d6c0b56eSmrg if test "x$PVP" = "x"; then 11230d6c0b56eSmrg PVP="0" 11231d6c0b56eSmrg fi 11232d6c0b56eSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 11233d6c0b56eSmrg [$PVP], 11234d6c0b56eSmrg [Patch version of this package]) 11235d6c0b56eSmrg]) 11236d6c0b56eSmrg 11237d6c0b56eSmrg# XORG_CHANGELOG() 11238d6c0b56eSmrg# ---------------- 11239d6c0b56eSmrg# Minimum version: 1.2.0 11240d6c0b56eSmrg# 11241d6c0b56eSmrg# Defines the variable CHANGELOG_CMD as the command to generate 11242d6c0b56eSmrg# ChangeLog from git. 11243d6c0b56eSmrg# 11244d6c0b56eSmrg# 11245d6c0b56eSmrgAC_DEFUN([XORG_CHANGELOG], [ 11246d6c0b56eSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11247d6c0b56eSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11248d6c0b56eSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11249d6c0b56eSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11250d6c0b56eSmrgAC_SUBST([CHANGELOG_CMD]) 11251d6c0b56eSmrg]) # XORG_CHANGELOG 11252d6c0b56eSmrg 11253d6c0b56eSmrgdnl Copyright 2005 Red Hat, Inc 11254d6c0b56eSmrgdnl 11255d6c0b56eSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11256d6c0b56eSmrgdnl documentation for any purpose is hereby granted without fee, provided that 11257d6c0b56eSmrgdnl the above copyright notice appear in all copies and that both that 11258d6c0b56eSmrgdnl copyright notice and this permission notice appear in supporting 11259d6c0b56eSmrgdnl documentation. 11260d6c0b56eSmrgdnl 11261d6c0b56eSmrgdnl The above copyright notice and this permission notice shall be included 11262d6c0b56eSmrgdnl in all copies or substantial portions of the Software. 11263d6c0b56eSmrgdnl 11264d6c0b56eSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11265d6c0b56eSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11266d6c0b56eSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11267d6c0b56eSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11268d6c0b56eSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11269d6c0b56eSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11270d6c0b56eSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 11271d6c0b56eSmrgdnl 11272d6c0b56eSmrgdnl Except as contained in this notice, the name of the copyright holders shall 11273d6c0b56eSmrgdnl not be used in advertising or otherwise to promote the sale, use or 11274d6c0b56eSmrgdnl other dealings in this Software without prior written authorization 11275d6c0b56eSmrgdnl from the copyright holders. 11276d6c0b56eSmrgdnl 11277d6c0b56eSmrg 11278d6c0b56eSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO) 11279d6c0b56eSmrg# -------------------------- 11280d6c0b56eSmrg# Checks for the MACRO define in xorg-server.h (from the sdk). If it 11281d6c0b56eSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES. 11282d6c0b56eSmrg 11283d6c0b56eSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11284d6c0b56eSmrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11285d6c0b56eSmrg SAVE_CFLAGS="$CFLAGS" 11286d6c0b56eSmrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11287d6c0b56eSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11288d6c0b56eSmrg#include "xorg-server.h" 11289d6c0b56eSmrg#if !defined $1 11290d6c0b56eSmrg#error $1 not defined 11291d6c0b56eSmrg#endif 11292d6c0b56eSmrg ]])], 11293d6c0b56eSmrg [_EXT_CHECK=yes], 11294d6c0b56eSmrg [_EXT_CHECK=no]) 11295d6c0b56eSmrg CFLAGS="$SAVE_CFLAGS" 11296d6c0b56eSmrg AC_MSG_CHECKING([if $1 is defined]) 11297d6c0b56eSmrg AC_MSG_RESULT([$_EXT_CHECK]) 11298d6c0b56eSmrg if test "$_EXT_CHECK" != no; then 11299d6c0b56eSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11300d6c0b56eSmrg fi 11301d6c0b56eSmrg]) 11302d6c0b56eSmrg 11303d6c0b56eSmrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 11304d6c0b56eSmrg# 11305d6c0b56eSmrg# This file is free software; the Free Software Foundation 11306d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 11307d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 11308d6c0b56eSmrg 11309d6c0b56eSmrg# AM_AUTOMAKE_VERSION(VERSION) 11310d6c0b56eSmrg# ---------------------------- 11311d6c0b56eSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 11312d6c0b56eSmrg# generated from the m4 files accompanying Automake X.Y. 11313d6c0b56eSmrg# (This private macro should not be called outside this file.) 11314d6c0b56eSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 11315d6c0b56eSmrg[am__api_version='1.15' 11316d6c0b56eSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 11317d6c0b56eSmrgdnl require some minimum version. Point them to the right macro. 11318d6c0b56eSmrgm4_if([$1], [1.15], [], 11319d6c0b56eSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 11320d6c0b56eSmrg]) 11321d6c0b56eSmrg 11322d6c0b56eSmrg# _AM_AUTOCONF_VERSION(VERSION) 11323d6c0b56eSmrg# ----------------------------- 11324d6c0b56eSmrg# aclocal traces this macro to find the Autoconf version. 11325d6c0b56eSmrg# This is a private macro too. Using m4_define simplifies 11326d6c0b56eSmrg# the logic in aclocal, which can simply ignore this definition. 11327d6c0b56eSmrgm4_define([_AM_AUTOCONF_VERSION], []) 11328d6c0b56eSmrg 11329d6c0b56eSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 11330d6c0b56eSmrg# ------------------------------- 11331d6c0b56eSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 11332d6c0b56eSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 11333d6c0b56eSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 11334d6c0b56eSmrg[AM_AUTOMAKE_VERSION([1.15])dnl 11335d6c0b56eSmrgm4_ifndef([AC_AUTOCONF_VERSION], 11336d6c0b56eSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 11337d6c0b56eSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 11338d6c0b56eSmrg 11339d6c0b56eSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 11340d6c0b56eSmrg 11341d6c0b56eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11342d6c0b56eSmrg# 11343d6c0b56eSmrg# This file is free software; the Free Software Foundation 11344d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 11345d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 11346d6c0b56eSmrg 11347d6c0b56eSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 11348d6c0b56eSmrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 11349d6c0b56eSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 11350d6c0b56eSmrg# 11351d6c0b56eSmrg# Of course, Automake must honor this variable whenever it calls a 11352d6c0b56eSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 11353d6c0b56eSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 11354d6c0b56eSmrg# depending on how configure is run. This is pretty annoying, since 11355d6c0b56eSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 11356d6c0b56eSmrg# source directory, any form will work fine, but in subdirectories a 11357d6c0b56eSmrg# relative path needs to be adjusted first. 11358d6c0b56eSmrg# 11359d6c0b56eSmrg# $ac_aux_dir/missing 11360d6c0b56eSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 11361d6c0b56eSmrg# $top_srcdir/$ac_aux_dir/missing 11362d6c0b56eSmrg# fails if $ac_aux_dir is absolute, 11363d6c0b56eSmrg# fails when called from a subdirectory in a VPATH build with 11364d6c0b56eSmrg# a relative $ac_aux_dir 11365d6c0b56eSmrg# 11366d6c0b56eSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 11367d6c0b56eSmrg# are both prefixed by $srcdir. In an in-source build this is usually 11368d6c0b56eSmrg# harmless because $srcdir is '.', but things will broke when you 11369d6c0b56eSmrg# start a VPATH build or use an absolute $srcdir. 11370d6c0b56eSmrg# 11371d6c0b56eSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 11372d6c0b56eSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 11373d6c0b56eSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 11374d6c0b56eSmrg# and then we would define $MISSING as 11375d6c0b56eSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 11376d6c0b56eSmrg# This will work as long as MISSING is not called from configure, because 11377d6c0b56eSmrg# unfortunately $(top_srcdir) has no meaning in configure. 11378d6c0b56eSmrg# However there are other variables, like CC, which are often used in 11379d6c0b56eSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 11380d6c0b56eSmrg# 11381d6c0b56eSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 11382d6c0b56eSmrg# absolute PATH. The drawback is that using absolute paths prevent a 11383d6c0b56eSmrg# configured tree to be moved without reconfiguration. 11384d6c0b56eSmrg 11385d6c0b56eSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 11386d6c0b56eSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 11387d6c0b56eSmrg# Expand $ac_aux_dir to an absolute path. 11388d6c0b56eSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 11389d6c0b56eSmrg]) 11390d6c0b56eSmrg 11391d6c0b56eSmrg# AM_CONDITIONAL -*- Autoconf -*- 11392d6c0b56eSmrg 11393d6c0b56eSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 11394d6c0b56eSmrg# 11395d6c0b56eSmrg# This file is free software; the Free Software Foundation 11396d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 11397d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 11398d6c0b56eSmrg 11399d6c0b56eSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 11400d6c0b56eSmrg# ------------------------------------- 11401d6c0b56eSmrg# Define a conditional. 11402d6c0b56eSmrgAC_DEFUN([AM_CONDITIONAL], 11403d6c0b56eSmrg[AC_PREREQ([2.52])dnl 11404d6c0b56eSmrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 11405d6c0b56eSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 11406d6c0b56eSmrgAC_SUBST([$1_TRUE])dnl 11407d6c0b56eSmrgAC_SUBST([$1_FALSE])dnl 11408d6c0b56eSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 11409d6c0b56eSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 11410d6c0b56eSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 11411d6c0b56eSmrgif $2; then 11412d6c0b56eSmrg $1_TRUE= 11413d6c0b56eSmrg $1_FALSE='#' 11414d6c0b56eSmrgelse 11415d6c0b56eSmrg $1_TRUE='#' 11416d6c0b56eSmrg $1_FALSE= 11417d6c0b56eSmrgfi 11418d6c0b56eSmrgAC_CONFIG_COMMANDS_PRE( 11419d6c0b56eSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 11420d6c0b56eSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 11421d6c0b56eSmrgUsually this means the macro was only invoked conditionally.]]) 11422d6c0b56eSmrgfi])]) 11423d6c0b56eSmrg 11424d6c0b56eSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11425d6c0b56eSmrg# 11426d6c0b56eSmrg# This file is free software; the Free Software Foundation 11427d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 11428d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 11429d6c0b56eSmrg 11430d6c0b56eSmrg 11431d6c0b56eSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 11432d6c0b56eSmrg# written in clear, in which case automake, when reading aclocal.m4, 11433d6c0b56eSmrg# will think it sees a *use*, and therefore will trigger all it's 11434d6c0b56eSmrg# C support machinery. Also note that it means that autoscan, seeing 11435d6c0b56eSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 11436d6c0b56eSmrg 11437d6c0b56eSmrg 11438d6c0b56eSmrg# _AM_DEPENDENCIES(NAME) 11439d6c0b56eSmrg# ---------------------- 11440d6c0b56eSmrg# See how the compiler implements dependency checking. 11441d6c0b56eSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 11442d6c0b56eSmrg# We try a few techniques and use that to set a single cache variable. 11443d6c0b56eSmrg# 11444d6c0b56eSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 11445d6c0b56eSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 11446d6c0b56eSmrg# dependency, and given that the user is not expected to run this macro, 11447d6c0b56eSmrg# just rely on AC_PROG_CC. 11448d6c0b56eSmrgAC_DEFUN([_AM_DEPENDENCIES], 11449d6c0b56eSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 11450d6c0b56eSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 11451d6c0b56eSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 11452d6c0b56eSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 11453d6c0b56eSmrg 11454d6c0b56eSmrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 11455d6c0b56eSmrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 11456d6c0b56eSmrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 11457d6c0b56eSmrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 11458d6c0b56eSmrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 11459d6c0b56eSmrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 11460d6c0b56eSmrg [depcc="$$1" am_compiler_list=]) 11461d6c0b56eSmrg 11462d6c0b56eSmrgAC_CACHE_CHECK([dependency style of $depcc], 11463d6c0b56eSmrg [am_cv_$1_dependencies_compiler_type], 11464d6c0b56eSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 11465d6c0b56eSmrg # We make a subdir and do the tests there. Otherwise we can end up 11466d6c0b56eSmrg # making bogus files that we don't know about and never remove. For 11467d6c0b56eSmrg # instance it was reported that on HP-UX the gcc test will end up 11468d6c0b56eSmrg # making a dummy file named 'D' -- because '-MD' means "put the output 11469d6c0b56eSmrg # in D". 11470d6c0b56eSmrg rm -rf conftest.dir 11471d6c0b56eSmrg mkdir conftest.dir 11472d6c0b56eSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 11473d6c0b56eSmrg # using a relative directory. 11474d6c0b56eSmrg cp "$am_depcomp" conftest.dir 11475d6c0b56eSmrg cd conftest.dir 11476d6c0b56eSmrg # We will build objects and dependencies in a subdirectory because 11477d6c0b56eSmrg # it helps to detect inapplicable dependency modes. For instance 11478d6c0b56eSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 11479d6c0b56eSmrg # side effect of compilation, but ICC will put the dependencies in 11480d6c0b56eSmrg # the current directory while Tru64 will put them in the object 11481d6c0b56eSmrg # directory. 11482d6c0b56eSmrg mkdir sub 11483d6c0b56eSmrg 11484d6c0b56eSmrg am_cv_$1_dependencies_compiler_type=none 11485d6c0b56eSmrg if test "$am_compiler_list" = ""; then 11486d6c0b56eSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 11487d6c0b56eSmrg fi 11488d6c0b56eSmrg am__universal=false 11489d6c0b56eSmrg m4_case([$1], [CC], 11490d6c0b56eSmrg [case " $depcc " in #( 11491d6c0b56eSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11492d6c0b56eSmrg esac], 11493d6c0b56eSmrg [CXX], 11494d6c0b56eSmrg [case " $depcc " in #( 11495d6c0b56eSmrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 11496d6c0b56eSmrg esac]) 11497d6c0b56eSmrg 11498d6c0b56eSmrg for depmode in $am_compiler_list; do 11499d6c0b56eSmrg # Setup a source with many dependencies, because some compilers 11500d6c0b56eSmrg # like to wrap large dependency lists on column 80 (with \), and 11501d6c0b56eSmrg # we should not choose a depcomp mode which is confused by this. 11502d6c0b56eSmrg # 11503d6c0b56eSmrg # We need to recreate these files for each test, as the compiler may 11504d6c0b56eSmrg # overwrite some of them when testing with obscure command lines. 11505d6c0b56eSmrg # This happens at least with the AIX C compiler. 11506d6c0b56eSmrg : > sub/conftest.c 11507d6c0b56eSmrg for i in 1 2 3 4 5 6; do 11508d6c0b56eSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 11509d6c0b56eSmrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 11510d6c0b56eSmrg # Solaris 10 /bin/sh. 11511d6c0b56eSmrg echo '/* dummy */' > sub/conftst$i.h 11512d6c0b56eSmrg done 11513d6c0b56eSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 11514d6c0b56eSmrg 11515d6c0b56eSmrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 11516d6c0b56eSmrg # mode. It turns out that the SunPro C++ compiler does not properly 11517d6c0b56eSmrg # handle '-M -o', and we need to detect this. Also, some Intel 11518d6c0b56eSmrg # versions had trouble with output in subdirs. 11519d6c0b56eSmrg am__obj=sub/conftest.${OBJEXT-o} 11520d6c0b56eSmrg am__minus_obj="-o $am__obj" 11521d6c0b56eSmrg case $depmode in 11522d6c0b56eSmrg gcc) 11523d6c0b56eSmrg # This depmode causes a compiler race in universal mode. 11524d6c0b56eSmrg test "$am__universal" = false || continue 11525d6c0b56eSmrg ;; 11526d6c0b56eSmrg nosideeffect) 11527d6c0b56eSmrg # After this tag, mechanisms are not by side-effect, so they'll 11528d6c0b56eSmrg # only be used when explicitly requested. 11529d6c0b56eSmrg if test "x$enable_dependency_tracking" = xyes; then 11530d6c0b56eSmrg continue 11531d6c0b56eSmrg else 11532d6c0b56eSmrg break 11533d6c0b56eSmrg fi 11534d6c0b56eSmrg ;; 11535d6c0b56eSmrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 11536d6c0b56eSmrg # This compiler won't grok '-c -o', but also, the minuso test has 11537d6c0b56eSmrg # not run yet. These depmodes are late enough in the game, and 11538d6c0b56eSmrg # so weak that their functioning should not be impacted. 11539d6c0b56eSmrg am__obj=conftest.${OBJEXT-o} 11540d6c0b56eSmrg am__minus_obj= 11541d6c0b56eSmrg ;; 11542d6c0b56eSmrg none) break ;; 11543d6c0b56eSmrg esac 11544d6c0b56eSmrg if depmode=$depmode \ 11545d6c0b56eSmrg source=sub/conftest.c object=$am__obj \ 11546d6c0b56eSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 11547d6c0b56eSmrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 11548d6c0b56eSmrg >/dev/null 2>conftest.err && 11549d6c0b56eSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 11550d6c0b56eSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 11551d6c0b56eSmrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 11552d6c0b56eSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 11553d6c0b56eSmrg # icc doesn't choke on unknown options, it will just issue warnings 11554d6c0b56eSmrg # or remarks (even with -Werror). So we grep stderr for any message 11555d6c0b56eSmrg # that says an option was ignored or not supported. 11556d6c0b56eSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 11557d6c0b56eSmrg # icc: Command line warning: ignoring option '-M'; no argument required 11558d6c0b56eSmrg # The diagnosis changed in icc 8.0: 11559d6c0b56eSmrg # icc: Command line remark: option '-MP' not supported 11560d6c0b56eSmrg if (grep 'ignoring option' conftest.err || 11561d6c0b56eSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 11562d6c0b56eSmrg am_cv_$1_dependencies_compiler_type=$depmode 11563d6c0b56eSmrg break 11564d6c0b56eSmrg fi 11565d6c0b56eSmrg fi 11566d6c0b56eSmrg done 11567d6c0b56eSmrg 11568d6c0b56eSmrg cd .. 11569d6c0b56eSmrg rm -rf conftest.dir 11570d6c0b56eSmrgelse 11571d6c0b56eSmrg am_cv_$1_dependencies_compiler_type=none 11572d6c0b56eSmrgfi 11573d6c0b56eSmrg]) 11574d6c0b56eSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 11575d6c0b56eSmrgAM_CONDITIONAL([am__fastdep$1], [ 11576d6c0b56eSmrg test "x$enable_dependency_tracking" != xno \ 11577d6c0b56eSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 11578d6c0b56eSmrg]) 11579d6c0b56eSmrg 11580d6c0b56eSmrg 11581d6c0b56eSmrg# AM_SET_DEPDIR 11582d6c0b56eSmrg# ------------- 11583d6c0b56eSmrg# Choose a directory name for dependency files. 11584d6c0b56eSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 11585d6c0b56eSmrgAC_DEFUN([AM_SET_DEPDIR], 11586d6c0b56eSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 11587d6c0b56eSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 11588d6c0b56eSmrg]) 11589d6c0b56eSmrg 11590d6c0b56eSmrg 11591d6c0b56eSmrg# AM_DEP_TRACK 11592d6c0b56eSmrg# ------------ 11593d6c0b56eSmrgAC_DEFUN([AM_DEP_TRACK], 11594d6c0b56eSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl 11595d6c0b56eSmrgAS_HELP_STRING( 11596d6c0b56eSmrg [--enable-dependency-tracking], 11597d6c0b56eSmrg [do not reject slow dependency extractors]) 11598d6c0b56eSmrgAS_HELP_STRING( 11599d6c0b56eSmrg [--disable-dependency-tracking], 11600d6c0b56eSmrg [speeds up one-time build])]) 11601d6c0b56eSmrgif test "x$enable_dependency_tracking" != xno; then 11602d6c0b56eSmrg am_depcomp="$ac_aux_dir/depcomp" 11603d6c0b56eSmrg AMDEPBACKSLASH='\' 11604d6c0b56eSmrg am__nodep='_no' 11605d6c0b56eSmrgfi 11606d6c0b56eSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 11607d6c0b56eSmrgAC_SUBST([AMDEPBACKSLASH])dnl 11608d6c0b56eSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 11609d6c0b56eSmrgAC_SUBST([am__nodep])dnl 11610d6c0b56eSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl 11611d6c0b56eSmrg]) 11612d6c0b56eSmrg 11613d6c0b56eSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 11614d6c0b56eSmrg 11615d6c0b56eSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 11616d6c0b56eSmrg# 11617d6c0b56eSmrg# This file is free software; the Free Software Foundation 11618d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 11619d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 11620d6c0b56eSmrg 11621d6c0b56eSmrg 11622d6c0b56eSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 11623d6c0b56eSmrg# ------------------------------ 11624d6c0b56eSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 11625d6c0b56eSmrg[{ 11626d6c0b56eSmrg # Older Autoconf quotes --file arguments for eval, but not when files 11627d6c0b56eSmrg # are listed without --file. Let's play safe and only enable the eval 11628d6c0b56eSmrg # if we detect the quoting. 11629d6c0b56eSmrg case $CONFIG_FILES in 11630d6c0b56eSmrg *\'*) eval set x "$CONFIG_FILES" ;; 11631d6c0b56eSmrg *) set x $CONFIG_FILES ;; 11632d6c0b56eSmrg esac 11633d6c0b56eSmrg shift 11634d6c0b56eSmrg for mf 11635d6c0b56eSmrg do 11636d6c0b56eSmrg # Strip MF so we end up with the name of the file. 11637d6c0b56eSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 11638d6c0b56eSmrg # Check whether this is an Automake generated Makefile or not. 11639d6c0b56eSmrg # We used to match only the files named 'Makefile.in', but 11640d6c0b56eSmrg # some people rename them; so instead we look at the file content. 11641d6c0b56eSmrg # Grep'ing the first line is not enough: some people post-process 11642d6c0b56eSmrg # each Makefile.in and add a new line on top of each file to say so. 11643d6c0b56eSmrg # Grep'ing the whole file is not good either: AIX grep has a line 11644d6c0b56eSmrg # limit of 2048, but all sed's we know have understand at least 4000. 11645d6c0b56eSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 11646d6c0b56eSmrg dirpart=`AS_DIRNAME("$mf")` 11647d6c0b56eSmrg else 11648d6c0b56eSmrg continue 11649d6c0b56eSmrg fi 11650d6c0b56eSmrg # Extract the definition of DEPDIR, am__include, and am__quote 11651d6c0b56eSmrg # from the Makefile without running 'make'. 11652d6c0b56eSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 11653d6c0b56eSmrg test -z "$DEPDIR" && continue 11654d6c0b56eSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 11655d6c0b56eSmrg test -z "$am__include" && continue 11656d6c0b56eSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 11657d6c0b56eSmrg # Find all dependency output files, they are included files with 11658d6c0b56eSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 11659d6c0b56eSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 11660d6c0b56eSmrg # expansion. 11661d6c0b56eSmrg for file in `sed -n " 11662d6c0b56eSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 11663d6c0b56eSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 11664d6c0b56eSmrg # Make sure the directory exists. 11665d6c0b56eSmrg test -f "$dirpart/$file" && continue 11666d6c0b56eSmrg fdir=`AS_DIRNAME(["$file"])` 11667d6c0b56eSmrg AS_MKDIR_P([$dirpart/$fdir]) 11668d6c0b56eSmrg # echo "creating $dirpart/$file" 11669d6c0b56eSmrg echo '# dummy' > "$dirpart/$file" 11670d6c0b56eSmrg done 11671d6c0b56eSmrg done 11672d6c0b56eSmrg} 11673d6c0b56eSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 11674d6c0b56eSmrg 11675d6c0b56eSmrg 11676d6c0b56eSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 11677d6c0b56eSmrg# ----------------------------- 11678d6c0b56eSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 11679d6c0b56eSmrg# 11680d6c0b56eSmrg# This code is only required when automatic dependency tracking 11681d6c0b56eSmrg# is enabled. FIXME. This creates each '.P' file that we will 11682d6c0b56eSmrg# need in order to bootstrap the dependency handling code. 11683d6c0b56eSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 11684d6c0b56eSmrg[AC_CONFIG_COMMANDS([depfiles], 11685d6c0b56eSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 11686d6c0b56eSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 11687d6c0b56eSmrg]) 11688d6c0b56eSmrg 11689d6c0b56eSmrg# Do all the work for Automake. -*- Autoconf -*- 11690d6c0b56eSmrg 11691d6c0b56eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11692d6c0b56eSmrg# 11693d6c0b56eSmrg# This file is free software; the Free Software Foundation 11694d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 11695d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 11696d6c0b56eSmrg 11697d6c0b56eSmrg# This macro actually does too much. Some checks are only needed if 11698d6c0b56eSmrg# your package does certain things. But this isn't really a big deal. 11699d6c0b56eSmrg 11700d6c0b56eSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 11701d6c0b56eSmrgm4_define([AC_PROG_CC], 11702d6c0b56eSmrgm4_defn([AC_PROG_CC]) 11703d6c0b56eSmrg[_AM_PROG_CC_C_O 11704d6c0b56eSmrg]) 11705d6c0b56eSmrg 11706d6c0b56eSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 11707d6c0b56eSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 11708d6c0b56eSmrg# ----------------------------------------------- 11709d6c0b56eSmrg# The call with PACKAGE and VERSION arguments is the old style 11710d6c0b56eSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 11711d6c0b56eSmrg# and VERSION should now be passed to AC_INIT and removed from 11712d6c0b56eSmrg# the call to AM_INIT_AUTOMAKE. 11713d6c0b56eSmrg# We support both call styles for the transition. After 11714d6c0b56eSmrg# the next Automake release, Autoconf can make the AC_INIT 11715d6c0b56eSmrg# arguments mandatory, and then we can depend on a new Autoconf 11716d6c0b56eSmrg# release and drop the old call support. 11717d6c0b56eSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 11718d6c0b56eSmrg[AC_PREREQ([2.65])dnl 11719d6c0b56eSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 11720d6c0b56eSmrgdnl the ones we care about. 11721d6c0b56eSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 11722d6c0b56eSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 11723d6c0b56eSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 11724d6c0b56eSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 11725d6c0b56eSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 11726d6c0b56eSmrg # is not polluted with repeated "-I." 11727d6c0b56eSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 11728d6c0b56eSmrg # test to see if srcdir already configured 11729d6c0b56eSmrg if test -f $srcdir/config.status; then 11730d6c0b56eSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 11731d6c0b56eSmrg fi 11732d6c0b56eSmrgfi 11733d6c0b56eSmrg 11734d6c0b56eSmrg# test whether we have cygpath 11735d6c0b56eSmrgif test -z "$CYGPATH_W"; then 11736d6c0b56eSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 11737d6c0b56eSmrg CYGPATH_W='cygpath -w' 11738d6c0b56eSmrg else 11739d6c0b56eSmrg CYGPATH_W=echo 11740d6c0b56eSmrg fi 11741d6c0b56eSmrgfi 11742d6c0b56eSmrgAC_SUBST([CYGPATH_W]) 11743d6c0b56eSmrg 11744d6c0b56eSmrg# Define the identity of the package. 11745d6c0b56eSmrgdnl Distinguish between old-style and new-style calls. 11746d6c0b56eSmrgm4_ifval([$2], 11747d6c0b56eSmrg[AC_DIAGNOSE([obsolete], 11748d6c0b56eSmrg [$0: two- and three-arguments forms are deprecated.]) 11749d6c0b56eSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 11750d6c0b56eSmrg AC_SUBST([PACKAGE], [$1])dnl 11751d6c0b56eSmrg AC_SUBST([VERSION], [$2])], 11752d6c0b56eSmrg[_AM_SET_OPTIONS([$1])dnl 11753d6c0b56eSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 11754d6c0b56eSmrgm4_if( 11755d6c0b56eSmrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 11756d6c0b56eSmrg [ok:ok],, 11757d6c0b56eSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 11758d6c0b56eSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 11759d6c0b56eSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 11760d6c0b56eSmrg 11761d6c0b56eSmrg_AM_IF_OPTION([no-define],, 11762d6c0b56eSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 11763d6c0b56eSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 11764d6c0b56eSmrg 11765d6c0b56eSmrg# Some tools Automake needs. 11766d6c0b56eSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 11767d6c0b56eSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 11768d6c0b56eSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 11769d6c0b56eSmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 11770d6c0b56eSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 11771d6c0b56eSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 11772d6c0b56eSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 11773d6c0b56eSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 11774d6c0b56eSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 11775d6c0b56eSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 11776d6c0b56eSmrg# For better backward compatibility. To be removed once Automake 1.9.x 11777d6c0b56eSmrg# dies out for good. For more background, see: 11778d6c0b56eSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 11779d6c0b56eSmrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 11780d6c0b56eSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 11781d6c0b56eSmrg# We need awk for the "check" target (and possibly the TAP driver). The 11782d6c0b56eSmrg# system "awk" is bad on some platforms. 11783d6c0b56eSmrgAC_REQUIRE([AC_PROG_AWK])dnl 11784d6c0b56eSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 11785d6c0b56eSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 11786d6c0b56eSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 11787d6c0b56eSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 11788d6c0b56eSmrg [_AM_PROG_TAR([v7])])]) 11789d6c0b56eSmrg_AM_IF_OPTION([no-dependencies],, 11790d6c0b56eSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 11791d6c0b56eSmrg [_AM_DEPENDENCIES([CC])], 11792d6c0b56eSmrg [m4_define([AC_PROG_CC], 11793d6c0b56eSmrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 11794d6c0b56eSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 11795d6c0b56eSmrg [_AM_DEPENDENCIES([CXX])], 11796d6c0b56eSmrg [m4_define([AC_PROG_CXX], 11797d6c0b56eSmrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 11798d6c0b56eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 11799d6c0b56eSmrg [_AM_DEPENDENCIES([OBJC])], 11800d6c0b56eSmrg [m4_define([AC_PROG_OBJC], 11801d6c0b56eSmrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 11802d6c0b56eSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 11803d6c0b56eSmrg [_AM_DEPENDENCIES([OBJCXX])], 11804d6c0b56eSmrg [m4_define([AC_PROG_OBJCXX], 11805d6c0b56eSmrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 11806d6c0b56eSmrg]) 11807d6c0b56eSmrgAC_REQUIRE([AM_SILENT_RULES])dnl 11808d6c0b56eSmrgdnl The testsuite driver may need to know about EXEEXT, so add the 11809d6c0b56eSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 11810d6c0b56eSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 11811d6c0b56eSmrgAC_CONFIG_COMMANDS_PRE(dnl 11812d6c0b56eSmrg[m4_provide_if([_AM_COMPILER_EXEEXT], 11813d6c0b56eSmrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 11814d6c0b56eSmrg 11815d6c0b56eSmrg# POSIX will say in a future version that running "rm -f" with no argument 11816d6c0b56eSmrg# is OK; and we want to be able to make that assumption in our Makefile 11817d6c0b56eSmrg# recipes. So use an aggressive probe to check that the usage we want is 11818d6c0b56eSmrg# actually supported "in the wild" to an acceptable degree. 11819d6c0b56eSmrg# See automake bug#10828. 11820d6c0b56eSmrg# To make any issue more visible, cause the running configure to be aborted 11821d6c0b56eSmrg# by default if the 'rm' program in use doesn't match our expectations; the 11822d6c0b56eSmrg# user can still override this though. 11823d6c0b56eSmrgif rm -f && rm -fr && rm -rf; then : OK; else 11824d6c0b56eSmrg cat >&2 <<'END' 11825d6c0b56eSmrgOops! 11826d6c0b56eSmrg 11827d6c0b56eSmrgYour 'rm' program seems unable to run without file operands specified 11828d6c0b56eSmrgon the command line, even when the '-f' option is present. This is contrary 11829d6c0b56eSmrgto the behaviour of most rm programs out there, and not conforming with 11830d6c0b56eSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 11831d6c0b56eSmrg 11832d6c0b56eSmrgPlease tell bug-automake@gnu.org about your system, including the value 11833d6c0b56eSmrgof your $PATH and any error possibly output before this message. This 11834d6c0b56eSmrgcan help us improve future automake versions. 11835d6c0b56eSmrg 11836d6c0b56eSmrgEND 11837d6c0b56eSmrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 11838d6c0b56eSmrg echo 'Configuration will proceed anyway, since you have set the' >&2 11839d6c0b56eSmrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 11840d6c0b56eSmrg echo >&2 11841d6c0b56eSmrg else 11842d6c0b56eSmrg cat >&2 <<'END' 11843d6c0b56eSmrgAborting the configuration process, to ensure you take notice of the issue. 11844d6c0b56eSmrg 11845d6c0b56eSmrgYou can download and install GNU coreutils to get an 'rm' implementation 11846d6c0b56eSmrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 11847d6c0b56eSmrg 11848d6c0b56eSmrgIf you want to complete the configuration process using your problematic 11849d6c0b56eSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 11850d6c0b56eSmrgto "yes", and re-run configure. 11851d6c0b56eSmrg 11852d6c0b56eSmrgEND 11853d6c0b56eSmrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 11854d6c0b56eSmrg fi 11855d6c0b56eSmrgfi 11856d6c0b56eSmrgdnl The trailing newline in this macro's definition is deliberate, for 11857d6c0b56eSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments 11858d6c0b56eSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 11859d6c0b56eSmrg]) 11860d6c0b56eSmrg 11861d6c0b56eSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 11862d6c0b56eSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 11863d6c0b56eSmrgdnl mangled by Autoconf and run in a shell conditional statement. 11864d6c0b56eSmrgm4_define([_AC_COMPILER_EXEEXT], 11865d6c0b56eSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 11866d6c0b56eSmrg 11867d6c0b56eSmrg# When config.status generates a header, we must update the stamp-h file. 11868d6c0b56eSmrg# This file resides in the same directory as the config header 11869d6c0b56eSmrg# that is generated. The stamp files are numbered to have different names. 11870d6c0b56eSmrg 11871d6c0b56eSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 11872d6c0b56eSmrg# loop where config.status creates the headers, so we can generate 11873d6c0b56eSmrg# our stamp files there. 11874d6c0b56eSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 11875d6c0b56eSmrg[# Compute $1's index in $config_headers. 11876d6c0b56eSmrg_am_arg=$1 11877d6c0b56eSmrg_am_stamp_count=1 11878d6c0b56eSmrgfor _am_header in $config_headers :; do 11879d6c0b56eSmrg case $_am_header in 11880d6c0b56eSmrg $_am_arg | $_am_arg:* ) 11881d6c0b56eSmrg break ;; 11882d6c0b56eSmrg * ) 11883d6c0b56eSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 11884d6c0b56eSmrg esac 11885d6c0b56eSmrgdone 11886d6c0b56eSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 11887d6c0b56eSmrg 11888d6c0b56eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11889d6c0b56eSmrg# 11890d6c0b56eSmrg# This file is free software; the Free Software Foundation 11891d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 11892d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 11893d6c0b56eSmrg 11894d6c0b56eSmrg# AM_PROG_INSTALL_SH 11895d6c0b56eSmrg# ------------------ 11896d6c0b56eSmrg# Define $install_sh. 11897d6c0b56eSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 11898d6c0b56eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 11899d6c0b56eSmrgif test x"${install_sh+set}" != xset; then 11900d6c0b56eSmrg case $am_aux_dir in 11901d6c0b56eSmrg *\ * | *\ *) 11902d6c0b56eSmrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 11903d6c0b56eSmrg *) 11904d6c0b56eSmrg install_sh="\${SHELL} $am_aux_dir/install-sh" 11905d6c0b56eSmrg esac 11906d6c0b56eSmrgfi 11907d6c0b56eSmrgAC_SUBST([install_sh])]) 11908d6c0b56eSmrg 11909d6c0b56eSmrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 11910d6c0b56eSmrg# 11911d6c0b56eSmrg# This file is free software; the Free Software Foundation 11912d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 11913d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 11914d6c0b56eSmrg 11915d6c0b56eSmrg# Check whether the underlying file-system supports filenames 11916d6c0b56eSmrg# with a leading dot. For instance MS-DOS doesn't. 11917d6c0b56eSmrgAC_DEFUN([AM_SET_LEADING_DOT], 11918d6c0b56eSmrg[rm -rf .tst 2>/dev/null 11919d6c0b56eSmrgmkdir .tst 2>/dev/null 11920d6c0b56eSmrgif test -d .tst; then 11921d6c0b56eSmrg am__leading_dot=. 11922d6c0b56eSmrgelse 11923d6c0b56eSmrg am__leading_dot=_ 11924d6c0b56eSmrgfi 11925d6c0b56eSmrgrmdir .tst 2>/dev/null 11926d6c0b56eSmrgAC_SUBST([am__leading_dot])]) 11927d6c0b56eSmrg 11928d6c0b56eSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 11929d6c0b56eSmrg# From Jim Meyering 11930d6c0b56eSmrg 11931d6c0b56eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 11932d6c0b56eSmrg# 11933d6c0b56eSmrg# This file is free software; the Free Software Foundation 11934d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 11935d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 11936d6c0b56eSmrg 11937d6c0b56eSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 11938d6c0b56eSmrg# ---------------------------------- 11939d6c0b56eSmrg# Control maintainer-specific portions of Makefiles. 11940d6c0b56eSmrg# Default is to disable them, unless 'enable' is passed literally. 11941d6c0b56eSmrg# For symmetry, 'disable' may be passed as well. Anyway, the user 11942d6c0b56eSmrg# can override the default with the --enable/--disable switch. 11943d6c0b56eSmrgAC_DEFUN([AM_MAINTAINER_MODE], 11944d6c0b56eSmrg[m4_case(m4_default([$1], [disable]), 11945d6c0b56eSmrg [enable], [m4_define([am_maintainer_other], [disable])], 11946d6c0b56eSmrg [disable], [m4_define([am_maintainer_other], [enable])], 11947d6c0b56eSmrg [m4_define([am_maintainer_other], [enable]) 11948d6c0b56eSmrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 11949d6c0b56eSmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 11950d6c0b56eSmrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 11951d6c0b56eSmrg AC_ARG_ENABLE([maintainer-mode], 11952d6c0b56eSmrg [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], 11953d6c0b56eSmrg am_maintainer_other[ make rules and dependencies not useful 11954d6c0b56eSmrg (and sometimes confusing) to the casual installer])], 11955d6c0b56eSmrg [USE_MAINTAINER_MODE=$enableval], 11956d6c0b56eSmrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 11957d6c0b56eSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 11958d6c0b56eSmrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 11959d6c0b56eSmrg MAINT=$MAINTAINER_MODE_TRUE 11960d6c0b56eSmrg AC_SUBST([MAINT])dnl 11961d6c0b56eSmrg] 11962d6c0b56eSmrg) 11963d6c0b56eSmrg 11964d6c0b56eSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 11965d6c0b56eSmrg 11966d6c0b56eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 11967d6c0b56eSmrg# 11968d6c0b56eSmrg# This file is free software; the Free Software Foundation 11969d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 11970d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 11971d6c0b56eSmrg 11972d6c0b56eSmrg# AM_MAKE_INCLUDE() 11973d6c0b56eSmrg# ----------------- 11974d6c0b56eSmrg# Check to see how make treats includes. 11975d6c0b56eSmrgAC_DEFUN([AM_MAKE_INCLUDE], 11976d6c0b56eSmrg[am_make=${MAKE-make} 11977d6c0b56eSmrgcat > confinc << 'END' 11978d6c0b56eSmrgam__doit: 11979d6c0b56eSmrg @echo this is the am__doit target 11980d6c0b56eSmrg.PHONY: am__doit 11981d6c0b56eSmrgEND 11982d6c0b56eSmrg# If we don't find an include directive, just comment out the code. 11983d6c0b56eSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 11984d6c0b56eSmrgam__include="#" 11985d6c0b56eSmrgam__quote= 11986d6c0b56eSmrg_am_result=none 11987d6c0b56eSmrg# First try GNU make style include. 11988d6c0b56eSmrgecho "include confinc" > confmf 11989d6c0b56eSmrg# Ignore all kinds of additional output from 'make'. 11990d6c0b56eSmrgcase `$am_make -s -f confmf 2> /dev/null` in #( 11991d6c0b56eSmrg*the\ am__doit\ target*) 11992d6c0b56eSmrg am__include=include 11993d6c0b56eSmrg am__quote= 11994d6c0b56eSmrg _am_result=GNU 11995d6c0b56eSmrg ;; 11996d6c0b56eSmrgesac 11997d6c0b56eSmrg# Now try BSD make style include. 11998d6c0b56eSmrgif test "$am__include" = "#"; then 11999d6c0b56eSmrg echo '.include "confinc"' > confmf 12000d6c0b56eSmrg case `$am_make -s -f confmf 2> /dev/null` in #( 12001d6c0b56eSmrg *the\ am__doit\ target*) 12002d6c0b56eSmrg am__include=.include 12003d6c0b56eSmrg am__quote="\"" 12004d6c0b56eSmrg _am_result=BSD 12005d6c0b56eSmrg ;; 12006d6c0b56eSmrg esac 12007d6c0b56eSmrgfi 12008d6c0b56eSmrgAC_SUBST([am__include]) 12009d6c0b56eSmrgAC_SUBST([am__quote]) 12010d6c0b56eSmrgAC_MSG_RESULT([$_am_result]) 12011d6c0b56eSmrgrm -f confinc confmf 12012d6c0b56eSmrg]) 12013d6c0b56eSmrg 12014d6c0b56eSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 12015d6c0b56eSmrg 12016d6c0b56eSmrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 12017d6c0b56eSmrg# 12018d6c0b56eSmrg# This file is free software; the Free Software Foundation 12019d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 12020d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 12021d6c0b56eSmrg 12022d6c0b56eSmrg# AM_MISSING_PROG(NAME, PROGRAM) 12023d6c0b56eSmrg# ------------------------------ 12024d6c0b56eSmrgAC_DEFUN([AM_MISSING_PROG], 12025d6c0b56eSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 12026d6c0b56eSmrg$1=${$1-"${am_missing_run}$2"} 12027d6c0b56eSmrgAC_SUBST($1)]) 12028d6c0b56eSmrg 12029d6c0b56eSmrg# AM_MISSING_HAS_RUN 12030d6c0b56eSmrg# ------------------ 12031d6c0b56eSmrg# Define MISSING if not defined so far and test if it is modern enough. 12032d6c0b56eSmrg# If it is, set am_missing_run to use it, otherwise, to nothing. 12033d6c0b56eSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 12034d6c0b56eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12035d6c0b56eSmrgAC_REQUIRE_AUX_FILE([missing])dnl 12036d6c0b56eSmrgif test x"${MISSING+set}" != xset; then 12037d6c0b56eSmrg case $am_aux_dir in 12038d6c0b56eSmrg *\ * | *\ *) 12039d6c0b56eSmrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 12040d6c0b56eSmrg *) 12041d6c0b56eSmrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 12042d6c0b56eSmrg esac 12043d6c0b56eSmrgfi 12044d6c0b56eSmrg# Use eval to expand $SHELL 12045d6c0b56eSmrgif eval "$MISSING --is-lightweight"; then 12046d6c0b56eSmrg am_missing_run="$MISSING " 12047d6c0b56eSmrgelse 12048d6c0b56eSmrg am_missing_run= 12049d6c0b56eSmrg AC_MSG_WARN(['missing' script is too old or missing]) 12050d6c0b56eSmrgfi 12051d6c0b56eSmrg]) 12052d6c0b56eSmrg 12053d6c0b56eSmrg# Helper functions for option handling. -*- Autoconf -*- 12054d6c0b56eSmrg 12055d6c0b56eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12056d6c0b56eSmrg# 12057d6c0b56eSmrg# This file is free software; the Free Software Foundation 12058d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 12059d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 12060d6c0b56eSmrg 12061d6c0b56eSmrg# _AM_MANGLE_OPTION(NAME) 12062d6c0b56eSmrg# ----------------------- 12063d6c0b56eSmrgAC_DEFUN([_AM_MANGLE_OPTION], 12064d6c0b56eSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 12065d6c0b56eSmrg 12066d6c0b56eSmrg# _AM_SET_OPTION(NAME) 12067d6c0b56eSmrg# -------------------- 12068d6c0b56eSmrg# Set option NAME. Presently that only means defining a flag for this option. 12069d6c0b56eSmrgAC_DEFUN([_AM_SET_OPTION], 12070d6c0b56eSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 12071d6c0b56eSmrg 12072d6c0b56eSmrg# _AM_SET_OPTIONS(OPTIONS) 12073d6c0b56eSmrg# ------------------------ 12074d6c0b56eSmrg# OPTIONS is a space-separated list of Automake options. 12075d6c0b56eSmrgAC_DEFUN([_AM_SET_OPTIONS], 12076d6c0b56eSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 12077d6c0b56eSmrg 12078d6c0b56eSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 12079d6c0b56eSmrg# ------------------------------------------- 12080d6c0b56eSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 12081d6c0b56eSmrgAC_DEFUN([_AM_IF_OPTION], 12082d6c0b56eSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 12083d6c0b56eSmrg 12084d6c0b56eSmrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 12085d6c0b56eSmrg# 12086d6c0b56eSmrg# This file is free software; the Free Software Foundation 12087d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 12088d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 12089d6c0b56eSmrg 12090d6c0b56eSmrg# _AM_PROG_CC_C_O 12091d6c0b56eSmrg# --------------- 12092d6c0b56eSmrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 12093d6c0b56eSmrg# to automatically call this. 12094d6c0b56eSmrgAC_DEFUN([_AM_PROG_CC_C_O], 12095d6c0b56eSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 12096d6c0b56eSmrgAC_REQUIRE_AUX_FILE([compile])dnl 12097d6c0b56eSmrgAC_LANG_PUSH([C])dnl 12098d6c0b56eSmrgAC_CACHE_CHECK( 12099d6c0b56eSmrg [whether $CC understands -c and -o together], 12100d6c0b56eSmrg [am_cv_prog_cc_c_o], 12101d6c0b56eSmrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 12102d6c0b56eSmrg # Make sure it works both with $CC and with simple cc. 12103d6c0b56eSmrg # Following AC_PROG_CC_C_O, we do the test twice because some 12104d6c0b56eSmrg # compilers refuse to overwrite an existing .o file with -o, 12105d6c0b56eSmrg # though they will create one. 12106d6c0b56eSmrg am_cv_prog_cc_c_o=yes 12107d6c0b56eSmrg for am_i in 1 2; do 12108d6c0b56eSmrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 12109d6c0b56eSmrg && test -f conftest2.$ac_objext; then 12110d6c0b56eSmrg : OK 12111d6c0b56eSmrg else 12112d6c0b56eSmrg am_cv_prog_cc_c_o=no 12113d6c0b56eSmrg break 12114d6c0b56eSmrg fi 12115d6c0b56eSmrg done 12116d6c0b56eSmrg rm -f core conftest* 12117d6c0b56eSmrg unset am_i]) 12118d6c0b56eSmrgif test "$am_cv_prog_cc_c_o" != yes; then 12119d6c0b56eSmrg # Losing compiler, so override with the script. 12120d6c0b56eSmrg # FIXME: It is wrong to rewrite CC. 12121d6c0b56eSmrg # But if we don't then we get into trouble of one sort or another. 12122d6c0b56eSmrg # A longer-term fix would be to have automake use am__CC in this case, 12123d6c0b56eSmrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 12124d6c0b56eSmrg CC="$am_aux_dir/compile $CC" 12125d6c0b56eSmrgfi 12126d6c0b56eSmrgAC_LANG_POP([C])]) 12127d6c0b56eSmrg 12128d6c0b56eSmrg# For backward compatibility. 12129d6c0b56eSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 12130d6c0b56eSmrg 12131d6c0b56eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12132d6c0b56eSmrg# 12133d6c0b56eSmrg# This file is free software; the Free Software Foundation 12134d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 12135d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 12136d6c0b56eSmrg 12137d6c0b56eSmrg# AM_RUN_LOG(COMMAND) 12138d6c0b56eSmrg# ------------------- 12139d6c0b56eSmrg# Run COMMAND, save the exit status in ac_status, and log it. 12140d6c0b56eSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 12141d6c0b56eSmrgAC_DEFUN([AM_RUN_LOG], 12142d6c0b56eSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 12143d6c0b56eSmrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 12144d6c0b56eSmrg ac_status=$? 12145d6c0b56eSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 12146d6c0b56eSmrg (exit $ac_status); }]) 12147d6c0b56eSmrg 12148d6c0b56eSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 12149d6c0b56eSmrg 12150d6c0b56eSmrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 12151d6c0b56eSmrg# 12152d6c0b56eSmrg# This file is free software; the Free Software Foundation 12153d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 12154d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 12155d6c0b56eSmrg 12156d6c0b56eSmrg# AM_SANITY_CHECK 12157d6c0b56eSmrg# --------------- 12158d6c0b56eSmrgAC_DEFUN([AM_SANITY_CHECK], 12159d6c0b56eSmrg[AC_MSG_CHECKING([whether build environment is sane]) 12160d6c0b56eSmrg# Reject unsafe characters in $srcdir or the absolute working directory 12161d6c0b56eSmrg# name. Accept space and tab only in the latter. 12162d6c0b56eSmrgam_lf=' 12163d6c0b56eSmrg' 12164d6c0b56eSmrgcase `pwd` in 12165d6c0b56eSmrg *[[\\\"\#\$\&\'\`$am_lf]]*) 12166d6c0b56eSmrg AC_MSG_ERROR([unsafe absolute working directory name]);; 12167d6c0b56eSmrgesac 12168d6c0b56eSmrgcase $srcdir in 12169d6c0b56eSmrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 12170d6c0b56eSmrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 12171d6c0b56eSmrgesac 12172d6c0b56eSmrg 12173d6c0b56eSmrg# Do 'set' in a subshell so we don't clobber the current shell's 12174d6c0b56eSmrg# arguments. Must try -L first in case configure is actually a 12175d6c0b56eSmrg# symlink; some systems play weird games with the mod time of symlinks 12176d6c0b56eSmrg# (eg FreeBSD returns the mod time of the symlink's containing 12177d6c0b56eSmrg# directory). 12178d6c0b56eSmrgif ( 12179d6c0b56eSmrg am_has_slept=no 12180d6c0b56eSmrg for am_try in 1 2; do 12181d6c0b56eSmrg echo "timestamp, slept: $am_has_slept" > conftest.file 12182d6c0b56eSmrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 12183d6c0b56eSmrg if test "$[*]" = "X"; then 12184d6c0b56eSmrg # -L didn't work. 12185d6c0b56eSmrg set X `ls -t "$srcdir/configure" conftest.file` 12186d6c0b56eSmrg fi 12187d6c0b56eSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 12188d6c0b56eSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 12189d6c0b56eSmrg 12190d6c0b56eSmrg # If neither matched, then we have a broken ls. This can happen 12191d6c0b56eSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 12192d6c0b56eSmrg # broken ls alias from the environment. This has actually 12193d6c0b56eSmrg # happened. Such a system could not be considered "sane". 12194d6c0b56eSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 12195d6c0b56eSmrg alias in your environment]) 12196d6c0b56eSmrg fi 12197d6c0b56eSmrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 12198d6c0b56eSmrg break 12199d6c0b56eSmrg fi 12200d6c0b56eSmrg # Just in case. 12201d6c0b56eSmrg sleep 1 12202d6c0b56eSmrg am_has_slept=yes 12203d6c0b56eSmrg done 12204d6c0b56eSmrg test "$[2]" = conftest.file 12205d6c0b56eSmrg ) 12206d6c0b56eSmrgthen 12207d6c0b56eSmrg # Ok. 12208d6c0b56eSmrg : 12209d6c0b56eSmrgelse 12210d6c0b56eSmrg AC_MSG_ERROR([newly created file is older than distributed files! 12211d6c0b56eSmrgCheck your system clock]) 12212d6c0b56eSmrgfi 12213d6c0b56eSmrgAC_MSG_RESULT([yes]) 12214d6c0b56eSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and 12215d6c0b56eSmrg# generated files are strictly newer. 12216d6c0b56eSmrgam_sleep_pid= 12217d6c0b56eSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 12218d6c0b56eSmrg ( sleep 1 ) & 12219d6c0b56eSmrg am_sleep_pid=$! 12220d6c0b56eSmrgfi 12221d6c0b56eSmrgAC_CONFIG_COMMANDS_PRE( 12222d6c0b56eSmrg [AC_MSG_CHECKING([that generated files are newer than configure]) 12223d6c0b56eSmrg if test -n "$am_sleep_pid"; then 12224d6c0b56eSmrg # Hide warnings about reused PIDs. 12225d6c0b56eSmrg wait $am_sleep_pid 2>/dev/null 12226d6c0b56eSmrg fi 12227d6c0b56eSmrg AC_MSG_RESULT([done])]) 12228d6c0b56eSmrgrm -f conftest.file 12229d6c0b56eSmrg]) 12230d6c0b56eSmrg 12231d6c0b56eSmrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 12232d6c0b56eSmrg# 12233d6c0b56eSmrg# This file is free software; the Free Software Foundation 12234d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 12235d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 12236d6c0b56eSmrg 12237d6c0b56eSmrg# AM_SILENT_RULES([DEFAULT]) 12238d6c0b56eSmrg# -------------------------- 12239d6c0b56eSmrg# Enable less verbose build rules; with the default set to DEFAULT 12240d6c0b56eSmrg# ("yes" being less verbose, "no" or empty being verbose). 12241d6c0b56eSmrgAC_DEFUN([AM_SILENT_RULES], 12242d6c0b56eSmrg[AC_ARG_ENABLE([silent-rules], [dnl 12243d6c0b56eSmrgAS_HELP_STRING( 12244d6c0b56eSmrg [--enable-silent-rules], 12245d6c0b56eSmrg [less verbose build output (undo: "make V=1")]) 12246d6c0b56eSmrgAS_HELP_STRING( 12247d6c0b56eSmrg [--disable-silent-rules], 12248d6c0b56eSmrg [verbose build output (undo: "make V=0")])dnl 12249d6c0b56eSmrg]) 12250d6c0b56eSmrgcase $enable_silent_rules in @%:@ ((( 12251d6c0b56eSmrg yes) AM_DEFAULT_VERBOSITY=0;; 12252d6c0b56eSmrg no) AM_DEFAULT_VERBOSITY=1;; 12253d6c0b56eSmrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 12254d6c0b56eSmrgesac 12255d6c0b56eSmrgdnl 12256d6c0b56eSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 12257d6c0b56eSmrgdnl do not support nested variable expansions. 12258d6c0b56eSmrgdnl See automake bug#9928 and bug#10237. 12259d6c0b56eSmrgam_make=${MAKE-make} 12260d6c0b56eSmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 12261d6c0b56eSmrg [am_cv_make_support_nested_variables], 12262d6c0b56eSmrg [if AS_ECHO([['TRUE=$(BAR$(V)) 12263d6c0b56eSmrgBAR0=false 12264d6c0b56eSmrgBAR1=true 12265d6c0b56eSmrgV=1 12266d6c0b56eSmrgam__doit: 12267d6c0b56eSmrg @$(TRUE) 12268d6c0b56eSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 12269d6c0b56eSmrg am_cv_make_support_nested_variables=yes 12270d6c0b56eSmrgelse 12271d6c0b56eSmrg am_cv_make_support_nested_variables=no 12272d6c0b56eSmrgfi]) 12273d6c0b56eSmrgif test $am_cv_make_support_nested_variables = yes; then 12274d6c0b56eSmrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 12275d6c0b56eSmrg AM_V='$(V)' 12276d6c0b56eSmrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 12277d6c0b56eSmrgelse 12278d6c0b56eSmrg AM_V=$AM_DEFAULT_VERBOSITY 12279d6c0b56eSmrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 12280d6c0b56eSmrgfi 12281d6c0b56eSmrgAC_SUBST([AM_V])dnl 12282d6c0b56eSmrgAM_SUBST_NOTMAKE([AM_V])dnl 12283d6c0b56eSmrgAC_SUBST([AM_DEFAULT_V])dnl 12284d6c0b56eSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 12285d6c0b56eSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 12286d6c0b56eSmrgAM_BACKSLASH='\' 12287d6c0b56eSmrgAC_SUBST([AM_BACKSLASH])dnl 12288d6c0b56eSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 12289d6c0b56eSmrg]) 12290d6c0b56eSmrg 12291d6c0b56eSmrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 12292d6c0b56eSmrg# 12293d6c0b56eSmrg# This file is free software; the Free Software Foundation 12294d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 12295d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 12296d6c0b56eSmrg 12297d6c0b56eSmrg# AM_PROG_INSTALL_STRIP 12298d6c0b56eSmrg# --------------------- 12299d6c0b56eSmrg# One issue with vendor 'install' (even GNU) is that you can't 12300d6c0b56eSmrg# specify the program used to strip binaries. This is especially 12301d6c0b56eSmrg# annoying in cross-compiling environments, where the build's strip 12302d6c0b56eSmrg# is unlikely to handle the host's binaries. 12303d6c0b56eSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 12304d6c0b56eSmrg# always use install-sh in "make install-strip", and initialize 12305d6c0b56eSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 12306d6c0b56eSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 12307d6c0b56eSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 12308d6c0b56eSmrg# Installed binaries are usually stripped using 'strip' when the user 12309d6c0b56eSmrg# run "make install-strip". However 'strip' might not be the right 12310d6c0b56eSmrg# tool to use in cross-compilation environments, therefore Automake 12311d6c0b56eSmrg# will honor the 'STRIP' environment variable to overrule this program. 12312d6c0b56eSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 12313d6c0b56eSmrgif test "$cross_compiling" != no; then 12314d6c0b56eSmrg AC_CHECK_TOOL([STRIP], [strip], :) 12315d6c0b56eSmrgfi 12316d6c0b56eSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 12317d6c0b56eSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 12318d6c0b56eSmrg 12319d6c0b56eSmrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 12320d6c0b56eSmrg# 12321d6c0b56eSmrg# This file is free software; the Free Software Foundation 12322d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 12323d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 12324d6c0b56eSmrg 12325d6c0b56eSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 12326d6c0b56eSmrg# --------------------------- 12327d6c0b56eSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 12328d6c0b56eSmrg# This macro is traced by Automake. 12329d6c0b56eSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 12330d6c0b56eSmrg 12331d6c0b56eSmrg# AM_SUBST_NOTMAKE(VARIABLE) 12332d6c0b56eSmrg# -------------------------- 12333d6c0b56eSmrg# Public sister of _AM_SUBST_NOTMAKE. 12334d6c0b56eSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 12335d6c0b56eSmrg 12336d6c0b56eSmrg# Check how to create a tarball. -*- Autoconf -*- 12337d6c0b56eSmrg 12338d6c0b56eSmrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 12339d6c0b56eSmrg# 12340d6c0b56eSmrg# This file is free software; the Free Software Foundation 12341d6c0b56eSmrg# gives unlimited permission to copy and/or distribute it, 12342d6c0b56eSmrg# with or without modifications, as long as this notice is preserved. 12343d6c0b56eSmrg 12344d6c0b56eSmrg# _AM_PROG_TAR(FORMAT) 12345d6c0b56eSmrg# -------------------- 12346d6c0b56eSmrg# Check how to create a tarball in format FORMAT. 12347d6c0b56eSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 12348d6c0b56eSmrg# 12349d6c0b56eSmrg# Substitute a variable $(am__tar) that is a command 12350d6c0b56eSmrg# writing to stdout a FORMAT-tarball containing the directory 12351d6c0b56eSmrg# $tardir. 12352d6c0b56eSmrg# tardir=directory && $(am__tar) > result.tar 12353d6c0b56eSmrg# 12354d6c0b56eSmrg# Substitute a variable $(am__untar) that extract such 12355d6c0b56eSmrg# a tarball read from stdin. 12356d6c0b56eSmrg# $(am__untar) < result.tar 12357d6c0b56eSmrg# 12358d6c0b56eSmrgAC_DEFUN([_AM_PROG_TAR], 12359d6c0b56eSmrg[# Always define AMTAR for backward compatibility. Yes, it's still used 12360d6c0b56eSmrg# in the wild :-( We should find a proper way to deprecate it ... 12361d6c0b56eSmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 12362d6c0b56eSmrg 12363d6c0b56eSmrg# We'll loop over all known methods to create a tar archive until one works. 12364d6c0b56eSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 12365d6c0b56eSmrg 12366d6c0b56eSmrgm4_if([$1], [v7], 12367d6c0b56eSmrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 12368d6c0b56eSmrg 12369d6c0b56eSmrg [m4_case([$1], 12370d6c0b56eSmrg [ustar], 12371d6c0b56eSmrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 12372d6c0b56eSmrg # There is notably a 21 bits limit for the UID and the GID. In fact, 12373d6c0b56eSmrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 12374d6c0b56eSmrg # and bug#13588). 12375d6c0b56eSmrg am_max_uid=2097151 # 2^21 - 1 12376d6c0b56eSmrg am_max_gid=$am_max_uid 12377d6c0b56eSmrg # The $UID and $GID variables are not portable, so we need to resort 12378d6c0b56eSmrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 12379d6c0b56eSmrg # below are definitely unexpected, so allow the users to see them 12380d6c0b56eSmrg # (that is, avoid stderr redirection). 12381d6c0b56eSmrg am_uid=`id -u || echo unknown` 12382d6c0b56eSmrg am_gid=`id -g || echo unknown` 12383d6c0b56eSmrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 12384d6c0b56eSmrg if test $am_uid -le $am_max_uid; then 12385d6c0b56eSmrg AC_MSG_RESULT([yes]) 12386d6c0b56eSmrg else 12387d6c0b56eSmrg AC_MSG_RESULT([no]) 12388d6c0b56eSmrg _am_tools=none 12389d6c0b56eSmrg fi 12390d6c0b56eSmrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 12391d6c0b56eSmrg if test $am_gid -le $am_max_gid; then 12392d6c0b56eSmrg AC_MSG_RESULT([yes]) 12393d6c0b56eSmrg else 12394d6c0b56eSmrg AC_MSG_RESULT([no]) 12395d6c0b56eSmrg _am_tools=none 12396d6c0b56eSmrg fi], 12397d6c0b56eSmrg 12398d6c0b56eSmrg [pax], 12399d6c0b56eSmrg [], 12400d6c0b56eSmrg 12401d6c0b56eSmrg [m4_fatal([Unknown tar format])]) 12402d6c0b56eSmrg 12403d6c0b56eSmrg AC_MSG_CHECKING([how to create a $1 tar archive]) 12404d6c0b56eSmrg 12405d6c0b56eSmrg # Go ahead even if we have the value already cached. We do so because we 12406d6c0b56eSmrg # need to set the values for the 'am__tar' and 'am__untar' variables. 12407d6c0b56eSmrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 12408d6c0b56eSmrg 12409d6c0b56eSmrg for _am_tool in $_am_tools; do 12410d6c0b56eSmrg case $_am_tool in 12411d6c0b56eSmrg gnutar) 12412d6c0b56eSmrg for _am_tar in tar gnutar gtar; do 12413d6c0b56eSmrg AM_RUN_LOG([$_am_tar --version]) && break 12414d6c0b56eSmrg done 12415d6c0b56eSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 12416d6c0b56eSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 12417d6c0b56eSmrg am__untar="$_am_tar -xf -" 12418d6c0b56eSmrg ;; 12419d6c0b56eSmrg plaintar) 12420d6c0b56eSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 12421d6c0b56eSmrg # ustar tarball either. 12422d6c0b56eSmrg (tar --version) >/dev/null 2>&1 && continue 12423d6c0b56eSmrg am__tar='tar chf - "$$tardir"' 12424d6c0b56eSmrg am__tar_='tar chf - "$tardir"' 12425d6c0b56eSmrg am__untar='tar xf -' 12426d6c0b56eSmrg ;; 12427d6c0b56eSmrg pax) 12428d6c0b56eSmrg am__tar='pax -L -x $1 -w "$$tardir"' 12429d6c0b56eSmrg am__tar_='pax -L -x $1 -w "$tardir"' 12430d6c0b56eSmrg am__untar='pax -r' 12431d6c0b56eSmrg ;; 12432d6c0b56eSmrg cpio) 12433d6c0b56eSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 12434d6c0b56eSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 12435d6c0b56eSmrg am__untar='cpio -i -H $1 -d' 12436d6c0b56eSmrg ;; 12437d6c0b56eSmrg none) 12438d6c0b56eSmrg am__tar=false 12439d6c0b56eSmrg am__tar_=false 12440d6c0b56eSmrg am__untar=false 12441d6c0b56eSmrg ;; 12442d6c0b56eSmrg esac 12443d6c0b56eSmrg 12444d6c0b56eSmrg # If the value was cached, stop now. We just wanted to have am__tar 12445d6c0b56eSmrg # and am__untar set. 12446d6c0b56eSmrg test -n "${am_cv_prog_tar_$1}" && break 12447d6c0b56eSmrg 12448d6c0b56eSmrg # tar/untar a dummy directory, and stop if the command works. 12449d6c0b56eSmrg rm -rf conftest.dir 12450d6c0b56eSmrg mkdir conftest.dir 12451d6c0b56eSmrg echo GrepMe > conftest.dir/file 12452d6c0b56eSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 12453d6c0b56eSmrg rm -rf conftest.dir 12454d6c0b56eSmrg if test -s conftest.tar; then 12455d6c0b56eSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 12456d6c0b56eSmrg AM_RUN_LOG([cat conftest.dir/file]) 12457d6c0b56eSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 12458d6c0b56eSmrg fi 12459d6c0b56eSmrg done 12460d6c0b56eSmrg rm -rf conftest.dir 12461d6c0b56eSmrg 12462d6c0b56eSmrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 12463d6c0b56eSmrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 12464d6c0b56eSmrg 12465d6c0b56eSmrgAC_SUBST([am__tar]) 12466d6c0b56eSmrgAC_SUBST([am__untar]) 12467d6c0b56eSmrg]) # _AM_PROG_TAR 12468d6c0b56eSmrg 12469