aclocal.m4 revision 44584a44
144584a44Smrg# generated automatically by aclocal 1.15 -*- Autoconf -*- 2f1ee322dSmrg 344584a44Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 4c43cc173Smrg 5c43cc173Smrg# This file is free software; the Free Software Foundation 6c43cc173Smrg# gives unlimited permission to copy and/or distribute it, 7c43cc173Smrg# with or without modifications, as long as this notice is preserved. 8c43cc173Smrg 9c43cc173Smrg# This program is distributed in the hope that it will be useful, 10c43cc173Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11c43cc173Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12c43cc173Smrg# PARTICULAR PURPOSE. 13c43cc173Smrg 1406c34b88Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) 1521e67964Smrgm4_ifndef([AC_AUTOCONF_VERSION], 1621e67964Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17f1ee322dSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, 18f1ee322dSmrg[m4_warning([this file was generated for autoconf 2.69. 1921e67964SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 2021e67964SmrgIf you have problems, you may need to regenerate the build system entirely. 21f1ee322dSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])]) 22c43cc173Smrg 23dc9477beSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24c27c18e8Smrg# 2544584a44Smrg# Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. 26dc9477beSmrg# Written by Gordon Matzigkeit, 1996 27c27c18e8Smrg# 28dc9477beSmrg# This file is free software; the Free Software Foundation gives 29dc9477beSmrg# unlimited permission to copy and/or distribute it, with or without 30dc9477beSmrg# modifications, as long as this notice is preserved. 31c27c18e8Smrg 32dc9477beSmrgm4_define([_LT_COPYING], [dnl 3344584a44Smrg# Copyright (C) 2014 Free Software Foundation, Inc. 3444584a44Smrg# This is free software; see the source for copying conditions. There is NO 3544584a44Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 3644584a44Smrg 3744584a44Smrg# GNU Libtool is free software; you can redistribute it and/or modify 3844584a44Smrg# it under the terms of the GNU General Public License as published by 3944584a44Smrg# the Free Software Foundation; either version 2 of of the License, or 4044584a44Smrg# (at your option) any later version. 41c27c18e8Smrg# 4244584a44Smrg# As a special exception to the GNU General Public License, if you 4344584a44Smrg# distribute this file as part of a program or library that is built 4444584a44Smrg# using GNU Libtool, you may include this file under the same 4544584a44Smrg# distribution terms that you use for the rest of that program. 46c27c18e8Smrg# 4744584a44Smrg# GNU Libtool is distributed in the hope that it will be useful, but 4844584a44Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 49dc9477beSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 50dc9477beSmrg# GNU General Public License for more details. 51c27c18e8Smrg# 52dc9477beSmrg# You should have received a copy of the GNU General Public License 5344584a44Smrg# along with this program. If not, see <http://www.gnu.org/licenses/>. 54c27c18e8Smrg]) 55c27c18e8Smrg 5644584a44Smrg# serial 58 LT_INIT 57c27c18e8Smrg 58c43cc173Smrg 59dc9477beSmrg# LT_PREREQ(VERSION) 60dc9477beSmrg# ------------------ 61dc9477beSmrg# Complain and exit if this libtool version is less that VERSION. 62dc9477beSmrgm4_defun([LT_PREREQ], 63dc9477beSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 64dc9477beSmrg [m4_default([$3], 65dc9477beSmrg [m4_fatal([Libtool version $1 or higher is required], 66dc9477beSmrg 63)])], 67dc9477beSmrg [$2])]) 68c43cc173Smrg 69c27c18e8Smrg 70dc9477beSmrg# _LT_CHECK_BUILDDIR 71dc9477beSmrg# ------------------ 72dc9477beSmrg# Complain if the absolute build directory name contains unusual characters 73dc9477beSmrgm4_defun([_LT_CHECK_BUILDDIR], 74dc9477beSmrg[case `pwd` in 75dc9477beSmrg *\ * | *\ *) 76dc9477beSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 77dc9477beSmrgesac 78dc9477beSmrg]) 79c27c18e8Smrg 80c27c18e8Smrg 81dc9477beSmrg# LT_INIT([OPTIONS]) 82dc9477beSmrg# ------------------ 83dc9477beSmrgAC_DEFUN([LT_INIT], 8444584a44Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK 85dc9477beSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 86dc9477beSmrgAC_BEFORE([$0], [LT_LANG])dnl 87dc9477beSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 88dc9477beSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 89dc9477beSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 90c27c18e8Smrg 91dc9477beSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 92dc9477beSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 93dc9477beSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 94dc9477beSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 95dc9477beSmrgdnl unless we require an AC_DEFUNed macro: 96dc9477beSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 97dc9477beSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 98dc9477beSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 99dc9477beSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 100dc9477beSmrgm4_require([_LT_PROG_LTMAIN])dnl 101c27c18e8Smrg 102dc9477beSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 103c27c18e8Smrg 104dc9477beSmrgdnl Parse OPTIONS 105dc9477beSmrg_LT_SET_OPTIONS([$0], [$1]) 106c43cc173Smrg 107dc9477beSmrg# This can be used to rebuild libtool when needed 10844584a44SmrgLIBTOOL_DEPS=$ltmain 109c43cc173Smrg 110dc9477beSmrg# Always use our own libtool. 111dc9477beSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 112dc9477beSmrgAC_SUBST(LIBTOOL)dnl 113c43cc173Smrg 114dc9477beSmrg_LT_SETUP 115c43cc173Smrg 116dc9477beSmrg# Only expand once: 117dc9477beSmrgm4_define([LT_INIT]) 118dc9477beSmrg])# LT_INIT 119c43cc173Smrg 120dc9477beSmrg# Old names: 121dc9477beSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 122dc9477beSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 123dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 124dc9477beSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 125dc9477beSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 126c43cc173Smrg 127c43cc173Smrg 12844584a44Smrg# _LT_PREPARE_CC_BASENAME 12944584a44Smrg# ----------------------- 13044584a44Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [ 13144584a44Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 13244584a44Smrgfunc_cc_basename () 13344584a44Smrg{ 13444584a44Smrg for cc_temp in @S|@*""; do 13544584a44Smrg case $cc_temp in 13644584a44Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 13744584a44Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 13844584a44Smrg \-*) ;; 13944584a44Smrg *) break;; 14044584a44Smrg esac 14144584a44Smrg done 14244584a44Smrg func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 14344584a44Smrg} 14444584a44Smrg])# _LT_PREPARE_CC_BASENAME 14544584a44Smrg 14644584a44Smrg 147dc9477beSmrg# _LT_CC_BASENAME(CC) 148dc9477beSmrg# ------------------- 14944584a44Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, 15044584a44Smrg# but that macro is also expanded into generated libtool script, which 15144584a44Smrg# arranges for $SED and $ECHO to be set by different means. 152dc9477beSmrgm4_defun([_LT_CC_BASENAME], 15344584a44Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl 15444584a44SmrgAC_REQUIRE([_LT_DECL_SED])dnl 15544584a44SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 15644584a44Smrgfunc_cc_basename $1 15744584a44Smrgcc_basename=$func_cc_basename_result 15806c34b88Smrg]) 15937eb1ca1Smrg 16037eb1ca1Smrg 161dc9477beSmrg# _LT_FILEUTILS_DEFAULTS 162dc9477beSmrg# ---------------------- 163dc9477beSmrg# It is okay to use these file commands and assume they have been set 16444584a44Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. 165dc9477beSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 166dc9477beSmrg[: ${CP="cp -f"} 167dc9477beSmrg: ${MV="mv -f"} 168dc9477beSmrg: ${RM="rm -f"} 169dc9477beSmrg])# _LT_FILEUTILS_DEFAULTS 17037eb1ca1Smrg 171c43cc173Smrg 172dc9477beSmrg# _LT_SETUP 173dc9477beSmrg# --------- 174dc9477beSmrgm4_defun([_LT_SETUP], 175dc9477beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 176dc9477beSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 177dc9477beSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 178dc9477beSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 179c43cc173Smrg 180dc9477beSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 181dc9477beSmrgdnl 182dc9477beSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 183dc9477beSmrg_LT_DECL([], [host], [0])dnl 184dc9477beSmrg_LT_DECL([], [host_os], [0])dnl 185dc9477beSmrgdnl 186dc9477beSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 187dc9477beSmrg_LT_DECL([], [build], [0])dnl 188dc9477beSmrg_LT_DECL([], [build_os], [0])dnl 189dc9477beSmrgdnl 190dc9477beSmrgAC_REQUIRE([AC_PROG_CC])dnl 191dc9477beSmrgAC_REQUIRE([LT_PATH_LD])dnl 192dc9477beSmrgAC_REQUIRE([LT_PATH_NM])dnl 193dc9477beSmrgdnl 194dc9477beSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 195dc9477beSmrgtest -z "$LN_S" && LN_S="ln -s" 196dc9477beSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 197dc9477beSmrgdnl 198dc9477beSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 199dc9477beSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 200dc9477beSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 201dc9477beSmrgdnl 202dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 203dc9477beSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 204dc9477beSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 205dc9477beSmrgm4_require([_LT_CMD_RELOAD])dnl 206dc9477beSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 207dc9477beSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 208dc9477beSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 209dc9477beSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 210dc9477beSmrgm4_require([_LT_WITH_SYSROOT])dnl 21144584a44Smrgm4_require([_LT_CMD_TRUNCATE])dnl 212c27c18e8Smrg 213dc9477beSmrg_LT_CONFIG_LIBTOOL_INIT([ 21444584a44Smrg# See if we are running on zsh, and set the options that allow our 215dc9477beSmrg# commands through without removal of \ escapes INIT. 21644584a44Smrgif test -n "\${ZSH_VERSION+set}"; then 217dc9477beSmrg setopt NO_GLOB_SUBST 218dc9477beSmrgfi 21906c34b88Smrg]) 22044584a44Smrgif test -n "${ZSH_VERSION+set}"; then 221dc9477beSmrg setopt NO_GLOB_SUBST 222dc9477beSmrgfi 223c27c18e8Smrg 224dc9477beSmrg_LT_CHECK_OBJDIR 225c27c18e8Smrg 226dc9477beSmrgm4_require([_LT_TAG_COMPILER])dnl 227c27c18e8Smrg 228dc9477beSmrgcase $host_os in 229dc9477beSmrgaix3*) 230dc9477beSmrg # AIX sometimes has problems with the GCC collect2 program. For some 231dc9477beSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 232dc9477beSmrg # vanish in a puff of smoke. 23344584a44Smrg if test set != "${COLLECT_NAMES+set}"; then 234dc9477beSmrg COLLECT_NAMES= 235dc9477beSmrg export COLLECT_NAMES 23606c34b88Smrg fi 237dc9477beSmrg ;; 238dc9477beSmrgesac 239c27c18e8Smrg 240dc9477beSmrg# Global variables: 241dc9477beSmrgofile=libtool 242dc9477beSmrgcan_build_shared=yes 243c27c18e8Smrg 24444584a44Smrg# All known linkers require a '.a' archive for static linking (except MSVC, 245dc9477beSmrg# which needs '.lib'). 246dc9477beSmrglibext=a 247c27c18e8Smrg 24844584a44Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 249c27c18e8Smrg 25044584a44Smrgold_CC=$CC 25144584a44Smrgold_CFLAGS=$CFLAGS 252c27c18e8Smrg 253dc9477beSmrg# Set sane defaults for various variables 254dc9477beSmrgtest -z "$CC" && CC=cc 255dc9477beSmrgtest -z "$LTCC" && LTCC=$CC 256dc9477beSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 257dc9477beSmrgtest -z "$LD" && LD=ld 258dc9477beSmrgtest -z "$ac_objext" && ac_objext=o 259c27c18e8Smrg 260dc9477beSmrg_LT_CC_BASENAME([$compiler]) 261c27c18e8Smrg 262dc9477beSmrg# Only perform the check for file, if the check method requires it 263dc9477beSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 264dc9477beSmrgcase $deplibs_check_method in 265dc9477beSmrgfile_magic*) 266dc9477beSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 267dc9477beSmrg _LT_PATH_MAGIC 268dc9477beSmrg fi 269dc9477beSmrg ;; 270dc9477beSmrgesac 271c27c18e8Smrg 272dc9477beSmrg# Use C for the default configuration in the libtool script 273dc9477beSmrgLT_SUPPORTED_TAG([CC]) 274dc9477beSmrg_LT_LANG_C_CONFIG 275dc9477beSmrg_LT_LANG_DEFAULT_CONFIG 276dc9477beSmrg_LT_CONFIG_COMMANDS 277dc9477beSmrg])# _LT_SETUP 278c27c18e8Smrg 279c27c18e8Smrg 280dc9477beSmrg# _LT_PREPARE_SED_QUOTE_VARS 281dc9477beSmrg# -------------------------- 282dc9477beSmrg# Define a few sed substitution that help us do robust quoting. 283dc9477beSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 284dc9477beSmrg[# Backslashify metacharacters that are still active within 285dc9477beSmrg# double-quoted strings. 286dc9477beSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 287c27c18e8Smrg 288dc9477beSmrg# Same as above, but do not quote variable references. 289dc9477beSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 290c27c18e8Smrg 291dc9477beSmrg# Sed substitution to delay expansion of an escaped shell variable in a 292dc9477beSmrg# double_quote_subst'ed string. 293dc9477beSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 294c27c18e8Smrg 295dc9477beSmrg# Sed substitution to delay expansion of an escaped single quote. 296dc9477beSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 297c27c18e8Smrg 298dc9477beSmrg# Sed substitution to avoid accidental globbing in evaled expressions 299dc9477beSmrgno_glob_subst='s/\*/\\\*/g' 300dc9477beSmrg]) 301c27c18e8Smrg 302dc9477beSmrg# _LT_PROG_LTMAIN 303dc9477beSmrg# --------------- 30444584a44Smrg# Note that this code is called both from 'configure', and 'config.status' 305dc9477beSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 30644584a44Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake, 307dc9477beSmrg# so we pass a copy along to make sure it has a sensible value anyway. 308dc9477beSmrgm4_defun([_LT_PROG_LTMAIN], 309dc9477beSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 310dc9477beSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 31144584a44Smrgltmain=$ac_aux_dir/ltmain.sh 312dc9477beSmrg])# _LT_PROG_LTMAIN 313c27c18e8Smrg 314c27c18e8Smrg 315c43cc173Smrg 316dc9477beSmrg# So that we can recreate a full libtool script including additional 317dc9477beSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 31844584a44Smrg# in macros and then make a single call at the end using the 'libtool' 319dc9477beSmrg# label. 320dc9477beSmrg 321dc9477beSmrg 322dc9477beSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 323dc9477beSmrg# ---------------------------------------- 324dc9477beSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 325dc9477beSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 326dc9477beSmrg[m4_ifval([$1], 327dc9477beSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 328dc9477beSmrg [$1 329dc9477beSmrg])])]) 330dc9477beSmrg 331dc9477beSmrg# Initialize. 332dc9477beSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 333dc9477beSmrg 334dc9477beSmrg 335dc9477beSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 33606c34b88Smrg# ------------------------------ 337dc9477beSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 338dc9477beSmrgm4_define([_LT_CONFIG_LIBTOOL], 339dc9477beSmrg[m4_ifval([$1], 340dc9477beSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 341dc9477beSmrg [$1 342dc9477beSmrg])])]) 343c43cc173Smrg 344dc9477beSmrg# Initialize. 345dc9477beSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 346dc9477beSmrg 347dc9477beSmrg 348dc9477beSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 349dc9477beSmrg# ----------------------------------------------------- 350dc9477beSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 351dc9477beSmrg[_LT_CONFIG_LIBTOOL([$1]) 352dc9477beSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 353c27c18e8Smrg]) 354c27c18e8Smrg 355c27c18e8Smrg 356dc9477beSmrg# _LT_FORMAT_COMMENT([COMMENT]) 357dc9477beSmrg# ----------------------------- 358dc9477beSmrg# Add leading comment marks to the start of each line, and a trailing 359dc9477beSmrg# full-stop to the whole comment if one is not present already. 360dc9477beSmrgm4_define([_LT_FORMAT_COMMENT], 361dc9477beSmrg[m4_ifval([$1], [ 362dc9477beSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 363dc9477beSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 364dc9477beSmrg)]) 365c27c18e8Smrg 366c27c18e8Smrg 367c27c18e8Smrg 368c27c18e8Smrg 369c27c18e8Smrg 370dc9477beSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 371dc9477beSmrg# ------------------------------------------------------------------- 372dc9477beSmrg# CONFIGNAME is the name given to the value in the libtool script. 373dc9477beSmrg# VARNAME is the (base) name used in the configure script. 374dc9477beSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 375dc9477beSmrg# VARNAME. Any other value will be used directly. 376dc9477beSmrgm4_define([_LT_DECL], 377dc9477beSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 378dc9477beSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 379dc9477beSmrg [m4_ifval([$1], [$1], [$2])]) 380dc9477beSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 381dc9477beSmrg m4_ifval([$4], 382dc9477beSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 383dc9477beSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 384dc9477beSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 385dc9477beSmrg]) 386c27c18e8Smrg 387c27c18e8Smrg 388dc9477beSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 389dc9477beSmrg# -------------------------------------------------------- 390dc9477beSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 391c27c18e8Smrg 392c27c18e8Smrg 393dc9477beSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 394dc9477beSmrg# ------------------------------------------------ 395dc9477beSmrgm4_define([lt_decl_tag_varnames], 396dc9477beSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 397dc9477beSmrg 398dc9477beSmrg 399dc9477beSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 400dc9477beSmrg# --------------------------------------------------------- 401dc9477beSmrgm4_define([_lt_decl_filter], 402dc9477beSmrg[m4_case([$#], 403dc9477beSmrg [0], [m4_fatal([$0: too few arguments: $#])], 404dc9477beSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 405dc9477beSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 406dc9477beSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 407dc9477beSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 40806c34b88Smrg]) 409c27c18e8Smrg 410c27c18e8Smrg 411dc9477beSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 412dc9477beSmrg# -------------------------------------------------- 413dc9477beSmrgm4_define([lt_decl_quote_varnames], 414dc9477beSmrg[_lt_decl_filter([value], [1], $@)]) 415dc9477beSmrg 416dc9477beSmrg 417dc9477beSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 418dc9477beSmrg# --------------------------------------------------- 419dc9477beSmrgm4_define([lt_decl_dquote_varnames], 420dc9477beSmrg[_lt_decl_filter([value], [2], $@)]) 421dc9477beSmrg 422dc9477beSmrg 423dc9477beSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 424dc9477beSmrg# --------------------------------------------------- 425dc9477beSmrgm4_define([lt_decl_varnames_tagged], 426dc9477beSmrg[m4_assert([$# <= 2])dnl 427dc9477beSmrg_$0(m4_quote(m4_default([$1], [[, ]])), 428dc9477beSmrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 429dc9477beSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 430dc9477beSmrgm4_define([_lt_decl_varnames_tagged], 431dc9477beSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 432dc9477beSmrg 433dc9477beSmrg 434dc9477beSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 435dc9477beSmrg# ------------------------------------------------ 436dc9477beSmrgm4_define([lt_decl_all_varnames], 437dc9477beSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 438dc9477beSmrg m4_if([$2], [], 439dc9477beSmrg m4_quote(lt_decl_varnames), 440dc9477beSmrg m4_quote(m4_shift($@))))[]dnl 44106c34b88Smrg]) 442dc9477beSmrgm4_define([_lt_decl_all_varnames], 443dc9477beSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 444dc9477beSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 44506c34b88Smrg]) 446c27c18e8Smrg 44737eb1ca1Smrg 448dc9477beSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 449dc9477beSmrg# ------------------------------------ 45044584a44Smrg# Quote a variable value, and forward it to 'config.status' so that its 45144584a44Smrg# declaration there will have the same value as in 'configure'. VARNAME 452dc9477beSmrg# must have a single quote delimited value for this to work. 453dc9477beSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 454dc9477beSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 45506c34b88Smrg 45606c34b88Smrg 457dc9477beSmrg# _LT_CONFIG_STATUS_DECLARATIONS 458dc9477beSmrg# ------------------------------ 459dc9477beSmrg# We delimit libtool config variables with single quotes, so when 460dc9477beSmrg# we write them to config.status, we have to be sure to quote all 461dc9477beSmrg# embedded single quotes properly. In configure, this macro expands 462dc9477beSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 463dc9477beSmrg# 464dc9477beSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 465dc9477beSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 466dc9477beSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 467dc9477beSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 46806c34b88Smrg 46906c34b88Smrg 470dc9477beSmrg# _LT_LIBTOOL_TAGS 471dc9477beSmrg# ---------------- 472dc9477beSmrg# Output comment and list of tags supported by the script 473dc9477beSmrgm4_defun([_LT_LIBTOOL_TAGS], 474dc9477beSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 47544584a44Smrgavailable_tags='_LT_TAGS'dnl 476dc9477beSmrg]) 47706c34b88Smrg 47806c34b88Smrg 479dc9477beSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 480dc9477beSmrg# ----------------------------------- 481dc9477beSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 482dc9477beSmrg# expand to a commented shell variable setting: 48306c34b88Smrg# 484dc9477beSmrg# # Some comment about what VAR is for. 485dc9477beSmrg# visible_name=$lt_internal_name 486dc9477beSmrgm4_define([_LT_LIBTOOL_DECLARE], 487dc9477beSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 488dc9477beSmrg [description])))[]dnl 489dc9477beSmrgm4_pushdef([_libtool_name], 490dc9477beSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 491dc9477beSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 492dc9477beSmrg [0], [_libtool_name=[$]$1], 493dc9477beSmrg [1], [_libtool_name=$lt_[]$1], 494dc9477beSmrg [2], [_libtool_name=$lt_[]$1], 495dc9477beSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 496dc9477beSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 497dc9477beSmrg]) 49806c34b88Smrg 49906c34b88Smrg 500dc9477beSmrg# _LT_LIBTOOL_CONFIG_VARS 501dc9477beSmrg# ----------------------- 502dc9477beSmrg# Produce commented declarations of non-tagged libtool config variables 50344584a44Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' 504dc9477beSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 505dc9477beSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 506dc9477beSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 507dc9477beSmrg[m4_foreach([_lt_var], 508dc9477beSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 509dc9477beSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 51006c34b88Smrg 51106c34b88Smrg 512dc9477beSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 513dc9477beSmrg# ------------------------- 514dc9477beSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 515dc9477beSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 516dc9477beSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 51706c34b88Smrg 51806c34b88Smrg 519dc9477beSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 520dc9477beSmrg# ------------------------------ 521dc9477beSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 52206c34b88Smrg 52306c34b88Smrg 524dc9477beSmrg# _LT_CONFIG_COMMANDS 525dc9477beSmrg# ------------------- 526dc9477beSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 527dc9477beSmrg# variables for single and double quote escaping we saved from calls 528dc9477beSmrg# to _LT_DECL, we can put quote escaped variables declarations 52944584a44Smrg# into 'config.status', and then the shell code to quote escape them in 53044584a44Smrg# for loops in 'config.status'. Finally, any additional code accumulated 531dc9477beSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 532dc9477beSmrgm4_defun([_LT_CONFIG_COMMANDS], 533dc9477beSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 534dc9477beSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 535dc9477beSmrg dnl instead of duplicating it all over again into config.status, 536dc9477beSmrg dnl then we will have config.status run $CONFIG_LT later, so it 537dc9477beSmrg dnl needs to know what name is stored there: 538dc9477beSmrg [AC_CONFIG_COMMANDS([libtool], 539dc9477beSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 540dc9477beSmrg dnl If the libtool generation code is destined for config.status, 541dc9477beSmrg dnl expand the accumulated commands and init code now: 542dc9477beSmrg [AC_CONFIG_COMMANDS([libtool], 543dc9477beSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 544dc9477beSmrg])#_LT_CONFIG_COMMANDS 545c27c18e8Smrg 546c27c18e8Smrg 547dc9477beSmrg# Initialize. 548dc9477beSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 549dc9477beSmrg[ 550c27c18e8Smrg 551dc9477beSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 552dc9477beSmrg# if CDPATH is set. 553dc9477beSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 554c27c18e8Smrg 555dc9477beSmrgsed_quote_subst='$sed_quote_subst' 556dc9477beSmrgdouble_quote_subst='$double_quote_subst' 557dc9477beSmrgdelay_variable_subst='$delay_variable_subst' 558dc9477beSmrg_LT_CONFIG_STATUS_DECLARATIONS 559dc9477beSmrgLTCC='$LTCC' 560dc9477beSmrgLTCFLAGS='$LTCFLAGS' 561dc9477beSmrgcompiler='$compiler_DEFAULT' 562c27c18e8Smrg 563dc9477beSmrg# A function that is used when there is no print builtin or printf. 564dc9477beSmrgfunc_fallback_echo () 565dc9477beSmrg{ 566dc9477beSmrg eval 'cat <<_LTECHO_EOF 567dc9477beSmrg\$[]1 568dc9477beSmrg_LTECHO_EOF' 569dc9477beSmrg} 570c27c18e8Smrg 571dc9477beSmrg# Quote evaled strings. 572dc9477beSmrgfor var in lt_decl_all_varnames([[ \ 573dc9477beSmrg]], lt_decl_quote_varnames); do 574dc9477beSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 575dc9477beSmrg *[[\\\\\\\`\\"\\\$]]*) 57644584a44Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 577dc9477beSmrg ;; 578dc9477beSmrg *) 579dc9477beSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 580dc9477beSmrg ;; 581dc9477beSmrg esac 582dc9477beSmrgdone 583c27c18e8Smrg 584dc9477beSmrg# Double-quote double-evaled strings. 585dc9477beSmrgfor var in lt_decl_all_varnames([[ \ 586dc9477beSmrg]], lt_decl_dquote_varnames); do 587dc9477beSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 588dc9477beSmrg *[[\\\\\\\`\\"\\\$]]*) 58944584a44Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes 590dc9477beSmrg ;; 591dc9477beSmrg *) 592dc9477beSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 593dc9477beSmrg ;; 594dc9477beSmrg esac 595dc9477beSmrgdone 596c27c18e8Smrg 597dc9477beSmrg_LT_OUTPUT_LIBTOOL_INIT 59806c34b88Smrg]) 599c27c18e8Smrg 600dc9477beSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 601dc9477beSmrg# ------------------------------------ 602dc9477beSmrg# Generate a child script FILE with all initialization necessary to 603dc9477beSmrg# reuse the environment learned by the parent script, and make the 604dc9477beSmrg# file executable. If COMMENT is supplied, it is inserted after the 60544584a44Smrg# '#!' sequence but before initialization text begins. After this 606dc9477beSmrg# macro, additional text can be appended to FILE to form the body of 607dc9477beSmrg# the child script. The macro ends with non-zero status if the 608dc9477beSmrg# file could not be fully written (such as if the disk is full). 609dc9477beSmrgm4_ifdef([AS_INIT_GENERATED], 610dc9477beSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 611dc9477beSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 612dc9477beSmrg[m4_require([AS_PREPARE])]dnl 613dc9477beSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 614dc9477beSmrg[lt_write_fail=0 615dc9477beSmrgcat >$1 <<_ASEOF || lt_write_fail=1 616dc9477beSmrg#! $SHELL 617dc9477beSmrg# Generated by $as_me. 618dc9477beSmrg$2 619dc9477beSmrgSHELL=\${CONFIG_SHELL-$SHELL} 620dc9477beSmrgexport SHELL 621dc9477beSmrg_ASEOF 622dc9477beSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 623dc9477beSmrgAS_SHELL_SANITIZE 624dc9477beSmrg_AS_PREPARE 625dc9477beSmrgexec AS_MESSAGE_FD>&1 626dc9477beSmrg_ASEOF 62744584a44Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl 628dc9477beSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 629c27c18e8Smrg 630dc9477beSmrg# LT_OUTPUT 631dc9477beSmrg# --------- 632dc9477beSmrg# This macro allows early generation of the libtool script (before 633dc9477beSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 634dc9477beSmrg# tests. 635dc9477beSmrgAC_DEFUN([LT_OUTPUT], 636dc9477beSmrg[: ${CONFIG_LT=./config.lt} 637dc9477beSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 638dc9477beSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 639dc9477beSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 640c27c18e8Smrg 641dc9477beSmrgcat >>"$CONFIG_LT" <<\_LTEOF 642dc9477beSmrglt_cl_silent=false 643dc9477beSmrgexec AS_MESSAGE_LOG_FD>>config.log 644dc9477beSmrg{ 645dc9477beSmrg echo 646dc9477beSmrg AS_BOX([Running $as_me.]) 647dc9477beSmrg} >&AS_MESSAGE_LOG_FD 648c27c18e8Smrg 649dc9477beSmrglt_cl_help="\ 65044584a44Smrg'$as_me' creates a local libtool stub from the current configuration, 651dc9477beSmrgfor use in further configure time tests before the real libtool is 652dc9477beSmrggenerated. 653c27c18e8Smrg 654dc9477beSmrgUsage: $[0] [[OPTIONS]] 655c27c18e8Smrg 656dc9477beSmrg -h, --help print this help, then exit 657dc9477beSmrg -V, --version print version number, then exit 658dc9477beSmrg -q, --quiet do not print progress messages 659dc9477beSmrg -d, --debug don't remove temporary files 660c27c18e8Smrg 661dc9477beSmrgReport bugs to <bug-libtool@gnu.org>." 662c27c18e8Smrg 663dc9477beSmrglt_cl_version="\ 664dc9477beSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 665dc9477beSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 666dc9477beSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 667c27c18e8Smrg 668dc9477beSmrgCopyright (C) 2011 Free Software Foundation, Inc. 669dc9477beSmrgThis config.lt script is free software; the Free Software Foundation 670dc9477beSmrggives unlimited permision to copy, distribute and modify it." 671dc9477beSmrg 67244584a44Smrgwhile test 0 != $[#] 673dc9477beSmrgdo 674dc9477beSmrg case $[1] in 675dc9477beSmrg --version | --v* | -V ) 676dc9477beSmrg echo "$lt_cl_version"; exit 0 ;; 677dc9477beSmrg --help | --h* | -h ) 678dc9477beSmrg echo "$lt_cl_help"; exit 0 ;; 679dc9477beSmrg --debug | --d* | -d ) 680dc9477beSmrg debug=: ;; 681dc9477beSmrg --quiet | --q* | --silent | --s* | -q ) 682dc9477beSmrg lt_cl_silent=: ;; 683c27c18e8Smrg 684dc9477beSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 68544584a44SmrgTry '$[0] --help' for more information.]) ;; 686c27c18e8Smrg 687dc9477beSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 68844584a44SmrgTry '$[0] --help' for more information.]) ;; 68906c34b88Smrg esac 690dc9477beSmrg shift 69106c34b88Smrgdone 692c27c18e8Smrg 693dc9477beSmrgif $lt_cl_silent; then 694dc9477beSmrg exec AS_MESSAGE_FD>/dev/null 695dc9477beSmrgfi 696dc9477beSmrg_LTEOF 697c27c18e8Smrg 698dc9477beSmrgcat >>"$CONFIG_LT" <<_LTEOF 699dc9477beSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 700dc9477beSmrg_LTEOF 701c27c18e8Smrg 702dc9477beSmrgcat >>"$CONFIG_LT" <<\_LTEOF 703dc9477beSmrgAC_MSG_NOTICE([creating $ofile]) 704dc9477beSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 705dc9477beSmrgAS_EXIT(0) 706dc9477beSmrg_LTEOF 707dc9477beSmrgchmod +x "$CONFIG_LT" 708c27c18e8Smrg 709dc9477beSmrg# configure is writing to config.log, but config.lt does its own redirection, 710dc9477beSmrg# appending to config.log, which fails on DOS, as config.log is still kept 711dc9477beSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 712dc9477beSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 713dc9477beSmrglt_cl_success=: 71444584a44Smrgtest yes = "$silent" && 715dc9477beSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 716dc9477beSmrgexec AS_MESSAGE_LOG_FD>/dev/null 717dc9477beSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 718dc9477beSmrgexec AS_MESSAGE_LOG_FD>>config.log 719dc9477beSmrg$lt_cl_success || AS_EXIT(1) 720dc9477beSmrg])# LT_OUTPUT 72106c34b88Smrg 72206c34b88Smrg 723dc9477beSmrg# _LT_CONFIG(TAG) 724dc9477beSmrg# --------------- 725dc9477beSmrg# If TAG is the built-in tag, create an initial libtool script with a 726dc9477beSmrg# default configuration from the untagged config vars. Otherwise add code 727dc9477beSmrg# to config.status for appending the configuration named by TAG from the 728dc9477beSmrg# matching tagged config vars. 729dc9477beSmrgm4_defun([_LT_CONFIG], 730dc9477beSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 731dc9477beSmrg_LT_CONFIG_SAVE_COMMANDS([ 732dc9477beSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 733dc9477beSmrg m4_if(_LT_TAG, [C], [ 73444584a44Smrg # See if we are running on zsh, and set the options that allow our 735dc9477beSmrg # commands through without removal of \ escapes. 73644584a44Smrg if test -n "${ZSH_VERSION+set}"; then 737dc9477beSmrg setopt NO_GLOB_SUBST 738dc9477beSmrg fi 739c27c18e8Smrg 74044584a44Smrg cfgfile=${ofile}T 741dc9477beSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 742dc9477beSmrg $RM "$cfgfile" 743c27c18e8Smrg 744dc9477beSmrg cat <<_LT_EOF >> "$cfgfile" 745dc9477beSmrg#! $SHELL 74644584a44Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION 747dc9477beSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 748dc9477beSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 74944584a44Smrg 75044584a44Smrg# Provide generalized library-building support services. 75144584a44Smrg# Written by Gordon Matzigkeit, 1996 75244584a44Smrg 753dc9477beSmrg_LT_COPYING 754dc9477beSmrg_LT_LIBTOOL_TAGS 755c27c18e8Smrg 75644584a44Smrg# Configured defaults for sys_lib_dlsearch_path munging. 75744584a44Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} 75844584a44Smrg 759dc9477beSmrg# ### BEGIN LIBTOOL CONFIG 760dc9477beSmrg_LT_LIBTOOL_CONFIG_VARS 761dc9477beSmrg_LT_LIBTOOL_TAG_VARS 762dc9477beSmrg# ### END LIBTOOL CONFIG 763c27c18e8Smrg 76444584a44Smrg_LT_EOF 76544584a44Smrg 76644584a44Smrg cat <<'_LT_EOF' >> "$cfgfile" 76744584a44Smrg 76844584a44Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE 76944584a44Smrg 77044584a44Smrg_LT_PREPARE_MUNGE_PATH_LIST 77144584a44Smrg_LT_PREPARE_CC_BASENAME 77244584a44Smrg 77344584a44Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE 77444584a44Smrg 775dc9477beSmrg_LT_EOF 776c27c18e8Smrg 777dc9477beSmrg case $host_os in 778dc9477beSmrg aix3*) 779dc9477beSmrg cat <<\_LT_EOF >> "$cfgfile" 780dc9477beSmrg# AIX sometimes has problems with the GCC collect2 program. For some 781dc9477beSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 782dc9477beSmrg# vanish in a puff of smoke. 78344584a44Smrgif test set != "${COLLECT_NAMES+set}"; then 784dc9477beSmrg COLLECT_NAMES= 785dc9477beSmrg export COLLECT_NAMES 786dc9477beSmrgfi 787dc9477beSmrg_LT_EOF 788dc9477beSmrg ;; 789dc9477beSmrg esac 790c27c18e8Smrg 791dc9477beSmrg _LT_PROG_LTMAIN 792c27c18e8Smrg 793dc9477beSmrg # We use sed instead of cat because bash on DJGPP gets confused if 794dc9477beSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 795dc9477beSmrg # text mode, it properly converts lines to CR/LF. This bash problem 796dc9477beSmrg # is reportedly fixed, but why not run on old versions too? 797dc9477beSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 798dc9477beSmrg || (rm -f "$cfgfile"; exit 1) 799c27c18e8Smrg 800dc9477beSmrg mv -f "$cfgfile" "$ofile" || 801dc9477beSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 802dc9477beSmrg chmod +x "$ofile" 803dc9477beSmrg], 804dc9477beSmrg[cat <<_LT_EOF >> "$ofile" 805c27c18e8Smrg 806dc9477beSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 807dc9477beSmrgdnl in a comment (ie after a #). 808dc9477beSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 809dc9477beSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 810dc9477beSmrg# ### END LIBTOOL TAG CONFIG: $1 811dc9477beSmrg_LT_EOF 812dc9477beSmrg])dnl /m4_if 813dc9477beSmrg], 814dc9477beSmrg[m4_if([$1], [], [ 815dc9477beSmrg PACKAGE='$PACKAGE' 816dc9477beSmrg VERSION='$VERSION' 817dc9477beSmrg RM='$RM' 818dc9477beSmrg ofile='$ofile'], []) 819dc9477beSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 820dc9477beSmrg])# _LT_CONFIG 821c27c18e8Smrg 822c27c18e8Smrg 823dc9477beSmrg# LT_SUPPORTED_TAG(TAG) 824dc9477beSmrg# --------------------- 825dc9477beSmrg# Trace this macro to discover what tags are supported by the libtool 826dc9477beSmrg# --tag option, using: 827dc9477beSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 828dc9477beSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 829c27c18e8Smrg 830c27c18e8Smrg 831dc9477beSmrg# C support is built-in for now 832dc9477beSmrgm4_define([_LT_LANG_C_enabled], []) 833dc9477beSmrgm4_define([_LT_TAGS], []) 834c27c18e8Smrg 835c27c18e8Smrg 836dc9477beSmrg# LT_LANG(LANG) 837dc9477beSmrg# ------------- 838dc9477beSmrg# Enable libtool support for the given language if not already enabled. 839dc9477beSmrgAC_DEFUN([LT_LANG], 840dc9477beSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 841dc9477beSmrgm4_case([$1], 842dc9477beSmrg [C], [_LT_LANG(C)], 843dc9477beSmrg [C++], [_LT_LANG(CXX)], 844dc9477beSmrg [Go], [_LT_LANG(GO)], 845dc9477beSmrg [Java], [_LT_LANG(GCJ)], 846dc9477beSmrg [Fortran 77], [_LT_LANG(F77)], 847dc9477beSmrg [Fortran], [_LT_LANG(FC)], 848dc9477beSmrg [Windows Resource], [_LT_LANG(RC)], 849dc9477beSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 850dc9477beSmrg [_LT_LANG($1)], 851dc9477beSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 852dc9477beSmrg])# LT_LANG 853c27c18e8Smrg 854c43cc173Smrg 855dc9477beSmrg# _LT_LANG(LANGNAME) 856dc9477beSmrg# ------------------ 857dc9477beSmrgm4_defun([_LT_LANG], 858dc9477beSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 859dc9477beSmrg [LT_SUPPORTED_TAG([$1])dnl 860dc9477beSmrg m4_append([_LT_TAGS], [$1 ])dnl 861dc9477beSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 862dc9477beSmrg _LT_LANG_$1_CONFIG($1)])dnl 863dc9477beSmrg])# _LT_LANG 864c27c18e8Smrg 865c43cc173Smrg 866dc9477beSmrgm4_ifndef([AC_PROG_GO], [ 867dc9477beSmrg# NOTE: This macro has been submitted for inclusion into # 868dc9477beSmrg# GNU Autoconf as AC_PROG_GO. When it is available in # 869dc9477beSmrg# a released version of Autoconf we should remove this # 870dc9477beSmrg# macro and use it instead. # 871dc9477beSmrgm4_defun([AC_PROG_GO], 872dc9477beSmrg[AC_LANG_PUSH(Go)dnl 873dc9477beSmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 874dc9477beSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 875dc9477beSmrg_AC_ARG_VAR_LDFLAGS()dnl 876dc9477beSmrgAC_CHECK_TOOL(GOC, gccgo) 877dc9477beSmrgif test -z "$GOC"; then 878dc9477beSmrg if test -n "$ac_tool_prefix"; then 879dc9477beSmrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 880dc9477beSmrg fi 881dc9477beSmrgfi 882dc9477beSmrgif test -z "$GOC"; then 883dc9477beSmrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 884dc9477beSmrgfi 885dc9477beSmrg])#m4_defun 886dc9477beSmrg])#m4_ifndef 887c43cc173Smrg 888c43cc173Smrg 889dc9477beSmrg# _LT_LANG_DEFAULT_CONFIG 890dc9477beSmrg# ----------------------- 891dc9477beSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 892dc9477beSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 893dc9477beSmrg [LT_LANG(CXX)], 894dc9477beSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 895c43cc173Smrg 896dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 897dc9477beSmrg [LT_LANG(F77)], 898dc9477beSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 899c43cc173Smrg 900dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 901dc9477beSmrg [LT_LANG(FC)], 902dc9477beSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 903c43cc173Smrg 904dc9477beSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 905dc9477beSmrgdnl pulling things in needlessly. 906dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 907dc9477beSmrg [LT_LANG(GCJ)], 908dc9477beSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 909dc9477beSmrg [LT_LANG(GCJ)], 910dc9477beSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 911dc9477beSmrg [LT_LANG(GCJ)], 912dc9477beSmrg [m4_ifdef([AC_PROG_GCJ], 913dc9477beSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 914dc9477beSmrg m4_ifdef([A][M_PROG_GCJ], 915dc9477beSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 916dc9477beSmrg m4_ifdef([LT_PROG_GCJ], 917dc9477beSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 918c43cc173Smrg 919dc9477beSmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 920dc9477beSmrg [LT_LANG(GO)], 921dc9477beSmrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 92221e67964Smrg 923dc9477beSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 924dc9477beSmrg [LT_LANG(RC)], 925dc9477beSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 926dc9477beSmrg])# _LT_LANG_DEFAULT_CONFIG 927f1ee322dSmrg 928dc9477beSmrg# Obsolete macros: 929dc9477beSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 930dc9477beSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 931dc9477beSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 932dc9477beSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 933dc9477beSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 934dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 935dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 936dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 937dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 938dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 939dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 940f1ee322dSmrg 941c43cc173Smrg 942dc9477beSmrg# _LT_TAG_COMPILER 943dc9477beSmrg# ---------------- 944dc9477beSmrgm4_defun([_LT_TAG_COMPILER], 945dc9477beSmrg[AC_REQUIRE([AC_PROG_CC])dnl 946c27c18e8Smrg 947dc9477beSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 948dc9477beSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 949dc9477beSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 950dc9477beSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 95106c34b88Smrg 952dc9477beSmrg# If no C compiler was specified, use CC. 953dc9477beSmrgLTCC=${LTCC-"$CC"} 95406c34b88Smrg 955dc9477beSmrg# If no C compiler flags were specified, use CFLAGS. 956dc9477beSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 95706c34b88Smrg 958dc9477beSmrg# Allow CC to be a program name with arguments. 959dc9477beSmrgcompiler=$CC 960dc9477beSmrg])# _LT_TAG_COMPILER 96106c34b88Smrg 962c27c18e8Smrg 963dc9477beSmrg# _LT_COMPILER_BOILERPLATE 964dc9477beSmrg# ------------------------ 965dc9477beSmrg# Check for compiler boilerplate output or warnings with 966dc9477beSmrg# the simple compiler test code. 967dc9477beSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 968dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 969dc9477beSmrgac_outfile=conftest.$ac_objext 970dc9477beSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 971dc9477beSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 972dc9477beSmrg_lt_compiler_boilerplate=`cat conftest.err` 973dc9477beSmrg$RM conftest* 974dc9477beSmrg])# _LT_COMPILER_BOILERPLATE 975c43cc173Smrg 976c43cc173Smrg 977dc9477beSmrg# _LT_LINKER_BOILERPLATE 978dc9477beSmrg# ---------------------- 979dc9477beSmrg# Check for linker boilerplate output or warnings with 980dc9477beSmrg# the simple link test code. 981dc9477beSmrgm4_defun([_LT_LINKER_BOILERPLATE], 982dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 983dc9477beSmrgac_outfile=conftest.$ac_objext 984dc9477beSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 985dc9477beSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 986dc9477beSmrg_lt_linker_boilerplate=`cat conftest.err` 987dc9477beSmrg$RM -r conftest* 988dc9477beSmrg])# _LT_LINKER_BOILERPLATE 98937eb1ca1Smrg 990dc9477beSmrg# _LT_REQUIRED_DARWIN_CHECKS 991dc9477beSmrg# ------------------------- 992dc9477beSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 993dc9477beSmrg case $host_os in 994dc9477beSmrg rhapsody* | darwin*) 995dc9477beSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 996dc9477beSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 997dc9477beSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 998dc9477beSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 999dc9477beSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 1000dc9477beSmrg _LT_DECL([], [DSYMUTIL], [1], 1001dc9477beSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 1002dc9477beSmrg _LT_DECL([], [NMEDIT], [1], 1003dc9477beSmrg [Tool to change global to local symbols on Mac OS X]) 1004dc9477beSmrg _LT_DECL([], [LIPO], [1], 1005dc9477beSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 1006dc9477beSmrg _LT_DECL([], [OTOOL], [1], 1007dc9477beSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 1008dc9477beSmrg _LT_DECL([], [OTOOL64], [1], 1009dc9477beSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 1010c43cc173Smrg 1011dc9477beSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 1012dc9477beSmrg [lt_cv_apple_cc_single_mod=no 101344584a44Smrg if test -z "$LT_MULTI_MODULE"; then 1014dc9477beSmrg # By default we will add the -single_module flag. You can override 1015dc9477beSmrg # by either setting the environment variable LT_MULTI_MODULE 1016dc9477beSmrg # non-empty at configure time, or by adding -multi_module to the 1017dc9477beSmrg # link flags. 1018dc9477beSmrg rm -rf libconftest.dylib* 1019dc9477beSmrg echo "int foo(void){return 1;}" > conftest.c 1020dc9477beSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1021dc9477beSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1022dc9477beSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1023dc9477beSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1024dc9477beSmrg _lt_result=$? 1025dc9477beSmrg # If there is a non-empty error log, and "single_module" 1026dc9477beSmrg # appears in it, assume the flag caused a linker warning 1027dc9477beSmrg if test -s conftest.err && $GREP single_module conftest.err; then 1028dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1029dc9477beSmrg # Otherwise, if the output was created with a 0 exit code from 1030dc9477beSmrg # the compiler, it worked. 103144584a44Smrg elif test -f libconftest.dylib && test 0 = "$_lt_result"; then 1032dc9477beSmrg lt_cv_apple_cc_single_mod=yes 1033dc9477beSmrg else 1034dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1035dc9477beSmrg fi 1036dc9477beSmrg rm -rf libconftest.dylib* 1037dc9477beSmrg rm -f conftest.* 1038dc9477beSmrg fi]) 1039c43cc173Smrg 1040dc9477beSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 1041dc9477beSmrg [lt_cv_ld_exported_symbols_list], 1042dc9477beSmrg [lt_cv_ld_exported_symbols_list=no 1043dc9477beSmrg save_LDFLAGS=$LDFLAGS 1044dc9477beSmrg echo "_main" > conftest.sym 1045dc9477beSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 1046dc9477beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1047dc9477beSmrg [lt_cv_ld_exported_symbols_list=yes], 1048dc9477beSmrg [lt_cv_ld_exported_symbols_list=no]) 104944584a44Smrg LDFLAGS=$save_LDFLAGS 1050dc9477beSmrg ]) 1051c43cc173Smrg 1052dc9477beSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1053dc9477beSmrg [lt_cv_ld_force_load=no 1054dc9477beSmrg cat > conftest.c << _LT_EOF 1055dc9477beSmrgint forced_loaded() { return 2;} 1056dc9477beSmrg_LT_EOF 1057dc9477beSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1058dc9477beSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1059dc9477beSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1060dc9477beSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1061dc9477beSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1062dc9477beSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1063dc9477beSmrg cat > conftest.c << _LT_EOF 1064dc9477beSmrgint main() { return 0;} 1065dc9477beSmrg_LT_EOF 1066dc9477beSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1067dc9477beSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1068dc9477beSmrg _lt_result=$? 1069dc9477beSmrg if test -s conftest.err && $GREP force_load conftest.err; then 1070dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 107144584a44Smrg elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then 1072dc9477beSmrg lt_cv_ld_force_load=yes 1073dc9477beSmrg else 1074dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1075dc9477beSmrg fi 1076dc9477beSmrg rm -f conftest.err libconftest.a conftest conftest.c 1077dc9477beSmrg rm -rf conftest.dSYM 1078dc9477beSmrg ]) 1079dc9477beSmrg case $host_os in 1080dc9477beSmrg rhapsody* | darwin1.[[012]]) 108144584a44Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; 1082dc9477beSmrg darwin1.*) 108344584a44Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1084dc9477beSmrg darwin*) # darwin 5.x on 1085dc9477beSmrg # if running on 10.5 or later, the deployment target defaults 1086dc9477beSmrg # to the OS version, if on x86, and 10.4, the deployment 1087dc9477beSmrg # target defaults to 10.4. Don't you love it? 1088dc9477beSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1089dc9477beSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 109044584a44Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 109144584a44Smrg 10.[[012]][[,.]]*) 109244584a44Smrg _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 1093dc9477beSmrg 10.*) 109444584a44Smrg _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 1095dc9477beSmrg esac 1096dc9477beSmrg ;; 1097dc9477beSmrg esac 109844584a44Smrg if test yes = "$lt_cv_apple_cc_single_mod"; then 1099dc9477beSmrg _lt_dar_single_mod='$single_module' 1100dc9477beSmrg fi 110144584a44Smrg if test yes = "$lt_cv_ld_exported_symbols_list"; then 110244584a44Smrg _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' 1103dc9477beSmrg else 110444584a44Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' 1105dc9477beSmrg fi 110644584a44Smrg if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then 1107dc9477beSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 1108dc9477beSmrg else 1109dc9477beSmrg _lt_dsymutil= 1110dc9477beSmrg fi 1111dc9477beSmrg ;; 1112dc9477beSmrg esac 111306c34b88Smrg]) 1114c43cc173Smrg 1115c43cc173Smrg 1116dc9477beSmrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 1117dc9477beSmrg# --------------------------------- 1118dc9477beSmrg# Checks for linker and compiler features on darwin 1119dc9477beSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1120dc9477beSmrg[ 1121dc9477beSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1122dc9477beSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1123dc9477beSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1124dc9477beSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1125dc9477beSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 112644584a44Smrg if test yes = "$lt_cv_ld_force_load"; then 112744584a44Smrg _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\"`' 1128dc9477beSmrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 1129dc9477beSmrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1130dc9477beSmrg else 1131dc9477beSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1132dc9477beSmrg fi 1133dc9477beSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 113444584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined 1135dc9477beSmrg case $cc_basename in 113644584a44Smrg ifort*|nagfor*) _lt_dar_can_shared=yes ;; 1137dc9477beSmrg *) _lt_dar_can_shared=$GCC ;; 1138dc9477beSmrg esac 113944584a44Smrg if test yes = "$_lt_dar_can_shared"; then 1140dc9477beSmrg output_verbose_link_cmd=func_echo_all 114144584a44Smrg _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" 114244584a44Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" 114344584a44Smrg _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" 114444584a44Smrg _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" 1145dc9477beSmrg m4_if([$1], [CXX], 114644584a44Smrg[ if test yes != "$lt_cv_apple_cc_single_mod"; then 114744584a44Smrg _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" 114844584a44Smrg _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" 1149dc9477beSmrg fi 1150dc9477beSmrg],[]) 1151dc9477beSmrg else 1152dc9477beSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1153dc9477beSmrg fi 1154dc9477beSmrg]) 1155c43cc173Smrg 1156dc9477beSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1157dc9477beSmrg# ---------------------------------- 1158dc9477beSmrg# Links a minimal program and checks the executable 1159dc9477beSmrg# for the system default hardcoded library path. In most cases, 1160dc9477beSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1161dc9477beSmrg# the location of the communication and MPI libs are included too. 1162dc9477beSmrg# If we don't find anything, use the default library path according 1163dc9477beSmrg# to the aix ld manual. 1164dc9477beSmrg# Store the results from the different compilers for each TAGNAME. 1165dc9477beSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1166dc9477beSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1167dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 116844584a44Smrgif test set = "${lt_cv_aix_libpath+set}"; then 1169dc9477beSmrg aix_libpath=$lt_cv_aix_libpath 1170dc9477beSmrgelse 1171dc9477beSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1172dc9477beSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1173dc9477beSmrg lt_aix_libpath_sed='[ 1174dc9477beSmrg /Import File Strings/,/^$/ { 1175dc9477beSmrg /^0/ { 1176dc9477beSmrg s/^0 *\([^ ]*\) *$/\1/ 1177dc9477beSmrg p 1178dc9477beSmrg } 1179dc9477beSmrg }]' 1180dc9477beSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1181dc9477beSmrg # Check for a 64-bit object if we didn't find anything. 1182dc9477beSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1183dc9477beSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1184dc9477beSmrg fi],[]) 1185dc9477beSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 118644584a44Smrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib 1187dc9477beSmrg fi 1188dc9477beSmrg ]) 1189dc9477beSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1190dc9477beSmrgfi 1191dc9477beSmrg])# _LT_SYS_MODULE_PATH_AIX 1192c43cc173Smrg 1193b789ec8aSmrg 1194dc9477beSmrg# _LT_SHELL_INIT(ARG) 1195dc9477beSmrg# ------------------- 1196dc9477beSmrgm4_define([_LT_SHELL_INIT], 1197dc9477beSmrg[m4_divert_text([M4SH-INIT], [$1 1198dc9477beSmrg])])# _LT_SHELL_INIT 1199b789ec8aSmrg 1200b789ec8aSmrg 1201c43cc173Smrg 1202dc9477beSmrg# _LT_PROG_ECHO_BACKSLASH 120306c34b88Smrg# ----------------------- 1204dc9477beSmrg# Find how we can fake an echo command that does not interpret backslash. 1205dc9477beSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 120644584a44Smrg# of the generated configure script that will find a shell with a builtin 120744584a44Smrg# printf (that we can use as an echo command). 1208dc9477beSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1209dc9477beSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1210dc9477beSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1211dc9477beSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1212c43cc173Smrg 1213dc9477beSmrgAC_MSG_CHECKING([how to print strings]) 1214dc9477beSmrg# Test print first, because it will be a builtin if present. 1215dc9477beSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1216dc9477beSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1217dc9477beSmrg ECHO='print -r --' 1218dc9477beSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1219dc9477beSmrg ECHO='printf %s\n' 1220dc9477beSmrgelse 1221dc9477beSmrg # Use this function as a fallback that always works. 1222dc9477beSmrg func_fallback_echo () 1223dc9477beSmrg { 1224dc9477beSmrg eval 'cat <<_LTECHO_EOF 1225dc9477beSmrg$[]1 1226dc9477beSmrg_LTECHO_EOF' 1227dc9477beSmrg } 1228dc9477beSmrg ECHO='func_fallback_echo' 1229dc9477beSmrgfi 1230c43cc173Smrg 1231dc9477beSmrg# func_echo_all arg... 1232dc9477beSmrg# Invoke $ECHO with all args, space-separated. 1233dc9477beSmrgfunc_echo_all () 1234dc9477beSmrg{ 123544584a44Smrg $ECHO "$*" 1236dc9477beSmrg} 1237c27c18e8Smrg 123844584a44Smrgcase $ECHO in 1239dc9477beSmrg printf*) AC_MSG_RESULT([printf]) ;; 1240dc9477beSmrg print*) AC_MSG_RESULT([print -r]) ;; 1241dc9477beSmrg *) AC_MSG_RESULT([cat]) ;; 1242dc9477beSmrgesac 1243c27c18e8Smrg 1244dc9477beSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1245dc9477beSmrg[_AS_DETECT_SUGGESTED([ 1246dc9477beSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1247dc9477beSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1248dc9477beSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1249dc9477beSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1250dc9477beSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1251dc9477beSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1252dc9477beSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 1253b789ec8aSmrg 1254dc9477beSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1255dc9477beSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1256dc9477beSmrg])# _LT_PROG_ECHO_BACKSLASH 1257b789ec8aSmrg 1258b789ec8aSmrg 1259dc9477beSmrg# _LT_WITH_SYSROOT 1260dc9477beSmrg# ---------------- 1261dc9477beSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1262dc9477beSmrg[AC_MSG_CHECKING([for sysroot]) 1263dc9477beSmrgAC_ARG_WITH([sysroot], 126444584a44Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], 126544584a44Smrg [Search for dependent libraries within DIR (or the compiler's sysroot 126644584a44Smrg if not specified).])], 1267dc9477beSmrg[], [with_sysroot=no]) 1268b789ec8aSmrg 1269dc9477beSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1270dc9477beSmrgdnl in case the user passed a directory name. 1271dc9477beSmrglt_sysroot= 127244584a44Smrgcase $with_sysroot in #( 1273dc9477beSmrg yes) 127444584a44Smrg if test yes = "$GCC"; then 1275dc9477beSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1276dc9477beSmrg fi 1277dc9477beSmrg ;; #( 1278dc9477beSmrg /*) 1279dc9477beSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1280dc9477beSmrg ;; #( 1281dc9477beSmrg no|'') 1282dc9477beSmrg ;; #( 1283dc9477beSmrg *) 128444584a44Smrg AC_MSG_RESULT([$with_sysroot]) 1285dc9477beSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1286dc9477beSmrg ;; 1287dc9477beSmrgesac 1288c27c18e8Smrg 1289dc9477beSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1290dc9477beSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 129144584a44Smrg[dependent libraries, and where our libraries should be installed.])]) 1292c27c18e8Smrg 1293dc9477beSmrg# _LT_ENABLE_LOCK 1294dc9477beSmrg# --------------- 1295dc9477beSmrgm4_defun([_LT_ENABLE_LOCK], 1296dc9477beSmrg[AC_ARG_ENABLE([libtool-lock], 1297dc9477beSmrg [AS_HELP_STRING([--disable-libtool-lock], 1298dc9477beSmrg [avoid locking (might break parallel builds)])]) 129944584a44Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes 1300c27c18e8Smrg 1301dc9477beSmrg# Some flags need to be propagated to the compiler or linker for good 1302dc9477beSmrg# libtool support. 1303dc9477beSmrgcase $host in 1304dc9477beSmrgia64-*-hpux*) 130544584a44Smrg # Find out what ABI is being produced by ac_compile, and set mode 130644584a44Smrg # options accordingly. 1307dc9477beSmrg echo 'int i;' > conftest.$ac_ext 1308dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 1309dc9477beSmrg case `/usr/bin/file conftest.$ac_objext` in 1310dc9477beSmrg *ELF-32*) 131144584a44Smrg HPUX_IA64_MODE=32 1312dc9477beSmrg ;; 1313dc9477beSmrg *ELF-64*) 131444584a44Smrg HPUX_IA64_MODE=64 1315dc9477beSmrg ;; 131606c34b88Smrg esac 1317dc9477beSmrg fi 1318dc9477beSmrg rm -rf conftest* 1319dc9477beSmrg ;; 1320dc9477beSmrg*-*-irix6*) 132144584a44Smrg # Find out what ABI is being produced by ac_compile, and set linker 132244584a44Smrg # options accordingly. 1323dc9477beSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 1324dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 132544584a44Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 1326dc9477beSmrg case `/usr/bin/file conftest.$ac_objext` in 1327dc9477beSmrg *32-bit*) 1328dc9477beSmrg LD="${LD-ld} -melf32bsmip" 1329dc9477beSmrg ;; 1330dc9477beSmrg *N32*) 1331dc9477beSmrg LD="${LD-ld} -melf32bmipn32" 1332dc9477beSmrg ;; 1333dc9477beSmrg *64-bit*) 1334dc9477beSmrg LD="${LD-ld} -melf64bmip" 1335dc9477beSmrg ;; 1336dc9477beSmrg esac 1337dc9477beSmrg else 1338dc9477beSmrg case `/usr/bin/file conftest.$ac_objext` in 1339dc9477beSmrg *32-bit*) 1340dc9477beSmrg LD="${LD-ld} -32" 1341dc9477beSmrg ;; 1342dc9477beSmrg *N32*) 1343dc9477beSmrg LD="${LD-ld} -n32" 1344dc9477beSmrg ;; 1345dc9477beSmrg *64-bit*) 1346dc9477beSmrg LD="${LD-ld} -64" 1347dc9477beSmrg ;; 1348dc9477beSmrg esac 1349dc9477beSmrg fi 1350dc9477beSmrg fi 1351dc9477beSmrg rm -rf conftest* 1352dc9477beSmrg ;; 1353c43cc173Smrg 135444584a44Smrgmips64*-*linux*) 135544584a44Smrg # Find out what ABI is being produced by ac_compile, and set linker 135644584a44Smrg # options accordingly. 135744584a44Smrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 135844584a44Smrg if AC_TRY_EVAL(ac_compile); then 135944584a44Smrg emul=elf 136044584a44Smrg case `/usr/bin/file conftest.$ac_objext` in 136144584a44Smrg *32-bit*) 136244584a44Smrg emul="${emul}32" 136344584a44Smrg ;; 136444584a44Smrg *64-bit*) 136544584a44Smrg emul="${emul}64" 136644584a44Smrg ;; 136744584a44Smrg esac 136844584a44Smrg case `/usr/bin/file conftest.$ac_objext` in 136944584a44Smrg *MSB*) 137044584a44Smrg emul="${emul}btsmip" 137144584a44Smrg ;; 137244584a44Smrg *LSB*) 137344584a44Smrg emul="${emul}ltsmip" 137444584a44Smrg ;; 137544584a44Smrg esac 137644584a44Smrg case `/usr/bin/file conftest.$ac_objext` in 137744584a44Smrg *N32*) 137844584a44Smrg emul="${emul}n32" 137944584a44Smrg ;; 138044584a44Smrg esac 138144584a44Smrg LD="${LD-ld} -m $emul" 138244584a44Smrg fi 138344584a44Smrg rm -rf conftest* 138444584a44Smrg ;; 138544584a44Smrg 1386dc9477beSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ 1387dc9477beSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 138844584a44Smrg # Find out what ABI is being produced by ac_compile, and set linker 138944584a44Smrg # options accordingly. Note that the listed cases only cover the 139044584a44Smrg # situations where additional linker options are needed (such as when 139144584a44Smrg # doing 32-bit compilation for a host where ld defaults to 64-bit, or 139244584a44Smrg # vice versa); the common cases where no linker options are needed do 139344584a44Smrg # not appear in the list. 1394dc9477beSmrg echo 'int i;' > conftest.$ac_ext 1395dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 1396dc9477beSmrg case `/usr/bin/file conftest.o` in 1397dc9477beSmrg *32-bit*) 1398dc9477beSmrg case $host in 1399dc9477beSmrg x86_64-*kfreebsd*-gnu) 1400dc9477beSmrg LD="${LD-ld} -m elf_i386_fbsd" 1401dc9477beSmrg ;; 1402dc9477beSmrg x86_64-*linux*) 140344584a44Smrg case `/usr/bin/file conftest.o` in 140444584a44Smrg *x86-64*) 140544584a44Smrg LD="${LD-ld} -m elf32_x86_64" 140644584a44Smrg ;; 140744584a44Smrg *) 140844584a44Smrg LD="${LD-ld} -m elf_i386" 140944584a44Smrg ;; 141044584a44Smrg esac 1411dc9477beSmrg ;; 1412dc9477beSmrg powerpc64le-*linux*) 1413dc9477beSmrg LD="${LD-ld} -m elf32lppclinux" 1414dc9477beSmrg ;; 1415dc9477beSmrg powerpc64-*linux*) 1416dc9477beSmrg LD="${LD-ld} -m elf32ppclinux" 1417dc9477beSmrg ;; 1418dc9477beSmrg s390x-*linux*) 1419dc9477beSmrg LD="${LD-ld} -m elf_s390" 1420dc9477beSmrg ;; 1421dc9477beSmrg sparc64-*linux*) 1422dc9477beSmrg LD="${LD-ld} -m elf32_sparc" 1423dc9477beSmrg ;; 1424dc9477beSmrg esac 1425dc9477beSmrg ;; 1426dc9477beSmrg *64-bit*) 1427dc9477beSmrg case $host in 1428dc9477beSmrg x86_64-*kfreebsd*-gnu) 1429dc9477beSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1430dc9477beSmrg ;; 1431dc9477beSmrg x86_64-*linux*) 1432dc9477beSmrg LD="${LD-ld} -m elf_x86_64" 1433dc9477beSmrg ;; 1434dc9477beSmrg powerpcle-*linux*) 1435dc9477beSmrg LD="${LD-ld} -m elf64lppc" 1436dc9477beSmrg ;; 1437dc9477beSmrg powerpc-*linux*) 1438dc9477beSmrg LD="${LD-ld} -m elf64ppc" 1439dc9477beSmrg ;; 1440dc9477beSmrg s390*-*linux*|s390*-*tpf*) 1441dc9477beSmrg LD="${LD-ld} -m elf64_s390" 1442dc9477beSmrg ;; 1443dc9477beSmrg sparc*-*linux*) 1444dc9477beSmrg LD="${LD-ld} -m elf64_sparc" 1445dc9477beSmrg ;; 1446dc9477beSmrg esac 1447dc9477beSmrg ;; 144806c34b88Smrg esac 1449dc9477beSmrg fi 1450dc9477beSmrg rm -rf conftest* 1451dc9477beSmrg ;; 1452c43cc173Smrg 1453dc9477beSmrg*-*-sco3.2v5*) 1454dc9477beSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 145544584a44Smrg SAVE_CFLAGS=$CFLAGS 1456dc9477beSmrg CFLAGS="$CFLAGS -belf" 1457dc9477beSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1458dc9477beSmrg [AC_LANG_PUSH(C) 1459dc9477beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1460dc9477beSmrg AC_LANG_POP]) 146144584a44Smrg if test yes != "$lt_cv_cc_needs_belf"; then 1462dc9477beSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 146344584a44Smrg CFLAGS=$SAVE_CFLAGS 1464dc9477beSmrg fi 1465dc9477beSmrg ;; 1466dc9477beSmrg*-*solaris*) 146744584a44Smrg # Find out what ABI is being produced by ac_compile, and set linker 146844584a44Smrg # options accordingly. 1469dc9477beSmrg echo 'int i;' > conftest.$ac_ext 1470dc9477beSmrg if AC_TRY_EVAL(ac_compile); then 1471dc9477beSmrg case `/usr/bin/file conftest.o` in 1472dc9477beSmrg *64-bit*) 1473dc9477beSmrg case $lt_cv_prog_gnu_ld in 1474dc9477beSmrg yes*) 1475dc9477beSmrg case $host in 147644584a44Smrg i?86-*-solaris*|x86_64-*-solaris*) 1477dc9477beSmrg LD="${LD-ld} -m elf_x86_64" 1478dc9477beSmrg ;; 1479dc9477beSmrg sparc*-*-solaris*) 1480dc9477beSmrg LD="${LD-ld} -m elf64_sparc" 1481dc9477beSmrg ;; 1482dc9477beSmrg esac 1483dc9477beSmrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 1484dc9477beSmrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 148544584a44Smrg LD=${LD-ld}_sol2 1486dc9477beSmrg fi 1487dc9477beSmrg ;; 1488dc9477beSmrg *) 1489dc9477beSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1490dc9477beSmrg LD="${LD-ld} -64" 1491dc9477beSmrg fi 1492dc9477beSmrg ;; 1493dc9477beSmrg esac 1494dc9477beSmrg ;; 1495dc9477beSmrg esac 1496dc9477beSmrg fi 1497dc9477beSmrg rm -rf conftest* 1498dc9477beSmrg ;; 1499dc9477beSmrgesac 1500c43cc173Smrg 150144584a44Smrgneed_locks=$enable_libtool_lock 1502dc9477beSmrg])# _LT_ENABLE_LOCK 1503c43cc173Smrg 1504c27c18e8Smrg 1505dc9477beSmrg# _LT_PROG_AR 1506dc9477beSmrg# ----------- 1507dc9477beSmrgm4_defun([_LT_PROG_AR], 1508dc9477beSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1509dc9477beSmrg: ${AR=ar} 1510dc9477beSmrg: ${AR_FLAGS=cru} 1511dc9477beSmrg_LT_DECL([], [AR], [1], [The archiver]) 1512dc9477beSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1513c43cc173Smrg 1514dc9477beSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1515dc9477beSmrg [lt_cv_ar_at_file=no 1516dc9477beSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1517dc9477beSmrg [echo conftest.$ac_objext > conftest.lst 1518dc9477beSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1519dc9477beSmrg AC_TRY_EVAL([lt_ar_try]) 152044584a44Smrg if test 0 -eq "$ac_status"; then 1521dc9477beSmrg # Ensure the archiver fails upon bogus file names. 1522dc9477beSmrg rm -f conftest.$ac_objext libconftest.a 1523dc9477beSmrg AC_TRY_EVAL([lt_ar_try]) 152444584a44Smrg if test 0 -ne "$ac_status"; then 1525dc9477beSmrg lt_cv_ar_at_file=@ 1526dc9477beSmrg fi 1527dc9477beSmrg fi 1528dc9477beSmrg rm -f conftest.* libconftest.a 1529dc9477beSmrg ]) 1530dc9477beSmrg ]) 1531c43cc173Smrg 153244584a44Smrgif test no = "$lt_cv_ar_at_file"; then 1533dc9477beSmrg archiver_list_spec= 1534dc9477beSmrgelse 1535dc9477beSmrg archiver_list_spec=$lt_cv_ar_at_file 1536dc9477beSmrgfi 1537dc9477beSmrg_LT_DECL([], [archiver_list_spec], [1], 1538dc9477beSmrg [How to feed a file listing to the archiver]) 1539dc9477beSmrg])# _LT_PROG_AR 1540c43cc173Smrg 1541c27c18e8Smrg 1542dc9477beSmrg# _LT_CMD_OLD_ARCHIVE 1543dc9477beSmrg# ------------------- 1544dc9477beSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1545dc9477beSmrg[_LT_PROG_AR 1546c43cc173Smrg 1547dc9477beSmrgAC_CHECK_TOOL(STRIP, strip, :) 1548dc9477beSmrgtest -z "$STRIP" && STRIP=: 1549dc9477beSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1550c43cc173Smrg 1551dc9477beSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1552dc9477beSmrgtest -z "$RANLIB" && RANLIB=: 1553dc9477beSmrg_LT_DECL([], [RANLIB], [1], 1554dc9477beSmrg [Commands used to install an old-style archive]) 1555c43cc173Smrg 1556dc9477beSmrg# Determine commands to create old-style static archives. 1557dc9477beSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1558dc9477beSmrgold_postinstall_cmds='chmod 644 $oldlib' 1559dc9477beSmrgold_postuninstall_cmds= 1560c43cc173Smrg 1561dc9477beSmrgif test -n "$RANLIB"; then 1562dc9477beSmrg case $host_os in 156344584a44Smrg bitrig* | openbsd*) 1564dc9477beSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1565dc9477beSmrg ;; 1566dc9477beSmrg *) 1567dc9477beSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1568dc9477beSmrg ;; 156906c34b88Smrg esac 1570dc9477beSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 157106c34b88Smrgfi 1572c43cc173Smrg 1573dc9477beSmrgcase $host_os in 1574dc9477beSmrg darwin*) 1575dc9477beSmrg lock_old_archive_extraction=yes ;; 1576dc9477beSmrg *) 1577dc9477beSmrg lock_old_archive_extraction=no ;; 1578dc9477beSmrgesac 1579dc9477beSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1580dc9477beSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1581dc9477beSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1582dc9477beSmrg [Commands used to build an old-style archive]) 1583dc9477beSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1584dc9477beSmrg [Whether to use a lock for old archive extraction]) 1585dc9477beSmrg])# _LT_CMD_OLD_ARCHIVE 1586f1ee322dSmrg 158706c34b88Smrg 1588dc9477beSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1589dc9477beSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1590dc9477beSmrg# ---------------------------------------------------------------- 1591dc9477beSmrg# Check whether the given compiler option works 1592dc9477beSmrgAC_DEFUN([_LT_COMPILER_OPTION], 159306c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1594dc9477beSmrgm4_require([_LT_DECL_SED])dnl 1595dc9477beSmrgAC_CACHE_CHECK([$1], [$2], 1596dc9477beSmrg [$2=no 1597dc9477beSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1598dc9477beSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 159944584a44Smrg lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment 1600dc9477beSmrg # Insert the option either (1) after the last *FLAGS variable, or 1601dc9477beSmrg # (2) before a word containing "conftest.", or (3) at the end. 1602dc9477beSmrg # Note that $ac_compile itself does not contain backslashes and begins 1603dc9477beSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1604dc9477beSmrg # The option is referenced via a variable to avoid confusing sed. 1605dc9477beSmrg lt_compile=`echo "$ac_compile" | $SED \ 1606dc9477beSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1607dc9477beSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1608dc9477beSmrg -e 's:$: $lt_compiler_flag:'` 1609dc9477beSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1610dc9477beSmrg (eval "$lt_compile" 2>conftest.err) 1611dc9477beSmrg ac_status=$? 1612dc9477beSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1613dc9477beSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1614dc9477beSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1615dc9477beSmrg # The compiler can only warn and ignore the option if not recognized 1616dc9477beSmrg # So say no if there are warnings other than the usual output. 1617dc9477beSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 1618dc9477beSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1619dc9477beSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1620dc9477beSmrg $2=yes 1621dc9477beSmrg fi 1622dc9477beSmrg fi 1623dc9477beSmrg $RM conftest* 1624dc9477beSmrg]) 1625c43cc173Smrg 162644584a44Smrgif test yes = "[$]$2"; then 1627dc9477beSmrg m4_if([$5], , :, [$5]) 1628dc9477beSmrgelse 1629dc9477beSmrg m4_if([$6], , :, [$6]) 163006c34b88Smrgfi 1631dc9477beSmrg])# _LT_COMPILER_OPTION 1632c43cc173Smrg 1633dc9477beSmrg# Old name: 1634dc9477beSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1635dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 1636dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1637c43cc173Smrg 163821e67964Smrg 1639dc9477beSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1640dc9477beSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1641dc9477beSmrg# ---------------------------------------------------- 1642dc9477beSmrg# Check whether the given linker option works 1643dc9477beSmrgAC_DEFUN([_LT_LINKER_OPTION], 1644dc9477beSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1645dc9477beSmrgm4_require([_LT_DECL_SED])dnl 1646dc9477beSmrgAC_CACHE_CHECK([$1], [$2], 1647dc9477beSmrg [$2=no 164844584a44Smrg save_LDFLAGS=$LDFLAGS 1649dc9477beSmrg LDFLAGS="$LDFLAGS $3" 1650dc9477beSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1651dc9477beSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1652dc9477beSmrg # The linker can only warn and ignore the option if not recognized 1653dc9477beSmrg # So say no if there are warnings 1654dc9477beSmrg if test -s conftest.err; then 1655dc9477beSmrg # Append any errors to the config.log. 1656dc9477beSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1657dc9477beSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 1658dc9477beSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1659dc9477beSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1660dc9477beSmrg $2=yes 1661dc9477beSmrg fi 1662dc9477beSmrg else 1663dc9477beSmrg $2=yes 1664dc9477beSmrg fi 1665dc9477beSmrg fi 1666dc9477beSmrg $RM -r conftest* 166744584a44Smrg LDFLAGS=$save_LDFLAGS 1668dc9477beSmrg]) 166937eb1ca1Smrg 167044584a44Smrgif test yes = "[$]$2"; then 1671dc9477beSmrg m4_if([$4], , :, [$4]) 1672dc9477beSmrgelse 1673dc9477beSmrg m4_if([$5], , :, [$5]) 1674dc9477beSmrgfi 1675dc9477beSmrg])# _LT_LINKER_OPTION 167621e67964Smrg 1677dc9477beSmrg# Old name: 1678dc9477beSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1679dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 1680dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 168121e67964Smrg 1682c43cc173Smrg 1683dc9477beSmrg# LT_CMD_MAX_LEN 1684dc9477beSmrg#--------------- 1685dc9477beSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1686dc9477beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1687dc9477beSmrg# find the maximum length of command line arguments 1688dc9477beSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1689dc9477beSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1690dc9477beSmrg i=0 169144584a44Smrg teststring=ABCD 1692c43cc173Smrg 1693dc9477beSmrg case $build_os in 1694dc9477beSmrg msdosdjgpp*) 1695dc9477beSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1696dc9477beSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1697dc9477beSmrg # during glob expansion). Even if it were fixed, the result of this 1698dc9477beSmrg # check would be larger than it should be. 1699dc9477beSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1700dc9477beSmrg ;; 1701c43cc173Smrg 1702dc9477beSmrg gnu*) 1703dc9477beSmrg # Under GNU Hurd, this test is not required because there is 1704dc9477beSmrg # no limit to the length of command line arguments. 1705dc9477beSmrg # Libtool will interpret -1 as no limit whatsoever 1706dc9477beSmrg lt_cv_sys_max_cmd_len=-1; 1707dc9477beSmrg ;; 1708c43cc173Smrg 1709dc9477beSmrg cygwin* | mingw* | cegcc*) 1710dc9477beSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1711dc9477beSmrg # about 5 minutes as the teststring grows exponentially. 1712dc9477beSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1713dc9477beSmrg # you end up with a "frozen" computer, even though with patience 1714dc9477beSmrg # the test eventually succeeds (with a max line length of 256k). 1715dc9477beSmrg # Instead, let's just punt: use the minimum linelength reported by 1716dc9477beSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1717dc9477beSmrg lt_cv_sys_max_cmd_len=8192; 1718dc9477beSmrg ;; 1719c43cc173Smrg 1720dc9477beSmrg mint*) 1721dc9477beSmrg # On MiNT this can take a long time and run out of memory. 1722dc9477beSmrg lt_cv_sys_max_cmd_len=8192; 1723dc9477beSmrg ;; 1724c43cc173Smrg 1725dc9477beSmrg amigaos*) 1726dc9477beSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1727dc9477beSmrg # So we just punt and use a minimum line length of 8192. 1728dc9477beSmrg lt_cv_sys_max_cmd_len=8192; 1729dc9477beSmrg ;; 173021e67964Smrg 173144584a44Smrg bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) 1732dc9477beSmrg # This has been around since 386BSD, at least. Likely further. 1733dc9477beSmrg if test -x /sbin/sysctl; then 1734dc9477beSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1735dc9477beSmrg elif test -x /usr/sbin/sysctl; then 1736dc9477beSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1737dc9477beSmrg else 1738dc9477beSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1739dc9477beSmrg fi 1740dc9477beSmrg # And add a safety zone 1741dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1742dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1743dc9477beSmrg ;; 1744c43cc173Smrg 1745dc9477beSmrg interix*) 1746dc9477beSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1747dc9477beSmrg lt_cv_sys_max_cmd_len=196608 1748dc9477beSmrg ;; 1749c43cc173Smrg 1750dc9477beSmrg os2*) 1751dc9477beSmrg # The test takes a long time on OS/2. 1752dc9477beSmrg lt_cv_sys_max_cmd_len=8192 1753dc9477beSmrg ;; 1754c43cc173Smrg 1755dc9477beSmrg osf*) 1756dc9477beSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1757dc9477beSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1758dc9477beSmrg # nice to cause kernel panics so lets avoid the loop below. 1759dc9477beSmrg # First set a reasonable default. 1760dc9477beSmrg lt_cv_sys_max_cmd_len=16384 1761dc9477beSmrg # 1762dc9477beSmrg if test -x /sbin/sysconfig; then 1763dc9477beSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1764dc9477beSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1765dc9477beSmrg esac 1766dc9477beSmrg fi 1767dc9477beSmrg ;; 1768dc9477beSmrg sco3.2v5*) 1769dc9477beSmrg lt_cv_sys_max_cmd_len=102400 1770dc9477beSmrg ;; 1771dc9477beSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1772dc9477beSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1773dc9477beSmrg if test -n "$kargmax"; then 1774dc9477beSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1775dc9477beSmrg else 1776dc9477beSmrg lt_cv_sys_max_cmd_len=32768 1777dc9477beSmrg fi 1778dc9477beSmrg ;; 1779dc9477beSmrg *) 1780dc9477beSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 178144584a44Smrg if test -n "$lt_cv_sys_max_cmd_len" && \ 178244584a44Smrg test undefined != "$lt_cv_sys_max_cmd_len"; then 1783dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1784dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1785dc9477beSmrg else 1786dc9477beSmrg # Make teststring a little bigger before we do anything with it. 1787dc9477beSmrg # a 1K string should be a reasonable start. 178844584a44Smrg for i in 1 2 3 4 5 6 7 8; do 1789dc9477beSmrg teststring=$teststring$teststring 1790dc9477beSmrg done 1791dc9477beSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1792dc9477beSmrg # If test is not a shell built-in, we'll probably end up computing a 1793dc9477beSmrg # maximum length that is only half of the actual maximum length, but 1794dc9477beSmrg # we can't tell. 179544584a44Smrg while { test X`env echo "$teststring$teststring" 2>/dev/null` \ 1796dc9477beSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 179744584a44Smrg test 17 != "$i" # 1/2 MB should be enough 1798dc9477beSmrg do 1799dc9477beSmrg i=`expr $i + 1` 1800dc9477beSmrg teststring=$teststring$teststring 1801dc9477beSmrg done 1802dc9477beSmrg # Only check the string length outside the loop. 1803dc9477beSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1804dc9477beSmrg teststring= 1805dc9477beSmrg # Add a significant safety factor because C++ compilers can tack on 1806dc9477beSmrg # massive amounts of additional arguments before passing them to the 1807dc9477beSmrg # linker. It appears as though 1/2 is a usable value. 1808dc9477beSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1809dc9477beSmrg fi 1810dc9477beSmrg ;; 1811dc9477beSmrg esac 1812dc9477beSmrg]) 181344584a44Smrgif test -n "$lt_cv_sys_max_cmd_len"; then 1814dc9477beSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1815dc9477beSmrgelse 1816dc9477beSmrg AC_MSG_RESULT(none) 1817dc9477beSmrgfi 1818dc9477beSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1819dc9477beSmrg_LT_DECL([], [max_cmd_len], [0], 1820dc9477beSmrg [What is the maximum length of a command?]) 1821dc9477beSmrg])# LT_CMD_MAX_LEN 1822c43cc173Smrg 1823dc9477beSmrg# Old name: 1824dc9477beSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1825dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 1826dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1827c43cc173Smrg 1828c43cc173Smrg 1829dc9477beSmrg# _LT_HEADER_DLFCN 1830dc9477beSmrg# ---------------- 1831dc9477beSmrgm4_defun([_LT_HEADER_DLFCN], 1832dc9477beSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1833dc9477beSmrg])# _LT_HEADER_DLFCN 1834c43cc173Smrg 1835c43cc173Smrg 1836dc9477beSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1837dc9477beSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1838dc9477beSmrg# ---------------------------------------------------------------- 1839dc9477beSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1840dc9477beSmrg[m4_require([_LT_HEADER_DLFCN])dnl 184144584a44Smrgif test yes = "$cross_compiling"; then : 1842dc9477beSmrg [$4] 1843dc9477beSmrgelse 1844dc9477beSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1845dc9477beSmrg lt_status=$lt_dlunknown 1846dc9477beSmrg cat > conftest.$ac_ext <<_LT_EOF 1847dc9477beSmrg[#line $LINENO "configure" 1848dc9477beSmrg#include "confdefs.h" 1849c43cc173Smrg 1850dc9477beSmrg#if HAVE_DLFCN_H 1851dc9477beSmrg#include <dlfcn.h> 1852dc9477beSmrg#endif 1853c27c18e8Smrg 1854dc9477beSmrg#include <stdio.h> 1855c43cc173Smrg 1856dc9477beSmrg#ifdef RTLD_GLOBAL 1857dc9477beSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1858dc9477beSmrg#else 1859dc9477beSmrg# ifdef DL_GLOBAL 1860dc9477beSmrg# define LT_DLGLOBAL DL_GLOBAL 1861dc9477beSmrg# else 1862dc9477beSmrg# define LT_DLGLOBAL 0 1863dc9477beSmrg# endif 1864dc9477beSmrg#endif 1865c43cc173Smrg 1866dc9477beSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1867dc9477beSmrg find out it does not work in some platform. */ 1868dc9477beSmrg#ifndef LT_DLLAZY_OR_NOW 1869dc9477beSmrg# ifdef RTLD_LAZY 1870dc9477beSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1871dc9477beSmrg# else 1872dc9477beSmrg# ifdef DL_LAZY 1873dc9477beSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1874dc9477beSmrg# else 1875dc9477beSmrg# ifdef RTLD_NOW 1876dc9477beSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1877dc9477beSmrg# else 1878dc9477beSmrg# ifdef DL_NOW 1879dc9477beSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1880dc9477beSmrg# else 1881dc9477beSmrg# define LT_DLLAZY_OR_NOW 0 1882dc9477beSmrg# endif 1883dc9477beSmrg# endif 1884dc9477beSmrg# endif 1885dc9477beSmrg# endif 1886dc9477beSmrg#endif 1887c43cc173Smrg 188844584a44Smrg/* When -fvisibility=hidden is used, assume the code has been annotated 1889dc9477beSmrg correspondingly for the symbols needed. */ 189044584a44Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1891dc9477beSmrgint fnord () __attribute__((visibility("default"))); 1892dc9477beSmrg#endif 1893c43cc173Smrg 1894dc9477beSmrgint fnord () { return 42; } 1895dc9477beSmrgint main () 1896dc9477beSmrg{ 1897dc9477beSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1898dc9477beSmrg int status = $lt_dlunknown; 1899c43cc173Smrg 1900dc9477beSmrg if (self) 1901dc9477beSmrg { 1902dc9477beSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1903dc9477beSmrg else 1904dc9477beSmrg { 1905dc9477beSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1906dc9477beSmrg else puts (dlerror ()); 1907dc9477beSmrg } 1908dc9477beSmrg /* dlclose (self); */ 1909dc9477beSmrg } 1910dc9477beSmrg else 1911dc9477beSmrg puts (dlerror ()); 1912c43cc173Smrg 1913dc9477beSmrg return status; 1914dc9477beSmrg}] 1915dc9477beSmrg_LT_EOF 191644584a44Smrg if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then 1917dc9477beSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1918dc9477beSmrg lt_status=$? 1919dc9477beSmrg case x$lt_status in 1920dc9477beSmrg x$lt_dlno_uscore) $1 ;; 1921dc9477beSmrg x$lt_dlneed_uscore) $2 ;; 1922dc9477beSmrg x$lt_dlunknown|x*) $3 ;; 1923dc9477beSmrg esac 1924dc9477beSmrg else : 1925dc9477beSmrg # compilation failed 1926dc9477beSmrg $3 1927dc9477beSmrg fi 1928dc9477beSmrgfi 1929dc9477beSmrgrm -fr conftest* 1930dc9477beSmrg])# _LT_TRY_DLOPEN_SELF 1931c43cc173Smrg 1932c43cc173Smrg 1933dc9477beSmrg# LT_SYS_DLOPEN_SELF 1934dc9477beSmrg# ------------------ 1935dc9477beSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1936dc9477beSmrg[m4_require([_LT_HEADER_DLFCN])dnl 193744584a44Smrgif test yes != "$enable_dlopen"; then 1938dc9477beSmrg enable_dlopen=unknown 1939dc9477beSmrg enable_dlopen_self=unknown 1940dc9477beSmrg enable_dlopen_self_static=unknown 1941dc9477beSmrgelse 1942dc9477beSmrg lt_cv_dlopen=no 1943dc9477beSmrg lt_cv_dlopen_libs= 1944c43cc173Smrg 1945c43cc173Smrg case $host_os in 1946dc9477beSmrg beos*) 194744584a44Smrg lt_cv_dlopen=load_add_on 1948dc9477beSmrg lt_cv_dlopen_libs= 1949dc9477beSmrg lt_cv_dlopen_self=yes 1950dc9477beSmrg ;; 1951c43cc173Smrg 1952dc9477beSmrg mingw* | pw32* | cegcc*) 195344584a44Smrg lt_cv_dlopen=LoadLibrary 1954dc9477beSmrg lt_cv_dlopen_libs= 1955dc9477beSmrg ;; 1956c43cc173Smrg 1957dc9477beSmrg cygwin*) 195844584a44Smrg lt_cv_dlopen=dlopen 1959dc9477beSmrg lt_cv_dlopen_libs= 1960dc9477beSmrg ;; 196106c34b88Smrg 1962dc9477beSmrg darwin*) 196344584a44Smrg # if libdl is installed we need to link against it 1964dc9477beSmrg AC_CHECK_LIB([dl], [dlopen], 196544584a44Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ 196644584a44Smrg lt_cv_dlopen=dyld 1967dc9477beSmrg lt_cv_dlopen_libs= 1968dc9477beSmrg lt_cv_dlopen_self=yes 196906c34b88Smrg ]) 197037eb1ca1Smrg ;; 1971dc9477beSmrg 197244584a44Smrg tpf*) 197344584a44Smrg # Don't try to run any link tests for TPF. We know it's impossible 197444584a44Smrg # because TPF is a cross-compiler, and we know how we open DSOs. 197544584a44Smrg lt_cv_dlopen=dlopen 197644584a44Smrg lt_cv_dlopen_libs= 197744584a44Smrg lt_cv_dlopen_self=no 197844584a44Smrg ;; 197944584a44Smrg 1980dc9477beSmrg *) 1981dc9477beSmrg AC_CHECK_FUNC([shl_load], 198244584a44Smrg [lt_cv_dlopen=shl_load], 1983dc9477beSmrg [AC_CHECK_LIB([dld], [shl_load], 198444584a44Smrg [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], 1985dc9477beSmrg [AC_CHECK_FUNC([dlopen], 198644584a44Smrg [lt_cv_dlopen=dlopen], 1987dc9477beSmrg [AC_CHECK_LIB([dl], [dlopen], 198844584a44Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], 1989dc9477beSmrg [AC_CHECK_LIB([svld], [dlopen], 199044584a44Smrg [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], 1991dc9477beSmrg [AC_CHECK_LIB([dld], [dld_link], 199244584a44Smrg [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) 1993dc9477beSmrg ]) 1994dc9477beSmrg ]) 1995dc9477beSmrg ]) 1996dc9477beSmrg ]) 1997dc9477beSmrg ]) 1998c27c18e8Smrg ;; 1999c27c18e8Smrg esac 2000c43cc173Smrg 200144584a44Smrg if test no = "$lt_cv_dlopen"; then 2002dc9477beSmrg enable_dlopen=no 200344584a44Smrg else 200444584a44Smrg enable_dlopen=yes 200506c34b88Smrg fi 2006b789ec8aSmrg 2007dc9477beSmrg case $lt_cv_dlopen in 2008dc9477beSmrg dlopen) 200944584a44Smrg save_CPPFLAGS=$CPPFLAGS 201044584a44Smrg test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 2011b789ec8aSmrg 201244584a44Smrg save_LDFLAGS=$LDFLAGS 2013dc9477beSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 2014b789ec8aSmrg 201544584a44Smrg save_LIBS=$LIBS 2016dc9477beSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 2017c43cc173Smrg 2018dc9477beSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 2019dc9477beSmrg lt_cv_dlopen_self, [dnl 2020dc9477beSmrg _LT_TRY_DLOPEN_SELF( 2021dc9477beSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 2022dc9477beSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 2023dc9477beSmrg ]) 2024c43cc173Smrg 202544584a44Smrg if test yes = "$lt_cv_dlopen_self"; then 2026dc9477beSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 2027dc9477beSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 2028dc9477beSmrg lt_cv_dlopen_self_static, [dnl 2029dc9477beSmrg _LT_TRY_DLOPEN_SELF( 2030dc9477beSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 2031dc9477beSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 2032dc9477beSmrg ]) 2033dc9477beSmrg fi 2034c43cc173Smrg 203544584a44Smrg CPPFLAGS=$save_CPPFLAGS 203644584a44Smrg LDFLAGS=$save_LDFLAGS 203744584a44Smrg LIBS=$save_LIBS 2038dc9477beSmrg ;; 2039dc9477beSmrg esac 2040c43cc173Smrg 2041dc9477beSmrg case $lt_cv_dlopen_self in 2042dc9477beSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 2043dc9477beSmrg *) enable_dlopen_self=unknown ;; 2044dc9477beSmrg esac 204521e67964Smrg 2046dc9477beSmrg case $lt_cv_dlopen_self_static in 2047dc9477beSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 2048dc9477beSmrg *) enable_dlopen_self_static=unknown ;; 2049dc9477beSmrg esac 2050dc9477beSmrgfi 2051dc9477beSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 2052dc9477beSmrg [Whether dlopen is supported]) 2053dc9477beSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 2054dc9477beSmrg [Whether dlopen of programs is supported]) 2055dc9477beSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 2056dc9477beSmrg [Whether dlopen of statically linked programs is supported]) 2057dc9477beSmrg])# LT_SYS_DLOPEN_SELF 2058c43cc173Smrg 2059dc9477beSmrg# Old name: 2060dc9477beSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 2061dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 2062dc9477beSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 2063c43cc173Smrg 206437eb1ca1Smrg 2065dc9477beSmrg# _LT_COMPILER_C_O([TAGNAME]) 2066dc9477beSmrg# --------------------------- 2067dc9477beSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 2068dc9477beSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 2069dc9477beSmrgm4_defun([_LT_COMPILER_C_O], 2070dc9477beSmrg[m4_require([_LT_DECL_SED])dnl 2071dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2072dc9477beSmrgm4_require([_LT_TAG_COMPILER])dnl 2073dc9477beSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 2074dc9477beSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 2075dc9477beSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 2076dc9477beSmrg $RM -r conftest 2>/dev/null 2077dc9477beSmrg mkdir conftest 2078dc9477beSmrg cd conftest 2079dc9477beSmrg mkdir out 2080dc9477beSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 2081c27c18e8Smrg 2082dc9477beSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 2083dc9477beSmrg # Insert the option either (1) after the last *FLAGS variable, or 2084dc9477beSmrg # (2) before a word containing "conftest.", or (3) at the end. 2085dc9477beSmrg # Note that $ac_compile itself does not contain backslashes and begins 2086dc9477beSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 2087dc9477beSmrg lt_compile=`echo "$ac_compile" | $SED \ 2088dc9477beSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 2089dc9477beSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 2090dc9477beSmrg -e 's:$: $lt_compiler_flag:'` 2091dc9477beSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 2092dc9477beSmrg (eval "$lt_compile" 2>out/conftest.err) 2093dc9477beSmrg ac_status=$? 2094dc9477beSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 2095dc9477beSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 2096dc9477beSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 2097dc9477beSmrg then 2098dc9477beSmrg # The compiler can only warn and ignore the option if not recognized 2099dc9477beSmrg # So say no if there are warnings 2100dc9477beSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 2101dc9477beSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 2102dc9477beSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2103dc9477beSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 2104dc9477beSmrg fi 210506c34b88Smrg fi 2106dc9477beSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 2107dc9477beSmrg $RM conftest* 2108dc9477beSmrg # SGI C++ compiler will create directory out/ii_files/ for 2109dc9477beSmrg # template instantiation 2110dc9477beSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2111dc9477beSmrg $RM out/* && rmdir out 2112dc9477beSmrg cd .. 2113dc9477beSmrg $RM -r conftest 2114dc9477beSmrg $RM conftest* 2115dc9477beSmrg]) 2116dc9477beSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2117dc9477beSmrg [Does compiler simultaneously support -c and -o options?]) 2118dc9477beSmrg])# _LT_COMPILER_C_O 2119c27c18e8Smrg 2120c43cc173Smrg 2121dc9477beSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2122dc9477beSmrg# ---------------------------------- 2123dc9477beSmrg# Check to see if we can do hard links to lock some files if needed 2124dc9477beSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2125dc9477beSmrg[m4_require([_LT_ENABLE_LOCK])dnl 2126dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2127dc9477beSmrg_LT_COMPILER_C_O([$1]) 212837eb1ca1Smrg 212944584a44Smrghard_links=nottested 213044584a44Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then 2131dc9477beSmrg # do not overwrite the value of need_locks provided by the user 2132dc9477beSmrg AC_MSG_CHECKING([if we can lock with hard links]) 2133dc9477beSmrg hard_links=yes 2134dc9477beSmrg $RM conftest* 2135dc9477beSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2136dc9477beSmrg touch conftest.a 2137dc9477beSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 2138dc9477beSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 2139dc9477beSmrg AC_MSG_RESULT([$hard_links]) 214044584a44Smrg if test no = "$hard_links"; then 214144584a44Smrg AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) 2142dc9477beSmrg need_locks=warn 2143c43cc173Smrg fi 2144dc9477beSmrgelse 2145dc9477beSmrg need_locks=no 2146dc9477beSmrgfi 2147dc9477beSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2148dc9477beSmrg])# _LT_COMPILER_FILE_LOCKS 2149c43cc173Smrg 2150c43cc173Smrg 2151dc9477beSmrg# _LT_CHECK_OBJDIR 2152dc9477beSmrg# ---------------- 2153dc9477beSmrgm4_defun([_LT_CHECK_OBJDIR], 2154dc9477beSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 2155dc9477beSmrg[rm -f .libs 2>/dev/null 2156dc9477beSmrgmkdir .libs 2>/dev/null 2157dc9477beSmrgif test -d .libs; then 2158dc9477beSmrg lt_cv_objdir=.libs 215906c34b88Smrgelse 2160dc9477beSmrg # MS-DOS does not allow filenames that begin with a dot. 2161dc9477beSmrg lt_cv_objdir=_libs 216206c34b88Smrgfi 2163dc9477beSmrgrmdir .libs 2>/dev/null]) 2164dc9477beSmrgobjdir=$lt_cv_objdir 2165dc9477beSmrg_LT_DECL([], [objdir], [0], 2166dc9477beSmrg [The name of the directory that contains temporary libtool files])dnl 2167dc9477beSmrgm4_pattern_allow([LT_OBJDIR])dnl 216844584a44SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", 216944584a44Smrg [Define to the sub-directory where libtool stores uninstalled libraries.]) 2170dc9477beSmrg])# _LT_CHECK_OBJDIR 2171c43cc173Smrg 2172c43cc173Smrg 2173dc9477beSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2174dc9477beSmrg# -------------------------------------- 2175dc9477beSmrg# Check hardcoding attributes. 2176dc9477beSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 2177dc9477beSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2178dc9477beSmrg_LT_TAGVAR(hardcode_action, $1)= 2179dc9477beSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2180dc9477beSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 218144584a44Smrg test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then 2182c43cc173Smrg 2183dc9477beSmrg # We can hardcode non-existent directories. 218444584a44Smrg if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && 2185dc9477beSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 2186dc9477beSmrg # have to relink, otherwise we might link with an installed library 2187dc9477beSmrg # when we should be linking with a yet-to-be-installed one 218844584a44Smrg ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && 218944584a44Smrg test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then 2190dc9477beSmrg # Linking always hardcodes the temporary library directory. 2191dc9477beSmrg _LT_TAGVAR(hardcode_action, $1)=relink 2192dc9477beSmrg else 2193dc9477beSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 2194dc9477beSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 2195dc9477beSmrg fi 2196dc9477beSmrgelse 2197dc9477beSmrg # We cannot hardcode anything, or else we can only hardcode existing 2198dc9477beSmrg # directories. 2199dc9477beSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 2200dc9477beSmrgfi 2201dc9477beSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 2202c43cc173Smrg 220344584a44Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" || 220444584a44Smrg test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then 2205dc9477beSmrg # Fast installation is not supported 2206dc9477beSmrg enable_fast_install=no 220744584a44Smrgelif test yes = "$shlibpath_overrides_runpath" || 220844584a44Smrg test no = "$enable_shared"; then 2209dc9477beSmrg # Fast installation is not necessary 2210dc9477beSmrg enable_fast_install=needless 2211dc9477beSmrgfi 2212dc9477beSmrg_LT_TAGDECL([], [hardcode_action], [0], 2213dc9477beSmrg [How to hardcode a shared library path into an executable]) 2214dc9477beSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2215c27c18e8Smrg 2216c43cc173Smrg 2217dc9477beSmrg# _LT_CMD_STRIPLIB 2218dc9477beSmrg# ---------------- 2219dc9477beSmrgm4_defun([_LT_CMD_STRIPLIB], 2220dc9477beSmrg[m4_require([_LT_DECL_EGREP]) 2221dc9477beSmrgstriplib= 2222dc9477beSmrgold_striplib= 2223dc9477beSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2224dc9477beSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2225dc9477beSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2226dc9477beSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2227dc9477beSmrg AC_MSG_RESULT([yes]) 2228dc9477beSmrgelse 2229dc9477beSmrg# FIXME - insert some real tests, host_os isn't really good enough 223006c34b88Smrg case $host_os in 2231dc9477beSmrg darwin*) 223244584a44Smrg if test -n "$STRIP"; then 2233dc9477beSmrg striplib="$STRIP -x" 2234dc9477beSmrg old_striplib="$STRIP -S" 2235dc9477beSmrg AC_MSG_RESULT([yes]) 2236dc9477beSmrg else 2237dc9477beSmrg AC_MSG_RESULT([no]) 2238dc9477beSmrg fi 223906c34b88Smrg ;; 224006c34b88Smrg *) 2241dc9477beSmrg AC_MSG_RESULT([no]) 224206c34b88Smrg ;; 224306c34b88Smrg esac 224406c34b88Smrgfi 2245dc9477beSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2246dc9477beSmrg_LT_DECL([], [striplib], [1]) 2247dc9477beSmrg])# _LT_CMD_STRIPLIB 2248c43cc173Smrg 2249c43cc173Smrg 225044584a44Smrg# _LT_PREPARE_MUNGE_PATH_LIST 225144584a44Smrg# --------------------------- 225244584a44Smrg# Make sure func_munge_path_list() is defined correctly. 225344584a44Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST], 225444584a44Smrg[[# func_munge_path_list VARIABLE PATH 225544584a44Smrg# ----------------------------------- 225644584a44Smrg# VARIABLE is name of variable containing _space_ separated list of 225744584a44Smrg# directories to be munged by the contents of PATH, which is string 225844584a44Smrg# having a format: 225944584a44Smrg# "DIR[:DIR]:" 226044584a44Smrg# string "DIR[ DIR]" will be prepended to VARIABLE 226144584a44Smrg# ":DIR[:DIR]" 226244584a44Smrg# string "DIR[ DIR]" will be appended to VARIABLE 226344584a44Smrg# "DIRP[:DIRP]::[DIRA:]DIRA" 226444584a44Smrg# string "DIRP[ DIRP]" will be prepended to VARIABLE and string 226544584a44Smrg# "DIRA[ DIRA]" will be appended to VARIABLE 226644584a44Smrg# "DIR[:DIR]" 226744584a44Smrg# VARIABLE will be replaced by "DIR[ DIR]" 226844584a44Smrgfunc_munge_path_list () 226944584a44Smrg{ 227044584a44Smrg case x@S|@2 in 227144584a44Smrg x) 227244584a44Smrg ;; 227344584a44Smrg *:) 227444584a44Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" 227544584a44Smrg ;; 227644584a44Smrg x:*) 227744584a44Smrg eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" 227844584a44Smrg ;; 227944584a44Smrg *::*) 228044584a44Smrg eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" 228144584a44Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" 228244584a44Smrg ;; 228344584a44Smrg *) 228444584a44Smrg eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" 228544584a44Smrg ;; 228644584a44Smrg esac 228744584a44Smrg} 228844584a44Smrg]])# _LT_PREPARE_PATH_LIST 228944584a44Smrg 229044584a44Smrg 2291dc9477beSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2292dc9477beSmrg# ----------------------------- 2293dc9477beSmrg# PORTME Fill in your ld.so characteristics 2294dc9477beSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2295dc9477beSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2296dc9477beSmrgm4_require([_LT_DECL_EGREP])dnl 2297dc9477beSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2298dc9477beSmrgm4_require([_LT_DECL_OBJDUMP])dnl 229906c34b88Smrgm4_require([_LT_DECL_SED])dnl 2300dc9477beSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 230144584a44Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl 2302dc9477beSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2303dc9477beSmrgm4_if([$1], 2304dc9477beSmrg [], [ 230544584a44Smrgif test yes = "$GCC"; then 2306dc9477beSmrg case $host_os in 230744584a44Smrg darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; 230844584a44Smrg *) lt_awk_arg='/^libraries:/' ;; 2309dc9477beSmrg esac 2310dc9477beSmrg case $host_os in 231144584a44Smrg mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; 231244584a44Smrg *) lt_sed_strip_eq='s|=/|/|g' ;; 2313dc9477beSmrg esac 2314dc9477beSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2315dc9477beSmrg case $lt_search_path_spec in 2316dc9477beSmrg *\;*) 2317dc9477beSmrg # if the path contains ";" then we assume it to be the separator 2318dc9477beSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2319dc9477beSmrg # assumed that no part of a normal pathname contains ";" but that should 2320dc9477beSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2321dc9477beSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2322dc9477beSmrg ;; 2323dc9477beSmrg *) 2324dc9477beSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2325dc9477beSmrg ;; 2326dc9477beSmrg esac 2327dc9477beSmrg # Ok, now we have the path, separated by spaces, we can step through it 232844584a44Smrg # and add multilib dir if necessary... 2329dc9477beSmrg lt_tmp_lt_search_path_spec= 233044584a44Smrg lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 233144584a44Smrg # ...but if some path component already ends with the multilib dir we assume 233244584a44Smrg # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). 233344584a44Smrg case "$lt_multi_os_dir; $lt_search_path_spec " in 233444584a44Smrg "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) 233544584a44Smrg lt_multi_os_dir= 233644584a44Smrg ;; 233744584a44Smrg esac 2338dc9477beSmrg for lt_sys_path in $lt_search_path_spec; do 233944584a44Smrg if test -d "$lt_sys_path$lt_multi_os_dir"; then 234044584a44Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" 234144584a44Smrg elif test -n "$lt_multi_os_dir"; then 2342dc9477beSmrg test -d "$lt_sys_path" && \ 2343dc9477beSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2344dc9477beSmrg fi 2345dc9477beSmrg done 2346dc9477beSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 234744584a44SmrgBEGIN {RS = " "; FS = "/|\n";} { 234844584a44Smrg lt_foo = ""; 234944584a44Smrg lt_count = 0; 2350dc9477beSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2351dc9477beSmrg if ($lt_i != "" && $lt_i != ".") { 2352dc9477beSmrg if ($lt_i == "..") { 2353dc9477beSmrg lt_count++; 2354dc9477beSmrg } else { 2355dc9477beSmrg if (lt_count == 0) { 235644584a44Smrg lt_foo = "/" $lt_i lt_foo; 2357dc9477beSmrg } else { 2358dc9477beSmrg lt_count--; 2359dc9477beSmrg } 2360dc9477beSmrg } 2361dc9477beSmrg } 2362dc9477beSmrg } 2363dc9477beSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2364dc9477beSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2365dc9477beSmrg}'` 2366dc9477beSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2367dc9477beSmrg # for these hosts. 2368dc9477beSmrg case $host_os in 2369dc9477beSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 237044584a44Smrg $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; 2371dc9477beSmrg esac 2372dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 2373c43cc173Smrgelse 2374dc9477beSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2375dc9477beSmrgfi]) 2376dc9477beSmrglibrary_names_spec= 2377dc9477beSmrglibname_spec='lib$name' 2378dc9477beSmrgsoname_spec= 237944584a44Smrgshrext_cmds=.so 2380dc9477beSmrgpostinstall_cmds= 2381dc9477beSmrgpostuninstall_cmds= 2382dc9477beSmrgfinish_cmds= 2383dc9477beSmrgfinish_eval= 2384dc9477beSmrgshlibpath_var= 2385dc9477beSmrgshlibpath_overrides_runpath=unknown 2386dc9477beSmrgversion_type=none 2387dc9477beSmrgdynamic_linker="$host_os ld.so" 2388dc9477beSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2389dc9477beSmrgneed_lib_prefix=unknown 2390dc9477beSmrghardcode_into_libs=no 2391c43cc173Smrg 2392dc9477beSmrg# when you set need_version to no, make sure it does not cause -set_version 2393dc9477beSmrg# flags to be left without arguments 2394dc9477beSmrgneed_version=unknown 2395c43cc173Smrg 239644584a44SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH], 239744584a44Smrg[User-defined run-time library search path.]) 239844584a44Smrg 2399dc9477beSmrgcase $host_os in 2400dc9477beSmrgaix3*) 2401dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 240244584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname.a' 2403dc9477beSmrg shlibpath_var=LIBPATH 2404c27c18e8Smrg 2405dc9477beSmrg # AIX 3 has no versioning support, so we append a major version to the name. 240644584a44Smrg soname_spec='$libname$release$shared_ext$major' 2407dc9477beSmrg ;; 2408c43cc173Smrg 2409dc9477beSmrgaix[[4-9]]*) 2410dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2411dc9477beSmrg need_lib_prefix=no 2412dc9477beSmrg need_version=no 2413dc9477beSmrg hardcode_into_libs=yes 241444584a44Smrg if test ia64 = "$host_cpu"; then 2415dc9477beSmrg # AIX 5 supports IA64 241644584a44Smrg library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' 2417dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2418dc9477beSmrg else 2419dc9477beSmrg # With GCC up to 2.95.x, collect2 would create an import file 2420dc9477beSmrg # for dependence libraries. The import file would start with 242144584a44Smrg # the line '#! .'. This would cause the generated library to 242244584a44Smrg # depend on '.', always an invalid library. This was fixed in 2423dc9477beSmrg # development snapshots of GCC prior to 3.0. 2424dc9477beSmrg case $host_os in 2425dc9477beSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2426dc9477beSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2427dc9477beSmrg echo ' yes ' 242844584a44Smrg echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then 2429dc9477beSmrg : 2430dc9477beSmrg else 2431dc9477beSmrg can_build_shared=no 2432dc9477beSmrg fi 2433dc9477beSmrg ;; 2434dc9477beSmrg esac 243544584a44Smrg # Using Import Files as archive members, it is possible to support 243644584a44Smrg # filename-based versioning of shared library archives on AIX. While 243744584a44Smrg # this would work for both with and without runtime linking, it will 243844584a44Smrg # prevent static linking of such archives. So we do filename-based 243944584a44Smrg # shared library versioning with .so extension only, which is used 244044584a44Smrg # when both runtime linking and shared linking is enabled. 244144584a44Smrg # Unfortunately, runtime linking may impact performance, so we do 244244584a44Smrg # not want this to be the default eventually. Also, we use the 244344584a44Smrg # versioned .so libs for executables only if there is the -brtl 244444584a44Smrg # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. 244544584a44Smrg # To allow for filename-based versioning support, we need to create 244644584a44Smrg # libNAME.so.V as an archive file, containing: 244744584a44Smrg # *) an Import File, referring to the versioned filename of the 244844584a44Smrg # archive as well as the shared archive member, telling the 244944584a44Smrg # bitwidth (32 or 64) of that shared object, and providing the 245044584a44Smrg # list of exported symbols of that shared object, eventually 245144584a44Smrg # decorated with the 'weak' keyword 245244584a44Smrg # *) the shared object with the F_LOADONLY flag set, to really avoid 245344584a44Smrg # it being seen by the linker. 245444584a44Smrg # At run time we better use the real file rather than another symlink, 245544584a44Smrg # but for link time we create the symlink libNAME.so -> libNAME.so.V 245644584a44Smrg 245744584a44Smrg case $with_aix_soname,$aix_use_runtimelinking in 245844584a44Smrg # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct 2459dc9477beSmrg # soname into executable. Probably we can add versioning support to 2460dc9477beSmrg # collect2, so additional links can be useful in future. 246144584a44Smrg aix,yes) # traditional libtool 246244584a44Smrg dynamic_linker='AIX unversionable lib.so' 2463dc9477beSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2464dc9477beSmrg # instead of lib<name>.a to let people know that these are not 2465dc9477beSmrg # typical AIX shared libraries. 246644584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 246744584a44Smrg ;; 246844584a44Smrg aix,no) # traditional AIX only 246944584a44Smrg dynamic_linker='AIX lib.a[(]lib.so.V[)]' 2470dc9477beSmrg # We preserve .a as extension for shared libraries through AIX4.2 2471dc9477beSmrg # and later when we are not doing run time linking. 247244584a44Smrg library_names_spec='$libname$release.a $libname.a' 247344584a44Smrg soname_spec='$libname$release$shared_ext$major' 247444584a44Smrg ;; 247544584a44Smrg svr4,*) # full svr4 only 247644584a44Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" 247744584a44Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 247844584a44Smrg # We do not specify a path in Import Files, so LIBPATH fires. 247944584a44Smrg shlibpath_overrides_runpath=yes 248044584a44Smrg ;; 248144584a44Smrg *,yes) # both, prefer svr4 248244584a44Smrg dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" 248344584a44Smrg library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' 248444584a44Smrg # unpreferred sharedlib libNAME.a needs extra handling 248544584a44Smrg 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"' 248644584a44Smrg 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"' 248744584a44Smrg # We do not specify a path in Import Files, so LIBPATH fires. 248844584a44Smrg shlibpath_overrides_runpath=yes 248944584a44Smrg ;; 249044584a44Smrg *,no) # both, prefer aix 249144584a44Smrg dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" 249244584a44Smrg library_names_spec='$libname$release.a $libname.a' 249344584a44Smrg soname_spec='$libname$release$shared_ext$major' 249444584a44Smrg # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling 249544584a44Smrg 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)' 249644584a44Smrg 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"' 249744584a44Smrg ;; 249844584a44Smrg esac 2499dc9477beSmrg shlibpath_var=LIBPATH 2500dc9477beSmrg fi 2501dc9477beSmrg ;; 2502c43cc173Smrg 2503dc9477beSmrgamigaos*) 2504dc9477beSmrg case $host_cpu in 2505dc9477beSmrg powerpc) 2506dc9477beSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2507dc9477beSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 250844584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 250906c34b88Smrg ;; 2510dc9477beSmrg m68k) 2511dc9477beSmrg library_names_spec='$libname.ixlibrary $libname.a' 2512dc9477beSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 251344584a44Smrg 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' 251406c34b88Smrg ;; 2515dc9477beSmrg esac 2516dc9477beSmrg ;; 2517c27c18e8Smrg 2518dc9477beSmrgbeos*) 251944584a44Smrg library_names_spec='$libname$shared_ext' 2520dc9477beSmrg dynamic_linker="$host_os ld.so" 2521dc9477beSmrg shlibpath_var=LIBRARY_PATH 2522dc9477beSmrg ;; 252306c34b88Smrg 2524dc9477beSmrgbsdi[[45]]*) 2525dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2526dc9477beSmrg need_version=no 252744584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 252844584a44Smrg soname_spec='$libname$release$shared_ext$major' 2529dc9477beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2530dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2531dc9477beSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2532dc9477beSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2533dc9477beSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2534dc9477beSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2535dc9477beSmrg # libtool to hard-code these into programs 2536dc9477beSmrg ;; 253706c34b88Smrg 2538dc9477beSmrgcygwin* | mingw* | pw32* | cegcc*) 2539dc9477beSmrg version_type=windows 254044584a44Smrg shrext_cmds=.dll 2541dc9477beSmrg need_version=no 2542dc9477beSmrg need_lib_prefix=no 254306c34b88Smrg 2544dc9477beSmrg case $GCC,$cc_basename in 2545dc9477beSmrg yes,*) 2546dc9477beSmrg # gcc 2547dc9477beSmrg library_names_spec='$libname.dll.a' 2548dc9477beSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 254944584a44Smrg postinstall_cmds='base_file=`basename \$file`~ 255044584a44Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2551dc9477beSmrg dldir=$destdir/`dirname \$dlpath`~ 2552dc9477beSmrg test -d \$dldir || mkdir -p \$dldir~ 2553dc9477beSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2554dc9477beSmrg chmod a+x \$dldir/$dlname~ 2555dc9477beSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2556dc9477beSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2557dc9477beSmrg fi' 2558dc9477beSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2559dc9477beSmrg dlpath=$dir/\$dldll~ 2560dc9477beSmrg $RM \$dlpath' 2561dc9477beSmrg shlibpath_overrides_runpath=yes 256206c34b88Smrg 2563dc9477beSmrg case $host_os in 2564dc9477beSmrg cygwin*) 2565dc9477beSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 256644584a44Smrg soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2567dc9477beSmrgm4_if([$1], [],[ 2568dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 2569dc9477beSmrg ;; 2570dc9477beSmrg mingw* | cegcc*) 2571dc9477beSmrg # MinGW DLLs use traditional 'lib' prefix 257244584a44Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2573dc9477beSmrg ;; 2574dc9477beSmrg pw32*) 2575dc9477beSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 257644584a44Smrg library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 2577dc9477beSmrg ;; 2578dc9477beSmrg esac 2579dc9477beSmrg dynamic_linker='Win32 ld.exe' 258006c34b88Smrg ;; 258106c34b88Smrg 2582dc9477beSmrg *,cl*) 2583dc9477beSmrg # Native MSVC 2584dc9477beSmrg libname_spec='$name' 258544584a44Smrg soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' 258644584a44Smrg library_names_spec='$libname.dll.lib' 2587dc9477beSmrg 2588dc9477beSmrg case $build_os in 2589dc9477beSmrg mingw*) 2590dc9477beSmrg sys_lib_search_path_spec= 2591dc9477beSmrg lt_save_ifs=$IFS 2592dc9477beSmrg IFS=';' 2593dc9477beSmrg for lt_path in $LIB 259406c34b88Smrg do 2595dc9477beSmrg IFS=$lt_save_ifs 2596dc9477beSmrg # Let DOS variable expansion print the short 8.3 style file name. 2597dc9477beSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2598dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 259906c34b88Smrg done 2600dc9477beSmrg IFS=$lt_save_ifs 2601dc9477beSmrg # Convert to MSYS style. 2602dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2603dc9477beSmrg ;; 2604dc9477beSmrg cygwin*) 2605dc9477beSmrg # Convert to unix form, then to dos form, then back to unix form 2606dc9477beSmrg # but this time dos style (no spaces!) so that the unix form looks 2607dc9477beSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2608dc9477beSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2609dc9477beSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2610dc9477beSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2611dc9477beSmrg ;; 2612dc9477beSmrg *) 261344584a44Smrg sys_lib_search_path_spec=$LIB 2614dc9477beSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2615dc9477beSmrg # It is most probably a Windows format PATH. 2616dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2617dc9477beSmrg else 2618dc9477beSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2619dc9477beSmrg fi 2620dc9477beSmrg # FIXME: find the short name or the path components, as spaces are 2621dc9477beSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2622dc9477beSmrg ;; 2623dc9477beSmrg esac 2624c27c18e8Smrg 2625dc9477beSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 262644584a44Smrg postinstall_cmds='base_file=`basename \$file`~ 262744584a44Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ 2628dc9477beSmrg dldir=$destdir/`dirname \$dlpath`~ 2629dc9477beSmrg test -d \$dldir || mkdir -p \$dldir~ 2630dc9477beSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2631dc9477beSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2632dc9477beSmrg dlpath=$dir/\$dldll~ 2633dc9477beSmrg $RM \$dlpath' 2634dc9477beSmrg shlibpath_overrides_runpath=yes 2635dc9477beSmrg dynamic_linker='Win32 link.exe' 2636dc9477beSmrg ;; 2637c27c18e8Smrg 2638dc9477beSmrg *) 2639dc9477beSmrg # Assume MSVC wrapper 264044584a44Smrg library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' 2641dc9477beSmrg dynamic_linker='Win32 ld.exe' 2642dc9477beSmrg ;; 2643dc9477beSmrg esac 2644dc9477beSmrg # FIXME: first we should search . and the directory the executable is in 2645dc9477beSmrg shlibpath_var=PATH 2646dc9477beSmrg ;; 2647c43cc173Smrg 2648dc9477beSmrgdarwin* | rhapsody*) 2649dc9477beSmrg dynamic_linker="$host_os dyld" 2650dc9477beSmrg version_type=darwin 2651dc9477beSmrg need_lib_prefix=no 2652dc9477beSmrg need_version=no 265344584a44Smrg library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' 265444584a44Smrg soname_spec='$libname$release$major$shared_ext' 2655dc9477beSmrg shlibpath_overrides_runpath=yes 2656dc9477beSmrg shlibpath_var=DYLD_LIBRARY_PATH 2657dc9477beSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2658dc9477beSmrgm4_if([$1], [],[ 2659dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2660dc9477beSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2661dc9477beSmrg ;; 266221e67964Smrg 2663dc9477beSmrgdgux*) 2664dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2665dc9477beSmrg need_lib_prefix=no 2666dc9477beSmrg need_version=no 266744584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 266844584a44Smrg soname_spec='$libname$release$shared_ext$major' 2669dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2670dc9477beSmrg ;; 2671c43cc173Smrg 2672dc9477beSmrgfreebsd* | dragonfly*) 2673dc9477beSmrg # DragonFly does not have aout. When/if they implement a new 2674dc9477beSmrg # versioning mechanism, adjust this. 2675dc9477beSmrg if test -x /usr/bin/objformat; then 2676dc9477beSmrg objformat=`/usr/bin/objformat` 267721e67964Smrg else 2678dc9477beSmrg case $host_os in 2679dc9477beSmrg freebsd[[23]].*) objformat=aout ;; 2680dc9477beSmrg *) objformat=elf ;; 2681c43cc173Smrg esac 268221e67964Smrg fi 2683dc9477beSmrg version_type=freebsd-$objformat 2684dc9477beSmrg case $version_type in 2685dc9477beSmrg freebsd-elf*) 268644584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 268744584a44Smrg soname_spec='$libname$release$shared_ext$major' 2688dc9477beSmrg need_version=no 2689dc9477beSmrg need_lib_prefix=no 2690dc9477beSmrg ;; 2691dc9477beSmrg freebsd-*) 269244584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2693dc9477beSmrg need_version=yes 2694dc9477beSmrg ;; 2695dc9477beSmrg esac 2696dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 269706c34b88Smrg case $host_os in 2698dc9477beSmrg freebsd2.*) 2699dc9477beSmrg shlibpath_overrides_runpath=yes 270006c34b88Smrg ;; 2701dc9477beSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2702dc9477beSmrg shlibpath_overrides_runpath=yes 2703dc9477beSmrg hardcode_into_libs=yes 270406c34b88Smrg ;; 2705dc9477beSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2706dc9477beSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2707dc9477beSmrg shlibpath_overrides_runpath=no 2708dc9477beSmrg hardcode_into_libs=yes 270921e67964Smrg ;; 2710dc9477beSmrg *) # from 4.6 on, and DragonFly 2711dc9477beSmrg shlibpath_overrides_runpath=yes 2712dc9477beSmrg hardcode_into_libs=yes 2713c43cc173Smrg ;; 2714c43cc173Smrg esac 2715dc9477beSmrg ;; 2716c43cc173Smrg 2717dc9477beSmrghaiku*) 2718dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2719dc9477beSmrg need_lib_prefix=no 2720dc9477beSmrg need_version=no 2721dc9477beSmrg dynamic_linker="$host_os runtime_loader" 272244584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 272344584a44Smrg soname_spec='$libname$release$shared_ext$major' 2724dc9477beSmrg shlibpath_var=LIBRARY_PATH 272544584a44Smrg shlibpath_overrides_runpath=no 2726dc9477beSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2727dc9477beSmrg hardcode_into_libs=yes 2728dc9477beSmrg ;; 272921e67964Smrg 2730dc9477beSmrghpux9* | hpux10* | hpux11*) 2731dc9477beSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2732dc9477beSmrg # link against other versions. 2733dc9477beSmrg version_type=sunos 2734dc9477beSmrg need_lib_prefix=no 2735dc9477beSmrg need_version=no 2736dc9477beSmrg case $host_cpu in 2737dc9477beSmrg ia64*) 2738dc9477beSmrg shrext_cmds='.so' 2739dc9477beSmrg hardcode_into_libs=yes 2740dc9477beSmrg dynamic_linker="$host_os dld.so" 2741dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2742dc9477beSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 274344584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 274444584a44Smrg soname_spec='$libname$release$shared_ext$major' 274544584a44Smrg if test 32 = "$HPUX_IA64_MODE"; then 2746dc9477beSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 274744584a44Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux32 2748dc9477beSmrg else 2749dc9477beSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 275044584a44Smrg sys_lib_dlsearch_path_spec=/usr/lib/hpux64 275106c34b88Smrg fi 2752c43cc173Smrg ;; 2753dc9477beSmrg hppa*64*) 2754dc9477beSmrg shrext_cmds='.sl' 2755dc9477beSmrg hardcode_into_libs=yes 2756dc9477beSmrg dynamic_linker="$host_os dld.sl" 2757dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2758dc9477beSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 275944584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 276044584a44Smrg soname_spec='$libname$release$shared_ext$major' 2761dc9477beSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2762dc9477beSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2763dc9477beSmrg ;; 2764dc9477beSmrg *) 2765dc9477beSmrg shrext_cmds='.sl' 2766dc9477beSmrg dynamic_linker="$host_os dld.sl" 2767dc9477beSmrg shlibpath_var=SHLIB_PATH 2768dc9477beSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 276944584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 277044584a44Smrg soname_spec='$libname$release$shared_ext$major' 2771dc9477beSmrg ;; 2772dc9477beSmrg esac 2773dc9477beSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 2774dc9477beSmrg postinstall_cmds='chmod 555 $lib' 2775dc9477beSmrg # or fails outright, so override atomically: 2776dc9477beSmrg install_override_mode=555 2777dc9477beSmrg ;; 2778c43cc173Smrg 2779dc9477beSmrginterix[[3-9]]*) 2780dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2781dc9477beSmrg need_lib_prefix=no 2782dc9477beSmrg need_version=no 278344584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 278444584a44Smrg soname_spec='$libname$release$shared_ext$major' 2785dc9477beSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2786dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2787dc9477beSmrg shlibpath_overrides_runpath=no 2788dc9477beSmrg hardcode_into_libs=yes 2789dc9477beSmrg ;; 2790c43cc173Smrg 2791dc9477beSmrgirix5* | irix6* | nonstopux*) 2792dc9477beSmrg case $host_os in 2793dc9477beSmrg nonstopux*) version_type=nonstopux ;; 2794dc9477beSmrg *) 279544584a44Smrg if test yes = "$lt_cv_prog_gnu_ld"; then 2796dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2797dc9477beSmrg else 2798dc9477beSmrg version_type=irix 2799dc9477beSmrg fi ;; 2800dc9477beSmrg esac 2801dc9477beSmrg need_lib_prefix=no 2802dc9477beSmrg need_version=no 280344584a44Smrg soname_spec='$libname$release$shared_ext$major' 280444584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' 2805dc9477beSmrg case $host_os in 2806dc9477beSmrg irix5* | nonstopux*) 2807dc9477beSmrg libsuff= shlibsuff= 2808dc9477beSmrg ;; 2809dc9477beSmrg *) 2810dc9477beSmrg case $LD in # libtool.m4 will add one of these switches to LD 2811dc9477beSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2812dc9477beSmrg libsuff= shlibsuff= libmagic=32-bit;; 2813dc9477beSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2814dc9477beSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2815dc9477beSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2816dc9477beSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2817dc9477beSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2818dc9477beSmrg esac 2819dc9477beSmrg ;; 2820dc9477beSmrg esac 2821dc9477beSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2822dc9477beSmrg shlibpath_overrides_runpath=no 282344584a44Smrg sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" 282444584a44Smrg sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" 2825dc9477beSmrg hardcode_into_libs=yes 2826dc9477beSmrg ;; 2827c27c18e8Smrg 2828dc9477beSmrg# No shared lib support for Linux oldld, aout, or coff. 2829dc9477beSmrglinux*oldld* | linux*aout* | linux*coff*) 2830dc9477beSmrg dynamic_linker=no 2831dc9477beSmrg ;; 283206c34b88Smrg 283344584a44Smrglinux*android*) 283444584a44Smrg version_type=none # Android doesn't support versioned libraries. 283544584a44Smrg need_lib_prefix=no 283644584a44Smrg need_version=no 283744584a44Smrg library_names_spec='$libname$release$shared_ext' 283844584a44Smrg soname_spec='$libname$release$shared_ext' 283944584a44Smrg finish_cmds= 284044584a44Smrg shlibpath_var=LD_LIBRARY_PATH 284144584a44Smrg shlibpath_overrides_runpath=yes 284244584a44Smrg 284344584a44Smrg # This implies no fast_install, which is unacceptable. 284444584a44Smrg # Some rework will be needed to allow for fast_install 284544584a44Smrg # before this can be enabled. 284644584a44Smrg hardcode_into_libs=yes 284744584a44Smrg 284844584a44Smrg dynamic_linker='Android linker' 284944584a44Smrg # Don't embed -rpath directories since the linker doesn't support them. 285044584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 285144584a44Smrg ;; 285244584a44Smrg 2853dc9477beSmrg# This must be glibc/ELF. 285444584a44Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 2855dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 2856dc9477beSmrg need_lib_prefix=no 2857dc9477beSmrg need_version=no 285844584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 285944584a44Smrg soname_spec='$libname$release$shared_ext$major' 2860dc9477beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2861dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2862dc9477beSmrg shlibpath_overrides_runpath=no 286306c34b88Smrg 2864dc9477beSmrg # Some binutils ld are patched to set DT_RUNPATH 2865dc9477beSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2866dc9477beSmrg [lt_cv_shlibpath_overrides_runpath=no 2867dc9477beSmrg save_LDFLAGS=$LDFLAGS 2868dc9477beSmrg save_libdir=$libdir 2869dc9477beSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2870dc9477beSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2871dc9477beSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2872dc9477beSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2873dc9477beSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2874dc9477beSmrg LDFLAGS=$save_LDFLAGS 2875dc9477beSmrg libdir=$save_libdir 2876dc9477beSmrg ]) 2877dc9477beSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 287806c34b88Smrg 2879dc9477beSmrg # This implies no fast_install, which is unacceptable. 2880dc9477beSmrg # Some rework will be needed to allow for fast_install 2881dc9477beSmrg # before this can be enabled. 2882dc9477beSmrg hardcode_into_libs=yes 2883c43cc173Smrg 2884dc9477beSmrg # Add ABI-specific directories to the system library path. 2885dc9477beSmrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2886b789ec8aSmrg 288744584a44Smrg # Ideally, we could use ldconfig to report *all* directores which are 288844584a44Smrg # searched for libraries, however this is still not possible. Aside from not 288944584a44Smrg # being certain /sbin/ldconfig is available, command 289044584a44Smrg # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, 289144584a44Smrg # even though it is searched at run-time. Try to do the best guess by 289244584a44Smrg # appending ld.so.conf contents (and includes) to the search path. 2893dc9477beSmrg if test -f /etc/ld.so.conf; then 2894dc9477beSmrg 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' ' '` 2895dc9477beSmrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2896dc9477beSmrg fi 2897b789ec8aSmrg 2898dc9477beSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2899dc9477beSmrg # powerpc, because MkLinux only supported shared libraries with the 2900dc9477beSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2901dc9477beSmrg # most powerpc-linux boxes support dynamic linking these days and 2902dc9477beSmrg # people can always --disable-shared, the test was removed, and we 2903dc9477beSmrg # assume the GNU/Linux dynamic linker is in use. 2904dc9477beSmrg dynamic_linker='GNU/Linux ld.so' 2905dc9477beSmrg ;; 2906b789ec8aSmrg 2907dc9477beSmrgnetbsd*) 2908dc9477beSmrg version_type=sunos 2909dc9477beSmrg need_lib_prefix=no 2910dc9477beSmrg need_version=no 2911dc9477beSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 291244584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 2913dc9477beSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2914dc9477beSmrg dynamic_linker='NetBSD (a.out) ld.so' 291506c34b88Smrg else 291644584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 291744584a44Smrg soname_spec='$libname$release$shared_ext$major' 2918dc9477beSmrg dynamic_linker='NetBSD ld.elf_so' 2919b789ec8aSmrg fi 2920dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2921dc9477beSmrg shlibpath_overrides_runpath=yes 2922dc9477beSmrg hardcode_into_libs=yes 2923dc9477beSmrg ;; 2924c43cc173Smrg 2925dc9477beSmrgnewsos6) 2926dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 292744584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2928dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2929dc9477beSmrg shlibpath_overrides_runpath=yes 2930dc9477beSmrg ;; 2931c43cc173Smrg 2932dc9477beSmrg*nto* | *qnx*) 2933dc9477beSmrg version_type=qnx 2934dc9477beSmrg need_lib_prefix=no 2935dc9477beSmrg need_version=no 293644584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 293744584a44Smrg soname_spec='$libname$release$shared_ext$major' 2938dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2939dc9477beSmrg shlibpath_overrides_runpath=no 2940dc9477beSmrg hardcode_into_libs=yes 2941dc9477beSmrg dynamic_linker='ldqnx.so' 2942dc9477beSmrg ;; 2943c43cc173Smrg 294444584a44Smrgopenbsd* | bitrig*) 2945dc9477beSmrg version_type=sunos 294644584a44Smrg sys_lib_dlsearch_path_spec=/usr/lib 2947dc9477beSmrg need_lib_prefix=no 294844584a44Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 294944584a44Smrg need_version=no 2950dc9477beSmrg else 295144584a44Smrg need_version=yes 2952dc9477beSmrg fi 295344584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 295444584a44Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 295544584a44Smrg shlibpath_var=LD_LIBRARY_PATH 295644584a44Smrg shlibpath_overrides_runpath=yes 2957dc9477beSmrg ;; 2958c43cc173Smrg 2959dc9477beSmrgos2*) 2960dc9477beSmrg libname_spec='$name' 296144584a44Smrg version_type=windows 296244584a44Smrg shrext_cmds=.dll 296344584a44Smrg need_version=no 2964dc9477beSmrg need_lib_prefix=no 296544584a44Smrg # OS/2 can only load a DLL with a base name of 8 characters or less. 296644584a44Smrg soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; 296744584a44Smrg v=$($ECHO $release$versuffix | tr -d .-); 296844584a44Smrg n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); 296944584a44Smrg $ECHO $n$v`$shared_ext' 297044584a44Smrg library_names_spec='${libname}_dll.$libext' 2971dc9477beSmrg dynamic_linker='OS/2 ld.exe' 297244584a44Smrg shlibpath_var=BEGINLIBPATH 297344584a44Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 297444584a44Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 297544584a44Smrg postinstall_cmds='base_file=`basename \$file`~ 297644584a44Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ 297744584a44Smrg dldir=$destdir/`dirname \$dlpath`~ 297844584a44Smrg test -d \$dldir || mkdir -p \$dldir~ 297944584a44Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 298044584a44Smrg chmod a+x \$dldir/$dlname~ 298144584a44Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 298244584a44Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 298344584a44Smrg fi' 298444584a44Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ 298544584a44Smrg dlpath=$dir/\$dldll~ 298644584a44Smrg $RM \$dlpath' 2987dc9477beSmrg ;; 298806c34b88Smrg 2989dc9477beSmrgosf3* | osf4* | osf5*) 2990dc9477beSmrg version_type=osf 2991dc9477beSmrg need_lib_prefix=no 2992dc9477beSmrg need_version=no 299344584a44Smrg soname_spec='$libname$release$shared_ext$major' 299444584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 2995dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 2996dc9477beSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 299744584a44Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2998c27c18e8Smrg ;; 299906c34b88Smrg 3000dc9477beSmrgrdos*) 3001dc9477beSmrg dynamic_linker=no 3002dc9477beSmrg ;; 3003dc9477beSmrg 3004dc9477beSmrgsolaris*) 300506c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 300606c34b88Smrg need_lib_prefix=no 300706c34b88Smrg need_version=no 300844584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 300944584a44Smrg soname_spec='$libname$release$shared_ext$major' 3010dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 3011dc9477beSmrg shlibpath_overrides_runpath=yes 301206c34b88Smrg hardcode_into_libs=yes 3013dc9477beSmrg # ldd complains unless libraries are executable 3014dc9477beSmrg postinstall_cmds='chmod +x $lib' 301506c34b88Smrg ;; 3016c43cc173Smrg 3017dc9477beSmrgsunos4*) 3018dc9477beSmrg version_type=sunos 301944584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' 3020dc9477beSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 3021dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 3022dc9477beSmrg shlibpath_overrides_runpath=yes 302344584a44Smrg if test yes = "$with_gnu_ld"; then 3024dc9477beSmrg need_lib_prefix=no 3025dc9477beSmrg fi 3026dc9477beSmrg need_version=yes 3027c27c18e8Smrg ;; 3028c43cc173Smrg 3029dc9477beSmrgsysv4 | sysv4.3*) 303006c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 303144584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 303244584a44Smrg soname_spec='$libname$release$shared_ext$major' 303306c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 3034dc9477beSmrg case $host_vendor in 3035dc9477beSmrg sni) 3036dc9477beSmrg shlibpath_overrides_runpath=no 3037dc9477beSmrg need_lib_prefix=no 3038dc9477beSmrg runpath_var=LD_RUN_PATH 303906c34b88Smrg ;; 3040dc9477beSmrg siemens) 3041dc9477beSmrg need_lib_prefix=no 304206c34b88Smrg ;; 3043dc9477beSmrg motorola) 3044dc9477beSmrg need_lib_prefix=no 3045dc9477beSmrg need_version=no 3046dc9477beSmrg shlibpath_overrides_runpath=no 3047dc9477beSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 304806c34b88Smrg ;; 304906c34b88Smrg esac 305006c34b88Smrg ;; 3051c43cc173Smrg 3052dc9477beSmrgsysv4*MP*) 305344584a44Smrg if test -d /usr/nec; then 3054dc9477beSmrg version_type=linux # correct to gnu/linux during the next big refactor 305544584a44Smrg library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' 305644584a44Smrg soname_spec='$libname$shared_ext.$major' 3057dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 3058dc9477beSmrg fi 305906c34b88Smrg ;; 3060c43cc173Smrg 3061dc9477beSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 306244584a44Smrg version_type=sco 306306c34b88Smrg need_lib_prefix=no 306406c34b88Smrg need_version=no 306544584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' 306644584a44Smrg soname_spec='$libname$release$shared_ext$major' 306706c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 3068dc9477beSmrg shlibpath_overrides_runpath=yes 3069dc9477beSmrg hardcode_into_libs=yes 307044584a44Smrg if test yes = "$with_gnu_ld"; then 3071dc9477beSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 3072c27c18e8Smrg else 3073dc9477beSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 307406c34b88Smrg case $host_os in 3075dc9477beSmrg sco3.2v5*) 3076dc9477beSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 3077dc9477beSmrg ;; 307806c34b88Smrg esac 3079c27c18e8Smrg fi 3080dc9477beSmrg sys_lib_dlsearch_path_spec='/usr/lib' 308106c34b88Smrg ;; 3082c43cc173Smrg 3083dc9477beSmrgtpf*) 3084dc9477beSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 308506c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 308606c34b88Smrg need_lib_prefix=no 308706c34b88Smrg need_version=no 308844584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 308906c34b88Smrg shlibpath_var=LD_LIBRARY_PATH 309006c34b88Smrg shlibpath_overrides_runpath=no 309106c34b88Smrg hardcode_into_libs=yes 309206c34b88Smrg ;; 3093c43cc173Smrg 3094dc9477beSmrguts4*) 309506c34b88Smrg version_type=linux # correct to gnu/linux during the next big refactor 309644584a44Smrg library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' 309744584a44Smrg soname_spec='$libname$release$shared_ext$major' 3098dc9477beSmrg shlibpath_var=LD_LIBRARY_PATH 309906c34b88Smrg ;; 3100c43cc173Smrg 3101dc9477beSmrg*) 310206c34b88Smrg dynamic_linker=no 310306c34b88Smrg ;; 3104dc9477beSmrgesac 3105dc9477beSmrgAC_MSG_RESULT([$dynamic_linker]) 310644584a44Smrgtest no = "$dynamic_linker" && can_build_shared=no 3107c43cc173Smrg 3108dc9477beSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 310944584a44Smrgif test yes = "$GCC"; then 3110dc9477beSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 3111dc9477beSmrgfi 3112c43cc173Smrg 311344584a44Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then 311444584a44Smrg sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec 3115dc9477beSmrgfi 311644584a44Smrg 311744584a44Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then 311844584a44Smrg sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec 3119dc9477beSmrgfi 3120c43cc173Smrg 312144584a44Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls... 312244584a44Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec 312344584a44Smrg 312444584a44Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code 312544584a44Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" 312644584a44Smrg 312744584a44Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool 312844584a44Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH 312944584a44Smrg 3130dc9477beSmrg_LT_DECL([], [variables_saved_for_relink], [1], 3131dc9477beSmrg [Variables whose values should be saved in libtool wrapper scripts and 3132dc9477beSmrg restored at link time]) 3133dc9477beSmrg_LT_DECL([], [need_lib_prefix], [0], 3134dc9477beSmrg [Do we need the "lib" prefix for modules?]) 3135dc9477beSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 3136dc9477beSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 3137dc9477beSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 3138dc9477beSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 3139dc9477beSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 3140dc9477beSmrg [Is shlibpath searched before the hard-coded library search path?]) 3141dc9477beSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 3142dc9477beSmrg_LT_DECL([], [library_names_spec], [1], 3143dc9477beSmrg [[List of archive names. First name is the real one, the rest are links. 3144dc9477beSmrg The last name is the one that the linker finds with -lNAME]]) 3145dc9477beSmrg_LT_DECL([], [soname_spec], [1], 3146dc9477beSmrg [[The coded name of the library, if different from the real name]]) 3147dc9477beSmrg_LT_DECL([], [install_override_mode], [1], 3148dc9477beSmrg [Permission mode override for installation of shared libraries]) 3149dc9477beSmrg_LT_DECL([], [postinstall_cmds], [2], 3150dc9477beSmrg [Command to use after installation of a shared archive]) 3151dc9477beSmrg_LT_DECL([], [postuninstall_cmds], [2], 3152dc9477beSmrg [Command to use after uninstallation of a shared archive]) 3153dc9477beSmrg_LT_DECL([], [finish_cmds], [2], 3154dc9477beSmrg [Commands used to finish a libtool library installation in a directory]) 3155dc9477beSmrg_LT_DECL([], [finish_eval], [1], 3156dc9477beSmrg [[As "finish_cmds", except a single script fragment to be evaled but 3157dc9477beSmrg not shown]]) 3158dc9477beSmrg_LT_DECL([], [hardcode_into_libs], [0], 3159dc9477beSmrg [Whether we should hardcode library paths into libraries]) 3160dc9477beSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 3161dc9477beSmrg [Compile-time system search path for libraries]) 316244584a44Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], 316344584a44Smrg [Detected run-time system search path for libraries]) 316444584a44Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2], 316544584a44Smrg [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) 3166dc9477beSmrg])# _LT_SYS_DYNAMIC_LINKER 316721e67964Smrg 316821e67964Smrg 3169dc9477beSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 3170dc9477beSmrg# -------------------------- 317144584a44Smrg# find a file program that can recognize shared library 3172dc9477beSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 3173dc9477beSmrg[m4_require([_LT_DECL_EGREP])dnl 3174dc9477beSmrgAC_MSG_CHECKING([for $1]) 3175dc9477beSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 3176dc9477beSmrg[case $MAGIC_CMD in 3177dc9477beSmrg[[\\/*] | ?:[\\/]*]) 317844584a44Smrg lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. 3179dc9477beSmrg ;; 3180dc9477beSmrg*) 318144584a44Smrg lt_save_MAGIC_CMD=$MAGIC_CMD 318244584a44Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3183dc9477beSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 3184dc9477beSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 3185dc9477beSmrgdnl not every word. This closes a longstanding sh security hole. 3186dc9477beSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 3187dc9477beSmrg for ac_dir in $ac_dummy; do 318844584a44Smrg IFS=$lt_save_ifs 3189dc9477beSmrg test -z "$ac_dir" && ac_dir=. 319044584a44Smrg if test -f "$ac_dir/$1"; then 319144584a44Smrg lt_cv_path_MAGIC_CMD=$ac_dir/"$1" 3192dc9477beSmrg if test -n "$file_magic_test_file"; then 3193dc9477beSmrg case $deplibs_check_method in 3194dc9477beSmrg "file_magic "*) 3195dc9477beSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 319644584a44Smrg MAGIC_CMD=$lt_cv_path_MAGIC_CMD 3197dc9477beSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 3198dc9477beSmrg $EGREP "$file_magic_regex" > /dev/null; then 3199dc9477beSmrg : 3200dc9477beSmrg else 3201dc9477beSmrg cat <<_LT_EOF 1>&2 320221e67964Smrg 3203dc9477beSmrg*** Warning: the command libtool uses to detect shared libraries, 3204dc9477beSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 3205dc9477beSmrg*** The result is that libtool may fail to recognize shared libraries 3206dc9477beSmrg*** as such. This will affect the creation of libtool libraries that 3207dc9477beSmrg*** depend on shared libraries, but programs linked with such libtool 3208dc9477beSmrg*** libraries will work regardless of this problem. Nevertheless, you 3209dc9477beSmrg*** may want to report the problem to your system manager and/or to 3210dc9477beSmrg*** bug-libtool@gnu.org 321121e67964Smrg 3212dc9477beSmrg_LT_EOF 3213dc9477beSmrg fi ;; 3214dc9477beSmrg esac 3215dc9477beSmrg fi 3216dc9477beSmrg break 3217dc9477beSmrg fi 3218dc9477beSmrg done 321944584a44Smrg IFS=$lt_save_ifs 322044584a44Smrg MAGIC_CMD=$lt_save_MAGIC_CMD 322106c34b88Smrg ;; 3222dc9477beSmrgesac]) 322344584a44SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD 3224dc9477beSmrgif test -n "$MAGIC_CMD"; then 3225dc9477beSmrg AC_MSG_RESULT($MAGIC_CMD) 3226dc9477beSmrgelse 3227dc9477beSmrg AC_MSG_RESULT(no) 3228dc9477beSmrgfi 3229dc9477beSmrg_LT_DECL([], [MAGIC_CMD], [0], 3230dc9477beSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3231dc9477beSmrg])# _LT_PATH_TOOL_PREFIX 323221e67964Smrg 3233dc9477beSmrg# Old name: 3234dc9477beSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3235dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 3236dc9477beSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 3237dc9477beSmrg 3238dc9477beSmrg 3239dc9477beSmrg# _LT_PATH_MAGIC 3240dc9477beSmrg# -------------- 324144584a44Smrg# find a file program that can recognize a shared library 3242dc9477beSmrgm4_defun([_LT_PATH_MAGIC], 3243dc9477beSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 3244dc9477beSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 3245dc9477beSmrg if test -n "$ac_tool_prefix"; then 3246dc9477beSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 324706c34b88Smrg else 3248dc9477beSmrg MAGIC_CMD=: 324906c34b88Smrg fi 3250dc9477beSmrgfi 3251dc9477beSmrg])# _LT_PATH_MAGIC 325221e67964Smrg 3253c43cc173Smrg 3254dc9477beSmrg# LT_PATH_LD 3255dc9477beSmrg# ---------- 3256dc9477beSmrg# find the pathname to the GNU or non-GNU linker 3257dc9477beSmrgAC_DEFUN([LT_PATH_LD], 3258dc9477beSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3259dc9477beSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 3260dc9477beSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3261dc9477beSmrgm4_require([_LT_DECL_SED])dnl 3262dc9477beSmrgm4_require([_LT_DECL_EGREP])dnl 3263dc9477beSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3264c43cc173Smrg 3265dc9477beSmrgAC_ARG_WITH([gnu-ld], 3266dc9477beSmrg [AS_HELP_STRING([--with-gnu-ld], 3267dc9477beSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 326844584a44Smrg [test no = "$withval" || with_gnu_ld=yes], 3269dc9477beSmrg [with_gnu_ld=no])dnl 3270dc9477beSmrg 3271dc9477beSmrgac_prog=ld 327244584a44Smrgif test yes = "$GCC"; then 3273dc9477beSmrg # Check if gcc -print-prog-name=ld gives a path. 3274dc9477beSmrg AC_MSG_CHECKING([for ld used by $CC]) 3275dc9477beSmrg case $host in 3276dc9477beSmrg *-*-mingw*) 327744584a44Smrg # gcc leaves a trailing carriage return, which upsets mingw 3278dc9477beSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 3279dc9477beSmrg *) 3280dc9477beSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 328106c34b88Smrg esac 3282dc9477beSmrg case $ac_prog in 3283dc9477beSmrg # Accept absolute paths. 3284dc9477beSmrg [[\\/]]* | ?:[[\\/]]*) 3285dc9477beSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 3286dc9477beSmrg # Canonicalize the pathname of ld 3287dc9477beSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3288dc9477beSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3289dc9477beSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 3290dc9477beSmrg done 329144584a44Smrg test -z "$LD" && LD=$ac_prog 3292dc9477beSmrg ;; 3293dc9477beSmrg "") 3294dc9477beSmrg # If it fails, then pretend we aren't using GCC. 3295dc9477beSmrg ac_prog=ld 3296dc9477beSmrg ;; 3297dc9477beSmrg *) 3298dc9477beSmrg # If it is relative, then search for the first ld in PATH. 3299dc9477beSmrg with_gnu_ld=unknown 3300dc9477beSmrg ;; 3301dc9477beSmrg esac 330244584a44Smrgelif test yes = "$with_gnu_ld"; then 3303dc9477beSmrg AC_MSG_CHECKING([for GNU ld]) 3304dc9477beSmrgelse 3305dc9477beSmrg AC_MSG_CHECKING([for non-GNU ld]) 3306dc9477beSmrgfi 3307dc9477beSmrgAC_CACHE_VAL(lt_cv_path_LD, 3308dc9477beSmrg[if test -z "$LD"; then 330944584a44Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 3310dc9477beSmrg for ac_dir in $PATH; do 331144584a44Smrg IFS=$lt_save_ifs 3312dc9477beSmrg test -z "$ac_dir" && ac_dir=. 3313dc9477beSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 331444584a44Smrg lt_cv_path_LD=$ac_dir/$ac_prog 3315dc9477beSmrg # Check to see if the program is GNU ld. I'd rather use --version, 3316dc9477beSmrg # but apparently some variants of GNU ld only accept -v. 3317dc9477beSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 3318dc9477beSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 3319dc9477beSmrg *GNU* | *'with BFD'*) 332044584a44Smrg test no != "$with_gnu_ld" && break 332106c34b88Smrg ;; 332206c34b88Smrg *) 332344584a44Smrg test yes != "$with_gnu_ld" && break 332406c34b88Smrg ;; 332506c34b88Smrg esac 3326dc9477beSmrg fi 3327dc9477beSmrg done 332844584a44Smrg IFS=$lt_save_ifs 3329dc9477beSmrgelse 333044584a44Smrg lt_cv_path_LD=$LD # Let the user override the test with a path. 3331dc9477beSmrgfi]) 333244584a44SmrgLD=$lt_cv_path_LD 3333dc9477beSmrgif test -n "$LD"; then 3334dc9477beSmrg AC_MSG_RESULT($LD) 3335dc9477beSmrgelse 3336dc9477beSmrg AC_MSG_RESULT(no) 3337dc9477beSmrgfi 3338dc9477beSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3339dc9477beSmrg_LT_PATH_LD_GNU 3340dc9477beSmrgAC_SUBST([LD]) 334121e67964Smrg 3342dc9477beSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3343dc9477beSmrg])# LT_PATH_LD 334421e67964Smrg 3345dc9477beSmrg# Old names: 3346dc9477beSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3347dc9477beSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3348dc9477beSmrgdnl aclocal-1.4 backwards compatibility: 3349dc9477beSmrgdnl AC_DEFUN([AM_PROG_LD], []) 3350dc9477beSmrgdnl AC_DEFUN([AC_PROG_LD], []) 335121e67964Smrg 3352c27c18e8Smrg 3353dc9477beSmrg# _LT_PATH_LD_GNU 3354dc9477beSmrg#- -------------- 3355dc9477beSmrgm4_defun([_LT_PATH_LD_GNU], 3356dc9477beSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 3357dc9477beSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 3358dc9477beSmrgcase `$LD -v 2>&1 </dev/null` in 3359dc9477beSmrg*GNU* | *'with BFD'*) 3360dc9477beSmrg lt_cv_prog_gnu_ld=yes 336106c34b88Smrg ;; 3362dc9477beSmrg*) 3363dc9477beSmrg lt_cv_prog_gnu_ld=no 336406c34b88Smrg ;; 3365dc9477beSmrgesac]) 3366dc9477beSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 3367dc9477beSmrg])# _LT_PATH_LD_GNU 3368c43cc173Smrg 336906c34b88Smrg 3370dc9477beSmrg# _LT_CMD_RELOAD 3371dc9477beSmrg# -------------- 3372dc9477beSmrg# find reload flag for linker 3373dc9477beSmrg# -- PORTME Some linkers may need a different reload flag. 3374dc9477beSmrgm4_defun([_LT_CMD_RELOAD], 3375dc9477beSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 3376dc9477beSmrg lt_cv_ld_reload_flag, 3377dc9477beSmrg [lt_cv_ld_reload_flag='-r']) 3378dc9477beSmrgreload_flag=$lt_cv_ld_reload_flag 3379dc9477beSmrgcase $reload_flag in 3380dc9477beSmrg"" | " "*) ;; 3381dc9477beSmrg*) reload_flag=" $reload_flag" ;; 338206c34b88Smrgesac 3383dc9477beSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 3384dc9477beSmrgcase $host_os in 3385dc9477beSmrg cygwin* | mingw* | pw32* | cegcc*) 338644584a44Smrg if test yes != "$GCC"; then 3387dc9477beSmrg reload_cmds=false 3388dc9477beSmrg fi 3389dc9477beSmrg ;; 3390dc9477beSmrg darwin*) 339144584a44Smrg if test yes = "$GCC"; then 339244584a44Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' 3393dc9477beSmrg else 3394dc9477beSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 3395dc9477beSmrg fi 3396dc9477beSmrg ;; 3397dc9477beSmrgesac 3398dc9477beSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3399dc9477beSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3400dc9477beSmrg])# _LT_CMD_RELOAD 340121e67964Smrg 340237eb1ca1Smrg 340344584a44Smrg# _LT_PATH_DD 340444584a44Smrg# ----------- 340544584a44Smrg# find a working dd 340644584a44Smrgm4_defun([_LT_PATH_DD], 340744584a44Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD], 340844584a44Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 340944584a44Smrgcat conftest.i conftest.i >conftest2.i 341044584a44Smrg: ${lt_DD:=$DD} 341144584a44SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], 341244584a44Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 341344584a44Smrg cmp -s conftest.i conftest.out \ 341444584a44Smrg && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: 341544584a44Smrgfi]) 341644584a44Smrgrm -f conftest.i conftest2.i conftest.out]) 341744584a44Smrg])# _LT_PATH_DD 341844584a44Smrg 341944584a44Smrg 342044584a44Smrg# _LT_CMD_TRUNCATE 342144584a44Smrg# ---------------- 342244584a44Smrg# find command to truncate a binary pipe 342344584a44Smrgm4_defun([_LT_CMD_TRUNCATE], 342444584a44Smrg[m4_require([_LT_PATH_DD]) 342544584a44SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], 342644584a44Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i 342744584a44Smrgcat conftest.i conftest.i >conftest2.i 342844584a44Smrglt_cv_truncate_bin= 342944584a44Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then 343044584a44Smrg cmp -s conftest.i conftest.out \ 343144584a44Smrg && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" 343244584a44Smrgfi 343344584a44Smrgrm -f conftest.i conftest2.i conftest.out 343444584a44Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) 343544584a44Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], 343644584a44Smrg [Command to truncate a binary pipe]) 343744584a44Smrg])# _LT_CMD_TRUNCATE 343844584a44Smrg 343944584a44Smrg 3440dc9477beSmrg# _LT_CHECK_MAGIC_METHOD 3441dc9477beSmrg# ---------------------- 3442dc9477beSmrg# how to check for library dependencies 3443dc9477beSmrg# -- PORTME fill in with the dynamic library characteristics 3444dc9477beSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3445dc9477beSmrg[m4_require([_LT_DECL_EGREP]) 3446dc9477beSmrgm4_require([_LT_DECL_OBJDUMP]) 3447dc9477beSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 3448dc9477beSmrglt_cv_deplibs_check_method, 3449dc9477beSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 3450dc9477beSmrglt_cv_file_magic_test_file= 3451dc9477beSmrglt_cv_deplibs_check_method='unknown' 3452dc9477beSmrg# Need to set the preceding variable on all platforms that support 3453dc9477beSmrg# interlibrary dependencies. 3454dc9477beSmrg# 'none' -- dependencies not supported. 345544584a44Smrg# 'unknown' -- same as none, but documents that we really don't know. 3456dc9477beSmrg# 'pass_all' -- all dependencies passed with no checks. 3457dc9477beSmrg# 'test_compile' -- check by making test program. 3458dc9477beSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 345944584a44Smrg# that responds to the $file_magic_cmd with a given extended regex. 346044584a44Smrg# If you have 'file' or equivalent on your system and you're not sure 346144584a44Smrg# whether 'pass_all' will *always* work, you probably want this one. 346221e67964Smrg 3463dc9477beSmrgcase $host_os in 3464dc9477beSmrgaix[[4-9]]*) 3465dc9477beSmrg lt_cv_deplibs_check_method=pass_all 3466dc9477beSmrg ;; 3467c43cc173Smrg 3468dc9477beSmrgbeos*) 3469dc9477beSmrg lt_cv_deplibs_check_method=pass_all 3470dc9477beSmrg ;; 3471c43cc173Smrg 3472dc9477beSmrgbsdi[[45]]*) 3473dc9477beSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3474dc9477beSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3475dc9477beSmrg lt_cv_file_magic_test_file=/shlib/libc.so 347606c34b88Smrg ;; 347706c34b88Smrg 3478dc9477beSmrgcygwin*) 3479dc9477beSmrg # func_win32_libid is a shell function defined in ltmain.sh 3480dc9477beSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3481dc9477beSmrg lt_cv_file_magic_cmd='func_win32_libid' 3482dc9477beSmrg ;; 348306c34b88Smrg 3484dc9477beSmrgmingw* | pw32*) 3485dc9477beSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3486dc9477beSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3487dc9477beSmrg # unless we find 'file', for example because we are cross-compiling. 348844584a44Smrg if ( file / ) >/dev/null 2>&1; then 3489dc9477beSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3490dc9477beSmrg lt_cv_file_magic_cmd='func_win32_libid' 3491dc9477beSmrg else 3492dc9477beSmrg # Keep this pattern in sync with the one in func_win32_libid. 3493dc9477beSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 3494dc9477beSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3495dc9477beSmrg fi 349606c34b88Smrg ;; 3497c43cc173Smrg 3498dc9477beSmrgcegcc*) 3499dc9477beSmrg # use the weaker test based on 'objdump'. See mingw*. 3500dc9477beSmrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3501dc9477beSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3502dc9477beSmrg ;; 3503c43cc173Smrg 3504dc9477beSmrgdarwin* | rhapsody*) 3505dc9477beSmrg lt_cv_deplibs_check_method=pass_all 3506dc9477beSmrg ;; 3507c43cc173Smrg 3508dc9477beSmrgfreebsd* | dragonfly*) 3509dc9477beSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3510dc9477beSmrg case $host_cpu in 3511dc9477beSmrg i*86 ) 3512dc9477beSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3513dc9477beSmrg # Let's accept both of them until this is cleared up. 3514dc9477beSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3515dc9477beSmrg lt_cv_file_magic_cmd=/usr/bin/file 3516dc9477beSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3517dc9477beSmrg ;; 3518dc9477beSmrg esac 351906c34b88Smrg else 3520dc9477beSmrg lt_cv_deplibs_check_method=pass_all 352106c34b88Smrg fi 3522dc9477beSmrg ;; 3523c43cc173Smrg 352406c34b88Smrghaiku*) 352506c34b88Smrg lt_cv_deplibs_check_method=pass_all 352606c34b88Smrg ;; 3527c43cc173Smrg 352806c34b88Smrghpux10.20* | hpux11*) 352906c34b88Smrg lt_cv_file_magic_cmd=/usr/bin/file 353006c34b88Smrg case $host_cpu in 353106c34b88Smrg ia64*) 353206c34b88Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 353306c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 353406c34b88Smrg ;; 353506c34b88Smrg hppa*64*) 353606c34b88Smrg [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]'] 353706c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 353806c34b88Smrg ;; 353906c34b88Smrg *) 354006c34b88Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 354106c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 354206c34b88Smrg ;; 354306c34b88Smrg esac 354406c34b88Smrg ;; 3545c43cc173Smrg 354606c34b88Smrginterix[[3-9]]*) 354706c34b88Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 354806c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 354906c34b88Smrg ;; 3550c43cc173Smrg 355106c34b88Smrgirix5* | irix6* | nonstopux*) 355206c34b88Smrg case $LD in 355306c34b88Smrg *-32|*"-32 ") libmagic=32-bit;; 355406c34b88Smrg *-n32|*"-n32 ") libmagic=N32;; 355506c34b88Smrg *-64|*"-64 ") libmagic=64-bit;; 355606c34b88Smrg *) libmagic=never-match;; 355706c34b88Smrg esac 355806c34b88Smrg lt_cv_deplibs_check_method=pass_all 355906c34b88Smrg ;; 3560c43cc173Smrg 356106c34b88Smrg# This must be glibc/ELF. 356244584a44Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 356306c34b88Smrg lt_cv_deplibs_check_method=pass_all 356406c34b88Smrg ;; 3565c43cc173Smrg 356606c34b88Smrgnetbsd*) 356706c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 356806c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 356906c34b88Smrg else 357006c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 357106c34b88Smrg fi 357206c34b88Smrg ;; 3573c43cc173Smrg 357406c34b88Smrgnewos6*) 357506c34b88Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 357606c34b88Smrg lt_cv_file_magic_cmd=/usr/bin/file 357706c34b88Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 357806c34b88Smrg ;; 3579c27c18e8Smrg 358006c34b88Smrg*nto* | *qnx*) 358106c34b88Smrg lt_cv_deplibs_check_method=pass_all 358206c34b88Smrg ;; 3583c27c18e8Smrg 358444584a44Smrgopenbsd* | bitrig*) 358544584a44Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 358606c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 358706c34b88Smrg else 358806c34b88Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 358906c34b88Smrg fi 359006c34b88Smrg ;; 359121e67964Smrg 359206c34b88Smrgosf3* | osf4* | osf5*) 359306c34b88Smrg lt_cv_deplibs_check_method=pass_all 359406c34b88Smrg ;; 3595c43cc173Smrg 359606c34b88Smrgrdos*) 359706c34b88Smrg lt_cv_deplibs_check_method=pass_all 359806c34b88Smrg ;; 3599c43cc173Smrg 360006c34b88Smrgsolaris*) 360106c34b88Smrg lt_cv_deplibs_check_method=pass_all 360206c34b88Smrg ;; 3603c43cc173Smrg 360406c34b88Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 360506c34b88Smrg lt_cv_deplibs_check_method=pass_all 360606c34b88Smrg ;; 3607c43cc173Smrg 360806c34b88Smrgsysv4 | sysv4.3*) 360906c34b88Smrg case $host_vendor in 361006c34b88Smrg motorola) 361106c34b88Smrg 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]]' 361206c34b88Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 361306c34b88Smrg ;; 361406c34b88Smrg ncr) 361506c34b88Smrg lt_cv_deplibs_check_method=pass_all 361606c34b88Smrg ;; 361706c34b88Smrg sequent) 361806c34b88Smrg lt_cv_file_magic_cmd='/bin/file' 361906c34b88Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 362006c34b88Smrg ;; 362106c34b88Smrg sni) 362206c34b88Smrg lt_cv_file_magic_cmd='/bin/file' 362306c34b88Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 362406c34b88Smrg lt_cv_file_magic_test_file=/lib/libc.so 362506c34b88Smrg ;; 362606c34b88Smrg siemens) 362706c34b88Smrg lt_cv_deplibs_check_method=pass_all 362806c34b88Smrg ;; 362906c34b88Smrg pc) 363006c34b88Smrg lt_cv_deplibs_check_method=pass_all 363106c34b88Smrg ;; 363206c34b88Smrg esac 363306c34b88Smrg ;; 3634c43cc173Smrg 363506c34b88Smrgtpf*) 363606c34b88Smrg lt_cv_deplibs_check_method=pass_all 363706c34b88Smrg ;; 363844584a44Smrgos2*) 363944584a44Smrg lt_cv_deplibs_check_method=pass_all 364044584a44Smrg ;; 364106c34b88Smrgesac 364206c34b88Smrg]) 3643c43cc173Smrg 364406c34b88Smrgfile_magic_glob= 364506c34b88Smrgwant_nocaseglob=no 364606c34b88Smrgif test "$build" = "$host"; then 364706c34b88Smrg case $host_os in 364806c34b88Smrg mingw* | pw32*) 364906c34b88Smrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 365006c34b88Smrg want_nocaseglob=yes 365106c34b88Smrg else 365206c34b88Smrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 365306c34b88Smrg fi 365406c34b88Smrg ;; 365506c34b88Smrg esac 365606c34b88Smrgfi 3657c43cc173Smrg 365806c34b88Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 365906c34b88Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 366006c34b88Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3661c43cc173Smrg 366206c34b88Smrg_LT_DECL([], [deplibs_check_method], [1], 366306c34b88Smrg [Method to check whether dependent libraries are shared objects]) 366406c34b88Smrg_LT_DECL([], [file_magic_cmd], [1], 366506c34b88Smrg [Command to use when deplibs_check_method = "file_magic"]) 366606c34b88Smrg_LT_DECL([], [file_magic_glob], [1], 366706c34b88Smrg [How to find potential files when deplibs_check_method = "file_magic"]) 366806c34b88Smrg_LT_DECL([], [want_nocaseglob], [1], 366906c34b88Smrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 367006c34b88Smrg])# _LT_CHECK_MAGIC_METHOD 367106c34b88Smrg 367206c34b88Smrg 367306c34b88Smrg# LT_PATH_NM 367406c34b88Smrg# ---------- 367506c34b88Smrg# find the pathname to a BSD- or MS-compatible name lister 367606c34b88SmrgAC_DEFUN([LT_PATH_NM], 367706c34b88Smrg[AC_REQUIRE([AC_PROG_CC])dnl 367806c34b88SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 367906c34b88Smrg[if test -n "$NM"; then 368006c34b88Smrg # Let the user override the test. 368144584a44Smrg lt_cv_path_NM=$NM 368206c34b88Smrgelse 368344584a44Smrg lt_nm_to_check=${ac_tool_prefix}nm 368406c34b88Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 368506c34b88Smrg lt_nm_to_check="$lt_nm_to_check nm" 368606c34b88Smrg fi 368706c34b88Smrg for lt_tmp_nm in $lt_nm_to_check; do 368844584a44Smrg lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR 368906c34b88Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 369044584a44Smrg IFS=$lt_save_ifs 369106c34b88Smrg test -z "$ac_dir" && ac_dir=. 369244584a44Smrg tmp_nm=$ac_dir/$lt_tmp_nm 369344584a44Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then 369406c34b88Smrg # Check to see if the nm accepts a BSD-compat flag. 369544584a44Smrg # Adding the 'sed 1q' prevents false positives on HP-UX, which says: 369606c34b88Smrg # nm: unknown option "B" ignored 369706c34b88Smrg # Tru64's nm complains that /dev/null is an invalid object file 369844584a44Smrg # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty 369944584a44Smrg case $build_os in 370044584a44Smrg mingw*) lt_bad_file=conftest.nm/nofile ;; 370144584a44Smrg *) lt_bad_file=/dev/null ;; 370244584a44Smrg esac 370344584a44Smrg case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in 370444584a44Smrg *$lt_bad_file* | *'Invalid file or object type'*) 370506c34b88Smrg lt_cv_path_NM="$tmp_nm -B" 370644584a44Smrg break 2 3707c27c18e8Smrg ;; 3708c27c18e8Smrg *) 370906c34b88Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 371006c34b88Smrg */dev/null*) 371106c34b88Smrg lt_cv_path_NM="$tmp_nm -p" 371244584a44Smrg break 2 371306c34b88Smrg ;; 371406c34b88Smrg *) 371506c34b88Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 371606c34b88Smrg continue # so that we can try to find one that supports BSD flags 371706c34b88Smrg ;; 371806c34b88Smrg esac 3719c27c18e8Smrg ;; 3720c27c18e8Smrg esac 3721c27c18e8Smrg fi 372206c34b88Smrg done 372344584a44Smrg IFS=$lt_save_ifs 372406c34b88Smrg done 372506c34b88Smrg : ${lt_cv_path_NM=no} 372606c34b88Smrgfi]) 372744584a44Smrgif test no != "$lt_cv_path_NM"; then 372844584a44Smrg NM=$lt_cv_path_NM 372906c34b88Smrgelse 373006c34b88Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 373106c34b88Smrg if test -n "$DUMPBIN"; then : 373206c34b88Smrg # Let the user override the test. 373306c34b88Smrg else 373406c34b88Smrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 373544584a44Smrg case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in 373606c34b88Smrg *COFF*) 373744584a44Smrg DUMPBIN="$DUMPBIN -symbols -headers" 3738c27c18e8Smrg ;; 373906c34b88Smrg *) 374006c34b88Smrg DUMPBIN=: 3741c27c18e8Smrg ;; 374206c34b88Smrg esac 374306c34b88Smrg fi 374406c34b88Smrg AC_SUBST([DUMPBIN]) 374544584a44Smrg if test : != "$DUMPBIN"; then 374644584a44Smrg NM=$DUMPBIN 374706c34b88Smrg fi 374806c34b88Smrgfi 374906c34b88Smrgtest -z "$NM" && NM=nm 375006c34b88SmrgAC_SUBST([NM]) 375106c34b88Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3752c43cc173Smrg 375306c34b88SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 375406c34b88Smrg [lt_cv_nm_interface="BSD nm" 375506c34b88Smrg echo "int some_variable = 0;" > conftest.$ac_ext 375606c34b88Smrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 375706c34b88Smrg (eval "$ac_compile" 2>conftest.err) 375806c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 375906c34b88Smrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 376006c34b88Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 376106c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 376206c34b88Smrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 376306c34b88Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 376406c34b88Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 376506c34b88Smrg lt_cv_nm_interface="MS dumpbin" 376606c34b88Smrg fi 376706c34b88Smrg rm -f conftest*]) 376806c34b88Smrg])# LT_PATH_NM 3769c43cc173Smrg 377006c34b88Smrg# Old names: 377106c34b88SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 377206c34b88SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 377306c34b88Smrgdnl aclocal-1.4 backwards compatibility: 377406c34b88Smrgdnl AC_DEFUN([AM_PROG_NM], []) 377506c34b88Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3776c43cc173Smrg 377706c34b88Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 377806c34b88Smrg# -------------------------------- 377906c34b88Smrg# how to determine the name of the shared library 378006c34b88Smrg# associated with a specific link library. 378106c34b88Smrg# -- PORTME fill in with the dynamic library characteristics 378206c34b88Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 378306c34b88Smrg[m4_require([_LT_DECL_EGREP]) 378406c34b88Smrgm4_require([_LT_DECL_OBJDUMP]) 378506c34b88Smrgm4_require([_LT_DECL_DLLTOOL]) 378606c34b88SmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 378706c34b88Smrglt_cv_sharedlib_from_linklib_cmd, 378806c34b88Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3789c43cc173Smrg 379006c34b88Smrgcase $host_os in 379106c34b88Smrgcygwin* | mingw* | pw32* | cegcc*) 379244584a44Smrg # two different shell functions defined in ltmain.sh; 379344584a44Smrg # decide which one to use based on capabilities of $DLLTOOL 379406c34b88Smrg case `$DLLTOOL --help 2>&1` in 379506c34b88Smrg *--identify-strict*) 379606c34b88Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 379706c34b88Smrg ;; 379806c34b88Smrg *) 379906c34b88Smrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 380006c34b88Smrg ;; 380106c34b88Smrg esac 380206c34b88Smrg ;; 380306c34b88Smrg*) 380406c34b88Smrg # fallback: assume linklib IS sharedlib 380544584a44Smrg lt_cv_sharedlib_from_linklib_cmd=$ECHO 380606c34b88Smrg ;; 380706c34b88Smrgesac 380806c34b88Smrg]) 380906c34b88Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 381006c34b88Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3811c43cc173Smrg 381206c34b88Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 381306c34b88Smrg [Command to associate shared and link libraries]) 381406c34b88Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3815c43cc173Smrg 3816c43cc173Smrg 381706c34b88Smrg# _LT_PATH_MANIFEST_TOOL 381806c34b88Smrg# ---------------------- 381906c34b88Smrg# locate the manifest tool 382006c34b88Smrgm4_defun([_LT_PATH_MANIFEST_TOOL], 382106c34b88Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 382206c34b88Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 382306c34b88SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 382406c34b88Smrg [lt_cv_path_mainfest_tool=no 382506c34b88Smrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 382606c34b88Smrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 382706c34b88Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 382806c34b88Smrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 382906c34b88Smrg lt_cv_path_mainfest_tool=yes 383006c34b88Smrg fi 383106c34b88Smrg rm -f conftest*]) 383244584a44Smrgif test yes != "$lt_cv_path_mainfest_tool"; then 383306c34b88Smrg MANIFEST_TOOL=: 383406c34b88Smrgfi 383506c34b88Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 383606c34b88Smrg])# _LT_PATH_MANIFEST_TOOL 3837c43cc173Smrg 3838c43cc173Smrg 383944584a44Smrg# _LT_DLL_DEF_P([FILE]) 384044584a44Smrg# --------------------- 384144584a44Smrg# True iff FILE is a Windows DLL '.def' file. 384244584a44Smrg# Keep in sync with func_dll_def_p in the libtool script 384344584a44SmrgAC_DEFUN([_LT_DLL_DEF_P], 384444584a44Smrg[dnl 384544584a44Smrg test DEF = "`$SED -n dnl 384644584a44Smrg -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace 384744584a44Smrg -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments 384844584a44Smrg -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl 384944584a44Smrg -e q dnl Only consider the first "real" line 385044584a44Smrg $1`" dnl 385144584a44Smrg])# _LT_DLL_DEF_P 385244584a44Smrg 385344584a44Smrg 385406c34b88Smrg# LT_LIB_M 385506c34b88Smrg# -------- 385606c34b88Smrg# check for math library 385706c34b88SmrgAC_DEFUN([LT_LIB_M], 385806c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 385906c34b88SmrgLIBM= 386006c34b88Smrgcase $host in 386106c34b88Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 386206c34b88Smrg # These system don't have libm, or don't need it 386306c34b88Smrg ;; 386406c34b88Smrg*-ncr-sysv4.3*) 386544584a44Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) 386606c34b88Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 386706c34b88Smrg ;; 386806c34b88Smrg*) 386944584a44Smrg AC_CHECK_LIB(m, cos, LIBM=-lm) 387006c34b88Smrg ;; 387106c34b88Smrgesac 387206c34b88SmrgAC_SUBST([LIBM]) 387306c34b88Smrg])# LT_LIB_M 387406c34b88Smrg 387506c34b88Smrg# Old name: 387606c34b88SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 387706c34b88Smrgdnl aclocal-1.4 backwards compatibility: 387806c34b88Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 387906c34b88Smrg 388006c34b88Smrg 388106c34b88Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 388206c34b88Smrg# ------------------------------- 388306c34b88Smrgm4_defun([_LT_COMPILER_NO_RTTI], 388406c34b88Smrg[m4_require([_LT_TAG_COMPILER])dnl 388506c34b88Smrg 388606c34b88Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 388706c34b88Smrg 388844584a44Smrgif test yes = "$GCC"; then 388906c34b88Smrg case $cc_basename in 389006c34b88Smrg nvcc*) 389106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 389206c34b88Smrg *) 389306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 389406c34b88Smrg esac 389506c34b88Smrg 389606c34b88Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 389706c34b88Smrg lt_cv_prog_compiler_rtti_exceptions, 389806c34b88Smrg [-fno-rtti -fno-exceptions], [], 389906c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 390006c34b88Smrgfi 390106c34b88Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 390206c34b88Smrg [Compiler flag to turn off builtin functions]) 390306c34b88Smrg])# _LT_COMPILER_NO_RTTI 3904c43cc173Smrg 3905c43cc173Smrg 390606c34b88Smrg# _LT_CMD_GLOBAL_SYMBOLS 390706c34b88Smrg# ---------------------- 390806c34b88Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 390906c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 391006c34b88SmrgAC_REQUIRE([AC_PROG_CC])dnl 391106c34b88SmrgAC_REQUIRE([AC_PROG_AWK])dnl 391206c34b88SmrgAC_REQUIRE([LT_PATH_NM])dnl 391306c34b88SmrgAC_REQUIRE([LT_PATH_LD])dnl 391406c34b88Smrgm4_require([_LT_DECL_SED])dnl 391506c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 391606c34b88Smrgm4_require([_LT_TAG_COMPILER])dnl 3917c43cc173Smrg 391806c34b88Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 391906c34b88SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 392006c34b88SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 392106c34b88Smrg[ 392206c34b88Smrg# These are sane defaults that work on at least a few old systems. 392306c34b88Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3924c43cc173Smrg 392506c34b88Smrg# Character class describing NM global symbol codes. 392606c34b88Smrgsymcode='[[BCDEGRST]]' 3927c43cc173Smrg 392806c34b88Smrg# Regexp to match symbols that can be accessed directly from C. 392906c34b88Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 393037eb1ca1Smrg 393106c34b88Smrg# Define system-specific variables. 393206c34b88Smrgcase $host_os in 393306c34b88Smrgaix*) 393406c34b88Smrg symcode='[[BCDT]]' 393506c34b88Smrg ;; 393606c34b88Smrgcygwin* | mingw* | pw32* | cegcc*) 393706c34b88Smrg symcode='[[ABCDGISTW]]' 393806c34b88Smrg ;; 393906c34b88Smrghpux*) 394044584a44Smrg if test ia64 = "$host_cpu"; then 394106c34b88Smrg symcode='[[ABCDEGRST]]' 3942c27c18e8Smrg fi 3943c27c18e8Smrg ;; 394406c34b88Smrgirix* | nonstopux*) 394506c34b88Smrg symcode='[[BCDEGRST]]' 394606c34b88Smrg ;; 394706c34b88Smrgosf*) 394806c34b88Smrg symcode='[[BCDEGQRST]]' 394906c34b88Smrg ;; 395006c34b88Smrgsolaris*) 395106c34b88Smrg symcode='[[BDRT]]' 395206c34b88Smrg ;; 395306c34b88Smrgsco3.2v5*) 395406c34b88Smrg symcode='[[DT]]' 395506c34b88Smrg ;; 395606c34b88Smrgsysv4.2uw2*) 395706c34b88Smrg symcode='[[DT]]' 395806c34b88Smrg ;; 395906c34b88Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 396006c34b88Smrg symcode='[[ABDT]]' 396106c34b88Smrg ;; 396206c34b88Smrgsysv4) 396306c34b88Smrg symcode='[[DFNSTU]]' 396406c34b88Smrg ;; 3965c27c18e8Smrgesac 3966c43cc173Smrg 396706c34b88Smrg# If we're using GNU nm, then use its standard symbol codes. 396806c34b88Smrgcase `$NM -V 2>&1` in 396906c34b88Smrg*GNU* | *'with BFD'*) 397006c34b88Smrg symcode='[[ABCDGIRSTW]]' ;; 397106c34b88Smrgesac 3972c27c18e8Smrg 397344584a44Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 397444584a44Smrg # Gets list of data symbols to import. 397544584a44Smrg lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" 397644584a44Smrg # Adjust the below global symbol transforms to fixup imported variables. 397744584a44Smrg lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" 397844584a44Smrg lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" 397944584a44Smrg lt_c_name_lib_hook="\ 398044584a44Smrg -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ 398144584a44Smrg -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" 398244584a44Smrgelse 398344584a44Smrg # Disable hooks by default. 398444584a44Smrg lt_cv_sys_global_symbol_to_import= 398544584a44Smrg lt_cdecl_hook= 398644584a44Smrg lt_c_name_hook= 398744584a44Smrg lt_c_name_lib_hook= 398844584a44Smrgfi 398944584a44Smrg 399006c34b88Smrg# Transform an extracted symbol line into a proper C declaration. 399106c34b88Smrg# Some systems (esp. on ia64) link data and code symbols differently, 399206c34b88Smrg# so use this general approach. 399344584a44Smrglt_cv_sys_global_symbol_to_cdecl="sed -n"\ 399444584a44Smrg$lt_cdecl_hook\ 399544584a44Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\ 399644584a44Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" 3997c27c18e8Smrg 399806c34b88Smrg# Transform an extracted symbol line into symbol name and symbol address 399944584a44Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n"\ 400044584a44Smrg$lt_c_name_hook\ 400144584a44Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 400244584a44Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" 400344584a44Smrg 400444584a44Smrg# Transform an extracted symbol line into symbol name with lib prefix and 400544584a44Smrg# symbol address. 400644584a44Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ 400744584a44Smrg$lt_c_name_lib_hook\ 400844584a44Smrg" -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ 400944584a44Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ 401044584a44Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" 4011c43cc173Smrg 401206c34b88Smrg# Handle CRLF in mingw tool chain 401306c34b88Smrgopt_cr= 401406c34b88Smrgcase $build_os in 401506c34b88Smrgmingw*) 401606c34b88Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 401706c34b88Smrg ;; 401806c34b88Smrgesac 401906c34b88Smrg 402006c34b88Smrg# Try without a prefix underscore, then with it. 402106c34b88Smrgfor ac_symprfx in "" "_"; do 402206c34b88Smrg 402306c34b88Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 402406c34b88Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 402506c34b88Smrg 402606c34b88Smrg # Write the raw and C identifiers. 402706c34b88Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 402844584a44Smrg # Fake it for dumpbin and say T for any non-static function, 402944584a44Smrg # D for any global variable and I for any imported variable. 403006c34b88Smrg # Also find C++ and __fastcall symbols from MSVC++, 403106c34b88Smrg # which start with @ or ?. 403206c34b88Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 403306c34b88Smrg" {last_section=section; section=\$ 3};"\ 403406c34b88Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 403506c34b88Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 403644584a44Smrg" /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ 403744584a44Smrg" /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ 403844584a44Smrg" /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ 403906c34b88Smrg" \$ 0!~/External *\|/{next};"\ 404006c34b88Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 404106c34b88Smrg" {if(hide[section]) next};"\ 404244584a44Smrg" {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ 404344584a44Smrg" {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ 404444584a44Smrg" s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ 404544584a44Smrg" s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ 404606c34b88Smrg" ' prfx=^$ac_symprfx]" 404706c34b88Smrg else 404806c34b88Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 404906c34b88Smrg fi 405006c34b88Smrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 4051c43cc173Smrg 405206c34b88Smrg # Check to see that the pipe works correctly. 405306c34b88Smrg pipe_works=no 4054c43cc173Smrg 405506c34b88Smrg rm -f conftest* 405606c34b88Smrg cat > conftest.$ac_ext <<_LT_EOF 405706c34b88Smrg#ifdef __cplusplus 405806c34b88Smrgextern "C" { 405906c34b88Smrg#endif 406006c34b88Smrgchar nm_test_var; 406106c34b88Smrgvoid nm_test_func(void); 406206c34b88Smrgvoid nm_test_func(void){} 406306c34b88Smrg#ifdef __cplusplus 406406c34b88Smrg} 406506c34b88Smrg#endif 406606c34b88Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 406706c34b88Smrg_LT_EOF 4068c43cc173Smrg 406906c34b88Smrg if AC_TRY_EVAL(ac_compile); then 407006c34b88Smrg # Now try to grab the symbols. 407106c34b88Smrg nlist=conftest.nm 407206c34b88Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 407306c34b88Smrg # Try sorting and uniquifying the output. 407406c34b88Smrg if sort "$nlist" | uniq > "$nlist"T; then 407506c34b88Smrg mv -f "$nlist"T "$nlist" 407606c34b88Smrg else 407706c34b88Smrg rm -f "$nlist"T 407806c34b88Smrg fi 4079c43cc173Smrg 408006c34b88Smrg # Make sure that we snagged all the symbols we need. 408106c34b88Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 408206c34b88Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 408306c34b88Smrg cat <<_LT_EOF > conftest.$ac_ext 408406c34b88Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 408544584a44Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE 408644584a44Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime 408706c34b88Smrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 408806c34b88Smrg# define LT@&t@_DLSYM_CONST 408944584a44Smrg#elif defined __osf__ 409006c34b88Smrg/* This system does not cope well with relocations in const data. */ 409106c34b88Smrg# define LT@&t@_DLSYM_CONST 409206c34b88Smrg#else 409306c34b88Smrg# define LT@&t@_DLSYM_CONST const 409406c34b88Smrg#endif 4095c43cc173Smrg 409606c34b88Smrg#ifdef __cplusplus 409706c34b88Smrgextern "C" { 409806c34b88Smrg#endif 4099c43cc173Smrg 410006c34b88Smrg_LT_EOF 410106c34b88Smrg # Now generate the symbol file. 410206c34b88Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 4103c27c18e8Smrg 410406c34b88Smrg cat <<_LT_EOF >> conftest.$ac_ext 4105c27c18e8Smrg 410606c34b88Smrg/* The mapping between symbol names and symbols. */ 410706c34b88SmrgLT@&t@_DLSYM_CONST struct { 410806c34b88Smrg const char *name; 410906c34b88Smrg void *address; 411006c34b88Smrg} 411106c34b88Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 411206c34b88Smrg{ 411306c34b88Smrg { "@PROGRAM@", (void *) 0 }, 411406c34b88Smrg_LT_EOF 411544584a44Smrg $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 411606c34b88Smrg cat <<\_LT_EOF >> conftest.$ac_ext 411706c34b88Smrg {0, (void *) 0} 411806c34b88Smrg}; 4119c27c18e8Smrg 412006c34b88Smrg/* This works around a problem in FreeBSD linker */ 412106c34b88Smrg#ifdef FREEBSD_WORKAROUND 412206c34b88Smrgstatic const void *lt_preloaded_setup() { 412306c34b88Smrg return lt__PROGRAM__LTX_preloaded_symbols; 412406c34b88Smrg} 412506c34b88Smrg#endif 4126c43cc173Smrg 412706c34b88Smrg#ifdef __cplusplus 412806c34b88Smrg} 412906c34b88Smrg#endif 413006c34b88Smrg_LT_EOF 413106c34b88Smrg # Now try linking the two files. 413206c34b88Smrg mv conftest.$ac_objext conftstm.$ac_objext 413306c34b88Smrg lt_globsym_save_LIBS=$LIBS 413406c34b88Smrg lt_globsym_save_CFLAGS=$CFLAGS 413544584a44Smrg LIBS=conftstm.$ac_objext 413606c34b88Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 413744584a44Smrg if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then 413806c34b88Smrg pipe_works=yes 413906c34b88Smrg fi 414006c34b88Smrg LIBS=$lt_globsym_save_LIBS 414106c34b88Smrg CFLAGS=$lt_globsym_save_CFLAGS 414206c34b88Smrg else 414306c34b88Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 414406c34b88Smrg fi 414506c34b88Smrg else 414606c34b88Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 414706c34b88Smrg fi 414806c34b88Smrg else 414906c34b88Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 4150c27c18e8Smrg fi 415106c34b88Smrg else 415206c34b88Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 415306c34b88Smrg cat conftest.$ac_ext >&5 415406c34b88Smrg fi 415506c34b88Smrg rm -rf conftest* conftst* 4156c43cc173Smrg 415706c34b88Smrg # Do not use the global_symbol_pipe unless it works. 415844584a44Smrg if test yes = "$pipe_works"; then 415906c34b88Smrg break 416006c34b88Smrg else 416106c34b88Smrg lt_cv_sys_global_symbol_pipe= 416206c34b88Smrg fi 416306c34b88Smrgdone 416406c34b88Smrg]) 416506c34b88Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 416606c34b88Smrg lt_cv_sys_global_symbol_to_cdecl= 4167c27c18e8Smrgfi 416806c34b88Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 416906c34b88Smrg AC_MSG_RESULT(failed) 417037eb1ca1Smrgelse 417106c34b88Smrg AC_MSG_RESULT(ok) 417237eb1ca1Smrgfi 4173c27c18e8Smrg 417406c34b88Smrg# Response file support. 417506c34b88Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 417606c34b88Smrg nm_file_list_spec='@' 417706c34b88Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 417806c34b88Smrg nm_file_list_spec='@' 417906c34b88Smrgfi 4180c43cc173Smrg 418106c34b88Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 418206c34b88Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 418306c34b88Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 418406c34b88Smrg [Transform the output of nm in a proper C declaration]) 418544584a44Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], 418644584a44Smrg [Transform the output of nm into a list of symbols to manually relocate]) 418706c34b88Smrg_LT_DECL([global_symbol_to_c_name_address], 418806c34b88Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 418906c34b88Smrg [Transform the output of nm in a C name address pair]) 419006c34b88Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 419106c34b88Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 419206c34b88Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 419344584a44Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1], 419444584a44Smrg [The name lister interface]) 419506c34b88Smrg_LT_DECL([], [nm_file_list_spec], [1], 419606c34b88Smrg [Specify filename containing input files for $NM]) 419706c34b88Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 4198c43cc173Smrg 4199c27c18e8Smrg 420006c34b88Smrg# _LT_COMPILER_PIC([TAGNAME]) 420106c34b88Smrg# --------------------------- 420206c34b88Smrgm4_defun([_LT_COMPILER_PIC], 420306c34b88Smrg[m4_require([_LT_TAG_COMPILER])dnl 420406c34b88Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 420506c34b88Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 420606c34b88Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 4207c27c18e8Smrg 420806c34b88Smrgm4_if([$1], [CXX], [ 420906c34b88Smrg # C++ specific cases for pic, static, wl, etc. 421044584a44Smrg if test yes = "$GXX"; then 421106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 421206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4213c27c18e8Smrg 421406c34b88Smrg case $host_os in 421506c34b88Smrg aix*) 421606c34b88Smrg # All AIX code is PIC. 421744584a44Smrg if test ia64 = "$host_cpu"; then 421806c34b88Smrg # AIX 5 now supports IA64 processor 421906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 422006c34b88Smrg fi 422144584a44Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 422206c34b88Smrg ;; 4223c27c18e8Smrg 422406c34b88Smrg amigaos*) 422506c34b88Smrg case $host_cpu in 422606c34b88Smrg powerpc) 422706c34b88Smrg # see comment about AmigaOS4 .so support 422806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 422906c34b88Smrg ;; 423006c34b88Smrg m68k) 423106c34b88Smrg # FIXME: we need at least 68020 code to build shared libraries, but 423244584a44Smrg # adding the '-m68020' flag to GCC prevents building anything better, 423344584a44Smrg # like '-m68040'. 423406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 423506c34b88Smrg ;; 423606c34b88Smrg esac 423706c34b88Smrg ;; 4238c27c18e8Smrg 423906c34b88Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 424006c34b88Smrg # PIC is the default for these OSes. 424106c34b88Smrg ;; 424206c34b88Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 424306c34b88Smrg # This hack is so that the source file can tell whether it is being 424406c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 424506c34b88Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 424606c34b88Smrg # (--disable-auto-import) libraries 424706c34b88Smrg m4_if([$1], [GCJ], [], 424806c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 424944584a44Smrg case $host_os in 425044584a44Smrg os2*) 425144584a44Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 425244584a44Smrg ;; 425344584a44Smrg esac 425406c34b88Smrg ;; 425506c34b88Smrg darwin* | rhapsody*) 425606c34b88Smrg # PIC is the default on this platform 425706c34b88Smrg # Common symbols not allowed in MH_DYLIB files 425806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 425906c34b88Smrg ;; 426006c34b88Smrg *djgpp*) 426106c34b88Smrg # DJGPP does not support shared libraries at all 426206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 426306c34b88Smrg ;; 426406c34b88Smrg haiku*) 426506c34b88Smrg # PIC is the default for Haiku. 426606c34b88Smrg # The "-static" flag exists, but is broken. 426706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 426806c34b88Smrg ;; 426906c34b88Smrg interix[[3-9]]*) 427006c34b88Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 427106c34b88Smrg # Instead, we relocate shared libraries at runtime. 427206c34b88Smrg ;; 427306c34b88Smrg sysv4*MP*) 427406c34b88Smrg if test -d /usr/nec; then 427506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 427606c34b88Smrg fi 427706c34b88Smrg ;; 427806c34b88Smrg hpux*) 427906c34b88Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 428006c34b88Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 428106c34b88Smrg # sets the default TLS model and affects inlining. 428206c34b88Smrg case $host_cpu in 428306c34b88Smrg hppa*64*) 428406c34b88Smrg ;; 428506c34b88Smrg *) 428606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 428706c34b88Smrg ;; 428806c34b88Smrg esac 428906c34b88Smrg ;; 429006c34b88Smrg *qnx* | *nto*) 429106c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 429206c34b88Smrg # it will coredump. 429306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 429406c34b88Smrg ;; 429506c34b88Smrg *) 429606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 429706c34b88Smrg ;; 429806c34b88Smrg esac 4299c27c18e8Smrg else 430006c34b88Smrg case $host_os in 430106c34b88Smrg aix[[4-9]]*) 430206c34b88Smrg # All AIX code is PIC. 430344584a44Smrg if test ia64 = "$host_cpu"; then 430406c34b88Smrg # AIX 5 now supports IA64 processor 430506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 430606c34b88Smrg else 430706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 430806c34b88Smrg fi 430906c34b88Smrg ;; 431006c34b88Smrg chorus*) 431106c34b88Smrg case $cc_basename in 431206c34b88Smrg cxch68*) 431306c34b88Smrg # Green Hills C++ Compiler 431406c34b88Smrg # _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" 431506c34b88Smrg ;; 431606c34b88Smrg esac 431706c34b88Smrg ;; 431806c34b88Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 431906c34b88Smrg # This hack is so that the source file can tell whether it is being 432006c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 432106c34b88Smrg m4_if([$1], [GCJ], [], 432206c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 432306c34b88Smrg ;; 432406c34b88Smrg dgux*) 432506c34b88Smrg case $cc_basename in 432606c34b88Smrg ec++*) 432706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 432806c34b88Smrg ;; 432906c34b88Smrg ghcx*) 433006c34b88Smrg # Green Hills C++ Compiler 433106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 433206c34b88Smrg ;; 433306c34b88Smrg *) 433406c34b88Smrg ;; 433506c34b88Smrg esac 433606c34b88Smrg ;; 433706c34b88Smrg freebsd* | dragonfly*) 433806c34b88Smrg # FreeBSD uses GNU C++ 433906c34b88Smrg ;; 434006c34b88Smrg hpux9* | hpux10* | hpux11*) 434106c34b88Smrg case $cc_basename in 434206c34b88Smrg CC*) 434306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 434444584a44Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 434544584a44Smrg if test ia64 != "$host_cpu"; then 434606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 434706c34b88Smrg fi 434806c34b88Smrg ;; 434906c34b88Smrg aCC*) 435006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 435144584a44Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 435206c34b88Smrg case $host_cpu in 435306c34b88Smrg hppa*64*|ia64*) 435406c34b88Smrg # +Z the default 435506c34b88Smrg ;; 435606c34b88Smrg *) 435706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 435806c34b88Smrg ;; 435906c34b88Smrg esac 436006c34b88Smrg ;; 436106c34b88Smrg *) 436206c34b88Smrg ;; 436306c34b88Smrg esac 436406c34b88Smrg ;; 436506c34b88Smrg interix*) 436606c34b88Smrg # This is c89, which is MS Visual C++ (no shared libs) 436706c34b88Smrg # Anyone wants to do a port? 436806c34b88Smrg ;; 436906c34b88Smrg irix5* | irix6* | nonstopux*) 437006c34b88Smrg case $cc_basename in 437106c34b88Smrg CC*) 437206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 437306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 437406c34b88Smrg # CC pic flag -KPIC is the default. 437506c34b88Smrg ;; 437606c34b88Smrg *) 437706c34b88Smrg ;; 437806c34b88Smrg esac 437906c34b88Smrg ;; 438044584a44Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 438106c34b88Smrg case $cc_basename in 438206c34b88Smrg KCC*) 438306c34b88Smrg # KAI C++ Compiler 438406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 438506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 438606c34b88Smrg ;; 438706c34b88Smrg ecpc* ) 438844584a44Smrg # old Intel C++ for x86_64, which still supported -KPIC. 438906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 439006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 439106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 439206c34b88Smrg ;; 439306c34b88Smrg icpc* ) 439406c34b88Smrg # Intel C++, used to be incompatible with GCC. 439506c34b88Smrg # ICC 10 doesn't accept -KPIC any more. 439606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 439706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 439806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 439906c34b88Smrg ;; 440006c34b88Smrg pgCC* | pgcpp*) 440106c34b88Smrg # Portland Group C++ compiler 440206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 440306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 440406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 440506c34b88Smrg ;; 440606c34b88Smrg cxx*) 440706c34b88Smrg # Compaq C++ 440806c34b88Smrg # Make sure the PIC flag is empty. It appears that all Alpha 440906c34b88Smrg # Linux and Compaq Tru64 Unix objects are PIC. 441006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 441106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 441206c34b88Smrg ;; 441306c34b88Smrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 441406c34b88Smrg # IBM XL 8.0, 9.0 on PPC and BlueGene 441506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 441606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 441706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 441806c34b88Smrg ;; 441906c34b88Smrg *) 442006c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 442106c34b88Smrg *Sun\ C*) 442206c34b88Smrg # Sun C++ 5.9 442306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 442406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 442506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 442606c34b88Smrg ;; 442706c34b88Smrg esac 442806c34b88Smrg ;; 442906c34b88Smrg esac 443006c34b88Smrg ;; 443106c34b88Smrg lynxos*) 443206c34b88Smrg ;; 443306c34b88Smrg m88k*) 443406c34b88Smrg ;; 443506c34b88Smrg mvs*) 443606c34b88Smrg case $cc_basename in 443706c34b88Smrg cxx*) 443806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 443906c34b88Smrg ;; 444006c34b88Smrg *) 444106c34b88Smrg ;; 444206c34b88Smrg esac 444306c34b88Smrg ;; 444406c34b88Smrg netbsd*) 444506c34b88Smrg ;; 444606c34b88Smrg *qnx* | *nto*) 444706c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 444806c34b88Smrg # it will coredump. 444906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 445006c34b88Smrg ;; 445106c34b88Smrg osf3* | osf4* | osf5*) 445206c34b88Smrg case $cc_basename in 445306c34b88Smrg KCC*) 445406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 445506c34b88Smrg ;; 445606c34b88Smrg RCC*) 445706c34b88Smrg # Rational C++ 2.4.1 445806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 445906c34b88Smrg ;; 446006c34b88Smrg cxx*) 446106c34b88Smrg # Digital/Compaq C++ 446206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 446306c34b88Smrg # Make sure the PIC flag is empty. It appears that all Alpha 446406c34b88Smrg # Linux and Compaq Tru64 Unix objects are PIC. 446506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 446606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 446706c34b88Smrg ;; 446806c34b88Smrg *) 446906c34b88Smrg ;; 447006c34b88Smrg esac 447106c34b88Smrg ;; 447206c34b88Smrg psos*) 447306c34b88Smrg ;; 447406c34b88Smrg solaris*) 447506c34b88Smrg case $cc_basename in 447606c34b88Smrg CC* | sunCC*) 447706c34b88Smrg # Sun C++ 4.2, 5.x and Centerline C++ 447806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 447906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 448006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 448106c34b88Smrg ;; 448206c34b88Smrg gcx*) 448306c34b88Smrg # Green Hills C++ Compiler 448406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 448506c34b88Smrg ;; 448606c34b88Smrg *) 448706c34b88Smrg ;; 448806c34b88Smrg esac 448906c34b88Smrg ;; 449006c34b88Smrg sunos4*) 449106c34b88Smrg case $cc_basename in 449206c34b88Smrg CC*) 449306c34b88Smrg # Sun C++ 4.x 449406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 449506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 449606c34b88Smrg ;; 449706c34b88Smrg lcc*) 449806c34b88Smrg # Lucid 449906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 450006c34b88Smrg ;; 450106c34b88Smrg *) 450206c34b88Smrg ;; 450306c34b88Smrg esac 450406c34b88Smrg ;; 450506c34b88Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 450606c34b88Smrg case $cc_basename in 450706c34b88Smrg CC*) 450806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 450906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 451006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 451106c34b88Smrg ;; 451206c34b88Smrg esac 451306c34b88Smrg ;; 451406c34b88Smrg tandem*) 451506c34b88Smrg case $cc_basename in 451606c34b88Smrg NCC*) 451706c34b88Smrg # NonStop-UX NCC 3.20 451806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 451906c34b88Smrg ;; 452006c34b88Smrg *) 452106c34b88Smrg ;; 452206c34b88Smrg esac 452306c34b88Smrg ;; 452406c34b88Smrg vxworks*) 452506c34b88Smrg ;; 452606c34b88Smrg *) 452706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 452806c34b88Smrg ;; 452906c34b88Smrg esac 4530c27c18e8Smrg fi 453106c34b88Smrg], 453206c34b88Smrg[ 453344584a44Smrg if test yes = "$GCC"; then 453406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 453506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4536c43cc173Smrg 453706c34b88Smrg case $host_os in 453806c34b88Smrg aix*) 453906c34b88Smrg # All AIX code is PIC. 454044584a44Smrg if test ia64 = "$host_cpu"; then 454106c34b88Smrg # AIX 5 now supports IA64 processor 454206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 454306c34b88Smrg fi 454444584a44Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 454506c34b88Smrg ;; 4546c43cc173Smrg 454706c34b88Smrg amigaos*) 454806c34b88Smrg case $host_cpu in 454906c34b88Smrg powerpc) 455006c34b88Smrg # see comment about AmigaOS4 .so support 455106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 455206c34b88Smrg ;; 455306c34b88Smrg m68k) 455406c34b88Smrg # FIXME: we need at least 68020 code to build shared libraries, but 455544584a44Smrg # adding the '-m68020' flag to GCC prevents building anything better, 455644584a44Smrg # like '-m68040'. 455706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 455806c34b88Smrg ;; 455906c34b88Smrg esac 456006c34b88Smrg ;; 4561c43cc173Smrg 456206c34b88Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 456306c34b88Smrg # PIC is the default for these OSes. 456406c34b88Smrg ;; 4565c27c18e8Smrg 456606c34b88Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 456706c34b88Smrg # This hack is so that the source file can tell whether it is being 456806c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 456906c34b88Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 457006c34b88Smrg # (--disable-auto-import) libraries 457106c34b88Smrg m4_if([$1], [GCJ], [], 457206c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 457344584a44Smrg case $host_os in 457444584a44Smrg os2*) 457544584a44Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 457644584a44Smrg ;; 457744584a44Smrg esac 457806c34b88Smrg ;; 4579c43cc173Smrg 458006c34b88Smrg darwin* | rhapsody*) 458106c34b88Smrg # PIC is the default on this platform 458206c34b88Smrg # Common symbols not allowed in MH_DYLIB files 458306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 458406c34b88Smrg ;; 4585c43cc173Smrg 458606c34b88Smrg haiku*) 458706c34b88Smrg # PIC is the default for Haiku. 458806c34b88Smrg # The "-static" flag exists, but is broken. 458906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 459006c34b88Smrg ;; 4591c43cc173Smrg 459206c34b88Smrg hpux*) 459306c34b88Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 459406c34b88Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 459506c34b88Smrg # sets the default TLS model and affects inlining. 459606c34b88Smrg case $host_cpu in 459706c34b88Smrg hppa*64*) 459806c34b88Smrg # +Z the default 459906c34b88Smrg ;; 460006c34b88Smrg *) 460106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 460206c34b88Smrg ;; 460306c34b88Smrg esac 460406c34b88Smrg ;; 4605c27c18e8Smrg 460606c34b88Smrg interix[[3-9]]*) 460706c34b88Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 460806c34b88Smrg # Instead, we relocate shared libraries at runtime. 460906c34b88Smrg ;; 4610c43cc173Smrg 461106c34b88Smrg msdosdjgpp*) 461206c34b88Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 461306c34b88Smrg # on systems that don't support them. 461406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 461506c34b88Smrg enable_shared=no 461606c34b88Smrg ;; 4617c43cc173Smrg 461806c34b88Smrg *nto* | *qnx*) 461906c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 462006c34b88Smrg # it will coredump. 462106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 462206c34b88Smrg ;; 4623c27c18e8Smrg 462406c34b88Smrg sysv4*MP*) 462506c34b88Smrg if test -d /usr/nec; then 462606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 462706c34b88Smrg fi 462806c34b88Smrg ;; 4629c27c18e8Smrg 463006c34b88Smrg *) 463106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 463206c34b88Smrg ;; 463306c34b88Smrg esac 4634c43cc173Smrg 463506c34b88Smrg case $cc_basename in 463606c34b88Smrg nvcc*) # Cuda Compiler Driver 2.2 463706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 463806c34b88Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 463906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 464006c34b88Smrg fi 464106c34b88Smrg ;; 464206c34b88Smrg esac 464306c34b88Smrg else 464406c34b88Smrg # PORTME Check for flag to pass linker flags through the system compiler. 464506c34b88Smrg case $host_os in 464606c34b88Smrg aix*) 464706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 464844584a44Smrg if test ia64 = "$host_cpu"; then 464906c34b88Smrg # AIX 5 now supports IA64 processor 465006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 465106c34b88Smrg else 465206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 465306c34b88Smrg fi 465406c34b88Smrg ;; 4655c27c18e8Smrg 465644584a44Smrg darwin* | rhapsody*) 465744584a44Smrg # PIC is the default on this platform 465844584a44Smrg # Common symbols not allowed in MH_DYLIB files 465944584a44Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 466044584a44Smrg case $cc_basename in 466144584a44Smrg nagfor*) 466244584a44Smrg # NAG Fortran compiler 466344584a44Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 466444584a44Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 466544584a44Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 466644584a44Smrg ;; 466744584a44Smrg esac 466844584a44Smrg ;; 466944584a44Smrg 467006c34b88Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 467106c34b88Smrg # This hack is so that the source file can tell whether it is being 467206c34b88Smrg # built for inclusion in a dll (and should export symbols for example). 467306c34b88Smrg m4_if([$1], [GCJ], [], 467406c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 467544584a44Smrg case $host_os in 467644584a44Smrg os2*) 467744584a44Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' 467844584a44Smrg ;; 467944584a44Smrg esac 468006c34b88Smrg ;; 4681c43cc173Smrg 468206c34b88Smrg hpux9* | hpux10* | hpux11*) 468306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 468406c34b88Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 468506c34b88Smrg # not for PA HP-UX. 468606c34b88Smrg case $host_cpu in 468706c34b88Smrg hppa*64*|ia64*) 468806c34b88Smrg # +Z the default 468906c34b88Smrg ;; 469006c34b88Smrg *) 469106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4692c27c18e8Smrg ;; 469306c34b88Smrg esac 469406c34b88Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 469544584a44Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' 469606c34b88Smrg ;; 4697c43cc173Smrg 469806c34b88Smrg irix5* | irix6* | nonstopux*) 469906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 470006c34b88Smrg # PIC (with -KPIC) is the default. 470106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 470206c34b88Smrg ;; 4703c43cc173Smrg 470444584a44Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 470506c34b88Smrg case $cc_basename in 470644584a44Smrg # old Intel for x86_64, which still supported -KPIC. 470706c34b88Smrg ecc*) 470806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 470906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 471006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 471106c34b88Smrg ;; 471206c34b88Smrg # icc used to be incompatible with GCC. 471306c34b88Smrg # ICC 10 doesn't accept -KPIC any more. 471406c34b88Smrg icc* | ifort*) 471506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 471606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 471706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 471806c34b88Smrg ;; 471906c34b88Smrg # Lahey Fortran 8.1. 472006c34b88Smrg lf95*) 472106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 472206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 472306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 472406c34b88Smrg ;; 472506c34b88Smrg nagfor*) 472606c34b88Smrg # NAG Fortran compiler 472706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 472806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 472906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 473006c34b88Smrg ;; 473144584a44Smrg tcc*) 473244584a44Smrg # Fabrice Bellard et al's Tiny C Compiler 473344584a44Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 473444584a44Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 473544584a44Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 473644584a44Smrg ;; 473706c34b88Smrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 473806c34b88Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 473906c34b88Smrg # which looks to be a dead project) 474006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 474106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 474206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 474306c34b88Smrg ;; 474406c34b88Smrg ccc*) 474506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 474606c34b88Smrg # All Alpha code is PIC. 474706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 474806c34b88Smrg ;; 474906c34b88Smrg xl* | bgxl* | bgf* | mpixl*) 475006c34b88Smrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 475106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 475206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 475306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 475406c34b88Smrg ;; 475506c34b88Smrg *) 475606c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 475706c34b88Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 475806c34b88Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 475906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 476006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 476106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 476206c34b88Smrg ;; 476306c34b88Smrg *Sun\ F* | *Sun*Fortran*) 476406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 476506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 476606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 476706c34b88Smrg ;; 476806c34b88Smrg *Sun\ C*) 476906c34b88Smrg # Sun C 5.9 477006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 477106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 477206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 477306c34b88Smrg ;; 477406c34b88Smrg *Intel*\ [[CF]]*Compiler*) 477506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 477606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 477706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4778b789ec8aSmrg ;; 477906c34b88Smrg *Portland\ Group*) 478006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 478106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 478206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4783b789ec8aSmrg ;; 4784b789ec8aSmrg esac 4785b789ec8aSmrg ;; 478606c34b88Smrg esac 478706c34b88Smrg ;; 4788c43cc173Smrg 478906c34b88Smrg newsos6) 479006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 479106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 479206c34b88Smrg ;; 4793c27c18e8Smrg 479406c34b88Smrg *nto* | *qnx*) 479506c34b88Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 479606c34b88Smrg # it will coredump. 479706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 479806c34b88Smrg ;; 4799c43cc173Smrg 480006c34b88Smrg osf3* | osf4* | osf5*) 480106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 480206c34b88Smrg # All OSF/1 code is PIC. 480306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 480406c34b88Smrg ;; 4805c43cc173Smrg 480606c34b88Smrg rdos*) 480706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 480806c34b88Smrg ;; 4809c43cc173Smrg 481006c34b88Smrg solaris*) 481106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 481206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 481306c34b88Smrg case $cc_basename in 481406c34b88Smrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 481506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 481606c34b88Smrg *) 481706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 481806c34b88Smrg esac 481906c34b88Smrg ;; 4820c43cc173Smrg 482106c34b88Smrg sunos4*) 482206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 482306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 482406c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 482506c34b88Smrg ;; 482637eb1ca1Smrg 482706c34b88Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 482806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 482906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 483006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 483106c34b88Smrg ;; 4832c27c18e8Smrg 483306c34b88Smrg sysv4*MP*) 483444584a44Smrg if test -d /usr/nec; then 483506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 483606c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 483706c34b88Smrg fi 483806c34b88Smrg ;; 4839c43cc173Smrg 484006c34b88Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 484106c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 484206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 484306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 484406c34b88Smrg ;; 4845c27c18e8Smrg 484606c34b88Smrg unicos*) 484706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 484806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 484906c34b88Smrg ;; 4850c27c18e8Smrg 485106c34b88Smrg uts4*) 485206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 485306c34b88Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 485406c34b88Smrg ;; 4855c43cc173Smrg 485606c34b88Smrg *) 485706c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 485806c34b88Smrg ;; 485906c34b88Smrg esac 486006c34b88Smrg fi 486106c34b88Smrg]) 486206c34b88Smrgcase $host_os in 486344584a44Smrg # For platforms that do not support PIC, -DPIC is meaningless: 486406c34b88Smrg *djgpp*) 486506c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 486606c34b88Smrg ;; 486706c34b88Smrg *) 486806c34b88Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 486906c34b88Smrg ;; 487006c34b88Smrgesac 4871c27c18e8Smrg 487206c34b88SmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 487306c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 487406c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 487506c34b88Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 4876c43cc173Smrg 487706c34b88Smrg# 487806c34b88Smrg# Check to make sure the PIC flag actually works. 487906c34b88Smrg# 488006c34b88Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 488106c34b88Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 488206c34b88Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 488306c34b88Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 488406c34b88Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 488506c34b88Smrg "" | " "*) ;; 488606c34b88Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 488706c34b88Smrg esac], 488806c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 488906c34b88Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 489006c34b88Smrgfi 489106c34b88Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 489206c34b88Smrg [Additional compiler flags for building library objects]) 4893c27c18e8Smrg 489406c34b88Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 489506c34b88Smrg [How to pass a linker flag through the compiler]) 489606c34b88Smrg# 489706c34b88Smrg# Check to make sure the static flag actually works. 489806c34b88Smrg# 489906c34b88Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 490006c34b88Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 490106c34b88Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 490206c34b88Smrg $lt_tmp_static_flag, 490306c34b88Smrg [], 490406c34b88Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 490506c34b88Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 490606c34b88Smrg [Compiler flag to prevent dynamic linking]) 490706c34b88Smrg])# _LT_COMPILER_PIC 4908c27c18e8Smrg 4909c27c18e8Smrg 491006c34b88Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 491106c34b88Smrg# ---------------------------- 491206c34b88Smrg# See if the linker supports building shared libraries. 491306c34b88Smrgm4_defun([_LT_LINKER_SHLIBS], 491406c34b88Smrg[AC_REQUIRE([LT_PATH_LD])dnl 491506c34b88SmrgAC_REQUIRE([LT_PATH_NM])dnl 491606c34b88Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 491706c34b88Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 491806c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 491906c34b88Smrgm4_require([_LT_DECL_SED])dnl 492006c34b88Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 492106c34b88Smrgm4_require([_LT_TAG_COMPILER])dnl 492206c34b88SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 492306c34b88Smrgm4_if([$1], [CXX], [ 492406c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 492506c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 492606c34b88Smrg case $host_os in 492706c34b88Smrg aix[[4-9]]*) 492806c34b88Smrg # If we're using GNU nm, then we don't want the "-C" option. 492944584a44Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 493044584a44Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 493144584a44Smrg # weak defined symbols like other global defined symbols, whereas 493244584a44Smrg # GNU nm marks them as "W". 493344584a44Smrg # While the 'weak' keyword is ignored in the Export File, we need 493444584a44Smrg # it in the Import File for the 'aix-soname' feature, so we have 493544584a44Smrg # to replace the "-B" option with "-P" for AIX nm. 493606c34b88Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 493744584a44Smrg _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' 493806c34b88Smrg else 493944584a44Smrg _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' 494006c34b88Smrg fi 494106c34b88Smrg ;; 494206c34b88Smrg pw32*) 494344584a44Smrg _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds 494406c34b88Smrg ;; 494506c34b88Smrg cygwin* | mingw* | cegcc*) 494606c34b88Smrg case $cc_basename in 494706c34b88Smrg cl*) 494806c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 494906c34b88Smrg ;; 495006c34b88Smrg *) 495106c34b88Smrg _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' 495206c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 495306c34b88Smrg ;; 495406c34b88Smrg esac 495506c34b88Smrg ;; 495606c34b88Smrg *) 495706c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 495806c34b88Smrg ;; 495906c34b88Smrg esac 496006c34b88Smrg], [ 496106c34b88Smrg runpath_var= 496206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 496306c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 496406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)= 496506c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 496606c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 496706c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 496806c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 496906c34b88Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 497006c34b88Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 497106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 497206c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 497306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 497406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 497506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 497606c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 497706c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=no 497806c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 497906c34b88Smrg _LT_TAGVAR(module_cmds, $1)= 498006c34b88Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 498106c34b88Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 498206c34b88Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 498306c34b88Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 498406c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 498506c34b88Smrg # include_expsyms should be a list of space-separated symbols to be *always* 498606c34b88Smrg # included in the symbol list 498706c34b88Smrg _LT_TAGVAR(include_expsyms, $1)= 498806c34b88Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 498944584a44Smrg # it will be wrapped by ' (' and ')$', so one must not match beginning or 499044584a44Smrg # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', 499144584a44Smrg # as well as any symbol that contains 'd'. 499206c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 499306c34b88Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 499406c34b88Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 499506c34b88Smrg # the symbol is explicitly referenced. Since portable code cannot 499606c34b88Smrg # rely on this symbol name, it's probably fine to never include it in 499706c34b88Smrg # preloaded symbol tables. 499806c34b88Smrg # Exclude shared library initialization/finalization symbols. 499906c34b88Smrgdnl Note also adjust exclude_expsyms for C++ above. 500006c34b88Smrg extract_expsyms_cmds= 5001c43cc173Smrg 500206c34b88Smrg case $host_os in 500306c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 500406c34b88Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 500506c34b88Smrg # When not using gcc, we currently assume that we are using 500606c34b88Smrg # Microsoft Visual C++. 500744584a44Smrg if test yes != "$GCC"; then 500806c34b88Smrg with_gnu_ld=no 500906c34b88Smrg fi 501006c34b88Smrg ;; 501106c34b88Smrg interix*) 501206c34b88Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 501306c34b88Smrg with_gnu_ld=yes 501406c34b88Smrg ;; 501544584a44Smrg openbsd* | bitrig*) 501606c34b88Smrg with_gnu_ld=no 501706c34b88Smrg ;; 501806c34b88Smrg esac 5019c43cc173Smrg 502006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 502121e67964Smrg 502206c34b88Smrg # On some targets, GNU ld is compatible enough with the native linker 502306c34b88Smrg # that we're better off using the native interface for both. 502406c34b88Smrg lt_use_gnu_ld_interface=no 502544584a44Smrg if test yes = "$with_gnu_ld"; then 502606c34b88Smrg case $host_os in 502706c34b88Smrg aix*) 502806c34b88Smrg # The AIX port of GNU ld has always aspired to compatibility 502906c34b88Smrg # with the native linker. However, as the warning in the GNU ld 503006c34b88Smrg # block says, versions before 2.19.5* couldn't really create working 503106c34b88Smrg # shared libraries, regardless of the interface used. 503206c34b88Smrg case `$LD -v 2>&1` in 503306c34b88Smrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 503406c34b88Smrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 503506c34b88Smrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 5036c27c18e8Smrg *) 503706c34b88Smrg lt_use_gnu_ld_interface=yes 5038c27c18e8Smrg ;; 5039c27c18e8Smrg esac 5040c27c18e8Smrg ;; 504106c34b88Smrg *) 504206c34b88Smrg lt_use_gnu_ld_interface=yes 504306c34b88Smrg ;; 504406c34b88Smrg esac 504506c34b88Smrg fi 5046c43cc173Smrg 504744584a44Smrg if test yes = "$lt_use_gnu_ld_interface"; then 504806c34b88Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 504944584a44Smrg wlarc='$wl' 505006c34b88Smrg 505106c34b88Smrg # Set some defaults for GNU ld with shared library support. These 505206c34b88Smrg # are reset later if shared libraries are not supported. Putting them 505306c34b88Smrg # here allows them to be overridden if necessary. 505406c34b88Smrg runpath_var=LD_RUN_PATH 505544584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 505644584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 505706c34b88Smrg # ancient GNU ld didn't support --whole-archive et. al. 505806c34b88Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 505944584a44Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 506006c34b88Smrg else 506106c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 506206c34b88Smrg fi 506306c34b88Smrg supports_anon_versioning=no 506444584a44Smrg case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in 506506c34b88Smrg *GNU\ gold*) supports_anon_versioning=yes ;; 506606c34b88Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 506706c34b88Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 506806c34b88Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 506906c34b88Smrg *\ 2.11.*) ;; # other 2.11 versions 507006c34b88Smrg *) supports_anon_versioning=yes ;; 507106c34b88Smrg esac 507206c34b88Smrg 507306c34b88Smrg # See if GNU ld supports shared libraries. 507406c34b88Smrg case $host_os in 507506c34b88Smrg aix[[3-9]]*) 507606c34b88Smrg # On AIX/PPC, the GNU linker is very broken 507744584a44Smrg if test ia64 != "$host_cpu"; then 5078c27c18e8Smrg _LT_TAGVAR(ld_shlibs, $1)=no 507906c34b88Smrg cat <<_LT_EOF 1>&2 5080c43cc173Smrg 508106c34b88Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported 508206c34b88Smrg*** to be unable to reliably create shared libraries on AIX. 508306c34b88Smrg*** Therefore, libtool is disabling shared libraries support. If you 508406c34b88Smrg*** really care for shared libraries, you may want to install binutils 508506c34b88Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 508606c34b88Smrg*** You will then need to restart the configuration process. 5087c43cc173Smrg 508806c34b88Smrg_LT_EOF 508906c34b88Smrg fi 509006c34b88Smrg ;; 5091c43cc173Smrg 509206c34b88Smrg amigaos*) 509306c34b88Smrg case $host_cpu in 509406c34b88Smrg powerpc) 509506c34b88Smrg # see comment about AmigaOS4 .so support 509644584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 509706c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 509806c34b88Smrg ;; 509906c34b88Smrg m68k) 510006c34b88Smrg _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)' 510106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 510206c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 510306c34b88Smrg ;; 510406c34b88Smrg esac 510506c34b88Smrg ;; 5106c43cc173Smrg 510706c34b88Smrg beos*) 510806c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 510906c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 511006c34b88Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 511106c34b88Smrg # support --undefined. This deserves some investigation. FIXME 511244584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 511306c34b88Smrg else 511406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 511506c34b88Smrg fi 511606c34b88Smrg ;; 511706c34b88Smrg 511806c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 511906c34b88Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 512006c34b88Smrg # as there is no search path for DLLs. 512106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 512244584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 512306c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 512406c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 512506c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 512606c34b88Smrg _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' 512706c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 512806c34b88Smrg 512906c34b88Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 513044584a44Smrg _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' 513144584a44Smrg # If the export-symbols file already is a .def file, use it as 513244584a44Smrg # is; otherwise, prepend EXPORTS... 513344584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 513444584a44Smrg cp $export_symbols $output_objdir/$soname.def; 513544584a44Smrg else 513644584a44Smrg echo EXPORTS > $output_objdir/$soname.def; 513744584a44Smrg cat $export_symbols >> $output_objdir/$soname.def; 513844584a44Smrg fi~ 513944584a44Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 514006c34b88Smrg else 514106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 514206c34b88Smrg fi 514306c34b88Smrg ;; 514406c34b88Smrg 514506c34b88Smrg haiku*) 514644584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 514706c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 514806c34b88Smrg ;; 514906c34b88Smrg 515044584a44Smrg os2*) 515144584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 515244584a44Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 515344584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 515444584a44Smrg shrext_cmds=.dll 515544584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 515644584a44Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 515744584a44Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 515844584a44Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 515944584a44Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 516044584a44Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 516144584a44Smrg emximp -o $lib $output_objdir/$libname.def' 516244584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 516344584a44Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 516444584a44Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 516544584a44Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 516644584a44Smrg prefix_cmds="$SED"~ 516744584a44Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 516844584a44Smrg prefix_cmds="$prefix_cmds -e 1d"; 516944584a44Smrg fi~ 517044584a44Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 517144584a44Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 517244584a44Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 517344584a44Smrg emximp -o $lib $output_objdir/$libname.def' 517444584a44Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 517544584a44Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 517644584a44Smrg ;; 517744584a44Smrg 517806c34b88Smrg interix[[3-9]]*) 517906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 518006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 518144584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 518244584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 518306c34b88Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 518406c34b88Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 518506c34b88Smrg # default) and relocated if they conflict, which is a slow very memory 518606c34b88Smrg # consuming and fragmenting process. To avoid this, we pick a random, 518706c34b88Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 518806c34b88Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 518944584a44Smrg _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' 519044584a44Smrg _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' 519106c34b88Smrg ;; 519206c34b88Smrg 519306c34b88Smrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 519406c34b88Smrg tmp_diet=no 519544584a44Smrg if test linux-dietlibc = "$host_os"; then 519606c34b88Smrg case $cc_basename in 519706c34b88Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 519806c34b88Smrg esac 519906c34b88Smrg fi 520006c34b88Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 520144584a44Smrg && test no = "$tmp_diet" 520206c34b88Smrg then 520306c34b88Smrg tmp_addflag=' $pic_flag' 520406c34b88Smrg tmp_sharedflag='-shared' 520506c34b88Smrg case $cc_basename,$host_cpu in 520606c34b88Smrg pgcc*) # Portland Group C compiler 520744584a44Smrg _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' 520806c34b88Smrg tmp_addflag=' $pic_flag' 520906c34b88Smrg ;; 521006c34b88Smrg pgf77* | pgf90* | pgf95* | pgfortran*) 521106c34b88Smrg # Portland Group f77 and f90 compilers 521244584a44Smrg _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' 521306c34b88Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 521406c34b88Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 521506c34b88Smrg tmp_addflag=' -i_dynamic' ;; 521606c34b88Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 521706c34b88Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 521806c34b88Smrg ifc* | ifort*) # Intel Fortran compiler 521906c34b88Smrg tmp_addflag=' -nofor_main' ;; 522006c34b88Smrg lf95*) # Lahey Fortran 8.1 522106c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 522206c34b88Smrg tmp_sharedflag='--shared' ;; 522344584a44Smrg nagfor*) # NAGFOR 5.3 522444584a44Smrg tmp_sharedflag='-Wl,-shared' ;; 522506c34b88Smrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 522606c34b88Smrg tmp_sharedflag='-qmkshrobj' 522706c34b88Smrg tmp_addflag= ;; 522806c34b88Smrg nvcc*) # Cuda Compiler Driver 2.2 522944584a44Smrg _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' 523006c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 523106c34b88Smrg ;; 523206c34b88Smrg esac 523306c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 523406c34b88Smrg *Sun\ C*) # Sun C 5.9 523544584a44Smrg _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' 523606c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 523706c34b88Smrg tmp_sharedflag='-G' ;; 523806c34b88Smrg *Sun\ F*) # Sun Fortran 8.3 523906c34b88Smrg tmp_sharedflag='-G' ;; 524006c34b88Smrg esac 524144584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 5242c43cc173Smrg 524344584a44Smrg if test yes = "$supports_anon_versioning"; then 524406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 524544584a44Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 524644584a44Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 524744584a44Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 524806c34b88Smrg fi 5249c43cc173Smrg 525006c34b88Smrg case $cc_basename in 525144584a44Smrg tcc*) 525244584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' 525344584a44Smrg ;; 525406c34b88Smrg xlf* | bgf* | bgxlf* | mpixlf*) 525506c34b88Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 525606c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 525744584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 525806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 525944584a44Smrg if test yes = "$supports_anon_versioning"; then 526006c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 526144584a44Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 526244584a44Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 526344584a44Smrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 5264c27c18e8Smrg fi 526506c34b88Smrg ;; 526606c34b88Smrg esac 526706c34b88Smrg else 526806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 526906c34b88Smrg fi 527006c34b88Smrg ;; 5271c27c18e8Smrg 527206c34b88Smrg netbsd*) 527306c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 527406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 527506c34b88Smrg wlarc= 527606c34b88Smrg else 527744584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 527844584a44Smrg _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' 527906c34b88Smrg fi 528006c34b88Smrg ;; 5281c27c18e8Smrg 528206c34b88Smrg solaris*) 528306c34b88Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 528406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 528506c34b88Smrg cat <<_LT_EOF 1>&2 5286c27c18e8Smrg 528706c34b88Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 528806c34b88Smrg*** create shared libraries on Solaris systems. Therefore, libtool 528906c34b88Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 529006c34b88Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 529106c34b88Smrg*** your PATH or compiler configuration so that the native linker is 529206c34b88Smrg*** used, and then restart. 5293c43cc173Smrg 529406c34b88Smrg_LT_EOF 529506c34b88Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 529644584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 529744584a44Smrg _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' 529806c34b88Smrg else 529906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 530006c34b88Smrg fi 530106c34b88Smrg ;; 5302c43cc173Smrg 530306c34b88Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 530406c34b88Smrg case `$LD -v 2>&1` in 530506c34b88Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 530606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 530706c34b88Smrg cat <<_LT_EOF 1>&2 5308c27c18e8Smrg 530944584a44Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot 531006c34b88Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 531106c34b88Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 531206c34b88Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 531306c34b88Smrg*** your PATH or compiler configuration so that the native linker is 531406c34b88Smrg*** used, and then restart. 5315c27c18e8Smrg 531606c34b88Smrg_LT_EOF 531706c34b88Smrg ;; 531806c34b88Smrg *) 531906c34b88Smrg # For security reasons, it is highly recommended that you always 532006c34b88Smrg # use absolute paths for naming shared libraries, and exclude the 532106c34b88Smrg # DT_RUNPATH tag from executables and libraries. But doing so 532206c34b88Smrg # requires that you compile everything twice, which is a pain. 532306c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 532444584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 532544584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 532644584a44Smrg _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' 532706c34b88Smrg else 532806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 532906c34b88Smrg fi 533006c34b88Smrg ;; 533106c34b88Smrg esac 533206c34b88Smrg ;; 5333c27c18e8Smrg 533406c34b88Smrg sunos4*) 533506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 533606c34b88Smrg wlarc= 533706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 533806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 533906c34b88Smrg ;; 5340c43cc173Smrg 534106c34b88Smrg *) 534206c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 534344584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 534444584a44Smrg _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' 534506c34b88Smrg else 534606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 534706c34b88Smrg fi 534806c34b88Smrg ;; 534906c34b88Smrg esac 5350c43cc173Smrg 535144584a44Smrg if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then 535206c34b88Smrg runpath_var= 535306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 535406c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 535506c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 535606c34b88Smrg fi 535706c34b88Smrg else 535806c34b88Smrg # PORTME fill in a description of your system's linker (not GNU ld) 535906c34b88Smrg case $host_os in 536006c34b88Smrg aix3*) 536106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 536206c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 536306c34b88Smrg _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' 536406c34b88Smrg # Note: this linker hardcodes the directories in LIBPATH if there 536506c34b88Smrg # are no directories specified by -L. 536606c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 536744584a44Smrg if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then 536806c34b88Smrg # Neither direct hardcoding nor static linking is supported with a 536906c34b88Smrg # broken collect2. 537006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 537106c34b88Smrg fi 537206c34b88Smrg ;; 5373c43cc173Smrg 537406c34b88Smrg aix[[4-9]]*) 537544584a44Smrg if test ia64 = "$host_cpu"; then 537606c34b88Smrg # On IA64, the linker does run time linking by default, so we don't 537706c34b88Smrg # have to do anything special. 537806c34b88Smrg aix_use_runtimelinking=no 537906c34b88Smrg exp_sym_flag='-Bexport' 538044584a44Smrg no_entry_flag= 538106c34b88Smrg else 538206c34b88Smrg # If we're using GNU nm, then we don't want the "-C" option. 538344584a44Smrg # -C means demangle to GNU nm, but means don't demangle to AIX nm. 538444584a44Smrg # Without the "-l" option, or with the "-B" option, AIX nm treats 538544584a44Smrg # weak defined symbols like other global defined symbols, whereas 538644584a44Smrg # GNU nm marks them as "W". 538744584a44Smrg # While the 'weak' keyword is ignored in the Export File, we need 538844584a44Smrg # it in the Import File for the 'aix-soname' feature, so we have 538944584a44Smrg # to replace the "-B" option with "-P" for AIX nm. 539006c34b88Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 539144584a44Smrg _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' 539206c34b88Smrg else 539344584a44Smrg _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' 539406c34b88Smrg fi 539506c34b88Smrg aix_use_runtimelinking=no 5396c27c18e8Smrg 539706c34b88Smrg # Test if we are trying to use run time linking or normal 539806c34b88Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 539944584a44Smrg # have runtime linking enabled, and use it for executables. 540044584a44Smrg # For shared libraries, we enable/disable runtime linking 540144584a44Smrg # depending on the kind of the shared library created - 540244584a44Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 540344584a44Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 540444584a44Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 540544584a44Smrg # lib.a static archive 540644584a44Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 540744584a44Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 540844584a44Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 540944584a44Smrg # lib.a(lib.so.V) shared, rtl:no 541044584a44Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 541144584a44Smrg # lib.a static archive 541206c34b88Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 541306c34b88Smrg for ld_flag in $LDFLAGS; do 541444584a44Smrg if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then 541506c34b88Smrg aix_use_runtimelinking=yes 541606c34b88Smrg break 541706c34b88Smrg fi 541806c34b88Smrg done 541944584a44Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 542044584a44Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 542144584a44Smrg # so we don't have lib.a shared libs to link our executables. 542244584a44Smrg # We have to force runtime linking in this case. 542344584a44Smrg aix_use_runtimelinking=yes 542444584a44Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 542544584a44Smrg fi 542606c34b88Smrg ;; 542706c34b88Smrg esac 5428c43cc173Smrg 542906c34b88Smrg exp_sym_flag='-bexport' 543006c34b88Smrg no_entry_flag='-bnoentry' 543106c34b88Smrg fi 5432c43cc173Smrg 543306c34b88Smrg # When large executables or shared objects are built, AIX ld can 543406c34b88Smrg # have problems creating the table of contents. If linking a library 543506c34b88Smrg # or program results in "error TOC overflow" add -mminimal-toc to 543606c34b88Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 543706c34b88Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5438c43cc173Smrg 543906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='' 544006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 544106c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 544206c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 544306c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 544444584a44Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 544544584a44Smrg case $with_aix_soname,$aix_use_runtimelinking in 544644584a44Smrg aix,*) ;; # traditional, no import file 544744584a44Smrg svr4,* | *,yes) # use import file 544844584a44Smrg # The Import File defines what to hardcode. 544944584a44Smrg _LT_TAGVAR(hardcode_direct, $1)=no 545044584a44Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 545144584a44Smrg ;; 545244584a44Smrg esac 5453c27c18e8Smrg 545444584a44Smrg if test yes = "$GCC"; then 545506c34b88Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 545606c34b88Smrg # We only want to do this on AIX 4.2 and lower, the check 545706c34b88Smrg # below for broken collect2 doesn't work under 4.3+ 545844584a44Smrg collect2name=`$CC -print-prog-name=collect2` 545906c34b88Smrg if test -f "$collect2name" && 546006c34b88Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 546106c34b88Smrg then 546206c34b88Smrg # We have reworked collect2 546306c34b88Smrg : 546406c34b88Smrg else 546506c34b88Smrg # We have old collect2 546606c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 546706c34b88Smrg # It fails to find uninstalled libraries when the uninstalled 546806c34b88Smrg # path is not listed in the libpath. Setting hardcode_minus_L 546906c34b88Smrg # to unsupported forces relinking 547006c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 547106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 547206c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 547306c34b88Smrg fi 547406c34b88Smrg ;; 547506c34b88Smrg esac 547606c34b88Smrg shared_flag='-shared' 547744584a44Smrg if test yes = "$aix_use_runtimelinking"; then 547844584a44Smrg shared_flag="$shared_flag "'$wl-G' 547906c34b88Smrg fi 548044584a44Smrg # Need to ensure runtime linking is disabled for the traditional 548144584a44Smrg # shared library, or the linker may eventually find shared libraries 548244584a44Smrg # /with/ Import File - we do not want to mix them. 548344584a44Smrg shared_flag_aix='-shared' 548444584a44Smrg shared_flag_svr4='-shared $wl-G' 548506c34b88Smrg else 548606c34b88Smrg # not using gcc 548744584a44Smrg if test ia64 = "$host_cpu"; then 548806c34b88Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 548906c34b88Smrg # chokes on -Wl,-G. The following line is correct: 549006c34b88Smrg shared_flag='-G' 549106c34b88Smrg else 549244584a44Smrg if test yes = "$aix_use_runtimelinking"; then 549344584a44Smrg shared_flag='$wl-G' 549406c34b88Smrg else 549544584a44Smrg shared_flag='$wl-bM:SRE' 549606c34b88Smrg fi 549744584a44Smrg shared_flag_aix='$wl-bM:SRE' 549844584a44Smrg shared_flag_svr4='$wl-G' 549906c34b88Smrg fi 550006c34b88Smrg fi 5501c27c18e8Smrg 550244584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 550306c34b88Smrg # It seems that -bexpall does not export symbols beginning with 550406c34b88Smrg # underscore (_), so it is better to generate a list of symbols to export. 550506c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 550644584a44Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 550706c34b88Smrg # Warning - without using the other runtime loading flags (-brtl), 550806c34b88Smrg # -berok will link without error, but may produce a broken library. 550906c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 551006c34b88Smrg # Determine the default libpath from the value encoded in an 551106c34b88Smrg # empty executable. 551206c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 551344584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 551444584a44Smrg _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 551506c34b88Smrg else 551644584a44Smrg if test ia64 = "$host_cpu"; then 551744584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 551806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 551944584a44Smrg _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" 552006c34b88Smrg else 552106c34b88Smrg # Determine the default libpath from the value encoded in an 552206c34b88Smrg # empty executable. 552306c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 552444584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 552506c34b88Smrg # Warning - without using the other run time loading flags, 552606c34b88Smrg # -berok will link without error, but may produce a broken library. 552744584a44Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 552844584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 552944584a44Smrg if test yes = "$with_gnu_ld"; then 553006c34b88Smrg # We only use this code for GNU lds that support --whole-archive. 553144584a44Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 553206c34b88Smrg else 553306c34b88Smrg # Exported symbols can be pulled into shared objects from archives 553406c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 553506c34b88Smrg fi 553606c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 553744584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 553844584a44Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 553944584a44Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 554044584a44Smrg if test svr4 != "$with_aix_soname"; then 554144584a44Smrg # This is similar to how AIX traditionally builds its shared libraries. 554244584a44Smrg _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' 554344584a44Smrg fi 554444584a44Smrg if test aix != "$with_aix_soname"; then 554544584a44Smrg _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' 554644584a44Smrg else 554744584a44Smrg # used by -dlpreopen to get the symbols 554844584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 554944584a44Smrg fi 555044584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 555106c34b88Smrg fi 555206c34b88Smrg fi 555306c34b88Smrg ;; 5554c27c18e8Smrg 555506c34b88Smrg amigaos*) 555606c34b88Smrg case $host_cpu in 555706c34b88Smrg powerpc) 555806c34b88Smrg # see comment about AmigaOS4 .so support 555944584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 556006c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 556106c34b88Smrg ;; 556206c34b88Smrg m68k) 556306c34b88Smrg _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)' 556406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 556506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5566c27c18e8Smrg ;; 556706c34b88Smrg esac 556806c34b88Smrg ;; 5569c43cc173Smrg 557006c34b88Smrg bsdi[[45]]*) 557106c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 557206c34b88Smrg ;; 5573c43cc173Smrg 557406c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 557506c34b88Smrg # When not using gcc, we currently assume that we are using 557606c34b88Smrg # Microsoft Visual C++. 557706c34b88Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 557806c34b88Smrg # no search path for DLLs. 5579c27c18e8Smrg case $cc_basename in 558006c34b88Smrg cl*) 558106c34b88Smrg # Native MSVC 558206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 558306c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 558406c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 558506c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='@' 558606c34b88Smrg # Tell ltmain to make .lib files, not .a files. 558706c34b88Smrg libext=lib 558806c34b88Smrg # Tell ltmain to make .dll files, not .so files. 558944584a44Smrg shrext_cmds=.dll 559006c34b88Smrg # FIXME: Setting linknames here is a bad hack. 559144584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 559244584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 559344584a44Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 559444584a44Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 559544584a44Smrg else 559644584a44Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 559744584a44Smrg fi~ 559844584a44Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 559944584a44Smrg linknames=' 560006c34b88Smrg # The linker will not automatically build a static lib if we build a DLL. 560106c34b88Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 560206c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 560306c34b88Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 560406c34b88Smrg _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' 560506c34b88Smrg # Don't use ranlib 560606c34b88Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 560706c34b88Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 560844584a44Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 560944584a44Smrg case $lt_outputfile in 561044584a44Smrg *.exe|*.EXE) ;; 561144584a44Smrg *) 561244584a44Smrg lt_outputfile=$lt_outputfile.exe 561344584a44Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 561444584a44Smrg ;; 561544584a44Smrg esac~ 561644584a44Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 561744584a44Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 561844584a44Smrg $RM "$lt_outputfile.manifest"; 561944584a44Smrg fi' 562006c34b88Smrg ;; 562106c34b88Smrg *) 562206c34b88Smrg # Assume MSVC wrapper 562306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 562406c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 562506c34b88Smrg # Tell ltmain to make .lib files, not .a files. 562606c34b88Smrg libext=lib 562706c34b88Smrg # Tell ltmain to make .dll files, not .so files. 562844584a44Smrg shrext_cmds=.dll 562906c34b88Smrg # FIXME: Setting linknames here is a bad hack. 563006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 563106c34b88Smrg # The linker will automatically build a .lib file if we build a DLL. 563206c34b88Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 563306c34b88Smrg # FIXME: Should let the user specify the lib program. 563406c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 563506c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 563606c34b88Smrg ;; 5637c27c18e8Smrg esac 5638c27c18e8Smrg ;; 5639c43cc173Smrg 564006c34b88Smrg darwin* | rhapsody*) 564106c34b88Smrg _LT_DARWIN_LINKER_FEATURES($1) 5642c27c18e8Smrg ;; 5643c43cc173Smrg 564406c34b88Smrg dgux*) 564506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 564606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 564706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 564806c34b88Smrg ;; 5649c27c18e8Smrg 565006c34b88Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 565106c34b88Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 565206c34b88Smrg # does not break anything, and helps significantly (at the cost of a little 565306c34b88Smrg # extra space). 565406c34b88Smrg freebsd2.2*) 565506c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 565606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 565706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 565806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 565906c34b88Smrg ;; 5660c27c18e8Smrg 566106c34b88Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 566206c34b88Smrg freebsd2.*) 566306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 566406c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 566506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 566606c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 566706c34b88Smrg ;; 5668c27c18e8Smrg 566906c34b88Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 567006c34b88Smrg freebsd* | dragonfly*) 567106c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 567206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 567306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 567406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 567506c34b88Smrg ;; 5676c43cc173Smrg 567706c34b88Smrg hpux9*) 567844584a44Smrg if test yes = "$GCC"; then 567944584a44Smrg _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' 568006c34b88Smrg else 568144584a44Smrg _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' 568206c34b88Smrg fi 568344584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 568406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 568506c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5686c43cc173Smrg 568706c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 568806c34b88Smrg # but as the default location of the library. 568906c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 569044584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 569106c34b88Smrg ;; 5692c43cc173Smrg 569306c34b88Smrg hpux10*) 569444584a44Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 569544584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 569606c34b88Smrg else 569706c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 569806c34b88Smrg fi 569944584a44Smrg if test no = "$with_gnu_ld"; then 570044584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 570106c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 570206c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 570306c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 570444584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 570506c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 570606c34b88Smrg # but as the default location of the library. 570706c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 570806c34b88Smrg fi 570906c34b88Smrg ;; 5710b789ec8aSmrg 571106c34b88Smrg hpux11*) 571244584a44Smrg if test yes,no = "$GCC,$with_gnu_ld"; then 571306c34b88Smrg case $host_cpu in 571406c34b88Smrg hppa*64*) 571544584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 571606c34b88Smrg ;; 571706c34b88Smrg ia64*) 571844584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 571906c34b88Smrg ;; 572006c34b88Smrg *) 572144584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 572206c34b88Smrg ;; 572306c34b88Smrg esac 572406c34b88Smrg else 572506c34b88Smrg case $host_cpu in 572606c34b88Smrg hppa*64*) 572744584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 572806c34b88Smrg ;; 572906c34b88Smrg ia64*) 573044584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 573106c34b88Smrg ;; 573206c34b88Smrg *) 573306c34b88Smrg m4_if($1, [], [ 573406c34b88Smrg # Older versions of the 11.00 compiler do not understand -b yet 573506c34b88Smrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 573606c34b88Smrg _LT_LINKER_OPTION([if $CC understands -b], 573706c34b88Smrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 573844584a44Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 573906c34b88Smrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 574044584a44Smrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 574106c34b88Smrg ;; 574206c34b88Smrg esac 574306c34b88Smrg fi 574444584a44Smrg if test no = "$with_gnu_ld"; then 574544584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 574606c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5747c43cc173Smrg 574806c34b88Smrg case $host_cpu in 574906c34b88Smrg hppa*64*|ia64*) 575006c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 575106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 575206c34b88Smrg ;; 575306c34b88Smrg *) 575406c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 575506c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 575644584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 575706c34b88Smrg 575806c34b88Smrg # hardcode_minus_L: Not really in the search PATH, 575906c34b88Smrg # but as the default location of the library. 576006c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 576106c34b88Smrg ;; 576206c34b88Smrg esac 576306c34b88Smrg fi 576406c34b88Smrg ;; 576506c34b88Smrg 576606c34b88Smrg irix5* | irix6* | nonstopux*) 576744584a44Smrg if test yes = "$GCC"; then 576844584a44Smrg _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' 576906c34b88Smrg # Try to use the -exported_symbol ld option, if it does not 577006c34b88Smrg # work, assume that -exports_file does not work either and 577106c34b88Smrg # implicitly export all symbols. 577206c34b88Smrg # This should be the same for all languages, so no per-tag cache variable. 577306c34b88Smrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 577406c34b88Smrg [lt_cv_irix_exported_symbol], 577544584a44Smrg [save_LDFLAGS=$LDFLAGS 577644584a44Smrg LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" 577706c34b88Smrg AC_LINK_IFELSE( 577806c34b88Smrg [AC_LANG_SOURCE( 577906c34b88Smrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 578006c34b88Smrg [C++], [[int foo (void) { return 0; }]], 578106c34b88Smrg [Fortran 77], [[ 5782c27c18e8Smrg subroutine foo 578306c34b88Smrg end]], 578406c34b88Smrg [Fortran], [[ 5785c27c18e8Smrg subroutine foo 578606c34b88Smrg end]])])], 578706c34b88Smrg [lt_cv_irix_exported_symbol=yes], 578806c34b88Smrg [lt_cv_irix_exported_symbol=no]) 578944584a44Smrg LDFLAGS=$save_LDFLAGS]) 579044584a44Smrg if test yes = "$lt_cv_irix_exported_symbol"; then 579144584a44Smrg _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' 579206c34b88Smrg fi 579306c34b88Smrg else 579444584a44Smrg _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' 579544584a44Smrg _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' 579606c34b88Smrg fi 579706c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 579844584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 579906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 580006c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 580106c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 580206c34b88Smrg ;; 5803b789ec8aSmrg 580444584a44Smrg linux*) 580544584a44Smrg case $cc_basename in 580644584a44Smrg tcc*) 580744584a44Smrg # Fabrice Bellard et al's Tiny C Compiler 580844584a44Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 580944584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 581044584a44Smrg ;; 581144584a44Smrg esac 581244584a44Smrg ;; 581344584a44Smrg 581406c34b88Smrg netbsd*) 581506c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 581606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 581706c34b88Smrg else 581806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 581906c34b88Smrg fi 582006c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 582106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 582206c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 582306c34b88Smrg ;; 5824b789ec8aSmrg 582506c34b88Smrg newsos6) 582606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 582706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 582844584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 582906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 583006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 583106c34b88Smrg ;; 5832c43cc173Smrg 583306c34b88Smrg *nto* | *qnx*) 583406c34b88Smrg ;; 5835c43cc173Smrg 583644584a44Smrg openbsd* | bitrig*) 583706c34b88Smrg if test -f /usr/libexec/ld.so; then 583806c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 583906c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 584006c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 584144584a44Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then 584206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 584344584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' 584444584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 584544584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 584606c34b88Smrg else 584744584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 584844584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 584906c34b88Smrg fi 585006c34b88Smrg else 585106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 585206c34b88Smrg fi 585306c34b88Smrg ;; 5854c43cc173Smrg 585506c34b88Smrg os2*) 585606c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 585706c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 585806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 585944584a44Smrg shrext_cmds=.dll 586044584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 586144584a44Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 586244584a44Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 586344584a44Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 586444584a44Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 586544584a44Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 586644584a44Smrg emximp -o $lib $output_objdir/$libname.def' 586744584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 586844584a44Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 586944584a44Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 587044584a44Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 587144584a44Smrg prefix_cmds="$SED"~ 587244584a44Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 587344584a44Smrg prefix_cmds="$prefix_cmds -e 1d"; 587444584a44Smrg fi~ 587544584a44Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 587644584a44Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 587744584a44Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 587844584a44Smrg emximp -o $lib $output_objdir/$libname.def' 587944584a44Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 588044584a44Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 588106c34b88Smrg ;; 5882c43cc173Smrg 588306c34b88Smrg osf3*) 588444584a44Smrg if test yes = "$GCC"; then 588544584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 588644584a44Smrg _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' 588706c34b88Smrg else 588806c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 588944584a44Smrg _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' 589006c34b88Smrg fi 589106c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 589244584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 589306c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 589406c34b88Smrg ;; 5895c43cc173Smrg 589606c34b88Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 589744584a44Smrg if test yes = "$GCC"; then 589844584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 589944584a44Smrg _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' 590044584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 590106c34b88Smrg else 590206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 590344584a44Smrg _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' 590406c34b88Smrg _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~ 590544584a44Smrg $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' 590606c34b88Smrg 590706c34b88Smrg # Both c and cxx compiler support -rpath directly 590806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 590906c34b88Smrg fi 591006c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 591106c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 591206c34b88Smrg ;; 591306c34b88Smrg 591406c34b88Smrg solaris*) 591506c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 591644584a44Smrg if test yes = "$GCC"; then 591744584a44Smrg wlarc='$wl' 591844584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' 591906c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 592044584a44Smrg $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' 592106c34b88Smrg else 592206c34b88Smrg case `$CC -V 2>&1` in 592306c34b88Smrg *"Compilers 5.0"*) 592406c34b88Smrg wlarc='' 592544584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' 592606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 592744584a44Smrg $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 592806c34b88Smrg ;; 592906c34b88Smrg *) 593044584a44Smrg wlarc='$wl' 593144584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' 593206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 593344584a44Smrg $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 593406c34b88Smrg ;; 593506c34b88Smrg esac 593606c34b88Smrg fi 593706c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 593806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 593906c34b88Smrg case $host_os in 594006c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 594106c34b88Smrg *) 594206c34b88Smrg # The compiler driver will combine and reorder linker options, 594344584a44Smrg # but understands '-z linker_flag'. GCC discards it without '$wl', 594406c34b88Smrg # but is careful enough not to reorder. 594506c34b88Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 594644584a44Smrg if test yes = "$GCC"; then 594744584a44Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 594806c34b88Smrg else 594906c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 595006c34b88Smrg fi 595106c34b88Smrg ;; 595206c34b88Smrg esac 595306c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 595406c34b88Smrg ;; 5955c43cc173Smrg 595606c34b88Smrg sunos4*) 595744584a44Smrg if test sequent = "$host_vendor"; then 595806c34b88Smrg # Use $CC to link under sequent, because it throws in some extra .o 595906c34b88Smrg # files that make .init and .fini sections work. 596044584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' 596106c34b88Smrg else 596206c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 596306c34b88Smrg fi 596406c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 596506c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 596606c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 596706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 596806c34b88Smrg ;; 5969c43cc173Smrg 597006c34b88Smrg sysv4) 597106c34b88Smrg case $host_vendor in 597206c34b88Smrg sni) 597306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 597406c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 597506c34b88Smrg ;; 597606c34b88Smrg siemens) 597706c34b88Smrg ## LD is ld it makes a PLAMLIB 597806c34b88Smrg ## CC just makes a GrossModule. 597906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 598006c34b88Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 598106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 598206c34b88Smrg ;; 598306c34b88Smrg motorola) 598406c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 598506c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 598606c34b88Smrg ;; 598706c34b88Smrg esac 598806c34b88Smrg runpath_var='LD_RUN_PATH' 598906c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 599006c34b88Smrg ;; 5991c43cc173Smrg 599206c34b88Smrg sysv4.3*) 599306c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 599406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 599506c34b88Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 599606c34b88Smrg ;; 5997c43cc173Smrg 599806c34b88Smrg sysv4*MP*) 599906c34b88Smrg if test -d /usr/nec; then 600006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 600106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 600206c34b88Smrg runpath_var=LD_RUN_PATH 600306c34b88Smrg hardcode_runpath_var=yes 600406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 600506c34b88Smrg fi 600606c34b88Smrg ;; 6007c43cc173Smrg 600806c34b88Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 600944584a44Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 601006c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 601106c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 601206c34b88Smrg runpath_var='LD_RUN_PATH' 6013c43cc173Smrg 601444584a44Smrg if test yes = "$GCC"; then 601544584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 601644584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 601706c34b88Smrg else 601844584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 601944584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 602006c34b88Smrg fi 602106c34b88Smrg ;; 6022c43cc173Smrg 602306c34b88Smrg sysv5* | sco3.2v5* | sco5v6*) 602444584a44Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 602506c34b88Smrg # link with -lc, and that would cause any symbols used from libc to 602606c34b88Smrg # always be unresolved, which means just about no library would 602706c34b88Smrg # ever link correctly. If we're not using GNU ld we use -z text 602806c34b88Smrg # though, which does catch some bad symbols but isn't as heavy-handed 602906c34b88Smrg # as -z defs. 603044584a44Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 603144584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 603206c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 603306c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 603444584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 603506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 603606c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 603744584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 603806c34b88Smrg runpath_var='LD_RUN_PATH' 6039c43cc173Smrg 604044584a44Smrg if test yes = "$GCC"; then 604144584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 604244584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 604306c34b88Smrg else 604444584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 604544584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 604606c34b88Smrg fi 6047c27c18e8Smrg ;; 6048c43cc173Smrg 604906c34b88Smrg uts4*) 605006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 605106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 605206c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 605306c34b88Smrg ;; 6054c27c18e8Smrg 605506c34b88Smrg *) 605606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6057c27c18e8Smrg ;; 6058c27c18e8Smrg esac 6059c43cc173Smrg 606044584a44Smrg if test sni = "$host_vendor"; then 606106c34b88Smrg case $host in 606206c34b88Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 606344584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' 606406c34b88Smrg ;; 606506c34b88Smrg esac 6066c27c18e8Smrg fi 606706c34b88Smrg fi 6068c27c18e8Smrg]) 606906c34b88SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 607044584a44Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 6071c43cc173Smrg 607206c34b88Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 607306c34b88Smrg 607406c34b88Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 607506c34b88Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 607606c34b88Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 607706c34b88Smrg [The commands to extract the exported symbol list from a shared archive]) 607806c34b88Smrg 607906c34b88Smrg# 608006c34b88Smrg# Do we need to explicitly link libc? 608106c34b88Smrg# 608206c34b88Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 608306c34b88Smrgx|xyes) 608406c34b88Smrg # Assume -lc should be added 608506c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 608606c34b88Smrg 608744584a44Smrg if test yes,yes = "$GCC,$enable_shared"; then 608806c34b88Smrg case $_LT_TAGVAR(archive_cmds, $1) in 608906c34b88Smrg *'~'*) 609006c34b88Smrg # FIXME: we may have to deal with multi-command sequences. 609106c34b88Smrg ;; 609206c34b88Smrg '$CC '*) 609306c34b88Smrg # Test whether the compiler implicitly links with -lc since on some 609406c34b88Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 609506c34b88Smrg # to ld, don't add -lc before -lgcc. 609606c34b88Smrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 609706c34b88Smrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 609806c34b88Smrg [$RM conftest* 609906c34b88Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 610006c34b88Smrg 610106c34b88Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 610206c34b88Smrg soname=conftest 610306c34b88Smrg lib=conftest 610406c34b88Smrg libobjs=conftest.$ac_objext 610506c34b88Smrg deplibs= 610606c34b88Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 610706c34b88Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 610806c34b88Smrg compiler_flags=-v 610906c34b88Smrg linker_flags=-v 611006c34b88Smrg verstring= 611106c34b88Smrg output_objdir=. 611206c34b88Smrg libname=conftest 611306c34b88Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 611406c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 611506c34b88Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 611606c34b88Smrg then 611706c34b88Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 611806c34b88Smrg else 611906c34b88Smrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 612006c34b88Smrg fi 612106c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 612206c34b88Smrg else 612306c34b88Smrg cat conftest.err 1>&5 612406c34b88Smrg fi 612506c34b88Smrg $RM conftest* 612606c34b88Smrg ]) 612706c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 612806c34b88Smrg ;; 612906c34b88Smrg esac 613006c34b88Smrg fi 613106c34b88Smrg ;; 613206c34b88Smrgesac 6133c27c18e8Smrg 613406c34b88Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 613506c34b88Smrg [Whether or not to add -lc for building shared libraries]) 613606c34b88Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 613706c34b88Smrg [enable_shared_with_static_runtimes], [0], 613806c34b88Smrg [Whether or not to disallow shared libs when runtime libs are static]) 613906c34b88Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 614006c34b88Smrg [Compiler flag to allow reflexive dlopens]) 614106c34b88Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 614206c34b88Smrg [Compiler flag to generate shared objects directly from archives]) 614306c34b88Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 614406c34b88Smrg [Whether the compiler copes with passing no objects directly]) 614506c34b88Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 614606c34b88Smrg [Create an old-style archive from a shared archive]) 614706c34b88Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 614806c34b88Smrg [Create a temporary old-style archive to link instead of a shared archive]) 614906c34b88Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 615006c34b88Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 615106c34b88Smrg_LT_TAGDECL([], [module_cmds], [2], 615206c34b88Smrg [Commands used to build a loadable module if different from building 615306c34b88Smrg a shared archive.]) 615406c34b88Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 615506c34b88Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 615606c34b88Smrg [Whether we are building with GNU ld or not]) 615706c34b88Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 615806c34b88Smrg [Flag that allows shared libraries with undefined symbols to be built]) 615906c34b88Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 616006c34b88Smrg [Flag that enforces no undefined symbols]) 616106c34b88Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 616206c34b88Smrg [Flag to hardcode $libdir into a binary during linking. 616306c34b88Smrg This must work even if $libdir does not exist]) 616406c34b88Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 616506c34b88Smrg [Whether we need a single "-rpath" flag with a separated argument]) 616606c34b88Smrg_LT_TAGDECL([], [hardcode_direct], [0], 616744584a44Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 616806c34b88Smrg DIR into the resulting binary]) 616906c34b88Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 617044584a44Smrg [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes 617106c34b88Smrg DIR into the resulting binary and the resulting library dependency is 617244584a44Smrg "absolute", i.e impossible to change by setting $shlibpath_var if the 617306c34b88Smrg library is relocated]) 617406c34b88Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 617506c34b88Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 617606c34b88Smrg into the resulting binary]) 617706c34b88Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 617806c34b88Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 617906c34b88Smrg into the resulting binary]) 618006c34b88Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 618106c34b88Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 618206c34b88Smrg into the library and all subsequent libraries and executables linked 618306c34b88Smrg against it]) 618406c34b88Smrg_LT_TAGDECL([], [inherit_rpath], [0], 618506c34b88Smrg [Set to yes if linker adds runtime paths of dependent libraries 618606c34b88Smrg to runtime path list]) 618706c34b88Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 618806c34b88Smrg [Whether libtool must link a program against all its dependency libraries]) 618906c34b88Smrg_LT_TAGDECL([], [always_export_symbols], [0], 619006c34b88Smrg [Set to "yes" if exported symbols are required]) 619106c34b88Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 619206c34b88Smrg [The commands to list exported symbols]) 619306c34b88Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 619406c34b88Smrg [Symbols that should not be listed in the preloaded symbols]) 619506c34b88Smrg_LT_TAGDECL([], [include_expsyms], [1], 619606c34b88Smrg [Symbols that must always be exported]) 619706c34b88Smrg_LT_TAGDECL([], [prelink_cmds], [2], 619806c34b88Smrg [Commands necessary for linking programs (against libraries) with templates]) 619906c34b88Smrg_LT_TAGDECL([], [postlink_cmds], [2], 620006c34b88Smrg [Commands necessary for finishing linking programs]) 620106c34b88Smrg_LT_TAGDECL([], [file_list_spec], [1], 620206c34b88Smrg [Specify filename containing input files]) 620306c34b88Smrgdnl FIXME: Not yet implemented 620406c34b88Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 620506c34b88Smrgdnl [Compiler flag to generate thread safe objects]) 620606c34b88Smrg])# _LT_LINKER_SHLIBS 6207c27c18e8Smrg 6208c43cc173Smrg 620906c34b88Smrg# _LT_LANG_C_CONFIG([TAG]) 621006c34b88Smrg# ------------------------ 621106c34b88Smrg# Ensure that the configuration variables for a C compiler are suitably 621206c34b88Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 621344584a44Smrg# the compiler configuration to 'libtool'. 621406c34b88Smrgm4_defun([_LT_LANG_C_CONFIG], 621506c34b88Smrg[m4_require([_LT_DECL_EGREP])dnl 621644584a44Smrglt_save_CC=$CC 621706c34b88SmrgAC_LANG_PUSH(C) 6218c43cc173Smrg 621906c34b88Smrg# Source file extension for C test sources. 622006c34b88Smrgac_ext=c 6221c43cc173Smrg 622206c34b88Smrg# Object file extension for compiled C test sources. 6223c27c18e8Smrgobjext=o 6224c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 6225c27c18e8Smrg 622606c34b88Smrg# Code to be used in simple compile tests 622706c34b88Smrglt_simple_compile_test_code="int some_variable = 0;" 6228c43cc173Smrg 622906c34b88Smrg# Code to be used in simple link tests 623006c34b88Smrglt_simple_link_test_code='int main(){return(0);}' 6231c43cc173Smrg 623206c34b88Smrg_LT_TAG_COMPILER 623306c34b88Smrg# Save the default compiler, since it gets overwritten when the other 623406c34b88Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 623506c34b88Smrgcompiler_DEFAULT=$CC 6236c27c18e8Smrg 623706c34b88Smrg# save warnings/boilerplate of simple test code 623806c34b88Smrg_LT_COMPILER_BOILERPLATE 623906c34b88Smrg_LT_LINKER_BOILERPLATE 6240c27c18e8Smrg 624106c34b88Smrgif test -n "$compiler"; then 624206c34b88Smrg _LT_COMPILER_NO_RTTI($1) 624306c34b88Smrg _LT_COMPILER_PIC($1) 624406c34b88Smrg _LT_COMPILER_C_O($1) 624506c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 624606c34b88Smrg _LT_LINKER_SHLIBS($1) 624706c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 624806c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 624906c34b88Smrg LT_SYS_DLOPEN_SELF 625006c34b88Smrg _LT_CMD_STRIPLIB 6251c27c18e8Smrg 625244584a44Smrg # Report what library types will actually be built 625306c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 625406c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 6255c27c18e8Smrg 625606c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 625744584a44Smrg test no = "$can_build_shared" && enable_shared=no 6258c27c18e8Smrg 625906c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 626006c34b88Smrg # are all built from PIC. 626106c34b88Smrg case $host_os in 626206c34b88Smrg aix3*) 626344584a44Smrg test yes = "$enable_shared" && enable_static=no 626406c34b88Smrg if test -n "$RANLIB"; then 626506c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 626606c34b88Smrg postinstall_cmds='$RANLIB $lib' 626706c34b88Smrg fi 626806c34b88Smrg ;; 6269c43cc173Smrg 627006c34b88Smrg aix[[4-9]]*) 627144584a44Smrg if test ia64 != "$host_cpu"; then 627244584a44Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 627344584a44Smrg yes,aix,yes) ;; # shared object as lib.so file only 627444584a44Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 627544584a44Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 627644584a44Smrg esac 627706c34b88Smrg fi 627806c34b88Smrg ;; 627906c34b88Smrg esac 628006c34b88Smrg AC_MSG_RESULT([$enable_shared]) 6281c43cc173Smrg 628206c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 628306c34b88Smrg # Make sure either enable_shared or enable_static is yes. 628444584a44Smrg test yes = "$enable_shared" || enable_static=yes 628506c34b88Smrg AC_MSG_RESULT([$enable_static]) 6286c43cc173Smrg 628706c34b88Smrg _LT_CONFIG($1) 628806c34b88Smrgfi 628906c34b88SmrgAC_LANG_POP 629044584a44SmrgCC=$lt_save_CC 629106c34b88Smrg])# _LT_LANG_C_CONFIG 629237eb1ca1Smrg 629306c34b88Smrg 629406c34b88Smrg# _LT_LANG_CXX_CONFIG([TAG]) 629506c34b88Smrg# -------------------------- 629606c34b88Smrg# Ensure that the configuration variables for a C++ compiler are suitably 629706c34b88Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 629844584a44Smrg# the compiler configuration to 'libtool'. 629906c34b88Smrgm4_defun([_LT_LANG_CXX_CONFIG], 630006c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 630106c34b88Smrgm4_require([_LT_DECL_EGREP])dnl 630206c34b88Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 630344584a44Smrgif test -n "$CXX" && ( test no != "$CXX" && 630444584a44Smrg ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || 630544584a44Smrg (test g++ != "$CXX"))); then 630606c34b88Smrg AC_PROG_CXXCPP 630706c34b88Smrgelse 630806c34b88Smrg _lt_caught_CXX_error=yes 630937eb1ca1Smrgfi 6310c27c18e8Smrg 631106c34b88SmrgAC_LANG_PUSH(C++) 6312c27c18e8Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6313c27c18e8Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6314c27c18e8Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6315c27c18e8Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 631606c34b88Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 6317c27c18e8Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6318c27c18e8Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6319c27c18e8Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6320c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6321c27c18e8Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6322c27c18e8Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 632306c34b88Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 6324c27c18e8Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6325c27c18e8Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6326c27c18e8Smrg_LT_TAGVAR(module_cmds, $1)= 6327c27c18e8Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6328c27c18e8Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6329c27c18e8Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 633037eb1ca1Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 633137eb1ca1Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 6332c27c18e8Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6333c27c18e8Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6334c27c18e8Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6335c27c18e8Smrg 633606c34b88Smrg# Source file extension for C++ test sources. 633706c34b88Smrgac_ext=cpp 6338c27c18e8Smrg 633906c34b88Smrg# Object file extension for compiled C++ test sources. 6340c27c18e8Smrgobjext=o 6341c27c18e8Smrg_LT_TAGVAR(objext, $1)=$objext 6342c27c18e8Smrg 6343c27c18e8Smrg# No sense in running all these tests if we already determined that 634406c34b88Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 6345c27c18e8Smrg# are currently assumed to apply to all compilers on this platform, 6346c27c18e8Smrg# and will be corrupted by setting them based on a non-working compiler. 634744584a44Smrgif test yes != "$_lt_caught_CXX_error"; then 6348c27c18e8Smrg # Code to be used in simple compile tests 634906c34b88Smrg lt_simple_compile_test_code="int some_variable = 0;" 6350c43cc173Smrg 6351c27c18e8Smrg # Code to be used in simple link tests 635206c34b88Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 6353c43cc173Smrg 6354c27c18e8Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6355c27c18e8Smrg _LT_TAG_COMPILER 6356c43cc173Smrg 6357c27c18e8Smrg # save warnings/boilerplate of simple test code 6358c27c18e8Smrg _LT_COMPILER_BOILERPLATE 6359c27c18e8Smrg _LT_LINKER_BOILERPLATE 6360c43cc173Smrg 6361c27c18e8Smrg # Allow CC to be a program name with arguments. 636206c34b88Smrg lt_save_CC=$CC 6363b789ec8aSmrg lt_save_CFLAGS=$CFLAGS 636406c34b88Smrg lt_save_LD=$LD 636506c34b88Smrg lt_save_GCC=$GCC 636606c34b88Smrg GCC=$GXX 636706c34b88Smrg lt_save_with_gnu_ld=$with_gnu_ld 636806c34b88Smrg lt_save_path_LD=$lt_cv_path_LD 636906c34b88Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 637006c34b88Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 637106c34b88Smrg else 637206c34b88Smrg $as_unset lt_cv_prog_gnu_ld 637306c34b88Smrg fi 637406c34b88Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 637506c34b88Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 637606c34b88Smrg else 637706c34b88Smrg $as_unset lt_cv_path_LD 637806c34b88Smrg fi 637906c34b88Smrg test -z "${LDCXX+set}" || LD=$LDCXX 638006c34b88Smrg CC=${CXX-"c++"} 638106c34b88Smrg CFLAGS=$CXXFLAGS 6382c27c18e8Smrg compiler=$CC 6383c27c18e8Smrg _LT_TAGVAR(compiler, $1)=$CC 6384c27c18e8Smrg _LT_CC_BASENAME([$compiler]) 6385c27c18e8Smrg 6386c27c18e8Smrg if test -n "$compiler"; then 638706c34b88Smrg # We don't want -fno-exception when compiling C++ code, so set the 638806c34b88Smrg # no_builtin_flag separately 638944584a44Smrg if test yes = "$GXX"; then 639006c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 639106c34b88Smrg else 639206c34b88Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 639306c34b88Smrg fi 6394c27c18e8Smrg 639544584a44Smrg if test yes = "$GXX"; then 639606c34b88Smrg # Set up default GNU C++ configuration 6397c27c18e8Smrg 639806c34b88Smrg LT_PATH_LD 639906c34b88Smrg 640006c34b88Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 640106c34b88Smrg # archiving commands below assume that GNU ld is being used. 640244584a44Smrg if test yes = "$with_gnu_ld"; then 640344584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 640444584a44Smrg _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' 640506c34b88Smrg 640644584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 640744584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 640806c34b88Smrg 640906c34b88Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 641006c34b88Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 641106c34b88Smrg # investigate it a little bit more. (MM) 641244584a44Smrg wlarc='$wl' 641306c34b88Smrg 641406c34b88Smrg # ancient GNU ld didn't support --whole-archive et. al. 641506c34b88Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 641606c34b88Smrg $GREP 'no-whole-archive' > /dev/null; then 641744584a44Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 641806c34b88Smrg else 641906c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 642006c34b88Smrg fi 642106c34b88Smrg else 642206c34b88Smrg with_gnu_ld=no 642306c34b88Smrg wlarc= 642406c34b88Smrg 642506c34b88Smrg # A generic and very simple default shared library creation 642606c34b88Smrg # command for GNU C++ for the case where it uses the native 642706c34b88Smrg # linker, instead of GNU ld. If possible, this setting should 642806c34b88Smrg # overridden to take advantage of the native linker features on 642906c34b88Smrg # the platform it is being used on. 643006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 643106c34b88Smrg fi 643206c34b88Smrg 643306c34b88Smrg # Commands to make compiler produce verbose output that lists 643406c34b88Smrg # what "hidden" libraries, object files and flags are used when 643506c34b88Smrg # linking a shared library. 643606c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 643706c34b88Smrg 643806c34b88Smrg else 643906c34b88Smrg GXX=no 644006c34b88Smrg with_gnu_ld=no 644106c34b88Smrg wlarc= 644206c34b88Smrg fi 644306c34b88Smrg 644406c34b88Smrg # PORTME: fill in a description of your system's C++ link characteristics 644506c34b88Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 644606c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6447c43cc173Smrg case $host_os in 6448c27c18e8Smrg aix3*) 644906c34b88Smrg # FIXME: insert proper C++ library support 645006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6451c27c18e8Smrg ;; 645221e67964Smrg aix[[4-9]]*) 645344584a44Smrg if test ia64 = "$host_cpu"; then 645406c34b88Smrg # On IA64, the linker does run time linking by default, so we don't 645506c34b88Smrg # have to do anything special. 645606c34b88Smrg aix_use_runtimelinking=no 645706c34b88Smrg exp_sym_flag='-Bexport' 645844584a44Smrg no_entry_flag= 645906c34b88Smrg else 646006c34b88Smrg aix_use_runtimelinking=no 6461c27c18e8Smrg 646206c34b88Smrg # Test if we are trying to use run time linking or normal 646306c34b88Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 646444584a44Smrg # have runtime linking enabled, and use it for executables. 646544584a44Smrg # For shared libraries, we enable/disable runtime linking 646644584a44Smrg # depending on the kind of the shared library created - 646744584a44Smrg # when "with_aix_soname,aix_use_runtimelinking" is: 646844584a44Smrg # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables 646944584a44Smrg # "aix,yes" lib.so shared, rtl:yes, for executables 647044584a44Smrg # lib.a static archive 647144584a44Smrg # "both,no" lib.so.V(shr.o) shared, rtl:yes 647244584a44Smrg # lib.a(lib.so.V) shared, rtl:no, for executables 647344584a44Smrg # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables 647444584a44Smrg # lib.a(lib.so.V) shared, rtl:no 647544584a44Smrg # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables 647644584a44Smrg # lib.a static archive 647706c34b88Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 647806c34b88Smrg for ld_flag in $LDFLAGS; do 647906c34b88Smrg case $ld_flag in 648006c34b88Smrg *-brtl*) 648106c34b88Smrg aix_use_runtimelinking=yes 648206c34b88Smrg break 648306c34b88Smrg ;; 648406c34b88Smrg esac 648506c34b88Smrg done 648644584a44Smrg if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then 648744584a44Smrg # With aix-soname=svr4, we create the lib.so.V shared archives only, 648844584a44Smrg # so we don't have lib.a shared libs to link our executables. 648944584a44Smrg # We have to force runtime linking in this case. 649044584a44Smrg aix_use_runtimelinking=yes 649144584a44Smrg LDFLAGS="$LDFLAGS -Wl,-brtl" 649244584a44Smrg fi 649306c34b88Smrg ;; 649406c34b88Smrg esac 6495c27c18e8Smrg 649606c34b88Smrg exp_sym_flag='-bexport' 649706c34b88Smrg no_entry_flag='-bnoentry' 649806c34b88Smrg fi 6499c27c18e8Smrg 650006c34b88Smrg # When large executables or shared objects are built, AIX ld can 650106c34b88Smrg # have problems creating the table of contents. If linking a library 650206c34b88Smrg # or program results in "error TOC overflow" add -mminimal-toc to 650306c34b88Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 650406c34b88Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6505c27c18e8Smrg 650606c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='' 650706c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 650806c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 650906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 651006c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 651144584a44Smrg _LT_TAGVAR(file_list_spec, $1)='$wl-f,' 651244584a44Smrg case $with_aix_soname,$aix_use_runtimelinking in 651344584a44Smrg aix,*) ;; # no import file 651444584a44Smrg svr4,* | *,yes) # use import file 651544584a44Smrg # The Import File defines what to hardcode. 651644584a44Smrg _LT_TAGVAR(hardcode_direct, $1)=no 651744584a44Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 651844584a44Smrg ;; 651944584a44Smrg esac 6520c27c18e8Smrg 652144584a44Smrg if test yes = "$GXX"; then 652206c34b88Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 652306c34b88Smrg # We only want to do this on AIX 4.2 and lower, the check 652406c34b88Smrg # below for broken collect2 doesn't work under 4.3+ 652544584a44Smrg collect2name=`$CC -print-prog-name=collect2` 652606c34b88Smrg if test -f "$collect2name" && 652706c34b88Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 652806c34b88Smrg then 652906c34b88Smrg # We have reworked collect2 653006c34b88Smrg : 653106c34b88Smrg else 653206c34b88Smrg # We have old collect2 653306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 653406c34b88Smrg # It fails to find uninstalled libraries when the uninstalled 653506c34b88Smrg # path is not listed in the libpath. Setting hardcode_minus_L 653606c34b88Smrg # to unsupported forces relinking 653706c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 653806c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 653906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 654006c34b88Smrg fi 654106c34b88Smrg esac 654206c34b88Smrg shared_flag='-shared' 654344584a44Smrg if test yes = "$aix_use_runtimelinking"; then 654444584a44Smrg shared_flag=$shared_flag' $wl-G' 654506c34b88Smrg fi 654644584a44Smrg # Need to ensure runtime linking is disabled for the traditional 654744584a44Smrg # shared library, or the linker may eventually find shared libraries 654844584a44Smrg # /with/ Import File - we do not want to mix them. 654944584a44Smrg shared_flag_aix='-shared' 655044584a44Smrg shared_flag_svr4='-shared $wl-G' 655106c34b88Smrg else 655206c34b88Smrg # not using gcc 655344584a44Smrg if test ia64 = "$host_cpu"; then 655406c34b88Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 655506c34b88Smrg # chokes on -Wl,-G. The following line is correct: 655606c34b88Smrg shared_flag='-G' 655706c34b88Smrg else 655844584a44Smrg if test yes = "$aix_use_runtimelinking"; then 655944584a44Smrg shared_flag='$wl-G' 656006c34b88Smrg else 656144584a44Smrg shared_flag='$wl-bM:SRE' 656206c34b88Smrg fi 656344584a44Smrg shared_flag_aix='$wl-bM:SRE' 656444584a44Smrg shared_flag_svr4='$wl-G' 656506c34b88Smrg fi 656606c34b88Smrg fi 656721e67964Smrg 656844584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' 656906c34b88Smrg # It seems that -bexpall does not export symbols beginning with 657006c34b88Smrg # underscore (_), so it is better to generate a list of symbols to 657106c34b88Smrg # export. 657206c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 657344584a44Smrg if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then 657406c34b88Smrg # Warning - without using the other runtime loading flags (-brtl), 657506c34b88Smrg # -berok will link without error, but may produce a broken library. 657644584a44Smrg # The "-G" linker flag allows undefined symbols. 657744584a44Smrg _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' 657806c34b88Smrg # Determine the default libpath from the value encoded in an empty 657906c34b88Smrg # executable. 658006c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 658144584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 658221e67964Smrg 658344584a44Smrg _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 658406c34b88Smrg else 658544584a44Smrg if test ia64 = "$host_cpu"; then 658644584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' 658706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 658844584a44Smrg _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" 658906c34b88Smrg else 659006c34b88Smrg # Determine the default libpath from the value encoded in an 659106c34b88Smrg # empty executable. 659206c34b88Smrg _LT_SYS_MODULE_PATH_AIX([$1]) 659344584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" 659406c34b88Smrg # Warning - without using the other run time loading flags, 659506c34b88Smrg # -berok will link without error, but may produce a broken library. 659644584a44Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' 659744584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' 659844584a44Smrg if test yes = "$with_gnu_ld"; then 659906c34b88Smrg # We only use this code for GNU lds that support --whole-archive. 660044584a44Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 660106c34b88Smrg else 660206c34b88Smrg # Exported symbols can be pulled into shared objects from archives 660306c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 660406c34b88Smrg fi 660506c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 660644584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' 660744584a44Smrg # -brtl affects multiple linker settings, -berok does not and is overridden later 660844584a44Smrg compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' 660944584a44Smrg if test svr4 != "$with_aix_soname"; then 661044584a44Smrg # This is similar to how AIX traditionally builds its shared 661144584a44Smrg # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. 661244584a44Smrg _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' 661344584a44Smrg fi 661444584a44Smrg if test aix != "$with_aix_soname"; then 661544584a44Smrg _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' 661644584a44Smrg else 661744584a44Smrg # used by -dlpreopen to get the symbols 661844584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' 661944584a44Smrg fi 662044584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' 662106c34b88Smrg fi 662206c34b88Smrg fi 662306c34b88Smrg ;; 662421e67964Smrg 662506c34b88Smrg beos*) 662606c34b88Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 662706c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 662806c34b88Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 662906c34b88Smrg # support --undefined. This deserves some investigation. FIXME 663044584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 663106c34b88Smrg else 663206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 663306c34b88Smrg fi 663406c34b88Smrg ;; 663521e67964Smrg 663606c34b88Smrg chorus*) 663706c34b88Smrg case $cc_basename in 663806c34b88Smrg *) 663906c34b88Smrg # FIXME: insert proper C++ library support 664006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 664106c34b88Smrg ;; 664206c34b88Smrg esac 664306c34b88Smrg ;; 6644c27c18e8Smrg 664506c34b88Smrg cygwin* | mingw* | pw32* | cegcc*) 664606c34b88Smrg case $GXX,$cc_basename in 664706c34b88Smrg ,cl* | no,cl*) 664806c34b88Smrg # Native MSVC 664906c34b88Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 665006c34b88Smrg # no search path for DLLs. 665106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 665206c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 665306c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 665406c34b88Smrg _LT_TAGVAR(file_list_spec, $1)='@' 665506c34b88Smrg # Tell ltmain to make .lib files, not .a files. 665606c34b88Smrg libext=lib 665706c34b88Smrg # Tell ltmain to make .dll files, not .so files. 665844584a44Smrg shrext_cmds=.dll 665906c34b88Smrg # FIXME: Setting linknames here is a bad hack. 666044584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' 666144584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 666244584a44Smrg cp "$export_symbols" "$output_objdir/$soname.def"; 666344584a44Smrg echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; 666444584a44Smrg else 666544584a44Smrg $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; 666644584a44Smrg fi~ 666744584a44Smrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 666844584a44Smrg linknames=' 666906c34b88Smrg # The linker will not automatically build a static lib if we build a DLL. 667006c34b88Smrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 667106c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 667206c34b88Smrg # Don't use ranlib 667306c34b88Smrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 667406c34b88Smrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 667544584a44Smrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 667644584a44Smrg case $lt_outputfile in 667744584a44Smrg *.exe|*.EXE) ;; 667844584a44Smrg *) 667944584a44Smrg lt_outputfile=$lt_outputfile.exe 668044584a44Smrg lt_tool_outputfile=$lt_tool_outputfile.exe 668144584a44Smrg ;; 668244584a44Smrg esac~ 668344584a44Smrg func_to_tool_file "$lt_outputfile"~ 668444584a44Smrg if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then 668544584a44Smrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 668644584a44Smrg $RM "$lt_outputfile.manifest"; 668744584a44Smrg fi' 668806c34b88Smrg ;; 668906c34b88Smrg *) 669006c34b88Smrg # g++ 669106c34b88Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 669206c34b88Smrg # as there is no search path for DLLs. 669306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 669444584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' 669506c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 669606c34b88Smrg _LT_TAGVAR(always_export_symbols, $1)=no 669706c34b88Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6698c27c18e8Smrg 669906c34b88Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 670044584a44Smrg _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' 670144584a44Smrg # If the export-symbols file already is a .def file, use it as 670244584a44Smrg # is; otherwise, prepend EXPORTS... 670344584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then 670444584a44Smrg cp $export_symbols $output_objdir/$soname.def; 670544584a44Smrg else 670644584a44Smrg echo EXPORTS > $output_objdir/$soname.def; 670744584a44Smrg cat $export_symbols >> $output_objdir/$soname.def; 670844584a44Smrg fi~ 670944584a44Smrg $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' 671006c34b88Smrg else 671106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 671206c34b88Smrg fi 671306c34b88Smrg ;; 671406c34b88Smrg esac 671506c34b88Smrg ;; 671606c34b88Smrg darwin* | rhapsody*) 671706c34b88Smrg _LT_DARWIN_LINKER_FEATURES($1) 671806c34b88Smrg ;; 6719c27c18e8Smrg 672044584a44Smrg os2*) 672144584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 672244584a44Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 672344584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 672444584a44Smrg shrext_cmds=.dll 672544584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 672644584a44Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 672744584a44Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 672844584a44Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 672944584a44Smrg emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ 673044584a44Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 673144584a44Smrg emximp -o $lib $output_objdir/$libname.def' 673244584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ 673344584a44Smrg $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ 673444584a44Smrg $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ 673544584a44Smrg $ECHO EXPORTS >> $output_objdir/$libname.def~ 673644584a44Smrg prefix_cmds="$SED"~ 673744584a44Smrg if test EXPORTS = "`$SED 1q $export_symbols`"; then 673844584a44Smrg prefix_cmds="$prefix_cmds -e 1d"; 673944584a44Smrg fi~ 674044584a44Smrg prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ 674144584a44Smrg cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ 674244584a44Smrg $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ 674344584a44Smrg emximp -o $lib $output_objdir/$libname.def' 674444584a44Smrg _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' 674544584a44Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 674644584a44Smrg ;; 674744584a44Smrg 674806c34b88Smrg dgux*) 674906c34b88Smrg case $cc_basename in 675006c34b88Smrg ec++*) 675106c34b88Smrg # FIXME: insert proper C++ library support 675206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 675306c34b88Smrg ;; 675406c34b88Smrg ghcx*) 675506c34b88Smrg # Green Hills C++ Compiler 675606c34b88Smrg # FIXME: insert proper C++ library support 675706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 675806c34b88Smrg ;; 675906c34b88Smrg *) 676006c34b88Smrg # FIXME: insert proper C++ library support 676106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 676206c34b88Smrg ;; 676306c34b88Smrg esac 676406c34b88Smrg ;; 6765c27c18e8Smrg 676606c34b88Smrg freebsd2.*) 676706c34b88Smrg # C++ shared libraries reported to be fairly broken before 676806c34b88Smrg # switch to ELF 676906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 677006c34b88Smrg ;; 6771c27c18e8Smrg 677206c34b88Smrg freebsd-elf*) 677306c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 677406c34b88Smrg ;; 6775c27c18e8Smrg 677606c34b88Smrg freebsd* | dragonfly*) 677706c34b88Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 677806c34b88Smrg # conventions 677906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 678006c34b88Smrg ;; 6781c27c18e8Smrg 678206c34b88Smrg haiku*) 678344584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 678406c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 678506c34b88Smrg ;; 6786c27c18e8Smrg 678706c34b88Smrg hpux9*) 678844584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 678906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 679044584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 679106c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 679206c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 679306c34b88Smrg # but as the default 679406c34b88Smrg # location of the library. 6795c27c18e8Smrg 679606c34b88Smrg case $cc_basename in 679706c34b88Smrg CC*) 679806c34b88Smrg # FIXME: insert proper C++ library support 679906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 680006c34b88Smrg ;; 680106c34b88Smrg aCC*) 680244584a44Smrg _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' 680306c34b88Smrg # Commands to make compiler produce verbose output that lists 680406c34b88Smrg # what "hidden" libraries, object files and flags are used when 680506c34b88Smrg # linking a shared library. 680606c34b88Smrg # 680706c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 680806c34b88Smrg # explicitly linking system object files so we need to strip them 680906c34b88Smrg # from the output so that they don't get included in the library 681006c34b88Smrg # dependencies. 681144584a44Smrg 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"' 681206c34b88Smrg ;; 681306c34b88Smrg *) 681444584a44Smrg if test yes = "$GXX"; then 681544584a44Smrg _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' 681606c34b88Smrg else 681706c34b88Smrg # FIXME: insert proper C++ library support 681806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 681906c34b88Smrg fi 682006c34b88Smrg ;; 682106c34b88Smrg esac 682206c34b88Smrg ;; 6823c27c18e8Smrg 682406c34b88Smrg hpux10*|hpux11*) 682544584a44Smrg if test no = "$with_gnu_ld"; then 682644584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' 682706c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6828c27c18e8Smrg 682906c34b88Smrg case $host_cpu in 683006c34b88Smrg hppa*64*|ia64*) 683106c34b88Smrg ;; 683206c34b88Smrg *) 683344584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 683406c34b88Smrg ;; 683506c34b88Smrg esac 683606c34b88Smrg fi 683706c34b88Smrg case $host_cpu in 683806c34b88Smrg hppa*64*|ia64*) 683906c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 684006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 684106c34b88Smrg ;; 684206c34b88Smrg *) 684306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 684406c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 684506c34b88Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 684606c34b88Smrg # but as the default 684706c34b88Smrg # location of the library. 684806c34b88Smrg ;; 684906c34b88Smrg esac 6850c27c18e8Smrg 685106c34b88Smrg case $cc_basename in 685206c34b88Smrg CC*) 685306c34b88Smrg # FIXME: insert proper C++ library support 685406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 685506c34b88Smrg ;; 685606c34b88Smrg aCC*) 685706c34b88Smrg case $host_cpu in 685806c34b88Smrg hppa*64*) 685944584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 686006c34b88Smrg ;; 686106c34b88Smrg ia64*) 686244584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 686306c34b88Smrg ;; 686406c34b88Smrg *) 686544584a44Smrg _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' 686606c34b88Smrg ;; 686706c34b88Smrg esac 686806c34b88Smrg # Commands to make compiler produce verbose output that lists 686906c34b88Smrg # what "hidden" libraries, object files and flags are used when 687006c34b88Smrg # linking a shared library. 687106c34b88Smrg # 687206c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 687306c34b88Smrg # explicitly linking system object files so we need to strip them 687406c34b88Smrg # from the output so that they don't get included in the library 687506c34b88Smrg # dependencies. 687644584a44Smrg 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"' 687706c34b88Smrg ;; 687806c34b88Smrg *) 687944584a44Smrg if test yes = "$GXX"; then 688044584a44Smrg if test no = "$with_gnu_ld"; then 688106c34b88Smrg case $host_cpu in 688206c34b88Smrg hppa*64*) 688344584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 688406c34b88Smrg ;; 688506c34b88Smrg ia64*) 688644584a44Smrg _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' 688706c34b88Smrg ;; 688806c34b88Smrg *) 688944584a44Smrg _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' 689006c34b88Smrg ;; 689106c34b88Smrg esac 689206c34b88Smrg fi 689306c34b88Smrg else 689406c34b88Smrg # FIXME: insert proper C++ library support 689506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 689606c34b88Smrg fi 689706c34b88Smrg ;; 689806c34b88Smrg esac 689906c34b88Smrg ;; 6900c27c18e8Smrg 690106c34b88Smrg interix[[3-9]]*) 690206c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=no 690306c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 690444584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 690544584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 690606c34b88Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 690706c34b88Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 690806c34b88Smrg # default) and relocated if they conflict, which is a slow very memory 690906c34b88Smrg # consuming and fragmenting process. To avoid this, we pick a random, 691006c34b88Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 691106c34b88Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 691244584a44Smrg _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' 691344584a44Smrg _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' 691406c34b88Smrg ;; 691506c34b88Smrg irix5* | irix6*) 691606c34b88Smrg case $cc_basename in 691706c34b88Smrg CC*) 691806c34b88Smrg # SGI C++ 691944584a44Smrg _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' 6920f1ee322dSmrg 692106c34b88Smrg # Archives containing C++ object files must be created using 692206c34b88Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 692306c34b88Smrg # necessary to make sure instantiated templates are included 692406c34b88Smrg # in the archive. 692506c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 692606c34b88Smrg ;; 692706c34b88Smrg *) 692844584a44Smrg if test yes = "$GXX"; then 692944584a44Smrg if test no = "$with_gnu_ld"; then 693044584a44Smrg _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' 693106c34b88Smrg else 693244584a44Smrg _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' 693306c34b88Smrg fi 693406c34b88Smrg fi 693506c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 693606c34b88Smrg ;; 693706c34b88Smrg esac 693844584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 693906c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 694006c34b88Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 694106c34b88Smrg ;; 6942f1ee322dSmrg 694344584a44Smrg linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) 694406c34b88Smrg case $cc_basename in 694506c34b88Smrg KCC*) 694606c34b88Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6947f1ee322dSmrg 694806c34b88Smrg # KCC will only create a shared library if the output file 694906c34b88Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 695006c34b88Smrg # to its proper name (with version) after linking. 695144584a44Smrg _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' 695244584a44Smrg _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' 695306c34b88Smrg # Commands to make compiler produce verbose output that lists 695406c34b88Smrg # what "hidden" libraries, object files and flags are used when 695506c34b88Smrg # linking a shared library. 695606c34b88Smrg # 695706c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 695806c34b88Smrg # explicitly linking system object files so we need to strip them 695906c34b88Smrg # from the output so that they don't get included in the library 696006c34b88Smrg # dependencies. 696144584a44Smrg 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"' 6962f1ee322dSmrg 696344584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 696444584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 6965f1ee322dSmrg 696606c34b88Smrg # Archives containing C++ object files must be created using 696706c34b88Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 696806c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 696906c34b88Smrg ;; 697006c34b88Smrg icpc* | ecpc* ) 697106c34b88Smrg # Intel C++ 697206c34b88Smrg with_gnu_ld=yes 697306c34b88Smrg # version 8.0 and above of icpc choke on multiply defined symbols 697406c34b88Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 697506c34b88Smrg # earlier do not add the objects themselves. 697606c34b88Smrg case `$CC -V 2>&1` in 697706c34b88Smrg *"Version 7."*) 697844584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 697944584a44Smrg _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' 698006c34b88Smrg ;; 698106c34b88Smrg *) # Version 8.0 or newer 698206c34b88Smrg tmp_idyn= 698306c34b88Smrg case $host_cpu in 698406c34b88Smrg ia64*) tmp_idyn=' -i_dynamic';; 698506c34b88Smrg esac 698644584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 698744584a44Smrg _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' 698806c34b88Smrg ;; 698906c34b88Smrg esac 699006c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 699144584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 699244584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 699344584a44Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' 699406c34b88Smrg ;; 699506c34b88Smrg pgCC* | pgcpp*) 699606c34b88Smrg # Portland Group C++ compiler 699706c34b88Smrg case `$CC -V` in 699806c34b88Smrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 699906c34b88Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 700044584a44Smrg rm -rf $tpldir~ 700144584a44Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 700244584a44Smrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 700306c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 700444584a44Smrg rm -rf $tpldir~ 700544584a44Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 700644584a44Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 700744584a44Smrg $RANLIB $oldlib' 700806c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 700944584a44Smrg rm -rf $tpldir~ 701044584a44Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 701144584a44Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 701206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 701344584a44Smrg rm -rf $tpldir~ 701444584a44Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 701544584a44Smrg $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' 701606c34b88Smrg ;; 701706c34b88Smrg *) # Version 6 and above use weak symbols 701844584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 701944584a44Smrg _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' 702006c34b88Smrg ;; 702106c34b88Smrg esac 7022f1ee322dSmrg 702344584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' 702444584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 702544584a44Smrg _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' 702606c34b88Smrg ;; 702706c34b88Smrg cxx*) 702806c34b88Smrg # Compaq C++ 702944584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' 703044584a44Smrg _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' 7031f1ee322dSmrg 703206c34b88Smrg runpath_var=LD_RUN_PATH 703306c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 703406c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 7035f1ee322dSmrg 703606c34b88Smrg # Commands to make compiler produce verbose output that lists 703706c34b88Smrg # what "hidden" libraries, object files and flags are used when 703806c34b88Smrg # linking a shared library. 703906c34b88Smrg # 704006c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 704106c34b88Smrg # explicitly linking system object files so we need to strip them 704206c34b88Smrg # from the output so that they don't get included in the library 704306c34b88Smrg # dependencies. 704444584a44Smrg 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' 704506c34b88Smrg ;; 704606c34b88Smrg xl* | mpixl* | bgxl*) 704706c34b88Smrg # IBM XL 8.0 on PPC, with GNU ld 704844584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 704944584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' 705044584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' 705144584a44Smrg if test yes = "$supports_anon_versioning"; then 705206c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 705344584a44Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 705444584a44Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 705544584a44Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' 705606c34b88Smrg fi 705706c34b88Smrg ;; 705806c34b88Smrg *) 705906c34b88Smrg case `$CC -V 2>&1 | sed 5q` in 706006c34b88Smrg *Sun\ C*) 706106c34b88Smrg # Sun C++ 5.9 706206c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 706344584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 706444584a44Smrg _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' 706506c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 706644584a44Smrg _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' 706706c34b88Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 7068f1ee322dSmrg 706906c34b88Smrg # Not sure whether something based on 707006c34b88Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 707106c34b88Smrg # would be better. 707206c34b88Smrg output_verbose_link_cmd='func_echo_all' 7073f1ee322dSmrg 707406c34b88Smrg # Archives containing C++ object files must be created using 707506c34b88Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 707606c34b88Smrg # necessary to make sure instantiated templates are included 707706c34b88Smrg # in the archive. 707806c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 707906c34b88Smrg ;; 708006c34b88Smrg esac 708106c34b88Smrg ;; 708206c34b88Smrg esac 708306c34b88Smrg ;; 7084f1ee322dSmrg 708506c34b88Smrg lynxos*) 708606c34b88Smrg # FIXME: insert proper C++ library support 708706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 708806c34b88Smrg ;; 7089f1ee322dSmrg 709006c34b88Smrg m88k*) 709106c34b88Smrg # FIXME: insert proper C++ library support 709206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 709306c34b88Smrg ;; 7094f1ee322dSmrg 709506c34b88Smrg mvs*) 709606c34b88Smrg case $cc_basename in 709706c34b88Smrg cxx*) 709806c34b88Smrg # FIXME: insert proper C++ library support 709906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 710006c34b88Smrg ;; 710106c34b88Smrg *) 710206c34b88Smrg # FIXME: insert proper C++ library support 710306c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 710406c34b88Smrg ;; 710506c34b88Smrg esac 710606c34b88Smrg ;; 7107f1ee322dSmrg 710806c34b88Smrg netbsd*) 710906c34b88Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 711006c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 711106c34b88Smrg wlarc= 711206c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 711306c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 711406c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 711506c34b88Smrg fi 711606c34b88Smrg # Workaround some broken pre-1.5 toolchains 711706c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 711806c34b88Smrg ;; 7119f1ee322dSmrg 712006c34b88Smrg *nto* | *qnx*) 712106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 712206c34b88Smrg ;; 7123c27c18e8Smrg 712444584a44Smrg openbsd* | bitrig*) 712506c34b88Smrg if test -f /usr/libexec/ld.so; then 712606c34b88Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 712706c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 712806c34b88Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 712906c34b88Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 713044584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 713144584a44Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then 713244584a44Smrg _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' 713344584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' 713444584a44Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' 713506c34b88Smrg fi 713606c34b88Smrg output_verbose_link_cmd=func_echo_all 713706c34b88Smrg else 713806c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 713906c34b88Smrg fi 714006c34b88Smrg ;; 714121e67964Smrg 714206c34b88Smrg osf3* | osf4* | osf5*) 714306c34b88Smrg case $cc_basename in 714406c34b88Smrg KCC*) 714506c34b88Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 714621e67964Smrg 714706c34b88Smrg # KCC will only create a shared library if the output file 714806c34b88Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 714906c34b88Smrg # to its proper name (with version) after linking. 715044584a44Smrg _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' 715121e67964Smrg 715244584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' 715306c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 715421e67964Smrg 715506c34b88Smrg # Archives containing C++ object files must be created using 715606c34b88Smrg # the KAI C++ compiler. 715706c34b88Smrg case $host in 715806c34b88Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 715906c34b88Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 716006c34b88Smrg esac 716106c34b88Smrg ;; 716206c34b88Smrg RCC*) 716306c34b88Smrg # Rational C++ 2.4.1 716406c34b88Smrg # FIXME: insert proper C++ library support 716506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 716606c34b88Smrg ;; 716706c34b88Smrg cxx*) 716806c34b88Smrg case $host in 716906c34b88Smrg osf3*) 717044584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 717144584a44Smrg _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' 717244584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 717306c34b88Smrg ;; 717406c34b88Smrg *) 717506c34b88Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 717644584a44Smrg _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' 717706c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 717844584a44Smrg echo "-hidden">> $lib.exp~ 717944584a44Smrg $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~ 718044584a44Smrg $RM $lib.exp' 718106c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 718206c34b88Smrg ;; 718306c34b88Smrg esac 718421e67964Smrg 718506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 718621e67964Smrg 718706c34b88Smrg # Commands to make compiler produce verbose output that lists 718806c34b88Smrg # what "hidden" libraries, object files and flags are used when 718906c34b88Smrg # linking a shared library. 719006c34b88Smrg # 719106c34b88Smrg # There doesn't appear to be a way to prevent this compiler from 719206c34b88Smrg # explicitly linking system object files so we need to strip them 719306c34b88Smrg # from the output so that they don't get included in the library 719406c34b88Smrg # dependencies. 719544584a44Smrg 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"' 719606c34b88Smrg ;; 719706c34b88Smrg *) 719844584a44Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 719944584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' 720006c34b88Smrg case $host in 720106c34b88Smrg osf3*) 720244584a44Smrg _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' 720306c34b88Smrg ;; 720406c34b88Smrg *) 720544584a44Smrg _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' 720606c34b88Smrg ;; 720706c34b88Smrg esac 720821e67964Smrg 720944584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' 721006c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 721121e67964Smrg 721206c34b88Smrg # Commands to make compiler produce verbose output that lists 721306c34b88Smrg # what "hidden" libraries, object files and flags are used when 721406c34b88Smrg # linking a shared library. 721506c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 721621e67964Smrg 721706c34b88Smrg else 721806c34b88Smrg # FIXME: insert proper C++ library support 721906c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 722006c34b88Smrg fi 722106c34b88Smrg ;; 722206c34b88Smrg esac 722306c34b88Smrg ;; 722421e67964Smrg 722506c34b88Smrg psos*) 722606c34b88Smrg # FIXME: insert proper C++ library support 722706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 722806c34b88Smrg ;; 722921e67964Smrg 723006c34b88Smrg sunos4*) 723106c34b88Smrg case $cc_basename in 723206c34b88Smrg CC*) 723306c34b88Smrg # Sun C++ 4.x 723406c34b88Smrg # FIXME: insert proper C++ library support 723506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 723606c34b88Smrg ;; 723706c34b88Smrg lcc*) 723806c34b88Smrg # Lucid 723906c34b88Smrg # FIXME: insert proper C++ library support 724006c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 724106c34b88Smrg ;; 724206c34b88Smrg *) 724306c34b88Smrg # FIXME: insert proper C++ library support 724406c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 724506c34b88Smrg ;; 724606c34b88Smrg esac 724706c34b88Smrg ;; 724821e67964Smrg 724906c34b88Smrg solaris*) 725006c34b88Smrg case $cc_basename in 725106c34b88Smrg CC* | sunCC*) 725206c34b88Smrg # Sun C++ 4.2, 5.x and Centerline C++ 725306c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 725406c34b88Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 725544584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 725606c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 725744584a44Smrg $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' 7258f1ee322dSmrg 725906c34b88Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 726006c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 726106c34b88Smrg case $host_os in 726206c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 726306c34b88Smrg *) 726406c34b88Smrg # The compiler driver will combine and reorder linker options, 726544584a44Smrg # but understands '-z linker_flag'. 726606c34b88Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 726706c34b88Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 726806c34b88Smrg ;; 726906c34b88Smrg esac 727006c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 7271f1ee322dSmrg 727206c34b88Smrg output_verbose_link_cmd='func_echo_all' 727321e67964Smrg 727406c34b88Smrg # Archives containing C++ object files must be created using 727506c34b88Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 727606c34b88Smrg # necessary to make sure instantiated templates are included 727706c34b88Smrg # in the archive. 727806c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 727906c34b88Smrg ;; 728006c34b88Smrg gcx*) 728106c34b88Smrg # Green Hills C++ Compiler 728244584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 728321e67964Smrg 728406c34b88Smrg # The C++ compiler must be used to create the archive. 728506c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 728606c34b88Smrg ;; 728706c34b88Smrg *) 728806c34b88Smrg # GNU C++ compiler with Solaris linker 728944584a44Smrg if test yes,no = "$GXX,$with_gnu_ld"; then 729044584a44Smrg _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' 729106c34b88Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 729244584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 729306c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 729444584a44Smrg $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' 729521e67964Smrg 729606c34b88Smrg # Commands to make compiler produce verbose output that lists 729706c34b88Smrg # what "hidden" libraries, object files and flags are used when 729806c34b88Smrg # linking a shared library. 729906c34b88Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 730006c34b88Smrg else 730144584a44Smrg # g++ 2.7 appears to require '-G' NOT '-shared' on this 730206c34b88Smrg # platform. 730344584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' 730406c34b88Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 730544584a44Smrg $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' 730621e67964Smrg 730706c34b88Smrg # Commands to make compiler produce verbose output that lists 730806c34b88Smrg # what "hidden" libraries, object files and flags are used when 730906c34b88Smrg # linking a shared library. 731006c34b88Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 731106c34b88Smrg fi 731221e67964Smrg 731344584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' 731406c34b88Smrg case $host_os in 731506c34b88Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 731606c34b88Smrg *) 731744584a44Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' 731806c34b88Smrg ;; 731906c34b88Smrg esac 732006c34b88Smrg fi 732106c34b88Smrg ;; 732206c34b88Smrg esac 732306c34b88Smrg ;; 732421e67964Smrg 732506c34b88Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 732644584a44Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 732706c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 732806c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 732906c34b88Smrg runpath_var='LD_RUN_PATH' 733021e67964Smrg 733106c34b88Smrg case $cc_basename in 733206c34b88Smrg CC*) 733344584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 733444584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 733506c34b88Smrg ;; 733606c34b88Smrg *) 733744584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 733844584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 733906c34b88Smrg ;; 734006c34b88Smrg esac 734106c34b88Smrg ;; 734221e67964Smrg 734306c34b88Smrg sysv5* | sco3.2v5* | sco5v6*) 734444584a44Smrg # Note: We CANNOT use -z defs as we might desire, because we do not 734506c34b88Smrg # link with -lc, and that would cause any symbols used from libc to 734606c34b88Smrg # always be unresolved, which means just about no library would 734706c34b88Smrg # ever link correctly. If we're not using GNU ld we use -z text 734806c34b88Smrg # though, which does catch some bad symbols but isn't as heavy-handed 734906c34b88Smrg # as -z defs. 735044584a44Smrg _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' 735144584a44Smrg _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' 735206c34b88Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 735306c34b88Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 735444584a44Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' 735506c34b88Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 735606c34b88Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 735744584a44Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' 735806c34b88Smrg runpath_var='LD_RUN_PATH' 7359c27c18e8Smrg 736006c34b88Smrg case $cc_basename in 736106c34b88Smrg CC*) 736244584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 736344584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 736406c34b88Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 736544584a44Smrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 736606c34b88Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 736744584a44Smrg '"$_LT_TAGVAR(reload_cmds, $1)" 736806c34b88Smrg ;; 736906c34b88Smrg *) 737044584a44Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737144584a44Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 737206c34b88Smrg ;; 737306c34b88Smrg esac 737406c34b88Smrg ;; 737521e67964Smrg 737606c34b88Smrg tandem*) 737706c34b88Smrg case $cc_basename in 737806c34b88Smrg NCC*) 737906c34b88Smrg # NonStop-UX NCC 3.20 738006c34b88Smrg # FIXME: insert proper C++ library support 738106c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 738206c34b88Smrg ;; 738306c34b88Smrg *) 738406c34b88Smrg # FIXME: insert proper C++ library support 738506c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 738606c34b88Smrg ;; 738706c34b88Smrg esac 738806c34b88Smrg ;; 7389c27c18e8Smrg 739006c34b88Smrg vxworks*) 739106c34b88Smrg # FIXME: insert proper C++ library support 739206c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739306c34b88Smrg ;; 7394c27c18e8Smrg 739506c34b88Smrg *) 739606c34b88Smrg # FIXME: insert proper C++ library support 739706c34b88Smrg _LT_TAGVAR(ld_shlibs, $1)=no 739806c34b88Smrg ;; 739906c34b88Smrg esac 7400c27c18e8Smrg 740106c34b88Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 740244584a44Smrg test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no 7403c27c18e8Smrg 740444584a44Smrg _LT_TAGVAR(GCC, $1)=$GXX 740544584a44Smrg _LT_TAGVAR(LD, $1)=$LD 7406c27c18e8Smrg 740706c34b88Smrg ## CAVEAT EMPTOR: 740806c34b88Smrg ## There is no encapsulation within the following macros, do not change 740906c34b88Smrg ## the running order or otherwise move them around unless you know exactly 741006c34b88Smrg ## what you are doing... 741106c34b88Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 741206c34b88Smrg _LT_COMPILER_PIC($1) 741306c34b88Smrg _LT_COMPILER_C_O($1) 741406c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 741506c34b88Smrg _LT_LINKER_SHLIBS($1) 741606c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 741706c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 741821e67964Smrg 741906c34b88Smrg _LT_CONFIG($1) 742006c34b88Smrg fi # test -n "$compiler" 742121e67964Smrg 742206c34b88Smrg CC=$lt_save_CC 742306c34b88Smrg CFLAGS=$lt_save_CFLAGS 742406c34b88Smrg LDCXX=$LD 742506c34b88Smrg LD=$lt_save_LD 742606c34b88Smrg GCC=$lt_save_GCC 742706c34b88Smrg with_gnu_ld=$lt_save_with_gnu_ld 742806c34b88Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 742906c34b88Smrg lt_cv_path_LD=$lt_save_path_LD 743006c34b88Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 743106c34b88Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 743244584a44Smrgfi # test yes != "$_lt_caught_CXX_error" 743321e67964Smrg 743406c34b88SmrgAC_LANG_POP 743506c34b88Smrg])# _LT_LANG_CXX_CONFIG 7436c27c18e8Smrg 7437b789ec8aSmrg 743806c34b88Smrg# _LT_FUNC_STRIPNAME_CNF 743906c34b88Smrg# ---------------------- 744006c34b88Smrg# func_stripname_cnf prefix suffix name 744106c34b88Smrg# strip PREFIX and SUFFIX off of NAME. 744206c34b88Smrg# PREFIX and SUFFIX must not contain globbing or regex special 744306c34b88Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 744406c34b88Smrg# dot (in which case that matches only a dot). 744506c34b88Smrg# 744606c34b88Smrg# This function is identical to the (non-XSI) version of func_stripname, 744706c34b88Smrg# except this one can be used by m4 code that may be executed by configure, 744806c34b88Smrg# rather than the libtool script. 744906c34b88Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 745006c34b88SmrgAC_REQUIRE([_LT_DECL_SED]) 745106c34b88SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 745206c34b88Smrgfunc_stripname_cnf () 745306c34b88Smrg{ 745444584a44Smrg case @S|@2 in 745544584a44Smrg .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; 745644584a44Smrg *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; 745706c34b88Smrg esac 745806c34b88Smrg} # func_stripname_cnf 745906c34b88Smrg])# _LT_FUNC_STRIPNAME_CNF 7460b789ec8aSmrg 746144584a44Smrg 746206c34b88Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 746306c34b88Smrg# --------------------------------- 746406c34b88Smrg# Figure out "hidden" library dependencies from verbose 746506c34b88Smrg# compiler output when linking a shared library. 746606c34b88Smrg# Parse the compiler output and extract the necessary 746706c34b88Smrg# objects, libraries and library flags. 746806c34b88Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 746906c34b88Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 747006c34b88SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 747106c34b88Smrg# Dependencies to place before and after the object being linked: 747206c34b88Smrg_LT_TAGVAR(predep_objects, $1)= 747306c34b88Smrg_LT_TAGVAR(postdep_objects, $1)= 747406c34b88Smrg_LT_TAGVAR(predeps, $1)= 747506c34b88Smrg_LT_TAGVAR(postdeps, $1)= 747606c34b88Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 7477c27c18e8Smrg 747806c34b88Smrgdnl we can't use the lt_simple_compile_test_code here, 747906c34b88Smrgdnl because it contains code intended for an executable, 748006c34b88Smrgdnl not a library. It's possible we should let each 748106c34b88Smrgdnl tag define a new lt_????_link_test_code variable, 748206c34b88Smrgdnl but it's only used here... 748306c34b88Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 748406c34b88Smrgint a; 748506c34b88Smrgvoid foo (void) { a = 0; } 748606c34b88Smrg_LT_EOF 748706c34b88Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 748806c34b88Smrgclass Foo 748906c34b88Smrg{ 749006c34b88Smrgpublic: 749106c34b88Smrg Foo (void) { a = 0; } 749206c34b88Smrgprivate: 749306c34b88Smrg int a; 749406c34b88Smrg}; 749506c34b88Smrg_LT_EOF 749606c34b88Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 749706c34b88Smrg subroutine foo 749806c34b88Smrg implicit none 749906c34b88Smrg integer*4 a 750006c34b88Smrg a=0 750106c34b88Smrg return 750206c34b88Smrg end 750306c34b88Smrg_LT_EOF 750406c34b88Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 750506c34b88Smrg subroutine foo 750606c34b88Smrg implicit none 750706c34b88Smrg integer a 750806c34b88Smrg a=0 750906c34b88Smrg return 751006c34b88Smrg end 751106c34b88Smrg_LT_EOF 751206c34b88Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 751306c34b88Smrgpublic class foo { 751406c34b88Smrg private int a; 751506c34b88Smrg public void bar (void) { 751606c34b88Smrg a = 0; 751706c34b88Smrg } 751806c34b88Smrg}; 751906c34b88Smrg_LT_EOF 752006c34b88Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 752106c34b88Smrgpackage foo 752206c34b88Smrgfunc foo() { 752306c34b88Smrg} 752406c34b88Smrg_LT_EOF 752506c34b88Smrg]) 7526c27c18e8Smrg 752706c34b88Smrg_lt_libdeps_save_CFLAGS=$CFLAGS 752806c34b88Smrgcase "$CC $CFLAGS " in #( 752906c34b88Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 753006c34b88Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 753106c34b88Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 753206c34b88Smrgesac 7533c27c18e8Smrg 753406c34b88Smrgdnl Parse the compiler output and extract the necessary 753506c34b88Smrgdnl objects, libraries and library flags. 753606c34b88Smrgif AC_TRY_EVAL(ac_compile); then 753706c34b88Smrg # Parse the compiler output and extract the necessary 753806c34b88Smrg # objects, libraries and library flags. 7539c27c18e8Smrg 754006c34b88Smrg # Sentinel used to keep track of whether or not we are before 754106c34b88Smrg # the conftest object file. 754206c34b88Smrg pre_test_object_deps_done=no 7543c27c18e8Smrg 754406c34b88Smrg for p in `eval "$output_verbose_link_cmd"`; do 754544584a44Smrg case $prev$p in 754606c34b88Smrg 754706c34b88Smrg -L* | -R* | -l*) 754806c34b88Smrg # Some compilers place space between "-{L,R}" and the path. 754906c34b88Smrg # Remove the space. 755044584a44Smrg if test x-L = "$p" || 755144584a44Smrg test x-R = "$p"; then 755206c34b88Smrg prev=$p 755306c34b88Smrg continue 755406c34b88Smrg fi 755506c34b88Smrg 755606c34b88Smrg # Expand the sysroot to ease extracting the directories later. 755706c34b88Smrg if test -z "$prev"; then 755806c34b88Smrg case $p in 755906c34b88Smrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 756006c34b88Smrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 756106c34b88Smrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 756206c34b88Smrg esac 756306c34b88Smrg fi 756406c34b88Smrg case $p in 756506c34b88Smrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 756606c34b88Smrg esac 756744584a44Smrg if test no = "$pre_test_object_deps_done"; then 756844584a44Smrg case $prev in 756906c34b88Smrg -L | -R) 757006c34b88Smrg # Internal compiler library paths should come after those 757106c34b88Smrg # provided the user. The postdeps already come after the 757206c34b88Smrg # user supplied libs so there is no need to process them. 757306c34b88Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 757444584a44Smrg _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p 757506c34b88Smrg else 757644584a44Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" 757706c34b88Smrg fi 757806c34b88Smrg ;; 757906c34b88Smrg # The "-l" case would never come before the object being 758006c34b88Smrg # linked, so don't bother handling this case. 758106c34b88Smrg esac 758206c34b88Smrg else 758306c34b88Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 758444584a44Smrg _LT_TAGVAR(postdeps, $1)=$prev$p 758506c34b88Smrg else 758644584a44Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" 758706c34b88Smrg fi 758806c34b88Smrg fi 758906c34b88Smrg prev= 759006c34b88Smrg ;; 7591c27c18e8Smrg 759206c34b88Smrg *.lto.$objext) ;; # Ignore GCC LTO objects 759306c34b88Smrg *.$objext) 759406c34b88Smrg # This assumes that the test object file only shows up 759506c34b88Smrg # once in the compiler output. 759606c34b88Smrg if test "$p" = "conftest.$objext"; then 759706c34b88Smrg pre_test_object_deps_done=yes 759806c34b88Smrg continue 759906c34b88Smrg fi 7600c27c18e8Smrg 760144584a44Smrg if test no = "$pre_test_object_deps_done"; then 760206c34b88Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 760344584a44Smrg _LT_TAGVAR(predep_objects, $1)=$p 760406c34b88Smrg else 760506c34b88Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 760606c34b88Smrg fi 760706c34b88Smrg else 760806c34b88Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 760944584a44Smrg _LT_TAGVAR(postdep_objects, $1)=$p 761006c34b88Smrg else 761106c34b88Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 761206c34b88Smrg fi 761306c34b88Smrg fi 761406c34b88Smrg ;; 7615c27c18e8Smrg 761606c34b88Smrg *) ;; # Ignore the rest. 7617c27c18e8Smrg 761806c34b88Smrg esac 761906c34b88Smrg done 7620c27c18e8Smrg 762106c34b88Smrg # Clean up. 762206c34b88Smrg rm -f a.out a.exe 7623b789ec8aSmrgelse 762406c34b88Smrg echo "libtool.m4: error: problem compiling $1 test program" 7625b789ec8aSmrgfi 7626c27c18e8Smrg 762706c34b88Smrg$RM -f confest.$objext 762806c34b88SmrgCFLAGS=$_lt_libdeps_save_CFLAGS 762921e67964Smrg 763006c34b88Smrg# PORTME: override above test on systems where it is broken 763106c34b88Smrgm4_if([$1], [CXX], 763206c34b88Smrg[case $host_os in 763306c34b88Smrginterix[[3-9]]*) 763406c34b88Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 763506c34b88Smrg # hack all around it, let's just trust "g++" to DTRT. 763606c34b88Smrg _LT_TAGVAR(predep_objects,$1)= 763706c34b88Smrg _LT_TAGVAR(postdep_objects,$1)= 763806c34b88Smrg _LT_TAGVAR(postdeps,$1)= 763906c34b88Smrg ;; 764044584a44Smrgesac 764144584a44Smrg]) 764221e67964Smrg 764306c34b88Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 764406c34b88Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 764506c34b88Smrgesac 764606c34b88Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 764706c34b88Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 764844584a44Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` 764906c34b88Smrgfi 765006c34b88Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 765106c34b88Smrg [The directories searched by this compiler when creating a shared library]) 765206c34b88Smrg_LT_TAGDECL([], [predep_objects], [1], 765306c34b88Smrg [Dependencies to place before and after the objects being linked to 765406c34b88Smrg create a shared library]) 765506c34b88Smrg_LT_TAGDECL([], [postdep_objects], [1]) 765606c34b88Smrg_LT_TAGDECL([], [predeps], [1]) 765706c34b88Smrg_LT_TAGDECL([], [postdeps], [1]) 765806c34b88Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 765906c34b88Smrg [The library search path used internally by the compiler when linking 766006c34b88Smrg a shared library]) 766106c34b88Smrg])# _LT_SYS_HIDDEN_LIBDEPS 766221e67964Smrg 766321e67964Smrg 766406c34b88Smrg# _LT_LANG_F77_CONFIG([TAG]) 766506c34b88Smrg# -------------------------- 766606c34b88Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 766706c34b88Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 766844584a44Smrg# to write the compiler configuration to 'libtool'. 766906c34b88Smrgm4_defun([_LT_LANG_F77_CONFIG], 767006c34b88Smrg[AC_LANG_PUSH(Fortran 77) 767144584a44Smrgif test -z "$F77" || test no = "$F77"; then 767206c34b88Smrg _lt_disable_F77=yes 767306c34b88Smrgfi 767421e67964Smrg 767506c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 767606c34b88Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 767706c34b88Smrg_LT_TAGVAR(always_export_symbols, $1)=no 767806c34b88Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 767906c34b88Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 768006c34b88Smrg_LT_TAGVAR(hardcode_direct, $1)=no 768106c34b88Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 768206c34b88Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 768306c34b88Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 768406c34b88Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 768506c34b88Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 768606c34b88Smrg_LT_TAGVAR(inherit_rpath, $1)=no 768706c34b88Smrg_LT_TAGVAR(module_cmds, $1)= 768806c34b88Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 768906c34b88Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 769006c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 769106c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 769206c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 769306c34b88Smrg_LT_TAGVAR(no_undefined_flag, $1)= 769406c34b88Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 769506c34b88Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 769621e67964Smrg 769706c34b88Smrg# Source file extension for f77 test sources. 769806c34b88Smrgac_ext=f 769921e67964Smrg 770006c34b88Smrg# Object file extension for compiled f77 test sources. 770106c34b88Smrgobjext=o 770206c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 770321e67964Smrg 770406c34b88Smrg# No sense in running all these tests if we already determined that 770506c34b88Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 770606c34b88Smrg# are currently assumed to apply to all compilers on this platform, 770706c34b88Smrg# and will be corrupted by setting them based on a non-working compiler. 770844584a44Smrgif test yes != "$_lt_disable_F77"; then 770906c34b88Smrg # Code to be used in simple compile tests 771006c34b88Smrg lt_simple_compile_test_code="\ 771106c34b88Smrg subroutine t 771206c34b88Smrg return 771306c34b88Smrg end 771406c34b88Smrg" 771521e67964Smrg 771606c34b88Smrg # Code to be used in simple link tests 771706c34b88Smrg lt_simple_link_test_code="\ 771806c34b88Smrg program t 771906c34b88Smrg end 772006c34b88Smrg" 7721c27c18e8Smrg 772206c34b88Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 772306c34b88Smrg _LT_TAG_COMPILER 7724c27c18e8Smrg 772506c34b88Smrg # save warnings/boilerplate of simple test code 772606c34b88Smrg _LT_COMPILER_BOILERPLATE 772706c34b88Smrg _LT_LINKER_BOILERPLATE 772821e67964Smrg 772906c34b88Smrg # Allow CC to be a program name with arguments. 773044584a44Smrg lt_save_CC=$CC 773106c34b88Smrg lt_save_GCC=$GCC 773206c34b88Smrg lt_save_CFLAGS=$CFLAGS 773306c34b88Smrg CC=${F77-"f77"} 773406c34b88Smrg CFLAGS=$FFLAGS 773506c34b88Smrg compiler=$CC 773606c34b88Smrg _LT_TAGVAR(compiler, $1)=$CC 773706c34b88Smrg _LT_CC_BASENAME([$compiler]) 773806c34b88Smrg GCC=$G77 773906c34b88Smrg if test -n "$compiler"; then 774006c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 774106c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 774221e67964Smrg 774306c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 774444584a44Smrg test no = "$can_build_shared" && enable_shared=no 7745c27c18e8Smrg 774606c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 774706c34b88Smrg # are all built from PIC. 774806c34b88Smrg case $host_os in 774906c34b88Smrg aix3*) 775044584a44Smrg test yes = "$enable_shared" && enable_static=no 775106c34b88Smrg if test -n "$RANLIB"; then 775206c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 775306c34b88Smrg postinstall_cmds='$RANLIB $lib' 775406c34b88Smrg fi 775506c34b88Smrg ;; 775606c34b88Smrg aix[[4-9]]*) 775744584a44Smrg if test ia64 != "$host_cpu"; then 775844584a44Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 775944584a44Smrg yes,aix,yes) ;; # shared object as lib.so file only 776044584a44Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 776144584a44Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 776244584a44Smrg esac 776306c34b88Smrg fi 776406c34b88Smrg ;; 776506c34b88Smrg esac 776606c34b88Smrg AC_MSG_RESULT([$enable_shared]) 776721e67964Smrg 776806c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 776906c34b88Smrg # Make sure either enable_shared or enable_static is yes. 777044584a44Smrg test yes = "$enable_shared" || enable_static=yes 777106c34b88Smrg AC_MSG_RESULT([$enable_static]) 777221e67964Smrg 777344584a44Smrg _LT_TAGVAR(GCC, $1)=$G77 777444584a44Smrg _LT_TAGVAR(LD, $1)=$LD 777521e67964Smrg 777606c34b88Smrg ## CAVEAT EMPTOR: 777706c34b88Smrg ## There is no encapsulation within the following macros, do not change 777806c34b88Smrg ## the running order or otherwise move them around unless you know exactly 777906c34b88Smrg ## what you are doing... 778006c34b88Smrg _LT_COMPILER_PIC($1) 778106c34b88Smrg _LT_COMPILER_C_O($1) 778206c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 778306c34b88Smrg _LT_LINKER_SHLIBS($1) 778406c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 778506c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7786c27c18e8Smrg 778706c34b88Smrg _LT_CONFIG($1) 778806c34b88Smrg fi # test -n "$compiler" 7789c27c18e8Smrg 779006c34b88Smrg GCC=$lt_save_GCC 779144584a44Smrg CC=$lt_save_CC 779244584a44Smrg CFLAGS=$lt_save_CFLAGS 779344584a44Smrgfi # test yes != "$_lt_disable_F77" 7794c27c18e8Smrg 779506c34b88SmrgAC_LANG_POP 779606c34b88Smrg])# _LT_LANG_F77_CONFIG 779721e67964Smrg 779821e67964Smrg 779906c34b88Smrg# _LT_LANG_FC_CONFIG([TAG]) 780006c34b88Smrg# ------------------------- 780106c34b88Smrg# Ensure that the configuration variables for a Fortran compiler are 780206c34b88Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 780344584a44Smrg# to write the compiler configuration to 'libtool'. 780406c34b88Smrgm4_defun([_LT_LANG_FC_CONFIG], 780506c34b88Smrg[AC_LANG_PUSH(Fortran) 780621e67964Smrg 780744584a44Smrgif test -z "$FC" || test no = "$FC"; then 780806c34b88Smrg _lt_disable_FC=yes 780906c34b88Smrgfi 781021e67964Smrg 781106c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 781206c34b88Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 781306c34b88Smrg_LT_TAGVAR(always_export_symbols, $1)=no 781406c34b88Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 781506c34b88Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 781606c34b88Smrg_LT_TAGVAR(hardcode_direct, $1)=no 781706c34b88Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 781806c34b88Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 781906c34b88Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 782006c34b88Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 782106c34b88Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 782206c34b88Smrg_LT_TAGVAR(inherit_rpath, $1)=no 782306c34b88Smrg_LT_TAGVAR(module_cmds, $1)= 782406c34b88Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 782506c34b88Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 782606c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 782706c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 782806c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 782906c34b88Smrg_LT_TAGVAR(no_undefined_flag, $1)= 783006c34b88Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 783106c34b88Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 783221e67964Smrg 783306c34b88Smrg# Source file extension for fc test sources. 783406c34b88Smrgac_ext=${ac_fc_srcext-f} 783521e67964Smrg 783606c34b88Smrg# Object file extension for compiled fc test sources. 783706c34b88Smrgobjext=o 783806c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 783921e67964Smrg 784006c34b88Smrg# No sense in running all these tests if we already determined that 784106c34b88Smrg# the FC compiler isn't working. Some variables (like enable_shared) 784206c34b88Smrg# are currently assumed to apply to all compilers on this platform, 784306c34b88Smrg# and will be corrupted by setting them based on a non-working compiler. 784444584a44Smrgif test yes != "$_lt_disable_FC"; then 784506c34b88Smrg # Code to be used in simple compile tests 784606c34b88Smrg lt_simple_compile_test_code="\ 784706c34b88Smrg subroutine t 784806c34b88Smrg return 784906c34b88Smrg end 785006c34b88Smrg" 785121e67964Smrg 785206c34b88Smrg # Code to be used in simple link tests 785306c34b88Smrg lt_simple_link_test_code="\ 785406c34b88Smrg program t 785506c34b88Smrg end 785606c34b88Smrg" 785721e67964Smrg 785806c34b88Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 785906c34b88Smrg _LT_TAG_COMPILER 786021e67964Smrg 786106c34b88Smrg # save warnings/boilerplate of simple test code 786206c34b88Smrg _LT_COMPILER_BOILERPLATE 786306c34b88Smrg _LT_LINKER_BOILERPLATE 786421e67964Smrg 786506c34b88Smrg # Allow CC to be a program name with arguments. 786644584a44Smrg lt_save_CC=$CC 786706c34b88Smrg lt_save_GCC=$GCC 786806c34b88Smrg lt_save_CFLAGS=$CFLAGS 786906c34b88Smrg CC=${FC-"f95"} 787006c34b88Smrg CFLAGS=$FCFLAGS 787106c34b88Smrg compiler=$CC 787206c34b88Smrg GCC=$ac_cv_fc_compiler_gnu 787321e67964Smrg 787406c34b88Smrg _LT_TAGVAR(compiler, $1)=$CC 787506c34b88Smrg _LT_CC_BASENAME([$compiler]) 7876c27c18e8Smrg 787706c34b88Smrg if test -n "$compiler"; then 787806c34b88Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 787906c34b88Smrg AC_MSG_RESULT([$can_build_shared]) 788006c34b88Smrg 788106c34b88Smrg AC_MSG_CHECKING([whether to build shared libraries]) 788244584a44Smrg test no = "$can_build_shared" && enable_shared=no 788306c34b88Smrg 788406c34b88Smrg # On AIX, shared libraries and static libraries use the same namespace, and 788506c34b88Smrg # are all built from PIC. 788606c34b88Smrg case $host_os in 788706c34b88Smrg aix3*) 788844584a44Smrg test yes = "$enable_shared" && enable_static=no 788906c34b88Smrg if test -n "$RANLIB"; then 789006c34b88Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 789106c34b88Smrg postinstall_cmds='$RANLIB $lib' 789206c34b88Smrg fi 789306c34b88Smrg ;; 789406c34b88Smrg aix[[4-9]]*) 789544584a44Smrg if test ia64 != "$host_cpu"; then 789644584a44Smrg case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in 789744584a44Smrg yes,aix,yes) ;; # shared object as lib.so file only 789844584a44Smrg yes,svr4,*) ;; # shared object as lib.so archive member only 789944584a44Smrg yes,*) enable_static=no ;; # shared object in lib.a archive as well 790044584a44Smrg esac 7901c27c18e8Smrg fi 790206c34b88Smrg ;; 790306c34b88Smrg esac 790406c34b88Smrg AC_MSG_RESULT([$enable_shared]) 790521e67964Smrg 790606c34b88Smrg AC_MSG_CHECKING([whether to build static libraries]) 790706c34b88Smrg # Make sure either enable_shared or enable_static is yes. 790844584a44Smrg test yes = "$enable_shared" || enable_static=yes 790906c34b88Smrg AC_MSG_RESULT([$enable_static]) 791021e67964Smrg 791144584a44Smrg _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu 791244584a44Smrg _LT_TAGVAR(LD, $1)=$LD 791321e67964Smrg 791406c34b88Smrg ## CAVEAT EMPTOR: 791506c34b88Smrg ## There is no encapsulation within the following macros, do not change 791606c34b88Smrg ## the running order or otherwise move them around unless you know exactly 791706c34b88Smrg ## what you are doing... 791806c34b88Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 791906c34b88Smrg _LT_COMPILER_PIC($1) 792006c34b88Smrg _LT_COMPILER_C_O($1) 792106c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 792206c34b88Smrg _LT_LINKER_SHLIBS($1) 792306c34b88Smrg _LT_SYS_DYNAMIC_LINKER($1) 792406c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7925c27c18e8Smrg 792606c34b88Smrg _LT_CONFIG($1) 792706c34b88Smrg fi # test -n "$compiler" 792821e67964Smrg 792906c34b88Smrg GCC=$lt_save_GCC 793006c34b88Smrg CC=$lt_save_CC 793106c34b88Smrg CFLAGS=$lt_save_CFLAGS 793244584a44Smrgfi # test yes != "$_lt_disable_FC" 793321e67964Smrg 793406c34b88SmrgAC_LANG_POP 793506c34b88Smrg])# _LT_LANG_FC_CONFIG 793621e67964Smrg 793721e67964Smrg 793806c34b88Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 793906c34b88Smrg# -------------------------- 794006c34b88Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 794106c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 794244584a44Smrg# to write the compiler configuration to 'libtool'. 794306c34b88Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 794406c34b88Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 794506c34b88SmrgAC_LANG_SAVE 794621e67964Smrg 794706c34b88Smrg# Source file extension for Java test sources. 794806c34b88Smrgac_ext=java 794921e67964Smrg 795006c34b88Smrg# Object file extension for compiled Java test sources. 795106c34b88Smrgobjext=o 795206c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 795321e67964Smrg 795406c34b88Smrg# Code to be used in simple compile tests 795506c34b88Smrglt_simple_compile_test_code="class foo {}" 795621e67964Smrg 795706c34b88Smrg# Code to be used in simple link tests 795806c34b88Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 795921e67964Smrg 796006c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 796106c34b88Smrg_LT_TAG_COMPILER 796221e67964Smrg 796306c34b88Smrg# save warnings/boilerplate of simple test code 796406c34b88Smrg_LT_COMPILER_BOILERPLATE 796506c34b88Smrg_LT_LINKER_BOILERPLATE 796621e67964Smrg 796706c34b88Smrg# Allow CC to be a program name with arguments. 796806c34b88Smrglt_save_CC=$CC 796906c34b88Smrglt_save_CFLAGS=$CFLAGS 797006c34b88Smrglt_save_GCC=$GCC 797106c34b88SmrgGCC=yes 797206c34b88SmrgCC=${GCJ-"gcj"} 797306c34b88SmrgCFLAGS=$GCJFLAGS 797406c34b88Smrgcompiler=$CC 797506c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 797644584a44Smrg_LT_TAGVAR(LD, $1)=$LD 797706c34b88Smrg_LT_CC_BASENAME([$compiler]) 797821e67964Smrg 797906c34b88Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 798006c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 798121e67964Smrg 798206c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 798306c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 798406c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 798521e67964Smrg 798606c34b88Smrgif test -n "$compiler"; then 798706c34b88Smrg _LT_COMPILER_NO_RTTI($1) 798806c34b88Smrg _LT_COMPILER_PIC($1) 798906c34b88Smrg _LT_COMPILER_C_O($1) 799006c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 799106c34b88Smrg _LT_LINKER_SHLIBS($1) 799206c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 799321e67964Smrg 799406c34b88Smrg _LT_CONFIG($1) 799506c34b88Smrgfi 799621e67964Smrg 799706c34b88SmrgAC_LANG_RESTORE 799821e67964Smrg 799906c34b88SmrgGCC=$lt_save_GCC 800006c34b88SmrgCC=$lt_save_CC 800106c34b88SmrgCFLAGS=$lt_save_CFLAGS 800206c34b88Smrg])# _LT_LANG_GCJ_CONFIG 800321e67964Smrg 800421e67964Smrg 800506c34b88Smrg# _LT_LANG_GO_CONFIG([TAG]) 800606c34b88Smrg# -------------------------- 800706c34b88Smrg# Ensure that the configuration variables for the GNU Go compiler 800806c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 800944584a44Smrg# to write the compiler configuration to 'libtool'. 801006c34b88Smrgm4_defun([_LT_LANG_GO_CONFIG], 801106c34b88Smrg[AC_REQUIRE([LT_PROG_GO])dnl 801206c34b88SmrgAC_LANG_SAVE 801306c34b88Smrg 801406c34b88Smrg# Source file extension for Go test sources. 801506c34b88Smrgac_ext=go 801621e67964Smrg 801706c34b88Smrg# Object file extension for compiled Go test sources. 801806c34b88Smrgobjext=o 801906c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 802021e67964Smrg 802106c34b88Smrg# Code to be used in simple compile tests 802206c34b88Smrglt_simple_compile_test_code="package main; func main() { }" 802321e67964Smrg 802406c34b88Smrg# Code to be used in simple link tests 802506c34b88Smrglt_simple_link_test_code='package main; func main() { }' 802621e67964Smrg 802706c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 802806c34b88Smrg_LT_TAG_COMPILER 802921e67964Smrg 803006c34b88Smrg# save warnings/boilerplate of simple test code 803106c34b88Smrg_LT_COMPILER_BOILERPLATE 803206c34b88Smrg_LT_LINKER_BOILERPLATE 8033c27c18e8Smrg 803406c34b88Smrg# Allow CC to be a program name with arguments. 803506c34b88Smrglt_save_CC=$CC 803606c34b88Smrglt_save_CFLAGS=$CFLAGS 803706c34b88Smrglt_save_GCC=$GCC 803806c34b88SmrgGCC=yes 803906c34b88SmrgCC=${GOC-"gccgo"} 804006c34b88SmrgCFLAGS=$GOFLAGS 804106c34b88Smrgcompiler=$CC 804206c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 804344584a44Smrg_LT_TAGVAR(LD, $1)=$LD 804406c34b88Smrg_LT_CC_BASENAME([$compiler]) 804521e67964Smrg 804606c34b88Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 804706c34b88Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 804821e67964Smrg 804906c34b88Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 805006c34b88Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 805106c34b88Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 805221e67964Smrg 805306c34b88Smrgif test -n "$compiler"; then 805406c34b88Smrg _LT_COMPILER_NO_RTTI($1) 805506c34b88Smrg _LT_COMPILER_PIC($1) 805606c34b88Smrg _LT_COMPILER_C_O($1) 805706c34b88Smrg _LT_COMPILER_FILE_LOCKS($1) 805806c34b88Smrg _LT_LINKER_SHLIBS($1) 805906c34b88Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 806021e67964Smrg 806106c34b88Smrg _LT_CONFIG($1) 806206c34b88Smrgfi 806321e67964Smrg 806406c34b88SmrgAC_LANG_RESTORE 8065c27c18e8Smrg 806606c34b88SmrgGCC=$lt_save_GCC 806706c34b88SmrgCC=$lt_save_CC 806806c34b88SmrgCFLAGS=$lt_save_CFLAGS 806906c34b88Smrg])# _LT_LANG_GO_CONFIG 8070c27c18e8Smrg 8071c27c18e8Smrg 807206c34b88Smrg# _LT_LANG_RC_CONFIG([TAG]) 807306c34b88Smrg# ------------------------- 807406c34b88Smrg# Ensure that the configuration variables for the Windows resource compiler 807506c34b88Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 807644584a44Smrg# to write the compiler configuration to 'libtool'. 807706c34b88Smrgm4_defun([_LT_LANG_RC_CONFIG], 807806c34b88Smrg[AC_REQUIRE([LT_PROG_RC])dnl 807906c34b88SmrgAC_LANG_SAVE 8080c27c18e8Smrg 808106c34b88Smrg# Source file extension for RC test sources. 808206c34b88Smrgac_ext=rc 8083c27c18e8Smrg 808406c34b88Smrg# Object file extension for compiled RC test sources. 808506c34b88Smrgobjext=o 808606c34b88Smrg_LT_TAGVAR(objext, $1)=$objext 8087c27c18e8Smrg 808806c34b88Smrg# Code to be used in simple compile tests 808906c34b88Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 8090c27c18e8Smrg 809106c34b88Smrg# Code to be used in simple link tests 809244584a44Smrglt_simple_link_test_code=$lt_simple_compile_test_code 8093c27c18e8Smrg 809406c34b88Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 809506c34b88Smrg_LT_TAG_COMPILER 8096c27c18e8Smrg 809706c34b88Smrg# save warnings/boilerplate of simple test code 809806c34b88Smrg_LT_COMPILER_BOILERPLATE 809906c34b88Smrg_LT_LINKER_BOILERPLATE 8100c27c18e8Smrg 810106c34b88Smrg# Allow CC to be a program name with arguments. 810244584a44Smrglt_save_CC=$CC 810306c34b88Smrglt_save_CFLAGS=$CFLAGS 810406c34b88Smrglt_save_GCC=$GCC 810506c34b88SmrgGCC= 810606c34b88SmrgCC=${RC-"windres"} 810706c34b88SmrgCFLAGS= 810806c34b88Smrgcompiler=$CC 810906c34b88Smrg_LT_TAGVAR(compiler, $1)=$CC 811006c34b88Smrg_LT_CC_BASENAME([$compiler]) 811106c34b88Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 8112c27c18e8Smrg 811306c34b88Smrgif test -n "$compiler"; then 811406c34b88Smrg : 811506c34b88Smrg _LT_CONFIG($1) 811606c34b88Smrgfi 8117c27c18e8Smrg 811806c34b88SmrgGCC=$lt_save_GCC 811906c34b88SmrgAC_LANG_RESTORE 812006c34b88SmrgCC=$lt_save_CC 812106c34b88SmrgCFLAGS=$lt_save_CFLAGS 812206c34b88Smrg])# _LT_LANG_RC_CONFIG 8123c27c18e8Smrg 8124c27c18e8Smrg 812506c34b88Smrg# LT_PROG_GCJ 812606c34b88Smrg# ----------- 812706c34b88SmrgAC_DEFUN([LT_PROG_GCJ], 812806c34b88Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 812906c34b88Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 813006c34b88Smrg [AC_CHECK_TOOL(GCJ, gcj,) 813144584a44Smrg test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" 813206c34b88Smrg AC_SUBST(GCJFLAGS)])])[]dnl 813306c34b88Smrg]) 8134c27c18e8Smrg 813506c34b88Smrg# Old name: 813606c34b88SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 813706c34b88Smrgdnl aclocal-1.4 backwards compatibility: 813806c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 813921e67964Smrg 814021e67964Smrg 814106c34b88Smrg# LT_PROG_GO 814206c34b88Smrg# ---------- 814306c34b88SmrgAC_DEFUN([LT_PROG_GO], 814406c34b88Smrg[AC_CHECK_TOOL(GOC, gccgo,) 814506c34b88Smrg]) 8146c27c18e8Smrg 814721e67964Smrg 814806c34b88Smrg# LT_PROG_RC 814906c34b88Smrg# ---------- 815006c34b88SmrgAC_DEFUN([LT_PROG_RC], 815106c34b88Smrg[AC_CHECK_TOOL(RC, windres,) 815206c34b88Smrg]) 815321e67964Smrg 815406c34b88Smrg# Old name: 815506c34b88SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 815606c34b88Smrgdnl aclocal-1.4 backwards compatibility: 815706c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 815821e67964Smrg 815921e67964Smrg 816006c34b88Smrg# _LT_DECL_EGREP 816106c34b88Smrg# -------------- 816206c34b88Smrg# If we don't have a new enough Autoconf to choose the best grep 816306c34b88Smrg# available, choose the one first in the user's PATH. 816406c34b88Smrgm4_defun([_LT_DECL_EGREP], 816506c34b88Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 816606c34b88SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 816706c34b88Smrgtest -z "$GREP" && GREP=grep 816806c34b88Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 816906c34b88Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 817006c34b88Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 817106c34b88Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 817206c34b88SmrgAC_SUBST([GREP]) 817306c34b88Smrg]) 817421e67964Smrg 817506c34b88Smrg 817606c34b88Smrg# _LT_DECL_OBJDUMP 817706c34b88Smrg# -------------- 817806c34b88Smrg# If we don't have a new enough Autoconf to choose the best objdump 817906c34b88Smrg# available, choose the one first in the user's PATH. 818006c34b88Smrgm4_defun([_LT_DECL_OBJDUMP], 818106c34b88Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 818206c34b88Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 818306c34b88Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 818406c34b88SmrgAC_SUBST([OBJDUMP]) 818521e67964Smrg]) 818621e67964Smrg 818706c34b88Smrg# _LT_DECL_DLLTOOL 818806c34b88Smrg# ---------------- 818906c34b88Smrg# Ensure DLLTOOL variable is set. 819006c34b88Smrgm4_defun([_LT_DECL_DLLTOOL], 819106c34b88Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 819206c34b88Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 819306c34b88Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 819406c34b88SmrgAC_SUBST([DLLTOOL]) 819506c34b88Smrg]) 819621e67964Smrg 819706c34b88Smrg# _LT_DECL_SED 819806c34b88Smrg# ------------ 819906c34b88Smrg# Check for a fully-functional sed program, that truncates 820006c34b88Smrg# as few characters as possible. Prefer GNU sed if found. 820106c34b88Smrgm4_defun([_LT_DECL_SED], 820206c34b88Smrg[AC_PROG_SED 820306c34b88Smrgtest -z "$SED" && SED=sed 820406c34b88SmrgXsed="$SED -e 1s/^X//" 820506c34b88Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 820606c34b88Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 820706c34b88Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 820806c34b88Smrg])# _LT_DECL_SED 820921e67964Smrg 821006c34b88Smrgm4_ifndef([AC_PROG_SED], [ 821106c34b88Smrg# NOTE: This macro has been submitted for inclusion into # 821206c34b88Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 821306c34b88Smrg# a released version of Autoconf we should remove this # 821406c34b88Smrg# macro and use it instead. # 821521e67964Smrg 821606c34b88Smrgm4_defun([AC_PROG_SED], 821706c34b88Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 821806c34b88SmrgAC_CACHE_VAL(lt_cv_path_SED, 821906c34b88Smrg[# Loop through the user's path and test for sed and gsed. 822006c34b88Smrg# Then use that list of sed's as ones to test for truncation. 822106c34b88Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 822206c34b88Smrgfor as_dir in $PATH 822306c34b88Smrgdo 822406c34b88Smrg IFS=$as_save_IFS 822506c34b88Smrg test -z "$as_dir" && as_dir=. 822606c34b88Smrg for lt_ac_prog in sed gsed; do 822706c34b88Smrg for ac_exec_ext in '' $ac_executable_extensions; do 822806c34b88Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 822906c34b88Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 823006c34b88Smrg fi 823106c34b88Smrg done 823206c34b88Smrg done 823306c34b88Smrgdone 823406c34b88SmrgIFS=$as_save_IFS 823506c34b88Smrglt_ac_max=0 823606c34b88Smrglt_ac_count=0 823706c34b88Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 823806c34b88Smrg# along with /bin/sed that truncates output. 823906c34b88Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 824044584a44Smrg test ! -f "$lt_ac_sed" && continue 824106c34b88Smrg cat /dev/null > conftest.in 824206c34b88Smrg lt_ac_count=0 824306c34b88Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 824406c34b88Smrg # Check for GNU sed and select it if it is found. 824506c34b88Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 824606c34b88Smrg lt_cv_path_SED=$lt_ac_sed 824706c34b88Smrg break 824806c34b88Smrg fi 824906c34b88Smrg while true; do 825006c34b88Smrg cat conftest.in conftest.in >conftest.tmp 825106c34b88Smrg mv conftest.tmp conftest.in 825206c34b88Smrg cp conftest.in conftest.nl 825306c34b88Smrg echo >>conftest.nl 825406c34b88Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 825506c34b88Smrg cmp -s conftest.out conftest.nl || break 825606c34b88Smrg # 10000 chars as input seems more than enough 825744584a44Smrg test 10 -lt "$lt_ac_count" && break 825806c34b88Smrg lt_ac_count=`expr $lt_ac_count + 1` 825944584a44Smrg if test "$lt_ac_count" -gt "$lt_ac_max"; then 826006c34b88Smrg lt_ac_max=$lt_ac_count 826106c34b88Smrg lt_cv_path_SED=$lt_ac_sed 826206c34b88Smrg fi 826306c34b88Smrg done 826406c34b88Smrgdone 826521e67964Smrg]) 826606c34b88SmrgSED=$lt_cv_path_SED 826706c34b88SmrgAC_SUBST([SED]) 826806c34b88SmrgAC_MSG_RESULT([$SED]) 826906c34b88Smrg])#AC_PROG_SED 827006c34b88Smrg])#m4_ifndef 8271c43cc173Smrg 827206c34b88Smrg# Old name: 827306c34b88SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 827406c34b88Smrgdnl aclocal-1.4 backwards compatibility: 827506c34b88Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 8276c27c18e8Smrg 8277c27c18e8Smrg 827806c34b88Smrg# _LT_CHECK_SHELL_FEATURES 827906c34b88Smrg# ------------------------ 828006c34b88Smrg# Find out whether the shell is Bourne or XSI compatible, 828106c34b88Smrg# or has some other useful features. 828206c34b88Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 828344584a44Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 828406c34b88Smrg lt_unset=unset 828506c34b88Smrgelse 828606c34b88Smrg lt_unset=false 828706c34b88Smrgfi 828806c34b88Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 828906c34b88Smrg 829006c34b88Smrg# test EBCDIC or ASCII 829106c34b88Smrgcase `echo X|tr X '\101'` in 829206c34b88Smrg A) # ASCII based system 829306c34b88Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 829406c34b88Smrg lt_SP2NL='tr \040 \012' 829506c34b88Smrg lt_NL2SP='tr \015\012 \040\040' 829606c34b88Smrg ;; 829706c34b88Smrg *) # EBCDIC based system 829806c34b88Smrg lt_SP2NL='tr \100 \n' 829906c34b88Smrg lt_NL2SP='tr \r\n \100\100' 830006c34b88Smrg ;; 830106c34b88Smrgesac 830206c34b88Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 830306c34b88Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 830406c34b88Smrg])# _LT_CHECK_SHELL_FEATURES 830506c34b88Smrg 830606c34b88Smrg 830706c34b88Smrg# _LT_PATH_CONVERSION_FUNCTIONS 830806c34b88Smrg# ----------------------------- 830944584a44Smrg# Determine what file name conversion functions should be used by 831006c34b88Smrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 831106c34b88Smrg# for certain cross-compile configurations and native mingw. 831206c34b88Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 831306c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 831406c34b88SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 831506c34b88SmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 831606c34b88SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 831706c34b88Smrg[case $host in 831806c34b88Smrg *-*-mingw* ) 831906c34b88Smrg case $build in 832006c34b88Smrg *-*-mingw* ) # actually msys 832106c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 832206c34b88Smrg ;; 832306c34b88Smrg *-*-cygwin* ) 832406c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 832506c34b88Smrg ;; 832606c34b88Smrg * ) # otherwise, assume *nix 832706c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 832806c34b88Smrg ;; 832906c34b88Smrg esac 833006c34b88Smrg ;; 833106c34b88Smrg *-*-cygwin* ) 833206c34b88Smrg case $build in 833306c34b88Smrg *-*-mingw* ) # actually msys 833406c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 833506c34b88Smrg ;; 833606c34b88Smrg *-*-cygwin* ) 833706c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 833806c34b88Smrg ;; 833906c34b88Smrg * ) # otherwise, assume *nix 834006c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 834106c34b88Smrg ;; 834206c34b88Smrg esac 834306c34b88Smrg ;; 834406c34b88Smrg * ) # unhandled hosts (and "normal" native builds) 834506c34b88Smrg lt_cv_to_host_file_cmd=func_convert_file_noop 834606c34b88Smrg ;; 834706c34b88Smrgesac 834806c34b88Smrg]) 834906c34b88Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd 835006c34b88SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 835106c34b88Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 835206c34b88Smrg [0], [convert $build file names to $host format])dnl 835306c34b88Smrg 835406c34b88SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 835506c34b88SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 835606c34b88Smrg[#assume ordinary cross tools, or native build. 835706c34b88Smrglt_cv_to_tool_file_cmd=func_convert_file_noop 835806c34b88Smrgcase $host in 835906c34b88Smrg *-*-mingw* ) 836006c34b88Smrg case $build in 836106c34b88Smrg *-*-mingw* ) # actually msys 836206c34b88Smrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 836306c34b88Smrg ;; 836406c34b88Smrg esac 836506c34b88Smrg ;; 836606c34b88Smrgesac 836706c34b88Smrg]) 836806c34b88Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 836906c34b88SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 837006c34b88Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 837106c34b88Smrg [0], [convert $build files to toolchain format])dnl 837206c34b88Smrg])# _LT_PATH_CONVERSION_FUNCTIONS 8373c43cc173Smrg 837406c34b88Smrg# Helper functions for option handling. -*- Autoconf -*- 837506c34b88Smrg# 837644584a44Smrg# Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software 837744584a44Smrg# Foundation, Inc. 837806c34b88Smrg# Written by Gary V. Vaughan, 2004 837906c34b88Smrg# 838006c34b88Smrg# This file is free software; the Free Software Foundation gives 838106c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 838206c34b88Smrg# modifications, as long as this notice is preserved. 8383c43cc173Smrg 838444584a44Smrg# serial 8 ltoptions.m4 8385c43cc173Smrg 838606c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 838706c34b88SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 8388f1ee322dSmrg 8389f1ee322dSmrg 839006c34b88Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 839106c34b88Smrg# ------------------------------------------ 839206c34b88Smrgm4_define([_LT_MANGLE_OPTION], 839306c34b88Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 839489069ce9Smrg 8395c43cc173Smrg 839606c34b88Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 839706c34b88Smrg# --------------------------------------- 839806c34b88Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 839906c34b88Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 840006c34b88Smrg# saved as a flag. 840106c34b88Smrgm4_define([_LT_SET_OPTION], 840206c34b88Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 840306c34b88Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 840406c34b88Smrg _LT_MANGLE_DEFUN([$1], [$2]), 840544584a44Smrg [m4_warning([Unknown $1 option '$2'])])[]dnl 840606c34b88Smrg]) 8407c43cc173Smrg 8408c43cc173Smrg 840906c34b88Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 841006c34b88Smrg# ------------------------------------------------------------ 841106c34b88Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 841206c34b88Smrgm4_define([_LT_IF_OPTION], 841306c34b88Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8414c43cc173Smrg 8415c27c18e8Smrg 841606c34b88Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 841706c34b88Smrg# ------------------------------------------------------- 841806c34b88Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 841906c34b88Smrg# are set. 842006c34b88Smrgm4_define([_LT_UNLESS_OPTIONS], 842106c34b88Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 842206c34b88Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 842306c34b88Smrg [m4_define([$0_found])])])[]dnl 842406c34b88Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 842506c34b88Smrg])[]dnl 842606c34b88Smrg]) 842721e67964Smrg 842821e67964Smrg 842906c34b88Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 843006c34b88Smrg# ---------------------------------------- 843106c34b88Smrg# OPTION-LIST is a space-separated list of Libtool options associated 843206c34b88Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 843306c34b88Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 843406c34b88Smrg# the unknown option and exit. 843506c34b88Smrgm4_defun([_LT_SET_OPTIONS], 843606c34b88Smrg[# Set options 843706c34b88Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 843806c34b88Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 843921e67964Smrg 844006c34b88Smrgm4_if([$1],[LT_INIT],[ 844106c34b88Smrg dnl 844206c34b88Smrg dnl Simply set some default values (i.e off) if boolean options were not 844306c34b88Smrg dnl specified: 844406c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 844506c34b88Smrg ]) 844606c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 844706c34b88Smrg ]) 844806c34b88Smrg dnl 844906c34b88Smrg dnl If no reference was made to various pairs of opposing options, then 845006c34b88Smrg dnl we run the default mode handler for the pair. For example, if neither 845144584a44Smrg dnl 'shared' nor 'disable-shared' was passed, we enable building of shared 845206c34b88Smrg dnl archives by default: 845306c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 845406c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 845506c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 845606c34b88Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 845744584a44Smrg [_LT_ENABLE_FAST_INSTALL]) 845844584a44Smrg _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], 845944584a44Smrg [_LT_WITH_AIX_SONAME([aix])]) 846006c34b88Smrg ]) 846106c34b88Smrg])# _LT_SET_OPTIONS 8462c43cc173Smrg 8463c43cc173Smrg 8464c43cc173Smrg 846506c34b88Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 846606c34b88Smrg# ----------------------------------------- 846706c34b88Smrgm4_define([_LT_MANGLE_DEFUN], 846806c34b88Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 8469c43cc173Smrg 8470c43cc173Smrg 847106c34b88Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 847206c34b88Smrg# ----------------------------------------------- 847306c34b88Smrgm4_define([LT_OPTION_DEFINE], 847406c34b88Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 847506c34b88Smrg])# LT_OPTION_DEFINE 8476c43cc173Smrg 8477c43cc173Smrg 847806c34b88Smrg# dlopen 847906c34b88Smrg# ------ 848006c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 848106c34b88Smrg]) 8482c43cc173Smrg 848306c34b88SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 848406c34b88Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 848506c34b88SmrgAC_DIAGNOSE([obsolete], 848606c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 848744584a44Smrgput the 'dlopen' option into LT_INIT's first parameter.]) 848806c34b88Smrg]) 8489c43cc173Smrg 849006c34b88Smrgdnl aclocal-1.4 backwards compatibility: 849106c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 8492c43cc173Smrg 8493c43cc173Smrg 849406c34b88Smrg# win32-dll 849506c34b88Smrg# --------- 849606c34b88Smrg# Declare package support for building win32 dll's. 849706c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 849806c34b88Smrg[enable_win32_dll=yes 8499c43cc173Smrg 850006c34b88Smrgcase $host in 850106c34b88Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 850206c34b88Smrg AC_CHECK_TOOL(AS, as, false) 850306c34b88Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 850406c34b88Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 850506c34b88Smrg ;; 850606c34b88Smrgesac 8507c27c18e8Smrg 850806c34b88Smrgtest -z "$AS" && AS=as 850906c34b88Smrg_LT_DECL([], [AS], [1], [Assembler program])dnl 851089069ce9Smrg 851106c34b88Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 851206c34b88Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 851389069ce9Smrg 851406c34b88Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 851506c34b88Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 851606c34b88Smrg])# win32-dll 8517c43cc173Smrg 851806c34b88SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 851906c34b88Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 852006c34b88Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 852106c34b88SmrgAC_DIAGNOSE([obsolete], 852206c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 852344584a44Smrgput the 'win32-dll' option into LT_INIT's first parameter.]) 852406c34b88Smrg]) 8525c43cc173Smrg 852606c34b88Smrgdnl aclocal-1.4 backwards compatibility: 852706c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 8528c43cc173Smrg 8529c43cc173Smrg 853006c34b88Smrg# _LT_ENABLE_SHARED([DEFAULT]) 853106c34b88Smrg# ---------------------------- 853244584a44Smrg# implement the --enable-shared flag, and supports the 'shared' and 853344584a44Smrg# 'disable-shared' LT_INIT options. 853444584a44Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 853506c34b88Smrgm4_define([_LT_ENABLE_SHARED], 853606c34b88Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 853706c34b88SmrgAC_ARG_ENABLE([shared], 853806c34b88Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 853906c34b88Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 854006c34b88Smrg [p=${PACKAGE-default} 854106c34b88Smrg case $enableval in 854206c34b88Smrg yes) enable_shared=yes ;; 854306c34b88Smrg no) enable_shared=no ;; 854406c34b88Smrg *) 854506c34b88Smrg enable_shared=no 854606c34b88Smrg # Look at the argument we got. We use all the common list separators. 854744584a44Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 854806c34b88Smrg for pkg in $enableval; do 854944584a44Smrg IFS=$lt_save_ifs 855006c34b88Smrg if test "X$pkg" = "X$p"; then 855106c34b88Smrg enable_shared=yes 855206c34b88Smrg fi 855306c34b88Smrg done 855444584a44Smrg IFS=$lt_save_ifs 855506c34b88Smrg ;; 855606c34b88Smrg esac], 855706c34b88Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 8558c43cc173Smrg 855906c34b88Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 856006c34b88Smrg [Whether or not to build shared libraries]) 856106c34b88Smrg])# _LT_ENABLE_SHARED 8562c43cc173Smrg 856306c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 856406c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 8565c43cc173Smrg 856606c34b88Smrg# Old names: 856706c34b88SmrgAC_DEFUN([AC_ENABLE_SHARED], 856806c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 856906c34b88Smrg]) 8570c43cc173Smrg 857106c34b88SmrgAC_DEFUN([AC_DISABLE_SHARED], 857206c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 857306c34b88Smrg]) 8574c43cc173Smrg 857506c34b88SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 857606c34b88SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 8577c43cc173Smrg 857806c34b88Smrgdnl aclocal-1.4 backwards compatibility: 857906c34b88Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 858006c34b88Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 8581c43cc173Smrg 8582c43cc173Smrg 8583c27c18e8Smrg 858406c34b88Smrg# _LT_ENABLE_STATIC([DEFAULT]) 858506c34b88Smrg# ---------------------------- 858644584a44Smrg# implement the --enable-static flag, and support the 'static' and 858744584a44Smrg# 'disable-static' LT_INIT options. 858844584a44Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 858906c34b88Smrgm4_define([_LT_ENABLE_STATIC], 859006c34b88Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 859106c34b88SmrgAC_ARG_ENABLE([static], 859206c34b88Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 859306c34b88Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 859406c34b88Smrg [p=${PACKAGE-default} 859506c34b88Smrg case $enableval in 859606c34b88Smrg yes) enable_static=yes ;; 859706c34b88Smrg no) enable_static=no ;; 859806c34b88Smrg *) 859906c34b88Smrg enable_static=no 860006c34b88Smrg # Look at the argument we got. We use all the common list separators. 860144584a44Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 860206c34b88Smrg for pkg in $enableval; do 860344584a44Smrg IFS=$lt_save_ifs 860406c34b88Smrg if test "X$pkg" = "X$p"; then 860506c34b88Smrg enable_static=yes 860606c34b88Smrg fi 860706c34b88Smrg done 860844584a44Smrg IFS=$lt_save_ifs 860906c34b88Smrg ;; 861006c34b88Smrg esac], 861106c34b88Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 861289069ce9Smrg 861306c34b88Smrg _LT_DECL([build_old_libs], [enable_static], [0], 861406c34b88Smrg [Whether or not to build static libraries]) 861506c34b88Smrg])# _LT_ENABLE_STATIC 8616c43cc173Smrg 861706c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 861806c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 861989069ce9Smrg 862006c34b88Smrg# Old names: 862106c34b88SmrgAC_DEFUN([AC_ENABLE_STATIC], 862206c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 862306c34b88Smrg]) 8624c43cc173Smrg 862506c34b88SmrgAC_DEFUN([AC_DISABLE_STATIC], 862606c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 862706c34b88Smrg]) 8628c27c18e8Smrg 862906c34b88SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 863006c34b88SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8631c43cc173Smrg 863206c34b88Smrgdnl aclocal-1.4 backwards compatibility: 863306c34b88Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 863406c34b88Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8635c27c18e8Smrg 8636c43cc173Smrg 8637b789ec8aSmrg 863806c34b88Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 863906c34b88Smrg# ---------------------------------- 864044584a44Smrg# implement the --enable-fast-install flag, and support the 'fast-install' 864144584a44Smrg# and 'disable-fast-install' LT_INIT options. 864244584a44Smrg# DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. 864306c34b88Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 864406c34b88Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 864506c34b88SmrgAC_ARG_ENABLE([fast-install], 864606c34b88Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 864706c34b88Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 864806c34b88Smrg [p=${PACKAGE-default} 864906c34b88Smrg case $enableval in 865006c34b88Smrg yes) enable_fast_install=yes ;; 865106c34b88Smrg no) enable_fast_install=no ;; 865206c34b88Smrg *) 865306c34b88Smrg enable_fast_install=no 865406c34b88Smrg # Look at the argument we got. We use all the common list separators. 865544584a44Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 865606c34b88Smrg for pkg in $enableval; do 865744584a44Smrg IFS=$lt_save_ifs 865806c34b88Smrg if test "X$pkg" = "X$p"; then 865906c34b88Smrg enable_fast_install=yes 866006c34b88Smrg fi 866106c34b88Smrg done 866244584a44Smrg IFS=$lt_save_ifs 866306c34b88Smrg ;; 866406c34b88Smrg esac], 866506c34b88Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 866689069ce9Smrg 866706c34b88Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 866806c34b88Smrg [Whether or not to optimize for fast installation])dnl 866906c34b88Smrg])# _LT_ENABLE_FAST_INSTALL 867089069ce9Smrg 867106c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 867206c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 8673f1ee322dSmrg 867406c34b88Smrg# Old names: 867506c34b88SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 867606c34b88Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 867706c34b88SmrgAC_DIAGNOSE([obsolete], 867806c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 867944584a44Smrgthe 'fast-install' option into LT_INIT's first parameter.]) 868006c34b88Smrg]) 8681f1ee322dSmrg 868206c34b88SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 868306c34b88Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 868406c34b88SmrgAC_DIAGNOSE([obsolete], 868506c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 868644584a44Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.]) 868706c34b88Smrg]) 868889069ce9Smrg 868906c34b88Smrgdnl aclocal-1.4 backwards compatibility: 869006c34b88Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 869106c34b88Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 869289069ce9Smrg 8693c43cc173Smrg 869444584a44Smrg# _LT_WITH_AIX_SONAME([DEFAULT]) 869544584a44Smrg# ---------------------------------- 869644584a44Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix' 869744584a44Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT 869844584a44Smrg# is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. 869944584a44Smrgm4_define([_LT_WITH_AIX_SONAME], 870044584a44Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl 870144584a44Smrgshared_archive_member_spec= 870244584a44Smrgcase $host,$enable_shared in 870344584a44Smrgpower*-*-aix[[5-9]]*,yes) 870444584a44Smrg AC_MSG_CHECKING([which variant of shared library versioning to provide]) 870544584a44Smrg AC_ARG_WITH([aix-soname], 870644584a44Smrg [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], 870744584a44Smrg [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], 870844584a44Smrg [case $withval in 870944584a44Smrg aix|svr4|both) 871044584a44Smrg ;; 871144584a44Smrg *) 871244584a44Smrg AC_MSG_ERROR([Unknown argument to --with-aix-soname]) 871344584a44Smrg ;; 871444584a44Smrg esac 871544584a44Smrg lt_cv_with_aix_soname=$with_aix_soname], 871644584a44Smrg [AC_CACHE_VAL([lt_cv_with_aix_soname], 871744584a44Smrg [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) 871844584a44Smrg with_aix_soname=$lt_cv_with_aix_soname]) 871944584a44Smrg AC_MSG_RESULT([$with_aix_soname]) 872044584a44Smrg if test aix != "$with_aix_soname"; then 872144584a44Smrg # For the AIX way of multilib, we name the shared archive member 872244584a44Smrg # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', 872344584a44Smrg # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. 872444584a44Smrg # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, 872544584a44Smrg # the AIX toolchain works better with OBJECT_MODE set (default 32). 872644584a44Smrg if test 64 = "${OBJECT_MODE-32}"; then 872744584a44Smrg shared_archive_member_spec=shr_64 872844584a44Smrg else 872944584a44Smrg shared_archive_member_spec=shr 873044584a44Smrg fi 873144584a44Smrg fi 873244584a44Smrg ;; 873344584a44Smrg*) 873444584a44Smrg with_aix_soname=aix 873544584a44Smrg ;; 873644584a44Smrgesac 873744584a44Smrg 873844584a44Smrg_LT_DECL([], [shared_archive_member_spec], [0], 873944584a44Smrg [Shared archive member basename, for filename based shared library versioning on AIX])dnl 874044584a44Smrg])# _LT_WITH_AIX_SONAME 874144584a44Smrg 874244584a44SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) 874344584a44SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) 874444584a44SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) 874544584a44Smrg 874644584a44Smrg 874706c34b88Smrg# _LT_WITH_PIC([MODE]) 874806c34b88Smrg# -------------------- 874944584a44Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic' 875006c34b88Smrg# LT_INIT options. 875144584a44Smrg# MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. 875206c34b88Smrgm4_define([_LT_WITH_PIC], 875306c34b88Smrg[AC_ARG_WITH([pic], 875406c34b88Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 875506c34b88Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 875606c34b88Smrg [lt_p=${PACKAGE-default} 875706c34b88Smrg case $withval in 875806c34b88Smrg yes|no) pic_mode=$withval ;; 875906c34b88Smrg *) 876006c34b88Smrg pic_mode=default 876106c34b88Smrg # Look at the argument we got. We use all the common list separators. 876244584a44Smrg lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, 876306c34b88Smrg for lt_pkg in $withval; do 876444584a44Smrg IFS=$lt_save_ifs 876506c34b88Smrg if test "X$lt_pkg" = "X$lt_p"; then 876606c34b88Smrg pic_mode=yes 876706c34b88Smrg fi 876806c34b88Smrg done 876944584a44Smrg IFS=$lt_save_ifs 877006c34b88Smrg ;; 877106c34b88Smrg esac], 877244584a44Smrg [pic_mode=m4_default([$1], [default])]) 8773c43cc173Smrg 877406c34b88Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 877506c34b88Smrg])# _LT_WITH_PIC 877637eb1ca1Smrg 877706c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 877806c34b88SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 877989069ce9Smrg 878006c34b88Smrg# Old name: 878106c34b88SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 878206c34b88Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 878306c34b88SmrgAC_DIAGNOSE([obsolete], 878406c34b88Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 878544584a44Smrgput the 'pic-only' option into LT_INIT's first parameter.]) 878606c34b88Smrg]) 878789069ce9Smrg 878806c34b88Smrgdnl aclocal-1.4 backwards compatibility: 878906c34b88Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 879089069ce9Smrg 879189069ce9Smrg 879206c34b88Smrgm4_define([_LTDL_MODE], []) 879306c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 879406c34b88Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 879506c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 879606c34b88Smrg [m4_define([_LTDL_MODE], [recursive])]) 879706c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 879806c34b88Smrg [m4_define([_LTDL_MODE], [subproject])]) 879906c34b88Smrg 880006c34b88Smrgm4_define([_LTDL_TYPE], []) 880106c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 880206c34b88Smrg [m4_define([_LTDL_TYPE], [installable])]) 880306c34b88SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 880406c34b88Smrg [m4_define([_LTDL_TYPE], [convenience])]) 880506c34b88Smrg 880606c34b88Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 8807b789ec8aSmrg# 880844584a44Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software 880944584a44Smrg# Foundation, Inc. 881006c34b88Smrg# Written by Gary V. Vaughan, 2004 8811b789ec8aSmrg# 881206c34b88Smrg# This file is free software; the Free Software Foundation gives 881306c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 881406c34b88Smrg# modifications, as long as this notice is preserved. 881589069ce9Smrg 881606c34b88Smrg# serial 6 ltsugar.m4 8817f1ee322dSmrg 881806c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 881906c34b88SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 882089069ce9Smrg 882106c34b88Smrg 882206c34b88Smrg# lt_join(SEP, ARG1, [ARG2...]) 882306c34b88Smrg# ----------------------------- 882406c34b88Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 882506c34b88Smrg# associated separator. 882606c34b88Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 882706c34b88Smrg# versions in m4sugar had bugs. 882806c34b88Smrgm4_define([lt_join], 882906c34b88Smrg[m4_if([$#], [1], [], 883006c34b88Smrg [$#], [2], [[$2]], 883106c34b88Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 883206c34b88Smrgm4_define([_lt_join], 883306c34b88Smrg[m4_if([$#$2], [2], [], 883406c34b88Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 883506c34b88Smrg 883606c34b88Smrg 883706c34b88Smrg# lt_car(LIST) 883806c34b88Smrg# lt_cdr(LIST) 883906c34b88Smrg# ------------ 884006c34b88Smrg# Manipulate m4 lists. 884106c34b88Smrg# These macros are necessary as long as will still need to support 884244584a44Smrg# Autoconf-2.59, which quotes differently. 884306c34b88Smrgm4_define([lt_car], [[$1]]) 884406c34b88Smrgm4_define([lt_cdr], 884506c34b88Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 884606c34b88Smrg [$#], 1, [], 884706c34b88Smrg [m4_dquote(m4_shift($@))])]) 884806c34b88Smrgm4_define([lt_unquote], $1) 884906c34b88Smrg 885006c34b88Smrg 885106c34b88Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 885206c34b88Smrg# ------------------------------------------ 885344584a44Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. 885406c34b88Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 885506c34b88Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 885606c34b88Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 885706c34b88Smrg# than defined and empty). 8858b789ec8aSmrg# 885906c34b88Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 886006c34b88Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 886106c34b88Smrgm4_define([lt_append], 886206c34b88Smrg[m4_define([$1], 886306c34b88Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 886406c34b88Smrg 886506c34b88Smrg 886606c34b88Smrg 886706c34b88Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 886806c34b88Smrg# ---------------------------------------------------------- 886906c34b88Smrg# Produce a SEP delimited list of all paired combinations of elements of 887006c34b88Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 887106c34b88Smrg# has the form PREFIXmINFIXSUFFIXn. 887206c34b88Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 887306c34b88Smrgm4_define([lt_combine], 887406c34b88Smrg[m4_if(m4_eval([$# > 3]), [1], 887506c34b88Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 887606c34b88Smrg[[m4_foreach([_Lt_prefix], [$2], 887706c34b88Smrg [m4_foreach([_Lt_suffix], 887806c34b88Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 887906c34b88Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 888006c34b88Smrg 888106c34b88Smrg 888206c34b88Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 888306c34b88Smrg# ----------------------------------------------------------------------- 888406c34b88Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 888506c34b88Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 888606c34b88Smrgm4_define([lt_if_append_uniq], 888706c34b88Smrg[m4_ifdef([$1], 888806c34b88Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 888906c34b88Smrg [lt_append([$1], [$2], [$3])$4], 889006c34b88Smrg [$5])], 889106c34b88Smrg [lt_append([$1], [$2], [$3])$4])]) 889206c34b88Smrg 889306c34b88Smrg 889406c34b88Smrg# lt_dict_add(DICT, KEY, VALUE) 889506c34b88Smrg# ----------------------------- 889606c34b88Smrgm4_define([lt_dict_add], 889706c34b88Smrg[m4_define([$1($2)], [$3])]) 889806c34b88Smrg 889906c34b88Smrg 890006c34b88Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 890106c34b88Smrg# -------------------------------------------- 890206c34b88Smrgm4_define([lt_dict_add_subkey], 890306c34b88Smrg[m4_define([$1($2:$3)], [$4])]) 890406c34b88Smrg 890506c34b88Smrg 890606c34b88Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 890706c34b88Smrg# ---------------------------------- 890806c34b88Smrgm4_define([lt_dict_fetch], 890906c34b88Smrg[m4_ifval([$3], 891006c34b88Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 891106c34b88Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8912c43cc173Smrg 8913c43cc173Smrg 891406c34b88Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 891506c34b88Smrg# ----------------------------------------------------------------- 891606c34b88Smrgm4_define([lt_if_dict_fetch], 891706c34b88Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 891806c34b88Smrg [$5], 891906c34b88Smrg [$6])]) 892006c34b88Smrg 892106c34b88Smrg 892206c34b88Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 892306c34b88Smrg# -------------------------------------------------------------- 892406c34b88Smrgm4_define([lt_dict_filter], 892506c34b88Smrg[m4_if([$5], [], [], 892606c34b88Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 892706c34b88Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 892806c34b88Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 892906c34b88Smrg]) 893006c34b88Smrg 893106c34b88Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8932b789ec8aSmrg# 893344584a44Smrg# Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. 893406c34b88Smrg# Written by Scott James Remnant, 2004 8935b789ec8aSmrg# 893606c34b88Smrg# This file is free software; the Free Software Foundation gives 893706c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 893806c34b88Smrg# modifications, as long as this notice is preserved. 893906c34b88Smrg 894006c34b88Smrg# @configure_input@ 894106c34b88Smrg 894244584a44Smrg# serial 4179 ltversion.m4 894306c34b88Smrg# This file is part of GNU Libtool 894406c34b88Smrg 894544584a44Smrgm4_define([LT_PACKAGE_VERSION], [2.4.6]) 894644584a44Smrgm4_define([LT_PACKAGE_REVISION], [2.4.6]) 894706c34b88Smrg 894806c34b88SmrgAC_DEFUN([LTVERSION_VERSION], 894944584a44Smrg[macro_version='2.4.6' 895044584a44Smrgmacro_revision='2.4.6' 895106c34b88Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 895206c34b88Smrg_LT_DECL(, macro_revision, 0) 895306c34b88Smrg]) 895406c34b88Smrg 895506c34b88Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8956b789ec8aSmrg# 895744584a44Smrg# Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software 895844584a44Smrg# Foundation, Inc. 895906c34b88Smrg# Written by Scott James Remnant, 2004. 896006c34b88Smrg# 896106c34b88Smrg# This file is free software; the Free Software Foundation gives 896206c34b88Smrg# unlimited permission to copy and/or distribute it, with or without 896306c34b88Smrg# modifications, as long as this notice is preserved. 8964b789ec8aSmrg 896506c34b88Smrg# serial 5 lt~obsolete.m4 896606c34b88Smrg 896706c34b88Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8968b789ec8aSmrg# 896944584a44Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), 897006c34b88Smrg# which have later been changed to m4_define as they aren't part of the 897106c34b88Smrg# exported API, or moved to Autoconf or Automake where they belong. 8972b789ec8aSmrg# 897306c34b88Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 897406c34b88Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 897506c34b88Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 897606c34b88Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 897706c34b88Smrg# and doesn't know about Autoconf macros at all.) 8978b789ec8aSmrg# 897906c34b88Smrg# So we provide this file, which has a silly filename so it's always 898006c34b88Smrg# included after everything else. This provides aclocal with the 898106c34b88Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 898206c34b88Smrg# because those macros already exist, or will be overwritten later. 898344584a44Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 898406c34b88Smrg# 898506c34b88Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 898606c34b88Smrg# Yes, that means every name once taken will need to remain here until 898706c34b88Smrg# we give up compatibility with versions before 1.7, at which point 898806c34b88Smrg# we need to keep only those names which we still refer to. 8989b789ec8aSmrg 899006c34b88Smrg# This is to help aclocal find these macros, as it can't see m4_define. 899106c34b88SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 899206c34b88Smrg 899306c34b88Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 899406c34b88Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 899506c34b88Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 899606c34b88Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 899706c34b88Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 899806c34b88Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 899906c34b88Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 900006c34b88Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 900106c34b88Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 900206c34b88Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 900306c34b88Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 900406c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 900506c34b88Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 900606c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 900706c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 900806c34b88Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 900906c34b88Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 901006c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 901106c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 901206c34b88Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 901306c34b88Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 901406c34b88Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 901506c34b88Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 901606c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 901706c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 901806c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 901906c34b88Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 902006c34b88Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 902106c34b88Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 902206c34b88Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 902306c34b88Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 902406c34b88Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 902506c34b88Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 902606c34b88Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 902706c34b88Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 902806c34b88Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 902906c34b88Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 903006c34b88Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 903106c34b88Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 903206c34b88Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 903306c34b88Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 903406c34b88Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 903506c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 903606c34b88Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 903706c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 903806c34b88Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 903906c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 904006c34b88Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 904106c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 904206c34b88Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 904306c34b88Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 904406c34b88Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 904506c34b88Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 904606c34b88Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 904706c34b88Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 904806c34b88Smrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 904906c34b88Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 905006c34b88Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 905106c34b88Smrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 905206c34b88Smrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 905306c34b88Smrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 905406c34b88Smrg 905506c34b88Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 905606c34b88Smrg# serial 1 (pkg-config-0.24) 905706c34b88Smrg# 905806c34b88Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 9059b789ec8aSmrg# 906006c34b88Smrg# This program is free software; you can redistribute it and/or modify 906106c34b88Smrg# it under the terms of the GNU General Public License as published by 906206c34b88Smrg# the Free Software Foundation; either version 2 of the License, or 906306c34b88Smrg# (at your option) any later version. 9064b789ec8aSmrg# 906506c34b88Smrg# This program is distributed in the hope that it will be useful, but 906606c34b88Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 906706c34b88Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 906806c34b88Smrg# General Public License for more details. 9069b789ec8aSmrg# 907006c34b88Smrg# You should have received a copy of the GNU General Public License 907106c34b88Smrg# along with this program; if not, write to the Free Software 907206c34b88Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 907306c34b88Smrg# 907406c34b88Smrg# As a special exception to the GNU General Public License, if you 907506c34b88Smrg# distribute this file as part of a program that contains a 907606c34b88Smrg# configuration script generated by Autoconf, you may include it under 907706c34b88Smrg# the same distribution terms that you use for the rest of that program. 907806c34b88Smrg 907906c34b88Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 908006c34b88Smrg# ---------------------------------- 908106c34b88SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 908206c34b88Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 9083dc9477beSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) 9084dc9477beSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) 908506c34b88SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 908606c34b88SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 908706c34b88SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 908806c34b88Smrg 908906c34b88Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 909006c34b88Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 909106c34b88Smrgfi 909206c34b88Smrgif test -n "$PKG_CONFIG"; then 909306c34b88Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 909406c34b88Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 909506c34b88Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 909606c34b88Smrg AC_MSG_RESULT([yes]) 909706c34b88Smrg else 909806c34b88Smrg AC_MSG_RESULT([no]) 909906c34b88Smrg PKG_CONFIG="" 910006c34b88Smrg fi 910106c34b88Smrgfi[]dnl 910206c34b88Smrg])# PKG_PROG_PKG_CONFIG 9103b789ec8aSmrg 910406c34b88Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9105b789ec8aSmrg# 910606c34b88Smrg# Check to see whether a particular set of modules exists. Similar 910706c34b88Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 9108b789ec8aSmrg# 910906c34b88Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 911006c34b88Smrg# only at the first occurence in configure.ac, so if the first place 911106c34b88Smrg# it's called might be skipped (such as if it is within an "if", you 911206c34b88Smrg# have to call PKG_CHECK_EXISTS manually 911306c34b88Smrg# -------------------------------------------------------------- 911406c34b88SmrgAC_DEFUN([PKG_CHECK_EXISTS], 911506c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 911606c34b88Smrgif test -n "$PKG_CONFIG" && \ 911706c34b88Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 911806c34b88Smrg m4_default([$2], [:]) 911906c34b88Smrgm4_ifvaln([$3], [else 912006c34b88Smrg $3])dnl 912106c34b88Smrgfi]) 9122b789ec8aSmrg 912306c34b88Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 912406c34b88Smrg# --------------------------------------------- 912506c34b88Smrgm4_define([_PKG_CONFIG], 912606c34b88Smrg[if test -n "$$1"; then 912706c34b88Smrg pkg_cv_[]$1="$$1" 912806c34b88Smrg elif test -n "$PKG_CONFIG"; then 912906c34b88Smrg PKG_CHECK_EXISTS([$3], 9130dc9477beSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` 9131dc9477beSmrg test "x$?" != "x0" && pkg_failed=yes ], 913206c34b88Smrg [pkg_failed=yes]) 913306c34b88Smrg else 913406c34b88Smrg pkg_failed=untried 913506c34b88Smrgfi[]dnl 913606c34b88Smrg])# _PKG_CONFIG 913706c34b88Smrg 913806c34b88Smrg# _PKG_SHORT_ERRORS_SUPPORTED 913906c34b88Smrg# ----------------------------- 914006c34b88SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 914106c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 914206c34b88Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 914306c34b88Smrg _pkg_short_errors_supported=yes 914406c34b88Smrgelse 914506c34b88Smrg _pkg_short_errors_supported=no 914606c34b88Smrgfi[]dnl 914706c34b88Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 914806c34b88Smrg 914906c34b88Smrg 915006c34b88Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 915106c34b88Smrg# [ACTION-IF-NOT-FOUND]) 9152f1ee322dSmrg# 9153f1ee322dSmrg# 915406c34b88Smrg# Note that if there is a possibility the first call to 915506c34b88Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 915606c34b88Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 9157f1ee322dSmrg# 9158f1ee322dSmrg# 915906c34b88Smrg# -------------------------------------------------------------- 916006c34b88SmrgAC_DEFUN([PKG_CHECK_MODULES], 916106c34b88Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 916206c34b88SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 916306c34b88SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 9164f1ee322dSmrg 916506c34b88Smrgpkg_failed=no 916606c34b88SmrgAC_MSG_CHECKING([for $1]) 916706c34b88Smrg 916806c34b88Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 916906c34b88Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 917006c34b88Smrg 917106c34b88Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 917206c34b88Smrgand $1[]_LIBS to avoid the need to call pkg-config. 917306c34b88SmrgSee the pkg-config man page for more details.]) 917406c34b88Smrg 917506c34b88Smrgif test $pkg_failed = yes; then 917606c34b88Smrg AC_MSG_RESULT([no]) 917706c34b88Smrg _PKG_SHORT_ERRORS_SUPPORTED 917806c34b88Smrg if test $_pkg_short_errors_supported = yes; then 9179dc9477beSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` 918006c34b88Smrg else 9181dc9477beSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` 918206c34b88Smrg fi 918306c34b88Smrg # Put the nasty error message in config.log where it belongs 918406c34b88Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 918506c34b88Smrg 918606c34b88Smrg m4_default([$4], [AC_MSG_ERROR( 918706c34b88Smrg[Package requirements ($2) were not met: 918806c34b88Smrg 918906c34b88Smrg$$1_PKG_ERRORS 919006c34b88Smrg 919106c34b88SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 919206c34b88Smrginstalled software in a non-standard prefix. 919306c34b88Smrg 9194dc9477beSmrg_PKG_TEXT])[]dnl 919506c34b88Smrg ]) 919606c34b88Smrgelif test $pkg_failed = untried; then 919706c34b88Smrg AC_MSG_RESULT([no]) 919806c34b88Smrg m4_default([$4], [AC_MSG_FAILURE( 919906c34b88Smrg[The pkg-config script could not be found or is too old. Make sure it 920006c34b88Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 920106c34b88Smrgpath to pkg-config. 920206c34b88Smrg 920306c34b88Smrg_PKG_TEXT 920406c34b88Smrg 9205dc9477beSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl 920606c34b88Smrg ]) 920706c34b88Smrgelse 920806c34b88Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 920906c34b88Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 921006c34b88Smrg AC_MSG_RESULT([yes]) 921106c34b88Smrg $3 921206c34b88Smrgfi[]dnl 921306c34b88Smrg])# PKG_CHECK_MODULES 921406c34b88Smrg 9215dc9477beSmrg 9216dc9477beSmrg# PKG_INSTALLDIR(DIRECTORY) 9217dc9477beSmrg# ------------------------- 9218dc9477beSmrg# Substitutes the variable pkgconfigdir as the location where a module 9219dc9477beSmrg# should install pkg-config .pc files. By default the directory is 9220dc9477beSmrg# $libdir/pkgconfig, but the default can be changed by passing 9221dc9477beSmrg# DIRECTORY. The user can override through the --with-pkgconfigdir 9222dc9477beSmrg# parameter. 9223dc9477beSmrgAC_DEFUN([PKG_INSTALLDIR], 9224dc9477beSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) 9225dc9477beSmrgm4_pushdef([pkg_description], 9226dc9477beSmrg [pkg-config installation directory @<:@]pkg_default[@:>@]) 9227dc9477beSmrgAC_ARG_WITH([pkgconfigdir], 9228dc9477beSmrg [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, 9229dc9477beSmrg [with_pkgconfigdir=]pkg_default) 9230dc9477beSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) 9231dc9477beSmrgm4_popdef([pkg_default]) 9232dc9477beSmrgm4_popdef([pkg_description]) 9233dc9477beSmrg]) dnl PKG_INSTALLDIR 9234dc9477beSmrg 9235dc9477beSmrg 9236dc9477beSmrg# PKG_NOARCH_INSTALLDIR(DIRECTORY) 9237dc9477beSmrg# ------------------------- 9238dc9477beSmrg# Substitutes the variable noarch_pkgconfigdir as the location where a 9239dc9477beSmrg# module should install arch-independent pkg-config .pc files. By 9240dc9477beSmrg# default the directory is $datadir/pkgconfig, but the default can be 9241dc9477beSmrg# changed by passing DIRECTORY. The user can override through the 9242dc9477beSmrg# --with-noarch-pkgconfigdir parameter. 9243dc9477beSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR], 9244dc9477beSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) 9245dc9477beSmrgm4_pushdef([pkg_description], 9246dc9477beSmrg [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) 9247dc9477beSmrgAC_ARG_WITH([noarch-pkgconfigdir], 9248dc9477beSmrg [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, 9249dc9477beSmrg [with_noarch_pkgconfigdir=]pkg_default) 9250dc9477beSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) 9251dc9477beSmrgm4_popdef([pkg_default]) 9252dc9477beSmrgm4_popdef([pkg_description]) 9253dc9477beSmrg]) dnl PKG_NOARCH_INSTALLDIR 9254dc9477beSmrg 9255dc9477beSmrg 9256dc9477beSmrg# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, 9257dc9477beSmrg# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 9258dc9477beSmrg# ------------------------------------------- 9259dc9477beSmrg# Retrieves the value of the pkg-config variable for the given module. 9260dc9477beSmrgAC_DEFUN([PKG_CHECK_VAR], 9261dc9477beSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 9262dc9477beSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl 9263dc9477beSmrg 9264dc9477beSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2]) 9265dc9477beSmrgAS_VAR_COPY([$1], [pkg_cv_][$1]) 9266dc9477beSmrg 9267dc9477beSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl 9268dc9477beSmrg])# PKG_CHECK_VAR 9269dc9477beSmrg 927044584a44Smrg# Copyright (C) 2002-2014 Free Software Foundation, Inc. 927144584a44Smrg# 927244584a44Smrg# This file is free software; the Free Software Foundation 927344584a44Smrg# gives unlimited permission to copy and/or distribute it, 927444584a44Smrg# with or without modifications, as long as this notice is preserved. 927506c34b88Smrg 927644584a44Smrg# AM_AUTOMAKE_VERSION(VERSION) 927744584a44Smrg# ---------------------------- 927844584a44Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 927944584a44Smrg# generated from the m4 files accompanying Automake X.Y. 928044584a44Smrg# (This private macro should not be called outside this file.) 928144584a44SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 928244584a44Smrg[am__api_version='1.15' 928344584a44Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 928444584a44Smrgdnl require some minimum version. Point them to the right macro. 928544584a44Smrgm4_if([$1], [1.15], [], 928644584a44Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 928744584a44Smrg]) 928844584a44Smrg 928944584a44Smrg# _AM_AUTOCONF_VERSION(VERSION) 929044584a44Smrg# ----------------------------- 929144584a44Smrg# aclocal traces this macro to find the Autoconf version. 929244584a44Smrg# This is a private macro too. Using m4_define simplifies 929344584a44Smrg# the logic in aclocal, which can simply ignore this definition. 929444584a44Smrgm4_define([_AM_AUTOCONF_VERSION], []) 929544584a44Smrg 929644584a44Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 929744584a44Smrg# ------------------------------- 929844584a44Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 929944584a44Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 930044584a44SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 930144584a44Smrg[AM_AUTOMAKE_VERSION([1.15])dnl 930244584a44Smrgm4_ifndef([AC_AUTOCONF_VERSION], 930344584a44Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 930444584a44Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 930544584a44Smrg 930644584a44Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 930744584a44Smrg 930844584a44Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 9309b789ec8aSmrg# 931044584a44Smrg# This file is free software; the Free Software Foundation 931144584a44Smrg# gives unlimited permission to copy and/or distribute it, 931244584a44Smrg# with or without modifications, as long as this notice is preserved. 931344584a44Smrg 931444584a44Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 931544584a44Smrg# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to 931644584a44Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'. 9317b789ec8aSmrg# 931844584a44Smrg# Of course, Automake must honor this variable whenever it calls a 931944584a44Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 932044584a44Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 932144584a44Smrg# depending on how configure is run. This is pretty annoying, since 932244584a44Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 932344584a44Smrg# source directory, any form will work fine, but in subdirectories a 932444584a44Smrg# relative path needs to be adjusted first. 9325b789ec8aSmrg# 932644584a44Smrg# $ac_aux_dir/missing 932744584a44Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 932844584a44Smrg# $top_srcdir/$ac_aux_dir/missing 932944584a44Smrg# fails if $ac_aux_dir is absolute, 933044584a44Smrg# fails when called from a subdirectory in a VPATH build with 933144584a44Smrg# a relative $ac_aux_dir 9332f1ee322dSmrg# 933344584a44Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 933444584a44Smrg# are both prefixed by $srcdir. In an in-source build this is usually 933544584a44Smrg# harmless because $srcdir is '.', but things will broke when you 933644584a44Smrg# start a VPATH build or use an absolute $srcdir. 933706c34b88Smrg# 933844584a44Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 933944584a44Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 934044584a44Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 934144584a44Smrg# and then we would define $MISSING as 934244584a44Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 934344584a44Smrg# This will work as long as MISSING is not called from configure, because 934444584a44Smrg# unfortunately $(top_srcdir) has no meaning in configure. 934544584a44Smrg# However there are other variables, like CC, which are often used in 934644584a44Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 934744584a44Smrg# 934844584a44Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 934944584a44Smrg# absolute PATH. The drawback is that using absolute paths prevent a 935044584a44Smrg# configured tree to be moved without reconfiguration. 935106c34b88Smrg 935244584a44SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 935344584a44Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 935444584a44Smrg# Expand $ac_aux_dir to an absolute path. 935544584a44Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd` 935644584a44Smrg]) 935706c34b88Smrg 935844584a44Smrg# AM_CONDITIONAL -*- Autoconf -*- 935944584a44Smrg 936044584a44Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 936144584a44Smrg# 936244584a44Smrg# This file is free software; the Free Software Foundation 936344584a44Smrg# gives unlimited permission to copy and/or distribute it, 936444584a44Smrg# with or without modifications, as long as this notice is preserved. 936544584a44Smrg 936644584a44Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 936744584a44Smrg# ------------------------------------- 936844584a44Smrg# Define a conditional. 936944584a44SmrgAC_DEFUN([AM_CONDITIONAL], 937044584a44Smrg[AC_PREREQ([2.52])dnl 937144584a44Smrg m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 937244584a44Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 937344584a44SmrgAC_SUBST([$1_TRUE])dnl 937444584a44SmrgAC_SUBST([$1_FALSE])dnl 937544584a44Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 937644584a44Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 937744584a44Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 937844584a44Smrgif $2; then 937944584a44Smrg $1_TRUE= 938044584a44Smrg $1_FALSE='#' 938106c34b88Smrgelse 938244584a44Smrg $1_TRUE='#' 938344584a44Smrg $1_FALSE= 938406c34b88Smrgfi 938544584a44SmrgAC_CONFIG_COMMANDS_PRE( 938644584a44Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 938744584a44Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 938844584a44SmrgUsually this means the macro was only invoked conditionally.]]) 938944584a44Smrgfi])]) 939006c34b88Smrg 939144584a44Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 9392b789ec8aSmrg# 939344584a44Smrg# This file is free software; the Free Software Foundation 939444584a44Smrg# gives unlimited permission to copy and/or distribute it, 939544584a44Smrg# with or without modifications, as long as this notice is preserved. 9396b789ec8aSmrg 939706c34b88Smrg 939844584a44Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be 939944584a44Smrg# written in clear, in which case automake, when reading aclocal.m4, 940044584a44Smrg# will think it sees a *use*, and therefore will trigger all it's 940144584a44Smrg# C support machinery. Also note that it means that autoscan, seeing 940244584a44Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 9403c43cc173Smrg 9404c43cc173Smrg 940544584a44Smrg# _AM_DEPENDENCIES(NAME) 940644584a44Smrg# ---------------------- 940744584a44Smrg# See how the compiler implements dependency checking. 940844584a44Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". 940944584a44Smrg# We try a few techniques and use that to set a single cache variable. 941044584a44Smrg# 941144584a44Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 941244584a44Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 941344584a44Smrg# dependency, and given that the user is not expected to run this macro, 941444584a44Smrg# just rely on AC_PROG_CC. 941544584a44SmrgAC_DEFUN([_AM_DEPENDENCIES], 941644584a44Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 941744584a44SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 941844584a44SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 941944584a44SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 942037eb1ca1Smrg 942144584a44Smrgm4_if([$1], [CC], [depcc="$CC" am_compiler_list=], 942244584a44Smrg [$1], [CXX], [depcc="$CXX" am_compiler_list=], 942344584a44Smrg [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 942444584a44Smrg [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], 942544584a44Smrg [$1], [UPC], [depcc="$UPC" am_compiler_list=], 942644584a44Smrg [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 942744584a44Smrg [depcc="$$1" am_compiler_list=]) 9428b789ec8aSmrg 942944584a44SmrgAC_CACHE_CHECK([dependency style of $depcc], 943044584a44Smrg [am_cv_$1_dependencies_compiler_type], 943144584a44Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 943244584a44Smrg # We make a subdir and do the tests there. Otherwise we can end up 943344584a44Smrg # making bogus files that we don't know about and never remove. For 943444584a44Smrg # instance it was reported that on HP-UX the gcc test will end up 943544584a44Smrg # making a dummy file named 'D' -- because '-MD' means "put the output 943644584a44Smrg # in D". 943744584a44Smrg rm -rf conftest.dir 943844584a44Smrg mkdir conftest.dir 943944584a44Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 944044584a44Smrg # using a relative directory. 944144584a44Smrg cp "$am_depcomp" conftest.dir 944244584a44Smrg cd conftest.dir 944344584a44Smrg # We will build objects and dependencies in a subdirectory because 944444584a44Smrg # it helps to detect inapplicable dependency modes. For instance 944544584a44Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 944644584a44Smrg # side effect of compilation, but ICC will put the dependencies in 944744584a44Smrg # the current directory while Tru64 will put them in the object 944844584a44Smrg # directory. 944944584a44Smrg mkdir sub 9450b789ec8aSmrg 945144584a44Smrg am_cv_$1_dependencies_compiler_type=none 945244584a44Smrg if test "$am_compiler_list" = ""; then 945344584a44Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 945444584a44Smrg fi 945544584a44Smrg am__universal=false 945644584a44Smrg m4_case([$1], [CC], 945744584a44Smrg [case " $depcc " in #( 945844584a44Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 945944584a44Smrg esac], 946044584a44Smrg [CXX], 946144584a44Smrg [case " $depcc " in #( 946244584a44Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 946344584a44Smrg esac]) 946444584a44Smrg 946544584a44Smrg for depmode in $am_compiler_list; do 946644584a44Smrg # Setup a source with many dependencies, because some compilers 946744584a44Smrg # like to wrap large dependency lists on column 80 (with \), and 946844584a44Smrg # we should not choose a depcomp mode which is confused by this. 946944584a44Smrg # 947044584a44Smrg # We need to recreate these files for each test, as the compiler may 947144584a44Smrg # overwrite some of them when testing with obscure command lines. 947244584a44Smrg # This happens at least with the AIX C compiler. 947344584a44Smrg : > sub/conftest.c 947444584a44Smrg for i in 1 2 3 4 5 6; do 947544584a44Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 947644584a44Smrg # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 947744584a44Smrg # Solaris 10 /bin/sh. 947844584a44Smrg echo '/* dummy */' > sub/conftst$i.h 947944584a44Smrg done 948044584a44Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 948144584a44Smrg 948244584a44Smrg # We check with '-c' and '-o' for the sake of the "dashmstdout" 948344584a44Smrg # mode. It turns out that the SunPro C++ compiler does not properly 948444584a44Smrg # handle '-M -o', and we need to detect this. Also, some Intel 948544584a44Smrg # versions had trouble with output in subdirs. 948644584a44Smrg am__obj=sub/conftest.${OBJEXT-o} 948744584a44Smrg am__minus_obj="-o $am__obj" 948844584a44Smrg case $depmode in 948944584a44Smrg gcc) 949044584a44Smrg # This depmode causes a compiler race in universal mode. 949144584a44Smrg test "$am__universal" = false || continue 949244584a44Smrg ;; 949344584a44Smrg nosideeffect) 949444584a44Smrg # After this tag, mechanisms are not by side-effect, so they'll 949544584a44Smrg # only be used when explicitly requested. 949644584a44Smrg if test "x$enable_dependency_tracking" = xyes; then 949744584a44Smrg continue 949844584a44Smrg else 949944584a44Smrg break 950044584a44Smrg fi 950144584a44Smrg ;; 950244584a44Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 950344584a44Smrg # This compiler won't grok '-c -o', but also, the minuso test has 950444584a44Smrg # not run yet. These depmodes are late enough in the game, and 950544584a44Smrg # so weak that their functioning should not be impacted. 950644584a44Smrg am__obj=conftest.${OBJEXT-o} 950744584a44Smrg am__minus_obj= 950844584a44Smrg ;; 950944584a44Smrg none) break ;; 951006c34b88Smrg esac 951144584a44Smrg if depmode=$depmode \ 951244584a44Smrg source=sub/conftest.c object=$am__obj \ 951344584a44Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 951444584a44Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 951544584a44Smrg >/dev/null 2>conftest.err && 951644584a44Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 951744584a44Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 951844584a44Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 951944584a44Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 952044584a44Smrg # icc doesn't choke on unknown options, it will just issue warnings 952144584a44Smrg # or remarks (even with -Werror). So we grep stderr for any message 952244584a44Smrg # that says an option was ignored or not supported. 952344584a44Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 952444584a44Smrg # icc: Command line warning: ignoring option '-M'; no argument required 952544584a44Smrg # The diagnosis changed in icc 8.0: 952644584a44Smrg # icc: Command line remark: option '-MP' not supported 952744584a44Smrg if (grep 'ignoring option' conftest.err || 952844584a44Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 952944584a44Smrg am_cv_$1_dependencies_compiler_type=$depmode 953044584a44Smrg break 953144584a44Smrg fi 953244584a44Smrg fi 953344584a44Smrg done 953444584a44Smrg 953544584a44Smrg cd .. 953644584a44Smrg rm -rf conftest.dir 953744584a44Smrgelse 953844584a44Smrg am_cv_$1_dependencies_compiler_type=none 953906c34b88Smrgfi 954044584a44Smrg]) 954144584a44SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 954244584a44SmrgAM_CONDITIONAL([am__fastdep$1], [ 954344584a44Smrg test "x$enable_dependency_tracking" != xno \ 954444584a44Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 954544584a44Smrg]) 9546c43cc173Smrg 954706c34b88Smrg 954844584a44Smrg# AM_SET_DEPDIR 954944584a44Smrg# ------------- 955044584a44Smrg# Choose a directory name for dependency files. 955144584a44Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES. 955244584a44SmrgAC_DEFUN([AM_SET_DEPDIR], 955344584a44Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 955444584a44SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 955544584a44Smrg]) 955606c34b88Smrg 955706c34b88Smrg 955844584a44Smrg# AM_DEP_TRACK 955944584a44Smrg# ------------ 956044584a44SmrgAC_DEFUN([AM_DEP_TRACK], 956144584a44Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl 956244584a44SmrgAS_HELP_STRING( 956344584a44Smrg [--enable-dependency-tracking], 956444584a44Smrg [do not reject slow dependency extractors]) 956544584a44SmrgAS_HELP_STRING( 956644584a44Smrg [--disable-dependency-tracking], 956744584a44Smrg [speeds up one-time build])]) 956844584a44Smrgif test "x$enable_dependency_tracking" != xno; then 956944584a44Smrg am_depcomp="$ac_aux_dir/depcomp" 957044584a44Smrg AMDEPBACKSLASH='\' 957144584a44Smrg am__nodep='_no' 957244584a44Smrgfi 957344584a44SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 957444584a44SmrgAC_SUBST([AMDEPBACKSLASH])dnl 957544584a44Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 957644584a44SmrgAC_SUBST([am__nodep])dnl 957744584a44Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 957844584a44Smrg]) 957906c34b88Smrg 958044584a44Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 958106c34b88Smrg 958244584a44Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 9583f1ee322dSmrg# 958444584a44Smrg# This file is free software; the Free Software Foundation 958544584a44Smrg# gives unlimited permission to copy and/or distribute it, 958644584a44Smrg# with or without modifications, as long as this notice is preserved. 9587c43cc173Smrg 9588c43cc173Smrg 958944584a44Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 959044584a44Smrg# ------------------------------ 959144584a44SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 959244584a44Smrg[{ 959344584a44Smrg # Older Autoconf quotes --file arguments for eval, but not when files 959444584a44Smrg # are listed without --file. Let's play safe and only enable the eval 959544584a44Smrg # if we detect the quoting. 959644584a44Smrg case $CONFIG_FILES in 959744584a44Smrg *\'*) eval set x "$CONFIG_FILES" ;; 959844584a44Smrg *) set x $CONFIG_FILES ;; 959944584a44Smrg esac 960044584a44Smrg shift 960144584a44Smrg for mf 960244584a44Smrg do 960344584a44Smrg # Strip MF so we end up with the name of the file. 960444584a44Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 960544584a44Smrg # Check whether this is an Automake generated Makefile or not. 960644584a44Smrg # We used to match only the files named 'Makefile.in', but 960744584a44Smrg # some people rename them; so instead we look at the file content. 960844584a44Smrg # Grep'ing the first line is not enough: some people post-process 960944584a44Smrg # each Makefile.in and add a new line on top of each file to say so. 961044584a44Smrg # Grep'ing the whole file is not good either: AIX grep has a line 961144584a44Smrg # limit of 2048, but all sed's we know have understand at least 4000. 961244584a44Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 961344584a44Smrg dirpart=`AS_DIRNAME("$mf")` 961444584a44Smrg else 961544584a44Smrg continue 961644584a44Smrg fi 961744584a44Smrg # Extract the definition of DEPDIR, am__include, and am__quote 961844584a44Smrg # from the Makefile without running 'make'. 961944584a44Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 962044584a44Smrg test -z "$DEPDIR" && continue 962144584a44Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 962244584a44Smrg test -z "$am__include" && continue 962344584a44Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 962444584a44Smrg # Find all dependency output files, they are included files with 962544584a44Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 962644584a44Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 962744584a44Smrg # expansion. 962844584a44Smrg for file in `sed -n " 962944584a44Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 963044584a44Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 963144584a44Smrg # Make sure the directory exists. 963244584a44Smrg test -f "$dirpart/$file" && continue 963344584a44Smrg fdir=`AS_DIRNAME(["$file"])` 963444584a44Smrg AS_MKDIR_P([$dirpart/$fdir]) 963544584a44Smrg # echo "creating $dirpart/$file" 963644584a44Smrg echo '# dummy' > "$dirpart/$file" 963744584a44Smrg done 963844584a44Smrg done 963944584a44Smrg} 964044584a44Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 9641b789ec8aSmrg 9642c43cc173Smrg 964344584a44Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 964444584a44Smrg# ----------------------------- 964544584a44Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 964644584a44Smrg# 964744584a44Smrg# This code is only required when automatic dependency tracking 964844584a44Smrg# is enabled. FIXME. This creates each '.P' file that we will 964944584a44Smrg# need in order to bootstrap the dependency handling code. 965044584a44SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 965144584a44Smrg[AC_CONFIG_COMMANDS([depfiles], 965244584a44Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 965344584a44Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 965444584a44Smrg]) 9655c43cc173Smrg 965644584a44Smrg# Do all the work for Automake. -*- Autoconf -*- 96573e256790Smrg 965844584a44Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 965906c34b88Smrg# 966044584a44Smrg# This file is free software; the Free Software Foundation 966144584a44Smrg# gives unlimited permission to copy and/or distribute it, 966244584a44Smrg# with or without modifications, as long as this notice is preserved. 9663c43cc173Smrg 966444584a44Smrg# This macro actually does too much. Some checks are only needed if 966544584a44Smrg# your package does certain things. But this isn't really a big deal. 9666c43cc173Smrg 966744584a44Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. 966844584a44Smrgm4_define([AC_PROG_CC], 966944584a44Smrgm4_defn([AC_PROG_CC]) 967044584a44Smrg[_AM_PROG_CC_C_O 967144584a44Smrg]) 967221e67964Smrg 967344584a44Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 967444584a44Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 967544584a44Smrg# ----------------------------------------------- 967644584a44Smrg# The call with PACKAGE and VERSION arguments is the old style 967744584a44Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 967844584a44Smrg# and VERSION should now be passed to AC_INIT and removed from 967944584a44Smrg# the call to AM_INIT_AUTOMAKE. 968044584a44Smrg# We support both call styles for the transition. After 968144584a44Smrg# the next Automake release, Autoconf can make the AC_INIT 968244584a44Smrg# arguments mandatory, and then we can depend on a new Autoconf 968344584a44Smrg# release and drop the old call support. 968444584a44SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 968544584a44Smrg[AC_PREREQ([2.65])dnl 968644584a44Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 968744584a44Smrgdnl the ones we care about. 968844584a44Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 968944584a44SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 969044584a44SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 969144584a44Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 969244584a44Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 969344584a44Smrg # is not polluted with repeated "-I." 969444584a44Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 969544584a44Smrg # test to see if srcdir already configured 969644584a44Smrg if test -f $srcdir/config.status; then 969744584a44Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 969844584a44Smrg fi 969906c34b88Smrgfi 9700c43cc173Smrg 970144584a44Smrg# test whether we have cygpath 970244584a44Smrgif test -z "$CYGPATH_W"; then 970344584a44Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 970444584a44Smrg CYGPATH_W='cygpath -w' 970544584a44Smrg else 970644584a44Smrg CYGPATH_W=echo 970744584a44Smrg fi 970806c34b88Smrgfi 970944584a44SmrgAC_SUBST([CYGPATH_W]) 9710c43cc173Smrg 971144584a44Smrg# Define the identity of the package. 971244584a44Smrgdnl Distinguish between old-style and new-style calls. 971344584a44Smrgm4_ifval([$2], 971444584a44Smrg[AC_DIAGNOSE([obsolete], 971544584a44Smrg [$0: two- and three-arguments forms are deprecated.]) 971644584a44Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 971744584a44Smrg AC_SUBST([PACKAGE], [$1])dnl 971844584a44Smrg AC_SUBST([VERSION], [$2])], 971944584a44Smrg[_AM_SET_OPTIONS([$1])dnl 972044584a44Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 972144584a44Smrgm4_if( 972244584a44Smrg m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), 972344584a44Smrg [ok:ok],, 972444584a44Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 972544584a44Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 972644584a44Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 9727c43cc173Smrg 972844584a44Smrg_AM_IF_OPTION([no-define],, 972944584a44Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) 973044584a44Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl 9731c43cc173Smrg 973244584a44Smrg# Some tools Automake needs. 973344584a44SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 973444584a44SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 973544584a44SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) 973644584a44SmrgAM_MISSING_PROG([AUTOCONF], [autoconf]) 973744584a44SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) 973844584a44SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader]) 973944584a44SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo]) 974044584a44SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 974144584a44SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 974244584a44SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 974344584a44Smrg# For better backward compatibility. To be removed once Automake 1.9.x 974444584a44Smrg# dies out for good. For more background, see: 974544584a44Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 974644584a44Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 974744584a44SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)']) 974844584a44Smrg# We need awk for the "check" target (and possibly the TAP driver). The 974944584a44Smrg# system "awk" is bad on some platforms. 975044584a44SmrgAC_REQUIRE([AC_PROG_AWK])dnl 975144584a44SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 975244584a44SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 975344584a44Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 975444584a44Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 975544584a44Smrg [_AM_PROG_TAR([v7])])]) 975644584a44Smrg_AM_IF_OPTION([no-dependencies],, 975744584a44Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 975844584a44Smrg [_AM_DEPENDENCIES([CC])], 975944584a44Smrg [m4_define([AC_PROG_CC], 976044584a44Smrg m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl 976144584a44SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 976244584a44Smrg [_AM_DEPENDENCIES([CXX])], 976344584a44Smrg [m4_define([AC_PROG_CXX], 976444584a44Smrg m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl 976544584a44SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 976644584a44Smrg [_AM_DEPENDENCIES([OBJC])], 976744584a44Smrg [m4_define([AC_PROG_OBJC], 976844584a44Smrg m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl 976944584a44SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX], 977044584a44Smrg [_AM_DEPENDENCIES([OBJCXX])], 977144584a44Smrg [m4_define([AC_PROG_OBJCXX], 977244584a44Smrg m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl 977344584a44Smrg]) 977444584a44SmrgAC_REQUIRE([AM_SILENT_RULES])dnl 977544584a44Smrgdnl The testsuite driver may need to know about EXEEXT, so add the 977644584a44Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This 977744584a44Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. 977844584a44SmrgAC_CONFIG_COMMANDS_PRE(dnl 977944584a44Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 978044584a44Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 978121e67964Smrg 978244584a44Smrg# POSIX will say in a future version that running "rm -f" with no argument 978344584a44Smrg# is OK; and we want to be able to make that assumption in our Makefile 978444584a44Smrg# recipes. So use an aggressive probe to check that the usage we want is 978544584a44Smrg# actually supported "in the wild" to an acceptable degree. 978644584a44Smrg# See automake bug#10828. 978744584a44Smrg# To make any issue more visible, cause the running configure to be aborted 978844584a44Smrg# by default if the 'rm' program in use doesn't match our expectations; the 978944584a44Smrg# user can still override this though. 979044584a44Smrgif rm -f && rm -fr && rm -rf; then : OK; else 979144584a44Smrg cat >&2 <<'END' 979244584a44SmrgOops! 979344584a44Smrg 979444584a44SmrgYour 'rm' program seems unable to run without file operands specified 979544584a44Smrgon the command line, even when the '-f' option is present. This is contrary 979644584a44Smrgto the behaviour of most rm programs out there, and not conforming with 979744584a44Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 979844584a44Smrg 979944584a44SmrgPlease tell bug-automake@gnu.org about your system, including the value 980044584a44Smrgof your $PATH and any error possibly output before this message. This 980144584a44Smrgcan help us improve future automake versions. 9802f1ee322dSmrg 980344584a44SmrgEND 980444584a44Smrg if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 980544584a44Smrg echo 'Configuration will proceed anyway, since you have set the' >&2 980644584a44Smrg echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 980744584a44Smrg echo >&2 980844584a44Smrg else 980944584a44Smrg cat >&2 <<'END' 981044584a44SmrgAborting the configuration process, to ensure you take notice of the issue. 981144584a44Smrg 981244584a44SmrgYou can download and install GNU coreutils to get an 'rm' implementation 981344584a44Smrgthat behaves properly: <http://www.gnu.org/software/coreutils/>. 981444584a44Smrg 981544584a44SmrgIf you want to complete the configuration process using your problematic 981644584a44Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 981744584a44Smrgto "yes", and re-run configure. 981844584a44Smrg 981944584a44SmrgEND 982044584a44Smrg AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) 982144584a44Smrg fi 9822f1ee322dSmrgfi 982344584a44Smrgdnl The trailing newline in this macro's definition is deliberate, for 982444584a44Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments 982544584a44Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. 982644584a44Smrg]) 9827f1ee322dSmrg 982844584a44Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 982944584a44Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 983044584a44Smrgdnl mangled by Autoconf and run in a shell conditional statement. 983144584a44Smrgm4_define([_AC_COMPILER_EXEEXT], 983244584a44Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9833f1ee322dSmrg 983444584a44Smrg# When config.status generates a header, we must update the stamp-h file. 983544584a44Smrg# This file resides in the same directory as the config header 983644584a44Smrg# that is generated. The stamp files are numbered to have different names. 9837f1ee322dSmrg 983844584a44Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 983944584a44Smrg# loop where config.status creates the headers, so we can generate 984044584a44Smrg# our stamp files there. 984144584a44SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 984244584a44Smrg[# Compute $1's index in $config_headers. 984344584a44Smrg_am_arg=$1 984444584a44Smrg_am_stamp_count=1 984544584a44Smrgfor _am_header in $config_headers :; do 984644584a44Smrg case $_am_header in 984744584a44Smrg $_am_arg | $_am_arg:* ) 984844584a44Smrg break ;; 984944584a44Smrg * ) 985044584a44Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 985144584a44Smrg esac 985244584a44Smrgdone 985344584a44Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 985444584a44Smrg 985544584a44Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 985606c34b88Smrg# 985744584a44Smrg# This file is free software; the Free Software Foundation 985844584a44Smrg# gives unlimited permission to copy and/or distribute it, 985944584a44Smrg# with or without modifications, as long as this notice is preserved. 986044584a44Smrg 986144584a44Smrg# AM_PROG_INSTALL_SH 986244584a44Smrg# ------------------ 986344584a44Smrg# Define $install_sh. 986444584a44SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 986544584a44Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 986644584a44Smrgif test x"${install_sh+set}" != xset; then 986744584a44Smrg case $am_aux_dir in 986844584a44Smrg *\ * | *\ *) 986944584a44Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 987044584a44Smrg *) 987144584a44Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 987244584a44Smrg esac 987344584a44Smrgfi 987444584a44SmrgAC_SUBST([install_sh])]) 987544584a44Smrg 987644584a44Smrg# Copyright (C) 2003-2014 Free Software Foundation, Inc. 987706c34b88Smrg# 987844584a44Smrg# This file is free software; the Free Software Foundation 987944584a44Smrg# gives unlimited permission to copy and/or distribute it, 988044584a44Smrg# with or without modifications, as long as this notice is preserved. 9881f1ee322dSmrg 988244584a44Smrg# Check whether the underlying file-system supports filenames 988344584a44Smrg# with a leading dot. For instance MS-DOS doesn't. 988444584a44SmrgAC_DEFUN([AM_SET_LEADING_DOT], 988544584a44Smrg[rm -rf .tst 2>/dev/null 988644584a44Smrgmkdir .tst 2>/dev/null 988744584a44Smrgif test -d .tst; then 988844584a44Smrg am__leading_dot=. 988906c34b88Smrgelse 989044584a44Smrg am__leading_dot=_ 989106c34b88Smrgfi 989244584a44Smrgrmdir .tst 2>/dev/null 989344584a44SmrgAC_SUBST([am__leading_dot])]) 9894f1ee322dSmrg 989544584a44Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 989606c34b88Smrg 989744584a44Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 9898f1ee322dSmrg# 989944584a44Smrg# This file is free software; the Free Software Foundation 990044584a44Smrg# gives unlimited permission to copy and/or distribute it, 990144584a44Smrg# with or without modifications, as long as this notice is preserved. 9902f1ee322dSmrg 990344584a44Smrg# AM_MAKE_INCLUDE() 990444584a44Smrg# ----------------- 990544584a44Smrg# Check to see how make treats includes. 990644584a44SmrgAC_DEFUN([AM_MAKE_INCLUDE], 990744584a44Smrg[am_make=${MAKE-make} 990844584a44Smrgcat > confinc << 'END' 990944584a44Smrgam__doit: 991044584a44Smrg @echo this is the am__doit target 991144584a44Smrg.PHONY: am__doit 991244584a44SmrgEND 991344584a44Smrg# If we don't find an include directive, just comment out the code. 991444584a44SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 991544584a44Smrgam__include="#" 991644584a44Smrgam__quote= 991744584a44Smrg_am_result=none 991844584a44Smrg# First try GNU make style include. 991944584a44Smrgecho "include confinc" > confmf 992044584a44Smrg# Ignore all kinds of additional output from 'make'. 992144584a44Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 992244584a44Smrg*the\ am__doit\ target*) 992344584a44Smrg am__include=include 992444584a44Smrg am__quote= 992544584a44Smrg _am_result=GNU 992644584a44Smrg ;; 992744584a44Smrgesac 992844584a44Smrg# Now try BSD make style include. 992944584a44Smrgif test "$am__include" = "#"; then 993044584a44Smrg echo '.include "confinc"' > confmf 993144584a44Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 993244584a44Smrg *the\ am__doit\ target*) 993344584a44Smrg am__include=.include 993444584a44Smrg am__quote="\"" 993544584a44Smrg _am_result=BSD 993644584a44Smrg ;; 993744584a44Smrg esac 9938f1ee322dSmrgfi 993944584a44SmrgAC_SUBST([am__include]) 994044584a44SmrgAC_SUBST([am__quote]) 994144584a44SmrgAC_MSG_RESULT([$_am_result]) 994244584a44Smrgrm -f confinc confmf 994344584a44Smrg]) 9944f1ee322dSmrg 994544584a44Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9946f1ee322dSmrg 994744584a44Smrg# Copyright (C) 1997-2014 Free Software Foundation, Inc. 994806c34b88Smrg# 994944584a44Smrg# This file is free software; the Free Software Foundation 995044584a44Smrg# gives unlimited permission to copy and/or distribute it, 995144584a44Smrg# with or without modifications, as long as this notice is preserved. 9952f1ee322dSmrg 995344584a44Smrg# AM_MISSING_PROG(NAME, PROGRAM) 995444584a44Smrg# ------------------------------ 995544584a44SmrgAC_DEFUN([AM_MISSING_PROG], 995644584a44Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 995744584a44Smrg$1=${$1-"${am_missing_run}$2"} 995844584a44SmrgAC_SUBST($1)]) 995944584a44Smrg 996044584a44Smrg# AM_MISSING_HAS_RUN 996144584a44Smrg# ------------------ 996244584a44Smrg# Define MISSING if not defined so far and test if it is modern enough. 996344584a44Smrg# If it is, set am_missing_run to use it, otherwise, to nothing. 996444584a44SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 996544584a44Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 996644584a44SmrgAC_REQUIRE_AUX_FILE([missing])dnl 996744584a44Smrgif test x"${MISSING+set}" != xset; then 996844584a44Smrg case $am_aux_dir in 996944584a44Smrg *\ * | *\ *) 997044584a44Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 997144584a44Smrg *) 997244584a44Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 997344584a44Smrg esac 997444584a44Smrgfi 997544584a44Smrg# Use eval to expand $SHELL 997644584a44Smrgif eval "$MISSING --is-lightweight"; then 997744584a44Smrg am_missing_run="$MISSING " 9978f1ee322dSmrgelse 997944584a44Smrg am_missing_run= 998044584a44Smrg AC_MSG_WARN(['missing' script is too old or missing]) 9981f1ee322dSmrgfi 998244584a44Smrg]) 9983f1ee322dSmrg 998444584a44Smrg# Helper functions for option handling. -*- Autoconf -*- 998544584a44Smrg 998644584a44Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 998706c34b88Smrg# 998844584a44Smrg# This file is free software; the Free Software Foundation 998944584a44Smrg# gives unlimited permission to copy and/or distribute it, 999044584a44Smrg# with or without modifications, as long as this notice is preserved. 999144584a44Smrg 999244584a44Smrg# _AM_MANGLE_OPTION(NAME) 999344584a44Smrg# ----------------------- 999444584a44SmrgAC_DEFUN([_AM_MANGLE_OPTION], 999544584a44Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 999644584a44Smrg 999744584a44Smrg# _AM_SET_OPTION(NAME) 999844584a44Smrg# -------------------- 999944584a44Smrg# Set option NAME. Presently that only means defining a flag for this option. 1000044584a44SmrgAC_DEFUN([_AM_SET_OPTION], 1000144584a44Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) 1000244584a44Smrg 1000344584a44Smrg# _AM_SET_OPTIONS(OPTIONS) 1000444584a44Smrg# ------------------------ 1000544584a44Smrg# OPTIONS is a space-separated list of Automake options. 1000644584a44SmrgAC_DEFUN([_AM_SET_OPTIONS], 1000744584a44Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 1000844584a44Smrg 1000944584a44Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 1001044584a44Smrg# ------------------------------------------- 1001144584a44Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 1001244584a44SmrgAC_DEFUN([_AM_IF_OPTION], 1001344584a44Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 1001444584a44Smrg 1001544584a44Smrg# Copyright (C) 1999-2014 Free Software Foundation, Inc. 1001606c34b88Smrg# 1001744584a44Smrg# This file is free software; the Free Software Foundation 1001844584a44Smrg# gives unlimited permission to copy and/or distribute it, 1001944584a44Smrg# with or without modifications, as long as this notice is preserved. 1002044584a44Smrg 1002144584a44Smrg# _AM_PROG_CC_C_O 1002244584a44Smrg# --------------- 1002344584a44Smrg# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC 1002444584a44Smrg# to automatically call this. 1002544584a44SmrgAC_DEFUN([_AM_PROG_CC_C_O], 1002644584a44Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 1002744584a44SmrgAC_REQUIRE_AUX_FILE([compile])dnl 1002844584a44SmrgAC_LANG_PUSH([C])dnl 1002944584a44SmrgAC_CACHE_CHECK( 1003044584a44Smrg [whether $CC understands -c and -o together], 1003144584a44Smrg [am_cv_prog_cc_c_o], 1003244584a44Smrg [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) 1003344584a44Smrg # Make sure it works both with $CC and with simple cc. 1003444584a44Smrg # Following AC_PROG_CC_C_O, we do the test twice because some 1003544584a44Smrg # compilers refuse to overwrite an existing .o file with -o, 1003644584a44Smrg # though they will create one. 1003744584a44Smrg am_cv_prog_cc_c_o=yes 1003844584a44Smrg for am_i in 1 2; do 1003944584a44Smrg if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ 1004044584a44Smrg && test -f conftest2.$ac_objext; then 1004144584a44Smrg : OK 1004244584a44Smrg else 1004344584a44Smrg am_cv_prog_cc_c_o=no 1004444584a44Smrg break 1004544584a44Smrg fi 1004644584a44Smrg done 1004744584a44Smrg rm -f core conftest* 1004844584a44Smrg unset am_i]) 1004944584a44Smrgif test "$am_cv_prog_cc_c_o" != yes; then 1005044584a44Smrg # Losing compiler, so override with the script. 1005144584a44Smrg # FIXME: It is wrong to rewrite CC. 1005244584a44Smrg # But if we don't then we get into trouble of one sort or another. 1005344584a44Smrg # A longer-term fix would be to have automake use am__CC in this case, 1005444584a44Smrg # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 1005544584a44Smrg CC="$am_aux_dir/compile $CC" 1005644584a44Smrgfi 1005744584a44SmrgAC_LANG_POP([C])]) 1005844584a44Smrg 1005944584a44Smrg# For backward compatibility. 1006044584a44SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) 1006144584a44Smrg 1006244584a44Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 1006306c34b88Smrg# 1006444584a44Smrg# This file is free software; the Free Software Foundation 1006544584a44Smrg# gives unlimited permission to copy and/or distribute it, 1006644584a44Smrg# with or without modifications, as long as this notice is preserved. 1006706c34b88Smrg 1006844584a44Smrg# AM_RUN_LOG(COMMAND) 1006944584a44Smrg# ------------------- 1007044584a44Smrg# Run COMMAND, save the exit status in ac_status, and log it. 1007144584a44Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) 1007244584a44SmrgAC_DEFUN([AM_RUN_LOG], 1007344584a44Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD 1007444584a44Smrg ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD 1007544584a44Smrg ac_status=$? 1007644584a44Smrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1007744584a44Smrg (exit $ac_status); }]) 10078f1ee322dSmrg 1007944584a44Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 1008044584a44Smrg 1008144584a44Smrg# Copyright (C) 1996-2014 Free Software Foundation, Inc. 1008206c34b88Smrg# 1008344584a44Smrg# This file is free software; the Free Software Foundation 1008444584a44Smrg# gives unlimited permission to copy and/or distribute it, 1008544584a44Smrg# with or without modifications, as long as this notice is preserved. 10086f1ee322dSmrg 1008744584a44Smrg# AM_SANITY_CHECK 1008844584a44Smrg# --------------- 1008944584a44SmrgAC_DEFUN([AM_SANITY_CHECK], 1009044584a44Smrg[AC_MSG_CHECKING([whether build environment is sane]) 1009144584a44Smrg# Reject unsafe characters in $srcdir or the absolute working directory 1009244584a44Smrg# name. Accept space and tab only in the latter. 1009344584a44Smrgam_lf=' 1009444584a44Smrg' 1009544584a44Smrgcase `pwd` in 1009644584a44Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 1009744584a44Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 1009844584a44Smrgesac 1009944584a44Smrgcase $srcdir in 1010044584a44Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 1010144584a44Smrg AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; 1010244584a44Smrgesac 1010344584a44Smrg 1010444584a44Smrg# Do 'set' in a subshell so we don't clobber the current shell's 1010544584a44Smrg# arguments. Must try -L first in case configure is actually a 1010644584a44Smrg# symlink; some systems play weird games with the mod time of symlinks 1010744584a44Smrg# (eg FreeBSD returns the mod time of the symlink's containing 1010844584a44Smrg# directory). 1010944584a44Smrgif ( 1011044584a44Smrg am_has_slept=no 1011144584a44Smrg for am_try in 1 2; do 1011244584a44Smrg echo "timestamp, slept: $am_has_slept" > conftest.file 1011344584a44Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 1011444584a44Smrg if test "$[*]" = "X"; then 1011544584a44Smrg # -L didn't work. 1011644584a44Smrg set X `ls -t "$srcdir/configure" conftest.file` 1011744584a44Smrg fi 1011844584a44Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 1011944584a44Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 1012044584a44Smrg 1012144584a44Smrg # If neither matched, then we have a broken ls. This can happen 1012244584a44Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 1012344584a44Smrg # broken ls alias from the environment. This has actually 1012444584a44Smrg # happened. Such a system could not be considered "sane". 1012544584a44Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 1012644584a44Smrg alias in your environment]) 1012744584a44Smrg fi 1012844584a44Smrg if test "$[2]" = conftest.file || test $am_try -eq 2; then 1012944584a44Smrg break 1013044584a44Smrg fi 1013144584a44Smrg # Just in case. 1013244584a44Smrg sleep 1 1013344584a44Smrg am_has_slept=yes 1013444584a44Smrg done 1013544584a44Smrg test "$[2]" = conftest.file 1013644584a44Smrg ) 1013744584a44Smrgthen 1013844584a44Smrg # Ok. 1013944584a44Smrg : 1014006c34b88Smrgelse 1014144584a44Smrg AC_MSG_ERROR([newly created file is older than distributed files! 1014244584a44SmrgCheck your system clock]) 101433e256790Smrgfi 1014444584a44SmrgAC_MSG_RESULT([yes]) 1014544584a44Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and 1014644584a44Smrg# generated files are strictly newer. 1014744584a44Smrgam_sleep_pid= 1014844584a44Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then 1014944584a44Smrg ( sleep 1 ) & 1015044584a44Smrg am_sleep_pid=$! 1015106c34b88Smrgfi 1015244584a44SmrgAC_CONFIG_COMMANDS_PRE( 1015344584a44Smrg [AC_MSG_CHECKING([that generated files are newer than configure]) 1015444584a44Smrg if test -n "$am_sleep_pid"; then 1015544584a44Smrg # Hide warnings about reused PIDs. 1015644584a44Smrg wait $am_sleep_pid 2>/dev/null 1015706c34b88Smrg fi 1015844584a44Smrg AC_MSG_RESULT([done])]) 1015944584a44Smrgrm -f conftest.file 1016044584a44Smrg]) 1016137eb1ca1Smrg 1016244584a44Smrg# Copyright (C) 2009-2014 Free Software Foundation, Inc. 10163b789ec8aSmrg# 1016444584a44Smrg# This file is free software; the Free Software Foundation 1016544584a44Smrg# gives unlimited permission to copy and/or distribute it, 1016644584a44Smrg# with or without modifications, as long as this notice is preserved. 10167f1ee322dSmrg 1016844584a44Smrg# AM_SILENT_RULES([DEFAULT]) 1016944584a44Smrg# -------------------------- 1017044584a44Smrg# Enable less verbose build rules; with the default set to DEFAULT 1017144584a44Smrg# ("yes" being less verbose, "no" or empty being verbose). 1017244584a44SmrgAC_DEFUN([AM_SILENT_RULES], 1017344584a44Smrg[AC_ARG_ENABLE([silent-rules], [dnl 1017444584a44SmrgAS_HELP_STRING( 1017544584a44Smrg [--enable-silent-rules], 1017644584a44Smrg [less verbose build output (undo: "make V=1")]) 1017744584a44SmrgAS_HELP_STRING( 1017844584a44Smrg [--disable-silent-rules], 1017944584a44Smrg [verbose build output (undo: "make V=0")])dnl 1018044584a44Smrg]) 1018144584a44Smrgcase $enable_silent_rules in @%:@ ((( 1018244584a44Smrg yes) AM_DEFAULT_VERBOSITY=0;; 1018344584a44Smrg no) AM_DEFAULT_VERBOSITY=1;; 1018444584a44Smrg *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 1018544584a44Smrgesac 1018644584a44Smrgdnl 1018744584a44Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep) 1018844584a44Smrgdnl do not support nested variable expansions. 1018944584a44Smrgdnl See automake bug#9928 and bug#10237. 1019044584a44Smrgam_make=${MAKE-make} 1019144584a44SmrgAC_CACHE_CHECK([whether $am_make supports nested variables], 1019244584a44Smrg [am_cv_make_support_nested_variables], 1019344584a44Smrg [if AS_ECHO([['TRUE=$(BAR$(V)) 1019444584a44SmrgBAR0=false 1019544584a44SmrgBAR1=true 1019644584a44SmrgV=1 1019744584a44Smrgam__doit: 1019844584a44Smrg @$(TRUE) 1019944584a44Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then 1020044584a44Smrg am_cv_make_support_nested_variables=yes 1020106c34b88Smrgelse 1020244584a44Smrg am_cv_make_support_nested_variables=no 1020306c34b88Smrgfi]) 1020444584a44Smrgif test $am_cv_make_support_nested_variables = yes; then 1020544584a44Smrg dnl Using '$V' instead of '$(V)' breaks IRIX make. 1020644584a44Smrg AM_V='$(V)' 1020744584a44Smrg AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 1020844584a44Smrgelse 1020944584a44Smrg AM_V=$AM_DEFAULT_VERBOSITY 1021044584a44Smrg AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 1021144584a44Smrgfi 1021244584a44SmrgAC_SUBST([AM_V])dnl 1021344584a44SmrgAM_SUBST_NOTMAKE([AM_V])dnl 1021444584a44SmrgAC_SUBST([AM_DEFAULT_V])dnl 1021544584a44SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl 1021644584a44SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 1021744584a44SmrgAM_BACKSLASH='\' 1021844584a44SmrgAC_SUBST([AM_BACKSLASH])dnl 1021944584a44Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 1022044584a44Smrg]) 1022137eb1ca1Smrg 1022244584a44Smrg# Copyright (C) 2001-2014 Free Software Foundation, Inc. 1022306c34b88Smrg# 1022444584a44Smrg# This file is free software; the Free Software Foundation 1022544584a44Smrg# gives unlimited permission to copy and/or distribute it, 1022644584a44Smrg# with or without modifications, as long as this notice is preserved. 1022737eb1ca1Smrg 1022844584a44Smrg# AM_PROG_INSTALL_STRIP 1022944584a44Smrg# --------------------- 1023044584a44Smrg# One issue with vendor 'install' (even GNU) is that you can't 1023144584a44Smrg# specify the program used to strip binaries. This is especially 1023244584a44Smrg# annoying in cross-compiling environments, where the build's strip 1023344584a44Smrg# is unlikely to handle the host's binaries. 1023444584a44Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 1023544584a44Smrg# always use install-sh in "make install-strip", and initialize 1023644584a44Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 1023744584a44SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 1023844584a44Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 1023944584a44Smrg# Installed binaries are usually stripped using 'strip' when the user 1024044584a44Smrg# run "make install-strip". However 'strip' might not be the right 1024144584a44Smrg# tool to use in cross-compilation environments, therefore Automake 1024244584a44Smrg# will honor the 'STRIP' environment variable to overrule this program. 1024344584a44Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'. 1024444584a44Smrgif test "$cross_compiling" != no; then 1024544584a44Smrg AC_CHECK_TOOL([STRIP], [strip], :) 1024606c34b88Smrgfi 1024744584a44SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 1024844584a44SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 1024937eb1ca1Smrg 1025044584a44Smrg# Copyright (C) 2006-2014 Free Software Foundation, Inc. 1025106c34b88Smrg# 1025244584a44Smrg# This file is free software; the Free Software Foundation 1025344584a44Smrg# gives unlimited permission to copy and/or distribute it, 1025444584a44Smrg# with or without modifications, as long as this notice is preserved. 1025544584a44Smrg 1025644584a44Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 1025744584a44Smrg# --------------------------- 1025844584a44Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 1025944584a44Smrg# This macro is traced by Automake. 1026044584a44SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 1026144584a44Smrg 1026244584a44Smrg# AM_SUBST_NOTMAKE(VARIABLE) 1026344584a44Smrg# -------------------------- 1026444584a44Smrg# Public sister of _AM_SUBST_NOTMAKE. 1026544584a44SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 1026644584a44Smrg 1026744584a44Smrg# Check how to create a tarball. -*- Autoconf -*- 1026844584a44Smrg 1026944584a44Smrg# Copyright (C) 2004-2014 Free Software Foundation, Inc. 1027006c34b88Smrg# 1027144584a44Smrg# This file is free software; the Free Software Foundation 1027244584a44Smrg# gives unlimited permission to copy and/or distribute it, 1027344584a44Smrg# with or without modifications, as long as this notice is preserved. 10274f1ee322dSmrg 1027544584a44Smrg# _AM_PROG_TAR(FORMAT) 1027644584a44Smrg# -------------------- 1027744584a44Smrg# Check how to create a tarball in format FORMAT. 1027844584a44Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'. 1027989069ce9Smrg# 1028044584a44Smrg# Substitute a variable $(am__tar) that is a command 1028144584a44Smrg# writing to stdout a FORMAT-tarball containing the directory 1028244584a44Smrg# $tardir. 1028344584a44Smrg# tardir=directory && $(am__tar) > result.tar 1028489069ce9Smrg# 1028544584a44Smrg# Substitute a variable $(am__untar) that extract such 1028644584a44Smrg# a tarball read from stdin. 1028744584a44Smrg# $(am__untar) < result.tar 1028889069ce9Smrg# 1028944584a44SmrgAC_DEFUN([_AM_PROG_TAR], 1029044584a44Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 1029144584a44Smrg# in the wild :-( We should find a proper way to deprecate it ... 1029244584a44SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 1029306c34b88Smrg 1029444584a44Smrg# We'll loop over all known methods to create a tar archive until one works. 1029544584a44Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 10296dc9477beSmrg 1029744584a44Smrgm4_if([$1], [v7], 1029844584a44Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 10299dc9477beSmrg 1030044584a44Smrg [m4_case([$1], 1030144584a44Smrg [ustar], 1030244584a44Smrg [# The POSIX 1988 'ustar' format is defined with fixed-size fields. 1030344584a44Smrg # There is notably a 21 bits limit for the UID and the GID. In fact, 1030444584a44Smrg # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 1030544584a44Smrg # and bug#13588). 1030644584a44Smrg am_max_uid=2097151 # 2^21 - 1 1030744584a44Smrg am_max_gid=$am_max_uid 1030844584a44Smrg # The $UID and $GID variables are not portable, so we need to resort 1030944584a44Smrg # to the POSIX-mandated id(1) utility. Errors in the 'id' calls 1031044584a44Smrg # below are definitely unexpected, so allow the users to see them 1031144584a44Smrg # (that is, avoid stderr redirection). 1031244584a44Smrg am_uid=`id -u || echo unknown` 1031344584a44Smrg am_gid=`id -g || echo unknown` 1031444584a44Smrg AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) 1031544584a44Smrg if test $am_uid -le $am_max_uid; then 1031644584a44Smrg AC_MSG_RESULT([yes]) 1031744584a44Smrg else 1031844584a44Smrg AC_MSG_RESULT([no]) 1031944584a44Smrg _am_tools=none 1032044584a44Smrg fi 1032144584a44Smrg AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) 1032244584a44Smrg if test $am_gid -le $am_max_gid; then 1032344584a44Smrg AC_MSG_RESULT([yes]) 1032444584a44Smrg else 1032544584a44Smrg AC_MSG_RESULT([no]) 1032644584a44Smrg _am_tools=none 1032744584a44Smrg fi], 10328dc9477beSmrg 1032944584a44Smrg [pax], 1033044584a44Smrg [], 10331dc9477beSmrg 1033244584a44Smrg [m4_fatal([Unknown tar format])]) 10333dc9477beSmrg 1033444584a44Smrg AC_MSG_CHECKING([how to create a $1 tar archive]) 10335dc9477beSmrg 1033644584a44Smrg # Go ahead even if we have the value already cached. We do so because we 1033744584a44Smrg # need to set the values for the 'am__tar' and 'am__untar' variables. 1033844584a44Smrg _am_tools=${am_cv_prog_tar_$1-$_am_tools} 10339dc9477beSmrg 1034044584a44Smrg for _am_tool in $_am_tools; do 1034144584a44Smrg case $_am_tool in 1034244584a44Smrg gnutar) 1034344584a44Smrg for _am_tar in tar gnutar gtar; do 1034444584a44Smrg AM_RUN_LOG([$_am_tar --version]) && break 1034544584a44Smrg done 1034644584a44Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 1034744584a44Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 1034844584a44Smrg am__untar="$_am_tar -xf -" 1034944584a44Smrg ;; 1035044584a44Smrg plaintar) 1035144584a44Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 1035244584a44Smrg # ustar tarball either. 1035344584a44Smrg (tar --version) >/dev/null 2>&1 && continue 1035444584a44Smrg am__tar='tar chf - "$$tardir"' 1035544584a44Smrg am__tar_='tar chf - "$tardir"' 1035644584a44Smrg am__untar='tar xf -' 1035744584a44Smrg ;; 1035844584a44Smrg pax) 1035944584a44Smrg am__tar='pax -L -x $1 -w "$$tardir"' 1036044584a44Smrg am__tar_='pax -L -x $1 -w "$tardir"' 1036144584a44Smrg am__untar='pax -r' 1036244584a44Smrg ;; 1036344584a44Smrg cpio) 1036444584a44Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 1036544584a44Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 1036644584a44Smrg am__untar='cpio -i -H $1 -d' 1036744584a44Smrg ;; 1036844584a44Smrg none) 1036944584a44Smrg am__tar=false 1037044584a44Smrg am__tar_=false 1037144584a44Smrg am__untar=false 1037244584a44Smrg ;; 1037344584a44Smrg esac 10374dc9477beSmrg 1037544584a44Smrg # If the value was cached, stop now. We just wanted to have am__tar 1037644584a44Smrg # and am__untar set. 1037744584a44Smrg test -n "${am_cv_prog_tar_$1}" && break 10378dc9477beSmrg 1037944584a44Smrg # tar/untar a dummy directory, and stop if the command works. 1038044584a44Smrg rm -rf conftest.dir 1038144584a44Smrg mkdir conftest.dir 1038244584a44Smrg echo GrepMe > conftest.dir/file 1038344584a44Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 1038444584a44Smrg rm -rf conftest.dir 1038544584a44Smrg if test -s conftest.tar; then 1038644584a44Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 1038744584a44Smrg AM_RUN_LOG([cat conftest.dir/file]) 1038844584a44Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 1038944584a44Smrg fi 1039044584a44Smrg done 1039144584a44Smrg rm -rf conftest.dir 10392dc9477beSmrg 1039344584a44Smrg AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 1039444584a44Smrg AC_MSG_RESULT([$am_cv_prog_tar_$1])]) 10395dc9477beSmrg 1039644584a44SmrgAC_SUBST([am__tar]) 1039744584a44SmrgAC_SUBST([am__untar]) 1039844584a44Smrg]) # _AM_PROG_TAR 10399dc9477beSmrg 1040044584a44Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 1040144584a44Smrgdnl 1040244584a44Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 1040344584a44Smrgdnl 1040444584a44Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 1040544584a44Smrgdnl copy of this software and associated documentation files (the "Software"), 1040644584a44Smrgdnl to deal in the Software without restriction, including without limitation 1040744584a44Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 1040844584a44Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 1040944584a44Smrgdnl Software is furnished to do so, subject to the following conditions: 1041044584a44Smrgdnl 1041144584a44Smrgdnl The above copyright notice and this permission notice (including the next 1041244584a44Smrgdnl paragraph) shall be included in all copies or substantial portions of the 1041344584a44Smrgdnl Software. 1041444584a44Smrgdnl 1041544584a44Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1041644584a44Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1041744584a44Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 1041844584a44Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1041944584a44Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 1042044584a44Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 1042144584a44Smrgdnl DEALINGS IN THE SOFTWARE. 10422dc9477beSmrg 1042344584a44Smrg# XORG_MACROS_VERSION(required-version) 1042444584a44Smrg# ------------------------------------- 10425dc9477beSmrg# Minimum version: 1.1.0 10426dc9477beSmrg# 1042744584a44Smrg# If you're using a macro added in Version 1.1 or newer, include this in 1042844584a44Smrg# your configure.ac with the minimum required version, such as: 1042944584a44Smrg# XORG_MACROS_VERSION(1.1) 10430dc9477beSmrg# 1043144584a44Smrg# To ensure that this macro is defined, also add: 1043244584a44Smrg# m4_ifndef([XORG_MACROS_VERSION], 1043344584a44Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 10434dc9477beSmrg# 10435dc9477beSmrg# 1043644584a44Smrg# See the "minimum version" comment for each macro you use to see what 1043744584a44Smrg# version you require. 1043844584a44Smrgm4_defun([XORG_MACROS_VERSION],[ 1043944584a44Smrgm4_define([vers_have], [1.19.0]) 1044044584a44Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 1044144584a44Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 1044244584a44Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 1044344584a44Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 1044444584a44Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 1044544584a44Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 1044644584a44Smrgm4_undefine([vers_have]) 1044744584a44Smrgm4_undefine([maj_have]) 1044844584a44Smrgm4_undefine([maj_needed]) 1044944584a44Smrg]) # XORG_MACROS_VERSION 10450dc9477beSmrg 1045144584a44Smrg# XORG_PROG_RAWCPP() 1045244584a44Smrg# ------------------ 1045344584a44Smrg# Minimum version: 1.0.0 1045444584a44Smrg# 1045544584a44Smrg# Find cpp program and necessary flags for use in pre-processing text files 1045644584a44Smrg# such as man pages and config files 1045744584a44SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 1045844584a44SmrgAC_REQUIRE([AC_PROG_CPP]) 1045944584a44SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 1046044584a44Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 10461dc9477beSmrg 1046244584a44Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 1046344584a44Smrg# which is not the best choice for supporting other OS'es, but covers most 1046444584a44Smrg# of the ones we need for now. 1046544584a44SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 1046644584a44SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 1046744584a44Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1046844584a44Smrg AC_MSG_RESULT([no]) 10469dc9477beSmrgelse 1047044584a44Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1047144584a44Smrg RAWCPPFLAGS=-undef 1047244584a44Smrg AC_MSG_RESULT([yes]) 1047344584a44Smrg # under Cygwin unix is still defined even with -undef 1047444584a44Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 1047544584a44Smrg RAWCPPFLAGS="-undef -ansi" 1047644584a44Smrg AC_MSG_RESULT([yes, with -ansi]) 1047744584a44Smrg else 1047844584a44Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 1047944584a44Smrg fi 10480dc9477beSmrgfi 1048144584a44Smrgrm -f conftest.$ac_ext 10482dc9477beSmrg 1048344584a44SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 1048444584a44SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 1048544584a44Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1048644584a44Smrg AC_MSG_RESULT([no]) 1048744584a44Smrgelse 1048844584a44Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 1048944584a44Smrg TRADITIONALCPPFLAGS="-traditional" 1049044584a44Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 1049144584a44Smrg AC_MSG_RESULT([yes]) 1049244584a44Smrg else 1049344584a44Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 1049444584a44Smrg fi 10495dc9477beSmrgfi 1049644584a44Smrgrm -f conftest.$ac_ext 1049744584a44SmrgAC_SUBST(RAWCPPFLAGS) 1049844584a44SmrgAC_SUBST(TRADITIONALCPPFLAGS) 1049944584a44Smrg]) # XORG_PROG_RAWCPP 10500dc9477beSmrg 1050144584a44Smrg# XORG_MANPAGE_SECTIONS() 1050244584a44Smrg# ----------------------- 1050344584a44Smrg# Minimum version: 1.0.0 1050444584a44Smrg# 1050544584a44Smrg# Determine which sections man pages go in for the different man page types 1050644584a44Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 1050744584a44Smrg# Not sure if there's any better way than just hardcoding by OS name. 1050844584a44Smrg# Override default settings by setting environment variables 1050944584a44Smrg# Added MAN_SUBSTS in version 1.8 1051044584a44Smrg# Added AC_PROG_SED in version 1.8 10511dc9477beSmrg 1051244584a44SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 1051344584a44SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1051444584a44SmrgAC_REQUIRE([AC_PROG_SED]) 10515dc9477beSmrg 1051644584a44Smrgif test x$APP_MAN_SUFFIX = x ; then 1051744584a44Smrg APP_MAN_SUFFIX=1 1051844584a44Smrgfi 1051944584a44Smrgif test x$APP_MAN_DIR = x ; then 1052044584a44Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 1052144584a44Smrgfi 10522dc9477beSmrg 1052344584a44Smrgif test x$LIB_MAN_SUFFIX = x ; then 1052444584a44Smrg LIB_MAN_SUFFIX=3 1052544584a44Smrgfi 1052644584a44Smrgif test x$LIB_MAN_DIR = x ; then 1052744584a44Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 1052844584a44Smrgfi 10529dc9477beSmrg 1053044584a44Smrgif test x$FILE_MAN_SUFFIX = x ; then 1053144584a44Smrg case $host_os in 1053244584a44Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 1053344584a44Smrg *) FILE_MAN_SUFFIX=5 ;; 1053444584a44Smrg esac 1053544584a44Smrgfi 1053644584a44Smrgif test x$FILE_MAN_DIR = x ; then 1053744584a44Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 10538dc9477beSmrgfi 10539dc9477beSmrg 1054044584a44Smrgif test x$MISC_MAN_SUFFIX = x ; then 1054144584a44Smrg case $host_os in 1054244584a44Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 1054344584a44Smrg *) MISC_MAN_SUFFIX=7 ;; 1054444584a44Smrg esac 1054544584a44Smrgfi 1054644584a44Smrgif test x$MISC_MAN_DIR = x ; then 1054744584a44Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 1054844584a44Smrgfi 10549dc9477beSmrg 1055044584a44Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 1055144584a44Smrg case $host_os in 1055244584a44Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 1055344584a44Smrg *) DRIVER_MAN_SUFFIX=4 ;; 1055444584a44Smrg esac 1055544584a44Smrgfi 1055644584a44Smrgif test x$DRIVER_MAN_DIR = x ; then 1055744584a44Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 1055844584a44Smrgfi 10559dc9477beSmrg 1056044584a44Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 1056144584a44Smrg case $host_os in 1056244584a44Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 1056344584a44Smrg *) ADMIN_MAN_SUFFIX=8 ;; 1056444584a44Smrg esac 1056544584a44Smrgfi 1056644584a44Smrgif test x$ADMIN_MAN_DIR = x ; then 1056744584a44Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 1056844584a44Smrgfi 10569dc9477beSmrg 10570dc9477beSmrg 1057144584a44SmrgAC_SUBST([APP_MAN_SUFFIX]) 1057244584a44SmrgAC_SUBST([LIB_MAN_SUFFIX]) 1057344584a44SmrgAC_SUBST([FILE_MAN_SUFFIX]) 1057444584a44SmrgAC_SUBST([MISC_MAN_SUFFIX]) 1057544584a44SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 1057644584a44SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 1057744584a44SmrgAC_SUBST([APP_MAN_DIR]) 1057844584a44SmrgAC_SUBST([LIB_MAN_DIR]) 1057944584a44SmrgAC_SUBST([FILE_MAN_DIR]) 1058044584a44SmrgAC_SUBST([MISC_MAN_DIR]) 1058144584a44SmrgAC_SUBST([DRIVER_MAN_DIR]) 1058244584a44SmrgAC_SUBST([ADMIN_MAN_DIR]) 10583dc9477beSmrg 1058444584a44SmrgXORG_MAN_PAGE="X Version 11" 1058544584a44SmrgAC_SUBST([XORG_MAN_PAGE]) 1058644584a44SmrgMAN_SUBSTS="\ 1058744584a44Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1058844584a44Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 1058944584a44Smrg -e 's|__xservername__|Xorg|g' \ 1059044584a44Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 1059144584a44Smrg -e 's|__xorgconfdir__|xorg.conf.d|g' \ 1059244584a44Smrg -e 's|__projectroot__|\$(prefix)|g' \ 1059344584a44Smrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 1059444584a44Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 1059544584a44Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 1059644584a44Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 1059744584a44Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 1059844584a44Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 1059944584a44Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 1060044584a44SmrgAC_SUBST([MAN_SUBSTS]) 10601dc9477beSmrg 1060244584a44Smrg]) # XORG_MANPAGE_SECTIONS 10603dc9477beSmrg 1060444584a44Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 1060544584a44Smrg# ------------------------ 1060644584a44Smrg# Minimum version: 1.7.0 1060744584a44Smrg# 1060844584a44Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 1060944584a44Smrg# provided by xorg-sgml-doctools, if installed. 1061044584a44SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 1061144584a44SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 1061244584a44SmrgXORG_SGML_PATH= 1061344584a44SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 1061444584a44Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 1061544584a44Smrg [m4_ifval([$1],[:], 1061644584a44Smrg [if test x"$cross_compiling" != x"yes" ; then 1061744584a44Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 1061844584a44Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 1061944584a44Smrg fi]) 1062044584a44Smrg ]) 10621dc9477beSmrg 1062244584a44Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 1062344584a44Smrg# the path and the name of the doc stylesheet 1062444584a44Smrgif test "x$XORG_SGML_PATH" != "x" ; then 1062544584a44Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 1062644584a44Smrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 1062744584a44Smrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 1062844584a44Smrgelse 1062944584a44Smrg AC_MSG_RESULT([no]) 10630dc9477beSmrgfi 10631dc9477beSmrg 1063244584a44SmrgAC_SUBST(XORG_SGML_PATH) 1063344584a44SmrgAC_SUBST(STYLESHEET_SRCDIR) 1063444584a44SmrgAC_SUBST(XSL_STYLESHEET) 1063544584a44SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 1063644584a44Smrg]) # XORG_CHECK_SGML_DOCTOOLS 10637dc9477beSmrg 1063844584a44Smrg# XORG_CHECK_LINUXDOC 1063944584a44Smrg# ------------------- 1064044584a44Smrg# Minimum version: 1.0.0 1064144584a44Smrg# 1064244584a44Smrg# Defines the variable MAKE_TEXT if the necessary tools and 1064344584a44Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 1064444584a44Smrg# Whether or not the necessary tools and files are found can be checked 1064544584a44Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 1064644584a44SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 1064744584a44SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 1064844584a44SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 10649dc9477beSmrg 1065044584a44SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 10651dc9477beSmrg 1065244584a44SmrgAC_MSG_CHECKING([whether to build documentation]) 10653dc9477beSmrg 1065444584a44Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 1065544584a44Smrg BUILDDOC=yes 1065644584a44Smrgelse 1065744584a44Smrg BUILDDOC=no 1065844584a44Smrgfi 10659dc9477beSmrg 1066044584a44SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 10661dc9477beSmrg 1066244584a44SmrgAC_MSG_RESULT([$BUILDDOC]) 10663dc9477beSmrg 1066444584a44SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 1066544584a44Smrg 1066644584a44Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 1066744584a44Smrg BUILDPDFDOC=yes 10668dc9477beSmrgelse 1066944584a44Smrg BUILDPDFDOC=no 10670dc9477beSmrgfi 10671dc9477beSmrg 1067244584a44SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 10673dc9477beSmrg 1067444584a44SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10675dc9477beSmrg 1067644584a44SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 1067744584a44SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 1067844584a44SmrgMAKE_PDF="$PS2PDF" 1067944584a44SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 10680dc9477beSmrg 1068144584a44SmrgAC_SUBST(MAKE_TEXT) 1068244584a44SmrgAC_SUBST(MAKE_PS) 1068344584a44SmrgAC_SUBST(MAKE_PDF) 1068444584a44SmrgAC_SUBST(MAKE_HTML) 1068544584a44Smrg]) # XORG_CHECK_LINUXDOC 10686dc9477beSmrg 1068744584a44Smrg# XORG_CHECK_DOCBOOK 1068844584a44Smrg# ------------------- 1068944584a44Smrg# Minimum version: 1.0.0 1069044584a44Smrg# 1069144584a44Smrg# Checks for the ability to build output formats from SGML DocBook source. 1069244584a44Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 1069344584a44Smrg# indicates whether the necessary tools and files are found and, if set, 1069444584a44Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 1069544584a44SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 1069644584a44SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10697dc9477beSmrg 1069844584a44SmrgBUILDTXTDOC=no 1069944584a44SmrgBUILDPDFDOC=no 1070044584a44SmrgBUILDPSDOC=no 1070144584a44SmrgBUILDHTMLDOC=no 1070244584a44Smrg 1070344584a44SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 1070444584a44SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 1070544584a44SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 1070644584a44SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 1070744584a44Smrg 1070844584a44SmrgAC_MSG_CHECKING([whether to build text documentation]) 1070944584a44Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 1071044584a44Smrg test x$BUILD_TXTDOC != xno; then 1071144584a44Smrg BUILDTXTDOC=yes 10712dc9477beSmrgfi 1071344584a44SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 1071444584a44SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 10715dc9477beSmrg 1071644584a44SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 1071744584a44Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 1071844584a44Smrg test x$BUILD_PDFDOC != xno; then 1071944584a44Smrg BUILDPDFDOC=yes 1072044584a44Smrgfi 1072144584a44SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 1072244584a44SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 10723dc9477beSmrg 1072444584a44SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 1072544584a44Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 1072644584a44Smrg test x$BUILD_PSDOC != xno; then 1072744584a44Smrg BUILDPSDOC=yes 1072844584a44Smrgfi 1072944584a44SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 1073044584a44SmrgAC_MSG_RESULT([$BUILDPSDOC]) 1073144584a44Smrg 1073244584a44SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 1073344584a44Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 1073444584a44Smrg test x$BUILD_HTMLDOC != xno; then 1073544584a44Smrg BUILDHTMLDOC=yes 1073644584a44Smrgfi 1073744584a44SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 1073844584a44SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 1073944584a44Smrg 1074044584a44SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 1074144584a44SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 1074244584a44SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 1074344584a44SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 1074444584a44Smrg 1074544584a44SmrgAC_SUBST(MAKE_TEXT) 1074644584a44SmrgAC_SUBST(MAKE_PS) 1074744584a44SmrgAC_SUBST(MAKE_PDF) 1074844584a44SmrgAC_SUBST(MAKE_HTML) 1074944584a44Smrg]) # XORG_CHECK_DOCBOOK 1075044584a44Smrg 1075144584a44Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 1075244584a44Smrg# ---------------- 1075344584a44Smrg# Minimum version: 1.5.0 1075444584a44Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10755dc9477beSmrg# 1075644584a44Smrg# Documentation tools are not always available on all platforms and sometimes 1075744584a44Smrg# not at the appropriate level. This macro enables a module to test for the 1075844584a44Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1075944584a44Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 1076044584a44Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 1076144584a44Smrg# --with-xmlto assumes 'auto'. 10762dc9477beSmrg# 1076344584a44Smrg# Interface to module: 1076444584a44Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 1076544584a44Smrg# XMLTO: returns the path of the xmlto program found 1076644584a44Smrg# returns the path set by the user in the environment 1076744584a44Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 1076844584a44Smrg# 'no' user instructs the module not to use xmlto 10769dc9477beSmrg# 1077044584a44Smrg# Added in version 1.10.0 1077144584a44Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 1077244584a44Smrg# xmlto for text output requires either lynx, links, or w3m browsers 10773dc9477beSmrg# 1077444584a44Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10775dc9477beSmrg# 1077644584a44SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 1077744584a44SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 1077844584a44Smrgm4_define([_defopt], m4_default([$2], [auto])) 1077944584a44SmrgAC_ARG_WITH(xmlto, 1078044584a44Smrg AS_HELP_STRING([--with-xmlto], 1078144584a44Smrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 1078244584a44Smrg [use_xmlto=$withval], [use_xmlto=]_defopt) 1078344584a44Smrgm4_undefine([_defopt]) 10784dc9477beSmrg 1078544584a44Smrgif test "x$use_xmlto" = x"auto"; then 1078644584a44Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1078744584a44Smrg if test "x$XMLTO" = "x"; then 1078844584a44Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 1078944584a44Smrg have_xmlto=no 1079044584a44Smrg else 1079144584a44Smrg have_xmlto=yes 1079244584a44Smrg fi 1079344584a44Smrgelif test "x$use_xmlto" = x"yes" ; then 1079444584a44Smrg AC_PATH_PROG([XMLTO], [xmlto]) 1079544584a44Smrg if test "x$XMLTO" = "x"; then 1079644584a44Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 1079744584a44Smrg fi 1079844584a44Smrg have_xmlto=yes 1079944584a44Smrgelif test "x$use_xmlto" = x"no" ; then 1080044584a44Smrg if test "x$XMLTO" != "x"; then 1080144584a44Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 1080244584a44Smrg fi 1080344584a44Smrg have_xmlto=no 1080444584a44Smrgelse 1080544584a44Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10806dc9477beSmrgfi 10807dc9477beSmrg 1080844584a44Smrg# Test for a minimum version of xmlto, if provided. 1080944584a44Smrgm4_ifval([$1], 1081044584a44Smrg[if test "$have_xmlto" = yes; then 1081144584a44Smrg # scrape the xmlto version 1081244584a44Smrg AC_MSG_CHECKING([the xmlto version]) 1081344584a44Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 1081444584a44Smrg AC_MSG_RESULT([$xmlto_version]) 1081544584a44Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 1081644584a44Smrg [if test "x$use_xmlto" = xauto; then 1081744584a44Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 1081844584a44Smrg have_xmlto=no 1081944584a44Smrg else 1082044584a44Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 1082144584a44Smrg fi]) 1082244584a44Smrgfi]) 1082344584a44Smrg 1082444584a44Smrg# Test for the ability of xmlto to generate a text target 1082544584a44Smrghave_xmlto_text=no 1082644584a44Smrgcat > conftest.xml << "EOF" 1082744584a44SmrgEOF 1082844584a44SmrgAS_IF([test "$have_xmlto" = yes], 1082944584a44Smrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 1083044584a44Smrg [have_xmlto_text=yes], 1083144584a44Smrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 1083244584a44Smrgrm -f conftest.xml 1083344584a44SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 1083444584a44SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 1083544584a44Smrg]) # XORG_WITH_XMLTO 1083644584a44Smrg 1083744584a44Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 1083844584a44Smrg# -------------------------------------------- 1083944584a44Smrg# Minimum version: 1.12.0 1084044584a44Smrg# Minimum version for optional DEFAULT argument: 1.12.0 10841dc9477beSmrg# 1084244584a44Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 1084344584a44Smrg# XML-based language used for the transformation of XML documents. 1084444584a44Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 1084544584a44Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 1084644584a44Smrg# The XSLT processor is often used as a standalone tool for transformations. 1084744584a44Smrg# It should not be assumed that this tool is used only to work with documnetation. 1084844584a44Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10849dc9477beSmrg# 1085044584a44Smrg# Interface to module: 1085144584a44Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 1085244584a44Smrg# XSLTPROC: returns the path of the xsltproc program found 1085344584a44Smrg# returns the path set by the user in the environment 1085444584a44Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 1085544584a44Smrg# 'no' user instructs the module not to use xsltproc 1085644584a44Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no 10857dc9477beSmrg# 1085844584a44Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10859dc9477beSmrg# 1086044584a44SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 1086144584a44SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1086244584a44Smrg# Preserves the interface, should it be implemented later 1086344584a44Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 1086444584a44Smrgm4_define([_defopt], m4_default([$2], [auto])) 1086544584a44SmrgAC_ARG_WITH(xsltproc, 1086644584a44Smrg AS_HELP_STRING([--with-xsltproc], 1086744584a44Smrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 1086844584a44Smrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 1086944584a44Smrgm4_undefine([_defopt]) 10870dc9477beSmrg 1087144584a44Smrgif test "x$use_xsltproc" = x"auto"; then 1087244584a44Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1087344584a44Smrg if test "x$XSLTPROC" = "x"; then 1087444584a44Smrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 1087544584a44Smrg have_xsltproc=no 1087644584a44Smrg else 1087744584a44Smrg have_xsltproc=yes 1087844584a44Smrg fi 1087944584a44Smrgelif test "x$use_xsltproc" = x"yes" ; then 1088044584a44Smrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 1088144584a44Smrg if test "x$XSLTPROC" = "x"; then 1088244584a44Smrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 1088344584a44Smrg fi 1088444584a44Smrg have_xsltproc=yes 1088544584a44Smrgelif test "x$use_xsltproc" = x"no" ; then 1088644584a44Smrg if test "x$XSLTPROC" != "x"; then 1088744584a44Smrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 1088844584a44Smrg fi 1088944584a44Smrg have_xsltproc=no 1089044584a44Smrgelse 1089144584a44Smrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 1089244584a44Smrgfi 10893dc9477beSmrg 1089444584a44SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 1089544584a44Smrg]) # XORG_WITH_XSLTPROC 1089644584a44Smrg 1089744584a44Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1089844584a44Smrg# ---------------------------------------- 1089944584a44Smrg# Minimum version: 1.15.0 10900dc9477beSmrg# 1090144584a44Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1090244584a44Smrg# scanning arbitrary text files, extracting information from those text files, 1090344584a44Smrg# and printing reports based on that information. 10904dc9477beSmrg# 1090544584a44Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 10906dc9477beSmrg# 1090744584a44Smrg# Interface to module: 1090844584a44Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1090944584a44Smrg# PERL: returns the path of the perl program found 1091044584a44Smrg# returns the path set by the user in the environment 1091144584a44Smrg# --with-perl: 'yes' user instructs the module to use perl 1091244584a44Smrg# 'no' user instructs the module not to use perl 1091344584a44Smrg# have_perl: returns yes if perl found in PATH or no 10914dc9477beSmrg# 1091544584a44Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1091644584a44Smrg# 1091744584a44SmrgAC_DEFUN([XORG_WITH_PERL],[ 1091844584a44SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1091944584a44Smrg# Preserves the interface, should it be implemented later 1092044584a44Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1092144584a44Smrgm4_define([_defopt], m4_default([$2], [auto])) 1092244584a44SmrgAC_ARG_WITH(perl, 1092344584a44Smrg AS_HELP_STRING([--with-perl], 1092444584a44Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1092544584a44Smrg [use_perl=$withval], [use_perl=]_defopt) 1092644584a44Smrgm4_undefine([_defopt]) 10927dc9477beSmrg 1092844584a44Smrgif test "x$use_perl" = x"auto"; then 1092944584a44Smrg AC_PATH_PROG([PERL], [perl]) 1093044584a44Smrg if test "x$PERL" = "x"; then 1093144584a44Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1093244584a44Smrg have_perl=no 1093344584a44Smrg else 1093444584a44Smrg have_perl=yes 1093544584a44Smrg fi 1093644584a44Smrgelif test "x$use_perl" = x"yes" ; then 1093744584a44Smrg AC_PATH_PROG([PERL], [perl]) 1093844584a44Smrg if test "x$PERL" = "x"; then 1093944584a44Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1094044584a44Smrg fi 1094144584a44Smrg have_perl=yes 1094244584a44Smrgelif test "x$use_perl" = x"no" ; then 1094344584a44Smrg if test "x$PERL" != "x"; then 1094444584a44Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1094544584a44Smrg fi 1094644584a44Smrg have_perl=no 1094744584a44Smrgelse 1094844584a44Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1094944584a44Smrgfi 10950dc9477beSmrg 1095144584a44SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1095244584a44Smrg]) # XORG_WITH_PERL 10953dc9477beSmrg 1095444584a44Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 1095544584a44Smrg# ---------------- 1095644584a44Smrg# Minimum version: 1.5.0 1095744584a44Smrg# Minimum version for optional DEFAULT argument: 1.11.0 10958dc9477beSmrg# 1095944584a44Smrg# Documentation tools are not always available on all platforms and sometimes 1096044584a44Smrg# not at the appropriate level. This macro enables a module to test for the 1096144584a44Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1096244584a44Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 1096344584a44Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 1096444584a44Smrg# --with-asciidoc assumes 'auto'. 10965dc9477beSmrg# 1096644584a44Smrg# Interface to module: 1096744584a44Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 1096844584a44Smrg# ASCIIDOC: returns the path of the asciidoc program found 1096944584a44Smrg# returns the path set by the user in the environment 1097044584a44Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 1097144584a44Smrg# 'no' user instructs the module not to use asciidoc 10972dc9477beSmrg# 1097344584a44Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10974dc9477beSmrg# 1097544584a44SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 1097644584a44SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 1097744584a44Smrgm4_define([_defopt], m4_default([$2], [auto])) 1097844584a44SmrgAC_ARG_WITH(asciidoc, 1097944584a44Smrg AS_HELP_STRING([--with-asciidoc], 1098044584a44Smrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 1098144584a44Smrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 1098244584a44Smrgm4_undefine([_defopt]) 10983dc9477beSmrg 1098444584a44Smrgif test "x$use_asciidoc" = x"auto"; then 1098544584a44Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1098644584a44Smrg if test "x$ASCIIDOC" = "x"; then 1098744584a44Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 1098844584a44Smrg have_asciidoc=no 1098944584a44Smrg else 1099044584a44Smrg have_asciidoc=yes 1099144584a44Smrg fi 1099244584a44Smrgelif test "x$use_asciidoc" = x"yes" ; then 1099344584a44Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 1099444584a44Smrg if test "x$ASCIIDOC" = "x"; then 1099544584a44Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 1099644584a44Smrg fi 1099744584a44Smrg have_asciidoc=yes 1099844584a44Smrgelif test "x$use_asciidoc" = x"no" ; then 1099944584a44Smrg if test "x$ASCIIDOC" != "x"; then 1100044584a44Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 1100144584a44Smrg fi 1100244584a44Smrg have_asciidoc=no 11003dc9477beSmrgelse 1100444584a44Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 11005dc9477beSmrgfi 1100644584a44Smrgm4_ifval([$1], 1100744584a44Smrg[if test "$have_asciidoc" = yes; then 1100844584a44Smrg # scrape the asciidoc version 1100944584a44Smrg AC_MSG_CHECKING([the asciidoc version]) 1101044584a44Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 1101144584a44Smrg AC_MSG_RESULT([$asciidoc_version]) 1101244584a44Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 1101344584a44Smrg [if test "x$use_asciidoc" = xauto; then 1101444584a44Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 1101544584a44Smrg have_asciidoc=no 1101644584a44Smrg else 1101744584a44Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 1101844584a44Smrg fi]) 1101944584a44Smrgfi]) 1102044584a44SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 1102144584a44Smrg]) # XORG_WITH_ASCIIDOC 11022dc9477beSmrg 1102344584a44Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 1102444584a44Smrg# ------------------------------------------- 1102544584a44Smrg# Minimum version: 1.5.0 1102644584a44Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1102744584a44Smrg# Minimum version for optional DOT checking: 1.18.0 11028dc9477beSmrg# 1102944584a44Smrg# Documentation tools are not always available on all platforms and sometimes 1103044584a44Smrg# not at the appropriate level. This macro enables a module to test for the 1103144584a44Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1103244584a44Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 1103344584a44Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 1103444584a44Smrg# --with-doxygen assumes 'auto'. 1103544584a44Smrg# 1103644584a44Smrg# Interface to module: 1103744584a44Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 1103844584a44Smrg# DOXYGEN: returns the path of the doxygen program found 1103944584a44Smrg# returns the path set by the user in the environment 1104044584a44Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 1104144584a44Smrg# 'no' user instructs the module not to use doxygen 1104244584a44Smrg# 1104344584a44Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 1104444584a44Smrg# 1104544584a44SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 1104644584a44SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 1104744584a44SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility]) 1104844584a44Smrgm4_define([_defopt], m4_default([$2], [auto])) 1104944584a44SmrgAC_ARG_WITH(doxygen, 1105044584a44Smrg AS_HELP_STRING([--with-doxygen], 1105144584a44Smrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 1105244584a44Smrg [use_doxygen=$withval], [use_doxygen=]_defopt) 1105344584a44Smrgm4_undefine([_defopt]) 11054dc9477beSmrg 1105544584a44Smrgif test "x$use_doxygen" = x"auto"; then 1105644584a44Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1105744584a44Smrg if test "x$DOXYGEN" = "x"; then 1105844584a44Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 1105944584a44Smrg have_doxygen=no 1106044584a44Smrg else 1106144584a44Smrg have_doxygen=yes 1106244584a44Smrg fi 1106344584a44Smrgelif test "x$use_doxygen" = x"yes" ; then 1106444584a44Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 1106544584a44Smrg if test "x$DOXYGEN" = "x"; then 1106644584a44Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 1106744584a44Smrg fi 1106844584a44Smrg have_doxygen=yes 1106944584a44Smrgelif test "x$use_doxygen" = x"no" ; then 1107044584a44Smrg if test "x$DOXYGEN" != "x"; then 1107144584a44Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 1107244584a44Smrg fi 1107344584a44Smrg have_doxygen=no 1107444584a44Smrgelse 1107544584a44Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 1107644584a44Smrgfi 1107744584a44Smrgm4_ifval([$1], 1107844584a44Smrg[if test "$have_doxygen" = yes; then 1107944584a44Smrg # scrape the doxygen version 1108044584a44Smrg AC_MSG_CHECKING([the doxygen version]) 1108144584a44Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 1108244584a44Smrg AC_MSG_RESULT([$doxygen_version]) 1108344584a44Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 1108444584a44Smrg [if test "x$use_doxygen" = xauto; then 1108544584a44Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 1108644584a44Smrg have_doxygen=no 1108744584a44Smrg else 1108844584a44Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 1108944584a44Smrg fi]) 1109044584a44Smrgfi]) 11091dc9477beSmrg 1109244584a44Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory 1109344584a44Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file: 1109444584a44Smrgdnl HAVE_DOT = @HAVE_DOT@ 1109544584a44SmrgHAVE_DOT=no 1109644584a44Smrgif test "x$have_doxygen" = "xyes"; then 1109744584a44Smrg AC_PATH_PROG([DOT], [dot]) 1109844584a44Smrg if test "x$DOT" != "x"; then 1109944584a44Smrg HAVE_DOT=yes 1110044584a44Smrg fi 1110144584a44Smrgfi 11102dc9477beSmrg 1110344584a44SmrgAC_SUBST([HAVE_DOT]) 1110444584a44SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"]) 1110544584a44SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 1110644584a44Smrg]) # XORG_WITH_DOXYGEN 11107dc9477beSmrg 1110844584a44Smrg# XORG_WITH_GROFF([DEFAULT]) 1110944584a44Smrg# ---------------- 1111044584a44Smrg# Minimum version: 1.6.0 1111144584a44Smrg# Minimum version for optional DEFAULT argument: 1.11.0 11112dc9477beSmrg# 1111344584a44Smrg# Documentation tools are not always available on all platforms and sometimes 1111444584a44Smrg# not at the appropriate level. This macro enables a module to test for the 1111544584a44Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1111644584a44Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 1111744584a44Smrg# as whether or not to use the groff package. When DEFAULT is not specified, 1111844584a44Smrg# --with-groff assumes 'auto'. 1111944584a44Smrg# 1112044584a44Smrg# Interface to module: 1112144584a44Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 1112244584a44Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 1112344584a44Smrg# HAVE_GROFF_MS: the -ms macros package 1112444584a44Smrg# GROFF: returns the path of the groff program found 1112544584a44Smrg# returns the path set by the user in the environment 1112644584a44Smrg# --with-groff: 'yes' user instructs the module to use groff 1112744584a44Smrg# 'no' user instructs the module not to use groff 1112844584a44Smrg# 1112944584a44Smrg# Added in version 1.9.0: 1113044584a44Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 1113144584a44Smrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 1113244584a44Smrg# psselect from the psutils package. 1113344584a44Smrg# the ghostcript package. Refer to the grohtml man pages 1113444584a44Smrg# 1113544584a44Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 1113644584a44Smrg# 1113744584a44Smrg# OS and distros often splits groff in a basic and full package, the former 1113844584a44Smrg# having the groff program and the later having devices, fonts and macros 1113944584a44Smrg# Checking for the groff executable is not enough. 1114044584a44Smrg# 1114144584a44Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 1114244584a44Smrg# unset HAVE_GROFF or GROFF env variables. 1114344584a44Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 1114444584a44Smrg# 1114544584a44SmrgAC_DEFUN([XORG_WITH_GROFF],[ 1114644584a44SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 1114744584a44Smrgm4_define([_defopt], m4_default([$1], [auto])) 1114844584a44SmrgAC_ARG_WITH(groff, 1114944584a44Smrg AS_HELP_STRING([--with-groff], 1115044584a44Smrg [Use groff to regenerate documentation (default: ]_defopt[)]), 1115144584a44Smrg [use_groff=$withval], [use_groff=]_defopt) 1115244584a44Smrgm4_undefine([_defopt]) 11153dc9477beSmrg 1115444584a44Smrgif test "x$use_groff" = x"auto"; then 1115544584a44Smrg AC_PATH_PROG([GROFF], [groff]) 1115644584a44Smrg if test "x$GROFF" = "x"; then 1115744584a44Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 1115844584a44Smrg have_groff=no 1115944584a44Smrg else 1116044584a44Smrg have_groff=yes 1116144584a44Smrg fi 1116244584a44Smrgelif test "x$use_groff" = x"yes" ; then 1116344584a44Smrg AC_PATH_PROG([GROFF], [groff]) 1116444584a44Smrg if test "x$GROFF" = "x"; then 1116544584a44Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 1116644584a44Smrg fi 1116744584a44Smrg have_groff=yes 1116844584a44Smrgelif test "x$use_groff" = x"no" ; then 1116944584a44Smrg if test "x$GROFF" != "x"; then 1117044584a44Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 1117144584a44Smrg fi 1117244584a44Smrg have_groff=no 1117344584a44Smrgelse 1117444584a44Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 1117544584a44Smrgfi 11176dc9477beSmrg 1117744584a44Smrg# We have groff, test for the presence of the macro packages 1117844584a44Smrgif test "x$have_groff" = x"yes"; then 1117944584a44Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 1118044584a44Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 1118144584a44Smrg groff_ms_works=yes 1118244584a44Smrg else 1118344584a44Smrg groff_ms_works=no 1118444584a44Smrg fi 1118544584a44Smrg AC_MSG_RESULT([$groff_ms_works]) 1118644584a44Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 1118744584a44Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 1118844584a44Smrg groff_mm_works=yes 1118944584a44Smrg else 1119044584a44Smrg groff_mm_works=no 1119144584a44Smrg fi 1119244584a44Smrg AC_MSG_RESULT([$groff_mm_works]) 1119344584a44Smrgfi 11194dc9477beSmrg 1119544584a44Smrg# We have groff, test for HTML dependencies, one command per package 1119644584a44Smrgif test "x$have_groff" = x"yes"; then 1119744584a44Smrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 1119844584a44Smrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 1119944584a44Smrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 1120044584a44Smrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 1120144584a44Smrg have_groff_html=yes 1120244584a44Smrg else 1120344584a44Smrg have_groff_html=no 1120444584a44Smrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 1120544584a44Smrg fi 1120644584a44Smrgfi 11207dc9477beSmrg 1120844584a44Smrg# Set Automake conditionals for Makefiles 1120944584a44SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 1121044584a44SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 1121144584a44SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 1121244584a44SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 1121344584a44Smrg]) # XORG_WITH_GROFF 11214dc9477beSmrg 1121544584a44Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1121644584a44Smrg# --------------------------------------- 1121744584a44Smrg# Minimum version: 1.6.0 1121844584a44Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1121944584a44Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 1122044584a44Smrg# 1122144584a44Smrg# Documentation tools are not always available on all platforms and sometimes 1122244584a44Smrg# not at the appropriate level. This macro enables a module to test for the 1122344584a44Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1122444584a44Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 1122544584a44Smrg# as whether or not to use the fop package. When DEFAULT is not specified, 1122644584a44Smrg# --with-fop assumes 'auto'. 1122744584a44Smrg# 1122844584a44Smrg# Interface to module: 1122944584a44Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 1123044584a44Smrg# FOP: returns the path of the fop program found 1123144584a44Smrg# returns the path set by the user in the environment 1123244584a44Smrg# --with-fop: 'yes' user instructs the module to use fop 1123344584a44Smrg# 'no' user instructs the module not to use fop 1123444584a44Smrg# 1123544584a44Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 1123644584a44Smrg# 1123744584a44SmrgAC_DEFUN([XORG_WITH_FOP],[ 1123844584a44SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1123944584a44Smrgm4_define([_defopt], m4_default([$2], [auto])) 1124044584a44SmrgAC_ARG_WITH(fop, 1124144584a44Smrg AS_HELP_STRING([--with-fop], 1124244584a44Smrg [Use fop to regenerate documentation (default: ]_defopt[)]), 1124344584a44Smrg [use_fop=$withval], [use_fop=]_defopt) 1124444584a44Smrgm4_undefine([_defopt]) 11245dc9477beSmrg 1124644584a44Smrgif test "x$use_fop" = x"auto"; then 1124744584a44Smrg AC_PATH_PROG([FOP], [fop]) 1124844584a44Smrg if test "x$FOP" = "x"; then 1124944584a44Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 1125044584a44Smrg have_fop=no 1125144584a44Smrg else 1125244584a44Smrg have_fop=yes 1125344584a44Smrg fi 1125444584a44Smrgelif test "x$use_fop" = x"yes" ; then 1125544584a44Smrg AC_PATH_PROG([FOP], [fop]) 1125644584a44Smrg if test "x$FOP" = "x"; then 1125744584a44Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 1125844584a44Smrg fi 1125944584a44Smrg have_fop=yes 1126044584a44Smrgelif test "x$use_fop" = x"no" ; then 1126144584a44Smrg if test "x$FOP" != "x"; then 1126244584a44Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 1126344584a44Smrg fi 1126444584a44Smrg have_fop=no 11265dc9477beSmrgelse 1126644584a44Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 11267dc9477beSmrgfi 11268dc9477beSmrg 1126944584a44Smrg# Test for a minimum version of fop, if provided. 1127044584a44Smrgm4_ifval([$1], 1127144584a44Smrg[if test "$have_fop" = yes; then 1127244584a44Smrg # scrape the fop version 1127344584a44Smrg AC_MSG_CHECKING([for fop minimum version]) 1127444584a44Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1127544584a44Smrg AC_MSG_RESULT([$fop_version]) 1127644584a44Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1127744584a44Smrg [if test "x$use_fop" = xauto; then 1127844584a44Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1127944584a44Smrg have_fop=no 1128044584a44Smrg else 1128144584a44Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1128244584a44Smrg fi]) 1128344584a44Smrgfi]) 1128444584a44SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 1128544584a44Smrg]) # XORG_WITH_FOP 1128644584a44Smrg 1128744584a44Smrg# XORG_WITH_M4([MIN-VERSION]) 1128844584a44Smrg# --------------------------- 1128944584a44Smrg# Minimum version: 1.19.0 1129044584a44Smrg# 1129144584a44Smrg# This macro attempts to locate an m4 macro processor which supports 1129244584a44Smrg# -I option and is only useful for modules relying on M4 in order to 1129344584a44Smrg# expand macros in source code files. 1129444584a44Smrg# 1129544584a44Smrg# Interface to module: 1129644584a44Smrg# M4: returns the path of the m4 program found 1129744584a44Smrg# returns the path set by the user in the environment 1129844584a44Smrg# 1129944584a44SmrgAC_DEFUN([XORG_WITH_M4], [ 1130044584a44SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4], 1130144584a44Smrg [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4], 1130244584a44Smrg [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \ 1130344584a44Smrg ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]], 1130444584a44Smrg [AC_MSG_ERROR([could not find m4 that supports -I option])], 1130544584a44Smrg [$PATH:/usr/gnu/bin])]) 11306dc9477beSmrg 1130744584a44SmrgAC_SUBST([M4], [$ac_cv_path_M4]) 1130844584a44Smrg]) # XORG_WITH_M4 11309dc9477beSmrg 1131044584a44Smrg# XORG_WITH_PS2PDF([DEFAULT]) 1131144584a44Smrg# ---------------- 1131244584a44Smrg# Minimum version: 1.6.0 1131344584a44Smrg# Minimum version for optional DEFAULT argument: 1.11.0 1131444584a44Smrg# 1131544584a44Smrg# Documentation tools are not always available on all platforms and sometimes 1131644584a44Smrg# not at the appropriate level. This macro enables a module to test for the 1131744584a44Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 1131844584a44Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 1131944584a44Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 1132044584a44Smrg# --with-ps2pdf assumes 'auto'. 1132144584a44Smrg# 1132244584a44Smrg# Interface to module: 1132344584a44Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 1132444584a44Smrg# PS2PDF: returns the path of the ps2pdf program found 1132544584a44Smrg# returns the path set by the user in the environment 1132644584a44Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 1132744584a44Smrg# 'no' user instructs the module not to use ps2pdf 1132844584a44Smrg# 1132944584a44Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 1133044584a44Smrg# 1133144584a44SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 1133244584a44SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 1133344584a44Smrgm4_define([_defopt], m4_default([$1], [auto])) 1133444584a44SmrgAC_ARG_WITH(ps2pdf, 1133544584a44Smrg AS_HELP_STRING([--with-ps2pdf], 1133644584a44Smrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 1133744584a44Smrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 1133844584a44Smrgm4_undefine([_defopt]) 11339dc9477beSmrg 1134044584a44Smrgif test "x$use_ps2pdf" = x"auto"; then 1134144584a44Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1134244584a44Smrg if test "x$PS2PDF" = "x"; then 1134344584a44Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 1134444584a44Smrg have_ps2pdf=no 1134544584a44Smrg else 1134644584a44Smrg have_ps2pdf=yes 1134744584a44Smrg fi 1134844584a44Smrgelif test "x$use_ps2pdf" = x"yes" ; then 1134944584a44Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 1135044584a44Smrg if test "x$PS2PDF" = "x"; then 1135144584a44Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 1135244584a44Smrg fi 1135344584a44Smrg have_ps2pdf=yes 1135444584a44Smrgelif test "x$use_ps2pdf" = x"no" ; then 1135544584a44Smrg if test "x$PS2PDF" != "x"; then 1135644584a44Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 1135744584a44Smrg fi 1135844584a44Smrg have_ps2pdf=no 1135944584a44Smrgelse 1136044584a44Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 11361dc9477beSmrgfi 1136244584a44SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 1136344584a44Smrg]) # XORG_WITH_PS2PDF 11364dc9477beSmrg 1136544584a44Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 1136644584a44Smrg# ---------------- 1136744584a44Smrg# Minimum version: 1.6.0 11368dc9477beSmrg# 1136944584a44Smrg# Documentation tools are not always available on all platforms and sometimes 1137044584a44Smrg# not at the appropriate level. This macro enables a builder to skip all 1137144584a44Smrg# documentation targets except traditional man pages. 1137244584a44Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1137344584a44Smrg# maximum flexibilty in controlling documentation building. 1137444584a44Smrg# Refer to: 1137544584a44Smrg# XORG_WITH_XMLTO --with-xmlto 1137644584a44Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1137744584a44Smrg# XORG_WITH_DOXYGEN --with-doxygen 1137844584a44Smrg# XORG_WITH_FOP --with-fop 1137944584a44Smrg# XORG_WITH_GROFF --with-groff 1138044584a44Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1138144584a44Smrg# 1138244584a44Smrg# Interface to module: 1138344584a44Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 1138444584a44Smrg# --enable-docs: 'yes' user instructs the module to generate docs 1138544584a44Smrg# 'no' user instructs the module not to generate docs 1138644584a44Smrg# parm1: specify the default value, yes or no. 1138744584a44Smrg# 1138844584a44SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 1138944584a44Smrgm4_define([docs_default], m4_default([$1], [yes])) 1139044584a44SmrgAC_ARG_ENABLE(docs, 1139144584a44Smrg AS_HELP_STRING([--enable-docs], 1139244584a44Smrg [Enable building the documentation (default: ]docs_default[)]), 1139344584a44Smrg [build_docs=$enableval], [build_docs=]docs_default) 1139444584a44Smrgm4_undefine([docs_default]) 1139544584a44SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 1139644584a44SmrgAC_MSG_CHECKING([whether to build documentation]) 1139744584a44SmrgAC_MSG_RESULT([$build_docs]) 1139844584a44Smrg]) # XORG_ENABLE_DOCS 11399dc9477beSmrg 1140044584a44Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 1140144584a44Smrg# ---------------- 1140244584a44Smrg# Minimum version: 1.6.0 1140344584a44Smrg# 1140444584a44Smrg# This macro enables a builder to skip all developer documentation. 1140544584a44Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1140644584a44Smrg# maximum flexibilty in controlling documentation building. 1140744584a44Smrg# Refer to: 1140844584a44Smrg# XORG_WITH_XMLTO --with-xmlto 1140944584a44Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1141044584a44Smrg# XORG_WITH_DOXYGEN --with-doxygen 1141144584a44Smrg# XORG_WITH_FOP --with-fop 1141244584a44Smrg# XORG_WITH_GROFF --with-groff 1141344584a44Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1141444584a44Smrg# 1141544584a44Smrg# Interface to module: 1141644584a44Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 1141744584a44Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 1141844584a44Smrg# 'no' user instructs the module not to generate developer docs 1141944584a44Smrg# parm1: specify the default value, yes or no. 1142044584a44Smrg# 1142144584a44SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 1142244584a44Smrgm4_define([devel_default], m4_default([$1], [yes])) 1142344584a44SmrgAC_ARG_ENABLE(devel-docs, 1142444584a44Smrg AS_HELP_STRING([--enable-devel-docs], 1142544584a44Smrg [Enable building the developer documentation (default: ]devel_default[)]), 1142644584a44Smrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 1142744584a44Smrgm4_undefine([devel_default]) 1142844584a44SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 1142944584a44SmrgAC_MSG_CHECKING([whether to build developer documentation]) 1143044584a44SmrgAC_MSG_RESULT([$build_devel_docs]) 1143144584a44Smrg]) # XORG_ENABLE_DEVEL_DOCS 11432dc9477beSmrg 1143344584a44Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 1143444584a44Smrg# ---------------- 1143544584a44Smrg# Minimum version: 1.6.0 1143644584a44Smrg# 1143744584a44Smrg# This macro enables a builder to skip all functional specification targets. 1143844584a44Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 1143944584a44Smrg# maximum flexibilty in controlling documentation building. 1144044584a44Smrg# Refer to: 1144144584a44Smrg# XORG_WITH_XMLTO --with-xmlto 1144244584a44Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 1144344584a44Smrg# XORG_WITH_DOXYGEN --with-doxygen 1144444584a44Smrg# XORG_WITH_FOP --with-fop 1144544584a44Smrg# XORG_WITH_GROFF --with-groff 1144644584a44Smrg# XORG_WITH_PS2PDF --with-ps2pdf 1144744584a44Smrg# 1144844584a44Smrg# Interface to module: 1144944584a44Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 1145044584a44Smrg# --enable-specs: 'yes' user instructs the module to generate specs 1145144584a44Smrg# 'no' user instructs the module not to generate specs 1145244584a44Smrg# parm1: specify the default value, yes or no. 1145344584a44Smrg# 1145444584a44SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 1145544584a44Smrgm4_define([spec_default], m4_default([$1], [yes])) 1145644584a44SmrgAC_ARG_ENABLE(specs, 1145744584a44Smrg AS_HELP_STRING([--enable-specs], 1145844584a44Smrg [Enable building the specs (default: ]spec_default[)]), 1145944584a44Smrg [build_specs=$enableval], [build_specs=]spec_default) 1146044584a44Smrgm4_undefine([spec_default]) 1146144584a44SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 1146244584a44SmrgAC_MSG_CHECKING([whether to build functional specifications]) 1146344584a44SmrgAC_MSG_RESULT([$build_specs]) 1146444584a44Smrg]) # XORG_ENABLE_SPECS 11465dc9477beSmrg 1146644584a44Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 1146744584a44Smrg# ---------------------------------------------- 1146844584a44Smrg# Minimum version: 1.13.0 1146944584a44Smrg# 1147044584a44Smrg# This macro enables a builder to enable/disable unit testing 1147144584a44Smrg# It makes no assumption about the test cases implementation 1147244584a44Smrg# Test cases may or may not use Automake "Support for test suites" 1147344584a44Smrg# They may or may not use the software utility library GLib 1147444584a44Smrg# 1147544584a44Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 1147644584a44Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 1147744584a44Smrg# The variable enable_unit_tests is used by other macros in this file. 1147844584a44Smrg# 1147944584a44Smrg# Interface to module: 1148044584a44Smrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 1148144584a44Smrg# enable_unit_tests: used in configure.ac for additional configuration 1148244584a44Smrg# --enable-unit-tests: 'yes' user instructs the module to build tests 1148344584a44Smrg# 'no' user instructs the module not to build tests 1148444584a44Smrg# parm1: specify the default value, yes or no. 1148506c34b88Smrg# 1148644584a44SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 1148744584a44SmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 1148844584a44SmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1148944584a44SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1149044584a44Smrgm4_define([_defopt], m4_default([$1], [auto])) 1149144584a44SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 1149244584a44Smrg [Enable building unit test cases (default: ]_defopt[)]), 1149344584a44Smrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 1149444584a44Smrgm4_undefine([_defopt]) 1149544584a44SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 1149644584a44SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1149744584a44SmrgAC_MSG_RESULT([$enable_unit_tests]) 1149844584a44Smrg]) # XORG_ENABLE_UNIT_TESTS 11499b789ec8aSmrg 1150044584a44Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1150144584a44Smrg# ------------------------------------------------------ 1150244584a44Smrg# Minimum version: 1.17.0 1150344584a44Smrg# 1150444584a44Smrg# This macro enables a builder to enable/disable integration testing 1150544584a44Smrg# It makes no assumption about the test cases' implementation 1150644584a44Smrg# Test cases may or may not use Automake "Support for test suites" 1150744584a44Smrg# 1150844584a44Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1150944584a44Smrg# usually requires less dependencies and may be built and run under less 1151044584a44Smrg# stringent environments than integration tests. 1151144584a44Smrg# 1151244584a44Smrg# Interface to module: 1151344584a44Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1151444584a44Smrg# enable_integration_tests: used in configure.ac for additional configuration 1151544584a44Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1151644584a44Smrg# 'no' user instructs the module not to build tests 1151744584a44Smrg# parm1: specify the default value, yes or no. 1151844584a44Smrg# 1151944584a44SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1152044584a44SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1152144584a44Smrgm4_define([_defopt], m4_default([$1], [auto])) 1152244584a44SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1152344584a44Smrg [Enable building integration test cases (default: ]_defopt[)]), 1152444584a44Smrg [enable_integration_tests=$enableval], 1152544584a44Smrg [enable_integration_tests=]_defopt) 1152644584a44Smrgm4_undefine([_defopt]) 1152744584a44SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1152844584a44Smrg [test "x$enable_integration_tests" != xno]) 1152944584a44SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1153044584a44SmrgAC_MSG_RESULT([$enable_integration_tests]) 1153144584a44Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 11532b789ec8aSmrg 1153344584a44Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 1153444584a44Smrg# ---------------------------------------- 1153544584a44Smrg# Minimum version: 1.13.0 11536dc9477beSmrg# 1153744584a44Smrg# GLib is a library which provides advanced data structures and functions. 1153844584a44Smrg# This macro enables a module to test for the presence of Glib. 1153944584a44Smrg# 1154044584a44Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 1154144584a44Smrg# Otherwise the value of $enable_unit_tests is blank. 1154244584a44Smrg# 1154344584a44Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1154444584a44Smrg# test support usually requires less dependencies and may be built and run under 1154544584a44Smrg# less stringent environments than integration tests. 1154644584a44Smrg# 1154744584a44Smrg# Interface to module: 1154844584a44Smrg# HAVE_GLIB: used in makefiles to conditionally build targets 1154944584a44Smrg# with_glib: used in configure.ac to know if GLib has been found 1155044584a44Smrg# --with-glib: 'yes' user instructs the module to use glib 1155144584a44Smrg# 'no' user instructs the module not to use glib 1155244584a44Smrg# 1155344584a44SmrgAC_DEFUN([XORG_WITH_GLIB],[ 1155444584a44SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1155544584a44Smrgm4_define([_defopt], m4_default([$2], [auto])) 1155644584a44SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 1155744584a44Smrg [Use GLib library for unit testing (default: ]_defopt[)]), 1155844584a44Smrg [with_glib=$withval], [with_glib=]_defopt) 1155944584a44Smrgm4_undefine([_defopt]) 11560b789ec8aSmrg 1156144584a44Smrghave_glib=no 1156244584a44Smrg# Do not probe GLib if user explicitly disabled unit testing 1156344584a44Smrgif test "x$enable_unit_tests" != x"no"; then 1156444584a44Smrg # Do not probe GLib if user explicitly disabled it 1156544584a44Smrg if test "x$with_glib" != x"no"; then 1156644584a44Smrg m4_ifval( 1156744584a44Smrg [$1], 1156844584a44Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 1156944584a44Smrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 1157044584a44Smrg ) 1157144584a44Smrg fi 1157244584a44Smrgfi 11573b789ec8aSmrg 1157444584a44Smrg# Not having GLib when unit testing has been explicitly requested is an error 1157544584a44Smrgif test "x$enable_unit_tests" = x"yes"; then 1157644584a44Smrg if test "x$have_glib" = x"no"; then 1157744584a44Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1157806c34b88Smrg fi 1157906c34b88Smrgfi 11580b789ec8aSmrg 1158144584a44Smrg# Having unit testing disabled when GLib has been explicitly requested is an error 1158244584a44Smrgif test "x$enable_unit_tests" = x"no"; then 1158344584a44Smrg if test "x$with_glib" = x"yes"; then 1158444584a44Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 1158506c34b88Smrg fi 1158606c34b88Smrgfi 11587b789ec8aSmrg 1158844584a44Smrg# Not having GLib when it has been explicitly requested is an error 1158944584a44Smrgif test "x$with_glib" = x"yes"; then 1159044584a44Smrg if test "x$have_glib" = x"no"; then 1159144584a44Smrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 1159244584a44Smrg fi 1159344584a44Smrgfi 11594b789ec8aSmrg 1159544584a44SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 1159644584a44Smrg]) # XORG_WITH_GLIB 1159744584a44Smrg 1159844584a44Smrg# XORG_LD_WRAP([required|optional]) 1159944584a44Smrg# --------------------------------- 1160044584a44Smrg# Minimum version: 1.13.0 1160144584a44Smrg# 1160244584a44Smrg# Check if linker supports -wrap, passed via compiler flags 1160344584a44Smrg# 1160444584a44Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 1160544584a44Smrg# Otherwise the value of $enable_unit_tests is blank. 1160644584a44Smrg# 1160744584a44Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1160844584a44Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1160944584a44Smrg# available, an argument of "optional" allows use when some unit tests require 1161044584a44Smrg# ld -wrap and others do not. 1161144584a44Smrg# 1161244584a44SmrgAC_DEFUN([XORG_LD_WRAP],[ 1161344584a44SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1161444584a44Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1161544584a44Smrg void __wrap_exit(int status) { return; }], 1161644584a44Smrg [exit(0);])]) 1161744584a44Smrg# Not having ld wrap when unit testing has been explicitly requested is an error 1161844584a44Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 1161944584a44Smrg if test "x$have_ld_wrap" = x"no"; then 1162044584a44Smrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 1162144584a44Smrg fi 1162244584a44Smrgfi 1162344584a44SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 1162444584a44Smrg# 1162544584a44Smrg]) # XORG_LD_WRAP 1162644584a44Smrg 1162744584a44Smrg# XORG_CHECK_LINKER_FLAGS 1162844584a44Smrg# ----------------------- 1162944584a44Smrg# SYNOPSIS 1163044584a44Smrg# 1163144584a44Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 1163244584a44Smrg# 1163344584a44Smrg# DESCRIPTION 1163444584a44Smrg# 1163544584a44Smrg# Check whether the given linker FLAGS work with the current language's 1163644584a44Smrg# linker, or whether they give an error. 1163744584a44Smrg# 1163844584a44Smrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 1163944584a44Smrg# success/failure. 1164044584a44Smrg# 1164144584a44Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1164244584a44Smrg# 1164344584a44Smrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 1164444584a44Smrg# 1164544584a44Smrg# LICENSE 1164644584a44Smrg# 1164744584a44Smrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 1164844584a44Smrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 1164944584a44Smrg# Copyright (c) 2009 Matteo Frigo 1165044584a44Smrg# 1165144584a44Smrg# This program is free software: you can redistribute it and/or modify it 1165244584a44Smrg# under the terms of the GNU General Public License as published by the 1165344584a44Smrg# Free Software Foundation, either version 3 of the License, or (at your 1165444584a44Smrg# option) any later version. 1165544584a44Smrg# 1165644584a44Smrg# This program is distributed in the hope that it will be useful, but 1165744584a44Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 1165844584a44Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 1165944584a44Smrg# Public License for more details. 1166044584a44Smrg# 1166144584a44Smrg# You should have received a copy of the GNU General Public License along 1166244584a44Smrg# with this program. If not, see <http://www.gnu.org/licenses/>. 1166344584a44Smrg# 1166444584a44Smrg# As a special exception, the respective Autoconf Macro's copyright owner 1166544584a44Smrg# gives unlimited permission to copy, distribute and modify the configure 1166644584a44Smrg# scripts that are the output of Autoconf when processing the Macro. You 1166744584a44Smrg# need not follow the terms of the GNU General Public License when using 1166844584a44Smrg# or distributing such scripts, even though portions of the text of the 1166944584a44Smrg# Macro appear in them. The GNU General Public License (GPL) does govern 1167044584a44Smrg# all other use of the material that constitutes the Autoconf Macro. 1167144584a44Smrg# 1167244584a44Smrg# This special exception to the GPL applies to versions of the Autoconf 1167344584a44Smrg# Macro released by the Autoconf Archive. When you make and distribute a 1167444584a44Smrg# modified version of the Autoconf Macro, you may extend this special 1167544584a44Smrg# exception to the GPL to apply to your modified version as well.# 1167644584a44SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 1167744584a44Smrg[AC_MSG_CHECKING([whether the linker accepts $1]) 1167844584a44Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 1167944584a44SmrgAS_LITERAL_IF([$1], 1168044584a44Smrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 1168144584a44Smrg ax_save_FLAGS=$LDFLAGS 1168244584a44Smrg LDFLAGS="$1" 1168344584a44Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 1168444584a44Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1168544584a44Smrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1168644584a44Smrg LDFLAGS=$ax_save_FLAGS])], 1168744584a44Smrg [ax_save_FLAGS=$LDFLAGS 1168844584a44Smrg LDFLAGS="$1" 1168944584a44Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 1169044584a44Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 1169144584a44Smrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 1169244584a44Smrg LDFLAGS=$ax_save_FLAGS]) 1169344584a44Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 1169444584a44SmrgAC_MSG_RESULT($xorg_check_linker_flags) 1169544584a44Smrgif test "x$xorg_check_linker_flags" = xyes; then 1169644584a44Smrg m4_default([$2], :) 1169744584a44Smrgelse 1169844584a44Smrg m4_default([$3], :) 1169944584a44Smrgfi 1170044584a44Smrg]) # XORG_CHECK_LINKER_FLAGS 11701b789ec8aSmrg 1170244584a44Smrg# XORG_MEMORY_CHECK_FLAGS 1170344584a44Smrg# ----------------------- 1170444584a44Smrg# Minimum version: 1.16.0 1170544584a44Smrg# 1170644584a44Smrg# This macro attempts to find appropriate memory checking functionality 1170744584a44Smrg# for various platforms which unit testing code may use to catch various 1170844584a44Smrg# forms of memory allocation and access errors in testing. 1170944584a44Smrg# 1171044584a44Smrg# Interface to module: 1171144584a44Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1171244584a44Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1171344584a44Smrg# 1171444584a44Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1171544584a44Smrg# 1171644584a44SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 11717b789ec8aSmrg 1171844584a44SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1171944584a44SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1172044584a44Smrg [Environment variables to enable memory checking in tests]) 1172189069ce9Smrg 1172244584a44Smrg# Check for different types of support on different platforms 1172344584a44Smrgcase $host_os in 1172444584a44Smrg solaris*) 1172544584a44Smrg AC_CHECK_LIB([umem], [umem_alloc], 1172644584a44Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1172744584a44Smrg ;; 1172844584a44Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1172944584a44Smrg # both directly and inverted, so should not be 0 or 255. 1173044584a44Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1173144584a44Smrg ;; 1173244584a44Smrg darwin*) 1173344584a44Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1173444584a44Smrg ;; 1173544584a44Smrg *bsd*) 1173644584a44Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1173744584a44Smrg ;; 1173844584a44Smrgesac 11739b789ec8aSmrg 1174044584a44Smrg# User supplied flags override default flags 1174144584a44Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1174244584a44Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1174344584a44Smrgfi 11744b789ec8aSmrg 1174544584a44SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1174644584a44Smrg]) # XORG_WITH_LINT 11747dc9477beSmrg 1174844584a44Smrg# XORG_CHECK_MALLOC_ZERO 1174944584a44Smrg# ---------------------- 1175044584a44Smrg# Minimum version: 1.0.0 1175189069ce9Smrg# 1175244584a44Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 1175344584a44Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 1175444584a44Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 1175544584a44SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 1175644584a44SmrgAC_ARG_ENABLE(malloc0returnsnull, 1175744584a44Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 1175844584a44Smrg [malloc(0) returns NULL (default: auto)]), 1175944584a44Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 1176044584a44Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 11761b789ec8aSmrg 1176244584a44SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 1176344584a44Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 1176444584a44SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null], 1176544584a44Smrg [AC_RUN_IFELSE([AC_LANG_PROGRAM([ 1176644584a44Smrg#include <stdlib.h> 1176744584a44Smrg],[ 1176844584a44Smrg char *m0, *r0, *c0, *p; 1176944584a44Smrg m0 = malloc(0); 1177044584a44Smrg p = malloc(10); 1177144584a44Smrg r0 = realloc(p,0); 1177244584a44Smrg c0 = calloc(0,10); 1177344584a44Smrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 1177444584a44Smrg])], 1177544584a44Smrg [xorg_cv_malloc0_returns_null=yes], 1177644584a44Smrg [xorg_cv_malloc0_returns_null=no])]) 1177744584a44SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null 1177806c34b88Smrgfi 1177944584a44SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 11780dc9477beSmrg 1178144584a44Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 1178244584a44Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 1178344584a44Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 1178444584a44Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 1178506c34b88Smrgelse 1178644584a44Smrg MALLOC_ZERO_CFLAGS="" 1178744584a44Smrg XMALLOC_ZERO_CFLAGS="" 1178844584a44Smrg XTMALLOC_ZERO_CFLAGS="" 1178989069ce9Smrgfi 1179037eb1ca1Smrg 1179144584a44SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 1179244584a44SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 1179344584a44SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 1179444584a44Smrg]) # XORG_CHECK_MALLOC_ZERO 1179506c34b88Smrg 1179644584a44Smrg# XORG_WITH_LINT() 1179744584a44Smrg# ---------------- 1179844584a44Smrg# Minimum version: 1.1.0 1179906c34b88Smrg# 1180044584a44Smrg# This macro enables the use of a tool that flags some suspicious and 1180144584a44Smrg# non-portable constructs (likely to be bugs) in C language source code. 1180244584a44Smrg# It will attempt to locate the tool and use appropriate options. 1180344584a44Smrg# There are various lint type tools on different platforms. 1180444584a44Smrg# 1180544584a44Smrg# Interface to module: 1180644584a44Smrg# LINT: returns the path to the tool found on the platform 1180744584a44Smrg# or the value set to LINT on the configure cmd line 1180844584a44Smrg# also an Automake conditional 1180944584a44Smrg# LINT_FLAGS: an Automake variable with appropriate flags 11810dc9477beSmrg# 1181144584a44Smrg# --with-lint: 'yes' user instructs the module to use lint 1181244584a44Smrg# 'no' user instructs the module not to use lint (default) 1181344584a44Smrg# 1181444584a44Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 1181544584a44Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 1181644584a44Smrg# 1181744584a44SmrgAC_DEFUN([XORG_WITH_LINT],[ 1181806c34b88Smrg 1181944584a44SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 1182044584a44SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 1182144584a44SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 1182244584a44Smrg [Use a lint-style source code checker (default: disabled)])], 1182344584a44Smrg [use_lint=$withval], [use_lint=no]) 11824b789ec8aSmrg 1182544584a44Smrg# Obtain platform specific info like program name and options 1182644584a44Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 1182744584a44Smrgcase $host_os in 1182844584a44Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 1182944584a44Smrg lint_name=splint 1183044584a44Smrg lint_options="-badflag" 1183144584a44Smrg ;; 1183244584a44Smrg *freebsd* | *netbsd*) 1183344584a44Smrg lint_name=lint 1183444584a44Smrg lint_options="-u -b" 1183544584a44Smrg ;; 1183644584a44Smrg *solaris*) 1183744584a44Smrg lint_name=lint 1183844584a44Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 1183944584a44Smrg ;; 1184044584a44Smrgesac 1184144584a44Smrg 1184244584a44Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 1184344584a44Smrgif test "x$use_lint" = x"yes" ; then 1184444584a44Smrg AC_PATH_PROG([LINT], [$lint_name]) 1184544584a44Smrg if test "x$LINT" = "x"; then 1184644584a44Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 1184744584a44Smrg fi 1184844584a44Smrgelif test "x$use_lint" = x"no" ; then 1184944584a44Smrg if test "x$LINT" != "x"; then 1185044584a44Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 1185144584a44Smrg fi 11852dc9477beSmrgelse 1185344584a44Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 11854dc9477beSmrgfi 11855dc9477beSmrg 1185644584a44Smrg# User supplied flags override default flags 1185744584a44Smrgif test "x$LINT_FLAGS" != "x"; then 1185844584a44Smrg lint_options=$LINT_FLAGS 1185944584a44Smrgfi 11860dc9477beSmrg 1186144584a44SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 1186244584a44SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 11863b789ec8aSmrg 1186444584a44Smrg]) # XORG_WITH_LINT 11865b789ec8aSmrg 1186644584a44Smrg# XORG_LINT_LIBRARY(LIBNAME) 1186744584a44Smrg# -------------------------- 1186844584a44Smrg# Minimum version: 1.1.0 1186944584a44Smrg# 1187044584a44Smrg# Sets up flags for building lint libraries for checking programs that call 1187144584a44Smrg# functions in the library. 1187244584a44Smrg# 1187344584a44Smrg# Interface to module: 1187444584a44Smrg# LINTLIB - Automake variable with the name of lint library file to make 1187544584a44Smrg# MAKE_LINT_LIB - Automake conditional 1187644584a44Smrg# 1187744584a44Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 1187844584a44Smrg# - 'no' user instructs the module not to create a lint library (default) 1187937eb1ca1Smrg 1188044584a44SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 1188144584a44SmrgAC_REQUIRE([XORG_WITH_LINT]) 1188244584a44SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 1188344584a44Smrg [Create lint library (default: disabled)])], 1188444584a44Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 1188506c34b88Smrg 1188644584a44Smrgif test "x$make_lint_lib" = x"yes" ; then 1188744584a44Smrg LINTLIB=llib-l$1.ln 1188844584a44Smrg if test "x$LINT" = "x"; then 1188944584a44Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 1189044584a44Smrg fi 1189144584a44Smrgelif test "x$make_lint_lib" != x"no" ; then 1189244584a44Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 1189344584a44Smrgfi 11894b789ec8aSmrg 1189544584a44SmrgAC_SUBST(LINTLIB) 1189644584a44SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 1189744584a44Smrg 1189844584a44Smrg]) # XORG_LINT_LIBRARY 1189906c34b88Smrg 1190044584a44Smrg# XORG_COMPILER_BRAND 1190144584a44Smrg# ------------------- 1190244584a44Smrg# Minimum version: 1.14.0 1190306c34b88Smrg# 1190444584a44Smrg# Checks for various brands of compilers and sets flags as appropriate: 1190544584a44Smrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1190644584a44Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 1190744584a44Smrg# clang compiler - sets CLANGCC to "yes" 1190844584a44Smrg# Intel compiler - sets INTELCC to "yes" 1190944584a44Smrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 1191044584a44Smrg# 1191144584a44SmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1191244584a44SmrgAC_LANG_CASE( 1191344584a44Smrg [C], [ 1191444584a44Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1191544584a44Smrg ], 1191644584a44Smrg [C++], [ 1191744584a44Smrg AC_REQUIRE([AC_PROG_CXX]) 1191844584a44Smrg ] 1191944584a44Smrg) 1192044584a44SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 1192144584a44SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 1192244584a44SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 1192344584a44Smrg]) # XORG_COMPILER_BRAND 11924b789ec8aSmrg 1192544584a44Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 11926dc9477beSmrg# --------------- 1192744584a44Smrg# Minimum version: 1.16.0 1192844584a44Smrg# 1192944584a44Smrg# Test if the compiler works when passed the given flag as a command line argument. 1193044584a44Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1193144584a44Smrg# next flag in the list until there are no more options. 1193244584a44Smrg# 1193344584a44Smrg# Note that this does not guarantee that the compiler supports the flag as some 1193444584a44Smrg# compilers will simply ignore arguments that they do not understand, but we do 1193544584a44Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1193644584a44Smrg# -Werror=unused-command-line-argument 1193744584a44Smrg# 1193844584a44SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1193944584a44Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1194044584a44Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 11941b789ec8aSmrg 1194244584a44SmrgAC_LANG_COMPILER_REQUIRE 11943b789ec8aSmrg 1194444584a44SmrgAC_LANG_CASE( 1194544584a44Smrg [C], [ 1194644584a44Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1194744584a44Smrg define([PREFIX], [C]) 1194844584a44Smrg define([CACHE_PREFIX], [cc]) 1194944584a44Smrg define([COMPILER], [$CC]) 1195044584a44Smrg ], 1195144584a44Smrg [C++], [ 1195244584a44Smrg define([PREFIX], [CXX]) 1195344584a44Smrg define([CACHE_PREFIX], [cxx]) 1195444584a44Smrg define([COMPILER], [$CXX]) 1195544584a44Smrg ] 1195644584a44Smrg) 1195744584a44Smrg 1195844584a44Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1195944584a44Smrg 1196044584a44Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1196144584a44Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1196244584a44Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1196344584a44Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1196444584a44Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1196544584a44Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1196644584a44Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1196744584a44Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1196844584a44Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1196989069ce9Smrgfi 1197044584a44Smrg 1197144584a44Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1197244584a44Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1197344584a44Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1197444584a44Smrg fi 1197544584a44Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1197644584a44Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1197744584a44Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1197844584a44Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1197944584a44Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1198044584a44Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1198144584a44Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1198244584a44Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1198344584a44Smrgfi 1198444584a44Smrg 1198544584a44Smrgfound="no" 1198644584a44Smrgm4_foreach([flag], m4_cdr($@), [ 1198744584a44Smrg if test $found = "no" ; then 1198844584a44Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then 1198944584a44Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1199044584a44Smrg fi 1199144584a44Smrg 1199244584a44Smrg if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then 1199344584a44Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1199444584a44Smrg fi 1199544584a44Smrg 1199644584a44Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1199744584a44Smrg 1199844584a44Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1199944584a44Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1200044584a44Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1200144584a44Smrg AC_CACHE_VAL($cacheid, 1200244584a44Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1200344584a44Smrg [eval $cacheid=yes], 1200444584a44Smrg [eval $cacheid=no])]) 1200544584a44Smrg 1200644584a44Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1200744584a44Smrg 1200844584a44Smrg eval supported=\$$cacheid 1200944584a44Smrg AC_MSG_RESULT([$supported]) 1201044584a44Smrg if test "$supported" = "yes" ; then 1201144584a44Smrg $1="$$1 ]flag[" 1201244584a44Smrg found="yes" 1201344584a44Smrg fi 1201444584a44Smrg fi 1201506c34b88Smrg]) 1201644584a44Smrg]) # XORG_TESTSET_CFLAG 120173e256790Smrg 1201844584a44Smrg# XORG_COMPILER_FLAGS 1201944584a44Smrg# --------------- 1202044584a44Smrg# Minimum version: 1.16.0 1202106c34b88Smrg# 1202244584a44Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1202344584a44Smrg# arguments supported by the selected compiler which do NOT alter the generated 1202444584a44Smrg# code. These arguments will cause the compiler to print various warnings 1202544584a44Smrg# during compilation AND turn a conservative set of warnings into errors. 1202644584a44Smrg# 1202744584a44Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1202844584a44Smrg# future versions of util-macros as options are added to new compilers. 1202944584a44Smrg# 1203044584a44SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1203144584a44SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 12032f1ee322dSmrg 1203344584a44SmrgAC_ARG_ENABLE(selective-werror, 1203444584a44Smrg AS_HELP_STRING([--disable-selective-werror], 1203544584a44Smrg [Turn off selective compiler errors. (default: enabled)]), 1203644584a44Smrg [SELECTIVE_WERROR=$enableval], 1203744584a44Smrg [SELECTIVE_WERROR=yes]) 1203844584a44Smrg 1203944584a44SmrgAC_LANG_CASE( 1204044584a44Smrg [C], [ 1204144584a44Smrg define([PREFIX], [C]) 1204244584a44Smrg ], 1204344584a44Smrg [C++], [ 1204444584a44Smrg define([PREFIX], [CXX]) 1204544584a44Smrg ] 1204644584a44Smrg) 1204744584a44Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1204844584a44Smrgif test "x$SUNCC" = "xyes"; then 1204944584a44Smrg [BASE_]PREFIX[FLAGS]="-v" 12050dc9477beSmrgelse 1205144584a44Smrg [BASE_]PREFIX[FLAGS]="" 12052f1ee322dSmrgfi 12053c43cc173Smrg 1205444584a44Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1205544584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1205644584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1205744584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1205844584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1205906c34b88Smrg 1206044584a44SmrgAC_LANG_CASE( 1206144584a44Smrg [C], [ 1206244584a44Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1206344584a44Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1206444584a44Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1206544584a44Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1206644584a44Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd]) 1206744584a44Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1206844584a44Smrg ] 1206944584a44Smrg) 12070c43cc173Smrg 1207144584a44Smrg# This chunk adds additional warnings that could catch undesired effects. 1207244584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1207344584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1207444584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1207544584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1207644584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1207744584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1207844584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 12079dc9477beSmrg 1208044584a44Smrg# These are currently disabled because they are noisy. They will be enabled 1208144584a44Smrg# in the future once the codebase is sufficiently modernized to silence 1208244584a44Smrg# them. For now, I don't want them to drown out the other warnings. 1208344584a44Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1208444584a44Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1208544584a44Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 12086dc9477beSmrg 1208744584a44Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1208844584a44Smrg# when there are problems that should be fixed. 1208937eb1ca1Smrg 1209044584a44Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1209144584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1209244584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1209344584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1209444584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1209544584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1209644584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1209744584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1209844584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1209944584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1210044584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1210144584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1210244584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1210344584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1210444584a44Smrgelse 1210544584a44SmrgAC_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]) 1210644584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1210744584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1210844584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1210944584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1211044584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1211144584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1211244584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1211344584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1211444584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1211544584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1211644584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1211744584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1211844584a44SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1211944584a44Smrgfi 12120dc9477beSmrg 1212144584a44SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1212244584a44Smrg]) # XORG_COMPILER_FLAGS 12123dc9477beSmrg 1212444584a44Smrg# XORG_CWARNFLAGS 1212544584a44Smrg# --------------- 1212644584a44Smrg# Minimum version: 1.2.0 1212744584a44Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 12128dc9477beSmrg# 1212944584a44Smrg# Defines CWARNFLAGS to enable C compiler warnings. 12130dc9477beSmrg# 1213144584a44Smrg# This function is deprecated because it defines -fno-strict-aliasing 1213244584a44Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1213344584a44Smrg# is needed, then it should be added explicitly in the module when 1213444584a44Smrg# it is updated to use BASE_CFLAGS. 1213544584a44Smrg# 1213644584a44SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1213744584a44SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 1213844584a44SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1213944584a44SmrgAC_LANG_CASE( 1214044584a44Smrg [C], [ 1214144584a44Smrg CWARNFLAGS="$BASE_CFLAGS" 1214244584a44Smrg if test "x$GCC" = xyes ; then 1214344584a44Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1214444584a44Smrg fi 1214544584a44Smrg AC_SUBST(CWARNFLAGS) 1214644584a44Smrg ] 1214744584a44Smrg) 1214844584a44Smrg]) # XORG_CWARNFLAGS 12149c27c18e8Smrg 1215044584a44Smrg# XORG_STRICT_OPTION 1215144584a44Smrg# ----------------------- 1215244584a44Smrg# Minimum version: 1.3.0 1215344584a44Smrg# 1215444584a44Smrg# Add configure option to enable strict compilation flags, such as treating 1215544584a44Smrg# warnings as fatal errors. 1215644584a44Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1215744584a44Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 1215844584a44Smrg# 1215944584a44Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 1216044584a44Smrg# when strict compilation is unconditionally desired. 1216144584a44SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 1216244584a44SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1216344584a44SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 12164b789ec8aSmrg 1216544584a44SmrgAC_ARG_ENABLE(strict-compilation, 1216644584a44Smrg AS_HELP_STRING([--enable-strict-compilation], 1216744584a44Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 1216844584a44Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 12169b789ec8aSmrg 1217044584a44SmrgAC_LANG_CASE( 1217144584a44Smrg [C], [ 1217244584a44Smrg define([PREFIX], [C]) 1217344584a44Smrg ], 1217444584a44Smrg [C++], [ 1217544584a44Smrg define([PREFIX], [CXX]) 1217644584a44Smrg ] 1217744584a44Smrg) 12178c27c18e8Smrg 1217944584a44Smrg[STRICT_]PREFIX[FLAGS]="" 1218044584a44SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1218144584a44SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1218289069ce9Smrg 1218344584a44Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1218444584a44Smrg# activate it with -Werror, so we add it here explicitly. 1218544584a44SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 121863e256790Smrg 1218744584a44Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1218844584a44Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1218944584a44Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 1219044584a44Smrgfi 1219144584a44SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1219244584a44SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1219344584a44SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 1219444584a44Smrg]) # XORG_STRICT_OPTION 12195c43cc173Smrg 1219644584a44Smrg# XORG_DEFAULT_OPTIONS 1219744584a44Smrg# -------------------- 1219844584a44Smrg# Minimum version: 1.3.0 1219944584a44Smrg# 1220044584a44Smrg# Defines default options for X.Org modules. 1220144584a44Smrg# 1220244584a44SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 1220344584a44SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1220444584a44SmrgXORG_COMPILER_FLAGS 1220544584a44SmrgXORG_CWARNFLAGS 1220644584a44SmrgXORG_STRICT_OPTION 1220744584a44SmrgXORG_RELEASE_VERSION 1220844584a44SmrgXORG_CHANGELOG 1220944584a44SmrgXORG_INSTALL 1221044584a44SmrgXORG_MANPAGE_SECTIONS 1221144584a44Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 1221244584a44Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 1221344584a44Smrg]) # XORG_DEFAULT_OPTIONS 1221421e67964Smrg 1221544584a44Smrg# XORG_INSTALL() 1221644584a44Smrg# ---------------- 1221744584a44Smrg# Minimum version: 1.4.0 1221844584a44Smrg# 1221944584a44Smrg# Defines the variable INSTALL_CMD as the command to copy 1222044584a44Smrg# INSTALL from $prefix/share/util-macros. 1222144584a44Smrg# 1222244584a44SmrgAC_DEFUN([XORG_INSTALL], [ 1222344584a44SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 1222444584a44Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 1222544584a44SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 1222644584a44Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 1222744584a44Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 1222844584a44Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 1222944584a44SmrgAC_SUBST([INSTALL_CMD]) 1223044584a44Smrg]) # XORG_INSTALL 1223144584a44Smrgdnl Copyright 2005 Red Hat, Inc 1223244584a44Smrgdnl 1223344584a44Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 1223444584a44Smrgdnl documentation for any purpose is hereby granted without fee, provided that 1223544584a44Smrgdnl the above copyright notice appear in all copies and that both that 1223644584a44Smrgdnl copyright notice and this permission notice appear in supporting 1223744584a44Smrgdnl documentation. 1223844584a44Smrgdnl 1223944584a44Smrgdnl The above copyright notice and this permission notice shall be included 1224044584a44Smrgdnl in all copies or substantial portions of the Software. 1224144584a44Smrgdnl 1224244584a44Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 1224344584a44Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 1224444584a44Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 1224544584a44Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 1224644584a44Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 1224744584a44Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 1224844584a44Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 1224944584a44Smrgdnl 1225044584a44Smrgdnl Except as contained in this notice, the name of the copyright holders shall 1225144584a44Smrgdnl not be used in advertising or otherwise to promote the sale, use or 1225244584a44Smrgdnl other dealings in this Software without prior written authorization 1225344584a44Smrgdnl from the copyright holders. 1225444584a44Smrgdnl 12255dc9477beSmrg 1225644584a44Smrg# XORG_RELEASE_VERSION 1225744584a44Smrg# -------------------- 1225844584a44Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 12259dc9477beSmrg 1226044584a44SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 1226144584a44Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 1226244584a44Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 1226344584a44Smrg [Major version of this package]) 1226444584a44Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 1226544584a44Smrg if test "x$PVM" = "x"; then 1226644584a44Smrg PVM="0" 1226744584a44Smrg fi 1226844584a44Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 1226944584a44Smrg [$PVM], 1227044584a44Smrg [Minor version of this package]) 1227144584a44Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 1227244584a44Smrg if test "x$PVP" = "x"; then 1227344584a44Smrg PVP="0" 1227444584a44Smrg fi 1227544584a44Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 1227644584a44Smrg [$PVP], 1227744584a44Smrg [Patch version of this package]) 1227844584a44Smrg]) 12279dc9477beSmrg 1228044584a44Smrg# XORG_CHANGELOG() 1228144584a44Smrg# ---------------- 1228244584a44Smrg# Minimum version: 1.2.0 1228344584a44Smrg# 1228444584a44Smrg# Defines the variable CHANGELOG_CMD as the command to generate 1228544584a44Smrg# ChangeLog from git. 1228644584a44Smrg# 1228744584a44Smrg# 1228844584a44SmrgAC_DEFUN([XORG_CHANGELOG], [ 1228944584a44SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 1229044584a44Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 1229144584a44Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 1229244584a44Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 1229344584a44SmrgAC_SUBST([CHANGELOG_CMD]) 1229444584a44Smrg]) # XORG_CHANGELOG 12295c43cc173Smrg 12296