aclocal.m4 revision 75cbef56
175cbef56Smrg# generated automatically by aclocal 1.11.3 -*- Autoconf -*- 23eed67faSmbalmer 33eed67faSmbalmer# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 475cbef56Smrg# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, 575cbef56Smrg# Inc. 63eed67faSmbalmer# This file is free software; the Free Software Foundation 73eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 83eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 93eed67faSmbalmer 103eed67faSmbalmer# This program is distributed in the hope that it will be useful, 113eed67faSmbalmer# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 123eed67faSmbalmer# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 133eed67faSmbalmer# PARTICULAR PURPOSE. 143eed67faSmbalmer 15dc407927Smrgm4_ifndef([AC_AUTOCONF_VERSION], 16dc407927Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 17dd0822caSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, 18dd0822caSmrg[m4_warning([this file was generated for autoconf 2.68. 19dc407927SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 20dc407927SmrgIf you have problems, you may need to regenerate the build system entirely. 21dc407927SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 22dc407927Smrg 233eed67faSmbalmer# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 24dc407927Smrg# 25dc407927Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2675cbef56Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 2775cbef56Smrg# Foundation, Inc. 28dc407927Smrg# Written by Gordon Matzigkeit, 1996 29dc407927Smrg# 30dc407927Smrg# This file is free software; the Free Software Foundation gives 31dc407927Smrg# unlimited permission to copy and/or distribute it, with or without 32dc407927Smrg# modifications, as long as this notice is preserved. 33dc407927Smrg 34dc407927Smrgm4_define([_LT_COPYING], [dnl 35dc407927Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 3675cbef56Smrg# 2006, 2007, 2008, 2009, 2010, 2011 Free Software 3775cbef56Smrg# Foundation, Inc. 38dc407927Smrg# Written by Gordon Matzigkeit, 1996 39dc407927Smrg# 40dc407927Smrg# This file is part of GNU Libtool. 41dc407927Smrg# 42dc407927Smrg# GNU Libtool is free software; you can redistribute it and/or 43dc407927Smrg# modify it under the terms of the GNU General Public License as 44dc407927Smrg# published by the Free Software Foundation; either version 2 of 45dc407927Smrg# the License, or (at your option) any later version. 46dc407927Smrg# 47dc407927Smrg# As a special exception to the GNU General Public License, 48dc407927Smrg# if you distribute this file as part of a program or library that 49dc407927Smrg# is built using GNU Libtool, you may include this file under the 50dc407927Smrg# same distribution terms that you use for the rest of that program. 51dc407927Smrg# 52dc407927Smrg# GNU Libtool is distributed in the hope that it will be useful, 53dc407927Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 54dc407927Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 55dc407927Smrg# GNU General Public License for more details. 56dc407927Smrg# 57dc407927Smrg# You should have received a copy of the GNU General Public License 58dc407927Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 59dc407927Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 60dc407927Smrg# obtained by writing to the Free Software Foundation, Inc., 61dc407927Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 62dc407927Smrg]) 633eed67faSmbalmer 64dd0822caSmrg# serial 57 LT_INIT 653eed67faSmbalmer 663eed67faSmbalmer 67dc407927Smrg# LT_PREREQ(VERSION) 68dc407927Smrg# ------------------ 69dc407927Smrg# Complain and exit if this libtool version is less that VERSION. 70dc407927Smrgm4_defun([LT_PREREQ], 71dc407927Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 72dc407927Smrg [m4_default([$3], 73dc407927Smrg [m4_fatal([Libtool version $1 or higher is required], 74dc407927Smrg 63)])], 75dc407927Smrg [$2])]) 763eed67faSmbalmer 773eed67faSmbalmer 78dc407927Smrg# _LT_CHECK_BUILDDIR 79dc407927Smrg# ------------------ 80dc407927Smrg# Complain if the absolute build directory name contains unusual characters 81dc407927Smrgm4_defun([_LT_CHECK_BUILDDIR], 82dc407927Smrg[case `pwd` in 83dc407927Smrg *\ * | *\ *) 84dc407927Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 85dc407927Smrgesac 86dc407927Smrg]) 87dc407927Smrg 88dc407927Smrg 89dc407927Smrg# LT_INIT([OPTIONS]) 90dc407927Smrg# ------------------ 91dc407927SmrgAC_DEFUN([LT_INIT], 92dc407927Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 93dd0822caSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl 94dc407927SmrgAC_BEFORE([$0], [LT_LANG])dnl 95dc407927SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 96dc407927SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 97dc407927Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 98dc407927Smrg 99dc407927Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 100dc407927Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 101dc407927Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 102dc407927Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 103dc407927Smrgdnl unless we require an AC_DEFUNed macro: 104dc407927SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 105dc407927SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 106dc407927SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 107dc407927SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 108dc407927Smrgm4_require([_LT_PROG_LTMAIN])dnl 109dc407927Smrg 110dd0822caSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) 111dd0822caSmrg 112dc407927Smrgdnl Parse OPTIONS 113dc407927Smrg_LT_SET_OPTIONS([$0], [$1]) 1143eed67faSmbalmer 1153eed67faSmbalmer# This can be used to rebuild libtool when needed 116dc407927SmrgLIBTOOL_DEPS="$ltmain" 1173eed67faSmbalmer 1183eed67faSmbalmer# Always use our own libtool. 1193eed67faSmbalmerLIBTOOL='$(SHELL) $(top_builddir)/libtool' 1203eed67faSmbalmerAC_SUBST(LIBTOOL)dnl 1213eed67faSmbalmer 122dc407927Smrg_LT_SETUP 1233eed67faSmbalmer 124dc407927Smrg# Only expand once: 125dc407927Smrgm4_define([LT_INIT]) 126dc407927Smrg])# LT_INIT 1273eed67faSmbalmer 128dc407927Smrg# Old names: 129dc407927SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 130dc407927SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 131dc407927Smrgdnl aclocal-1.4 backwards compatibility: 132dc407927Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 133dc407927Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 134dc407927Smrg 135dc407927Smrg 136dc407927Smrg# _LT_CC_BASENAME(CC) 137dc407927Smrg# ------------------- 138dc407927Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 139dc407927Smrgm4_defun([_LT_CC_BASENAME], 140dc407927Smrg[for cc_temp in $1""; do 141dc407927Smrg case $cc_temp in 142dc407927Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 143dc407927Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 144dc407927Smrg \-*) ;; 145dc407927Smrg *) break;; 146dc407927Smrg esac 147dc407927Smrgdone 148dd0822caSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` 149dc407927Smrg]) 150dc407927Smrg 151dc407927Smrg 152dc407927Smrg# _LT_FILEUTILS_DEFAULTS 153dc407927Smrg# ---------------------- 154dc407927Smrg# It is okay to use these file commands and assume they have been set 155dc407927Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 156dc407927Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 157dc407927Smrg[: ${CP="cp -f"} 158dc407927Smrg: ${MV="mv -f"} 159dc407927Smrg: ${RM="rm -f"} 160dc407927Smrg])# _LT_FILEUTILS_DEFAULTS 161dc407927Smrg 162dc407927Smrg 163dc407927Smrg# _LT_SETUP 164dc407927Smrg# --------- 165dc407927Smrgm4_defun([_LT_SETUP], 166dc407927Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1673eed67faSmbalmerAC_REQUIRE([AC_CANONICAL_BUILD])dnl 168dd0822caSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl 169dd0822caSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl 170dd0822caSmrg 17175cbef56Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl 17275cbef56Smrgdnl 173dc407927Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 174dc407927Smrg_LT_DECL([], [host], [0])dnl 175dc407927Smrg_LT_DECL([], [host_os], [0])dnl 176dc407927Smrgdnl 177dc407927Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 178dc407927Smrg_LT_DECL([], [build], [0])dnl 179dc407927Smrg_LT_DECL([], [build_os], [0])dnl 180dc407927Smrgdnl 1813eed67faSmbalmerAC_REQUIRE([AC_PROG_CC])dnl 182dc407927SmrgAC_REQUIRE([LT_PATH_LD])dnl 183dc407927SmrgAC_REQUIRE([LT_PATH_NM])dnl 184dc407927Smrgdnl 1853eed67faSmbalmerAC_REQUIRE([AC_PROG_LN_S])dnl 186dc407927Smrgtest -z "$LN_S" && LN_S="ln -s" 187dc407927Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 1883eed67faSmbalmerdnl 189dc407927SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 190dc407927Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 191dc407927Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 192dc407927Smrgdnl 193dc407927Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 194dc407927Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 195dd0822caSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl 196dc407927Smrgm4_require([_LT_CMD_RELOAD])dnl 197dc407927Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 198dd0822caSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl 199dc407927Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 200dc407927Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 201dd0822caSmrgm4_require([_LT_WITH_SYSROOT])dnl 202dc407927Smrg 203dc407927Smrg_LT_CONFIG_LIBTOOL_INIT([ 204dc407927Smrg# See if we are running on zsh, and set the options which allow our 205dc407927Smrg# commands through without removal of \ escapes INIT. 206dc407927Smrgif test -n "\${ZSH_VERSION+set}" ; then 207dc407927Smrg setopt NO_GLOB_SUBST 208dc407927Smrgfi 209dc407927Smrg]) 210dc407927Smrgif test -n "${ZSH_VERSION+set}" ; then 211dc407927Smrg setopt NO_GLOB_SUBST 212dc407927Smrgfi 2133eed67faSmbalmer 214dc407927Smrg_LT_CHECK_OBJDIR 215dc407927Smrg 216dc407927Smrgm4_require([_LT_TAG_COMPILER])dnl 2173eed67faSmbalmer 2183eed67faSmbalmercase $host_os in 2193eed67faSmbalmeraix3*) 2203eed67faSmbalmer # AIX sometimes has problems with the GCC collect2 program. For some 2213eed67faSmbalmer # reason, if we set the COLLECT_NAMES environment variable, the problems 2223eed67faSmbalmer # vanish in a puff of smoke. 2233eed67faSmbalmer if test "X${COLLECT_NAMES+set}" != Xset; then 2243eed67faSmbalmer COLLECT_NAMES= 2253eed67faSmbalmer export COLLECT_NAMES 2263eed67faSmbalmer fi 2273eed67faSmbalmer ;; 2283eed67faSmbalmeresac 2293eed67faSmbalmer 2303eed67faSmbalmer# Global variables: 231dc407927Smrgofile=libtool 2323eed67faSmbalmercan_build_shared=yes 2333eed67faSmbalmer 2343eed67faSmbalmer# All known linkers require a `.a' archive for static linking (except MSVC, 2353eed67faSmbalmer# which needs '.lib'). 2363eed67faSmbalmerlibext=a 2373eed67faSmbalmer 238dc407927Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 2393eed67faSmbalmer 2403eed67faSmbalmerold_CC="$CC" 2413eed67faSmbalmerold_CFLAGS="$CFLAGS" 2423eed67faSmbalmer 2433eed67faSmbalmer# Set sane defaults for various variables 2443eed67faSmbalmertest -z "$CC" && CC=cc 2453eed67faSmbalmertest -z "$LTCC" && LTCC=$CC 2463eed67faSmbalmertest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 2473eed67faSmbalmertest -z "$LD" && LD=ld 2483eed67faSmbalmertest -z "$ac_objext" && ac_objext=o 2493eed67faSmbalmer 2503eed67faSmbalmer_LT_CC_BASENAME([$compiler]) 2513eed67faSmbalmer 2523eed67faSmbalmer# Only perform the check for file, if the check method requires it 253dc407927Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 2543eed67faSmbalmercase $deplibs_check_method in 2553eed67faSmbalmerfile_magic*) 2563eed67faSmbalmer if test "$file_magic_cmd" = '$MAGIC_CMD'; then 257dc407927Smrg _LT_PATH_MAGIC 2583eed67faSmbalmer fi 2593eed67faSmbalmer ;; 2603eed67faSmbalmeresac 2613eed67faSmbalmer 262dc407927Smrg# Use C for the default configuration in the libtool script 263dc407927SmrgLT_SUPPORTED_TAG([CC]) 264dc407927Smrg_LT_LANG_C_CONFIG 265dc407927Smrg_LT_LANG_DEFAULT_CONFIG 266dc407927Smrg_LT_CONFIG_COMMANDS 267dc407927Smrg])# _LT_SETUP 2683eed67faSmbalmer 2693eed67faSmbalmer 270dd0822caSmrg# _LT_PREPARE_SED_QUOTE_VARS 271dd0822caSmrg# -------------------------- 272dd0822caSmrg# Define a few sed substitution that help us do robust quoting. 273dd0822caSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS], 274dd0822caSmrg[# Backslashify metacharacters that are still active within 275dd0822caSmrg# double-quoted strings. 276dd0822caSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 277dd0822caSmrg 278dd0822caSmrg# Same as above, but do not quote variable references. 279dd0822caSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 280dd0822caSmrg 281dd0822caSmrg# Sed substitution to delay expansion of an escaped shell variable in a 282dd0822caSmrg# double_quote_subst'ed string. 283dd0822caSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 284dd0822caSmrg 285dd0822caSmrg# Sed substitution to delay expansion of an escaped single quote. 286dd0822caSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 287dd0822caSmrg 288dd0822caSmrg# Sed substitution to avoid accidental globbing in evaled expressions 289dd0822caSmrgno_glob_subst='s/\*/\\\*/g' 290dd0822caSmrg]) 291dd0822caSmrg 292dc407927Smrg# _LT_PROG_LTMAIN 293dc407927Smrg# --------------- 294dc407927Smrg# Note that this code is called both from `configure', and `config.status' 295dc407927Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 296dc407927Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 297dc407927Smrg# so we pass a copy along to make sure it has a sensible value anyway. 298dc407927Smrgm4_defun([_LT_PROG_LTMAIN], 299dc407927Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 300dc407927Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 301dc407927Smrgltmain="$ac_aux_dir/ltmain.sh" 302dc407927Smrg])# _LT_PROG_LTMAIN 3033eed67faSmbalmer 3043eed67faSmbalmer 305dc407927Smrg 306dc407927Smrg# So that we can recreate a full libtool script including additional 307dc407927Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 308dc407927Smrg# in macros and then make a single call at the end using the `libtool' 309dc407927Smrg# label. 310dc407927Smrg 311dc407927Smrg 312dc407927Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 313dc407927Smrg# ---------------------------------------- 314dc407927Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 315dc407927Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 316dc407927Smrg[m4_ifval([$1], 317dc407927Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 318dc407927Smrg [$1 319dc407927Smrg])])]) 320dc407927Smrg 321dc407927Smrg# Initialize. 322dc407927Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 323dc407927Smrg 324dc407927Smrg 325dc407927Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 326dc407927Smrg# ------------------------------ 327dc407927Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 328dc407927Smrgm4_define([_LT_CONFIG_LIBTOOL], 329dc407927Smrg[m4_ifval([$1], 330dc407927Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 331dc407927Smrg [$1 332dc407927Smrg])])]) 333dc407927Smrg 334dc407927Smrg# Initialize. 335dc407927Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 336dc407927Smrg 337dc407927Smrg 338dc407927Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 339dc407927Smrg# ----------------------------------------------------- 340dc407927Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 341dc407927Smrg[_LT_CONFIG_LIBTOOL([$1]) 342dc407927Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 343dc407927Smrg]) 344dc407927Smrg 345dc407927Smrg 346dc407927Smrg# _LT_FORMAT_COMMENT([COMMENT]) 347dc407927Smrg# ----------------------------- 348dc407927Smrg# Add leading comment marks to the start of each line, and a trailing 349dc407927Smrg# full-stop to the whole comment if one is not present already. 350dc407927Smrgm4_define([_LT_FORMAT_COMMENT], 351dc407927Smrg[m4_ifval([$1], [ 352dc407927Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 353dc407927Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 354dc407927Smrg)]) 355dc407927Smrg 356dc407927Smrg 357dc407927Smrg 358dc407927Smrg 359dc407927Smrg 360dc407927Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 361dc407927Smrg# ------------------------------------------------------------------- 362dc407927Smrg# CONFIGNAME is the name given to the value in the libtool script. 363dc407927Smrg# VARNAME is the (base) name used in the configure script. 364dc407927Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 365dc407927Smrg# VARNAME. Any other value will be used directly. 366dc407927Smrgm4_define([_LT_DECL], 367dc407927Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 368dc407927Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 369dc407927Smrg [m4_ifval([$1], [$1], [$2])]) 370dc407927Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 371dc407927Smrg m4_ifval([$4], 372dc407927Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 373dc407927Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 374dc407927Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 375dc407927Smrg]) 376dc407927Smrg 377dc407927Smrg 378dc407927Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 379dc407927Smrg# -------------------------------------------------------- 380dc407927Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 381dc407927Smrg 382dc407927Smrg 383dc407927Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 384dc407927Smrg# ------------------------------------------------ 385dc407927Smrgm4_define([lt_decl_tag_varnames], 386dc407927Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 387dc407927Smrg 388dc407927Smrg 389dc407927Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 390dc407927Smrg# --------------------------------------------------------- 391dc407927Smrgm4_define([_lt_decl_filter], 392dc407927Smrg[m4_case([$#], 393dc407927Smrg [0], [m4_fatal([$0: too few arguments: $#])], 394dc407927Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 395dc407927Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 396dc407927Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 397dc407927Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 398dc407927Smrg]) 399dc407927Smrg 400dc407927Smrg 401dc407927Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 402dc407927Smrg# -------------------------------------------------- 403dc407927Smrgm4_define([lt_decl_quote_varnames], 404dc407927Smrg[_lt_decl_filter([value], [1], $@)]) 405dc407927Smrg 406dc407927Smrg 407dc407927Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 408dc407927Smrg# --------------------------------------------------- 409dc407927Smrgm4_define([lt_decl_dquote_varnames], 410dc407927Smrg[_lt_decl_filter([value], [2], $@)]) 411dc407927Smrg 412dc407927Smrg 413dc407927Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 414dc407927Smrg# --------------------------------------------------- 415dc407927Smrgm4_define([lt_decl_varnames_tagged], 416dc407927Smrg[m4_assert([$# <= 2])dnl 417dc407927Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 418dc407927Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 419dc407927Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 420dc407927Smrgm4_define([_lt_decl_varnames_tagged], 421dc407927Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 422dc407927Smrg 423dc407927Smrg 424dc407927Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 425dc407927Smrg# ------------------------------------------------ 426dc407927Smrgm4_define([lt_decl_all_varnames], 427dc407927Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 428dc407927Smrg m4_if([$2], [], 429dc407927Smrg m4_quote(lt_decl_varnames), 430dc407927Smrg m4_quote(m4_shift($@))))[]dnl 431dc407927Smrg]) 432dc407927Smrgm4_define([_lt_decl_all_varnames], 433dc407927Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 434dc407927Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 435dc407927Smrg]) 436dc407927Smrg 437dc407927Smrg 438dc407927Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 439dc407927Smrg# ------------------------------------ 440dc407927Smrg# Quote a variable value, and forward it to `config.status' so that its 441dc407927Smrg# declaration there will have the same value as in `configure'. VARNAME 442dc407927Smrg# must have a single quote delimited value for this to work. 443dc407927Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 444dd0822caSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) 445dc407927Smrg 446dc407927Smrg 447dc407927Smrg# _LT_CONFIG_STATUS_DECLARATIONS 448dc407927Smrg# ------------------------------ 449dc407927Smrg# We delimit libtool config variables with single quotes, so when 450dc407927Smrg# we write them to config.status, we have to be sure to quote all 451dc407927Smrg# embedded single quotes properly. In configure, this macro expands 452dc407927Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 453dc407927Smrg# 454dd0822caSmrg# <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`' 455dc407927Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 456dc407927Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 457dc407927Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 458dc407927Smrg 459dc407927Smrg 460dc407927Smrg# _LT_LIBTOOL_TAGS 461dc407927Smrg# ---------------- 462dc407927Smrg# Output comment and list of tags supported by the script 463dc407927Smrgm4_defun([_LT_LIBTOOL_TAGS], 464dc407927Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 465dc407927Smrgavailable_tags="_LT_TAGS"dnl 466dc407927Smrg]) 467dc407927Smrg 468dc407927Smrg 469dc407927Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 470dc407927Smrg# ----------------------------------- 471dc407927Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 472dc407927Smrg# expand to a commented shell variable setting: 473dc407927Smrg# 474dc407927Smrg# # Some comment about what VAR is for. 475dc407927Smrg# visible_name=$lt_internal_name 476dc407927Smrgm4_define([_LT_LIBTOOL_DECLARE], 477dc407927Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 478dc407927Smrg [description])))[]dnl 479dc407927Smrgm4_pushdef([_libtool_name], 480dc407927Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 481dc407927Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 482dc407927Smrg [0], [_libtool_name=[$]$1], 483dc407927Smrg [1], [_libtool_name=$lt_[]$1], 484dc407927Smrg [2], [_libtool_name=$lt_[]$1], 485dc407927Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 486dc407927Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 487dc407927Smrg]) 488dc407927Smrg 489dc407927Smrg 490dc407927Smrg# _LT_LIBTOOL_CONFIG_VARS 491dc407927Smrg# ----------------------- 492dc407927Smrg# Produce commented declarations of non-tagged libtool config variables 493dc407927Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 494dc407927Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 495dc407927Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 496dc407927Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 497dc407927Smrg[m4_foreach([_lt_var], 498dc407927Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 499dc407927Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 500dc407927Smrg 501dc407927Smrg 502dc407927Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 503dc407927Smrg# ------------------------- 504dc407927Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 505dc407927Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 506dc407927Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 5073eed67faSmbalmer 5083eed67faSmbalmer 509dc407927Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 510dc407927Smrg# ------------------------------ 511dc407927Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 512dc407927Smrg 513dc407927Smrg 514dc407927Smrg# _LT_CONFIG_COMMANDS 5153eed67faSmbalmer# ------------------- 516dc407927Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 517dc407927Smrg# variables for single and double quote escaping we saved from calls 518dc407927Smrg# to _LT_DECL, we can put quote escaped variables declarations 519dc407927Smrg# into `config.status', and then the shell code to quote escape them in 520dc407927Smrg# for loops in `config.status'. Finally, any additional code accumulated 521dc407927Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 522dc407927Smrgm4_defun([_LT_CONFIG_COMMANDS], 523dc407927Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 524dc407927Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 525dc407927Smrg dnl instead of duplicating it all over again into config.status, 526dc407927Smrg dnl then we will have config.status run $CONFIG_LT later, so it 527dc407927Smrg dnl needs to know what name is stored there: 528dc407927Smrg [AC_CONFIG_COMMANDS([libtool], 529dc407927Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 530dc407927Smrg dnl If the libtool generation code is destined for config.status, 531dc407927Smrg dnl expand the accumulated commands and init code now: 532dc407927Smrg [AC_CONFIG_COMMANDS([libtool], 533dc407927Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 534dc407927Smrg])#_LT_CONFIG_COMMANDS 535dc407927Smrg 536dc407927Smrg 537dc407927Smrg# Initialize. 538dc407927Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 539dc407927Smrg[ 540dc407927Smrg 541dc407927Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 542dc407927Smrg# if CDPATH is set. 543dc407927Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 544dc407927Smrg 545dc407927Smrgsed_quote_subst='$sed_quote_subst' 546dc407927Smrgdouble_quote_subst='$double_quote_subst' 547dc407927Smrgdelay_variable_subst='$delay_variable_subst' 548dc407927Smrg_LT_CONFIG_STATUS_DECLARATIONS 549dc407927SmrgLTCC='$LTCC' 550dc407927SmrgLTCFLAGS='$LTCFLAGS' 551dc407927Smrgcompiler='$compiler_DEFAULT' 552dc407927Smrg 553dd0822caSmrg# A function that is used when there is no print builtin or printf. 554dd0822caSmrgfunc_fallback_echo () 555dd0822caSmrg{ 556dd0822caSmrg eval 'cat <<_LTECHO_EOF 557dd0822caSmrg\$[]1 558dd0822caSmrg_LTECHO_EOF' 559dd0822caSmrg} 560dd0822caSmrg 561dc407927Smrg# Quote evaled strings. 562dc407927Smrgfor var in lt_decl_all_varnames([[ \ 563dc407927Smrg]], lt_decl_quote_varnames); do 564dd0822caSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 565dc407927Smrg *[[\\\\\\\`\\"\\\$]]*) 566dd0822caSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 567dc407927Smrg ;; 568dc407927Smrg *) 569dc407927Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 570dc407927Smrg ;; 571dc407927Smrg esac 572dc407927Smrgdone 573dc407927Smrg 574dc407927Smrg# Double-quote double-evaled strings. 575dc407927Smrgfor var in lt_decl_all_varnames([[ \ 576dc407927Smrg]], lt_decl_dquote_varnames); do 577dd0822caSmrg case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in 578dc407927Smrg *[[\\\\\\\`\\"\\\$]]*) 579dd0822caSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 580dc407927Smrg ;; 581dc407927Smrg *) 582dc407927Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 583dc407927Smrg ;; 584dc407927Smrg esac 585dc407927Smrgdone 586dc407927Smrg 587dc407927Smrg_LT_OUTPUT_LIBTOOL_INIT 588dc407927Smrg]) 589dc407927Smrg 590dd0822caSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) 591dd0822caSmrg# ------------------------------------ 592dd0822caSmrg# Generate a child script FILE with all initialization necessary to 593dd0822caSmrg# reuse the environment learned by the parent script, and make the 594dd0822caSmrg# file executable. If COMMENT is supplied, it is inserted after the 595dd0822caSmrg# `#!' sequence but before initialization text begins. After this 596dd0822caSmrg# macro, additional text can be appended to FILE to form the body of 597dd0822caSmrg# the child script. The macro ends with non-zero status if the 598dd0822caSmrg# file could not be fully written (such as if the disk is full). 599dd0822caSmrgm4_ifdef([AS_INIT_GENERATED], 600dd0822caSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], 601dd0822caSmrg[m4_defun([_LT_GENERATED_FILE_INIT], 602dd0822caSmrg[m4_require([AS_PREPARE])]dnl 603dd0822caSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl 604dd0822caSmrg[lt_write_fail=0 605dd0822caSmrgcat >$1 <<_ASEOF || lt_write_fail=1 606dd0822caSmrg#! $SHELL 607dd0822caSmrg# Generated by $as_me. 608dd0822caSmrg$2 609dd0822caSmrgSHELL=\${CONFIG_SHELL-$SHELL} 610dd0822caSmrgexport SHELL 611dd0822caSmrg_ASEOF 612dd0822caSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1 613dd0822caSmrgAS_SHELL_SANITIZE 614dd0822caSmrg_AS_PREPARE 615dd0822caSmrgexec AS_MESSAGE_FD>&1 616dd0822caSmrg_ASEOF 617dd0822caSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl 618dd0822caSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT 619dc407927Smrg 620dc407927Smrg# LT_OUTPUT 621dc407927Smrg# --------- 622dc407927Smrg# This macro allows early generation of the libtool script (before 623dc407927Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 624dc407927Smrg# tests. 625dc407927SmrgAC_DEFUN([LT_OUTPUT], 626dc407927Smrg[: ${CONFIG_LT=./config.lt} 627dc407927SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 628dd0822caSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], 629dd0822caSmrg[# Run this file to recreate a libtool stub with the current configuration.]) 630dc407927Smrg 631dc407927Smrgcat >>"$CONFIG_LT" <<\_LTEOF 632dd0822caSmrglt_cl_silent=false 633dc407927Smrgexec AS_MESSAGE_LOG_FD>>config.log 634dc407927Smrg{ 635dc407927Smrg echo 636dc407927Smrg AS_BOX([Running $as_me.]) 637dc407927Smrg} >&AS_MESSAGE_LOG_FD 638dc407927Smrg 639dc407927Smrglt_cl_help="\ 640dc407927Smrg\`$as_me' creates a local libtool stub from the current configuration, 641dc407927Smrgfor use in further configure time tests before the real libtool is 642dc407927Smrggenerated. 643dc407927Smrg 644dc407927SmrgUsage: $[0] [[OPTIONS]] 645dc407927Smrg 646dc407927Smrg -h, --help print this help, then exit 647dc407927Smrg -V, --version print version number, then exit 648dc407927Smrg -q, --quiet do not print progress messages 649dc407927Smrg -d, --debug don't remove temporary files 650dc407927Smrg 651dc407927SmrgReport bugs to <bug-libtool@gnu.org>." 652dc407927Smrg 653dc407927Smrglt_cl_version="\ 654dc407927Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 655dc407927Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 656dc407927Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 657dc407927Smrg 65875cbef56SmrgCopyright (C) 2011 Free Software Foundation, Inc. 659dc407927SmrgThis config.lt script is free software; the Free Software Foundation 660dc407927Smrggives unlimited permision to copy, distribute and modify it." 661dc407927Smrg 662dc407927Smrgwhile test $[#] != 0 663dc407927Smrgdo 664dc407927Smrg case $[1] in 665dc407927Smrg --version | --v* | -V ) 666dc407927Smrg echo "$lt_cl_version"; exit 0 ;; 667dc407927Smrg --help | --h* | -h ) 668dc407927Smrg echo "$lt_cl_help"; exit 0 ;; 669dc407927Smrg --debug | --d* | -d ) 670dc407927Smrg debug=: ;; 671dc407927Smrg --quiet | --q* | --silent | --s* | -q ) 672dc407927Smrg lt_cl_silent=: ;; 673dc407927Smrg 674dc407927Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 675dc407927SmrgTry \`$[0] --help' for more information.]) ;; 676dc407927Smrg 677dc407927Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 678dc407927SmrgTry \`$[0] --help' for more information.]) ;; 679dc407927Smrg esac 680dc407927Smrg shift 681dc407927Smrgdone 682dc407927Smrg 683dc407927Smrgif $lt_cl_silent; then 684dc407927Smrg exec AS_MESSAGE_FD>/dev/null 685dc407927Smrgfi 686dc407927Smrg_LTEOF 687dc407927Smrg 688dc407927Smrgcat >>"$CONFIG_LT" <<_LTEOF 689dc407927Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 690dc407927Smrg_LTEOF 691dc407927Smrg 692dc407927Smrgcat >>"$CONFIG_LT" <<\_LTEOF 693dc407927SmrgAC_MSG_NOTICE([creating $ofile]) 694dc407927Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 695dc407927SmrgAS_EXIT(0) 696dc407927Smrg_LTEOF 697dc407927Smrgchmod +x "$CONFIG_LT" 698dc407927Smrg 699dc407927Smrg# configure is writing to config.log, but config.lt does its own redirection, 700dc407927Smrg# appending to config.log, which fails on DOS, as config.log is still kept 701dc407927Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 702dc407927Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 703dd0822caSmrglt_cl_success=: 704dd0822caSmrgtest "$silent" = yes && 705dd0822caSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 706dd0822caSmrgexec AS_MESSAGE_LOG_FD>/dev/null 707dd0822caSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 708dd0822caSmrgexec AS_MESSAGE_LOG_FD>>config.log 709dd0822caSmrg$lt_cl_success || AS_EXIT(1) 710dc407927Smrg])# LT_OUTPUT 711dc407927Smrg 712dc407927Smrg 713dc407927Smrg# _LT_CONFIG(TAG) 714dc407927Smrg# --------------- 715dc407927Smrg# If TAG is the built-in tag, create an initial libtool script with a 716dc407927Smrg# default configuration from the untagged config vars. Otherwise add code 717dc407927Smrg# to config.status for appending the configuration named by TAG from the 718dc407927Smrg# matching tagged config vars. 719dc407927Smrgm4_defun([_LT_CONFIG], 720dc407927Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 721dc407927Smrg_LT_CONFIG_SAVE_COMMANDS([ 722dc407927Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 723dc407927Smrg m4_if(_LT_TAG, [C], [ 724dc407927Smrg # See if we are running on zsh, and set the options which allow our 725dc407927Smrg # commands through without removal of \ escapes. 726dc407927Smrg if test -n "${ZSH_VERSION+set}" ; then 727dc407927Smrg setopt NO_GLOB_SUBST 728dc407927Smrg fi 729dc407927Smrg 730dc407927Smrg cfgfile="${ofile}T" 731dc407927Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 732dc407927Smrg $RM "$cfgfile" 733dc407927Smrg 734dc407927Smrg cat <<_LT_EOF >> "$cfgfile" 735dc407927Smrg#! $SHELL 736dc407927Smrg 737dc407927Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 738dc407927Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 739dc407927Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 740dc407927Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 741dc407927Smrg# 742dc407927Smrg_LT_COPYING 743dc407927Smrg_LT_LIBTOOL_TAGS 744dc407927Smrg 745dc407927Smrg# ### BEGIN LIBTOOL CONFIG 746dc407927Smrg_LT_LIBTOOL_CONFIG_VARS 747dc407927Smrg_LT_LIBTOOL_TAG_VARS 748dc407927Smrg# ### END LIBTOOL CONFIG 749dc407927Smrg 750dc407927Smrg_LT_EOF 751dc407927Smrg 752dc407927Smrg case $host_os in 753dc407927Smrg aix3*) 754dc407927Smrg cat <<\_LT_EOF >> "$cfgfile" 755dc407927Smrg# AIX sometimes has problems with the GCC collect2 program. For some 756dc407927Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 757dc407927Smrg# vanish in a puff of smoke. 758dc407927Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 759dc407927Smrg COLLECT_NAMES= 760dc407927Smrg export COLLECT_NAMES 761dc407927Smrgfi 762dc407927Smrg_LT_EOF 763dc407927Smrg ;; 764dc407927Smrg esac 765dc407927Smrg 766dc407927Smrg _LT_PROG_LTMAIN 767dc407927Smrg 768dc407927Smrg # We use sed instead of cat because bash on DJGPP gets confused if 769dc407927Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 770dc407927Smrg # text mode, it properly converts lines to CR/LF. This bash problem 771dc407927Smrg # is reportedly fixed, but why not run on old versions too? 772dd0822caSmrg sed '$q' "$ltmain" >> "$cfgfile" \ 773dd0822caSmrg || (rm -f "$cfgfile"; exit 1) 774dc407927Smrg 775dd0822caSmrg _LT_PROG_REPLACE_SHELLFNS 776dc407927Smrg 777dd0822caSmrg mv -f "$cfgfile" "$ofile" || 778dc407927Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 779dc407927Smrg chmod +x "$ofile" 780dc407927Smrg], 781dc407927Smrg[cat <<_LT_EOF >> "$ofile" 782dc407927Smrg 783dc407927Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 784dc407927Smrgdnl in a comment (ie after a #). 785dc407927Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 786dc407927Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 787dc407927Smrg# ### END LIBTOOL TAG CONFIG: $1 788dc407927Smrg_LT_EOF 789dc407927Smrg])dnl /m4_if 790dc407927Smrg], 791dc407927Smrg[m4_if([$1], [], [ 792dc407927Smrg PACKAGE='$PACKAGE' 793dc407927Smrg VERSION='$VERSION' 794dc407927Smrg TIMESTAMP='$TIMESTAMP' 795dc407927Smrg RM='$RM' 796dc407927Smrg ofile='$ofile'], []) 797dc407927Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 798dc407927Smrg])# _LT_CONFIG 799dc407927Smrg 800dc407927Smrg 801dc407927Smrg# LT_SUPPORTED_TAG(TAG) 802dc407927Smrg# --------------------- 803dc407927Smrg# Trace this macro to discover what tags are supported by the libtool 804dc407927Smrg# --tag option, using: 805dc407927Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 806dc407927SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 807dc407927Smrg 808dc407927Smrg 809dc407927Smrg# C support is built-in for now 810dc407927Smrgm4_define([_LT_LANG_C_enabled], []) 811dc407927Smrgm4_define([_LT_TAGS], []) 812dc407927Smrg 813dc407927Smrg 814dc407927Smrg# LT_LANG(LANG) 815dc407927Smrg# ------------- 816dc407927Smrg# Enable libtool support for the given language if not already enabled. 817dc407927SmrgAC_DEFUN([LT_LANG], 818dc407927Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 819dc407927Smrgm4_case([$1], 820dc407927Smrg [C], [_LT_LANG(C)], 821dc407927Smrg [C++], [_LT_LANG(CXX)], 82275cbef56Smrg [Go], [_LT_LANG(GO)], 823dc407927Smrg [Java], [_LT_LANG(GCJ)], 824dc407927Smrg [Fortran 77], [_LT_LANG(F77)], 825dc407927Smrg [Fortran], [_LT_LANG(FC)], 826dc407927Smrg [Windows Resource], [_LT_LANG(RC)], 827dc407927Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 828dc407927Smrg [_LT_LANG($1)], 829dc407927Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 830dc407927Smrg])# LT_LANG 831dc407927Smrg 832dc407927Smrg 833dc407927Smrg# _LT_LANG(LANGNAME) 834dc407927Smrg# ------------------ 835dc407927Smrgm4_defun([_LT_LANG], 836dc407927Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 837dc407927Smrg [LT_SUPPORTED_TAG([$1])dnl 838dc407927Smrg m4_append([_LT_TAGS], [$1 ])dnl 839dc407927Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 840dc407927Smrg _LT_LANG_$1_CONFIG($1)])dnl 841dc407927Smrg])# _LT_LANG 842dc407927Smrg 843dc407927Smrg 84475cbef56Smrgm4_ifndef([AC_PROG_GO], [ 84575cbef56Smrg# NOTE: This macro has been submitted for inclusion into # 84675cbef56Smrg# GNU Autoconf as AC_PROG_GO. When it is available in # 84775cbef56Smrg# a released version of Autoconf we should remove this # 84875cbef56Smrg# macro and use it instead. # 84975cbef56Smrgm4_defun([AC_PROG_GO], 85075cbef56Smrg[AC_LANG_PUSH(Go)dnl 85175cbef56SmrgAC_ARG_VAR([GOC], [Go compiler command])dnl 85275cbef56SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl 85375cbef56Smrg_AC_ARG_VAR_LDFLAGS()dnl 85475cbef56SmrgAC_CHECK_TOOL(GOC, gccgo) 85575cbef56Smrgif test -z "$GOC"; then 85675cbef56Smrg if test -n "$ac_tool_prefix"; then 85775cbef56Smrg AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) 85875cbef56Smrg fi 85975cbef56Smrgfi 86075cbef56Smrgif test -z "$GOC"; then 86175cbef56Smrg AC_CHECK_PROG(GOC, gccgo, gccgo, false) 86275cbef56Smrgfi 86375cbef56Smrg])#m4_defun 86475cbef56Smrg])#m4_ifndef 86575cbef56Smrg 86675cbef56Smrg 867dc407927Smrg# _LT_LANG_DEFAULT_CONFIG 868dc407927Smrg# ----------------------- 869dc407927Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 870dc407927Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 871dc407927Smrg [LT_LANG(CXX)], 872dc407927Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 873dc407927Smrg 874dc407927SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 875dc407927Smrg [LT_LANG(F77)], 876dc407927Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 877dc407927Smrg 878dc407927SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 879dc407927Smrg [LT_LANG(FC)], 880dc407927Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 881dc407927Smrg 882dc407927Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 883dc407927Smrgdnl pulling things in needlessly. 884dc407927SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 885dc407927Smrg [LT_LANG(GCJ)], 886dc407927Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 887dc407927Smrg [LT_LANG(GCJ)], 888dc407927Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 889dc407927Smrg [LT_LANG(GCJ)], 890dc407927Smrg [m4_ifdef([AC_PROG_GCJ], 891dc407927Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 892dc407927Smrg m4_ifdef([A][M_PROG_GCJ], 893dc407927Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 894dc407927Smrg m4_ifdef([LT_PROG_GCJ], 895dc407927Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 896dc407927Smrg 89775cbef56SmrgAC_PROVIDE_IFELSE([AC_PROG_GO], 89875cbef56Smrg [LT_LANG(GO)], 89975cbef56Smrg [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) 90075cbef56Smrg 901dc407927SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 902dc407927Smrg [LT_LANG(RC)], 903dc407927Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 904dc407927Smrg])# _LT_LANG_DEFAULT_CONFIG 905dc407927Smrg 906dc407927Smrg# Obsolete macros: 907dc407927SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 908dc407927SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 909dc407927SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 910dc407927SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 911dd0822caSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) 912dc407927Smrgdnl aclocal-1.4 backwards compatibility: 913dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 914dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 915dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 916dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 917dd0822caSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], []) 918dc407927Smrg 919dc407927Smrg 920dc407927Smrg# _LT_TAG_COMPILER 921dc407927Smrg# ---------------- 922dc407927Smrgm4_defun([_LT_TAG_COMPILER], 9233eed67faSmbalmer[AC_REQUIRE([AC_PROG_CC])dnl 9243eed67faSmbalmer 925dc407927Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 926dc407927Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 927dc407927Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 928dc407927Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 929dc407927Smrg 9303eed67faSmbalmer# If no C compiler was specified, use CC. 9313eed67faSmbalmerLTCC=${LTCC-"$CC"} 9323eed67faSmbalmer 9333eed67faSmbalmer# If no C compiler flags were specified, use CFLAGS. 9343eed67faSmbalmerLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 9353eed67faSmbalmer 9363eed67faSmbalmer# Allow CC to be a program name with arguments. 9373eed67faSmbalmercompiler=$CC 938dc407927Smrg])# _LT_TAG_COMPILER 9393eed67faSmbalmer 9403eed67faSmbalmer 9413eed67faSmbalmer# _LT_COMPILER_BOILERPLATE 9423eed67faSmbalmer# ------------------------ 9433eed67faSmbalmer# Check for compiler boilerplate output or warnings with 9443eed67faSmbalmer# the simple compiler test code. 945dc407927Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 946dc407927Smrg[m4_require([_LT_DECL_SED])dnl 9473eed67faSmbalmerac_outfile=conftest.$ac_objext 9483eed67faSmbalmerecho "$lt_simple_compile_test_code" >conftest.$ac_ext 9493eed67faSmbalmereval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9503eed67faSmbalmer_lt_compiler_boilerplate=`cat conftest.err` 951dc407927Smrg$RM conftest* 9523eed67faSmbalmer])# _LT_COMPILER_BOILERPLATE 9533eed67faSmbalmer 9543eed67faSmbalmer 9553eed67faSmbalmer# _LT_LINKER_BOILERPLATE 9563eed67faSmbalmer# ---------------------- 9573eed67faSmbalmer# Check for linker boilerplate output or warnings with 9583eed67faSmbalmer# the simple link test code. 959dc407927Smrgm4_defun([_LT_LINKER_BOILERPLATE], 960dc407927Smrg[m4_require([_LT_DECL_SED])dnl 9613eed67faSmbalmerac_outfile=conftest.$ac_objext 9623eed67faSmbalmerecho "$lt_simple_link_test_code" >conftest.$ac_ext 9633eed67faSmbalmereval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 9643eed67faSmbalmer_lt_linker_boilerplate=`cat conftest.err` 965dc407927Smrg$RM -r conftest* 9663eed67faSmbalmer])# _LT_LINKER_BOILERPLATE 9673eed67faSmbalmer 9683eed67faSmbalmer# _LT_REQUIRED_DARWIN_CHECKS 969dc407927Smrg# ------------------------- 970dc407927Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 9713eed67faSmbalmer case $host_os in 9723eed67faSmbalmer rhapsody* | darwin*) 9733eed67faSmbalmer AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 9743eed67faSmbalmer AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 975dc407927Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 976dc407927Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 977dc407927Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 978dc407927Smrg _LT_DECL([], [DSYMUTIL], [1], 979dc407927Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 980dc407927Smrg _LT_DECL([], [NMEDIT], [1], 981dc407927Smrg [Tool to change global to local symbols on Mac OS X]) 982dc407927Smrg _LT_DECL([], [LIPO], [1], 983dc407927Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 984dc407927Smrg _LT_DECL([], [OTOOL], [1], 985dc407927Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 986dc407927Smrg _LT_DECL([], [OTOOL64], [1], 987dc407927Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 9883eed67faSmbalmer 9893eed67faSmbalmer AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 9903eed67faSmbalmer [lt_cv_apple_cc_single_mod=no 9913eed67faSmbalmer if test -z "${LT_MULTI_MODULE}"; then 992dc407927Smrg # By default we will add the -single_module flag. You can override 993dc407927Smrg # by either setting the environment variable LT_MULTI_MODULE 994dc407927Smrg # non-empty at configure time, or by adding -multi_module to the 995dc407927Smrg # link flags. 996dc407927Smrg rm -rf libconftest.dylib* 997dc407927Smrg echo "int foo(void){return 1;}" > conftest.c 998dc407927Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 999dc407927Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 1000dc407927Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 1001dc407927Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 1002dc407927Smrg _lt_result=$? 100375cbef56Smrg # If there is a non-empty error log, and "single_module" 100475cbef56Smrg # appears in it, assume the flag caused a linker warning 100575cbef56Smrg if test -s conftest.err && $GREP single_module conftest.err; then 100675cbef56Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 100775cbef56Smrg # Otherwise, if the output was created with a 0 exit code from 100875cbef56Smrg # the compiler, it worked. 100975cbef56Smrg elif test -f libconftest.dylib && test $_lt_result -eq 0; then 1010dc407927Smrg lt_cv_apple_cc_single_mod=yes 1011dc407927Smrg else 1012dc407927Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1013dc407927Smrg fi 1014dc407927Smrg rm -rf libconftest.dylib* 1015dc407927Smrg rm -f conftest.* 10163eed67faSmbalmer fi]) 101775cbef56Smrg 10183eed67faSmbalmer AC_CACHE_CHECK([for -exported_symbols_list linker flag], 10193eed67faSmbalmer [lt_cv_ld_exported_symbols_list], 10203eed67faSmbalmer [lt_cv_ld_exported_symbols_list=no 10213eed67faSmbalmer save_LDFLAGS=$LDFLAGS 10223eed67faSmbalmer echo "_main" > conftest.sym 10233eed67faSmbalmer LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 10243eed67faSmbalmer AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 1025dc407927Smrg [lt_cv_ld_exported_symbols_list=yes], 1026dc407927Smrg [lt_cv_ld_exported_symbols_list=no]) 1027dc407927Smrg LDFLAGS="$save_LDFLAGS" 10283eed67faSmbalmer ]) 102975cbef56Smrg 1030dd0822caSmrg AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], 1031dd0822caSmrg [lt_cv_ld_force_load=no 1032dd0822caSmrg cat > conftest.c << _LT_EOF 1033dd0822caSmrgint forced_loaded() { return 2;} 1034dd0822caSmrg_LT_EOF 1035dd0822caSmrg echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD 1036dd0822caSmrg $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD 1037dd0822caSmrg echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD 1038dd0822caSmrg $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD 1039dd0822caSmrg echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD 1040dd0822caSmrg $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD 1041dd0822caSmrg cat > conftest.c << _LT_EOF 1042dd0822caSmrgint main() { return 0;} 1043dd0822caSmrg_LT_EOF 1044dd0822caSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD 1045dd0822caSmrg $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err 1046dd0822caSmrg _lt_result=$? 104775cbef56Smrg if test -s conftest.err && $GREP force_load conftest.err; then 104875cbef56Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 104975cbef56Smrg elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then 1050dd0822caSmrg lt_cv_ld_force_load=yes 1051dd0822caSmrg else 1052dd0822caSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1053dd0822caSmrg fi 1054dd0822caSmrg rm -f conftest.err libconftest.a conftest conftest.c 1055dd0822caSmrg rm -rf conftest.dSYM 1056dd0822caSmrg ]) 10573eed67faSmbalmer case $host_os in 1058dc407927Smrg rhapsody* | darwin1.[[012]]) 10593eed67faSmbalmer _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 10603eed67faSmbalmer darwin1.*) 1061dc407927Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1062dc407927Smrg darwin*) # darwin 5.x on 10633eed67faSmbalmer # if running on 10.5 or later, the deployment target defaults 10643eed67faSmbalmer # to the OS version, if on x86, and 10.4, the deployment 10653eed67faSmbalmer # target defaults to 10.4. Don't you love it? 10663eed67faSmbalmer case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 1067dc407927Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 1068dc407927Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 1069dc407927Smrg 10.[[012]]*) 1070dc407927Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 1071dc407927Smrg 10.*) 1072dc407927Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10733eed67faSmbalmer esac 10743eed67faSmbalmer ;; 10753eed67faSmbalmer esac 10763eed67faSmbalmer if test "$lt_cv_apple_cc_single_mod" = "yes"; then 10773eed67faSmbalmer _lt_dar_single_mod='$single_module' 10783eed67faSmbalmer fi 10793eed67faSmbalmer if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 10803eed67faSmbalmer _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 10813eed67faSmbalmer else 1082dc407927Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 10833eed67faSmbalmer fi 1084dd0822caSmrg if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then 1085dc407927Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 10863eed67faSmbalmer else 10873eed67faSmbalmer _lt_dsymutil= 10883eed67faSmbalmer fi 10893eed67faSmbalmer ;; 10903eed67faSmbalmer esac 10913eed67faSmbalmer]) 10923eed67faSmbalmer 1093dc407927Smrg 109475cbef56Smrg# _LT_DARWIN_LINKER_FEATURES([TAG]) 109575cbef56Smrg# --------------------------------- 1096dc407927Smrg# Checks for linker and compiler features on darwin 1097dc407927Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 1098dc407927Smrg[ 1099dc407927Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1100dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1101dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1102dc407927Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1103dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1104dd0822caSmrg if test "$lt_cv_ld_force_load" = "yes"; then 1105dd0822caSmrg _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\"`' 110675cbef56Smrg m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], 110775cbef56Smrg [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) 1108dd0822caSmrg else 1109dd0822caSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1110dd0822caSmrg fi 1111dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1112dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1113dc407927Smrg case $cc_basename in 1114dc407927Smrg ifort*) _lt_dar_can_shared=yes ;; 1115dc407927Smrg *) _lt_dar_can_shared=$GCC ;; 1116dc407927Smrg esac 1117dc407927Smrg if test "$_lt_dar_can_shared" = "yes"; then 1118dd0822caSmrg output_verbose_link_cmd=func_echo_all 1119dc407927Smrg _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}" 1120dc407927Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1121dc407927Smrg _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}" 1122dc407927Smrg _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}" 1123dc407927Smrg m4_if([$1], [CXX], 1124dc407927Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1125dc407927Smrg _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}" 1126dc407927Smrg _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}" 1127dc407927Smrg fi 1128dc407927Smrg],[]) 1129dc407927Smrg else 1130dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1131dc407927Smrg fi 1132dc407927Smrg]) 1133dc407927Smrg 1134dd0822caSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) 1135dd0822caSmrg# ---------------------------------- 11363eed67faSmbalmer# Links a minimal program and checks the executable 11373eed67faSmbalmer# for the system default hardcoded library path. In most cases, 11383eed67faSmbalmer# this is /usr/lib:/lib, but when the MPI compilers are used 11393eed67faSmbalmer# the location of the communication and MPI libs are included too. 11403eed67faSmbalmer# If we don't find anything, use the default library path according 11413eed67faSmbalmer# to the aix ld manual. 1142dd0822caSmrg# Store the results from the different compilers for each TAGNAME. 1143dd0822caSmrg# Allow to override them for all tags through lt_cv_aix_libpath. 1144dc407927Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1145dc407927Smrg[m4_require([_LT_DECL_SED])dnl 1146dd0822caSmrgif test "${lt_cv_aix_libpath+set}" = set; then 1147dd0822caSmrg aix_libpath=$lt_cv_aix_libpath 1148dd0822caSmrgelse 1149dd0822caSmrg AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], 1150dd0822caSmrg [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ 1151dd0822caSmrg lt_aix_libpath_sed='[ 1152dd0822caSmrg /Import File Strings/,/^$/ { 1153dd0822caSmrg /^0/ { 1154dd0822caSmrg s/^0 *\([^ ]*\) *$/\1/ 1155dd0822caSmrg p 1156dd0822caSmrg } 1157dd0822caSmrg }]' 1158dd0822caSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1159dd0822caSmrg # Check for a 64-bit object if we didn't find anything. 1160dd0822caSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1161dd0822caSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1162dd0822caSmrg fi],[]) 1163dd0822caSmrg if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then 1164dd0822caSmrg _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" 1165dd0822caSmrg fi 1166dd0822caSmrg ]) 1167dd0822caSmrg aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) 1168dd0822caSmrgfi 1169dc407927Smrg])# _LT_SYS_MODULE_PATH_AIX 11703eed67faSmbalmer 11713eed67faSmbalmer 1172dc407927Smrg# _LT_SHELL_INIT(ARG) 1173dc407927Smrg# ------------------- 1174dc407927Smrgm4_define([_LT_SHELL_INIT], 1175dd0822caSmrg[m4_divert_text([M4SH-INIT], [$1 1176dd0822caSmrg])])# _LT_SHELL_INIT 1177dd0822caSmrg 11783eed67faSmbalmer 11793eed67faSmbalmer 1180dc407927Smrg# _LT_PROG_ECHO_BACKSLASH 1181dc407927Smrg# ----------------------- 1182dd0822caSmrg# Find how we can fake an echo command that does not interpret backslash. 1183dd0822caSmrg# In particular, with Autoconf 2.60 or later we add some code to the start 1184dd0822caSmrg# of the generated configure script which will find a shell with a builtin 1185dd0822caSmrg# printf (which we can use as an echo command). 1186dc407927Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1187dd0822caSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1188dd0822caSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1189dd0822caSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1190dd0822caSmrg 1191dd0822caSmrgAC_MSG_CHECKING([how to print strings]) 1192dd0822caSmrg# Test print first, because it will be a builtin if present. 1193dd0822caSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ 1194dd0822caSmrg test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then 1195dd0822caSmrg ECHO='print -r --' 1196dd0822caSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then 1197dd0822caSmrg ECHO='printf %s\n' 11983eed67faSmbalmerelse 1199dd0822caSmrg # Use this function as a fallback that always works. 1200dd0822caSmrg func_fallback_echo () 1201dd0822caSmrg { 1202dd0822caSmrg eval 'cat <<_LTECHO_EOF 1203dd0822caSmrg$[]1 1204dd0822caSmrg_LTECHO_EOF' 1205dd0822caSmrg } 1206dd0822caSmrg ECHO='func_fallback_echo' 12073eed67faSmbalmerfi 12083eed67faSmbalmer 1209dd0822caSmrg# func_echo_all arg... 1210dd0822caSmrg# Invoke $ECHO with all args, space-separated. 1211dd0822caSmrgfunc_echo_all () 1212dd0822caSmrg{ 1213dd0822caSmrg $ECHO "$*" 1214dd0822caSmrg} 12153eed67faSmbalmer 1216dd0822caSmrgcase "$ECHO" in 1217dd0822caSmrg printf*) AC_MSG_RESULT([printf]) ;; 1218dd0822caSmrg print*) AC_MSG_RESULT([print -r]) ;; 1219dd0822caSmrg *) AC_MSG_RESULT([cat]) ;; 1220dd0822caSmrgesac 12213eed67faSmbalmer 1222dd0822caSmrgm4_ifdef([_AS_DETECT_SUGGESTED], 1223dd0822caSmrg[_AS_DETECT_SUGGESTED([ 1224dd0822caSmrg test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( 1225dd0822caSmrg ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 1226dd0822caSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO 1227dd0822caSmrg ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO 1228dd0822caSmrg PATH=/empty FPATH=/empty; export PATH FPATH 1229dd0822caSmrg test "X`printf %s $ECHO`" = "X$ECHO" \ 1230dd0822caSmrg || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) 12313eed67faSmbalmer 1232dc407927Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1233dd0822caSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) 1234dc407927Smrg])# _LT_PROG_ECHO_BACKSLASH 12353eed67faSmbalmer 12363eed67faSmbalmer 1237dd0822caSmrg# _LT_WITH_SYSROOT 1238dd0822caSmrg# ---------------- 1239dd0822caSmrgAC_DEFUN([_LT_WITH_SYSROOT], 1240dd0822caSmrg[AC_MSG_CHECKING([for sysroot]) 1241dd0822caSmrgAC_ARG_WITH([sysroot], 1242dd0822caSmrg[ --with-sysroot[=DIR] Search for dependent libraries within DIR 1243dd0822caSmrg (or the compiler's sysroot if not specified).], 1244dd0822caSmrg[], [with_sysroot=no]) 1245dd0822caSmrg 1246dd0822caSmrgdnl lt_sysroot will always be passed unquoted. We quote it here 1247dd0822caSmrgdnl in case the user passed a directory name. 1248dd0822caSmrglt_sysroot= 1249dd0822caSmrgcase ${with_sysroot} in #( 1250dd0822caSmrg yes) 1251dd0822caSmrg if test "$GCC" = yes; then 1252dd0822caSmrg lt_sysroot=`$CC --print-sysroot 2>/dev/null` 1253dd0822caSmrg fi 1254dd0822caSmrg ;; #( 1255dd0822caSmrg /*) 1256dd0822caSmrg lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` 1257dd0822caSmrg ;; #( 1258dd0822caSmrg no|'') 1259dd0822caSmrg ;; #( 1260dd0822caSmrg *) 1261dd0822caSmrg AC_MSG_RESULT([${with_sysroot}]) 1262dd0822caSmrg AC_MSG_ERROR([The sysroot must be an absolute path.]) 1263dd0822caSmrg ;; 1264dd0822caSmrgesac 1265dd0822caSmrg 1266dd0822caSmrg AC_MSG_RESULT([${lt_sysroot:-no}]) 1267dd0822caSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl 1268dd0822caSmrg[dependent libraries, and in which our libraries should be installed.])]) 1269dd0822caSmrg 1270dc407927Smrg# _LT_ENABLE_LOCK 1271dc407927Smrg# --------------- 1272dc407927Smrgm4_defun([_LT_ENABLE_LOCK], 12733eed67faSmbalmer[AC_ARG_ENABLE([libtool-lock], 1274dc407927Smrg [AS_HELP_STRING([--disable-libtool-lock], 1275dc407927Smrg [avoid locking (might break parallel builds)])]) 12763eed67faSmbalmertest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 12773eed67faSmbalmer 12783eed67faSmbalmer# Some flags need to be propagated to the compiler or linker for good 12793eed67faSmbalmer# libtool support. 12803eed67faSmbalmercase $host in 12813eed67faSmbalmeria64-*-hpux*) 12823eed67faSmbalmer # Find out which ABI we are using. 12833eed67faSmbalmer echo 'int i;' > conftest.$ac_ext 12843eed67faSmbalmer if AC_TRY_EVAL(ac_compile); then 12853eed67faSmbalmer case `/usr/bin/file conftest.$ac_objext` in 1286dc407927Smrg *ELF-32*) 1287dc407927Smrg HPUX_IA64_MODE="32" 1288dc407927Smrg ;; 1289dc407927Smrg *ELF-64*) 1290dc407927Smrg HPUX_IA64_MODE="64" 1291dc407927Smrg ;; 12923eed67faSmbalmer esac 12933eed67faSmbalmer fi 12943eed67faSmbalmer rm -rf conftest* 12953eed67faSmbalmer ;; 12963eed67faSmbalmer*-*-irix6*) 12973eed67faSmbalmer # Find out which ABI we are using. 1298dd0822caSmrg echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext 12993eed67faSmbalmer if AC_TRY_EVAL(ac_compile); then 1300dc407927Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1301dc407927Smrg case `/usr/bin/file conftest.$ac_objext` in 1302dc407927Smrg *32-bit*) 1303dc407927Smrg LD="${LD-ld} -melf32bsmip" 1304dc407927Smrg ;; 1305dc407927Smrg *N32*) 1306dc407927Smrg LD="${LD-ld} -melf32bmipn32" 1307dc407927Smrg ;; 1308dc407927Smrg *64-bit*) 1309dc407927Smrg LD="${LD-ld} -melf64bmip" 1310dc407927Smrg ;; 1311dc407927Smrg esac 1312dc407927Smrg else 1313dc407927Smrg case `/usr/bin/file conftest.$ac_objext` in 1314dc407927Smrg *32-bit*) 1315dc407927Smrg LD="${LD-ld} -32" 1316dc407927Smrg ;; 1317dc407927Smrg *N32*) 1318dc407927Smrg LD="${LD-ld} -n32" 1319dc407927Smrg ;; 1320dc407927Smrg *64-bit*) 1321dc407927Smrg LD="${LD-ld} -64" 1322dc407927Smrg ;; 1323dc407927Smrg esac 1324dc407927Smrg fi 13253eed67faSmbalmer fi 13263eed67faSmbalmer rm -rf conftest* 13273eed67faSmbalmer ;; 13283eed67faSmbalmer 13293eed67faSmbalmerx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1330dc407927Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 13313eed67faSmbalmer # Find out which ABI we are using. 13323eed67faSmbalmer echo 'int i;' > conftest.$ac_ext 13333eed67faSmbalmer if AC_TRY_EVAL(ac_compile); then 13343eed67faSmbalmer case `/usr/bin/file conftest.o` in 1335dc407927Smrg *32-bit*) 1336dc407927Smrg case $host in 1337dc407927Smrg x86_64-*kfreebsd*-gnu) 1338dc407927Smrg LD="${LD-ld} -m elf_i386_fbsd" 1339dc407927Smrg ;; 1340dc407927Smrg x86_64-*linux*) 1341dc407927Smrg LD="${LD-ld} -m elf_i386" 1342dc407927Smrg ;; 1343dc407927Smrg ppc64-*linux*|powerpc64-*linux*) 1344dc407927Smrg LD="${LD-ld} -m elf32ppclinux" 1345dc407927Smrg ;; 1346dc407927Smrg s390x-*linux*) 1347dc407927Smrg LD="${LD-ld} -m elf_s390" 1348dc407927Smrg ;; 1349dc407927Smrg sparc64-*linux*) 1350dc407927Smrg LD="${LD-ld} -m elf32_sparc" 1351dc407927Smrg ;; 1352dc407927Smrg esac 1353dc407927Smrg ;; 1354dc407927Smrg *64-bit*) 1355dc407927Smrg case $host in 1356dc407927Smrg x86_64-*kfreebsd*-gnu) 1357dc407927Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1358dc407927Smrg ;; 1359dc407927Smrg x86_64-*linux*) 1360dc407927Smrg LD="${LD-ld} -m elf_x86_64" 1361dc407927Smrg ;; 1362dc407927Smrg ppc*-*linux*|powerpc*-*linux*) 1363dc407927Smrg LD="${LD-ld} -m elf64ppc" 1364dc407927Smrg ;; 1365dc407927Smrg s390*-*linux*|s390*-*tpf*) 1366dc407927Smrg LD="${LD-ld} -m elf64_s390" 1367dc407927Smrg ;; 1368dc407927Smrg sparc*-*linux*) 1369dc407927Smrg LD="${LD-ld} -m elf64_sparc" 1370dc407927Smrg ;; 1371dc407927Smrg esac 1372dc407927Smrg ;; 13733eed67faSmbalmer esac 13743eed67faSmbalmer fi 13753eed67faSmbalmer rm -rf conftest* 13763eed67faSmbalmer ;; 13773eed67faSmbalmer 13783eed67faSmbalmer*-*-sco3.2v5*) 13793eed67faSmbalmer # On SCO OpenServer 5, we need -belf to get full-featured binaries. 13803eed67faSmbalmer SAVE_CFLAGS="$CFLAGS" 13813eed67faSmbalmer CFLAGS="$CFLAGS -belf" 13823eed67faSmbalmer AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 13833eed67faSmbalmer [AC_LANG_PUSH(C) 1384dc407927Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 13853eed67faSmbalmer AC_LANG_POP]) 13863eed67faSmbalmer if test x"$lt_cv_cc_needs_belf" != x"yes"; then 13873eed67faSmbalmer # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 13883eed67faSmbalmer CFLAGS="$SAVE_CFLAGS" 13893eed67faSmbalmer fi 13903eed67faSmbalmer ;; 139175cbef56Smrg*-*solaris*) 13923eed67faSmbalmer # Find out which ABI we are using. 13933eed67faSmbalmer echo 'int i;' > conftest.$ac_ext 13943eed67faSmbalmer if AC_TRY_EVAL(ac_compile); then 13953eed67faSmbalmer case `/usr/bin/file conftest.o` in 13963eed67faSmbalmer *64-bit*) 13973eed67faSmbalmer case $lt_cv_prog_gnu_ld in 139875cbef56Smrg yes*) 139975cbef56Smrg case $host in 140075cbef56Smrg i?86-*-solaris*) 140175cbef56Smrg LD="${LD-ld} -m elf_x86_64" 140275cbef56Smrg ;; 140375cbef56Smrg sparc*-*-solaris*) 140475cbef56Smrg LD="${LD-ld} -m elf64_sparc" 140575cbef56Smrg ;; 140675cbef56Smrg esac 140775cbef56Smrg # GNU ld 2.21 introduced _sol2 emulations. Use them if available. 140875cbef56Smrg if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then 140975cbef56Smrg LD="${LD-ld}_sol2" 141075cbef56Smrg fi 141175cbef56Smrg ;; 14123eed67faSmbalmer *) 1413dc407927Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 14143eed67faSmbalmer LD="${LD-ld} -64" 14153eed67faSmbalmer fi 14163eed67faSmbalmer ;; 14173eed67faSmbalmer esac 14183eed67faSmbalmer ;; 14193eed67faSmbalmer esac 14203eed67faSmbalmer fi 14213eed67faSmbalmer rm -rf conftest* 14223eed67faSmbalmer ;; 14233eed67faSmbalmeresac 14243eed67faSmbalmer 14253eed67faSmbalmerneed_locks="$enable_libtool_lock" 1426dc407927Smrg])# _LT_ENABLE_LOCK 1427dc407927Smrg 1428dc407927Smrg 1429dd0822caSmrg# _LT_PROG_AR 1430dd0822caSmrg# ----------- 1431dd0822caSmrgm4_defun([_LT_PROG_AR], 1432dd0822caSmrg[AC_CHECK_TOOLS(AR, [ar], false) 1433dd0822caSmrg: ${AR=ar} 1434dd0822caSmrg: ${AR_FLAGS=cru} 1435dd0822caSmrg_LT_DECL([], [AR], [1], [The archiver]) 1436dd0822caSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) 1437dd0822caSmrg 1438dd0822caSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], 1439dd0822caSmrg [lt_cv_ar_at_file=no 1440dd0822caSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM], 1441dd0822caSmrg [echo conftest.$ac_objext > conftest.lst 1442dd0822caSmrg lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' 1443dd0822caSmrg AC_TRY_EVAL([lt_ar_try]) 1444dd0822caSmrg if test "$ac_status" -eq 0; then 1445dd0822caSmrg # Ensure the archiver fails upon bogus file names. 1446dd0822caSmrg rm -f conftest.$ac_objext libconftest.a 1447dd0822caSmrg AC_TRY_EVAL([lt_ar_try]) 1448dd0822caSmrg if test "$ac_status" -ne 0; then 1449dd0822caSmrg lt_cv_ar_at_file=@ 1450dd0822caSmrg fi 1451dd0822caSmrg fi 1452dd0822caSmrg rm -f conftest.* libconftest.a 1453dd0822caSmrg ]) 1454dd0822caSmrg ]) 1455dd0822caSmrg 1456dd0822caSmrgif test "x$lt_cv_ar_at_file" = xno; then 1457dd0822caSmrg archiver_list_spec= 1458dd0822caSmrgelse 1459dd0822caSmrg archiver_list_spec=$lt_cv_ar_at_file 1460dd0822caSmrgfi 1461dd0822caSmrg_LT_DECL([], [archiver_list_spec], [1], 1462dd0822caSmrg [How to feed a file listing to the archiver]) 1463dd0822caSmrg])# _LT_PROG_AR 1464dd0822caSmrg 1465dd0822caSmrg 1466dc407927Smrg# _LT_CMD_OLD_ARCHIVE 1467dc407927Smrg# ------------------- 1468dc407927Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1469dd0822caSmrg[_LT_PROG_AR 1470dc407927Smrg 1471dc407927SmrgAC_CHECK_TOOL(STRIP, strip, :) 1472dc407927Smrgtest -z "$STRIP" && STRIP=: 1473dc407927Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1474dc407927Smrg 1475dc407927SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1476dc407927Smrgtest -z "$RANLIB" && RANLIB=: 1477dc407927Smrg_LT_DECL([], [RANLIB], [1], 1478dc407927Smrg [Commands used to install an old-style archive]) 1479dc407927Smrg 1480dc407927Smrg# Determine commands to create old-style static archives. 1481dc407927Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1482dc407927Smrgold_postinstall_cmds='chmod 644 $oldlib' 1483dc407927Smrgold_postuninstall_cmds= 14843eed67faSmbalmer 1485dc407927Smrgif test -n "$RANLIB"; then 1486dc407927Smrg case $host_os in 1487dc407927Smrg openbsd*) 148875cbef56Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" 1489dc407927Smrg ;; 1490dc407927Smrg *) 149175cbef56Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" 1492dc407927Smrg ;; 1493dc407927Smrg esac 149475cbef56Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" 1495dc407927Smrgfi 1496dd0822caSmrg 1497dd0822caSmrgcase $host_os in 1498dd0822caSmrg darwin*) 1499dd0822caSmrg lock_old_archive_extraction=yes ;; 1500dd0822caSmrg *) 1501dd0822caSmrg lock_old_archive_extraction=no ;; 1502dd0822caSmrgesac 1503dc407927Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1504dc407927Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1505dc407927Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1506dc407927Smrg [Commands used to build an old-style archive]) 1507dd0822caSmrg_LT_DECL([], [lock_old_archive_extraction], [0], 1508dd0822caSmrg [Whether to use a lock for old archive extraction]) 1509dc407927Smrg])# _LT_CMD_OLD_ARCHIVE 15103eed67faSmbalmer 15113eed67faSmbalmer 1512dc407927Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 15133eed67faSmbalmer# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 15143eed67faSmbalmer# ---------------------------------------------------------------- 15153eed67faSmbalmer# Check whether the given compiler option works 1516dc407927SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1517dc407927Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1518dc407927Smrgm4_require([_LT_DECL_SED])dnl 15193eed67faSmbalmerAC_CACHE_CHECK([$1], [$2], 15203eed67faSmbalmer [$2=no 1521dc407927Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 15223eed67faSmbalmer echo "$lt_simple_compile_test_code" > conftest.$ac_ext 15233eed67faSmbalmer lt_compiler_flag="$3" 15243eed67faSmbalmer # Insert the option either (1) after the last *FLAGS variable, or 15253eed67faSmbalmer # (2) before a word containing "conftest.", or (3) at the end. 15263eed67faSmbalmer # Note that $ac_compile itself does not contain backslashes and begins 15273eed67faSmbalmer # with a dollar sign (not a hyphen), so the echo should work correctly. 15283eed67faSmbalmer # The option is referenced via a variable to avoid confusing sed. 15293eed67faSmbalmer lt_compile=`echo "$ac_compile" | $SED \ 15303eed67faSmbalmer -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 15313eed67faSmbalmer -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 15323eed67faSmbalmer -e 's:$: $lt_compiler_flag:'` 1533dd0822caSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 15343eed67faSmbalmer (eval "$lt_compile" 2>conftest.err) 15353eed67faSmbalmer ac_status=$? 15363eed67faSmbalmer cat conftest.err >&AS_MESSAGE_LOG_FD 1537dd0822caSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 15383eed67faSmbalmer if (exit $ac_status) && test -s "$ac_outfile"; then 15393eed67faSmbalmer # The compiler can only warn and ignore the option if not recognized 15403eed67faSmbalmer # So say no if there are warnings other than the usual output. 1541dd0822caSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp 15423eed67faSmbalmer $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15433eed67faSmbalmer if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 15443eed67faSmbalmer $2=yes 15453eed67faSmbalmer fi 15463eed67faSmbalmer fi 1547dc407927Smrg $RM conftest* 15483eed67faSmbalmer]) 15493eed67faSmbalmer 15503eed67faSmbalmerif test x"[$]$2" = xyes; then 1551dc407927Smrg m4_if([$5], , :, [$5]) 15523eed67faSmbalmerelse 1553dc407927Smrg m4_if([$6], , :, [$6]) 15543eed67faSmbalmerfi 1555dc407927Smrg])# _LT_COMPILER_OPTION 15563eed67faSmbalmer 1557dc407927Smrg# Old name: 1558dc407927SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1559dc407927Smrgdnl aclocal-1.4 backwards compatibility: 1560dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 15613eed67faSmbalmer 1562dc407927Smrg 1563dc407927Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1564dc407927Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1565dc407927Smrg# ---------------------------------------------------- 1566dc407927Smrg# Check whether the given linker option works 1567dc407927SmrgAC_DEFUN([_LT_LINKER_OPTION], 1568dc407927Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1569dc407927Smrgm4_require([_LT_DECL_SED])dnl 15703eed67faSmbalmerAC_CACHE_CHECK([$1], [$2], 15713eed67faSmbalmer [$2=no 15723eed67faSmbalmer save_LDFLAGS="$LDFLAGS" 15733eed67faSmbalmer LDFLAGS="$LDFLAGS $3" 15743eed67faSmbalmer echo "$lt_simple_link_test_code" > conftest.$ac_ext 15753eed67faSmbalmer if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 15763eed67faSmbalmer # The linker can only warn and ignore the option if not recognized 15773eed67faSmbalmer # So say no if there are warnings 15783eed67faSmbalmer if test -s conftest.err; then 15793eed67faSmbalmer # Append any errors to the config.log. 15803eed67faSmbalmer cat conftest.err 1>&AS_MESSAGE_LOG_FD 1581dd0822caSmrg $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp 15823eed67faSmbalmer $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 15833eed67faSmbalmer if diff conftest.exp conftest.er2 >/dev/null; then 15843eed67faSmbalmer $2=yes 15853eed67faSmbalmer fi 15863eed67faSmbalmer else 15873eed67faSmbalmer $2=yes 15883eed67faSmbalmer fi 15893eed67faSmbalmer fi 1590dc407927Smrg $RM -r conftest* 15913eed67faSmbalmer LDFLAGS="$save_LDFLAGS" 15923eed67faSmbalmer]) 15933eed67faSmbalmer 15943eed67faSmbalmerif test x"[$]$2" = xyes; then 1595dc407927Smrg m4_if([$4], , :, [$4]) 15963eed67faSmbalmerelse 1597dc407927Smrg m4_if([$5], , :, [$5]) 15983eed67faSmbalmerfi 1599dc407927Smrg])# _LT_LINKER_OPTION 16003eed67faSmbalmer 1601dc407927Smrg# Old name: 1602dc407927SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1603dc407927Smrgdnl aclocal-1.4 backwards compatibility: 1604dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 16053eed67faSmbalmer 1606dc407927Smrg 1607dc407927Smrg# LT_CMD_MAX_LEN 1608dc407927Smrg#--------------- 1609dc407927SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1610dc407927Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1611dc407927Smrg# find the maximum length of command line arguments 16123eed67faSmbalmerAC_MSG_CHECKING([the maximum length of command line arguments]) 16133eed67faSmbalmerAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 16143eed67faSmbalmer i=0 16153eed67faSmbalmer teststring="ABCD" 16163eed67faSmbalmer 16173eed67faSmbalmer case $build_os in 16183eed67faSmbalmer msdosdjgpp*) 16193eed67faSmbalmer # On DJGPP, this test can blow up pretty badly due to problems in libc 16203eed67faSmbalmer # (any single argument exceeding 2000 bytes causes a buffer overrun 16213eed67faSmbalmer # during glob expansion). Even if it were fixed, the result of this 16223eed67faSmbalmer # check would be larger than it should be. 16233eed67faSmbalmer lt_cv_sys_max_cmd_len=12288; # 12K is about right 16243eed67faSmbalmer ;; 16253eed67faSmbalmer 16263eed67faSmbalmer gnu*) 16273eed67faSmbalmer # Under GNU Hurd, this test is not required because there is 16283eed67faSmbalmer # no limit to the length of command line arguments. 16293eed67faSmbalmer # Libtool will interpret -1 as no limit whatsoever 16303eed67faSmbalmer lt_cv_sys_max_cmd_len=-1; 16313eed67faSmbalmer ;; 16323eed67faSmbalmer 1633dc407927Smrg cygwin* | mingw* | cegcc*) 16343eed67faSmbalmer # On Win9x/ME, this test blows up -- it succeeds, but takes 16353eed67faSmbalmer # about 5 minutes as the teststring grows exponentially. 16363eed67faSmbalmer # Worse, since 9x/ME are not pre-emptively multitasking, 16373eed67faSmbalmer # you end up with a "frozen" computer, even though with patience 16383eed67faSmbalmer # the test eventually succeeds (with a max line length of 256k). 16393eed67faSmbalmer # Instead, let's just punt: use the minimum linelength reported by 16403eed67faSmbalmer # all of the supported platforms: 8192 (on NT/2K/XP). 16413eed67faSmbalmer lt_cv_sys_max_cmd_len=8192; 16423eed67faSmbalmer ;; 16433eed67faSmbalmer 1644dd0822caSmrg mint*) 1645dd0822caSmrg # On MiNT this can take a long time and run out of memory. 1646dd0822caSmrg lt_cv_sys_max_cmd_len=8192; 1647dd0822caSmrg ;; 1648dd0822caSmrg 16493eed67faSmbalmer amigaos*) 16503eed67faSmbalmer # On AmigaOS with pdksh, this test takes hours, literally. 16513eed67faSmbalmer # So we just punt and use a minimum line length of 8192. 16523eed67faSmbalmer lt_cv_sys_max_cmd_len=8192; 16533eed67faSmbalmer ;; 16543eed67faSmbalmer 16553eed67faSmbalmer netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 16563eed67faSmbalmer # This has been around since 386BSD, at least. Likely further. 16573eed67faSmbalmer if test -x /sbin/sysctl; then 16583eed67faSmbalmer lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 16593eed67faSmbalmer elif test -x /usr/sbin/sysctl; then 16603eed67faSmbalmer lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 16613eed67faSmbalmer else 16623eed67faSmbalmer lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 16633eed67faSmbalmer fi 16643eed67faSmbalmer # And add a safety zone 16653eed67faSmbalmer lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 16663eed67faSmbalmer lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 16673eed67faSmbalmer ;; 16683eed67faSmbalmer 16693eed67faSmbalmer interix*) 16703eed67faSmbalmer # We know the value 262144 and hardcode it with a safety zone (like BSD) 16713eed67faSmbalmer lt_cv_sys_max_cmd_len=196608 16723eed67faSmbalmer ;; 16733eed67faSmbalmer 167475cbef56Smrg os2*) 167575cbef56Smrg # The test takes a long time on OS/2. 167675cbef56Smrg lt_cv_sys_max_cmd_len=8192 167775cbef56Smrg ;; 167875cbef56Smrg 16793eed67faSmbalmer osf*) 16803eed67faSmbalmer # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 16813eed67faSmbalmer # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 16823eed67faSmbalmer # nice to cause kernel panics so lets avoid the loop below. 16833eed67faSmbalmer # First set a reasonable default. 16843eed67faSmbalmer lt_cv_sys_max_cmd_len=16384 16853eed67faSmbalmer # 16863eed67faSmbalmer if test -x /sbin/sysconfig; then 16873eed67faSmbalmer case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 16883eed67faSmbalmer *1*) lt_cv_sys_max_cmd_len=-1 ;; 16893eed67faSmbalmer esac 16903eed67faSmbalmer fi 16913eed67faSmbalmer ;; 16923eed67faSmbalmer sco3.2v5*) 16933eed67faSmbalmer lt_cv_sys_max_cmd_len=102400 16943eed67faSmbalmer ;; 16953eed67faSmbalmer sysv5* | sco5v6* | sysv4.2uw2*) 16963eed67faSmbalmer kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 16973eed67faSmbalmer if test -n "$kargmax"; then 1698dc407927Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 16993eed67faSmbalmer else 17003eed67faSmbalmer lt_cv_sys_max_cmd_len=32768 17013eed67faSmbalmer fi 17023eed67faSmbalmer ;; 17033eed67faSmbalmer *) 17043eed67faSmbalmer lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 17053eed67faSmbalmer if test -n "$lt_cv_sys_max_cmd_len"; then 17063eed67faSmbalmer lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 17073eed67faSmbalmer lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 17083eed67faSmbalmer else 1709dc407927Smrg # Make teststring a little bigger before we do anything with it. 1710dc407927Smrg # a 1K string should be a reasonable start. 1711dc407927Smrg for i in 1 2 3 4 5 6 7 8 ; do 1712dc407927Smrg teststring=$teststring$teststring 1713dc407927Smrg done 17143eed67faSmbalmer SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1715dc407927Smrg # If test is not a shell built-in, we'll probably end up computing a 1716dc407927Smrg # maximum length that is only half of the actual maximum length, but 1717dc407927Smrg # we can't tell. 171875cbef56Smrg while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ 1719dd0822caSmrg = "X$teststring$teststring"; } >/dev/null 2>&1 && 17203eed67faSmbalmer test $i != 17 # 1/2 MB should be enough 17213eed67faSmbalmer do 17223eed67faSmbalmer i=`expr $i + 1` 17233eed67faSmbalmer teststring=$teststring$teststring 17243eed67faSmbalmer done 1725dc407927Smrg # Only check the string length outside the loop. 1726dc407927Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 17273eed67faSmbalmer teststring= 1728dc407927Smrg # Add a significant safety factor because C++ compilers can tack on 1729dc407927Smrg # massive amounts of additional arguments before passing them to the 1730dc407927Smrg # linker. It appears as though 1/2 is a usable value. 17313eed67faSmbalmer lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 17323eed67faSmbalmer fi 17333eed67faSmbalmer ;; 17343eed67faSmbalmer esac 17353eed67faSmbalmer]) 17363eed67faSmbalmerif test -n $lt_cv_sys_max_cmd_len ; then 17373eed67faSmbalmer AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 17383eed67faSmbalmerelse 17393eed67faSmbalmer AC_MSG_RESULT(none) 17403eed67faSmbalmerfi 1741dc407927Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1742dc407927Smrg_LT_DECL([], [max_cmd_len], [0], 1743dc407927Smrg [What is the maximum length of a command?]) 1744dc407927Smrg])# LT_CMD_MAX_LEN 17453eed67faSmbalmer 1746dc407927Smrg# Old name: 1747dc407927SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1748dc407927Smrgdnl aclocal-1.4 backwards compatibility: 1749dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 17503eed67faSmbalmer 1751dc407927Smrg 1752dc407927Smrg# _LT_HEADER_DLFCN 1753dc407927Smrg# ---------------- 1754dc407927Smrgm4_defun([_LT_HEADER_DLFCN], 1755dc407927Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1756dc407927Smrg])# _LT_HEADER_DLFCN 17573eed67faSmbalmer 17583eed67faSmbalmer 1759dc407927Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1760dc407927Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1761dc407927Smrg# ---------------------------------------------------------------- 1762dc407927Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1763dc407927Smrg[m4_require([_LT_HEADER_DLFCN])dnl 17643eed67faSmbalmerif test "$cross_compiling" = yes; then : 17653eed67faSmbalmer [$4] 17663eed67faSmbalmerelse 17673eed67faSmbalmer lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 17683eed67faSmbalmer lt_status=$lt_dlunknown 1769dc407927Smrg cat > conftest.$ac_ext <<_LT_EOF 1770dd0822caSmrg[#line $LINENO "configure" 17713eed67faSmbalmer#include "confdefs.h" 17723eed67faSmbalmer 17733eed67faSmbalmer#if HAVE_DLFCN_H 17743eed67faSmbalmer#include <dlfcn.h> 17753eed67faSmbalmer#endif 17763eed67faSmbalmer 17773eed67faSmbalmer#include <stdio.h> 17783eed67faSmbalmer 17793eed67faSmbalmer#ifdef RTLD_GLOBAL 17803eed67faSmbalmer# define LT_DLGLOBAL RTLD_GLOBAL 17813eed67faSmbalmer#else 17823eed67faSmbalmer# ifdef DL_GLOBAL 17833eed67faSmbalmer# define LT_DLGLOBAL DL_GLOBAL 17843eed67faSmbalmer# else 17853eed67faSmbalmer# define LT_DLGLOBAL 0 17863eed67faSmbalmer# endif 17873eed67faSmbalmer#endif 17883eed67faSmbalmer 17893eed67faSmbalmer/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 17903eed67faSmbalmer find out it does not work in some platform. */ 17913eed67faSmbalmer#ifndef LT_DLLAZY_OR_NOW 17923eed67faSmbalmer# ifdef RTLD_LAZY 17933eed67faSmbalmer# define LT_DLLAZY_OR_NOW RTLD_LAZY 17943eed67faSmbalmer# else 17953eed67faSmbalmer# ifdef DL_LAZY 17963eed67faSmbalmer# define LT_DLLAZY_OR_NOW DL_LAZY 17973eed67faSmbalmer# else 17983eed67faSmbalmer# ifdef RTLD_NOW 17993eed67faSmbalmer# define LT_DLLAZY_OR_NOW RTLD_NOW 18003eed67faSmbalmer# else 18013eed67faSmbalmer# ifdef DL_NOW 18023eed67faSmbalmer# define LT_DLLAZY_OR_NOW DL_NOW 18033eed67faSmbalmer# else 18043eed67faSmbalmer# define LT_DLLAZY_OR_NOW 0 18053eed67faSmbalmer# endif 18063eed67faSmbalmer# endif 18073eed67faSmbalmer# endif 18083eed67faSmbalmer# endif 18093eed67faSmbalmer#endif 18103eed67faSmbalmer 1811dd0822caSmrg/* When -fvisbility=hidden is used, assume the code has been annotated 1812dd0822caSmrg correspondingly for the symbols needed. */ 1813dd0822caSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) 1814dd0822caSmrgint fnord () __attribute__((visibility("default"))); 1815dd0822caSmrg#endif 1816dd0822caSmrg 1817dd0822caSmrgint fnord () { return 42; } 18183eed67faSmbalmerint main () 18193eed67faSmbalmer{ 18203eed67faSmbalmer void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 18213eed67faSmbalmer int status = $lt_dlunknown; 18223eed67faSmbalmer 18233eed67faSmbalmer if (self) 18243eed67faSmbalmer { 18253eed67faSmbalmer if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1826dd0822caSmrg else 1827dd0822caSmrg { 1828dd0822caSmrg if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1829dd0822caSmrg else puts (dlerror ()); 1830dd0822caSmrg } 18313eed67faSmbalmer /* dlclose (self); */ 18323eed67faSmbalmer } 18333eed67faSmbalmer else 18343eed67faSmbalmer puts (dlerror ()); 18353eed67faSmbalmer 1836dc407927Smrg return status; 18373eed67faSmbalmer}] 1838dc407927Smrg_LT_EOF 18393eed67faSmbalmer if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 18403eed67faSmbalmer (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 18413eed67faSmbalmer lt_status=$? 18423eed67faSmbalmer case x$lt_status in 18433eed67faSmbalmer x$lt_dlno_uscore) $1 ;; 18443eed67faSmbalmer x$lt_dlneed_uscore) $2 ;; 18453eed67faSmbalmer x$lt_dlunknown|x*) $3 ;; 18463eed67faSmbalmer esac 18473eed67faSmbalmer else : 18483eed67faSmbalmer # compilation failed 18493eed67faSmbalmer $3 18503eed67faSmbalmer fi 18513eed67faSmbalmerfi 18523eed67faSmbalmerrm -fr conftest* 1853dc407927Smrg])# _LT_TRY_DLOPEN_SELF 18543eed67faSmbalmer 18553eed67faSmbalmer 1856dc407927Smrg# LT_SYS_DLOPEN_SELF 1857dc407927Smrg# ------------------ 1858dc407927SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1859dc407927Smrg[m4_require([_LT_HEADER_DLFCN])dnl 18603eed67faSmbalmerif test "x$enable_dlopen" != xyes; then 18613eed67faSmbalmer enable_dlopen=unknown 18623eed67faSmbalmer enable_dlopen_self=unknown 18633eed67faSmbalmer enable_dlopen_self_static=unknown 18643eed67faSmbalmerelse 18653eed67faSmbalmer lt_cv_dlopen=no 18663eed67faSmbalmer lt_cv_dlopen_libs= 18673eed67faSmbalmer 18683eed67faSmbalmer case $host_os in 18693eed67faSmbalmer beos*) 18703eed67faSmbalmer lt_cv_dlopen="load_add_on" 18713eed67faSmbalmer lt_cv_dlopen_libs= 18723eed67faSmbalmer lt_cv_dlopen_self=yes 18733eed67faSmbalmer ;; 18743eed67faSmbalmer 1875dc407927Smrg mingw* | pw32* | cegcc*) 18763eed67faSmbalmer lt_cv_dlopen="LoadLibrary" 18773eed67faSmbalmer lt_cv_dlopen_libs= 1878dc407927Smrg ;; 18793eed67faSmbalmer 18803eed67faSmbalmer cygwin*) 18813eed67faSmbalmer lt_cv_dlopen="dlopen" 18823eed67faSmbalmer lt_cv_dlopen_libs= 1883dc407927Smrg ;; 18843eed67faSmbalmer 18853eed67faSmbalmer darwin*) 18863eed67faSmbalmer # if libdl is installed we need to link against it 18873eed67faSmbalmer AC_CHECK_LIB([dl], [dlopen], 18883eed67faSmbalmer [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 18893eed67faSmbalmer lt_cv_dlopen="dyld" 18903eed67faSmbalmer lt_cv_dlopen_libs= 18913eed67faSmbalmer lt_cv_dlopen_self=yes 18923eed67faSmbalmer ]) 1893dc407927Smrg ;; 18943eed67faSmbalmer 18953eed67faSmbalmer *) 18963eed67faSmbalmer AC_CHECK_FUNC([shl_load], 18973eed67faSmbalmer [lt_cv_dlopen="shl_load"], 18983eed67faSmbalmer [AC_CHECK_LIB([dld], [shl_load], 18993eed67faSmbalmer [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 19003eed67faSmbalmer [AC_CHECK_FUNC([dlopen], 19013eed67faSmbalmer [lt_cv_dlopen="dlopen"], 19023eed67faSmbalmer [AC_CHECK_LIB([dl], [dlopen], 19033eed67faSmbalmer [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 19043eed67faSmbalmer [AC_CHECK_LIB([svld], [dlopen], 19053eed67faSmbalmer [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 19063eed67faSmbalmer [AC_CHECK_LIB([dld], [dld_link], 19073eed67faSmbalmer [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 19083eed67faSmbalmer ]) 19093eed67faSmbalmer ]) 19103eed67faSmbalmer ]) 19113eed67faSmbalmer ]) 19123eed67faSmbalmer ]) 19133eed67faSmbalmer ;; 19143eed67faSmbalmer esac 19153eed67faSmbalmer 19163eed67faSmbalmer if test "x$lt_cv_dlopen" != xno; then 19173eed67faSmbalmer enable_dlopen=yes 19183eed67faSmbalmer else 19193eed67faSmbalmer enable_dlopen=no 19203eed67faSmbalmer fi 19213eed67faSmbalmer 19223eed67faSmbalmer case $lt_cv_dlopen in 19233eed67faSmbalmer dlopen) 19243eed67faSmbalmer save_CPPFLAGS="$CPPFLAGS" 19253eed67faSmbalmer test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 19263eed67faSmbalmer 19273eed67faSmbalmer save_LDFLAGS="$LDFLAGS" 19283eed67faSmbalmer wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 19293eed67faSmbalmer 19303eed67faSmbalmer save_LIBS="$LIBS" 19313eed67faSmbalmer LIBS="$lt_cv_dlopen_libs $LIBS" 19323eed67faSmbalmer 19333eed67faSmbalmer AC_CACHE_CHECK([whether a program can dlopen itself], 19343eed67faSmbalmer lt_cv_dlopen_self, [dnl 1935dc407927Smrg _LT_TRY_DLOPEN_SELF( 19363eed67faSmbalmer lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 19373eed67faSmbalmer lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 19383eed67faSmbalmer ]) 19393eed67faSmbalmer 19403eed67faSmbalmer if test "x$lt_cv_dlopen_self" = xyes; then 19413eed67faSmbalmer wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 19423eed67faSmbalmer AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1943dc407927Smrg lt_cv_dlopen_self_static, [dnl 1944dc407927Smrg _LT_TRY_DLOPEN_SELF( 19453eed67faSmbalmer lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 19463eed67faSmbalmer lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 19473eed67faSmbalmer ]) 19483eed67faSmbalmer fi 19493eed67faSmbalmer 19503eed67faSmbalmer CPPFLAGS="$save_CPPFLAGS" 19513eed67faSmbalmer LDFLAGS="$save_LDFLAGS" 19523eed67faSmbalmer LIBS="$save_LIBS" 19533eed67faSmbalmer ;; 19543eed67faSmbalmer esac 19553eed67faSmbalmer 19563eed67faSmbalmer case $lt_cv_dlopen_self in 19573eed67faSmbalmer yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 19583eed67faSmbalmer *) enable_dlopen_self=unknown ;; 19593eed67faSmbalmer esac 19603eed67faSmbalmer 19613eed67faSmbalmer case $lt_cv_dlopen_self_static in 19623eed67faSmbalmer yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 19633eed67faSmbalmer *) enable_dlopen_self_static=unknown ;; 19643eed67faSmbalmer esac 19653eed67faSmbalmerfi 1966dc407927Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1967dc407927Smrg [Whether dlopen is supported]) 1968dc407927Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1969dc407927Smrg [Whether dlopen of programs is supported]) 1970dc407927Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1971dc407927Smrg [Whether dlopen of statically linked programs is supported]) 1972dc407927Smrg])# LT_SYS_DLOPEN_SELF 19733eed67faSmbalmer 1974dc407927Smrg# Old name: 1975dc407927SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1976dc407927Smrgdnl aclocal-1.4 backwards compatibility: 1977dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 19783eed67faSmbalmer 1979dc407927Smrg 1980dc407927Smrg# _LT_COMPILER_C_O([TAGNAME]) 1981dc407927Smrg# --------------------------- 1982dc407927Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1983dc407927Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1984dc407927Smrgm4_defun([_LT_COMPILER_C_O], 1985dc407927Smrg[m4_require([_LT_DECL_SED])dnl 1986dc407927Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1987dc407927Smrgm4_require([_LT_TAG_COMPILER])dnl 19883eed67faSmbalmerAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1989dc407927Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1990dc407927Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1991dc407927Smrg $RM -r conftest 2>/dev/null 19923eed67faSmbalmer mkdir conftest 19933eed67faSmbalmer cd conftest 19943eed67faSmbalmer mkdir out 19953eed67faSmbalmer echo "$lt_simple_compile_test_code" > conftest.$ac_ext 19963eed67faSmbalmer 19973eed67faSmbalmer lt_compiler_flag="-o out/conftest2.$ac_objext" 19983eed67faSmbalmer # Insert the option either (1) after the last *FLAGS variable, or 19993eed67faSmbalmer # (2) before a word containing "conftest.", or (3) at the end. 20003eed67faSmbalmer # Note that $ac_compile itself does not contain backslashes and begins 20013eed67faSmbalmer # with a dollar sign (not a hyphen), so the echo should work correctly. 20023eed67faSmbalmer lt_compile=`echo "$ac_compile" | $SED \ 20033eed67faSmbalmer -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 20043eed67faSmbalmer -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 20053eed67faSmbalmer -e 's:$: $lt_compiler_flag:'` 2006dd0822caSmrg (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 20073eed67faSmbalmer (eval "$lt_compile" 2>out/conftest.err) 20083eed67faSmbalmer ac_status=$? 20093eed67faSmbalmer cat out/conftest.err >&AS_MESSAGE_LOG_FD 2010dd0822caSmrg echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 20113eed67faSmbalmer if (exit $ac_status) && test -s out/conftest2.$ac_objext 20123eed67faSmbalmer then 20133eed67faSmbalmer # The compiler can only warn and ignore the option if not recognized 20143eed67faSmbalmer # So say no if there are warnings 2015dd0822caSmrg $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp 20163eed67faSmbalmer $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 20173eed67faSmbalmer if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 2018dc407927Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 20193eed67faSmbalmer fi 20203eed67faSmbalmer fi 20213eed67faSmbalmer chmod u+w . 2>&AS_MESSAGE_LOG_FD 2022dc407927Smrg $RM conftest* 20233eed67faSmbalmer # SGI C++ compiler will create directory out/ii_files/ for 20243eed67faSmbalmer # template instantiation 2025dc407927Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 2026dc407927Smrg $RM out/* && rmdir out 20273eed67faSmbalmer cd .. 2028dc407927Smrg $RM -r conftest 2029dc407927Smrg $RM conftest* 20303eed67faSmbalmer]) 2031dc407927Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 2032dc407927Smrg [Does compiler simultaneously support -c and -o options?]) 2033dc407927Smrg])# _LT_COMPILER_C_O 20343eed67faSmbalmer 20353eed67faSmbalmer 2036dc407927Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 2037dc407927Smrg# ---------------------------------- 20383eed67faSmbalmer# Check to see if we can do hard links to lock some files if needed 2039dc407927Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 2040dc407927Smrg[m4_require([_LT_ENABLE_LOCK])dnl 2041dc407927Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2042dc407927Smrg_LT_COMPILER_C_O([$1]) 20433eed67faSmbalmer 20443eed67faSmbalmerhard_links="nottested" 2045dc407927Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 20463eed67faSmbalmer # do not overwrite the value of need_locks provided by the user 20473eed67faSmbalmer AC_MSG_CHECKING([if we can lock with hard links]) 20483eed67faSmbalmer hard_links=yes 2049dc407927Smrg $RM conftest* 20503eed67faSmbalmer ln conftest.a conftest.b 2>/dev/null && hard_links=no 20513eed67faSmbalmer touch conftest.a 20523eed67faSmbalmer ln conftest.a conftest.b 2>&5 || hard_links=no 20533eed67faSmbalmer ln conftest.a conftest.b 2>/dev/null && hard_links=no 20543eed67faSmbalmer AC_MSG_RESULT([$hard_links]) 20553eed67faSmbalmer if test "$hard_links" = no; then 20563eed67faSmbalmer AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 20573eed67faSmbalmer need_locks=warn 20583eed67faSmbalmer fi 20593eed67faSmbalmerelse 20603eed67faSmbalmer need_locks=no 20613eed67faSmbalmerfi 2062dc407927Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 2063dc407927Smrg])# _LT_COMPILER_FILE_LOCKS 20643eed67faSmbalmer 20653eed67faSmbalmer 2066dc407927Smrg# _LT_CHECK_OBJDIR 2067dc407927Smrg# ---------------- 2068dc407927Smrgm4_defun([_LT_CHECK_OBJDIR], 20693eed67faSmbalmer[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 20703eed67faSmbalmer[rm -f .libs 2>/dev/null 20713eed67faSmbalmermkdir .libs 2>/dev/null 20723eed67faSmbalmerif test -d .libs; then 20733eed67faSmbalmer lt_cv_objdir=.libs 20743eed67faSmbalmerelse 20753eed67faSmbalmer # MS-DOS does not allow filenames that begin with a dot. 20763eed67faSmbalmer lt_cv_objdir=_libs 20773eed67faSmbalmerfi 20783eed67faSmbalmerrmdir .libs 2>/dev/null]) 20793eed67faSmbalmerobjdir=$lt_cv_objdir 2080dc407927Smrg_LT_DECL([], [objdir], [0], 2081dc407927Smrg [The name of the directory that contains temporary libtool files])dnl 2082dc407927Smrgm4_pattern_allow([LT_OBJDIR])dnl 2083dc407927SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 2084dc407927Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 2085dc407927Smrg])# _LT_CHECK_OBJDIR 20863eed67faSmbalmer 20873eed67faSmbalmer 2088dc407927Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 2089dc407927Smrg# -------------------------------------- 20903eed67faSmbalmer# Check hardcoding attributes. 2091dc407927Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 20923eed67faSmbalmer[AC_MSG_CHECKING([how to hardcode library paths into programs]) 2093dc407927Smrg_LT_TAGVAR(hardcode_action, $1)= 2094dc407927Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 2095dc407927Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 2096dc407927Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 20973eed67faSmbalmer 2098dc407927Smrg # We can hardcode non-existent directories. 2099dc407927Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 21003eed67faSmbalmer # If the only mechanism to avoid hardcoding is shlibpath_var, we 21013eed67faSmbalmer # have to relink, otherwise we might link with an installed library 21023eed67faSmbalmer # when we should be linking with a yet-to-be-installed one 2103dc407927Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 2104dc407927Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 21053eed67faSmbalmer # Linking always hardcodes the temporary library directory. 2106dc407927Smrg _LT_TAGVAR(hardcode_action, $1)=relink 21073eed67faSmbalmer else 21083eed67faSmbalmer # We can link without hardcoding, and we can hardcode nonexisting dirs. 2109dc407927Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 21103eed67faSmbalmer fi 21113eed67faSmbalmerelse 21123eed67faSmbalmer # We cannot hardcode anything, or else we can only hardcode existing 21133eed67faSmbalmer # directories. 2114dc407927Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 21153eed67faSmbalmerfi 2116dc407927SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 21173eed67faSmbalmer 2118dc407927Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2119dc407927Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 21203eed67faSmbalmer # Fast installation is not supported 21213eed67faSmbalmer enable_fast_install=no 21223eed67faSmbalmerelif test "$shlibpath_overrides_runpath" = yes || 21233eed67faSmbalmer test "$enable_shared" = no; then 21243eed67faSmbalmer # Fast installation is not necessary 21253eed67faSmbalmer enable_fast_install=needless 21263eed67faSmbalmerfi 2127dc407927Smrg_LT_TAGDECL([], [hardcode_action], [0], 2128dc407927Smrg [How to hardcode a shared library path into an executable]) 2129dc407927Smrg])# _LT_LINKER_HARDCODE_LIBPATH 21303eed67faSmbalmer 21313eed67faSmbalmer 2132dc407927Smrg# _LT_CMD_STRIPLIB 2133dc407927Smrg# ---------------- 2134dc407927Smrgm4_defun([_LT_CMD_STRIPLIB], 2135dc407927Smrg[m4_require([_LT_DECL_EGREP]) 2136dc407927Smrgstriplib= 21373eed67faSmbalmerold_striplib= 21383eed67faSmbalmerAC_MSG_CHECKING([whether stripping libraries is possible]) 2139dc407927Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 21403eed67faSmbalmer test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 21413eed67faSmbalmer test -z "$striplib" && striplib="$STRIP --strip-unneeded" 21423eed67faSmbalmer AC_MSG_RESULT([yes]) 21433eed67faSmbalmerelse 21443eed67faSmbalmer# FIXME - insert some real tests, host_os isn't really good enough 21453eed67faSmbalmer case $host_os in 2146dc407927Smrg darwin*) 2147dc407927Smrg if test -n "$STRIP" ; then 2148dc407927Smrg striplib="$STRIP -x" 2149dc407927Smrg old_striplib="$STRIP -S" 2150dc407927Smrg AC_MSG_RESULT([yes]) 2151dc407927Smrg else 2152dc407927Smrg AC_MSG_RESULT([no]) 2153dc407927Smrg fi 2154dc407927Smrg ;; 2155dc407927Smrg *) 2156dc407927Smrg AC_MSG_RESULT([no]) 21573eed67faSmbalmer ;; 21583eed67faSmbalmer esac 21593eed67faSmbalmerfi 2160dc407927Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2161dc407927Smrg_LT_DECL([], [striplib], [1]) 2162dc407927Smrg])# _LT_CMD_STRIPLIB 21633eed67faSmbalmer 21643eed67faSmbalmer 2165dc407927Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 21663eed67faSmbalmer# ----------------------------- 21673eed67faSmbalmer# PORTME Fill in your ld.so characteristics 2168dc407927Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2169dc407927Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2170dc407927Smrgm4_require([_LT_DECL_EGREP])dnl 2171dc407927Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2172dc407927Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2173dc407927Smrgm4_require([_LT_DECL_SED])dnl 2174dd0822caSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 21753eed67faSmbalmerAC_MSG_CHECKING([dynamic linker characteristics]) 2176dc407927Smrgm4_if([$1], 2177dc407927Smrg [], [ 21783eed67faSmbalmerif test "$GCC" = yes; then 21793eed67faSmbalmer case $host_os in 21803eed67faSmbalmer darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 21813eed67faSmbalmer *) lt_awk_arg="/^libraries:/" ;; 21823eed67faSmbalmer esac 2183dd0822caSmrg case $host_os in 2184dd0822caSmrg mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; 2185dd0822caSmrg *) lt_sed_strip_eq="s,=/,/,g" ;; 2186dd0822caSmrg esac 2187dd0822caSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` 2188dd0822caSmrg case $lt_search_path_spec in 2189dd0822caSmrg *\;*) 21903eed67faSmbalmer # if the path contains ";" then we assume it to be the separator 21913eed67faSmbalmer # otherwise default to the standard path separator (i.e. ":") - it is 21923eed67faSmbalmer # assumed that no part of a normal pathname contains ";" but that should 21933eed67faSmbalmer # okay in the real world where ";" in dirpaths is itself problematic. 2194dd0822caSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` 2195dd0822caSmrg ;; 2196dd0822caSmrg *) 2197dd0822caSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` 2198dd0822caSmrg ;; 2199dd0822caSmrg esac 22003eed67faSmbalmer # Ok, now we have the path, separated by spaces, we can step through it 22013eed67faSmbalmer # and add multilib dir if necessary. 22023eed67faSmbalmer lt_tmp_lt_search_path_spec= 22033eed67faSmbalmer lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 22043eed67faSmbalmer for lt_sys_path in $lt_search_path_spec; do 22053eed67faSmbalmer if test -d "$lt_sys_path/$lt_multi_os_dir"; then 22063eed67faSmbalmer lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 22073eed67faSmbalmer else 22083eed67faSmbalmer test -d "$lt_sys_path" && \ 22093eed67faSmbalmer lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 22103eed67faSmbalmer fi 22113eed67faSmbalmer done 2212dd0822caSmrg lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' 22133eed67faSmbalmerBEGIN {RS=" "; FS="/|\n";} { 22143eed67faSmbalmer lt_foo=""; 22153eed67faSmbalmer lt_count=0; 22163eed67faSmbalmer for (lt_i = NF; lt_i > 0; lt_i--) { 22173eed67faSmbalmer if ($lt_i != "" && $lt_i != ".") { 22183eed67faSmbalmer if ($lt_i == "..") { 22193eed67faSmbalmer lt_count++; 22203eed67faSmbalmer } else { 22213eed67faSmbalmer if (lt_count == 0) { 22223eed67faSmbalmer lt_foo="/" $lt_i lt_foo; 22233eed67faSmbalmer } else { 22243eed67faSmbalmer lt_count--; 22253eed67faSmbalmer } 22263eed67faSmbalmer } 22273eed67faSmbalmer } 22283eed67faSmbalmer } 22293eed67faSmbalmer if (lt_foo != "") { lt_freq[[lt_foo]]++; } 22303eed67faSmbalmer if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 22313eed67faSmbalmer}'` 2232dd0822caSmrg # AWK program above erroneously prepends '/' to C:/dos/paths 2233dd0822caSmrg # for these hosts. 2234dd0822caSmrg case $host_os in 2235dd0822caSmrg mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ 2236dd0822caSmrg $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; 2237dd0822caSmrg esac 2238dd0822caSmrg sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` 22393eed67faSmbalmerelse 22403eed67faSmbalmer sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 22413eed67faSmbalmerfi]) 2242dc407927Smrglibrary_names_spec= 2243dc407927Smrglibname_spec='lib$name' 2244dc407927Smrgsoname_spec= 2245dc407927Smrgshrext_cmds=".so" 2246dc407927Smrgpostinstall_cmds= 2247dc407927Smrgpostuninstall_cmds= 2248dc407927Smrgfinish_cmds= 2249dc407927Smrgfinish_eval= 2250dc407927Smrgshlibpath_var= 2251dc407927Smrgshlibpath_overrides_runpath=unknown 2252dc407927Smrgversion_type=none 2253dc407927Smrgdynamic_linker="$host_os ld.so" 2254dc407927Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 22553eed67faSmbalmerneed_lib_prefix=unknown 22563eed67faSmbalmerhardcode_into_libs=no 22573eed67faSmbalmer 22583eed67faSmbalmer# when you set need_version to no, make sure it does not cause -set_version 22593eed67faSmbalmer# flags to be left without arguments 22603eed67faSmbalmerneed_version=unknown 22613eed67faSmbalmer 22623eed67faSmbalmercase $host_os in 22633eed67faSmbalmeraix3*) 226475cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 22653eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 22663eed67faSmbalmer shlibpath_var=LIBPATH 22673eed67faSmbalmer 22683eed67faSmbalmer # AIX 3 has no versioning support, so we append a major version to the name. 22693eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 22703eed67faSmbalmer ;; 22713eed67faSmbalmer 22723eed67faSmbalmeraix[[4-9]]*) 227375cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 22743eed67faSmbalmer need_lib_prefix=no 22753eed67faSmbalmer need_version=no 22763eed67faSmbalmer hardcode_into_libs=yes 22773eed67faSmbalmer if test "$host_cpu" = ia64; then 22783eed67faSmbalmer # AIX 5 supports IA64 22793eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 22803eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 22813eed67faSmbalmer else 22823eed67faSmbalmer # With GCC up to 2.95.x, collect2 would create an import file 22833eed67faSmbalmer # for dependence libraries. The import file would start with 22843eed67faSmbalmer # the line `#! .'. This would cause the generated library to 22853eed67faSmbalmer # depend on `.', always an invalid library. This was fixed in 22863eed67faSmbalmer # development snapshots of GCC prior to 3.0. 22873eed67faSmbalmer case $host_os in 22883eed67faSmbalmer aix4 | aix4.[[01]] | aix4.[[01]].*) 22893eed67faSmbalmer if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 22903eed67faSmbalmer echo ' yes ' 2291dc407927Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 22923eed67faSmbalmer : 22933eed67faSmbalmer else 22943eed67faSmbalmer can_build_shared=no 22953eed67faSmbalmer fi 22963eed67faSmbalmer ;; 22973eed67faSmbalmer esac 22983eed67faSmbalmer # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 22993eed67faSmbalmer # soname into executable. Probably we can add versioning support to 23003eed67faSmbalmer # collect2, so additional links can be useful in future. 23013eed67faSmbalmer if test "$aix_use_runtimelinking" = yes; then 23023eed67faSmbalmer # If using run time linking (on AIX 4.2 or later) use lib<name>.so 23033eed67faSmbalmer # instead of lib<name>.a to let people know that these are not 23043eed67faSmbalmer # typical AIX shared libraries. 23053eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23063eed67faSmbalmer else 23073eed67faSmbalmer # We preserve .a as extension for shared libraries through AIX4.2 23083eed67faSmbalmer # and later when we are not doing run time linking. 23093eed67faSmbalmer library_names_spec='${libname}${release}.a $libname.a' 23103eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 23113eed67faSmbalmer fi 23123eed67faSmbalmer shlibpath_var=LIBPATH 23133eed67faSmbalmer fi 23143eed67faSmbalmer ;; 23153eed67faSmbalmer 23163eed67faSmbalmeramigaos*) 2317dc407927Smrg case $host_cpu in 2318dc407927Smrg powerpc) 2319dc407927Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2320dc407927Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2321dc407927Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2322dc407927Smrg ;; 2323dc407927Smrg m68k) 2324dc407927Smrg library_names_spec='$libname.ixlibrary $libname.a' 2325dc407927Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2326dd0822caSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $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' 2327dc407927Smrg ;; 2328dc407927Smrg esac 23293eed67faSmbalmer ;; 23303eed67faSmbalmer 23313eed67faSmbalmerbeos*) 23323eed67faSmbalmer library_names_spec='${libname}${shared_ext}' 23333eed67faSmbalmer dynamic_linker="$host_os ld.so" 23343eed67faSmbalmer shlibpath_var=LIBRARY_PATH 23353eed67faSmbalmer ;; 23363eed67faSmbalmer 23373eed67faSmbalmerbsdi[[45]]*) 233875cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 23393eed67faSmbalmer need_version=no 23403eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 23413eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 23423eed67faSmbalmer finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 23433eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 23443eed67faSmbalmer sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 23453eed67faSmbalmer sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 23463eed67faSmbalmer # the default ld.so.conf also contains /usr/contrib/lib and 23473eed67faSmbalmer # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 23483eed67faSmbalmer # libtool to hard-code these into programs 23493eed67faSmbalmer ;; 23503eed67faSmbalmer 2351dc407927Smrgcygwin* | mingw* | pw32* | cegcc*) 23523eed67faSmbalmer version_type=windows 23533eed67faSmbalmer shrext_cmds=".dll" 23543eed67faSmbalmer need_version=no 23553eed67faSmbalmer need_lib_prefix=no 23563eed67faSmbalmer 2357dd0822caSmrg case $GCC,$cc_basename in 2358dd0822caSmrg yes,*) 2359dd0822caSmrg # gcc 23603eed67faSmbalmer library_names_spec='$libname.dll.a' 23613eed67faSmbalmer # DLL is installed to $(libdir)/../bin by postinstall_cmds 23623eed67faSmbalmer postinstall_cmds='base_file=`basename \${file}`~ 2363dc407927Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 23643eed67faSmbalmer dldir=$destdir/`dirname \$dlpath`~ 23653eed67faSmbalmer test -d \$dldir || mkdir -p \$dldir~ 23663eed67faSmbalmer $install_prog $dir/$dlname \$dldir/$dlname~ 2367dc407927Smrg chmod a+x \$dldir/$dlname~ 2368dc407927Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2369dc407927Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2370dc407927Smrg fi' 23713eed67faSmbalmer postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 23723eed67faSmbalmer dlpath=$dir/\$dldll~ 2373dc407927Smrg $RM \$dlpath' 23743eed67faSmbalmer shlibpath_overrides_runpath=yes 23753eed67faSmbalmer 23763eed67faSmbalmer case $host_os in 23773eed67faSmbalmer cygwin*) 23783eed67faSmbalmer # Cygwin DLLs use 'cyg' prefix rather than 'lib' 23793eed67faSmbalmer soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2380dd0822caSmrgm4_if([$1], [],[ 2381dd0822caSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) 23823eed67faSmbalmer ;; 2383dc407927Smrg mingw* | cegcc*) 23843eed67faSmbalmer # MinGW DLLs use traditional 'lib' prefix 23853eed67faSmbalmer soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23863eed67faSmbalmer ;; 23873eed67faSmbalmer pw32*) 23883eed67faSmbalmer # pw32 DLLs use 'pw' prefix rather than 'lib' 23893eed67faSmbalmer library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 23903eed67faSmbalmer ;; 23913eed67faSmbalmer esac 2392dd0822caSmrg dynamic_linker='Win32 ld.exe' 2393dd0822caSmrg ;; 2394dd0822caSmrg 2395dd0822caSmrg *,cl*) 2396dd0822caSmrg # Native MSVC 2397dd0822caSmrg libname_spec='$name' 2398dd0822caSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2399dd0822caSmrg library_names_spec='${libname}.dll.lib' 2400dd0822caSmrg 2401dd0822caSmrg case $build_os in 2402dd0822caSmrg mingw*) 2403dd0822caSmrg sys_lib_search_path_spec= 2404dd0822caSmrg lt_save_ifs=$IFS 2405dd0822caSmrg IFS=';' 2406dd0822caSmrg for lt_path in $LIB 2407dd0822caSmrg do 2408dd0822caSmrg IFS=$lt_save_ifs 2409dd0822caSmrg # Let DOS variable expansion print the short 8.3 style file name. 2410dd0822caSmrg lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` 2411dd0822caSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" 2412dd0822caSmrg done 2413dd0822caSmrg IFS=$lt_save_ifs 2414dd0822caSmrg # Convert to MSYS style. 2415dd0822caSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` 2416dd0822caSmrg ;; 2417dd0822caSmrg cygwin*) 2418dd0822caSmrg # Convert to unix form, then to dos form, then back to unix form 2419dd0822caSmrg # but this time dos style (no spaces!) so that the unix form looks 2420dd0822caSmrg # like /cygdrive/c/PROGRA~1:/cygdr... 2421dd0822caSmrg sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` 2422dd0822caSmrg sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` 2423dd0822caSmrg sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2424dd0822caSmrg ;; 2425dd0822caSmrg *) 2426dd0822caSmrg sys_lib_search_path_spec="$LIB" 2427dd0822caSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2428dd0822caSmrg # It is most probably a Windows format PATH. 2429dd0822caSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2430dd0822caSmrg else 2431dd0822caSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2432dd0822caSmrg fi 2433dd0822caSmrg # FIXME: find the short name or the path components, as spaces are 2434dd0822caSmrg # common. (e.g. "Program Files" -> "PROGRA~1") 2435dd0822caSmrg ;; 2436dd0822caSmrg esac 2437dd0822caSmrg 2438dd0822caSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2439dd0822caSmrg postinstall_cmds='base_file=`basename \${file}`~ 2440dd0822caSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2441dd0822caSmrg dldir=$destdir/`dirname \$dlpath`~ 2442dd0822caSmrg test -d \$dldir || mkdir -p \$dldir~ 2443dd0822caSmrg $install_prog $dir/$dlname \$dldir/$dlname' 2444dd0822caSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2445dd0822caSmrg dlpath=$dir/\$dldll~ 2446dd0822caSmrg $RM \$dlpath' 2447dd0822caSmrg shlibpath_overrides_runpath=yes 2448dd0822caSmrg dynamic_linker='Win32 link.exe' 24493eed67faSmbalmer ;; 24503eed67faSmbalmer 24513eed67faSmbalmer *) 2452dd0822caSmrg # Assume MSVC wrapper 24533eed67faSmbalmer library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2454dd0822caSmrg dynamic_linker='Win32 ld.exe' 24553eed67faSmbalmer ;; 24563eed67faSmbalmer esac 24573eed67faSmbalmer # FIXME: first we should search . and the directory the executable is in 24583eed67faSmbalmer shlibpath_var=PATH 24593eed67faSmbalmer ;; 24603eed67faSmbalmer 24613eed67faSmbalmerdarwin* | rhapsody*) 24623eed67faSmbalmer dynamic_linker="$host_os dyld" 24633eed67faSmbalmer version_type=darwin 24643eed67faSmbalmer need_lib_prefix=no 24653eed67faSmbalmer need_version=no 2466dc407927Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 24673eed67faSmbalmer soname_spec='${libname}${release}${major}$shared_ext' 24683eed67faSmbalmer shlibpath_overrides_runpath=yes 24693eed67faSmbalmer shlibpath_var=DYLD_LIBRARY_PATH 24703eed67faSmbalmer shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2471dc407927Smrgm4_if([$1], [],[ 2472dc407927Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 24733eed67faSmbalmer sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 24743eed67faSmbalmer ;; 24753eed67faSmbalmer 24763eed67faSmbalmerdgux*) 247775cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 24783eed67faSmbalmer need_lib_prefix=no 24793eed67faSmbalmer need_version=no 24803eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 24813eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 24823eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 24833eed67faSmbalmer ;; 24843eed67faSmbalmer 24853eed67faSmbalmerfreebsd* | dragonfly*) 24863eed67faSmbalmer # DragonFly does not have aout. When/if they implement a new 24873eed67faSmbalmer # versioning mechanism, adjust this. 24883eed67faSmbalmer if test -x /usr/bin/objformat; then 24893eed67faSmbalmer objformat=`/usr/bin/objformat` 24903eed67faSmbalmer else 24913eed67faSmbalmer case $host_os in 249275cbef56Smrg freebsd[[23]].*) objformat=aout ;; 24933eed67faSmbalmer *) objformat=elf ;; 24943eed67faSmbalmer esac 24953eed67faSmbalmer fi 24963eed67faSmbalmer version_type=freebsd-$objformat 24973eed67faSmbalmer case $version_type in 24983eed67faSmbalmer freebsd-elf*) 24993eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 25003eed67faSmbalmer need_version=no 25013eed67faSmbalmer need_lib_prefix=no 25023eed67faSmbalmer ;; 25033eed67faSmbalmer freebsd-*) 25043eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 25053eed67faSmbalmer need_version=yes 25063eed67faSmbalmer ;; 25073eed67faSmbalmer esac 25083eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 25093eed67faSmbalmer case $host_os in 251075cbef56Smrg freebsd2.*) 25113eed67faSmbalmer shlibpath_overrides_runpath=yes 25123eed67faSmbalmer ;; 25133eed67faSmbalmer freebsd3.[[01]]* | freebsdelf3.[[01]]*) 25143eed67faSmbalmer shlibpath_overrides_runpath=yes 25153eed67faSmbalmer hardcode_into_libs=yes 25163eed67faSmbalmer ;; 25173eed67faSmbalmer freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 25183eed67faSmbalmer freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 25193eed67faSmbalmer shlibpath_overrides_runpath=no 25203eed67faSmbalmer hardcode_into_libs=yes 25213eed67faSmbalmer ;; 25223eed67faSmbalmer *) # from 4.6 on, and DragonFly 25233eed67faSmbalmer shlibpath_overrides_runpath=yes 25243eed67faSmbalmer hardcode_into_libs=yes 25253eed67faSmbalmer ;; 25263eed67faSmbalmer esac 25273eed67faSmbalmer ;; 25283eed67faSmbalmer 25293eed67faSmbalmergnu*) 253075cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 25313eed67faSmbalmer need_lib_prefix=no 25323eed67faSmbalmer need_version=no 25333eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 25343eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 25353eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 253675cbef56Smrg shlibpath_overrides_runpath=no 25373eed67faSmbalmer hardcode_into_libs=yes 25383eed67faSmbalmer ;; 25393eed67faSmbalmer 2540dd0822caSmrghaiku*) 254175cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 2542dd0822caSmrg need_lib_prefix=no 2543dd0822caSmrg need_version=no 2544dd0822caSmrg dynamic_linker="$host_os runtime_loader" 2545dd0822caSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2546dd0822caSmrg soname_spec='${libname}${release}${shared_ext}$major' 2547dd0822caSmrg shlibpath_var=LIBRARY_PATH 2548dd0822caSmrg shlibpath_overrides_runpath=yes 2549dd0822caSmrg sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' 2550dd0822caSmrg hardcode_into_libs=yes 2551dd0822caSmrg ;; 2552dd0822caSmrg 25533eed67faSmbalmerhpux9* | hpux10* | hpux11*) 25543eed67faSmbalmer # Give a soname corresponding to the major version so that dld.sl refuses to 25553eed67faSmbalmer # link against other versions. 25563eed67faSmbalmer version_type=sunos 25573eed67faSmbalmer need_lib_prefix=no 25583eed67faSmbalmer need_version=no 25593eed67faSmbalmer case $host_cpu in 25603eed67faSmbalmer ia64*) 25613eed67faSmbalmer shrext_cmds='.so' 25623eed67faSmbalmer hardcode_into_libs=yes 25633eed67faSmbalmer dynamic_linker="$host_os dld.so" 25643eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 25653eed67faSmbalmer shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 25663eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25673eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 25683eed67faSmbalmer if test "X$HPUX_IA64_MODE" = X32; then 25693eed67faSmbalmer sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 25703eed67faSmbalmer else 25713eed67faSmbalmer sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 25723eed67faSmbalmer fi 25733eed67faSmbalmer sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 25743eed67faSmbalmer ;; 2575dc407927Smrg hppa*64*) 2576dc407927Smrg shrext_cmds='.sl' 2577dc407927Smrg hardcode_into_libs=yes 2578dc407927Smrg dynamic_linker="$host_os dld.sl" 2579dc407927Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2580dc407927Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2581dc407927Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2582dc407927Smrg soname_spec='${libname}${release}${shared_ext}$major' 2583dc407927Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2584dc407927Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2585dc407927Smrg ;; 2586dc407927Smrg *) 25873eed67faSmbalmer shrext_cmds='.sl' 25883eed67faSmbalmer dynamic_linker="$host_os dld.sl" 25893eed67faSmbalmer shlibpath_var=SHLIB_PATH 25903eed67faSmbalmer shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 25913eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 25923eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 25933eed67faSmbalmer ;; 25943eed67faSmbalmer esac 2595dd0822caSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555, ... 25963eed67faSmbalmer postinstall_cmds='chmod 555 $lib' 2597dd0822caSmrg # or fails outright, so override atomically: 2598dd0822caSmrg install_override_mode=555 25993eed67faSmbalmer ;; 26003eed67faSmbalmer 26013eed67faSmbalmerinterix[[3-9]]*) 260275cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 26033eed67faSmbalmer need_lib_prefix=no 26043eed67faSmbalmer need_version=no 26053eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 26063eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 26073eed67faSmbalmer dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 26083eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 26093eed67faSmbalmer shlibpath_overrides_runpath=no 26103eed67faSmbalmer hardcode_into_libs=yes 26113eed67faSmbalmer ;; 26123eed67faSmbalmer 26133eed67faSmbalmeririx5* | irix6* | nonstopux*) 26143eed67faSmbalmer case $host_os in 26153eed67faSmbalmer nonstopux*) version_type=nonstopux ;; 26163eed67faSmbalmer *) 26173eed67faSmbalmer if test "$lt_cv_prog_gnu_ld" = yes; then 261875cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 26193eed67faSmbalmer else 26203eed67faSmbalmer version_type=irix 26213eed67faSmbalmer fi ;; 26223eed67faSmbalmer esac 26233eed67faSmbalmer need_lib_prefix=no 26243eed67faSmbalmer need_version=no 26253eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 26263eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 26273eed67faSmbalmer case $host_os in 26283eed67faSmbalmer irix5* | nonstopux*) 26293eed67faSmbalmer libsuff= shlibsuff= 26303eed67faSmbalmer ;; 26313eed67faSmbalmer *) 26323eed67faSmbalmer case $LD in # libtool.m4 will add one of these switches to LD 26333eed67faSmbalmer *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 26343eed67faSmbalmer libsuff= shlibsuff= libmagic=32-bit;; 26353eed67faSmbalmer *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 26363eed67faSmbalmer libsuff=32 shlibsuff=N32 libmagic=N32;; 26373eed67faSmbalmer *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 26383eed67faSmbalmer libsuff=64 shlibsuff=64 libmagic=64-bit;; 26393eed67faSmbalmer *) libsuff= shlibsuff= libmagic=never-match;; 26403eed67faSmbalmer esac 26413eed67faSmbalmer ;; 26423eed67faSmbalmer esac 26433eed67faSmbalmer shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 26443eed67faSmbalmer shlibpath_overrides_runpath=no 26453eed67faSmbalmer sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 26463eed67faSmbalmer sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 26473eed67faSmbalmer hardcode_into_libs=yes 26483eed67faSmbalmer ;; 26493eed67faSmbalmer 26503eed67faSmbalmer# No shared lib support for Linux oldld, aout, or coff. 26513eed67faSmbalmerlinux*oldld* | linux*aout* | linux*coff*) 26523eed67faSmbalmer dynamic_linker=no 26533eed67faSmbalmer ;; 26543eed67faSmbalmer 265575cbef56Smrg# This must be glibc/ELF. 2656dd0822caSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 265775cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 26583eed67faSmbalmer need_lib_prefix=no 26593eed67faSmbalmer need_version=no 26603eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 26613eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 26623eed67faSmbalmer finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 26633eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 26643eed67faSmbalmer shlibpath_overrides_runpath=no 2665dd0822caSmrg 2666dc407927Smrg # Some binutils ld are patched to set DT_RUNPATH 2667dd0822caSmrg AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], 2668dd0822caSmrg [lt_cv_shlibpath_overrides_runpath=no 2669dd0822caSmrg save_LDFLAGS=$LDFLAGS 2670dd0822caSmrg save_libdir=$libdir 2671dd0822caSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2672dd0822caSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2673dd0822caSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2674dd0822caSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2675dd0822caSmrg [lt_cv_shlibpath_overrides_runpath=yes])]) 2676dd0822caSmrg LDFLAGS=$save_LDFLAGS 2677dd0822caSmrg libdir=$save_libdir 2678dd0822caSmrg ]) 2679dd0822caSmrg shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath 2680dc407927Smrg 26813eed67faSmbalmer # This implies no fast_install, which is unacceptable. 26823eed67faSmbalmer # Some rework will be needed to allow for fast_install 26833eed67faSmbalmer # before this can be enabled. 26843eed67faSmbalmer hardcode_into_libs=yes 26853eed67faSmbalmer 2686dc407927Smrg # Add ABI-specific directories to the system library path. 2687dc407927Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2688dc407927Smrg 26893eed67faSmbalmer # Append ld.so.conf contents to the search path 26903eed67faSmbalmer if test -f /etc/ld.so.conf; then 2691dd0822caSmrg 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' ' '` 2692dc407927Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2693dd0822caSmrg 26943eed67faSmbalmer fi 26953eed67faSmbalmer 26963eed67faSmbalmer # We used to test for /lib/ld.so.1 and disable shared libraries on 26973eed67faSmbalmer # powerpc, because MkLinux only supported shared libraries with the 26983eed67faSmbalmer # GNU dynamic linker. Since this was broken with cross compilers, 26993eed67faSmbalmer # most powerpc-linux boxes support dynamic linking these days and 27003eed67faSmbalmer # people can always --disable-shared, the test was removed, and we 27013eed67faSmbalmer # assume the GNU/Linux dynamic linker is in use. 27023eed67faSmbalmer dynamic_linker='GNU/Linux ld.so' 27033eed67faSmbalmer ;; 27043eed67faSmbalmer 27053eed67faSmbalmernetbsd*) 27063eed67faSmbalmer version_type=sunos 27073eed67faSmbalmer need_lib_prefix=no 27083eed67faSmbalmer need_version=no 2709dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 27103eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27113eed67faSmbalmer finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27123eed67faSmbalmer dynamic_linker='NetBSD (a.out) ld.so' 27133eed67faSmbalmer else 27143eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 27153eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 27163eed67faSmbalmer dynamic_linker='NetBSD ld.elf_so' 27173eed67faSmbalmer fi 27183eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 27193eed67faSmbalmer shlibpath_overrides_runpath=yes 27203eed67faSmbalmer hardcode_into_libs=yes 27213eed67faSmbalmer ;; 27223eed67faSmbalmer 27233eed67faSmbalmernewsos6) 272475cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 27253eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27263eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 27273eed67faSmbalmer shlibpath_overrides_runpath=yes 27283eed67faSmbalmer ;; 27293eed67faSmbalmer 2730dc407927Smrg*nto* | *qnx*) 2731dc407927Smrg version_type=qnx 27323eed67faSmbalmer need_lib_prefix=no 27333eed67faSmbalmer need_version=no 27343eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27353eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 27363eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 2737dc407927Smrg shlibpath_overrides_runpath=no 2738dc407927Smrg hardcode_into_libs=yes 2739dc407927Smrg dynamic_linker='ldqnx.so' 27403eed67faSmbalmer ;; 27413eed67faSmbalmer 27423eed67faSmbalmeropenbsd*) 27433eed67faSmbalmer version_type=sunos 27443eed67faSmbalmer sys_lib_dlsearch_path_spec="/usr/lib" 27453eed67faSmbalmer need_lib_prefix=no 27463eed67faSmbalmer # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 27473eed67faSmbalmer case $host_os in 2748dc407927Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2749dc407927Smrg *) need_version=no ;; 27503eed67faSmbalmer esac 27513eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 27523eed67faSmbalmer finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 27533eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 2754dc407927Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 27553eed67faSmbalmer case $host_os in 27563eed67faSmbalmer openbsd2.[[89]] | openbsd2.[[89]].*) 27573eed67faSmbalmer shlibpath_overrides_runpath=no 27583eed67faSmbalmer ;; 27593eed67faSmbalmer *) 27603eed67faSmbalmer shlibpath_overrides_runpath=yes 27613eed67faSmbalmer ;; 27623eed67faSmbalmer esac 27633eed67faSmbalmer else 27643eed67faSmbalmer shlibpath_overrides_runpath=yes 27653eed67faSmbalmer fi 27663eed67faSmbalmer ;; 27673eed67faSmbalmer 27683eed67faSmbalmeros2*) 27693eed67faSmbalmer libname_spec='$name' 27703eed67faSmbalmer shrext_cmds=".dll" 27713eed67faSmbalmer need_lib_prefix=no 27723eed67faSmbalmer library_names_spec='$libname${shared_ext} $libname.a' 27733eed67faSmbalmer dynamic_linker='OS/2 ld.exe' 27743eed67faSmbalmer shlibpath_var=LIBPATH 27753eed67faSmbalmer ;; 27763eed67faSmbalmer 27773eed67faSmbalmerosf3* | osf4* | osf5*) 27783eed67faSmbalmer version_type=osf 27793eed67faSmbalmer need_lib_prefix=no 27803eed67faSmbalmer need_version=no 27813eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 27823eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27833eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 27843eed67faSmbalmer sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 27853eed67faSmbalmer sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 27863eed67faSmbalmer ;; 27873eed67faSmbalmer 27883eed67faSmbalmerrdos*) 27893eed67faSmbalmer dynamic_linker=no 27903eed67faSmbalmer ;; 27913eed67faSmbalmer 27923eed67faSmbalmersolaris*) 279375cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 27943eed67faSmbalmer need_lib_prefix=no 27953eed67faSmbalmer need_version=no 27963eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 27973eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 27983eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 27993eed67faSmbalmer shlibpath_overrides_runpath=yes 28003eed67faSmbalmer hardcode_into_libs=yes 28013eed67faSmbalmer # ldd complains unless libraries are executable 28023eed67faSmbalmer postinstall_cmds='chmod +x $lib' 28033eed67faSmbalmer ;; 28043eed67faSmbalmer 28053eed67faSmbalmersunos4*) 28063eed67faSmbalmer version_type=sunos 28073eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 28083eed67faSmbalmer finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 28093eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 28103eed67faSmbalmer shlibpath_overrides_runpath=yes 28113eed67faSmbalmer if test "$with_gnu_ld" = yes; then 28123eed67faSmbalmer need_lib_prefix=no 28133eed67faSmbalmer fi 28143eed67faSmbalmer need_version=yes 28153eed67faSmbalmer ;; 28163eed67faSmbalmer 28173eed67faSmbalmersysv4 | sysv4.3*) 281875cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 28193eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28203eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 28213eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 28223eed67faSmbalmer case $host_vendor in 28233eed67faSmbalmer sni) 28243eed67faSmbalmer shlibpath_overrides_runpath=no 28253eed67faSmbalmer need_lib_prefix=no 28263eed67faSmbalmer runpath_var=LD_RUN_PATH 28273eed67faSmbalmer ;; 28283eed67faSmbalmer siemens) 28293eed67faSmbalmer need_lib_prefix=no 28303eed67faSmbalmer ;; 28313eed67faSmbalmer motorola) 28323eed67faSmbalmer need_lib_prefix=no 28333eed67faSmbalmer need_version=no 28343eed67faSmbalmer shlibpath_overrides_runpath=no 28353eed67faSmbalmer sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 28363eed67faSmbalmer ;; 28373eed67faSmbalmer esac 28383eed67faSmbalmer ;; 28393eed67faSmbalmer 28403eed67faSmbalmersysv4*MP*) 28413eed67faSmbalmer if test -d /usr/nec ;then 284275cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 28433eed67faSmbalmer library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 28443eed67faSmbalmer soname_spec='$libname${shared_ext}.$major' 28453eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 28463eed67faSmbalmer fi 28473eed67faSmbalmer ;; 28483eed67faSmbalmer 28493eed67faSmbalmersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 28503eed67faSmbalmer version_type=freebsd-elf 28513eed67faSmbalmer need_lib_prefix=no 28523eed67faSmbalmer need_version=no 28533eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 28543eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 28553eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 2856dc407927Smrg shlibpath_overrides_runpath=yes 28573eed67faSmbalmer hardcode_into_libs=yes 28583eed67faSmbalmer if test "$with_gnu_ld" = yes; then 28593eed67faSmbalmer sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 28603eed67faSmbalmer else 28613eed67faSmbalmer sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 28623eed67faSmbalmer case $host_os in 28633eed67faSmbalmer sco3.2v5*) 28643eed67faSmbalmer sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 28653eed67faSmbalmer ;; 28663eed67faSmbalmer esac 28673eed67faSmbalmer fi 28683eed67faSmbalmer sys_lib_dlsearch_path_spec='/usr/lib' 28693eed67faSmbalmer ;; 28703eed67faSmbalmer 2871dc407927Smrgtpf*) 2872dc407927Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 287375cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 2874dc407927Smrg need_lib_prefix=no 2875dc407927Smrg need_version=no 2876dc407927Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2877dc407927Smrg shlibpath_var=LD_LIBRARY_PATH 2878dc407927Smrg shlibpath_overrides_runpath=no 2879dc407927Smrg hardcode_into_libs=yes 2880dc407927Smrg ;; 2881dc407927Smrg 28823eed67faSmbalmeruts4*) 288375cbef56Smrg version_type=linux # correct to gnu/linux during the next big refactor 28843eed67faSmbalmer library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 28853eed67faSmbalmer soname_spec='${libname}${release}${shared_ext}$major' 28863eed67faSmbalmer shlibpath_var=LD_LIBRARY_PATH 28873eed67faSmbalmer ;; 28883eed67faSmbalmer 28893eed67faSmbalmer*) 28903eed67faSmbalmer dynamic_linker=no 28913eed67faSmbalmer ;; 28923eed67faSmbalmeresac 28933eed67faSmbalmerAC_MSG_RESULT([$dynamic_linker]) 28943eed67faSmbalmertest "$dynamic_linker" = no && can_build_shared=no 28953eed67faSmbalmer 28963eed67faSmbalmervariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 28973eed67faSmbalmerif test "$GCC" = yes; then 28983eed67faSmbalmer variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 28993eed67faSmbalmerfi 29003eed67faSmbalmer 2901dc407927Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2902dc407927Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2903dc407927Smrgfi 2904dc407927Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2905dc407927Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2906dc407927Smrgfi 29073eed67faSmbalmer 2908dc407927Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2909dc407927Smrg [Variables whose values should be saved in libtool wrapper scripts and 2910dc407927Smrg restored at link time]) 2911dc407927Smrg_LT_DECL([], [need_lib_prefix], [0], 2912dc407927Smrg [Do we need the "lib" prefix for modules?]) 2913dc407927Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2914dc407927Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2915dc407927Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2916dc407927Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2917dc407927Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2918dc407927Smrg [Is shlibpath searched before the hard-coded library search path?]) 2919dc407927Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2920dc407927Smrg_LT_DECL([], [library_names_spec], [1], 2921dc407927Smrg [[List of archive names. First name is the real one, the rest are links. 2922dc407927Smrg The last name is the one that the linker finds with -lNAME]]) 2923dc407927Smrg_LT_DECL([], [soname_spec], [1], 2924dc407927Smrg [[The coded name of the library, if different from the real name]]) 2925dd0822caSmrg_LT_DECL([], [install_override_mode], [1], 2926dd0822caSmrg [Permission mode override for installation of shared libraries]) 2927dc407927Smrg_LT_DECL([], [postinstall_cmds], [2], 2928dc407927Smrg [Command to use after installation of a shared archive]) 2929dc407927Smrg_LT_DECL([], [postuninstall_cmds], [2], 2930dc407927Smrg [Command to use after uninstallation of a shared archive]) 2931dc407927Smrg_LT_DECL([], [finish_cmds], [2], 2932dc407927Smrg [Commands used to finish a libtool library installation in a directory]) 2933dc407927Smrg_LT_DECL([], [finish_eval], [1], 2934dc407927Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2935dc407927Smrg not shown]]) 2936dc407927Smrg_LT_DECL([], [hardcode_into_libs], [0], 2937dc407927Smrg [Whether we should hardcode library paths into libraries]) 2938dc407927Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2939dc407927Smrg [Compile-time system search path for libraries]) 2940dc407927Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2941dc407927Smrg [Run-time system search path for libraries]) 2942dc407927Smrg])# _LT_SYS_DYNAMIC_LINKER 2943dc407927Smrg 2944dc407927Smrg 2945dc407927Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 29463eed67faSmbalmer# -------------------------- 29473eed67faSmbalmer# find a file program which can recognize shared library 2948dc407927SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2949dc407927Smrg[m4_require([_LT_DECL_EGREP])dnl 29503eed67faSmbalmerAC_MSG_CHECKING([for $1]) 29513eed67faSmbalmerAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 29523eed67faSmbalmer[case $MAGIC_CMD in 29533eed67faSmbalmer[[\\/*] | ?:[\\/]*]) 29543eed67faSmbalmer lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 29553eed67faSmbalmer ;; 29563eed67faSmbalmer*) 29573eed67faSmbalmer lt_save_MAGIC_CMD="$MAGIC_CMD" 29583eed67faSmbalmer lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 29593eed67faSmbalmerdnl $ac_dummy forces splitting on constant user-supplied paths. 29603eed67faSmbalmerdnl POSIX.2 word splitting is done only on the output of word expansions, 29613eed67faSmbalmerdnl not every word. This closes a longstanding sh security hole. 2962dc407927Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 29633eed67faSmbalmer for ac_dir in $ac_dummy; do 29643eed67faSmbalmer IFS="$lt_save_ifs" 29653eed67faSmbalmer test -z "$ac_dir" && ac_dir=. 29663eed67faSmbalmer if test -f $ac_dir/$1; then 29673eed67faSmbalmer lt_cv_path_MAGIC_CMD="$ac_dir/$1" 29683eed67faSmbalmer if test -n "$file_magic_test_file"; then 29693eed67faSmbalmer case $deplibs_check_method in 29703eed67faSmbalmer "file_magic "*) 29713eed67faSmbalmer file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 29723eed67faSmbalmer MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 29733eed67faSmbalmer if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 29743eed67faSmbalmer $EGREP "$file_magic_regex" > /dev/null; then 29753eed67faSmbalmer : 29763eed67faSmbalmer else 2977dc407927Smrg cat <<_LT_EOF 1>&2 29783eed67faSmbalmer 29793eed67faSmbalmer*** Warning: the command libtool uses to detect shared libraries, 29803eed67faSmbalmer*** $file_magic_cmd, produces output that libtool cannot recognize. 29813eed67faSmbalmer*** The result is that libtool may fail to recognize shared libraries 29823eed67faSmbalmer*** as such. This will affect the creation of libtool libraries that 29833eed67faSmbalmer*** depend on shared libraries, but programs linked with such libtool 29843eed67faSmbalmer*** libraries will work regardless of this problem. Nevertheless, you 29853eed67faSmbalmer*** may want to report the problem to your system manager and/or to 29863eed67faSmbalmer*** bug-libtool@gnu.org 29873eed67faSmbalmer 2988dc407927Smrg_LT_EOF 29893eed67faSmbalmer fi ;; 29903eed67faSmbalmer esac 29913eed67faSmbalmer fi 29923eed67faSmbalmer break 29933eed67faSmbalmer fi 29943eed67faSmbalmer done 29953eed67faSmbalmer IFS="$lt_save_ifs" 29963eed67faSmbalmer MAGIC_CMD="$lt_save_MAGIC_CMD" 29973eed67faSmbalmer ;; 29983eed67faSmbalmeresac]) 29993eed67faSmbalmerMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 30003eed67faSmbalmerif test -n "$MAGIC_CMD"; then 30013eed67faSmbalmer AC_MSG_RESULT($MAGIC_CMD) 30023eed67faSmbalmerelse 30033eed67faSmbalmer AC_MSG_RESULT(no) 30043eed67faSmbalmerfi 3005dc407927Smrg_LT_DECL([], [MAGIC_CMD], [0], 3006dc407927Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 3007dc407927Smrg])# _LT_PATH_TOOL_PREFIX 30083eed67faSmbalmer 3009dc407927Smrg# Old name: 3010dc407927SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 3011dc407927Smrgdnl aclocal-1.4 backwards compatibility: 3012dc407927Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 30133eed67faSmbalmer 3014dc407927Smrg 3015dc407927Smrg# _LT_PATH_MAGIC 3016dc407927Smrg# -------------- 30173eed67faSmbalmer# find a file program which can recognize a shared library 3018dc407927Smrgm4_defun([_LT_PATH_MAGIC], 3019dc407927Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 30203eed67faSmbalmerif test -z "$lt_cv_path_MAGIC_CMD"; then 30213eed67faSmbalmer if test -n "$ac_tool_prefix"; then 3022dc407927Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 30233eed67faSmbalmer else 30243eed67faSmbalmer MAGIC_CMD=: 30253eed67faSmbalmer fi 30263eed67faSmbalmerfi 3027dc407927Smrg])# _LT_PATH_MAGIC 30283eed67faSmbalmer 30293eed67faSmbalmer 3030dc407927Smrg# LT_PATH_LD 30313eed67faSmbalmer# ---------- 30323eed67faSmbalmer# find the pathname to the GNU or non-GNU linker 3033dc407927SmrgAC_DEFUN([LT_PATH_LD], 3034dc407927Smrg[AC_REQUIRE([AC_PROG_CC])dnl 30353eed67faSmbalmerAC_REQUIRE([AC_CANONICAL_HOST])dnl 30363eed67faSmbalmerAC_REQUIRE([AC_CANONICAL_BUILD])dnl 3037dc407927Smrgm4_require([_LT_DECL_SED])dnl 3038dc407927Smrgm4_require([_LT_DECL_EGREP])dnl 3039dd0822caSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl 3040dc407927Smrg 3041dc407927SmrgAC_ARG_WITH([gnu-ld], 3042dc407927Smrg [AS_HELP_STRING([--with-gnu-ld], 3043dc407927Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 3044dc407927Smrg [test "$withval" = no || with_gnu_ld=yes], 3045dc407927Smrg [with_gnu_ld=no])dnl 3046dc407927Smrg 30473eed67faSmbalmerac_prog=ld 30483eed67faSmbalmerif test "$GCC" = yes; then 30493eed67faSmbalmer # Check if gcc -print-prog-name=ld gives a path. 30503eed67faSmbalmer AC_MSG_CHECKING([for ld used by $CC]) 30513eed67faSmbalmer case $host in 30523eed67faSmbalmer *-*-mingw*) 30533eed67faSmbalmer # gcc leaves a trailing carriage return which upsets mingw 30543eed67faSmbalmer ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 30553eed67faSmbalmer *) 30563eed67faSmbalmer ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 30573eed67faSmbalmer esac 30583eed67faSmbalmer case $ac_prog in 30593eed67faSmbalmer # Accept absolute paths. 30603eed67faSmbalmer [[\\/]]* | ?:[[\\/]]*) 30613eed67faSmbalmer re_direlt='/[[^/]][[^/]]*/\.\./' 30623eed67faSmbalmer # Canonicalize the pathname of ld 3063dc407927Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 3064dc407927Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 3065dc407927Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 30663eed67faSmbalmer done 30673eed67faSmbalmer test -z "$LD" && LD="$ac_prog" 30683eed67faSmbalmer ;; 30693eed67faSmbalmer "") 30703eed67faSmbalmer # If it fails, then pretend we aren't using GCC. 30713eed67faSmbalmer ac_prog=ld 30723eed67faSmbalmer ;; 30733eed67faSmbalmer *) 30743eed67faSmbalmer # If it is relative, then search for the first ld in PATH. 30753eed67faSmbalmer with_gnu_ld=unknown 30763eed67faSmbalmer ;; 30773eed67faSmbalmer esac 30783eed67faSmbalmerelif test "$with_gnu_ld" = yes; then 30793eed67faSmbalmer AC_MSG_CHECKING([for GNU ld]) 30803eed67faSmbalmerelse 30813eed67faSmbalmer AC_MSG_CHECKING([for non-GNU ld]) 30823eed67faSmbalmerfi 30833eed67faSmbalmerAC_CACHE_VAL(lt_cv_path_LD, 30843eed67faSmbalmer[if test -z "$LD"; then 30853eed67faSmbalmer lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 30863eed67faSmbalmer for ac_dir in $PATH; do 30873eed67faSmbalmer IFS="$lt_save_ifs" 30883eed67faSmbalmer test -z "$ac_dir" && ac_dir=. 30893eed67faSmbalmer if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 30903eed67faSmbalmer lt_cv_path_LD="$ac_dir/$ac_prog" 30913eed67faSmbalmer # Check to see if the program is GNU ld. I'd rather use --version, 30923eed67faSmbalmer # but apparently some variants of GNU ld only accept -v. 30933eed67faSmbalmer # Break only if it was the GNU/non-GNU ld that we prefer. 30943eed67faSmbalmer case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 30953eed67faSmbalmer *GNU* | *'with BFD'*) 30963eed67faSmbalmer test "$with_gnu_ld" != no && break 30973eed67faSmbalmer ;; 30983eed67faSmbalmer *) 30993eed67faSmbalmer test "$with_gnu_ld" != yes && break 31003eed67faSmbalmer ;; 31013eed67faSmbalmer esac 31023eed67faSmbalmer fi 31033eed67faSmbalmer done 31043eed67faSmbalmer IFS="$lt_save_ifs" 31053eed67faSmbalmerelse 31063eed67faSmbalmer lt_cv_path_LD="$LD" # Let the user override the test with a path. 31073eed67faSmbalmerfi]) 31083eed67faSmbalmerLD="$lt_cv_path_LD" 31093eed67faSmbalmerif test -n "$LD"; then 31103eed67faSmbalmer AC_MSG_RESULT($LD) 31113eed67faSmbalmerelse 31123eed67faSmbalmer AC_MSG_RESULT(no) 31133eed67faSmbalmerfi 31143eed67faSmbalmertest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 3115dc407927Smrg_LT_PATH_LD_GNU 3116dc407927SmrgAC_SUBST([LD]) 31173eed67faSmbalmer 3118dc407927Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 3119dc407927Smrg])# LT_PATH_LD 31203eed67faSmbalmer 3121dc407927Smrg# Old names: 3122dc407927SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 3123dc407927SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 3124dc407927Smrgdnl aclocal-1.4 backwards compatibility: 3125dc407927Smrgdnl AC_DEFUN([AM_PROG_LD], []) 3126dc407927Smrgdnl AC_DEFUN([AC_PROG_LD], []) 3127dc407927Smrg 3128dc407927Smrg 3129dc407927Smrg# _LT_PATH_LD_GNU 3130dc407927Smrg#- -------------- 3131dc407927Smrgm4_defun([_LT_PATH_LD_GNU], 3132dc407927Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 31333eed67faSmbalmer[# I'd rather use --version here, but apparently some GNU lds only accept -v. 31343eed67faSmbalmercase `$LD -v 2>&1 </dev/null` in 31353eed67faSmbalmer*GNU* | *'with BFD'*) 31363eed67faSmbalmer lt_cv_prog_gnu_ld=yes 31373eed67faSmbalmer ;; 31383eed67faSmbalmer*) 31393eed67faSmbalmer lt_cv_prog_gnu_ld=no 31403eed67faSmbalmer ;; 31413eed67faSmbalmeresac]) 31423eed67faSmbalmerwith_gnu_ld=$lt_cv_prog_gnu_ld 3143dc407927Smrg])# _LT_PATH_LD_GNU 31443eed67faSmbalmer 31453eed67faSmbalmer 3146dc407927Smrg# _LT_CMD_RELOAD 3147dc407927Smrg# -------------- 31483eed67faSmbalmer# find reload flag for linker 31493eed67faSmbalmer# -- PORTME Some linkers may need a different reload flag. 3150dc407927Smrgm4_defun([_LT_CMD_RELOAD], 31513eed67faSmbalmer[AC_CACHE_CHECK([for $LD option to reload object files], 31523eed67faSmbalmer lt_cv_ld_reload_flag, 31533eed67faSmbalmer [lt_cv_ld_reload_flag='-r']) 31543eed67faSmbalmerreload_flag=$lt_cv_ld_reload_flag 31553eed67faSmbalmercase $reload_flag in 31563eed67faSmbalmer"" | " "*) ;; 31573eed67faSmbalmer*) reload_flag=" $reload_flag" ;; 31583eed67faSmbalmeresac 31593eed67faSmbalmerreload_cmds='$LD$reload_flag -o $output$reload_objs' 31603eed67faSmbalmercase $host_os in 3161dd0822caSmrg cygwin* | mingw* | pw32* | cegcc*) 3162dd0822caSmrg if test "$GCC" != yes; then 3163dd0822caSmrg reload_cmds=false 3164dd0822caSmrg fi 3165dd0822caSmrg ;; 31663eed67faSmbalmer darwin*) 31673eed67faSmbalmer if test "$GCC" = yes; then 31683eed67faSmbalmer reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 31693eed67faSmbalmer else 31703eed67faSmbalmer reload_cmds='$LD$reload_flag -o $output$reload_objs' 31713eed67faSmbalmer fi 31723eed67faSmbalmer ;; 31733eed67faSmbalmeresac 3174dd0822caSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl 3175dd0822caSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl 3176dc407927Smrg])# _LT_CMD_RELOAD 31773eed67faSmbalmer 31783eed67faSmbalmer 3179dc407927Smrg# _LT_CHECK_MAGIC_METHOD 3180dc407927Smrg# ---------------------- 31813eed67faSmbalmer# how to check for library dependencies 31823eed67faSmbalmer# -- PORTME fill in with the dynamic library characteristics 3183dc407927Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 3184dc407927Smrg[m4_require([_LT_DECL_EGREP]) 3185dc407927Smrgm4_require([_LT_DECL_OBJDUMP]) 3186dc407927SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 31873eed67faSmbalmerlt_cv_deplibs_check_method, 31883eed67faSmbalmer[lt_cv_file_magic_cmd='$MAGIC_CMD' 31893eed67faSmbalmerlt_cv_file_magic_test_file= 31903eed67faSmbalmerlt_cv_deplibs_check_method='unknown' 31913eed67faSmbalmer# Need to set the preceding variable on all platforms that support 31923eed67faSmbalmer# interlibrary dependencies. 31933eed67faSmbalmer# 'none' -- dependencies not supported. 31943eed67faSmbalmer# `unknown' -- same as none, but documents that we really don't know. 31953eed67faSmbalmer# 'pass_all' -- all dependencies passed with no checks. 31963eed67faSmbalmer# 'test_compile' -- check by making test program. 31973eed67faSmbalmer# 'file_magic [[regex]]' -- check by looking for files in library path 31983eed67faSmbalmer# which responds to the $file_magic_cmd with a given extended regex. 31993eed67faSmbalmer# If you have `file' or equivalent on your system and you're not sure 32003eed67faSmbalmer# whether `pass_all' will *always* work, you probably want this one. 32013eed67faSmbalmer 32023eed67faSmbalmercase $host_os in 32033eed67faSmbalmeraix[[4-9]]*) 32043eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32053eed67faSmbalmer ;; 32063eed67faSmbalmer 32073eed67faSmbalmerbeos*) 32083eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32093eed67faSmbalmer ;; 32103eed67faSmbalmer 32113eed67faSmbalmerbsdi[[45]]*) 32123eed67faSmbalmer lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 32133eed67faSmbalmer lt_cv_file_magic_cmd='/usr/bin/file -L' 32143eed67faSmbalmer lt_cv_file_magic_test_file=/shlib/libc.so 32153eed67faSmbalmer ;; 32163eed67faSmbalmer 32173eed67faSmbalmercygwin*) 32183eed67faSmbalmer # func_win32_libid is a shell function defined in ltmain.sh 32193eed67faSmbalmer lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32203eed67faSmbalmer lt_cv_file_magic_cmd='func_win32_libid' 32213eed67faSmbalmer ;; 32223eed67faSmbalmer 32233eed67faSmbalmermingw* | pw32*) 32243eed67faSmbalmer # Base MSYS/MinGW do not provide the 'file' command needed by 32253eed67faSmbalmer # func_win32_libid shell function, so use a weaker test based on 'objdump', 32263eed67faSmbalmer # unless we find 'file', for example because we are cross-compiling. 3227dd0822caSmrg # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. 3228dd0822caSmrg if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then 32293eed67faSmbalmer lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 32303eed67faSmbalmer lt_cv_file_magic_cmd='func_win32_libid' 32313eed67faSmbalmer else 3232dd0822caSmrg # Keep this pattern in sync with the one in func_win32_libid. 3233dd0822caSmrg lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' 32343eed67faSmbalmer lt_cv_file_magic_cmd='$OBJDUMP -f' 32353eed67faSmbalmer fi 32363eed67faSmbalmer ;; 32373eed67faSmbalmer 3238dd0822caSmrgcegcc*) 3239dc407927Smrg # use the weaker test based on 'objdump'. See mingw*. 3240dc407927Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3241dc407927Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3242dc407927Smrg ;; 3243dc407927Smrg 32443eed67faSmbalmerdarwin* | rhapsody*) 32453eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32463eed67faSmbalmer ;; 32473eed67faSmbalmer 32483eed67faSmbalmerfreebsd* | dragonfly*) 3249dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 32503eed67faSmbalmer case $host_cpu in 32513eed67faSmbalmer i*86 ) 32523eed67faSmbalmer # Not sure whether the presence of OpenBSD here was a mistake. 32533eed67faSmbalmer # Let's accept both of them until this is cleared up. 32543eed67faSmbalmer lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 32553eed67faSmbalmer lt_cv_file_magic_cmd=/usr/bin/file 32563eed67faSmbalmer lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 32573eed67faSmbalmer ;; 32583eed67faSmbalmer esac 32593eed67faSmbalmer else 32603eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32613eed67faSmbalmer fi 32623eed67faSmbalmer ;; 32633eed67faSmbalmer 32643eed67faSmbalmergnu*) 32653eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 32663eed67faSmbalmer ;; 32673eed67faSmbalmer 3268dd0822caSmrghaiku*) 3269dd0822caSmrg lt_cv_deplibs_check_method=pass_all 3270dd0822caSmrg ;; 3271dd0822caSmrg 32723eed67faSmbalmerhpux10.20* | hpux11*) 32733eed67faSmbalmer lt_cv_file_magic_cmd=/usr/bin/file 32743eed67faSmbalmer case $host_cpu in 32753eed67faSmbalmer ia64*) 32763eed67faSmbalmer lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 32773eed67faSmbalmer lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 32783eed67faSmbalmer ;; 32793eed67faSmbalmer hppa*64*) 3280dd0822caSmrg [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]'] 32813eed67faSmbalmer lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 32823eed67faSmbalmer ;; 32833eed67faSmbalmer *) 3284dd0822caSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' 32853eed67faSmbalmer lt_cv_file_magic_test_file=/usr/lib/libc.sl 32863eed67faSmbalmer ;; 32873eed67faSmbalmer esac 32883eed67faSmbalmer ;; 32893eed67faSmbalmer 32903eed67faSmbalmerinterix[[3-9]]*) 32913eed67faSmbalmer # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 32923eed67faSmbalmer lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 32933eed67faSmbalmer ;; 32943eed67faSmbalmer 32953eed67faSmbalmeririx5* | irix6* | nonstopux*) 32963eed67faSmbalmer case $LD in 32973eed67faSmbalmer *-32|*"-32 ") libmagic=32-bit;; 32983eed67faSmbalmer *-n32|*"-n32 ") libmagic=N32;; 32993eed67faSmbalmer *-64|*"-64 ") libmagic=64-bit;; 33003eed67faSmbalmer *) libmagic=never-match;; 33013eed67faSmbalmer esac 33023eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33033eed67faSmbalmer ;; 33043eed67faSmbalmer 330575cbef56Smrg# This must be glibc/ELF. 3306dd0822caSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu) 33073eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33083eed67faSmbalmer ;; 33093eed67faSmbalmer 33103eed67faSmbalmernetbsd*) 3311dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 33123eed67faSmbalmer lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 33133eed67faSmbalmer else 33143eed67faSmbalmer lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 33153eed67faSmbalmer fi 33163eed67faSmbalmer ;; 33173eed67faSmbalmer 33183eed67faSmbalmernewos6*) 33193eed67faSmbalmer lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 33203eed67faSmbalmer lt_cv_file_magic_cmd=/usr/bin/file 33213eed67faSmbalmer lt_cv_file_magic_test_file=/usr/lib/libnls.so 33223eed67faSmbalmer ;; 33233eed67faSmbalmer 3324dc407927Smrg*nto* | *qnx*) 3325dc407927Smrg lt_cv_deplibs_check_method=pass_all 33263eed67faSmbalmer ;; 33273eed67faSmbalmer 33283eed67faSmbalmeropenbsd*) 3329dc407927Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 33303eed67faSmbalmer lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 33313eed67faSmbalmer else 33323eed67faSmbalmer lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 33333eed67faSmbalmer fi 33343eed67faSmbalmer ;; 33353eed67faSmbalmer 33363eed67faSmbalmerosf3* | osf4* | osf5*) 33373eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33383eed67faSmbalmer ;; 33393eed67faSmbalmer 33403eed67faSmbalmerrdos*) 33413eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33423eed67faSmbalmer ;; 33433eed67faSmbalmer 33443eed67faSmbalmersolaris*) 33453eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33463eed67faSmbalmer ;; 33473eed67faSmbalmer 3348dc407927Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3349dc407927Smrg lt_cv_deplibs_check_method=pass_all 3350dc407927Smrg ;; 3351dc407927Smrg 33523eed67faSmbalmersysv4 | sysv4.3*) 33533eed67faSmbalmer case $host_vendor in 33543eed67faSmbalmer motorola) 33553eed67faSmbalmer 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]]' 33563eed67faSmbalmer lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 33573eed67faSmbalmer ;; 33583eed67faSmbalmer ncr) 33593eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33603eed67faSmbalmer ;; 33613eed67faSmbalmer sequent) 33623eed67faSmbalmer lt_cv_file_magic_cmd='/bin/file' 33633eed67faSmbalmer lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 33643eed67faSmbalmer ;; 33653eed67faSmbalmer sni) 33663eed67faSmbalmer lt_cv_file_magic_cmd='/bin/file' 33673eed67faSmbalmer lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 33683eed67faSmbalmer lt_cv_file_magic_test_file=/lib/libc.so 33693eed67faSmbalmer ;; 33703eed67faSmbalmer siemens) 33713eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33723eed67faSmbalmer ;; 33733eed67faSmbalmer pc) 33743eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33753eed67faSmbalmer ;; 33763eed67faSmbalmer esac 33773eed67faSmbalmer ;; 33783eed67faSmbalmer 3379dc407927Smrgtpf*) 33803eed67faSmbalmer lt_cv_deplibs_check_method=pass_all 33813eed67faSmbalmer ;; 33823eed67faSmbalmeresac 33833eed67faSmbalmer]) 3384dd0822caSmrg 3385dd0822caSmrgfile_magic_glob= 3386dd0822caSmrgwant_nocaseglob=no 3387dd0822caSmrgif test "$build" = "$host"; then 3388dd0822caSmrg case $host_os in 3389dd0822caSmrg mingw* | pw32*) 3390dd0822caSmrg if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then 3391dd0822caSmrg want_nocaseglob=yes 3392dd0822caSmrg else 3393dd0822caSmrg file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` 3394dd0822caSmrg fi 3395dd0822caSmrg ;; 3396dd0822caSmrg esac 3397dd0822caSmrgfi 3398dd0822caSmrg 33993eed67faSmbalmerfile_magic_cmd=$lt_cv_file_magic_cmd 34003eed67faSmbalmerdeplibs_check_method=$lt_cv_deplibs_check_method 34013eed67faSmbalmertest -z "$deplibs_check_method" && deplibs_check_method=unknown 34023eed67faSmbalmer 3403dc407927Smrg_LT_DECL([], [deplibs_check_method], [1], 3404dc407927Smrg [Method to check whether dependent libraries are shared objects]) 3405dc407927Smrg_LT_DECL([], [file_magic_cmd], [1], 3406dd0822caSmrg [Command to use when deplibs_check_method = "file_magic"]) 3407dd0822caSmrg_LT_DECL([], [file_magic_glob], [1], 3408dd0822caSmrg [How to find potential files when deplibs_check_method = "file_magic"]) 3409dd0822caSmrg_LT_DECL([], [want_nocaseglob], [1], 3410dd0822caSmrg [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) 3411dc407927Smrg])# _LT_CHECK_MAGIC_METHOD 34123eed67faSmbalmer 3413dc407927Smrg 3414dc407927Smrg# LT_PATH_NM 34153eed67faSmbalmer# ---------- 3416dc407927Smrg# find the pathname to a BSD- or MS-compatible name lister 3417dc407927SmrgAC_DEFUN([LT_PATH_NM], 3418dc407927Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3419dc407927SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 34203eed67faSmbalmer[if test -n "$NM"; then 34213eed67faSmbalmer # Let the user override the test. 34223eed67faSmbalmer lt_cv_path_NM="$NM" 34233eed67faSmbalmerelse 34243eed67faSmbalmer lt_nm_to_check="${ac_tool_prefix}nm" 34253eed67faSmbalmer if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 34263eed67faSmbalmer lt_nm_to_check="$lt_nm_to_check nm" 34273eed67faSmbalmer fi 34283eed67faSmbalmer for lt_tmp_nm in $lt_nm_to_check; do 34293eed67faSmbalmer lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 34303eed67faSmbalmer for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 34313eed67faSmbalmer IFS="$lt_save_ifs" 34323eed67faSmbalmer test -z "$ac_dir" && ac_dir=. 34333eed67faSmbalmer tmp_nm="$ac_dir/$lt_tmp_nm" 34343eed67faSmbalmer if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 34353eed67faSmbalmer # Check to see if the nm accepts a BSD-compat flag. 34363eed67faSmbalmer # Adding the `sed 1q' prevents false positives on HP-UX, which says: 34373eed67faSmbalmer # nm: unknown option "B" ignored 34383eed67faSmbalmer # Tru64's nm complains that /dev/null is an invalid object file 34393eed67faSmbalmer case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 34403eed67faSmbalmer */dev/null* | *'Invalid file or object type'*) 34413eed67faSmbalmer lt_cv_path_NM="$tmp_nm -B" 34423eed67faSmbalmer break 34433eed67faSmbalmer ;; 34443eed67faSmbalmer *) 34453eed67faSmbalmer case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 34463eed67faSmbalmer */dev/null*) 34473eed67faSmbalmer lt_cv_path_NM="$tmp_nm -p" 34483eed67faSmbalmer break 34493eed67faSmbalmer ;; 34503eed67faSmbalmer *) 34513eed67faSmbalmer lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 34523eed67faSmbalmer continue # so that we can try to find one that supports BSD flags 34533eed67faSmbalmer ;; 34543eed67faSmbalmer esac 34553eed67faSmbalmer ;; 34563eed67faSmbalmer esac 34573eed67faSmbalmer fi 34583eed67faSmbalmer done 34593eed67faSmbalmer IFS="$lt_save_ifs" 34603eed67faSmbalmer done 3461dc407927Smrg : ${lt_cv_path_NM=no} 34623eed67faSmbalmerfi]) 3463dc407927Smrgif test "$lt_cv_path_NM" != "no"; then 3464dc407927Smrg NM="$lt_cv_path_NM" 3465dc407927Smrgelse 3466dc407927Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3467dd0822caSmrg if test -n "$DUMPBIN"; then : 3468dd0822caSmrg # Let the user override the test. 3469dd0822caSmrg else 3470dd0822caSmrg AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) 3471dd0822caSmrg case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in 3472dd0822caSmrg *COFF*) 3473dd0822caSmrg DUMPBIN="$DUMPBIN -symbols" 3474dd0822caSmrg ;; 3475dd0822caSmrg *) 3476dd0822caSmrg DUMPBIN=: 3477dd0822caSmrg ;; 3478dd0822caSmrg esac 3479dd0822caSmrg fi 3480dc407927Smrg AC_SUBST([DUMPBIN]) 3481dc407927Smrg if test "$DUMPBIN" != ":"; then 3482dc407927Smrg NM="$DUMPBIN" 3483dc407927Smrg fi 3484dc407927Smrgfi 3485dc407927Smrgtest -z "$NM" && NM=nm 3486dc407927SmrgAC_SUBST([NM]) 3487dc407927Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3488dc407927Smrg 3489dc407927SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3490dc407927Smrg [lt_cv_nm_interface="BSD nm" 3491dc407927Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3492dd0822caSmrg (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3493dc407927Smrg (eval "$ac_compile" 2>conftest.err) 3494dc407927Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3495dd0822caSmrg (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3496dc407927Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3497dc407927Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3498dd0822caSmrg (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) 3499dc407927Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3500dc407927Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3501dc407927Smrg lt_cv_nm_interface="MS dumpbin" 3502dc407927Smrg fi 3503dc407927Smrg rm -f conftest*]) 3504dc407927Smrg])# LT_PATH_NM 35053eed67faSmbalmer 3506dc407927Smrg# Old names: 3507dc407927SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3508dc407927SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3509dc407927Smrgdnl aclocal-1.4 backwards compatibility: 3510dc407927Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3511dc407927Smrgdnl AC_DEFUN([AC_PROG_NM], []) 35123eed67faSmbalmer 3513dd0822caSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3514dd0822caSmrg# -------------------------------- 3515dd0822caSmrg# how to determine the name of the shared library 3516dd0822caSmrg# associated with a specific link library. 3517dd0822caSmrg# -- PORTME fill in with the dynamic library characteristics 3518dd0822caSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], 3519dd0822caSmrg[m4_require([_LT_DECL_EGREP]) 3520dd0822caSmrgm4_require([_LT_DECL_OBJDUMP]) 3521dd0822caSmrgm4_require([_LT_DECL_DLLTOOL]) 3522dd0822caSmrgAC_CACHE_CHECK([how to associate runtime and link libraries], 3523dd0822caSmrglt_cv_sharedlib_from_linklib_cmd, 3524dd0822caSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown' 3525dd0822caSmrg 3526dd0822caSmrgcase $host_os in 3527dd0822caSmrgcygwin* | mingw* | pw32* | cegcc*) 3528dd0822caSmrg # two different shell functions defined in ltmain.sh 3529dd0822caSmrg # decide which to use based on capabilities of $DLLTOOL 3530dd0822caSmrg case `$DLLTOOL --help 2>&1` in 3531dd0822caSmrg *--identify-strict*) 3532dd0822caSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib 3533dd0822caSmrg ;; 3534dd0822caSmrg *) 3535dd0822caSmrg lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback 3536dd0822caSmrg ;; 3537dd0822caSmrg esac 3538dd0822caSmrg ;; 3539dd0822caSmrg*) 3540dd0822caSmrg # fallback: assume linklib IS sharedlib 3541dd0822caSmrg lt_cv_sharedlib_from_linklib_cmd="$ECHO" 3542dd0822caSmrg ;; 3543dd0822caSmrgesac 3544dd0822caSmrg]) 3545dd0822caSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd 3546dd0822caSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO 3547dd0822caSmrg 3548dd0822caSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1], 3549dd0822caSmrg [Command to associate shared and link libraries]) 3550dd0822caSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB 3551dd0822caSmrg 3552dd0822caSmrg 3553dd0822caSmrg# _LT_PATH_MANIFEST_TOOL 3554dd0822caSmrg# ---------------------- 3555dd0822caSmrg# locate the manifest tool 3556dd0822caSmrgm4_defun([_LT_PATH_MANIFEST_TOOL], 3557dd0822caSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) 3558dd0822caSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt 3559dd0822caSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], 3560dd0822caSmrg [lt_cv_path_mainfest_tool=no 3561dd0822caSmrg echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD 3562dd0822caSmrg $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out 3563dd0822caSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3564dd0822caSmrg if $GREP 'Manifest Tool' conftest.out > /dev/null; then 3565dd0822caSmrg lt_cv_path_mainfest_tool=yes 3566dd0822caSmrg fi 3567dd0822caSmrg rm -f conftest*]) 3568dd0822caSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then 3569dd0822caSmrg MANIFEST_TOOL=: 3570dd0822caSmrgfi 3571dd0822caSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl 3572dd0822caSmrg])# _LT_PATH_MANIFEST_TOOL 3573dd0822caSmrg 3574dc407927Smrg 3575dc407927Smrg# LT_LIB_M 3576dc407927Smrg# -------- 35773eed67faSmbalmer# check for math library 3578dc407927SmrgAC_DEFUN([LT_LIB_M], 35793eed67faSmbalmer[AC_REQUIRE([AC_CANONICAL_HOST])dnl 35803eed67faSmbalmerLIBM= 35813eed67faSmbalmercase $host in 3582dd0822caSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) 35833eed67faSmbalmer # These system don't have libm, or don't need it 35843eed67faSmbalmer ;; 35853eed67faSmbalmer*-ncr-sysv4.3*) 35863eed67faSmbalmer AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 35873eed67faSmbalmer AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 35883eed67faSmbalmer ;; 35893eed67faSmbalmer*) 35903eed67faSmbalmer AC_CHECK_LIB(m, cos, LIBM="-lm") 35913eed67faSmbalmer ;; 35923eed67faSmbalmeresac 3593dc407927SmrgAC_SUBST([LIBM]) 3594dc407927Smrg])# LT_LIB_M 35953eed67faSmbalmer 3596dc407927Smrg# Old name: 3597dc407927SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3598dc407927Smrgdnl aclocal-1.4 backwards compatibility: 3599dc407927Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 36003eed67faSmbalmer 36013eed67faSmbalmer 3602dc407927Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3603dc407927Smrg# ------------------------------- 3604dc407927Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3605dc407927Smrg[m4_require([_LT_TAG_COMPILER])dnl 36063eed67faSmbalmer 3607dc407927Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 36083eed67faSmbalmer 3609dc407927Smrgif test "$GCC" = yes; then 3610dd0822caSmrg case $cc_basename in 3611dd0822caSmrg nvcc*) 3612dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; 3613dd0822caSmrg *) 3614dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; 3615dd0822caSmrg esac 36163eed67faSmbalmer 3617dc407927Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3618dc407927Smrg lt_cv_prog_compiler_rtti_exceptions, 3619dc407927Smrg [-fno-rtti -fno-exceptions], [], 3620dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3621dc407927Smrgfi 3622dc407927Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3623dc407927Smrg [Compiler flag to turn off builtin functions]) 3624dc407927Smrg])# _LT_COMPILER_NO_RTTI 36253eed67faSmbalmer 36263eed67faSmbalmer 3627dc407927Smrg# _LT_CMD_GLOBAL_SYMBOLS 3628dc407927Smrg# ---------------------- 3629dc407927Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3630dc407927Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3631dc407927SmrgAC_REQUIRE([AC_PROG_CC])dnl 3632dd0822caSmrgAC_REQUIRE([AC_PROG_AWK])dnl 3633dc407927SmrgAC_REQUIRE([LT_PATH_NM])dnl 3634dc407927SmrgAC_REQUIRE([LT_PATH_LD])dnl 3635dc407927Smrgm4_require([_LT_DECL_SED])dnl 3636dc407927Smrgm4_require([_LT_DECL_EGREP])dnl 3637dc407927Smrgm4_require([_LT_TAG_COMPILER])dnl 36383eed67faSmbalmer 3639dc407927Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3640dc407927SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3641dc407927SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 36423eed67faSmbalmer[ 3643dc407927Smrg# These are sane defaults that work on at least a few old systems. 3644dc407927Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 36453eed67faSmbalmer 3646dc407927Smrg# Character class describing NM global symbol codes. 3647dc407927Smrgsymcode='[[BCDEGRST]]' 36483eed67faSmbalmer 3649dc407927Smrg# Regexp to match symbols that can be accessed directly from C. 3650dc407927Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 36513eed67faSmbalmer 3652dc407927Smrg# Define system-specific variables. 3653dc407927Smrgcase $host_os in 3654dc407927Smrgaix*) 3655dc407927Smrg symcode='[[BCDT]]' 3656dc407927Smrg ;; 3657dc407927Smrgcygwin* | mingw* | pw32* | cegcc*) 3658dc407927Smrg symcode='[[ABCDGISTW]]' 3659dc407927Smrg ;; 3660dc407927Smrghpux*) 3661dc407927Smrg if test "$host_cpu" = ia64; then 3662dc407927Smrg symcode='[[ABCDEGRST]]' 3663dc407927Smrg fi 3664dc407927Smrg ;; 3665dc407927Smrgirix* | nonstopux*) 3666dc407927Smrg symcode='[[BCDEGRST]]' 3667dc407927Smrg ;; 3668dc407927Smrgosf*) 3669dc407927Smrg symcode='[[BCDEGQRST]]' 3670dc407927Smrg ;; 3671dc407927Smrgsolaris*) 3672dc407927Smrg symcode='[[BDRT]]' 3673dc407927Smrg ;; 3674dc407927Smrgsco3.2v5*) 3675dc407927Smrg symcode='[[DT]]' 3676dc407927Smrg ;; 3677dc407927Smrgsysv4.2uw2*) 3678dc407927Smrg symcode='[[DT]]' 3679dc407927Smrg ;; 3680dc407927Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3681dc407927Smrg symcode='[[ABDT]]' 3682dc407927Smrg ;; 3683dc407927Smrgsysv4) 3684dc407927Smrg symcode='[[DFNSTU]]' 3685dc407927Smrg ;; 3686dc407927Smrgesac 36873eed67faSmbalmer 3688dc407927Smrg# If we're using GNU nm, then use its standard symbol codes. 3689dc407927Smrgcase `$NM -V 2>&1` in 3690dc407927Smrg*GNU* | *'with BFD'*) 3691dc407927Smrg symcode='[[ABCDGIRSTW]]' ;; 3692dc407927Smrgesac 36933eed67faSmbalmer 3694dc407927Smrg# Transform an extracted symbol line into a proper C declaration. 3695dc407927Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3696dc407927Smrg# so use this general approach. 3697dc407927Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 36983eed67faSmbalmer 3699dc407927Smrg# Transform an extracted symbol line into symbol name and symbol address 3700dd0822caSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3701dd0822caSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" 37023eed67faSmbalmer 3703dc407927Smrg# Handle CRLF in mingw tool chain 3704dc407927Smrgopt_cr= 3705dc407927Smrgcase $build_os in 3706dc407927Smrgmingw*) 3707dc407927Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3708dc407927Smrg ;; 3709dc407927Smrgesac 37103eed67faSmbalmer 3711dc407927Smrg# Try without a prefix underscore, then with it. 3712dc407927Smrgfor ac_symprfx in "" "_"; do 37133eed67faSmbalmer 3714dc407927Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3715dc407927Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 37163eed67faSmbalmer 3717dc407927Smrg # Write the raw and C identifiers. 3718dc407927Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3719dc407927Smrg # Fake it for dumpbin and say T for any non-static function 3720dc407927Smrg # and D for any global variable. 3721dc407927Smrg # Also find C++ and __fastcall symbols from MSVC++, 3722dc407927Smrg # which start with @ or ?. 3723dc407927Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3724dc407927Smrg" {last_section=section; section=\$ 3};"\ 372575cbef56Smrg" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ 3726dc407927Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3727dc407927Smrg" \$ 0!~/External *\|/{next};"\ 3728dc407927Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3729dc407927Smrg" {if(hide[section]) next};"\ 3730dc407927Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3731dc407927Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3732dc407927Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3733dc407927Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3734dc407927Smrg" ' prfx=^$ac_symprfx]" 3735dc407927Smrg else 3736dc407927Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 37373eed67faSmbalmer fi 3738dd0822caSmrg lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" 37393eed67faSmbalmer 3740dc407927Smrg # Check to see that the pipe works correctly. 3741dc407927Smrg pipe_works=no 37423eed67faSmbalmer 3743dc407927Smrg rm -f conftest* 3744dc407927Smrg cat > conftest.$ac_ext <<_LT_EOF 3745dc407927Smrg#ifdef __cplusplus 3746dc407927Smrgextern "C" { 3747dc407927Smrg#endif 3748dc407927Smrgchar nm_test_var; 3749dc407927Smrgvoid nm_test_func(void); 3750dc407927Smrgvoid nm_test_func(void){} 3751dc407927Smrg#ifdef __cplusplus 3752dc407927Smrg} 3753dc407927Smrg#endif 3754dc407927Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3755dc407927Smrg_LT_EOF 37563eed67faSmbalmer 3757dc407927Smrg if AC_TRY_EVAL(ac_compile); then 3758dc407927Smrg # Now try to grab the symbols. 3759dc407927Smrg nlist=conftest.nm 3760dd0822caSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then 3761dc407927Smrg # Try sorting and uniquifying the output. 3762dc407927Smrg if sort "$nlist" | uniq > "$nlist"T; then 3763dc407927Smrg mv -f "$nlist"T "$nlist" 3764dc407927Smrg else 3765dc407927Smrg rm -f "$nlist"T 3766dc407927Smrg fi 37673eed67faSmbalmer 3768dc407927Smrg # Make sure that we snagged all the symbols we need. 3769dc407927Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3770dc407927Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3771dc407927Smrg cat <<_LT_EOF > conftest.$ac_ext 3772dd0822caSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ 3773dd0822caSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) 3774dd0822caSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime 3775dd0822caSmrg relocations are performed -- see ld's documentation on pseudo-relocs. */ 3776dd0822caSmrg# define LT@&t@_DLSYM_CONST 3777dd0822caSmrg#elif defined(__osf__) 3778dd0822caSmrg/* This system does not cope well with relocations in const data. */ 3779dd0822caSmrg# define LT@&t@_DLSYM_CONST 3780dd0822caSmrg#else 3781dd0822caSmrg# define LT@&t@_DLSYM_CONST const 3782dd0822caSmrg#endif 3783dd0822caSmrg 3784dc407927Smrg#ifdef __cplusplus 3785dc407927Smrgextern "C" { 3786dc407927Smrg#endif 37873eed67faSmbalmer 3788dc407927Smrg_LT_EOF 3789dc407927Smrg # Now generate the symbol file. 3790dc407927Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 37913eed67faSmbalmer 3792dc407927Smrg cat <<_LT_EOF >> conftest.$ac_ext 37933eed67faSmbalmer 3794dc407927Smrg/* The mapping between symbol names and symbols. */ 3795dd0822caSmrgLT@&t@_DLSYM_CONST struct { 3796dc407927Smrg const char *name; 3797dc407927Smrg void *address; 3798dc407927Smrg} 3799dc407927Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3800dc407927Smrg{ 3801dc407927Smrg { "@PROGRAM@", (void *) 0 }, 3802dc407927Smrg_LT_EOF 3803dc407927Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3804dc407927Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3805dc407927Smrg {0, (void *) 0} 3806dc407927Smrg}; 38073eed67faSmbalmer 3808dc407927Smrg/* This works around a problem in FreeBSD linker */ 3809dc407927Smrg#ifdef FREEBSD_WORKAROUND 3810dc407927Smrgstatic const void *lt_preloaded_setup() { 3811dc407927Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3812dc407927Smrg} 3813dc407927Smrg#endif 38143eed67faSmbalmer 3815dc407927Smrg#ifdef __cplusplus 3816dc407927Smrg} 3817dc407927Smrg#endif 3818dc407927Smrg_LT_EOF 3819dc407927Smrg # Now try linking the two files. 3820dc407927Smrg mv conftest.$ac_objext conftstm.$ac_objext 3821dd0822caSmrg lt_globsym_save_LIBS=$LIBS 3822dd0822caSmrg lt_globsym_save_CFLAGS=$CFLAGS 3823dc407927Smrg LIBS="conftstm.$ac_objext" 3824dc407927Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3825dc407927Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3826dc407927Smrg pipe_works=yes 3827dc407927Smrg fi 3828dd0822caSmrg LIBS=$lt_globsym_save_LIBS 3829dd0822caSmrg CFLAGS=$lt_globsym_save_CFLAGS 3830dc407927Smrg else 3831dc407927Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3832dc407927Smrg fi 3833dc407927Smrg else 3834dc407927Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3835dc407927Smrg fi 38363eed67faSmbalmer else 3837dc407927Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 38383eed67faSmbalmer fi 38393eed67faSmbalmer else 3840dc407927Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3841dc407927Smrg cat conftest.$ac_ext >&5 38423eed67faSmbalmer fi 3843dc407927Smrg rm -rf conftest* conftst* 38443eed67faSmbalmer 3845dc407927Smrg # Do not use the global_symbol_pipe unless it works. 3846dc407927Smrg if test "$pipe_works" = yes; then 3847dc407927Smrg break 3848dc407927Smrg else 3849dc407927Smrg lt_cv_sys_global_symbol_pipe= 3850dc407927Smrg fi 3851dc407927Smrgdone 3852dc407927Smrg]) 3853dc407927Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3854dc407927Smrg lt_cv_sys_global_symbol_to_cdecl= 3855dc407927Smrgfi 3856dc407927Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3857dc407927Smrg AC_MSG_RESULT(failed) 38583eed67faSmbalmerelse 3859dc407927Smrg AC_MSG_RESULT(ok) 38603eed67faSmbalmerfi 38613eed67faSmbalmer 3862dd0822caSmrg# Response file support. 3863dd0822caSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then 3864dd0822caSmrg nm_file_list_spec='@' 3865dd0822caSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then 3866dd0822caSmrg nm_file_list_spec='@' 3867dd0822caSmrgfi 3868dd0822caSmrg 3869dc407927Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3870dc407927Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3871dc407927Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3872dc407927Smrg [Transform the output of nm in a proper C declaration]) 3873dc407927Smrg_LT_DECL([global_symbol_to_c_name_address], 3874dc407927Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3875dc407927Smrg [Transform the output of nm in a C name address pair]) 3876dc407927Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3877dc407927Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3878dc407927Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3879dd0822caSmrg_LT_DECL([], [nm_file_list_spec], [1], 3880dd0822caSmrg [Specify filename containing input files for $NM]) 3881dc407927Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 38823eed67faSmbalmer 38833eed67faSmbalmer 3884dc407927Smrg# _LT_COMPILER_PIC([TAGNAME]) 3885dc407927Smrg# --------------------------- 3886dc407927Smrgm4_defun([_LT_COMPILER_PIC], 3887dc407927Smrg[m4_require([_LT_TAG_COMPILER])dnl 3888dc407927Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3889dc407927Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3890dc407927Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 38913eed67faSmbalmer 3892dc407927Smrgm4_if([$1], [CXX], [ 3893dc407927Smrg # C++ specific cases for pic, static, wl, etc. 3894dc407927Smrg if test "$GXX" = yes; then 3895dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3896dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 38973eed67faSmbalmer 3898dc407927Smrg case $host_os in 3899dc407927Smrg aix*) 3900dc407927Smrg # All AIX code is PIC. 39013eed67faSmbalmer if test "$host_cpu" = ia64; then 3902dc407927Smrg # AIX 5 now supports IA64 processor 3903dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 39043eed67faSmbalmer fi 39053eed67faSmbalmer ;; 39063eed67faSmbalmer 3907dc407927Smrg amigaos*) 39083eed67faSmbalmer case $host_cpu in 3909dc407927Smrg powerpc) 3910dc407927Smrg # see comment about AmigaOS4 .so support 3911dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3912dc407927Smrg ;; 3913dc407927Smrg m68k) 3914dc407927Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3915dc407927Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3916dc407927Smrg # like `-m68040'. 3917dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 39183eed67faSmbalmer ;; 39193eed67faSmbalmer esac 39203eed67faSmbalmer ;; 39213eed67faSmbalmer 3922dc407927Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3923dc407927Smrg # PIC is the default for these OSes. 3924dc407927Smrg ;; 3925dc407927Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3926dc407927Smrg # This hack is so that the source file can tell whether it is being 3927dc407927Smrg # built for inclusion in a dll (and should export symbols for example). 3928dc407927Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3929dc407927Smrg # (--disable-auto-import) libraries 3930dc407927Smrg m4_if([$1], [GCJ], [], 3931dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3932dc407927Smrg ;; 3933dc407927Smrg darwin* | rhapsody*) 3934dc407927Smrg # PIC is the default on this platform 3935dc407927Smrg # Common symbols not allowed in MH_DYLIB files 3936dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3937dc407927Smrg ;; 3938dc407927Smrg *djgpp*) 3939dc407927Smrg # DJGPP does not support shared libraries at all 3940dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3941dc407927Smrg ;; 3942dd0822caSmrg haiku*) 3943dd0822caSmrg # PIC is the default for Haiku. 3944dd0822caSmrg # The "-static" flag exists, but is broken. 3945dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 3946dd0822caSmrg ;; 3947dc407927Smrg interix[[3-9]]*) 3948dc407927Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3949dc407927Smrg # Instead, we relocate shared libraries at runtime. 3950dc407927Smrg ;; 3951dc407927Smrg sysv4*MP*) 3952dc407927Smrg if test -d /usr/nec; then 3953dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3954dc407927Smrg fi 3955dc407927Smrg ;; 3956dc407927Smrg hpux*) 3957dc407927Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3958dc407927Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3959dc407927Smrg # sets the default TLS model and affects inlining. 3960dc407927Smrg case $host_cpu in 3961dc407927Smrg hppa*64*) 39623eed67faSmbalmer ;; 39633eed67faSmbalmer *) 3964dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 39653eed67faSmbalmer ;; 3966dc407927Smrg esac 3967dc407927Smrg ;; 3968dc407927Smrg *qnx* | *nto*) 3969dc407927Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3970dc407927Smrg # it will coredump. 3971dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3972dc407927Smrg ;; 3973dc407927Smrg *) 3974dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3975dc407927Smrg ;; 39763eed67faSmbalmer esac 3977dc407927Smrg else 3978dc407927Smrg case $host_os in 3979dc407927Smrg aix[[4-9]]*) 3980dc407927Smrg # All AIX code is PIC. 3981dc407927Smrg if test "$host_cpu" = ia64; then 3982dc407927Smrg # AIX 5 now supports IA64 processor 3983dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3984dc407927Smrg else 3985dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 39863eed67faSmbalmer fi 39873eed67faSmbalmer ;; 3988dc407927Smrg chorus*) 3989dc407927Smrg case $cc_basename in 3990dc407927Smrg cxch68*) 3991dc407927Smrg # Green Hills C++ Compiler 3992dc407927Smrg # _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" 39933eed67faSmbalmer ;; 39943eed67faSmbalmer esac 39953eed67faSmbalmer ;; 3996dd0822caSmrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3997dd0822caSmrg # This hack is so that the source file can tell whether it is being 3998dd0822caSmrg # built for inclusion in a dll (and should export symbols for example). 3999dd0822caSmrg m4_if([$1], [GCJ], [], 4000dd0822caSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4001dd0822caSmrg ;; 4002dc407927Smrg dgux*) 4003dc407927Smrg case $cc_basename in 4004dc407927Smrg ec++*) 4005dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4006dc407927Smrg ;; 4007dc407927Smrg ghcx*) 4008dc407927Smrg # Green Hills C++ Compiler 4009dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4010dc407927Smrg ;; 4011dc407927Smrg *) 4012dc407927Smrg ;; 40133eed67faSmbalmer esac 40143eed67faSmbalmer ;; 4015dc407927Smrg freebsd* | dragonfly*) 4016dc407927Smrg # FreeBSD uses GNU C++ 40173eed67faSmbalmer ;; 4018dc407927Smrg hpux9* | hpux10* | hpux11*) 4019dc407927Smrg case $cc_basename in 4020dc407927Smrg CC*) 4021dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4022dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4023dc407927Smrg if test "$host_cpu" != ia64; then 4024dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4025dc407927Smrg fi 4026dc407927Smrg ;; 4027dc407927Smrg aCC*) 4028dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4029dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4030dc407927Smrg case $host_cpu in 4031dc407927Smrg hppa*64*|ia64*) 4032dc407927Smrg # +Z the default 4033dc407927Smrg ;; 4034dc407927Smrg *) 4035dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 4036dc407927Smrg ;; 4037dc407927Smrg esac 4038dc407927Smrg ;; 4039dc407927Smrg *) 4040dc407927Smrg ;; 4041dc407927Smrg esac 40423eed67faSmbalmer ;; 4043dc407927Smrg interix*) 4044dc407927Smrg # This is c89, which is MS Visual C++ (no shared libs) 4045dc407927Smrg # Anyone wants to do a port? 40463eed67faSmbalmer ;; 4047dc407927Smrg irix5* | irix6* | nonstopux*) 4048dc407927Smrg case $cc_basename in 4049dc407927Smrg CC*) 4050dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4051dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4052dc407927Smrg # CC pic flag -KPIC is the default. 4053dc407927Smrg ;; 4054dc407927Smrg *) 4055dc407927Smrg ;; 4056dc407927Smrg esac 40573eed67faSmbalmer ;; 4058dd0822caSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4059dc407927Smrg case $cc_basename in 4060dc407927Smrg KCC*) 4061dc407927Smrg # KAI C++ Compiler 4062dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4063dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4064dc407927Smrg ;; 4065dc407927Smrg ecpc* ) 4066dc407927Smrg # old Intel C++ for x86_64 which still supported -KPIC. 4067dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4068dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4069dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4070dc407927Smrg ;; 4071dc407927Smrg icpc* ) 4072dc407927Smrg # Intel C++, used to be incompatible with GCC. 4073dc407927Smrg # ICC 10 doesn't accept -KPIC any more. 4074dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4075dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4076dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4077dc407927Smrg ;; 4078dc407927Smrg pgCC* | pgcpp*) 4079dc407927Smrg # Portland Group C++ compiler 4080dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4081dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4082dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4083dc407927Smrg ;; 4084dc407927Smrg cxx*) 4085dc407927Smrg # Compaq C++ 4086dc407927Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4087dc407927Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4088dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4089dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4090dc407927Smrg ;; 4091dd0822caSmrg xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) 4092dd0822caSmrg # IBM XL 8.0, 9.0 on PPC and BlueGene 4093dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4094dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4095dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4096dc407927Smrg ;; 4097dc407927Smrg *) 4098dc407927Smrg case `$CC -V 2>&1 | sed 5q` in 4099dc407927Smrg *Sun\ C*) 4100dc407927Smrg # Sun C++ 5.9 4101dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4102dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4103dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4104dc407927Smrg ;; 4105dc407927Smrg esac 4106dc407927Smrg ;; 4107dc407927Smrg esac 41083eed67faSmbalmer ;; 4109dc407927Smrg lynxos*) 41103eed67faSmbalmer ;; 4111dc407927Smrg m88k*) 41123eed67faSmbalmer ;; 4113dc407927Smrg mvs*) 4114dc407927Smrg case $cc_basename in 4115dc407927Smrg cxx*) 4116dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 4117dc407927Smrg ;; 4118dc407927Smrg *) 4119dc407927Smrg ;; 4120dc407927Smrg esac 41213eed67faSmbalmer ;; 4122dc407927Smrg netbsd*) 41233eed67faSmbalmer ;; 4124dc407927Smrg *qnx* | *nto*) 4125dc407927Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4126dc407927Smrg # it will coredump. 4127dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4128dc407927Smrg ;; 4129dc407927Smrg osf3* | osf4* | osf5*) 4130dc407927Smrg case $cc_basename in 4131dc407927Smrg KCC*) 4132dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 4133dc407927Smrg ;; 4134dc407927Smrg RCC*) 4135dc407927Smrg # Rational C++ 2.4.1 4136dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4137dc407927Smrg ;; 4138dc407927Smrg cxx*) 4139dc407927Smrg # Digital/Compaq C++ 4140dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4141dc407927Smrg # Make sure the PIC flag is empty. It appears that all Alpha 4142dc407927Smrg # Linux and Compaq Tru64 Unix objects are PIC. 4143dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4144dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4145dc407927Smrg ;; 4146dc407927Smrg *) 4147dc407927Smrg ;; 4148dc407927Smrg esac 41493eed67faSmbalmer ;; 4150dc407927Smrg psos*) 41513eed67faSmbalmer ;; 4152dc407927Smrg solaris*) 4153dc407927Smrg case $cc_basename in 4154dd0822caSmrg CC* | sunCC*) 4155dc407927Smrg # Sun C++ 4.2, 5.x and Centerline C++ 4156dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4157dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4158dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4159dc407927Smrg ;; 4160dc407927Smrg gcx*) 4161dc407927Smrg # Green Hills C++ Compiler 4162dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4163dc407927Smrg ;; 4164dc407927Smrg *) 4165dc407927Smrg ;; 4166dc407927Smrg esac 41673eed67faSmbalmer ;; 4168dc407927Smrg sunos4*) 4169dc407927Smrg case $cc_basename in 4170dc407927Smrg CC*) 4171dc407927Smrg # Sun C++ 4.x 4172dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4173dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4174dc407927Smrg ;; 4175dc407927Smrg lcc*) 4176dc407927Smrg # Lucid 4177dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4178dc407927Smrg ;; 41793eed67faSmbalmer *) 41803eed67faSmbalmer ;; 41813eed67faSmbalmer esac 41823eed67faSmbalmer ;; 4183dc407927Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4184dc407927Smrg case $cc_basename in 4185dc407927Smrg CC*) 4186dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4187dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4188dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4189dc407927Smrg ;; 4190dc407927Smrg esac 41913eed67faSmbalmer ;; 4192dc407927Smrg tandem*) 4193dc407927Smrg case $cc_basename in 4194dc407927Smrg NCC*) 4195dc407927Smrg # NonStop-UX NCC 3.20 4196dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4197dc407927Smrg ;; 41983eed67faSmbalmer *) 41993eed67faSmbalmer ;; 4200dc407927Smrg esac 42013eed67faSmbalmer ;; 4202dc407927Smrg vxworks*) 42033eed67faSmbalmer ;; 42043eed67faSmbalmer *) 4205dc407927Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 42063eed67faSmbalmer ;; 42073eed67faSmbalmer esac 4208dc407927Smrg fi 4209dc407927Smrg], 4210dc407927Smrg[ 4211dc407927Smrg if test "$GCC" = yes; then 4212dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4213dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4214dc407927Smrg 4215dc407927Smrg case $host_os in 4216dc407927Smrg aix*) 4217dc407927Smrg # All AIX code is PIC. 4218dc407927Smrg if test "$host_cpu" = ia64; then 4219dc407927Smrg # AIX 5 now supports IA64 processor 4220dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4221dc407927Smrg fi 4222dc407927Smrg ;; 4223dc407927Smrg 4224dc407927Smrg amigaos*) 4225dc407927Smrg case $host_cpu in 4226dc407927Smrg powerpc) 4227dc407927Smrg # see comment about AmigaOS4 .so support 4228dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4229dc407927Smrg ;; 4230dc407927Smrg m68k) 4231dc407927Smrg # FIXME: we need at least 68020 code to build shared libraries, but 4232dc407927Smrg # adding the `-m68020' flag to GCC prevents building anything better, 4233dc407927Smrg # like `-m68040'. 4234dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 4235dc407927Smrg ;; 4236dc407927Smrg esac 4237dc407927Smrg ;; 4238dc407927Smrg 4239dc407927Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 4240dc407927Smrg # PIC is the default for these OSes. 4241dc407927Smrg ;; 4242dc407927Smrg 4243dc407927Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4244dc407927Smrg # This hack is so that the source file can tell whether it is being 4245dc407927Smrg # built for inclusion in a dll (and should export symbols for example). 4246dc407927Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 4247dc407927Smrg # (--disable-auto-import) libraries 4248dc407927Smrg m4_if([$1], [GCJ], [], 4249dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4250dc407927Smrg ;; 4251dc407927Smrg 4252dc407927Smrg darwin* | rhapsody*) 4253dc407927Smrg # PIC is the default on this platform 4254dc407927Smrg # Common symbols not allowed in MH_DYLIB files 4255dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 4256dc407927Smrg ;; 4257dc407927Smrg 4258dd0822caSmrg haiku*) 4259dd0822caSmrg # PIC is the default for Haiku. 4260dd0822caSmrg # The "-static" flag exists, but is broken. 4261dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)= 4262dd0822caSmrg ;; 4263dd0822caSmrg 4264dc407927Smrg hpux*) 4265dc407927Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 4266dc407927Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 4267dc407927Smrg # sets the default TLS model and affects inlining. 4268dc407927Smrg case $host_cpu in 4269dc407927Smrg hppa*64*) 4270dc407927Smrg # +Z the default 42713eed67faSmbalmer ;; 42723eed67faSmbalmer *) 4273dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 42743eed67faSmbalmer ;; 4275dc407927Smrg esac 4276dc407927Smrg ;; 4277dc407927Smrg 4278dc407927Smrg interix[[3-9]]*) 4279dc407927Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 4280dc407927Smrg # Instead, we relocate shared libraries at runtime. 4281dc407927Smrg ;; 4282dc407927Smrg 4283dc407927Smrg msdosdjgpp*) 4284dc407927Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 4285dc407927Smrg # on systems that don't support them. 4286dc407927Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4287dc407927Smrg enable_shared=no 4288dc407927Smrg ;; 4289dc407927Smrg 4290dc407927Smrg *nto* | *qnx*) 4291dc407927Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4292dc407927Smrg # it will coredump. 4293dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4294dc407927Smrg ;; 4295dc407927Smrg 4296dc407927Smrg sysv4*MP*) 4297dc407927Smrg if test -d /usr/nec; then 4298dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 4299dc407927Smrg fi 4300dc407927Smrg ;; 4301dc407927Smrg 4302dc407927Smrg *) 4303dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4304dc407927Smrg ;; 43053eed67faSmbalmer esac 4306dd0822caSmrg 4307dd0822caSmrg case $cc_basename in 4308dd0822caSmrg nvcc*) # Cuda Compiler Driver 2.2 4309dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' 431075cbef56Smrg if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 431175cbef56Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" 431275cbef56Smrg fi 4313dd0822caSmrg ;; 4314dd0822caSmrg esac 4315dc407927Smrg else 4316dc407927Smrg # PORTME Check for flag to pass linker flags through the system compiler. 4317dc407927Smrg case $host_os in 4318dc407927Smrg aix*) 4319dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4320dc407927Smrg if test "$host_cpu" = ia64; then 4321dc407927Smrg # AIX 5 now supports IA64 processor 4322dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4323dc407927Smrg else 4324dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 4325dc407927Smrg fi 4326dc407927Smrg ;; 4327dc407927Smrg 4328dc407927Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 4329dc407927Smrg # This hack is so that the source file can tell whether it is being 4330dc407927Smrg # built for inclusion in a dll (and should export symbols for example). 4331dc407927Smrg m4_if([$1], [GCJ], [], 4332dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 4333dc407927Smrg ;; 4334dc407927Smrg 4335dc407927Smrg hpux9* | hpux10* | hpux11*) 4336dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4337dc407927Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 4338dc407927Smrg # not for PA HP-UX. 4339dc407927Smrg case $host_cpu in 4340dc407927Smrg hppa*64*|ia64*) 4341dc407927Smrg # +Z the default 43423eed67faSmbalmer ;; 43433eed67faSmbalmer *) 4344dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 43453eed67faSmbalmer ;; 4346dc407927Smrg esac 4347dc407927Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 4348dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 4349dc407927Smrg ;; 43503eed67faSmbalmer 4351dc407927Smrg irix5* | irix6* | nonstopux*) 4352dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4353dc407927Smrg # PIC (with -KPIC) is the default. 4354dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4355dc407927Smrg ;; 43563eed67faSmbalmer 4357dd0822caSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 4358dc407927Smrg case $cc_basename in 4359dc407927Smrg # old Intel for x86_64 which still supported -KPIC. 4360dc407927Smrg ecc*) 4361dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4362dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4363dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4364dc407927Smrg ;; 4365dc407927Smrg # icc used to be incompatible with GCC. 4366dc407927Smrg # ICC 10 doesn't accept -KPIC any more. 4367dc407927Smrg icc* | ifort*) 4368dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4369dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4370dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4371dc407927Smrg ;; 4372dc407927Smrg # Lahey Fortran 8.1. 4373dc407927Smrg lf95*) 4374dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4375dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4376dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4377dc407927Smrg ;; 4378dd0822caSmrg nagfor*) 4379dd0822caSmrg # NAG Fortran compiler 4380dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' 4381dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4382dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4383dd0822caSmrg ;; 4384dd0822caSmrg pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) 4385dc407927Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4386dc407927Smrg # which looks to be a dead project) 4387dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4388dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4389dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4390dc407927Smrg ;; 4391dc407927Smrg ccc*) 4392dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4393dc407927Smrg # All Alpha code is PIC. 4394dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4395dc407927Smrg ;; 4396dd0822caSmrg xl* | bgxl* | bgf* | mpixl*) 4397dd0822caSmrg # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene 4398dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4399dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4400dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4401dc407927Smrg ;; 4402dc407927Smrg *) 4403dc407927Smrg case `$CC -V 2>&1 | sed 5q` in 440475cbef56Smrg *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) 4405dd0822caSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4406dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4407dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4408dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4409dc407927Smrg ;; 441075cbef56Smrg *Sun\ F* | *Sun*Fortran*) 441175cbef56Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 441275cbef56Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 441375cbef56Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 441475cbef56Smrg ;; 4415dd0822caSmrg *Sun\ C*) 4416dd0822caSmrg # Sun C 5.9 4417dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4418dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4419dd0822caSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4420dc407927Smrg ;; 442175cbef56Smrg *Intel*\ [[CF]]*Compiler*) 442275cbef56Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442375cbef56Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 442475cbef56Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 442575cbef56Smrg ;; 442675cbef56Smrg *Portland\ Group*) 442775cbef56Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 442875cbef56Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 442975cbef56Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 443075cbef56Smrg ;; 4431dc407927Smrg esac 4432dc407927Smrg ;; 4433dc407927Smrg esac 4434dc407927Smrg ;; 44353eed67faSmbalmer 4436dc407927Smrg newsos6) 4437dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4438dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4439dc407927Smrg ;; 44403eed67faSmbalmer 4441dc407927Smrg *nto* | *qnx*) 4442dc407927Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4443dc407927Smrg # it will coredump. 4444dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4445dc407927Smrg ;; 44463eed67faSmbalmer 4447dc407927Smrg osf3* | osf4* | osf5*) 4448dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4449dc407927Smrg # All OSF/1 code is PIC. 4450dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4451dc407927Smrg ;; 44523eed67faSmbalmer 4453dc407927Smrg rdos*) 4454dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4455dc407927Smrg ;; 44563eed67faSmbalmer 4457dc407927Smrg solaris*) 4458dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4459dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4460dc407927Smrg case $cc_basename in 4461dd0822caSmrg f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) 4462dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4463dc407927Smrg *) 4464dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4465dc407927Smrg esac 4466dc407927Smrg ;; 44673eed67faSmbalmer 4468dc407927Smrg sunos4*) 4469dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4470dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4471dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4472dc407927Smrg ;; 44733eed67faSmbalmer 4474dc407927Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4475dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4476dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4477dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4478dc407927Smrg ;; 44793eed67faSmbalmer 4480dc407927Smrg sysv4*MP*) 4481dc407927Smrg if test -d /usr/nec ;then 4482dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4483dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4484dc407927Smrg fi 4485dc407927Smrg ;; 44863eed67faSmbalmer 4487dc407927Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4488dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4489dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4490dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4491dc407927Smrg ;; 44923eed67faSmbalmer 4493dc407927Smrg unicos*) 4494dc407927Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4495dc407927Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4496dc407927Smrg ;; 44973eed67faSmbalmer 4498dc407927Smrg uts4*) 4499dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4500dc407927Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4501dc407927Smrg ;; 4502dc407927Smrg 4503dc407927Smrg *) 4504dc407927Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4505dc407927Smrg ;; 45063eed67faSmbalmer esac 4507dc407927Smrg fi 4508dc407927Smrg]) 4509dc407927Smrgcase $host_os in 4510dc407927Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4511dc407927Smrg *djgpp*) 4512dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4513dc407927Smrg ;; 4514dc407927Smrg *) 4515dc407927Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4516dc407927Smrg ;; 4517dc407927Smrgesac 4518dd0822caSmrg 4519dd0822caSmrgAC_CACHE_CHECK([for $compiler option to produce PIC], 4520dd0822caSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], 4521dd0822caSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4522dd0822caSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) 45233eed67faSmbalmer 4524dc407927Smrg# 4525dc407927Smrg# Check to make sure the PIC flag actually works. 4526dc407927Smrg# 4527dc407927Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4528dc407927Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4529dc407927Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4530dc407927Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4531dc407927Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4532dc407927Smrg "" | " "*) ;; 4533dc407927Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4534dc407927Smrg esac], 4535dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4536dc407927Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 45373eed67faSmbalmerfi 4538dc407927Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4539dc407927Smrg [Additional compiler flags for building library objects]) 45403eed67faSmbalmer 4541dd0822caSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4542dd0822caSmrg [How to pass a linker flag through the compiler]) 4543dc407927Smrg# 4544dc407927Smrg# Check to make sure the static flag actually works. 4545dc407927Smrg# 4546dc407927Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4547dc407927Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4548dc407927Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4549dc407927Smrg $lt_tmp_static_flag, 4550dc407927Smrg [], 4551dc407927Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4552dc407927Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4553dc407927Smrg [Compiler flag to prevent dynamic linking]) 4554dc407927Smrg])# _LT_COMPILER_PIC 45553eed67faSmbalmer 45563eed67faSmbalmer 4557dc407927Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4558dc407927Smrg# ---------------------------- 4559dc407927Smrg# See if the linker supports building shared libraries. 4560dc407927Smrgm4_defun([_LT_LINKER_SHLIBS], 4561dc407927Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4562dc407927SmrgAC_REQUIRE([LT_PATH_NM])dnl 4563dd0822caSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 4564dc407927Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4565dc407927Smrgm4_require([_LT_DECL_EGREP])dnl 4566dc407927Smrgm4_require([_LT_DECL_SED])dnl 4567dc407927Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4568dc407927Smrgm4_require([_LT_TAG_COMPILER])dnl 4569dc407927SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4570dc407927Smrgm4_if([$1], [CXX], [ 4571dc407927Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4572dd0822caSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4573dc407927Smrg case $host_os in 4574dc407927Smrg aix[[4-9]]*) 4575dc407927Smrg # If we're using GNU nm, then we don't want the "-C" option. 4576dc407927Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4577dd0822caSmrg # Also, AIX nm treats weak defined symbols like other global defined 4578dd0822caSmrg # symbols, whereas GNU nm marks them as "W". 4579dc407927Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4580dd0822caSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4581dc407927Smrg else 4582dc407927Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 45833eed67faSmbalmer fi 45843eed67faSmbalmer ;; 4585dc407927Smrg pw32*) 4586dc407927Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4587dd0822caSmrg ;; 4588dc407927Smrg cygwin* | mingw* | cegcc*) 4589dd0822caSmrg case $cc_basename in 459075cbef56Smrg cl*) 459175cbef56Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 459275cbef56Smrg ;; 4593dd0822caSmrg *) 4594dd0822caSmrg _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' 4595dd0822caSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4596dd0822caSmrg ;; 4597dd0822caSmrg esac 4598dd0822caSmrg ;; 4599dc407927Smrg *) 4600dc407927Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4601dd0822caSmrg ;; 4602dc407927Smrg esac 4603dc407927Smrg], [ 4604dc407927Smrg runpath_var= 4605dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4606dc407927Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4607dc407927Smrg _LT_TAGVAR(archive_cmds, $1)= 4608dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4609dc407927Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4610dc407927Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4611dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4612dc407927Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4613dc407927Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4614dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4615dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4616dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4617dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4618dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4619dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4620dc407927Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4621dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4622dc407927Smrg _LT_TAGVAR(module_cmds, $1)= 4623dc407927Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4624dc407927Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4625dc407927Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4626dc407927Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4627dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4628dc407927Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4629dc407927Smrg # included in the symbol list 4630dc407927Smrg _LT_TAGVAR(include_expsyms, $1)= 4631dc407927Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4632dc407927Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4633dc407927Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4634dc407927Smrg # as well as any symbol that contains `d'. 4635dc407927Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4636dc407927Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4637dc407927Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4638dc407927Smrg # the symbol is explicitly referenced. Since portable code cannot 4639dc407927Smrg # rely on this symbol name, it's probably fine to never include it in 4640dc407927Smrg # preloaded symbol tables. 4641dc407927Smrg # Exclude shared library initialization/finalization symbols. 4642dc407927Smrgdnl Note also adjust exclude_expsyms for C++ above. 4643dc407927Smrg extract_expsyms_cmds= 46443eed67faSmbalmer 4645dc407927Smrg case $host_os in 4646dc407927Smrg cygwin* | mingw* | pw32* | cegcc*) 4647dc407927Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4648dc407927Smrg # When not using gcc, we currently assume that we are using 4649dc407927Smrg # Microsoft Visual C++. 4650dc407927Smrg if test "$GCC" != yes; then 4651dc407927Smrg with_gnu_ld=no 46523eed67faSmbalmer fi 46533eed67faSmbalmer ;; 4654dc407927Smrg interix*) 4655dc407927Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4656dc407927Smrg with_gnu_ld=yes 4657dc407927Smrg ;; 4658dc407927Smrg openbsd*) 4659dc407927Smrg with_gnu_ld=no 4660dc407927Smrg ;; 46613eed67faSmbalmer esac 46623eed67faSmbalmer 4663dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4664dd0822caSmrg 4665dd0822caSmrg # On some targets, GNU ld is compatible enough with the native linker 4666dd0822caSmrg # that we're better off using the native interface for both. 4667dd0822caSmrg lt_use_gnu_ld_interface=no 4668dc407927Smrg if test "$with_gnu_ld" = yes; then 4669dd0822caSmrg case $host_os in 4670dd0822caSmrg aix*) 4671dd0822caSmrg # The AIX port of GNU ld has always aspired to compatibility 4672dd0822caSmrg # with the native linker. However, as the warning in the GNU ld 4673dd0822caSmrg # block says, versions before 2.19.5* couldn't really create working 4674dd0822caSmrg # shared libraries, regardless of the interface used. 4675dd0822caSmrg case `$LD -v 2>&1` in 4676dd0822caSmrg *\ \(GNU\ Binutils\)\ 2.19.5*) ;; 4677dd0822caSmrg *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; 4678dd0822caSmrg *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; 4679dd0822caSmrg *) 4680dd0822caSmrg lt_use_gnu_ld_interface=yes 4681dd0822caSmrg ;; 4682dd0822caSmrg esac 4683dd0822caSmrg ;; 4684dd0822caSmrg *) 4685dd0822caSmrg lt_use_gnu_ld_interface=yes 4686dd0822caSmrg ;; 4687dd0822caSmrg esac 4688dd0822caSmrg fi 4689dd0822caSmrg 4690dd0822caSmrg if test "$lt_use_gnu_ld_interface" = yes; then 4691dc407927Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 4692dc407927Smrg wlarc='${wl}' 46933eed67faSmbalmer 4694dc407927Smrg # Set some defaults for GNU ld with shared library support. These 4695dc407927Smrg # are reset later if shared libraries are not supported. Putting them 4696dc407927Smrg # here allows them to be overridden if necessary. 4697dc407927Smrg runpath_var=LD_RUN_PATH 4698dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4699dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4700dc407927Smrg # ancient GNU ld didn't support --whole-archive et. al. 4701dc407927Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4702dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4703dc407927Smrg else 4704dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4705dc407927Smrg fi 4706dc407927Smrg supports_anon_versioning=no 4707dc407927Smrg case `$LD -v 2>&1` in 4708dd0822caSmrg *GNU\ gold*) supports_anon_versioning=yes ;; 4709dc407927Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4710dc407927Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4711dc407927Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4712dc407927Smrg *\ 2.11.*) ;; # other 2.11 versions 4713dc407927Smrg *) supports_anon_versioning=yes ;; 4714dc407927Smrg esac 47153eed67faSmbalmer 4716dc407927Smrg # See if GNU ld supports shared libraries. 4717dc407927Smrg case $host_os in 4718dc407927Smrg aix[[3-9]]*) 4719dc407927Smrg # On AIX/PPC, the GNU linker is very broken 4720dc407927Smrg if test "$host_cpu" != ia64; then 4721dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4722dc407927Smrg cat <<_LT_EOF 1>&2 47233eed67faSmbalmer 4724dd0822caSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported 4725dc407927Smrg*** to be unable to reliably create shared libraries on AIX. 4726dc407927Smrg*** Therefore, libtool is disabling shared libraries support. If you 4727dd0822caSmrg*** really care for shared libraries, you may want to install binutils 4728dd0822caSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. 4729dd0822caSmrg*** You will then need to restart the configuration process. 47303eed67faSmbalmer 4731dc407927Smrg_LT_EOF 4732dc407927Smrg fi 4733dc407927Smrg ;; 47343eed67faSmbalmer 4735dc407927Smrg amigaos*) 4736dc407927Smrg case $host_cpu in 4737dc407927Smrg powerpc) 4738dc407927Smrg # see comment about AmigaOS4 .so support 4739dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4740dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4741dc407927Smrg ;; 4742dc407927Smrg m68k) 4743dc407927Smrg _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)' 4744dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4745dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4746dc407927Smrg ;; 4747dc407927Smrg esac 4748dc407927Smrg ;; 47493eed67faSmbalmer 4750dc407927Smrg beos*) 4751dc407927Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4752dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4753dc407927Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4754dc407927Smrg # support --undefined. This deserves some investigation. FIXME 4755dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4756dc407927Smrg else 4757dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4758dc407927Smrg fi 4759dc407927Smrg ;; 47603eed67faSmbalmer 4761dc407927Smrg cygwin* | mingw* | pw32* | cegcc*) 4762dc407927Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4763dc407927Smrg # as there is no search path for DLLs. 4764dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4765dd0822caSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 4766dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4767dc407927Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4768dc407927Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4769dd0822caSmrg _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' 4770dd0822caSmrg _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] 4771dc407927Smrg 4772dc407927Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4773dc407927Smrg _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' 4774dc407927Smrg # If the export-symbols file already is a .def file (1st line 4775dc407927Smrg # is EXPORTS), use it as is; otherwise, prepend... 4776dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4777dc407927Smrg cp $export_symbols $output_objdir/$soname.def; 4778dc407927Smrg else 4779dc407927Smrg echo EXPORTS > $output_objdir/$soname.def; 4780dc407927Smrg cat $export_symbols >> $output_objdir/$soname.def; 4781dc407927Smrg fi~ 4782dc407927Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4783dc407927Smrg else 4784dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4785dc407927Smrg fi 4786dc407927Smrg ;; 47873eed67faSmbalmer 4788dd0822caSmrg haiku*) 4789dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4790dd0822caSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4791dd0822caSmrg ;; 4792dd0822caSmrg 4793dc407927Smrg interix[[3-9]]*) 4794dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4795dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4796dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4797dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4798dc407927Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4799dc407927Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4800dc407927Smrg # default) and relocated if they conflict, which is a slow very memory 4801dc407927Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4802dc407927Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4803dc407927Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4804dc407927Smrg _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' 4805dc407927Smrg _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' 4806dc407927Smrg ;; 48073eed67faSmbalmer 4808dd0822caSmrg gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) 4809dc407927Smrg tmp_diet=no 4810dc407927Smrg if test "$host_os" = linux-dietlibc; then 4811dc407927Smrg case $cc_basename in 4812dc407927Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4813dc407927Smrg esac 4814dc407927Smrg fi 4815dc407927Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4816dc407927Smrg && test "$tmp_diet" = no 4817dc407927Smrg then 4818dd0822caSmrg tmp_addflag=' $pic_flag' 4819dc407927Smrg tmp_sharedflag='-shared' 4820dc407927Smrg case $cc_basename,$host_cpu in 4821dc407927Smrg pgcc*) # Portland Group C compiler 4822dd0822caSmrg _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' 4823dc407927Smrg tmp_addflag=' $pic_flag' 4824dc407927Smrg ;; 4825dd0822caSmrg pgf77* | pgf90* | pgf95* | pgfortran*) 4826dd0822caSmrg # Portland Group f77 and f90 compilers 4827dd0822caSmrg _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' 4828dc407927Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4829dc407927Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4830dc407927Smrg tmp_addflag=' -i_dynamic' ;; 4831dc407927Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4832dc407927Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4833dc407927Smrg ifc* | ifort*) # Intel Fortran compiler 4834dc407927Smrg tmp_addflag=' -nofor_main' ;; 4835dc407927Smrg lf95*) # Lahey Fortran 8.1 4836dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4837dc407927Smrg tmp_sharedflag='--shared' ;; 4838dd0822caSmrg xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4839dc407927Smrg tmp_sharedflag='-qmkshrobj' 4840dc407927Smrg tmp_addflag= ;; 4841dd0822caSmrg nvcc*) # Cuda Compiler Driver 2.2 4842dd0822caSmrg _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' 4843dd0822caSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4844dd0822caSmrg ;; 4845dc407927Smrg esac 4846dc407927Smrg case `$CC -V 2>&1 | sed 5q` in 4847dc407927Smrg *Sun\ C*) # Sun C 5.9 4848dd0822caSmrg _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' 4849dc407927Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4850dc407927Smrg tmp_sharedflag='-G' ;; 4851dc407927Smrg *Sun\ F*) # Sun Fortran 8.3 4852dc407927Smrg tmp_sharedflag='-G' ;; 4853dc407927Smrg esac 4854dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 48553eed67faSmbalmer 4856dc407927Smrg if test "x$supports_anon_versioning" = xyes; then 4857dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4858dc407927Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4859dc407927Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4860dc407927Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4861dc407927Smrg fi 48623eed67faSmbalmer 4863dc407927Smrg case $cc_basename in 4864dd0822caSmrg xlf* | bgf* | bgxlf* | mpixlf*) 4865dc407927Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4866dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 486775cbef56Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4868dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' 4869dc407927Smrg if test "x$supports_anon_versioning" = xyes; then 4870dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4871dc407927Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4872dc407927Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4873dd0822caSmrg $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4874dc407927Smrg fi 4875dc407927Smrg ;; 4876dc407927Smrg esac 4877dc407927Smrg else 4878dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4879dc407927Smrg fi 4880dc407927Smrg ;; 48813eed67faSmbalmer 4882dc407927Smrg netbsd*) 4883dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4884dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4885dc407927Smrg wlarc= 4886dc407927Smrg else 4887dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4888dd0822caSmrg _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' 4889dc407927Smrg fi 4890dc407927Smrg ;; 48913eed67faSmbalmer 4892dc407927Smrg solaris*) 4893dc407927Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4894dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4895dc407927Smrg cat <<_LT_EOF 1>&2 48963eed67faSmbalmer 4897dc407927Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4898dc407927Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4899dc407927Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4900dc407927Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4901dc407927Smrg*** your PATH or compiler configuration so that the native linker is 4902dc407927Smrg*** used, and then restart. 49033eed67faSmbalmer 4904dc407927Smrg_LT_EOF 4905dc407927Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4906dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4907dd0822caSmrg _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' 4908dc407927Smrg else 4909dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4910dc407927Smrg fi 4911dc407927Smrg ;; 49123eed67faSmbalmer 4913dc407927Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4914dc407927Smrg case `$LD -v 2>&1` in 4915dc407927Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4916dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4917dc407927Smrg cat <<_LT_EOF 1>&2 49183eed67faSmbalmer 4919dc407927Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4920dc407927Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4921dc407927Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4922dc407927Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4923dc407927Smrg*** your PATH or compiler configuration so that the native linker is 4924dc407927Smrg*** used, and then restart. 49253eed67faSmbalmer 4926dc407927Smrg_LT_EOF 4927dc407927Smrg ;; 4928dc407927Smrg *) 4929dc407927Smrg # For security reasons, it is highly recommended that you always 4930dc407927Smrg # use absolute paths for naming shared libraries, and exclude the 4931dc407927Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4932dc407927Smrg # requires that you compile everything twice, which is a pain. 4933dc407927Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4934dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4935dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4936dc407927Smrg _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' 4937dc407927Smrg else 4938dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4939dc407927Smrg fi 4940dc407927Smrg ;; 4941dc407927Smrg esac 4942dc407927Smrg ;; 49433eed67faSmbalmer 4944dc407927Smrg sunos4*) 4945dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4946dc407927Smrg wlarc= 4947dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4948dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4949dc407927Smrg ;; 49503eed67faSmbalmer 4951dc407927Smrg *) 4952dc407927Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4953dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4954dd0822caSmrg _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' 4955dc407927Smrg else 4956dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4957dc407927Smrg fi 4958dc407927Smrg ;; 4959dc407927Smrg esac 49603eed67faSmbalmer 4961dc407927Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4962dc407927Smrg runpath_var= 4963dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4964dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4965dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4966dc407927Smrg fi 4967dc407927Smrg else 4968dc407927Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4969dc407927Smrg case $host_os in 4970dc407927Smrg aix3*) 4971dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4972dc407927Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4973dc407927Smrg _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' 4974dc407927Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4975dc407927Smrg # are no directories specified by -L. 4976dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4977dc407927Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4978dc407927Smrg # Neither direct hardcoding nor static linking is supported with a 4979dc407927Smrg # broken collect2. 4980dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4981dc407927Smrg fi 4982dc407927Smrg ;; 49833eed67faSmbalmer 4984dc407927Smrg aix[[4-9]]*) 4985dc407927Smrg if test "$host_cpu" = ia64; then 4986dc407927Smrg # On IA64, the linker does run time linking by default, so we don't 4987dc407927Smrg # have to do anything special. 4988dc407927Smrg aix_use_runtimelinking=no 4989dc407927Smrg exp_sym_flag='-Bexport' 4990dc407927Smrg no_entry_flag="" 4991dc407927Smrg else 4992dc407927Smrg # If we're using GNU nm, then we don't want the "-C" option. 4993dc407927Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4994dd0822caSmrg # Also, AIX nm treats weak defined symbols like other global 4995dd0822caSmrg # defined symbols, whereas GNU nm marks them as "W". 4996dc407927Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4997dd0822caSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4998dc407927Smrg else 4999dc407927Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 5000dc407927Smrg fi 5001dc407927Smrg aix_use_runtimelinking=no 50023eed67faSmbalmer 5003dc407927Smrg # Test if we are trying to use run time linking or normal 5004dc407927Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5005dc407927Smrg # need to do runtime linking. 5006dc407927Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5007dc407927Smrg for ld_flag in $LDFLAGS; do 5008dc407927Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 5009dc407927Smrg aix_use_runtimelinking=yes 5010dc407927Smrg break 5011dc407927Smrg fi 5012dc407927Smrg done 5013dc407927Smrg ;; 5014dc407927Smrg esac 50153eed67faSmbalmer 5016dc407927Smrg exp_sym_flag='-bexport' 5017dc407927Smrg no_entry_flag='-bnoentry' 5018dc407927Smrg fi 50193eed67faSmbalmer 5020dc407927Smrg # When large executables or shared objects are built, AIX ld can 5021dc407927Smrg # have problems creating the table of contents. If linking a library 5022dc407927Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5023dc407927Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5024dc407927Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5025dc407927Smrg 5026dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='' 5027dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5028dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5029dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5030dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5031dc407927Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 50323eed67faSmbalmer 5033dc407927Smrg if test "$GCC" = yes; then 5034dc407927Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5035dc407927Smrg # We only want to do this on AIX 4.2 and lower, the check 5036dc407927Smrg # below for broken collect2 doesn't work under 4.3+ 5037dc407927Smrg collect2name=`${CC} -print-prog-name=collect2` 5038dc407927Smrg if test -f "$collect2name" && 5039dc407927Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5040dc407927Smrg then 5041dc407927Smrg # We have reworked collect2 5042dc407927Smrg : 5043dc407927Smrg else 5044dc407927Smrg # We have old collect2 5045dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5046dc407927Smrg # It fails to find uninstalled libraries when the uninstalled 5047dc407927Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5048dc407927Smrg # to unsupported forces relinking 5049dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5050dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5051dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5052dc407927Smrg fi 5053dc407927Smrg ;; 5054dc407927Smrg esac 5055dc407927Smrg shared_flag='-shared' 5056dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 5057dc407927Smrg shared_flag="$shared_flag "'${wl}-G' 5058dc407927Smrg fi 5059dc407927Smrg else 5060dc407927Smrg # not using gcc 5061dc407927Smrg if test "$host_cpu" = ia64; then 5062dc407927Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5063dc407927Smrg # chokes on -Wl,-G. The following line is correct: 5064dc407927Smrg shared_flag='-G' 5065dc407927Smrg else 5066dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 5067dc407927Smrg shared_flag='${wl}-G' 5068dc407927Smrg else 5069dc407927Smrg shared_flag='${wl}-bM:SRE' 5070dc407927Smrg fi 5071dc407927Smrg fi 5072dc407927Smrg fi 50733eed67faSmbalmer 5074dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5075dc407927Smrg # It seems that -bexpall does not export symbols beginning with 5076dc407927Smrg # underscore (_), so it is better to generate a list of symbols to export. 5077dc407927Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5078dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 5079dc407927Smrg # Warning - without using the other runtime loading flags (-brtl), 5080dc407927Smrg # -berok will link without error, but may produce a broken library. 5081dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5082dc407927Smrg # Determine the default libpath from the value encoded in an 5083dc407927Smrg # empty executable. 5084dd0822caSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5085dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5086dd0822caSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5087dc407927Smrg else 5088dc407927Smrg if test "$host_cpu" = ia64; then 5089dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5090dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5091dc407927Smrg _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" 5092dc407927Smrg else 5093dc407927Smrg # Determine the default libpath from the value encoded in an 5094dc407927Smrg # empty executable. 5095dd0822caSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 5096dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5097dc407927Smrg # Warning - without using the other run time loading flags, 5098dc407927Smrg # -berok will link without error, but may produce a broken library. 5099dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5100dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5101dd0822caSmrg if test "$with_gnu_ld" = yes; then 5102dd0822caSmrg # We only use this code for GNU lds that support --whole-archive. 5103dd0822caSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5104dd0822caSmrg else 5105dd0822caSmrg # Exported symbols can be pulled into shared objects from archives 5106dd0822caSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5107dd0822caSmrg fi 5108dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5109dc407927Smrg # This is similar to how AIX traditionally builds its shared libraries. 5110dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 5111dc407927Smrg fi 5112dc407927Smrg fi 5113dc407927Smrg ;; 51143eed67faSmbalmer 5115dc407927Smrg amigaos*) 5116dc407927Smrg case $host_cpu in 5117dc407927Smrg powerpc) 5118dc407927Smrg # see comment about AmigaOS4 .so support 5119dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5120dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 5121dc407927Smrg ;; 5122dc407927Smrg m68k) 5123dc407927Smrg _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)' 5124dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5125dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5126dc407927Smrg ;; 5127dc407927Smrg esac 5128dc407927Smrg ;; 51293eed67faSmbalmer 5130dc407927Smrg bsdi[[45]]*) 5131dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 5132dc407927Smrg ;; 51333eed67faSmbalmer 5134dc407927Smrg cygwin* | mingw* | pw32* | cegcc*) 5135dc407927Smrg # When not using gcc, we currently assume that we are using 5136dc407927Smrg # Microsoft Visual C++. 5137dc407927Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 5138dc407927Smrg # no search path for DLLs. 5139dd0822caSmrg case $cc_basename in 5140dd0822caSmrg cl*) 5141dd0822caSmrg # Native MSVC 5142dd0822caSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5143dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5144dd0822caSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5145dd0822caSmrg _LT_TAGVAR(file_list_spec, $1)='@' 5146dd0822caSmrg # Tell ltmain to make .lib files, not .a files. 5147dd0822caSmrg libext=lib 5148dd0822caSmrg # Tell ltmain to make .dll files, not .so files. 5149dd0822caSmrg shrext_cmds=".dll" 5150dd0822caSmrg # FIXME: Setting linknames here is a bad hack. 5151dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 5152dd0822caSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5153dd0822caSmrg sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 5154dd0822caSmrg else 5155dd0822caSmrg sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 5156dd0822caSmrg fi~ 5157dd0822caSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 5158dd0822caSmrg linknames=' 5159dd0822caSmrg # The linker will not automatically build a static lib if we build a DLL. 5160dd0822caSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5161dd0822caSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 516275cbef56Smrg _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' 5163dd0822caSmrg _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' 5164dd0822caSmrg # Don't use ranlib 5165dd0822caSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 5166dd0822caSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 5167dd0822caSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 5168dd0822caSmrg case $lt_outputfile in 5169dd0822caSmrg *.exe|*.EXE) ;; 5170dd0822caSmrg *) 5171dd0822caSmrg lt_outputfile="$lt_outputfile.exe" 5172dd0822caSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 5173dd0822caSmrg ;; 5174dd0822caSmrg esac~ 5175dd0822caSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 5176dd0822caSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 5177dd0822caSmrg $RM "$lt_outputfile.manifest"; 5178dd0822caSmrg fi' 5179dd0822caSmrg ;; 5180dd0822caSmrg *) 5181dd0822caSmrg # Assume MSVC wrapper 5182dd0822caSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 5183dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5184dd0822caSmrg # Tell ltmain to make .lib files, not .a files. 5185dd0822caSmrg libext=lib 5186dd0822caSmrg # Tell ltmain to make .dll files, not .so files. 5187dd0822caSmrg shrext_cmds=".dll" 5188dd0822caSmrg # FIXME: Setting linknames here is a bad hack. 5189dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' 5190dd0822caSmrg # The linker will automatically build a .lib file if we build a DLL. 5191dd0822caSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 5192dd0822caSmrg # FIXME: Should let the user specify the lib program. 5193dd0822caSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 5194dd0822caSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5195dd0822caSmrg ;; 5196dd0822caSmrg esac 5197dc407927Smrg ;; 51983eed67faSmbalmer 5199dc407927Smrg darwin* | rhapsody*) 5200dc407927Smrg _LT_DARWIN_LINKER_FEATURES($1) 5201dc407927Smrg ;; 52023eed67faSmbalmer 5203dc407927Smrg dgux*) 5204dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5205dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5206dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5207dc407927Smrg ;; 52083eed67faSmbalmer 5209dc407927Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 5210dc407927Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 5211dc407927Smrg # does not break anything, and helps significantly (at the cost of a little 5212dc407927Smrg # extra space). 5213dc407927Smrg freebsd2.2*) 5214dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 5215dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5216dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5217dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5218dc407927Smrg ;; 52193eed67faSmbalmer 5220dc407927Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 522175cbef56Smrg freebsd2.*) 5222dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5223dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5224dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5225dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5226dc407927Smrg ;; 52273eed67faSmbalmer 5228dc407927Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 5229dc407927Smrg freebsd* | dragonfly*) 5230dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5231dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5232dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5233dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5234dc407927Smrg ;; 52353eed67faSmbalmer 5236dc407927Smrg hpux9*) 5237dc407927Smrg if test "$GCC" = yes; then 5238dd0822caSmrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5239dc407927Smrg else 5240dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 5241dc407927Smrg fi 5242dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5243dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5244dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 52453eed67faSmbalmer 5246dc407927Smrg # hardcode_minus_L: Not really in the search PATH, 5247dc407927Smrg # but as the default location of the library. 5248dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5249dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5250dc407927Smrg ;; 52513eed67faSmbalmer 5252dc407927Smrg hpux10*) 5253dd0822caSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5254dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5255dc407927Smrg else 5256dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 5257dc407927Smrg fi 5258dc407927Smrg if test "$with_gnu_ld" = no; then 5259dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5260dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5261dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5262dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5263dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5264dc407927Smrg # hardcode_minus_L: Not really in the search PATH, 5265dc407927Smrg # but as the default location of the library. 5266dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5267dc407927Smrg fi 5268dc407927Smrg ;; 52693eed67faSmbalmer 5270dc407927Smrg hpux11*) 5271dd0822caSmrg if test "$GCC" = yes && test "$with_gnu_ld" = no; then 5272dc407927Smrg case $host_cpu in 5273dc407927Smrg hppa*64*) 5274dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5275dc407927Smrg ;; 5276dc407927Smrg ia64*) 5277dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5278dc407927Smrg ;; 5279dc407927Smrg *) 5280dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 5281dc407927Smrg ;; 5282dc407927Smrg esac 5283dc407927Smrg else 5284dc407927Smrg case $host_cpu in 5285dc407927Smrg hppa*64*) 5286dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5287dc407927Smrg ;; 5288dc407927Smrg ia64*) 5289dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 5290dc407927Smrg ;; 5291dc407927Smrg *) 5292dd0822caSmrg m4_if($1, [], [ 5293dd0822caSmrg # Older versions of the 11.00 compiler do not understand -b yet 5294dd0822caSmrg # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) 5295dd0822caSmrg _LT_LINKER_OPTION([if $CC understands -b], 5296dd0822caSmrg _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], 5297dd0822caSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], 5298dd0822caSmrg [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], 5299dd0822caSmrg [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) 5300dc407927Smrg ;; 5301dc407927Smrg esac 5302dc407927Smrg fi 5303dc407927Smrg if test "$with_gnu_ld" = no; then 5304dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5305dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 53063eed67faSmbalmer 5307dc407927Smrg case $host_cpu in 5308dc407927Smrg hppa*64*|ia64*) 5309dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5310dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5311dc407927Smrg ;; 5312dc407927Smrg *) 5313dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5314dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5315dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 53163eed67faSmbalmer 5317dc407927Smrg # hardcode_minus_L: Not really in the search PATH, 5318dc407927Smrg # but as the default location of the library. 5319dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5320dc407927Smrg ;; 5321dc407927Smrg esac 5322dc407927Smrg fi 53233eed67faSmbalmer ;; 5324dc407927Smrg 5325dc407927Smrg irix5* | irix6* | nonstopux*) 5326dc407927Smrg if test "$GCC" = yes; then 5327dd0822caSmrg _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' 5328dc407927Smrg # Try to use the -exported_symbol ld option, if it does not 5329dc407927Smrg # work, assume that -exports_file does not work either and 5330dc407927Smrg # implicitly export all symbols. 5331dd0822caSmrg # This should be the same for all languages, so no per-tag cache variable. 5332dd0822caSmrg AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], 5333dd0822caSmrg [lt_cv_irix_exported_symbol], 5334dd0822caSmrg [save_LDFLAGS="$LDFLAGS" 5335dd0822caSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 5336dd0822caSmrg AC_LINK_IFELSE( 5337dd0822caSmrg [AC_LANG_SOURCE( 5338dd0822caSmrg [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], 5339dd0822caSmrg [C++], [[int foo (void) { return 0; }]], 5340dd0822caSmrg [Fortran 77], [[ 5341dd0822caSmrg subroutine foo 5342dd0822caSmrg end]], 5343dd0822caSmrg [Fortran], [[ 5344dd0822caSmrg subroutine foo 5345dd0822caSmrg end]])])], 5346dd0822caSmrg [lt_cv_irix_exported_symbol=yes], 5347dd0822caSmrg [lt_cv_irix_exported_symbol=no]) 5348dd0822caSmrg LDFLAGS="$save_LDFLAGS"]) 5349dd0822caSmrg if test "$lt_cv_irix_exported_symbol" = yes; then 5350dd0822caSmrg _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' 5351dd0822caSmrg fi 5352dc407927Smrg else 5353dd0822caSmrg _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' 5354dd0822caSmrg _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' 5355dc407927Smrg fi 5356dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5357dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5358dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5359dc407927Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5360dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 53613eed67faSmbalmer ;; 53623eed67faSmbalmer 5363dc407927Smrg netbsd*) 5364dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 5365dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 5366dc407927Smrg else 5367dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 5368dc407927Smrg fi 5369dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5370dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5371dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5372dc407927Smrg ;; 53733eed67faSmbalmer 5374dc407927Smrg newsos6) 5375dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5376dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5377dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5378dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5379dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5380dc407927Smrg ;; 53813eed67faSmbalmer 5382dc407927Smrg *nto* | *qnx*) 5383dc407927Smrg ;; 53843eed67faSmbalmer 5385dc407927Smrg openbsd*) 5386dc407927Smrg if test -f /usr/libexec/ld.so; then 5387dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5388dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5389dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5390dc407927Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 5391dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5392dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 5393dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5394dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5395dc407927Smrg else 5396dc407927Smrg case $host_os in 5397dc407927Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 5398dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 5399dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5400dc407927Smrg ;; 5401dc407927Smrg *) 5402dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 5403dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5404dc407927Smrg ;; 5405dc407927Smrg esac 5406dc407927Smrg fi 5407dc407927Smrg else 5408dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5409dc407927Smrg fi 5410dc407927Smrg ;; 54113eed67faSmbalmer 5412dc407927Smrg os2*) 5413dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5414dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5415dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5416dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' 5417dc407927Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 5418dc407927Smrg ;; 54193eed67faSmbalmer 5420dc407927Smrg osf3*) 5421dc407927Smrg if test "$GCC" = yes; then 5422dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5423dd0822caSmrg _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' 5424dc407927Smrg else 5425dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5426dd0822caSmrg _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' 5427dc407927Smrg fi 5428dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5429dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5430dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5431dc407927Smrg ;; 54323eed67faSmbalmer 5433dc407927Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 5434dc407927Smrg if test "$GCC" = yes; then 5435dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 5436dd0822caSmrg _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' 5437dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5438dc407927Smrg else 5439dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 5440dd0822caSmrg _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' 5441dc407927Smrg _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~ 5442dd0822caSmrg $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' 54433eed67faSmbalmer 5444dc407927Smrg # Both c and cxx compiler support -rpath directly 5445dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5446dc407927Smrg fi 5447dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 5448dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5449dc407927Smrg ;; 54503eed67faSmbalmer 5451dc407927Smrg solaris*) 5452dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 5453dc407927Smrg if test "$GCC" = yes; then 5454dc407927Smrg wlarc='${wl}' 5455dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 5456dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5457dd0822caSmrg $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' 5458dc407927Smrg else 5459dc407927Smrg case `$CC -V 2>&1` in 5460dc407927Smrg *"Compilers 5.0"*) 5461dc407927Smrg wlarc='' 5462dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 5463dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5464dc407927Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 5465dc407927Smrg ;; 5466dc407927Smrg *) 5467dc407927Smrg wlarc='${wl}' 5468dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 5469dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 5470dc407927Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 5471dc407927Smrg ;; 5472dc407927Smrg esac 5473dc407927Smrg fi 5474dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5475dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5476dc407927Smrg case $host_os in 5477dc407927Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 5478dc407927Smrg *) 5479dc407927Smrg # The compiler driver will combine and reorder linker options, 5480dc407927Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 5481dc407927Smrg # but is careful enough not to reorder. 5482dc407927Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 5483dc407927Smrg if test "$GCC" = yes; then 5484dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 5485dc407927Smrg else 5486dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 5487dc407927Smrg fi 5488dc407927Smrg ;; 5489dc407927Smrg esac 5490dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5491dc407927Smrg ;; 54923eed67faSmbalmer 5493dc407927Smrg sunos4*) 5494dc407927Smrg if test "x$host_vendor" = xsequent; then 5495dc407927Smrg # Use $CC to link under sequent, because it throws in some extra .o 5496dc407927Smrg # files that make .init and .fini sections work. 5497dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 5498dc407927Smrg else 5499dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 5500dc407927Smrg fi 5501dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5502dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5503dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5504dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5505dc407927Smrg ;; 55063eed67faSmbalmer 5507dc407927Smrg sysv4) 5508dc407927Smrg case $host_vendor in 5509dc407927Smrg sni) 5510dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5511dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5512dc407927Smrg ;; 5513dc407927Smrg siemens) 5514dc407927Smrg ## LD is ld it makes a PLAMLIB 5515dc407927Smrg ## CC just makes a GrossModule. 5516dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5517dc407927Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5518dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5519dc407927Smrg ;; 5520dc407927Smrg motorola) 5521dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5522dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5523dc407927Smrg ;; 5524dc407927Smrg esac 5525dc407927Smrg runpath_var='LD_RUN_PATH' 5526dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5527dc407927Smrg ;; 55283eed67faSmbalmer 5529dc407927Smrg sysv4.3*) 5530dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5531dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5532dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5533dc407927Smrg ;; 55343eed67faSmbalmer 5535dc407927Smrg sysv4*MP*) 5536dc407927Smrg if test -d /usr/nec; then 5537dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5538dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5539dc407927Smrg runpath_var=LD_RUN_PATH 5540dc407927Smrg hardcode_runpath_var=yes 5541dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5542dc407927Smrg fi 5543dc407927Smrg ;; 55443eed67faSmbalmer 5545dc407927Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5546dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5547dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5548dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5549dc407927Smrg runpath_var='LD_RUN_PATH' 55503eed67faSmbalmer 5551dc407927Smrg if test "$GCC" = yes; then 5552dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5553dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5554dc407927Smrg else 5555dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5556dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5557dc407927Smrg fi 5558dc407927Smrg ;; 55593eed67faSmbalmer 5560dc407927Smrg sysv5* | sco3.2v5* | sco5v6*) 5561dc407927Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5562dc407927Smrg # link with -lc, and that would cause any symbols used from libc to 5563dc407927Smrg # always be unresolved, which means just about no library would 5564dc407927Smrg # ever link correctly. If we're not using GNU ld we use -z text 5565dc407927Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5566dc407927Smrg # as -z defs. 5567dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5568dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5569dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5570dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5571dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5572dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5573dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5574dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5575dc407927Smrg runpath_var='LD_RUN_PATH' 55763eed67faSmbalmer 5577dc407927Smrg if test "$GCC" = yes; then 5578dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5579dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5580dc407927Smrg else 5581dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5582dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5583dc407927Smrg fi 5584dc407927Smrg ;; 55853eed67faSmbalmer 5586dc407927Smrg uts4*) 5587dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5588dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5589dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5590dc407927Smrg ;; 55913eed67faSmbalmer 5592dc407927Smrg *) 5593dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5594dc407927Smrg ;; 5595dc407927Smrg esac 55963eed67faSmbalmer 5597dc407927Smrg if test x$host_vendor = xsni; then 5598dc407927Smrg case $host in 5599dc407927Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5600dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5601dc407927Smrg ;; 5602dc407927Smrg esac 5603dc407927Smrg fi 5604dc407927Smrg fi 5605dc407927Smrg]) 5606dc407927SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5607dc407927Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 56083eed67faSmbalmer 5609dc407927Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 56103eed67faSmbalmer 5611dc407927Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5612dc407927Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5613dc407927Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5614dc407927Smrg [The commands to extract the exported symbol list from a shared archive]) 56153eed67faSmbalmer 5616dc407927Smrg# 5617dc407927Smrg# Do we need to explicitly link libc? 5618dc407927Smrg# 5619dc407927Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5620dc407927Smrgx|xyes) 5621dc407927Smrg # Assume -lc should be added 5622dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 56233eed67faSmbalmer 5624dc407927Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5625dc407927Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5626dc407927Smrg *'~'*) 5627dc407927Smrg # FIXME: we may have to deal with multi-command sequences. 5628dc407927Smrg ;; 5629dc407927Smrg '$CC '*) 5630dc407927Smrg # Test whether the compiler implicitly links with -lc since on some 5631dc407927Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5632dc407927Smrg # to ld, don't add -lc before -lgcc. 5633dd0822caSmrg AC_CACHE_CHECK([whether -lc should be explicitly linked in], 5634dd0822caSmrg [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), 5635dd0822caSmrg [$RM conftest* 5636dd0822caSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5637dd0822caSmrg 5638dd0822caSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5639dd0822caSmrg soname=conftest 5640dd0822caSmrg lib=conftest 5641dd0822caSmrg libobjs=conftest.$ac_objext 5642dd0822caSmrg deplibs= 5643dd0822caSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5644dd0822caSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5645dd0822caSmrg compiler_flags=-v 5646dd0822caSmrg linker_flags=-v 5647dd0822caSmrg verstring= 5648dd0822caSmrg output_objdir=. 5649dd0822caSmrg libname=conftest 5650dd0822caSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5651dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5652dd0822caSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5653dd0822caSmrg then 5654dd0822caSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5655dd0822caSmrg else 5656dd0822caSmrg lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5657dd0822caSmrg fi 5658dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5659dd0822caSmrg else 5660dd0822caSmrg cat conftest.err 1>&5 5661dd0822caSmrg fi 5662dd0822caSmrg $RM conftest* 5663dd0822caSmrg ]) 5664dd0822caSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) 5665dc407927Smrg ;; 5666dc407927Smrg esac 5667dc407927Smrg fi 5668dc407927Smrg ;; 5669dc407927Smrgesac 56703eed67faSmbalmer 5671dc407927Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5672dc407927Smrg [Whether or not to add -lc for building shared libraries]) 5673dc407927Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5674dc407927Smrg [enable_shared_with_static_runtimes], [0], 5675dc407927Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5676dc407927Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5677dc407927Smrg [Compiler flag to allow reflexive dlopens]) 5678dc407927Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5679dc407927Smrg [Compiler flag to generate shared objects directly from archives]) 5680dc407927Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5681dc407927Smrg [Whether the compiler copes with passing no objects directly]) 5682dc407927Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5683dc407927Smrg [Create an old-style archive from a shared archive]) 5684dc407927Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5685dc407927Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5686dc407927Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5687dc407927Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5688dc407927Smrg_LT_TAGDECL([], [module_cmds], [2], 5689dc407927Smrg [Commands used to build a loadable module if different from building 5690dc407927Smrg a shared archive.]) 5691dc407927Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5692dc407927Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5693dc407927Smrg [Whether we are building with GNU ld or not]) 5694dc407927Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5695dc407927Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5696dc407927Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5697dc407927Smrg [Flag that enforces no undefined symbols]) 5698dc407927Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5699dc407927Smrg [Flag to hardcode $libdir into a binary during linking. 5700dc407927Smrg This must work even if $libdir does not exist]) 5701dc407927Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5702dc407927Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5703dc407927Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5704dc407927Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5705dc407927Smrg DIR into the resulting binary]) 5706dc407927Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5707dc407927Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5708dc407927Smrg DIR into the resulting binary and the resulting library dependency is 5709dc407927Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5710dc407927Smrg library is relocated]) 5711dc407927Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5712dc407927Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5713dc407927Smrg into the resulting binary]) 5714dc407927Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5715dc407927Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5716dc407927Smrg into the resulting binary]) 5717dc407927Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5718dc407927Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5719dc407927Smrg into the library and all subsequent libraries and executables linked 5720dc407927Smrg against it]) 5721dc407927Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5722dc407927Smrg [Set to yes if linker adds runtime paths of dependent libraries 5723dc407927Smrg to runtime path list]) 5724dc407927Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5725dc407927Smrg [Whether libtool must link a program against all its dependency libraries]) 5726dc407927Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5727dc407927Smrg [Set to "yes" if exported symbols are required]) 5728dc407927Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5729dc407927Smrg [The commands to list exported symbols]) 5730dc407927Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5731dc407927Smrg [Symbols that should not be listed in the preloaded symbols]) 5732dc407927Smrg_LT_TAGDECL([], [include_expsyms], [1], 5733dc407927Smrg [Symbols that must always be exported]) 5734dc407927Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5735dc407927Smrg [Commands necessary for linking programs (against libraries) with templates]) 5736dd0822caSmrg_LT_TAGDECL([], [postlink_cmds], [2], 5737dd0822caSmrg [Commands necessary for finishing linking programs]) 5738dc407927Smrg_LT_TAGDECL([], [file_list_spec], [1], 5739dc407927Smrg [Specify filename containing input files]) 5740dc407927Smrgdnl FIXME: Not yet implemented 5741dc407927Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5742dc407927Smrgdnl [Compiler flag to generate thread safe objects]) 5743dc407927Smrg])# _LT_LINKER_SHLIBS 5744dc407927Smrg 5745dc407927Smrg 5746dc407927Smrg# _LT_LANG_C_CONFIG([TAG]) 5747dc407927Smrg# ------------------------ 5748dc407927Smrg# Ensure that the configuration variables for a C compiler are suitably 5749dc407927Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5750dc407927Smrg# the compiler configuration to `libtool'. 5751dc407927Smrgm4_defun([_LT_LANG_C_CONFIG], 5752dc407927Smrg[m4_require([_LT_DECL_EGREP])dnl 5753dc407927Smrglt_save_CC="$CC" 5754dc407927SmrgAC_LANG_PUSH(C) 57553eed67faSmbalmer 5756dc407927Smrg# Source file extension for C test sources. 5757dc407927Smrgac_ext=c 57583eed67faSmbalmer 5759dc407927Smrg# Object file extension for compiled C test sources. 5760dc407927Smrgobjext=o 5761dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 57623eed67faSmbalmer 5763dc407927Smrg# Code to be used in simple compile tests 5764dc407927Smrglt_simple_compile_test_code="int some_variable = 0;" 57653eed67faSmbalmer 5766dc407927Smrg# Code to be used in simple link tests 5767dc407927Smrglt_simple_link_test_code='int main(){return(0);}' 57683eed67faSmbalmer 5769dc407927Smrg_LT_TAG_COMPILER 5770dc407927Smrg# Save the default compiler, since it gets overwritten when the other 5771dc407927Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5772dc407927Smrgcompiler_DEFAULT=$CC 57733eed67faSmbalmer 5774dc407927Smrg# save warnings/boilerplate of simple test code 5775dc407927Smrg_LT_COMPILER_BOILERPLATE 5776dc407927Smrg_LT_LINKER_BOILERPLATE 57773eed67faSmbalmer 5778dc407927Smrgif test -n "$compiler"; then 5779dc407927Smrg _LT_COMPILER_NO_RTTI($1) 5780dc407927Smrg _LT_COMPILER_PIC($1) 5781dc407927Smrg _LT_COMPILER_C_O($1) 5782dc407927Smrg _LT_COMPILER_FILE_LOCKS($1) 5783dc407927Smrg _LT_LINKER_SHLIBS($1) 5784dc407927Smrg _LT_SYS_DYNAMIC_LINKER($1) 5785dc407927Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5786dc407927Smrg LT_SYS_DLOPEN_SELF 5787dc407927Smrg _LT_CMD_STRIPLIB 5788dc407927Smrg 5789dc407927Smrg # Report which library types will actually be built 5790dc407927Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5791dc407927Smrg AC_MSG_RESULT([$can_build_shared]) 5792dc407927Smrg 5793dc407927Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5794dc407927Smrg test "$can_build_shared" = "no" && enable_shared=no 5795dc407927Smrg 5796dc407927Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5797dc407927Smrg # are all built from PIC. 5798dc407927Smrg case $host_os in 5799dc407927Smrg aix3*) 5800dc407927Smrg test "$enable_shared" = yes && enable_static=no 5801dc407927Smrg if test -n "$RANLIB"; then 5802dc407927Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5803dc407927Smrg postinstall_cmds='$RANLIB $lib' 5804dc407927Smrg fi 5805dc407927Smrg ;; 58063eed67faSmbalmer 5807dc407927Smrg aix[[4-9]]*) 5808dc407927Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5809dc407927Smrg test "$enable_shared" = yes && enable_static=no 5810dc407927Smrg fi 5811dc407927Smrg ;; 5812dc407927Smrg esac 5813dc407927Smrg AC_MSG_RESULT([$enable_shared]) 58143eed67faSmbalmer 5815dc407927Smrg AC_MSG_CHECKING([whether to build static libraries]) 5816dc407927Smrg # Make sure either enable_shared or enable_static is yes. 5817dc407927Smrg test "$enable_shared" = yes || enable_static=yes 5818dc407927Smrg AC_MSG_RESULT([$enable_static]) 58193eed67faSmbalmer 5820dc407927Smrg _LT_CONFIG($1) 5821dc407927Smrgfi 5822dc407927SmrgAC_LANG_POP 5823dc407927SmrgCC="$lt_save_CC" 5824dc407927Smrg])# _LT_LANG_C_CONFIG 58253eed67faSmbalmer 58263eed67faSmbalmer 5827dc407927Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5828dc407927Smrg# -------------------------- 5829dc407927Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5830dc407927Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5831dc407927Smrg# the compiler configuration to `libtool'. 5832dc407927Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5833dd0822caSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 5834dc407927Smrgm4_require([_LT_DECL_EGREP])dnl 5835dd0822caSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl 5836dd0822caSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5837dd0822caSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5838dd0822caSmrg (test "X$CXX" != "Xg++"))) ; then 5839dd0822caSmrg AC_PROG_CXXCPP 5840dd0822caSmrgelse 5841dd0822caSmrg _lt_caught_CXX_error=yes 5842dd0822caSmrgfi 5843dc407927Smrg 5844dc407927SmrgAC_LANG_PUSH(C++) 5845dc407927Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5846dc407927Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5847dc407927Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5848dc407927Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5849dc407927Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5850dc407927Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5851dc407927Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5852dc407927Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5853dc407927Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5854dc407927Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5855dc407927Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5856dc407927Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5857dc407927Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5858dc407927Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5859dc407927Smrg_LT_TAGVAR(module_cmds, $1)= 5860dc407927Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5861dc407927Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5862dc407927Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5863dd0822caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 5864dd0822caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 5865dc407927Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5866dc407927Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5867dc407927Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 58683eed67faSmbalmer 5869dc407927Smrg# Source file extension for C++ test sources. 5870dc407927Smrgac_ext=cpp 58713eed67faSmbalmer 5872dc407927Smrg# Object file extension for compiled C++ test sources. 5873dc407927Smrgobjext=o 5874dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 5875dc407927Smrg 5876dc407927Smrg# No sense in running all these tests if we already determined that 5877dc407927Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5878dc407927Smrg# are currently assumed to apply to all compilers on this platform, 5879dc407927Smrg# and will be corrupted by setting them based on a non-working compiler. 5880dc407927Smrgif test "$_lt_caught_CXX_error" != yes; then 5881dc407927Smrg # Code to be used in simple compile tests 5882dc407927Smrg lt_simple_compile_test_code="int some_variable = 0;" 5883dc407927Smrg 5884dc407927Smrg # Code to be used in simple link tests 5885dc407927Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5886dc407927Smrg 5887dc407927Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5888dc407927Smrg _LT_TAG_COMPILER 5889dc407927Smrg 5890dc407927Smrg # save warnings/boilerplate of simple test code 5891dc407927Smrg _LT_COMPILER_BOILERPLATE 5892dc407927Smrg _LT_LINKER_BOILERPLATE 5893dc407927Smrg 5894dc407927Smrg # Allow CC to be a program name with arguments. 5895dc407927Smrg lt_save_CC=$CC 5896dd0822caSmrg lt_save_CFLAGS=$CFLAGS 5897dc407927Smrg lt_save_LD=$LD 5898dc407927Smrg lt_save_GCC=$GCC 5899dc407927Smrg GCC=$GXX 5900dc407927Smrg lt_save_with_gnu_ld=$with_gnu_ld 5901dc407927Smrg lt_save_path_LD=$lt_cv_path_LD 5902dc407927Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5903dc407927Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5904dc407927Smrg else 5905dc407927Smrg $as_unset lt_cv_prog_gnu_ld 5906dc407927Smrg fi 5907dc407927Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5908dc407927Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5909dc407927Smrg else 5910dc407927Smrg $as_unset lt_cv_path_LD 5911dc407927Smrg fi 5912dc407927Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5913dc407927Smrg CC=${CXX-"c++"} 5914dd0822caSmrg CFLAGS=$CXXFLAGS 5915dc407927Smrg compiler=$CC 5916dc407927Smrg _LT_TAGVAR(compiler, $1)=$CC 5917dc407927Smrg _LT_CC_BASENAME([$compiler]) 59183eed67faSmbalmer 5919dc407927Smrg if test -n "$compiler"; then 5920dc407927Smrg # We don't want -fno-exception when compiling C++ code, so set the 5921dc407927Smrg # no_builtin_flag separately 5922dc407927Smrg if test "$GXX" = yes; then 5923dc407927Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5924dc407927Smrg else 5925dc407927Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5926dc407927Smrg fi 59273eed67faSmbalmer 5928dc407927Smrg if test "$GXX" = yes; then 5929dc407927Smrg # Set up default GNU C++ configuration 59303eed67faSmbalmer 5931dc407927Smrg LT_PATH_LD 59323eed67faSmbalmer 5933dc407927Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5934dc407927Smrg # archiving commands below assume that GNU ld is being used. 5935dc407927Smrg if test "$with_gnu_ld" = yes; then 5936dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5937dd0822caSmrg _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' 59383eed67faSmbalmer 5939dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5940dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 59413eed67faSmbalmer 5942dc407927Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5943dc407927Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5944dc407927Smrg # investigate it a little bit more. (MM) 5945dc407927Smrg wlarc='${wl}' 59463eed67faSmbalmer 5947dc407927Smrg # ancient GNU ld didn't support --whole-archive et. al. 5948dc407927Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5949dc407927Smrg $GREP 'no-whole-archive' > /dev/null; then 5950dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5951dc407927Smrg else 5952dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5953dc407927Smrg fi 5954dc407927Smrg else 5955dc407927Smrg with_gnu_ld=no 5956dc407927Smrg wlarc= 5957dc407927Smrg 5958dc407927Smrg # A generic and very simple default shared library creation 5959dc407927Smrg # command for GNU C++ for the case where it uses the native 5960dc407927Smrg # linker, instead of GNU ld. If possible, this setting should 5961dc407927Smrg # overridden to take advantage of the native linker features on 5962dc407927Smrg # the platform it is being used on. 5963dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5964dc407927Smrg fi 59653eed67faSmbalmer 5966dc407927Smrg # Commands to make compiler produce verbose output that lists 5967dc407927Smrg # what "hidden" libraries, object files and flags are used when 5968dc407927Smrg # linking a shared library. 5969dd0822caSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 59703eed67faSmbalmer 5971dc407927Smrg else 5972dc407927Smrg GXX=no 5973dc407927Smrg with_gnu_ld=no 5974dc407927Smrg wlarc= 5975dc407927Smrg fi 59763eed67faSmbalmer 5977dc407927Smrg # PORTME: fill in a description of your system's C++ link characteristics 5978dc407927Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5979dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5980dc407927Smrg case $host_os in 5981dc407927Smrg aix3*) 5982dc407927Smrg # FIXME: insert proper C++ library support 5983dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5984dc407927Smrg ;; 5985dc407927Smrg aix[[4-9]]*) 5986dc407927Smrg if test "$host_cpu" = ia64; then 5987dc407927Smrg # On IA64, the linker does run time linking by default, so we don't 5988dc407927Smrg # have to do anything special. 5989dc407927Smrg aix_use_runtimelinking=no 5990dc407927Smrg exp_sym_flag='-Bexport' 5991dc407927Smrg no_entry_flag="" 5992dc407927Smrg else 5993dc407927Smrg aix_use_runtimelinking=no 5994dc407927Smrg 5995dc407927Smrg # Test if we are trying to use run time linking or normal 5996dc407927Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5997dc407927Smrg # need to do runtime linking. 5998dc407927Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5999dc407927Smrg for ld_flag in $LDFLAGS; do 6000dc407927Smrg case $ld_flag in 6001dc407927Smrg *-brtl*) 6002dc407927Smrg aix_use_runtimelinking=yes 6003dc407927Smrg break 6004dc407927Smrg ;; 6005dc407927Smrg esac 6006dc407927Smrg done 6007dc407927Smrg ;; 6008dc407927Smrg esac 60093eed67faSmbalmer 6010dc407927Smrg exp_sym_flag='-bexport' 6011dc407927Smrg no_entry_flag='-bnoentry' 6012dc407927Smrg fi 60133eed67faSmbalmer 6014dc407927Smrg # When large executables or shared objects are built, AIX ld can 6015dc407927Smrg # have problems creating the table of contents. If linking a library 6016dc407927Smrg # or program results in "error TOC overflow" add -mminimal-toc to 6017dc407927Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 6018dc407927Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 6019dc407927Smrg 6020dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='' 6021dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6022dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6023dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6024dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6025dc407927Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 6026dc407927Smrg 6027dc407927Smrg if test "$GXX" = yes; then 6028dc407927Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 6029dc407927Smrg # We only want to do this on AIX 4.2 and lower, the check 6030dc407927Smrg # below for broken collect2 doesn't work under 4.3+ 6031dc407927Smrg collect2name=`${CC} -print-prog-name=collect2` 6032dc407927Smrg if test -f "$collect2name" && 6033dc407927Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 6034dc407927Smrg then 6035dc407927Smrg # We have reworked collect2 6036dc407927Smrg : 6037dc407927Smrg else 6038dc407927Smrg # We have old collect2 6039dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 6040dc407927Smrg # It fails to find uninstalled libraries when the uninstalled 6041dc407927Smrg # path is not listed in the libpath. Setting hardcode_minus_L 6042dc407927Smrg # to unsupported forces relinking 6043dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 6044dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6045dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 6046dc407927Smrg fi 6047dc407927Smrg esac 6048dc407927Smrg shared_flag='-shared' 6049dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 6050dc407927Smrg shared_flag="$shared_flag "'${wl}-G' 6051dc407927Smrg fi 6052dc407927Smrg else 6053dc407927Smrg # not using gcc 6054dc407927Smrg if test "$host_cpu" = ia64; then 6055dc407927Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 6056dc407927Smrg # chokes on -Wl,-G. The following line is correct: 6057dc407927Smrg shared_flag='-G' 6058dc407927Smrg else 6059dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 6060dc407927Smrg shared_flag='${wl}-G' 6061dc407927Smrg else 6062dc407927Smrg shared_flag='${wl}-bM:SRE' 6063dc407927Smrg fi 6064dc407927Smrg fi 6065dc407927Smrg fi 60663eed67faSmbalmer 6067dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 6068dc407927Smrg # It seems that -bexpall does not export symbols beginning with 6069dc407927Smrg # underscore (_), so it is better to generate a list of symbols to 6070dc407927Smrg # export. 6071dc407927Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 6072dc407927Smrg if test "$aix_use_runtimelinking" = yes; then 6073dc407927Smrg # Warning - without using the other runtime loading flags (-brtl), 6074dc407927Smrg # -berok will link without error, but may produce a broken library. 6075dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 6076dc407927Smrg # Determine the default libpath from the value encoded in an empty 6077dc407927Smrg # executable. 6078dd0822caSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6079dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6080dc407927Smrg 6081dd0822caSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 6082dc407927Smrg else 6083dc407927Smrg if test "$host_cpu" = ia64; then 6084dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 6085dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 6086dc407927Smrg _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" 6087dc407927Smrg else 6088dc407927Smrg # Determine the default libpath from the value encoded in an 6089dc407927Smrg # empty executable. 6090dd0822caSmrg _LT_SYS_MODULE_PATH_AIX([$1]) 6091dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 6092dc407927Smrg # Warning - without using the other run time loading flags, 6093dc407927Smrg # -berok will link without error, but may produce a broken library. 6094dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 6095dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 6096dd0822caSmrg if test "$with_gnu_ld" = yes; then 6097dd0822caSmrg # We only use this code for GNU lds that support --whole-archive. 6098dd0822caSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6099dd0822caSmrg else 6100dd0822caSmrg # Exported symbols can be pulled into shared objects from archives 6101dd0822caSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 6102dd0822caSmrg fi 6103dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 6104dc407927Smrg # This is similar to how AIX traditionally builds its shared 6105dc407927Smrg # libraries. 6106dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' 6107dc407927Smrg fi 6108dc407927Smrg fi 6109dc407927Smrg ;; 61103eed67faSmbalmer 6111dc407927Smrg beos*) 6112dc407927Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 6113dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6114dc407927Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 6115dc407927Smrg # support --undefined. This deserves some investigation. FIXME 6116dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6117dc407927Smrg else 6118dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6119dc407927Smrg fi 6120dc407927Smrg ;; 61213eed67faSmbalmer 6122dc407927Smrg chorus*) 6123dc407927Smrg case $cc_basename in 6124dc407927Smrg *) 6125dc407927Smrg # FIXME: insert proper C++ library support 6126dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6127dc407927Smrg ;; 6128dd0822caSmrg esac 6129dd0822caSmrg ;; 6130dd0822caSmrg 6131dd0822caSmrg cygwin* | mingw* | pw32* | cegcc*) 6132dd0822caSmrg case $GXX,$cc_basename in 6133dd0822caSmrg ,cl* | no,cl*) 6134dd0822caSmrg # Native MSVC 6135dd0822caSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 6136dd0822caSmrg # no search path for DLLs. 6137dd0822caSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 6138dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6139dd0822caSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 6140dd0822caSmrg _LT_TAGVAR(file_list_spec, $1)='@' 6141dd0822caSmrg # Tell ltmain to make .lib files, not .a files. 6142dd0822caSmrg libext=lib 6143dd0822caSmrg # Tell ltmain to make .dll files, not .so files. 6144dd0822caSmrg shrext_cmds=".dll" 6145dd0822caSmrg # FIXME: Setting linknames here is a bad hack. 6146dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' 6147dd0822caSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6148dd0822caSmrg $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; 6149dd0822caSmrg else 6150dd0822caSmrg $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; 6151dd0822caSmrg fi~ 6152dd0822caSmrg $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ 6153dd0822caSmrg linknames=' 6154dd0822caSmrg # The linker will not automatically build a static lib if we build a DLL. 6155dd0822caSmrg # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 6156dd0822caSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6157dd0822caSmrg # Don't use ranlib 6158dd0822caSmrg _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' 6159dd0822caSmrg _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ 6160dd0822caSmrg lt_tool_outputfile="@TOOL_OUTPUT@"~ 6161dd0822caSmrg case $lt_outputfile in 6162dd0822caSmrg *.exe|*.EXE) ;; 6163dd0822caSmrg *) 6164dd0822caSmrg lt_outputfile="$lt_outputfile.exe" 6165dd0822caSmrg lt_tool_outputfile="$lt_tool_outputfile.exe" 6166dd0822caSmrg ;; 6167dd0822caSmrg esac~ 6168dd0822caSmrg func_to_tool_file "$lt_outputfile"~ 6169dd0822caSmrg if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then 6170dd0822caSmrg $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; 6171dd0822caSmrg $RM "$lt_outputfile.manifest"; 6172dd0822caSmrg fi' 6173dd0822caSmrg ;; 6174dd0822caSmrg *) 6175dd0822caSmrg # g++ 6176dd0822caSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 6177dd0822caSmrg # as there is no search path for DLLs. 6178dd0822caSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 6179dd0822caSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' 6180dd0822caSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 6181dd0822caSmrg _LT_TAGVAR(always_export_symbols, $1)=no 6182dd0822caSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 6183dd0822caSmrg 6184dd0822caSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 6185dd0822caSmrg _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' 6186dd0822caSmrg # If the export-symbols file already is a .def file (1st line 6187dd0822caSmrg # is EXPORTS), use it as is; otherwise, prepend... 6188dd0822caSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 6189dd0822caSmrg cp $export_symbols $output_objdir/$soname.def; 6190dd0822caSmrg else 6191dd0822caSmrg echo EXPORTS > $output_objdir/$soname.def; 6192dd0822caSmrg cat $export_symbols >> $output_objdir/$soname.def; 6193dd0822caSmrg fi~ 6194dd0822caSmrg $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' 6195dd0822caSmrg else 6196dd0822caSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6197dd0822caSmrg fi 6198dd0822caSmrg ;; 6199dd0822caSmrg esac 6200dd0822caSmrg ;; 6201dc407927Smrg darwin* | rhapsody*) 6202dc407927Smrg _LT_DARWIN_LINKER_FEATURES($1) 6203dc407927Smrg ;; 62043eed67faSmbalmer 6205dc407927Smrg dgux*) 6206dc407927Smrg case $cc_basename in 6207dc407927Smrg ec++*) 6208dc407927Smrg # FIXME: insert proper C++ library support 6209dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6210dc407927Smrg ;; 6211dc407927Smrg ghcx*) 6212dc407927Smrg # Green Hills C++ Compiler 6213dc407927Smrg # FIXME: insert proper C++ library support 6214dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6215dc407927Smrg ;; 6216dc407927Smrg *) 6217dc407927Smrg # FIXME: insert proper C++ library support 6218dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6219dc407927Smrg ;; 6220dc407927Smrg esac 6221dc407927Smrg ;; 62223eed67faSmbalmer 622375cbef56Smrg freebsd2.*) 6224dc407927Smrg # C++ shared libraries reported to be fairly broken before 6225dc407927Smrg # switch to ELF 6226dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6227dc407927Smrg ;; 62283eed67faSmbalmer 6229dc407927Smrg freebsd-elf*) 6230dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6231dc407927Smrg ;; 6232dc407927Smrg 6233dc407927Smrg freebsd* | dragonfly*) 6234dc407927Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 6235dc407927Smrg # conventions 6236dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6237dc407927Smrg ;; 62383eed67faSmbalmer 6239dc407927Smrg gnu*) 6240dc407927Smrg ;; 62413eed67faSmbalmer 6242dd0822caSmrg haiku*) 6243dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6244dd0822caSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6245dd0822caSmrg ;; 6246dd0822caSmrg 6247dc407927Smrg hpux9*) 6248dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6249dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6250dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6251dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6252dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6253dc407927Smrg # but as the default 6254dc407927Smrg # location of the library. 6255dc407927Smrg 6256dc407927Smrg case $cc_basename in 6257dc407927Smrg CC*) 6258dc407927Smrg # FIXME: insert proper C++ library support 6259dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6260dc407927Smrg ;; 6261dc407927Smrg aCC*) 6262dc407927Smrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6263dc407927Smrg # Commands to make compiler produce verbose output that lists 6264dc407927Smrg # what "hidden" libraries, object files and flags are used when 6265dc407927Smrg # linking a shared library. 6266dc407927Smrg # 6267dc407927Smrg # There doesn't appear to be a way to prevent this compiler from 6268dc407927Smrg # explicitly linking system object files so we need to strip them 6269dc407927Smrg # from the output so that they don't get included in the library 6270dc407927Smrg # dependencies. 6271dd0822caSmrg 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"' 6272dc407927Smrg ;; 6273dc407927Smrg *) 6274dc407927Smrg if test "$GXX" = yes; then 6275dd0822caSmrg _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 $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 6276dc407927Smrg else 6277dc407927Smrg # FIXME: insert proper C++ library support 6278dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6279dc407927Smrg fi 6280dc407927Smrg ;; 6281dc407927Smrg esac 6282dc407927Smrg ;; 62833eed67faSmbalmer 6284dc407927Smrg hpux10*|hpux11*) 6285dc407927Smrg if test $with_gnu_ld = no; then 6286dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 6287dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6288dc407927Smrg 6289dc407927Smrg case $host_cpu in 6290dc407927Smrg hppa*64*|ia64*) 6291dc407927Smrg ;; 6292dc407927Smrg *) 6293dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6294dc407927Smrg ;; 6295dc407927Smrg esac 6296dc407927Smrg fi 6297dc407927Smrg case $host_cpu in 6298dc407927Smrg hppa*64*|ia64*) 6299dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6300dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6301dc407927Smrg ;; 6302dc407927Smrg *) 6303dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6304dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6305dc407927Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 6306dc407927Smrg # but as the default 6307dc407927Smrg # location of the library. 6308dc407927Smrg ;; 6309dc407927Smrg esac 6310dc407927Smrg 6311dc407927Smrg case $cc_basename in 6312dc407927Smrg CC*) 6313dc407927Smrg # FIXME: insert proper C++ library support 6314dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6315dc407927Smrg ;; 6316dc407927Smrg aCC*) 6317dc407927Smrg case $host_cpu in 6318dc407927Smrg hppa*64*) 6319dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6320dc407927Smrg ;; 6321dc407927Smrg ia64*) 6322dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6323dc407927Smrg ;; 6324dc407927Smrg *) 6325dc407927Smrg _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' 6326dc407927Smrg ;; 6327dc407927Smrg esac 6328dc407927Smrg # Commands to make compiler produce verbose output that lists 6329dc407927Smrg # what "hidden" libraries, object files and flags are used when 6330dc407927Smrg # linking a shared library. 6331dc407927Smrg # 6332dc407927Smrg # There doesn't appear to be a way to prevent this compiler from 6333dc407927Smrg # explicitly linking system object files so we need to strip them 6334dc407927Smrg # from the output so that they don't get included in the library 6335dc407927Smrg # dependencies. 6336dd0822caSmrg 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"' 6337dc407927Smrg ;; 6338dc407927Smrg *) 6339dc407927Smrg if test "$GXX" = yes; then 6340dc407927Smrg if test $with_gnu_ld = no; then 6341dc407927Smrg case $host_cpu in 6342dc407927Smrg hppa*64*) 6343dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6344dc407927Smrg ;; 6345dc407927Smrg ia64*) 6346dd0822caSmrg _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' 6347dc407927Smrg ;; 6348dc407927Smrg *) 6349dd0822caSmrg _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' 6350dc407927Smrg ;; 6351dc407927Smrg esac 6352dc407927Smrg fi 6353dc407927Smrg else 6354dc407927Smrg # FIXME: insert proper C++ library support 6355dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6356dc407927Smrg fi 6357dc407927Smrg ;; 6358dc407927Smrg esac 6359dc407927Smrg ;; 63603eed67faSmbalmer 6361dc407927Smrg interix[[3-9]]*) 6362dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=no 6363dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6364dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6365dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6366dc407927Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 6367dc407927Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 6368dc407927Smrg # default) and relocated if they conflict, which is a slow very memory 6369dc407927Smrg # consuming and fragmenting process. To avoid this, we pick a random, 6370dc407927Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 6371dc407927Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 6372dc407927Smrg _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' 6373dc407927Smrg _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' 6374dc407927Smrg ;; 6375dc407927Smrg irix5* | irix6*) 6376dc407927Smrg case $cc_basename in 6377dc407927Smrg CC*) 6378dc407927Smrg # SGI C++ 6379dd0822caSmrg _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' 6380dc407927Smrg 6381dc407927Smrg # Archives containing C++ object files must be created using 6382dc407927Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 6383dc407927Smrg # necessary to make sure instantiated templates are included 6384dc407927Smrg # in the archive. 6385dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 6386dc407927Smrg ;; 6387dc407927Smrg *) 6388dc407927Smrg if test "$GXX" = yes; then 6389dc407927Smrg if test "$with_gnu_ld" = no; then 6390dd0822caSmrg _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' 6391dc407927Smrg else 6392dd0822caSmrg _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' 6393dc407927Smrg fi 6394dc407927Smrg fi 6395dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6396dc407927Smrg ;; 6397dc407927Smrg esac 6398dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6399dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6400dc407927Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 6401dc407927Smrg ;; 64023eed67faSmbalmer 6403dd0822caSmrg linux* | k*bsd*-gnu | kopensolaris*-gnu) 6404dc407927Smrg case $cc_basename in 6405dc407927Smrg KCC*) 6406dc407927Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6407dc407927Smrg 6408dc407927Smrg # KCC will only create a shared library if the output file 6409dc407927Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6410dc407927Smrg # to its proper name (with version) after linking. 6411dc407927Smrg _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' 6412dc407927Smrg _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' 6413dc407927Smrg # Commands to make compiler produce verbose output that lists 6414dc407927Smrg # what "hidden" libraries, object files and flags are used when 6415dc407927Smrg # linking a shared library. 6416dc407927Smrg # 6417dc407927Smrg # There doesn't appear to be a way to prevent this compiler from 6418dc407927Smrg # explicitly linking system object files so we need to strip them 6419dc407927Smrg # from the output so that they don't get included in the library 6420dc407927Smrg # dependencies. 6421dd0822caSmrg 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"' 6422dc407927Smrg 6423dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6424dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6425dc407927Smrg 6426dc407927Smrg # Archives containing C++ object files must be created using 6427dc407927Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 6428dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 6429dc407927Smrg ;; 6430dc407927Smrg icpc* | ecpc* ) 6431dc407927Smrg # Intel C++ 6432dc407927Smrg with_gnu_ld=yes 6433dc407927Smrg # version 8.0 and above of icpc choke on multiply defined symbols 6434dc407927Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 6435dc407927Smrg # earlier do not add the objects themselves. 6436dc407927Smrg case `$CC -V 2>&1` in 6437dc407927Smrg *"Version 7."*) 6438dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6439dc407927Smrg _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' 6440dc407927Smrg ;; 6441dc407927Smrg *) # Version 8.0 or newer 6442dc407927Smrg tmp_idyn= 6443dc407927Smrg case $host_cpu in 6444dc407927Smrg ia64*) tmp_idyn=' -i_dynamic';; 6445dc407927Smrg esac 6446dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6447dc407927Smrg _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' 6448dc407927Smrg ;; 6449dc407927Smrg esac 6450dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6451dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6452dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6453dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 6454dc407927Smrg ;; 6455dc407927Smrg pgCC* | pgcpp*) 6456dc407927Smrg # Portland Group C++ compiler 6457dc407927Smrg case `$CC -V` in 6458dd0822caSmrg *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) 6459dc407927Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 6460dc407927Smrg rm -rf $tpldir~ 6461dc407927Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 6462dd0822caSmrg compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' 6463dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 6464dc407927Smrg rm -rf $tpldir~ 6465dc407927Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 6466dd0822caSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ 6467dc407927Smrg $RANLIB $oldlib' 6468dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 6469dc407927Smrg rm -rf $tpldir~ 6470dc407927Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6471dd0822caSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6472dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 6473dc407927Smrg rm -rf $tpldir~ 6474dc407927Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 6475dd0822caSmrg $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' 6476dc407927Smrg ;; 6477dd0822caSmrg *) # Version 6 and above use weak symbols 6478dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 6479dc407927Smrg _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' 6480dc407927Smrg ;; 6481dc407927Smrg esac 64823eed67faSmbalmer 6483dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 6484dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6485dd0822caSmrg _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' 6486dc407927Smrg ;; 6487dc407927Smrg cxx*) 6488dc407927Smrg # Compaq C++ 6489dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 6490dc407927Smrg _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' 64913eed67faSmbalmer 6492dc407927Smrg runpath_var=LD_RUN_PATH 6493dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6494dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 64953eed67faSmbalmer 6496dc407927Smrg # Commands to make compiler produce verbose output that lists 6497dc407927Smrg # what "hidden" libraries, object files and flags are used when 6498dc407927Smrg # linking a shared library. 6499dc407927Smrg # 6500dc407927Smrg # There doesn't appear to be a way to prevent this compiler from 6501dc407927Smrg # explicitly linking system object files so we need to strip them 6502dc407927Smrg # from the output so that they don't get included in the library 6503dc407927Smrg # dependencies. 6504dd0822caSmrg 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' 6505dc407927Smrg ;; 6506dd0822caSmrg xl* | mpixl* | bgxl*) 6507dc407927Smrg # IBM XL 8.0 on PPC, with GNU ld 6508dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6509dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 6510dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 6511dc407927Smrg if test "x$supports_anon_versioning" = xyes; then 6512dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 6513dc407927Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 6514dc407927Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 6515dc407927Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 6516dc407927Smrg fi 6517dc407927Smrg ;; 6518dc407927Smrg *) 6519dc407927Smrg case `$CC -V 2>&1 | sed 5q` in 6520dc407927Smrg *Sun\ C*) 6521dc407927Smrg # Sun C++ 5.9 6522dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6523dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6524dc407927Smrg _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' 6525dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6526dd0822caSmrg _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' 6527dc407927Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 6528dc407927Smrg 6529dc407927Smrg # Not sure whether something based on 6530dc407927Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 6531dc407927Smrg # would be better. 6532dd0822caSmrg output_verbose_link_cmd='func_echo_all' 6533dc407927Smrg 6534dc407927Smrg # Archives containing C++ object files must be created using 6535dc407927Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6536dc407927Smrg # necessary to make sure instantiated templates are included 6537dc407927Smrg # in the archive. 6538dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6539dc407927Smrg ;; 6540dc407927Smrg esac 6541dc407927Smrg ;; 6542dc407927Smrg esac 6543dc407927Smrg ;; 65443eed67faSmbalmer 6545dc407927Smrg lynxos*) 6546dc407927Smrg # FIXME: insert proper C++ library support 6547dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6548dc407927Smrg ;; 65493eed67faSmbalmer 6550dc407927Smrg m88k*) 6551dc407927Smrg # FIXME: insert proper C++ library support 6552dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6553dc407927Smrg ;; 65543eed67faSmbalmer 6555dc407927Smrg mvs*) 6556dc407927Smrg case $cc_basename in 6557dc407927Smrg cxx*) 6558dc407927Smrg # FIXME: insert proper C++ library support 6559dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6560dc407927Smrg ;; 6561dc407927Smrg *) 6562dc407927Smrg # FIXME: insert proper C++ library support 6563dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6564dc407927Smrg ;; 6565dc407927Smrg esac 6566dc407927Smrg ;; 65673eed67faSmbalmer 6568dc407927Smrg netbsd*) 6569dc407927Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6570dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6571dc407927Smrg wlarc= 6572dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6573dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6574dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6575dc407927Smrg fi 6576dc407927Smrg # Workaround some broken pre-1.5 toolchains 6577dc407927Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6578dc407927Smrg ;; 65793eed67faSmbalmer 6580dc407927Smrg *nto* | *qnx*) 6581dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6582dc407927Smrg ;; 65833eed67faSmbalmer 6584dc407927Smrg openbsd2*) 6585dc407927Smrg # C++ shared libraries are fairly broken 6586dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6587dc407927Smrg ;; 65883eed67faSmbalmer 6589dc407927Smrg openbsd*) 6590dc407927Smrg if test -f /usr/libexec/ld.so; then 6591dc407927Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6592dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6593dc407927Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6594dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6595dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6596dc407927Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6597dc407927Smrg _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' 6598dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6599dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6600dc407927Smrg fi 6601dd0822caSmrg output_verbose_link_cmd=func_echo_all 6602dc407927Smrg else 6603dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6604dc407927Smrg fi 6605dc407927Smrg ;; 66063eed67faSmbalmer 6607dc407927Smrg osf3* | osf4* | osf5*) 6608dc407927Smrg case $cc_basename in 6609dc407927Smrg KCC*) 6610dc407927Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6611dc407927Smrg 6612dc407927Smrg # KCC will only create a shared library if the output file 6613dc407927Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6614dc407927Smrg # to its proper name (with version) after linking. 6615dc407927Smrg _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' 6616dc407927Smrg 6617dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6618dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6619dc407927Smrg 6620dc407927Smrg # Archives containing C++ object files must be created using 6621dc407927Smrg # the KAI C++ compiler. 6622dc407927Smrg case $host in 6623dc407927Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6624dc407927Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6625dc407927Smrg esac 6626dc407927Smrg ;; 6627dc407927Smrg RCC*) 6628dc407927Smrg # Rational C++ 2.4.1 6629dc407927Smrg # FIXME: insert proper C++ library support 6630dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6631dc407927Smrg ;; 6632dc407927Smrg cxx*) 6633dc407927Smrg case $host in 6634dc407927Smrg osf3*) 6635dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6636dd0822caSmrg _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' 6637dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6638dc407927Smrg ;; 6639dc407927Smrg *) 6640dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6641dd0822caSmrg _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' 6642dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6643dc407927Smrg echo "-hidden">> $lib.exp~ 6644dd0822caSmrg $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~ 6645dc407927Smrg $RM $lib.exp' 6646dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6647dc407927Smrg ;; 6648dc407927Smrg esac 66493eed67faSmbalmer 6650dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 66513eed67faSmbalmer 6652dc407927Smrg # Commands to make compiler produce verbose output that lists 6653dc407927Smrg # what "hidden" libraries, object files and flags are used when 6654dc407927Smrg # linking a shared library. 6655dc407927Smrg # 6656dc407927Smrg # There doesn't appear to be a way to prevent this compiler from 6657dc407927Smrg # explicitly linking system object files so we need to strip them 6658dc407927Smrg # from the output so that they don't get included in the library 6659dc407927Smrg # dependencies. 6660dd0822caSmrg 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"' 6661dc407927Smrg ;; 6662dc407927Smrg *) 6663dc407927Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6664dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6665dc407927Smrg case $host in 6666dc407927Smrg osf3*) 6667dd0822caSmrg _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' 6668dc407927Smrg ;; 6669dc407927Smrg *) 6670dd0822caSmrg _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' 6671dc407927Smrg ;; 6672dc407927Smrg esac 6673dc407927Smrg 6674dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6675dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6676dc407927Smrg 6677dc407927Smrg # Commands to make compiler produce verbose output that lists 6678dc407927Smrg # what "hidden" libraries, object files and flags are used when 6679dc407927Smrg # linking a shared library. 6680dd0822caSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6681dc407927Smrg 6682dc407927Smrg else 6683dc407927Smrg # FIXME: insert proper C++ library support 6684dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6685dc407927Smrg fi 6686dc407927Smrg ;; 6687dc407927Smrg esac 6688dc407927Smrg ;; 66893eed67faSmbalmer 6690dc407927Smrg psos*) 6691dc407927Smrg # FIXME: insert proper C++ library support 6692dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6693dc407927Smrg ;; 66943eed67faSmbalmer 6695dc407927Smrg sunos4*) 6696dc407927Smrg case $cc_basename in 6697dc407927Smrg CC*) 6698dc407927Smrg # Sun C++ 4.x 6699dc407927Smrg # FIXME: insert proper C++ library support 6700dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6701dc407927Smrg ;; 6702dc407927Smrg lcc*) 6703dc407927Smrg # Lucid 6704dc407927Smrg # FIXME: insert proper C++ library support 6705dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6706dc407927Smrg ;; 6707dc407927Smrg *) 6708dc407927Smrg # FIXME: insert proper C++ library support 6709dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6710dc407927Smrg ;; 6711dc407927Smrg esac 6712dc407927Smrg ;; 67133eed67faSmbalmer 6714dc407927Smrg solaris*) 6715dc407927Smrg case $cc_basename in 6716dd0822caSmrg CC* | sunCC*) 6717dc407927Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6718dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6719dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6720dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6721dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6722dc407927Smrg $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' 6723dc407927Smrg 6724dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6725dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6726dc407927Smrg case $host_os in 6727dc407927Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6728dc407927Smrg *) 6729dc407927Smrg # The compiler driver will combine and reorder linker options, 6730dc407927Smrg # but understands `-z linker_flag'. 6731dc407927Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6732dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6733dc407927Smrg ;; 6734dc407927Smrg esac 6735dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 67363eed67faSmbalmer 6737dd0822caSmrg output_verbose_link_cmd='func_echo_all' 67383eed67faSmbalmer 6739dc407927Smrg # Archives containing C++ object files must be created using 6740dc407927Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6741dc407927Smrg # necessary to make sure instantiated templates are included 6742dc407927Smrg # in the archive. 6743dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6744dc407927Smrg ;; 6745dc407927Smrg gcx*) 6746dc407927Smrg # Green Hills C++ Compiler 6747dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 67483eed67faSmbalmer 6749dc407927Smrg # The C++ compiler must be used to create the archive. 6750dc407927Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6751dc407927Smrg ;; 6752dc407927Smrg *) 6753dc407927Smrg # GNU C++ compiler with Solaris linker 6754dc407927Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6755dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6756dc407927Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6757dd0822caSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6758dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6759dd0822caSmrg $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6760dc407927Smrg 6761dc407927Smrg # Commands to make compiler produce verbose output that lists 6762dc407927Smrg # what "hidden" libraries, object files and flags are used when 6763dc407927Smrg # linking a shared library. 6764dd0822caSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6765dc407927Smrg else 6766dc407927Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6767dc407927Smrg # platform. 6768dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6769dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6770dc407927Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6771dc407927Smrg 6772dc407927Smrg # Commands to make compiler produce verbose output that lists 6773dc407927Smrg # what "hidden" libraries, object files and flags are used when 6774dc407927Smrg # linking a shared library. 6775dd0822caSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' 6776dc407927Smrg fi 6777dc407927Smrg 6778dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6779dc407927Smrg case $host_os in 6780dc407927Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6781dc407927Smrg *) 6782dc407927Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6783dc407927Smrg ;; 6784dc407927Smrg esac 6785dc407927Smrg fi 6786dc407927Smrg ;; 6787dc407927Smrg esac 6788dc407927Smrg ;; 67893eed67faSmbalmer 6790dc407927Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6791dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6792dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6793dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6794dc407927Smrg runpath_var='LD_RUN_PATH' 67953eed67faSmbalmer 6796dc407927Smrg case $cc_basename in 6797dc407927Smrg CC*) 6798dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6799dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6800dc407927Smrg ;; 6801dc407927Smrg *) 6802dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6803dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6804dc407927Smrg ;; 6805dc407927Smrg esac 6806dc407927Smrg ;; 68073eed67faSmbalmer 6808dc407927Smrg sysv5* | sco3.2v5* | sco5v6*) 6809dc407927Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6810dc407927Smrg # link with -lc, and that would cause any symbols used from libc to 6811dc407927Smrg # always be unresolved, which means just about no library would 6812dc407927Smrg # ever link correctly. If we're not using GNU ld we use -z text 6813dc407927Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6814dc407927Smrg # as -z defs. 6815dc407927Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6816dc407927Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6817dc407927Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6818dc407927Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6819dc407927Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6820dc407927Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6821dc407927Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6822dc407927Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6823dc407927Smrg runpath_var='LD_RUN_PATH' 68243eed67faSmbalmer 6825dc407927Smrg case $cc_basename in 6826dc407927Smrg CC*) 6827dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6828dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6829dd0822caSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ 6830dd0822caSmrg '"$_LT_TAGVAR(old_archive_cmds, $1)" 6831dd0822caSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ 6832dd0822caSmrg '"$_LT_TAGVAR(reload_cmds, $1)" 6833dc407927Smrg ;; 6834dc407927Smrg *) 6835dc407927Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6836dc407927Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6837dc407927Smrg ;; 6838dc407927Smrg esac 6839dc407927Smrg ;; 68403eed67faSmbalmer 6841dc407927Smrg tandem*) 6842dc407927Smrg case $cc_basename in 6843dc407927Smrg NCC*) 6844dc407927Smrg # NonStop-UX NCC 3.20 6845dc407927Smrg # FIXME: insert proper C++ library support 6846dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6847dc407927Smrg ;; 6848dc407927Smrg *) 6849dc407927Smrg # FIXME: insert proper C++ library support 6850dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6851dc407927Smrg ;; 6852dc407927Smrg esac 6853dc407927Smrg ;; 68543eed67faSmbalmer 6855dc407927Smrg vxworks*) 6856dc407927Smrg # FIXME: insert proper C++ library support 6857dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6858dc407927Smrg ;; 68593eed67faSmbalmer 6860dc407927Smrg *) 6861dc407927Smrg # FIXME: insert proper C++ library support 6862dc407927Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6863dc407927Smrg ;; 6864dc407927Smrg esac 68653eed67faSmbalmer 6866dc407927Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6867dc407927Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6868dc407927Smrg 6869dc407927Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6870dc407927Smrg _LT_TAGVAR(LD, $1)="$LD" 6871dc407927Smrg 6872dc407927Smrg ## CAVEAT EMPTOR: 6873dc407927Smrg ## There is no encapsulation within the following macros, do not change 6874dc407927Smrg ## the running order or otherwise move them around unless you know exactly 6875dc407927Smrg ## what you are doing... 6876dc407927Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6877dc407927Smrg _LT_COMPILER_PIC($1) 6878dc407927Smrg _LT_COMPILER_C_O($1) 6879dc407927Smrg _LT_COMPILER_FILE_LOCKS($1) 6880dc407927Smrg _LT_LINKER_SHLIBS($1) 6881dc407927Smrg _LT_SYS_DYNAMIC_LINKER($1) 6882dc407927Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6883dc407927Smrg 6884dc407927Smrg _LT_CONFIG($1) 6885dc407927Smrg fi # test -n "$compiler" 6886dc407927Smrg 6887dc407927Smrg CC=$lt_save_CC 6888dd0822caSmrg CFLAGS=$lt_save_CFLAGS 6889dc407927Smrg LDCXX=$LD 6890dc407927Smrg LD=$lt_save_LD 6891dc407927Smrg GCC=$lt_save_GCC 6892dc407927Smrg with_gnu_ld=$lt_save_with_gnu_ld 6893dc407927Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6894dc407927Smrg lt_cv_path_LD=$lt_save_path_LD 6895dc407927Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6896dc407927Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6897dc407927Smrgfi # test "$_lt_caught_CXX_error" != yes 68983eed67faSmbalmer 6899dc407927SmrgAC_LANG_POP 6900dc407927Smrg])# _LT_LANG_CXX_CONFIG 69013eed67faSmbalmer 69023eed67faSmbalmer 6903dd0822caSmrg# _LT_FUNC_STRIPNAME_CNF 6904dd0822caSmrg# ---------------------- 6905dd0822caSmrg# func_stripname_cnf prefix suffix name 6906dd0822caSmrg# strip PREFIX and SUFFIX off of NAME. 6907dd0822caSmrg# PREFIX and SUFFIX must not contain globbing or regex special 6908dd0822caSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 6909dd0822caSmrg# dot (in which case that matches only a dot). 6910dd0822caSmrg# 6911dd0822caSmrg# This function is identical to the (non-XSI) version of func_stripname, 6912dd0822caSmrg# except this one can be used by m4 code that may be executed by configure, 6913dd0822caSmrg# rather than the libtool script. 6914dd0822caSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl 6915dd0822caSmrgAC_REQUIRE([_LT_DECL_SED]) 6916dd0822caSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) 6917dd0822caSmrgfunc_stripname_cnf () 6918dd0822caSmrg{ 6919dd0822caSmrg case ${2} in 6920dd0822caSmrg .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; 6921dd0822caSmrg *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; 6922dd0822caSmrg esac 6923dd0822caSmrg} # func_stripname_cnf 6924dd0822caSmrg])# _LT_FUNC_STRIPNAME_CNF 6925dd0822caSmrg 6926dc407927Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6927dc407927Smrg# --------------------------------- 6928dc407927Smrg# Figure out "hidden" library dependencies from verbose 6929dc407927Smrg# compiler output when linking a shared library. 6930dc407927Smrg# Parse the compiler output and extract the necessary 6931dc407927Smrg# objects, libraries and library flags. 6932dc407927Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6933dc407927Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6934dd0822caSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl 6935dc407927Smrg# Dependencies to place before and after the object being linked: 6936dc407927Smrg_LT_TAGVAR(predep_objects, $1)= 6937dc407927Smrg_LT_TAGVAR(postdep_objects, $1)= 6938dc407927Smrg_LT_TAGVAR(predeps, $1)= 6939dc407927Smrg_LT_TAGVAR(postdeps, $1)= 6940dc407927Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 69413eed67faSmbalmer 6942dc407927Smrgdnl we can't use the lt_simple_compile_test_code here, 6943dc407927Smrgdnl because it contains code intended for an executable, 6944dc407927Smrgdnl not a library. It's possible we should let each 6945dc407927Smrgdnl tag define a new lt_????_link_test_code variable, 6946dc407927Smrgdnl but it's only used here... 6947dc407927Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6948dc407927Smrgint a; 6949dc407927Smrgvoid foo (void) { a = 0; } 6950dc407927Smrg_LT_EOF 6951dc407927Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6952dc407927Smrgclass Foo 6953dc407927Smrg{ 6954dc407927Smrgpublic: 6955dc407927Smrg Foo (void) { a = 0; } 6956dc407927Smrgprivate: 6957dc407927Smrg int a; 6958dc407927Smrg}; 6959dc407927Smrg_LT_EOF 6960dc407927Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6961dc407927Smrg subroutine foo 6962dc407927Smrg implicit none 6963dc407927Smrg integer*4 a 6964dc407927Smrg a=0 6965dc407927Smrg return 6966dc407927Smrg end 6967dc407927Smrg_LT_EOF 6968dc407927Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6969dc407927Smrg subroutine foo 6970dc407927Smrg implicit none 6971dc407927Smrg integer a 6972dc407927Smrg a=0 6973dc407927Smrg return 6974dc407927Smrg end 6975dc407927Smrg_LT_EOF 6976dc407927Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6977dc407927Smrgpublic class foo { 6978dc407927Smrg private int a; 6979dc407927Smrg public void bar (void) { 6980dc407927Smrg a = 0; 6981dc407927Smrg } 6982dc407927Smrg}; 6983dc407927Smrg_LT_EOF 698475cbef56Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF 698575cbef56Smrgpackage foo 698675cbef56Smrgfunc foo() { 698775cbef56Smrg} 698875cbef56Smrg_LT_EOF 6989dc407927Smrg]) 6990dd0822caSmrg 6991dd0822caSmrg_lt_libdeps_save_CFLAGS=$CFLAGS 6992dd0822caSmrgcase "$CC $CFLAGS " in #( 6993dd0822caSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; 6994dd0822caSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; 699575cbef56Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; 6996dd0822caSmrgesac 6997dd0822caSmrg 6998dc407927Smrgdnl Parse the compiler output and extract the necessary 6999dc407927Smrgdnl objects, libraries and library flags. 7000dc407927Smrgif AC_TRY_EVAL(ac_compile); then 7001dc407927Smrg # Parse the compiler output and extract the necessary 7002dc407927Smrg # objects, libraries and library flags. 70033eed67faSmbalmer 7004dc407927Smrg # Sentinel used to keep track of whether or not we are before 7005dc407927Smrg # the conftest object file. 7006dc407927Smrg pre_test_object_deps_done=no 70073eed67faSmbalmer 7008dc407927Smrg for p in `eval "$output_verbose_link_cmd"`; do 7009dd0822caSmrg case ${prev}${p} in 70103eed67faSmbalmer 7011dc407927Smrg -L* | -R* | -l*) 7012dc407927Smrg # Some compilers place space between "-{L,R}" and the path. 7013dc407927Smrg # Remove the space. 7014dc407927Smrg if test $p = "-L" || 7015dc407927Smrg test $p = "-R"; then 7016dc407927Smrg prev=$p 7017dc407927Smrg continue 7018dc407927Smrg fi 70193eed67faSmbalmer 7020dd0822caSmrg # Expand the sysroot to ease extracting the directories later. 7021dd0822caSmrg if test -z "$prev"; then 7022dd0822caSmrg case $p in 7023dd0822caSmrg -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; 7024dd0822caSmrg -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; 7025dd0822caSmrg -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; 7026dd0822caSmrg esac 7027dd0822caSmrg fi 7028dd0822caSmrg case $p in 7029dd0822caSmrg =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; 7030dd0822caSmrg esac 7031dc407927Smrg if test "$pre_test_object_deps_done" = no; then 7032dd0822caSmrg case ${prev} in 7033dd0822caSmrg -L | -R) 7034dc407927Smrg # Internal compiler library paths should come after those 7035dc407927Smrg # provided the user. The postdeps already come after the 7036dc407927Smrg # user supplied libs so there is no need to process them. 7037dc407927Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 7038dc407927Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 7039dc407927Smrg else 7040dc407927Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 7041dc407927Smrg fi 7042dc407927Smrg ;; 7043dc407927Smrg # The "-l" case would never come before the object being 7044dc407927Smrg # linked, so don't bother handling this case. 7045dc407927Smrg esac 7046dc407927Smrg else 7047dc407927Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 7048dc407927Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 7049dc407927Smrg else 7050dc407927Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 7051dc407927Smrg fi 7052dc407927Smrg fi 7053dd0822caSmrg prev= 7054dc407927Smrg ;; 70553eed67faSmbalmer 7056dd0822caSmrg *.lto.$objext) ;; # Ignore GCC LTO objects 7057dc407927Smrg *.$objext) 7058dc407927Smrg # This assumes that the test object file only shows up 7059dc407927Smrg # once in the compiler output. 7060dc407927Smrg if test "$p" = "conftest.$objext"; then 7061dc407927Smrg pre_test_object_deps_done=yes 7062dc407927Smrg continue 7063dc407927Smrg fi 70643eed67faSmbalmer 7065dc407927Smrg if test "$pre_test_object_deps_done" = no; then 7066dc407927Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 7067dc407927Smrg _LT_TAGVAR(predep_objects, $1)="$p" 7068dc407927Smrg else 7069dc407927Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 7070dc407927Smrg fi 7071dc407927Smrg else 7072dc407927Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 7073dc407927Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 7074dc407927Smrg else 7075dc407927Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 7076dc407927Smrg fi 7077dc407927Smrg fi 7078dc407927Smrg ;; 70793eed67faSmbalmer 7080dc407927Smrg *) ;; # Ignore the rest. 70813eed67faSmbalmer 7082dc407927Smrg esac 7083dc407927Smrg done 70843eed67faSmbalmer 7085dc407927Smrg # Clean up. 7086dc407927Smrg rm -f a.out a.exe 70873eed67faSmbalmerelse 7088dc407927Smrg echo "libtool.m4: error: problem compiling $1 test program" 70893eed67faSmbalmerfi 70903eed67faSmbalmer 7091dc407927Smrg$RM -f confest.$objext 7092dd0822caSmrgCFLAGS=$_lt_libdeps_save_CFLAGS 70933eed67faSmbalmer 7094dc407927Smrg# PORTME: override above test on systems where it is broken 7095dc407927Smrgm4_if([$1], [CXX], 7096dc407927Smrg[case $host_os in 7097dc407927Smrginterix[[3-9]]*) 7098dc407927Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 7099dc407927Smrg # hack all around it, let's just trust "g++" to DTRT. 7100dc407927Smrg _LT_TAGVAR(predep_objects,$1)= 7101dc407927Smrg _LT_TAGVAR(postdep_objects,$1)= 7102dc407927Smrg _LT_TAGVAR(postdeps,$1)= 7103dc407927Smrg ;; 71043eed67faSmbalmer 7105dc407927Smrglinux*) 7106dc407927Smrg case `$CC -V 2>&1 | sed 5q` in 7107dc407927Smrg *Sun\ C*) 7108dc407927Smrg # Sun C++ 5.9 71093eed67faSmbalmer 7110dc407927Smrg # The more standards-conforming stlport4 library is 7111dc407927Smrg # incompatible with the Cstd library. Avoid specifying 7112dc407927Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7113dc407927Smrg # -library=stlport4 depends on it. 7114dc407927Smrg case " $CXX $CXXFLAGS " in 7115dc407927Smrg *" -library=stlport4 "*) 7116dc407927Smrg solaris_use_stlport4=yes 7117dc407927Smrg ;; 7118dc407927Smrg esac 71193eed67faSmbalmer 7120dc407927Smrg if test "$solaris_use_stlport4" != yes; then 7121dc407927Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7122dc407927Smrg fi 7123dc407927Smrg ;; 7124dc407927Smrg esac 7125dc407927Smrg ;; 7126dc407927Smrg 7127dc407927Smrgsolaris*) 7128dc407927Smrg case $cc_basename in 7129dd0822caSmrg CC* | sunCC*) 7130dc407927Smrg # The more standards-conforming stlport4 library is 7131dc407927Smrg # incompatible with the Cstd library. Avoid specifying 7132dc407927Smrg # it if it's in CXXFLAGS. Ignore libCrun as 7133dc407927Smrg # -library=stlport4 depends on it. 7134dc407927Smrg case " $CXX $CXXFLAGS " in 7135dc407927Smrg *" -library=stlport4 "*) 7136dc407927Smrg solaris_use_stlport4=yes 7137dc407927Smrg ;; 7138dc407927Smrg esac 71393eed67faSmbalmer 7140dc407927Smrg # Adding this requires a known-good setup of shared libraries for 7141dc407927Smrg # Sun compiler versions before 5.6, else PIC objects from an old 7142dc407927Smrg # archive will be linked into the output, leading to subtle bugs. 7143dc407927Smrg if test "$solaris_use_stlport4" != yes; then 7144dc407927Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 7145dc407927Smrg fi 7146dc407927Smrg ;; 7147dc407927Smrg esac 7148dc407927Smrg ;; 7149dc407927Smrgesac 7150dc407927Smrg]) 71513eed67faSmbalmer 7152dc407927Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 7153dc407927Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 7154dc407927Smrgesac 7155dc407927Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 7156dc407927Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 7157dc407927Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 7158dc407927Smrgfi 7159dc407927Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 7160dc407927Smrg [The directories searched by this compiler when creating a shared library]) 7161dc407927Smrg_LT_TAGDECL([], [predep_objects], [1], 7162dc407927Smrg [Dependencies to place before and after the objects being linked to 7163dc407927Smrg create a shared library]) 7164dc407927Smrg_LT_TAGDECL([], [postdep_objects], [1]) 7165dc407927Smrg_LT_TAGDECL([], [predeps], [1]) 7166dc407927Smrg_LT_TAGDECL([], [postdeps], [1]) 7167dc407927Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 7168dc407927Smrg [The library search path used internally by the compiler when linking 7169dc407927Smrg a shared library]) 7170dc407927Smrg])# _LT_SYS_HIDDEN_LIBDEPS 7171dc407927Smrg 7172dc407927Smrg 7173dc407927Smrg# _LT_LANG_F77_CONFIG([TAG]) 7174dc407927Smrg# -------------------------- 7175dc407927Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 7176dc407927Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7177dc407927Smrg# to write the compiler configuration to `libtool'. 7178dc407927Smrgm4_defun([_LT_LANG_F77_CONFIG], 7179dd0822caSmrg[AC_LANG_PUSH(Fortran 77) 7180dd0822caSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 7181dd0822caSmrg _lt_disable_F77=yes 7182dd0822caSmrgfi 71833eed67faSmbalmer 7184dc407927Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7185dc407927Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7186dc407927Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7187dc407927Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7188dc407927Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7189dc407927Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7190dc407927Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7191dc407927Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7192dc407927Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7193dc407927Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7194dc407927Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7195dc407927Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7196dc407927Smrg_LT_TAGVAR(module_cmds, $1)= 7197dc407927Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7198dc407927Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7199dc407927Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7200dd0822caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7201dd0822caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7202dc407927Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7203dc407927Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7204dc407927Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 72053eed67faSmbalmer 7206dc407927Smrg# Source file extension for f77 test sources. 7207dc407927Smrgac_ext=f 72083eed67faSmbalmer 7209dc407927Smrg# Object file extension for compiled f77 test sources. 7210dc407927Smrgobjext=o 7211dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 7212dc407927Smrg 7213dc407927Smrg# No sense in running all these tests if we already determined that 7214dc407927Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 7215dc407927Smrg# are currently assumed to apply to all compilers on this platform, 7216dc407927Smrg# and will be corrupted by setting them based on a non-working compiler. 7217dc407927Smrgif test "$_lt_disable_F77" != yes; then 7218dc407927Smrg # Code to be used in simple compile tests 7219dc407927Smrg lt_simple_compile_test_code="\ 7220dc407927Smrg subroutine t 7221dc407927Smrg return 7222dc407927Smrg end 7223dc407927Smrg" 72243eed67faSmbalmer 7225dc407927Smrg # Code to be used in simple link tests 7226dc407927Smrg lt_simple_link_test_code="\ 7227dc407927Smrg program t 7228dc407927Smrg end 7229dc407927Smrg" 72303eed67faSmbalmer 7231dc407927Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7232dc407927Smrg _LT_TAG_COMPILER 72333eed67faSmbalmer 7234dc407927Smrg # save warnings/boilerplate of simple test code 7235dc407927Smrg _LT_COMPILER_BOILERPLATE 7236dc407927Smrg _LT_LINKER_BOILERPLATE 72373eed67faSmbalmer 7238dc407927Smrg # Allow CC to be a program name with arguments. 7239dc407927Smrg lt_save_CC="$CC" 7240dc407927Smrg lt_save_GCC=$GCC 7241dd0822caSmrg lt_save_CFLAGS=$CFLAGS 7242dc407927Smrg CC=${F77-"f77"} 7243dd0822caSmrg CFLAGS=$FFLAGS 7244dc407927Smrg compiler=$CC 7245dc407927Smrg _LT_TAGVAR(compiler, $1)=$CC 7246dc407927Smrg _LT_CC_BASENAME([$compiler]) 7247dc407927Smrg GCC=$G77 7248dc407927Smrg if test -n "$compiler"; then 7249dc407927Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7250dc407927Smrg AC_MSG_RESULT([$can_build_shared]) 72513eed67faSmbalmer 7252dc407927Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7253dc407927Smrg test "$can_build_shared" = "no" && enable_shared=no 72543eed67faSmbalmer 7255dc407927Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7256dc407927Smrg # are all built from PIC. 7257dc407927Smrg case $host_os in 7258dc407927Smrg aix3*) 7259dc407927Smrg test "$enable_shared" = yes && enable_static=no 7260dc407927Smrg if test -n "$RANLIB"; then 7261dc407927Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7262dc407927Smrg postinstall_cmds='$RANLIB $lib' 7263dc407927Smrg fi 7264dc407927Smrg ;; 7265dc407927Smrg aix[[4-9]]*) 7266dc407927Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7267dc407927Smrg test "$enable_shared" = yes && enable_static=no 7268dc407927Smrg fi 7269dc407927Smrg ;; 7270dc407927Smrg esac 7271dc407927Smrg AC_MSG_RESULT([$enable_shared]) 7272dc407927Smrg 7273dc407927Smrg AC_MSG_CHECKING([whether to build static libraries]) 7274dc407927Smrg # Make sure either enable_shared or enable_static is yes. 7275dc407927Smrg test "$enable_shared" = yes || enable_static=yes 7276dc407927Smrg AC_MSG_RESULT([$enable_static]) 7277dc407927Smrg 7278dc407927Smrg _LT_TAGVAR(GCC, $1)="$G77" 7279dc407927Smrg _LT_TAGVAR(LD, $1)="$LD" 7280dc407927Smrg 7281dc407927Smrg ## CAVEAT EMPTOR: 7282dc407927Smrg ## There is no encapsulation within the following macros, do not change 7283dc407927Smrg ## the running order or otherwise move them around unless you know exactly 7284dc407927Smrg ## what you are doing... 7285dc407927Smrg _LT_COMPILER_PIC($1) 7286dc407927Smrg _LT_COMPILER_C_O($1) 7287dc407927Smrg _LT_COMPILER_FILE_LOCKS($1) 7288dc407927Smrg _LT_LINKER_SHLIBS($1) 7289dc407927Smrg _LT_SYS_DYNAMIC_LINKER($1) 7290dc407927Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7291dc407927Smrg 7292dc407927Smrg _LT_CONFIG($1) 7293dc407927Smrg fi # test -n "$compiler" 7294dc407927Smrg 7295dc407927Smrg GCC=$lt_save_GCC 7296dc407927Smrg CC="$lt_save_CC" 7297dd0822caSmrg CFLAGS="$lt_save_CFLAGS" 7298dc407927Smrgfi # test "$_lt_disable_F77" != yes 72993eed67faSmbalmer 7300dc407927SmrgAC_LANG_POP 7301dc407927Smrg])# _LT_LANG_F77_CONFIG 73023eed67faSmbalmer 73033eed67faSmbalmer 7304dc407927Smrg# _LT_LANG_FC_CONFIG([TAG]) 7305dc407927Smrg# ------------------------- 7306dc407927Smrg# Ensure that the configuration variables for a Fortran compiler are 7307dc407927Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 7308dc407927Smrg# to write the compiler configuration to `libtool'. 7309dc407927Smrgm4_defun([_LT_LANG_FC_CONFIG], 7310dd0822caSmrg[AC_LANG_PUSH(Fortran) 7311dd0822caSmrg 7312dd0822caSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 7313dd0822caSmrg _lt_disable_FC=yes 7314dd0822caSmrgfi 7315dc407927Smrg 7316dc407927Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7317dc407927Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 7318dc407927Smrg_LT_TAGVAR(always_export_symbols, $1)=no 7319dc407927Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 7320dc407927Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 7321dc407927Smrg_LT_TAGVAR(hardcode_direct, $1)=no 7322dc407927Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 7323dc407927Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 7324dc407927Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 7325dc407927Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 7326dc407927Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 7327dc407927Smrg_LT_TAGVAR(inherit_rpath, $1)=no 7328dc407927Smrg_LT_TAGVAR(module_cmds, $1)= 7329dc407927Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 7330dc407927Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 7331dc407927Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7332dd0822caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7333dd0822caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7334dc407927Smrg_LT_TAGVAR(no_undefined_flag, $1)= 7335dc407927Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 7336dc407927Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 7337dc407927Smrg 7338dc407927Smrg# Source file extension for fc test sources. 7339dc407927Smrgac_ext=${ac_fc_srcext-f} 7340dc407927Smrg 7341dc407927Smrg# Object file extension for compiled fc test sources. 7342dc407927Smrgobjext=o 7343dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 7344dc407927Smrg 7345dc407927Smrg# No sense in running all these tests if we already determined that 7346dc407927Smrg# the FC compiler isn't working. Some variables (like enable_shared) 7347dc407927Smrg# are currently assumed to apply to all compilers on this platform, 7348dc407927Smrg# and will be corrupted by setting them based on a non-working compiler. 7349dc407927Smrgif test "$_lt_disable_FC" != yes; then 7350dc407927Smrg # Code to be used in simple compile tests 7351dc407927Smrg lt_simple_compile_test_code="\ 7352dc407927Smrg subroutine t 7353dc407927Smrg return 7354dc407927Smrg end 7355dc407927Smrg" 73563eed67faSmbalmer 7357dc407927Smrg # Code to be used in simple link tests 7358dc407927Smrg lt_simple_link_test_code="\ 7359dc407927Smrg program t 7360dc407927Smrg end 7361dc407927Smrg" 73623eed67faSmbalmer 7363dc407927Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 7364dc407927Smrg _LT_TAG_COMPILER 73653eed67faSmbalmer 7366dc407927Smrg # save warnings/boilerplate of simple test code 7367dc407927Smrg _LT_COMPILER_BOILERPLATE 7368dc407927Smrg _LT_LINKER_BOILERPLATE 73693eed67faSmbalmer 7370dc407927Smrg # Allow CC to be a program name with arguments. 7371dc407927Smrg lt_save_CC="$CC" 7372dc407927Smrg lt_save_GCC=$GCC 7373dd0822caSmrg lt_save_CFLAGS=$CFLAGS 7374dc407927Smrg CC=${FC-"f95"} 7375dd0822caSmrg CFLAGS=$FCFLAGS 7376dc407927Smrg compiler=$CC 7377dc407927Smrg GCC=$ac_cv_fc_compiler_gnu 7378dc407927Smrg 7379dc407927Smrg _LT_TAGVAR(compiler, $1)=$CC 7380dc407927Smrg _LT_CC_BASENAME([$compiler]) 73813eed67faSmbalmer 7382dc407927Smrg if test -n "$compiler"; then 7383dc407927Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 7384dc407927Smrg AC_MSG_RESULT([$can_build_shared]) 7385dc407927Smrg 7386dc407927Smrg AC_MSG_CHECKING([whether to build shared libraries]) 7387dc407927Smrg test "$can_build_shared" = "no" && enable_shared=no 7388dc407927Smrg 7389dc407927Smrg # On AIX, shared libraries and static libraries use the same namespace, and 7390dc407927Smrg # are all built from PIC. 73913eed67faSmbalmer case $host_os in 7392dc407927Smrg aix3*) 7393dc407927Smrg test "$enable_shared" = yes && enable_static=no 7394dc407927Smrg if test -n "$RANLIB"; then 7395dc407927Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 7396dc407927Smrg postinstall_cmds='$RANLIB $lib' 7397dc407927Smrg fi 7398dc407927Smrg ;; 73993eed67faSmbalmer aix[[4-9]]*) 7400dc407927Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 7401dc407927Smrg test "$enable_shared" = yes && enable_static=no 74023eed67faSmbalmer fi 7403dc407927Smrg ;; 74043eed67faSmbalmer esac 7405dc407927Smrg AC_MSG_RESULT([$enable_shared]) 7406dc407927Smrg 7407dc407927Smrg AC_MSG_CHECKING([whether to build static libraries]) 7408dc407927Smrg # Make sure either enable_shared or enable_static is yes. 7409dc407927Smrg test "$enable_shared" = yes || enable_static=yes 7410dc407927Smrg AC_MSG_RESULT([$enable_static]) 7411dc407927Smrg 7412dc407927Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 7413dc407927Smrg _LT_TAGVAR(LD, $1)="$LD" 7414dc407927Smrg 7415dc407927Smrg ## CAVEAT EMPTOR: 7416dc407927Smrg ## There is no encapsulation within the following macros, do not change 7417dc407927Smrg ## the running order or otherwise move them around unless you know exactly 7418dc407927Smrg ## what you are doing... 7419dc407927Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 7420dc407927Smrg _LT_COMPILER_PIC($1) 7421dc407927Smrg _LT_COMPILER_C_O($1) 7422dc407927Smrg _LT_COMPILER_FILE_LOCKS($1) 7423dc407927Smrg _LT_LINKER_SHLIBS($1) 7424dc407927Smrg _LT_SYS_DYNAMIC_LINKER($1) 7425dc407927Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7426dc407927Smrg 7427dc407927Smrg _LT_CONFIG($1) 7428dc407927Smrg fi # test -n "$compiler" 7429dc407927Smrg 7430dc407927Smrg GCC=$lt_save_GCC 7431dd0822caSmrg CC=$lt_save_CC 7432dd0822caSmrg CFLAGS=$lt_save_CFLAGS 7433dc407927Smrgfi # test "$_lt_disable_FC" != yes 74343eed67faSmbalmer 7435dc407927SmrgAC_LANG_POP 7436dc407927Smrg])# _LT_LANG_FC_CONFIG 74373eed67faSmbalmer 74383eed67faSmbalmer 7439dc407927Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 7440dc407927Smrg# -------------------------- 7441dc407927Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 7442dc407927Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7443dc407927Smrg# to write the compiler configuration to `libtool'. 7444dc407927Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 7445dc407927Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 7446dc407927SmrgAC_LANG_SAVE 74473eed67faSmbalmer 7448dc407927Smrg# Source file extension for Java test sources. 7449dc407927Smrgac_ext=java 74503eed67faSmbalmer 7451dc407927Smrg# Object file extension for compiled Java test sources. 7452dc407927Smrgobjext=o 7453dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 74543eed67faSmbalmer 7455dc407927Smrg# Code to be used in simple compile tests 7456dc407927Smrglt_simple_compile_test_code="class foo {}" 74573eed67faSmbalmer 7458dc407927Smrg# Code to be used in simple link tests 7459dc407927Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 74603eed67faSmbalmer 7461dc407927Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7462dc407927Smrg_LT_TAG_COMPILER 74633eed67faSmbalmer 7464dc407927Smrg# save warnings/boilerplate of simple test code 7465dc407927Smrg_LT_COMPILER_BOILERPLATE 7466dc407927Smrg_LT_LINKER_BOILERPLATE 7467dc407927Smrg 7468dc407927Smrg# Allow CC to be a program name with arguments. 7469dd0822caSmrglt_save_CC=$CC 7470dd0822caSmrglt_save_CFLAGS=$CFLAGS 7471dc407927Smrglt_save_GCC=$GCC 7472dc407927SmrgGCC=yes 7473dc407927SmrgCC=${GCJ-"gcj"} 7474dd0822caSmrgCFLAGS=$GCJFLAGS 7475dc407927Smrgcompiler=$CC 7476dc407927Smrg_LT_TAGVAR(compiler, $1)=$CC 7477dc407927Smrg_LT_TAGVAR(LD, $1)="$LD" 7478dc407927Smrg_LT_CC_BASENAME([$compiler]) 7479dc407927Smrg 7480dc407927Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 7481dc407927Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 7482dc407927Smrg 7483dc407927Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 7484dd0822caSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 7485dd0822caSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 7486dc407927Smrg 7487dc407927Smrgif test -n "$compiler"; then 7488dc407927Smrg _LT_COMPILER_NO_RTTI($1) 7489dc407927Smrg _LT_COMPILER_PIC($1) 7490dc407927Smrg _LT_COMPILER_C_O($1) 7491dc407927Smrg _LT_COMPILER_FILE_LOCKS($1) 7492dc407927Smrg _LT_LINKER_SHLIBS($1) 7493dc407927Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 7494dc407927Smrg 7495dc407927Smrg _LT_CONFIG($1) 7496dc407927Smrgfi 7497dc407927Smrg 7498dc407927SmrgAC_LANG_RESTORE 74993eed67faSmbalmer 7500dc407927SmrgGCC=$lt_save_GCC 7501dd0822caSmrgCC=$lt_save_CC 7502dd0822caSmrgCFLAGS=$lt_save_CFLAGS 7503dc407927Smrg])# _LT_LANG_GCJ_CONFIG 75043eed67faSmbalmer 75053eed67faSmbalmer 750675cbef56Smrg# _LT_LANG_GO_CONFIG([TAG]) 750775cbef56Smrg# -------------------------- 750875cbef56Smrg# Ensure that the configuration variables for the GNU Go compiler 750975cbef56Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 751075cbef56Smrg# to write the compiler configuration to `libtool'. 751175cbef56Smrgm4_defun([_LT_LANG_GO_CONFIG], 751275cbef56Smrg[AC_REQUIRE([LT_PROG_GO])dnl 751375cbef56SmrgAC_LANG_SAVE 751475cbef56Smrg 751575cbef56Smrg# Source file extension for Go test sources. 751675cbef56Smrgac_ext=go 751775cbef56Smrg 751875cbef56Smrg# Object file extension for compiled Go test sources. 751975cbef56Smrgobjext=o 752075cbef56Smrg_LT_TAGVAR(objext, $1)=$objext 752175cbef56Smrg 752275cbef56Smrg# Code to be used in simple compile tests 752375cbef56Smrglt_simple_compile_test_code="package main; func main() { }" 752475cbef56Smrg 752575cbef56Smrg# Code to be used in simple link tests 752675cbef56Smrglt_simple_link_test_code='package main; func main() { }' 752775cbef56Smrg 752875cbef56Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 752975cbef56Smrg_LT_TAG_COMPILER 753075cbef56Smrg 753175cbef56Smrg# save warnings/boilerplate of simple test code 753275cbef56Smrg_LT_COMPILER_BOILERPLATE 753375cbef56Smrg_LT_LINKER_BOILERPLATE 753475cbef56Smrg 753575cbef56Smrg# Allow CC to be a program name with arguments. 753675cbef56Smrglt_save_CC=$CC 753775cbef56Smrglt_save_CFLAGS=$CFLAGS 753875cbef56Smrglt_save_GCC=$GCC 753975cbef56SmrgGCC=yes 754075cbef56SmrgCC=${GOC-"gccgo"} 754175cbef56SmrgCFLAGS=$GOFLAGS 754275cbef56Smrgcompiler=$CC 754375cbef56Smrg_LT_TAGVAR(compiler, $1)=$CC 754475cbef56Smrg_LT_TAGVAR(LD, $1)="$LD" 754575cbef56Smrg_LT_CC_BASENAME([$compiler]) 754675cbef56Smrg 754775cbef56Smrg# Go did not exist at the time GCC didn't implicitly link libc in. 754875cbef56Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 754975cbef56Smrg 755075cbef56Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 755175cbef56Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag 755275cbef56Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds 755375cbef56Smrg 755475cbef56Smrgif test -n "$compiler"; then 755575cbef56Smrg _LT_COMPILER_NO_RTTI($1) 755675cbef56Smrg _LT_COMPILER_PIC($1) 755775cbef56Smrg _LT_COMPILER_C_O($1) 755875cbef56Smrg _LT_COMPILER_FILE_LOCKS($1) 755975cbef56Smrg _LT_LINKER_SHLIBS($1) 756075cbef56Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 756175cbef56Smrg 756275cbef56Smrg _LT_CONFIG($1) 756375cbef56Smrgfi 756475cbef56Smrg 756575cbef56SmrgAC_LANG_RESTORE 756675cbef56Smrg 756775cbef56SmrgGCC=$lt_save_GCC 756875cbef56SmrgCC=$lt_save_CC 756975cbef56SmrgCFLAGS=$lt_save_CFLAGS 757075cbef56Smrg])# _LT_LANG_GO_CONFIG 757175cbef56Smrg 757275cbef56Smrg 7573dc407927Smrg# _LT_LANG_RC_CONFIG([TAG]) 7574dc407927Smrg# ------------------------- 7575dc407927Smrg# Ensure that the configuration variables for the Windows resource compiler 7576dc407927Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 7577dc407927Smrg# to write the compiler configuration to `libtool'. 7578dc407927Smrgm4_defun([_LT_LANG_RC_CONFIG], 7579dc407927Smrg[AC_REQUIRE([LT_PROG_RC])dnl 7580dc407927SmrgAC_LANG_SAVE 75813eed67faSmbalmer 7582dc407927Smrg# Source file extension for RC test sources. 7583dc407927Smrgac_ext=rc 75843eed67faSmbalmer 7585dc407927Smrg# Object file extension for compiled RC test sources. 7586dc407927Smrgobjext=o 7587dc407927Smrg_LT_TAGVAR(objext, $1)=$objext 75883eed67faSmbalmer 7589dc407927Smrg# Code to be used in simple compile tests 7590dc407927Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 75913eed67faSmbalmer 7592dc407927Smrg# Code to be used in simple link tests 7593dc407927Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 75943eed67faSmbalmer 7595dc407927Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 7596dc407927Smrg_LT_TAG_COMPILER 75973eed67faSmbalmer 7598dc407927Smrg# save warnings/boilerplate of simple test code 7599dc407927Smrg_LT_COMPILER_BOILERPLATE 7600dc407927Smrg_LT_LINKER_BOILERPLATE 76013eed67faSmbalmer 7602dc407927Smrg# Allow CC to be a program name with arguments. 7603dc407927Smrglt_save_CC="$CC" 7604dd0822caSmrglt_save_CFLAGS=$CFLAGS 7605dc407927Smrglt_save_GCC=$GCC 7606dc407927SmrgGCC= 7607dc407927SmrgCC=${RC-"windres"} 7608dd0822caSmrgCFLAGS= 7609dc407927Smrgcompiler=$CC 7610dc407927Smrg_LT_TAGVAR(compiler, $1)=$CC 7611dc407927Smrg_LT_CC_BASENAME([$compiler]) 7612dc407927Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 76133eed67faSmbalmer 7614dc407927Smrgif test -n "$compiler"; then 7615dc407927Smrg : 7616dc407927Smrg _LT_CONFIG($1) 7617dc407927Smrgfi 76183eed67faSmbalmer 7619dc407927SmrgGCC=$lt_save_GCC 7620dc407927SmrgAC_LANG_RESTORE 7621dd0822caSmrgCC=$lt_save_CC 7622dd0822caSmrgCFLAGS=$lt_save_CFLAGS 7623dc407927Smrg])# _LT_LANG_RC_CONFIG 76243eed67faSmbalmer 76253eed67faSmbalmer 7626dc407927Smrg# LT_PROG_GCJ 7627dc407927Smrg# ----------- 7628dc407927SmrgAC_DEFUN([LT_PROG_GCJ], 7629dc407927Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 7630dc407927Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 7631dc407927Smrg [AC_CHECK_TOOL(GCJ, gcj,) 7632dc407927Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 7633dc407927Smrg AC_SUBST(GCJFLAGS)])])[]dnl 7634dc407927Smrg]) 76353eed67faSmbalmer 7636dc407927Smrg# Old name: 7637dc407927SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 7638dc407927Smrgdnl aclocal-1.4 backwards compatibility: 7639dc407927Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 76403eed67faSmbalmer 7641dc407927Smrg 764275cbef56Smrg# LT_PROG_GO 764375cbef56Smrg# ---------- 764475cbef56SmrgAC_DEFUN([LT_PROG_GO], 764575cbef56Smrg[AC_CHECK_TOOL(GOC, gccgo,) 764675cbef56Smrg]) 764775cbef56Smrg 764875cbef56Smrg 7649dc407927Smrg# LT_PROG_RC 7650dc407927Smrg# ---------- 7651dc407927SmrgAC_DEFUN([LT_PROG_RC], 7652dc407927Smrg[AC_CHECK_TOOL(RC, windres,) 76533eed67faSmbalmer]) 76543eed67faSmbalmer 7655dc407927Smrg# Old name: 7656dc407927SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 7657dc407927Smrgdnl aclocal-1.4 backwards compatibility: 7658dc407927Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 76593eed67faSmbalmer 7660dc407927Smrg 7661dc407927Smrg# _LT_DECL_EGREP 7662dc407927Smrg# -------------- 7663dc407927Smrg# If we don't have a new enough Autoconf to choose the best grep 7664dc407927Smrg# available, choose the one first in the user's PATH. 7665dc407927Smrgm4_defun([_LT_DECL_EGREP], 7666dc407927Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7667dc407927SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7668dc407927Smrgtest -z "$GREP" && GREP=grep 7669dc407927Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7670dc407927Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7671dc407927Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7672dc407927Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7673dc407927SmrgAC_SUBST([GREP]) 76743eed67faSmbalmer]) 76753eed67faSmbalmer 76763eed67faSmbalmer 7677dc407927Smrg# _LT_DECL_OBJDUMP 7678dc407927Smrg# -------------- 7679dc407927Smrg# If we don't have a new enough Autoconf to choose the best objdump 7680dc407927Smrg# available, choose the one first in the user's PATH. 7681dc407927Smrgm4_defun([_LT_DECL_OBJDUMP], 7682dc407927Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7683dc407927Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7684dc407927Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7685dc407927SmrgAC_SUBST([OBJDUMP]) 7686dc407927Smrg]) 7687dc407927Smrg 7688dd0822caSmrg# _LT_DECL_DLLTOOL 7689dd0822caSmrg# ---------------- 7690dd0822caSmrg# Ensure DLLTOOL variable is set. 7691dd0822caSmrgm4_defun([_LT_DECL_DLLTOOL], 7692dd0822caSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7693dd0822caSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7694dd0822caSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) 7695dd0822caSmrgAC_SUBST([DLLTOOL]) 7696dd0822caSmrg]) 7697dc407927Smrg 7698dc407927Smrg# _LT_DECL_SED 7699dc407927Smrg# ------------ 7700dc407927Smrg# Check for a fully-functional sed program, that truncates 7701dc407927Smrg# as few characters as possible. Prefer GNU sed if found. 7702dc407927Smrgm4_defun([_LT_DECL_SED], 7703dc407927Smrg[AC_PROG_SED 7704dc407927Smrgtest -z "$SED" && SED=sed 7705dc407927SmrgXsed="$SED -e 1s/^X//" 7706dc407927Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7707dc407927Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7708dc407927Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7709dc407927Smrg])# _LT_DECL_SED 7710dc407927Smrg 7711dc407927Smrgm4_ifndef([AC_PROG_SED], [ 7712dc407927Smrg# NOTE: This macro has been submitted for inclusion into # 7713dc407927Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7714dc407927Smrg# a released version of Autoconf we should remove this # 7715dc407927Smrg# macro and use it instead. # 7716dc407927Smrg 7717dc407927Smrgm4_defun([AC_PROG_SED], 7718dc407927Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7719dc407927SmrgAC_CACHE_VAL(lt_cv_path_SED, 7720dc407927Smrg[# Loop through the user's path and test for sed and gsed. 7721dc407927Smrg# Then use that list of sed's as ones to test for truncation. 7722dc407927Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7723dc407927Smrgfor as_dir in $PATH 7724dc407927Smrgdo 7725dc407927Smrg IFS=$as_save_IFS 7726dc407927Smrg test -z "$as_dir" && as_dir=. 7727dc407927Smrg for lt_ac_prog in sed gsed; do 7728dc407927Smrg for ac_exec_ext in '' $ac_executable_extensions; do 7729dc407927Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7730dc407927Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7731dc407927Smrg fi 7732dc407927Smrg done 7733dc407927Smrg done 7734dc407927Smrgdone 7735dc407927SmrgIFS=$as_save_IFS 7736dc407927Smrglt_ac_max=0 7737dc407927Smrglt_ac_count=0 7738dc407927Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7739dc407927Smrg# along with /bin/sed that truncates output. 7740dc407927Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7741dc407927Smrg test ! -f $lt_ac_sed && continue 7742dc407927Smrg cat /dev/null > conftest.in 7743dc407927Smrg lt_ac_count=0 7744dc407927Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7745dc407927Smrg # Check for GNU sed and select it if it is found. 7746dc407927Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7747dc407927Smrg lt_cv_path_SED=$lt_ac_sed 7748dc407927Smrg break 7749dc407927Smrg fi 7750dc407927Smrg while true; do 7751dc407927Smrg cat conftest.in conftest.in >conftest.tmp 7752dc407927Smrg mv conftest.tmp conftest.in 7753dc407927Smrg cp conftest.in conftest.nl 7754dc407927Smrg echo >>conftest.nl 7755dc407927Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7756dc407927Smrg cmp -s conftest.out conftest.nl || break 7757dc407927Smrg # 10000 chars as input seems more than enough 7758dc407927Smrg test $lt_ac_count -gt 10 && break 7759dc407927Smrg lt_ac_count=`expr $lt_ac_count + 1` 7760dc407927Smrg if test $lt_ac_count -gt $lt_ac_max; then 7761dc407927Smrg lt_ac_max=$lt_ac_count 7762dc407927Smrg lt_cv_path_SED=$lt_ac_sed 77633eed67faSmbalmer fi 7764dc407927Smrg done 7765dc407927Smrgdone 7766dc407927Smrg]) 7767dc407927SmrgSED=$lt_cv_path_SED 7768dc407927SmrgAC_SUBST([SED]) 7769dc407927SmrgAC_MSG_RESULT([$SED]) 7770dc407927Smrg])#AC_PROG_SED 7771dc407927Smrg])#m4_ifndef 7772dc407927Smrg 7773dc407927Smrg# Old name: 7774dc407927SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7775dc407927Smrgdnl aclocal-1.4 backwards compatibility: 7776dc407927Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7777dc407927Smrg 7778dc407927Smrg 7779dc407927Smrg# _LT_CHECK_SHELL_FEATURES 7780dc407927Smrg# ------------------------ 7781dc407927Smrg# Find out whether the shell is Bourne or XSI compatible, 7782dc407927Smrg# or has some other useful features. 7783dc407927Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7784dc407927Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7785dc407927Smrg# Try some XSI features 7786dc407927Smrgxsi_shell=no 7787dc407927Smrg( _lt_dummy="a/b/c" 7788dd0822caSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ 7789dd0822caSmrg = c,a/b,b/c, \ 7790dc407927Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7791dc407927Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7792dc407927Smrg && xsi_shell=yes 7793dc407927SmrgAC_MSG_RESULT([$xsi_shell]) 7794dc407927Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7795dc407927Smrg 7796dc407927SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7797dc407927Smrglt_shell_append=no 7798dc407927Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7799dc407927Smrg >/dev/null 2>&1 \ 7800dc407927Smrg && lt_shell_append=yes 7801dc407927SmrgAC_MSG_RESULT([$lt_shell_append]) 7802dc407927Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7803dc407927Smrg 7804dc407927Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7805dc407927Smrg lt_unset=unset 7806dc407927Smrgelse 7807dc407927Smrg lt_unset=false 7808dc407927Smrgfi 7809dc407927Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7810dc407927Smrg 7811dc407927Smrg# test EBCDIC or ASCII 7812dc407927Smrgcase `echo X|tr X '\101'` in 7813dc407927Smrg A) # ASCII based system 7814dc407927Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7815dc407927Smrg lt_SP2NL='tr \040 \012' 7816dc407927Smrg lt_NL2SP='tr \015\012 \040\040' 78173eed67faSmbalmer ;; 7818dc407927Smrg *) # EBCDIC based system 7819dc407927Smrg lt_SP2NL='tr \100 \n' 7820dc407927Smrg lt_NL2SP='tr \r\n \100\100' 78213eed67faSmbalmer ;; 7822dc407927Smrgesac 7823dc407927Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7824dc407927Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7825dc407927Smrg])# _LT_CHECK_SHELL_FEATURES 7826dc407927Smrg 7827dc407927Smrg 7828dd0822caSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) 7829dd0822caSmrg# ------------------------------------------------------ 7830dd0822caSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and 7831dd0822caSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. 7832dd0822caSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE], 7833dd0822caSmrg[dnl { 7834dd0822caSmrgsed -e '/^$1 ()$/,/^} # $1 /c\ 7835dd0822caSmrg$1 ()\ 7836dd0822caSmrg{\ 7837dd0822caSmrgm4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) 7838dd0822caSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ 7839dd0822caSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7840dd0822caSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7841dd0822caSmrgtest 0 -eq $? || _lt_function_replace_fail=: 7842dd0822caSmrg]) 78433eed67faSmbalmer 78443eed67faSmbalmer 7845dd0822caSmrg# _LT_PROG_REPLACE_SHELLFNS 7846dd0822caSmrg# ------------------------- 7847dd0822caSmrg# Replace existing portable implementations of several shell functions with 7848dd0822caSmrg# equivalent extended shell implementations where those features are available.. 7849dd0822caSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS], 7850dd0822caSmrg[if test x"$xsi_shell" = xyes; then 7851dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl 7852dd0822caSmrg case ${1} in 7853dd0822caSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7854dd0822caSmrg * ) func_dirname_result="${3}" ;; 7855dd0822caSmrg esac]) 7856dd0822caSmrg 7857dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl 7858dd0822caSmrg func_basename_result="${1##*/}"]) 7859dd0822caSmrg 7860dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl 7861dd0822caSmrg case ${1} in 7862dd0822caSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7863dd0822caSmrg * ) func_dirname_result="${3}" ;; 7864dd0822caSmrg esac 7865dd0822caSmrg func_basename_result="${1##*/}"]) 78663eed67faSmbalmer 7867dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl 7868dd0822caSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7869dd0822caSmrg # positional parameters, so assign one to ordinary parameter first. 7870dd0822caSmrg func_stripname_result=${3} 7871dd0822caSmrg func_stripname_result=${func_stripname_result#"${1}"} 7872dd0822caSmrg func_stripname_result=${func_stripname_result%"${2}"}]) 78733eed67faSmbalmer 7874dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl 7875dd0822caSmrg func_split_long_opt_name=${1%%=*} 7876dd0822caSmrg func_split_long_opt_arg=${1#*=}]) 7877dc407927Smrg 7878dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl 7879dd0822caSmrg func_split_short_opt_arg=${1#??} 7880dd0822caSmrg func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) 78813eed67faSmbalmer 7882dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl 7883dd0822caSmrg case ${1} in 7884dd0822caSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7885dd0822caSmrg *) func_lo2o_result=${1} ;; 7886dd0822caSmrg esac]) 78873eed67faSmbalmer 7888dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) 78893eed67faSmbalmer 7890dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) 78913eed67faSmbalmer 7892dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) 7893dd0822caSmrgfi 78943eed67faSmbalmer 7895dd0822caSmrgif test x"$lt_shell_append" = xyes; then 7896dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) 78973eed67faSmbalmer 7898dd0822caSmrg _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl 7899dd0822caSmrg func_quote_for_eval "${2}" 7900dd0822caSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ 7901dd0822caSmrg eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) 79023eed67faSmbalmer 7903dd0822caSmrg # Save a `func_append' function call where possible by direct use of '+=' 7904dd0822caSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ 7905dd0822caSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7906dd0822caSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7907dd0822caSmrg test 0 -eq $? || _lt_function_replace_fail=: 7908dd0822caSmrgelse 7909dd0822caSmrg # Save a `func_append' function call even when '+=' is not available 7910dd0822caSmrg sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ 7911dd0822caSmrg && mv -f "$cfgfile.tmp" "$cfgfile" \ 7912dd0822caSmrg || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") 7913dd0822caSmrg test 0 -eq $? || _lt_function_replace_fail=: 7914dd0822caSmrgfi 7915dc407927Smrg 7916dd0822caSmrgif test x"$_lt_function_replace_fail" = x":"; then 7917dd0822caSmrg AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) 7918dd0822caSmrgfi 7919dd0822caSmrg]) 79203eed67faSmbalmer 7921dd0822caSmrg# _LT_PATH_CONVERSION_FUNCTIONS 7922dd0822caSmrg# ----------------------------- 7923dd0822caSmrg# Determine which file name conversion functions should be used by 7924dd0822caSmrg# func_to_host_file (and, implicitly, by func_to_host_path). These are needed 7925dd0822caSmrg# for certain cross-compile configurations and native mingw. 7926dd0822caSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS], 7927dd0822caSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7928dd0822caSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 7929dd0822caSmrgAC_MSG_CHECKING([how to convert $build file names to $host format]) 7930dd0822caSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd, 7931dd0822caSmrg[case $host in 7932dd0822caSmrg *-*-mingw* ) 7933dd0822caSmrg case $build in 7934dd0822caSmrg *-*-mingw* ) # actually msys 7935dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 7936dd0822caSmrg ;; 7937dd0822caSmrg *-*-cygwin* ) 7938dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 7939dd0822caSmrg ;; 7940dd0822caSmrg * ) # otherwise, assume *nix 7941dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 7942dd0822caSmrg ;; 7943dd0822caSmrg esac 7944dc407927Smrg ;; 7945dd0822caSmrg *-*-cygwin* ) 7946dd0822caSmrg case $build in 7947dd0822caSmrg *-*-mingw* ) # actually msys 7948dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin 7949dd0822caSmrg ;; 7950dd0822caSmrg *-*-cygwin* ) 7951dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7952dd0822caSmrg ;; 7953dd0822caSmrg * ) # otherwise, assume *nix 7954dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin 7955dd0822caSmrg ;; 7956dd0822caSmrg esac 7957dc407927Smrg ;; 7958dd0822caSmrg * ) # unhandled hosts (and "normal" native builds) 7959dd0822caSmrg lt_cv_to_host_file_cmd=func_convert_file_noop 7960dd0822caSmrg ;; 7961dd0822caSmrgesac 7962dd0822caSmrg]) 7963dd0822caSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd 7964dd0822caSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd]) 7965dd0822caSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], 7966dd0822caSmrg [0], [convert $build file names to $host format])dnl 7967dd0822caSmrg 7968dd0822caSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format]) 7969dd0822caSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd, 7970dd0822caSmrg[#assume ordinary cross tools, or native build. 7971dd0822caSmrglt_cv_to_tool_file_cmd=func_convert_file_noop 7972dd0822caSmrgcase $host in 7973dd0822caSmrg *-*-mingw* ) 7974dd0822caSmrg case $build in 7975dd0822caSmrg *-*-mingw* ) # actually msys 7976dd0822caSmrg lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 7977dd0822caSmrg ;; 7978dd0822caSmrg esac 7979dd0822caSmrg ;; 7980dd0822caSmrgesac 7981dc407927Smrg]) 7982dd0822caSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd 7983dd0822caSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) 7984dd0822caSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], 7985dd0822caSmrg [0], [convert $build files to toolchain format])dnl 7986dd0822caSmrg])# _LT_PATH_CONVERSION_FUNCTIONS 79873eed67faSmbalmer 7988dc407927Smrg# Helper functions for option handling. -*- Autoconf -*- 7989dc407927Smrg# 7990dd0822caSmrg# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, 7991dd0822caSmrg# Inc. 7992dc407927Smrg# Written by Gary V. Vaughan, 2004 7993dc407927Smrg# 7994dc407927Smrg# This file is free software; the Free Software Foundation gives 7995dc407927Smrg# unlimited permission to copy and/or distribute it, with or without 7996dc407927Smrg# modifications, as long as this notice is preserved. 79973eed67faSmbalmer 7998dd0822caSmrg# serial 7 ltoptions.m4 79993eed67faSmbalmer 8000dc407927Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8001dc407927SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 80023eed67faSmbalmer 80033eed67faSmbalmer 8004dc407927Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 8005dc407927Smrg# ------------------------------------------ 8006dc407927Smrgm4_define([_LT_MANGLE_OPTION], 8007dc407927Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 80083eed67faSmbalmer 80093eed67faSmbalmer 8010dc407927Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 8011dc407927Smrg# --------------------------------------- 8012dc407927Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 8013dc407927Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 8014dc407927Smrg# saved as a flag. 8015dc407927Smrgm4_define([_LT_SET_OPTION], 8016dc407927Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 8017dc407927Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 8018dc407927Smrg _LT_MANGLE_DEFUN([$1], [$2]), 8019dc407927Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 8020dc407927Smrg]) 8021dc407927Smrg 8022dc407927Smrg 8023dc407927Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 8024dc407927Smrg# ------------------------------------------------------------ 8025dc407927Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8026dc407927Smrgm4_define([_LT_IF_OPTION], 8027dc407927Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 8028dc407927Smrg 8029dc407927Smrg 8030dc407927Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 8031dc407927Smrg# ------------------------------------------------------- 8032dc407927Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 8033dc407927Smrg# are set. 8034dc407927Smrgm4_define([_LT_UNLESS_OPTIONS], 8035dc407927Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8036dc407927Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 8037dc407927Smrg [m4_define([$0_found])])])[]dnl 8038dc407927Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 8039dc407927Smrg])[]dnl 8040dc407927Smrg]) 8041dc407927Smrg 8042dc407927Smrg 8043dc407927Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 8044dc407927Smrg# ---------------------------------------- 8045dc407927Smrg# OPTION-LIST is a space-separated list of Libtool options associated 8046dc407927Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 8047dc407927Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 8048dc407927Smrg# the unknown option and exit. 8049dc407927Smrgm4_defun([_LT_SET_OPTIONS], 8050dc407927Smrg[# Set options 8051dc407927Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 8052dc407927Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 8053dc407927Smrg 8054dc407927Smrgm4_if([$1],[LT_INIT],[ 8055dc407927Smrg dnl 8056dc407927Smrg dnl Simply set some default values (i.e off) if boolean options were not 8057dc407927Smrg dnl specified: 8058dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 8059dc407927Smrg ]) 8060dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 8061dc407927Smrg ]) 8062dc407927Smrg dnl 8063dc407927Smrg dnl If no reference was made to various pairs of opposing options, then 8064dc407927Smrg dnl we run the default mode handler for the pair. For example, if neither 8065dc407927Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 8066dc407927Smrg dnl archives by default: 8067dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 8068dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 8069dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 8070dc407927Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 8071dc407927Smrg [_LT_ENABLE_FAST_INSTALL]) 8072dc407927Smrg ]) 8073dc407927Smrg])# _LT_SET_OPTIONS 8074dc407927Smrg 80753eed67faSmbalmer 80763eed67faSmbalmer 8077dc407927Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 8078dc407927Smrg# ----------------------------------------- 8079dc407927Smrgm4_define([_LT_MANGLE_DEFUN], 8080dc407927Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 80813eed67faSmbalmer 80823eed67faSmbalmer 8083dc407927Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 8084dc407927Smrg# ----------------------------------------------- 8085dc407927Smrgm4_define([LT_OPTION_DEFINE], 8086dc407927Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 8087dc407927Smrg])# LT_OPTION_DEFINE 80883eed67faSmbalmer 80893eed67faSmbalmer 8090dc407927Smrg# dlopen 8091dc407927Smrg# ------ 8092dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 8093dc407927Smrg]) 80943eed67faSmbalmer 8095dc407927SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 8096dc407927Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 8097dc407927SmrgAC_DIAGNOSE([obsolete], 8098dc407927Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8099dc407927Smrgput the `dlopen' option into LT_INIT's first parameter.]) 8100dc407927Smrg]) 81013eed67faSmbalmer 8102dc407927Smrgdnl aclocal-1.4 backwards compatibility: 8103dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 81043eed67faSmbalmer 81053eed67faSmbalmer 8106dc407927Smrg# win32-dll 8107dc407927Smrg# --------- 8108dc407927Smrg# Declare package support for building win32 dll's. 8109dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 8110dc407927Smrg[enable_win32_dll=yes 81113eed67faSmbalmer 8112dc407927Smrgcase $host in 8113dd0822caSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) 8114dc407927Smrg AC_CHECK_TOOL(AS, as, false) 8115dc407927Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 8116dc407927Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 8117dc407927Smrg ;; 8118dc407927Smrgesac 81193eed67faSmbalmer 8120dc407927Smrgtest -z "$AS" && AS=as 8121dd0822caSmrg_LT_DECL([], [AS], [1], [Assembler program])dnl 81223eed67faSmbalmer 8123dc407927Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 8124dd0822caSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl 81253eed67faSmbalmer 8126dc407927Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 8127dd0822caSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl 8128dc407927Smrg])# win32-dll 81293eed67faSmbalmer 8130dc407927SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 8131dc407927Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 8132dc407927Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 8133dc407927SmrgAC_DIAGNOSE([obsolete], 8134dc407927Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8135dc407927Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 8136dc407927Smrg]) 81373eed67faSmbalmer 8138dc407927Smrgdnl aclocal-1.4 backwards compatibility: 8139dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 81403eed67faSmbalmer 81413eed67faSmbalmer 8142dc407927Smrg# _LT_ENABLE_SHARED([DEFAULT]) 8143dc407927Smrg# ---------------------------- 8144dc407927Smrg# implement the --enable-shared flag, and supports the `shared' and 8145dc407927Smrg# `disable-shared' LT_INIT options. 8146dc407927Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8147dc407927Smrgm4_define([_LT_ENABLE_SHARED], 8148dc407927Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 8149dc407927SmrgAC_ARG_ENABLE([shared], 8150dc407927Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 8151dc407927Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 8152dc407927Smrg [p=${PACKAGE-default} 8153dc407927Smrg case $enableval in 8154dc407927Smrg yes) enable_shared=yes ;; 8155dc407927Smrg no) enable_shared=no ;; 8156dc407927Smrg *) 8157dc407927Smrg enable_shared=no 8158dc407927Smrg # Look at the argument we got. We use all the common list separators. 8159dc407927Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8160dc407927Smrg for pkg in $enableval; do 8161dc407927Smrg IFS="$lt_save_ifs" 8162dc407927Smrg if test "X$pkg" = "X$p"; then 8163dc407927Smrg enable_shared=yes 8164dc407927Smrg fi 8165dc407927Smrg done 8166dc407927Smrg IFS="$lt_save_ifs" 81673eed67faSmbalmer ;; 8168dc407927Smrg esac], 8169dc407927Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 81703eed67faSmbalmer 8171dc407927Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 8172dc407927Smrg [Whether or not to build shared libraries]) 8173dc407927Smrg])# _LT_ENABLE_SHARED 81743eed67faSmbalmer 8175dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 8176dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 81773eed67faSmbalmer 8178dc407927Smrg# Old names: 8179dc407927SmrgAC_DEFUN([AC_ENABLE_SHARED], 8180dc407927Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 8181dc407927Smrg]) 81823eed67faSmbalmer 8183dc407927SmrgAC_DEFUN([AC_DISABLE_SHARED], 8184dc407927Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 8185dc407927Smrg]) 81863eed67faSmbalmer 8187dc407927SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 8188dc407927SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 81893eed67faSmbalmer 8190dc407927Smrgdnl aclocal-1.4 backwards compatibility: 8191dc407927Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 8192dc407927Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 81933eed67faSmbalmer 81943eed67faSmbalmer 81953eed67faSmbalmer 8196dc407927Smrg# _LT_ENABLE_STATIC([DEFAULT]) 8197dc407927Smrg# ---------------------------- 8198dc407927Smrg# implement the --enable-static flag, and support the `static' and 8199dc407927Smrg# `disable-static' LT_INIT options. 8200dc407927Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8201dc407927Smrgm4_define([_LT_ENABLE_STATIC], 8202dc407927Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 8203dc407927SmrgAC_ARG_ENABLE([static], 8204dc407927Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 8205dc407927Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 8206dc407927Smrg [p=${PACKAGE-default} 8207dc407927Smrg case $enableval in 8208dc407927Smrg yes) enable_static=yes ;; 8209dc407927Smrg no) enable_static=no ;; 8210dc407927Smrg *) 8211dc407927Smrg enable_static=no 8212dc407927Smrg # Look at the argument we got. We use all the common list separators. 8213dc407927Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8214dc407927Smrg for pkg in $enableval; do 8215dc407927Smrg IFS="$lt_save_ifs" 8216dc407927Smrg if test "X$pkg" = "X$p"; then 8217dc407927Smrg enable_static=yes 82183eed67faSmbalmer fi 8219dc407927Smrg done 8220dc407927Smrg IFS="$lt_save_ifs" 82213eed67faSmbalmer ;; 8222dc407927Smrg esac], 8223dc407927Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 82243eed67faSmbalmer 8225dc407927Smrg _LT_DECL([build_old_libs], [enable_static], [0], 8226dc407927Smrg [Whether or not to build static libraries]) 8227dc407927Smrg])# _LT_ENABLE_STATIC 82283eed67faSmbalmer 8229dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 8230dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 8231dc407927Smrg 8232dc407927Smrg# Old names: 8233dc407927SmrgAC_DEFUN([AC_ENABLE_STATIC], 8234dc407927Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 8235dc407927Smrg]) 8236dc407927Smrg 8237dc407927SmrgAC_DEFUN([AC_DISABLE_STATIC], 8238dc407927Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 8239dc407927Smrg]) 8240dc407927Smrg 8241dc407927SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 8242dc407927SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 8243dc407927Smrg 8244dc407927Smrgdnl aclocal-1.4 backwards compatibility: 8245dc407927Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 8246dc407927Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 8247dc407927Smrg 8248dc407927Smrg 8249dc407927Smrg 8250dc407927Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 8251dc407927Smrg# ---------------------------------- 8252dc407927Smrg# implement the --enable-fast-install flag, and support the `fast-install' 8253dc407927Smrg# and `disable-fast-install' LT_INIT options. 8254dc407927Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 8255dc407927Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 8256dc407927Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 8257dc407927SmrgAC_ARG_ENABLE([fast-install], 8258dc407927Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 8259dc407927Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 8260dc407927Smrg [p=${PACKAGE-default} 8261dc407927Smrg case $enableval in 8262dc407927Smrg yes) enable_fast_install=yes ;; 8263dc407927Smrg no) enable_fast_install=no ;; 8264dc407927Smrg *) 8265dc407927Smrg enable_fast_install=no 8266dc407927Smrg # Look at the argument we got. We use all the common list separators. 8267dc407927Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 8268dc407927Smrg for pkg in $enableval; do 8269dc407927Smrg IFS="$lt_save_ifs" 8270dc407927Smrg if test "X$pkg" = "X$p"; then 8271dc407927Smrg enable_fast_install=yes 8272dc407927Smrg fi 8273dc407927Smrg done 8274dc407927Smrg IFS="$lt_save_ifs" 82753eed67faSmbalmer ;; 8276dc407927Smrg esac], 8277dc407927Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 82783eed67faSmbalmer 8279dc407927Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 8280dc407927Smrg [Whether or not to optimize for fast installation])dnl 8281dc407927Smrg])# _LT_ENABLE_FAST_INSTALL 82823eed67faSmbalmer 8283dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 8284dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 82853eed67faSmbalmer 8286dc407927Smrg# Old names: 8287dc407927SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 8288dc407927Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 8289dc407927SmrgAC_DIAGNOSE([obsolete], 8290dc407927Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8291dc407927Smrgthe `fast-install' option into LT_INIT's first parameter.]) 8292dc407927Smrg]) 82933eed67faSmbalmer 8294dc407927SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 8295dc407927Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 8296dc407927SmrgAC_DIAGNOSE([obsolete], 8297dc407927Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 8298dc407927Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 8299dc407927Smrg]) 83003eed67faSmbalmer 8301dc407927Smrgdnl aclocal-1.4 backwards compatibility: 8302dc407927Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 8303dc407927Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 83043eed67faSmbalmer 83053eed67faSmbalmer 8306dc407927Smrg# _LT_WITH_PIC([MODE]) 8307dc407927Smrg# -------------------- 8308dc407927Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 8309dc407927Smrg# LT_INIT options. 8310dc407927Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 8311dc407927Smrgm4_define([_LT_WITH_PIC], 8312dc407927Smrg[AC_ARG_WITH([pic], 831375cbef56Smrg [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], 8314dc407927Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 831575cbef56Smrg [lt_p=${PACKAGE-default} 831675cbef56Smrg case $withval in 831775cbef56Smrg yes|no) pic_mode=$withval ;; 831875cbef56Smrg *) 831975cbef56Smrg pic_mode=default 832075cbef56Smrg # Look at the argument we got. We use all the common list separators. 832175cbef56Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 832275cbef56Smrg for lt_pkg in $withval; do 832375cbef56Smrg IFS="$lt_save_ifs" 832475cbef56Smrg if test "X$lt_pkg" = "X$lt_p"; then 832575cbef56Smrg pic_mode=yes 832675cbef56Smrg fi 832775cbef56Smrg done 832875cbef56Smrg IFS="$lt_save_ifs" 832975cbef56Smrg ;; 833075cbef56Smrg esac], 8331dc407927Smrg [pic_mode=default]) 83323eed67faSmbalmer 8333dc407927Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 8334dc407927Smrg 8335dc407927Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 8336dc407927Smrg])# _LT_WITH_PIC 8337dc407927Smrg 8338dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 8339dc407927SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 8340dc407927Smrg 8341dc407927Smrg# Old name: 8342dc407927SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 8343dc407927Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 8344dc407927SmrgAC_DIAGNOSE([obsolete], 8345dc407927Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 8346dc407927Smrgput the `pic-only' option into LT_INIT's first parameter.]) 83473eed67faSmbalmer]) 83483eed67faSmbalmer 8349dc407927Smrgdnl aclocal-1.4 backwards compatibility: 8350dc407927Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 8351dc407927Smrg 8352dc407927Smrg 8353dc407927Smrgm4_define([_LTDL_MODE], []) 8354dc407927SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 8355dc407927Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 8356dc407927SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 8357dc407927Smrg [m4_define([_LTDL_MODE], [recursive])]) 8358dc407927SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 8359dc407927Smrg [m4_define([_LTDL_MODE], [subproject])]) 8360dc407927Smrg 8361dc407927Smrgm4_define([_LTDL_TYPE], []) 8362dc407927SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 8363dc407927Smrg [m4_define([_LTDL_TYPE], [installable])]) 8364dc407927SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 8365dc407927Smrg [m4_define([_LTDL_TYPE], [convenience])]) 8366dc407927Smrg 8367dc407927Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 83683eed67faSmbalmer# 8369dc407927Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 8370dc407927Smrg# Written by Gary V. Vaughan, 2004 83713eed67faSmbalmer# 8372dc407927Smrg# This file is free software; the Free Software Foundation gives 8373dc407927Smrg# unlimited permission to copy and/or distribute it, with or without 8374dc407927Smrg# modifications, as long as this notice is preserved. 83753eed67faSmbalmer 8376dc407927Smrg# serial 6 ltsugar.m4 83773eed67faSmbalmer 8378dc407927Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8379dc407927SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 83803eed67faSmbalmer 83813eed67faSmbalmer 8382dc407927Smrg# lt_join(SEP, ARG1, [ARG2...]) 8383dc407927Smrg# ----------------------------- 8384dc407927Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 8385dc407927Smrg# associated separator. 8386dc407927Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 8387dc407927Smrg# versions in m4sugar had bugs. 8388dc407927Smrgm4_define([lt_join], 8389dc407927Smrg[m4_if([$#], [1], [], 8390dc407927Smrg [$#], [2], [[$2]], 8391dc407927Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 8392dc407927Smrgm4_define([_lt_join], 8393dc407927Smrg[m4_if([$#$2], [2], [], 8394dc407927Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 8395dc407927Smrg 8396dc407927Smrg 8397dc407927Smrg# lt_car(LIST) 8398dc407927Smrg# lt_cdr(LIST) 8399dc407927Smrg# ------------ 8400dc407927Smrg# Manipulate m4 lists. 8401dc407927Smrg# These macros are necessary as long as will still need to support 8402dc407927Smrg# Autoconf-2.59 which quotes differently. 8403dc407927Smrgm4_define([lt_car], [[$1]]) 8404dc407927Smrgm4_define([lt_cdr], 8405dc407927Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 8406dc407927Smrg [$#], 1, [], 8407dc407927Smrg [m4_dquote(m4_shift($@))])]) 8408dc407927Smrgm4_define([lt_unquote], $1) 8409dc407927Smrg 8410dc407927Smrg 8411dc407927Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 8412dc407927Smrg# ------------------------------------------ 8413dc407927Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 8414dc407927Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 8415dc407927Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 8416dc407927Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 8417dc407927Smrg# than defined and empty). 8418dc407927Smrg# 8419dc407927Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 8420dc407927Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 8421dc407927Smrgm4_define([lt_append], 8422dc407927Smrg[m4_define([$1], 8423dc407927Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 8424dc407927Smrg 8425dc407927Smrg 8426dc407927Smrg 8427dc407927Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 8428dc407927Smrg# ---------------------------------------------------------- 8429dc407927Smrg# Produce a SEP delimited list of all paired combinations of elements of 8430dc407927Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 8431dc407927Smrg# has the form PREFIXmINFIXSUFFIXn. 8432dc407927Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 8433dc407927Smrgm4_define([lt_combine], 8434dc407927Smrg[m4_if(m4_eval([$# > 3]), [1], 8435dc407927Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 8436dc407927Smrg[[m4_foreach([_Lt_prefix], [$2], 8437dc407927Smrg [m4_foreach([_Lt_suffix], 8438dc407927Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 8439dc407927Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 8440dc407927Smrg 8441dc407927Smrg 8442dc407927Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 8443dc407927Smrg# ----------------------------------------------------------------------- 8444dc407927Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 8445dc407927Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 8446dc407927Smrgm4_define([lt_if_append_uniq], 8447dc407927Smrg[m4_ifdef([$1], 8448dc407927Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 8449dc407927Smrg [lt_append([$1], [$2], [$3])$4], 8450dc407927Smrg [$5])], 8451dc407927Smrg [lt_append([$1], [$2], [$3])$4])]) 8452dc407927Smrg 8453dc407927Smrg 8454dc407927Smrg# lt_dict_add(DICT, KEY, VALUE) 8455dc407927Smrg# ----------------------------- 8456dc407927Smrgm4_define([lt_dict_add], 8457dc407927Smrg[m4_define([$1($2)], [$3])]) 84583eed67faSmbalmer 84593eed67faSmbalmer 8460dc407927Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 8461dc407927Smrg# -------------------------------------------- 8462dc407927Smrgm4_define([lt_dict_add_subkey], 8463dc407927Smrg[m4_define([$1($2:$3)], [$4])]) 84643eed67faSmbalmer 84653eed67faSmbalmer 8466dc407927Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 8467dc407927Smrg# ---------------------------------- 8468dc407927Smrgm4_define([lt_dict_fetch], 8469dc407927Smrg[m4_ifval([$3], 8470dc407927Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 8471dc407927Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 8472dc407927Smrg 8473dc407927Smrg 8474dc407927Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 8475dc407927Smrg# ----------------------------------------------------------------- 8476dc407927Smrgm4_define([lt_if_dict_fetch], 8477dc407927Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 8478dc407927Smrg [$5], 8479dc407927Smrg [$6])]) 84803eed67faSmbalmer 8481dc407927Smrg 8482dc407927Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 8483dc407927Smrg# -------------------------------------------------------------- 8484dc407927Smrgm4_define([lt_dict_filter], 8485dc407927Smrg[m4_if([$5], [], [], 8486dc407927Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 8487dc407927Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 8488dc407927Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 84893eed67faSmbalmer]) 84903eed67faSmbalmer 8491dc407927Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 8492dc407927Smrg# 8493dc407927Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 8494dc407927Smrg# Written by Scott James Remnant, 2004 8495dc407927Smrg# 8496dc407927Smrg# This file is free software; the Free Software Foundation gives 8497dc407927Smrg# unlimited permission to copy and/or distribute it, with or without 8498dc407927Smrg# modifications, as long as this notice is preserved. 84993eed67faSmbalmer 8500dd0822caSmrg# @configure_input@ 85013eed67faSmbalmer 850275cbef56Smrg# serial 3337 ltversion.m4 8503dc407927Smrg# This file is part of GNU Libtool 85043eed67faSmbalmer 850575cbef56Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2]) 850675cbef56Smrgm4_define([LT_PACKAGE_REVISION], [1.3337]) 85073eed67faSmbalmer 8508dc407927SmrgAC_DEFUN([LTVERSION_VERSION], 850975cbef56Smrg[macro_version='2.4.2' 851075cbef56Smrgmacro_revision='1.3337' 8511dc407927Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 8512dc407927Smrg_LT_DECL(, macro_revision, 0) 85133eed67faSmbalmer]) 85143eed67faSmbalmer 8515dc407927Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 8516dc407927Smrg# 8517dd0822caSmrg# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. 8518dc407927Smrg# Written by Scott James Remnant, 2004. 8519dc407927Smrg# 8520dc407927Smrg# This file is free software; the Free Software Foundation gives 8521dc407927Smrg# unlimited permission to copy and/or distribute it, with or without 8522dc407927Smrg# modifications, as long as this notice is preserved. 8523dc407927Smrg 8524dd0822caSmrg# serial 5 lt~obsolete.m4 8525dc407927Smrg 8526dc407927Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 8527dc407927Smrg# 8528dc407927Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 8529dc407927Smrg# which have later been changed to m4_define as they aren't part of the 8530dc407927Smrg# exported API, or moved to Autoconf or Automake where they belong. 8531dc407927Smrg# 8532dc407927Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 8533dc407927Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 8534dc407927Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 8535dc407927Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 8536dc407927Smrg# and doesn't know about Autoconf macros at all.) 8537dc407927Smrg# 8538dc407927Smrg# So we provide this file, which has a silly filename so it's always 8539dc407927Smrg# included after everything else. This provides aclocal with the 8540dc407927Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 8541dc407927Smrg# because those macros already exist, or will be overwritten later. 8542dc407927Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 8543dc407927Smrg# 8544dc407927Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 8545dc407927Smrg# Yes, that means every name once taken will need to remain here until 8546dc407927Smrg# we give up compatibility with versions before 1.7, at which point 8547dc407927Smrg# we need to keep only those names which we still refer to. 8548dc407927Smrg 8549dc407927Smrg# This is to help aclocal find these macros, as it can't see m4_define. 8550dc407927SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 8551dc407927Smrg 8552dc407927Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 8553dc407927Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 8554dc407927Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 8555dc407927Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 8556dc407927Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 8557dc407927Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 8558dc407927Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 8559dc407927Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 8560dc407927Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 8561dc407927Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 8562dc407927Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 8563dc407927Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 8564dc407927Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 8565dc407927Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 8566dc407927Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 8567dc407927Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 8568dc407927Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 8569dc407927Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 8570dc407927Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 8571dc407927Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 8572dc407927Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 8573dc407927Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 8574dc407927Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 8575dc407927Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 8576dc407927Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 8577dc407927Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 8578dc407927Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 8579dc407927Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 8580dc407927Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 8581dc407927Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 8582dc407927Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 8583dc407927Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 8584dc407927Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 8585dc407927Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 8586dc407927Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 8587dc407927Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 8588dc407927Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 8589dc407927Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 8590dc407927Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 8591dc407927Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 8592dc407927Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 8593dc407927Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 8594dc407927Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 8595dc407927Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 8596dc407927Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 8597dc407927Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 8598dc407927Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 8599dc407927Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 8600dc407927Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 8601dc407927Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 8602dc407927Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 8603dc407927Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 8604dc407927Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 8605dc407927Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 8606dd0822caSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) 8607dd0822caSmrgm4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) 8608dd0822caSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) 8609dd0822caSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) 8610dd0822caSmrgm4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) 8611dd0822caSmrgm4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) 8612dd0822caSmrgm4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) 8613dc407927Smrg 86143eed67faSmbalmer# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 8615dd0822caSmrg# serial 1 (pkg-config-0.24) 86163eed67faSmbalmer# 86173eed67faSmbalmer# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 86183eed67faSmbalmer# 86193eed67faSmbalmer# This program is free software; you can redistribute it and/or modify 86203eed67faSmbalmer# it under the terms of the GNU General Public License as published by 86213eed67faSmbalmer# the Free Software Foundation; either version 2 of the License, or 86223eed67faSmbalmer# (at your option) any later version. 86233eed67faSmbalmer# 86243eed67faSmbalmer# This program is distributed in the hope that it will be useful, but 86253eed67faSmbalmer# WITHOUT ANY WARRANTY; without even the implied warranty of 86263eed67faSmbalmer# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 86273eed67faSmbalmer# General Public License for more details. 86283eed67faSmbalmer# 86293eed67faSmbalmer# You should have received a copy of the GNU General Public License 86303eed67faSmbalmer# along with this program; if not, write to the Free Software 86313eed67faSmbalmer# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 86323eed67faSmbalmer# 86333eed67faSmbalmer# As a special exception to the GNU General Public License, if you 86343eed67faSmbalmer# distribute this file as part of a program that contains a 86353eed67faSmbalmer# configuration script generated by Autoconf, you may include it under 86363eed67faSmbalmer# the same distribution terms that you use for the rest of that program. 86373eed67faSmbalmer 86383eed67faSmbalmer# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 86393eed67faSmbalmer# ---------------------------------- 86403eed67faSmbalmerAC_DEFUN([PKG_PROG_PKG_CONFIG], 86413eed67faSmbalmer[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 86423eed67faSmbalmerm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 8643dd0822caSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) 8644dd0822caSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) 8645dd0822caSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) 8646dd0822caSmrg 86473eed67faSmbalmerif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 86483eed67faSmbalmer AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 86493eed67faSmbalmerfi 86503eed67faSmbalmerif test -n "$PKG_CONFIG"; then 86513eed67faSmbalmer _pkg_min_version=m4_default([$1], [0.9.0]) 86523eed67faSmbalmer AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 86533eed67faSmbalmer if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 86543eed67faSmbalmer AC_MSG_RESULT([yes]) 86553eed67faSmbalmer else 86563eed67faSmbalmer AC_MSG_RESULT([no]) 86573eed67faSmbalmer PKG_CONFIG="" 86583eed67faSmbalmer fi 86593eed67faSmbalmerfi[]dnl 86603eed67faSmbalmer])# PKG_PROG_PKG_CONFIG 86613eed67faSmbalmer 86623eed67faSmbalmer# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 86633eed67faSmbalmer# 86643eed67faSmbalmer# Check to see whether a particular set of modules exists. Similar 86653eed67faSmbalmer# to PKG_CHECK_MODULES(), but does not set variables or print errors. 86663eed67faSmbalmer# 8667dd0822caSmrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8668dd0822caSmrg# only at the first occurence in configure.ac, so if the first place 8669dd0822caSmrg# it's called might be skipped (such as if it is within an "if", you 8670dd0822caSmrg# have to call PKG_CHECK_EXISTS manually 86713eed67faSmbalmer# -------------------------------------------------------------- 86723eed67faSmbalmerAC_DEFUN([PKG_CHECK_EXISTS], 86733eed67faSmbalmer[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 86743eed67faSmbalmerif test -n "$PKG_CONFIG" && \ 86753eed67faSmbalmer AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8676dd0822caSmrg m4_default([$2], [:]) 86773eed67faSmbalmerm4_ifvaln([$3], [else 86783eed67faSmbalmer $3])dnl 86793eed67faSmbalmerfi]) 86803eed67faSmbalmer 86813eed67faSmbalmer# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 86823eed67faSmbalmer# --------------------------------------------- 86833eed67faSmbalmerm4_define([_PKG_CONFIG], 8684dc407927Smrg[if test -n "$$1"; then 8685dc407927Smrg pkg_cv_[]$1="$$1" 8686dc407927Smrg elif test -n "$PKG_CONFIG"; then 8687dc407927Smrg PKG_CHECK_EXISTS([$3], 8688dc407927Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8689dc407927Smrg [pkg_failed=yes]) 8690dc407927Smrg else 8691dc407927Smrg pkg_failed=untried 86923eed67faSmbalmerfi[]dnl 86933eed67faSmbalmer])# _PKG_CONFIG 86943eed67faSmbalmer 86953eed67faSmbalmer# _PKG_SHORT_ERRORS_SUPPORTED 86963eed67faSmbalmer# ----------------------------- 86973eed67faSmbalmerAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 86983eed67faSmbalmer[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 86993eed67faSmbalmerif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 87003eed67faSmbalmer _pkg_short_errors_supported=yes 87013eed67faSmbalmerelse 87023eed67faSmbalmer _pkg_short_errors_supported=no 87033eed67faSmbalmerfi[]dnl 87043eed67faSmbalmer])# _PKG_SHORT_ERRORS_SUPPORTED 87053eed67faSmbalmer 87063eed67faSmbalmer 87073eed67faSmbalmer# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 87083eed67faSmbalmer# [ACTION-IF-NOT-FOUND]) 87093eed67faSmbalmer# 87103eed67faSmbalmer# 87113eed67faSmbalmer# Note that if there is a possibility the first call to 87123eed67faSmbalmer# PKG_CHECK_MODULES might not happen, you should be sure to include an 87133eed67faSmbalmer# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 87143eed67faSmbalmer# 87153eed67faSmbalmer# 87163eed67faSmbalmer# -------------------------------------------------------------- 87173eed67faSmbalmerAC_DEFUN([PKG_CHECK_MODULES], 87183eed67faSmbalmer[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 87193eed67faSmbalmerAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 87203eed67faSmbalmerAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 87213eed67faSmbalmer 87223eed67faSmbalmerpkg_failed=no 87233eed67faSmbalmerAC_MSG_CHECKING([for $1]) 87243eed67faSmbalmer 87253eed67faSmbalmer_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 87263eed67faSmbalmer_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 87273eed67faSmbalmer 87283eed67faSmbalmerm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 87293eed67faSmbalmerand $1[]_LIBS to avoid the need to call pkg-config. 87303eed67faSmbalmerSee the pkg-config man page for more details.]) 87313eed67faSmbalmer 87323eed67faSmbalmerif test $pkg_failed = yes; then 8733dd0822caSmrg AC_MSG_RESULT([no]) 87343eed67faSmbalmer _PKG_SHORT_ERRORS_SUPPORTED 87353eed67faSmbalmer if test $_pkg_short_errors_supported = yes; then 8736dc407927Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 87373eed67faSmbalmer else 8738dc407927Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 87393eed67faSmbalmer fi 87403eed67faSmbalmer # Put the nasty error message in config.log where it belongs 87413eed67faSmbalmer echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 87423eed67faSmbalmer 8743dd0822caSmrg m4_default([$4], [AC_MSG_ERROR( 87443eed67faSmbalmer[Package requirements ($2) were not met: 87453eed67faSmbalmer 87463eed67faSmbalmer$$1_PKG_ERRORS 87473eed67faSmbalmer 87483eed67faSmbalmerConsider adjusting the PKG_CONFIG_PATH environment variable if you 87493eed67faSmbalmerinstalled software in a non-standard prefix. 87503eed67faSmbalmer 8751dd0822caSmrg_PKG_TEXT]) 8752dd0822caSmrg ]) 87533eed67faSmbalmerelif test $pkg_failed = untried; then 8754dd0822caSmrg AC_MSG_RESULT([no]) 8755dd0822caSmrg m4_default([$4], [AC_MSG_FAILURE( 87563eed67faSmbalmer[The pkg-config script could not be found or is too old. Make sure it 87573eed67faSmbalmeris in your PATH or set the PKG_CONFIG environment variable to the full 87583eed67faSmbalmerpath to pkg-config. 87593eed67faSmbalmer 87603eed67faSmbalmer_PKG_TEXT 87613eed67faSmbalmer 8762dd0822caSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.]) 8763dd0822caSmrg ]) 87643eed67faSmbalmerelse 87653eed67faSmbalmer $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 87663eed67faSmbalmer $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 87673eed67faSmbalmer AC_MSG_RESULT([yes]) 8768dd0822caSmrg $3 87693eed67faSmbalmerfi[]dnl 87703eed67faSmbalmer])# PKG_CHECK_MODULES 87713eed67faSmbalmer 877275cbef56Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software 877375cbef56Smrg# Foundation, Inc. 87743eed67faSmbalmer# 87753eed67faSmbalmer# This file is free software; the Free Software Foundation 87763eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 87773eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 87783eed67faSmbalmer 877975cbef56Smrg# serial 1 878075cbef56Smrg 87813eed67faSmbalmer# AM_AUTOMAKE_VERSION(VERSION) 87823eed67faSmbalmer# ---------------------------- 87833eed67faSmbalmer# Automake X.Y traces this macro to ensure aclocal.m4 has been 87843eed67faSmbalmer# generated from the m4 files accompanying Automake X.Y. 8785dc407927Smrg# (This private macro should not be called outside this file.) 8786dc407927SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 8787dc407927Smrg[am__api_version='1.11' 8788dc407927Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8789dc407927Smrgdnl require some minimum version. Point them to the right macro. 879075cbef56Smrgm4_if([$1], [1.11.3], [], 8791dc407927Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8792dc407927Smrg]) 8793dc407927Smrg 8794dc407927Smrg# _AM_AUTOCONF_VERSION(VERSION) 8795dc407927Smrg# ----------------------------- 8796dc407927Smrg# aclocal traces this macro to find the Autoconf version. 8797dc407927Smrg# This is a private macro too. Using m4_define simplifies 8798dc407927Smrg# the logic in aclocal, which can simply ignore this definition. 8799dc407927Smrgm4_define([_AM_AUTOCONF_VERSION], []) 88003eed67faSmbalmer 88013eed67faSmbalmer# AM_SET_CURRENT_AUTOMAKE_VERSION 88023eed67faSmbalmer# ------------------------------- 8803dc407927Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8804dc407927Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 88053eed67faSmbalmerAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 880675cbef56Smrg[AM_AUTOMAKE_VERSION([1.11.3])dnl 8807dc407927Smrgm4_ifndef([AC_AUTOCONF_VERSION], 8808dc407927Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8809dc407927Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 88103eed67faSmbalmer 88113eed67faSmbalmer# AM_AUX_DIR_EXPAND -*- Autoconf -*- 88123eed67faSmbalmer 881375cbef56Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 88143eed67faSmbalmer# 88153eed67faSmbalmer# This file is free software; the Free Software Foundation 88163eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 88173eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 88183eed67faSmbalmer 881975cbef56Smrg# serial 1 882075cbef56Smrg 88213eed67faSmbalmer# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 88223eed67faSmbalmer# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 88233eed67faSmbalmer# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 88243eed67faSmbalmer# 88253eed67faSmbalmer# Of course, Automake must honor this variable whenever it calls a 88263eed67faSmbalmer# tool from the auxiliary directory. The problem is that $srcdir (and 88273eed67faSmbalmer# therefore $ac_aux_dir as well) can be either absolute or relative, 88283eed67faSmbalmer# depending on how configure is run. This is pretty annoying, since 88293eed67faSmbalmer# it makes $ac_aux_dir quite unusable in subdirectories: in the top 88303eed67faSmbalmer# source directory, any form will work fine, but in subdirectories a 88313eed67faSmbalmer# relative path needs to be adjusted first. 88323eed67faSmbalmer# 88333eed67faSmbalmer# $ac_aux_dir/missing 88343eed67faSmbalmer# fails when called from a subdirectory if $ac_aux_dir is relative 88353eed67faSmbalmer# $top_srcdir/$ac_aux_dir/missing 88363eed67faSmbalmer# fails if $ac_aux_dir is absolute, 88373eed67faSmbalmer# fails when called from a subdirectory in a VPATH build with 88383eed67faSmbalmer# a relative $ac_aux_dir 88393eed67faSmbalmer# 88403eed67faSmbalmer# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 88413eed67faSmbalmer# are both prefixed by $srcdir. In an in-source build this is usually 88423eed67faSmbalmer# harmless because $srcdir is `.', but things will broke when you 88433eed67faSmbalmer# start a VPATH build or use an absolute $srcdir. 88443eed67faSmbalmer# 88453eed67faSmbalmer# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 88463eed67faSmbalmer# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 88473eed67faSmbalmer# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 88483eed67faSmbalmer# and then we would define $MISSING as 88493eed67faSmbalmer# MISSING="\${SHELL} $am_aux_dir/missing" 88503eed67faSmbalmer# This will work as long as MISSING is not called from configure, because 88513eed67faSmbalmer# unfortunately $(top_srcdir) has no meaning in configure. 88523eed67faSmbalmer# However there are other variables, like CC, which are often used in 88533eed67faSmbalmer# configure, and could therefore not use this "fixed" $ac_aux_dir. 88543eed67faSmbalmer# 88553eed67faSmbalmer# Another solution, used here, is to always expand $ac_aux_dir to an 88563eed67faSmbalmer# absolute PATH. The drawback is that using absolute paths prevent a 88573eed67faSmbalmer# configured tree to be moved without reconfiguration. 88583eed67faSmbalmer 88593eed67faSmbalmerAC_DEFUN([AM_AUX_DIR_EXPAND], 88603eed67faSmbalmer[dnl Rely on autoconf to set up CDPATH properly. 88613eed67faSmbalmerAC_PREREQ([2.50])dnl 88623eed67faSmbalmer# expand $ac_aux_dir to an absolute path 88633eed67faSmbalmeram_aux_dir=`cd $ac_aux_dir && pwd` 88643eed67faSmbalmer]) 88653eed67faSmbalmer 88663eed67faSmbalmer# AM_CONDITIONAL -*- Autoconf -*- 88673eed67faSmbalmer 8868dc407927Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 88693eed67faSmbalmer# Free Software Foundation, Inc. 88703eed67faSmbalmer# 88713eed67faSmbalmer# This file is free software; the Free Software Foundation 88723eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 88733eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 88743eed67faSmbalmer 8875dc407927Smrg# serial 9 88763eed67faSmbalmer 88773eed67faSmbalmer# AM_CONDITIONAL(NAME, SHELL-CONDITION) 88783eed67faSmbalmer# ------------------------------------- 88793eed67faSmbalmer# Define a conditional. 88803eed67faSmbalmerAC_DEFUN([AM_CONDITIONAL], 88813eed67faSmbalmer[AC_PREREQ(2.52)dnl 88823eed67faSmbalmer ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 88833eed67faSmbalmer [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8884dc407927SmrgAC_SUBST([$1_TRUE])dnl 8885dc407927SmrgAC_SUBST([$1_FALSE])dnl 8886dc407927Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8887dc407927Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8888dc407927Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 88893eed67faSmbalmerif $2; then 88903eed67faSmbalmer $1_TRUE= 88913eed67faSmbalmer $1_FALSE='#' 88923eed67faSmbalmerelse 88933eed67faSmbalmer $1_TRUE='#' 88943eed67faSmbalmer $1_FALSE= 88953eed67faSmbalmerfi 88963eed67faSmbalmerAC_CONFIG_COMMANDS_PRE( 88973eed67faSmbalmer[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 88983eed67faSmbalmer AC_MSG_ERROR([[conditional "$1" was never defined. 88993eed67faSmbalmerUsually this means the macro was only invoked conditionally.]]) 89003eed67faSmbalmerfi])]) 89013eed67faSmbalmer 890275cbef56Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, 890375cbef56Smrg# 2010, 2011 Free Software Foundation, Inc. 89043eed67faSmbalmer# 89053eed67faSmbalmer# This file is free software; the Free Software Foundation 89063eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 89073eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 89083eed67faSmbalmer 890975cbef56Smrg# serial 12 89103eed67faSmbalmer 89113eed67faSmbalmer# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 89123eed67faSmbalmer# written in clear, in which case automake, when reading aclocal.m4, 89133eed67faSmbalmer# will think it sees a *use*, and therefore will trigger all it's 89143eed67faSmbalmer# C support machinery. Also note that it means that autoscan, seeing 89153eed67faSmbalmer# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 89163eed67faSmbalmer 89173eed67faSmbalmer 89183eed67faSmbalmer# _AM_DEPENDENCIES(NAME) 89193eed67faSmbalmer# ---------------------- 89203eed67faSmbalmer# See how the compiler implements dependency checking. 89213eed67faSmbalmer# NAME is "CC", "CXX", "GCJ", or "OBJC". 89223eed67faSmbalmer# We try a few techniques and use that to set a single cache variable. 89233eed67faSmbalmer# 89243eed67faSmbalmer# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 89253eed67faSmbalmer# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 89263eed67faSmbalmer# dependency, and given that the user is not expected to run this macro, 89273eed67faSmbalmer# just rely on AC_PROG_CC. 89283eed67faSmbalmerAC_DEFUN([_AM_DEPENDENCIES], 89293eed67faSmbalmer[AC_REQUIRE([AM_SET_DEPDIR])dnl 89303eed67faSmbalmerAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 89313eed67faSmbalmerAC_REQUIRE([AM_MAKE_INCLUDE])dnl 89323eed67faSmbalmerAC_REQUIRE([AM_DEP_TRACK])dnl 89333eed67faSmbalmer 89343eed67faSmbalmerifelse([$1], CC, [depcc="$CC" am_compiler_list=], 89353eed67faSmbalmer [$1], CXX, [depcc="$CXX" am_compiler_list=], 89363eed67faSmbalmer [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8937dc407927Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 89383eed67faSmbalmer [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 89393eed67faSmbalmer [depcc="$$1" am_compiler_list=]) 89403eed67faSmbalmer 89413eed67faSmbalmerAC_CACHE_CHECK([dependency style of $depcc], 89423eed67faSmbalmer [am_cv_$1_dependencies_compiler_type], 89433eed67faSmbalmer[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 89443eed67faSmbalmer # We make a subdir and do the tests there. Otherwise we can end up 89453eed67faSmbalmer # making bogus files that we don't know about and never remove. For 89463eed67faSmbalmer # instance it was reported that on HP-UX the gcc test will end up 89473eed67faSmbalmer # making a dummy file named `D' -- because `-MD' means `put the output 89483eed67faSmbalmer # in D'. 894975cbef56Smrg rm -rf conftest.dir 89503eed67faSmbalmer mkdir conftest.dir 89513eed67faSmbalmer # Copy depcomp to subdir because otherwise we won't find it if we're 89523eed67faSmbalmer # using a relative directory. 89533eed67faSmbalmer cp "$am_depcomp" conftest.dir 89543eed67faSmbalmer cd conftest.dir 89553eed67faSmbalmer # We will build objects and dependencies in a subdirectory because 89563eed67faSmbalmer # it helps to detect inapplicable dependency modes. For instance 89573eed67faSmbalmer # both Tru64's cc and ICC support -MD to output dependencies as a 89583eed67faSmbalmer # side effect of compilation, but ICC will put the dependencies in 89593eed67faSmbalmer # the current directory while Tru64 will put them in the object 89603eed67faSmbalmer # directory. 89613eed67faSmbalmer mkdir sub 89623eed67faSmbalmer 89633eed67faSmbalmer am_cv_$1_dependencies_compiler_type=none 89643eed67faSmbalmer if test "$am_compiler_list" = ""; then 89653eed67faSmbalmer am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 89663eed67faSmbalmer fi 8967dc407927Smrg am__universal=false 8968dc407927Smrg m4_case([$1], [CC], 8969dc407927Smrg [case " $depcc " in #( 8970dc407927Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8971dc407927Smrg esac], 8972dc407927Smrg [CXX], 8973dc407927Smrg [case " $depcc " in #( 8974dc407927Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8975dc407927Smrg esac]) 8976dc407927Smrg 89773eed67faSmbalmer for depmode in $am_compiler_list; do 89783eed67faSmbalmer # Setup a source with many dependencies, because some compilers 89793eed67faSmbalmer # like to wrap large dependency lists on column 80 (with \), and 89803eed67faSmbalmer # we should not choose a depcomp mode which is confused by this. 89813eed67faSmbalmer # 89823eed67faSmbalmer # We need to recreate these files for each test, as the compiler may 89833eed67faSmbalmer # overwrite some of them when testing with obscure command lines. 89843eed67faSmbalmer # This happens at least with the AIX C compiler. 89853eed67faSmbalmer : > sub/conftest.c 89863eed67faSmbalmer for i in 1 2 3 4 5 6; do 89873eed67faSmbalmer echo '#include "conftst'$i'.h"' >> sub/conftest.c 89883eed67faSmbalmer # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 89893eed67faSmbalmer # Solaris 8's {/usr,}/bin/sh. 89903eed67faSmbalmer touch sub/conftst$i.h 89913eed67faSmbalmer done 89923eed67faSmbalmer echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 89933eed67faSmbalmer 8994dc407927Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 8995dc407927Smrg # mode. It turns out that the SunPro C++ compiler does not properly 8996dc407927Smrg # handle `-M -o', and we need to detect this. Also, some Intel 8997dc407927Smrg # versions had trouble with output in subdirs 8998dc407927Smrg am__obj=sub/conftest.${OBJEXT-o} 8999dc407927Smrg am__minus_obj="-o $am__obj" 90003eed67faSmbalmer case $depmode in 9001dc407927Smrg gcc) 9002dc407927Smrg # This depmode causes a compiler race in universal mode. 9003dc407927Smrg test "$am__universal" = false || continue 9004dc407927Smrg ;; 90053eed67faSmbalmer nosideeffect) 90063eed67faSmbalmer # after this tag, mechanisms are not by side-effect, so they'll 90073eed67faSmbalmer # only be used when explicitly requested 90083eed67faSmbalmer if test "x$enable_dependency_tracking" = xyes; then 90093eed67faSmbalmer continue 90103eed67faSmbalmer else 90113eed67faSmbalmer break 90123eed67faSmbalmer fi 90133eed67faSmbalmer ;; 901475cbef56Smrg msvc7 | msvc7msys | msvisualcpp | msvcmsys) 9015dc407927Smrg # This compiler won't grok `-c -o', but also, the minuso test has 9016dc407927Smrg # not run yet. These depmodes are late enough in the game, and 9017dc407927Smrg # so weak that their functioning should not be impacted. 9018dc407927Smrg am__obj=conftest.${OBJEXT-o} 9019dc407927Smrg am__minus_obj= 9020dc407927Smrg ;; 90213eed67faSmbalmer none) break ;; 90223eed67faSmbalmer esac 90233eed67faSmbalmer if depmode=$depmode \ 9024dc407927Smrg source=sub/conftest.c object=$am__obj \ 90253eed67faSmbalmer depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 9026dc407927Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 90273eed67faSmbalmer >/dev/null 2>conftest.err && 9028dc407927Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 90293eed67faSmbalmer grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 9030dc407927Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 90313eed67faSmbalmer ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 90323eed67faSmbalmer # icc doesn't choke on unknown options, it will just issue warnings 90333eed67faSmbalmer # or remarks (even with -Werror). So we grep stderr for any message 90343eed67faSmbalmer # that says an option was ignored or not supported. 90353eed67faSmbalmer # When given -MP, icc 7.0 and 7.1 complain thusly: 90363eed67faSmbalmer # icc: Command line warning: ignoring option '-M'; no argument required 90373eed67faSmbalmer # The diagnosis changed in icc 8.0: 90383eed67faSmbalmer # icc: Command line remark: option '-MP' not supported 90393eed67faSmbalmer if (grep 'ignoring option' conftest.err || 90403eed67faSmbalmer grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 90413eed67faSmbalmer am_cv_$1_dependencies_compiler_type=$depmode 90423eed67faSmbalmer break 90433eed67faSmbalmer fi 90443eed67faSmbalmer fi 90453eed67faSmbalmer done 90463eed67faSmbalmer 90473eed67faSmbalmer cd .. 90483eed67faSmbalmer rm -rf conftest.dir 90493eed67faSmbalmerelse 90503eed67faSmbalmer am_cv_$1_dependencies_compiler_type=none 90513eed67faSmbalmerfi 90523eed67faSmbalmer]) 90533eed67faSmbalmerAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 90543eed67faSmbalmerAM_CONDITIONAL([am__fastdep$1], [ 90553eed67faSmbalmer test "x$enable_dependency_tracking" != xno \ 90563eed67faSmbalmer && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 90573eed67faSmbalmer]) 90583eed67faSmbalmer 90593eed67faSmbalmer 90603eed67faSmbalmer# AM_SET_DEPDIR 90613eed67faSmbalmer# ------------- 90623eed67faSmbalmer# Choose a directory name for dependency files. 90633eed67faSmbalmer# This macro is AC_REQUIREd in _AM_DEPENDENCIES 90643eed67faSmbalmerAC_DEFUN([AM_SET_DEPDIR], 90653eed67faSmbalmer[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 90663eed67faSmbalmerAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 90673eed67faSmbalmer]) 90683eed67faSmbalmer 90693eed67faSmbalmer 90703eed67faSmbalmer# AM_DEP_TRACK 90713eed67faSmbalmer# ------------ 90723eed67faSmbalmerAC_DEFUN([AM_DEP_TRACK], 90733eed67faSmbalmer[AC_ARG_ENABLE(dependency-tracking, 90743eed67faSmbalmer[ --disable-dependency-tracking speeds up one-time build 90753eed67faSmbalmer --enable-dependency-tracking do not reject slow dependency extractors]) 90763eed67faSmbalmerif test "x$enable_dependency_tracking" != xno; then 90773eed67faSmbalmer am_depcomp="$ac_aux_dir/depcomp" 90783eed67faSmbalmer AMDEPBACKSLASH='\' 907975cbef56Smrg am__nodep='_no' 90803eed67faSmbalmerfi 90813eed67faSmbalmerAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 9082dc407927SmrgAC_SUBST([AMDEPBACKSLASH])dnl 9083dc407927Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 908475cbef56SmrgAC_SUBST([am__nodep])dnl 908575cbef56Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl 90863eed67faSmbalmer]) 90873eed67faSmbalmer 90883eed67faSmbalmer# Generate code to set up dependency tracking. -*- Autoconf -*- 90893eed67faSmbalmer 9090dc407927Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 90913eed67faSmbalmer# Free Software Foundation, Inc. 90923eed67faSmbalmer# 90933eed67faSmbalmer# This file is free software; the Free Software Foundation 90943eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 90953eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 90963eed67faSmbalmer 9097dc407927Smrg#serial 5 90983eed67faSmbalmer 90993eed67faSmbalmer# _AM_OUTPUT_DEPENDENCY_COMMANDS 91003eed67faSmbalmer# ------------------------------ 91013eed67faSmbalmerAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 9102dc407927Smrg[{ 9103dc407927Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 9104dc407927Smrg # are listed without --file. Let's play safe and only enable the eval 9105dc407927Smrg # if we detect the quoting. 9106dc407927Smrg case $CONFIG_FILES in 9107dc407927Smrg *\'*) eval set x "$CONFIG_FILES" ;; 9108dc407927Smrg *) set x $CONFIG_FILES ;; 9109dc407927Smrg esac 9110dc407927Smrg shift 9111dc407927Smrg for mf 9112dc407927Smrg do 9113dc407927Smrg # Strip MF so we end up with the name of the file. 9114dc407927Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 9115dc407927Smrg # Check whether this is an Automake generated Makefile or not. 9116dc407927Smrg # We used to match only the files named `Makefile.in', but 9117dc407927Smrg # some people rename them; so instead we look at the file content. 9118dc407927Smrg # Grep'ing the first line is not enough: some people post-process 9119dc407927Smrg # each Makefile.in and add a new line on top of each file to say so. 9120dc407927Smrg # Grep'ing the whole file is not good either: AIX grep has a line 9121dc407927Smrg # limit of 2048, but all sed's we know have understand at least 4000. 9122dc407927Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 9123dc407927Smrg dirpart=`AS_DIRNAME("$mf")` 9124dc407927Smrg else 9125dc407927Smrg continue 9126dc407927Smrg fi 9127dc407927Smrg # Extract the definition of DEPDIR, am__include, and am__quote 9128dc407927Smrg # from the Makefile without running `make'. 9129dc407927Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 9130dc407927Smrg test -z "$DEPDIR" && continue 9131dc407927Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 9132dc407927Smrg test -z "am__include" && continue 9133dc407927Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 9134dc407927Smrg # When using ansi2knr, U may be empty or an underscore; expand it 9135dc407927Smrg U=`sed -n 's/^U = //p' < "$mf"` 9136dc407927Smrg # Find all dependency output files, they are included files with 9137dc407927Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 9138dc407927Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 9139dc407927Smrg # expansion. 9140dc407927Smrg for file in `sed -n " 9141dc407927Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 9142dc407927Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 9143dc407927Smrg # Make sure the directory exists. 9144dc407927Smrg test -f "$dirpart/$file" && continue 9145dc407927Smrg fdir=`AS_DIRNAME(["$file"])` 9146dc407927Smrg AS_MKDIR_P([$dirpart/$fdir]) 9147dc407927Smrg # echo "creating $dirpart/$file" 9148dc407927Smrg echo '# dummy' > "$dirpart/$file" 9149dc407927Smrg done 91503eed67faSmbalmer done 9151dc407927Smrg} 91523eed67faSmbalmer])# _AM_OUTPUT_DEPENDENCY_COMMANDS 91533eed67faSmbalmer 91543eed67faSmbalmer 91553eed67faSmbalmer# AM_OUTPUT_DEPENDENCY_COMMANDS 91563eed67faSmbalmer# ----------------------------- 91573eed67faSmbalmer# This macro should only be invoked once -- use via AC_REQUIRE. 91583eed67faSmbalmer# 91593eed67faSmbalmer# This code is only required when automatic dependency tracking 91603eed67faSmbalmer# is enabled. FIXME. This creates each `.P' file that we will 91613eed67faSmbalmer# need in order to bootstrap the dependency handling code. 91623eed67faSmbalmerAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 91633eed67faSmbalmer[AC_CONFIG_COMMANDS([depfiles], 91643eed67faSmbalmer [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 91653eed67faSmbalmer [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 91663eed67faSmbalmer]) 91673eed67faSmbalmer 91683eed67faSmbalmer# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 91693eed67faSmbalmer# Free Software Foundation, Inc. 91703eed67faSmbalmer# 91713eed67faSmbalmer# This file is free software; the Free Software Foundation 91723eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 91733eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 91743eed67faSmbalmer 91753eed67faSmbalmer# serial 8 91763eed67faSmbalmer 91773eed67faSmbalmer# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 91783eed67faSmbalmerAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 91793eed67faSmbalmer 91803eed67faSmbalmer# Do all the work for Automake. -*- Autoconf -*- 91813eed67faSmbalmer 9182dc407927Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 9183dc407927Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 91843eed67faSmbalmer# 91853eed67faSmbalmer# This file is free software; the Free Software Foundation 91863eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 91873eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 91883eed67faSmbalmer 9189dc407927Smrg# serial 16 91903eed67faSmbalmer 91913eed67faSmbalmer# This macro actually does too much. Some checks are only needed if 91923eed67faSmbalmer# your package does certain things. But this isn't really a big deal. 91933eed67faSmbalmer 91943eed67faSmbalmer# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 91953eed67faSmbalmer# AM_INIT_AUTOMAKE([OPTIONS]) 91963eed67faSmbalmer# ----------------------------------------------- 91973eed67faSmbalmer# The call with PACKAGE and VERSION arguments is the old style 91983eed67faSmbalmer# call (pre autoconf-2.50), which is being phased out. PACKAGE 91993eed67faSmbalmer# and VERSION should now be passed to AC_INIT and removed from 92003eed67faSmbalmer# the call to AM_INIT_AUTOMAKE. 92013eed67faSmbalmer# We support both call styles for the transition. After 92023eed67faSmbalmer# the next Automake release, Autoconf can make the AC_INIT 92033eed67faSmbalmer# arguments mandatory, and then we can depend on a new Autoconf 92043eed67faSmbalmer# release and drop the old call support. 92053eed67faSmbalmerAC_DEFUN([AM_INIT_AUTOMAKE], 9206dc407927Smrg[AC_PREREQ([2.62])dnl 92073eed67faSmbalmerdnl Autoconf wants to disallow AM_ names. We explicitly allow 92083eed67faSmbalmerdnl the ones we care about. 92093eed67faSmbalmerm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 92103eed67faSmbalmerAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 92113eed67faSmbalmerAC_REQUIRE([AC_PROG_INSTALL])dnl 9212dc407927Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 9213dc407927Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 9214dc407927Smrg # is not polluted with repeated "-I." 9215dc407927Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 9216dc407927Smrg # test to see if srcdir already configured 9217dc407927Smrg if test -f $srcdir/config.status; then 9218dc407927Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 9219dc407927Smrg fi 92203eed67faSmbalmerfi 92213eed67faSmbalmer 92223eed67faSmbalmer# test whether we have cygpath 92233eed67faSmbalmerif test -z "$CYGPATH_W"; then 92243eed67faSmbalmer if (cygpath --version) >/dev/null 2>/dev/null; then 92253eed67faSmbalmer CYGPATH_W='cygpath -w' 92263eed67faSmbalmer else 92273eed67faSmbalmer CYGPATH_W=echo 92283eed67faSmbalmer fi 92293eed67faSmbalmerfi 92303eed67faSmbalmerAC_SUBST([CYGPATH_W]) 92313eed67faSmbalmer 92323eed67faSmbalmer# Define the identity of the package. 92333eed67faSmbalmerdnl Distinguish between old-style and new-style calls. 92343eed67faSmbalmerm4_ifval([$2], 92353eed67faSmbalmer[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 92363eed67faSmbalmer AC_SUBST([PACKAGE], [$1])dnl 92373eed67faSmbalmer AC_SUBST([VERSION], [$2])], 92383eed67faSmbalmer[_AM_SET_OPTIONS([$1])dnl 9239dc407927Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 9240dc407927Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 9241dc407927Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 92423eed67faSmbalmer AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 92433eed67faSmbalmer AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 92443eed67faSmbalmer 92453eed67faSmbalmer_AM_IF_OPTION([no-define],, 92463eed67faSmbalmer[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 92473eed67faSmbalmer AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 92483eed67faSmbalmer 92493eed67faSmbalmer# Some tools Automake needs. 92503eed67faSmbalmerAC_REQUIRE([AM_SANITY_CHECK])dnl 92513eed67faSmbalmerAC_REQUIRE([AC_ARG_PROGRAM])dnl 92523eed67faSmbalmerAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 92533eed67faSmbalmerAM_MISSING_PROG(AUTOCONF, autoconf) 92543eed67faSmbalmerAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 92553eed67faSmbalmerAM_MISSING_PROG(AUTOHEADER, autoheader) 92563eed67faSmbalmerAM_MISSING_PROG(MAKEINFO, makeinfo) 9257dc407927SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9258dc407927SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 92593eed67faSmbalmerAC_REQUIRE([AM_PROG_MKDIR_P])dnl 92603eed67faSmbalmer# We need awk for the "check" target. The system "awk" is bad on 92613eed67faSmbalmer# some platforms. 92623eed67faSmbalmerAC_REQUIRE([AC_PROG_AWK])dnl 92633eed67faSmbalmerAC_REQUIRE([AC_PROG_MAKE_SET])dnl 92643eed67faSmbalmerAC_REQUIRE([AM_SET_LEADING_DOT])dnl 92653eed67faSmbalmer_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 9266dc407927Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 9267dc407927Smrg [_AM_PROG_TAR([v7])])]) 92683eed67faSmbalmer_AM_IF_OPTION([no-dependencies],, 92693eed67faSmbalmer[AC_PROVIDE_IFELSE([AC_PROG_CC], 9270dc407927Smrg [_AM_DEPENDENCIES(CC)], 9271dc407927Smrg [define([AC_PROG_CC], 9272dc407927Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 92733eed67faSmbalmerAC_PROVIDE_IFELSE([AC_PROG_CXX], 9274dc407927Smrg [_AM_DEPENDENCIES(CXX)], 9275dc407927Smrg [define([AC_PROG_CXX], 9276dc407927Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 9277dc407927SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 9278dc407927Smrg [_AM_DEPENDENCIES(OBJC)], 9279dc407927Smrg [define([AC_PROG_OBJC], 9280dc407927Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 92813eed67faSmbalmer]) 9282dc407927Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 9283dc407927Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 9284dc407927Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 9285dc407927Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 9286dc407927SmrgAC_CONFIG_COMMANDS_PRE(dnl 9287dc407927Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 9288dc407927Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 92893eed67faSmbalmer]) 92903eed67faSmbalmer 9291dc407927Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 9292dc407927Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 9293dc407927Smrgdnl mangled by Autoconf and run in a shell conditional statement. 9294dc407927Smrgm4_define([_AC_COMPILER_EXEEXT], 9295dc407927Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 9296dc407927Smrg 92973eed67faSmbalmer 92983eed67faSmbalmer# When config.status generates a header, we must update the stamp-h file. 92993eed67faSmbalmer# This file resides in the same directory as the config header 93003eed67faSmbalmer# that is generated. The stamp files are numbered to have different names. 93013eed67faSmbalmer 93023eed67faSmbalmer# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 93033eed67faSmbalmer# loop where config.status creates the headers, so we can generate 93043eed67faSmbalmer# our stamp files there. 93053eed67faSmbalmerAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 93063eed67faSmbalmer[# Compute $1's index in $config_headers. 9307dc407927Smrg_am_arg=$1 93083eed67faSmbalmer_am_stamp_count=1 93093eed67faSmbalmerfor _am_header in $config_headers :; do 93103eed67faSmbalmer case $_am_header in 9311dc407927Smrg $_am_arg | $_am_arg:* ) 93123eed67faSmbalmer break ;; 93133eed67faSmbalmer * ) 93143eed67faSmbalmer _am_stamp_count=`expr $_am_stamp_count + 1` ;; 93153eed67faSmbalmer esac 93163eed67faSmbalmerdone 9317dc407927Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 93183eed67faSmbalmer 931975cbef56Smrg# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, 932075cbef56Smrg# Inc. 93213eed67faSmbalmer# 93223eed67faSmbalmer# This file is free software; the Free Software Foundation 93233eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 93243eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 93253eed67faSmbalmer 932675cbef56Smrg# serial 1 932775cbef56Smrg 93283eed67faSmbalmer# AM_PROG_INSTALL_SH 93293eed67faSmbalmer# ------------------ 93303eed67faSmbalmer# Define $install_sh. 93313eed67faSmbalmerAC_DEFUN([AM_PROG_INSTALL_SH], 93323eed67faSmbalmer[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9333dc407927Smrgif test x"${install_sh}" != xset; then 9334dc407927Smrg case $am_aux_dir in 9335dc407927Smrg *\ * | *\ *) 9336dc407927Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 9337dc407927Smrg *) 9338dc407927Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 9339dc407927Smrg esac 9340dc407927Smrgfi 93413eed67faSmbalmerAC_SUBST(install_sh)]) 93423eed67faSmbalmer 93433eed67faSmbalmer# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 93443eed67faSmbalmer# 93453eed67faSmbalmer# This file is free software; the Free Software Foundation 93463eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 93473eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 93483eed67faSmbalmer 93493eed67faSmbalmer# serial 2 93503eed67faSmbalmer 93513eed67faSmbalmer# Check whether the underlying file-system supports filenames 93523eed67faSmbalmer# with a leading dot. For instance MS-DOS doesn't. 93533eed67faSmbalmerAC_DEFUN([AM_SET_LEADING_DOT], 93543eed67faSmbalmer[rm -rf .tst 2>/dev/null 93553eed67faSmbalmermkdir .tst 2>/dev/null 93563eed67faSmbalmerif test -d .tst; then 93573eed67faSmbalmer am__leading_dot=. 93583eed67faSmbalmerelse 93593eed67faSmbalmer am__leading_dot=_ 93603eed67faSmbalmerfi 93613eed67faSmbalmerrmdir .tst 2>/dev/null 93623eed67faSmbalmerAC_SUBST([am__leading_dot])]) 93633eed67faSmbalmer 93643eed67faSmbalmer# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 93653eed67faSmbalmer# From Jim Meyering 93663eed67faSmbalmer 936775cbef56Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 936875cbef56Smrg# 2011 Free Software Foundation, Inc. 93693eed67faSmbalmer# 93703eed67faSmbalmer# This file is free software; the Free Software Foundation 93713eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 93723eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 93733eed67faSmbalmer 9374dc407927Smrg# serial 5 93753eed67faSmbalmer 9376dc407927Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 9377dc407927Smrg# ---------------------------------- 9378dc407927Smrg# Control maintainer-specific portions of Makefiles. 9379dc407927Smrg# Default is to disable them, unless `enable' is passed literally. 9380dc407927Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 9381dc407927Smrg# can override the default with the --enable/--disable switch. 93823eed67faSmbalmerAC_DEFUN([AM_MAINTAINER_MODE], 9383dc407927Smrg[m4_case(m4_default([$1], [disable]), 9384dc407927Smrg [enable], [m4_define([am_maintainer_other], [disable])], 9385dc407927Smrg [disable], [m4_define([am_maintainer_other], [enable])], 9386dc407927Smrg [m4_define([am_maintainer_other], [enable]) 9387dc407927Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 938875cbef56SmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 9389dc407927Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 9390dc407927Smrg AC_ARG_ENABLE([maintainer-mode], 9391dc407927Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 93923eed67faSmbalmer (and sometimes confusing) to the casual installer], 9393dc407927Smrg [USE_MAINTAINER_MODE=$enableval], 9394dc407927Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 93953eed67faSmbalmer AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 9396dc407927Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 93973eed67faSmbalmer MAINT=$MAINTAINER_MODE_TRUE 9398dc407927Smrg AC_SUBST([MAINT])dnl 93993eed67faSmbalmer] 94003eed67faSmbalmer) 94013eed67faSmbalmer 94023eed67faSmbalmerAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 94033eed67faSmbalmer 94043eed67faSmbalmer# Check to see how 'make' treats includes. -*- Autoconf -*- 94053eed67faSmbalmer 9406dc407927Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 94073eed67faSmbalmer# 94083eed67faSmbalmer# This file is free software; the Free Software Foundation 94093eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 94103eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 94113eed67faSmbalmer 9412dc407927Smrg# serial 4 94133eed67faSmbalmer 94143eed67faSmbalmer# AM_MAKE_INCLUDE() 94153eed67faSmbalmer# ----------------- 94163eed67faSmbalmer# Check to see how make treats includes. 94173eed67faSmbalmerAC_DEFUN([AM_MAKE_INCLUDE], 94183eed67faSmbalmer[am_make=${MAKE-make} 94193eed67faSmbalmercat > confinc << 'END' 94203eed67faSmbalmeram__doit: 9421dc407927Smrg @echo this is the am__doit target 94223eed67faSmbalmer.PHONY: am__doit 94233eed67faSmbalmerEND 94243eed67faSmbalmer# If we don't find an include directive, just comment out the code. 94253eed67faSmbalmerAC_MSG_CHECKING([for style of include used by $am_make]) 94263eed67faSmbalmeram__include="#" 94273eed67faSmbalmeram__quote= 94283eed67faSmbalmer_am_result=none 94293eed67faSmbalmer# First try GNU make style include. 94303eed67faSmbalmerecho "include confinc" > confmf 9431dc407927Smrg# Ignore all kinds of additional output from `make'. 9432dc407927Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 9433dc407927Smrg*the\ am__doit\ target*) 9434dc407927Smrg am__include=include 9435dc407927Smrg am__quote= 9436dc407927Smrg _am_result=GNU 9437dc407927Smrg ;; 9438dc407927Smrgesac 94393eed67faSmbalmer# Now try BSD make style include. 94403eed67faSmbalmerif test "$am__include" = "#"; then 94413eed67faSmbalmer echo '.include "confinc"' > confmf 9442dc407927Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 9443dc407927Smrg *the\ am__doit\ target*) 9444dc407927Smrg am__include=.include 9445dc407927Smrg am__quote="\"" 9446dc407927Smrg _am_result=BSD 9447dc407927Smrg ;; 9448dc407927Smrg esac 94493eed67faSmbalmerfi 94503eed67faSmbalmerAC_SUBST([am__include]) 94513eed67faSmbalmerAC_SUBST([am__quote]) 94523eed67faSmbalmerAC_MSG_RESULT([$_am_result]) 94533eed67faSmbalmerrm -f confinc confmf 94543eed67faSmbalmer]) 94553eed67faSmbalmer 94563eed67faSmbalmer# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 94573eed67faSmbalmer 9458dc407927Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 94593eed67faSmbalmer# Free Software Foundation, Inc. 94603eed67faSmbalmer# 94613eed67faSmbalmer# This file is free software; the Free Software Foundation 94623eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 94633eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 94643eed67faSmbalmer 9465dc407927Smrg# serial 6 94663eed67faSmbalmer 94673eed67faSmbalmer# AM_MISSING_PROG(NAME, PROGRAM) 94683eed67faSmbalmer# ------------------------------ 94693eed67faSmbalmerAC_DEFUN([AM_MISSING_PROG], 94703eed67faSmbalmer[AC_REQUIRE([AM_MISSING_HAS_RUN]) 94713eed67faSmbalmer$1=${$1-"${am_missing_run}$2"} 94723eed67faSmbalmerAC_SUBST($1)]) 94733eed67faSmbalmer 94743eed67faSmbalmer 94753eed67faSmbalmer# AM_MISSING_HAS_RUN 94763eed67faSmbalmer# ------------------ 94773eed67faSmbalmer# Define MISSING if not defined so far and test if it supports --run. 94783eed67faSmbalmer# If it does, set am_missing_run to use it, otherwise, to nothing. 94793eed67faSmbalmerAC_DEFUN([AM_MISSING_HAS_RUN], 94803eed67faSmbalmer[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9481dc407927SmrgAC_REQUIRE_AUX_FILE([missing])dnl 9482dc407927Smrgif test x"${MISSING+set}" != xset; then 9483dc407927Smrg case $am_aux_dir in 9484dc407927Smrg *\ * | *\ *) 9485dc407927Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 9486dc407927Smrg *) 9487dc407927Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 9488dc407927Smrg esac 9489dc407927Smrgfi 94903eed67faSmbalmer# Use eval to expand $SHELL 94913eed67faSmbalmerif eval "$MISSING --run true"; then 94923eed67faSmbalmer am_missing_run="$MISSING --run " 94933eed67faSmbalmerelse 94943eed67faSmbalmer am_missing_run= 94953eed67faSmbalmer AC_MSG_WARN([`missing' script is too old or missing]) 94963eed67faSmbalmerfi 94973eed67faSmbalmer]) 94983eed67faSmbalmer 949975cbef56Smrg# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, 950075cbef56Smrg# Inc. 95013eed67faSmbalmer# 95023eed67faSmbalmer# This file is free software; the Free Software Foundation 95033eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 95043eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 95053eed67faSmbalmer 950675cbef56Smrg# serial 1 950775cbef56Smrg 95083eed67faSmbalmer# AM_PROG_MKDIR_P 95093eed67faSmbalmer# --------------- 9510dc407927Smrg# Check for `mkdir -p'. 95113eed67faSmbalmerAC_DEFUN([AM_PROG_MKDIR_P], 9512dc407927Smrg[AC_PREREQ([2.60])dnl 9513dc407927SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9514dc407927Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 9515dc407927Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 9516dc407927Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 9517dc407927Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 9518dc407927Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 9519dc407927Smrgdnl adjustment using top_builddir (which is defined more often than 9520dc407927Smrgdnl MKDIR_P). 9521dc407927SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 9522dc407927Smrgcase $mkdir_p in 9523dc407927Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 9524dc407927Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 9525dc407927Smrgesac 9526dc407927Smrg]) 95273eed67faSmbalmer 95283eed67faSmbalmer# Helper functions for option handling. -*- Autoconf -*- 95293eed67faSmbalmer 953075cbef56Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software 953175cbef56Smrg# Foundation, Inc. 95323eed67faSmbalmer# 95333eed67faSmbalmer# This file is free software; the Free Software Foundation 95343eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 95353eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 95363eed67faSmbalmer 953775cbef56Smrg# serial 5 95383eed67faSmbalmer 95393eed67faSmbalmer# _AM_MANGLE_OPTION(NAME) 95403eed67faSmbalmer# ----------------------- 95413eed67faSmbalmerAC_DEFUN([_AM_MANGLE_OPTION], 95423eed67faSmbalmer[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 95433eed67faSmbalmer 95443eed67faSmbalmer# _AM_SET_OPTION(NAME) 954575cbef56Smrg# -------------------- 95463eed67faSmbalmer# Set option NAME. Presently that only means defining a flag for this option. 95473eed67faSmbalmerAC_DEFUN([_AM_SET_OPTION], 95483eed67faSmbalmer[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 95493eed67faSmbalmer 95503eed67faSmbalmer# _AM_SET_OPTIONS(OPTIONS) 955175cbef56Smrg# ------------------------ 95523eed67faSmbalmer# OPTIONS is a space-separated list of Automake options. 95533eed67faSmbalmerAC_DEFUN([_AM_SET_OPTIONS], 9554dc407927Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 95553eed67faSmbalmer 95563eed67faSmbalmer# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 95573eed67faSmbalmer# ------------------------------------------- 95583eed67faSmbalmer# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 95593eed67faSmbalmerAC_DEFUN([_AM_IF_OPTION], 95603eed67faSmbalmer[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 95613eed67faSmbalmer 9562dc407927Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 9563dc407927Smrg 9564dc407927Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 9565dc407927Smrg# Free Software Foundation, Inc. 9566dc407927Smrg# 9567dc407927Smrg# This file is free software; the Free Software Foundation 9568dc407927Smrg# gives unlimited permission to copy and/or distribute it, 9569dc407927Smrg# with or without modifications, as long as this notice is preserved. 9570dc407927Smrg 9571dc407927Smrg# serial 5 9572dc407927Smrg 9573dc407927Smrg# AM_SANITY_CHECK 9574dc407927Smrg# --------------- 9575dc407927SmrgAC_DEFUN([AM_SANITY_CHECK], 9576dc407927Smrg[AC_MSG_CHECKING([whether build environment is sane]) 9577dc407927Smrg# Just in case 9578dc407927Smrgsleep 1 9579dc407927Smrgecho timestamp > conftest.file 9580dc407927Smrg# Reject unsafe characters in $srcdir or the absolute working directory 9581dc407927Smrg# name. Accept space and tab only in the latter. 9582dc407927Smrgam_lf=' 9583dc407927Smrg' 9584dc407927Smrgcase `pwd` in 9585dc407927Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 9586dc407927Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 9587dc407927Smrgesac 9588dc407927Smrgcase $srcdir in 9589dc407927Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 9590dc407927Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 9591dc407927Smrgesac 9592dc407927Smrg 9593dc407927Smrg# Do `set' in a subshell so we don't clobber the current shell's 9594dc407927Smrg# arguments. Must try -L first in case configure is actually a 9595dc407927Smrg# symlink; some systems play weird games with the mod time of symlinks 9596dc407927Smrg# (eg FreeBSD returns the mod time of the symlink's containing 9597dc407927Smrg# directory). 9598dc407927Smrgif ( 9599dc407927Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 9600dc407927Smrg if test "$[*]" = "X"; then 9601dc407927Smrg # -L didn't work. 9602dc407927Smrg set X `ls -t "$srcdir/configure" conftest.file` 9603dc407927Smrg fi 9604dc407927Smrg rm -f conftest.file 9605dc407927Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 9606dc407927Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 9607dc407927Smrg 9608dc407927Smrg # If neither matched, then we have a broken ls. This can happen 9609dc407927Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 9610dc407927Smrg # broken ls alias from the environment. This has actually 9611dc407927Smrg # happened. Such a system could not be considered "sane". 9612dc407927Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9613dc407927Smrgalias in your environment]) 9614dc407927Smrg fi 9615dc407927Smrg 9616dc407927Smrg test "$[2]" = conftest.file 9617dc407927Smrg ) 9618dc407927Smrgthen 9619dc407927Smrg # Ok. 9620dc407927Smrg : 9621dc407927Smrgelse 9622dc407927Smrg AC_MSG_ERROR([newly created file is older than distributed files! 9623dc407927SmrgCheck your system clock]) 9624dc407927Smrgfi 9625dc407927SmrgAC_MSG_RESULT(yes)]) 9626dc407927Smrg 962775cbef56Smrg# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. 96283eed67faSmbalmer# 96293eed67faSmbalmer# This file is free software; the Free Software Foundation 96303eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 96313eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 96323eed67faSmbalmer 963375cbef56Smrg# serial 1 963475cbef56Smrg 96353eed67faSmbalmer# AM_PROG_INSTALL_STRIP 96363eed67faSmbalmer# --------------------- 96373eed67faSmbalmer# One issue with vendor `install' (even GNU) is that you can't 96383eed67faSmbalmer# specify the program used to strip binaries. This is especially 96393eed67faSmbalmer# annoying in cross-compiling environments, where the build's strip 96403eed67faSmbalmer# is unlikely to handle the host's binaries. 96413eed67faSmbalmer# Fortunately install-sh will honor a STRIPPROG variable, so we 96423eed67faSmbalmer# always use install-sh in `make install-strip', and initialize 96433eed67faSmbalmer# STRIPPROG with the value of the STRIP variable (set by the user). 96443eed67faSmbalmerAC_DEFUN([AM_PROG_INSTALL_STRIP], 96453eed67faSmbalmer[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 96463eed67faSmbalmer# Installed binaries are usually stripped using `strip' when the user 96473eed67faSmbalmer# run `make install-strip'. However `strip' might not be the right 96483eed67faSmbalmer# tool to use in cross-compilation environments, therefore Automake 96493eed67faSmbalmer# will honor the `STRIP' environment variable to overrule this program. 96503eed67faSmbalmerdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 96513eed67faSmbalmerif test "$cross_compiling" != no; then 96523eed67faSmbalmer AC_CHECK_TOOL([STRIP], [strip], :) 96533eed67faSmbalmerfi 9654dc407927SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 96553eed67faSmbalmerAC_SUBST([INSTALL_STRIP_PROGRAM])]) 96563eed67faSmbalmer 965775cbef56Smrg# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. 9658dc407927Smrg# 9659dc407927Smrg# This file is free software; the Free Software Foundation 9660dc407927Smrg# gives unlimited permission to copy and/or distribute it, 9661dc407927Smrg# with or without modifications, as long as this notice is preserved. 9662dc407927Smrg 966375cbef56Smrg# serial 3 9664dc407927Smrg 9665dc407927Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 9666dc407927Smrg# --------------------------- 9667dc407927Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9668dc407927Smrg# This macro is traced by Automake. 9669dc407927SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9670dc407927Smrg 9671dc407927Smrg# AM_SUBST_NOTMAKE(VARIABLE) 967275cbef56Smrg# -------------------------- 9673dc407927Smrg# Public sister of _AM_SUBST_NOTMAKE. 9674dc407927SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9675dc407927Smrg 96763eed67faSmbalmer# Check how to create a tarball. -*- Autoconf -*- 96773eed67faSmbalmer 967875cbef56Smrg# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. 96793eed67faSmbalmer# 96803eed67faSmbalmer# This file is free software; the Free Software Foundation 96813eed67faSmbalmer# gives unlimited permission to copy and/or distribute it, 96823eed67faSmbalmer# with or without modifications, as long as this notice is preserved. 96833eed67faSmbalmer 96843eed67faSmbalmer# serial 2 96853eed67faSmbalmer 96863eed67faSmbalmer# _AM_PROG_TAR(FORMAT) 96873eed67faSmbalmer# -------------------- 96883eed67faSmbalmer# Check how to create a tarball in format FORMAT. 96893eed67faSmbalmer# FORMAT should be one of `v7', `ustar', or `pax'. 96903eed67faSmbalmer# 96913eed67faSmbalmer# Substitute a variable $(am__tar) that is a command 96923eed67faSmbalmer# writing to stdout a FORMAT-tarball containing the directory 96933eed67faSmbalmer# $tardir. 96943eed67faSmbalmer# tardir=directory && $(am__tar) > result.tar 96953eed67faSmbalmer# 96963eed67faSmbalmer# Substitute a variable $(am__untar) that extract such 96973eed67faSmbalmer# a tarball read from stdin. 96983eed67faSmbalmer# $(am__untar) < result.tar 96993eed67faSmbalmerAC_DEFUN([_AM_PROG_TAR], 970075cbef56Smrg[# Always define AMTAR for backward compatibility. Yes, it's still used 970175cbef56Smrg# in the wild :-( We should find a proper way to deprecate it ... 970275cbef56SmrgAC_SUBST([AMTAR], ['$${TAR-tar}']) 97033eed67faSmbalmerm4_if([$1], [v7], 970475cbef56Smrg [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], 97053eed67faSmbalmer [m4_case([$1], [ustar],, [pax],, 97063eed67faSmbalmer [m4_fatal([Unknown tar format])]) 97073eed67faSmbalmerAC_MSG_CHECKING([how to create a $1 tar archive]) 97083eed67faSmbalmer# Loop over all known methods to create a tar archive until one works. 97093eed67faSmbalmer_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 97103eed67faSmbalmer_am_tools=${am_cv_prog_tar_$1-$_am_tools} 97113eed67faSmbalmer# Do not fold the above two line into one, because Tru64 sh and 97123eed67faSmbalmer# Solaris sh will not grok spaces in the rhs of `-'. 97133eed67faSmbalmerfor _am_tool in $_am_tools 97143eed67faSmbalmerdo 97153eed67faSmbalmer case $_am_tool in 97163eed67faSmbalmer gnutar) 97173eed67faSmbalmer for _am_tar in tar gnutar gtar; 97183eed67faSmbalmer do 97193eed67faSmbalmer AM_RUN_LOG([$_am_tar --version]) && break 97203eed67faSmbalmer done 97213eed67faSmbalmer am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 97223eed67faSmbalmer am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 97233eed67faSmbalmer am__untar="$_am_tar -xf -" 97243eed67faSmbalmer ;; 97253eed67faSmbalmer plaintar) 97263eed67faSmbalmer # Must skip GNU tar: if it does not support --format= it doesn't create 97273eed67faSmbalmer # ustar tarball either. 97283eed67faSmbalmer (tar --version) >/dev/null 2>&1 && continue 97293eed67faSmbalmer am__tar='tar chf - "$$tardir"' 97303eed67faSmbalmer am__tar_='tar chf - "$tardir"' 97313eed67faSmbalmer am__untar='tar xf -' 97323eed67faSmbalmer ;; 97333eed67faSmbalmer pax) 97343eed67faSmbalmer am__tar='pax -L -x $1 -w "$$tardir"' 97353eed67faSmbalmer am__tar_='pax -L -x $1 -w "$tardir"' 97363eed67faSmbalmer am__untar='pax -r' 97373eed67faSmbalmer ;; 97383eed67faSmbalmer cpio) 97393eed67faSmbalmer am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 97403eed67faSmbalmer am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 97413eed67faSmbalmer am__untar='cpio -i -H $1 -d' 97423eed67faSmbalmer ;; 97433eed67faSmbalmer none) 97443eed67faSmbalmer am__tar=false 97453eed67faSmbalmer am__tar_=false 97463eed67faSmbalmer am__untar=false 97473eed67faSmbalmer ;; 97483eed67faSmbalmer esac 97493eed67faSmbalmer 97503eed67faSmbalmer # If the value was cached, stop now. We just wanted to have am__tar 97513eed67faSmbalmer # and am__untar set. 97523eed67faSmbalmer test -n "${am_cv_prog_tar_$1}" && break 97533eed67faSmbalmer 97543eed67faSmbalmer # tar/untar a dummy directory, and stop if the command works 97553eed67faSmbalmer rm -rf conftest.dir 97563eed67faSmbalmer mkdir conftest.dir 97573eed67faSmbalmer echo GrepMe > conftest.dir/file 97583eed67faSmbalmer AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 97593eed67faSmbalmer rm -rf conftest.dir 97603eed67faSmbalmer if test -s conftest.tar; then 97613eed67faSmbalmer AM_RUN_LOG([$am__untar <conftest.tar]) 97623eed67faSmbalmer grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 97633eed67faSmbalmer fi 97643eed67faSmbalmerdone 97653eed67faSmbalmerrm -rf conftest.dir 97663eed67faSmbalmer 97673eed67faSmbalmerAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 97683eed67faSmbalmerAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 97693eed67faSmbalmerAC_SUBST([am__tar]) 97703eed67faSmbalmerAC_SUBST([am__untar]) 97713eed67faSmbalmer]) # _AM_PROG_TAR 97723eed67faSmbalmer 9773dc407927Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 97743eed67faSmbalmerdnl 9775dd0822caSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved. 97763eed67faSmbalmerdnl 97773eed67faSmbalmerdnl Permission is hereby granted, free of charge, to any person obtaining a 9778dc407927Smrgdnl copy of this software and associated documentation files (the "Software"), 9779dc407927Smrgdnl to deal in the Software without restriction, including without limitation 9780dc407927Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense, 9781dc407927Smrgdnl and/or sell copies of the Software, and to permit persons to whom the 9782dc407927Smrgdnl Software is furnished to do so, subject to the following conditions: 97833eed67faSmbalmerdnl 9784dc407927Smrgdnl The above copyright notice and this permission notice (including the next 9785dc407927Smrgdnl paragraph) shall be included in all copies or substantial portions of the 9786dc407927Smrgdnl Software. 97873eed67faSmbalmerdnl 9788dc407927Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 9789dc407927Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 9790dc407927Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 9791dc407927Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 9792dc407927Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 9793dc407927Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 9794dc407927Smrgdnl DEALINGS IN THE SOFTWARE. 97953eed67faSmbalmer 97963eed67faSmbalmer# XORG_MACROS_VERSION(required-version) 97973eed67faSmbalmer# ------------------------------------- 97983eed67faSmbalmer# Minimum version: 1.1.0 97993eed67faSmbalmer# 98003eed67faSmbalmer# If you're using a macro added in Version 1.1 or newer, include this in 98013eed67faSmbalmer# your configure.ac with the minimum required version, such as: 98023eed67faSmbalmer# XORG_MACROS_VERSION(1.1) 98033eed67faSmbalmer# 9804dc407927Smrg# To ensure that this macro is defined, also add: 9805dc407927Smrg# m4_ifndef([XORG_MACROS_VERSION], 9806dc407927Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 98073eed67faSmbalmer# 98083eed67faSmbalmer# 98093eed67faSmbalmer# See the "minimum version" comment for each macro you use to see what 9810dc407927Smrg# version you require. 9811dc407927Smrgm4_defun([XORG_MACROS_VERSION],[ 981275cbef56Smrgm4_define([vers_have], [1.17]) 9813dc407927Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9814dc407927Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9815dc407927Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9816dc407927Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9817dc407927Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9818dc407927Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9819dc407927Smrgm4_undefine([vers_have]) 9820dc407927Smrgm4_undefine([maj_have]) 9821dc407927Smrgm4_undefine([maj_needed]) 98223eed67faSmbalmer]) # XORG_MACROS_VERSION 98233eed67faSmbalmer 98243eed67faSmbalmer# XORG_PROG_RAWCPP() 98253eed67faSmbalmer# ------------------ 98263eed67faSmbalmer# Minimum version: 1.0.0 98273eed67faSmbalmer# 98283eed67faSmbalmer# Find cpp program and necessary flags for use in pre-processing text files 98293eed67faSmbalmer# such as man pages and config files 98303eed67faSmbalmerAC_DEFUN([XORG_PROG_RAWCPP],[ 98313eed67faSmbalmerAC_REQUIRE([AC_PROG_CPP]) 98323eed67faSmbalmerAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 98333eed67faSmbalmer [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 98343eed67faSmbalmer 98353eed67faSmbalmer# Check for flag to avoid builtin definitions - assumes unix is predefined, 98363eed67faSmbalmer# which is not the best choice for supporting other OS'es, but covers most 98373eed67faSmbalmer# of the ones we need for now. 98383eed67faSmbalmerAC_MSG_CHECKING([if $RAWCPP requires -undef]) 983975cbef56SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])]) 98403eed67faSmbalmerif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 98413eed67faSmbalmer AC_MSG_RESULT([no]) 98423eed67faSmbalmerelse 98433eed67faSmbalmer if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 98443eed67faSmbalmer RAWCPPFLAGS=-undef 98453eed67faSmbalmer AC_MSG_RESULT([yes]) 9846dc407927Smrg # under Cygwin unix is still defined even with -undef 9847dc407927Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9848dc407927Smrg RAWCPPFLAGS="-undef -ansi" 9849dc407927Smrg AC_MSG_RESULT([yes, with -ansi]) 98503eed67faSmbalmer else 98513eed67faSmbalmer AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 98523eed67faSmbalmer fi 98533eed67faSmbalmerfi 98543eed67faSmbalmerrm -f conftest.$ac_ext 98553eed67faSmbalmer 98563eed67faSmbalmerAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 985775cbef56SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve "whitespace"?]])]) 98583eed67faSmbalmerif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 98593eed67faSmbalmer AC_MSG_RESULT([no]) 98603eed67faSmbalmerelse 98613eed67faSmbalmer if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 98623eed67faSmbalmer RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 98633eed67faSmbalmer AC_MSG_RESULT([yes]) 98643eed67faSmbalmer else 98653eed67faSmbalmer AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 98663eed67faSmbalmer fi 98673eed67faSmbalmerfi 98683eed67faSmbalmerrm -f conftest.$ac_ext 98693eed67faSmbalmerAC_SUBST(RAWCPPFLAGS) 98703eed67faSmbalmer]) # XORG_PROG_RAWCPP 98713eed67faSmbalmer 98723eed67faSmbalmer# XORG_MANPAGE_SECTIONS() 98733eed67faSmbalmer# ----------------------- 98743eed67faSmbalmer# Minimum version: 1.0.0 98753eed67faSmbalmer# 98763eed67faSmbalmer# Determine which sections man pages go in for the different man page types 98773eed67faSmbalmer# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 98783eed67faSmbalmer# Not sure if there's any better way than just hardcoding by OS name. 98793eed67faSmbalmer# Override default settings by setting environment variables 9880dc407927Smrg# Added MAN_SUBSTS in version 1.8 9881dc407927Smrg# Added AC_PROG_SED in version 1.8 98823eed67faSmbalmer 98833eed67faSmbalmerAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 98843eed67faSmbalmerAC_REQUIRE([AC_CANONICAL_HOST]) 9885dc407927SmrgAC_REQUIRE([AC_PROG_SED]) 98863eed67faSmbalmer 98873eed67faSmbalmerif test x$APP_MAN_SUFFIX = x ; then 98883eed67faSmbalmer APP_MAN_SUFFIX=1 98893eed67faSmbalmerfi 98903eed67faSmbalmerif test x$APP_MAN_DIR = x ; then 98913eed67faSmbalmer APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 98923eed67faSmbalmerfi 98933eed67faSmbalmer 98943eed67faSmbalmerif test x$LIB_MAN_SUFFIX = x ; then 98953eed67faSmbalmer LIB_MAN_SUFFIX=3 98963eed67faSmbalmerfi 98973eed67faSmbalmerif test x$LIB_MAN_DIR = x ; then 98983eed67faSmbalmer LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 98993eed67faSmbalmerfi 99003eed67faSmbalmer 99013eed67faSmbalmerif test x$FILE_MAN_SUFFIX = x ; then 99023eed67faSmbalmer case $host_os in 99033eed67faSmbalmer solaris*) FILE_MAN_SUFFIX=4 ;; 99043eed67faSmbalmer *) FILE_MAN_SUFFIX=5 ;; 99053eed67faSmbalmer esac 99063eed67faSmbalmerfi 99073eed67faSmbalmerif test x$FILE_MAN_DIR = x ; then 99083eed67faSmbalmer FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 99093eed67faSmbalmerfi 99103eed67faSmbalmer 99113eed67faSmbalmerif test x$MISC_MAN_SUFFIX = x ; then 99123eed67faSmbalmer case $host_os in 99133eed67faSmbalmer solaris*) MISC_MAN_SUFFIX=5 ;; 99143eed67faSmbalmer *) MISC_MAN_SUFFIX=7 ;; 99153eed67faSmbalmer esac 99163eed67faSmbalmerfi 99173eed67faSmbalmerif test x$MISC_MAN_DIR = x ; then 99183eed67faSmbalmer MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 99193eed67faSmbalmerfi 99203eed67faSmbalmer 99213eed67faSmbalmerif test x$DRIVER_MAN_SUFFIX = x ; then 99223eed67faSmbalmer case $host_os in 99233eed67faSmbalmer solaris*) DRIVER_MAN_SUFFIX=7 ;; 99243eed67faSmbalmer *) DRIVER_MAN_SUFFIX=4 ;; 99253eed67faSmbalmer esac 99263eed67faSmbalmerfi 99273eed67faSmbalmerif test x$DRIVER_MAN_DIR = x ; then 99283eed67faSmbalmer DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 99293eed67faSmbalmerfi 99303eed67faSmbalmer 99313eed67faSmbalmerif test x$ADMIN_MAN_SUFFIX = x ; then 99323eed67faSmbalmer case $host_os in 99333eed67faSmbalmer solaris*) ADMIN_MAN_SUFFIX=1m ;; 99343eed67faSmbalmer *) ADMIN_MAN_SUFFIX=8 ;; 99353eed67faSmbalmer esac 99363eed67faSmbalmerfi 99373eed67faSmbalmerif test x$ADMIN_MAN_DIR = x ; then 99383eed67faSmbalmer ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 99393eed67faSmbalmerfi 99403eed67faSmbalmer 99413eed67faSmbalmer 99423eed67faSmbalmerAC_SUBST([APP_MAN_SUFFIX]) 99433eed67faSmbalmerAC_SUBST([LIB_MAN_SUFFIX]) 99443eed67faSmbalmerAC_SUBST([FILE_MAN_SUFFIX]) 99453eed67faSmbalmerAC_SUBST([MISC_MAN_SUFFIX]) 99463eed67faSmbalmerAC_SUBST([DRIVER_MAN_SUFFIX]) 99473eed67faSmbalmerAC_SUBST([ADMIN_MAN_SUFFIX]) 99483eed67faSmbalmerAC_SUBST([APP_MAN_DIR]) 99493eed67faSmbalmerAC_SUBST([LIB_MAN_DIR]) 99503eed67faSmbalmerAC_SUBST([FILE_MAN_DIR]) 99513eed67faSmbalmerAC_SUBST([MISC_MAN_DIR]) 99523eed67faSmbalmerAC_SUBST([DRIVER_MAN_DIR]) 99533eed67faSmbalmerAC_SUBST([ADMIN_MAN_DIR]) 9954dc407927Smrg 9955dc407927SmrgXORG_MAN_PAGE="X Version 11" 9956dc407927SmrgAC_SUBST([XORG_MAN_PAGE]) 9957dc407927SmrgMAN_SUBSTS="\ 9958dc407927Smrg -e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9959dc407927Smrg -e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \ 9960dc407927Smrg -e 's|__xservername__|Xorg|g' \ 9961dc407927Smrg -e 's|__xconfigfile__|xorg.conf|g' \ 9962dd0822caSmrg -e 's|__xorgconfdir__|xorg.conf.d|g' \ 9963dc407927Smrg -e 's|__projectroot__|\$(prefix)|g' \ 9964dd0822caSmrg -e 's|__apploaddir__|\$(appdefaultdir)|g' \ 9965dc407927Smrg -e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \ 9966dc407927Smrg -e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \ 9967dc407927Smrg -e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \ 9968dc407927Smrg -e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \ 9969dc407927Smrg -e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \ 9970dc407927Smrg -e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'" 9971dc407927SmrgAC_SUBST([MAN_SUBSTS]) 9972dc407927Smrg 99733eed67faSmbalmer]) # XORG_MANPAGE_SECTIONS 99743eed67faSmbalmer 9975dc407927Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION]) 9976dc407927Smrg# ------------------------ 9977dc407927Smrg# Minimum version: 1.7.0 9978dc407927Smrg# 9979dc407927Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent 9980dc407927Smrg# provided by xorg-sgml-doctools, if installed. 9981dc407927SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[ 9982dc407927SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])]) 9983dc407927SmrgXORG_SGML_PATH= 9984dc407927SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])], 9985dc407927Smrg [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`], 9986dc407927Smrg [m4_ifval([$1],[:], 9987dc407927Smrg [if test x"$cross_compiling" != x"yes" ; then 9988dc407927Smrg AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent], 9989dc407927Smrg [XORG_SGML_PATH=$prefix/share/sgml]) 9990dc407927Smrg fi]) 9991dc407927Smrg ]) 9992dc407927Smrg 9993dd0822caSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing 9994dd0822caSmrg# the path and the name of the doc stylesheet 9995dc407927Smrgif test "x$XORG_SGML_PATH" != "x" ; then 9996dc407927Smrg AC_MSG_RESULT([$XORG_SGML_PATH]) 9997dd0822caSmrg STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11 9998dd0822caSmrg XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl 9999dc407927Smrgelse 10000dc407927Smrg AC_MSG_RESULT([no]) 10001dc407927Smrgfi 10002dc407927Smrg 10003dc407927SmrgAC_SUBST(XORG_SGML_PATH) 10004dd0822caSmrgAC_SUBST(STYLESHEET_SRCDIR) 10005dd0822caSmrgAC_SUBST(XSL_STYLESHEET) 10006dd0822caSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"]) 10007dc407927Smrg]) # XORG_CHECK_SGML_DOCTOOLS 10008dc407927Smrg 100093eed67faSmbalmer# XORG_CHECK_LINUXDOC 100103eed67faSmbalmer# ------------------- 100113eed67faSmbalmer# Minimum version: 1.0.0 100123eed67faSmbalmer# 100133eed67faSmbalmer# Defines the variable MAKE_TEXT if the necessary tools and 100143eed67faSmbalmer# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 100153eed67faSmbalmer# Whether or not the necessary tools and files are found can be checked 100163eed67faSmbalmer# with the AM_CONDITIONAL "BUILD_LINUXDOC" 100173eed67faSmbalmerAC_DEFUN([XORG_CHECK_LINUXDOC],[ 10018dc407927SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10019dc407927SmrgAC_REQUIRE([XORG_WITH_PS2PDF]) 100203eed67faSmbalmer 100213eed67faSmbalmerAC_PATH_PROG(LINUXDOC, linuxdoc) 100223eed67faSmbalmer 10023dc407927SmrgAC_MSG_CHECKING([whether to build documentation]) 100243eed67faSmbalmer 10025dc407927Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then 100263eed67faSmbalmer BUILDDOC=yes 100273eed67faSmbalmerelse 100283eed67faSmbalmer BUILDDOC=no 100293eed67faSmbalmerfi 100303eed67faSmbalmer 100313eed67faSmbalmerAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 100323eed67faSmbalmer 100333eed67faSmbalmerAC_MSG_RESULT([$BUILDDOC]) 100343eed67faSmbalmer 10035dc407927SmrgAC_MSG_CHECKING([whether to build pdf documentation]) 100363eed67faSmbalmer 10037dc407927Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then 100383eed67faSmbalmer BUILDPDFDOC=yes 100393eed67faSmbalmerelse 100403eed67faSmbalmer BUILDPDFDOC=no 100413eed67faSmbalmerfi 100423eed67faSmbalmer 100433eed67faSmbalmerAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 100443eed67faSmbalmer 100453eed67faSmbalmerAC_MSG_RESULT([$BUILDPDFDOC]) 100463eed67faSmbalmer 10047dc407927SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f" 100483eed67faSmbalmerMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 100493eed67faSmbalmerMAKE_PDF="$PS2PDF" 100503eed67faSmbalmerMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 100513eed67faSmbalmer 100523eed67faSmbalmerAC_SUBST(MAKE_TEXT) 100533eed67faSmbalmerAC_SUBST(MAKE_PS) 100543eed67faSmbalmerAC_SUBST(MAKE_PDF) 100553eed67faSmbalmerAC_SUBST(MAKE_HTML) 100563eed67faSmbalmer]) # XORG_CHECK_LINUXDOC 100573eed67faSmbalmer 100583eed67faSmbalmer# XORG_CHECK_DOCBOOK 100593eed67faSmbalmer# ------------------- 100603eed67faSmbalmer# Minimum version: 1.0.0 100613eed67faSmbalmer# 100623eed67faSmbalmer# Checks for the ability to build output formats from SGML DocBook source. 100633eed67faSmbalmer# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 100643eed67faSmbalmer# indicates whether the necessary tools and files are found and, if set, 100653eed67faSmbalmer# $(MAKE_XXX) blah.sgml will produce blah.xxx. 100663eed67faSmbalmerAC_DEFUN([XORG_CHECK_DOCBOOK],[ 10067dc407927SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS]) 10068dc407927Smrg 100693eed67faSmbalmerBUILDTXTDOC=no 100703eed67faSmbalmerBUILDPDFDOC=no 100713eed67faSmbalmerBUILDPSDOC=no 100723eed67faSmbalmerBUILDHTMLDOC=no 100733eed67faSmbalmer 100743eed67faSmbalmerAC_PATH_PROG(DOCBOOKPS, docbook2ps) 100753eed67faSmbalmerAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 100763eed67faSmbalmerAC_PATH_PROG(DOCBOOKHTML, docbook2html) 100773eed67faSmbalmerAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 100783eed67faSmbalmer 10079dc407927SmrgAC_MSG_CHECKING([whether to build text documentation]) 10080dc407927Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x && 100813eed67faSmbalmer test x$BUILD_TXTDOC != xno; then 100823eed67faSmbalmer BUILDTXTDOC=yes 100833eed67faSmbalmerfi 100843eed67faSmbalmerAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 100853eed67faSmbalmerAC_MSG_RESULT([$BUILDTXTDOC]) 100863eed67faSmbalmer 10087dc407927SmrgAC_MSG_CHECKING([whether to build PDF documentation]) 10088dc407927Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x && 100893eed67faSmbalmer test x$BUILD_PDFDOC != xno; then 100903eed67faSmbalmer BUILDPDFDOC=yes 100913eed67faSmbalmerfi 100923eed67faSmbalmerAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 100933eed67faSmbalmerAC_MSG_RESULT([$BUILDPDFDOC]) 100943eed67faSmbalmer 10095dc407927SmrgAC_MSG_CHECKING([whether to build PostScript documentation]) 10096dc407927Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x && 100973eed67faSmbalmer test x$BUILD_PSDOC != xno; then 100983eed67faSmbalmer BUILDPSDOC=yes 100993eed67faSmbalmerfi 101003eed67faSmbalmerAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 101013eed67faSmbalmerAC_MSG_RESULT([$BUILDPSDOC]) 101023eed67faSmbalmer 10103dc407927SmrgAC_MSG_CHECKING([whether to build HTML documentation]) 10104dc407927Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x && 101053eed67faSmbalmer test x$BUILD_HTMLDOC != xno; then 101063eed67faSmbalmer BUILDHTMLDOC=yes 101073eed67faSmbalmerfi 101083eed67faSmbalmerAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 101093eed67faSmbalmerAC_MSG_RESULT([$BUILDHTMLDOC]) 101103eed67faSmbalmer 101113eed67faSmbalmerMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 101123eed67faSmbalmerMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 101133eed67faSmbalmerMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 101143eed67faSmbalmerMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 101153eed67faSmbalmer 101163eed67faSmbalmerAC_SUBST(MAKE_TEXT) 101173eed67faSmbalmerAC_SUBST(MAKE_PS) 101183eed67faSmbalmerAC_SUBST(MAKE_PDF) 101193eed67faSmbalmerAC_SUBST(MAKE_HTML) 101203eed67faSmbalmer]) # XORG_CHECK_DOCBOOK 101213eed67faSmbalmer 10122dd0822caSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT]) 10123dc407927Smrg# ---------------- 10124dc407927Smrg# Minimum version: 1.5.0 10125dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10126dc407927Smrg# 10127dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10128dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10129dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10130dc407927Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions 10131dd0822caSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified, 10132dd0822caSmrg# --with-xmlto assumes 'auto'. 10133dc407927Smrg# 10134dc407927Smrg# Interface to module: 10135dc407927Smrg# HAVE_XMLTO: used in makefiles to conditionally generate documentation 10136dc407927Smrg# XMLTO: returns the path of the xmlto program found 10137dc407927Smrg# returns the path set by the user in the environment 10138dc407927Smrg# --with-xmlto: 'yes' user instructs the module to use xmlto 10139dc407927Smrg# 'no' user instructs the module not to use xmlto 10140dc407927Smrg# 10141dd0822caSmrg# Added in version 1.10.0 10142dd0822caSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation 10143dd0822caSmrg# xmlto for text output requires either lynx, links, or w3m browsers 10144dd0822caSmrg# 10145dc407927Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path. 10146dc407927Smrg# 10147dc407927SmrgAC_DEFUN([XORG_WITH_XMLTO],[ 10148dc407927SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command]) 10149dd0822caSmrgm4_define([_defopt], m4_default([$2], [auto])) 10150dc407927SmrgAC_ARG_WITH(xmlto, 10151dc407927Smrg AS_HELP_STRING([--with-xmlto], 10152dd0822caSmrg [Use xmlto to regenerate documentation (default: ]_defopt[)]), 10153dd0822caSmrg [use_xmlto=$withval], [use_xmlto=]_defopt) 10154dd0822caSmrgm4_undefine([_defopt]) 10155dc407927Smrg 10156dc407927Smrgif test "x$use_xmlto" = x"auto"; then 10157dc407927Smrg AC_PATH_PROG([XMLTO], [xmlto]) 10158dc407927Smrg if test "x$XMLTO" = "x"; then 10159dc407927Smrg AC_MSG_WARN([xmlto not found - documentation targets will be skipped]) 10160dc407927Smrg have_xmlto=no 10161dc407927Smrg else 10162dc407927Smrg have_xmlto=yes 10163dc407927Smrg fi 10164dc407927Smrgelif test "x$use_xmlto" = x"yes" ; then 10165dc407927Smrg AC_PATH_PROG([XMLTO], [xmlto]) 10166dc407927Smrg if test "x$XMLTO" = "x"; then 10167dc407927Smrg AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH]) 10168dc407927Smrg fi 10169dc407927Smrg have_xmlto=yes 10170dc407927Smrgelif test "x$use_xmlto" = x"no" ; then 10171dc407927Smrg if test "x$XMLTO" != "x"; then 10172dc407927Smrg AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified]) 10173dc407927Smrg fi 10174dc407927Smrg have_xmlto=no 10175dc407927Smrgelse 10176dc407927Smrg AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no']) 10177dc407927Smrgfi 10178dd0822caSmrg 10179dd0822caSmrg# Test for a minimum version of xmlto, if provided. 10180dc407927Smrgm4_ifval([$1], 10181dc407927Smrg[if test "$have_xmlto" = yes; then 10182dc407927Smrg # scrape the xmlto version 10183dc407927Smrg AC_MSG_CHECKING([the xmlto version]) 10184dc407927Smrg xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3` 10185dc407927Smrg AC_MSG_RESULT([$xmlto_version]) 10186dc407927Smrg AS_VERSION_COMPARE([$xmlto_version], [$1], 10187dc407927Smrg [if test "x$use_xmlto" = xauto; then 10188dc407927Smrg AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed]) 10189dc407927Smrg have_xmlto=no 10190dc407927Smrg else 10191dc407927Smrg AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed]) 10192dc407927Smrg fi]) 10193dc407927Smrgfi]) 10194dd0822caSmrg 10195dd0822caSmrg# Test for the ability of xmlto to generate a text target 10196dd0822caSmrghave_xmlto_text=no 10197dd0822caSmrgcat > conftest.xml << "EOF" 10198dd0822caSmrgEOF 10199dd0822caSmrgAS_IF([test "$have_xmlto" = yes], 10200dd0822caSmrg [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1], 10201dd0822caSmrg [have_xmlto_text=yes], 10202dd0822caSmrg [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])]) 10203dd0822caSmrgrm -f conftest.xml 10204dd0822caSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes]) 10205dc407927SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes]) 10206dc407927Smrg]) # XORG_WITH_XMLTO 10207dc407927Smrg 10208dd0822caSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT]) 10209dd0822caSmrg# -------------------------------------------- 10210dd0822caSmrg# Minimum version: 1.12.0 10211dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.12.0 10212dd0822caSmrg# 10213dd0822caSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative, 10214dd0822caSmrg# XML-based language used for the transformation of XML documents. 10215dd0822caSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents. 10216dd0822caSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML. 10217dd0822caSmrg# The XSLT processor is often used as a standalone tool for transformations. 10218dd0822caSmrg# It should not be assumed that this tool is used only to work with documnetation. 10219dd0822caSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'. 10220dd0822caSmrg# 10221dd0822caSmrg# Interface to module: 10222dd0822caSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation 10223dd0822caSmrg# XSLTPROC: returns the path of the xsltproc program found 10224dd0822caSmrg# returns the path set by the user in the environment 10225dd0822caSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc 10226dd0822caSmrg# 'no' user instructs the module not to use xsltproc 10227dd0822caSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no 10228dd0822caSmrg# 10229dd0822caSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path. 10230dd0822caSmrg# 10231dd0822caSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[ 10232dd0822caSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command]) 1023375cbef56Smrg# Preserves the interface, should it be implemented later 1023475cbef56Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])]) 10235dd0822caSmrgm4_define([_defopt], m4_default([$2], [auto])) 10236dd0822caSmrgAC_ARG_WITH(xsltproc, 10237dd0822caSmrg AS_HELP_STRING([--with-xsltproc], 10238dd0822caSmrg [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]), 10239dd0822caSmrg [use_xsltproc=$withval], [use_xsltproc=]_defopt) 10240dd0822caSmrgm4_undefine([_defopt]) 10241dd0822caSmrg 10242dd0822caSmrgif test "x$use_xsltproc" = x"auto"; then 10243dd0822caSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10244dd0822caSmrg if test "x$XSLTPROC" = "x"; then 10245dd0822caSmrg AC_MSG_WARN([xsltproc not found - cannot transform XML documents]) 10246dd0822caSmrg have_xsltproc=no 10247dd0822caSmrg else 10248dd0822caSmrg have_xsltproc=yes 10249dd0822caSmrg fi 10250dd0822caSmrgelif test "x$use_xsltproc" = x"yes" ; then 10251dd0822caSmrg AC_PATH_PROG([XSLTPROC], [xsltproc]) 10252dd0822caSmrg if test "x$XSLTPROC" = "x"; then 10253dd0822caSmrg AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH]) 10254dd0822caSmrg fi 10255dd0822caSmrg have_xsltproc=yes 10256dd0822caSmrgelif test "x$use_xsltproc" = x"no" ; then 10257dd0822caSmrg if test "x$XSLTPROC" != "x"; then 10258dd0822caSmrg AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified]) 10259dd0822caSmrg fi 10260dd0822caSmrg have_xsltproc=no 10261dd0822caSmrgelse 10262dd0822caSmrg AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no']) 10263dd0822caSmrgfi 10264dd0822caSmrg 10265dd0822caSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes]) 10266dd0822caSmrg]) # XORG_WITH_XSLTPROC 10267dd0822caSmrg 1026875cbef56Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT]) 1026975cbef56Smrg# ---------------------------------------- 1027075cbef56Smrg# Minimum version: 1.15.0 1027175cbef56Smrg# 1027275cbef56Smrg# PERL (Practical Extraction and Report Language) is a language optimized for 1027375cbef56Smrg# scanning arbitrary text files, extracting information from those text files, 1027475cbef56Smrg# and printing reports based on that information. 1027575cbef56Smrg# 1027675cbef56Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'. 1027775cbef56Smrg# 1027875cbef56Smrg# Interface to module: 1027975cbef56Smrg# HAVE_PERL: used in makefiles to conditionally scan text files 1028075cbef56Smrg# PERL: returns the path of the perl program found 1028175cbef56Smrg# returns the path set by the user in the environment 1028275cbef56Smrg# --with-perl: 'yes' user instructs the module to use perl 1028375cbef56Smrg# 'no' user instructs the module not to use perl 1028475cbef56Smrg# have_perl: returns yes if perl found in PATH or no 1028575cbef56Smrg# 1028675cbef56Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path. 1028775cbef56Smrg# 1028875cbef56SmrgAC_DEFUN([XORG_WITH_PERL],[ 1028975cbef56SmrgAC_ARG_VAR([PERL], [Path to perl command]) 1029075cbef56Smrg# Preserves the interface, should it be implemented later 1029175cbef56Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])]) 1029275cbef56Smrgm4_define([_defopt], m4_default([$2], [auto])) 1029375cbef56SmrgAC_ARG_WITH(perl, 1029475cbef56Smrg AS_HELP_STRING([--with-perl], 1029575cbef56Smrg [Use perl for extracting information from files (default: ]_defopt[)]), 1029675cbef56Smrg [use_perl=$withval], [use_perl=]_defopt) 1029775cbef56Smrgm4_undefine([_defopt]) 1029875cbef56Smrg 1029975cbef56Smrgif test "x$use_perl" = x"auto"; then 1030075cbef56Smrg AC_PATH_PROG([PERL], [perl]) 1030175cbef56Smrg if test "x$PERL" = "x"; then 1030275cbef56Smrg AC_MSG_WARN([perl not found - cannot extract information and report]) 1030375cbef56Smrg have_perl=no 1030475cbef56Smrg else 1030575cbef56Smrg have_perl=yes 1030675cbef56Smrg fi 1030775cbef56Smrgelif test "x$use_perl" = x"yes" ; then 1030875cbef56Smrg AC_PATH_PROG([PERL], [perl]) 1030975cbef56Smrg if test "x$PERL" = "x"; then 1031075cbef56Smrg AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH]) 1031175cbef56Smrg fi 1031275cbef56Smrg have_perl=yes 1031375cbef56Smrgelif test "x$use_perl" = x"no" ; then 1031475cbef56Smrg if test "x$PERL" != "x"; then 1031575cbef56Smrg AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified]) 1031675cbef56Smrg fi 1031775cbef56Smrg have_perl=no 1031875cbef56Smrgelse 1031975cbef56Smrg AC_MSG_ERROR([--with-perl expects 'yes' or 'no']) 1032075cbef56Smrgfi 1032175cbef56Smrg 1032275cbef56SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes]) 1032375cbef56Smrg]) # XORG_WITH_PERL 10324dd0822caSmrg 10325dd0822caSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT]) 10326dc407927Smrg# ---------------- 10327dc407927Smrg# Minimum version: 1.5.0 10328dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10329dc407927Smrg# 10330dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10331dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10332dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10333dc407927Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions 10334dd0822caSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified, 10335dd0822caSmrg# --with-asciidoc assumes 'auto'. 10336dc407927Smrg# 10337dc407927Smrg# Interface to module: 10338dc407927Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation 10339dc407927Smrg# ASCIIDOC: returns the path of the asciidoc program found 10340dc407927Smrg# returns the path set by the user in the environment 10341dc407927Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc 10342dc407927Smrg# 'no' user instructs the module not to use asciidoc 10343dc407927Smrg# 10344dc407927Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path. 10345dc407927Smrg# 10346dc407927SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[ 10347dc407927SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command]) 10348dd0822caSmrgm4_define([_defopt], m4_default([$2], [auto])) 10349dc407927SmrgAC_ARG_WITH(asciidoc, 10350dc407927Smrg AS_HELP_STRING([--with-asciidoc], 10351dd0822caSmrg [Use asciidoc to regenerate documentation (default: ]_defopt[)]), 10352dd0822caSmrg [use_asciidoc=$withval], [use_asciidoc=]_defopt) 10353dd0822caSmrgm4_undefine([_defopt]) 10354dc407927Smrg 10355dc407927Smrgif test "x$use_asciidoc" = x"auto"; then 10356dc407927Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10357dc407927Smrg if test "x$ASCIIDOC" = "x"; then 10358dc407927Smrg AC_MSG_WARN([asciidoc not found - documentation targets will be skipped]) 10359dc407927Smrg have_asciidoc=no 10360dc407927Smrg else 10361dc407927Smrg have_asciidoc=yes 10362dc407927Smrg fi 10363dc407927Smrgelif test "x$use_asciidoc" = x"yes" ; then 10364dc407927Smrg AC_PATH_PROG([ASCIIDOC], [asciidoc]) 10365dc407927Smrg if test "x$ASCIIDOC" = "x"; then 10366dc407927Smrg AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH]) 10367dc407927Smrg fi 10368dc407927Smrg have_asciidoc=yes 10369dc407927Smrgelif test "x$use_asciidoc" = x"no" ; then 10370dc407927Smrg if test "x$ASCIIDOC" != "x"; then 10371dc407927Smrg AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified]) 10372dc407927Smrg fi 10373dc407927Smrg have_asciidoc=no 10374dc407927Smrgelse 10375dc407927Smrg AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no']) 10376dc407927Smrgfi 10377dc407927Smrgm4_ifval([$1], 10378dc407927Smrg[if test "$have_asciidoc" = yes; then 10379dc407927Smrg # scrape the asciidoc version 10380dc407927Smrg AC_MSG_CHECKING([the asciidoc version]) 10381dc407927Smrg asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2` 10382dc407927Smrg AC_MSG_RESULT([$asciidoc_version]) 10383dc407927Smrg AS_VERSION_COMPARE([$asciidoc_version], [$1], 10384dc407927Smrg [if test "x$use_asciidoc" = xauto; then 10385dc407927Smrg AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed]) 10386dc407927Smrg have_asciidoc=no 10387dc407927Smrg else 10388dc407927Smrg AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed]) 10389dc407927Smrg fi]) 10390dc407927Smrgfi]) 10391dc407927SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes]) 10392dc407927Smrg]) # XORG_WITH_ASCIIDOC 10393dc407927Smrg 10394dd0822caSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT]) 10395dc407927Smrg# -------------------------------- 10396dc407927Smrg# Minimum version: 1.5.0 10397dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10398dc407927Smrg# 10399dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10400dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10401dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10402dc407927Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions 10403dd0822caSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified, 10404dd0822caSmrg# --with-doxygen assumes 'auto'. 10405dc407927Smrg# 10406dc407927Smrg# Interface to module: 10407dc407927Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation 10408dc407927Smrg# DOXYGEN: returns the path of the doxygen program found 10409dc407927Smrg# returns the path set by the user in the environment 10410dc407927Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen 10411dc407927Smrg# 'no' user instructs the module not to use doxygen 10412dc407927Smrg# 10413dc407927Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path. 10414dc407927Smrg# 10415dc407927SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[ 10416dc407927SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command]) 10417dd0822caSmrgm4_define([_defopt], m4_default([$2], [auto])) 10418dc407927SmrgAC_ARG_WITH(doxygen, 10419dc407927Smrg AS_HELP_STRING([--with-doxygen], 10420dd0822caSmrg [Use doxygen to regenerate documentation (default: ]_defopt[)]), 10421dd0822caSmrg [use_doxygen=$withval], [use_doxygen=]_defopt) 10422dd0822caSmrgm4_undefine([_defopt]) 10423dc407927Smrg 10424dc407927Smrgif test "x$use_doxygen" = x"auto"; then 10425dc407927Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10426dc407927Smrg if test "x$DOXYGEN" = "x"; then 10427dc407927Smrg AC_MSG_WARN([doxygen not found - documentation targets will be skipped]) 10428dc407927Smrg have_doxygen=no 10429dc407927Smrg else 10430dc407927Smrg have_doxygen=yes 10431dc407927Smrg fi 10432dc407927Smrgelif test "x$use_doxygen" = x"yes" ; then 10433dc407927Smrg AC_PATH_PROG([DOXYGEN], [doxygen]) 10434dc407927Smrg if test "x$DOXYGEN" = "x"; then 10435dc407927Smrg AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH]) 10436dc407927Smrg fi 10437dc407927Smrg have_doxygen=yes 10438dc407927Smrgelif test "x$use_doxygen" = x"no" ; then 10439dc407927Smrg if test "x$DOXYGEN" != "x"; then 10440dc407927Smrg AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified]) 10441dc407927Smrg fi 10442dc407927Smrg have_doxygen=no 10443dc407927Smrgelse 10444dc407927Smrg AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no']) 10445dc407927Smrgfi 10446dc407927Smrgm4_ifval([$1], 10447dc407927Smrg[if test "$have_doxygen" = yes; then 10448dc407927Smrg # scrape the doxygen version 10449dc407927Smrg AC_MSG_CHECKING([the doxygen version]) 10450dc407927Smrg doxygen_version=`$DOXYGEN --version 2>/dev/null` 10451dc407927Smrg AC_MSG_RESULT([$doxygen_version]) 10452dc407927Smrg AS_VERSION_COMPARE([$doxygen_version], [$1], 10453dc407927Smrg [if test "x$use_doxygen" = xauto; then 10454dc407927Smrg AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed]) 10455dc407927Smrg have_doxygen=no 10456dc407927Smrg else 10457dc407927Smrg AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed]) 10458dc407927Smrg fi]) 10459dc407927Smrgfi]) 10460dc407927SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes]) 10461dc407927Smrg]) # XORG_WITH_DOXYGEN 10462dc407927Smrg 10463dd0822caSmrg# XORG_WITH_GROFF([DEFAULT]) 10464dc407927Smrg# ---------------- 10465dc407927Smrg# Minimum version: 1.6.0 10466dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10467dc407927Smrg# 10468dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10469dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10470dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10471dc407927Smrg# the --with-groff option, it allows maximum flexibilty in making decisions 10472dd0822caSmrg# as whether or not to use the groff package. When DEFAULT is not specified, 10473dd0822caSmrg# --with-groff assumes 'auto'. 10474dc407927Smrg# 10475dc407927Smrg# Interface to module: 10476dc407927Smrg# HAVE_GROFF: used in makefiles to conditionally generate documentation 10477dc407927Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package 10478dc407927Smrg# HAVE_GROFF_MS: the -ms macros package 10479dc407927Smrg# GROFF: returns the path of the groff program found 10480dc407927Smrg# returns the path set by the user in the environment 10481dc407927Smrg# --with-groff: 'yes' user instructs the module to use groff 10482dc407927Smrg# 'no' user instructs the module not to use groff 10483dc407927Smrg# 10484dd0822caSmrg# Added in version 1.9.0: 10485dd0822caSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format: 10486dd0822caSmrg# pnmcut pnmcrop pnmtopng pnmtops from the netpbm package. 10487dd0822caSmrg# psselect from the psutils package. 10488dd0822caSmrg# the ghostcript package. Refer to the grohtml man pages 10489dd0822caSmrg# 10490dc407927Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path. 10491dc407927Smrg# 10492dc407927Smrg# OS and distros often splits groff in a basic and full package, the former 10493dc407927Smrg# having the groff program and the later having devices, fonts and macros 10494dc407927Smrg# Checking for the groff executable is not enough. 10495dc407927Smrg# 10496dc407927Smrg# If macros are missing, we cannot assume that groff is useless, so we don't 10497dc407927Smrg# unset HAVE_GROFF or GROFF env variables. 10498dc407927Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false. 10499dc407927Smrg# 10500dc407927SmrgAC_DEFUN([XORG_WITH_GROFF],[ 10501dc407927SmrgAC_ARG_VAR([GROFF], [Path to groff command]) 10502dd0822caSmrgm4_define([_defopt], m4_default([$1], [auto])) 10503dc407927SmrgAC_ARG_WITH(groff, 10504dc407927Smrg AS_HELP_STRING([--with-groff], 10505dd0822caSmrg [Use groff to regenerate documentation (default: ]_defopt[)]), 10506dd0822caSmrg [use_groff=$withval], [use_groff=]_defopt) 10507dd0822caSmrgm4_undefine([_defopt]) 10508dc407927Smrg 10509dc407927Smrgif test "x$use_groff" = x"auto"; then 10510dc407927Smrg AC_PATH_PROG([GROFF], [groff]) 10511dc407927Smrg if test "x$GROFF" = "x"; then 10512dc407927Smrg AC_MSG_WARN([groff not found - documentation targets will be skipped]) 10513dc407927Smrg have_groff=no 10514dc407927Smrg else 10515dc407927Smrg have_groff=yes 10516dc407927Smrg fi 10517dc407927Smrgelif test "x$use_groff" = x"yes" ; then 10518dc407927Smrg AC_PATH_PROG([GROFF], [groff]) 10519dc407927Smrg if test "x$GROFF" = "x"; then 10520dc407927Smrg AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH]) 10521dc407927Smrg fi 10522dc407927Smrg have_groff=yes 10523dc407927Smrgelif test "x$use_groff" = x"no" ; then 10524dc407927Smrg if test "x$GROFF" != "x"; then 10525dc407927Smrg AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified]) 10526dc407927Smrg fi 10527dc407927Smrg have_groff=no 10528dc407927Smrgelse 10529dc407927Smrg AC_MSG_ERROR([--with-groff expects 'yes' or 'no']) 10530dc407927Smrgfi 10531dd0822caSmrg 10532dc407927Smrg# We have groff, test for the presence of the macro packages 10533dc407927Smrgif test "x$have_groff" = x"yes"; then 10534dc407927Smrg AC_MSG_CHECKING([for ${GROFF} -ms macros]) 10535dc407927Smrg if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then 10536dc407927Smrg groff_ms_works=yes 10537dc407927Smrg else 10538dc407927Smrg groff_ms_works=no 10539dc407927Smrg fi 10540dc407927Smrg AC_MSG_RESULT([$groff_ms_works]) 10541dc407927Smrg AC_MSG_CHECKING([for ${GROFF} -mm macros]) 10542dc407927Smrg if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then 10543dc407927Smrg groff_mm_works=yes 10544dc407927Smrg else 10545dc407927Smrg groff_mm_works=no 10546dc407927Smrg fi 10547dc407927Smrg AC_MSG_RESULT([$groff_mm_works]) 10548dc407927Smrgfi 10549dd0822caSmrg 10550dd0822caSmrg# We have groff, test for HTML dependencies, one command per package 10551dd0822caSmrgif test "x$have_groff" = x"yes"; then 10552dd0822caSmrg AC_PATH_PROGS(GS_PATH, [gs gswin32c]) 10553dd0822caSmrg AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng]) 10554dd0822caSmrg AC_PATH_PROG(PSSELECT_PATH, [psselect]) 10555dd0822caSmrg if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then 10556dd0822caSmrg have_groff_html=yes 10557dd0822caSmrg else 10558dd0822caSmrg have_groff_html=no 10559dd0822caSmrg AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages]) 10560dd0822caSmrg fi 10561dd0822caSmrgfi 10562dd0822caSmrg 10563dd0822caSmrg# Set Automake conditionals for Makefiles 10564dc407927SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes]) 10565dc407927SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes]) 10566dc407927SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes]) 10567dd0822caSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes]) 10568dc407927Smrg]) # XORG_WITH_GROFF 10569dc407927Smrg 1057075cbef56Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT]) 1057175cbef56Smrg# --------------------------------------- 10572dc407927Smrg# Minimum version: 1.6.0 10573dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 1057475cbef56Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0 10575dc407927Smrg# 10576dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10577dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10578dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10579dc407927Smrg# the --with-fop option, it allows maximum flexibilty in making decisions 10580dd0822caSmrg# as whether or not to use the fop package. When DEFAULT is not specified, 10581dd0822caSmrg# --with-fop assumes 'auto'. 10582dc407927Smrg# 10583dc407927Smrg# Interface to module: 10584dc407927Smrg# HAVE_FOP: used in makefiles to conditionally generate documentation 10585dc407927Smrg# FOP: returns the path of the fop program found 10586dc407927Smrg# returns the path set by the user in the environment 10587dc407927Smrg# --with-fop: 'yes' user instructs the module to use fop 10588dc407927Smrg# 'no' user instructs the module not to use fop 10589dc407927Smrg# 10590dc407927Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path. 10591dc407927Smrg# 10592dc407927SmrgAC_DEFUN([XORG_WITH_FOP],[ 10593dc407927SmrgAC_ARG_VAR([FOP], [Path to fop command]) 1059475cbef56Smrgm4_define([_defopt], m4_default([$2], [auto])) 10595dc407927SmrgAC_ARG_WITH(fop, 10596dc407927Smrg AS_HELP_STRING([--with-fop], 10597dd0822caSmrg [Use fop to regenerate documentation (default: ]_defopt[)]), 10598dd0822caSmrg [use_fop=$withval], [use_fop=]_defopt) 10599dd0822caSmrgm4_undefine([_defopt]) 10600dc407927Smrg 10601dc407927Smrgif test "x$use_fop" = x"auto"; then 10602dc407927Smrg AC_PATH_PROG([FOP], [fop]) 10603dc407927Smrg if test "x$FOP" = "x"; then 10604dc407927Smrg AC_MSG_WARN([fop not found - documentation targets will be skipped]) 10605dc407927Smrg have_fop=no 10606dc407927Smrg else 10607dc407927Smrg have_fop=yes 10608dc407927Smrg fi 10609dc407927Smrgelif test "x$use_fop" = x"yes" ; then 10610dc407927Smrg AC_PATH_PROG([FOP], [fop]) 10611dc407927Smrg if test "x$FOP" = "x"; then 10612dc407927Smrg AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH]) 10613dc407927Smrg fi 10614dc407927Smrg have_fop=yes 10615dc407927Smrgelif test "x$use_fop" = x"no" ; then 10616dc407927Smrg if test "x$FOP" != "x"; then 10617dc407927Smrg AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified]) 10618dc407927Smrg fi 10619dc407927Smrg have_fop=no 10620dc407927Smrgelse 10621dc407927Smrg AC_MSG_ERROR([--with-fop expects 'yes' or 'no']) 10622dc407927Smrgfi 1062375cbef56Smrg 1062475cbef56Smrg# Test for a minimum version of fop, if provided. 1062575cbef56Smrgm4_ifval([$1], 1062675cbef56Smrg[if test "$have_fop" = yes; then 1062775cbef56Smrg # scrape the fop version 1062875cbef56Smrg AC_MSG_CHECKING([for fop minimum version]) 1062975cbef56Smrg fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3` 1063075cbef56Smrg AC_MSG_RESULT([$fop_version]) 1063175cbef56Smrg AS_VERSION_COMPARE([$fop_version], [$1], 1063275cbef56Smrg [if test "x$use_fop" = xauto; then 1063375cbef56Smrg AC_MSG_WARN([fop version $fop_version found, but $1 needed]) 1063475cbef56Smrg have_fop=no 1063575cbef56Smrg else 1063675cbef56Smrg AC_MSG_ERROR([fop version $fop_version found, but $1 needed]) 1063775cbef56Smrg fi]) 1063875cbef56Smrgfi]) 10639dc407927SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes]) 10640dc407927Smrg]) # XORG_WITH_FOP 10641dc407927Smrg 10642dd0822caSmrg# XORG_WITH_PS2PDF([DEFAULT]) 10643dc407927Smrg# ---------------- 10644dc407927Smrg# Minimum version: 1.6.0 10645dd0822caSmrg# Minimum version for optional DEFAULT argument: 1.11.0 10646dc407927Smrg# 10647dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10648dc407927Smrg# not at the appropriate level. This macro enables a module to test for the 10649dc407927Smrg# presence of the tool and obtain it's path in separate variables. Coupled with 10650dc407927Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions 10651dd0822caSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified, 10652dd0822caSmrg# --with-ps2pdf assumes 'auto'. 10653dc407927Smrg# 10654dc407927Smrg# Interface to module: 10655dc407927Smrg# HAVE_PS2PDF: used in makefiles to conditionally generate documentation 10656dc407927Smrg# PS2PDF: returns the path of the ps2pdf program found 10657dc407927Smrg# returns the path set by the user in the environment 10658dc407927Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf 10659dc407927Smrg# 'no' user instructs the module not to use ps2pdf 10660dc407927Smrg# 10661dc407927Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path. 10662dc407927Smrg# 10663dc407927SmrgAC_DEFUN([XORG_WITH_PS2PDF],[ 10664dc407927SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command]) 10665dd0822caSmrgm4_define([_defopt], m4_default([$1], [auto])) 10666dc407927SmrgAC_ARG_WITH(ps2pdf, 10667dc407927Smrg AS_HELP_STRING([--with-ps2pdf], 10668dd0822caSmrg [Use ps2pdf to regenerate documentation (default: ]_defopt[)]), 10669dd0822caSmrg [use_ps2pdf=$withval], [use_ps2pdf=]_defopt) 10670dd0822caSmrgm4_undefine([_defopt]) 10671dc407927Smrg 10672dc407927Smrgif test "x$use_ps2pdf" = x"auto"; then 10673dc407927Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10674dc407927Smrg if test "x$PS2PDF" = "x"; then 10675dc407927Smrg AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped]) 10676dc407927Smrg have_ps2pdf=no 10677dc407927Smrg else 10678dc407927Smrg have_ps2pdf=yes 10679dc407927Smrg fi 10680dc407927Smrgelif test "x$use_ps2pdf" = x"yes" ; then 10681dc407927Smrg AC_PATH_PROG([PS2PDF], [ps2pdf]) 10682dc407927Smrg if test "x$PS2PDF" = "x"; then 10683dc407927Smrg AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH]) 10684dc407927Smrg fi 10685dc407927Smrg have_ps2pdf=yes 10686dc407927Smrgelif test "x$use_ps2pdf" = x"no" ; then 10687dc407927Smrg if test "x$PS2PDF" != "x"; then 10688dc407927Smrg AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified]) 10689dc407927Smrg fi 10690dc407927Smrg have_ps2pdf=no 10691dc407927Smrgelse 10692dc407927Smrg AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no']) 10693dc407927Smrgfi 10694dc407927SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes]) 10695dc407927Smrg]) # XORG_WITH_PS2PDF 10696dc407927Smrg 10697dc407927Smrg# XORG_ENABLE_DOCS (enable_docs=yes) 10698dc407927Smrg# ---------------- 10699dc407927Smrg# Minimum version: 1.6.0 10700dc407927Smrg# 10701dc407927Smrg# Documentation tools are not always available on all platforms and sometimes 10702dc407927Smrg# not at the appropriate level. This macro enables a builder to skip all 10703dc407927Smrg# documentation targets except traditional man pages. 10704dc407927Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10705dc407927Smrg# maximum flexibilty in controlling documentation building. 10706dc407927Smrg# Refer to: 10707dc407927Smrg# XORG_WITH_XMLTO --with-xmlto 10708dc407927Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10709dc407927Smrg# XORG_WITH_DOXYGEN --with-doxygen 10710dc407927Smrg# XORG_WITH_FOP --with-fop 10711dc407927Smrg# XORG_WITH_GROFF --with-groff 10712dc407927Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10713dc407927Smrg# 10714dc407927Smrg# Interface to module: 10715dc407927Smrg# ENABLE_DOCS: used in makefiles to conditionally generate documentation 10716dc407927Smrg# --enable-docs: 'yes' user instructs the module to generate docs 10717dc407927Smrg# 'no' user instructs the module not to generate docs 10718dc407927Smrg# parm1: specify the default value, yes or no. 10719dc407927Smrg# 10720dc407927SmrgAC_DEFUN([XORG_ENABLE_DOCS],[ 10721dd0822caSmrgm4_define([docs_default], m4_default([$1], [yes])) 10722dc407927SmrgAC_ARG_ENABLE(docs, 10723dc407927Smrg AS_HELP_STRING([--enable-docs], 10724dd0822caSmrg [Enable building the documentation (default: ]docs_default[)]), 10725dd0822caSmrg [build_docs=$enableval], [build_docs=]docs_default) 10726dd0822caSmrgm4_undefine([docs_default]) 10727dc407927SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes]) 10728dc407927SmrgAC_MSG_CHECKING([whether to build documentation]) 10729dc407927SmrgAC_MSG_RESULT([$build_docs]) 10730dc407927Smrg]) # XORG_ENABLE_DOCS 10731dc407927Smrg 10732dc407927Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes) 10733dc407927Smrg# ---------------- 10734dc407927Smrg# Minimum version: 1.6.0 10735dc407927Smrg# 10736dc407927Smrg# This macro enables a builder to skip all developer documentation. 10737dc407927Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10738dc407927Smrg# maximum flexibilty in controlling documentation building. 10739dc407927Smrg# Refer to: 10740dc407927Smrg# XORG_WITH_XMLTO --with-xmlto 10741dc407927Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10742dc407927Smrg# XORG_WITH_DOXYGEN --with-doxygen 10743dc407927Smrg# XORG_WITH_FOP --with-fop 10744dc407927Smrg# XORG_WITH_GROFF --with-groff 10745dc407927Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10746dc407927Smrg# 10747dc407927Smrg# Interface to module: 10748dc407927Smrg# ENABLE_DEVEL_DOCS: used in makefiles to conditionally generate developer docs 10749dc407927Smrg# --enable-devel-docs: 'yes' user instructs the module to generate developer docs 10750dc407927Smrg# 'no' user instructs the module not to generate developer docs 10751dc407927Smrg# parm1: specify the default value, yes or no. 10752dc407927Smrg# 10753dc407927SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[ 10754dd0822caSmrgm4_define([devel_default], m4_default([$1], [yes])) 10755dc407927SmrgAC_ARG_ENABLE(devel-docs, 10756dc407927Smrg AS_HELP_STRING([--enable-devel-docs], 10757dd0822caSmrg [Enable building the developer documentation (default: ]devel_default[)]), 10758dd0822caSmrg [build_devel_docs=$enableval], [build_devel_docs=]devel_default) 10759dd0822caSmrgm4_undefine([devel_default]) 10760dc407927SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes]) 10761dc407927SmrgAC_MSG_CHECKING([whether to build developer documentation]) 10762dc407927SmrgAC_MSG_RESULT([$build_devel_docs]) 10763dc407927Smrg]) # XORG_ENABLE_DEVEL_DOCS 10764dc407927Smrg 10765dc407927Smrg# XORG_ENABLE_SPECS (enable_specs=yes) 10766dc407927Smrg# ---------------- 10767dc407927Smrg# Minimum version: 1.6.0 10768dc407927Smrg# 10769dc407927Smrg# This macro enables a builder to skip all functional specification targets. 10770dc407927Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides 10771dc407927Smrg# maximum flexibilty in controlling documentation building. 10772dc407927Smrg# Refer to: 10773dc407927Smrg# XORG_WITH_XMLTO --with-xmlto 10774dc407927Smrg# XORG_WITH_ASCIIDOC --with-asciidoc 10775dc407927Smrg# XORG_WITH_DOXYGEN --with-doxygen 10776dc407927Smrg# XORG_WITH_FOP --with-fop 10777dc407927Smrg# XORG_WITH_GROFF --with-groff 10778dc407927Smrg# XORG_WITH_PS2PDF --with-ps2pdf 10779dc407927Smrg# 10780dc407927Smrg# Interface to module: 10781dc407927Smrg# ENABLE_SPECS: used in makefiles to conditionally generate specs 10782dc407927Smrg# --enable-specs: 'yes' user instructs the module to generate specs 10783dc407927Smrg# 'no' user instructs the module not to generate specs 10784dc407927Smrg# parm1: specify the default value, yes or no. 10785dc407927Smrg# 10786dc407927SmrgAC_DEFUN([XORG_ENABLE_SPECS],[ 10787dd0822caSmrgm4_define([spec_default], m4_default([$1], [yes])) 10788dc407927SmrgAC_ARG_ENABLE(specs, 10789dc407927Smrg AS_HELP_STRING([--enable-specs], 10790dd0822caSmrg [Enable building the specs (default: ]spec_default[)]), 10791dd0822caSmrg [build_specs=$enableval], [build_specs=]spec_default) 10792dd0822caSmrgm4_undefine([spec_default]) 10793dc407927SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes]) 10794dc407927SmrgAC_MSG_CHECKING([whether to build functional specifications]) 10795dc407927SmrgAC_MSG_RESULT([$build_specs]) 10796dc407927Smrg]) # XORG_ENABLE_SPECS 10797dc407927Smrg 10798dd0822caSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto) 10799dd0822caSmrg# ---------------------------------------------- 10800dd0822caSmrg# Minimum version: 1.13.0 10801dd0822caSmrg# 10802dd0822caSmrg# This macro enables a builder to enable/disable unit testing 10803dd0822caSmrg# It makes no assumption about the test cases implementation 10804dd0822caSmrg# Test cases may or may not use Automake "Support for test suites" 10805dd0822caSmrg# They may or may not use the software utility library GLib 10806dd0822caSmrg# 10807dd0822caSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL 10808dd0822caSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib. 10809dd0822caSmrg# The variable enable_unit_tests is used by other macros in this file. 10810dd0822caSmrg# 10811dd0822caSmrg# Interface to module: 10812dd0822caSmrg# ENABLE_UNIT_TESTS: used in makefiles to conditionally build tests 10813dd0822caSmrg# enable_unit_tests: used in configure.ac for additional configuration 10814dd0822caSmrg# --enable-unit-tests: 'yes' user instructs the module to build tests 10815dd0822caSmrg# 'no' user instructs the module not to build tests 10816dd0822caSmrg# parm1: specify the default value, yes or no. 10817dd0822caSmrg# 10818dd0822caSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[ 10819dd0822caSmrgAC_BEFORE([$0], [XORG_WITH_GLIB]) 10820dd0822caSmrgAC_BEFORE([$0], [XORG_LD_WRAP]) 1082175cbef56SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 10822dd0822caSmrgm4_define([_defopt], m4_default([$1], [auto])) 10823dd0822caSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests], 10824dd0822caSmrg [Enable building unit test cases (default: ]_defopt[)]), 10825dd0822caSmrg [enable_unit_tests=$enableval], [enable_unit_tests=]_defopt) 10826dd0822caSmrgm4_undefine([_defopt]) 10827dd0822caSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno]) 10828dd0822caSmrgAC_MSG_CHECKING([whether to build unit test cases]) 10829dd0822caSmrgAC_MSG_RESULT([$enable_unit_tests]) 10830dd0822caSmrg]) # XORG_ENABLE_UNIT_TESTS 10831dd0822caSmrg 1083275cbef56Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto) 1083375cbef56Smrg# ------------------------------------------------------ 1083475cbef56Smrg# Minimum version: 1.17.0 1083575cbef56Smrg# 1083675cbef56Smrg# This macro enables a builder to enable/disable integration testing 1083775cbef56Smrg# It makes no assumption about the test cases' implementation 1083875cbef56Smrg# Test cases may or may not use Automake "Support for test suites" 1083975cbef56Smrg# 1084075cbef56Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support 1084175cbef56Smrg# usually requires less dependencies and may be built and run under less 1084275cbef56Smrg# stringent environments than integration tests. 1084375cbef56Smrg# 1084475cbef56Smrg# Interface to module: 1084575cbef56Smrg# ENABLE_INTEGRATION_TESTS: used in makefiles to conditionally build tests 1084675cbef56Smrg# enable_integration_tests: used in configure.ac for additional configuration 1084775cbef56Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests 1084875cbef56Smrg# 'no' user instructs the module not to build tests 1084975cbef56Smrg# parm1: specify the default value, yes or no. 1085075cbef56Smrg# 1085175cbef56SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[ 1085275cbef56SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS]) 1085375cbef56Smrgm4_define([_defopt], m4_default([$1], [auto])) 1085475cbef56SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests], 1085575cbef56Smrg [Enable building integration test cases (default: ]_defopt[)]), 1085675cbef56Smrg [enable_integration_tests=$enableval], 1085775cbef56Smrg [enable_integration_tests=]_defopt) 1085875cbef56Smrgm4_undefine([_defopt]) 1085975cbef56SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS], 1086075cbef56Smrg [test "x$enable_integration_tests" != xno]) 1086175cbef56SmrgAC_MSG_CHECKING([whether to build unit test cases]) 1086275cbef56SmrgAC_MSG_RESULT([$enable_integration_tests]) 1086375cbef56Smrg]) # XORG_ENABLE_INTEGRATION_TESTS 1086475cbef56Smrg 10865dd0822caSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT]) 10866dd0822caSmrg# ---------------------------------------- 10867dd0822caSmrg# Minimum version: 1.13.0 10868dd0822caSmrg# 10869dd0822caSmrg# GLib is a library which provides advanced data structures and functions. 10870dd0822caSmrg# This macro enables a module to test for the presence of Glib. 10871dd0822caSmrg# 10872dd0822caSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing. 10873dd0822caSmrg# Otherwise the value of $enable_unit_tests is blank. 10874dd0822caSmrg# 1087575cbef56Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit 1087675cbef56Smrg# test support usually requires less dependencies and may be built and run under 1087775cbef56Smrg# less stringent environments than integration tests. 1087875cbef56Smrg# 10879dd0822caSmrg# Interface to module: 10880dd0822caSmrg# HAVE_GLIB: used in makefiles to conditionally build targets 10881dd0822caSmrg# with_glib: used in configure.ac to know if GLib has been found 10882dd0822caSmrg# --with-glib: 'yes' user instructs the module to use glib 10883dd0822caSmrg# 'no' user instructs the module not to use glib 10884dd0822caSmrg# 10885dd0822caSmrgAC_DEFUN([XORG_WITH_GLIB],[ 10886dd0822caSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 10887dd0822caSmrgm4_define([_defopt], m4_default([$2], [auto])) 10888dd0822caSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib], 10889dd0822caSmrg [Use GLib library for unit testing (default: ]_defopt[)]), 10890dd0822caSmrg [with_glib=$withval], [with_glib=]_defopt) 10891dd0822caSmrgm4_undefine([_defopt]) 10892dd0822caSmrg 10893dd0822caSmrghave_glib=no 10894dd0822caSmrg# Do not probe GLib if user explicitly disabled unit testing 10895dd0822caSmrgif test "x$enable_unit_tests" != x"no"; then 10896dd0822caSmrg # Do not probe GLib if user explicitly disabled it 10897dd0822caSmrg if test "x$with_glib" != x"no"; then 10898dd0822caSmrg m4_ifval( 10899dd0822caSmrg [$1], 10900dd0822caSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])], 10901dd0822caSmrg [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])] 10902dd0822caSmrg ) 10903dd0822caSmrg fi 10904dd0822caSmrgfi 10905dd0822caSmrg 10906dd0822caSmrg# Not having GLib when unit testing has been explicitly requested is an error 10907dd0822caSmrgif test "x$enable_unit_tests" = x"yes"; then 10908dd0822caSmrg if test "x$have_glib" = x"no"; then 10909dd0822caSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10910dd0822caSmrg fi 10911dd0822caSmrgfi 10912dd0822caSmrg 10913dd0822caSmrg# Having unit testing disabled when GLib has been explicitly requested is an error 10914dd0822caSmrgif test "x$enable_unit_tests" = x"no"; then 10915dd0822caSmrg if test "x$with_glib" = x"yes"; then 10916dd0822caSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found]) 10917dd0822caSmrg fi 10918dd0822caSmrgfi 10919dd0822caSmrg 10920dd0822caSmrg# Not having GLib when it has been explicitly requested is an error 10921dd0822caSmrgif test "x$with_glib" = x"yes"; then 10922dd0822caSmrg if test "x$have_glib" = x"no"; then 10923dd0822caSmrg AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found]) 10924dd0822caSmrg fi 10925dd0822caSmrgfi 10926dd0822caSmrg 10927dd0822caSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes]) 10928dd0822caSmrg]) # XORG_WITH_GLIB 10929dd0822caSmrg 1093075cbef56Smrg# XORG_LD_WRAP([required|optional]) 1093175cbef56Smrg# --------------------------------- 10932dd0822caSmrg# Minimum version: 1.13.0 10933dd0822caSmrg# 10934dd0822caSmrg# Check if linker supports -wrap, passed via compiler flags 10935dd0822caSmrg# 10936dd0822caSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing. 10937dd0822caSmrg# Otherwise the value of $enable_unit_tests is blank. 10938dd0822caSmrg# 1093975cbef56Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior 1094075cbef56Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not 1094175cbef56Smrg# available, an argument of "optional" allows use when some unit tests require 1094275cbef56Smrg# ld -wrap and others do not. 1094375cbef56Smrg# 10944dd0822caSmrgAC_DEFUN([XORG_LD_WRAP],[ 1094575cbef56SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no], 1094675cbef56Smrg [AC_LANG_PROGRAM([#include <stdlib.h> 1094775cbef56Smrg void __wrap_exit(int status) { return; }], 1094875cbef56Smrg [exit(0);])]) 10949dd0822caSmrg# Not having ld wrap when unit testing has been explicitly requested is an error 1095075cbef56Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then 10951dd0822caSmrg if test "x$have_ld_wrap" = x"no"; then 10952dd0822caSmrg AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available]) 10953dd0822caSmrg fi 10954dd0822caSmrgfi 10955dd0822caSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes]) 10956dd0822caSmrg# 10957dd0822caSmrg]) # XORG_LD_WRAP 10958dd0822caSmrg 10959dd0822caSmrg# XORG_CHECK_LINKER_FLAGS 10960dd0822caSmrg# ----------------------- 10961dd0822caSmrg# SYNOPSIS 10962dd0822caSmrg# 1096375cbef56Smrg# XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE]) 10964dd0822caSmrg# 10965dd0822caSmrg# DESCRIPTION 10966dd0822caSmrg# 10967dd0822caSmrg# Check whether the given linker FLAGS work with the current language's 10968dd0822caSmrg# linker, or whether they give an error. 10969dd0822caSmrg# 10970dd0822caSmrg# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on 10971dd0822caSmrg# success/failure. 10972dd0822caSmrg# 1097375cbef56Smrg# PROGRAM-SOURCE is the program source to link with, if needed 1097475cbef56Smrg# 10975dd0822caSmrg# NOTE: Based on AX_CHECK_COMPILER_FLAGS. 10976dd0822caSmrg# 10977dd0822caSmrg# LICENSE 10978dd0822caSmrg# 10979dd0822caSmrg# Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org> 10980dd0822caSmrg# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu> 10981dd0822caSmrg# Copyright (c) 2009 Matteo Frigo 10982dd0822caSmrg# 10983dd0822caSmrg# This program is free software: you can redistribute it and/or modify it 10984dd0822caSmrg# under the terms of the GNU General Public License as published by the 10985dd0822caSmrg# Free Software Foundation, either version 3 of the License, or (at your 10986dd0822caSmrg# option) any later version. 10987dd0822caSmrg# 10988dd0822caSmrg# This program is distributed in the hope that it will be useful, but 10989dd0822caSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 10990dd0822caSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General 10991dd0822caSmrg# Public License for more details. 10992dd0822caSmrg# 10993dd0822caSmrg# You should have received a copy of the GNU General Public License along 10994dd0822caSmrg# with this program. If not, see <http://www.gnu.org/licenses/>. 10995dd0822caSmrg# 10996dd0822caSmrg# As a special exception, the respective Autoconf Macro's copyright owner 10997dd0822caSmrg# gives unlimited permission to copy, distribute and modify the configure 10998dd0822caSmrg# scripts that are the output of Autoconf when processing the Macro. You 10999dd0822caSmrg# need not follow the terms of the GNU General Public License when using 11000dd0822caSmrg# or distributing such scripts, even though portions of the text of the 11001dd0822caSmrg# Macro appear in them. The GNU General Public License (GPL) does govern 11002dd0822caSmrg# all other use of the material that constitutes the Autoconf Macro. 11003dd0822caSmrg# 11004dd0822caSmrg# This special exception to the GPL applies to versions of the Autoconf 11005dd0822caSmrg# Macro released by the Autoconf Archive. When you make and distribute a 11006dd0822caSmrg# modified version of the Autoconf Macro, you may extend this special 11007dd0822caSmrg# exception to the GPL to apply to your modified version as well.# 11008dd0822caSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS], 11009dd0822caSmrg[AC_MSG_CHECKING([whether the linker accepts $1]) 11010dd0822caSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: 11011dd0822caSmrgAS_LITERAL_IF([$1], 11012dd0822caSmrg [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [ 11013dd0822caSmrg ax_save_FLAGS=$LDFLAGS 11014dd0822caSmrg LDFLAGS="$1" 1101575cbef56Smrg AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])], 11016dd0822caSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11017dd0822caSmrg AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11018dd0822caSmrg LDFLAGS=$ax_save_FLAGS])], 11019dd0822caSmrg [ax_save_FLAGS=$LDFLAGS 11020dd0822caSmrg LDFLAGS="$1" 11021dd0822caSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM()], 11022dd0822caSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes, 11023dd0822caSmrg eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no) 11024dd0822caSmrg LDFLAGS=$ax_save_FLAGS]) 11025dd0822caSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1]) 11026dd0822caSmrgAC_MSG_RESULT($xorg_check_linker_flags) 11027dd0822caSmrgif test "x$xorg_check_linker_flags" = xyes; then 11028dd0822caSmrg m4_default([$2], :) 11029dd0822caSmrgelse 11030dd0822caSmrg m4_default([$3], :) 11031dd0822caSmrgfi 11032dd0822caSmrg]) # XORG_CHECK_LINKER_FLAGS 11033dd0822caSmrg 1103475cbef56Smrg# XORG_MEMORY_CHECK_FLAGS 1103575cbef56Smrg# ----------------------- 1103675cbef56Smrg# Minimum version: 1.16.0 1103775cbef56Smrg# 1103875cbef56Smrg# This macro attempts to find appropriate memory checking functionality 1103975cbef56Smrg# for various platforms which unit testing code may use to catch various 1104075cbef56Smrg# forms of memory allocation and access errors in testing. 1104175cbef56Smrg# 1104275cbef56Smrg# Interface to module: 1104375cbef56Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging 1104475cbef56Smrg# Usually added to TESTS_ENVIRONMENT in Makefile.am 1104575cbef56Smrg# 1104675cbef56Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim. 1104775cbef56Smrg# 1104875cbef56SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[ 1104975cbef56Smrg 1105075cbef56SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 1105175cbef56SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV], 1105275cbef56Smrg [Environment variables to enable memory checking in tests]) 1105375cbef56Smrg 1105475cbef56Smrg# Check for different types of support on different platforms 1105575cbef56Smrgcase $host_os in 1105675cbef56Smrg solaris*) 1105775cbef56Smrg AC_CHECK_LIB([umem], [umem_alloc], 1105875cbef56Smrg [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default']) 1105975cbef56Smrg ;; 1106075cbef56Smrg *-gnu*) # GNU libc - Value is used as a single byte bit pattern, 1106175cbef56Smrg # both directly and inverted, so should not be 0 or 255. 1106275cbef56Smrg malloc_debug_env='MALLOC_PERTURB_=15' 1106375cbef56Smrg ;; 1106475cbef56Smrg darwin*) 1106575cbef56Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib' 1106675cbef56Smrg ;; 1106775cbef56Smrg *bsd*) 1106875cbef56Smrg malloc_debug_env='MallocPreScribble=1 MallocScribble=1' 1106975cbef56Smrg ;; 1107075cbef56Smrgesac 1107175cbef56Smrg 1107275cbef56Smrg# User supplied flags override default flags 1107375cbef56Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then 1107475cbef56Smrg malloc_debug_env="$XORG_MALLOC_DEBUG_ENV" 1107575cbef56Smrgfi 1107675cbef56Smrg 1107775cbef56SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env]) 1107875cbef56Smrg]) # XORG_WITH_LINT 1107975cbef56Smrg 110803eed67faSmbalmer# XORG_CHECK_MALLOC_ZERO 110813eed67faSmbalmer# ---------------------- 110823eed67faSmbalmer# Minimum version: 1.0.0 110833eed67faSmbalmer# 110843eed67faSmbalmer# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 110853eed67faSmbalmer# malloc(0) returns NULL. Packages should add one of these cflags to 110863eed67faSmbalmer# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 110873eed67faSmbalmerAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 110883eed67faSmbalmerAC_ARG_ENABLE(malloc0returnsnull, 11089dc407927Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 110903eed67faSmbalmer [malloc(0) returns NULL (default: auto)]), 110913eed67faSmbalmer [MALLOC_ZERO_RETURNS_NULL=$enableval], 110923eed67faSmbalmer [MALLOC_ZERO_RETURNS_NULL=auto]) 110933eed67faSmbalmer 110943eed67faSmbalmerAC_MSG_CHECKING([whether malloc(0) returns NULL]) 110953eed67faSmbalmerif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 11096dd0822caSmrg AC_RUN_IFELSE([AC_LANG_PROGRAM([ 11097dd0822caSmrg#include <stdlib.h> 11098dd0822caSmrg],[ 110993eed67faSmbalmer char *m0, *r0, *c0, *p; 111003eed67faSmbalmer m0 = malloc(0); 111013eed67faSmbalmer p = malloc(10); 111023eed67faSmbalmer r0 = realloc(p,0); 11103dd0822caSmrg c0 = calloc(0,10); 11104dd0822caSmrg exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1); 11105dd0822caSmrg])], 111063eed67faSmbalmer [MALLOC_ZERO_RETURNS_NULL=yes], 11107dc407927Smrg [MALLOC_ZERO_RETURNS_NULL=no], 11108dc407927Smrg [MALLOC_ZERO_RETURNS_NULL=yes]) 111093eed67faSmbalmerfi 111103eed67faSmbalmerAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 111113eed67faSmbalmer 111123eed67faSmbalmerif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 111133eed67faSmbalmer MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 111143eed67faSmbalmer XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 111153eed67faSmbalmer XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 111163eed67faSmbalmerelse 111173eed67faSmbalmer MALLOC_ZERO_CFLAGS="" 111183eed67faSmbalmer XMALLOC_ZERO_CFLAGS="" 111193eed67faSmbalmer XTMALLOC_ZERO_CFLAGS="" 111203eed67faSmbalmerfi 111213eed67faSmbalmer 111223eed67faSmbalmerAC_SUBST([MALLOC_ZERO_CFLAGS]) 111233eed67faSmbalmerAC_SUBST([XMALLOC_ZERO_CFLAGS]) 111243eed67faSmbalmerAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 111253eed67faSmbalmer]) # XORG_CHECK_MALLOC_ZERO 111263eed67faSmbalmer 111273eed67faSmbalmer# XORG_WITH_LINT() 111283eed67faSmbalmer# ---------------- 111293eed67faSmbalmer# Minimum version: 1.1.0 111303eed67faSmbalmer# 11131dc407927Smrg# This macro enables the use of a tool that flags some suspicious and 11132dc407927Smrg# non-portable constructs (likely to be bugs) in C language source code. 11133dc407927Smrg# It will attempt to locate the tool and use appropriate options. 11134dc407927Smrg# There are various lint type tools on different platforms. 11135dc407927Smrg# 11136dc407927Smrg# Interface to module: 11137dc407927Smrg# LINT: returns the path to the tool found on the platform 11138dc407927Smrg# or the value set to LINT on the configure cmd line 11139dc407927Smrg# also an Automake conditional 11140dc407927Smrg# LINT_FLAGS: an Automake variable with appropriate flags 11141dc407927Smrg# 11142dc407927Smrg# --with-lint: 'yes' user instructs the module to use lint 11143dc407927Smrg# 'no' user instructs the module not to use lint (default) 11144dc407927Smrg# 11145dc407927Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path. 11146dc407927Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim. 111473eed67faSmbalmer# 111483eed67faSmbalmerAC_DEFUN([XORG_WITH_LINT],[ 111493eed67faSmbalmer 11150dc407927SmrgAC_ARG_VAR([LINT], [Path to a lint-style command]) 11151dc407927SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command]) 11152dc407927SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 111533eed67faSmbalmer [Use a lint-style source code checker (default: disabled)])], 111543eed67faSmbalmer [use_lint=$withval], [use_lint=no]) 11155dc407927Smrg 11156dc407927Smrg# Obtain platform specific info like program name and options 11157dc407927Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris 11158dc407927Smrgcase $host_os in 11159dc407927Smrg *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*) 11160dc407927Smrg lint_name=splint 11161dc407927Smrg lint_options="-badflag" 11162dc407927Smrg ;; 11163dc407927Smrg *freebsd* | *netbsd*) 11164dc407927Smrg lint_name=lint 11165dc407927Smrg lint_options="-u -b" 11166dc407927Smrg ;; 11167dc407927Smrg *solaris*) 11168dc407927Smrg lint_name=lint 11169dc407927Smrg lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 11170dc407927Smrg ;; 11171dc407927Smrgesac 11172dc407927Smrg 11173dc407927Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user) 11174dc407927Smrgif test "x$use_lint" = x"yes" ; then 11175dc407927Smrg AC_PATH_PROG([LINT], [$lint_name]) 11176dc407927Smrg if test "x$LINT" = "x"; then 11177dc407927Smrg AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH]) 11178dc407927Smrg fi 11179dc407927Smrgelif test "x$use_lint" = x"no" ; then 11180dc407927Smrg if test "x$LINT" != "x"; then 11181dc407927Smrg AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified]) 11182dc407927Smrg fi 111833eed67faSmbalmerelse 11184dc407927Smrg AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.]) 111853eed67faSmbalmerfi 11186dc407927Smrg 11187dc407927Smrg# User supplied flags override default flags 11188dc407927Smrgif test "x$LINT_FLAGS" != "x"; then 11189dc407927Smrg lint_options=$LINT_FLAGS 111903eed67faSmbalmerfi 111913eed67faSmbalmer 11192dc407927SmrgAC_SUBST([LINT_FLAGS],[$lint_options]) 11193dc407927SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x]) 111943eed67faSmbalmer 111953eed67faSmbalmer]) # XORG_WITH_LINT 111963eed67faSmbalmer 111973eed67faSmbalmer# XORG_LINT_LIBRARY(LIBNAME) 111983eed67faSmbalmer# -------------------------- 111993eed67faSmbalmer# Minimum version: 1.1.0 112003eed67faSmbalmer# 112013eed67faSmbalmer# Sets up flags for building lint libraries for checking programs that call 112023eed67faSmbalmer# functions in the library. 112033eed67faSmbalmer# 11204dc407927Smrg# Interface to module: 11205dc407927Smrg# LINTLIB - Automake variable with the name of lint library file to make 11206dc407927Smrg# MAKE_LINT_LIB - Automake conditional 11207dc407927Smrg# 11208dc407927Smrg# --enable-lint-library: - 'yes' user instructs the module to created a lint library 11209dc407927Smrg# - 'no' user instructs the module not to create a lint library (default) 112103eed67faSmbalmer 112113eed67faSmbalmerAC_DEFUN([XORG_LINT_LIBRARY],[ 112123eed67faSmbalmerAC_REQUIRE([XORG_WITH_LINT]) 11213dc407927SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 112143eed67faSmbalmer [Create lint library (default: disabled)])], 112153eed67faSmbalmer [make_lint_lib=$enableval], [make_lint_lib=no]) 11216dc407927Smrg 11217dc407927Smrgif test "x$make_lint_lib" = x"yes" ; then 11218dc407927Smrg LINTLIB=llib-l$1.ln 11219dc407927Smrg if test "x$LINT" = "x"; then 11220dc407927Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 11221dc407927Smrg fi 11222dc407927Smrgelif test "x$make_lint_lib" != x"no" ; then 11223dc407927Smrg AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.]) 112243eed67faSmbalmerfi 11225dc407927Smrg 112263eed67faSmbalmerAC_SUBST(LINTLIB) 112273eed67faSmbalmerAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 112283eed67faSmbalmer 112293eed67faSmbalmer]) # XORG_LINT_LIBRARY 112303eed67faSmbalmer 11231dd0822caSmrg# XORG_COMPILER_BRAND 11232dd0822caSmrg# ------------------- 11233dd0822caSmrg# Minimum version: 1.14.0 11234dd0822caSmrg# 11235dd0822caSmrg# Checks for various brands of compilers and sets flags as appropriate: 11236dd0822caSmrg# GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes" 1123775cbef56Smrg# GNU g++ - relies on AC_PROG_CXX to set GXX to "yes" 11238dd0822caSmrg# clang compiler - sets CLANGCC to "yes" 11239dd0822caSmrg# Intel compiler - sets INTELCC to "yes" 11240dd0822caSmrg# Sun/Oracle Solaris Studio cc - sets SUNCC to "yes" 11241dd0822caSmrg# 11242dd0822caSmrgAC_DEFUN([XORG_COMPILER_BRAND], [ 1124375cbef56SmrgAC_LANG_CASE( 1124475cbef56Smrg [C], [ 1124575cbef56Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1124675cbef56Smrg ], 1124775cbef56Smrg [C++], [ 1124875cbef56Smrg AC_REQUIRE([AC_PROG_CXX]) 1124975cbef56Smrg ] 1125075cbef56Smrg) 11251dd0822caSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"]) 11252dd0822caSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 11253dd0822caSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 11254dd0822caSmrg]) # XORG_COMPILER_BRAND 11255dd0822caSmrg 1125675cbef56Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...]) 1125775cbef56Smrg# --------------- 1125875cbef56Smrg# Minimum version: 1.16.0 1125975cbef56Smrg# 1126075cbef56Smrg# Test if the compiler works when passed the given flag as a command line argument. 1126175cbef56Smrg# If it succeeds, the flag is appeneded to the given variable. If not, it tries the 1126275cbef56Smrg# next flag in the list until there are no more options. 1126375cbef56Smrg# 1126475cbef56Smrg# Note that this does not guarantee that the compiler supports the flag as some 1126575cbef56Smrg# compilers will simply ignore arguments that they do not understand, but we do 1126675cbef56Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and 1126775cbef56Smrg# -Werror=unused-command-line-argument 1126875cbef56Smrg# 1126975cbef56SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [ 1127075cbef56Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1127175cbef56Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])]) 1127275cbef56Smrg 1127375cbef56SmrgAC_LANG_COMPILER_REQUIRE 1127475cbef56Smrg 1127575cbef56SmrgAC_LANG_CASE( 1127675cbef56Smrg [C], [ 1127775cbef56Smrg AC_REQUIRE([AC_PROG_CC_C99]) 1127875cbef56Smrg define([PREFIX], [C]) 1127975cbef56Smrg define([CACHE_PREFIX], [cc]) 1128075cbef56Smrg define([COMPILER], [$CC]) 1128175cbef56Smrg ], 1128275cbef56Smrg [C++], [ 1128375cbef56Smrg define([PREFIX], [CXX]) 1128475cbef56Smrg define([CACHE_PREFIX], [cxx]) 1128575cbef56Smrg define([COMPILER], [$CXX]) 1128675cbef56Smrg ] 1128775cbef56Smrg) 1128875cbef56Smrg 1128975cbef56Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]" 1129075cbef56Smrg 1129175cbef56Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then 1129275cbef56Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1129375cbef56Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option], 1129475cbef56Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option], 1129575cbef56Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1129675cbef56Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes], 1129775cbef56Smrg [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no])) 1129875cbef56Smrg [xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option] 1129975cbef56Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1130075cbef56Smrgfi 1130175cbef56Smrg 1130275cbef56Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then 1130375cbef56Smrg if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then 1130475cbef56Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1130575cbef56Smrg fi 1130675cbef56Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1130775cbef56Smrg AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument], 1130875cbef56Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument], 1130975cbef56Smrg AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])], 1131075cbef56Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes], 1131175cbef56Smrg [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no])) 1131275cbef56Smrg [xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument] 1131375cbef56Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1131475cbef56Smrgfi 1131575cbef56Smrg 1131675cbef56Smrgfound="no" 1131775cbef56Smrgm4_foreach([flag], m4_cdr($@), [ 1131875cbef56Smrg if test $found = "no" ; then 1131975cbef56Smrg if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then 1132075cbef56Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option" 1132175cbef56Smrg fi 1132275cbef56Smrg 1132375cbef56Smrg if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then 1132475cbef56Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument" 1132575cbef56Smrg fi 1132675cbef56Smrg 1132775cbef56Smrg PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag[" 1132875cbef56Smrg 1132975cbef56Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname 1133075cbef56Smrg AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[]) 1133175cbef56Smrg cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[]) 1133275cbef56Smrg AC_CACHE_VAL($cacheid, 1133375cbef56Smrg [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])], 1133475cbef56Smrg [eval $cacheid=yes], 1133575cbef56Smrg [eval $cacheid=no])]) 1133675cbef56Smrg 1133775cbef56Smrg PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]" 1133875cbef56Smrg 1133975cbef56Smrg eval supported=\$$cacheid 1134075cbef56Smrg AC_MSG_RESULT([$supported]) 1134175cbef56Smrg if test "$supported" = "yes" ; then 1134275cbef56Smrg $1="$$1 ]flag[" 1134375cbef56Smrg found="yes" 1134475cbef56Smrg fi 1134575cbef56Smrg fi 1134675cbef56Smrg]) 1134775cbef56Smrg]) # XORG_TESTSET_CFLAG 1134875cbef56Smrg 1134975cbef56Smrg# XORG_COMPILER_FLAGS 1135075cbef56Smrg# --------------- 1135175cbef56Smrg# Minimum version: 1.16.0 1135275cbef56Smrg# 1135375cbef56Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line 1135475cbef56Smrg# arguments supported by the selected compiler which do NOT alter the generated 1135575cbef56Smrg# code. These arguments will cause the compiler to print various warnings 1135675cbef56Smrg# during compilation AND turn a conservative set of warnings into errors. 1135775cbef56Smrg# 1135875cbef56Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in 1135975cbef56Smrg# future versions of util-macros as options are added to new compilers. 1136075cbef56Smrg# 1136175cbef56SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [ 1136275cbef56SmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1136375cbef56Smrg 1136475cbef56SmrgAC_ARG_ENABLE(selective-werror, 1136575cbef56Smrg AS_HELP_STRING([--disable-selective-werror], 1136675cbef56Smrg [Turn off selective compiler errors. (default: enabled)]), 1136775cbef56Smrg [SELECTIVE_WERROR=$enableval], 1136875cbef56Smrg [SELECTIVE_WERROR=yes]) 1136975cbef56Smrg 1137075cbef56SmrgAC_LANG_CASE( 1137175cbef56Smrg [C], [ 1137275cbef56Smrg define([PREFIX], [C]) 1137375cbef56Smrg ], 1137475cbef56Smrg [C++], [ 1137575cbef56Smrg define([PREFIX], [CXX]) 1137675cbef56Smrg ] 1137775cbef56Smrg) 1137875cbef56Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG 1137975cbef56Smrgif test "x$SUNCC" = "xyes"; then 1138075cbef56Smrg [BASE_]PREFIX[FLAGS]="-v" 1138175cbef56Smrgelse 1138275cbef56Smrg [BASE_]PREFIX[FLAGS]="" 1138375cbef56Smrgfi 1138475cbef56Smrg 1138575cbef56Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS 1138675cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall]) 1138775cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith]) 1138875cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations]) 1138975cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat]) 1139075cbef56Smrg 1139175cbef56SmrgAC_LANG_CASE( 1139275cbef56Smrg [C], [ 1139375cbef56Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes]) 1139475cbef56Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes]) 1139575cbef56Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs]) 1139675cbef56Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast]) 1139775cbef56Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition]) 1139875cbef56Smrg XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement]) 1139975cbef56Smrg ] 1140075cbef56Smrg) 1140175cbef56Smrg 1140275cbef56Smrg# This chunk adds additional warnings that could catch undesired effects. 1140375cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused]) 1140475cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized]) 1140575cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow]) 1140675cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual]) 1140775cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn]) 1140875cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute]) 1140975cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls]) 1141075cbef56Smrg 1141175cbef56Smrg# These are currently disabled because they are noisy. They will be enabled 1141275cbef56Smrg# in the future once the codebase is sufficiently modernized to silence 1141375cbef56Smrg# them. For now, I don't want them to drown out the other warnings. 1141475cbef56Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op]) 1141575cbef56Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses]) 1141675cbef56Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align]) 1141775cbef56Smrg 1141875cbef56Smrg# Turn some warnings into errors, so we don't accidently get successful builds 1141975cbef56Smrg# when there are problems that should be fixed. 1142075cbef56Smrg 1142175cbef56Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then 1142275cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED]) 1142375cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull]) 1142475cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self]) 1142575cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main]) 1142675cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces]) 1142775cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point]) 1142875cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT]) 1142975cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs]) 1143075cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds]) 1143175cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings]) 1143275cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address]) 1143375cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION]) 1143475cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION 1143575cbef56Smrgelse 1143675cbef56SmrgAC_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]) 1143775cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit]) 1143875cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull]) 1143975cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self]) 1144075cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain]) 1144175cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces]) 1144275cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point]) 1144375cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type]) 1144475cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs]) 1144575cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds]) 1144675cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings]) 1144775cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress]) 1144875cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast]) 1144975cbef56SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast]) 1145075cbef56Smrgfi 1145175cbef56Smrg 1145275cbef56SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1145375cbef56Smrg]) # XORG_COMPILER_FLAGS 1145475cbef56Smrg 11455dc407927Smrg# XORG_CWARNFLAGS 11456dc407927Smrg# --------------- 11457dc407927Smrg# Minimum version: 1.2.0 1145875cbef56Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead) 11459dc407927Smrg# 11460dc407927Smrg# Defines CWARNFLAGS to enable C compiler warnings. 11461dc407927Smrg# 1146275cbef56Smrg# This function is deprecated because it defines -fno-strict-aliasing 1146375cbef56Smrg# which alters the code generated by the compiler. If -fno-strict-aliasing 1146475cbef56Smrg# is needed, then it should be added explicitly in the module when 1146575cbef56Smrg# it is updated to use BASE_CFLAGS. 1146675cbef56Smrg# 11467dc407927SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 1146875cbef56SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11469dd0822caSmrgAC_REQUIRE([XORG_COMPILER_BRAND]) 1147075cbef56SmrgAC_LANG_CASE( 1147175cbef56Smrg [C], [ 1147275cbef56Smrg CWARNFLAGS="$BASE_CFLAGS" 1147375cbef56Smrg if test "x$GCC" = xyes ; then 1147475cbef56Smrg CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing" 1147575cbef56Smrg fi 1147675cbef56Smrg AC_SUBST(CWARNFLAGS) 1147775cbef56Smrg ] 1147875cbef56Smrg) 11479dc407927Smrg]) # XORG_CWARNFLAGS 114803eed67faSmbalmer 11481dc407927Smrg# XORG_STRICT_OPTION 11482dc407927Smrg# ----------------------- 11483dc407927Smrg# Minimum version: 1.3.0 11484dc407927Smrg# 11485dd0822caSmrg# Add configure option to enable strict compilation flags, such as treating 11486dd0822caSmrg# warnings as fatal errors. 11487dd0822caSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to 1148875cbef56Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS. 11489dd0822caSmrg# 11490dd0822caSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or 11491dd0822caSmrg# when strict compilation is unconditionally desired. 11492dc407927SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 11493dc407927SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 1149475cbef56SmrgAC_REQUIRE([XORG_COMPILER_FLAGS]) 11495dc407927Smrg 11496dc407927SmrgAC_ARG_ENABLE(strict-compilation, 11497dc407927Smrg AS_HELP_STRING([--enable-strict-compilation], 11498dc407927Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 11499dc407927Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 1150075cbef56Smrg 1150175cbef56SmrgAC_LANG_CASE( 1150275cbef56Smrg [C], [ 1150375cbef56Smrg define([PREFIX], [C]) 1150475cbef56Smrg ], 1150575cbef56Smrg [C++], [ 1150675cbef56Smrg define([PREFIX], [CXX]) 1150775cbef56Smrg ] 1150875cbef56Smrg) 1150975cbef56Smrg 1151075cbef56Smrg[STRICT_]PREFIX[FLAGS]="" 1151175cbef56SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic]) 1151275cbef56SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn]) 1151375cbef56Smrg 1151475cbef56Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not 1151575cbef56Smrg# activate it with -Werror, so we add it here explicitly. 1151675cbef56SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes]) 1151775cbef56Smrg 11518dc407927Smrgif test "x$STRICT_COMPILE" = "xyes"; then 1151975cbef56Smrg [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]" 1152075cbef56Smrg AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"]) 11521dc407927Smrgfi 1152275cbef56SmrgAC_SUBST([STRICT_]PREFIX[FLAGS]) 1152375cbef56SmrgAC_SUBST([BASE_]PREFIX[FLAGS]) 1152475cbef56SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS])) 11525dc407927Smrg]) # XORG_STRICT_OPTION 115263eed67faSmbalmer 11527dc407927Smrg# XORG_DEFAULT_OPTIONS 11528dc407927Smrg# -------------------- 11529dc407927Smrg# Minimum version: 1.3.0 11530dc407927Smrg# 11531dc407927Smrg# Defines default options for X.Org modules. 11532dc407927Smrg# 11533dc407927SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 11534dc407927SmrgAC_REQUIRE([AC_PROG_INSTALL]) 1153575cbef56SmrgXORG_COMPILER_FLAGS 11536dc407927SmrgXORG_CWARNFLAGS 11537dc407927SmrgXORG_STRICT_OPTION 11538dc407927SmrgXORG_RELEASE_VERSION 11539dc407927SmrgXORG_CHANGELOG 11540dc407927SmrgXORG_INSTALL 11541dc407927SmrgXORG_MANPAGE_SECTIONS 11542dc407927Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])], 11543dc407927Smrg [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])]) 11544dc407927Smrg]) # XORG_DEFAULT_OPTIONS 11545dc407927Smrg 11546dc407927Smrg# XORG_INSTALL() 11547dc407927Smrg# ---------------- 11548dc407927Smrg# Minimum version: 1.4.0 11549dc407927Smrg# 11550dc407927Smrg# Defines the variable INSTALL_CMD as the command to copy 11551dc407927Smrg# INSTALL from $prefix/share/util-macros. 11552dc407927Smrg# 11553dc407927SmrgAC_DEFUN([XORG_INSTALL], [ 11554dc407927SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11555dc407927Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros` 11556dc407927SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \ 11557dc407927Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \ 11558dc407927Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \ 11559dc407927Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)" 11560dc407927SmrgAC_SUBST([INSTALL_CMD]) 11561dc407927Smrg]) # XORG_INSTALL 115623eed67faSmbalmerdnl Copyright 2005 Red Hat, Inc 115633eed67faSmbalmerdnl 115643eed67faSmbalmerdnl Permission to use, copy, modify, distribute, and sell this software and its 115653eed67faSmbalmerdnl documentation for any purpose is hereby granted without fee, provided that 115663eed67faSmbalmerdnl the above copyright notice appear in all copies and that both that 115673eed67faSmbalmerdnl copyright notice and this permission notice appear in supporting 115683eed67faSmbalmerdnl documentation. 115693eed67faSmbalmerdnl 115703eed67faSmbalmerdnl The above copyright notice and this permission notice shall be included 115713eed67faSmbalmerdnl in all copies or substantial portions of the Software. 115723eed67faSmbalmerdnl 115733eed67faSmbalmerdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 115743eed67faSmbalmerdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 115753eed67faSmbalmerdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 115763eed67faSmbalmerdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 115773eed67faSmbalmerdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 115783eed67faSmbalmerdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 115793eed67faSmbalmerdnl OTHER DEALINGS IN THE SOFTWARE. 115803eed67faSmbalmerdnl 115813eed67faSmbalmerdnl Except as contained in this notice, the name of the copyright holders shall 115823eed67faSmbalmerdnl not be used in advertising or otherwise to promote the sale, use or 115833eed67faSmbalmerdnl other dealings in this Software without prior written authorization 115843eed67faSmbalmerdnl from the copyright holders. 115853eed67faSmbalmerdnl 115863eed67faSmbalmer 115873eed67faSmbalmer# XORG_RELEASE_VERSION 115883eed67faSmbalmer# -------------------- 11589dc407927Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 115903eed67faSmbalmer 115913eed67faSmbalmerAC_DEFUN([XORG_RELEASE_VERSION],[ 115923eed67faSmbalmer AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 115933eed67faSmbalmer [`echo $PACKAGE_VERSION | cut -d . -f 1`], 115943eed67faSmbalmer [Major version of this package]) 115953eed67faSmbalmer PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 115963eed67faSmbalmer if test "x$PVM" = "x"; then 115973eed67faSmbalmer PVM="0" 115983eed67faSmbalmer fi 115993eed67faSmbalmer AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 116003eed67faSmbalmer [$PVM], 116013eed67faSmbalmer [Minor version of this package]) 116023eed67faSmbalmer PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 116033eed67faSmbalmer if test "x$PVP" = "x"; then 116043eed67faSmbalmer PVP="0" 116053eed67faSmbalmer fi 116063eed67faSmbalmer AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 116073eed67faSmbalmer [$PVP], 116083eed67faSmbalmer [Patch version of this package]) 116093eed67faSmbalmer]) 116103eed67faSmbalmer 11611dc407927Smrg# XORG_CHANGELOG() 11612dc407927Smrg# ---------------- 11613dc407927Smrg# Minimum version: 1.2.0 11614dc407927Smrg# 11615dc407927Smrg# Defines the variable CHANGELOG_CMD as the command to generate 11616dc407927Smrg# ChangeLog from git. 11617dc407927Smrg# 11618dc407927Smrg# 11619dc407927SmrgAC_DEFUN([XORG_CHANGELOG], [ 11620dc407927SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 11621dc407927Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 11622dc407927Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 11623dc407927Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 11624dc407927SmrgAC_SUBST([CHANGELOG_CMD]) 11625dc407927Smrg]) # XORG_CHANGELOG 11626dc407927Smrg 11627dc407927Smrgdnl Copyright 2005 Red Hat, Inc 11628dc407927Smrgdnl 11629dc407927Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 11630dc407927Smrgdnl documentation for any purpose is hereby granted without fee, provided that 11631dc407927Smrgdnl the above copyright notice appear in all copies and that both that 11632dc407927Smrgdnl copyright notice and this permission notice appear in supporting 11633dc407927Smrgdnl documentation. 11634dc407927Smrgdnl 11635dc407927Smrgdnl The above copyright notice and this permission notice shall be included 11636dc407927Smrgdnl in all copies or substantial portions of the Software. 11637dc407927Smrgdnl 11638dc407927Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 11639dc407927Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 11640dc407927Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 11641dc407927Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 11642dc407927Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 11643dc407927Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 11644dc407927Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 11645dc407927Smrgdnl 11646dc407927Smrgdnl Except as contained in this notice, the name of the copyright holders shall 11647dc407927Smrgdnl not be used in advertising or otherwise to promote the sale, use or 11648dc407927Smrgdnl other dealings in this Software without prior written authorization 11649dc407927Smrgdnl from the copyright holders. 11650dc407927Smrgdnl 11651dc407927Smrg 11652dc407927Smrg# XORG_DRIVER_CHECK_EXT() 11653dc407927Smrg# -------------------------- 11654dc407927Smrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 11655dc407927Smrg# is defined, then add $1 to $REQUIRED_MODULES. 11656dc407927Smrg 11657dc407927SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 11658dc407927Smrg AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 11659dc407927Smrg SAVE_CFLAGS="$CFLAGS" 11660dc407927Smrg CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`" 11661dc407927Smrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 11662dc407927Smrg#include "xorg-server.h" 11663dc407927Smrg#if !defined $1 11664dc407927Smrg#error $1 not defined 11665dc407927Smrg#endif 11666dc407927Smrg ]])], 11667dc407927Smrg [_EXT_CHECK=yes], 11668dc407927Smrg [_EXT_CHECK=no]) 11669dc407927Smrg CFLAGS="$SAVE_CFLAGS" 11670dc407927Smrg AC_MSG_CHECKING([if $1 is defined]) 11671dc407927Smrg AC_MSG_RESULT([$_EXT_CHECK]) 11672dc407927Smrg if test "$_EXT_CHECK" != no; then 11673dc407927Smrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 11674dc407927Smrg fi 11675dc407927Smrg]) 11676dc407927Smrg 11677