aclocal.m4 revision ad43ddac
1ad43ddacSmrg# generated automatically by aclocal 1.10.1 -*- Autoconf -*- 2209ff23fSmrg 3209ff23fSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4ad43ddacSmrg# 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 5209ff23fSmrg# This file is free software; the Free Software Foundation 6209ff23fSmrg# gives unlimited permission to copy and/or distribute it, 7209ff23fSmrg# with or without modifications, as long as this notice is preserved. 8209ff23fSmrg 9209ff23fSmrg# This program is distributed in the hope that it will be useful, 10209ff23fSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11209ff23fSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12209ff23fSmrg# PARTICULAR PURPOSE. 13209ff23fSmrg 14209ff23fSmrgm4_ifndef([AC_AUTOCONF_VERSION], 15209ff23fSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16ad43ddacSmrgm4_if(AC_AUTOCONF_VERSION, [2.61],, 17ad43ddacSmrg[m4_warning([this file was generated for autoconf 2.61. 18209ff23fSmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19209ff23fSmrgIf you have problems, you may need to regenerate the build system entirely. 20209ff23fSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21209ff23fSmrg 22209ff23fSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23ad43ddacSmrg# 24ad43ddacSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25ad43ddacSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 26ad43ddacSmrg# Written by Gordon Matzigkeit, 1996 27ad43ddacSmrg# 28ad43ddacSmrg# This file is free software; the Free Software Foundation gives 29ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without 30ad43ddacSmrg# modifications, as long as this notice is preserved. 31ad43ddacSmrg 32ad43ddacSmrgm4_define([_LT_COPYING], [dnl 33ad43ddacSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 34ad43ddacSmrg# 2006, 2007, 2008 Free Software Foundation, Inc. 35ad43ddacSmrg# Written by Gordon Matzigkeit, 1996 36ad43ddacSmrg# 37ad43ddacSmrg# This file is part of GNU Libtool. 38ad43ddacSmrg# 39ad43ddacSmrg# GNU Libtool is free software; you can redistribute it and/or 40ad43ddacSmrg# modify it under the terms of the GNU General Public License as 41ad43ddacSmrg# published by the Free Software Foundation; either version 2 of 42ad43ddacSmrg# the License, or (at your option) any later version. 43ad43ddacSmrg# 44ad43ddacSmrg# As a special exception to the GNU General Public License, 45ad43ddacSmrg# if you distribute this file as part of a program or library that 46ad43ddacSmrg# is built using GNU Libtool, you may include this file under the 47ad43ddacSmrg# same distribution terms that you use for the rest of that program. 48ad43ddacSmrg# 49ad43ddacSmrg# GNU Libtool is distributed in the hope that it will be useful, 50ad43ddacSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 51ad43ddacSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 52ad43ddacSmrg# GNU General Public License for more details. 53ad43ddacSmrg# 54ad43ddacSmrg# You should have received a copy of the GNU General Public License 55ad43ddacSmrg# along with GNU Libtool; see the file COPYING. If not, a copy 56ad43ddacSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 57ad43ddacSmrg# obtained by writing to the Free Software Foundation, Inc., 58ad43ddacSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 59ad43ddacSmrg]) 60209ff23fSmrg 61ad43ddacSmrg# serial 56 LT_INIT 62209ff23fSmrg 63209ff23fSmrg 64ad43ddacSmrg# LT_PREREQ(VERSION) 65ad43ddacSmrg# ------------------ 66ad43ddacSmrg# Complain and exit if this libtool version is less that VERSION. 67ad43ddacSmrgm4_defun([LT_PREREQ], 68ad43ddacSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 69ad43ddacSmrg [m4_default([$3], 70ad43ddacSmrg [m4_fatal([Libtool version $1 or higher is required], 71ad43ddacSmrg 63)])], 72ad43ddacSmrg [$2])]) 73209ff23fSmrg 74209ff23fSmrg 75ad43ddacSmrg# _LT_CHECK_BUILDDIR 76ad43ddacSmrg# ------------------ 77ad43ddacSmrg# Complain if the absolute build directory name contains unusual characters 78ad43ddacSmrgm4_defun([_LT_CHECK_BUILDDIR], 79ad43ddacSmrg[case `pwd` in 80ad43ddacSmrg *\ * | *\ *) 81ad43ddacSmrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 82ad43ddacSmrgesac 83ad43ddacSmrg]) 84ad43ddacSmrg 85ad43ddacSmrg 86ad43ddacSmrg# LT_INIT([OPTIONS]) 87ad43ddacSmrg# ------------------ 88ad43ddacSmrgAC_DEFUN([LT_INIT], 89ad43ddacSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 90ad43ddacSmrgAC_BEFORE([$0], [LT_LANG])dnl 91ad43ddacSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 92ad43ddacSmrgAC_BEFORE([$0], [LTDL_INIT])dnl 93ad43ddacSmrgm4_require([_LT_CHECK_BUILDDIR])dnl 94ad43ddacSmrg 95ad43ddacSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 96ad43ddacSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 97ad43ddacSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 98ad43ddacSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 99ad43ddacSmrgdnl unless we require an AC_DEFUNed macro: 100ad43ddacSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 101ad43ddacSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 102ad43ddacSmrgAC_REQUIRE([LTVERSION_VERSION])dnl 103ad43ddacSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 104ad43ddacSmrgm4_require([_LT_PROG_LTMAIN])dnl 105ad43ddacSmrg 106ad43ddacSmrgdnl Parse OPTIONS 107ad43ddacSmrg_LT_SET_OPTIONS([$0], [$1]) 108209ff23fSmrg 109209ff23fSmrg# This can be used to rebuild libtool when needed 110ad43ddacSmrgLIBTOOL_DEPS="$ltmain" 111209ff23fSmrg 112209ff23fSmrg# Always use our own libtool. 113209ff23fSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 114209ff23fSmrgAC_SUBST(LIBTOOL)dnl 115209ff23fSmrg 116ad43ddacSmrg_LT_SETUP 117209ff23fSmrg 118ad43ddacSmrg# Only expand once: 119ad43ddacSmrgm4_define([LT_INIT]) 120ad43ddacSmrg])# LT_INIT 121209ff23fSmrg 122ad43ddacSmrg# Old names: 123ad43ddacSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 124ad43ddacSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 125ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 126ad43ddacSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 127ad43ddacSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 128ad43ddacSmrg 129ad43ddacSmrg 130ad43ddacSmrg# _LT_CC_BASENAME(CC) 131ad43ddacSmrg# ------------------- 132ad43ddacSmrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 133ad43ddacSmrgm4_defun([_LT_CC_BASENAME], 134ad43ddacSmrg[for cc_temp in $1""; do 135ad43ddacSmrg case $cc_temp in 136ad43ddacSmrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137ad43ddacSmrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138ad43ddacSmrg \-*) ;; 139ad43ddacSmrg *) break;; 140ad43ddacSmrg esac 141ad43ddacSmrgdone 142ad43ddacSmrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 143ad43ddacSmrg]) 144ad43ddacSmrg 145ad43ddacSmrg 146ad43ddacSmrg# _LT_FILEUTILS_DEFAULTS 147ad43ddacSmrg# ---------------------- 148ad43ddacSmrg# It is okay to use these file commands and assume they have been set 149ad43ddacSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 150ad43ddacSmrgm4_defun([_LT_FILEUTILS_DEFAULTS], 151ad43ddacSmrg[: ${CP="cp -f"} 152ad43ddacSmrg: ${MV="mv -f"} 153ad43ddacSmrg: ${RM="rm -f"} 154ad43ddacSmrg])# _LT_FILEUTILS_DEFAULTS 155ad43ddacSmrg 156ad43ddacSmrg 157ad43ddacSmrg# _LT_SETUP 158ad43ddacSmrg# --------- 159ad43ddacSmrgm4_defun([_LT_SETUP], 160ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 161209ff23fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 162ad43ddacSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl 163ad43ddacSmrg_LT_DECL([], [host], [0])dnl 164ad43ddacSmrg_LT_DECL([], [host_os], [0])dnl 165ad43ddacSmrgdnl 166ad43ddacSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl 167ad43ddacSmrg_LT_DECL([], [build], [0])dnl 168ad43ddacSmrg_LT_DECL([], [build_os], [0])dnl 169ad43ddacSmrgdnl 170209ff23fSmrgAC_REQUIRE([AC_PROG_CC])dnl 171ad43ddacSmrgAC_REQUIRE([LT_PATH_LD])dnl 172ad43ddacSmrgAC_REQUIRE([LT_PATH_NM])dnl 173ad43ddacSmrgdnl 174209ff23fSmrgAC_REQUIRE([AC_PROG_LN_S])dnl 175ad43ddacSmrgtest -z "$LN_S" && LN_S="ln -s" 176ad43ddacSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 177209ff23fSmrgdnl 178ad43ddacSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 179ad43ddacSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 180ad43ddacSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 181ad43ddacSmrgdnl 182ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 183ad43ddacSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 184ad43ddacSmrgm4_require([_LT_CMD_RELOAD])dnl 185ad43ddacSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 186ad43ddacSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 187ad43ddacSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 188ad43ddacSmrg 189ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([ 190ad43ddacSmrg# See if we are running on zsh, and set the options which allow our 191ad43ddacSmrg# commands through without removal of \ escapes INIT. 192ad43ddacSmrgif test -n "\${ZSH_VERSION+set}" ; then 193ad43ddacSmrg setopt NO_GLOB_SUBST 194ad43ddacSmrgfi 195ad43ddacSmrg]) 196ad43ddacSmrgif test -n "${ZSH_VERSION+set}" ; then 197ad43ddacSmrg setopt NO_GLOB_SUBST 198ad43ddacSmrgfi 199209ff23fSmrg 200ad43ddacSmrg_LT_CHECK_OBJDIR 201ad43ddacSmrg 202ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl 203ad43ddacSmrg_LT_PROG_ECHO_BACKSLASH 204209ff23fSmrg 205209ff23fSmrgcase $host_os in 206209ff23fSmrgaix3*) 207209ff23fSmrg # AIX sometimes has problems with the GCC collect2 program. For some 208209ff23fSmrg # reason, if we set the COLLECT_NAMES environment variable, the problems 209209ff23fSmrg # vanish in a puff of smoke. 210209ff23fSmrg if test "X${COLLECT_NAMES+set}" != Xset; then 211209ff23fSmrg COLLECT_NAMES= 212209ff23fSmrg export COLLECT_NAMES 213209ff23fSmrg fi 214209ff23fSmrg ;; 215209ff23fSmrgesac 216209ff23fSmrg 217209ff23fSmrg# Sed substitution that helps us do robust quoting. It backslashifies 218209ff23fSmrg# metacharacters that are still active within double-quoted strings. 219ad43ddacSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 220209ff23fSmrg 221209ff23fSmrg# Same as above, but do not quote variable references. 222ad43ddacSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 223209ff23fSmrg 224209ff23fSmrg# Sed substitution to delay expansion of an escaped shell variable in a 225209ff23fSmrg# double_quote_subst'ed string. 226209ff23fSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 227209ff23fSmrg 228ad43ddacSmrg# Sed substitution to delay expansion of an escaped single quote. 229ad43ddacSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 230ad43ddacSmrg 231209ff23fSmrg# Sed substitution to avoid accidental globbing in evaled expressions 232209ff23fSmrgno_glob_subst='s/\*/\\\*/g' 233209ff23fSmrg 234209ff23fSmrg# Global variables: 235ad43ddacSmrgofile=libtool 236209ff23fSmrgcan_build_shared=yes 237209ff23fSmrg 238209ff23fSmrg# All known linkers require a `.a' archive for static linking (except MSVC, 239209ff23fSmrg# which needs '.lib'). 240209ff23fSmrglibext=a 241209ff23fSmrg 242ad43ddacSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 243209ff23fSmrg 244209ff23fSmrgold_CC="$CC" 245209ff23fSmrgold_CFLAGS="$CFLAGS" 246209ff23fSmrg 247209ff23fSmrg# Set sane defaults for various variables 248209ff23fSmrgtest -z "$CC" && CC=cc 249209ff23fSmrgtest -z "$LTCC" && LTCC=$CC 250209ff23fSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 251209ff23fSmrgtest -z "$LD" && LD=ld 252209ff23fSmrgtest -z "$ac_objext" && ac_objext=o 253209ff23fSmrg 254209ff23fSmrg_LT_CC_BASENAME([$compiler]) 255209ff23fSmrg 256209ff23fSmrg# Only perform the check for file, if the check method requires it 257ad43ddacSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 258209ff23fSmrgcase $deplibs_check_method in 259209ff23fSmrgfile_magic*) 260209ff23fSmrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 261ad43ddacSmrg _LT_PATH_MAGIC 262209ff23fSmrg fi 263209ff23fSmrg ;; 264209ff23fSmrgesac 265209ff23fSmrg 266ad43ddacSmrg# Use C for the default configuration in the libtool script 267ad43ddacSmrgLT_SUPPORTED_TAG([CC]) 268ad43ddacSmrg_LT_LANG_C_CONFIG 269ad43ddacSmrg_LT_LANG_DEFAULT_CONFIG 270ad43ddacSmrg_LT_CONFIG_COMMANDS 271ad43ddacSmrg])# _LT_SETUP 272209ff23fSmrg 273209ff23fSmrg 274ad43ddacSmrg# _LT_PROG_LTMAIN 275ad43ddacSmrg# --------------- 276ad43ddacSmrg# Note that this code is called both from `configure', and `config.status' 277ad43ddacSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 278ad43ddacSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 279ad43ddacSmrg# so we pass a copy along to make sure it has a sensible value anyway. 280ad43ddacSmrgm4_defun([_LT_PROG_LTMAIN], 281ad43ddacSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 282ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 283ad43ddacSmrgltmain="$ac_aux_dir/ltmain.sh" 284ad43ddacSmrg])# _LT_PROG_LTMAIN 285209ff23fSmrg 286209ff23fSmrg 287ad43ddacSmrg 288ad43ddacSmrg# So that we can recreate a full libtool script including additional 289ad43ddacSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 290ad43ddacSmrg# in macros and then make a single call at the end using the `libtool' 291ad43ddacSmrg# label. 292ad43ddacSmrg 293ad43ddacSmrg 294ad43ddacSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 295ad43ddacSmrg# ---------------------------------------- 296ad43ddacSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 297ad43ddacSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 298ad43ddacSmrg[m4_ifval([$1], 299ad43ddacSmrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 300ad43ddacSmrg [$1 301ad43ddacSmrg])])]) 302ad43ddacSmrg 303ad43ddacSmrg# Initialize. 304ad43ddacSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 305ad43ddacSmrg 306ad43ddacSmrg 307ad43ddacSmrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 308ad43ddacSmrg# ------------------------------ 309ad43ddacSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 310ad43ddacSmrgm4_define([_LT_CONFIG_LIBTOOL], 311ad43ddacSmrg[m4_ifval([$1], 312ad43ddacSmrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 313ad43ddacSmrg [$1 314ad43ddacSmrg])])]) 315ad43ddacSmrg 316ad43ddacSmrg# Initialize. 317ad43ddacSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 318ad43ddacSmrg 319ad43ddacSmrg 320ad43ddacSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 321ad43ddacSmrg# ----------------------------------------------------- 322ad43ddacSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 323ad43ddacSmrg[_LT_CONFIG_LIBTOOL([$1]) 324ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([$2]) 325ad43ddacSmrg]) 326ad43ddacSmrg 327ad43ddacSmrg 328ad43ddacSmrg# _LT_FORMAT_COMMENT([COMMENT]) 329ad43ddacSmrg# ----------------------------- 330ad43ddacSmrg# Add leading comment marks to the start of each line, and a trailing 331ad43ddacSmrg# full-stop to the whole comment if one is not present already. 332ad43ddacSmrgm4_define([_LT_FORMAT_COMMENT], 333ad43ddacSmrg[m4_ifval([$1], [ 334ad43ddacSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 335ad43ddacSmrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 336ad43ddacSmrg)]) 337ad43ddacSmrg 338ad43ddacSmrg 339ad43ddacSmrg 340ad43ddacSmrg 341ad43ddacSmrg 342ad43ddacSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 343ad43ddacSmrg# ------------------------------------------------------------------- 344ad43ddacSmrg# CONFIGNAME is the name given to the value in the libtool script. 345ad43ddacSmrg# VARNAME is the (base) name used in the configure script. 346ad43ddacSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 347ad43ddacSmrg# VARNAME. Any other value will be used directly. 348ad43ddacSmrgm4_define([_LT_DECL], 349ad43ddacSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 350ad43ddacSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 351ad43ddacSmrg [m4_ifval([$1], [$1], [$2])]) 352ad43ddacSmrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 353ad43ddacSmrg m4_ifval([$4], 354ad43ddacSmrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 355ad43ddacSmrg lt_dict_add_subkey([lt_decl_dict], [$2], 356ad43ddacSmrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 357ad43ddacSmrg]) 358ad43ddacSmrg 359ad43ddacSmrg 360ad43ddacSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 361ad43ddacSmrg# -------------------------------------------------------- 362ad43ddacSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 363ad43ddacSmrg 364ad43ddacSmrg 365ad43ddacSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 366ad43ddacSmrg# ------------------------------------------------ 367ad43ddacSmrgm4_define([lt_decl_tag_varnames], 368ad43ddacSmrg[_lt_decl_filter([tagged?], [yes], $@)]) 369ad43ddacSmrg 370ad43ddacSmrg 371ad43ddacSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 372ad43ddacSmrg# --------------------------------------------------------- 373ad43ddacSmrgm4_define([_lt_decl_filter], 374ad43ddacSmrg[m4_case([$#], 375ad43ddacSmrg [0], [m4_fatal([$0: too few arguments: $#])], 376ad43ddacSmrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 377ad43ddacSmrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 378ad43ddacSmrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 379ad43ddacSmrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 380ad43ddacSmrg]) 381ad43ddacSmrg 382ad43ddacSmrg 383ad43ddacSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 384ad43ddacSmrg# -------------------------------------------------- 385ad43ddacSmrgm4_define([lt_decl_quote_varnames], 386ad43ddacSmrg[_lt_decl_filter([value], [1], $@)]) 387ad43ddacSmrg 388ad43ddacSmrg 389ad43ddacSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 390ad43ddacSmrg# --------------------------------------------------- 391ad43ddacSmrgm4_define([lt_decl_dquote_varnames], 392ad43ddacSmrg[_lt_decl_filter([value], [2], $@)]) 393ad43ddacSmrg 394ad43ddacSmrg 395ad43ddacSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 396ad43ddacSmrg# --------------------------------------------------- 397ad43ddacSmrgm4_define([lt_decl_varnames_tagged], 398ad43ddacSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 399ad43ddacSmrg m4_quote(m4_if([$2], [], 400ad43ddacSmrg m4_quote(lt_decl_tag_varnames), 401ad43ddacSmrg m4_quote(m4_shift($@)))), 402ad43ddacSmrg m4_split(m4_normalize(m4_quote(_LT_TAGS))))]) 403ad43ddacSmrgm4_define([_lt_decl_varnames_tagged], [lt_combine([$1], [$2], [_], $3)]) 404ad43ddacSmrg 405ad43ddacSmrg 406ad43ddacSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 407ad43ddacSmrg# ------------------------------------------------ 408ad43ddacSmrgm4_define([lt_decl_all_varnames], 409ad43ddacSmrg[_$0(m4_quote(m4_default([$1], [[, ]])), 410ad43ddacSmrg m4_if([$2], [], 411ad43ddacSmrg m4_quote(lt_decl_varnames), 412ad43ddacSmrg m4_quote(m4_shift($@))))[]dnl 413ad43ddacSmrg]) 414ad43ddacSmrgm4_define([_lt_decl_all_varnames], 415ad43ddacSmrg[lt_join($@, lt_decl_varnames_tagged([$1], 416ad43ddacSmrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 417ad43ddacSmrg]) 418ad43ddacSmrg 419ad43ddacSmrg 420ad43ddacSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 421ad43ddacSmrg# ------------------------------------ 422ad43ddacSmrg# Quote a variable value, and forward it to `config.status' so that its 423ad43ddacSmrg# declaration there will have the same value as in `configure'. VARNAME 424ad43ddacSmrg# must have a single quote delimited value for this to work. 425ad43ddacSmrgm4_define([_LT_CONFIG_STATUS_DECLARE], 426ad43ddacSmrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 427ad43ddacSmrg 428ad43ddacSmrg 429ad43ddacSmrg# _LT_CONFIG_STATUS_DECLARATIONS 430ad43ddacSmrg# ------------------------------ 431ad43ddacSmrg# We delimit libtool config variables with single quotes, so when 432ad43ddacSmrg# we write them to config.status, we have to be sure to quote all 433ad43ddacSmrg# embedded single quotes properly. In configure, this macro expands 434ad43ddacSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 435ad43ddacSmrg# 436ad43ddacSmrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 437ad43ddacSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 438ad43ddacSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 439ad43ddacSmrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 440ad43ddacSmrg 441ad43ddacSmrg 442ad43ddacSmrg# _LT_LIBTOOL_TAGS 443ad43ddacSmrg# ---------------- 444ad43ddacSmrg# Output comment and list of tags supported by the script 445ad43ddacSmrgm4_defun([_LT_LIBTOOL_TAGS], 446ad43ddacSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 447ad43ddacSmrgavailable_tags="_LT_TAGS"dnl 448ad43ddacSmrg]) 449ad43ddacSmrg 450ad43ddacSmrg 451ad43ddacSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 452ad43ddacSmrg# ----------------------------------- 453ad43ddacSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and 454ad43ddacSmrg# expand to a commented shell variable setting: 455ad43ddacSmrg# 456ad43ddacSmrg# # Some comment about what VAR is for. 457ad43ddacSmrg# visible_name=$lt_internal_name 458ad43ddacSmrgm4_define([_LT_LIBTOOL_DECLARE], 459ad43ddacSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 460ad43ddacSmrg [description])))[]dnl 461ad43ddacSmrgm4_pushdef([_libtool_name], 462ad43ddacSmrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 463ad43ddacSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 464ad43ddacSmrg [0], [_libtool_name=[$]$1], 465ad43ddacSmrg [1], [_libtool_name=$lt_[]$1], 466ad43ddacSmrg [2], [_libtool_name=$lt_[]$1], 467ad43ddacSmrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 468ad43ddacSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 469ad43ddacSmrg]) 470ad43ddacSmrg 471ad43ddacSmrg 472ad43ddacSmrg# _LT_LIBTOOL_CONFIG_VARS 473ad43ddacSmrg# ----------------------- 474ad43ddacSmrg# Produce commented declarations of non-tagged libtool config variables 475ad43ddacSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 476ad43ddacSmrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 477ad43ddacSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 478ad43ddacSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 479ad43ddacSmrg[m4_foreach([_lt_var], 480ad43ddacSmrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 481ad43ddacSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482ad43ddacSmrg 483ad43ddacSmrg 484ad43ddacSmrg# _LT_LIBTOOL_TAG_VARS(TAG) 485ad43ddacSmrg# ------------------------- 486ad43ddacSmrgm4_define([_LT_LIBTOOL_TAG_VARS], 487ad43ddacSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 488ad43ddacSmrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 489209ff23fSmrg 490209ff23fSmrg 491ad43ddacSmrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 492ad43ddacSmrg# ------------------------------ 493ad43ddacSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 494ad43ddacSmrg 495ad43ddacSmrg 496ad43ddacSmrg# _LT_CONFIG_COMMANDS 497209ff23fSmrg# ------------------- 498ad43ddacSmrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 499ad43ddacSmrg# variables for single and double quote escaping we saved from calls 500ad43ddacSmrg# to _LT_DECL, we can put quote escaped variables declarations 501ad43ddacSmrg# into `config.status', and then the shell code to quote escape them in 502ad43ddacSmrg# for loops in `config.status'. Finally, any additional code accumulated 503ad43ddacSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 504ad43ddacSmrgm4_defun([_LT_CONFIG_COMMANDS], 505ad43ddacSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 506ad43ddacSmrg dnl If the libtool generation code has been placed in $CONFIG_LT, 507ad43ddacSmrg dnl instead of duplicating it all over again into config.status, 508ad43ddacSmrg dnl then we will have config.status run $CONFIG_LT later, so it 509ad43ddacSmrg dnl needs to know what name is stored there: 510ad43ddacSmrg [AC_CONFIG_COMMANDS([libtool], 511ad43ddacSmrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 512ad43ddacSmrg dnl If the libtool generation code is destined for config.status, 513ad43ddacSmrg dnl expand the accumulated commands and init code now: 514ad43ddacSmrg [AC_CONFIG_COMMANDS([libtool], 515ad43ddacSmrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 516ad43ddacSmrg])#_LT_CONFIG_COMMANDS 517ad43ddacSmrg 518ad43ddacSmrg 519ad43ddacSmrg# Initialize. 520ad43ddacSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 521ad43ddacSmrg[ 522ad43ddacSmrg 523ad43ddacSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 524ad43ddacSmrg# if CDPATH is set. 525ad43ddacSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 526ad43ddacSmrg 527ad43ddacSmrgsed_quote_subst='$sed_quote_subst' 528ad43ddacSmrgdouble_quote_subst='$double_quote_subst' 529ad43ddacSmrgdelay_variable_subst='$delay_variable_subst' 530ad43ddacSmrg_LT_CONFIG_STATUS_DECLARATIONS 531ad43ddacSmrgLTCC='$LTCC' 532ad43ddacSmrgLTCFLAGS='$LTCFLAGS' 533ad43ddacSmrgcompiler='$compiler_DEFAULT' 534ad43ddacSmrg 535ad43ddacSmrg# Quote evaled strings. 536ad43ddacSmrgfor var in lt_decl_all_varnames([[ \ 537ad43ddacSmrg]], lt_decl_quote_varnames); do 538ad43ddacSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 539ad43ddacSmrg *[[\\\\\\\`\\"\\\$]]*) 540ad43ddacSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 541ad43ddacSmrg ;; 542ad43ddacSmrg *) 543ad43ddacSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 544ad43ddacSmrg ;; 545ad43ddacSmrg esac 546ad43ddacSmrgdone 547ad43ddacSmrg 548ad43ddacSmrg# Double-quote double-evaled strings. 549ad43ddacSmrgfor var in lt_decl_all_varnames([[ \ 550ad43ddacSmrg]], lt_decl_dquote_varnames); do 551ad43ddacSmrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 552ad43ddacSmrg *[[\\\\\\\`\\"\\\$]]*) 553ad43ddacSmrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 554ad43ddacSmrg ;; 555ad43ddacSmrg *) 556ad43ddacSmrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 557ad43ddacSmrg ;; 558ad43ddacSmrg esac 559ad43ddacSmrgdone 560ad43ddacSmrg 561ad43ddacSmrg# Fix-up fallback echo if it was mangled by the above quoting rules. 562ad43ddacSmrgcase \$lt_ECHO in 563ad43ddacSmrg*'\\\[$]0 --fallback-echo"')dnl " 564ad43ddacSmrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 565ad43ddacSmrg ;; 566ad43ddacSmrgesac 567ad43ddacSmrg 568ad43ddacSmrg_LT_OUTPUT_LIBTOOL_INIT 569ad43ddacSmrg]) 570ad43ddacSmrg 571ad43ddacSmrg 572ad43ddacSmrg# LT_OUTPUT 573ad43ddacSmrg# --------- 574ad43ddacSmrg# This macro allows early generation of the libtool script (before 575ad43ddacSmrg# AC_OUTPUT is called), incase it is used in configure for compilation 576ad43ddacSmrg# tests. 577ad43ddacSmrgAC_DEFUN([LT_OUTPUT], 578ad43ddacSmrg[: ${CONFIG_LT=./config.lt} 579ad43ddacSmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 580ad43ddacSmrgcat >"$CONFIG_LT" <<_LTEOF 581ad43ddacSmrg#! $SHELL 582ad43ddacSmrg# Generated by $as_me. 583ad43ddacSmrg# Run this file to recreate a libtool stub with the current configuration. 584ad43ddacSmrg 585ad43ddacSmrglt_cl_silent=false 586ad43ddacSmrgSHELL=\${CONFIG_SHELL-$SHELL} 587ad43ddacSmrg_LTEOF 588ad43ddacSmrg 589ad43ddacSmrgcat >>"$CONFIG_LT" <<\_LTEOF 590ad43ddacSmrgAS_SHELL_SANITIZE 591ad43ddacSmrg_AS_PREPARE 592ad43ddacSmrg 593ad43ddacSmrgexec AS_MESSAGE_FD>&1 594ad43ddacSmrgexec AS_MESSAGE_LOG_FD>>config.log 595ad43ddacSmrg{ 596ad43ddacSmrg echo 597ad43ddacSmrg AS_BOX([Running $as_me.]) 598ad43ddacSmrg} >&AS_MESSAGE_LOG_FD 599ad43ddacSmrg 600ad43ddacSmrglt_cl_help="\ 601ad43ddacSmrg\`$as_me' creates a local libtool stub from the current configuration, 602ad43ddacSmrgfor use in further configure time tests before the real libtool is 603ad43ddacSmrggenerated. 604ad43ddacSmrg 605ad43ddacSmrgUsage: $[0] [[OPTIONS]] 606ad43ddacSmrg 607ad43ddacSmrg -h, --help print this help, then exit 608ad43ddacSmrg -V, --version print version number, then exit 609ad43ddacSmrg -q, --quiet do not print progress messages 610ad43ddacSmrg -d, --debug don't remove temporary files 611ad43ddacSmrg 612ad43ddacSmrgReport bugs to <bug-libtool@gnu.org>." 613ad43ddacSmrg 614ad43ddacSmrglt_cl_version="\ 615ad43ddacSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 616ad43ddacSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 617ad43ddacSmrgconfigured by $[0], generated by m4_PACKAGE_STRING. 618ad43ddacSmrg 619ad43ddacSmrgCopyright (C) 2008 Free Software Foundation, Inc. 620ad43ddacSmrgThis config.lt script is free software; the Free Software Foundation 621ad43ddacSmrggives unlimited permision to copy, distribute and modify it." 622ad43ddacSmrg 623ad43ddacSmrgwhile test $[#] != 0 624ad43ddacSmrgdo 625ad43ddacSmrg case $[1] in 626ad43ddacSmrg --version | --v* | -V ) 627ad43ddacSmrg echo "$lt_cl_version"; exit 0 ;; 628ad43ddacSmrg --help | --h* | -h ) 629ad43ddacSmrg echo "$lt_cl_help"; exit 0 ;; 630ad43ddacSmrg --debug | --d* | -d ) 631ad43ddacSmrg debug=: ;; 632ad43ddacSmrg --quiet | --q* | --silent | --s* | -q ) 633ad43ddacSmrg lt_cl_silent=: ;; 634ad43ddacSmrg 635ad43ddacSmrg -*) AC_MSG_ERROR([unrecognized option: $[1] 636ad43ddacSmrgTry \`$[0] --help' for more information.]) ;; 637ad43ddacSmrg 638ad43ddacSmrg *) AC_MSG_ERROR([unrecognized argument: $[1] 639ad43ddacSmrgTry \`$[0] --help' for more information.]) ;; 640ad43ddacSmrg esac 641ad43ddacSmrg shift 642ad43ddacSmrgdone 643ad43ddacSmrg 644ad43ddacSmrgif $lt_cl_silent; then 645ad43ddacSmrg exec AS_MESSAGE_FD>/dev/null 646ad43ddacSmrgfi 647ad43ddacSmrg_LTEOF 648ad43ddacSmrg 649ad43ddacSmrgcat >>"$CONFIG_LT" <<_LTEOF 650ad43ddacSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 651ad43ddacSmrg_LTEOF 652ad43ddacSmrg 653ad43ddacSmrgcat >>"$CONFIG_LT" <<\_LTEOF 654ad43ddacSmrgAC_MSG_NOTICE([creating $ofile]) 655ad43ddacSmrg_LT_OUTPUT_LIBTOOL_COMMANDS 656ad43ddacSmrgAS_EXIT(0) 657ad43ddacSmrg_LTEOF 658ad43ddacSmrgchmod +x "$CONFIG_LT" 659ad43ddacSmrg 660ad43ddacSmrg# configure is writing to config.log, but config.lt does its own redirection, 661ad43ddacSmrg# appending to config.log, which fails on DOS, as config.log is still kept 662ad43ddacSmrg# open by configure. Here we exec the FD to /dev/null, effectively closing 663ad43ddacSmrg# config.log, so it can be properly (re)opened and appended to by config.lt. 664ad43ddacSmrgif test "$no_create" != yes; then 665ad43ddacSmrg lt_cl_success=: 666ad43ddacSmrg test "$silent" = yes && 667ad43ddacSmrg lt_config_lt_args="$lt_config_lt_args --quiet" 668ad43ddacSmrg exec AS_MESSAGE_LOG_FD>/dev/null 669ad43ddacSmrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 670ad43ddacSmrg exec AS_MESSAGE_LOG_FD>>config.log 671ad43ddacSmrg $lt_cl_success || AS_EXIT(1) 672ad43ddacSmrgfi 673ad43ddacSmrg])# LT_OUTPUT 674ad43ddacSmrg 675ad43ddacSmrg 676ad43ddacSmrg# _LT_CONFIG(TAG) 677ad43ddacSmrg# --------------- 678ad43ddacSmrg# If TAG is the built-in tag, create an initial libtool script with a 679ad43ddacSmrg# default configuration from the untagged config vars. Otherwise add code 680ad43ddacSmrg# to config.status for appending the configuration named by TAG from the 681ad43ddacSmrg# matching tagged config vars. 682ad43ddacSmrgm4_defun([_LT_CONFIG], 683ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 684ad43ddacSmrg_LT_CONFIG_SAVE_COMMANDS([ 685ad43ddacSmrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 686ad43ddacSmrg m4_if(_LT_TAG, [C], [ 687ad43ddacSmrg # See if we are running on zsh, and set the options which allow our 688ad43ddacSmrg # commands through without removal of \ escapes. 689ad43ddacSmrg if test -n "${ZSH_VERSION+set}" ; then 690ad43ddacSmrg setopt NO_GLOB_SUBST 691ad43ddacSmrg fi 692ad43ddacSmrg 693ad43ddacSmrg cfgfile="${ofile}T" 694ad43ddacSmrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 695ad43ddacSmrg $RM "$cfgfile" 696ad43ddacSmrg 697ad43ddacSmrg cat <<_LT_EOF >> "$cfgfile" 698ad43ddacSmrg#! $SHELL 699ad43ddacSmrg 700ad43ddacSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 701ad43ddacSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 702ad43ddacSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 703ad43ddacSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 704ad43ddacSmrg# 705ad43ddacSmrg_LT_COPYING 706ad43ddacSmrg_LT_LIBTOOL_TAGS 707ad43ddacSmrg 708ad43ddacSmrg# ### BEGIN LIBTOOL CONFIG 709ad43ddacSmrg_LT_LIBTOOL_CONFIG_VARS 710ad43ddacSmrg_LT_LIBTOOL_TAG_VARS 711ad43ddacSmrg# ### END LIBTOOL CONFIG 712ad43ddacSmrg 713ad43ddacSmrg_LT_EOF 714ad43ddacSmrg 715ad43ddacSmrg case $host_os in 716ad43ddacSmrg aix3*) 717ad43ddacSmrg cat <<\_LT_EOF >> "$cfgfile" 718ad43ddacSmrg# AIX sometimes has problems with the GCC collect2 program. For some 719ad43ddacSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems 720ad43ddacSmrg# vanish in a puff of smoke. 721ad43ddacSmrgif test "X${COLLECT_NAMES+set}" != Xset; then 722ad43ddacSmrg COLLECT_NAMES= 723ad43ddacSmrg export COLLECT_NAMES 724ad43ddacSmrgfi 725ad43ddacSmrg_LT_EOF 726ad43ddacSmrg ;; 727ad43ddacSmrg esac 728ad43ddacSmrg 729ad43ddacSmrg _LT_PROG_LTMAIN 730ad43ddacSmrg 731ad43ddacSmrg # We use sed instead of cat because bash on DJGPP gets confused if 732ad43ddacSmrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 733ad43ddacSmrg # text mode, it properly converts lines to CR/LF. This bash problem 734ad43ddacSmrg # is reportedly fixed, but why not run on old versions too? 735ad43ddacSmrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 736ad43ddacSmrg || (rm -f "$cfgfile"; exit 1) 737ad43ddacSmrg 738ad43ddacSmrg _LT_PROG_XSI_SHELLFNS 739ad43ddacSmrg 740ad43ddacSmrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 741ad43ddacSmrg || (rm -f "$cfgfile"; exit 1) 742ad43ddacSmrg 743ad43ddacSmrg mv -f "$cfgfile" "$ofile" || 744ad43ddacSmrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 745ad43ddacSmrg chmod +x "$ofile" 746ad43ddacSmrg], 747ad43ddacSmrg[cat <<_LT_EOF >> "$ofile" 748ad43ddacSmrg 749ad43ddacSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 750ad43ddacSmrgdnl in a comment (ie after a #). 751ad43ddacSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1 752ad43ddacSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 753ad43ddacSmrg# ### END LIBTOOL TAG CONFIG: $1 754ad43ddacSmrg_LT_EOF 755ad43ddacSmrg])dnl /m4_if 756ad43ddacSmrg], 757ad43ddacSmrg[m4_if([$1], [], [ 758ad43ddacSmrg PACKAGE='$PACKAGE' 759ad43ddacSmrg VERSION='$VERSION' 760ad43ddacSmrg TIMESTAMP='$TIMESTAMP' 761ad43ddacSmrg RM='$RM' 762ad43ddacSmrg ofile='$ofile'], []) 763ad43ddacSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS 764ad43ddacSmrg])# _LT_CONFIG 765ad43ddacSmrg 766ad43ddacSmrg 767ad43ddacSmrg# LT_SUPPORTED_TAG(TAG) 768ad43ddacSmrg# --------------------- 769ad43ddacSmrg# Trace this macro to discover what tags are supported by the libtool 770ad43ddacSmrg# --tag option, using: 771ad43ddacSmrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 772ad43ddacSmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 773ad43ddacSmrg 774ad43ddacSmrg 775ad43ddacSmrg# C support is built-in for now 776ad43ddacSmrgm4_define([_LT_LANG_C_enabled], []) 777ad43ddacSmrgm4_define([_LT_TAGS], []) 778ad43ddacSmrg 779ad43ddacSmrg 780ad43ddacSmrg# LT_LANG(LANG) 781ad43ddacSmrg# ------------- 782ad43ddacSmrg# Enable libtool support for the given language if not already enabled. 783ad43ddacSmrgAC_DEFUN([LT_LANG], 784ad43ddacSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 785ad43ddacSmrgm4_case([$1], 786ad43ddacSmrg [C], [_LT_LANG(C)], 787ad43ddacSmrg [C++], [_LT_LANG(CXX)], 788ad43ddacSmrg [Java], [_LT_LANG(GCJ)], 789ad43ddacSmrg [Fortran 77], [_LT_LANG(F77)], 790ad43ddacSmrg [Fortran], [_LT_LANG(FC)], 791ad43ddacSmrg [Windows Resource], [_LT_LANG(RC)], 792ad43ddacSmrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 793ad43ddacSmrg [_LT_LANG($1)], 794ad43ddacSmrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 795ad43ddacSmrg])# LT_LANG 796ad43ddacSmrg 797ad43ddacSmrg 798ad43ddacSmrg# _LT_LANG(LANGNAME) 799ad43ddacSmrg# ------------------ 800ad43ddacSmrgm4_defun([_LT_LANG], 801ad43ddacSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 802ad43ddacSmrg [LT_SUPPORTED_TAG([$1])dnl 803ad43ddacSmrg m4_append([_LT_TAGS], [$1 ])dnl 804ad43ddacSmrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 805ad43ddacSmrg _LT_LANG_$1_CONFIG($1)])dnl 806ad43ddacSmrg])# _LT_LANG 807ad43ddacSmrg 808ad43ddacSmrg 809ad43ddacSmrg# _LT_LANG_DEFAULT_CONFIG 810ad43ddacSmrg# ----------------------- 811ad43ddacSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 812ad43ddacSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 813ad43ddacSmrg [LT_LANG(CXX)], 814ad43ddacSmrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 815ad43ddacSmrg 816ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 817ad43ddacSmrg [LT_LANG(F77)], 818ad43ddacSmrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 819ad43ddacSmrg 820ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 821ad43ddacSmrg [LT_LANG(FC)], 822ad43ddacSmrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 823ad43ddacSmrg 824ad43ddacSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 825ad43ddacSmrgdnl pulling things in needlessly. 826ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 827ad43ddacSmrg [LT_LANG(GCJ)], 828ad43ddacSmrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 829ad43ddacSmrg [LT_LANG(GCJ)], 830ad43ddacSmrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 831ad43ddacSmrg [LT_LANG(GCJ)], 832ad43ddacSmrg [m4_ifdef([AC_PROG_GCJ], 833ad43ddacSmrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 834ad43ddacSmrg m4_ifdef([A][M_PROG_GCJ], 835ad43ddacSmrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 836ad43ddacSmrg m4_ifdef([LT_PROG_GCJ], 837ad43ddacSmrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 838ad43ddacSmrg 839ad43ddacSmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 840ad43ddacSmrg [LT_LANG(RC)], 841ad43ddacSmrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 842ad43ddacSmrg])# _LT_LANG_DEFAULT_CONFIG 843ad43ddacSmrg 844ad43ddacSmrg# Obsolete macros: 845ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 846ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 847ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 848ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 849ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 850ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 851ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 852ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 853ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 854ad43ddacSmrg 855ad43ddacSmrg 856ad43ddacSmrg# _LT_TAG_COMPILER 857ad43ddacSmrg# ---------------- 858ad43ddacSmrgm4_defun([_LT_TAG_COMPILER], 859209ff23fSmrg[AC_REQUIRE([AC_PROG_CC])dnl 860209ff23fSmrg 861ad43ddacSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 862ad43ddacSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 863ad43ddacSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 864ad43ddacSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 865ad43ddacSmrg 866209ff23fSmrg# If no C compiler was specified, use CC. 867209ff23fSmrgLTCC=${LTCC-"$CC"} 868209ff23fSmrg 869209ff23fSmrg# If no C compiler flags were specified, use CFLAGS. 870209ff23fSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 871209ff23fSmrg 872209ff23fSmrg# Allow CC to be a program name with arguments. 873209ff23fSmrgcompiler=$CC 874ad43ddacSmrg])# _LT_TAG_COMPILER 875209ff23fSmrg 876209ff23fSmrg 877209ff23fSmrg# _LT_COMPILER_BOILERPLATE 878209ff23fSmrg# ------------------------ 879209ff23fSmrg# Check for compiler boilerplate output or warnings with 880209ff23fSmrg# the simple compiler test code. 881ad43ddacSmrgm4_defun([_LT_COMPILER_BOILERPLATE], 882ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl 883209ff23fSmrgac_outfile=conftest.$ac_objext 884209ff23fSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 885209ff23fSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 886209ff23fSmrg_lt_compiler_boilerplate=`cat conftest.err` 887ad43ddacSmrg$RM conftest* 888209ff23fSmrg])# _LT_COMPILER_BOILERPLATE 889209ff23fSmrg 890209ff23fSmrg 891209ff23fSmrg# _LT_LINKER_BOILERPLATE 892209ff23fSmrg# ---------------------- 893209ff23fSmrg# Check for linker boilerplate output or warnings with 894209ff23fSmrg# the simple link test code. 895ad43ddacSmrgm4_defun([_LT_LINKER_BOILERPLATE], 896ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl 897209ff23fSmrgac_outfile=conftest.$ac_objext 898209ff23fSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 899209ff23fSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 900209ff23fSmrg_lt_linker_boilerplate=`cat conftest.err` 901ad43ddacSmrg$RM -r conftest* 902209ff23fSmrg])# _LT_LINKER_BOILERPLATE 903209ff23fSmrg 904209ff23fSmrg# _LT_REQUIRED_DARWIN_CHECKS 905ad43ddacSmrg# ------------------------- 906ad43ddacSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 907209ff23fSmrg case $host_os in 908209ff23fSmrg rhapsody* | darwin*) 909209ff23fSmrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 910209ff23fSmrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 911ad43ddacSmrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 912ad43ddacSmrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 913ad43ddacSmrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 914ad43ddacSmrg _LT_DECL([], [DSYMUTIL], [1], 915ad43ddacSmrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 916ad43ddacSmrg _LT_DECL([], [NMEDIT], [1], 917ad43ddacSmrg [Tool to change global to local symbols on Mac OS X]) 918ad43ddacSmrg _LT_DECL([], [LIPO], [1], 919ad43ddacSmrg [Tool to manipulate fat objects and archives on Mac OS X]) 920ad43ddacSmrg _LT_DECL([], [OTOOL], [1], 921ad43ddacSmrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 922ad43ddacSmrg _LT_DECL([], [OTOOL64], [1], 923ad43ddacSmrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 924209ff23fSmrg 925209ff23fSmrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 926209ff23fSmrg [lt_cv_apple_cc_single_mod=no 927209ff23fSmrg if test -z "${LT_MULTI_MODULE}"; then 928ad43ddacSmrg # By default we will add the -single_module flag. You can override 929ad43ddacSmrg # by either setting the environment variable LT_MULTI_MODULE 930ad43ddacSmrg # non-empty at configure time, or by adding -multi_module to the 931ad43ddacSmrg # link flags. 932ad43ddacSmrg rm -rf libconftest.dylib* 933ad43ddacSmrg echo "int foo(void){return 1;}" > conftest.c 934ad43ddacSmrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 935ad43ddacSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 936ad43ddacSmrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 937ad43ddacSmrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 938ad43ddacSmrg _lt_result=$? 939ad43ddacSmrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 940ad43ddacSmrg lt_cv_apple_cc_single_mod=yes 941ad43ddacSmrg else 942ad43ddacSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 943ad43ddacSmrg fi 944ad43ddacSmrg rm -rf libconftest.dylib* 945ad43ddacSmrg rm -f conftest.* 946209ff23fSmrg fi]) 947209ff23fSmrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 948209ff23fSmrg [lt_cv_ld_exported_symbols_list], 949209ff23fSmrg [lt_cv_ld_exported_symbols_list=no 950209ff23fSmrg save_LDFLAGS=$LDFLAGS 951209ff23fSmrg echo "_main" > conftest.sym 952209ff23fSmrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 953209ff23fSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 954ad43ddacSmrg [lt_cv_ld_exported_symbols_list=yes], 955ad43ddacSmrg [lt_cv_ld_exported_symbols_list=no]) 956ad43ddacSmrg LDFLAGS="$save_LDFLAGS" 957209ff23fSmrg ]) 958209ff23fSmrg case $host_os in 959ad43ddacSmrg rhapsody* | darwin1.[[012]]) 960209ff23fSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 961209ff23fSmrg darwin1.*) 962ad43ddacSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 963ad43ddacSmrg darwin*) # darwin 5.x on 964209ff23fSmrg # if running on 10.5 or later, the deployment target defaults 965209ff23fSmrg # to the OS version, if on x86, and 10.4, the deployment 966ad43ddacSmrg # target defaults to 10.4. Don't you love it? 967209ff23fSmrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 968ad43ddacSmrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 969ad43ddacSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 970ad43ddacSmrg 10.[[012]]*) 971ad43ddacSmrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 972ad43ddacSmrg 10.*) 973ad43ddacSmrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 974209ff23fSmrg esac 975209ff23fSmrg ;; 976209ff23fSmrg esac 977209ff23fSmrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 978209ff23fSmrg _lt_dar_single_mod='$single_module' 979209ff23fSmrg fi 980209ff23fSmrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 981209ff23fSmrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 982209ff23fSmrg else 983ad43ddacSmrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 984209ff23fSmrg fi 985209ff23fSmrg if test "$DSYMUTIL" != ":"; then 986ad43ddacSmrg _lt_dsymutil='~$DSYMUTIL $lib || :' 987209ff23fSmrg else 988209ff23fSmrg _lt_dsymutil= 989209ff23fSmrg fi 990209ff23fSmrg ;; 991209ff23fSmrg esac 992209ff23fSmrg]) 993209ff23fSmrg 994ad43ddacSmrg 995ad43ddacSmrg# _LT_DARWIN_LINKER_FEATURES 996ad43ddacSmrg# -------------------------- 997ad43ddacSmrg# Checks for linker and compiler features on darwin 998ad43ddacSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 999ad43ddacSmrg[ 1000ad43ddacSmrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1001ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1002ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 1003ad43ddacSmrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1004ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1005ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1006ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1007ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1008ad43ddacSmrg if test "$GCC" = "yes"; then 1009ad43ddacSmrg output_verbose_link_cmd=echo 1010ad43ddacSmrg _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}" 1011ad43ddacSmrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1012ad43ddacSmrg _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}" 1013ad43ddacSmrg _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}" 1014ad43ddacSmrg m4_if([$1], [CXX], 1015ad43ddacSmrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1016ad43ddacSmrg _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}" 1017ad43ddacSmrg _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}" 1018ad43ddacSmrg fi 1019ad43ddacSmrg],[]) 1020ad43ddacSmrg else 1021ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 1022ad43ddacSmrg fi 1023ad43ddacSmrg]) 1024ad43ddacSmrg 1025ad43ddacSmrg# _LT_SYS_MODULE_PATH_AIX 1026ad43ddacSmrg# ----------------------- 1027209ff23fSmrg# Links a minimal program and checks the executable 1028209ff23fSmrg# for the system default hardcoded library path. In most cases, 1029209ff23fSmrg# this is /usr/lib:/lib, but when the MPI compilers are used 1030209ff23fSmrg# the location of the communication and MPI libs are included too. 1031209ff23fSmrg# If we don't find anything, use the default library path according 1032209ff23fSmrg# to the aix ld manual. 1033ad43ddacSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1034ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl 1035209ff23fSmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 1036209ff23fSmrglt_aix_libpath_sed=' 1037209ff23fSmrg /Import File Strings/,/^$/ { 1038209ff23fSmrg /^0/ { 1039209ff23fSmrg s/^0 *\(.*\)$/\1/ 1040209ff23fSmrg p 1041209ff23fSmrg } 1042209ff23fSmrg }' 1043209ff23fSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1044209ff23fSmrg# Check for a 64-bit object if we didn't find anything. 1045209ff23fSmrgif test -z "$aix_libpath"; then 1046209ff23fSmrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1047209ff23fSmrgfi],[]) 1048209ff23fSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1049ad43ddacSmrg])# _LT_SYS_MODULE_PATH_AIX 1050209ff23fSmrg 1051209ff23fSmrg 1052ad43ddacSmrg# _LT_SHELL_INIT(ARG) 1053ad43ddacSmrg# ------------------- 1054ad43ddacSmrgm4_define([_LT_SHELL_INIT], 1055209ff23fSmrg[ifdef([AC_DIVERSION_NOTICE], 1056209ff23fSmrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1057209ff23fSmrg [AC_DIVERT_PUSH(NOTICE)]) 1058209ff23fSmrg$1 1059209ff23fSmrgAC_DIVERT_POP 1060ad43ddacSmrg])# _LT_SHELL_INIT 1061209ff23fSmrg 1062209ff23fSmrg 1063ad43ddacSmrg# _LT_PROG_ECHO_BACKSLASH 1064ad43ddacSmrg# ----------------------- 1065209ff23fSmrg# Add some code to the start of the generated configure script which 1066209ff23fSmrg# will find an echo command which doesn't interpret backslashes. 1067ad43ddacSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1068ad43ddacSmrg[_LT_SHELL_INIT([ 1069209ff23fSmrg# Check that we are running under the correct shell. 1070209ff23fSmrgSHELL=${CONFIG_SHELL-/bin/sh} 1071209ff23fSmrg 1072ad43ddacSmrgcase X$lt_ECHO in 1073209ff23fSmrgX*--fallback-echo) 1074209ff23fSmrg # Remove one level of quotation (which was required for Make). 1075ad43ddacSmrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1076209ff23fSmrg ;; 1077209ff23fSmrgesac 1078209ff23fSmrg 1079ad43ddacSmrgECHO=${lt_ECHO-echo} 1080209ff23fSmrgif test "X[$]1" = X--no-reexec; then 1081209ff23fSmrg # Discard the --no-reexec flag, and continue. 1082209ff23fSmrg shift 1083209ff23fSmrgelif test "X[$]1" = X--fallback-echo; then 1084209ff23fSmrg # Avoid inline document here, it may be left over 1085209ff23fSmrg : 1086ad43ddacSmrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 1087ad43ddacSmrg # Yippee, $ECHO works! 1088209ff23fSmrg : 1089209ff23fSmrgelse 1090209ff23fSmrg # Restart under the correct shell. 1091209ff23fSmrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1092209ff23fSmrgfi 1093209ff23fSmrg 1094209ff23fSmrgif test "X[$]1" = X--fallback-echo; then 1095209ff23fSmrg # used as fallback echo 1096209ff23fSmrg shift 1097ad43ddacSmrg cat <<_LT_EOF 1098209ff23fSmrg[$]* 1099ad43ddacSmrg_LT_EOF 1100209ff23fSmrg exit 0 1101209ff23fSmrgfi 1102209ff23fSmrg 1103209ff23fSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1104209ff23fSmrg# if CDPATH is set. 1105209ff23fSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1106209ff23fSmrg 1107ad43ddacSmrgif test -z "$lt_ECHO"; then 1108ad43ddacSmrg if test "X${echo_test_string+set}" != Xset; then 1109ad43ddacSmrg # find a string as large as possible, as long as the shell can cope with it 1110ad43ddacSmrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1111ad43ddacSmrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1112ad43ddacSmrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 1113ad43ddacSmrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 1114ad43ddacSmrg then 1115ad43ddacSmrg break 1116ad43ddacSmrg fi 1117ad43ddacSmrg done 1118ad43ddacSmrg fi 1119209ff23fSmrg 1120ad43ddacSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1121ad43ddacSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1122ad43ddacSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1123ad43ddacSmrg : 1124ad43ddacSmrg else 1125ad43ddacSmrg # The Solaris, AIX, and Digital Unix default echo programs unquote 1126ad43ddacSmrg # backslashes. This makes it impossible to quote backslashes using 1127ad43ddacSmrg # echo "$something" | sed 's/\\/\\\\/g' 1128ad43ddacSmrg # 1129ad43ddacSmrg # So, first we look for a working echo in the user's PATH. 1130209ff23fSmrg 1131ad43ddacSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1132ad43ddacSmrg for dir in $PATH /usr/ucb; do 1133ad43ddacSmrg IFS="$lt_save_ifs" 1134ad43ddacSmrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1135ad43ddacSmrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1136ad43ddacSmrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1137ad43ddacSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1138ad43ddacSmrg ECHO="$dir/echo" 1139ad43ddacSmrg break 1140ad43ddacSmrg fi 1141ad43ddacSmrg done 1142209ff23fSmrg IFS="$lt_save_ifs" 1143209ff23fSmrg 1144ad43ddacSmrg if test "X$ECHO" = Xecho; then 1145ad43ddacSmrg # We didn't find a better echo, so look for alternatives. 1146ad43ddacSmrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 1147ad43ddacSmrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 1148ad43ddacSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1149ad43ddacSmrg # This shell has a builtin print -r that does the trick. 1150ad43ddacSmrg ECHO='print -r' 1151ad43ddacSmrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 1152ad43ddacSmrg test "X$CONFIG_SHELL" != X/bin/ksh; then 1153ad43ddacSmrg # If we have ksh, try running configure again with it. 1154ad43ddacSmrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1155ad43ddacSmrg export ORIGINAL_CONFIG_SHELL 1156ad43ddacSmrg CONFIG_SHELL=/bin/ksh 1157ad43ddacSmrg export CONFIG_SHELL 1158ad43ddacSmrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1159209ff23fSmrg else 1160ad43ddacSmrg # Try using printf. 1161ad43ddacSmrg ECHO='printf %s\n' 1162ad43ddacSmrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1163ad43ddacSmrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1164ad43ddacSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1165ad43ddacSmrg # Cool, printf works 1166ad43ddacSmrg : 1167ad43ddacSmrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1168ad43ddacSmrg test "X$echo_testing_string" = 'X\t' && 1169ad43ddacSmrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1170ad43ddacSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1171ad43ddacSmrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1172ad43ddacSmrg export CONFIG_SHELL 1173ad43ddacSmrg SHELL="$CONFIG_SHELL" 1174ad43ddacSmrg export SHELL 1175ad43ddacSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1176ad43ddacSmrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1177ad43ddacSmrg test "X$echo_testing_string" = 'X\t' && 1178ad43ddacSmrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1179ad43ddacSmrg test "X$echo_testing_string" = "X$echo_test_string"; then 1180ad43ddacSmrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1181ad43ddacSmrg else 1182ad43ddacSmrg # maybe with a smaller string... 1183ad43ddacSmrg prev=: 1184209ff23fSmrg 1185ad43ddacSmrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1186ad43ddacSmrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 1187ad43ddacSmrg then 1188ad43ddacSmrg break 1189ad43ddacSmrg fi 1190ad43ddacSmrg prev="$cmd" 1191ad43ddacSmrg done 1192209ff23fSmrg 1193ad43ddacSmrg if test "$prev" != 'sed 50q "[$]0"'; then 1194ad43ddacSmrg echo_test_string=`eval $prev` 1195ad43ddacSmrg export echo_test_string 1196ad43ddacSmrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1197ad43ddacSmrg else 1198ad43ddacSmrg # Oops. We lost completely, so just stick with echo. 1199ad43ddacSmrg ECHO=echo 1200ad43ddacSmrg fi 1201ad43ddacSmrg fi 1202209ff23fSmrg fi 1203209ff23fSmrg fi 1204209ff23fSmrg fi 1205209ff23fSmrgfi 1206209ff23fSmrg 1207209ff23fSmrg# Copy echo and quote the copy suitably for passing to libtool from 1208209ff23fSmrg# the Makefile, instead of quoting the original, which is used later. 1209ad43ddacSmrglt_ECHO=$ECHO 1210ad43ddacSmrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1211ad43ddacSmrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1212209ff23fSmrgfi 1213209ff23fSmrg 1214ad43ddacSmrgAC_SUBST(lt_ECHO) 1215ad43ddacSmrg]) 1216ad43ddacSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1217ad43ddacSmrg_LT_DECL([], [ECHO], [1], 1218ad43ddacSmrg [An echo program that does not interpret backslashes]) 1219ad43ddacSmrg])# _LT_PROG_ECHO_BACKSLASH 1220209ff23fSmrg 1221209ff23fSmrg 1222ad43ddacSmrg# _LT_ENABLE_LOCK 1223ad43ddacSmrg# --------------- 1224ad43ddacSmrgm4_defun([_LT_ENABLE_LOCK], 1225209ff23fSmrg[AC_ARG_ENABLE([libtool-lock], 1226ad43ddacSmrg [AS_HELP_STRING([--disable-libtool-lock], 1227ad43ddacSmrg [avoid locking (might break parallel builds)])]) 1228209ff23fSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1229209ff23fSmrg 1230209ff23fSmrg# Some flags need to be propagated to the compiler or linker for good 1231209ff23fSmrg# libtool support. 1232209ff23fSmrgcase $host in 1233209ff23fSmrgia64-*-hpux*) 1234209ff23fSmrg # Find out which ABI we are using. 1235209ff23fSmrg echo 'int i;' > conftest.$ac_ext 1236209ff23fSmrg if AC_TRY_EVAL(ac_compile); then 1237209ff23fSmrg case `/usr/bin/file conftest.$ac_objext` in 1238ad43ddacSmrg *ELF-32*) 1239ad43ddacSmrg HPUX_IA64_MODE="32" 1240ad43ddacSmrg ;; 1241ad43ddacSmrg *ELF-64*) 1242ad43ddacSmrg HPUX_IA64_MODE="64" 1243ad43ddacSmrg ;; 1244209ff23fSmrg esac 1245209ff23fSmrg fi 1246209ff23fSmrg rm -rf conftest* 1247209ff23fSmrg ;; 1248209ff23fSmrg*-*-irix6*) 1249209ff23fSmrg # Find out which ABI we are using. 1250209ff23fSmrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1251209ff23fSmrg if AC_TRY_EVAL(ac_compile); then 1252ad43ddacSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 1253ad43ddacSmrg case `/usr/bin/file conftest.$ac_objext` in 1254ad43ddacSmrg *32-bit*) 1255ad43ddacSmrg LD="${LD-ld} -melf32bsmip" 1256ad43ddacSmrg ;; 1257ad43ddacSmrg *N32*) 1258ad43ddacSmrg LD="${LD-ld} -melf32bmipn32" 1259ad43ddacSmrg ;; 1260ad43ddacSmrg *64-bit*) 1261ad43ddacSmrg LD="${LD-ld} -melf64bmip" 1262ad43ddacSmrg ;; 1263ad43ddacSmrg esac 1264ad43ddacSmrg else 1265ad43ddacSmrg case `/usr/bin/file conftest.$ac_objext` in 1266ad43ddacSmrg *32-bit*) 1267ad43ddacSmrg LD="${LD-ld} -32" 1268ad43ddacSmrg ;; 1269ad43ddacSmrg *N32*) 1270ad43ddacSmrg LD="${LD-ld} -n32" 1271ad43ddacSmrg ;; 1272ad43ddacSmrg *64-bit*) 1273ad43ddacSmrg LD="${LD-ld} -64" 1274ad43ddacSmrg ;; 1275ad43ddacSmrg esac 1276ad43ddacSmrg fi 1277209ff23fSmrg fi 1278209ff23fSmrg rm -rf conftest* 1279209ff23fSmrg ;; 1280209ff23fSmrg 1281209ff23fSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1282ad43ddacSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1283209ff23fSmrg # Find out which ABI we are using. 1284209ff23fSmrg echo 'int i;' > conftest.$ac_ext 1285209ff23fSmrg if AC_TRY_EVAL(ac_compile); then 1286209ff23fSmrg case `/usr/bin/file conftest.o` in 1287ad43ddacSmrg *32-bit*) 1288ad43ddacSmrg case $host in 1289ad43ddacSmrg x86_64-*kfreebsd*-gnu) 1290ad43ddacSmrg LD="${LD-ld} -m elf_i386_fbsd" 1291ad43ddacSmrg ;; 1292ad43ddacSmrg x86_64-*linux*) 1293ad43ddacSmrg LD="${LD-ld} -m elf_i386" 1294ad43ddacSmrg ;; 1295ad43ddacSmrg ppc64-*linux*|powerpc64-*linux*) 1296ad43ddacSmrg LD="${LD-ld} -m elf32ppclinux" 1297ad43ddacSmrg ;; 1298ad43ddacSmrg s390x-*linux*) 1299ad43ddacSmrg LD="${LD-ld} -m elf_s390" 1300ad43ddacSmrg ;; 1301ad43ddacSmrg sparc64-*linux*) 1302ad43ddacSmrg LD="${LD-ld} -m elf32_sparc" 1303ad43ddacSmrg ;; 1304ad43ddacSmrg esac 1305ad43ddacSmrg ;; 1306ad43ddacSmrg *64-bit*) 1307ad43ddacSmrg case $host in 1308ad43ddacSmrg x86_64-*kfreebsd*-gnu) 1309ad43ddacSmrg LD="${LD-ld} -m elf_x86_64_fbsd" 1310ad43ddacSmrg ;; 1311ad43ddacSmrg x86_64-*linux*) 1312ad43ddacSmrg LD="${LD-ld} -m elf_x86_64" 1313ad43ddacSmrg ;; 1314ad43ddacSmrg ppc*-*linux*|powerpc*-*linux*) 1315ad43ddacSmrg LD="${LD-ld} -m elf64ppc" 1316ad43ddacSmrg ;; 1317ad43ddacSmrg s390*-*linux*|s390*-*tpf*) 1318ad43ddacSmrg LD="${LD-ld} -m elf64_s390" 1319ad43ddacSmrg ;; 1320ad43ddacSmrg sparc*-*linux*) 1321ad43ddacSmrg LD="${LD-ld} -m elf64_sparc" 1322ad43ddacSmrg ;; 1323ad43ddacSmrg esac 1324ad43ddacSmrg ;; 1325209ff23fSmrg esac 1326209ff23fSmrg fi 1327209ff23fSmrg rm -rf conftest* 1328209ff23fSmrg ;; 1329209ff23fSmrg 1330209ff23fSmrg*-*-sco3.2v5*) 1331209ff23fSmrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1332209ff23fSmrg SAVE_CFLAGS="$CFLAGS" 1333209ff23fSmrg CFLAGS="$CFLAGS -belf" 1334209ff23fSmrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1335209ff23fSmrg [AC_LANG_PUSH(C) 1336ad43ddacSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1337209ff23fSmrg AC_LANG_POP]) 1338209ff23fSmrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1339209ff23fSmrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1340209ff23fSmrg CFLAGS="$SAVE_CFLAGS" 1341209ff23fSmrg fi 1342209ff23fSmrg ;; 1343209ff23fSmrgsparc*-*solaris*) 1344209ff23fSmrg # Find out which ABI we are using. 1345209ff23fSmrg echo 'int i;' > conftest.$ac_ext 1346209ff23fSmrg if AC_TRY_EVAL(ac_compile); then 1347209ff23fSmrg case `/usr/bin/file conftest.o` in 1348209ff23fSmrg *64-bit*) 1349209ff23fSmrg case $lt_cv_prog_gnu_ld in 1350209ff23fSmrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1351209ff23fSmrg *) 1352ad43ddacSmrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1353209ff23fSmrg LD="${LD-ld} -64" 1354209ff23fSmrg fi 1355209ff23fSmrg ;; 1356209ff23fSmrg esac 1357209ff23fSmrg ;; 1358209ff23fSmrg esac 1359209ff23fSmrg fi 1360209ff23fSmrg rm -rf conftest* 1361209ff23fSmrg ;; 1362209ff23fSmrgesac 1363209ff23fSmrg 1364209ff23fSmrgneed_locks="$enable_libtool_lock" 1365ad43ddacSmrg])# _LT_ENABLE_LOCK 1366ad43ddacSmrg 1367ad43ddacSmrg 1368ad43ddacSmrg# _LT_CMD_OLD_ARCHIVE 1369ad43ddacSmrg# ------------------- 1370ad43ddacSmrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1371ad43ddacSmrg[AC_CHECK_TOOL(AR, ar, false) 1372ad43ddacSmrgtest -z "$AR" && AR=ar 1373ad43ddacSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1374ad43ddacSmrg_LT_DECL([], [AR], [1], [The archiver]) 1375ad43ddacSmrg_LT_DECL([], [AR_FLAGS], [1]) 1376ad43ddacSmrg 1377ad43ddacSmrgAC_CHECK_TOOL(STRIP, strip, :) 1378ad43ddacSmrgtest -z "$STRIP" && STRIP=: 1379ad43ddacSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1380ad43ddacSmrg 1381ad43ddacSmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1382ad43ddacSmrgtest -z "$RANLIB" && RANLIB=: 1383ad43ddacSmrg_LT_DECL([], [RANLIB], [1], 1384ad43ddacSmrg [Commands used to install an old-style archive]) 1385ad43ddacSmrg 1386ad43ddacSmrg# Determine commands to create old-style static archives. 1387ad43ddacSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1388ad43ddacSmrgold_postinstall_cmds='chmod 644 $oldlib' 1389ad43ddacSmrgold_postuninstall_cmds= 1390209ff23fSmrg 1391ad43ddacSmrgif test -n "$RANLIB"; then 1392ad43ddacSmrg case $host_os in 1393ad43ddacSmrg openbsd*) 1394ad43ddacSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1395ad43ddacSmrg ;; 1396ad43ddacSmrg *) 1397ad43ddacSmrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1398ad43ddacSmrg ;; 1399ad43ddacSmrg esac 1400ad43ddacSmrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1401ad43ddacSmrgfi 1402ad43ddacSmrg_LT_DECL([], [old_postinstall_cmds], [2]) 1403ad43ddacSmrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1404ad43ddacSmrg_LT_TAGDECL([], [old_archive_cmds], [2], 1405ad43ddacSmrg [Commands used to build an old-style archive]) 1406ad43ddacSmrg])# _LT_CMD_OLD_ARCHIVE 1407209ff23fSmrg 1408209ff23fSmrg 1409ad43ddacSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1410209ff23fSmrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1411209ff23fSmrg# ---------------------------------------------------------------- 1412209ff23fSmrg# Check whether the given compiler option works 1413ad43ddacSmrgAC_DEFUN([_LT_COMPILER_OPTION], 1414ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1415ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 1416209ff23fSmrgAC_CACHE_CHECK([$1], [$2], 1417209ff23fSmrg [$2=no 1418ad43ddacSmrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1419209ff23fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1420209ff23fSmrg lt_compiler_flag="$3" 1421209ff23fSmrg # Insert the option either (1) after the last *FLAGS variable, or 1422209ff23fSmrg # (2) before a word containing "conftest.", or (3) at the end. 1423209ff23fSmrg # Note that $ac_compile itself does not contain backslashes and begins 1424209ff23fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1425209ff23fSmrg # The option is referenced via a variable to avoid confusing sed. 1426209ff23fSmrg lt_compile=`echo "$ac_compile" | $SED \ 1427209ff23fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1428209ff23fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1429209ff23fSmrg -e 's:$: $lt_compiler_flag:'` 1430209ff23fSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1431209ff23fSmrg (eval "$lt_compile" 2>conftest.err) 1432209ff23fSmrg ac_status=$? 1433209ff23fSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 1434209ff23fSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1435209ff23fSmrg if (exit $ac_status) && test -s "$ac_outfile"; then 1436209ff23fSmrg # The compiler can only warn and ignore the option if not recognized 1437209ff23fSmrg # So say no if there are warnings other than the usual output. 1438ad43ddacSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 1439209ff23fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1440209ff23fSmrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1441209ff23fSmrg $2=yes 1442209ff23fSmrg fi 1443209ff23fSmrg fi 1444ad43ddacSmrg $RM conftest* 1445209ff23fSmrg]) 1446209ff23fSmrg 1447209ff23fSmrgif test x"[$]$2" = xyes; then 1448ad43ddacSmrg m4_if([$5], , :, [$5]) 1449209ff23fSmrgelse 1450ad43ddacSmrg m4_if([$6], , :, [$6]) 1451209ff23fSmrgfi 1452ad43ddacSmrg])# _LT_COMPILER_OPTION 1453209ff23fSmrg 1454ad43ddacSmrg# Old name: 1455ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1456ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 1457ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1458209ff23fSmrg 1459ad43ddacSmrg 1460ad43ddacSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1461ad43ddacSmrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1462ad43ddacSmrg# ---------------------------------------------------- 1463ad43ddacSmrg# Check whether the given linker option works 1464ad43ddacSmrgAC_DEFUN([_LT_LINKER_OPTION], 1465ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1466ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 1467209ff23fSmrgAC_CACHE_CHECK([$1], [$2], 1468209ff23fSmrg [$2=no 1469209ff23fSmrg save_LDFLAGS="$LDFLAGS" 1470209ff23fSmrg LDFLAGS="$LDFLAGS $3" 1471209ff23fSmrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1472209ff23fSmrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1473209ff23fSmrg # The linker can only warn and ignore the option if not recognized 1474209ff23fSmrg # So say no if there are warnings 1475209ff23fSmrg if test -s conftest.err; then 1476209ff23fSmrg # Append any errors to the config.log. 1477209ff23fSmrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1478ad43ddacSmrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 1479209ff23fSmrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1480209ff23fSmrg if diff conftest.exp conftest.er2 >/dev/null; then 1481209ff23fSmrg $2=yes 1482209ff23fSmrg fi 1483209ff23fSmrg else 1484209ff23fSmrg $2=yes 1485209ff23fSmrg fi 1486209ff23fSmrg fi 1487ad43ddacSmrg $RM -r conftest* 1488209ff23fSmrg LDFLAGS="$save_LDFLAGS" 1489209ff23fSmrg]) 1490209ff23fSmrg 1491209ff23fSmrgif test x"[$]$2" = xyes; then 1492ad43ddacSmrg m4_if([$4], , :, [$4]) 1493209ff23fSmrgelse 1494ad43ddacSmrg m4_if([$5], , :, [$5]) 1495209ff23fSmrgfi 1496ad43ddacSmrg])# _LT_LINKER_OPTION 1497209ff23fSmrg 1498ad43ddacSmrg# Old name: 1499ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1500ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 1501ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1502209ff23fSmrg 1503ad43ddacSmrg 1504ad43ddacSmrg# LT_CMD_MAX_LEN 1505ad43ddacSmrg#--------------- 1506ad43ddacSmrgAC_DEFUN([LT_CMD_MAX_LEN], 1507ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1508ad43ddacSmrg# find the maximum length of command line arguments 1509209ff23fSmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1510209ff23fSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1511209ff23fSmrg i=0 1512209ff23fSmrg teststring="ABCD" 1513209ff23fSmrg 1514209ff23fSmrg case $build_os in 1515209ff23fSmrg msdosdjgpp*) 1516209ff23fSmrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1517209ff23fSmrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1518209ff23fSmrg # during glob expansion). Even if it were fixed, the result of this 1519209ff23fSmrg # check would be larger than it should be. 1520209ff23fSmrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1521209ff23fSmrg ;; 1522209ff23fSmrg 1523209ff23fSmrg gnu*) 1524209ff23fSmrg # Under GNU Hurd, this test is not required because there is 1525209ff23fSmrg # no limit to the length of command line arguments. 1526209ff23fSmrg # Libtool will interpret -1 as no limit whatsoever 1527209ff23fSmrg lt_cv_sys_max_cmd_len=-1; 1528209ff23fSmrg ;; 1529209ff23fSmrg 1530209ff23fSmrg cygwin* | mingw*) 1531209ff23fSmrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1532209ff23fSmrg # about 5 minutes as the teststring grows exponentially. 1533209ff23fSmrg # Worse, since 9x/ME are not pre-emptively multitasking, 1534209ff23fSmrg # you end up with a "frozen" computer, even though with patience 1535209ff23fSmrg # the test eventually succeeds (with a max line length of 256k). 1536209ff23fSmrg # Instead, let's just punt: use the minimum linelength reported by 1537209ff23fSmrg # all of the supported platforms: 8192 (on NT/2K/XP). 1538209ff23fSmrg lt_cv_sys_max_cmd_len=8192; 1539209ff23fSmrg ;; 1540209ff23fSmrg 1541209ff23fSmrg amigaos*) 1542209ff23fSmrg # On AmigaOS with pdksh, this test takes hours, literally. 1543209ff23fSmrg # So we just punt and use a minimum line length of 8192. 1544209ff23fSmrg lt_cv_sys_max_cmd_len=8192; 1545209ff23fSmrg ;; 1546209ff23fSmrg 1547209ff23fSmrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1548209ff23fSmrg # This has been around since 386BSD, at least. Likely further. 1549209ff23fSmrg if test -x /sbin/sysctl; then 1550209ff23fSmrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1551209ff23fSmrg elif test -x /usr/sbin/sysctl; then 1552209ff23fSmrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1553209ff23fSmrg else 1554209ff23fSmrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1555209ff23fSmrg fi 1556209ff23fSmrg # And add a safety zone 1557209ff23fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1558209ff23fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1559209ff23fSmrg ;; 1560209ff23fSmrg 1561209ff23fSmrg interix*) 1562209ff23fSmrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1563209ff23fSmrg lt_cv_sys_max_cmd_len=196608 1564209ff23fSmrg ;; 1565209ff23fSmrg 1566209ff23fSmrg osf*) 1567209ff23fSmrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1568209ff23fSmrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1569209ff23fSmrg # nice to cause kernel panics so lets avoid the loop below. 1570209ff23fSmrg # First set a reasonable default. 1571209ff23fSmrg lt_cv_sys_max_cmd_len=16384 1572209ff23fSmrg # 1573209ff23fSmrg if test -x /sbin/sysconfig; then 1574209ff23fSmrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1575209ff23fSmrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1576209ff23fSmrg esac 1577209ff23fSmrg fi 1578209ff23fSmrg ;; 1579209ff23fSmrg sco3.2v5*) 1580209ff23fSmrg lt_cv_sys_max_cmd_len=102400 1581209ff23fSmrg ;; 1582209ff23fSmrg sysv5* | sco5v6* | sysv4.2uw2*) 1583209ff23fSmrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1584209ff23fSmrg if test -n "$kargmax"; then 1585ad43ddacSmrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1586209ff23fSmrg else 1587209ff23fSmrg lt_cv_sys_max_cmd_len=32768 1588209ff23fSmrg fi 1589209ff23fSmrg ;; 1590209ff23fSmrg *) 1591209ff23fSmrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1592209ff23fSmrg if test -n "$lt_cv_sys_max_cmd_len"; then 1593209ff23fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1594209ff23fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1595209ff23fSmrg else 1596ad43ddacSmrg # Make teststring a little bigger before we do anything with it. 1597ad43ddacSmrg # a 1K string should be a reasonable start. 1598ad43ddacSmrg for i in 1 2 3 4 5 6 7 8 ; do 1599ad43ddacSmrg teststring=$teststring$teststring 1600ad43ddacSmrg done 1601209ff23fSmrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1602ad43ddacSmrg # If test is not a shell built-in, we'll probably end up computing a 1603ad43ddacSmrg # maximum length that is only half of the actual maximum length, but 1604ad43ddacSmrg # we can't tell. 1605ad43ddacSmrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 1606ad43ddacSmrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 1607209ff23fSmrg test $i != 17 # 1/2 MB should be enough 1608209ff23fSmrg do 1609209ff23fSmrg i=`expr $i + 1` 1610209ff23fSmrg teststring=$teststring$teststring 1611209ff23fSmrg done 1612ad43ddacSmrg # Only check the string length outside the loop. 1613ad43ddacSmrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1614209ff23fSmrg teststring= 1615ad43ddacSmrg # Add a significant safety factor because C++ compilers can tack on 1616ad43ddacSmrg # massive amounts of additional arguments before passing them to the 1617ad43ddacSmrg # linker. It appears as though 1/2 is a usable value. 1618209ff23fSmrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1619209ff23fSmrg fi 1620209ff23fSmrg ;; 1621209ff23fSmrg esac 1622209ff23fSmrg]) 1623209ff23fSmrgif test -n $lt_cv_sys_max_cmd_len ; then 1624209ff23fSmrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1625209ff23fSmrgelse 1626209ff23fSmrg AC_MSG_RESULT(none) 1627209ff23fSmrgfi 1628ad43ddacSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1629ad43ddacSmrg_LT_DECL([], [max_cmd_len], [0], 1630ad43ddacSmrg [What is the maximum length of a command?]) 1631ad43ddacSmrg])# LT_CMD_MAX_LEN 1632209ff23fSmrg 1633ad43ddacSmrg# Old name: 1634ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1635ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 1636ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1637209ff23fSmrg 1638ad43ddacSmrg 1639ad43ddacSmrg# _LT_HEADER_DLFCN 1640ad43ddacSmrg# ---------------- 1641ad43ddacSmrgm4_defun([_LT_HEADER_DLFCN], 1642ad43ddacSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1643ad43ddacSmrg])# _LT_HEADER_DLFCN 1644209ff23fSmrg 1645209ff23fSmrg 1646ad43ddacSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1647ad43ddacSmrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1648ad43ddacSmrg# ---------------------------------------------------------------- 1649ad43ddacSmrgm4_defun([_LT_TRY_DLOPEN_SELF], 1650ad43ddacSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1651209ff23fSmrgif test "$cross_compiling" = yes; then : 1652209ff23fSmrg [$4] 1653209ff23fSmrgelse 1654209ff23fSmrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1655209ff23fSmrg lt_status=$lt_dlunknown 1656ad43ddacSmrg cat > conftest.$ac_ext <<_LT_EOF 1657209ff23fSmrg[#line __oline__ "configure" 1658209ff23fSmrg#include "confdefs.h" 1659209ff23fSmrg 1660209ff23fSmrg#if HAVE_DLFCN_H 1661209ff23fSmrg#include <dlfcn.h> 1662209ff23fSmrg#endif 1663209ff23fSmrg 1664209ff23fSmrg#include <stdio.h> 1665209ff23fSmrg 1666209ff23fSmrg#ifdef RTLD_GLOBAL 1667209ff23fSmrg# define LT_DLGLOBAL RTLD_GLOBAL 1668209ff23fSmrg#else 1669209ff23fSmrg# ifdef DL_GLOBAL 1670209ff23fSmrg# define LT_DLGLOBAL DL_GLOBAL 1671209ff23fSmrg# else 1672209ff23fSmrg# define LT_DLGLOBAL 0 1673209ff23fSmrg# endif 1674209ff23fSmrg#endif 1675209ff23fSmrg 1676209ff23fSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1677209ff23fSmrg find out it does not work in some platform. */ 1678209ff23fSmrg#ifndef LT_DLLAZY_OR_NOW 1679209ff23fSmrg# ifdef RTLD_LAZY 1680209ff23fSmrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1681209ff23fSmrg# else 1682209ff23fSmrg# ifdef DL_LAZY 1683209ff23fSmrg# define LT_DLLAZY_OR_NOW DL_LAZY 1684209ff23fSmrg# else 1685209ff23fSmrg# ifdef RTLD_NOW 1686209ff23fSmrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1687209ff23fSmrg# else 1688209ff23fSmrg# ifdef DL_NOW 1689209ff23fSmrg# define LT_DLLAZY_OR_NOW DL_NOW 1690209ff23fSmrg# else 1691209ff23fSmrg# define LT_DLLAZY_OR_NOW 0 1692209ff23fSmrg# endif 1693209ff23fSmrg# endif 1694209ff23fSmrg# endif 1695209ff23fSmrg# endif 1696209ff23fSmrg#endif 1697209ff23fSmrg 1698209ff23fSmrg#ifdef __cplusplus 1699209ff23fSmrgextern "C" void exit (int); 1700209ff23fSmrg#endif 1701209ff23fSmrg 1702209ff23fSmrgvoid fnord() { int i=42;} 1703209ff23fSmrgint main () 1704209ff23fSmrg{ 1705209ff23fSmrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1706209ff23fSmrg int status = $lt_dlunknown; 1707209ff23fSmrg 1708209ff23fSmrg if (self) 1709209ff23fSmrg { 1710209ff23fSmrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1711209ff23fSmrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1712209ff23fSmrg /* dlclose (self); */ 1713209ff23fSmrg } 1714209ff23fSmrg else 1715209ff23fSmrg puts (dlerror ()); 1716209ff23fSmrg 1717209ff23fSmrg exit (status); 1718209ff23fSmrg}] 1719ad43ddacSmrg_LT_EOF 1720209ff23fSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1721209ff23fSmrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1722209ff23fSmrg lt_status=$? 1723209ff23fSmrg case x$lt_status in 1724209ff23fSmrg x$lt_dlno_uscore) $1 ;; 1725209ff23fSmrg x$lt_dlneed_uscore) $2 ;; 1726209ff23fSmrg x$lt_dlunknown|x*) $3 ;; 1727209ff23fSmrg esac 1728209ff23fSmrg else : 1729209ff23fSmrg # compilation failed 1730209ff23fSmrg $3 1731209ff23fSmrg fi 1732209ff23fSmrgfi 1733209ff23fSmrgrm -fr conftest* 1734ad43ddacSmrg])# _LT_TRY_DLOPEN_SELF 1735209ff23fSmrg 1736209ff23fSmrg 1737ad43ddacSmrg# LT_SYS_DLOPEN_SELF 1738ad43ddacSmrg# ------------------ 1739ad43ddacSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1740ad43ddacSmrg[m4_require([_LT_HEADER_DLFCN])dnl 1741209ff23fSmrgif test "x$enable_dlopen" != xyes; then 1742209ff23fSmrg enable_dlopen=unknown 1743209ff23fSmrg enable_dlopen_self=unknown 1744209ff23fSmrg enable_dlopen_self_static=unknown 1745209ff23fSmrgelse 1746209ff23fSmrg lt_cv_dlopen=no 1747209ff23fSmrg lt_cv_dlopen_libs= 1748209ff23fSmrg 1749209ff23fSmrg case $host_os in 1750209ff23fSmrg beos*) 1751209ff23fSmrg lt_cv_dlopen="load_add_on" 1752209ff23fSmrg lt_cv_dlopen_libs= 1753209ff23fSmrg lt_cv_dlopen_self=yes 1754209ff23fSmrg ;; 1755209ff23fSmrg 1756209ff23fSmrg mingw* | pw32*) 1757209ff23fSmrg lt_cv_dlopen="LoadLibrary" 1758209ff23fSmrg lt_cv_dlopen_libs= 1759ad43ddacSmrg ;; 1760209ff23fSmrg 1761209ff23fSmrg cygwin*) 1762209ff23fSmrg lt_cv_dlopen="dlopen" 1763209ff23fSmrg lt_cv_dlopen_libs= 1764ad43ddacSmrg ;; 1765209ff23fSmrg 1766209ff23fSmrg darwin*) 1767209ff23fSmrg # if libdl is installed we need to link against it 1768209ff23fSmrg AC_CHECK_LIB([dl], [dlopen], 1769209ff23fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1770209ff23fSmrg lt_cv_dlopen="dyld" 1771209ff23fSmrg lt_cv_dlopen_libs= 1772209ff23fSmrg lt_cv_dlopen_self=yes 1773209ff23fSmrg ]) 1774ad43ddacSmrg ;; 1775209ff23fSmrg 1776209ff23fSmrg *) 1777209ff23fSmrg AC_CHECK_FUNC([shl_load], 1778209ff23fSmrg [lt_cv_dlopen="shl_load"], 1779209ff23fSmrg [AC_CHECK_LIB([dld], [shl_load], 1780209ff23fSmrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1781209ff23fSmrg [AC_CHECK_FUNC([dlopen], 1782209ff23fSmrg [lt_cv_dlopen="dlopen"], 1783209ff23fSmrg [AC_CHECK_LIB([dl], [dlopen], 1784209ff23fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1785209ff23fSmrg [AC_CHECK_LIB([svld], [dlopen], 1786209ff23fSmrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1787209ff23fSmrg [AC_CHECK_LIB([dld], [dld_link], 1788209ff23fSmrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1789209ff23fSmrg ]) 1790209ff23fSmrg ]) 1791209ff23fSmrg ]) 1792209ff23fSmrg ]) 1793209ff23fSmrg ]) 1794209ff23fSmrg ;; 1795209ff23fSmrg esac 1796209ff23fSmrg 1797209ff23fSmrg if test "x$lt_cv_dlopen" != xno; then 1798209ff23fSmrg enable_dlopen=yes 1799209ff23fSmrg else 1800209ff23fSmrg enable_dlopen=no 1801209ff23fSmrg fi 1802209ff23fSmrg 1803209ff23fSmrg case $lt_cv_dlopen in 1804209ff23fSmrg dlopen) 1805209ff23fSmrg save_CPPFLAGS="$CPPFLAGS" 1806209ff23fSmrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1807209ff23fSmrg 1808209ff23fSmrg save_LDFLAGS="$LDFLAGS" 1809209ff23fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1810209ff23fSmrg 1811209ff23fSmrg save_LIBS="$LIBS" 1812209ff23fSmrg LIBS="$lt_cv_dlopen_libs $LIBS" 1813209ff23fSmrg 1814209ff23fSmrg AC_CACHE_CHECK([whether a program can dlopen itself], 1815209ff23fSmrg lt_cv_dlopen_self, [dnl 1816ad43ddacSmrg _LT_TRY_DLOPEN_SELF( 1817209ff23fSmrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1818209ff23fSmrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1819209ff23fSmrg ]) 1820209ff23fSmrg 1821209ff23fSmrg if test "x$lt_cv_dlopen_self" = xyes; then 1822209ff23fSmrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1823209ff23fSmrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1824ad43ddacSmrg lt_cv_dlopen_self_static, [dnl 1825ad43ddacSmrg _LT_TRY_DLOPEN_SELF( 1826209ff23fSmrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1827209ff23fSmrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1828209ff23fSmrg ]) 1829209ff23fSmrg fi 1830209ff23fSmrg 1831209ff23fSmrg CPPFLAGS="$save_CPPFLAGS" 1832209ff23fSmrg LDFLAGS="$save_LDFLAGS" 1833209ff23fSmrg LIBS="$save_LIBS" 1834209ff23fSmrg ;; 1835209ff23fSmrg esac 1836209ff23fSmrg 1837209ff23fSmrg case $lt_cv_dlopen_self in 1838209ff23fSmrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1839209ff23fSmrg *) enable_dlopen_self=unknown ;; 1840209ff23fSmrg esac 1841209ff23fSmrg 1842209ff23fSmrg case $lt_cv_dlopen_self_static in 1843209ff23fSmrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1844209ff23fSmrg *) enable_dlopen_self_static=unknown ;; 1845209ff23fSmrg esac 1846209ff23fSmrgfi 1847ad43ddacSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1848ad43ddacSmrg [Whether dlopen is supported]) 1849ad43ddacSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1850ad43ddacSmrg [Whether dlopen of programs is supported]) 1851ad43ddacSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1852ad43ddacSmrg [Whether dlopen of statically linked programs is supported]) 1853ad43ddacSmrg])# LT_SYS_DLOPEN_SELF 1854209ff23fSmrg 1855ad43ddacSmrg# Old name: 1856ad43ddacSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1857ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 1858ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1859209ff23fSmrg 1860ad43ddacSmrg 1861ad43ddacSmrg# _LT_COMPILER_C_O([TAGNAME]) 1862ad43ddacSmrg# --------------------------- 1863ad43ddacSmrg# Check to see if options -c and -o are simultaneously supported by compiler. 1864ad43ddacSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1865ad43ddacSmrgm4_defun([_LT_COMPILER_C_O], 1866ad43ddacSmrg[m4_require([_LT_DECL_SED])dnl 1867ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1868ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl 1869209ff23fSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1870ad43ddacSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1871ad43ddacSmrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1872ad43ddacSmrg $RM -r conftest 2>/dev/null 1873209ff23fSmrg mkdir conftest 1874209ff23fSmrg cd conftest 1875209ff23fSmrg mkdir out 1876209ff23fSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1877209ff23fSmrg 1878209ff23fSmrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1879209ff23fSmrg # Insert the option either (1) after the last *FLAGS variable, or 1880209ff23fSmrg # (2) before a word containing "conftest.", or (3) at the end. 1881209ff23fSmrg # Note that $ac_compile itself does not contain backslashes and begins 1882209ff23fSmrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1883209ff23fSmrg lt_compile=`echo "$ac_compile" | $SED \ 1884209ff23fSmrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1885209ff23fSmrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1886209ff23fSmrg -e 's:$: $lt_compiler_flag:'` 1887209ff23fSmrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1888209ff23fSmrg (eval "$lt_compile" 2>out/conftest.err) 1889209ff23fSmrg ac_status=$? 1890209ff23fSmrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1891209ff23fSmrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1892209ff23fSmrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1893209ff23fSmrg then 1894209ff23fSmrg # The compiler can only warn and ignore the option if not recognized 1895209ff23fSmrg # So say no if there are warnings 1896ad43ddacSmrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1897209ff23fSmrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1898209ff23fSmrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1899ad43ddacSmrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1900209ff23fSmrg fi 1901209ff23fSmrg fi 1902209ff23fSmrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1903ad43ddacSmrg $RM conftest* 1904209ff23fSmrg # SGI C++ compiler will create directory out/ii_files/ for 1905209ff23fSmrg # template instantiation 1906ad43ddacSmrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1907ad43ddacSmrg $RM out/* && rmdir out 1908209ff23fSmrg cd .. 1909ad43ddacSmrg $RM -r conftest 1910ad43ddacSmrg $RM conftest* 1911209ff23fSmrg]) 1912ad43ddacSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1913ad43ddacSmrg [Does compiler simultaneously support -c and -o options?]) 1914ad43ddacSmrg])# _LT_COMPILER_C_O 1915209ff23fSmrg 1916209ff23fSmrg 1917ad43ddacSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1918ad43ddacSmrg# ---------------------------------- 1919209ff23fSmrg# Check to see if we can do hard links to lock some files if needed 1920ad43ddacSmrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1921ad43ddacSmrg[m4_require([_LT_ENABLE_LOCK])dnl 1922ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1923ad43ddacSmrg_LT_COMPILER_C_O([$1]) 1924209ff23fSmrg 1925209ff23fSmrghard_links="nottested" 1926ad43ddacSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1927209ff23fSmrg # do not overwrite the value of need_locks provided by the user 1928209ff23fSmrg AC_MSG_CHECKING([if we can lock with hard links]) 1929209ff23fSmrg hard_links=yes 1930ad43ddacSmrg $RM conftest* 1931209ff23fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1932209ff23fSmrg touch conftest.a 1933209ff23fSmrg ln conftest.a conftest.b 2>&5 || hard_links=no 1934209ff23fSmrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1935209ff23fSmrg AC_MSG_RESULT([$hard_links]) 1936209ff23fSmrg if test "$hard_links" = no; then 1937209ff23fSmrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1938209ff23fSmrg need_locks=warn 1939209ff23fSmrg fi 1940209ff23fSmrgelse 1941209ff23fSmrg need_locks=no 1942209ff23fSmrgfi 1943ad43ddacSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1944ad43ddacSmrg])# _LT_COMPILER_FILE_LOCKS 1945209ff23fSmrg 1946209ff23fSmrg 1947ad43ddacSmrg# _LT_CHECK_OBJDIR 1948ad43ddacSmrg# ---------------- 1949ad43ddacSmrgm4_defun([_LT_CHECK_OBJDIR], 1950209ff23fSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1951209ff23fSmrg[rm -f .libs 2>/dev/null 1952209ff23fSmrgmkdir .libs 2>/dev/null 1953209ff23fSmrgif test -d .libs; then 1954209ff23fSmrg lt_cv_objdir=.libs 1955209ff23fSmrgelse 1956209ff23fSmrg # MS-DOS does not allow filenames that begin with a dot. 1957209ff23fSmrg lt_cv_objdir=_libs 1958209ff23fSmrgfi 1959209ff23fSmrgrmdir .libs 2>/dev/null]) 1960209ff23fSmrgobjdir=$lt_cv_objdir 1961ad43ddacSmrg_LT_DECL([], [objdir], [0], 1962ad43ddacSmrg [The name of the directory that contains temporary libtool files])dnl 1963ad43ddacSmrgm4_pattern_allow([LT_OBJDIR])dnl 1964ad43ddacSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 1965ad43ddacSmrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 1966ad43ddacSmrg])# _LT_CHECK_OBJDIR 1967209ff23fSmrg 1968209ff23fSmrg 1969ad43ddacSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 1970ad43ddacSmrg# -------------------------------------- 1971209ff23fSmrg# Check hardcoding attributes. 1972ad43ddacSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 1973209ff23fSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1974ad43ddacSmrg_LT_TAGVAR(hardcode_action, $1)= 1975ad43ddacSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 1976ad43ddacSmrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 1977ad43ddacSmrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1978209ff23fSmrg 1979ad43ddacSmrg # We can hardcode non-existent directories. 1980ad43ddacSmrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 1981209ff23fSmrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1982209ff23fSmrg # have to relink, otherwise we might link with an installed library 1983209ff23fSmrg # when we should be linking with a yet-to-be-installed one 1984ad43ddacSmrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1985ad43ddacSmrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 1986209ff23fSmrg # Linking always hardcodes the temporary library directory. 1987ad43ddacSmrg _LT_TAGVAR(hardcode_action, $1)=relink 1988209ff23fSmrg else 1989209ff23fSmrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1990ad43ddacSmrg _LT_TAGVAR(hardcode_action, $1)=immediate 1991209ff23fSmrg fi 1992209ff23fSmrgelse 1993209ff23fSmrg # We cannot hardcode anything, or else we can only hardcode existing 1994209ff23fSmrg # directories. 1995ad43ddacSmrg _LT_TAGVAR(hardcode_action, $1)=unsupported 1996209ff23fSmrgfi 1997ad43ddacSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 1998209ff23fSmrg 1999ad43ddacSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2000ad43ddacSmrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2001209ff23fSmrg # Fast installation is not supported 2002209ff23fSmrg enable_fast_install=no 2003209ff23fSmrgelif test "$shlibpath_overrides_runpath" = yes || 2004209ff23fSmrg test "$enable_shared" = no; then 2005209ff23fSmrg # Fast installation is not necessary 2006209ff23fSmrg enable_fast_install=needless 2007209ff23fSmrgfi 2008ad43ddacSmrg_LT_TAGDECL([], [hardcode_action], [0], 2009ad43ddacSmrg [How to hardcode a shared library path into an executable]) 2010ad43ddacSmrg])# _LT_LINKER_HARDCODE_LIBPATH 2011209ff23fSmrg 2012209ff23fSmrg 2013ad43ddacSmrg# _LT_CMD_STRIPLIB 2014ad43ddacSmrg# ---------------- 2015ad43ddacSmrgm4_defun([_LT_CMD_STRIPLIB], 2016ad43ddacSmrg[m4_require([_LT_DECL_EGREP]) 2017ad43ddacSmrgstriplib= 2018209ff23fSmrgold_striplib= 2019209ff23fSmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2020ad43ddacSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2021209ff23fSmrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2022209ff23fSmrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2023209ff23fSmrg AC_MSG_RESULT([yes]) 2024209ff23fSmrgelse 2025209ff23fSmrg# FIXME - insert some real tests, host_os isn't really good enough 2026209ff23fSmrg case $host_os in 2027ad43ddacSmrg darwin*) 2028ad43ddacSmrg if test -n "$STRIP" ; then 2029ad43ddacSmrg striplib="$STRIP -x" 2030ad43ddacSmrg old_striplib="$STRIP -S" 2031ad43ddacSmrg AC_MSG_RESULT([yes]) 2032ad43ddacSmrg else 2033ad43ddacSmrg AC_MSG_RESULT([no]) 2034ad43ddacSmrg fi 2035ad43ddacSmrg ;; 2036ad43ddacSmrg *) 2037ad43ddacSmrg AC_MSG_RESULT([no]) 2038209ff23fSmrg ;; 2039209ff23fSmrg esac 2040209ff23fSmrgfi 2041ad43ddacSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2042ad43ddacSmrg_LT_DECL([], [striplib], [1]) 2043ad43ddacSmrg])# _LT_CMD_STRIPLIB 2044209ff23fSmrg 2045209ff23fSmrg 2046ad43ddacSmrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2047209ff23fSmrg# ----------------------------- 2048209ff23fSmrg# PORTME Fill in your ld.so characteristics 2049ad43ddacSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2050ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2051ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl 2052ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2053ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 2054209ff23fSmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2055ad43ddacSmrgm4_if([$1], 2056ad43ddacSmrg [], [ 2057209ff23fSmrgif test "$GCC" = yes; then 2058209ff23fSmrg case $host_os in 2059209ff23fSmrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2060209ff23fSmrg *) lt_awk_arg="/^libraries:/" ;; 2061209ff23fSmrg esac 2062209ff23fSmrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2063ad43ddacSmrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 2064209ff23fSmrg # if the path contains ";" then we assume it to be the separator 2065209ff23fSmrg # otherwise default to the standard path separator (i.e. ":") - it is 2066209ff23fSmrg # assumed that no part of a normal pathname contains ";" but that should 2067209ff23fSmrg # okay in the real world where ";" in dirpaths is itself problematic. 2068ad43ddacSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 2069209ff23fSmrg else 2070ad43ddacSmrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2071209ff23fSmrg fi 2072209ff23fSmrg # Ok, now we have the path, separated by spaces, we can step through it 2073209ff23fSmrg # and add multilib dir if necessary. 2074209ff23fSmrg lt_tmp_lt_search_path_spec= 2075209ff23fSmrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2076209ff23fSmrg for lt_sys_path in $lt_search_path_spec; do 2077209ff23fSmrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2078209ff23fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2079209ff23fSmrg else 2080209ff23fSmrg test -d "$lt_sys_path" && \ 2081209ff23fSmrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2082209ff23fSmrg fi 2083209ff23fSmrg done 2084ad43ddacSmrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 2085209ff23fSmrgBEGIN {RS=" "; FS="/|\n";} { 2086209ff23fSmrg lt_foo=""; 2087209ff23fSmrg lt_count=0; 2088209ff23fSmrg for (lt_i = NF; lt_i > 0; lt_i--) { 2089209ff23fSmrg if ($lt_i != "" && $lt_i != ".") { 2090209ff23fSmrg if ($lt_i == "..") { 2091209ff23fSmrg lt_count++; 2092209ff23fSmrg } else { 2093209ff23fSmrg if (lt_count == 0) { 2094209ff23fSmrg lt_foo="/" $lt_i lt_foo; 2095209ff23fSmrg } else { 2096209ff23fSmrg lt_count--; 2097209ff23fSmrg } 2098209ff23fSmrg } 2099209ff23fSmrg } 2100209ff23fSmrg } 2101209ff23fSmrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2102209ff23fSmrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2103209ff23fSmrg}'` 2104ad43ddacSmrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 2105209ff23fSmrgelse 2106209ff23fSmrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2107209ff23fSmrgfi]) 2108ad43ddacSmrglibrary_names_spec= 2109ad43ddacSmrglibname_spec='lib$name' 2110ad43ddacSmrgsoname_spec= 2111ad43ddacSmrgshrext_cmds=".so" 2112ad43ddacSmrgpostinstall_cmds= 2113ad43ddacSmrgpostuninstall_cmds= 2114ad43ddacSmrgfinish_cmds= 2115ad43ddacSmrgfinish_eval= 2116ad43ddacSmrgshlibpath_var= 2117ad43ddacSmrgshlibpath_overrides_runpath=unknown 2118ad43ddacSmrgversion_type=none 2119ad43ddacSmrgdynamic_linker="$host_os ld.so" 2120ad43ddacSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2121209ff23fSmrgneed_lib_prefix=unknown 2122209ff23fSmrghardcode_into_libs=no 2123209ff23fSmrg 2124209ff23fSmrg# when you set need_version to no, make sure it does not cause -set_version 2125209ff23fSmrg# flags to be left without arguments 2126209ff23fSmrgneed_version=unknown 2127209ff23fSmrg 2128209ff23fSmrgcase $host_os in 2129209ff23fSmrgaix3*) 2130209ff23fSmrg version_type=linux 2131209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2132209ff23fSmrg shlibpath_var=LIBPATH 2133209ff23fSmrg 2134209ff23fSmrg # AIX 3 has no versioning support, so we append a major version to the name. 2135209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2136209ff23fSmrg ;; 2137209ff23fSmrg 2138209ff23fSmrgaix[[4-9]]*) 2139209ff23fSmrg version_type=linux 2140209ff23fSmrg need_lib_prefix=no 2141209ff23fSmrg need_version=no 2142209ff23fSmrg hardcode_into_libs=yes 2143209ff23fSmrg if test "$host_cpu" = ia64; then 2144209ff23fSmrg # AIX 5 supports IA64 2145209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2146209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2147209ff23fSmrg else 2148209ff23fSmrg # With GCC up to 2.95.x, collect2 would create an import file 2149209ff23fSmrg # for dependence libraries. The import file would start with 2150209ff23fSmrg # the line `#! .'. This would cause the generated library to 2151209ff23fSmrg # depend on `.', always an invalid library. This was fixed in 2152209ff23fSmrg # development snapshots of GCC prior to 3.0. 2153209ff23fSmrg case $host_os in 2154209ff23fSmrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2155209ff23fSmrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2156209ff23fSmrg echo ' yes ' 2157ad43ddacSmrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2158209ff23fSmrg : 2159209ff23fSmrg else 2160209ff23fSmrg can_build_shared=no 2161209ff23fSmrg fi 2162209ff23fSmrg ;; 2163209ff23fSmrg esac 2164209ff23fSmrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2165209ff23fSmrg # soname into executable. Probably we can add versioning support to 2166209ff23fSmrg # collect2, so additional links can be useful in future. 2167209ff23fSmrg if test "$aix_use_runtimelinking" = yes; then 2168209ff23fSmrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2169209ff23fSmrg # instead of lib<name>.a to let people know that these are not 2170209ff23fSmrg # typical AIX shared libraries. 2171209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2172209ff23fSmrg else 2173209ff23fSmrg # We preserve .a as extension for shared libraries through AIX4.2 2174209ff23fSmrg # and later when we are not doing run time linking. 2175209ff23fSmrg library_names_spec='${libname}${release}.a $libname.a' 2176209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2177209ff23fSmrg fi 2178209ff23fSmrg shlibpath_var=LIBPATH 2179209ff23fSmrg fi 2180209ff23fSmrg ;; 2181209ff23fSmrg 2182209ff23fSmrgamigaos*) 2183ad43ddacSmrg case $host_cpu in 2184ad43ddacSmrg powerpc) 2185ad43ddacSmrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2186ad43ddacSmrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2187ad43ddacSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2188ad43ddacSmrg ;; 2189ad43ddacSmrg m68k) 2190ad43ddacSmrg library_names_spec='$libname.ixlibrary $libname.a' 2191ad43ddacSmrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2192ad43ddacSmrg finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''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' 2193ad43ddacSmrg ;; 2194ad43ddacSmrg esac 2195209ff23fSmrg ;; 2196209ff23fSmrg 2197209ff23fSmrgbeos*) 2198209ff23fSmrg library_names_spec='${libname}${shared_ext}' 2199209ff23fSmrg dynamic_linker="$host_os ld.so" 2200209ff23fSmrg shlibpath_var=LIBRARY_PATH 2201209ff23fSmrg ;; 2202209ff23fSmrg 2203209ff23fSmrgbsdi[[45]]*) 2204209ff23fSmrg version_type=linux 2205209ff23fSmrg need_version=no 2206209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2207209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2208209ff23fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2209209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2210209ff23fSmrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2211209ff23fSmrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2212209ff23fSmrg # the default ld.so.conf also contains /usr/contrib/lib and 2213209ff23fSmrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2214209ff23fSmrg # libtool to hard-code these into programs 2215209ff23fSmrg ;; 2216209ff23fSmrg 2217209ff23fSmrgcygwin* | mingw* | pw32*) 2218209ff23fSmrg version_type=windows 2219209ff23fSmrg shrext_cmds=".dll" 2220209ff23fSmrg need_version=no 2221209ff23fSmrg need_lib_prefix=no 2222209ff23fSmrg 2223209ff23fSmrg case $GCC,$host_os in 2224209ff23fSmrg yes,cygwin* | yes,mingw* | yes,pw32*) 2225209ff23fSmrg library_names_spec='$libname.dll.a' 2226209ff23fSmrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2227209ff23fSmrg postinstall_cmds='base_file=`basename \${file}`~ 2228ad43ddacSmrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2229209ff23fSmrg dldir=$destdir/`dirname \$dlpath`~ 2230209ff23fSmrg test -d \$dldir || mkdir -p \$dldir~ 2231209ff23fSmrg $install_prog $dir/$dlname \$dldir/$dlname~ 2232ad43ddacSmrg chmod a+x \$dldir/$dlname~ 2233ad43ddacSmrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2234ad43ddacSmrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2235ad43ddacSmrg fi' 2236209ff23fSmrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2237209ff23fSmrg dlpath=$dir/\$dldll~ 2238ad43ddacSmrg $RM \$dlpath' 2239209ff23fSmrg shlibpath_overrides_runpath=yes 2240209ff23fSmrg 2241209ff23fSmrg case $host_os in 2242209ff23fSmrg cygwin*) 2243209ff23fSmrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2244209ff23fSmrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2245209ff23fSmrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2246209ff23fSmrg ;; 2247209ff23fSmrg mingw*) 2248209ff23fSmrg # MinGW DLLs use traditional 'lib' prefix 2249209ff23fSmrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2250ad43ddacSmrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2251ad43ddacSmrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2252209ff23fSmrg # It is most probably a Windows format PATH printed by 2253209ff23fSmrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 2254209ff23fSmrg # path with ; separators, and with drive letters. We can handle the 2255209ff23fSmrg # drive letters (cygwin fileutils understands them), so leave them, 2256209ff23fSmrg # especially as we might pass files found there to a mingw objdump, 2257209ff23fSmrg # which wouldn't understand a cygwinified path. Ahh. 2258ad43ddacSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2259209ff23fSmrg else 2260ad43ddacSmrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2261209ff23fSmrg fi 2262209ff23fSmrg ;; 2263209ff23fSmrg pw32*) 2264209ff23fSmrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2265209ff23fSmrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2266209ff23fSmrg ;; 2267209ff23fSmrg esac 2268209ff23fSmrg ;; 2269209ff23fSmrg 2270209ff23fSmrg *) 2271209ff23fSmrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2272209ff23fSmrg ;; 2273209ff23fSmrg esac 2274209ff23fSmrg dynamic_linker='Win32 ld.exe' 2275209ff23fSmrg # FIXME: first we should search . and the directory the executable is in 2276209ff23fSmrg shlibpath_var=PATH 2277209ff23fSmrg ;; 2278209ff23fSmrg 2279209ff23fSmrgdarwin* | rhapsody*) 2280209ff23fSmrg dynamic_linker="$host_os dyld" 2281209ff23fSmrg version_type=darwin 2282209ff23fSmrg need_lib_prefix=no 2283209ff23fSmrg need_version=no 2284ad43ddacSmrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2285209ff23fSmrg soname_spec='${libname}${release}${major}$shared_ext' 2286209ff23fSmrg shlibpath_overrides_runpath=yes 2287209ff23fSmrg shlibpath_var=DYLD_LIBRARY_PATH 2288209ff23fSmrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2289ad43ddacSmrgm4_if([$1], [],[ 2290ad43ddacSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2291209ff23fSmrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2292209ff23fSmrg ;; 2293209ff23fSmrg 2294209ff23fSmrgdgux*) 2295209ff23fSmrg version_type=linux 2296209ff23fSmrg need_lib_prefix=no 2297209ff23fSmrg need_version=no 2298209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2299209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2300209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2301209ff23fSmrg ;; 2302209ff23fSmrg 2303209ff23fSmrgfreebsd1*) 2304209ff23fSmrg dynamic_linker=no 2305209ff23fSmrg ;; 2306209ff23fSmrg 2307209ff23fSmrgfreebsd* | dragonfly*) 2308209ff23fSmrg # DragonFly does not have aout. When/if they implement a new 2309209ff23fSmrg # versioning mechanism, adjust this. 2310209ff23fSmrg if test -x /usr/bin/objformat; then 2311209ff23fSmrg objformat=`/usr/bin/objformat` 2312209ff23fSmrg else 2313209ff23fSmrg case $host_os in 2314209ff23fSmrg freebsd[[123]]*) objformat=aout ;; 2315209ff23fSmrg *) objformat=elf ;; 2316209ff23fSmrg esac 2317209ff23fSmrg fi 2318209ff23fSmrg version_type=freebsd-$objformat 2319209ff23fSmrg case $version_type in 2320209ff23fSmrg freebsd-elf*) 2321209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2322209ff23fSmrg need_version=no 2323209ff23fSmrg need_lib_prefix=no 2324209ff23fSmrg ;; 2325209ff23fSmrg freebsd-*) 2326209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2327209ff23fSmrg need_version=yes 2328209ff23fSmrg ;; 2329209ff23fSmrg esac 2330209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2331209ff23fSmrg case $host_os in 2332209ff23fSmrg freebsd2*) 2333209ff23fSmrg shlibpath_overrides_runpath=yes 2334209ff23fSmrg ;; 2335209ff23fSmrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2336209ff23fSmrg shlibpath_overrides_runpath=yes 2337209ff23fSmrg hardcode_into_libs=yes 2338209ff23fSmrg ;; 2339209ff23fSmrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2340209ff23fSmrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2341209ff23fSmrg shlibpath_overrides_runpath=no 2342209ff23fSmrg hardcode_into_libs=yes 2343209ff23fSmrg ;; 2344209ff23fSmrg *) # from 4.6 on, and DragonFly 2345209ff23fSmrg shlibpath_overrides_runpath=yes 2346209ff23fSmrg hardcode_into_libs=yes 2347209ff23fSmrg ;; 2348209ff23fSmrg esac 2349209ff23fSmrg ;; 2350209ff23fSmrg 2351209ff23fSmrggnu*) 2352209ff23fSmrg version_type=linux 2353209ff23fSmrg need_lib_prefix=no 2354209ff23fSmrg need_version=no 2355209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2356209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2357209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2358209ff23fSmrg hardcode_into_libs=yes 2359209ff23fSmrg ;; 2360209ff23fSmrg 2361209ff23fSmrghpux9* | hpux10* | hpux11*) 2362209ff23fSmrg # Give a soname corresponding to the major version so that dld.sl refuses to 2363209ff23fSmrg # link against other versions. 2364209ff23fSmrg version_type=sunos 2365209ff23fSmrg need_lib_prefix=no 2366209ff23fSmrg need_version=no 2367209ff23fSmrg case $host_cpu in 2368209ff23fSmrg ia64*) 2369209ff23fSmrg shrext_cmds='.so' 2370209ff23fSmrg hardcode_into_libs=yes 2371209ff23fSmrg dynamic_linker="$host_os dld.so" 2372209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2373209ff23fSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2374209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2375209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2376209ff23fSmrg if test "X$HPUX_IA64_MODE" = X32; then 2377209ff23fSmrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2378209ff23fSmrg else 2379209ff23fSmrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2380209ff23fSmrg fi 2381209ff23fSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2382209ff23fSmrg ;; 2383ad43ddacSmrg hppa*64*) 2384ad43ddacSmrg shrext_cmds='.sl' 2385ad43ddacSmrg hardcode_into_libs=yes 2386ad43ddacSmrg dynamic_linker="$host_os dld.sl" 2387ad43ddacSmrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2388ad43ddacSmrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2389ad43ddacSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2390ad43ddacSmrg soname_spec='${libname}${release}${shared_ext}$major' 2391ad43ddacSmrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2392ad43ddacSmrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2393ad43ddacSmrg ;; 2394ad43ddacSmrg *) 2395209ff23fSmrg shrext_cmds='.sl' 2396209ff23fSmrg dynamic_linker="$host_os dld.sl" 2397209ff23fSmrg shlibpath_var=SHLIB_PATH 2398209ff23fSmrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2399209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2400209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2401209ff23fSmrg ;; 2402209ff23fSmrg esac 2403209ff23fSmrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 2404209ff23fSmrg postinstall_cmds='chmod 555 $lib' 2405209ff23fSmrg ;; 2406209ff23fSmrg 2407209ff23fSmrginterix[[3-9]]*) 2408209ff23fSmrg version_type=linux 2409209ff23fSmrg need_lib_prefix=no 2410209ff23fSmrg need_version=no 2411209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2412209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2413209ff23fSmrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2414209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2415209ff23fSmrg shlibpath_overrides_runpath=no 2416209ff23fSmrg hardcode_into_libs=yes 2417209ff23fSmrg ;; 2418209ff23fSmrg 2419209ff23fSmrgirix5* | irix6* | nonstopux*) 2420209ff23fSmrg case $host_os in 2421209ff23fSmrg nonstopux*) version_type=nonstopux ;; 2422209ff23fSmrg *) 2423209ff23fSmrg if test "$lt_cv_prog_gnu_ld" = yes; then 2424209ff23fSmrg version_type=linux 2425209ff23fSmrg else 2426209ff23fSmrg version_type=irix 2427209ff23fSmrg fi ;; 2428209ff23fSmrg esac 2429209ff23fSmrg need_lib_prefix=no 2430209ff23fSmrg need_version=no 2431209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2432209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2433209ff23fSmrg case $host_os in 2434209ff23fSmrg irix5* | nonstopux*) 2435209ff23fSmrg libsuff= shlibsuff= 2436209ff23fSmrg ;; 2437209ff23fSmrg *) 2438209ff23fSmrg case $LD in # libtool.m4 will add one of these switches to LD 2439209ff23fSmrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2440209ff23fSmrg libsuff= shlibsuff= libmagic=32-bit;; 2441209ff23fSmrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2442209ff23fSmrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2443209ff23fSmrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2444209ff23fSmrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2445209ff23fSmrg *) libsuff= shlibsuff= libmagic=never-match;; 2446209ff23fSmrg esac 2447209ff23fSmrg ;; 2448209ff23fSmrg esac 2449209ff23fSmrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2450209ff23fSmrg shlibpath_overrides_runpath=no 2451209ff23fSmrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2452209ff23fSmrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2453209ff23fSmrg hardcode_into_libs=yes 2454209ff23fSmrg ;; 2455209ff23fSmrg 2456209ff23fSmrg# No shared lib support for Linux oldld, aout, or coff. 2457209ff23fSmrglinux*oldld* | linux*aout* | linux*coff*) 2458209ff23fSmrg dynamic_linker=no 2459209ff23fSmrg ;; 2460209ff23fSmrg 2461209ff23fSmrg# This must be Linux ELF. 2462209ff23fSmrglinux* | k*bsd*-gnu) 2463209ff23fSmrg version_type=linux 2464209ff23fSmrg need_lib_prefix=no 2465209ff23fSmrg need_version=no 2466209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2467209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2468209ff23fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2469209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2470209ff23fSmrg shlibpath_overrides_runpath=no 2471ad43ddacSmrg # Some binutils ld are patched to set DT_RUNPATH 2472ad43ddacSmrg save_LDFLAGS=$LDFLAGS 2473ad43ddacSmrg save_libdir=$libdir 2474ad43ddacSmrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2475ad43ddacSmrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2476ad43ddacSmrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2477ad43ddacSmrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2478ad43ddacSmrg [shlibpath_overrides_runpath=yes])]) 2479ad43ddacSmrg LDFLAGS=$save_LDFLAGS 2480ad43ddacSmrg libdir=$save_libdir 2481ad43ddacSmrg 2482209ff23fSmrg # This implies no fast_install, which is unacceptable. 2483209ff23fSmrg # Some rework will be needed to allow for fast_install 2484209ff23fSmrg # before this can be enabled. 2485209ff23fSmrg hardcode_into_libs=yes 2486209ff23fSmrg 2487209ff23fSmrg # Append ld.so.conf contents to the search path 2488209ff23fSmrg if test -f /etc/ld.so.conf; then 2489ad43ddacSmrg 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;/^$/d' | tr '\n' ' '` 2490ad43ddacSmrg sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" 2491209ff23fSmrg fi 2492209ff23fSmrg 2493209ff23fSmrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2494209ff23fSmrg # powerpc, because MkLinux only supported shared libraries with the 2495209ff23fSmrg # GNU dynamic linker. Since this was broken with cross compilers, 2496209ff23fSmrg # most powerpc-linux boxes support dynamic linking these days and 2497209ff23fSmrg # people can always --disable-shared, the test was removed, and we 2498209ff23fSmrg # assume the GNU/Linux dynamic linker is in use. 2499209ff23fSmrg dynamic_linker='GNU/Linux ld.so' 2500209ff23fSmrg ;; 2501209ff23fSmrg 2502ad43ddacSmrgnetbsdelf*-gnu) 2503ad43ddacSmrg version_type=linux 2504ad43ddacSmrg need_lib_prefix=no 2505ad43ddacSmrg need_version=no 2506ad43ddacSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2507ad43ddacSmrg soname_spec='${libname}${release}${shared_ext}$major' 2508ad43ddacSmrg shlibpath_var=LD_LIBRARY_PATH 2509ad43ddacSmrg shlibpath_overrides_runpath=no 2510ad43ddacSmrg hardcode_into_libs=yes 2511ad43ddacSmrg dynamic_linker='NetBSD ld.elf_so' 2512ad43ddacSmrg ;; 2513ad43ddacSmrg 2514209ff23fSmrgnetbsd*) 2515209ff23fSmrg version_type=sunos 2516209ff23fSmrg need_lib_prefix=no 2517209ff23fSmrg need_version=no 2518ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2519209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2520209ff23fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2521209ff23fSmrg dynamic_linker='NetBSD (a.out) ld.so' 2522209ff23fSmrg else 2523209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2524209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2525209ff23fSmrg dynamic_linker='NetBSD ld.elf_so' 2526209ff23fSmrg fi 2527209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2528209ff23fSmrg shlibpath_overrides_runpath=yes 2529209ff23fSmrg hardcode_into_libs=yes 2530209ff23fSmrg ;; 2531209ff23fSmrg 2532209ff23fSmrgnewsos6) 2533209ff23fSmrg version_type=linux 2534209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2535209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2536209ff23fSmrg shlibpath_overrides_runpath=yes 2537209ff23fSmrg ;; 2538209ff23fSmrg 2539ad43ddacSmrg*nto* | *qnx*) 2540ad43ddacSmrg version_type=qnx 2541209ff23fSmrg need_lib_prefix=no 2542209ff23fSmrg need_version=no 2543209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2544209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2545209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2546ad43ddacSmrg shlibpath_overrides_runpath=no 2547ad43ddacSmrg hardcode_into_libs=yes 2548ad43ddacSmrg dynamic_linker='ldqnx.so' 2549209ff23fSmrg ;; 2550209ff23fSmrg 2551209ff23fSmrgopenbsd*) 2552209ff23fSmrg version_type=sunos 2553209ff23fSmrg sys_lib_dlsearch_path_spec="/usr/lib" 2554209ff23fSmrg need_lib_prefix=no 2555209ff23fSmrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2556209ff23fSmrg case $host_os in 2557ad43ddacSmrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2558ad43ddacSmrg *) need_version=no ;; 2559209ff23fSmrg esac 2560209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2561209ff23fSmrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2562209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2563ad43ddacSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2564209ff23fSmrg case $host_os in 2565209ff23fSmrg openbsd2.[[89]] | openbsd2.[[89]].*) 2566209ff23fSmrg shlibpath_overrides_runpath=no 2567209ff23fSmrg ;; 2568209ff23fSmrg *) 2569209ff23fSmrg shlibpath_overrides_runpath=yes 2570209ff23fSmrg ;; 2571209ff23fSmrg esac 2572209ff23fSmrg else 2573209ff23fSmrg shlibpath_overrides_runpath=yes 2574209ff23fSmrg fi 2575209ff23fSmrg ;; 2576209ff23fSmrg 2577209ff23fSmrgos2*) 2578209ff23fSmrg libname_spec='$name' 2579209ff23fSmrg shrext_cmds=".dll" 2580209ff23fSmrg need_lib_prefix=no 2581209ff23fSmrg library_names_spec='$libname${shared_ext} $libname.a' 2582209ff23fSmrg dynamic_linker='OS/2 ld.exe' 2583209ff23fSmrg shlibpath_var=LIBPATH 2584209ff23fSmrg ;; 2585209ff23fSmrg 2586209ff23fSmrgosf3* | osf4* | osf5*) 2587209ff23fSmrg version_type=osf 2588209ff23fSmrg need_lib_prefix=no 2589209ff23fSmrg need_version=no 2590209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2591209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2592209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2593209ff23fSmrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2594209ff23fSmrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2595209ff23fSmrg ;; 2596209ff23fSmrg 2597209ff23fSmrgrdos*) 2598209ff23fSmrg dynamic_linker=no 2599209ff23fSmrg ;; 2600209ff23fSmrg 2601209ff23fSmrgsolaris*) 2602209ff23fSmrg version_type=linux 2603209ff23fSmrg need_lib_prefix=no 2604209ff23fSmrg need_version=no 2605209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2606209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2607209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2608209ff23fSmrg shlibpath_overrides_runpath=yes 2609209ff23fSmrg hardcode_into_libs=yes 2610209ff23fSmrg # ldd complains unless libraries are executable 2611209ff23fSmrg postinstall_cmds='chmod +x $lib' 2612209ff23fSmrg ;; 2613209ff23fSmrg 2614209ff23fSmrgsunos4*) 2615209ff23fSmrg version_type=sunos 2616209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2617209ff23fSmrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2618209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2619209ff23fSmrg shlibpath_overrides_runpath=yes 2620209ff23fSmrg if test "$with_gnu_ld" = yes; then 2621209ff23fSmrg need_lib_prefix=no 2622209ff23fSmrg fi 2623209ff23fSmrg need_version=yes 2624209ff23fSmrg ;; 2625209ff23fSmrg 2626209ff23fSmrgsysv4 | sysv4.3*) 2627209ff23fSmrg version_type=linux 2628209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2629209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2630209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2631209ff23fSmrg case $host_vendor in 2632209ff23fSmrg sni) 2633209ff23fSmrg shlibpath_overrides_runpath=no 2634209ff23fSmrg need_lib_prefix=no 2635209ff23fSmrg runpath_var=LD_RUN_PATH 2636209ff23fSmrg ;; 2637209ff23fSmrg siemens) 2638209ff23fSmrg need_lib_prefix=no 2639209ff23fSmrg ;; 2640209ff23fSmrg motorola) 2641209ff23fSmrg need_lib_prefix=no 2642209ff23fSmrg need_version=no 2643209ff23fSmrg shlibpath_overrides_runpath=no 2644209ff23fSmrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2645209ff23fSmrg ;; 2646209ff23fSmrg esac 2647209ff23fSmrg ;; 2648209ff23fSmrg 2649209ff23fSmrgsysv4*MP*) 2650209ff23fSmrg if test -d /usr/nec ;then 2651209ff23fSmrg version_type=linux 2652209ff23fSmrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2653209ff23fSmrg soname_spec='$libname${shared_ext}.$major' 2654209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2655209ff23fSmrg fi 2656209ff23fSmrg ;; 2657209ff23fSmrg 2658209ff23fSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2659209ff23fSmrg version_type=freebsd-elf 2660209ff23fSmrg need_lib_prefix=no 2661209ff23fSmrg need_version=no 2662209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2663209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2664209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2665ad43ddacSmrg shlibpath_overrides_runpath=yes 2666209ff23fSmrg hardcode_into_libs=yes 2667209ff23fSmrg if test "$with_gnu_ld" = yes; then 2668209ff23fSmrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2669209ff23fSmrg else 2670209ff23fSmrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2671209ff23fSmrg case $host_os in 2672209ff23fSmrg sco3.2v5*) 2673209ff23fSmrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2674209ff23fSmrg ;; 2675209ff23fSmrg esac 2676209ff23fSmrg fi 2677209ff23fSmrg sys_lib_dlsearch_path_spec='/usr/lib' 2678209ff23fSmrg ;; 2679209ff23fSmrg 2680ad43ddacSmrgtpf*) 2681ad43ddacSmrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2682ad43ddacSmrg version_type=linux 2683ad43ddacSmrg need_lib_prefix=no 2684ad43ddacSmrg need_version=no 2685ad43ddacSmrg library_name_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2686ad43ddacSmrg shlibpath_var=LD_LIBRARY_PATH 2687ad43ddacSmrg shlibpath_overrides_runpath=no 2688ad43ddacSmrg hardcode_into_libs=yes 2689ad43ddacSmrg ;; 2690ad43ddacSmrg 2691209ff23fSmrguts4*) 2692209ff23fSmrg version_type=linux 2693209ff23fSmrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2694209ff23fSmrg soname_spec='${libname}${release}${shared_ext}$major' 2695209ff23fSmrg shlibpath_var=LD_LIBRARY_PATH 2696209ff23fSmrg ;; 2697209ff23fSmrg 2698209ff23fSmrg*) 2699209ff23fSmrg dynamic_linker=no 2700209ff23fSmrg ;; 2701209ff23fSmrgesac 2702209ff23fSmrgAC_MSG_RESULT([$dynamic_linker]) 2703209ff23fSmrgtest "$dynamic_linker" = no && can_build_shared=no 2704209ff23fSmrg 2705209ff23fSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2706209ff23fSmrgif test "$GCC" = yes; then 2707209ff23fSmrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2708209ff23fSmrgfi 2709ad43ddacSmrg 2710ad43ddacSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2711ad43ddacSmrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2712ad43ddacSmrgfi 2713ad43ddacSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2714ad43ddacSmrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2715ad43ddacSmrgfi 2716209ff23fSmrg 2717ad43ddacSmrg_LT_DECL([], [variables_saved_for_relink], [1], 2718ad43ddacSmrg [Variables whose values should be saved in libtool wrapper scripts and 2719ad43ddacSmrg restored at link time]) 2720ad43ddacSmrg_LT_DECL([], [need_lib_prefix], [0], 2721ad43ddacSmrg [Do we need the "lib" prefix for modules?]) 2722ad43ddacSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2723ad43ddacSmrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2724ad43ddacSmrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2725ad43ddacSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2726ad43ddacSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2727ad43ddacSmrg [Is shlibpath searched before the hard-coded library search path?]) 2728ad43ddacSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2729ad43ddacSmrg_LT_DECL([], [library_names_spec], [1], 2730ad43ddacSmrg [[List of archive names. First name is the real one, the rest are links. 2731ad43ddacSmrg The last name is the one that the linker finds with -lNAME]]) 2732ad43ddacSmrg_LT_DECL([], [soname_spec], [1], 2733ad43ddacSmrg [[The coded name of the library, if different from the real name]]) 2734ad43ddacSmrg_LT_DECL([], [postinstall_cmds], [2], 2735ad43ddacSmrg [Command to use after installation of a shared archive]) 2736ad43ddacSmrg_LT_DECL([], [postuninstall_cmds], [2], 2737ad43ddacSmrg [Command to use after uninstallation of a shared archive]) 2738ad43ddacSmrg_LT_DECL([], [finish_cmds], [2], 2739ad43ddacSmrg [Commands used to finish a libtool library installation in a directory]) 2740ad43ddacSmrg_LT_DECL([], [finish_eval], [1], 2741ad43ddacSmrg [[As "finish_cmds", except a single script fragment to be evaled but 2742ad43ddacSmrg not shown]]) 2743ad43ddacSmrg_LT_DECL([], [hardcode_into_libs], [0], 2744ad43ddacSmrg [Whether we should hardcode library paths into libraries]) 2745ad43ddacSmrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2746ad43ddacSmrg [Compile-time system search path for libraries]) 2747ad43ddacSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2748ad43ddacSmrg [Run-time system search path for libraries]) 2749ad43ddacSmrg])# _LT_SYS_DYNAMIC_LINKER 2750ad43ddacSmrg 2751ad43ddacSmrg 2752ad43ddacSmrg# _LT_PATH_TOOL_PREFIX(TOOL) 2753209ff23fSmrg# -------------------------- 2754209ff23fSmrg# find a file program which can recognize shared library 2755ad43ddacSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2756ad43ddacSmrg[m4_require([_LT_DECL_EGREP])dnl 2757209ff23fSmrgAC_MSG_CHECKING([for $1]) 2758209ff23fSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2759209ff23fSmrg[case $MAGIC_CMD in 2760209ff23fSmrg[[\\/*] | ?:[\\/]*]) 2761209ff23fSmrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2762209ff23fSmrg ;; 2763209ff23fSmrg*) 2764209ff23fSmrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2765209ff23fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2766209ff23fSmrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2767209ff23fSmrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2768209ff23fSmrgdnl not every word. This closes a longstanding sh security hole. 2769ad43ddacSmrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2770209ff23fSmrg for ac_dir in $ac_dummy; do 2771209ff23fSmrg IFS="$lt_save_ifs" 2772209ff23fSmrg test -z "$ac_dir" && ac_dir=. 2773209ff23fSmrg if test -f $ac_dir/$1; then 2774209ff23fSmrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2775209ff23fSmrg if test -n "$file_magic_test_file"; then 2776209ff23fSmrg case $deplibs_check_method in 2777209ff23fSmrg "file_magic "*) 2778209ff23fSmrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2779209ff23fSmrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2780209ff23fSmrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2781209ff23fSmrg $EGREP "$file_magic_regex" > /dev/null; then 2782209ff23fSmrg : 2783209ff23fSmrg else 2784ad43ddacSmrg cat <<_LT_EOF 1>&2 2785209ff23fSmrg 2786209ff23fSmrg*** Warning: the command libtool uses to detect shared libraries, 2787209ff23fSmrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2788209ff23fSmrg*** The result is that libtool may fail to recognize shared libraries 2789209ff23fSmrg*** as such. This will affect the creation of libtool libraries that 2790209ff23fSmrg*** depend on shared libraries, but programs linked with such libtool 2791209ff23fSmrg*** libraries will work regardless of this problem. Nevertheless, you 2792209ff23fSmrg*** may want to report the problem to your system manager and/or to 2793209ff23fSmrg*** bug-libtool@gnu.org 2794209ff23fSmrg 2795ad43ddacSmrg_LT_EOF 2796209ff23fSmrg fi ;; 2797209ff23fSmrg esac 2798209ff23fSmrg fi 2799209ff23fSmrg break 2800209ff23fSmrg fi 2801209ff23fSmrg done 2802209ff23fSmrg IFS="$lt_save_ifs" 2803209ff23fSmrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2804209ff23fSmrg ;; 2805209ff23fSmrgesac]) 2806209ff23fSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2807209ff23fSmrgif test -n "$MAGIC_CMD"; then 2808209ff23fSmrg AC_MSG_RESULT($MAGIC_CMD) 2809209ff23fSmrgelse 2810209ff23fSmrg AC_MSG_RESULT(no) 2811209ff23fSmrgfi 2812ad43ddacSmrg_LT_DECL([], [MAGIC_CMD], [0], 2813ad43ddacSmrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2814ad43ddacSmrg])# _LT_PATH_TOOL_PREFIX 2815209ff23fSmrg 2816ad43ddacSmrg# Old name: 2817ad43ddacSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2818ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 2819ad43ddacSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2820209ff23fSmrg 2821ad43ddacSmrg 2822ad43ddacSmrg# _LT_PATH_MAGIC 2823ad43ddacSmrg# -------------- 2824209ff23fSmrg# find a file program which can recognize a shared library 2825ad43ddacSmrgm4_defun([_LT_PATH_MAGIC], 2826ad43ddacSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2827209ff23fSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2828209ff23fSmrg if test -n "$ac_tool_prefix"; then 2829ad43ddacSmrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2830209ff23fSmrg else 2831209ff23fSmrg MAGIC_CMD=: 2832209ff23fSmrg fi 2833209ff23fSmrgfi 2834ad43ddacSmrg])# _LT_PATH_MAGIC 2835209ff23fSmrg 2836209ff23fSmrg 2837ad43ddacSmrg# LT_PATH_LD 2838209ff23fSmrg# ---------- 2839209ff23fSmrg# find the pathname to the GNU or non-GNU linker 2840ad43ddacSmrgAC_DEFUN([LT_PATH_LD], 2841ad43ddacSmrg[AC_REQUIRE([AC_PROG_CC])dnl 2842209ff23fSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2843209ff23fSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2844ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 2845ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl 2846ad43ddacSmrg 2847ad43ddacSmrgAC_ARG_WITH([gnu-ld], 2848ad43ddacSmrg [AS_HELP_STRING([--with-gnu-ld], 2849ad43ddacSmrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2850ad43ddacSmrg [test "$withval" = no || with_gnu_ld=yes], 2851ad43ddacSmrg [with_gnu_ld=no])dnl 2852ad43ddacSmrg 2853209ff23fSmrgac_prog=ld 2854209ff23fSmrgif test "$GCC" = yes; then 2855209ff23fSmrg # Check if gcc -print-prog-name=ld gives a path. 2856209ff23fSmrg AC_MSG_CHECKING([for ld used by $CC]) 2857209ff23fSmrg case $host in 2858209ff23fSmrg *-*-mingw*) 2859209ff23fSmrg # gcc leaves a trailing carriage return which upsets mingw 2860209ff23fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2861209ff23fSmrg *) 2862209ff23fSmrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2863209ff23fSmrg esac 2864209ff23fSmrg case $ac_prog in 2865209ff23fSmrg # Accept absolute paths. 2866209ff23fSmrg [[\\/]]* | ?:[[\\/]]*) 2867209ff23fSmrg re_direlt='/[[^/]][[^/]]*/\.\./' 2868209ff23fSmrg # Canonicalize the pathname of ld 2869ad43ddacSmrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 2870ad43ddacSmrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 2871ad43ddacSmrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 2872209ff23fSmrg done 2873209ff23fSmrg test -z "$LD" && LD="$ac_prog" 2874209ff23fSmrg ;; 2875209ff23fSmrg "") 2876209ff23fSmrg # If it fails, then pretend we aren't using GCC. 2877209ff23fSmrg ac_prog=ld 2878209ff23fSmrg ;; 2879209ff23fSmrg *) 2880209ff23fSmrg # If it is relative, then search for the first ld in PATH. 2881209ff23fSmrg with_gnu_ld=unknown 2882209ff23fSmrg ;; 2883209ff23fSmrg esac 2884209ff23fSmrgelif test "$with_gnu_ld" = yes; then 2885209ff23fSmrg AC_MSG_CHECKING([for GNU ld]) 2886209ff23fSmrgelse 2887209ff23fSmrg AC_MSG_CHECKING([for non-GNU ld]) 2888209ff23fSmrgfi 2889209ff23fSmrgAC_CACHE_VAL(lt_cv_path_LD, 2890209ff23fSmrg[if test -z "$LD"; then 2891209ff23fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2892209ff23fSmrg for ac_dir in $PATH; do 2893209ff23fSmrg IFS="$lt_save_ifs" 2894209ff23fSmrg test -z "$ac_dir" && ac_dir=. 2895209ff23fSmrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2896209ff23fSmrg lt_cv_path_LD="$ac_dir/$ac_prog" 2897209ff23fSmrg # Check to see if the program is GNU ld. I'd rather use --version, 2898209ff23fSmrg # but apparently some variants of GNU ld only accept -v. 2899209ff23fSmrg # Break only if it was the GNU/non-GNU ld that we prefer. 2900209ff23fSmrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2901209ff23fSmrg *GNU* | *'with BFD'*) 2902209ff23fSmrg test "$with_gnu_ld" != no && break 2903209ff23fSmrg ;; 2904209ff23fSmrg *) 2905209ff23fSmrg test "$with_gnu_ld" != yes && break 2906209ff23fSmrg ;; 2907209ff23fSmrg esac 2908209ff23fSmrg fi 2909209ff23fSmrg done 2910209ff23fSmrg IFS="$lt_save_ifs" 2911209ff23fSmrgelse 2912209ff23fSmrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2913209ff23fSmrgfi]) 2914209ff23fSmrgLD="$lt_cv_path_LD" 2915209ff23fSmrgif test -n "$LD"; then 2916209ff23fSmrg AC_MSG_RESULT($LD) 2917209ff23fSmrgelse 2918209ff23fSmrg AC_MSG_RESULT(no) 2919209ff23fSmrgfi 2920209ff23fSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2921ad43ddacSmrg_LT_PATH_LD_GNU 2922ad43ddacSmrgAC_SUBST([LD]) 2923209ff23fSmrg 2924ad43ddacSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 2925ad43ddacSmrg])# LT_PATH_LD 2926209ff23fSmrg 2927ad43ddacSmrg# Old names: 2928ad43ddacSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 2929ad43ddacSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 2930ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 2931ad43ddacSmrgdnl AC_DEFUN([AM_PROG_LD], []) 2932ad43ddacSmrgdnl AC_DEFUN([AC_PROG_LD], []) 2933ad43ddacSmrg 2934ad43ddacSmrg 2935ad43ddacSmrg# _LT_PATH_LD_GNU 2936ad43ddacSmrg#- -------------- 2937ad43ddacSmrgm4_defun([_LT_PATH_LD_GNU], 2938ad43ddacSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2939209ff23fSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2940209ff23fSmrgcase `$LD -v 2>&1 </dev/null` in 2941209ff23fSmrg*GNU* | *'with BFD'*) 2942209ff23fSmrg lt_cv_prog_gnu_ld=yes 2943209ff23fSmrg ;; 2944209ff23fSmrg*) 2945209ff23fSmrg lt_cv_prog_gnu_ld=no 2946209ff23fSmrg ;; 2947209ff23fSmrgesac]) 2948209ff23fSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2949ad43ddacSmrg])# _LT_PATH_LD_GNU 2950209ff23fSmrg 2951209ff23fSmrg 2952ad43ddacSmrg# _LT_CMD_RELOAD 2953ad43ddacSmrg# -------------- 2954209ff23fSmrg# find reload flag for linker 2955209ff23fSmrg# -- PORTME Some linkers may need a different reload flag. 2956ad43ddacSmrgm4_defun([_LT_CMD_RELOAD], 2957209ff23fSmrg[AC_CACHE_CHECK([for $LD option to reload object files], 2958209ff23fSmrg lt_cv_ld_reload_flag, 2959209ff23fSmrg [lt_cv_ld_reload_flag='-r']) 2960209ff23fSmrgreload_flag=$lt_cv_ld_reload_flag 2961209ff23fSmrgcase $reload_flag in 2962209ff23fSmrg"" | " "*) ;; 2963209ff23fSmrg*) reload_flag=" $reload_flag" ;; 2964209ff23fSmrgesac 2965209ff23fSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2966209ff23fSmrgcase $host_os in 2967209ff23fSmrg darwin*) 2968209ff23fSmrg if test "$GCC" = yes; then 2969209ff23fSmrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2970209ff23fSmrg else 2971209ff23fSmrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2972209ff23fSmrg fi 2973209ff23fSmrg ;; 2974209ff23fSmrgesac 2975ad43ddacSmrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 2976ad43ddacSmrg_LT_DECL([], [reload_cmds], [2])dnl 2977ad43ddacSmrg])# _LT_CMD_RELOAD 2978209ff23fSmrg 2979209ff23fSmrg 2980ad43ddacSmrg# _LT_CHECK_MAGIC_METHOD 2981ad43ddacSmrg# ---------------------- 2982209ff23fSmrg# how to check for library dependencies 2983209ff23fSmrg# -- PORTME fill in with the dynamic library characteristics 2984ad43ddacSmrgm4_defun([_LT_CHECK_MAGIC_METHOD], 2985ad43ddacSmrg[m4_require([_LT_DECL_EGREP]) 2986ad43ddacSmrgAC_CACHE_CHECK([how to recognize dependent libraries], 2987209ff23fSmrglt_cv_deplibs_check_method, 2988209ff23fSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2989209ff23fSmrglt_cv_file_magic_test_file= 2990209ff23fSmrglt_cv_deplibs_check_method='unknown' 2991209ff23fSmrg# Need to set the preceding variable on all platforms that support 2992209ff23fSmrg# interlibrary dependencies. 2993209ff23fSmrg# 'none' -- dependencies not supported. 2994209ff23fSmrg# `unknown' -- same as none, but documents that we really don't know. 2995209ff23fSmrg# 'pass_all' -- all dependencies passed with no checks. 2996209ff23fSmrg# 'test_compile' -- check by making test program. 2997209ff23fSmrg# 'file_magic [[regex]]' -- check by looking for files in library path 2998209ff23fSmrg# which responds to the $file_magic_cmd with a given extended regex. 2999209ff23fSmrg# If you have `file' or equivalent on your system and you're not sure 3000209ff23fSmrg# whether `pass_all' will *always* work, you probably want this one. 3001209ff23fSmrg 3002209ff23fSmrgcase $host_os in 3003209ff23fSmrgaix[[4-9]]*) 3004209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3005209ff23fSmrg ;; 3006209ff23fSmrg 3007209ff23fSmrgbeos*) 3008209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3009209ff23fSmrg ;; 3010209ff23fSmrg 3011209ff23fSmrgbsdi[[45]]*) 3012209ff23fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3013209ff23fSmrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3014209ff23fSmrg lt_cv_file_magic_test_file=/shlib/libc.so 3015209ff23fSmrg ;; 3016209ff23fSmrg 3017209ff23fSmrgcygwin*) 3018209ff23fSmrg # func_win32_libid is a shell function defined in ltmain.sh 3019209ff23fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3020209ff23fSmrg lt_cv_file_magic_cmd='func_win32_libid' 3021209ff23fSmrg ;; 3022209ff23fSmrg 3023209ff23fSmrgmingw* | pw32*) 3024209ff23fSmrg # Base MSYS/MinGW do not provide the 'file' command needed by 3025209ff23fSmrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3026209ff23fSmrg # unless we find 'file', for example because we are cross-compiling. 3027209ff23fSmrg if ( file / ) >/dev/null 2>&1; then 3028209ff23fSmrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3029209ff23fSmrg lt_cv_file_magic_cmd='func_win32_libid' 3030209ff23fSmrg else 3031209ff23fSmrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 3032209ff23fSmrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3033209ff23fSmrg fi 3034209ff23fSmrg ;; 3035209ff23fSmrg 3036209ff23fSmrgdarwin* | rhapsody*) 3037209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3038209ff23fSmrg ;; 3039209ff23fSmrg 3040209ff23fSmrgfreebsd* | dragonfly*) 3041ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3042209ff23fSmrg case $host_cpu in 3043209ff23fSmrg i*86 ) 3044209ff23fSmrg # Not sure whether the presence of OpenBSD here was a mistake. 3045209ff23fSmrg # Let's accept both of them until this is cleared up. 3046209ff23fSmrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3047209ff23fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3048209ff23fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3049209ff23fSmrg ;; 3050209ff23fSmrg esac 3051209ff23fSmrg else 3052209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3053209ff23fSmrg fi 3054209ff23fSmrg ;; 3055209ff23fSmrg 3056209ff23fSmrggnu*) 3057209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3058209ff23fSmrg ;; 3059209ff23fSmrg 3060209ff23fSmrghpux10.20* | hpux11*) 3061209ff23fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3062209ff23fSmrg case $host_cpu in 3063209ff23fSmrg ia64*) 3064209ff23fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3065209ff23fSmrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3066209ff23fSmrg ;; 3067209ff23fSmrg hppa*64*) 3068209ff23fSmrg [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] 3069209ff23fSmrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3070209ff23fSmrg ;; 3071209ff23fSmrg *) 3072209ff23fSmrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 3073209ff23fSmrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3074209ff23fSmrg ;; 3075209ff23fSmrg esac 3076209ff23fSmrg ;; 3077209ff23fSmrg 3078209ff23fSmrginterix[[3-9]]*) 3079209ff23fSmrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3080209ff23fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3081209ff23fSmrg ;; 3082209ff23fSmrg 3083209ff23fSmrgirix5* | irix6* | nonstopux*) 3084209ff23fSmrg case $LD in 3085209ff23fSmrg *-32|*"-32 ") libmagic=32-bit;; 3086209ff23fSmrg *-n32|*"-n32 ") libmagic=N32;; 3087209ff23fSmrg *-64|*"-64 ") libmagic=64-bit;; 3088209ff23fSmrg *) libmagic=never-match;; 3089209ff23fSmrg esac 3090209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3091209ff23fSmrg ;; 3092209ff23fSmrg 3093209ff23fSmrg# This must be Linux ELF. 3094209ff23fSmrglinux* | k*bsd*-gnu) 3095209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3096209ff23fSmrg ;; 3097209ff23fSmrg 3098ad43ddacSmrgnetbsd* | netbsdelf*-gnu) 3099ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3100209ff23fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3101209ff23fSmrg else 3102209ff23fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3103209ff23fSmrg fi 3104209ff23fSmrg ;; 3105209ff23fSmrg 3106209ff23fSmrgnewos6*) 3107209ff23fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3108209ff23fSmrg lt_cv_file_magic_cmd=/usr/bin/file 3109209ff23fSmrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3110209ff23fSmrg ;; 3111209ff23fSmrg 3112ad43ddacSmrg*nto* | *qnx*) 3113ad43ddacSmrg lt_cv_deplibs_check_method=pass_all 3114209ff23fSmrg ;; 3115209ff23fSmrg 3116209ff23fSmrgopenbsd*) 3117ad43ddacSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3118209ff23fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3119209ff23fSmrg else 3120209ff23fSmrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3121209ff23fSmrg fi 3122209ff23fSmrg ;; 3123209ff23fSmrg 3124209ff23fSmrgosf3* | osf4* | osf5*) 3125209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3126209ff23fSmrg ;; 3127209ff23fSmrg 3128209ff23fSmrgrdos*) 3129209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3130209ff23fSmrg ;; 3131209ff23fSmrg 3132209ff23fSmrgsolaris*) 3133209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3134209ff23fSmrg ;; 3135209ff23fSmrg 3136ad43ddacSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3137ad43ddacSmrg lt_cv_deplibs_check_method=pass_all 3138ad43ddacSmrg ;; 3139ad43ddacSmrg 3140209ff23fSmrgsysv4 | sysv4.3*) 3141209ff23fSmrg case $host_vendor in 3142209ff23fSmrg motorola) 3143209ff23fSmrg 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]]' 3144209ff23fSmrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3145209ff23fSmrg ;; 3146209ff23fSmrg ncr) 3147209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3148209ff23fSmrg ;; 3149209ff23fSmrg sequent) 3150209ff23fSmrg lt_cv_file_magic_cmd='/bin/file' 3151209ff23fSmrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3152209ff23fSmrg ;; 3153209ff23fSmrg sni) 3154209ff23fSmrg lt_cv_file_magic_cmd='/bin/file' 3155209ff23fSmrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3156209ff23fSmrg lt_cv_file_magic_test_file=/lib/libc.so 3157209ff23fSmrg ;; 3158209ff23fSmrg siemens) 3159209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3160209ff23fSmrg ;; 3161209ff23fSmrg pc) 3162209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3163209ff23fSmrg ;; 3164209ff23fSmrg esac 3165209ff23fSmrg ;; 3166209ff23fSmrg 3167ad43ddacSmrgtpf*) 3168209ff23fSmrg lt_cv_deplibs_check_method=pass_all 3169209ff23fSmrg ;; 3170209ff23fSmrgesac 3171209ff23fSmrg]) 3172209ff23fSmrgfile_magic_cmd=$lt_cv_file_magic_cmd 3173209ff23fSmrgdeplibs_check_method=$lt_cv_deplibs_check_method 3174209ff23fSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3175209ff23fSmrg 3176ad43ddacSmrg_LT_DECL([], [deplibs_check_method], [1], 3177ad43ddacSmrg [Method to check whether dependent libraries are shared objects]) 3178ad43ddacSmrg_LT_DECL([], [file_magic_cmd], [1], 3179ad43ddacSmrg [Command to use when deplibs_check_method == "file_magic"]) 3180ad43ddacSmrg])# _LT_CHECK_MAGIC_METHOD 3181209ff23fSmrg 3182ad43ddacSmrg 3183ad43ddacSmrg# LT_PATH_NM 3184209ff23fSmrg# ---------- 3185ad43ddacSmrg# find the pathname to a BSD- or MS-compatible name lister 3186ad43ddacSmrgAC_DEFUN([LT_PATH_NM], 3187ad43ddacSmrg[AC_REQUIRE([AC_PROG_CC])dnl 3188ad43ddacSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3189209ff23fSmrg[if test -n "$NM"; then 3190209ff23fSmrg # Let the user override the test. 3191209ff23fSmrg lt_cv_path_NM="$NM" 3192209ff23fSmrgelse 3193209ff23fSmrg lt_nm_to_check="${ac_tool_prefix}nm" 3194209ff23fSmrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3195209ff23fSmrg lt_nm_to_check="$lt_nm_to_check nm" 3196209ff23fSmrg fi 3197209ff23fSmrg for lt_tmp_nm in $lt_nm_to_check; do 3198209ff23fSmrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3199209ff23fSmrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3200209ff23fSmrg IFS="$lt_save_ifs" 3201209ff23fSmrg test -z "$ac_dir" && ac_dir=. 3202209ff23fSmrg tmp_nm="$ac_dir/$lt_tmp_nm" 3203209ff23fSmrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3204209ff23fSmrg # Check to see if the nm accepts a BSD-compat flag. 3205209ff23fSmrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3206209ff23fSmrg # nm: unknown option "B" ignored 3207209ff23fSmrg # Tru64's nm complains that /dev/null is an invalid object file 3208209ff23fSmrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3209209ff23fSmrg */dev/null* | *'Invalid file or object type'*) 3210209ff23fSmrg lt_cv_path_NM="$tmp_nm -B" 3211209ff23fSmrg break 3212209ff23fSmrg ;; 3213209ff23fSmrg *) 3214209ff23fSmrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3215209ff23fSmrg */dev/null*) 3216209ff23fSmrg lt_cv_path_NM="$tmp_nm -p" 3217209ff23fSmrg break 3218209ff23fSmrg ;; 3219209ff23fSmrg *) 3220209ff23fSmrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3221209ff23fSmrg continue # so that we can try to find one that supports BSD flags 3222209ff23fSmrg ;; 3223209ff23fSmrg esac 3224209ff23fSmrg ;; 3225209ff23fSmrg esac 3226209ff23fSmrg fi 3227209ff23fSmrg done 3228209ff23fSmrg IFS="$lt_save_ifs" 3229209ff23fSmrg done 3230ad43ddacSmrg : ${lt_cv_path_NM=no} 3231209ff23fSmrgfi]) 3232ad43ddacSmrgif test "$lt_cv_path_NM" != "no"; then 3233ad43ddacSmrg NM="$lt_cv_path_NM" 3234ad43ddacSmrgelse 3235ad43ddacSmrg # Didn't find any BSD compatible name lister, look for dumpbin. 3236ad43ddacSmrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 3237ad43ddacSmrg AC_SUBST([DUMPBIN]) 3238ad43ddacSmrg if test "$DUMPBIN" != ":"; then 3239ad43ddacSmrg NM="$DUMPBIN" 3240ad43ddacSmrg fi 3241ad43ddacSmrgfi 3242ad43ddacSmrgtest -z "$NM" && NM=nm 3243ad43ddacSmrgAC_SUBST([NM]) 3244ad43ddacSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3245ad43ddacSmrg 3246ad43ddacSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3247ad43ddacSmrg [lt_cv_nm_interface="BSD nm" 3248ad43ddacSmrg echo "int some_variable = 0;" > conftest.$ac_ext 3249ad43ddacSmrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3250ad43ddacSmrg (eval "$ac_compile" 2>conftest.err) 3251ad43ddacSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3252ad43ddacSmrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3253ad43ddacSmrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3254ad43ddacSmrg cat conftest.err >&AS_MESSAGE_LOG_FD 3255ad43ddacSmrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 3256ad43ddacSmrg cat conftest.out >&AS_MESSAGE_LOG_FD 3257ad43ddacSmrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3258ad43ddacSmrg lt_cv_nm_interface="MS dumpbin" 3259ad43ddacSmrg fi 3260ad43ddacSmrg rm -f conftest*]) 3261ad43ddacSmrg])# LT_PATH_NM 3262209ff23fSmrg 3263ad43ddacSmrg# Old names: 3264ad43ddacSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3265ad43ddacSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3266ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 3267ad43ddacSmrgdnl AC_DEFUN([AM_PROG_NM], []) 3268ad43ddacSmrgdnl AC_DEFUN([AC_PROG_NM], []) 3269209ff23fSmrg 3270ad43ddacSmrg 3271ad43ddacSmrg# LT_LIB_M 3272ad43ddacSmrg# -------- 3273209ff23fSmrg# check for math library 3274ad43ddacSmrgAC_DEFUN([LT_LIB_M], 3275209ff23fSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3276209ff23fSmrgLIBM= 3277209ff23fSmrgcase $host in 3278209ff23fSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3279209ff23fSmrg # These system don't have libm, or don't need it 3280209ff23fSmrg ;; 3281209ff23fSmrg*-ncr-sysv4.3*) 3282209ff23fSmrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3283209ff23fSmrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3284209ff23fSmrg ;; 3285209ff23fSmrg*) 3286209ff23fSmrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3287209ff23fSmrg ;; 3288209ff23fSmrgesac 3289ad43ddacSmrgAC_SUBST([LIBM]) 3290ad43ddacSmrg])# LT_LIB_M 3291209ff23fSmrg 3292ad43ddacSmrg# Old name: 3293ad43ddacSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3294ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 3295ad43ddacSmrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3296209ff23fSmrg 3297209ff23fSmrg 3298ad43ddacSmrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3299ad43ddacSmrg# ------------------------------- 3300ad43ddacSmrgm4_defun([_LT_COMPILER_NO_RTTI], 3301ad43ddacSmrg[m4_require([_LT_TAG_COMPILER])dnl 3302209ff23fSmrg 3303ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3304209ff23fSmrg 3305ad43ddacSmrgif test "$GCC" = yes; then 3306ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3307209ff23fSmrg 3308ad43ddacSmrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3309ad43ddacSmrg lt_cv_prog_compiler_rtti_exceptions, 3310ad43ddacSmrg [-fno-rtti -fno-exceptions], [], 3311ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3312ad43ddacSmrgfi 3313ad43ddacSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3314ad43ddacSmrg [Compiler flag to turn off builtin functions]) 3315ad43ddacSmrg])# _LT_COMPILER_NO_RTTI 3316209ff23fSmrg 3317209ff23fSmrg 3318ad43ddacSmrg# _LT_CMD_GLOBAL_SYMBOLS 3319ad43ddacSmrg# ---------------------- 3320ad43ddacSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3321ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3322ad43ddacSmrgAC_REQUIRE([AC_PROG_CC])dnl 3323ad43ddacSmrgAC_REQUIRE([LT_PATH_NM])dnl 3324ad43ddacSmrgAC_REQUIRE([LT_PATH_LD])dnl 3325ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 3326ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl 3327ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl 3328209ff23fSmrg 3329ad43ddacSmrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3330ad43ddacSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3331ad43ddacSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3332209ff23fSmrg[ 3333ad43ddacSmrg# These are sane defaults that work on at least a few old systems. 3334ad43ddacSmrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3335209ff23fSmrg 3336ad43ddacSmrg# Character class describing NM global symbol codes. 3337ad43ddacSmrgsymcode='[[BCDEGRST]]' 3338209ff23fSmrg 3339ad43ddacSmrg# Regexp to match symbols that can be accessed directly from C. 3340ad43ddacSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3341209ff23fSmrg 3342ad43ddacSmrg# Define system-specific variables. 3343ad43ddacSmrgcase $host_os in 3344ad43ddacSmrgaix*) 3345ad43ddacSmrg symcode='[[BCDT]]' 3346ad43ddacSmrg ;; 3347ad43ddacSmrgcygwin* | mingw* | pw32*) 3348ad43ddacSmrg symcode='[[ABCDGISTW]]' 3349ad43ddacSmrg ;; 3350ad43ddacSmrghpux*) 3351ad43ddacSmrg if test "$host_cpu" = ia64; then 3352ad43ddacSmrg symcode='[[ABCDEGRST]]' 3353ad43ddacSmrg fi 3354ad43ddacSmrg ;; 3355ad43ddacSmrgirix* | nonstopux*) 3356ad43ddacSmrg symcode='[[BCDEGRST]]' 3357ad43ddacSmrg ;; 3358ad43ddacSmrgosf*) 3359ad43ddacSmrg symcode='[[BCDEGQRST]]' 3360ad43ddacSmrg ;; 3361ad43ddacSmrgsolaris*) 3362ad43ddacSmrg symcode='[[BDRT]]' 3363ad43ddacSmrg ;; 3364ad43ddacSmrgsco3.2v5*) 3365ad43ddacSmrg symcode='[[DT]]' 3366ad43ddacSmrg ;; 3367ad43ddacSmrgsysv4.2uw2*) 3368ad43ddacSmrg symcode='[[DT]]' 3369ad43ddacSmrg ;; 3370ad43ddacSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3371ad43ddacSmrg symcode='[[ABDT]]' 3372ad43ddacSmrg ;; 3373ad43ddacSmrgsysv4) 3374ad43ddacSmrg symcode='[[DFNSTU]]' 3375ad43ddacSmrg ;; 3376ad43ddacSmrgesac 3377209ff23fSmrg 3378ad43ddacSmrg# If we're using GNU nm, then use its standard symbol codes. 3379ad43ddacSmrgcase `$NM -V 2>&1` in 3380ad43ddacSmrg*GNU* | *'with BFD'*) 3381ad43ddacSmrg symcode='[[ABCDGIRSTW]]' ;; 3382ad43ddacSmrgesac 3383209ff23fSmrg 3384ad43ddacSmrg# Transform an extracted symbol line into a proper C declaration. 3385ad43ddacSmrg# Some systems (esp. on ia64) link data and code symbols differently, 3386ad43ddacSmrg# so use this general approach. 3387ad43ddacSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3388209ff23fSmrg 3389ad43ddacSmrg# Transform an extracted symbol line into symbol name and symbol address 3390ad43ddacSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3391ad43ddacSmrglt_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'" 3392209ff23fSmrg 3393ad43ddacSmrg# Handle CRLF in mingw tool chain 3394ad43ddacSmrgopt_cr= 3395ad43ddacSmrgcase $build_os in 3396ad43ddacSmrgmingw*) 3397ad43ddacSmrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3398ad43ddacSmrg ;; 3399ad43ddacSmrgesac 3400209ff23fSmrg 3401ad43ddacSmrg# Try without a prefix underscore, then with it. 3402ad43ddacSmrgfor ac_symprfx in "" "_"; do 3403209ff23fSmrg 3404ad43ddacSmrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3405ad43ddacSmrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3406209ff23fSmrg 3407ad43ddacSmrg # Write the raw and C identifiers. 3408ad43ddacSmrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3409ad43ddacSmrg # Fake it for dumpbin and say T for any non-static function 3410ad43ddacSmrg # and D for any global variable. 3411ad43ddacSmrg # Also find C++ and __fastcall symbols from MSVC++, 3412ad43ddacSmrg # which start with @ or ?. 3413ad43ddacSmrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3414ad43ddacSmrg" {last_section=section; section=\$ 3};"\ 3415ad43ddacSmrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3416ad43ddacSmrg" \$ 0!~/External *\|/{next};"\ 3417ad43ddacSmrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3418ad43ddacSmrg" {if(hide[section]) next};"\ 3419ad43ddacSmrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3420ad43ddacSmrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3421ad43ddacSmrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3422ad43ddacSmrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3423ad43ddacSmrg" ' prfx=^$ac_symprfx]" 3424ad43ddacSmrg else 3425ad43ddacSmrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3426209ff23fSmrg fi 3427209ff23fSmrg 3428ad43ddacSmrg # Check to see that the pipe works correctly. 3429ad43ddacSmrg pipe_works=no 3430209ff23fSmrg 3431ad43ddacSmrg rm -f conftest* 3432ad43ddacSmrg cat > conftest.$ac_ext <<_LT_EOF 3433ad43ddacSmrg#ifdef __cplusplus 3434ad43ddacSmrgextern "C" { 3435ad43ddacSmrg#endif 3436ad43ddacSmrgchar nm_test_var; 3437ad43ddacSmrgvoid nm_test_func(void); 3438ad43ddacSmrgvoid nm_test_func(void){} 3439ad43ddacSmrg#ifdef __cplusplus 3440ad43ddacSmrg} 3441ad43ddacSmrg#endif 3442ad43ddacSmrgint main(){nm_test_var='a';nm_test_func();return(0);} 3443ad43ddacSmrg_LT_EOF 3444209ff23fSmrg 3445ad43ddacSmrg if AC_TRY_EVAL(ac_compile); then 3446ad43ddacSmrg # Now try to grab the symbols. 3447ad43ddacSmrg nlist=conftest.nm 3448ad43ddacSmrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 3449ad43ddacSmrg # Try sorting and uniquifying the output. 3450ad43ddacSmrg if sort "$nlist" | uniq > "$nlist"T; then 3451ad43ddacSmrg mv -f "$nlist"T "$nlist" 3452ad43ddacSmrg else 3453ad43ddacSmrg rm -f "$nlist"T 3454ad43ddacSmrg fi 3455209ff23fSmrg 3456ad43ddacSmrg # Make sure that we snagged all the symbols we need. 3457ad43ddacSmrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3458ad43ddacSmrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3459ad43ddacSmrg cat <<_LT_EOF > conftest.$ac_ext 3460ad43ddacSmrg#ifdef __cplusplus 3461ad43ddacSmrgextern "C" { 3462ad43ddacSmrg#endif 3463209ff23fSmrg 3464ad43ddacSmrg_LT_EOF 3465ad43ddacSmrg # Now generate the symbol file. 3466ad43ddacSmrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3467209ff23fSmrg 3468ad43ddacSmrg cat <<_LT_EOF >> conftest.$ac_ext 3469209ff23fSmrg 3470ad43ddacSmrg/* The mapping between symbol names and symbols. */ 3471ad43ddacSmrgconst struct { 3472ad43ddacSmrg const char *name; 3473ad43ddacSmrg void *address; 3474ad43ddacSmrg} 3475ad43ddacSmrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3476ad43ddacSmrg{ 3477ad43ddacSmrg { "@PROGRAM@", (void *) 0 }, 3478ad43ddacSmrg_LT_EOF 3479ad43ddacSmrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3480ad43ddacSmrg cat <<\_LT_EOF >> conftest.$ac_ext 3481ad43ddacSmrg {0, (void *) 0} 3482ad43ddacSmrg}; 3483209ff23fSmrg 3484ad43ddacSmrg/* This works around a problem in FreeBSD linker */ 3485ad43ddacSmrg#ifdef FREEBSD_WORKAROUND 3486ad43ddacSmrgstatic const void *lt_preloaded_setup() { 3487ad43ddacSmrg return lt__PROGRAM__LTX_preloaded_symbols; 3488ad43ddacSmrg} 3489ad43ddacSmrg#endif 3490209ff23fSmrg 3491ad43ddacSmrg#ifdef __cplusplus 3492ad43ddacSmrg} 3493ad43ddacSmrg#endif 3494ad43ddacSmrg_LT_EOF 3495ad43ddacSmrg # Now try linking the two files. 3496ad43ddacSmrg mv conftest.$ac_objext conftstm.$ac_objext 3497ad43ddacSmrg lt_save_LIBS="$LIBS" 3498ad43ddacSmrg lt_save_CFLAGS="$CFLAGS" 3499ad43ddacSmrg LIBS="conftstm.$ac_objext" 3500ad43ddacSmrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3501ad43ddacSmrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3502ad43ddacSmrg pipe_works=yes 3503ad43ddacSmrg fi 3504ad43ddacSmrg LIBS="$lt_save_LIBS" 3505ad43ddacSmrg CFLAGS="$lt_save_CFLAGS" 3506ad43ddacSmrg else 3507ad43ddacSmrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3508ad43ddacSmrg fi 3509ad43ddacSmrg else 3510ad43ddacSmrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3511ad43ddacSmrg fi 3512209ff23fSmrg else 3513ad43ddacSmrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3514209ff23fSmrg fi 3515209ff23fSmrg else 3516ad43ddacSmrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3517ad43ddacSmrg cat conftest.$ac_ext >&5 3518209ff23fSmrg fi 3519ad43ddacSmrg rm -rf conftest* conftst* 3520209ff23fSmrg 3521ad43ddacSmrg # Do not use the global_symbol_pipe unless it works. 3522ad43ddacSmrg if test "$pipe_works" = yes; then 3523ad43ddacSmrg break 3524ad43ddacSmrg else 3525ad43ddacSmrg lt_cv_sys_global_symbol_pipe= 3526ad43ddacSmrg fi 3527ad43ddacSmrgdone 3528ad43ddacSmrg]) 3529ad43ddacSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3530ad43ddacSmrg lt_cv_sys_global_symbol_to_cdecl= 3531ad43ddacSmrgfi 3532ad43ddacSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3533ad43ddacSmrg AC_MSG_RESULT(failed) 3534209ff23fSmrgelse 3535ad43ddacSmrg AC_MSG_RESULT(ok) 3536209ff23fSmrgfi 3537209ff23fSmrg 3538ad43ddacSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3539ad43ddacSmrg [Take the output of nm and produce a listing of raw symbols and C names]) 3540ad43ddacSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3541ad43ddacSmrg [Transform the output of nm in a proper C declaration]) 3542ad43ddacSmrg_LT_DECL([global_symbol_to_c_name_address], 3543ad43ddacSmrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3544ad43ddacSmrg [Transform the output of nm in a C name address pair]) 3545ad43ddacSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3546ad43ddacSmrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3547ad43ddacSmrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3548ad43ddacSmrg]) # _LT_CMD_GLOBAL_SYMBOLS 3549209ff23fSmrg 3550209ff23fSmrg 3551ad43ddacSmrg# _LT_COMPILER_PIC([TAGNAME]) 3552ad43ddacSmrg# --------------------------- 3553ad43ddacSmrgm4_defun([_LT_COMPILER_PIC], 3554ad43ddacSmrg[m4_require([_LT_TAG_COMPILER])dnl 3555ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3556ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3557ad43ddacSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3558209ff23fSmrg 3559ad43ddacSmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 3560ad43ddacSmrgm4_if([$1], [CXX], [ 3561ad43ddacSmrg # C++ specific cases for pic, static, wl, etc. 3562ad43ddacSmrg if test "$GXX" = yes; then 3563ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3564ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3565209ff23fSmrg 3566ad43ddacSmrg case $host_os in 3567ad43ddacSmrg aix*) 3568ad43ddacSmrg # All AIX code is PIC. 3569209ff23fSmrg if test "$host_cpu" = ia64; then 3570ad43ddacSmrg # AIX 5 now supports IA64 processor 3571ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3572209ff23fSmrg fi 3573209ff23fSmrg ;; 3574209ff23fSmrg 3575ad43ddacSmrg amigaos*) 3576209ff23fSmrg case $host_cpu in 3577ad43ddacSmrg powerpc) 3578ad43ddacSmrg # see comment about AmigaOS4 .so support 3579ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3580ad43ddacSmrg ;; 3581ad43ddacSmrg m68k) 3582ad43ddacSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3583ad43ddacSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3584ad43ddacSmrg # like `-m68040'. 3585ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3586209ff23fSmrg ;; 3587209ff23fSmrg esac 3588209ff23fSmrg ;; 3589209ff23fSmrg 3590ad43ddacSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3591ad43ddacSmrg # PIC is the default for these OSes. 3592ad43ddacSmrg ;; 3593ad43ddacSmrg mingw* | cygwin* | os2* | pw32*) 3594ad43ddacSmrg # This hack is so that the source file can tell whether it is being 3595ad43ddacSmrg # built for inclusion in a dll (and should export symbols for example). 3596ad43ddacSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3597ad43ddacSmrg # (--disable-auto-import) libraries 3598ad43ddacSmrg m4_if([$1], [GCJ], [], 3599ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3600ad43ddacSmrg ;; 3601ad43ddacSmrg darwin* | rhapsody*) 3602ad43ddacSmrg # PIC is the default on this platform 3603ad43ddacSmrg # Common symbols not allowed in MH_DYLIB files 3604ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3605ad43ddacSmrg ;; 3606ad43ddacSmrg *djgpp*) 3607ad43ddacSmrg # DJGPP does not support shared libraries at all 3608ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3609ad43ddacSmrg ;; 3610ad43ddacSmrg interix[[3-9]]*) 3611ad43ddacSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3612ad43ddacSmrg # Instead, we relocate shared libraries at runtime. 3613ad43ddacSmrg ;; 3614ad43ddacSmrg sysv4*MP*) 3615ad43ddacSmrg if test -d /usr/nec; then 3616ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3617ad43ddacSmrg fi 3618ad43ddacSmrg ;; 3619ad43ddacSmrg hpux*) 3620ad43ddacSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3621ad43ddacSmrg # not for PA HP-UX. 3622ad43ddacSmrg case $host_cpu in 3623ad43ddacSmrg hppa*64*|ia64*) 3624209ff23fSmrg ;; 3625209ff23fSmrg *) 3626ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3627209ff23fSmrg ;; 3628ad43ddacSmrg esac 3629ad43ddacSmrg ;; 3630ad43ddacSmrg *qnx* | *nto*) 3631ad43ddacSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3632ad43ddacSmrg # it will coredump. 3633ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3634ad43ddacSmrg ;; 3635ad43ddacSmrg *) 3636ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3637ad43ddacSmrg ;; 3638209ff23fSmrg esac 3639ad43ddacSmrg else 3640ad43ddacSmrg case $host_os in 3641ad43ddacSmrg aix[[4-9]]*) 3642ad43ddacSmrg # All AIX code is PIC. 3643ad43ddacSmrg if test "$host_cpu" = ia64; then 3644ad43ddacSmrg # AIX 5 now supports IA64 processor 3645ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3646ad43ddacSmrg else 3647ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3648209ff23fSmrg fi 3649209ff23fSmrg ;; 3650ad43ddacSmrg chorus*) 3651ad43ddacSmrg case $cc_basename in 3652ad43ddacSmrg cxch68*) 3653ad43ddacSmrg # Green Hills C++ Compiler 3654ad43ddacSmrg # _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" 3655209ff23fSmrg ;; 3656209ff23fSmrg esac 3657209ff23fSmrg ;; 3658ad43ddacSmrg dgux*) 3659ad43ddacSmrg case $cc_basename in 3660ad43ddacSmrg ec++*) 3661ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3662ad43ddacSmrg ;; 3663ad43ddacSmrg ghcx*) 3664ad43ddacSmrg # Green Hills C++ Compiler 3665ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3666ad43ddacSmrg ;; 3667ad43ddacSmrg *) 3668ad43ddacSmrg ;; 3669209ff23fSmrg esac 3670209ff23fSmrg ;; 3671ad43ddacSmrg freebsd* | dragonfly*) 3672ad43ddacSmrg # FreeBSD uses GNU C++ 3673209ff23fSmrg ;; 3674ad43ddacSmrg hpux9* | hpux10* | hpux11*) 3675ad43ddacSmrg case $cc_basename in 3676ad43ddacSmrg CC*) 3677ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3678ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3679ad43ddacSmrg if test "$host_cpu" != ia64; then 3680ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3681ad43ddacSmrg fi 3682ad43ddacSmrg ;; 3683ad43ddacSmrg aCC*) 3684ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3685ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3686ad43ddacSmrg case $host_cpu in 3687ad43ddacSmrg hppa*64*|ia64*) 3688ad43ddacSmrg # +Z the default 3689ad43ddacSmrg ;; 3690ad43ddacSmrg *) 3691ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3692ad43ddacSmrg ;; 3693ad43ddacSmrg esac 3694ad43ddacSmrg ;; 3695ad43ddacSmrg *) 3696ad43ddacSmrg ;; 3697ad43ddacSmrg esac 3698209ff23fSmrg ;; 3699ad43ddacSmrg interix*) 3700ad43ddacSmrg # This is c89, which is MS Visual C++ (no shared libs) 3701ad43ddacSmrg # Anyone wants to do a port? 3702209ff23fSmrg ;; 3703ad43ddacSmrg irix5* | irix6* | nonstopux*) 3704ad43ddacSmrg case $cc_basename in 3705ad43ddacSmrg CC*) 3706ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3707ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3708ad43ddacSmrg # CC pic flag -KPIC is the default. 3709ad43ddacSmrg ;; 3710ad43ddacSmrg *) 3711ad43ddacSmrg ;; 3712ad43ddacSmrg esac 3713209ff23fSmrg ;; 3714ad43ddacSmrg linux* | k*bsd*-gnu) 3715ad43ddacSmrg case $cc_basename in 3716ad43ddacSmrg KCC*) 3717ad43ddacSmrg # KAI C++ Compiler 3718ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3719ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3720ad43ddacSmrg ;; 3721ad43ddacSmrg icpc* | ecpc* ) 3722ad43ddacSmrg # Intel C++ 3723ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3724ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3725ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3726ad43ddacSmrg ;; 3727ad43ddacSmrg pgCC* | pgcpp*) 3728ad43ddacSmrg # Portland Group C++ compiler 3729ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3730ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 3731ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3732ad43ddacSmrg ;; 3733ad43ddacSmrg cxx*) 3734ad43ddacSmrg # Compaq C++ 3735ad43ddacSmrg # Make sure the PIC flag is empty. It appears that all Alpha 3736ad43ddacSmrg # Linux and Compaq Tru64 Unix objects are PIC. 3737ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3738ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3739ad43ddacSmrg ;; 3740ad43ddacSmrg xlc* | xlC*) 3741ad43ddacSmrg # IBM XL 8.0 on PPC 3742ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3743ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 3744ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 3745ad43ddacSmrg ;; 3746ad43ddacSmrg *) 3747ad43ddacSmrg case `$CC -V 2>&1 | sed 5q` in 3748ad43ddacSmrg *Sun\ C*) 3749ad43ddacSmrg # Sun C++ 5.9 3750ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3751ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3752ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3753ad43ddacSmrg ;; 3754ad43ddacSmrg esac 3755ad43ddacSmrg ;; 3756ad43ddacSmrg esac 3757209ff23fSmrg ;; 3758ad43ddacSmrg lynxos*) 3759209ff23fSmrg ;; 3760ad43ddacSmrg m88k*) 3761209ff23fSmrg ;; 3762ad43ddacSmrg mvs*) 3763ad43ddacSmrg case $cc_basename in 3764ad43ddacSmrg cxx*) 3765ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 3766ad43ddacSmrg ;; 3767ad43ddacSmrg *) 3768ad43ddacSmrg ;; 3769ad43ddacSmrg esac 3770209ff23fSmrg ;; 3771ad43ddacSmrg netbsd* | netbsdelf*-gnu) 3772209ff23fSmrg ;; 3773ad43ddacSmrg *qnx* | *nto*) 3774ad43ddacSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3775ad43ddacSmrg # it will coredump. 3776ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3777ad43ddacSmrg ;; 3778ad43ddacSmrg osf3* | osf4* | osf5*) 3779ad43ddacSmrg case $cc_basename in 3780ad43ddacSmrg KCC*) 3781ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3782ad43ddacSmrg ;; 3783ad43ddacSmrg RCC*) 3784ad43ddacSmrg # Rational C++ 2.4.1 3785ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3786ad43ddacSmrg ;; 3787ad43ddacSmrg cxx*) 3788ad43ddacSmrg # Digital/Compaq C++ 3789ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3790ad43ddacSmrg # Make sure the PIC flag is empty. It appears that all Alpha 3791ad43ddacSmrg # Linux and Compaq Tru64 Unix objects are PIC. 3792ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3793ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3794ad43ddacSmrg ;; 3795ad43ddacSmrg *) 3796ad43ddacSmrg ;; 3797ad43ddacSmrg esac 3798209ff23fSmrg ;; 3799ad43ddacSmrg psos*) 3800209ff23fSmrg ;; 3801ad43ddacSmrg solaris*) 3802ad43ddacSmrg case $cc_basename in 3803ad43ddacSmrg CC*) 3804ad43ddacSmrg # Sun C++ 4.2, 5.x and Centerline C++ 3805ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3806ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3807ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3808ad43ddacSmrg ;; 3809ad43ddacSmrg gcx*) 3810ad43ddacSmrg # Green Hills C++ Compiler 3811ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 3812ad43ddacSmrg ;; 3813ad43ddacSmrg *) 3814ad43ddacSmrg ;; 3815ad43ddacSmrg esac 3816209ff23fSmrg ;; 3817ad43ddacSmrg sunos4*) 3818ad43ddacSmrg case $cc_basename in 3819ad43ddacSmrg CC*) 3820ad43ddacSmrg # Sun C++ 4.x 3821ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3822ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3823ad43ddacSmrg ;; 3824ad43ddacSmrg lcc*) 3825ad43ddacSmrg # Lucid 3826ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3827ad43ddacSmrg ;; 3828ad43ddacSmrg *) 3829ad43ddacSmrg ;; 3830ad43ddacSmrg esac 3831209ff23fSmrg ;; 3832ad43ddacSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 3833ad43ddacSmrg case $cc_basename in 3834ad43ddacSmrg CC*) 3835ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3836ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3837ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3838ad43ddacSmrg ;; 3839ad43ddacSmrg esac 3840ad43ddacSmrg ;; 3841ad43ddacSmrg tandem*) 3842ad43ddacSmrg case $cc_basename in 3843ad43ddacSmrg NCC*) 3844ad43ddacSmrg # NonStop-UX NCC 3.20 3845ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3846ad43ddacSmrg ;; 3847209ff23fSmrg *) 3848209ff23fSmrg ;; 3849209ff23fSmrg esac 3850209ff23fSmrg ;; 3851ad43ddacSmrg vxworks*) 3852209ff23fSmrg ;; 3853209ff23fSmrg *) 3854ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3855ad43ddacSmrg ;; 3856ad43ddacSmrg esac 3857ad43ddacSmrg fi 3858ad43ddacSmrg], 3859ad43ddacSmrg[ 3860ad43ddacSmrg if test "$GCC" = yes; then 3861ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3862ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3863209ff23fSmrg 3864ad43ddacSmrg case $host_os in 3865ad43ddacSmrg aix*) 3866ad43ddacSmrg # All AIX code is PIC. 3867ad43ddacSmrg if test "$host_cpu" = ia64; then 3868ad43ddacSmrg # AIX 5 now supports IA64 processor 3869ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3870ad43ddacSmrg fi 3871ad43ddacSmrg ;; 3872209ff23fSmrg 3873ad43ddacSmrg amigaos*) 3874ad43ddacSmrg case $host_cpu in 3875ad43ddacSmrg powerpc) 3876ad43ddacSmrg # see comment about AmigaOS4 .so support 3877ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3878ad43ddacSmrg ;; 3879ad43ddacSmrg m68k) 3880ad43ddacSmrg # FIXME: we need at least 68020 code to build shared libraries, but 3881ad43ddacSmrg # adding the `-m68020' flag to GCC prevents building anything better, 3882ad43ddacSmrg # like `-m68040'. 3883ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3884ad43ddacSmrg ;; 3885ad43ddacSmrg esac 3886ad43ddacSmrg ;; 3887209ff23fSmrg 3888ad43ddacSmrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3889ad43ddacSmrg # PIC is the default for these OSes. 3890ad43ddacSmrg ;; 3891ad43ddacSmrg 3892ad43ddacSmrg mingw* | cygwin* | pw32* | os2*) 3893ad43ddacSmrg # This hack is so that the source file can tell whether it is being 3894ad43ddacSmrg # built for inclusion in a dll (and should export symbols for example). 3895ad43ddacSmrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3896ad43ddacSmrg # (--disable-auto-import) libraries 3897ad43ddacSmrg m4_if([$1], [GCJ], [], 3898ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3899ad43ddacSmrg ;; 3900ad43ddacSmrg 3901ad43ddacSmrg darwin* | rhapsody*) 3902ad43ddacSmrg # PIC is the default on this platform 3903ad43ddacSmrg # Common symbols not allowed in MH_DYLIB files 3904ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3905ad43ddacSmrg ;; 3906ad43ddacSmrg 3907ad43ddacSmrg hpux*) 3908ad43ddacSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3909ad43ddacSmrg # not for PA HP-UX. 3910ad43ddacSmrg case $host_cpu in 3911ad43ddacSmrg hppa*64*|ia64*) 3912ad43ddacSmrg # +Z the default 3913209ff23fSmrg ;; 3914209ff23fSmrg *) 3915ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3916209ff23fSmrg ;; 3917ad43ddacSmrg esac 3918ad43ddacSmrg ;; 3919ad43ddacSmrg 3920ad43ddacSmrg interix[[3-9]]*) 3921ad43ddacSmrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3922ad43ddacSmrg # Instead, we relocate shared libraries at runtime. 3923ad43ddacSmrg ;; 3924ad43ddacSmrg 3925ad43ddacSmrg msdosdjgpp*) 3926ad43ddacSmrg # Just because we use GCC doesn't mean we suddenly get shared libraries 3927ad43ddacSmrg # on systems that don't support them. 3928ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3929ad43ddacSmrg enable_shared=no 3930ad43ddacSmrg ;; 3931ad43ddacSmrg 3932ad43ddacSmrg *nto* | *qnx*) 3933ad43ddacSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3934ad43ddacSmrg # it will coredump. 3935ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3936ad43ddacSmrg ;; 3937ad43ddacSmrg 3938ad43ddacSmrg sysv4*MP*) 3939ad43ddacSmrg if test -d /usr/nec; then 3940ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3941ad43ddacSmrg fi 3942ad43ddacSmrg ;; 3943ad43ddacSmrg 3944ad43ddacSmrg *) 3945ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3946ad43ddacSmrg ;; 3947209ff23fSmrg esac 3948ad43ddacSmrg else 3949ad43ddacSmrg # PORTME Check for flag to pass linker flags through the system compiler. 3950ad43ddacSmrg case $host_os in 3951ad43ddacSmrg aix*) 3952ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3953ad43ddacSmrg if test "$host_cpu" = ia64; then 3954ad43ddacSmrg # AIX 5 now supports IA64 processor 3955ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3956ad43ddacSmrg else 3957ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3958ad43ddacSmrg fi 3959ad43ddacSmrg ;; 3960ad43ddacSmrg 3961ad43ddacSmrg mingw* | cygwin* | pw32* | os2*) 3962ad43ddacSmrg # This hack is so that the source file can tell whether it is being 3963ad43ddacSmrg # built for inclusion in a dll (and should export symbols for example). 3964ad43ddacSmrg m4_if([$1], [GCJ], [], 3965ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3966ad43ddacSmrg ;; 3967ad43ddacSmrg 3968ad43ddacSmrg hpux9* | hpux10* | hpux11*) 3969ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3970ad43ddacSmrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3971ad43ddacSmrg # not for PA HP-UX. 3972ad43ddacSmrg case $host_cpu in 3973ad43ddacSmrg hppa*64*|ia64*) 3974ad43ddacSmrg # +Z the default 3975209ff23fSmrg ;; 3976209ff23fSmrg *) 3977ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3978209ff23fSmrg ;; 3979ad43ddacSmrg esac 3980ad43ddacSmrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 3981ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3982ad43ddacSmrg ;; 3983ad43ddacSmrg 3984ad43ddacSmrg irix5* | irix6* | nonstopux*) 3985ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3986ad43ddacSmrg # PIC (with -KPIC) is the default. 3987ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3988ad43ddacSmrg ;; 3989ad43ddacSmrg 3990ad43ddacSmrg linux* | k*bsd*-gnu) 3991ad43ddacSmrg case $cc_basename in 3992ad43ddacSmrg icc* | ecc* | ifort*) 3993ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3994ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3995ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3996ad43ddacSmrg ;; 3997ad43ddacSmrg pgcc* | pgf77* | pgf90* | pgf95*) 3998ad43ddacSmrg # Portland Group compilers (*not* the Pentium gcc compiler, 3999ad43ddacSmrg # which looks to be a dead project) 4000ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4001ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4002ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4003ad43ddacSmrg ;; 4004ad43ddacSmrg ccc*) 4005ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4006ad43ddacSmrg # All Alpha code is PIC. 4007ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4008ad43ddacSmrg ;; 4009ad43ddacSmrg xl*) 4010ad43ddacSmrg # IBM XL C 8.0/Fortran 10.1 on PPC 4011ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4012ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4013ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4014209ff23fSmrg ;; 4015209ff23fSmrg *) 4016ad43ddacSmrg case `$CC -V 2>&1 | sed 5q` in 4017ad43ddacSmrg *Sun\ C*) 4018ad43ddacSmrg # Sun C 5.9 4019ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4020ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4021ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4022ad43ddacSmrg ;; 4023ad43ddacSmrg *Sun\ F*) 4024ad43ddacSmrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4025ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4026ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4027ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4028ad43ddacSmrg ;; 4029ad43ddacSmrg esac 4030209ff23fSmrg ;; 4031ad43ddacSmrg esac 4032ad43ddacSmrg ;; 4033209ff23fSmrg 4034ad43ddacSmrg newsos6) 4035ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4036ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4037ad43ddacSmrg ;; 4038209ff23fSmrg 4039ad43ddacSmrg *nto* | *qnx*) 4040ad43ddacSmrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4041ad43ddacSmrg # it will coredump. 4042ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4043ad43ddacSmrg ;; 4044209ff23fSmrg 4045ad43ddacSmrg osf3* | osf4* | osf5*) 4046ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4047ad43ddacSmrg # All OSF/1 code is PIC. 4048ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4049ad43ddacSmrg ;; 4050209ff23fSmrg 4051ad43ddacSmrg rdos*) 4052ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4053ad43ddacSmrg ;; 4054209ff23fSmrg 4055ad43ddacSmrg solaris*) 4056ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4057ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4058ad43ddacSmrg case $cc_basename in 4059ad43ddacSmrg f77* | f90* | f95*) 4060ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4061ad43ddacSmrg *) 4062ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4063ad43ddacSmrg esac 4064ad43ddacSmrg ;; 4065209ff23fSmrg 4066ad43ddacSmrg sunos4*) 4067ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4068ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4069ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4070ad43ddacSmrg ;; 4071209ff23fSmrg 4072ad43ddacSmrg sysv4 | sysv4.2uw2* | sysv4.3*) 4073ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4074ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4075ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4076ad43ddacSmrg ;; 4077209ff23fSmrg 4078ad43ddacSmrg sysv4*MP*) 4079ad43ddacSmrg if test -d /usr/nec ;then 4080ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4081ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4082ad43ddacSmrg fi 4083ad43ddacSmrg ;; 4084209ff23fSmrg 4085ad43ddacSmrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4086ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4087ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4088ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4089ad43ddacSmrg ;; 4090209ff23fSmrg 4091ad43ddacSmrg unicos*) 4092ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4093ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4094ad43ddacSmrg ;; 4095209ff23fSmrg 4096ad43ddacSmrg uts4*) 4097ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4098ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4099ad43ddacSmrg ;; 4100209ff23fSmrg 4101ad43ddacSmrg *) 4102ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4103ad43ddacSmrg ;; 4104209ff23fSmrg esac 4105ad43ddacSmrg fi 4106ad43ddacSmrg]) 4107ad43ddacSmrgcase $host_os in 4108ad43ddacSmrg # For platforms which do not support PIC, -DPIC is meaningless: 4109ad43ddacSmrg *djgpp*) 4110ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4111ad43ddacSmrg ;; 4112ad43ddacSmrg *) 4113ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4114ad43ddacSmrg ;; 4115ad43ddacSmrgesac 4116ad43ddacSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4117ad43ddacSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4118ad43ddacSmrg [How to pass a linker flag through the compiler]) 4119209ff23fSmrg 4120ad43ddacSmrg# 4121ad43ddacSmrg# Check to make sure the PIC flag actually works. 4122ad43ddacSmrg# 4123ad43ddacSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4124ad43ddacSmrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4125ad43ddacSmrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4126ad43ddacSmrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4127ad43ddacSmrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4128ad43ddacSmrg "" | " "*) ;; 4129ad43ddacSmrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4130ad43ddacSmrg esac], 4131ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4132ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4133209ff23fSmrgfi 4134ad43ddacSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4135ad43ddacSmrg [Additional compiler flags for building library objects]) 4136209ff23fSmrg 4137ad43ddacSmrg# 4138ad43ddacSmrg# Check to make sure the static flag actually works. 4139ad43ddacSmrg# 4140ad43ddacSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4141ad43ddacSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4142ad43ddacSmrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4143ad43ddacSmrg $lt_tmp_static_flag, 4144ad43ddacSmrg [], 4145ad43ddacSmrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4146ad43ddacSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4147ad43ddacSmrg [Compiler flag to prevent dynamic linking]) 4148ad43ddacSmrg])# _LT_COMPILER_PIC 4149209ff23fSmrg 4150ad43ddacSmrg 4151ad43ddacSmrg# _LT_LINKER_SHLIBS([TAGNAME]) 4152ad43ddacSmrg# ---------------------------- 4153ad43ddacSmrg# See if the linker supports building shared libraries. 4154ad43ddacSmrgm4_defun([_LT_LINKER_SHLIBS], 4155ad43ddacSmrg[AC_REQUIRE([LT_PATH_LD])dnl 4156ad43ddacSmrgAC_REQUIRE([LT_PATH_NM])dnl 4157ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4158ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl 4159ad43ddacSmrgm4_require([_LT_DECL_SED])dnl 4160ad43ddacSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4161ad43ddacSmrgm4_require([_LT_TAG_COMPILER])dnl 4162ad43ddacSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4163ad43ddacSmrgm4_if([$1], [CXX], [ 4164ad43ddacSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4165ad43ddacSmrg case $host_os in 4166ad43ddacSmrg aix[[4-9]]*) 4167ad43ddacSmrg # If we're using GNU nm, then we don't want the "-C" option. 4168ad43ddacSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4169ad43ddacSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4170ad43ddacSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4171ad43ddacSmrg else 4172ad43ddacSmrg _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' 4173209ff23fSmrg fi 4174209ff23fSmrg ;; 4175ad43ddacSmrg pw32*) 4176ad43ddacSmrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4177209ff23fSmrg ;; 4178ad43ddacSmrg cygwin* | mingw*) 4179ad43ddacSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' 4180ad43ddacSmrg ;; 4181ad43ddacSmrg linux* | k*bsd*-gnu) 4182ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 4183ad43ddacSmrg ;; 4184ad43ddacSmrg *) 4185ad43ddacSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4186ad43ddacSmrg ;; 4187ad43ddacSmrg esac 4188ad43ddacSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4189ad43ddacSmrg], [ 4190ad43ddacSmrg runpath_var= 4191ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 4192ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4193ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)= 4194ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4195ad43ddacSmrg _LT_TAGVAR(compiler_needs_object, $1)=no 4196ad43ddacSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4197ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4198ad43ddacSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4199ad43ddacSmrg _LT_TAGVAR(hardcode_automatic, $1)=no 4200ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4201ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4202ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4203ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4204ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4205ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4206ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4207ad43ddacSmrg _LT_TAGVAR(inherit_rpath, $1)=no 4208ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4209ad43ddacSmrg _LT_TAGVAR(module_cmds, $1)= 4210ad43ddacSmrg _LT_TAGVAR(module_expsym_cmds, $1)= 4211ad43ddacSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4212ad43ddacSmrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4213ad43ddacSmrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4214ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4215ad43ddacSmrg # include_expsyms should be a list of space-separated symbols to be *always* 4216ad43ddacSmrg # included in the symbol list 4217ad43ddacSmrg _LT_TAGVAR(include_expsyms, $1)= 4218ad43ddacSmrg # exclude_expsyms can be an extended regexp of symbols to exclude 4219ad43ddacSmrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4220ad43ddacSmrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4221ad43ddacSmrg # as well as any symbol that contains `d'. 4222ad43ddacSmrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4223ad43ddacSmrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4224ad43ddacSmrg # platforms (ab)use it in PIC code, but their linkers get confused if 4225ad43ddacSmrg # the symbol is explicitly referenced. Since portable code cannot 4226ad43ddacSmrg # rely on this symbol name, it's probably fine to never include it in 4227ad43ddacSmrg # preloaded symbol tables. 4228ad43ddacSmrg # Exclude shared library initialization/finalization symbols. 4229ad43ddacSmrgdnl Note also adjust exclude_expsyms for C++ above. 4230ad43ddacSmrg extract_expsyms_cmds= 4231209ff23fSmrg 4232ad43ddacSmrg case $host_os in 4233ad43ddacSmrg cygwin* | mingw* | pw32*) 4234ad43ddacSmrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4235ad43ddacSmrg # When not using gcc, we currently assume that we are using 4236ad43ddacSmrg # Microsoft Visual C++. 4237ad43ddacSmrg if test "$GCC" != yes; then 4238ad43ddacSmrg with_gnu_ld=no 4239209ff23fSmrg fi 4240209ff23fSmrg ;; 4241ad43ddacSmrg interix*) 4242ad43ddacSmrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4243ad43ddacSmrg with_gnu_ld=yes 4244ad43ddacSmrg ;; 4245ad43ddacSmrg openbsd*) 4246ad43ddacSmrg with_gnu_ld=no 4247ad43ddacSmrg ;; 4248209ff23fSmrg esac 4249209ff23fSmrg 4250ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 4251ad43ddacSmrg if test "$with_gnu_ld" = yes; then 4252ad43ddacSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4253ad43ddacSmrg wlarc='${wl}' 4254209ff23fSmrg 4255ad43ddacSmrg # Set some defaults for GNU ld with shared library support. These 4256ad43ddacSmrg # are reset later if shared libraries are not supported. Putting them 4257ad43ddacSmrg # here allows them to be overridden if necessary. 4258ad43ddacSmrg runpath_var=LD_RUN_PATH 4259ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4260ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4261ad43ddacSmrg # ancient GNU ld didn't support --whole-archive et. al. 4262ad43ddacSmrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4263ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4264ad43ddacSmrg else 4265ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4266ad43ddacSmrg fi 4267ad43ddacSmrg supports_anon_versioning=no 4268ad43ddacSmrg case `$LD -v 2>&1` in 4269ad43ddacSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4270ad43ddacSmrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4271ad43ddacSmrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4272ad43ddacSmrg *\ 2.11.*) ;; # other 2.11 versions 4273ad43ddacSmrg *) supports_anon_versioning=yes ;; 4274ad43ddacSmrg esac 4275209ff23fSmrg 4276ad43ddacSmrg # See if GNU ld supports shared libraries. 4277ad43ddacSmrg case $host_os in 4278ad43ddacSmrg aix[[3-9]]*) 4279ad43ddacSmrg # On AIX/PPC, the GNU linker is very broken 4280ad43ddacSmrg if test "$host_cpu" != ia64; then 4281ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4282ad43ddacSmrg cat <<_LT_EOF 1>&2 4283209ff23fSmrg 4284ad43ddacSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 4285ad43ddacSmrg*** to be unable to reliably create shared libraries on AIX. 4286ad43ddacSmrg*** Therefore, libtool is disabling shared libraries support. If you 4287ad43ddacSmrg*** really care for shared libraries, you may want to modify your PATH 4288ad43ddacSmrg*** so that a non-GNU linker is found, and then restart. 4289209ff23fSmrg 4290ad43ddacSmrg_LT_EOF 4291ad43ddacSmrg fi 4292ad43ddacSmrg ;; 4293209ff23fSmrg 4294ad43ddacSmrg amigaos*) 4295ad43ddacSmrg case $host_cpu in 4296ad43ddacSmrg powerpc) 4297ad43ddacSmrg # see comment about AmigaOS4 .so support 4298ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4299ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4300ad43ddacSmrg ;; 4301ad43ddacSmrg m68k) 4302ad43ddacSmrg _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)' 4303ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4304ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4305ad43ddacSmrg ;; 4306ad43ddacSmrg esac 4307ad43ddacSmrg ;; 4308209ff23fSmrg 4309ad43ddacSmrg beos*) 4310ad43ddacSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4311ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4312ad43ddacSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4313ad43ddacSmrg # support --undefined. This deserves some investigation. FIXME 4314ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4315ad43ddacSmrg else 4316ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4317ad43ddacSmrg fi 4318ad43ddacSmrg ;; 4319209ff23fSmrg 4320ad43ddacSmrg cygwin* | mingw* | pw32*) 4321ad43ddacSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4322ad43ddacSmrg # as there is no search path for DLLs. 4323ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4324ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4325ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=no 4326ad43ddacSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4327ad43ddacSmrg _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' 4328ad43ddacSmrg 4329ad43ddacSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4330ad43ddacSmrg _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' 4331ad43ddacSmrg # If the export-symbols file already is a .def file (1st line 4332ad43ddacSmrg # is EXPORTS), use it as is; otherwise, prepend... 4333ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4334ad43ddacSmrg cp $export_symbols $output_objdir/$soname.def; 4335ad43ddacSmrg else 4336ad43ddacSmrg echo EXPORTS > $output_objdir/$soname.def; 4337ad43ddacSmrg cat $export_symbols >> $output_objdir/$soname.def; 4338ad43ddacSmrg fi~ 4339ad43ddacSmrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4340ad43ddacSmrg else 4341ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4342ad43ddacSmrg fi 4343ad43ddacSmrg ;; 4344209ff23fSmrg 4345ad43ddacSmrg interix[[3-9]]*) 4346ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4347ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4348ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4349ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4350ad43ddacSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4351ad43ddacSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4352ad43ddacSmrg # default) and relocated if they conflict, which is a slow very memory 4353ad43ddacSmrg # consuming and fragmenting process. To avoid this, we pick a random, 4354ad43ddacSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4355ad43ddacSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4356ad43ddacSmrg _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' 4357ad43ddacSmrg _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' 4358ad43ddacSmrg ;; 4359209ff23fSmrg 4360ad43ddacSmrg gnu* | linux* | tpf* | k*bsd*-gnu) 4361ad43ddacSmrg tmp_diet=no 4362ad43ddacSmrg if test "$host_os" = linux-dietlibc; then 4363ad43ddacSmrg case $cc_basename in 4364ad43ddacSmrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4365ad43ddacSmrg esac 4366ad43ddacSmrg fi 4367ad43ddacSmrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4368ad43ddacSmrg && test "$tmp_diet" = no 4369ad43ddacSmrg then 4370ad43ddacSmrg tmp_addflag= 4371ad43ddacSmrg tmp_sharedflag='-shared' 4372ad43ddacSmrg case $cc_basename,$host_cpu in 4373ad43ddacSmrg pgcc*) # Portland Group C compiler 4374ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 4375ad43ddacSmrg tmp_addflag=' $pic_flag' 4376ad43ddacSmrg ;; 4377ad43ddacSmrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 4378ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 4379ad43ddacSmrg tmp_addflag=' $pic_flag -Mnomain' ;; 4380ad43ddacSmrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4381ad43ddacSmrg tmp_addflag=' -i_dynamic' ;; 4382ad43ddacSmrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4383ad43ddacSmrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4384ad43ddacSmrg ifc* | ifort*) # Intel Fortran compiler 4385ad43ddacSmrg tmp_addflag=' -nofor_main' ;; 4386ad43ddacSmrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4387ad43ddacSmrg tmp_sharedflag='-qmkshrobj' 4388ad43ddacSmrg tmp_addflag= ;; 4389ad43ddacSmrg esac 4390ad43ddacSmrg case `$CC -V 2>&1 | sed 5q` in 4391ad43ddacSmrg *Sun\ C*) # Sun C 5.9 4392ad43ddacSmrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 4393ad43ddacSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4394ad43ddacSmrg tmp_sharedflag='-G' ;; 4395ad43ddacSmrg *Sun\ F*) # Sun Fortran 8.3 4396ad43ddacSmrg tmp_sharedflag='-G' ;; 4397ad43ddacSmrg esac 4398ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4399209ff23fSmrg 4400ad43ddacSmrg if test "x$supports_anon_versioning" = xyes; then 4401ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4402ad43ddacSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4403ad43ddacSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4404ad43ddacSmrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4405ad43ddacSmrg fi 4406209ff23fSmrg 4407ad43ddacSmrg case $cc_basename in 4408ad43ddacSmrg xlf*) 4409ad43ddacSmrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4410ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4411ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4412ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4413ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 4414ad43ddacSmrg if test "x$supports_anon_versioning" = xyes; then 4415ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4416ad43ddacSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4417ad43ddacSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4418ad43ddacSmrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4419ad43ddacSmrg fi 4420ad43ddacSmrg ;; 4421ad43ddacSmrg esac 4422ad43ddacSmrg else 4423ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4424ad43ddacSmrg fi 4425ad43ddacSmrg ;; 4426209ff23fSmrg 4427ad43ddacSmrg netbsd* | netbsdelf*-gnu) 4428ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4429ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4430ad43ddacSmrg wlarc= 4431ad43ddacSmrg else 4432ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4433ad43ddacSmrg _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' 4434ad43ddacSmrg fi 4435ad43ddacSmrg ;; 4436209ff23fSmrg 4437ad43ddacSmrg solaris*) 4438ad43ddacSmrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4439ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4440ad43ddacSmrg cat <<_LT_EOF 1>&2 4441209ff23fSmrg 4442ad43ddacSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4443ad43ddacSmrg*** create shared libraries on Solaris systems. Therefore, libtool 4444ad43ddacSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4445ad43ddacSmrg*** binutils to release 2.9.1 or newer. Another option is to modify 4446ad43ddacSmrg*** your PATH or compiler configuration so that the native linker is 4447ad43ddacSmrg*** used, and then restart. 4448209ff23fSmrg 4449ad43ddacSmrg_LT_EOF 4450ad43ddacSmrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4451ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4452ad43ddacSmrg _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' 4453ad43ddacSmrg else 4454ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4455ad43ddacSmrg fi 4456ad43ddacSmrg ;; 4457209ff23fSmrg 4458ad43ddacSmrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4459ad43ddacSmrg case `$LD -v 2>&1` in 4460ad43ddacSmrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4461ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4462ad43ddacSmrg cat <<_LT_EOF 1>&2 4463209ff23fSmrg 4464ad43ddacSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4465ad43ddacSmrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4466ad43ddacSmrg*** is disabling shared libraries support. We urge you to upgrade GNU 4467ad43ddacSmrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4468ad43ddacSmrg*** your PATH or compiler configuration so that the native linker is 4469ad43ddacSmrg*** used, and then restart. 4470209ff23fSmrg 4471ad43ddacSmrg_LT_EOF 4472ad43ddacSmrg ;; 4473ad43ddacSmrg *) 4474ad43ddacSmrg # For security reasons, it is highly recommended that you always 4475ad43ddacSmrg # use absolute paths for naming shared libraries, and exclude the 4476ad43ddacSmrg # DT_RUNPATH tag from executables and libraries. But doing so 4477ad43ddacSmrg # requires that you compile everything twice, which is a pain. 4478ad43ddacSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4479ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4480ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4481ad43ddacSmrg _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' 4482ad43ddacSmrg else 4483ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4484ad43ddacSmrg fi 4485ad43ddacSmrg ;; 4486ad43ddacSmrg esac 4487ad43ddacSmrg ;; 4488209ff23fSmrg 4489ad43ddacSmrg sunos4*) 4490ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4491ad43ddacSmrg wlarc= 4492ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4493ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4494ad43ddacSmrg ;; 4495209ff23fSmrg 4496ad43ddacSmrg *) 4497ad43ddacSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4498ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4499ad43ddacSmrg _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' 4500ad43ddacSmrg else 4501ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4502ad43ddacSmrg fi 4503ad43ddacSmrg ;; 4504ad43ddacSmrg esac 4505209ff23fSmrg 4506ad43ddacSmrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4507ad43ddacSmrg runpath_var= 4508ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4509ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4510ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4511ad43ddacSmrg fi 4512ad43ddacSmrg else 4513ad43ddacSmrg # PORTME fill in a description of your system's linker (not GNU ld) 4514ad43ddacSmrg case $host_os in 4515ad43ddacSmrg aix3*) 4516ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4517ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4518ad43ddacSmrg _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' 4519ad43ddacSmrg # Note: this linker hardcodes the directories in LIBPATH if there 4520ad43ddacSmrg # are no directories specified by -L. 4521ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4522ad43ddacSmrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4523ad43ddacSmrg # Neither direct hardcoding nor static linking is supported with a 4524ad43ddacSmrg # broken collect2. 4525ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4526ad43ddacSmrg fi 4527ad43ddacSmrg ;; 4528209ff23fSmrg 4529ad43ddacSmrg aix[[4-9]]*) 4530ad43ddacSmrg if test "$host_cpu" = ia64; then 4531ad43ddacSmrg # On IA64, the linker does run time linking by default, so we don't 4532ad43ddacSmrg # have to do anything special. 4533ad43ddacSmrg aix_use_runtimelinking=no 4534ad43ddacSmrg exp_sym_flag='-Bexport' 4535ad43ddacSmrg no_entry_flag="" 4536ad43ddacSmrg else 4537ad43ddacSmrg # If we're using GNU nm, then we don't want the "-C" option. 4538ad43ddacSmrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4539ad43ddacSmrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4540ad43ddacSmrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' 4541ad43ddacSmrg else 4542ad43ddacSmrg _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' 4543ad43ddacSmrg fi 4544ad43ddacSmrg aix_use_runtimelinking=no 4545209ff23fSmrg 4546ad43ddacSmrg # Test if we are trying to use run time linking or normal 4547ad43ddacSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4548ad43ddacSmrg # need to do runtime linking. 4549ad43ddacSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4550ad43ddacSmrg for ld_flag in $LDFLAGS; do 4551ad43ddacSmrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4552ad43ddacSmrg aix_use_runtimelinking=yes 4553ad43ddacSmrg break 4554ad43ddacSmrg fi 4555ad43ddacSmrg done 4556ad43ddacSmrg ;; 4557ad43ddacSmrg esac 4558209ff23fSmrg 4559ad43ddacSmrg exp_sym_flag='-bexport' 4560ad43ddacSmrg no_entry_flag='-bnoentry' 4561ad43ddacSmrg fi 4562209ff23fSmrg 4563ad43ddacSmrg # When large executables or shared objects are built, AIX ld can 4564ad43ddacSmrg # have problems creating the table of contents. If linking a library 4565ad43ddacSmrg # or program results in "error TOC overflow" add -mminimal-toc to 4566ad43ddacSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4567ad43ddacSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4568209ff23fSmrg 4569ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='' 4570ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4571ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4572ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4573ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4574ad43ddacSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4575209ff23fSmrg 4576ad43ddacSmrg if test "$GCC" = yes; then 4577ad43ddacSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4578ad43ddacSmrg # We only want to do this on AIX 4.2 and lower, the check 4579ad43ddacSmrg # below for broken collect2 doesn't work under 4.3+ 4580ad43ddacSmrg collect2name=`${CC} -print-prog-name=collect2` 4581ad43ddacSmrg if test -f "$collect2name" && 4582ad43ddacSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4583ad43ddacSmrg then 4584ad43ddacSmrg # We have reworked collect2 4585ad43ddacSmrg : 4586ad43ddacSmrg else 4587ad43ddacSmrg # We have old collect2 4588ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4589ad43ddacSmrg # It fails to find uninstalled libraries when the uninstalled 4590ad43ddacSmrg # path is not listed in the libpath. Setting hardcode_minus_L 4591ad43ddacSmrg # to unsupported forces relinking 4592ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4593ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4594ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4595ad43ddacSmrg fi 4596ad43ddacSmrg ;; 4597ad43ddacSmrg esac 4598ad43ddacSmrg shared_flag='-shared' 4599ad43ddacSmrg if test "$aix_use_runtimelinking" = yes; then 4600ad43ddacSmrg shared_flag="$shared_flag "'${wl}-G' 4601ad43ddacSmrg fi 4602ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=no 4603ad43ddacSmrg else 4604ad43ddacSmrg # not using gcc 4605ad43ddacSmrg if test "$host_cpu" = ia64; then 4606ad43ddacSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4607ad43ddacSmrg # chokes on -Wl,-G. The following line is correct: 4608ad43ddacSmrg shared_flag='-G' 4609ad43ddacSmrg else 4610ad43ddacSmrg if test "$aix_use_runtimelinking" = yes; then 4611ad43ddacSmrg shared_flag='${wl}-G' 4612ad43ddacSmrg else 4613ad43ddacSmrg shared_flag='${wl}-bM:SRE' 4614ad43ddacSmrg fi 4615ad43ddacSmrg fi 4616ad43ddacSmrg fi 4617209ff23fSmrg 4618ad43ddacSmrg # It seems that -bexpall does not export symbols beginning with 4619ad43ddacSmrg # underscore (_), so it is better to generate a list of symbols to export. 4620ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 4621ad43ddacSmrg if test "$aix_use_runtimelinking" = yes; then 4622ad43ddacSmrg # Warning - without using the other runtime loading flags (-brtl), 4623ad43ddacSmrg # -berok will link without error, but may produce a broken library. 4624ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 4625ad43ddacSmrg # Determine the default libpath from the value encoded in an 4626ad43ddacSmrg # empty executable. 4627ad43ddacSmrg _LT_SYS_MODULE_PATH_AIX 4628ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4629ad43ddacSmrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 4630ad43ddacSmrg else 4631ad43ddacSmrg if test "$host_cpu" = ia64; then 4632ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4633ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4634ad43ddacSmrg _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" 4635ad43ddacSmrg else 4636ad43ddacSmrg # Determine the default libpath from the value encoded in an 4637ad43ddacSmrg # empty executable. 4638ad43ddacSmrg _LT_SYS_MODULE_PATH_AIX 4639ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4640ad43ddacSmrg # Warning - without using the other run time loading flags, 4641ad43ddacSmrg # -berok will link without error, but may produce a broken library. 4642ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4643ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4644ad43ddacSmrg # Exported symbols can be pulled into shared objects from archives 4645ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4646ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 4647ad43ddacSmrg # This is similar to how AIX traditionally builds its shared libraries. 4648ad43ddacSmrg _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' 4649ad43ddacSmrg fi 4650ad43ddacSmrg fi 4651ad43ddacSmrg ;; 4652209ff23fSmrg 4653ad43ddacSmrg amigaos*) 4654ad43ddacSmrg case $host_cpu in 4655ad43ddacSmrg powerpc) 4656ad43ddacSmrg # see comment about AmigaOS4 .so support 4657ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4658ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4659ad43ddacSmrg ;; 4660ad43ddacSmrg m68k) 4661ad43ddacSmrg _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)' 4662ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4663ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4664ad43ddacSmrg ;; 4665ad43ddacSmrg esac 4666ad43ddacSmrg ;; 4667209ff23fSmrg 4668ad43ddacSmrg bsdi[[45]]*) 4669ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 4670ad43ddacSmrg ;; 4671209ff23fSmrg 4672ad43ddacSmrg cygwin* | mingw* | pw32*) 4673ad43ddacSmrg # When not using gcc, we currently assume that we are using 4674ad43ddacSmrg # Microsoft Visual C++. 4675ad43ddacSmrg # hardcode_libdir_flag_spec is actually meaningless, as there is 4676ad43ddacSmrg # no search path for DLLs. 4677ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 4678ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4679ad43ddacSmrg # Tell ltmain to make .lib files, not .a files. 4680ad43ddacSmrg libext=lib 4681ad43ddacSmrg # Tell ltmain to make .dll files, not .so files. 4682ad43ddacSmrg shrext_cmds=".dll" 4683ad43ddacSmrg # FIXME: Setting linknames here is a bad hack. 4684ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 4685ad43ddacSmrg # The linker will automatically build a .lib file if we build a DLL. 4686ad43ddacSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 4687ad43ddacSmrg # FIXME: Should let the user specify the lib program. 4688ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 4689ad43ddacSmrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 4690ad43ddacSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4691ad43ddacSmrg ;; 4692209ff23fSmrg 4693ad43ddacSmrg darwin* | rhapsody*) 4694ad43ddacSmrg _LT_DARWIN_LINKER_FEATURES($1) 4695ad43ddacSmrg ;; 4696209ff23fSmrg 4697ad43ddacSmrg dgux*) 4698ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4699ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4700ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4701ad43ddacSmrg ;; 4702209ff23fSmrg 4703ad43ddacSmrg freebsd1*) 4704ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4705ad43ddacSmrg ;; 4706209ff23fSmrg 4707ad43ddacSmrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 4708ad43ddacSmrg # support. Future versions do this automatically, but an explicit c++rt0.o 4709ad43ddacSmrg # does not break anything, and helps significantly (at the cost of a little 4710ad43ddacSmrg # extra space). 4711ad43ddacSmrg freebsd2.2*) 4712ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 4713ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4714ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4715ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4716ad43ddacSmrg ;; 4717209ff23fSmrg 4718ad43ddacSmrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 4719ad43ddacSmrg freebsd2*) 4720ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4721ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4722ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4723ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4724ad43ddacSmrg ;; 4725209ff23fSmrg 4726ad43ddacSmrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 4727ad43ddacSmrg freebsd* | dragonfly*) 4728ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 4729ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4730ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4731ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4732ad43ddacSmrg ;; 4733209ff23fSmrg 4734ad43ddacSmrg hpux9*) 4735ad43ddacSmrg if test "$GCC" = yes; then 4736ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' 4737ad43ddacSmrg else 4738ad43ddacSmrg _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' 4739ad43ddacSmrg fi 4740ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4741ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4742ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4743209ff23fSmrg 4744ad43ddacSmrg # hardcode_minus_L: Not really in the search PATH, 4745ad43ddacSmrg # but as the default location of the library. 4746ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4747ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4748ad43ddacSmrg ;; 4749209ff23fSmrg 4750ad43ddacSmrg hpux10*) 4751ad43ddacSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4752ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4753ad43ddacSmrg else 4754ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 4755ad43ddacSmrg fi 4756ad43ddacSmrg if test "$with_gnu_ld" = no; then 4757ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4758ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4759ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4760ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4761ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4762ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4763ad43ddacSmrg # hardcode_minus_L: Not really in the search PATH, 4764ad43ddacSmrg # but as the default location of the library. 4765ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4766ad43ddacSmrg fi 4767ad43ddacSmrg ;; 4768209ff23fSmrg 4769ad43ddacSmrg hpux11*) 4770ad43ddacSmrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4771ad43ddacSmrg case $host_cpu in 4772ad43ddacSmrg hppa*64*) 4773ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4774ad43ddacSmrg ;; 4775ad43ddacSmrg ia64*) 4776ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4777ad43ddacSmrg ;; 4778ad43ddacSmrg *) 4779ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4780ad43ddacSmrg ;; 4781ad43ddacSmrg esac 4782ad43ddacSmrg else 4783ad43ddacSmrg case $host_cpu in 4784ad43ddacSmrg hppa*64*) 4785ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4786ad43ddacSmrg ;; 4787ad43ddacSmrg ia64*) 4788ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4789ad43ddacSmrg ;; 4790ad43ddacSmrg *) 4791ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4792ad43ddacSmrg ;; 4793ad43ddacSmrg esac 4794ad43ddacSmrg fi 4795ad43ddacSmrg if test "$with_gnu_ld" = no; then 4796ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4797ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4798209ff23fSmrg 4799ad43ddacSmrg case $host_cpu in 4800ad43ddacSmrg hppa*64*|ia64*) 4801ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4802ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4803ad43ddacSmrg ;; 4804ad43ddacSmrg *) 4805ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4806ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4807ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4808209ff23fSmrg 4809ad43ddacSmrg # hardcode_minus_L: Not really in the search PATH, 4810ad43ddacSmrg # but as the default location of the library. 4811ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4812ad43ddacSmrg ;; 4813ad43ddacSmrg esac 4814ad43ddacSmrg fi 4815209ff23fSmrg ;; 4816209ff23fSmrg 4817ad43ddacSmrg irix5* | irix6* | nonstopux*) 4818ad43ddacSmrg if test "$GCC" = yes; then 4819ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4820ad43ddacSmrg # Try to use the -exported_symbol ld option, if it does not 4821ad43ddacSmrg # work, assume that -exports_file does not work either and 4822ad43ddacSmrg # implicitly export all symbols. 4823ad43ddacSmrg save_LDFLAGS="$LDFLAGS" 4824ad43ddacSmrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 4825ad43ddacSmrg AC_LINK_IFELSE(int foo(void) {}, 4826ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' 4827ad43ddacSmrg ) 4828ad43ddacSmrg LDFLAGS="$save_LDFLAGS" 4829ad43ddacSmrg else 4830ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 4831ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' 4832ad43ddacSmrg fi 4833ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4834ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4835ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4836ad43ddacSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 4837ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4838ad43ddacSmrg ;; 4839209ff23fSmrg 4840ad43ddacSmrg netbsd* | netbsdelf*-gnu) 4841ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4842ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 4843ad43ddacSmrg else 4844ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 4845ad43ddacSmrg fi 4846ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4847ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4848ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4849ad43ddacSmrg ;; 4850209ff23fSmrg 4851ad43ddacSmrg newsos6) 4852ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4853ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4854ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4855ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4856ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4857ad43ddacSmrg ;; 4858209ff23fSmrg 4859ad43ddacSmrg *nto* | *qnx*) 4860ad43ddacSmrg ;; 4861209ff23fSmrg 4862ad43ddacSmrg openbsd*) 4863ad43ddacSmrg if test -f /usr/libexec/ld.so; then 4864ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4865ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4866ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4867ad43ddacSmrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4868ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4869ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 4870ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4871ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4872ad43ddacSmrg else 4873ad43ddacSmrg case $host_os in 4874ad43ddacSmrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 4875ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4876ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4877ad43ddacSmrg ;; 4878ad43ddacSmrg *) 4879ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4880ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4881ad43ddacSmrg ;; 4882ad43ddacSmrg esac 4883ad43ddacSmrg fi 4884ad43ddacSmrg else 4885ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 4886ad43ddacSmrg fi 4887ad43ddacSmrg ;; 4888209ff23fSmrg 4889ad43ddacSmrg os2*) 4890ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4891ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4892ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4893ad43ddacSmrg _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' 4894ad43ddacSmrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 4895ad43ddacSmrg ;; 4896209ff23fSmrg 4897ad43ddacSmrg osf3*) 4898ad43ddacSmrg if test "$GCC" = yes; then 4899ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4900ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4901ad43ddacSmrg else 4902ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4903ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 4904ad43ddacSmrg fi 4905ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4906ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4907ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4908ad43ddacSmrg ;; 4909209ff23fSmrg 4910ad43ddacSmrg osf4* | osf5*) # as osf3* with the addition of -msym flag 4911ad43ddacSmrg if test "$GCC" = yes; then 4912ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4913ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 4914ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4915ad43ddacSmrg else 4916ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4917ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 4918ad43ddacSmrg _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~ 4919ad43ddacSmrg $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' 4920209ff23fSmrg 4921ad43ddacSmrg # Both c and cxx compiler support -rpath directly 4922ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4923ad43ddacSmrg fi 4924ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4925ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4926ad43ddacSmrg ;; 4927209ff23fSmrg 4928ad43ddacSmrg solaris*) 4929ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 4930ad43ddacSmrg if test "$GCC" = yes; then 4931ad43ddacSmrg wlarc='${wl}' 4932ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4933ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4934ad43ddacSmrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4935ad43ddacSmrg else 4936ad43ddacSmrg case `$CC -V 2>&1` in 4937ad43ddacSmrg *"Compilers 5.0"*) 4938ad43ddacSmrg wlarc='' 4939ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 4940ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4941ad43ddacSmrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 4942ad43ddacSmrg ;; 4943ad43ddacSmrg *) 4944ad43ddacSmrg wlarc='${wl}' 4945ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 4946ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4947ad43ddacSmrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4948ad43ddacSmrg ;; 4949ad43ddacSmrg esac 4950ad43ddacSmrg fi 4951ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4952ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4953ad43ddacSmrg case $host_os in 4954ad43ddacSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4955ad43ddacSmrg *) 4956ad43ddacSmrg # The compiler driver will combine and reorder linker options, 4957ad43ddacSmrg # but understands `-z linker_flag'. GCC discards it without `$wl', 4958ad43ddacSmrg # but is careful enough not to reorder. 4959ad43ddacSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 4960ad43ddacSmrg if test "$GCC" = yes; then 4961ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 4962ad43ddacSmrg else 4963ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 4964ad43ddacSmrg fi 4965ad43ddacSmrg ;; 4966ad43ddacSmrg esac 4967ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4968ad43ddacSmrg ;; 4969209ff23fSmrg 4970ad43ddacSmrg sunos4*) 4971ad43ddacSmrg if test "x$host_vendor" = xsequent; then 4972ad43ddacSmrg # Use $CC to link under sequent, because it throws in some extra .o 4973ad43ddacSmrg # files that make .init and .fini sections work. 4974ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 4975ad43ddacSmrg else 4976ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 4977ad43ddacSmrg fi 4978ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4979ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 4980ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4981ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4982ad43ddacSmrg ;; 4983209ff23fSmrg 4984ad43ddacSmrg sysv4) 4985ad43ddacSmrg case $host_vendor in 4986ad43ddacSmrg sni) 4987ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4988ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 4989ad43ddacSmrg ;; 4990ad43ddacSmrg siemens) 4991ad43ddacSmrg ## LD is ld it makes a PLAMLIB 4992ad43ddacSmrg ## CC just makes a GrossModule. 4993ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 4994ad43ddacSmrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 4995ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 4996ad43ddacSmrg ;; 4997ad43ddacSmrg motorola) 4998ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4999ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5000ad43ddacSmrg ;; 5001ad43ddacSmrg esac 5002ad43ddacSmrg runpath_var='LD_RUN_PATH' 5003ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5004ad43ddacSmrg ;; 5005209ff23fSmrg 5006ad43ddacSmrg sysv4.3*) 5007ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5008ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5009ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5010ad43ddacSmrg ;; 5011209ff23fSmrg 5012ad43ddacSmrg sysv4*MP*) 5013ad43ddacSmrg if test -d /usr/nec; then 5014ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5015ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5016ad43ddacSmrg runpath_var=LD_RUN_PATH 5017ad43ddacSmrg hardcode_runpath_var=yes 5018ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5019ad43ddacSmrg fi 5020ad43ddacSmrg ;; 5021209ff23fSmrg 5022ad43ddacSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5023ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5024ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5025ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5026ad43ddacSmrg runpath_var='LD_RUN_PATH' 5027209ff23fSmrg 5028ad43ddacSmrg if test "$GCC" = yes; then 5029ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5030ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5031ad43ddacSmrg else 5032ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5033ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5034ad43ddacSmrg fi 5035ad43ddacSmrg ;; 5036209ff23fSmrg 5037ad43ddacSmrg sysv5* | sco3.2v5* | sco5v6*) 5038ad43ddacSmrg # Note: We can NOT use -z defs as we might desire, because we do not 5039ad43ddacSmrg # link with -lc, and that would cause any symbols used from libc to 5040ad43ddacSmrg # always be unresolved, which means just about no library would 5041ad43ddacSmrg # ever link correctly. If we're not using GNU ld we use -z text 5042ad43ddacSmrg # though, which does catch some bad symbols but isn't as heavy-handed 5043ad43ddacSmrg # as -z defs. 5044ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5045ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5046ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5047ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5048ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5049ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5050ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5051ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5052ad43ddacSmrg runpath_var='LD_RUN_PATH' 5053209ff23fSmrg 5054ad43ddacSmrg if test "$GCC" = yes; then 5055ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5056ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5057ad43ddacSmrg else 5058ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5059ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5060ad43ddacSmrg fi 5061ad43ddacSmrg ;; 5062209ff23fSmrg 5063ad43ddacSmrg uts4*) 5064ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5065ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5066ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5067ad43ddacSmrg ;; 5068209ff23fSmrg 5069ad43ddacSmrg *) 5070ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5071ad43ddacSmrg ;; 5072ad43ddacSmrg esac 5073209ff23fSmrg 5074ad43ddacSmrg if test x$host_vendor = xsni; then 5075ad43ddacSmrg case $host in 5076ad43ddacSmrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5077ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5078ad43ddacSmrg ;; 5079ad43ddacSmrg esac 5080ad43ddacSmrg fi 5081ad43ddacSmrg fi 5082ad43ddacSmrg]) 5083ad43ddacSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5084ad43ddacSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5085209ff23fSmrg 5086ad43ddacSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5087209ff23fSmrg 5088ad43ddacSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5089ad43ddacSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5090ad43ddacSmrg_LT_DECL([], [extract_expsyms_cmds], [2], 5091ad43ddacSmrg [The commands to extract the exported symbol list from a shared archive]) 5092209ff23fSmrg 5093ad43ddacSmrg# 5094ad43ddacSmrg# Do we need to explicitly link libc? 5095ad43ddacSmrg# 5096ad43ddacSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5097ad43ddacSmrgx|xyes) 5098ad43ddacSmrg # Assume -lc should be added 5099ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5100209ff23fSmrg 5101ad43ddacSmrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5102ad43ddacSmrg case $_LT_TAGVAR(archive_cmds, $1) in 5103ad43ddacSmrg *'~'*) 5104ad43ddacSmrg # FIXME: we may have to deal with multi-command sequences. 5105ad43ddacSmrg ;; 5106ad43ddacSmrg '$CC '*) 5107ad43ddacSmrg # Test whether the compiler implicitly links with -lc since on some 5108ad43ddacSmrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5109ad43ddacSmrg # to ld, don't add -lc before -lgcc. 5110ad43ddacSmrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 5111ad43ddacSmrg $RM conftest* 5112ad43ddacSmrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5113209ff23fSmrg 5114ad43ddacSmrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5115ad43ddacSmrg soname=conftest 5116ad43ddacSmrg lib=conftest 5117ad43ddacSmrg libobjs=conftest.$ac_objext 5118ad43ddacSmrg deplibs= 5119ad43ddacSmrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5120ad43ddacSmrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5121ad43ddacSmrg compiler_flags=-v 5122ad43ddacSmrg linker_flags=-v 5123ad43ddacSmrg verstring= 5124ad43ddacSmrg output_objdir=. 5125ad43ddacSmrg libname=conftest 5126ad43ddacSmrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5127ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)= 5128ad43ddacSmrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5129ad43ddacSmrg then 5130ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5131ad43ddacSmrg else 5132ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5133ad43ddacSmrg fi 5134ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5135ad43ddacSmrg else 5136ad43ddacSmrg cat conftest.err 1>&5 5137ad43ddacSmrg fi 5138ad43ddacSmrg $RM conftest* 5139ad43ddacSmrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 5140ad43ddacSmrg ;; 5141ad43ddacSmrg esac 5142ad43ddacSmrg fi 5143ad43ddacSmrg ;; 5144ad43ddacSmrgesac 5145209ff23fSmrg 5146ad43ddacSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5147ad43ddacSmrg [Whether or not to add -lc for building shared libraries]) 5148ad43ddacSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5149ad43ddacSmrg [enable_shared_with_static_runtimes], [0], 5150ad43ddacSmrg [Whether or not to disallow shared libs when runtime libs are static]) 5151ad43ddacSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5152ad43ddacSmrg [Compiler flag to allow reflexive dlopens]) 5153ad43ddacSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5154ad43ddacSmrg [Compiler flag to generate shared objects directly from archives]) 5155ad43ddacSmrg_LT_TAGDECL([], [compiler_needs_object], [1], 5156ad43ddacSmrg [Whether the compiler copes with passing no objects directly]) 5157ad43ddacSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5158ad43ddacSmrg [Create an old-style archive from a shared archive]) 5159ad43ddacSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5160ad43ddacSmrg [Create a temporary old-style archive to link instead of a shared archive]) 5161ad43ddacSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5162ad43ddacSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5163ad43ddacSmrg_LT_TAGDECL([], [module_cmds], [2], 5164ad43ddacSmrg [Commands used to build a loadable module if different from building 5165ad43ddacSmrg a shared archive.]) 5166ad43ddacSmrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5167ad43ddacSmrg_LT_TAGDECL([], [with_gnu_ld], [1], 5168ad43ddacSmrg [Whether we are building with GNU ld or not]) 5169ad43ddacSmrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5170ad43ddacSmrg [Flag that allows shared libraries with undefined symbols to be built]) 5171ad43ddacSmrg_LT_TAGDECL([], [no_undefined_flag], [1], 5172ad43ddacSmrg [Flag that enforces no undefined symbols]) 5173ad43ddacSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5174ad43ddacSmrg [Flag to hardcode $libdir into a binary during linking. 5175ad43ddacSmrg This must work even if $libdir does not exist]) 5176ad43ddacSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5177ad43ddacSmrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5178ad43ddacSmrg during linking. This must work even if $libdir does not exist]]) 5179ad43ddacSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5180ad43ddacSmrg [Whether we need a single "-rpath" flag with a separated argument]) 5181ad43ddacSmrg_LT_TAGDECL([], [hardcode_direct], [0], 5182ad43ddacSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5183ad43ddacSmrg DIR into the resulting binary]) 5184ad43ddacSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5185ad43ddacSmrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5186ad43ddacSmrg DIR into the resulting binary and the resulting library dependency is 5187ad43ddacSmrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5188ad43ddacSmrg library is relocated]) 5189ad43ddacSmrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5190ad43ddacSmrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5191ad43ddacSmrg into the resulting binary]) 5192ad43ddacSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5193ad43ddacSmrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5194ad43ddacSmrg into the resulting binary]) 5195ad43ddacSmrg_LT_TAGDECL([], [hardcode_automatic], [0], 5196ad43ddacSmrg [Set to "yes" if building a shared library automatically hardcodes DIR 5197ad43ddacSmrg into the library and all subsequent libraries and executables linked 5198ad43ddacSmrg against it]) 5199ad43ddacSmrg_LT_TAGDECL([], [inherit_rpath], [0], 5200ad43ddacSmrg [Set to yes if linker adds runtime paths of dependent libraries 5201ad43ddacSmrg to runtime path list]) 5202ad43ddacSmrg_LT_TAGDECL([], [link_all_deplibs], [0], 5203ad43ddacSmrg [Whether libtool must link a program against all its dependency libraries]) 5204ad43ddacSmrg_LT_TAGDECL([], [fix_srcfile_path], [1], 5205ad43ddacSmrg [Fix the shell variable $srcfile for the compiler]) 5206ad43ddacSmrg_LT_TAGDECL([], [always_export_symbols], [0], 5207ad43ddacSmrg [Set to "yes" if exported symbols are required]) 5208ad43ddacSmrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5209ad43ddacSmrg [The commands to list exported symbols]) 5210ad43ddacSmrg_LT_TAGDECL([], [exclude_expsyms], [1], 5211ad43ddacSmrg [Symbols that should not be listed in the preloaded symbols]) 5212ad43ddacSmrg_LT_TAGDECL([], [include_expsyms], [1], 5213ad43ddacSmrg [Symbols that must always be exported]) 5214ad43ddacSmrg_LT_TAGDECL([], [prelink_cmds], [2], 5215ad43ddacSmrg [Commands necessary for linking programs (against libraries) with templates]) 5216ad43ddacSmrg_LT_TAGDECL([], [file_list_spec], [1], 5217ad43ddacSmrg [Specify filename containing input files]) 5218ad43ddacSmrgdnl FIXME: Not yet implemented 5219ad43ddacSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5220ad43ddacSmrgdnl [Compiler flag to generate thread safe objects]) 5221ad43ddacSmrg])# _LT_LINKER_SHLIBS 5222ad43ddacSmrg 5223ad43ddacSmrg 5224ad43ddacSmrg# _LT_LANG_C_CONFIG([TAG]) 5225ad43ddacSmrg# ------------------------ 5226ad43ddacSmrg# Ensure that the configuration variables for a C compiler are suitably 5227ad43ddacSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5228ad43ddacSmrg# the compiler configuration to `libtool'. 5229ad43ddacSmrgm4_defun([_LT_LANG_C_CONFIG], 5230ad43ddacSmrg[m4_require([_LT_DECL_EGREP])dnl 5231ad43ddacSmrglt_save_CC="$CC" 5232ad43ddacSmrgAC_LANG_PUSH(C) 5233209ff23fSmrg 5234ad43ddacSmrg# Source file extension for C test sources. 5235ad43ddacSmrgac_ext=c 5236209ff23fSmrg 5237ad43ddacSmrg# Object file extension for compiled C test sources. 5238ad43ddacSmrgobjext=o 5239ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 5240209ff23fSmrg 5241ad43ddacSmrg# Code to be used in simple compile tests 5242ad43ddacSmrglt_simple_compile_test_code="int some_variable = 0;" 5243209ff23fSmrg 5244ad43ddacSmrg# Code to be used in simple link tests 5245ad43ddacSmrglt_simple_link_test_code='int main(){return(0);}' 5246209ff23fSmrg 5247ad43ddacSmrg_LT_TAG_COMPILER 5248ad43ddacSmrg# Save the default compiler, since it gets overwritten when the other 5249ad43ddacSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5250ad43ddacSmrgcompiler_DEFAULT=$CC 5251209ff23fSmrg 5252ad43ddacSmrg# save warnings/boilerplate of simple test code 5253ad43ddacSmrg_LT_COMPILER_BOILERPLATE 5254ad43ddacSmrg_LT_LINKER_BOILERPLATE 5255209ff23fSmrg 5256ad43ddacSmrgif test -n "$compiler"; then 5257ad43ddacSmrg _LT_COMPILER_NO_RTTI($1) 5258ad43ddacSmrg _LT_COMPILER_PIC($1) 5259ad43ddacSmrg _LT_COMPILER_C_O($1) 5260ad43ddacSmrg _LT_COMPILER_FILE_LOCKS($1) 5261ad43ddacSmrg _LT_LINKER_SHLIBS($1) 5262ad43ddacSmrg _LT_SYS_DYNAMIC_LINKER($1) 5263ad43ddacSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 5264ad43ddacSmrg LT_SYS_DLOPEN_SELF 5265ad43ddacSmrg _LT_CMD_STRIPLIB 5266ad43ddacSmrg 5267ad43ddacSmrg # Report which library types will actually be built 5268ad43ddacSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5269ad43ddacSmrg AC_MSG_RESULT([$can_build_shared]) 5270ad43ddacSmrg 5271ad43ddacSmrg AC_MSG_CHECKING([whether to build shared libraries]) 5272ad43ddacSmrg test "$can_build_shared" = "no" && enable_shared=no 5273ad43ddacSmrg 5274ad43ddacSmrg # On AIX, shared libraries and static libraries use the same namespace, and 5275ad43ddacSmrg # are all built from PIC. 5276ad43ddacSmrg case $host_os in 5277ad43ddacSmrg aix3*) 5278ad43ddacSmrg test "$enable_shared" = yes && enable_static=no 5279ad43ddacSmrg if test -n "$RANLIB"; then 5280ad43ddacSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5281ad43ddacSmrg postinstall_cmds='$RANLIB $lib' 5282ad43ddacSmrg fi 5283ad43ddacSmrg ;; 5284209ff23fSmrg 5285ad43ddacSmrg aix[[4-9]]*) 5286ad43ddacSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5287ad43ddacSmrg test "$enable_shared" = yes && enable_static=no 5288ad43ddacSmrg fi 5289ad43ddacSmrg ;; 5290ad43ddacSmrg esac 5291ad43ddacSmrg AC_MSG_RESULT([$enable_shared]) 5292209ff23fSmrg 5293ad43ddacSmrg AC_MSG_CHECKING([whether to build static libraries]) 5294ad43ddacSmrg # Make sure either enable_shared or enable_static is yes. 5295ad43ddacSmrg test "$enable_shared" = yes || enable_static=yes 5296ad43ddacSmrg AC_MSG_RESULT([$enable_static]) 5297209ff23fSmrg 5298ad43ddacSmrg _LT_CONFIG($1) 5299ad43ddacSmrgfi 5300ad43ddacSmrgAC_LANG_POP 5301ad43ddacSmrgCC="$lt_save_CC" 5302ad43ddacSmrg])# _LT_LANG_C_CONFIG 5303209ff23fSmrg 5304209ff23fSmrg 5305ad43ddacSmrg# _LT_PROG_CXX 5306ad43ddacSmrg# ------------ 5307ad43ddacSmrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 5308ad43ddacSmrg# compiler, we have our own version here. 5309ad43ddacSmrgm4_defun([_LT_PROG_CXX], 5310ad43ddacSmrg[ 5311ad43ddacSmrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 5312ad43ddacSmrgAC_PROG_CXX 5313ad43ddacSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5314ad43ddacSmrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5315ad43ddacSmrg (test "X$CXX" != "Xg++"))) ; then 5316ad43ddacSmrg AC_PROG_CXXCPP 5317ad43ddacSmrgelse 5318ad43ddacSmrg _lt_caught_CXX_error=yes 5319ad43ddacSmrgfi 5320ad43ddacSmrgpopdef([AC_MSG_ERROR]) 5321ad43ddacSmrg])# _LT_PROG_CXX 5322209ff23fSmrg 5323ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 5324ad43ddacSmrgdnl AC_DEFUN([_LT_PROG_CXX], []) 5325209ff23fSmrg 5326209ff23fSmrg 5327ad43ddacSmrg# _LT_LANG_CXX_CONFIG([TAG]) 5328ad43ddacSmrg# -------------------------- 5329ad43ddacSmrg# Ensure that the configuration variables for a C++ compiler are suitably 5330ad43ddacSmrg# defined. These variables are subsequently used by _LT_CONFIG to write 5331ad43ddacSmrg# the compiler configuration to `libtool'. 5332ad43ddacSmrgm4_defun([_LT_LANG_CXX_CONFIG], 5333ad43ddacSmrg[AC_REQUIRE([_LT_PROG_CXX])dnl 5334ad43ddacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5335ad43ddacSmrgm4_require([_LT_DECL_EGREP])dnl 5336ad43ddacSmrg 5337ad43ddacSmrgAC_LANG_PUSH(C++) 5338ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5339ad43ddacSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 5340ad43ddacSmrg_LT_TAGVAR(always_export_symbols, $1)=no 5341ad43ddacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5342ad43ddacSmrg_LT_TAGVAR(compiler_needs_object, $1)=no 5343ad43ddacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5344ad43ddacSmrg_LT_TAGVAR(hardcode_direct, $1)=no 5345ad43ddacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5346ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5347ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5348ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5349ad43ddacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5350ad43ddacSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5351ad43ddacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 5352ad43ddacSmrg_LT_TAGVAR(inherit_rpath, $1)=no 5353ad43ddacSmrg_LT_TAGVAR(module_cmds, $1)= 5354ad43ddacSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 5355ad43ddacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5356ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5357ad43ddacSmrg_LT_TAGVAR(no_undefined_flag, $1)= 5358ad43ddacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5359ad43ddacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5360209ff23fSmrg 5361ad43ddacSmrg# Source file extension for C++ test sources. 5362ad43ddacSmrgac_ext=cpp 5363209ff23fSmrg 5364ad43ddacSmrg# Object file extension for compiled C++ test sources. 5365ad43ddacSmrgobjext=o 5366ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 5367ad43ddacSmrg 5368ad43ddacSmrg# No sense in running all these tests if we already determined that 5369ad43ddacSmrg# the CXX compiler isn't working. Some variables (like enable_shared) 5370ad43ddacSmrg# are currently assumed to apply to all compilers on this platform, 5371ad43ddacSmrg# and will be corrupted by setting them based on a non-working compiler. 5372ad43ddacSmrgif test "$_lt_caught_CXX_error" != yes; then 5373ad43ddacSmrg # Code to be used in simple compile tests 5374ad43ddacSmrg lt_simple_compile_test_code="int some_variable = 0;" 5375ad43ddacSmrg 5376ad43ddacSmrg # Code to be used in simple link tests 5377ad43ddacSmrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5378ad43ddacSmrg 5379ad43ddacSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5380ad43ddacSmrg _LT_TAG_COMPILER 5381ad43ddacSmrg 5382ad43ddacSmrg # save warnings/boilerplate of simple test code 5383ad43ddacSmrg _LT_COMPILER_BOILERPLATE 5384ad43ddacSmrg _LT_LINKER_BOILERPLATE 5385ad43ddacSmrg 5386ad43ddacSmrg # Allow CC to be a program name with arguments. 5387ad43ddacSmrg lt_save_CC=$CC 5388ad43ddacSmrg lt_save_LD=$LD 5389ad43ddacSmrg lt_save_GCC=$GCC 5390ad43ddacSmrg GCC=$GXX 5391ad43ddacSmrg lt_save_with_gnu_ld=$with_gnu_ld 5392ad43ddacSmrg lt_save_path_LD=$lt_cv_path_LD 5393ad43ddacSmrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5394ad43ddacSmrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5395ad43ddacSmrg else 5396ad43ddacSmrg $as_unset lt_cv_prog_gnu_ld 5397ad43ddacSmrg fi 5398ad43ddacSmrg if test -n "${lt_cv_path_LDCXX+set}"; then 5399ad43ddacSmrg lt_cv_path_LD=$lt_cv_path_LDCXX 5400ad43ddacSmrg else 5401ad43ddacSmrg $as_unset lt_cv_path_LD 5402ad43ddacSmrg fi 5403ad43ddacSmrg test -z "${LDCXX+set}" || LD=$LDCXX 5404ad43ddacSmrg CC=${CXX-"c++"} 5405ad43ddacSmrg compiler=$CC 5406ad43ddacSmrg _LT_TAGVAR(compiler, $1)=$CC 5407ad43ddacSmrg _LT_CC_BASENAME([$compiler]) 5408209ff23fSmrg 5409ad43ddacSmrg if test -n "$compiler"; then 5410ad43ddacSmrg # We don't want -fno-exception when compiling C++ code, so set the 5411ad43ddacSmrg # no_builtin_flag separately 5412ad43ddacSmrg if test "$GXX" = yes; then 5413ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5414ad43ddacSmrg else 5415ad43ddacSmrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5416ad43ddacSmrg fi 5417209ff23fSmrg 5418ad43ddacSmrg if test "$GXX" = yes; then 5419ad43ddacSmrg # Set up default GNU C++ configuration 5420209ff23fSmrg 5421ad43ddacSmrg LT_PATH_LD 5422209ff23fSmrg 5423ad43ddacSmrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5424ad43ddacSmrg # archiving commands below assume that GNU ld is being used. 5425ad43ddacSmrg if test "$with_gnu_ld" = yes; then 5426ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5427ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' 5428209ff23fSmrg 5429ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5430ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5431209ff23fSmrg 5432ad43ddacSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 5433ad43ddacSmrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5434ad43ddacSmrg # investigate it a little bit more. (MM) 5435ad43ddacSmrg wlarc='${wl}' 5436209ff23fSmrg 5437ad43ddacSmrg # ancient GNU ld didn't support --whole-archive et. al. 5438ad43ddacSmrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5439ad43ddacSmrg $GREP 'no-whole-archive' > /dev/null; then 5440ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5441ad43ddacSmrg else 5442ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5443ad43ddacSmrg fi 5444ad43ddacSmrg else 5445ad43ddacSmrg with_gnu_ld=no 5446ad43ddacSmrg wlarc= 5447ad43ddacSmrg 5448ad43ddacSmrg # A generic and very simple default shared library creation 5449ad43ddacSmrg # command for GNU C++ for the case where it uses the native 5450ad43ddacSmrg # linker, instead of GNU ld. If possible, this setting should 5451ad43ddacSmrg # overridden to take advantage of the native linker features on 5452ad43ddacSmrg # the platform it is being used on. 5453ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5454ad43ddacSmrg fi 5455209ff23fSmrg 5456ad43ddacSmrg # Commands to make compiler produce verbose output that lists 5457ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 5458ad43ddacSmrg # linking a shared library. 5459ad43ddacSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 5460209ff23fSmrg 5461ad43ddacSmrg else 5462ad43ddacSmrg GXX=no 5463ad43ddacSmrg with_gnu_ld=no 5464ad43ddacSmrg wlarc= 5465ad43ddacSmrg fi 5466209ff23fSmrg 5467ad43ddacSmrg # PORTME: fill in a description of your system's C++ link characteristics 5468ad43ddacSmrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5469ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5470ad43ddacSmrg case $host_os in 5471ad43ddacSmrg aix3*) 5472ad43ddacSmrg # FIXME: insert proper C++ library support 5473ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5474ad43ddacSmrg ;; 5475ad43ddacSmrg aix[[4-9]]*) 5476ad43ddacSmrg if test "$host_cpu" = ia64; then 5477ad43ddacSmrg # On IA64, the linker does run time linking by default, so we don't 5478ad43ddacSmrg # have to do anything special. 5479ad43ddacSmrg aix_use_runtimelinking=no 5480ad43ddacSmrg exp_sym_flag='-Bexport' 5481ad43ddacSmrg no_entry_flag="" 5482ad43ddacSmrg else 5483ad43ddacSmrg aix_use_runtimelinking=no 5484ad43ddacSmrg 5485ad43ddacSmrg # Test if we are trying to use run time linking or normal 5486ad43ddacSmrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5487ad43ddacSmrg # need to do runtime linking. 5488ad43ddacSmrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5489ad43ddacSmrg for ld_flag in $LDFLAGS; do 5490ad43ddacSmrg case $ld_flag in 5491ad43ddacSmrg *-brtl*) 5492ad43ddacSmrg aix_use_runtimelinking=yes 5493ad43ddacSmrg break 5494ad43ddacSmrg ;; 5495ad43ddacSmrg esac 5496ad43ddacSmrg done 5497ad43ddacSmrg ;; 5498ad43ddacSmrg esac 5499209ff23fSmrg 5500ad43ddacSmrg exp_sym_flag='-bexport' 5501ad43ddacSmrg no_entry_flag='-bnoentry' 5502ad43ddacSmrg fi 5503209ff23fSmrg 5504ad43ddacSmrg # When large executables or shared objects are built, AIX ld can 5505ad43ddacSmrg # have problems creating the table of contents. If linking a library 5506ad43ddacSmrg # or program results in "error TOC overflow" add -mminimal-toc to 5507ad43ddacSmrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5508ad43ddacSmrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5509ad43ddacSmrg 5510ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='' 5511ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5512ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5513ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5514ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5515ad43ddacSmrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5516ad43ddacSmrg 5517ad43ddacSmrg if test "$GXX" = yes; then 5518ad43ddacSmrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5519ad43ddacSmrg # We only want to do this on AIX 4.2 and lower, the check 5520ad43ddacSmrg # below for broken collect2 doesn't work under 4.3+ 5521ad43ddacSmrg collect2name=`${CC} -print-prog-name=collect2` 5522ad43ddacSmrg if test -f "$collect2name" && 5523ad43ddacSmrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5524ad43ddacSmrg then 5525ad43ddacSmrg # We have reworked collect2 5526ad43ddacSmrg : 5527ad43ddacSmrg else 5528ad43ddacSmrg # We have old collect2 5529ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5530ad43ddacSmrg # It fails to find uninstalled libraries when the uninstalled 5531ad43ddacSmrg # path is not listed in the libpath. Setting hardcode_minus_L 5532ad43ddacSmrg # to unsupported forces relinking 5533ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5534ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5535ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5536ad43ddacSmrg fi 5537ad43ddacSmrg esac 5538ad43ddacSmrg shared_flag='-shared' 5539ad43ddacSmrg if test "$aix_use_runtimelinking" = yes; then 5540ad43ddacSmrg shared_flag="$shared_flag "'${wl}-G' 5541ad43ddacSmrg fi 5542ad43ddacSmrg else 5543ad43ddacSmrg # not using gcc 5544ad43ddacSmrg if test "$host_cpu" = ia64; then 5545ad43ddacSmrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5546ad43ddacSmrg # chokes on -Wl,-G. The following line is correct: 5547ad43ddacSmrg shared_flag='-G' 5548ad43ddacSmrg else 5549ad43ddacSmrg if test "$aix_use_runtimelinking" = yes; then 5550ad43ddacSmrg shared_flag='${wl}-G' 5551ad43ddacSmrg else 5552ad43ddacSmrg shared_flag='${wl}-bM:SRE' 5553ad43ddacSmrg fi 5554ad43ddacSmrg fi 5555ad43ddacSmrg fi 5556209ff23fSmrg 5557ad43ddacSmrg # It seems that -bexpall does not export symbols beginning with 5558ad43ddacSmrg # underscore (_), so it is better to generate a list of symbols to 5559ad43ddacSmrg # export. 5560ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=yes 5561ad43ddacSmrg if test "$aix_use_runtimelinking" = yes; then 5562ad43ddacSmrg # Warning - without using the other runtime loading flags (-brtl), 5563ad43ddacSmrg # -berok will link without error, but may produce a broken library. 5564ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5565ad43ddacSmrg # Determine the default libpath from the value encoded in an empty 5566ad43ddacSmrg # executable. 5567ad43ddacSmrg _LT_SYS_MODULE_PATH_AIX 5568ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5569ad43ddacSmrg 5570ad43ddacSmrg _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 $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" 5571ad43ddacSmrg else 5572ad43ddacSmrg if test "$host_cpu" = ia64; then 5573ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5574ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5575ad43ddacSmrg _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" 5576ad43ddacSmrg else 5577ad43ddacSmrg # Determine the default libpath from the value encoded in an 5578ad43ddacSmrg # empty executable. 5579ad43ddacSmrg _LT_SYS_MODULE_PATH_AIX 5580ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5581ad43ddacSmrg # Warning - without using the other run time loading flags, 5582ad43ddacSmrg # -berok will link without error, but may produce a broken library. 5583ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5584ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5585ad43ddacSmrg # Exported symbols can be pulled into shared objects from archives 5586ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5587ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5588ad43ddacSmrg # This is similar to how AIX traditionally builds its shared 5589ad43ddacSmrg # libraries. 5590ad43ddacSmrg _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' 5591ad43ddacSmrg fi 5592ad43ddacSmrg fi 5593ad43ddacSmrg ;; 5594209ff23fSmrg 5595ad43ddacSmrg beos*) 5596ad43ddacSmrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5597ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5598ad43ddacSmrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5599ad43ddacSmrg # support --undefined. This deserves some investigation. FIXME 5600ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5601ad43ddacSmrg else 5602ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5603ad43ddacSmrg fi 5604ad43ddacSmrg ;; 5605209ff23fSmrg 5606ad43ddacSmrg chorus*) 5607ad43ddacSmrg case $cc_basename in 5608ad43ddacSmrg *) 5609ad43ddacSmrg # FIXME: insert proper C++ library support 5610ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5611ad43ddacSmrg ;; 5612ad43ddacSmrg esac 5613ad43ddacSmrg ;; 5614209ff23fSmrg 5615ad43ddacSmrg cygwin* | mingw* | pw32*) 5616ad43ddacSmrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5617ad43ddacSmrg # as there is no search path for DLLs. 5618ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5619ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5620ad43ddacSmrg _LT_TAGVAR(always_export_symbols, $1)=no 5621ad43ddacSmrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5622ad43ddacSmrg 5623ad43ddacSmrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5624ad43ddacSmrg _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' 5625ad43ddacSmrg # If the export-symbols file already is a .def file (1st line 5626ad43ddacSmrg # is EXPORTS), use it as is; otherwise, prepend... 5627ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5628ad43ddacSmrg cp $export_symbols $output_objdir/$soname.def; 5629ad43ddacSmrg else 5630ad43ddacSmrg echo EXPORTS > $output_objdir/$soname.def; 5631ad43ddacSmrg cat $export_symbols >> $output_objdir/$soname.def; 5632ad43ddacSmrg fi~ 5633ad43ddacSmrg $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' 5634ad43ddacSmrg else 5635ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5636ad43ddacSmrg fi 5637ad43ddacSmrg ;; 5638ad43ddacSmrg darwin* | rhapsody*) 5639ad43ddacSmrg _LT_DARWIN_LINKER_FEATURES($1) 5640ad43ddacSmrg ;; 5641209ff23fSmrg 5642ad43ddacSmrg dgux*) 5643ad43ddacSmrg case $cc_basename in 5644ad43ddacSmrg ec++*) 5645ad43ddacSmrg # FIXME: insert proper C++ library support 5646ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5647ad43ddacSmrg ;; 5648ad43ddacSmrg ghcx*) 5649ad43ddacSmrg # Green Hills C++ Compiler 5650ad43ddacSmrg # FIXME: insert proper C++ library support 5651ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5652ad43ddacSmrg ;; 5653ad43ddacSmrg *) 5654ad43ddacSmrg # FIXME: insert proper C++ library support 5655ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5656ad43ddacSmrg ;; 5657ad43ddacSmrg esac 5658ad43ddacSmrg ;; 5659209ff23fSmrg 5660ad43ddacSmrg freebsd[[12]]*) 5661ad43ddacSmrg # C++ shared libraries reported to be fairly broken before 5662ad43ddacSmrg # switch to ELF 5663ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5664ad43ddacSmrg ;; 5665209ff23fSmrg 5666ad43ddacSmrg freebsd-elf*) 5667ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5668ad43ddacSmrg ;; 5669209ff23fSmrg 5670ad43ddacSmrg freebsd* | dragonfly*) 5671ad43ddacSmrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5672ad43ddacSmrg # conventions 5673ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 5674ad43ddacSmrg ;; 5675209ff23fSmrg 5676ad43ddacSmrg gnu*) 5677ad43ddacSmrg ;; 5678209ff23fSmrg 5679ad43ddacSmrg hpux9*) 5680ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5681ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5682ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5683ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5684ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5685ad43ddacSmrg # but as the default 5686ad43ddacSmrg # location of the library. 5687ad43ddacSmrg 5688ad43ddacSmrg case $cc_basename in 5689ad43ddacSmrg CC*) 5690ad43ddacSmrg # FIXME: insert proper C++ library support 5691ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5692ad43ddacSmrg ;; 5693ad43ddacSmrg aCC*) 5694ad43ddacSmrg _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' 5695ad43ddacSmrg # Commands to make compiler produce verbose output that lists 5696ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 5697ad43ddacSmrg # linking a shared library. 5698ad43ddacSmrg # 5699ad43ddacSmrg # There doesn't appear to be a way to prevent this compiler from 5700ad43ddacSmrg # explicitly linking system object files so we need to strip them 5701ad43ddacSmrg # from the output so that they don't get included in the library 5702ad43ddacSmrg # dependencies. 5703ad43ddacSmrg 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; $ECHO "X$list" | $Xsed' 5704ad43ddacSmrg ;; 5705ad43ddacSmrg *) 5706ad43ddacSmrg if test "$GXX" = yes; then 5707ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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' 5708ad43ddacSmrg else 5709ad43ddacSmrg # FIXME: insert proper C++ library support 5710ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5711ad43ddacSmrg fi 5712ad43ddacSmrg ;; 5713ad43ddacSmrg esac 5714ad43ddacSmrg ;; 5715209ff23fSmrg 5716ad43ddacSmrg hpux10*|hpux11*) 5717ad43ddacSmrg if test $with_gnu_ld = no; then 5718ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5719ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5720ad43ddacSmrg 5721ad43ddacSmrg case $host_cpu in 5722ad43ddacSmrg hppa*64*|ia64*) 5723ad43ddacSmrg ;; 5724ad43ddacSmrg *) 5725ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5726ad43ddacSmrg ;; 5727ad43ddacSmrg esac 5728ad43ddacSmrg fi 5729ad43ddacSmrg case $host_cpu in 5730ad43ddacSmrg hppa*64*|ia64*) 5731ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5732ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5733ad43ddacSmrg ;; 5734ad43ddacSmrg *) 5735ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 5736ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5737ad43ddacSmrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5738ad43ddacSmrg # but as the default 5739ad43ddacSmrg # location of the library. 5740ad43ddacSmrg ;; 5741ad43ddacSmrg esac 5742ad43ddacSmrg 5743ad43ddacSmrg case $cc_basename in 5744ad43ddacSmrg CC*) 5745ad43ddacSmrg # FIXME: insert proper C++ library support 5746ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5747ad43ddacSmrg ;; 5748ad43ddacSmrg aCC*) 5749ad43ddacSmrg case $host_cpu in 5750ad43ddacSmrg hppa*64*) 5751ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5752ad43ddacSmrg ;; 5753ad43ddacSmrg ia64*) 5754ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5755ad43ddacSmrg ;; 5756ad43ddacSmrg *) 5757ad43ddacSmrg _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' 5758ad43ddacSmrg ;; 5759ad43ddacSmrg esac 5760ad43ddacSmrg # Commands to make compiler produce verbose output that lists 5761ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 5762ad43ddacSmrg # linking a shared library. 5763ad43ddacSmrg # 5764ad43ddacSmrg # There doesn't appear to be a way to prevent this compiler from 5765ad43ddacSmrg # explicitly linking system object files so we need to strip them 5766ad43ddacSmrg # from the output so that they don't get included in the library 5767ad43ddacSmrg # dependencies. 5768ad43ddacSmrg 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; $ECHO "X$list" | $Xsed' 5769ad43ddacSmrg ;; 5770ad43ddacSmrg *) 5771ad43ddacSmrg if test "$GXX" = yes; then 5772ad43ddacSmrg if test $with_gnu_ld = no; then 5773ad43ddacSmrg case $host_cpu in 5774ad43ddacSmrg hppa*64*) 5775ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5776ad43ddacSmrg ;; 5777ad43ddacSmrg ia64*) 5778ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5779ad43ddacSmrg ;; 5780ad43ddacSmrg *) 5781ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5782ad43ddacSmrg ;; 5783ad43ddacSmrg esac 5784ad43ddacSmrg fi 5785ad43ddacSmrg else 5786ad43ddacSmrg # FIXME: insert proper C++ library support 5787ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5788ad43ddacSmrg fi 5789ad43ddacSmrg ;; 5790ad43ddacSmrg esac 5791ad43ddacSmrg ;; 5792209ff23fSmrg 5793ad43ddacSmrg interix[[3-9]]*) 5794ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=no 5795ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5796ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5797ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5798ad43ddacSmrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5799ad43ddacSmrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5800ad43ddacSmrg # default) and relocated if they conflict, which is a slow very memory 5801ad43ddacSmrg # consuming and fragmenting process. To avoid this, we pick a random, 5802ad43ddacSmrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5803ad43ddacSmrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5804ad43ddacSmrg _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' 5805ad43ddacSmrg _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' 5806ad43ddacSmrg ;; 5807ad43ddacSmrg irix5* | irix6*) 5808ad43ddacSmrg case $cc_basename in 5809ad43ddacSmrg CC*) 5810ad43ddacSmrg # SGI C++ 5811ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 5812ad43ddacSmrg 5813ad43ddacSmrg # Archives containing C++ object files must be created using 5814ad43ddacSmrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5815ad43ddacSmrg # necessary to make sure instantiated templates are included 5816ad43ddacSmrg # in the archive. 5817ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5818ad43ddacSmrg ;; 5819ad43ddacSmrg *) 5820ad43ddacSmrg if test "$GXX" = yes; then 5821ad43ddacSmrg if test "$with_gnu_ld" = no; then 5822ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 5823ad43ddacSmrg else 5824ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' 5825ad43ddacSmrg fi 5826ad43ddacSmrg fi 5827ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5828ad43ddacSmrg ;; 5829ad43ddacSmrg esac 5830ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5831ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5832ad43ddacSmrg _LT_TAGVAR(inherit_rpath, $1)=yes 5833ad43ddacSmrg ;; 5834209ff23fSmrg 5835ad43ddacSmrg linux* | k*bsd*-gnu) 5836ad43ddacSmrg case $cc_basename in 5837ad43ddacSmrg KCC*) 5838ad43ddacSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5839ad43ddacSmrg 5840ad43ddacSmrg # KCC will only create a shared library if the output file 5841ad43ddacSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5842ad43ddacSmrg # to its proper name (with version) after linking. 5843ad43ddacSmrg _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' 5844ad43ddacSmrg _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' 5845ad43ddacSmrg # Commands to make compiler produce verbose output that lists 5846ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 5847ad43ddacSmrg # linking a shared library. 5848ad43ddacSmrg # 5849ad43ddacSmrg # There doesn't appear to be a way to prevent this compiler from 5850ad43ddacSmrg # explicitly linking system object files so we need to strip them 5851ad43ddacSmrg # from the output so that they don't get included in the library 5852ad43ddacSmrg # dependencies. 5853ad43ddacSmrg 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; $ECHO "X$list" | $Xsed' 5854ad43ddacSmrg 5855ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5856ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5857ad43ddacSmrg 5858ad43ddacSmrg # Archives containing C++ object files must be created using 5859ad43ddacSmrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5860ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5861ad43ddacSmrg ;; 5862ad43ddacSmrg icpc* | ecpc* ) 5863ad43ddacSmrg # Intel C++ 5864ad43ddacSmrg with_gnu_ld=yes 5865ad43ddacSmrg # version 8.0 and above of icpc choke on multiply defined symbols 5866ad43ddacSmrg # if we add $predep_objects and $postdep_objects, however 7.1 and 5867ad43ddacSmrg # earlier do not add the objects themselves. 5868ad43ddacSmrg case `$CC -V 2>&1` in 5869ad43ddacSmrg *"Version 7."*) 5870ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5871ad43ddacSmrg _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' 5872ad43ddacSmrg ;; 5873ad43ddacSmrg *) # Version 8.0 or newer 5874ad43ddacSmrg tmp_idyn= 5875ad43ddacSmrg case $host_cpu in 5876ad43ddacSmrg ia64*) tmp_idyn=' -i_dynamic';; 5877ad43ddacSmrg esac 5878ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5879ad43ddacSmrg _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' 5880ad43ddacSmrg ;; 5881ad43ddacSmrg esac 5882ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5883ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5884ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5885ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5886ad43ddacSmrg ;; 5887ad43ddacSmrg pgCC* | pgcpp*) 5888ad43ddacSmrg # Portland Group C++ compiler 5889ad43ddacSmrg case `$CC -V` in 5890ad43ddacSmrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 5891ad43ddacSmrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 5892ad43ddacSmrg rm -rf $tpldir~ 5893ad43ddacSmrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 5894ad43ddacSmrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 5895ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 5896ad43ddacSmrg rm -rf $tpldir~ 5897ad43ddacSmrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 5898ad43ddacSmrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 5899ad43ddacSmrg $RANLIB $oldlib' 5900ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 5901ad43ddacSmrg rm -rf $tpldir~ 5902ad43ddacSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5903ad43ddacSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5904ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 5905ad43ddacSmrg rm -rf $tpldir~ 5906ad43ddacSmrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5907ad43ddacSmrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' 5908ad43ddacSmrg ;; 5909ad43ddacSmrg *) # Version 6 will use weak symbols 5910ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5911ad43ddacSmrg _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' 5912ad43ddacSmrg ;; 5913ad43ddacSmrg esac 5914209ff23fSmrg 5915ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5916ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5917ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 5918ad43ddacSmrg ;; 5919ad43ddacSmrg cxx*) 5920ad43ddacSmrg # Compaq C++ 5921ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5922ad43ddacSmrg _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' 5923209ff23fSmrg 5924ad43ddacSmrg runpath_var=LD_RUN_PATH 5925ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5926ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5927209ff23fSmrg 5928ad43ddacSmrg # Commands to make compiler produce verbose output that lists 5929ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 5930ad43ddacSmrg # linking a shared library. 5931ad43ddacSmrg # 5932ad43ddacSmrg # There doesn't appear to be a way to prevent this compiler from 5933ad43ddacSmrg # explicitly linking system object files so we need to strip them 5934ad43ddacSmrg # from the output so that they don't get included in the library 5935ad43ddacSmrg # dependencies. 5936ad43ddacSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 5937ad43ddacSmrg ;; 5938ad43ddacSmrg xl*) 5939ad43ddacSmrg # IBM XL 8.0 on PPC, with GNU ld 5940ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5941ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5942ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5943ad43ddacSmrg if test "x$supports_anon_versioning" = xyes; then 5944ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5945ad43ddacSmrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5946ad43ddacSmrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5947ad43ddacSmrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5948ad43ddacSmrg fi 5949ad43ddacSmrg ;; 5950ad43ddacSmrg *) 5951ad43ddacSmrg case `$CC -V 2>&1 | sed 5q` in 5952ad43ddacSmrg *Sun\ C*) 5953ad43ddacSmrg # Sun C++ 5.9 5954ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 5955ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5956ad43ddacSmrg _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' 5957ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5958ad43ddacSmrg _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; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' 5959ad43ddacSmrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5960ad43ddacSmrg 5961ad43ddacSmrg # Not sure whether something based on 5962ad43ddacSmrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 5963ad43ddacSmrg # would be better. 5964ad43ddacSmrg output_verbose_link_cmd='echo' 5965ad43ddacSmrg 5966ad43ddacSmrg # Archives containing C++ object files must be created using 5967ad43ddacSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 5968ad43ddacSmrg # necessary to make sure instantiated templates are included 5969ad43ddacSmrg # in the archive. 5970ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 5971ad43ddacSmrg ;; 5972ad43ddacSmrg esac 5973ad43ddacSmrg ;; 5974ad43ddacSmrg esac 5975ad43ddacSmrg ;; 5976209ff23fSmrg 5977ad43ddacSmrg lynxos*) 5978ad43ddacSmrg # FIXME: insert proper C++ library support 5979ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5980ad43ddacSmrg ;; 5981209ff23fSmrg 5982ad43ddacSmrg m88k*) 5983ad43ddacSmrg # FIXME: insert proper C++ library support 5984ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5985ad43ddacSmrg ;; 5986209ff23fSmrg 5987ad43ddacSmrg mvs*) 5988ad43ddacSmrg case $cc_basename in 5989ad43ddacSmrg cxx*) 5990ad43ddacSmrg # FIXME: insert proper C++ library support 5991ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5992ad43ddacSmrg ;; 5993ad43ddacSmrg *) 5994ad43ddacSmrg # FIXME: insert proper C++ library support 5995ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 5996ad43ddacSmrg ;; 5997ad43ddacSmrg esac 5998ad43ddacSmrg ;; 5999209ff23fSmrg 6000ad43ddacSmrg netbsd*) 6001ad43ddacSmrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6002ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6003ad43ddacSmrg wlarc= 6004ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6005ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6006ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6007ad43ddacSmrg fi 6008ad43ddacSmrg # Workaround some broken pre-1.5 toolchains 6009ad43ddacSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6010ad43ddacSmrg ;; 6011209ff23fSmrg 6012ad43ddacSmrg *nto* | *qnx*) 6013ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=yes 6014ad43ddacSmrg ;; 6015209ff23fSmrg 6016ad43ddacSmrg openbsd2*) 6017ad43ddacSmrg # C++ shared libraries are fairly broken 6018ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6019ad43ddacSmrg ;; 6020209ff23fSmrg 6021ad43ddacSmrg openbsd*) 6022ad43ddacSmrg if test -f /usr/libexec/ld.so; then 6023ad43ddacSmrg _LT_TAGVAR(hardcode_direct, $1)=yes 6024ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6025ad43ddacSmrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6026ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6027ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6028ad43ddacSmrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6029ad43ddacSmrg _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' 6030ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6031ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6032ad43ddacSmrg fi 6033ad43ddacSmrg output_verbose_link_cmd=echo 6034ad43ddacSmrg else 6035ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6036ad43ddacSmrg fi 6037ad43ddacSmrg ;; 6038209ff23fSmrg 6039ad43ddacSmrg osf3* | osf4* | osf5*) 6040ad43ddacSmrg case $cc_basename in 6041ad43ddacSmrg KCC*) 6042ad43ddacSmrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6043ad43ddacSmrg 6044ad43ddacSmrg # KCC will only create a shared library if the output file 6045ad43ddacSmrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6046ad43ddacSmrg # to its proper name (with version) after linking. 6047ad43ddacSmrg _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' 6048ad43ddacSmrg 6049ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6050ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6051ad43ddacSmrg 6052ad43ddacSmrg # Archives containing C++ object files must be created using 6053ad43ddacSmrg # the KAI C++ compiler. 6054ad43ddacSmrg case $host in 6055ad43ddacSmrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6056ad43ddacSmrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6057ad43ddacSmrg esac 6058ad43ddacSmrg ;; 6059ad43ddacSmrg RCC*) 6060ad43ddacSmrg # Rational C++ 2.4.1 6061ad43ddacSmrg # FIXME: insert proper C++ library support 6062ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6063ad43ddacSmrg ;; 6064ad43ddacSmrg cxx*) 6065ad43ddacSmrg case $host in 6066ad43ddacSmrg osf3*) 6067ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6068ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 6069ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6070ad43ddacSmrg ;; 6071ad43ddacSmrg *) 6072ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6073ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' 6074ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6075ad43ddacSmrg echo "-hidden">> $lib.exp~ 6076ad43ddacSmrg $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 "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ 6077ad43ddacSmrg $RM $lib.exp' 6078ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6079ad43ddacSmrg ;; 6080ad43ddacSmrg esac 6081209ff23fSmrg 6082ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6083209ff23fSmrg 6084ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6085ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6086ad43ddacSmrg # linking a shared library. 6087ad43ddacSmrg # 6088ad43ddacSmrg # There doesn't appear to be a way to prevent this compiler from 6089ad43ddacSmrg # explicitly linking system object files so we need to strip them 6090ad43ddacSmrg # from the output so that they don't get included in the library 6091ad43ddacSmrg # dependencies. 6092ad43ddacSmrg output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' 6093ad43ddacSmrg ;; 6094ad43ddacSmrg *) 6095ad43ddacSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6096ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6097ad43ddacSmrg case $host in 6098ad43ddacSmrg osf3*) 6099ad43ddacSmrg _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" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6100ad43ddacSmrg ;; 6101ad43ddacSmrg *) 6102ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' 6103ad43ddacSmrg ;; 6104ad43ddacSmrg esac 6105ad43ddacSmrg 6106ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6107ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6108ad43ddacSmrg 6109ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6110ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6111ad43ddacSmrg # linking a shared library. 6112ad43ddacSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6113ad43ddacSmrg 6114ad43ddacSmrg else 6115ad43ddacSmrg # FIXME: insert proper C++ library support 6116ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6117ad43ddacSmrg fi 6118ad43ddacSmrg ;; 6119ad43ddacSmrg esac 6120ad43ddacSmrg ;; 6121209ff23fSmrg 6122ad43ddacSmrg psos*) 6123ad43ddacSmrg # FIXME: insert proper C++ library support 6124ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6125ad43ddacSmrg ;; 6126209ff23fSmrg 6127ad43ddacSmrg sunos4*) 6128ad43ddacSmrg case $cc_basename in 6129ad43ddacSmrg CC*) 6130ad43ddacSmrg # Sun C++ 4.x 6131ad43ddacSmrg # FIXME: insert proper C++ library support 6132ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6133ad43ddacSmrg ;; 6134ad43ddacSmrg lcc*) 6135ad43ddacSmrg # Lucid 6136ad43ddacSmrg # FIXME: insert proper C++ library support 6137ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6138ad43ddacSmrg ;; 6139ad43ddacSmrg *) 6140ad43ddacSmrg # FIXME: insert proper C++ library support 6141ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6142ad43ddacSmrg ;; 6143ad43ddacSmrg esac 6144ad43ddacSmrg ;; 6145209ff23fSmrg 6146ad43ddacSmrg solaris*) 6147ad43ddacSmrg case $cc_basename in 6148ad43ddacSmrg CC*) 6149ad43ddacSmrg # Sun C++ 4.2, 5.x and Centerline C++ 6150ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6151ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6152ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6153ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6154ad43ddacSmrg $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' 6155ad43ddacSmrg 6156ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6157ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6158ad43ddacSmrg case $host_os in 6159ad43ddacSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6160ad43ddacSmrg *) 6161ad43ddacSmrg # The compiler driver will combine and reorder linker options, 6162ad43ddacSmrg # but understands `-z linker_flag'. 6163ad43ddacSmrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6164ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6165ad43ddacSmrg ;; 6166ad43ddacSmrg esac 6167ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6168209ff23fSmrg 6169ad43ddacSmrg output_verbose_link_cmd='echo' 6170209ff23fSmrg 6171ad43ddacSmrg # Archives containing C++ object files must be created using 6172ad43ddacSmrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6173ad43ddacSmrg # necessary to make sure instantiated templates are included 6174ad43ddacSmrg # in the archive. 6175ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6176ad43ddacSmrg ;; 6177ad43ddacSmrg gcx*) 6178ad43ddacSmrg # Green Hills C++ Compiler 6179ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6180209ff23fSmrg 6181ad43ddacSmrg # The C++ compiler must be used to create the archive. 6182ad43ddacSmrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6183ad43ddacSmrg ;; 6184ad43ddacSmrg *) 6185ad43ddacSmrg # GNU C++ compiler with Solaris linker 6186ad43ddacSmrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6187ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6188ad43ddacSmrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6189ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6190ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6191ad43ddacSmrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6192ad43ddacSmrg 6193ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6194ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6195ad43ddacSmrg # linking a shared library. 6196ad43ddacSmrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6197ad43ddacSmrg else 6198ad43ddacSmrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6199ad43ddacSmrg # platform. 6200ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6201ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6202ad43ddacSmrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6203ad43ddacSmrg 6204ad43ddacSmrg # Commands to make compiler produce verbose output that lists 6205ad43ddacSmrg # what "hidden" libraries, object files and flags are used when 6206ad43ddacSmrg # linking a shared library. 6207ad43ddacSmrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6208ad43ddacSmrg fi 6209ad43ddacSmrg 6210ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6211ad43ddacSmrg case $host_os in 6212ad43ddacSmrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6213ad43ddacSmrg *) 6214ad43ddacSmrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6215ad43ddacSmrg ;; 6216ad43ddacSmrg esac 6217ad43ddacSmrg fi 6218ad43ddacSmrg ;; 6219ad43ddacSmrg esac 6220ad43ddacSmrg ;; 6221209ff23fSmrg 6222ad43ddacSmrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6223ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6224ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6225ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6226ad43ddacSmrg runpath_var='LD_RUN_PATH' 6227209ff23fSmrg 6228ad43ddacSmrg case $cc_basename in 6229ad43ddacSmrg CC*) 6230ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6231ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6232ad43ddacSmrg ;; 6233ad43ddacSmrg *) 6234ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6235ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6236ad43ddacSmrg ;; 6237ad43ddacSmrg esac 6238ad43ddacSmrg ;; 6239209ff23fSmrg 6240ad43ddacSmrg sysv5* | sco3.2v5* | sco5v6*) 6241ad43ddacSmrg # Note: We can NOT use -z defs as we might desire, because we do not 6242ad43ddacSmrg # link with -lc, and that would cause any symbols used from libc to 6243ad43ddacSmrg # always be unresolved, which means just about no library would 6244ad43ddacSmrg # ever link correctly. If we're not using GNU ld we use -z text 6245ad43ddacSmrg # though, which does catch some bad symbols but isn't as heavy-handed 6246ad43ddacSmrg # as -z defs. 6247ad43ddacSmrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6248ad43ddacSmrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6249ad43ddacSmrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6250ad43ddacSmrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6251ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6252ad43ddacSmrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6253ad43ddacSmrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6254ad43ddacSmrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6255ad43ddacSmrg runpath_var='LD_RUN_PATH' 6256209ff23fSmrg 6257ad43ddacSmrg case $cc_basename in 6258ad43ddacSmrg CC*) 6259ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6260ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6261ad43ddacSmrg ;; 6262ad43ddacSmrg *) 6263ad43ddacSmrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6264ad43ddacSmrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6265ad43ddacSmrg ;; 6266ad43ddacSmrg esac 6267ad43ddacSmrg ;; 6268209ff23fSmrg 6269ad43ddacSmrg tandem*) 6270ad43ddacSmrg case $cc_basename in 6271ad43ddacSmrg NCC*) 6272ad43ddacSmrg # NonStop-UX NCC 3.20 6273ad43ddacSmrg # FIXME: insert proper C++ library support 6274ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6275ad43ddacSmrg ;; 6276ad43ddacSmrg *) 6277ad43ddacSmrg # FIXME: insert proper C++ library support 6278ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6279ad43ddacSmrg ;; 6280ad43ddacSmrg esac 6281ad43ddacSmrg ;; 6282209ff23fSmrg 6283ad43ddacSmrg vxworks*) 6284ad43ddacSmrg # FIXME: insert proper C++ library support 6285ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6286ad43ddacSmrg ;; 6287209ff23fSmrg 6288ad43ddacSmrg *) 6289ad43ddacSmrg # FIXME: insert proper C++ library support 6290ad43ddacSmrg _LT_TAGVAR(ld_shlibs, $1)=no 6291ad43ddacSmrg ;; 6292ad43ddacSmrg esac 6293209ff23fSmrg 6294ad43ddacSmrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6295ad43ddacSmrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6296ad43ddacSmrg 6297ad43ddacSmrg _LT_TAGVAR(GCC, $1)="$GXX" 6298ad43ddacSmrg _LT_TAGVAR(LD, $1)="$LD" 6299ad43ddacSmrg 6300ad43ddacSmrg ## CAVEAT EMPTOR: 6301ad43ddacSmrg ## There is no encapsulation within the following macros, do not change 6302ad43ddacSmrg ## the running order or otherwise move them around unless you know exactly 6303ad43ddacSmrg ## what you are doing... 6304ad43ddacSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6305ad43ddacSmrg _LT_COMPILER_PIC($1) 6306ad43ddacSmrg _LT_COMPILER_C_O($1) 6307ad43ddacSmrg _LT_COMPILER_FILE_LOCKS($1) 6308ad43ddacSmrg _LT_LINKER_SHLIBS($1) 6309ad43ddacSmrg _LT_SYS_DYNAMIC_LINKER($1) 6310ad43ddacSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6311ad43ddacSmrg 6312ad43ddacSmrg _LT_CONFIG($1) 6313ad43ddacSmrg fi # test -n "$compiler" 6314ad43ddacSmrg 6315ad43ddacSmrg CC=$lt_save_CC 6316ad43ddacSmrg LDCXX=$LD 6317ad43ddacSmrg LD=$lt_save_LD 6318ad43ddacSmrg GCC=$lt_save_GCC 6319ad43ddacSmrg with_gnu_ld=$lt_save_with_gnu_ld 6320ad43ddacSmrg lt_cv_path_LDCXX=$lt_cv_path_LD 6321ad43ddacSmrg lt_cv_path_LD=$lt_save_path_LD 6322ad43ddacSmrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6323ad43ddacSmrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6324ad43ddacSmrgfi # test "$_lt_caught_CXX_error" != yes 6325209ff23fSmrg 6326ad43ddacSmrgAC_LANG_POP 6327ad43ddacSmrg])# _LT_LANG_CXX_CONFIG 6328209ff23fSmrg 6329209ff23fSmrg 6330ad43ddacSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6331ad43ddacSmrg# --------------------------------- 6332ad43ddacSmrg# Figure out "hidden" library dependencies from verbose 6333ad43ddacSmrg# compiler output when linking a shared library. 6334ad43ddacSmrg# Parse the compiler output and extract the necessary 6335ad43ddacSmrg# objects, libraries and library flags. 6336ad43ddacSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6337ad43ddacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6338ad43ddacSmrg# Dependencies to place before and after the object being linked: 6339ad43ddacSmrg_LT_TAGVAR(predep_objects, $1)= 6340ad43ddacSmrg_LT_TAGVAR(postdep_objects, $1)= 6341ad43ddacSmrg_LT_TAGVAR(predeps, $1)= 6342ad43ddacSmrg_LT_TAGVAR(postdeps, $1)= 6343ad43ddacSmrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6344209ff23fSmrg 6345ad43ddacSmrgdnl we can't use the lt_simple_compile_test_code here, 6346ad43ddacSmrgdnl because it contains code intended for an executable, 6347ad43ddacSmrgdnl not a library. It's possible we should let each 6348ad43ddacSmrgdnl tag define a new lt_????_link_test_code variable, 6349ad43ddacSmrgdnl but it's only used here... 6350ad43ddacSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6351ad43ddacSmrgint a; 6352ad43ddacSmrgvoid foo (void) { a = 0; } 6353ad43ddacSmrg_LT_EOF 6354ad43ddacSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6355ad43ddacSmrgclass Foo 6356ad43ddacSmrg{ 6357ad43ddacSmrgpublic: 6358ad43ddacSmrg Foo (void) { a = 0; } 6359ad43ddacSmrgprivate: 6360ad43ddacSmrg int a; 6361ad43ddacSmrg}; 6362ad43ddacSmrg_LT_EOF 6363ad43ddacSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6364ad43ddacSmrg subroutine foo 6365ad43ddacSmrg implicit none 6366ad43ddacSmrg integer*4 a 6367ad43ddacSmrg a=0 6368ad43ddacSmrg return 6369ad43ddacSmrg end 6370ad43ddacSmrg_LT_EOF 6371ad43ddacSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6372ad43ddacSmrg subroutine foo 6373ad43ddacSmrg implicit none 6374ad43ddacSmrg integer a 6375ad43ddacSmrg a=0 6376ad43ddacSmrg return 6377ad43ddacSmrg end 6378ad43ddacSmrg_LT_EOF 6379ad43ddacSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6380ad43ddacSmrgpublic class foo { 6381ad43ddacSmrg private int a; 6382ad43ddacSmrg public void bar (void) { 6383ad43ddacSmrg a = 0; 6384ad43ddacSmrg } 6385ad43ddacSmrg}; 6386ad43ddacSmrg_LT_EOF 6387209ff23fSmrg]) 6388ad43ddacSmrgdnl Parse the compiler output and extract the necessary 6389ad43ddacSmrgdnl objects, libraries and library flags. 6390ad43ddacSmrgif AC_TRY_EVAL(ac_compile); then 6391ad43ddacSmrg # Parse the compiler output and extract the necessary 6392ad43ddacSmrg # objects, libraries and library flags. 6393209ff23fSmrg 6394ad43ddacSmrg # Sentinel used to keep track of whether or not we are before 6395ad43ddacSmrg # the conftest object file. 6396ad43ddacSmrg pre_test_object_deps_done=no 6397209ff23fSmrg 6398ad43ddacSmrg for p in `eval "$output_verbose_link_cmd"`; do 6399ad43ddacSmrg case $p in 6400209ff23fSmrg 6401ad43ddacSmrg -L* | -R* | -l*) 6402ad43ddacSmrg # Some compilers place space between "-{L,R}" and the path. 6403ad43ddacSmrg # Remove the space. 6404ad43ddacSmrg if test $p = "-L" || 6405ad43ddacSmrg test $p = "-R"; then 6406ad43ddacSmrg prev=$p 6407ad43ddacSmrg continue 6408ad43ddacSmrg else 6409ad43ddacSmrg prev= 6410ad43ddacSmrg fi 6411209ff23fSmrg 6412ad43ddacSmrg if test "$pre_test_object_deps_done" = no; then 6413ad43ddacSmrg case $p in 6414ad43ddacSmrg -L* | -R*) 6415ad43ddacSmrg # Internal compiler library paths should come after those 6416ad43ddacSmrg # provided the user. The postdeps already come after the 6417ad43ddacSmrg # user supplied libs so there is no need to process them. 6418ad43ddacSmrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6419ad43ddacSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6420ad43ddacSmrg else 6421ad43ddacSmrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6422ad43ddacSmrg fi 6423ad43ddacSmrg ;; 6424ad43ddacSmrg # The "-l" case would never come before the object being 6425ad43ddacSmrg # linked, so don't bother handling this case. 6426ad43ddacSmrg esac 6427ad43ddacSmrg else 6428ad43ddacSmrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6429ad43ddacSmrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6430ad43ddacSmrg else 6431ad43ddacSmrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6432ad43ddacSmrg fi 6433ad43ddacSmrg fi 6434ad43ddacSmrg ;; 6435209ff23fSmrg 6436ad43ddacSmrg *.$objext) 6437ad43ddacSmrg # This assumes that the test object file only shows up 6438ad43ddacSmrg # once in the compiler output. 6439ad43ddacSmrg if test "$p" = "conftest.$objext"; then 6440ad43ddacSmrg pre_test_object_deps_done=yes 6441ad43ddacSmrg continue 6442ad43ddacSmrg fi 6443209ff23fSmrg 6444ad43ddacSmrg if test "$pre_test_object_deps_done" = no; then 6445ad43ddacSmrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6446ad43ddacSmrg _LT_TAGVAR(predep_objects, $1)="$p" 6447ad43ddacSmrg else 6448ad43ddacSmrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6449ad43ddacSmrg fi 6450ad43ddacSmrg else 6451ad43ddacSmrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6452ad43ddacSmrg _LT_TAGVAR(postdep_objects, $1)="$p" 6453ad43ddacSmrg else 6454ad43ddacSmrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 6455ad43ddacSmrg fi 6456ad43ddacSmrg fi 6457ad43ddacSmrg ;; 6458209ff23fSmrg 6459ad43ddacSmrg *) ;; # Ignore the rest. 6460209ff23fSmrg 6461ad43ddacSmrg esac 6462ad43ddacSmrg done 6463209ff23fSmrg 6464ad43ddacSmrg # Clean up. 6465ad43ddacSmrg rm -f a.out a.exe 6466ad43ddacSmrgelse 6467ad43ddacSmrg echo "libtool.m4: error: problem compiling $1 test program" 6468ad43ddacSmrgfi 6469209ff23fSmrg 6470ad43ddacSmrg$RM -f confest.$objext 6471209ff23fSmrg 6472ad43ddacSmrg# PORTME: override above test on systems where it is broken 6473ad43ddacSmrgm4_if([$1], [CXX], 6474ad43ddacSmrg[case $host_os in 6475ad43ddacSmrginterix[[3-9]]*) 6476ad43ddacSmrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 6477ad43ddacSmrg # hack all around it, let's just trust "g++" to DTRT. 6478ad43ddacSmrg _LT_TAGVAR(predep_objects,$1)= 6479ad43ddacSmrg _LT_TAGVAR(postdep_objects,$1)= 6480ad43ddacSmrg _LT_TAGVAR(postdeps,$1)= 6481209ff23fSmrg ;; 6482ad43ddacSmrg 6483ad43ddacSmrglinux*) 6484ad43ddacSmrg case `$CC -V 2>&1 | sed 5q` in 6485ad43ddacSmrg *Sun\ C*) 6486ad43ddacSmrg # Sun C++ 5.9 6487ad43ddacSmrg 6488ad43ddacSmrg # The more standards-conforming stlport4 library is 6489ad43ddacSmrg # incompatible with the Cstd library. Avoid specifying 6490ad43ddacSmrg # it if it's in CXXFLAGS. Ignore libCrun as 6491ad43ddacSmrg # -library=stlport4 depends on it. 6492ad43ddacSmrg case " $CXX $CXXFLAGS " in 6493ad43ddacSmrg *" -library=stlport4 "*) 6494ad43ddacSmrg solaris_use_stlport4=yes 6495ad43ddacSmrg ;; 6496ad43ddacSmrg esac 6497ad43ddacSmrg 6498ad43ddacSmrg if test "$solaris_use_stlport4" != yes; then 6499ad43ddacSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6500ad43ddacSmrg fi 6501ad43ddacSmrg ;; 6502ad43ddacSmrg esac 6503209ff23fSmrg ;; 6504ad43ddacSmrg 6505209ff23fSmrgsolaris*) 6506ad43ddacSmrg case $cc_basename in 6507ad43ddacSmrg CC*) 6508ad43ddacSmrg # The more standards-conforming stlport4 library is 6509ad43ddacSmrg # incompatible with the Cstd library. Avoid specifying 6510ad43ddacSmrg # it if it's in CXXFLAGS. Ignore libCrun as 6511ad43ddacSmrg # -library=stlport4 depends on it. 6512ad43ddacSmrg case " $CXX $CXXFLAGS " in 6513ad43ddacSmrg *" -library=stlport4 "*) 6514ad43ddacSmrg solaris_use_stlport4=yes 6515ad43ddacSmrg ;; 6516ad43ddacSmrg esac 6517209ff23fSmrg 6518ad43ddacSmrg # Adding this requires a known-good setup of shared libraries for 6519ad43ddacSmrg # Sun compiler versions before 5.6, else PIC objects from an old 6520ad43ddacSmrg # archive will be linked into the output, leading to subtle bugs. 6521ad43ddacSmrg if test "$solaris_use_stlport4" != yes; then 6522ad43ddacSmrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6523ad43ddacSmrg fi 6524ad43ddacSmrg ;; 6525ad43ddacSmrg esac 6526209ff23fSmrg ;; 6527209ff23fSmrgesac 6528ad43ddacSmrg]) 6529209ff23fSmrg 6530ad43ddacSmrgcase " $_LT_TAGVAR(postdeps, $1) " in 6531ad43ddacSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 6532209ff23fSmrgesac 6533ad43ddacSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 6534ad43ddacSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 6535ad43ddacSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 6536ad43ddacSmrgfi 6537ad43ddacSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 6538ad43ddacSmrg [The directories searched by this compiler when creating a shared library]) 6539ad43ddacSmrg_LT_TAGDECL([], [predep_objects], [1], 6540ad43ddacSmrg [Dependencies to place before and after the objects being linked to 6541ad43ddacSmrg create a shared library]) 6542ad43ddacSmrg_LT_TAGDECL([], [postdep_objects], [1]) 6543ad43ddacSmrg_LT_TAGDECL([], [predeps], [1]) 6544ad43ddacSmrg_LT_TAGDECL([], [postdeps], [1]) 6545ad43ddacSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 6546ad43ddacSmrg [The library search path used internally by the compiler when linking 6547ad43ddacSmrg a shared library]) 6548ad43ddacSmrg])# _LT_SYS_HIDDEN_LIBDEPS 6549ad43ddacSmrg 6550ad43ddacSmrg 6551ad43ddacSmrg# _LT_PROG_F77 6552ad43ddacSmrg# ------------ 6553ad43ddacSmrg# Since AC_PROG_F77 is broken, in that it returns the empty string 6554ad43ddacSmrg# if there is no fortran compiler, we have our own version here. 6555ad43ddacSmrgm4_defun([_LT_PROG_F77], 6556ad43ddacSmrg[ 6557ad43ddacSmrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 6558ad43ddacSmrgAC_PROG_F77 6559ad43ddacSmrgif test -z "$F77" || test "X$F77" = "Xno"; then 6560ad43ddacSmrg _lt_disable_F77=yes 6561ad43ddacSmrgfi 6562ad43ddacSmrgpopdef([AC_MSG_ERROR]) 6563ad43ddacSmrg])# _LT_PROG_F77 6564209ff23fSmrg 6565ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 6566ad43ddacSmrgdnl AC_DEFUN([_LT_PROG_F77], []) 6567209ff23fSmrg 6568209ff23fSmrg 6569ad43ddacSmrg# _LT_LANG_F77_CONFIG([TAG]) 6570ad43ddacSmrg# -------------------------- 6571ad43ddacSmrg# Ensure that the configuration variables for a Fortran 77 compiler are 6572ad43ddacSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6573ad43ddacSmrg# to write the compiler configuration to `libtool'. 6574ad43ddacSmrgm4_defun([_LT_LANG_F77_CONFIG], 6575ad43ddacSmrg[AC_REQUIRE([_LT_PROG_F77])dnl 6576ad43ddacSmrgAC_LANG_PUSH(Fortran 77) 6577209ff23fSmrg 6578ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6579ad43ddacSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6580ad43ddacSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6581ad43ddacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6582ad43ddacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6583ad43ddacSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6584ad43ddacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6585ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6586ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6587ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6588ad43ddacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6589ad43ddacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6590ad43ddacSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6591ad43ddacSmrg_LT_TAGVAR(module_cmds, $1)= 6592ad43ddacSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6593ad43ddacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6594ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6595ad43ddacSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6596ad43ddacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6597ad43ddacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6598209ff23fSmrg 6599ad43ddacSmrg# Source file extension for f77 test sources. 6600ad43ddacSmrgac_ext=f 6601209ff23fSmrg 6602ad43ddacSmrg# Object file extension for compiled f77 test sources. 6603ad43ddacSmrgobjext=o 6604ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 6605ad43ddacSmrg 6606ad43ddacSmrg# No sense in running all these tests if we already determined that 6607ad43ddacSmrg# the F77 compiler isn't working. Some variables (like enable_shared) 6608ad43ddacSmrg# are currently assumed to apply to all compilers on this platform, 6609ad43ddacSmrg# and will be corrupted by setting them based on a non-working compiler. 6610ad43ddacSmrgif test "$_lt_disable_F77" != yes; then 6611ad43ddacSmrg # Code to be used in simple compile tests 6612ad43ddacSmrg lt_simple_compile_test_code="\ 6613ad43ddacSmrg subroutine t 6614ad43ddacSmrg return 6615ad43ddacSmrg end 6616ad43ddacSmrg" 6617209ff23fSmrg 6618ad43ddacSmrg # Code to be used in simple link tests 6619ad43ddacSmrg lt_simple_link_test_code="\ 6620ad43ddacSmrg program t 6621ad43ddacSmrg end 6622ad43ddacSmrg" 6623209ff23fSmrg 6624ad43ddacSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6625ad43ddacSmrg _LT_TAG_COMPILER 6626209ff23fSmrg 6627ad43ddacSmrg # save warnings/boilerplate of simple test code 6628ad43ddacSmrg _LT_COMPILER_BOILERPLATE 6629ad43ddacSmrg _LT_LINKER_BOILERPLATE 6630209ff23fSmrg 6631ad43ddacSmrg # Allow CC to be a program name with arguments. 6632ad43ddacSmrg lt_save_CC="$CC" 6633ad43ddacSmrg lt_save_GCC=$GCC 6634ad43ddacSmrg CC=${F77-"f77"} 6635ad43ddacSmrg compiler=$CC 6636ad43ddacSmrg _LT_TAGVAR(compiler, $1)=$CC 6637ad43ddacSmrg _LT_CC_BASENAME([$compiler]) 6638ad43ddacSmrg GCC=$G77 6639ad43ddacSmrg if test -n "$compiler"; then 6640ad43ddacSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6641ad43ddacSmrg AC_MSG_RESULT([$can_build_shared]) 6642209ff23fSmrg 6643ad43ddacSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6644ad43ddacSmrg test "$can_build_shared" = "no" && enable_shared=no 6645ad43ddacSmrg 6646ad43ddacSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6647ad43ddacSmrg # are all built from PIC. 6648ad43ddacSmrg case $host_os in 6649ad43ddacSmrg aix3*) 6650ad43ddacSmrg test "$enable_shared" = yes && enable_static=no 6651ad43ddacSmrg if test -n "$RANLIB"; then 6652ad43ddacSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6653ad43ddacSmrg postinstall_cmds='$RANLIB $lib' 6654ad43ddacSmrg fi 6655ad43ddacSmrg ;; 6656ad43ddacSmrg aix[[4-9]]*) 6657ad43ddacSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6658ad43ddacSmrg test "$enable_shared" = yes && enable_static=no 6659209ff23fSmrg fi 6660ad43ddacSmrg ;; 6661ad43ddacSmrg esac 6662ad43ddacSmrg AC_MSG_RESULT([$enable_shared]) 6663ad43ddacSmrg 6664ad43ddacSmrg AC_MSG_CHECKING([whether to build static libraries]) 6665ad43ddacSmrg # Make sure either enable_shared or enable_static is yes. 6666ad43ddacSmrg test "$enable_shared" = yes || enable_static=yes 6667ad43ddacSmrg AC_MSG_RESULT([$enable_static]) 6668ad43ddacSmrg 6669ad43ddacSmrg _LT_TAGVAR(GCC, $1)="$G77" 6670ad43ddacSmrg _LT_TAGVAR(LD, $1)="$LD" 6671ad43ddacSmrg 6672ad43ddacSmrg ## CAVEAT EMPTOR: 6673ad43ddacSmrg ## There is no encapsulation within the following macros, do not change 6674ad43ddacSmrg ## the running order or otherwise move them around unless you know exactly 6675ad43ddacSmrg ## what you are doing... 6676ad43ddacSmrg _LT_COMPILER_PIC($1) 6677ad43ddacSmrg _LT_COMPILER_C_O($1) 6678ad43ddacSmrg _LT_COMPILER_FILE_LOCKS($1) 6679ad43ddacSmrg _LT_LINKER_SHLIBS($1) 6680ad43ddacSmrg _LT_SYS_DYNAMIC_LINKER($1) 6681ad43ddacSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6682ad43ddacSmrg 6683ad43ddacSmrg _LT_CONFIG($1) 6684ad43ddacSmrg fi # test -n "$compiler" 6685ad43ddacSmrg 6686ad43ddacSmrg GCC=$lt_save_GCC 6687ad43ddacSmrg CC="$lt_save_CC" 6688ad43ddacSmrgfi # test "$_lt_disable_F77" != yes 6689209ff23fSmrg 6690ad43ddacSmrgAC_LANG_POP 6691ad43ddacSmrg])# _LT_LANG_F77_CONFIG 6692ad43ddacSmrg 6693ad43ddacSmrg 6694ad43ddacSmrg# _LT_PROG_FC 6695ad43ddacSmrg# ----------- 6696ad43ddacSmrg# Since AC_PROG_FC is broken, in that it returns the empty string 6697ad43ddacSmrg# if there is no fortran compiler, we have our own version here. 6698ad43ddacSmrgm4_defun([_LT_PROG_FC], 6699ad43ddacSmrg[ 6700ad43ddacSmrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 6701ad43ddacSmrgAC_PROG_FC 6702ad43ddacSmrgif test -z "$FC" || test "X$FC" = "Xno"; then 6703ad43ddacSmrg _lt_disable_FC=yes 6704209ff23fSmrgfi 6705ad43ddacSmrgpopdef([AC_MSG_ERROR]) 6706ad43ddacSmrg])# _LT_PROG_FC 6707209ff23fSmrg 6708ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 6709ad43ddacSmrgdnl AC_DEFUN([_LT_PROG_FC], []) 6710209ff23fSmrg 6711209ff23fSmrg 6712ad43ddacSmrg# _LT_LANG_FC_CONFIG([TAG]) 6713ad43ddacSmrg# ------------------------- 6714ad43ddacSmrg# Ensure that the configuration variables for a Fortran compiler are 6715ad43ddacSmrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6716ad43ddacSmrg# to write the compiler configuration to `libtool'. 6717ad43ddacSmrgm4_defun([_LT_LANG_FC_CONFIG], 6718ad43ddacSmrg[AC_REQUIRE([_LT_PROG_FC])dnl 6719ad43ddacSmrgAC_LANG_PUSH(Fortran) 6720ad43ddacSmrg 6721ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6722ad43ddacSmrg_LT_TAGVAR(allow_undefined_flag, $1)= 6723ad43ddacSmrg_LT_TAGVAR(always_export_symbols, $1)=no 6724ad43ddacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6725ad43ddacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6726ad43ddacSmrg_LT_TAGVAR(hardcode_direct, $1)=no 6727ad43ddacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6728ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6729ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6730ad43ddacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6731ad43ddacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6732ad43ddacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no 6733ad43ddacSmrg_LT_TAGVAR(inherit_rpath, $1)=no 6734ad43ddacSmrg_LT_TAGVAR(module_cmds, $1)= 6735ad43ddacSmrg_LT_TAGVAR(module_expsym_cmds, $1)= 6736ad43ddacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6737ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6738ad43ddacSmrg_LT_TAGVAR(no_undefined_flag, $1)= 6739ad43ddacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6740ad43ddacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6741ad43ddacSmrg 6742ad43ddacSmrg# Source file extension for fc test sources. 6743ad43ddacSmrgac_ext=${ac_fc_srcext-f} 6744ad43ddacSmrg 6745ad43ddacSmrg# Object file extension for compiled fc test sources. 6746ad43ddacSmrgobjext=o 6747ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 6748ad43ddacSmrg 6749ad43ddacSmrg# No sense in running all these tests if we already determined that 6750ad43ddacSmrg# the FC compiler isn't working. Some variables (like enable_shared) 6751ad43ddacSmrg# are currently assumed to apply to all compilers on this platform, 6752ad43ddacSmrg# and will be corrupted by setting them based on a non-working compiler. 6753ad43ddacSmrgif test "$_lt_disable_FC" != yes; then 6754ad43ddacSmrg # Code to be used in simple compile tests 6755ad43ddacSmrg lt_simple_compile_test_code="\ 6756ad43ddacSmrg subroutine t 6757ad43ddacSmrg return 6758ad43ddacSmrg end 6759ad43ddacSmrg" 6760ad43ddacSmrg 6761ad43ddacSmrg # Code to be used in simple link tests 6762ad43ddacSmrg lt_simple_link_test_code="\ 6763ad43ddacSmrg program t 6764ad43ddacSmrg end 6765ad43ddacSmrg" 6766ad43ddacSmrg 6767ad43ddacSmrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6768ad43ddacSmrg _LT_TAG_COMPILER 6769ad43ddacSmrg 6770ad43ddacSmrg # save warnings/boilerplate of simple test code 6771ad43ddacSmrg _LT_COMPILER_BOILERPLATE 6772ad43ddacSmrg _LT_LINKER_BOILERPLATE 6773209ff23fSmrg 6774ad43ddacSmrg # Allow CC to be a program name with arguments. 6775ad43ddacSmrg lt_save_CC="$CC" 6776ad43ddacSmrg lt_save_GCC=$GCC 6777ad43ddacSmrg CC=${FC-"f95"} 6778ad43ddacSmrg compiler=$CC 6779ad43ddacSmrg GCC=$ac_cv_fc_compiler_gnu 6780ad43ddacSmrg 6781ad43ddacSmrg _LT_TAGVAR(compiler, $1)=$CC 6782ad43ddacSmrg _LT_CC_BASENAME([$compiler]) 6783ad43ddacSmrg 6784ad43ddacSmrg if test -n "$compiler"; then 6785ad43ddacSmrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6786ad43ddacSmrg AC_MSG_RESULT([$can_build_shared]) 6787ad43ddacSmrg 6788ad43ddacSmrg AC_MSG_CHECKING([whether to build shared libraries]) 6789ad43ddacSmrg test "$can_build_shared" = "no" && enable_shared=no 6790ad43ddacSmrg 6791ad43ddacSmrg # On AIX, shared libraries and static libraries use the same namespace, and 6792ad43ddacSmrg # are all built from PIC. 6793209ff23fSmrg case $host_os in 6794ad43ddacSmrg aix3*) 6795ad43ddacSmrg test "$enable_shared" = yes && enable_static=no 6796ad43ddacSmrg if test -n "$RANLIB"; then 6797ad43ddacSmrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6798ad43ddacSmrg postinstall_cmds='$RANLIB $lib' 6799ad43ddacSmrg fi 6800ad43ddacSmrg ;; 6801209ff23fSmrg aix[[4-9]]*) 6802ad43ddacSmrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6803ad43ddacSmrg test "$enable_shared" = yes && enable_static=no 6804209ff23fSmrg fi 6805ad43ddacSmrg ;; 6806209ff23fSmrg esac 6807ad43ddacSmrg AC_MSG_RESULT([$enable_shared]) 6808ad43ddacSmrg 6809ad43ddacSmrg AC_MSG_CHECKING([whether to build static libraries]) 6810ad43ddacSmrg # Make sure either enable_shared or enable_static is yes. 6811ad43ddacSmrg test "$enable_shared" = yes || enable_static=yes 6812ad43ddacSmrg AC_MSG_RESULT([$enable_static]) 6813ad43ddacSmrg 6814ad43ddacSmrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 6815ad43ddacSmrg _LT_TAGVAR(LD, $1)="$LD" 6816ad43ddacSmrg 6817ad43ddacSmrg ## CAVEAT EMPTOR: 6818ad43ddacSmrg ## There is no encapsulation within the following macros, do not change 6819ad43ddacSmrg ## the running order or otherwise move them around unless you know exactly 6820ad43ddacSmrg ## what you are doing... 6821ad43ddacSmrg _LT_SYS_HIDDEN_LIBDEPS($1) 6822ad43ddacSmrg _LT_COMPILER_PIC($1) 6823ad43ddacSmrg _LT_COMPILER_C_O($1) 6824ad43ddacSmrg _LT_COMPILER_FILE_LOCKS($1) 6825ad43ddacSmrg _LT_LINKER_SHLIBS($1) 6826ad43ddacSmrg _LT_SYS_DYNAMIC_LINKER($1) 6827ad43ddacSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6828ad43ddacSmrg 6829ad43ddacSmrg _LT_CONFIG($1) 6830ad43ddacSmrg fi # test -n "$compiler" 6831ad43ddacSmrg 6832ad43ddacSmrg GCC=$lt_save_GCC 6833ad43ddacSmrg CC="$lt_save_CC" 6834ad43ddacSmrgfi # test "$_lt_disable_FC" != yes 6835209ff23fSmrg 6836ad43ddacSmrgAC_LANG_POP 6837ad43ddacSmrg])# _LT_LANG_FC_CONFIG 6838209ff23fSmrg 6839209ff23fSmrg 6840ad43ddacSmrg# _LT_LANG_GCJ_CONFIG([TAG]) 6841ad43ddacSmrg# -------------------------- 6842ad43ddacSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler 6843ad43ddacSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6844ad43ddacSmrg# to write the compiler configuration to `libtool'. 6845ad43ddacSmrgm4_defun([_LT_LANG_GCJ_CONFIG], 6846ad43ddacSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl 6847ad43ddacSmrgAC_LANG_SAVE 6848209ff23fSmrg 6849ad43ddacSmrg# Source file extension for Java test sources. 6850ad43ddacSmrgac_ext=java 6851209ff23fSmrg 6852ad43ddacSmrg# Object file extension for compiled Java test sources. 6853ad43ddacSmrgobjext=o 6854ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 6855209ff23fSmrg 6856ad43ddacSmrg# Code to be used in simple compile tests 6857ad43ddacSmrglt_simple_compile_test_code="class foo {}" 6858209ff23fSmrg 6859ad43ddacSmrg# Code to be used in simple link tests 6860ad43ddacSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 6861209ff23fSmrg 6862ad43ddacSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6863ad43ddacSmrg_LT_TAG_COMPILER 6864209ff23fSmrg 6865ad43ddacSmrg# save warnings/boilerplate of simple test code 6866ad43ddacSmrg_LT_COMPILER_BOILERPLATE 6867ad43ddacSmrg_LT_LINKER_BOILERPLATE 6868209ff23fSmrg 6869ad43ddacSmrg# Allow CC to be a program name with arguments. 6870ad43ddacSmrglt_save_CC="$CC" 6871ad43ddacSmrglt_save_GCC=$GCC 6872ad43ddacSmrgGCC=yes 6873ad43ddacSmrgCC=${GCJ-"gcj"} 6874ad43ddacSmrgcompiler=$CC 6875ad43ddacSmrg_LT_TAGVAR(compiler, $1)=$CC 6876ad43ddacSmrg_LT_TAGVAR(LD, $1)="$LD" 6877ad43ddacSmrg_LT_CC_BASENAME([$compiler]) 6878209ff23fSmrg 6879ad43ddacSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 6880ad43ddacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6881209ff23fSmrg 6882ad43ddacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6883209ff23fSmrg 6884ad43ddacSmrgif test -n "$compiler"; then 6885ad43ddacSmrg _LT_COMPILER_NO_RTTI($1) 6886ad43ddacSmrg _LT_COMPILER_PIC($1) 6887ad43ddacSmrg _LT_COMPILER_C_O($1) 6888ad43ddacSmrg _LT_COMPILER_FILE_LOCKS($1) 6889ad43ddacSmrg _LT_LINKER_SHLIBS($1) 6890ad43ddacSmrg _LT_LINKER_HARDCODE_LIBPATH($1) 6891209ff23fSmrg 6892ad43ddacSmrg _LT_CONFIG($1) 6893ad43ddacSmrgfi 6894209ff23fSmrg 6895ad43ddacSmrgAC_LANG_RESTORE 6896209ff23fSmrg 6897ad43ddacSmrgGCC=$lt_save_GCC 6898ad43ddacSmrgCC="$lt_save_CC" 6899ad43ddacSmrg])# _LT_LANG_GCJ_CONFIG 6900209ff23fSmrg 6901209ff23fSmrg 6902ad43ddacSmrg# _LT_LANG_RC_CONFIG([TAG]) 6903ad43ddacSmrg# ------------------------- 6904ad43ddacSmrg# Ensure that the configuration variables for the Windows resource compiler 6905ad43ddacSmrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6906ad43ddacSmrg# to write the compiler configuration to `libtool'. 6907ad43ddacSmrgm4_defun([_LT_LANG_RC_CONFIG], 6908ad43ddacSmrg[AC_REQUIRE([LT_PROG_RC])dnl 6909ad43ddacSmrgAC_LANG_SAVE 6910209ff23fSmrg 6911ad43ddacSmrg# Source file extension for RC test sources. 6912ad43ddacSmrgac_ext=rc 6913209ff23fSmrg 6914ad43ddacSmrg# Object file extension for compiled RC test sources. 6915ad43ddacSmrgobjext=o 6916ad43ddacSmrg_LT_TAGVAR(objext, $1)=$objext 6917209ff23fSmrg 6918ad43ddacSmrg# Code to be used in simple compile tests 6919ad43ddacSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 6920209ff23fSmrg 6921ad43ddacSmrg# Code to be used in simple link tests 6922ad43ddacSmrglt_simple_link_test_code="$lt_simple_compile_test_code" 6923209ff23fSmrg 6924ad43ddacSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6925ad43ddacSmrg_LT_TAG_COMPILER 6926ad43ddacSmrg 6927ad43ddacSmrg# save warnings/boilerplate of simple test code 6928ad43ddacSmrg_LT_COMPILER_BOILERPLATE 6929ad43ddacSmrg_LT_LINKER_BOILERPLATE 6930ad43ddacSmrg 6931ad43ddacSmrg# Allow CC to be a program name with arguments. 6932ad43ddacSmrglt_save_CC="$CC" 6933ad43ddacSmrglt_save_GCC=$GCC 6934ad43ddacSmrgGCC= 6935ad43ddacSmrgCC=${RC-"windres"} 6936ad43ddacSmrgcompiler=$CC 6937ad43ddacSmrg_LT_TAGVAR(compiler, $1)=$CC 6938ad43ddacSmrg_LT_CC_BASENAME([$compiler]) 6939ad43ddacSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6940ad43ddacSmrg 6941ad43ddacSmrgif test -n "$compiler"; then 6942ad43ddacSmrg : 6943ad43ddacSmrg _LT_CONFIG($1) 6944ad43ddacSmrgfi 6945ad43ddacSmrg 6946ad43ddacSmrgGCC=$lt_save_GCC 6947ad43ddacSmrgAC_LANG_RESTORE 6948ad43ddacSmrgCC="$lt_save_CC" 6949ad43ddacSmrg])# _LT_LANG_RC_CONFIG 6950ad43ddacSmrg 6951ad43ddacSmrg 6952ad43ddacSmrg# LT_PROG_GCJ 6953ad43ddacSmrg# ----------- 6954ad43ddacSmrgAC_DEFUN([LT_PROG_GCJ], 6955ad43ddacSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 6956ad43ddacSmrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 6957ad43ddacSmrg [AC_CHECK_TOOL(GCJ, gcj,) 6958ad43ddacSmrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6959ad43ddacSmrg AC_SUBST(GCJFLAGS)])])[]dnl 6960ad43ddacSmrg]) 6961ad43ddacSmrg 6962ad43ddacSmrg# Old name: 6963ad43ddacSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 6964ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 6965ad43ddacSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 6966ad43ddacSmrg 6967ad43ddacSmrg 6968ad43ddacSmrg# LT_PROG_RC 6969ad43ddacSmrg# ---------- 6970ad43ddacSmrgAC_DEFUN([LT_PROG_RC], 6971ad43ddacSmrg[AC_CHECK_TOOL(RC, windres,) 6972ad43ddacSmrg]) 6973ad43ddacSmrg 6974ad43ddacSmrg# Old name: 6975ad43ddacSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 6976ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 6977ad43ddacSmrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 6978ad43ddacSmrg 6979ad43ddacSmrg 6980ad43ddacSmrg# _LT_DECL_EGREP 6981ad43ddacSmrg# -------------- 6982ad43ddacSmrg# If we don't have a new enough Autoconf to choose the best grep 6983ad43ddacSmrg# available, choose the one first in the user's PATH. 6984ad43ddacSmrgm4_defun([_LT_DECL_EGREP], 6985ad43ddacSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl 6986ad43ddacSmrgAC_REQUIRE([AC_PROG_FGREP])dnl 6987ad43ddacSmrgtest -z "$GREP" && GREP=grep 6988ad43ddacSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 6989ad43ddacSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 6990ad43ddacSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 6991ad43ddacSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 6992ad43ddacSmrgAC_SUBST([GREP]) 6993ad43ddacSmrg]) 6994ad43ddacSmrg 6995ad43ddacSmrg 6996ad43ddacSmrg# _LT_DECL_SED 6997ad43ddacSmrg# ------------ 6998ad43ddacSmrg# Check for a fully-functional sed program, that truncates 6999ad43ddacSmrg# as few characters as possible. Prefer GNU sed if found. 7000ad43ddacSmrgm4_defun([_LT_DECL_SED], 7001ad43ddacSmrg[AC_PROG_SED 7002ad43ddacSmrgtest -z "$SED" && SED=sed 7003ad43ddacSmrgXsed="$SED -e 1s/^X//" 7004ad43ddacSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7005ad43ddacSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7006ad43ddacSmrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7007ad43ddacSmrg])# _LT_DECL_SED 7008ad43ddacSmrg 7009ad43ddacSmrgm4_ifndef([AC_PROG_SED], [ 7010ad43ddacSmrg# NOTE: This macro has been submitted for inclusion into # 7011ad43ddacSmrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7012ad43ddacSmrg# a released version of Autoconf we should remove this # 7013ad43ddacSmrg# macro and use it instead. # 7014ad43ddacSmrg 7015ad43ddacSmrgm4_defun([AC_PROG_SED], 7016ad43ddacSmrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7017ad43ddacSmrgAC_CACHE_VAL(lt_cv_path_SED, 7018ad43ddacSmrg[# Loop through the user's path and test for sed and gsed. 7019ad43ddacSmrg# Then use that list of sed's as ones to test for truncation. 7020ad43ddacSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7021ad43ddacSmrgfor as_dir in $PATH 7022ad43ddacSmrgdo 7023ad43ddacSmrg IFS=$as_save_IFS 7024ad43ddacSmrg test -z "$as_dir" && as_dir=. 7025ad43ddacSmrg for lt_ac_prog in sed gsed; do 7026ad43ddacSmrg for ac_exec_ext in '' $ac_executable_extensions; do 7027ad43ddacSmrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7028ad43ddacSmrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7029ad43ddacSmrg fi 7030ad43ddacSmrg done 7031ad43ddacSmrg done 7032ad43ddacSmrgdone 7033ad43ddacSmrgIFS=$as_save_IFS 7034ad43ddacSmrglt_ac_max=0 7035ad43ddacSmrglt_ac_count=0 7036ad43ddacSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7037ad43ddacSmrg# along with /bin/sed that truncates output. 7038ad43ddacSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7039ad43ddacSmrg test ! -f $lt_ac_sed && continue 7040ad43ddacSmrg cat /dev/null > conftest.in 7041ad43ddacSmrg lt_ac_count=0 7042ad43ddacSmrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7043ad43ddacSmrg # Check for GNU sed and select it if it is found. 7044ad43ddacSmrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7045ad43ddacSmrg lt_cv_path_SED=$lt_ac_sed 7046ad43ddacSmrg break 7047ad43ddacSmrg fi 7048ad43ddacSmrg while true; do 7049ad43ddacSmrg cat conftest.in conftest.in >conftest.tmp 7050ad43ddacSmrg mv conftest.tmp conftest.in 7051ad43ddacSmrg cp conftest.in conftest.nl 7052ad43ddacSmrg echo >>conftest.nl 7053ad43ddacSmrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7054ad43ddacSmrg cmp -s conftest.out conftest.nl || break 7055ad43ddacSmrg # 10000 chars as input seems more than enough 7056ad43ddacSmrg test $lt_ac_count -gt 10 && break 7057ad43ddacSmrg lt_ac_count=`expr $lt_ac_count + 1` 7058ad43ddacSmrg if test $lt_ac_count -gt $lt_ac_max; then 7059ad43ddacSmrg lt_ac_max=$lt_ac_count 7060ad43ddacSmrg lt_cv_path_SED=$lt_ac_sed 7061ad43ddacSmrg fi 7062ad43ddacSmrg done 7063ad43ddacSmrgdone 7064ad43ddacSmrg]) 7065ad43ddacSmrgSED=$lt_cv_path_SED 7066ad43ddacSmrgAC_SUBST([SED]) 7067ad43ddacSmrgAC_MSG_RESULT([$SED]) 7068ad43ddacSmrg])#AC_PROG_SED 7069ad43ddacSmrg])#m4_ifndef 7070209ff23fSmrg 7071ad43ddacSmrg# Old name: 7072ad43ddacSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7073ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 7074ad43ddacSmrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7075209ff23fSmrg 7076209ff23fSmrg 7077ad43ddacSmrg# _LT_CHECK_SHELL_FEATURES 7078ad43ddacSmrg# ------------------------ 7079ad43ddacSmrg# Find out whether the shell is Bourne or XSI compatible, 7080ad43ddacSmrg# or has some other useful features. 7081ad43ddacSmrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7082ad43ddacSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7083ad43ddacSmrg# Try some XSI features 7084ad43ddacSmrgxsi_shell=no 7085ad43ddacSmrg( _lt_dummy="a/b/c" 7086ad43ddacSmrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 7087ad43ddacSmrg = c,a/b,, \ 7088ad43ddacSmrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7089ad43ddacSmrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7090ad43ddacSmrg && xsi_shell=yes 7091ad43ddacSmrgAC_MSG_RESULT([$xsi_shell]) 7092ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7093ad43ddacSmrg 7094ad43ddacSmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7095ad43ddacSmrglt_shell_append=no 7096ad43ddacSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7097ad43ddacSmrg >/dev/null 2>&1 \ 7098ad43ddacSmrg && lt_shell_append=yes 7099ad43ddacSmrgAC_MSG_RESULT([$lt_shell_append]) 7100ad43ddacSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7101ad43ddacSmrg 7102ad43ddacSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7103ad43ddacSmrg lt_unset=unset 7104ad43ddacSmrgelse 7105ad43ddacSmrg lt_unset=false 7106209ff23fSmrgfi 7107ad43ddacSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7108ad43ddacSmrg 7109ad43ddacSmrg# test EBCDIC or ASCII 7110ad43ddacSmrgcase `echo X|tr X '\101'` in 7111ad43ddacSmrg A) # ASCII based system 7112ad43ddacSmrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7113ad43ddacSmrg lt_SP2NL='tr \040 \012' 7114ad43ddacSmrg lt_NL2SP='tr \015\012 \040\040' 7115ad43ddacSmrg ;; 7116ad43ddacSmrg *) # EBCDIC based system 7117ad43ddacSmrg lt_SP2NL='tr \100 \n' 7118ad43ddacSmrg lt_NL2SP='tr \r\n \100\100' 7119ad43ddacSmrg ;; 7120209ff23fSmrgesac 7121ad43ddacSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7122ad43ddacSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7123ad43ddacSmrg])# _LT_CHECK_SHELL_FEATURES 7124209ff23fSmrg 7125209ff23fSmrg 7126ad43ddacSmrg# _LT_PROG_XSI_SHELLFNS 7127ad43ddacSmrg# --------------------- 7128ad43ddacSmrg# Bourne and XSI compatible variants of some useful shell functions. 7129ad43ddacSmrgm4_defun([_LT_PROG_XSI_SHELLFNS], 7130ad43ddacSmrg[case $xsi_shell in 7131ad43ddacSmrg yes) 7132ad43ddacSmrg cat << \_LT_EOF >> "$cfgfile" 7133ad43ddacSmrg 7134ad43ddacSmrg# func_dirname file append nondir_replacement 7135ad43ddacSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7136ad43ddacSmrg# otherwise set result to NONDIR_REPLACEMENT. 7137ad43ddacSmrgfunc_dirname () 7138ad43ddacSmrg{ 7139ad43ddacSmrg case ${1} in 7140ad43ddacSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7141ad43ddacSmrg * ) func_dirname_result="${3}" ;; 7142ad43ddacSmrg esac 7143ad43ddacSmrg} 7144209ff23fSmrg 7145ad43ddacSmrg# func_basename file 7146ad43ddacSmrgfunc_basename () 7147ad43ddacSmrg{ 7148ad43ddacSmrg func_basename_result="${1##*/}" 7149ad43ddacSmrg} 7150ad43ddacSmrg 7151ad43ddacSmrg# func_dirname_and_basename file append nondir_replacement 7152ad43ddacSmrg# perform func_basename and func_dirname in a single function 7153ad43ddacSmrg# call: 7154ad43ddacSmrg# dirname: Compute the dirname of FILE. If nonempty, 7155ad43ddacSmrg# add APPEND to the result, otherwise set result 7156ad43ddacSmrg# to NONDIR_REPLACEMENT. 7157ad43ddacSmrg# value returned in "$func_dirname_result" 7158ad43ddacSmrg# basename: Compute filename of FILE. 7159ad43ddacSmrg# value retuned in "$func_basename_result" 7160ad43ddacSmrg# Implementation must be kept synchronized with func_dirname 7161ad43ddacSmrg# and func_basename. For efficiency, we do not delegate to 7162ad43ddacSmrg# those functions but instead duplicate the functionality here. 7163ad43ddacSmrgfunc_dirname_and_basename () 7164ad43ddacSmrg{ 7165ad43ddacSmrg case ${1} in 7166ad43ddacSmrg */*) func_dirname_result="${1%/*}${2}" ;; 7167ad43ddacSmrg * ) func_dirname_result="${3}" ;; 7168209ff23fSmrg esac 7169ad43ddacSmrg func_basename_result="${1##*/}" 7170ad43ddacSmrg} 7171ad43ddacSmrg 7172ad43ddacSmrg# func_stripname prefix suffix name 7173ad43ddacSmrg# strip PREFIX and SUFFIX off of NAME. 7174ad43ddacSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7175ad43ddacSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7176ad43ddacSmrg# dot (in which case that matches only a dot). 7177ad43ddacSmrgfunc_stripname () 7178ad43ddacSmrg{ 7179ad43ddacSmrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7180ad43ddacSmrg # positional parameters, so assign one to ordinary parameter first. 7181ad43ddacSmrg func_stripname_result=${3} 7182ad43ddacSmrg func_stripname_result=${func_stripname_result#"${1}"} 7183ad43ddacSmrg func_stripname_result=${func_stripname_result%"${2}"} 7184ad43ddacSmrg} 7185ad43ddacSmrg 7186ad43ddacSmrg# func_opt_split 7187ad43ddacSmrgfunc_opt_split () 7188ad43ddacSmrg{ 7189ad43ddacSmrg func_opt_split_opt=${1%%=*} 7190ad43ddacSmrg func_opt_split_arg=${1#*=} 7191ad43ddacSmrg} 7192ad43ddacSmrg 7193ad43ddacSmrg# func_lo2o object 7194ad43ddacSmrgfunc_lo2o () 7195ad43ddacSmrg{ 7196ad43ddacSmrg case ${1} in 7197ad43ddacSmrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7198ad43ddacSmrg *) func_lo2o_result=${1} ;; 7199209ff23fSmrg esac 7200ad43ddacSmrg} 7201209ff23fSmrg 7202ad43ddacSmrg# func_xform libobj-or-source 7203ad43ddacSmrgfunc_xform () 7204ad43ddacSmrg{ 7205ad43ddacSmrg func_xform_result=${1%.*}.lo 7206ad43ddacSmrg} 7207209ff23fSmrg 7208ad43ddacSmrg# func_arith arithmetic-term... 7209ad43ddacSmrgfunc_arith () 7210ad43ddacSmrg{ 7211ad43ddacSmrg func_arith_result=$(( $[*] )) 7212ad43ddacSmrg} 7213209ff23fSmrg 7214ad43ddacSmrg# func_len string 7215ad43ddacSmrg# STRING may not start with a hyphen. 7216ad43ddacSmrgfunc_len () 7217ad43ddacSmrg{ 7218ad43ddacSmrg func_len_result=${#1} 7219ad43ddacSmrg} 7220209ff23fSmrg 7221ad43ddacSmrg_LT_EOF 7222ad43ddacSmrg ;; 7223ad43ddacSmrg *) # Bourne compatible functions. 7224ad43ddacSmrg cat << \_LT_EOF >> "$cfgfile" 7225209ff23fSmrg 7226ad43ddacSmrg# func_dirname file append nondir_replacement 7227ad43ddacSmrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7228ad43ddacSmrg# otherwise set result to NONDIR_REPLACEMENT. 7229ad43ddacSmrgfunc_dirname () 7230ad43ddacSmrg{ 7231ad43ddacSmrg # Extract subdirectory from the argument. 7232ad43ddacSmrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 7233ad43ddacSmrg if test "X$func_dirname_result" = "X${1}"; then 7234ad43ddacSmrg func_dirname_result="${3}" 7235ad43ddacSmrg else 7236ad43ddacSmrg func_dirname_result="$func_dirname_result${2}" 7237ad43ddacSmrg fi 7238ad43ddacSmrg} 7239209ff23fSmrg 7240ad43ddacSmrg# func_basename file 7241ad43ddacSmrgfunc_basename () 7242ad43ddacSmrg{ 7243ad43ddacSmrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 7244ad43ddacSmrg} 7245209ff23fSmrg 7246ad43ddacSmrgdnl func_dirname_and_basename 7247ad43ddacSmrgdnl A portable version of this function is already defined in general.m4sh 7248ad43ddacSmrgdnl so there is no need for it here. 7249ad43ddacSmrg 7250ad43ddacSmrg# func_stripname prefix suffix name 7251ad43ddacSmrg# strip PREFIX and SUFFIX off of NAME. 7252ad43ddacSmrg# PREFIX and SUFFIX must not contain globbing or regex special 7253ad43ddacSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7254ad43ddacSmrg# dot (in which case that matches only a dot). 7255ad43ddacSmrg# func_strip_suffix prefix name 7256ad43ddacSmrgfunc_stripname () 7257ad43ddacSmrg{ 7258ad43ddacSmrg case ${2} in 7259ad43ddacSmrg .*) func_stripname_result=`$ECHO "X${3}" \ 7260ad43ddacSmrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 7261ad43ddacSmrg *) func_stripname_result=`$ECHO "X${3}" \ 7262ad43ddacSmrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 7263ad43ddacSmrg esac 7264ad43ddacSmrg} 7265209ff23fSmrg 7266ad43ddacSmrg# sed scripts: 7267ad43ddacSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 7268ad43ddacSmrgmy_sed_long_arg='1s/^-[[^=]]*=//' 7269209ff23fSmrg 7270ad43ddacSmrg# func_opt_split 7271ad43ddacSmrgfunc_opt_split () 7272ad43ddacSmrg{ 7273ad43ddacSmrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 7274ad43ddacSmrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 7275ad43ddacSmrg} 7276209ff23fSmrg 7277ad43ddacSmrg# func_lo2o object 7278ad43ddacSmrgfunc_lo2o () 7279ad43ddacSmrg{ 7280ad43ddacSmrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 7281ad43ddacSmrg} 7282209ff23fSmrg 7283ad43ddacSmrg# func_xform libobj-or-source 7284ad43ddacSmrgfunc_xform () 7285ad43ddacSmrg{ 7286ad43ddacSmrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 7287ad43ddacSmrg} 7288209ff23fSmrg 7289ad43ddacSmrg# func_arith arithmetic-term... 7290ad43ddacSmrgfunc_arith () 7291ad43ddacSmrg{ 7292ad43ddacSmrg func_arith_result=`expr "$[@]"` 7293ad43ddacSmrg} 7294209ff23fSmrg 7295ad43ddacSmrg# func_len string 7296ad43ddacSmrg# STRING may not start with a hyphen. 7297ad43ddacSmrgfunc_len () 7298ad43ddacSmrg{ 7299ad43ddacSmrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 7300ad43ddacSmrg} 7301209ff23fSmrg 7302ad43ddacSmrg_LT_EOF 7303ad43ddacSmrgesac 7304209ff23fSmrg 7305ad43ddacSmrgcase $lt_shell_append in 7306ad43ddacSmrg yes) 7307ad43ddacSmrg cat << \_LT_EOF >> "$cfgfile" 7308209ff23fSmrg 7309ad43ddacSmrg# func_append var value 7310ad43ddacSmrg# Append VALUE to the end of shell variable VAR. 7311ad43ddacSmrgfunc_append () 7312ad43ddacSmrg{ 7313ad43ddacSmrg eval "$[1]+=\$[2]" 7314ad43ddacSmrg} 7315ad43ddacSmrg_LT_EOF 7316ad43ddacSmrg ;; 7317ad43ddacSmrg *) 7318ad43ddacSmrg cat << \_LT_EOF >> "$cfgfile" 7319209ff23fSmrg 7320ad43ddacSmrg# func_append var value 7321ad43ddacSmrg# Append VALUE to the end of shell variable VAR. 7322ad43ddacSmrgfunc_append () 7323ad43ddacSmrg{ 7324ad43ddacSmrg eval "$[1]=\$$[1]\$[2]" 7325ad43ddacSmrg} 7326209ff23fSmrg 7327209ff23fSmrg_LT_EOF 7328ad43ddacSmrg ;; 7329ad43ddacSmrg esac 7330ad43ddacSmrg]) 7331ad43ddacSmrg 7332ad43ddacSmrg# Helper functions for option handling. -*- Autoconf -*- 7333ad43ddacSmrg# 7334ad43ddacSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7335ad43ddacSmrg# Written by Gary V. Vaughan, 2004 7336ad43ddacSmrg# 7337ad43ddacSmrg# This file is free software; the Free Software Foundation gives 7338ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without 7339ad43ddacSmrg# modifications, as long as this notice is preserved. 7340ad43ddacSmrg 7341ad43ddacSmrg# serial 6 ltoptions.m4 7342ad43ddacSmrg 7343ad43ddacSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7344ad43ddacSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7345ad43ddacSmrg 7346209ff23fSmrg 7347ad43ddacSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7348ad43ddacSmrg# ------------------------------------------ 7349ad43ddacSmrgm4_define([_LT_MANGLE_OPTION], 7350ad43ddacSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7351209ff23fSmrg 7352209ff23fSmrg 7353ad43ddacSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7354ad43ddacSmrg# --------------------------------------- 7355ad43ddacSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7356ad43ddacSmrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7357ad43ddacSmrg# saved as a flag. 7358ad43ddacSmrgm4_define([_LT_SET_OPTION], 7359ad43ddacSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7360ad43ddacSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7361ad43ddacSmrg _LT_MANGLE_DEFUN([$1], [$2]), 7362ad43ddacSmrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7363ad43ddacSmrg]) 7364209ff23fSmrg 7365209ff23fSmrg 7366ad43ddacSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7367ad43ddacSmrg# ------------------------------------------------------------ 7368ad43ddacSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7369ad43ddacSmrgm4_define([_LT_IF_OPTION], 7370ad43ddacSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7371ad43ddacSmrg 7372ad43ddacSmrg 7373ad43ddacSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7374ad43ddacSmrg# ------------------------------------------------------- 7375ad43ddacSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7376ad43ddacSmrg# are set. 7377ad43ddacSmrgm4_define([_LT_UNLESS_OPTIONS], 7378ad43ddacSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7379ad43ddacSmrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7380ad43ddacSmrg [m4_define([$0_found])])])[]dnl 7381ad43ddacSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7382ad43ddacSmrg])[]dnl 7383ad43ddacSmrg]) 7384209ff23fSmrg 7385209ff23fSmrg 7386ad43ddacSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7387ad43ddacSmrg# ---------------------------------------- 7388ad43ddacSmrg# OPTION-LIST is a space-separated list of Libtool options associated 7389ad43ddacSmrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7390ad43ddacSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7391ad43ddacSmrg# the unknown option and exit. 7392ad43ddacSmrgm4_defun([_LT_SET_OPTIONS], 7393ad43ddacSmrg[# Set options 7394ad43ddacSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7395ad43ddacSmrg [_LT_SET_OPTION([$1], _LT_Option)]) 7396ad43ddacSmrg 7397ad43ddacSmrgm4_if([$1],[LT_INIT],[ 7398ad43ddacSmrg dnl 7399ad43ddacSmrg dnl Simply set some default values (i.e off) if boolean options were not 7400ad43ddacSmrg dnl specified: 7401ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7402ad43ddacSmrg ]) 7403ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7404ad43ddacSmrg ]) 7405ad43ddacSmrg dnl 7406ad43ddacSmrg dnl If no reference was made to various pairs of opposing options, then 7407ad43ddacSmrg dnl we run the default mode handler for the pair. For example, if neither 7408ad43ddacSmrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7409ad43ddacSmrg dnl archives by default: 7410ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7411ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7412ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7413ad43ddacSmrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7414ad43ddacSmrg [_LT_ENABLE_FAST_INSTALL]) 7415ad43ddacSmrg ]) 7416ad43ddacSmrg])# _LT_SET_OPTIONS 7417209ff23fSmrg 7418209ff23fSmrg 7419209ff23fSmrg 7420ad43ddacSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7421ad43ddacSmrg# ----------------------------------------- 7422ad43ddacSmrgm4_define([_LT_MANGLE_DEFUN], 7423ad43ddacSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7424209ff23fSmrg 7425209ff23fSmrg 7426ad43ddacSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7427ad43ddacSmrg# ----------------------------------------------- 7428ad43ddacSmrgm4_define([LT_OPTION_DEFINE], 7429ad43ddacSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7430ad43ddacSmrg])# LT_OPTION_DEFINE 7431209ff23fSmrg 7432209ff23fSmrg 7433ad43ddacSmrg# dlopen 7434ad43ddacSmrg# ------ 7435ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7436ad43ddacSmrg]) 7437209ff23fSmrg 7438ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7439ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7440ad43ddacSmrgAC_DIAGNOSE([obsolete], 7441ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7442ad43ddacSmrgput the `dlopen' option into LT_INIT's first parameter.]) 7443ad43ddacSmrg]) 7444209ff23fSmrg 7445ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 7446ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 7447209ff23fSmrg 7448209ff23fSmrg 7449ad43ddacSmrg# win32-dll 7450ad43ddacSmrg# --------- 7451ad43ddacSmrg# Declare package support for building win32 dll's. 7452ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7453ad43ddacSmrg[enable_win32_dll=yes 7454209ff23fSmrg 7455ad43ddacSmrgcase $host in 7456ad43ddacSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32*) 7457ad43ddacSmrg AC_CHECK_TOOL(AS, as, false) 7458ad43ddacSmrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7459ad43ddacSmrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7460ad43ddacSmrg ;; 7461ad43ddacSmrgesac 7462209ff23fSmrg 7463ad43ddacSmrgtest -z "$AS" && AS=as 7464ad43ddacSmrg_LT_DECL([], [AS], [0], [Assembler program])dnl 7465209ff23fSmrg 7466ad43ddacSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7467ad43ddacSmrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 7468209ff23fSmrg 7469ad43ddacSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7470ad43ddacSmrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 7471ad43ddacSmrg])# win32-dll 7472209ff23fSmrg 7473ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7474ad43ddacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7475ad43ddacSmrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7476ad43ddacSmrgAC_DIAGNOSE([obsolete], 7477ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7478ad43ddacSmrgput the `win32-dll' option into LT_INIT's first parameter.]) 7479ad43ddacSmrg]) 7480209ff23fSmrg 7481ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 7482ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 7483ad43ddacSmrg 7484ad43ddacSmrg 7485ad43ddacSmrg# _LT_ENABLE_SHARED([DEFAULT]) 7486ad43ddacSmrg# ---------------------------- 7487ad43ddacSmrg# implement the --enable-shared flag, and supports the `shared' and 7488ad43ddacSmrg# `disable-shared' LT_INIT options. 7489ad43ddacSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7490ad43ddacSmrgm4_define([_LT_ENABLE_SHARED], 7491ad43ddacSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 7492ad43ddacSmrgAC_ARG_ENABLE([shared], 7493ad43ddacSmrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 7494ad43ddacSmrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 7495ad43ddacSmrg [p=${PACKAGE-default} 7496ad43ddacSmrg case $enableval in 7497ad43ddacSmrg yes) enable_shared=yes ;; 7498ad43ddacSmrg no) enable_shared=no ;; 7499ad43ddacSmrg *) 7500ad43ddacSmrg enable_shared=no 7501ad43ddacSmrg # Look at the argument we got. We use all the common list separators. 7502ad43ddacSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7503ad43ddacSmrg for pkg in $enableval; do 7504ad43ddacSmrg IFS="$lt_save_ifs" 7505ad43ddacSmrg if test "X$pkg" = "X$p"; then 7506ad43ddacSmrg enable_shared=yes 7507ad43ddacSmrg fi 7508ad43ddacSmrg done 7509ad43ddacSmrg IFS="$lt_save_ifs" 7510209ff23fSmrg ;; 7511ad43ddacSmrg esac], 7512ad43ddacSmrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 7513209ff23fSmrg 7514ad43ddacSmrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 7515ad43ddacSmrg [Whether or not to build shared libraries]) 7516ad43ddacSmrg])# _LT_ENABLE_SHARED 7517209ff23fSmrg 7518ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 7519ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 7520209ff23fSmrg 7521ad43ddacSmrg# Old names: 7522ad43ddacSmrgAC_DEFUN([AC_ENABLE_SHARED], 7523ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 7524ad43ddacSmrg]) 7525209ff23fSmrg 7526ad43ddacSmrgAC_DEFUN([AC_DISABLE_SHARED], 7527ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 7528ad43ddacSmrg]) 7529209ff23fSmrg 7530ad43ddacSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7531ad43ddacSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7532209ff23fSmrg 7533ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 7534ad43ddacSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 7535ad43ddacSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 7536ad43ddacSmrg 7537ad43ddacSmrg 7538ad43ddacSmrg 7539ad43ddacSmrg# _LT_ENABLE_STATIC([DEFAULT]) 7540ad43ddacSmrg# ---------------------------- 7541ad43ddacSmrg# implement the --enable-static flag, and support the `static' and 7542ad43ddacSmrg# `disable-static' LT_INIT options. 7543ad43ddacSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7544ad43ddacSmrgm4_define([_LT_ENABLE_STATIC], 7545ad43ddacSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 7546ad43ddacSmrgAC_ARG_ENABLE([static], 7547ad43ddacSmrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 7548ad43ddacSmrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 7549ad43ddacSmrg [p=${PACKAGE-default} 7550ad43ddacSmrg case $enableval in 7551ad43ddacSmrg yes) enable_static=yes ;; 7552ad43ddacSmrg no) enable_static=no ;; 7553ad43ddacSmrg *) 7554ad43ddacSmrg enable_static=no 7555ad43ddacSmrg # Look at the argument we got. We use all the common list separators. 7556ad43ddacSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7557ad43ddacSmrg for pkg in $enableval; do 7558ad43ddacSmrg IFS="$lt_save_ifs" 7559ad43ddacSmrg if test "X$pkg" = "X$p"; then 7560ad43ddacSmrg enable_static=yes 7561ad43ddacSmrg fi 7562ad43ddacSmrg done 7563ad43ddacSmrg IFS="$lt_save_ifs" 7564209ff23fSmrg ;; 7565ad43ddacSmrg esac], 7566ad43ddacSmrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 7567209ff23fSmrg 7568ad43ddacSmrg _LT_DECL([build_old_libs], [enable_static], [0], 7569ad43ddacSmrg [Whether or not to build static libraries]) 7570ad43ddacSmrg])# _LT_ENABLE_STATIC 7571209ff23fSmrg 7572ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 7573ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 7574209ff23fSmrg 7575ad43ddacSmrg# Old names: 7576ad43ddacSmrgAC_DEFUN([AC_ENABLE_STATIC], 7577ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 7578ad43ddacSmrg]) 7579209ff23fSmrg 7580ad43ddacSmrgAC_DEFUN([AC_DISABLE_STATIC], 7581ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 7582ad43ddacSmrg]) 7583209ff23fSmrg 7584ad43ddacSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7585ad43ddacSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7586209ff23fSmrg 7587ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 7588ad43ddacSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 7589ad43ddacSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 7590ad43ddacSmrg 7591ad43ddacSmrg 7592ad43ddacSmrg 7593ad43ddacSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 7594ad43ddacSmrg# ---------------------------------- 7595ad43ddacSmrg# implement the --enable-fast-install flag, and support the `fast-install' 7596ad43ddacSmrg# and `disable-fast-install' LT_INIT options. 7597ad43ddacSmrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7598ad43ddacSmrgm4_define([_LT_ENABLE_FAST_INSTALL], 7599ad43ddacSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 7600ad43ddacSmrgAC_ARG_ENABLE([fast-install], 7601ad43ddacSmrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 7602ad43ddacSmrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 7603ad43ddacSmrg [p=${PACKAGE-default} 7604ad43ddacSmrg case $enableval in 7605ad43ddacSmrg yes) enable_fast_install=yes ;; 7606ad43ddacSmrg no) enable_fast_install=no ;; 7607ad43ddacSmrg *) 7608ad43ddacSmrg enable_fast_install=no 7609ad43ddacSmrg # Look at the argument we got. We use all the common list separators. 7610ad43ddacSmrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7611ad43ddacSmrg for pkg in $enableval; do 7612ad43ddacSmrg IFS="$lt_save_ifs" 7613ad43ddacSmrg if test "X$pkg" = "X$p"; then 7614ad43ddacSmrg enable_fast_install=yes 7615209ff23fSmrg fi 7616ad43ddacSmrg done 7617ad43ddacSmrg IFS="$lt_save_ifs" 7618209ff23fSmrg ;; 7619ad43ddacSmrg esac], 7620ad43ddacSmrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 7621209ff23fSmrg 7622ad43ddacSmrg_LT_DECL([fast_install], [enable_fast_install], [0], 7623ad43ddacSmrg [Whether or not to optimize for fast installation])dnl 7624ad43ddacSmrg])# _LT_ENABLE_FAST_INSTALL 7625209ff23fSmrg 7626ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 7627ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 7628209ff23fSmrg 7629ad43ddacSmrg# Old names: 7630ad43ddacSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 7631ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 7632ad43ddacSmrgAC_DIAGNOSE([obsolete], 7633ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7634ad43ddacSmrgthe `fast-install' option into LT_INIT's first parameter.]) 7635ad43ddacSmrg]) 7636209ff23fSmrg 7637ad43ddacSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 7638ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 7639ad43ddacSmrgAC_DIAGNOSE([obsolete], 7640ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7641ad43ddacSmrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 7642ad43ddacSmrg]) 7643209ff23fSmrg 7644ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 7645ad43ddacSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 7646ad43ddacSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 7647209ff23fSmrg 7648209ff23fSmrg 7649ad43ddacSmrg# _LT_WITH_PIC([MODE]) 7650ad43ddacSmrg# -------------------- 7651ad43ddacSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 7652ad43ddacSmrg# LT_INIT options. 7653ad43ddacSmrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 7654ad43ddacSmrgm4_define([_LT_WITH_PIC], 7655ad43ddacSmrg[AC_ARG_WITH([pic], 7656ad43ddacSmrg [AS_HELP_STRING([--with-pic], 7657ad43ddacSmrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 7658ad43ddacSmrg [pic_mode="$withval"], 7659ad43ddacSmrg [pic_mode=default]) 7660209ff23fSmrg 7661ad43ddacSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 7662209ff23fSmrg 7663ad43ddacSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 7664ad43ddacSmrg])# _LT_WITH_PIC 7665209ff23fSmrg 7666ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 7667ad43ddacSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 7668ad43ddacSmrg 7669ad43ddacSmrg# Old name: 7670ad43ddacSmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 7671ad43ddacSmrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 7672ad43ddacSmrgAC_DIAGNOSE([obsolete], 7673ad43ddacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7674ad43ddacSmrgput the `pic-only' option into LT_INIT's first parameter.]) 7675209ff23fSmrg]) 7676209ff23fSmrg 7677ad43ddacSmrgdnl aclocal-1.4 backwards compatibility: 7678ad43ddacSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 7679209ff23fSmrg 7680209ff23fSmrg 7681ad43ddacSmrgm4_define([_LTDL_MODE], []) 7682ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 7683ad43ddacSmrg [m4_define([_LTDL_MODE], [nonrecursive])]) 7684ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 7685ad43ddacSmrg [m4_define([_LTDL_MODE], [recursive])]) 7686ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 7687ad43ddacSmrg [m4_define([_LTDL_MODE], [subproject])]) 7688209ff23fSmrg 7689ad43ddacSmrgm4_define([_LTDL_TYPE], []) 7690ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 7691ad43ddacSmrg [m4_define([_LTDL_TYPE], [installable])]) 7692ad43ddacSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 7693ad43ddacSmrg [m4_define([_LTDL_TYPE], [convenience])]) 7694209ff23fSmrg 7695ad43ddacSmrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 7696209ff23fSmrg# 7697ad43ddacSmrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 7698ad43ddacSmrg# Written by Gary V. Vaughan, 2004 7699209ff23fSmrg# 7700ad43ddacSmrg# This file is free software; the Free Software Foundation gives 7701ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without 7702ad43ddacSmrg# modifications, as long as this notice is preserved. 7703ad43ddacSmrg 7704ad43ddacSmrg# serial 5 ltsugar.m4 7705ad43ddacSmrg 7706ad43ddacSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7707ad43ddacSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 7708ad43ddacSmrg 7709ad43ddacSmrg 7710ad43ddacSmrg# lt_join(SEP, ARG1, [ARG2...]) 7711ad43ddacSmrg# ----------------------------- 7712ad43ddacSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 7713ad43ddacSmrg# associated separator. 7714ad43ddacSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 7715ad43ddacSmrg# versions in m4sugar had bugs. 7716ad43ddacSmrgm4_define([lt_join], 7717ad43ddacSmrg[m4_if([$#], [1], [], 7718ad43ddacSmrg [$#], [2], [[$2]], 7719ad43ddacSmrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 7720ad43ddacSmrgm4_define([_lt_join], 7721ad43ddacSmrg[m4_if([$#$2], [2], [], 7722ad43ddacSmrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 7723ad43ddacSmrg 7724ad43ddacSmrg 7725ad43ddacSmrg# lt_car(LIST) 7726ad43ddacSmrg# lt_cdr(LIST) 7727ad43ddacSmrg# ------------ 7728ad43ddacSmrg# Manipulate m4 lists. 7729ad43ddacSmrg# These macros are necessary as long as will still need to support 7730ad43ddacSmrg# Autoconf-2.59 which quotes differently. 7731ad43ddacSmrgm4_define([lt_car], [[$1]]) 7732ad43ddacSmrgm4_define([lt_cdr], 7733ad43ddacSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 7734ad43ddacSmrg [$#], 1, [], 7735ad43ddacSmrg [m4_dquote(m4_shift($@))])]) 7736ad43ddacSmrgm4_define([lt_unquote], $1) 7737ad43ddacSmrg 7738ad43ddacSmrg 7739ad43ddacSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 7740ad43ddacSmrg# ------------------------------------------ 7741ad43ddacSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 7742ad43ddacSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 7743ad43ddacSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 7744ad43ddacSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 7745ad43ddacSmrg# than defined and empty). 7746209ff23fSmrg# 7747ad43ddacSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 7748ad43ddacSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 7749ad43ddacSmrgm4_define([lt_append], 7750ad43ddacSmrg[m4_define([$1], 7751ad43ddacSmrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 7752ad43ddacSmrg 7753ad43ddacSmrg 7754ad43ddacSmrg 7755ad43ddacSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 7756ad43ddacSmrg# ---------------------------------------------------------- 7757ad43ddacSmrg# Produce a SEP delimited list of all paired combinations of elements of 7758ad43ddacSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 7759ad43ddacSmrg# has the form PREFIXmINFIXSUFFIXn. 7760ad43ddacSmrgm4_define([lt_combine], 7761ad43ddacSmrg[m4_if([$2], [], [], 7762ad43ddacSmrg [m4_if([$4], [], [], 7763ad43ddacSmrg [lt_join(m4_quote(m4_default([$1], [[, ]])), 7764ad43ddacSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2], 7765ad43ddacSmrg [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]), 7766ad43ddacSmrg [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl 7767ad43ddacSmrg]) 7768209ff23fSmrg 7769209ff23fSmrg 7770ad43ddacSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 7771ad43ddacSmrg# ----------------------------------------------------------------------- 7772ad43ddacSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 7773ad43ddacSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 7774ad43ddacSmrgm4_define([lt_if_append_uniq], 7775ad43ddacSmrg[m4_ifdef([$1], 7776ad43ddacSmrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 7777ad43ddacSmrg [lt_append([$1], [$2], [$3])$4], 7778ad43ddacSmrg [$5])], 7779ad43ddacSmrg [lt_append([$1], [$2], [$3])$4])]) 7780209ff23fSmrg 7781209ff23fSmrg 7782ad43ddacSmrg# lt_dict_add(DICT, KEY, VALUE) 7783ad43ddacSmrg# ----------------------------- 7784ad43ddacSmrgm4_define([lt_dict_add], 7785ad43ddacSmrg[m4_define([$1($2)], [$3])]) 7786209ff23fSmrg 7787209ff23fSmrg 7788ad43ddacSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 7789ad43ddacSmrg# -------------------------------------------- 7790ad43ddacSmrgm4_define([lt_dict_add_subkey], 7791ad43ddacSmrg[m4_define([$1($2:$3)], [$4])]) 7792209ff23fSmrg 7793209ff23fSmrg 7794ad43ddacSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 7795ad43ddacSmrg# ---------------------------------- 7796ad43ddacSmrgm4_define([lt_dict_fetch], 7797ad43ddacSmrg[m4_ifval([$3], 7798ad43ddacSmrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 7799ad43ddacSmrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 7800209ff23fSmrg 7801209ff23fSmrg 7802ad43ddacSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 7803ad43ddacSmrg# ----------------------------------------------------------------- 7804ad43ddacSmrgm4_define([lt_if_dict_fetch], 7805ad43ddacSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 7806ad43ddacSmrg [$5], 7807ad43ddacSmrg [$6])]) 7808209ff23fSmrg 7809209ff23fSmrg 7810ad43ddacSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 7811ad43ddacSmrg# -------------------------------------------------------------- 7812ad43ddacSmrgm4_define([lt_dict_filter], 7813ad43ddacSmrg[m4_if([$5], [], [], 7814ad43ddacSmrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 7815ad43ddacSmrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 7816ad43ddacSmrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 7817209ff23fSmrg]) 7818ad43ddacSmrg 7819ad43ddacSmrg# ltversion.m4 -- version numbers -*- Autoconf -*- 7820ad43ddacSmrg# 7821ad43ddacSmrg# Copyright (C) 2004 Free Software Foundation, Inc. 7822ad43ddacSmrg# Written by Scott James Remnant, 2004 7823ad43ddacSmrg# 7824ad43ddacSmrg# This file is free software; the Free Software Foundation gives 7825ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without 7826ad43ddacSmrg# modifications, as long as this notice is preserved. 7827ad43ddacSmrg 7828ad43ddacSmrg# Generated from ltversion.in. 7829ad43ddacSmrg 7830ad43ddacSmrg# serial 2976 ltversion.m4 7831ad43ddacSmrg# This file is part of GNU Libtool 7832ad43ddacSmrg 7833ad43ddacSmrgm4_define([LT_PACKAGE_VERSION], [2.2.4]) 7834ad43ddacSmrgm4_define([LT_PACKAGE_REVISION], [1.2976]) 7835ad43ddacSmrg 7836ad43ddacSmrgAC_DEFUN([LTVERSION_VERSION], 7837ad43ddacSmrg[macro_version='2.2.4' 7838ad43ddacSmrgmacro_revision='1.2976' 7839ad43ddacSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 7840ad43ddacSmrg_LT_DECL(, macro_revision, 0) 7841209ff23fSmrg]) 7842209ff23fSmrg 7843ad43ddacSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 7844ad43ddacSmrg# 7845ad43ddacSmrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 7846ad43ddacSmrg# Written by Scott James Remnant, 2004. 7847ad43ddacSmrg# 7848ad43ddacSmrg# This file is free software; the Free Software Foundation gives 7849ad43ddacSmrg# unlimited permission to copy and/or distribute it, with or without 7850ad43ddacSmrg# modifications, as long as this notice is preserved. 7851ad43ddacSmrg 7852ad43ddacSmrg# serial 4 lt~obsolete.m4 7853ad43ddacSmrg 7854ad43ddacSmrg# These exist entirely to fool aclocal when bootstrapping libtool. 7855ad43ddacSmrg# 7856ad43ddacSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 7857ad43ddacSmrg# which have later been changed to m4_define as they aren't part of the 7858ad43ddacSmrg# exported API, or moved to Autoconf or Automake where they belong. 7859ad43ddacSmrg# 7860ad43ddacSmrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 7861ad43ddacSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 7862ad43ddacSmrg# using a macro with the same name in our local m4/libtool.m4 it'll 7863ad43ddacSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 7864ad43ddacSmrg# and doesn't know about Autoconf macros at all.) 7865ad43ddacSmrg# 7866ad43ddacSmrg# So we provide this file, which has a silly filename so it's always 7867ad43ddacSmrg# included after everything else. This provides aclocal with the 7868ad43ddacSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 7869ad43ddacSmrg# because those macros already exist, or will be overwritten later. 7870ad43ddacSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 7871ad43ddacSmrg# 7872ad43ddacSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 7873ad43ddacSmrg# Yes, that means every name once taken will need to remain here until 7874ad43ddacSmrg# we give up compatibility with versions before 1.7, at which point 7875ad43ddacSmrg# we need to keep only those names which we still refer to. 7876ad43ddacSmrg 7877ad43ddacSmrg# This is to help aclocal find these macros, as it can't see m4_define. 7878ad43ddacSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 7879ad43ddacSmrg 7880ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 7881ad43ddacSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 7882ad43ddacSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 7883ad43ddacSmrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 7884ad43ddacSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 7885ad43ddacSmrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 7886ad43ddacSmrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 7887ad43ddacSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 7888ad43ddacSmrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 7889ad43ddacSmrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 7890ad43ddacSmrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 7891ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 7892ad43ddacSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 7893ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 7894ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 7895ad43ddacSmrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 7896ad43ddacSmrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 7897ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 7898ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 7899ad43ddacSmrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 7900ad43ddacSmrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 7901ad43ddacSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 7902ad43ddacSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 7903ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 7904ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 7905ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 7906ad43ddacSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 7907ad43ddacSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 7908ad43ddacSmrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 7909ad43ddacSmrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 7910ad43ddacSmrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 7911ad43ddacSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 7912ad43ddacSmrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 7913ad43ddacSmrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 7914ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 7915ad43ddacSmrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 7916ad43ddacSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 7917ad43ddacSmrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 7918ad43ddacSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 7919ad43ddacSmrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 7920ad43ddacSmrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 7921ad43ddacSmrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 7922ad43ddacSmrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 7923ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 7924ad43ddacSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 7925ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 7926ad43ddacSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 7927ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 7928ad43ddacSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 7929ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 7930ad43ddacSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 7931ad43ddacSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 7932ad43ddacSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 7933ad43ddacSmrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 7934ad43ddacSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 7935ad43ddacSmrg 7936209ff23fSmrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 7937209ff23fSmrg# 7938209ff23fSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 7939209ff23fSmrg# 7940209ff23fSmrg# This program is free software; you can redistribute it and/or modify 7941209ff23fSmrg# it under the terms of the GNU General Public License as published by 7942209ff23fSmrg# the Free Software Foundation; either version 2 of the License, or 7943209ff23fSmrg# (at your option) any later version. 7944209ff23fSmrg# 7945209ff23fSmrg# This program is distributed in the hope that it will be useful, but 7946209ff23fSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of 7947209ff23fSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 7948209ff23fSmrg# General Public License for more details. 7949209ff23fSmrg# 7950209ff23fSmrg# You should have received a copy of the GNU General Public License 7951209ff23fSmrg# along with this program; if not, write to the Free Software 7952209ff23fSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 7953209ff23fSmrg# 7954209ff23fSmrg# As a special exception to the GNU General Public License, if you 7955209ff23fSmrg# distribute this file as part of a program that contains a 7956209ff23fSmrg# configuration script generated by Autoconf, you may include it under 7957209ff23fSmrg# the same distribution terms that you use for the rest of that program. 7958209ff23fSmrg 7959209ff23fSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 7960209ff23fSmrg# ---------------------------------- 7961209ff23fSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 7962209ff23fSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 7963209ff23fSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 7964209ff23fSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 7965209ff23fSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 7966209ff23fSmrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 7967209ff23fSmrgfi 7968209ff23fSmrgif test -n "$PKG_CONFIG"; then 7969209ff23fSmrg _pkg_min_version=m4_default([$1], [0.9.0]) 7970209ff23fSmrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 7971209ff23fSmrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 7972209ff23fSmrg AC_MSG_RESULT([yes]) 7973209ff23fSmrg else 7974209ff23fSmrg AC_MSG_RESULT([no]) 7975209ff23fSmrg PKG_CONFIG="" 7976209ff23fSmrg fi 7977209ff23fSmrg 7978209ff23fSmrgfi[]dnl 7979209ff23fSmrg])# PKG_PROG_PKG_CONFIG 7980209ff23fSmrg 7981209ff23fSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 7982209ff23fSmrg# 7983209ff23fSmrg# Check to see whether a particular set of modules exists. Similar 7984209ff23fSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 7985209ff23fSmrg# 7986209ff23fSmrg# 7987209ff23fSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 7988209ff23fSmrg# this or PKG_CHECK_MODULES is called, or make sure to call 7989209ff23fSmrg# PKG_CHECK_EXISTS manually 7990209ff23fSmrg# -------------------------------------------------------------- 7991209ff23fSmrgAC_DEFUN([PKG_CHECK_EXISTS], 7992209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 7993209ff23fSmrgif test -n "$PKG_CONFIG" && \ 7994209ff23fSmrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 7995209ff23fSmrg m4_ifval([$2], [$2], [:]) 7996209ff23fSmrgm4_ifvaln([$3], [else 7997209ff23fSmrg $3])dnl 7998209ff23fSmrgfi]) 7999209ff23fSmrg 8000209ff23fSmrg 8001209ff23fSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8002209ff23fSmrg# --------------------------------------------- 8003209ff23fSmrgm4_define([_PKG_CONFIG], 8004ad43ddacSmrg[if test -n "$PKG_CONFIG"; then 8005ad43ddacSmrg if test -n "$$1"; then 8006ad43ddacSmrg pkg_cv_[]$1="$$1" 8007ad43ddacSmrg else 8008ad43ddacSmrg PKG_CHECK_EXISTS([$3], 8009ad43ddacSmrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8010ad43ddacSmrg [pkg_failed=yes]) 8011ad43ddacSmrg fi 8012ad43ddacSmrgelse 8013ad43ddacSmrg pkg_failed=untried 8014209ff23fSmrgfi[]dnl 8015209ff23fSmrg])# _PKG_CONFIG 8016209ff23fSmrg 8017209ff23fSmrg# _PKG_SHORT_ERRORS_SUPPORTED 8018209ff23fSmrg# ----------------------------- 8019209ff23fSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8020209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8021209ff23fSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8022209ff23fSmrg _pkg_short_errors_supported=yes 8023209ff23fSmrgelse 8024209ff23fSmrg _pkg_short_errors_supported=no 8025209ff23fSmrgfi[]dnl 8026209ff23fSmrg])# _PKG_SHORT_ERRORS_SUPPORTED 8027209ff23fSmrg 8028209ff23fSmrg 8029209ff23fSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8030209ff23fSmrg# [ACTION-IF-NOT-FOUND]) 8031209ff23fSmrg# 8032209ff23fSmrg# 8033209ff23fSmrg# Note that if there is a possibility the first call to 8034209ff23fSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8035209ff23fSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8036209ff23fSmrg# 8037209ff23fSmrg# 8038209ff23fSmrg# -------------------------------------------------------------- 8039209ff23fSmrgAC_DEFUN([PKG_CHECK_MODULES], 8040209ff23fSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8041209ff23fSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8042209ff23fSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8043209ff23fSmrg 8044209ff23fSmrgpkg_failed=no 8045209ff23fSmrgAC_MSG_CHECKING([for $1]) 8046209ff23fSmrg 8047209ff23fSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8048209ff23fSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8049209ff23fSmrg 8050209ff23fSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8051209ff23fSmrgand $1[]_LIBS to avoid the need to call pkg-config. 8052209ff23fSmrgSee the pkg-config man page for more details.]) 8053209ff23fSmrg 8054209ff23fSmrgif test $pkg_failed = yes; then 8055209ff23fSmrg _PKG_SHORT_ERRORS_SUPPORTED 8056209ff23fSmrg if test $_pkg_short_errors_supported = yes; then 8057ad43ddacSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` 8058209ff23fSmrg else 8059ad43ddacSmrg $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` 8060209ff23fSmrg fi 8061209ff23fSmrg # Put the nasty error message in config.log where it belongs 8062209ff23fSmrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8063209ff23fSmrg 8064209ff23fSmrg ifelse([$4], , [AC_MSG_ERROR(dnl 8065209ff23fSmrg[Package requirements ($2) were not met: 8066209ff23fSmrg 8067209ff23fSmrg$$1_PKG_ERRORS 8068209ff23fSmrg 8069209ff23fSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8070209ff23fSmrginstalled software in a non-standard prefix. 8071209ff23fSmrg 8072209ff23fSmrg_PKG_TEXT 8073209ff23fSmrg])], 8074209ff23fSmrg [AC_MSG_RESULT([no]) 8075209ff23fSmrg $4]) 8076209ff23fSmrgelif test $pkg_failed = untried; then 8077209ff23fSmrg ifelse([$4], , [AC_MSG_FAILURE(dnl 8078209ff23fSmrg[The pkg-config script could not be found or is too old. Make sure it 8079209ff23fSmrgis in your PATH or set the PKG_CONFIG environment variable to the full 8080209ff23fSmrgpath to pkg-config. 8081209ff23fSmrg 8082209ff23fSmrg_PKG_TEXT 8083209ff23fSmrg 8084209ff23fSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 8085209ff23fSmrg [$4]) 8086209ff23fSmrgelse 8087209ff23fSmrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8088209ff23fSmrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8089209ff23fSmrg AC_MSG_RESULT([yes]) 8090209ff23fSmrg ifelse([$3], , :, [$3]) 8091209ff23fSmrgfi[]dnl 8092209ff23fSmrg])# PKG_CHECK_MODULES 8093209ff23fSmrg 8094c503f109Smrgdnl 8095c503f109Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 8096c503f109Smrgdnl 8097c503f109Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 8098c503f109Smrgdnl copy of this software and associated documentation files (the 8099c503f109Smrgdnl "Software"), to deal in the Software without restriction, including 8100c503f109Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 8101c503f109Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 8102c503f109Smrgdnl to whom the Software is furnished to do so, provided that the above 8103c503f109Smrgdnl copyright notice(s) and this permission notice appear in all copies of 8104c503f109Smrgdnl the Software and that both the above copyright notice(s) and this 8105c503f109Smrgdnl permission notice appear in supporting documentation. 8106c503f109Smrgdnl 8107c503f109Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 8108c503f109Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 8109c503f109Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 8110c503f109Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 8111c503f109Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 8112c503f109Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 8113c503f109Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 8114c503f109Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 8115c503f109Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 8116c503f109Smrgdnl 8117c503f109Smrgdnl Except as contained in this notice, the name of a copyright holder 8118c503f109Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 8119c503f109Smrgdnl or other dealings in this Software without prior written authorization 8120c503f109Smrgdnl of the copyright holder. 8121209ff23fSmrg 8122c503f109Smrg# XORG_MACROS_VERSION(required-version) 8123c503f109Smrg# ------------------------------------- 8124c503f109Smrg# Minimum version: 1.1.0 8125209ff23fSmrg# 8126c503f109Smrg# If you're using a macro added in Version 1.1 or newer, include this in 8127c503f109Smrg# your configure.ac with the minimum required version, such as: 8128c503f109Smrg# XORG_MACROS_VERSION(1.1) 8129209ff23fSmrg# 8130c503f109Smrg# To force at least a version with this macro defined, also add: 8131c503f109Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 8132209ff23fSmrg# 8133209ff23fSmrg# 8134c503f109Smrg# See the "minimum version" comment for each macro you use to see what 8135c503f109Smrg# version you require. 8136c503f109SmrgAC_DEFUN([XORG_MACROS_VERSION],[ 8137c503f109Smrg [XORG_MACROS_needed_version=$1 8138c503f109Smrg XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'` 8139c503f109Smrg XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 8140c503f109Smrg AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}]) 8141ad43ddacSmrg [XORG_MACROS_version=1.1.6 8142c503f109Smrg XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'` 8143c503f109Smrg XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`] 8144c503f109Smrg if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then 8145c503f109Smrg AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x]) 8146c503f109Smrg fi 8147c503f109Smrg if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then 8148c503f109Smrg AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer]) 8149c503f109Smrg fi 8150c503f109Smrg AC_MSG_RESULT([yes, $XORG_MACROS_version]) 8151c503f109Smrg]) # XORG_MACROS_VERSION 8152209ff23fSmrg 8153c503f109Smrg# XORG_PROG_RAWCPP() 8154c503f109Smrg# ------------------ 8155c503f109Smrg# Minimum version: 1.0.0 8156209ff23fSmrg# 8157c503f109Smrg# Find cpp program and necessary flags for use in pre-processing text files 8158c503f109Smrg# such as man pages and config files 8159c503f109SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 8160c503f109SmrgAC_REQUIRE([AC_PROG_CPP]) 8161c503f109SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 8162c503f109Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 8163209ff23fSmrg 8164c503f109Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 8165c503f109Smrg# which is not the best choice for supporting other OS'es, but covers most 8166c503f109Smrg# of the ones we need for now. 8167c503f109SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 8168c503f109SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 8169c503f109Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8170c503f109Smrg AC_MSG_RESULT([no]) 8171c503f109Smrgelse 8172c503f109Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 8173c503f109Smrg RAWCPPFLAGS=-undef 8174c503f109Smrg AC_MSG_RESULT([yes]) 8175c503f109Smrg else 8176c503f109Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 8177c503f109Smrg fi 8178c503f109Smrgfi 8179c503f109Smrgrm -f conftest.$ac_ext 8180209ff23fSmrg 8181c503f109SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 8182c503f109SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 8183c503f109Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8184c503f109Smrg AC_MSG_RESULT([no]) 8185209ff23fSmrgelse 8186c503f109Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 8187c503f109Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 8188c503f109Smrg AC_MSG_RESULT([yes]) 8189c503f109Smrg else 8190c503f109Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 8191c503f109Smrg fi 8192209ff23fSmrgfi 8193c503f109Smrgrm -f conftest.$ac_ext 8194c503f109SmrgAC_SUBST(RAWCPPFLAGS) 8195c503f109Smrg]) # XORG_PROG_RAWCPP 8196209ff23fSmrg 8197c503f109Smrg# XORG_MANPAGE_SECTIONS() 8198c503f109Smrg# ----------------------- 8199c503f109Smrg# Minimum version: 1.0.0 8200209ff23fSmrg# 8201c503f109Smrg# Determine which sections man pages go in for the different man page types 8202c503f109Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 8203c503f109Smrg# Not sure if there's any better way than just hardcoding by OS name. 8204c503f109Smrg# Override default settings by setting environment variables 8205209ff23fSmrg 8206c503f109SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 8207c503f109SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 8208209ff23fSmrg 8209c503f109Smrgif test x$APP_MAN_SUFFIX = x ; then 8210c503f109Smrg APP_MAN_SUFFIX=1 8211c503f109Smrgfi 8212c503f109Smrgif test x$APP_MAN_DIR = x ; then 8213c503f109Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 8214c503f109Smrgfi 8215209ff23fSmrg 8216c503f109Smrgif test x$LIB_MAN_SUFFIX = x ; then 8217c503f109Smrg LIB_MAN_SUFFIX=3 8218c503f109Smrgfi 8219c503f109Smrgif test x$LIB_MAN_DIR = x ; then 8220c503f109Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 8221c503f109Smrgfi 8222209ff23fSmrg 8223c503f109Smrgif test x$FILE_MAN_SUFFIX = x ; then 8224c503f109Smrg case $host_os in 8225c503f109Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 8226c503f109Smrg *) FILE_MAN_SUFFIX=5 ;; 8227c503f109Smrg esac 8228c503f109Smrgfi 8229c503f109Smrgif test x$FILE_MAN_DIR = x ; then 8230c503f109Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 8231c503f109Smrgfi 8232209ff23fSmrg 8233c503f109Smrgif test x$MISC_MAN_SUFFIX = x ; then 8234c503f109Smrg case $host_os in 8235c503f109Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 8236c503f109Smrg *) MISC_MAN_SUFFIX=7 ;; 8237209ff23fSmrg esac 8238c503f109Smrgfi 8239c503f109Smrgif test x$MISC_MAN_DIR = x ; then 8240c503f109Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 8241c503f109Smrgfi 8242209ff23fSmrg 8243c503f109Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 8244c503f109Smrg case $host_os in 8245c503f109Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 8246c503f109Smrg *) DRIVER_MAN_SUFFIX=4 ;; 8247c503f109Smrg esac 8248c503f109Smrgfi 8249c503f109Smrgif test x$DRIVER_MAN_DIR = x ; then 8250c503f109Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 8251209ff23fSmrgfi 8252209ff23fSmrg 8253c503f109Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 8254c503f109Smrg case $host_os in 8255c503f109Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 8256c503f109Smrg *) ADMIN_MAN_SUFFIX=8 ;; 8257c503f109Smrg esac 8258c503f109Smrgfi 8259c503f109Smrgif test x$ADMIN_MAN_DIR = x ; then 8260c503f109Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 8261c503f109Smrgfi 8262209ff23fSmrg 8263209ff23fSmrg 8264c503f109SmrgAC_SUBST([APP_MAN_SUFFIX]) 8265c503f109SmrgAC_SUBST([LIB_MAN_SUFFIX]) 8266c503f109SmrgAC_SUBST([FILE_MAN_SUFFIX]) 8267c503f109SmrgAC_SUBST([MISC_MAN_SUFFIX]) 8268c503f109SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 8269c503f109SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 8270c503f109SmrgAC_SUBST([APP_MAN_DIR]) 8271c503f109SmrgAC_SUBST([LIB_MAN_DIR]) 8272c503f109SmrgAC_SUBST([FILE_MAN_DIR]) 8273c503f109SmrgAC_SUBST([MISC_MAN_DIR]) 8274c503f109SmrgAC_SUBST([DRIVER_MAN_DIR]) 8275c503f109SmrgAC_SUBST([ADMIN_MAN_DIR]) 8276c503f109Smrg]) # XORG_MANPAGE_SECTIONS 8277209ff23fSmrg 8278c503f109Smrg# XORG_CHECK_LINUXDOC 8279c503f109Smrg# ------------------- 8280c503f109Smrg# Minimum version: 1.0.0 8281c503f109Smrg# 8282c503f109Smrg# Defines the variable MAKE_TEXT if the necessary tools and 8283c503f109Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 8284c503f109Smrg# Whether or not the necessary tools and files are found can be checked 8285c503f109Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 8286c503f109SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 8287ad43ddacSmrgXORG_SGML_PATH=$prefix/share/sgml 8288c503f109SmrgHAVE_DEFS_ENT= 8289209ff23fSmrg 8290c503f109Smrgif test x"$cross_compiling" = x"yes" ; then 8291c503f109Smrg HAVE_DEFS_ENT=no 8292c503f109Smrgelse 8293c503f109Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 8294c503f109Smrgfi 8295209ff23fSmrg 8296c503f109SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 8297c503f109SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 8298209ff23fSmrg 8299c503f109SmrgAC_MSG_CHECKING([Whether to build documentation]) 8300209ff23fSmrg 8301c503f109Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 8302c503f109Smrg BUILDDOC=yes 8303c503f109Smrgelse 8304c503f109Smrg BUILDDOC=no 8305c503f109Smrgfi 8306209ff23fSmrg 8307c503f109SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 8308209ff23fSmrg 8309c503f109SmrgAC_MSG_RESULT([$BUILDDOC]) 8310209ff23fSmrg 8311c503f109SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 8312209ff23fSmrg 8313c503f109Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 8314c503f109Smrg BUILDPDFDOC=yes 8315c503f109Smrgelse 8316c503f109Smrg BUILDPDFDOC=no 8317c503f109Smrgfi 8318209ff23fSmrg 8319c503f109SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8320209ff23fSmrg 8321c503f109SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 8322209ff23fSmrg 8323c503f109SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 8324c503f109SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 8325c503f109SmrgMAKE_PDF="$PS2PDF" 8326c503f109SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 8327209ff23fSmrg 8328c503f109SmrgAC_SUBST(MAKE_TEXT) 8329c503f109SmrgAC_SUBST(MAKE_PS) 8330c503f109SmrgAC_SUBST(MAKE_PDF) 8331c503f109SmrgAC_SUBST(MAKE_HTML) 8332c503f109Smrg]) # XORG_CHECK_LINUXDOC 8333209ff23fSmrg 8334c503f109Smrg# XORG_CHECK_DOCBOOK 8335c503f109Smrg# ------------------- 8336c503f109Smrg# Minimum version: 1.0.0 8337c503f109Smrg# 8338c503f109Smrg# Checks for the ability to build output formats from SGML DocBook source. 8339c503f109Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 8340c503f109Smrg# indicates whether the necessary tools and files are found and, if set, 8341c503f109Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 8342c503f109SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 8343ad43ddacSmrgXORG_SGML_PATH=$prefix/share/sgml 8344c503f109SmrgHAVE_DEFS_ENT= 8345c503f109SmrgBUILDTXTDOC=no 8346c503f109SmrgBUILDPDFDOC=no 8347c503f109SmrgBUILDPSDOC=no 8348c503f109SmrgBUILDHTMLDOC=no 8349209ff23fSmrg 8350c503f109SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 8351209ff23fSmrg 8352c503f109SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 8353c503f109SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 8354c503f109SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 8355c503f109SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 8356209ff23fSmrg 8357c503f109SmrgAC_MSG_CHECKING([Whether to build text documentation]) 8358c503f109Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 8359c503f109Smrg test x$BUILD_TXTDOC != xno; then 8360c503f109Smrg BUILDTXTDOC=yes 8361c503f109Smrgfi 8362c503f109SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 8363c503f109SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 8364209ff23fSmrg 8365ad43ddacSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 8366ad43ddacSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 8367ad43ddacSmrg test x$BUILD_PDFDOC != xno; then 8368ad43ddacSmrg BUILDPDFDOC=yes 8369ad43ddacSmrgfi 8370ad43ddacSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 8371ad43ddacSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 8372ad43ddacSmrg 8373ad43ddacSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 8374ad43ddacSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 8375ad43ddacSmrg test x$BUILD_PSDOC != xno; then 8376ad43ddacSmrg BUILDPSDOC=yes 8377ad43ddacSmrgfi 8378ad43ddacSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 8379ad43ddacSmrgAC_MSG_RESULT([$BUILDPSDOC]) 8380ad43ddacSmrg 8381ad43ddacSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 8382ad43ddacSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 8383ad43ddacSmrg test x$BUILD_HTMLDOC != xno; then 8384ad43ddacSmrg BUILDHTMLDOC=yes 8385ad43ddacSmrgfi 8386ad43ddacSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 8387ad43ddacSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 8388ad43ddacSmrg 8389ad43ddacSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 8390ad43ddacSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 8391ad43ddacSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 8392ad43ddacSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 8393ad43ddacSmrg 8394ad43ddacSmrgAC_SUBST(MAKE_TEXT) 8395ad43ddacSmrgAC_SUBST(MAKE_PS) 8396ad43ddacSmrgAC_SUBST(MAKE_PDF) 8397ad43ddacSmrgAC_SUBST(MAKE_HTML) 8398ad43ddacSmrg]) # XORG_CHECK_DOCBOOK 8399ad43ddacSmrg 8400ad43ddacSmrg# XORG_CHECK_MALLOC_ZERO 8401ad43ddacSmrg# ---------------------- 8402ad43ddacSmrg# Minimum version: 1.0.0 8403ad43ddacSmrg# 8404ad43ddacSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 8405ad43ddacSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 8406ad43ddacSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 8407ad43ddacSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 8408ad43ddacSmrgAC_ARG_ENABLE(malloc0returnsnull, 8409ad43ddacSmrg AC_HELP_STRING([--enable-malloc0returnsnull], 8410ad43ddacSmrg [malloc(0) returns NULL (default: auto)]), 8411ad43ddacSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 8412ad43ddacSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 8413ad43ddacSmrg 8414ad43ddacSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 8415ad43ddacSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 8416ad43ddacSmrg AC_RUN_IFELSE([ 8417ad43ddacSmrgchar *malloc(); 8418ad43ddacSmrgchar *realloc(); 8419ad43ddacSmrgchar *calloc(); 8420ad43ddacSmrgmain() { 8421ad43ddacSmrg char *m0, *r0, *c0, *p; 8422ad43ddacSmrg m0 = malloc(0); 8423ad43ddacSmrg p = malloc(10); 8424ad43ddacSmrg r0 = realloc(p,0); 8425ad43ddacSmrg c0 = calloc(0); 8426ad43ddacSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 8427ad43ddacSmrg}], 8428ad43ddacSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 8429ad43ddacSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 8430ad43ddacSmrgfi 8431ad43ddacSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 8432ad43ddacSmrg 8433ad43ddacSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 8434ad43ddacSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 8435ad43ddacSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 8436ad43ddacSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 8437ad43ddacSmrgelse 8438ad43ddacSmrg MALLOC_ZERO_CFLAGS="" 8439ad43ddacSmrg XMALLOC_ZERO_CFLAGS="" 8440ad43ddacSmrg XTMALLOC_ZERO_CFLAGS="" 8441ad43ddacSmrgfi 8442ad43ddacSmrg 8443ad43ddacSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 8444ad43ddacSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 8445ad43ddacSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 8446ad43ddacSmrg]) # XORG_CHECK_MALLOC_ZERO 8447ad43ddacSmrg 8448ad43ddacSmrg# XORG_WITH_LINT() 8449ad43ddacSmrg# ---------------- 8450ad43ddacSmrg# Minimum version: 1.1.0 8451ad43ddacSmrg# 8452ad43ddacSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 8453ad43ddacSmrg# is specified. (Use --with-lint=sparse for sparse.) 8454ad43ddacSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 8455ad43ddacSmrg# Sets $LINT_FLAGS to flags to pass to source checker 8456ad43ddacSmrg# Sets LINT automake conditional if enabled (default: disabled) 8457ad43ddacSmrg# 8458ad43ddacSmrgAC_DEFUN([XORG_WITH_LINT],[ 8459ad43ddacSmrg 8460ad43ddacSmrg# Allow checking code with lint, sparse, etc. 8461ad43ddacSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint], 8462ad43ddacSmrg [Use a lint-style source code checker (default: disabled)])], 8463ad43ddacSmrg [use_lint=$withval], [use_lint=no]) 8464ad43ddacSmrgif test "x$use_lint" = "xyes" ; then 8465ad43ddacSmrg LINT="lint" 8466ad43ddacSmrgelse 8467ad43ddacSmrg LINT="$use_lint" 8468ad43ddacSmrgfi 8469ad43ddacSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 8470ad43ddacSmrg case $LINT in 8471ad43ddacSmrg lint|*/lint) 8472ad43ddacSmrg case $host_os in 8473ad43ddacSmrg solaris*) 8474ad43ddacSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 8475ad43ddacSmrg ;; 8476ad43ddacSmrg esac 8477ad43ddacSmrg ;; 8478ad43ddacSmrg esac 8479ad43ddacSmrgfi 8480ad43ddacSmrg 8481ad43ddacSmrgAC_SUBST(LINT) 8482ad43ddacSmrgAC_SUBST(LINT_FLAGS) 8483ad43ddacSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 8484ad43ddacSmrg 8485ad43ddacSmrg]) # XORG_WITH_LINT 8486ad43ddacSmrg 8487ad43ddacSmrg# XORG_LINT_LIBRARY(LIBNAME) 8488ad43ddacSmrg# -------------------------- 8489ad43ddacSmrg# Minimum version: 1.1.0 8490ad43ddacSmrg# 8491ad43ddacSmrg# Sets up flags for building lint libraries for checking programs that call 8492ad43ddacSmrg# functions in the library. 8493ad43ddacSmrg# Disabled by default, enable with --enable-lint-library 8494ad43ddacSmrg# Sets: 8495ad43ddacSmrg# @LINTLIB@ - name of lint library file to make 8496ad43ddacSmrg# MAKE_LINT_LIB - automake conditional 8497ad43ddacSmrg# 8498ad43ddacSmrg 8499ad43ddacSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 8500ad43ddacSmrgAC_REQUIRE([XORG_WITH_LINT]) 8501ad43ddacSmrg# Build lint "library" for more indepth checks of programs calling this library 8502ad43ddacSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library], 8503ad43ddacSmrg [Create lint library (default: disabled)])], 8504ad43ddacSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 8505ad43ddacSmrgif test "x$make_lint_lib" != "xno" ; then 8506ad43ddacSmrg if test "x$LINT" = "xno" ; then 8507ad43ddacSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 8508ad43ddacSmrg fi 8509ad43ddacSmrg if test "x$make_lint_lib" = "xyes" ; then 8510ad43ddacSmrg LINTLIB=llib-l$1.ln 8511ad43ddacSmrg else 8512ad43ddacSmrg LINTLIB=$make_lint_lib 8513ad43ddacSmrg fi 8514ad43ddacSmrgfi 8515ad43ddacSmrgAC_SUBST(LINTLIB) 8516ad43ddacSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 8517ad43ddacSmrg 8518ad43ddacSmrg]) # XORG_LINT_LIBRARY 8519ad43ddacSmrg 8520ad43ddacSmrg# Copyright (C) 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. 8521ad43ddacSmrg# 8522ad43ddacSmrg# This file is free software; the Free Software Foundation 8523ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 8524ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 8525ad43ddacSmrg 8526ad43ddacSmrg# AM_AUTOMAKE_VERSION(VERSION) 8527ad43ddacSmrg# ---------------------------- 8528ad43ddacSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 8529ad43ddacSmrg# generated from the m4 files accompanying Automake X.Y. 8530ad43ddacSmrg# (This private macro should not be called outside this file.) 8531ad43ddacSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 8532ad43ddacSmrg[am__api_version='1.10' 8533ad43ddacSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8534ad43ddacSmrgdnl require some minimum version. Point them to the right macro. 8535ad43ddacSmrgm4_if([$1], [1.10.1], [], 8536ad43ddacSmrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8537ad43ddacSmrg]) 8538ad43ddacSmrg 8539ad43ddacSmrg# _AM_AUTOCONF_VERSION(VERSION) 8540ad43ddacSmrg# ----------------------------- 8541ad43ddacSmrg# aclocal traces this macro to find the Autoconf version. 8542ad43ddacSmrg# This is a private macro too. Using m4_define simplifies 8543ad43ddacSmrg# the logic in aclocal, which can simply ignore this definition. 8544ad43ddacSmrgm4_define([_AM_AUTOCONF_VERSION], []) 8545ad43ddacSmrg 8546ad43ddacSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION 8547ad43ddacSmrg# ------------------------------- 8548ad43ddacSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8549ad43ddacSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. 8550ad43ddacSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8551ad43ddacSmrg[AM_AUTOMAKE_VERSION([1.10.1])dnl 8552ad43ddacSmrgm4_ifndef([AC_AUTOCONF_VERSION], 8553ad43ddacSmrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8554ad43ddacSmrg_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)]) 8555ad43ddacSmrg 8556ad43ddacSmrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8557ad43ddacSmrg 8558ad43ddacSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8559ad43ddacSmrg# 8560ad43ddacSmrg# This file is free software; the Free Software Foundation 8561ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 8562ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 8563ad43ddacSmrg 8564ad43ddacSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8565ad43ddacSmrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 8566ad43ddacSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 8567ad43ddacSmrg# 8568ad43ddacSmrg# Of course, Automake must honor this variable whenever it calls a 8569ad43ddacSmrg# tool from the auxiliary directory. The problem is that $srcdir (and 8570ad43ddacSmrg# therefore $ac_aux_dir as well) can be either absolute or relative, 8571ad43ddacSmrg# depending on how configure is run. This is pretty annoying, since 8572ad43ddacSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8573ad43ddacSmrg# source directory, any form will work fine, but in subdirectories a 8574ad43ddacSmrg# relative path needs to be adjusted first. 8575ad43ddacSmrg# 8576ad43ddacSmrg# $ac_aux_dir/missing 8577ad43ddacSmrg# fails when called from a subdirectory if $ac_aux_dir is relative 8578ad43ddacSmrg# $top_srcdir/$ac_aux_dir/missing 8579ad43ddacSmrg# fails if $ac_aux_dir is absolute, 8580ad43ddacSmrg# fails when called from a subdirectory in a VPATH build with 8581ad43ddacSmrg# a relative $ac_aux_dir 8582ad43ddacSmrg# 8583ad43ddacSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8584ad43ddacSmrg# are both prefixed by $srcdir. In an in-source build this is usually 8585ad43ddacSmrg# harmless because $srcdir is `.', but things will broke when you 8586ad43ddacSmrg# start a VPATH build or use an absolute $srcdir. 8587ad43ddacSmrg# 8588ad43ddacSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8589ad43ddacSmrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8590ad43ddacSmrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8591ad43ddacSmrg# and then we would define $MISSING as 8592ad43ddacSmrg# MISSING="\${SHELL} $am_aux_dir/missing" 8593ad43ddacSmrg# This will work as long as MISSING is not called from configure, because 8594ad43ddacSmrg# unfortunately $(top_srcdir) has no meaning in configure. 8595ad43ddacSmrg# However there are other variables, like CC, which are often used in 8596ad43ddacSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 8597ad43ddacSmrg# 8598ad43ddacSmrg# Another solution, used here, is to always expand $ac_aux_dir to an 8599ad43ddacSmrg# absolute PATH. The drawback is that using absolute paths prevent a 8600ad43ddacSmrg# configured tree to be moved without reconfiguration. 8601ad43ddacSmrg 8602ad43ddacSmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 8603ad43ddacSmrg[dnl Rely on autoconf to set up CDPATH properly. 8604ad43ddacSmrgAC_PREREQ([2.50])dnl 8605ad43ddacSmrg# expand $ac_aux_dir to an absolute path 8606ad43ddacSmrgam_aux_dir=`cd $ac_aux_dir && pwd` 8607ad43ddacSmrg]) 8608ad43ddacSmrg 8609ad43ddacSmrg# AM_CONDITIONAL -*- Autoconf -*- 8610ad43ddacSmrg 8611ad43ddacSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006 8612ad43ddacSmrg# Free Software Foundation, Inc. 8613ad43ddacSmrg# 8614ad43ddacSmrg# This file is free software; the Free Software Foundation 8615ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 8616ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 8617ad43ddacSmrg 8618ad43ddacSmrg# serial 8 8619209ff23fSmrg 8620ad43ddacSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8621ad43ddacSmrg# ------------------------------------- 8622ad43ddacSmrg# Define a conditional. 8623ad43ddacSmrgAC_DEFUN([AM_CONDITIONAL], 8624ad43ddacSmrg[AC_PREREQ(2.52)dnl 8625ad43ddacSmrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8626ad43ddacSmrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8627ad43ddacSmrgAC_SUBST([$1_TRUE])dnl 8628ad43ddacSmrgAC_SUBST([$1_FALSE])dnl 8629ad43ddacSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8630ad43ddacSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8631ad43ddacSmrgif $2; then 8632ad43ddacSmrg $1_TRUE= 8633ad43ddacSmrg $1_FALSE='#' 8634ad43ddacSmrgelse 8635ad43ddacSmrg $1_TRUE='#' 8636ad43ddacSmrg $1_FALSE= 8637c503f109Smrgfi 8638ad43ddacSmrgAC_CONFIG_COMMANDS_PRE( 8639ad43ddacSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8640ad43ddacSmrg AC_MSG_ERROR([[conditional "$1" was never defined. 8641ad43ddacSmrgUsually this means the macro was only invoked conditionally.]]) 8642ad43ddacSmrgfi])]) 8643209ff23fSmrg 8644ad43ddacSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 8645ad43ddacSmrg# Free Software Foundation, Inc. 8646ad43ddacSmrg# 8647ad43ddacSmrg# This file is free software; the Free Software Foundation 8648ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 8649ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 8650209ff23fSmrg 8651ad43ddacSmrg# serial 9 8652209ff23fSmrg 8653ad43ddacSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 8654ad43ddacSmrg# written in clear, in which case automake, when reading aclocal.m4, 8655ad43ddacSmrg# will think it sees a *use*, and therefore will trigger all it's 8656ad43ddacSmrg# C support machinery. Also note that it means that autoscan, seeing 8657ad43ddacSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8658209ff23fSmrg 8659ad43ddacSmrg 8660ad43ddacSmrg# _AM_DEPENDENCIES(NAME) 8661c503f109Smrg# ---------------------- 8662ad43ddacSmrg# See how the compiler implements dependency checking. 8663ad43ddacSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 8664ad43ddacSmrg# We try a few techniques and use that to set a single cache variable. 8665209ff23fSmrg# 8666ad43ddacSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 8667ad43ddacSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 8668ad43ddacSmrg# dependency, and given that the user is not expected to run this macro, 8669ad43ddacSmrg# just rely on AC_PROG_CC. 8670ad43ddacSmrgAC_DEFUN([_AM_DEPENDENCIES], 8671ad43ddacSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 8672ad43ddacSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 8673ad43ddacSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 8674ad43ddacSmrgAC_REQUIRE([AM_DEP_TRACK])dnl 8675209ff23fSmrg 8676ad43ddacSmrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 8677ad43ddacSmrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 8678ad43ddacSmrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8679ad43ddacSmrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 8680ad43ddacSmrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 8681ad43ddacSmrg [depcc="$$1" am_compiler_list=]) 8682209ff23fSmrg 8683ad43ddacSmrgAC_CACHE_CHECK([dependency style of $depcc], 8684ad43ddacSmrg [am_cv_$1_dependencies_compiler_type], 8685ad43ddacSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 8686ad43ddacSmrg # We make a subdir and do the tests there. Otherwise we can end up 8687ad43ddacSmrg # making bogus files that we don't know about and never remove. For 8688ad43ddacSmrg # instance it was reported that on HP-UX the gcc test will end up 8689ad43ddacSmrg # making a dummy file named `D' -- because `-MD' means `put the output 8690ad43ddacSmrg # in D'. 8691ad43ddacSmrg mkdir conftest.dir 8692ad43ddacSmrg # Copy depcomp to subdir because otherwise we won't find it if we're 8693ad43ddacSmrg # using a relative directory. 8694ad43ddacSmrg cp "$am_depcomp" conftest.dir 8695ad43ddacSmrg cd conftest.dir 8696ad43ddacSmrg # We will build objects and dependencies in a subdirectory because 8697ad43ddacSmrg # it helps to detect inapplicable dependency modes. For instance 8698ad43ddacSmrg # both Tru64's cc and ICC support -MD to output dependencies as a 8699ad43ddacSmrg # side effect of compilation, but ICC will put the dependencies in 8700ad43ddacSmrg # the current directory while Tru64 will put them in the object 8701ad43ddacSmrg # directory. 8702ad43ddacSmrg mkdir sub 8703209ff23fSmrg 8704ad43ddacSmrg am_cv_$1_dependencies_compiler_type=none 8705ad43ddacSmrg if test "$am_compiler_list" = ""; then 8706ad43ddacSmrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 8707ad43ddacSmrg fi 8708ad43ddacSmrg for depmode in $am_compiler_list; do 8709ad43ddacSmrg # Setup a source with many dependencies, because some compilers 8710ad43ddacSmrg # like to wrap large dependency lists on column 80 (with \), and 8711ad43ddacSmrg # we should not choose a depcomp mode which is confused by this. 8712ad43ddacSmrg # 8713ad43ddacSmrg # We need to recreate these files for each test, as the compiler may 8714ad43ddacSmrg # overwrite some of them when testing with obscure command lines. 8715ad43ddacSmrg # This happens at least with the AIX C compiler. 8716ad43ddacSmrg : > sub/conftest.c 8717ad43ddacSmrg for i in 1 2 3 4 5 6; do 8718ad43ddacSmrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 8719ad43ddacSmrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 8720ad43ddacSmrg # Solaris 8's {/usr,}/bin/sh. 8721ad43ddacSmrg touch sub/conftst$i.h 8722ad43ddacSmrg done 8723ad43ddacSmrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 8724209ff23fSmrg 8725ad43ddacSmrg case $depmode in 8726ad43ddacSmrg nosideeffect) 8727ad43ddacSmrg # after this tag, mechanisms are not by side-effect, so they'll 8728ad43ddacSmrg # only be used when explicitly requested 8729ad43ddacSmrg if test "x$enable_dependency_tracking" = xyes; then 8730ad43ddacSmrg continue 8731ad43ddacSmrg else 8732ad43ddacSmrg break 8733ad43ddacSmrg fi 8734ad43ddacSmrg ;; 8735ad43ddacSmrg none) break ;; 8736ad43ddacSmrg esac 8737ad43ddacSmrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 8738ad43ddacSmrg # mode. It turns out that the SunPro C++ compiler does not properly 8739ad43ddacSmrg # handle `-M -o', and we need to detect this. 8740ad43ddacSmrg if depmode=$depmode \ 8741ad43ddacSmrg source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ 8742ad43ddacSmrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8743ad43ddacSmrg $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ 8744ad43ddacSmrg >/dev/null 2>conftest.err && 8745ad43ddacSmrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 8746ad43ddacSmrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8747ad43ddacSmrg grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && 8748ad43ddacSmrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 8749ad43ddacSmrg # icc doesn't choke on unknown options, it will just issue warnings 8750ad43ddacSmrg # or remarks (even with -Werror). So we grep stderr for any message 8751ad43ddacSmrg # that says an option was ignored or not supported. 8752ad43ddacSmrg # When given -MP, icc 7.0 and 7.1 complain thusly: 8753ad43ddacSmrg # icc: Command line warning: ignoring option '-M'; no argument required 8754ad43ddacSmrg # The diagnosis changed in icc 8.0: 8755ad43ddacSmrg # icc: Command line remark: option '-MP' not supported 8756ad43ddacSmrg if (grep 'ignoring option' conftest.err || 8757ad43ddacSmrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 8758ad43ddacSmrg am_cv_$1_dependencies_compiler_type=$depmode 8759ad43ddacSmrg break 8760ad43ddacSmrg fi 8761ad43ddacSmrg fi 8762ad43ddacSmrg done 8763209ff23fSmrg 8764ad43ddacSmrg cd .. 8765ad43ddacSmrg rm -rf conftest.dir 8766c503f109Smrgelse 8767ad43ddacSmrg am_cv_$1_dependencies_compiler_type=none 8768c503f109Smrgfi 8769ad43ddacSmrg]) 8770ad43ddacSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8771ad43ddacSmrgAM_CONDITIONAL([am__fastdep$1], [ 8772ad43ddacSmrg test "x$enable_dependency_tracking" != xno \ 8773ad43ddacSmrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8774ad43ddacSmrg]) 8775ad43ddacSmrg 8776ad43ddacSmrg 8777ad43ddacSmrg# AM_SET_DEPDIR 8778ad43ddacSmrg# ------------- 8779ad43ddacSmrg# Choose a directory name for dependency files. 8780ad43ddacSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 8781ad43ddacSmrgAC_DEFUN([AM_SET_DEPDIR], 8782ad43ddacSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8783ad43ddacSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8784ad43ddacSmrg]) 8785ad43ddacSmrg 8786ad43ddacSmrg 8787ad43ddacSmrg# AM_DEP_TRACK 8788ad43ddacSmrg# ------------ 8789ad43ddacSmrgAC_DEFUN([AM_DEP_TRACK], 8790ad43ddacSmrg[AC_ARG_ENABLE(dependency-tracking, 8791ad43ddacSmrg[ --disable-dependency-tracking speeds up one-time build 8792ad43ddacSmrg --enable-dependency-tracking do not reject slow dependency extractors]) 8793ad43ddacSmrgif test "x$enable_dependency_tracking" != xno; then 8794ad43ddacSmrg am_depcomp="$ac_aux_dir/depcomp" 8795ad43ddacSmrg AMDEPBACKSLASH='\' 8796c503f109Smrgfi 8797ad43ddacSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8798ad43ddacSmrgAC_SUBST([AMDEPBACKSLASH])dnl 8799ad43ddacSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 8800ad43ddacSmrg]) 8801209ff23fSmrg 8802ad43ddacSmrg# Generate code to set up dependency tracking. -*- Autoconf -*- 8803209ff23fSmrg 8804ad43ddacSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 8805ad43ddacSmrg# Free Software Foundation, Inc. 8806209ff23fSmrg# 8807ad43ddacSmrg# This file is free software; the Free Software Foundation 8808ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 8809ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 8810209ff23fSmrg 8811ad43ddacSmrg#serial 3 8812209ff23fSmrg 8813ad43ddacSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 8814ad43ddacSmrg# ------------------------------ 8815ad43ddacSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 8816ad43ddacSmrg[for mf in $CONFIG_FILES; do 8817ad43ddacSmrg # Strip MF so we end up with the name of the file. 8818ad43ddacSmrg mf=`echo "$mf" | sed -e 's/:.*$//'` 8819ad43ddacSmrg # Check whether this is an Automake generated Makefile or not. 8820ad43ddacSmrg # We used to match only the files named `Makefile.in', but 8821ad43ddacSmrg # some people rename them; so instead we look at the file content. 8822ad43ddacSmrg # Grep'ing the first line is not enough: some people post-process 8823ad43ddacSmrg # each Makefile.in and add a new line on top of each file to say so. 8824ad43ddacSmrg # Grep'ing the whole file is not good either: AIX grep has a line 8825ad43ddacSmrg # limit of 2048, but all sed's we know have understand at least 4000. 8826ad43ddacSmrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 8827ad43ddacSmrg dirpart=`AS_DIRNAME("$mf")` 8828ad43ddacSmrg else 8829ad43ddacSmrg continue 8830ad43ddacSmrg fi 8831ad43ddacSmrg # Extract the definition of DEPDIR, am__include, and am__quote 8832ad43ddacSmrg # from the Makefile without running `make'. 8833ad43ddacSmrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 8834ad43ddacSmrg test -z "$DEPDIR" && continue 8835ad43ddacSmrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 8836ad43ddacSmrg test -z "am__include" && continue 8837ad43ddacSmrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 8838ad43ddacSmrg # When using ansi2knr, U may be empty or an underscore; expand it 8839ad43ddacSmrg U=`sed -n 's/^U = //p' < "$mf"` 8840ad43ddacSmrg # Find all dependency output files, they are included files with 8841ad43ddacSmrg # $(DEPDIR) in their names. We invoke sed twice because it is the 8842ad43ddacSmrg # simplest approach to changing $(DEPDIR) to its actual value in the 8843ad43ddacSmrg # expansion. 8844ad43ddacSmrg for file in `sed -n " 8845ad43ddacSmrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 8846ad43ddacSmrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 8847ad43ddacSmrg # Make sure the directory exists. 8848ad43ddacSmrg test -f "$dirpart/$file" && continue 8849ad43ddacSmrg fdir=`AS_DIRNAME(["$file"])` 8850ad43ddacSmrg AS_MKDIR_P([$dirpart/$fdir]) 8851ad43ddacSmrg # echo "creating $dirpart/$file" 8852ad43ddacSmrg echo '# dummy' > "$dirpart/$file" 8853ad43ddacSmrg done 8854ad43ddacSmrgdone 8855ad43ddacSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8856209ff23fSmrg 8857209ff23fSmrg 8858ad43ddacSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS 8859ad43ddacSmrg# ----------------------------- 8860ad43ddacSmrg# This macro should only be invoked once -- use via AC_REQUIRE. 8861ad43ddacSmrg# 8862ad43ddacSmrg# This code is only required when automatic dependency tracking 8863ad43ddacSmrg# is enabled. FIXME. This creates each `.P' file that we will 8864ad43ddacSmrg# need in order to bootstrap the dependency handling code. 8865ad43ddacSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 8866ad43ddacSmrg[AC_CONFIG_COMMANDS([depfiles], 8867ad43ddacSmrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 8868ad43ddacSmrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 8869c503f109Smrg]) 8870209ff23fSmrg 8871ad43ddacSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 8872ad43ddacSmrg# Free Software Foundation, Inc. 8873c503f109Smrg# 8874ad43ddacSmrg# This file is free software; the Free Software Foundation 8875ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 8876ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 8877ad43ddacSmrg 8878ad43ddacSmrg# serial 8 8879ad43ddacSmrg 8880ad43ddacSmrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 8881ad43ddacSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 8882ad43ddacSmrg 8883ad43ddacSmrg# Do all the work for Automake. -*- Autoconf -*- 8884ad43ddacSmrg 8885ad43ddacSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 8886ad43ddacSmrg# 2005, 2006, 2008 Free Software Foundation, Inc. 8887c503f109Smrg# 8888ad43ddacSmrg# This file is free software; the Free Software Foundation 8889ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 8890ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 8891c503f109Smrg 8892ad43ddacSmrg# serial 13 8893209ff23fSmrg 8894ad43ddacSmrg# This macro actually does too much. Some checks are only needed if 8895ad43ddacSmrg# your package does certain things. But this isn't really a big deal. 8896209ff23fSmrg 8897ad43ddacSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 8898ad43ddacSmrg# AM_INIT_AUTOMAKE([OPTIONS]) 8899ad43ddacSmrg# ----------------------------------------------- 8900ad43ddacSmrg# The call with PACKAGE and VERSION arguments is the old style 8901ad43ddacSmrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 8902ad43ddacSmrg# and VERSION should now be passed to AC_INIT and removed from 8903ad43ddacSmrg# the call to AM_INIT_AUTOMAKE. 8904ad43ddacSmrg# We support both call styles for the transition. After 8905ad43ddacSmrg# the next Automake release, Autoconf can make the AC_INIT 8906ad43ddacSmrg# arguments mandatory, and then we can depend on a new Autoconf 8907ad43ddacSmrg# release and drop the old call support. 8908ad43ddacSmrgAC_DEFUN([AM_INIT_AUTOMAKE], 8909ad43ddacSmrg[AC_PREREQ([2.60])dnl 8910ad43ddacSmrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 8911ad43ddacSmrgdnl the ones we care about. 8912ad43ddacSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 8913ad43ddacSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 8914ad43ddacSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 8915ad43ddacSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 8916ad43ddacSmrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 8917ad43ddacSmrg # is not polluted with repeated "-I." 8918ad43ddacSmrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 8919ad43ddacSmrg # test to see if srcdir already configured 8920ad43ddacSmrg if test -f $srcdir/config.status; then 8921ad43ddacSmrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 8922ad43ddacSmrg fi 8923ad43ddacSmrgfi 8924ad43ddacSmrg 8925ad43ddacSmrg# test whether we have cygpath 8926ad43ddacSmrgif test -z "$CYGPATH_W"; then 8927ad43ddacSmrg if (cygpath --version) >/dev/null 2>/dev/null; then 8928ad43ddacSmrg CYGPATH_W='cygpath -w' 8929ad43ddacSmrg else 8930ad43ddacSmrg CYGPATH_W=echo 8931ad43ddacSmrg fi 8932ad43ddacSmrgfi 8933ad43ddacSmrgAC_SUBST([CYGPATH_W]) 8934209ff23fSmrg 8935ad43ddacSmrg# Define the identity of the package. 8936ad43ddacSmrgdnl Distinguish between old-style and new-style calls. 8937ad43ddacSmrgm4_ifval([$2], 8938ad43ddacSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 8939ad43ddacSmrg AC_SUBST([PACKAGE], [$1])dnl 8940ad43ddacSmrg AC_SUBST([VERSION], [$2])], 8941ad43ddacSmrg[_AM_SET_OPTIONS([$1])dnl 8942ad43ddacSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 8943ad43ddacSmrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 8944ad43ddacSmrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 8945ad43ddacSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 8946ad43ddacSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 8947209ff23fSmrg 8948ad43ddacSmrg_AM_IF_OPTION([no-define],, 8949ad43ddacSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 8950ad43ddacSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 8951ad43ddacSmrg 8952ad43ddacSmrg# Some tools Automake needs. 8953ad43ddacSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 8954ad43ddacSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 8955ad43ddacSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 8956ad43ddacSmrgAM_MISSING_PROG(AUTOCONF, autoconf) 8957ad43ddacSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 8958ad43ddacSmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 8959ad43ddacSmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 8960ad43ddacSmrgAM_PROG_INSTALL_SH 8961ad43ddacSmrgAM_PROG_INSTALL_STRIP 8962ad43ddacSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 8963ad43ddacSmrg# We need awk for the "check" target. The system "awk" is bad on 8964ad43ddacSmrg# some platforms. 8965ad43ddacSmrgAC_REQUIRE([AC_PROG_AWK])dnl 8966ad43ddacSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 8967ad43ddacSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 8968ad43ddacSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 8969ad43ddacSmrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 8970ad43ddacSmrg [_AM_PROG_TAR([v7])])]) 8971ad43ddacSmrg_AM_IF_OPTION([no-dependencies],, 8972ad43ddacSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 8973ad43ddacSmrg [_AM_DEPENDENCIES(CC)], 8974ad43ddacSmrg [define([AC_PROG_CC], 8975ad43ddacSmrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 8976ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 8977ad43ddacSmrg [_AM_DEPENDENCIES(CXX)], 8978ad43ddacSmrg [define([AC_PROG_CXX], 8979ad43ddacSmrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 8980ad43ddacSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 8981ad43ddacSmrg [_AM_DEPENDENCIES(OBJC)], 8982ad43ddacSmrg [define([AC_PROG_OBJC], 8983ad43ddacSmrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 8984ad43ddacSmrg]) 8985209ff23fSmrg]) 8986209ff23fSmrg 8987c503f109Smrg 8988ad43ddacSmrg# When config.status generates a header, we must update the stamp-h file. 8989ad43ddacSmrg# This file resides in the same directory as the config header 8990ad43ddacSmrg# that is generated. The stamp files are numbered to have different names. 8991209ff23fSmrg 8992ad43ddacSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 8993ad43ddacSmrg# loop where config.status creates the headers, so we can generate 8994ad43ddacSmrg# our stamp files there. 8995ad43ddacSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 8996ad43ddacSmrg[# Compute $1's index in $config_headers. 8997ad43ddacSmrg_am_arg=$1 8998ad43ddacSmrg_am_stamp_count=1 8999ad43ddacSmrgfor _am_header in $config_headers :; do 9000ad43ddacSmrg case $_am_header in 9001ad43ddacSmrg $_am_arg | $_am_arg:* ) 9002ad43ddacSmrg break ;; 9003ad43ddacSmrg * ) 9004ad43ddacSmrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 9005ad43ddacSmrg esac 9006ad43ddacSmrgdone 9007ad43ddacSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 9008c503f109Smrg 9009c503f109Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9010209ff23fSmrg# 9011209ff23fSmrg# This file is free software; the Free Software Foundation 9012209ff23fSmrg# gives unlimited permission to copy and/or distribute it, 9013209ff23fSmrg# with or without modifications, as long as this notice is preserved. 9014209ff23fSmrg 9015ad43ddacSmrg# AM_PROG_INSTALL_SH 9016ad43ddacSmrg# ------------------ 9017ad43ddacSmrg# Define $install_sh. 9018ad43ddacSmrgAC_DEFUN([AM_PROG_INSTALL_SH], 9019ad43ddacSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9020ad43ddacSmrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} 9021ad43ddacSmrgAC_SUBST(install_sh)]) 9022209ff23fSmrg 9023ad43ddacSmrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 9024209ff23fSmrg# 9025209ff23fSmrg# This file is free software; the Free Software Foundation 9026209ff23fSmrg# gives unlimited permission to copy and/or distribute it, 9027209ff23fSmrg# with or without modifications, as long as this notice is preserved. 9028209ff23fSmrg 9029ad43ddacSmrg# serial 2 9030209ff23fSmrg 9031ad43ddacSmrg# Check whether the underlying file-system supports filenames 9032ad43ddacSmrg# with a leading dot. For instance MS-DOS doesn't. 9033ad43ddacSmrgAC_DEFUN([AM_SET_LEADING_DOT], 9034ad43ddacSmrg[rm -rf .tst 2>/dev/null 9035ad43ddacSmrgmkdir .tst 2>/dev/null 9036ad43ddacSmrgif test -d .tst; then 9037ad43ddacSmrg am__leading_dot=. 9038209ff23fSmrgelse 9039ad43ddacSmrg am__leading_dot=_ 9040209ff23fSmrgfi 9041ad43ddacSmrgrmdir .tst 2>/dev/null 9042ad43ddacSmrgAC_SUBST([am__leading_dot])]) 9043ad43ddacSmrg 9044ad43ddacSmrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 9045ad43ddacSmrg# From Jim Meyering 9046209ff23fSmrg 9047ad43ddacSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005 9048c503f109Smrg# Free Software Foundation, Inc. 9049209ff23fSmrg# 9050209ff23fSmrg# This file is free software; the Free Software Foundation 9051209ff23fSmrg# gives unlimited permission to copy and/or distribute it, 9052209ff23fSmrg# with or without modifications, as long as this notice is preserved. 9053209ff23fSmrg 9054ad43ddacSmrg# serial 4 9055209ff23fSmrg 9056ad43ddacSmrgAC_DEFUN([AM_MAINTAINER_MODE], 9057ad43ddacSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) 9058ad43ddacSmrg dnl maintainer-mode is disabled by default 9059ad43ddacSmrg AC_ARG_ENABLE(maintainer-mode, 9060ad43ddacSmrg[ --enable-maintainer-mode enable make rules and dependencies not useful 9061ad43ddacSmrg (and sometimes confusing) to the casual installer], 9062ad43ddacSmrg USE_MAINTAINER_MODE=$enableval, 9063ad43ddacSmrg USE_MAINTAINER_MODE=no) 9064ad43ddacSmrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 9065ad43ddacSmrg AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) 9066ad43ddacSmrg MAINT=$MAINTAINER_MODE_TRUE 9067ad43ddacSmrg AC_SUBST(MAINT)dnl 9068ad43ddacSmrg] 9069ad43ddacSmrg) 9070209ff23fSmrg 9071ad43ddacSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 9072209ff23fSmrg 9073ad43ddacSmrg# Check to see how 'make' treats includes. -*- Autoconf -*- 9074ad43ddacSmrg 9075ad43ddacSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 9076209ff23fSmrg# 9077ad43ddacSmrg# This file is free software; the Free Software Foundation 9078ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 9079ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 9080209ff23fSmrg 9081ad43ddacSmrg# serial 3 9082209ff23fSmrg 9083ad43ddacSmrg# AM_MAKE_INCLUDE() 9084ad43ddacSmrg# ----------------- 9085ad43ddacSmrg# Check to see how make treats includes. 9086ad43ddacSmrgAC_DEFUN([AM_MAKE_INCLUDE], 9087ad43ddacSmrg[am_make=${MAKE-make} 9088ad43ddacSmrgcat > confinc << 'END' 9089ad43ddacSmrgam__doit: 9090ad43ddacSmrg @echo done 9091ad43ddacSmrg.PHONY: am__doit 9092ad43ddacSmrgEND 9093ad43ddacSmrg# If we don't find an include directive, just comment out the code. 9094ad43ddacSmrgAC_MSG_CHECKING([for style of include used by $am_make]) 9095ad43ddacSmrgam__include="#" 9096ad43ddacSmrgam__quote= 9097ad43ddacSmrg_am_result=none 9098ad43ddacSmrg# First try GNU make style include. 9099ad43ddacSmrgecho "include confinc" > confmf 9100ad43ddacSmrg# We grep out `Entering directory' and `Leaving directory' 9101ad43ddacSmrg# messages which can occur if `w' ends up in MAKEFLAGS. 9102ad43ddacSmrg# In particular we don't look at `^make:' because GNU make might 9103ad43ddacSmrg# be invoked under some other name (usually "gmake"), in which 9104ad43ddacSmrg# case it prints its new name instead of `make'. 9105ad43ddacSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then 9106ad43ddacSmrg am__include=include 9107ad43ddacSmrg am__quote= 9108ad43ddacSmrg _am_result=GNU 9109ad43ddacSmrgfi 9110ad43ddacSmrg# Now try BSD make style include. 9111ad43ddacSmrgif test "$am__include" = "#"; then 9112ad43ddacSmrg echo '.include "confinc"' > confmf 9113ad43ddacSmrg if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then 9114ad43ddacSmrg am__include=.include 9115ad43ddacSmrg am__quote="\"" 9116ad43ddacSmrg _am_result=BSD 9117ad43ddacSmrg fi 9118ad43ddacSmrgfi 9119ad43ddacSmrgAC_SUBST([am__include]) 9120ad43ddacSmrgAC_SUBST([am__quote]) 9121ad43ddacSmrgAC_MSG_RESULT([$_am_result]) 9122ad43ddacSmrgrm -f confinc confmf 9123ad43ddacSmrg]) 9124c503f109Smrg 9125ad43ddacSmrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 9126c503f109Smrg 9127ad43ddacSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 9128ad43ddacSmrg# Free Software Foundation, Inc. 9129ad43ddacSmrg# 9130ad43ddacSmrg# This file is free software; the Free Software Foundation 9131ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 9132ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 9133209ff23fSmrg 9134ad43ddacSmrg# serial 5 9135209ff23fSmrg 9136ad43ddacSmrg# AM_MISSING_PROG(NAME, PROGRAM) 9137ad43ddacSmrg# ------------------------------ 9138ad43ddacSmrgAC_DEFUN([AM_MISSING_PROG], 9139ad43ddacSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 9140ad43ddacSmrg$1=${$1-"${am_missing_run}$2"} 9141ad43ddacSmrgAC_SUBST($1)]) 9142ad43ddacSmrg 9143ad43ddacSmrg 9144ad43ddacSmrg# AM_MISSING_HAS_RUN 9145ad43ddacSmrg# ------------------ 9146ad43ddacSmrg# Define MISSING if not defined so far and test if it supports --run. 9147ad43ddacSmrg# If it does, set am_missing_run to use it, otherwise, to nothing. 9148ad43ddacSmrgAC_DEFUN([AM_MISSING_HAS_RUN], 9149ad43ddacSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 9150ad43ddacSmrgAC_REQUIRE_AUX_FILE([missing])dnl 9151ad43ddacSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" 9152ad43ddacSmrg# Use eval to expand $SHELL 9153ad43ddacSmrgif eval "$MISSING --run true"; then 9154ad43ddacSmrg am_missing_run="$MISSING --run " 9155c503f109Smrgelse 9156ad43ddacSmrg am_missing_run= 9157ad43ddacSmrg AC_MSG_WARN([`missing' script is too old or missing]) 9158c503f109Smrgfi 9159c503f109Smrg]) 9160209ff23fSmrg 9161ad43ddacSmrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 9162ad43ddacSmrg# 9163ad43ddacSmrg# This file is free software; the Free Software Foundation 9164ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 9165ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 9166209ff23fSmrg 9167ad43ddacSmrg# AM_PROG_MKDIR_P 9168ad43ddacSmrg# --------------- 9169ad43ddacSmrg# Check for `mkdir -p'. 9170ad43ddacSmrgAC_DEFUN([AM_PROG_MKDIR_P], 9171ad43ddacSmrg[AC_PREREQ([2.60])dnl 9172ad43ddacSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 9173ad43ddacSmrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 9174ad43ddacSmrgdnl while keeping a definition of mkdir_p for backward compatibility. 9175ad43ddacSmrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 9176ad43ddacSmrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 9177ad43ddacSmrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 9178ad43ddacSmrgdnl adjustment using top_builddir (which is defined more often than 9179ad43ddacSmrgdnl MKDIR_P). 9180ad43ddacSmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 9181ad43ddacSmrgcase $mkdir_p in 9182ad43ddacSmrg [[\\/$]]* | ?:[[\\/]]*) ;; 9183ad43ddacSmrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 9184ad43ddacSmrgesac 9185c503f109Smrg]) 9186209ff23fSmrg 9187ad43ddacSmrg# Helper functions for option handling. -*- Autoconf -*- 9188209ff23fSmrg 9189ad43ddacSmrg# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc. 9190ad43ddacSmrg# 9191ad43ddacSmrg# This file is free software; the Free Software Foundation 9192ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 9193ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 9194209ff23fSmrg 9195ad43ddacSmrg# serial 3 9196ad43ddacSmrg 9197ad43ddacSmrg# _AM_MANGLE_OPTION(NAME) 9198ad43ddacSmrg# ----------------------- 9199ad43ddacSmrgAC_DEFUN([_AM_MANGLE_OPTION], 9200ad43ddacSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 9201ad43ddacSmrg 9202ad43ddacSmrg# _AM_SET_OPTION(NAME) 9203ad43ddacSmrg# ------------------------------ 9204ad43ddacSmrg# Set option NAME. Presently that only means defining a flag for this option. 9205ad43ddacSmrgAC_DEFUN([_AM_SET_OPTION], 9206ad43ddacSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 9207ad43ddacSmrg 9208ad43ddacSmrg# _AM_SET_OPTIONS(OPTIONS) 9209ad43ddacSmrg# ---------------------------------- 9210ad43ddacSmrg# OPTIONS is a space-separated list of Automake options. 9211ad43ddacSmrgAC_DEFUN([_AM_SET_OPTIONS], 9212ad43ddacSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 9213ad43ddacSmrg 9214ad43ddacSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 9215ad43ddacSmrg# ------------------------------------------- 9216ad43ddacSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 9217ad43ddacSmrgAC_DEFUN([_AM_IF_OPTION], 9218ad43ddacSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 9219ad43ddacSmrg 9220ad43ddacSmrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 9221209ff23fSmrg 9222ad43ddacSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 9223c503f109Smrg# Free Software Foundation, Inc. 9224209ff23fSmrg# 9225c503f109Smrg# This file is free software; the Free Software Foundation 9226c503f109Smrg# gives unlimited permission to copy and/or distribute it, 9227c503f109Smrg# with or without modifications, as long as this notice is preserved. 9228209ff23fSmrg 9229ad43ddacSmrg# serial 4 9230209ff23fSmrg 9231ad43ddacSmrg# AM_SANITY_CHECK 9232ad43ddacSmrg# --------------- 9233ad43ddacSmrgAC_DEFUN([AM_SANITY_CHECK], 9234ad43ddacSmrg[AC_MSG_CHECKING([whether build environment is sane]) 9235ad43ddacSmrg# Just in case 9236ad43ddacSmrgsleep 1 9237ad43ddacSmrgecho timestamp > conftest.file 9238ad43ddacSmrg# Do `set' in a subshell so we don't clobber the current shell's 9239ad43ddacSmrg# arguments. Must try -L first in case configure is actually a 9240ad43ddacSmrg# symlink; some systems play weird games with the mod time of symlinks 9241ad43ddacSmrg# (eg FreeBSD returns the mod time of the symlink's containing 9242ad43ddacSmrg# directory). 9243ad43ddacSmrgif ( 9244ad43ddacSmrg set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` 9245ad43ddacSmrg if test "$[*]" = "X"; then 9246ad43ddacSmrg # -L didn't work. 9247ad43ddacSmrg set X `ls -t $srcdir/configure conftest.file` 9248ad43ddacSmrg fi 9249ad43ddacSmrg rm -f conftest.file 9250ad43ddacSmrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 9251ad43ddacSmrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 9252ad43ddacSmrg 9253ad43ddacSmrg # If neither matched, then we have a broken ls. This can happen 9254ad43ddacSmrg # if, for instance, CONFIG_SHELL is bash and it inherits a 9255ad43ddacSmrg # broken ls alias from the environment. This has actually 9256ad43ddacSmrg # happened. Such a system could not be considered "sane". 9257ad43ddacSmrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 9258ad43ddacSmrgalias in your environment]) 9259ad43ddacSmrg fi 9260209ff23fSmrg 9261ad43ddacSmrg test "$[2]" = conftest.file 9262ad43ddacSmrg ) 9263ad43ddacSmrgthen 9264ad43ddacSmrg # Ok. 9265ad43ddacSmrg : 9266ad43ddacSmrgelse 9267ad43ddacSmrg AC_MSG_ERROR([newly created file is older than distributed files! 9268ad43ddacSmrgCheck your system clock]) 9269ad43ddacSmrgfi 9270ad43ddacSmrgAC_MSG_RESULT(yes)]) 9271209ff23fSmrg 9272ad43ddacSmrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 9273c503f109Smrg# 9274ad43ddacSmrg# This file is free software; the Free Software Foundation 9275ad43ddacSmrg# gives unlimited permission to copy and/or distribute it, 9276ad43ddacSmrg# with or without modifications, as long as this notice is preserved. 9277ad43ddacSmrg 9278ad43ddacSmrg# AM_PROG_INSTALL_STRIP 9279ad43ddacSmrg# --------------------- 9280ad43ddacSmrg# One issue with vendor `install' (even GNU) is that you can't 9281ad43ddacSmrg# specify the program used to strip binaries. This is especially 9282ad43ddacSmrg# annoying in cross-compiling environments, where the build's strip 9283ad43ddacSmrg# is unlikely to handle the host's binaries. 9284ad43ddacSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9285ad43ddacSmrg# always use install-sh in `make install-strip', and initialize 9286ad43ddacSmrg# STRIPPROG with the value of the STRIP variable (set by the user). 9287ad43ddacSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9288ad43ddacSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9289ad43ddacSmrg# Installed binaries are usually stripped using `strip' when the user 9290ad43ddacSmrg# run `make install-strip'. However `strip' might not be the right 9291ad43ddacSmrg# tool to use in cross-compilation environments, therefore Automake 9292ad43ddacSmrg# will honor the `STRIP' environment variable to overrule this program. 9293ad43ddacSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9294ad43ddacSmrgif test "$cross_compiling" != no; then 9295ad43ddacSmrg AC_CHECK_TOOL([STRIP], [strip], :) 9296ad43ddacSmrgfi 9297ad43ddacSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9298ad43ddacSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9299209ff23fSmrg 9300ad43ddacSmrg# Copyright (C) 2006 Free Software Foundation, Inc. 9301c503f109Smrg# 9302c503f109Smrg# This file is free software; the Free Software Foundation 9303c503f109Smrg# gives unlimited permission to copy and/or distribute it, 9304c503f109Smrg# with or without modifications, as long as this notice is preserved. 9305209ff23fSmrg 9306ad43ddacSmrg# _AM_SUBST_NOTMAKE(VARIABLE) 9307ad43ddacSmrg# --------------------------- 9308ad43ddacSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9309ad43ddacSmrg# This macro is traced by Automake. 9310ad43ddacSmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9311209ff23fSmrg 9312ad43ddacSmrg# Check how to create a tarball. -*- Autoconf -*- 9313209ff23fSmrg 9314ad43ddacSmrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9315209ff23fSmrg# 9316c503f109Smrg# This file is free software; the Free Software Foundation 9317c503f109Smrg# gives unlimited permission to copy and/or distribute it, 9318c503f109Smrg# with or without modifications, as long as this notice is preserved. 9319209ff23fSmrg 9320ad43ddacSmrg# serial 2 9321209ff23fSmrg 9322ad43ddacSmrg# _AM_PROG_TAR(FORMAT) 9323ad43ddacSmrg# -------------------- 9324ad43ddacSmrg# Check how to create a tarball in format FORMAT. 9325ad43ddacSmrg# FORMAT should be one of `v7', `ustar', or `pax'. 9326ad43ddacSmrg# 9327ad43ddacSmrg# Substitute a variable $(am__tar) that is a command 9328ad43ddacSmrg# writing to stdout a FORMAT-tarball containing the directory 9329ad43ddacSmrg# $tardir. 9330ad43ddacSmrg# tardir=directory && $(am__tar) > result.tar 9331ad43ddacSmrg# 9332ad43ddacSmrg# Substitute a variable $(am__untar) that extract such 9333ad43ddacSmrg# a tarball read from stdin. 9334ad43ddacSmrg# $(am__untar) < result.tar 9335ad43ddacSmrgAC_DEFUN([_AM_PROG_TAR], 9336ad43ddacSmrg[# Always define AMTAR for backward compatibility. 9337ad43ddacSmrgAM_MISSING_PROG([AMTAR], [tar]) 9338ad43ddacSmrgm4_if([$1], [v7], 9339ad43ddacSmrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9340ad43ddacSmrg [m4_case([$1], [ustar],, [pax],, 9341ad43ddacSmrg [m4_fatal([Unknown tar format])]) 9342ad43ddacSmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9343ad43ddacSmrg# Loop over all known methods to create a tar archive until one works. 9344ad43ddacSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9345ad43ddacSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9346ad43ddacSmrg# Do not fold the above two line into one, because Tru64 sh and 9347ad43ddacSmrg# Solaris sh will not grok spaces in the rhs of `-'. 9348ad43ddacSmrgfor _am_tool in $_am_tools 9349ad43ddacSmrgdo 9350ad43ddacSmrg case $_am_tool in 9351ad43ddacSmrg gnutar) 9352ad43ddacSmrg for _am_tar in tar gnutar gtar; 9353ad43ddacSmrg do 9354ad43ddacSmrg AM_RUN_LOG([$_am_tar --version]) && break 9355ad43ddacSmrg done 9356ad43ddacSmrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9357ad43ddacSmrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9358ad43ddacSmrg am__untar="$_am_tar -xf -" 9359ad43ddacSmrg ;; 9360ad43ddacSmrg plaintar) 9361ad43ddacSmrg # Must skip GNU tar: if it does not support --format= it doesn't create 9362ad43ddacSmrg # ustar tarball either. 9363ad43ddacSmrg (tar --version) >/dev/null 2>&1 && continue 9364ad43ddacSmrg am__tar='tar chf - "$$tardir"' 9365ad43ddacSmrg am__tar_='tar chf - "$tardir"' 9366ad43ddacSmrg am__untar='tar xf -' 9367ad43ddacSmrg ;; 9368ad43ddacSmrg pax) 9369ad43ddacSmrg am__tar='pax -L -x $1 -w "$$tardir"' 9370ad43ddacSmrg am__tar_='pax -L -x $1 -w "$tardir"' 9371ad43ddacSmrg am__untar='pax -r' 9372ad43ddacSmrg ;; 9373ad43ddacSmrg cpio) 9374ad43ddacSmrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9375ad43ddacSmrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9376ad43ddacSmrg am__untar='cpio -i -H $1 -d' 9377ad43ddacSmrg ;; 9378ad43ddacSmrg none) 9379ad43ddacSmrg am__tar=false 9380ad43ddacSmrg am__tar_=false 9381ad43ddacSmrg am__untar=false 9382ad43ddacSmrg ;; 9383ad43ddacSmrg esac 9384209ff23fSmrg 9385ad43ddacSmrg # If the value was cached, stop now. We just wanted to have am__tar 9386ad43ddacSmrg # and am__untar set. 9387ad43ddacSmrg test -n "${am_cv_prog_tar_$1}" && break 9388ad43ddacSmrg 9389ad43ddacSmrg # tar/untar a dummy directory, and stop if the command works 9390ad43ddacSmrg rm -rf conftest.dir 9391ad43ddacSmrg mkdir conftest.dir 9392ad43ddacSmrg echo GrepMe > conftest.dir/file 9393ad43ddacSmrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 9394ad43ddacSmrg rm -rf conftest.dir 9395ad43ddacSmrg if test -s conftest.tar; then 9396ad43ddacSmrg AM_RUN_LOG([$am__untar <conftest.tar]) 9397ad43ddacSmrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9398c503f109Smrg fi 9399ad43ddacSmrgdone 9400ad43ddacSmrgrm -rf conftest.dir 9401ad43ddacSmrg 9402ad43ddacSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 9403ad43ddacSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9404ad43ddacSmrgAC_SUBST([am__tar]) 9405ad43ddacSmrgAC_SUBST([am__untar]) 9406ad43ddacSmrg]) # _AM_PROG_TAR 9407ad43ddacSmrg 9408ad43ddacSmrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9409ad43ddacSmrgdnl 9410ad43ddacSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 9411ad43ddacSmrgdnl 9412ad43ddacSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9413ad43ddacSmrgdnl copy of this software and associated documentation files (the 9414ad43ddacSmrgdnl "Software"), to deal in the Software without restriction, including 9415ad43ddacSmrgdnl without limitation the rights to use, copy, modify, merge, publish, 9416ad43ddacSmrgdnl distribute, and/or sell copies of the Software, and to permit persons 9417ad43ddacSmrgdnl to whom the Software is furnished to do so, provided that the above 9418ad43ddacSmrgdnl copyright notice(s) and this permission notice appear in all copies of 9419ad43ddacSmrgdnl the Software and that both the above copyright notice(s) and this 9420ad43ddacSmrgdnl permission notice appear in supporting documentation. 9421ad43ddacSmrgdnl 9422ad43ddacSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9423ad43ddacSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9424ad43ddacSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 9425ad43ddacSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 9426ad43ddacSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 9427ad43ddacSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 9428ad43ddacSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 9429ad43ddacSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 9430ad43ddacSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 9431ad43ddacSmrgdnl 9432ad43ddacSmrgdnl Except as contained in this notice, the name of a copyright holder 9433ad43ddacSmrgdnl shall not be used in advertising or otherwise to promote the sale, use 9434ad43ddacSmrgdnl or other dealings in this Software without prior written authorization 9435ad43ddacSmrgdnl of the copyright holder. 9436ad43ddacSmrg 9437ad43ddacSmrg# XORG_MACROS_VERSION(required-version) 9438ad43ddacSmrg# ------------------------------------- 9439ad43ddacSmrg# Minimum version: 1.1.0 9440ad43ddacSmrg# 9441ad43ddacSmrg# If you're using a macro added in Version 1.1 or newer, include this in 9442ad43ddacSmrg# your configure.ac with the minimum required version, such as: 9443ad43ddacSmrg# XORG_MACROS_VERSION(1.1) 9444ad43ddacSmrg# 9445ad43ddacSmrg# To ensure that this macro is defined, also add: 9446ad43ddacSmrg# m4_ifndef([XORG_MACROS_VERSION], 9447ad43ddacSmrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9448ad43ddacSmrg# 9449ad43ddacSmrg# 9450ad43ddacSmrg# See the "minimum version" comment for each macro you use to see what 9451ad43ddacSmrg# version you require. 9452ad43ddacSmrgm4_defun([XORG_MACROS_VERSION],[ 9453ad43ddacSmrgm4_define([vers_have], [1.3.0]) 9454ad43ddacSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9455ad43ddacSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9456ad43ddacSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9457ad43ddacSmrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9458ad43ddacSmrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9459ad43ddacSmrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9460ad43ddacSmrgm4_undefine([vers_have]) 9461ad43ddacSmrgm4_undefine([maj_have]) 9462ad43ddacSmrgm4_undefine([maj_needed]) 9463ad43ddacSmrg]) # XORG_MACROS_VERSION 9464ad43ddacSmrg 9465ad43ddacSmrg# XORG_PROG_RAWCPP() 9466ad43ddacSmrg# ------------------ 9467ad43ddacSmrg# Minimum version: 1.0.0 9468ad43ddacSmrg# 9469ad43ddacSmrg# Find cpp program and necessary flags for use in pre-processing text files 9470ad43ddacSmrg# such as man pages and config files 9471ad43ddacSmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9472ad43ddacSmrgAC_REQUIRE([AC_PROG_CPP]) 9473ad43ddacSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9474ad43ddacSmrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9475ad43ddacSmrg 9476ad43ddacSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9477ad43ddacSmrg# which is not the best choice for supporting other OS'es, but covers most 9478ad43ddacSmrg# of the ones we need for now. 9479ad43ddacSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9480ad43ddacSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 9481ad43ddacSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9482ad43ddacSmrg AC_MSG_RESULT([no]) 9483ad43ddacSmrgelse 9484ad43ddacSmrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9485ad43ddacSmrg RAWCPPFLAGS=-undef 9486ad43ddacSmrg AC_MSG_RESULT([yes]) 9487ad43ddacSmrg # under Cygwin unix is still defined even with -undef 9488ad43ddacSmrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9489ad43ddacSmrg RAWCPPFLAGS="-undef -ansi" 9490ad43ddacSmrg AC_MSG_RESULT([yes, with -ansi]) 9491ad43ddacSmrg else 9492ad43ddacSmrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9493ad43ddacSmrg fi 9494209ff23fSmrgfi 9495ad43ddacSmrgrm -f conftest.$ac_ext 9496209ff23fSmrg 9497ad43ddacSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9498ad43ddacSmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 9499ad43ddacSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9500ad43ddacSmrg AC_MSG_RESULT([no]) 9501ad43ddacSmrgelse 9502ad43ddacSmrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9503ad43ddacSmrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9504ad43ddacSmrg AC_MSG_RESULT([yes]) 9505ad43ddacSmrg else 9506ad43ddacSmrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9507ad43ddacSmrg fi 9508c503f109Smrgfi 9509ad43ddacSmrgrm -f conftest.$ac_ext 9510ad43ddacSmrgAC_SUBST(RAWCPPFLAGS) 9511ad43ddacSmrg]) # XORG_PROG_RAWCPP 9512209ff23fSmrg 9513ad43ddacSmrg# XORG_MANPAGE_SECTIONS() 9514ad43ddacSmrg# ----------------------- 9515ad43ddacSmrg# Minimum version: 1.0.0 9516ad43ddacSmrg# 9517ad43ddacSmrg# Determine which sections man pages go in for the different man page types 9518ad43ddacSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9519ad43ddacSmrg# Not sure if there's any better way than just hardcoding by OS name. 9520ad43ddacSmrg# Override default settings by setting environment variables 9521ad43ddacSmrg 9522ad43ddacSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9523ad43ddacSmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9524ad43ddacSmrg 9525ad43ddacSmrgif test x$APP_MAN_SUFFIX = x ; then 9526ad43ddacSmrg APP_MAN_SUFFIX=1 9527ad43ddacSmrgfi 9528ad43ddacSmrgif test x$APP_MAN_DIR = x ; then 9529ad43ddacSmrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9530ad43ddacSmrgfi 9531ad43ddacSmrg 9532ad43ddacSmrgif test x$LIB_MAN_SUFFIX = x ; then 9533ad43ddacSmrg LIB_MAN_SUFFIX=3 9534ad43ddacSmrgfi 9535ad43ddacSmrgif test x$LIB_MAN_DIR = x ; then 9536ad43ddacSmrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9537ad43ddacSmrgfi 9538209ff23fSmrg 9539ad43ddacSmrgif test x$FILE_MAN_SUFFIX = x ; then 9540ad43ddacSmrg case $host_os in 9541ad43ddacSmrg solaris*) FILE_MAN_SUFFIX=4 ;; 9542ad43ddacSmrg *) FILE_MAN_SUFFIX=5 ;; 9543ad43ddacSmrg esac 9544ad43ddacSmrgfi 9545ad43ddacSmrgif test x$FILE_MAN_DIR = x ; then 9546ad43ddacSmrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9547ad43ddacSmrgfi 9548209ff23fSmrg 9549ad43ddacSmrgif test x$MISC_MAN_SUFFIX = x ; then 9550ad43ddacSmrg case $host_os in 9551ad43ddacSmrg solaris*) MISC_MAN_SUFFIX=5 ;; 9552ad43ddacSmrg *) MISC_MAN_SUFFIX=7 ;; 9553ad43ddacSmrg esac 9554ad43ddacSmrgfi 9555ad43ddacSmrgif test x$MISC_MAN_DIR = x ; then 9556ad43ddacSmrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9557ad43ddacSmrgfi 9558209ff23fSmrg 9559ad43ddacSmrgif test x$DRIVER_MAN_SUFFIX = x ; then 9560ad43ddacSmrg case $host_os in 9561ad43ddacSmrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9562ad43ddacSmrg *) DRIVER_MAN_SUFFIX=4 ;; 9563ad43ddacSmrg esac 9564ad43ddacSmrgfi 9565ad43ddacSmrgif test x$DRIVER_MAN_DIR = x ; then 9566ad43ddacSmrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9567ad43ddacSmrgfi 9568209ff23fSmrg 9569ad43ddacSmrgif test x$ADMIN_MAN_SUFFIX = x ; then 9570ad43ddacSmrg case $host_os in 9571ad43ddacSmrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9572ad43ddacSmrg *) ADMIN_MAN_SUFFIX=8 ;; 9573ad43ddacSmrg esac 9574ad43ddacSmrgfi 9575ad43ddacSmrgif test x$ADMIN_MAN_DIR = x ; then 9576ad43ddacSmrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9577ad43ddacSmrgfi 9578209ff23fSmrg 9579209ff23fSmrg 9580ad43ddacSmrgAC_SUBST([APP_MAN_SUFFIX]) 9581ad43ddacSmrgAC_SUBST([LIB_MAN_SUFFIX]) 9582ad43ddacSmrgAC_SUBST([FILE_MAN_SUFFIX]) 9583ad43ddacSmrgAC_SUBST([MISC_MAN_SUFFIX]) 9584ad43ddacSmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9585ad43ddacSmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9586ad43ddacSmrgAC_SUBST([APP_MAN_DIR]) 9587ad43ddacSmrgAC_SUBST([LIB_MAN_DIR]) 9588ad43ddacSmrgAC_SUBST([FILE_MAN_DIR]) 9589ad43ddacSmrgAC_SUBST([MISC_MAN_DIR]) 9590ad43ddacSmrgAC_SUBST([DRIVER_MAN_DIR]) 9591ad43ddacSmrgAC_SUBST([ADMIN_MAN_DIR]) 9592ad43ddacSmrg]) # XORG_MANPAGE_SECTIONS 9593209ff23fSmrg 9594ad43ddacSmrg# XORG_CHECK_LINUXDOC 9595ad43ddacSmrg# ------------------- 9596ad43ddacSmrg# Minimum version: 1.0.0 9597209ff23fSmrg# 9598ad43ddacSmrg# Defines the variable MAKE_TEXT if the necessary tools and 9599ad43ddacSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9600ad43ddacSmrg# Whether or not the necessary tools and files are found can be checked 9601ad43ddacSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9602ad43ddacSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9603ad43ddacSmrgif test x$XORG_SGML_PATH = x ; then 9604ad43ddacSmrg XORG_SGML_PATH=$prefix/share/sgml 9605ad43ddacSmrgfi 9606ad43ddacSmrgHAVE_DEFS_ENT= 9607209ff23fSmrg 9608ad43ddacSmrgif test x"$cross_compiling" = x"yes" ; then 9609ad43ddacSmrg HAVE_DEFS_ENT=no 9610ad43ddacSmrgelse 9611ad43ddacSmrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 9612c503f109Smrgfi 9613209ff23fSmrg 9614ad43ddacSmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9615ad43ddacSmrgAC_PATH_PROG(PS2PDF, ps2pdf) 9616209ff23fSmrg 9617ad43ddacSmrgAC_MSG_CHECKING([Whether to build documentation]) 9618209ff23fSmrg 9619ad43ddacSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 9620ad43ddacSmrg BUILDDOC=yes 9621c503f109Smrgelse 9622ad43ddacSmrg BUILDDOC=no 9623209ff23fSmrgfi 9624209ff23fSmrg 9625ad43ddacSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9626209ff23fSmrg 9627ad43ddacSmrgAC_MSG_RESULT([$BUILDDOC]) 9628209ff23fSmrg 9629ad43ddacSmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 9630209ff23fSmrg 9631ad43ddacSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 9632ad43ddacSmrg BUILDPDFDOC=yes 9633ad43ddacSmrgelse 9634ad43ddacSmrg BUILDPDFDOC=no 9635ad43ddacSmrgfi 9636209ff23fSmrg 9637ad43ddacSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9638c503f109Smrg 9639ad43ddacSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9640ad43ddacSmrg 9641ad43ddacSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 9642ad43ddacSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9643ad43ddacSmrgMAKE_PDF="$PS2PDF" 9644ad43ddacSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9645c503f109Smrg 9646ad43ddacSmrgAC_SUBST(MAKE_TEXT) 9647ad43ddacSmrgAC_SUBST(MAKE_PS) 9648ad43ddacSmrgAC_SUBST(MAKE_PDF) 9649ad43ddacSmrgAC_SUBST(MAKE_HTML) 9650ad43ddacSmrg]) # XORG_CHECK_LINUXDOC 9651ad43ddacSmrg 9652ad43ddacSmrg# XORG_CHECK_DOCBOOK 9653ad43ddacSmrg# ------------------- 9654ad43ddacSmrg# Minimum version: 1.0.0 9655209ff23fSmrg# 9656ad43ddacSmrg# Checks for the ability to build output formats from SGML DocBook source. 9657ad43ddacSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9658ad43ddacSmrg# indicates whether the necessary tools and files are found and, if set, 9659ad43ddacSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9660ad43ddacSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9661ad43ddacSmrgif test x$XORG_SGML_PATH = x ; then 9662ad43ddacSmrg XORG_SGML_PATH=$prefix/share/sgml 9663ad43ddacSmrgfi 9664ad43ddacSmrgHAVE_DEFS_ENT= 9665ad43ddacSmrgBUILDTXTDOC=no 9666ad43ddacSmrgBUILDPDFDOC=no 9667ad43ddacSmrgBUILDPSDOC=no 9668ad43ddacSmrgBUILDHTMLDOC=no 9669209ff23fSmrg 9670ad43ddacSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 9671209ff23fSmrg 9672ad43ddacSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9673ad43ddacSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9674ad43ddacSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9675ad43ddacSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9676ad43ddacSmrg 9677ad43ddacSmrgAC_MSG_CHECKING([Whether to build text documentation]) 9678ad43ddacSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 9679ad43ddacSmrg test x$BUILD_TXTDOC != xno; then 9680ad43ddacSmrg BUILDTXTDOC=yes 9681209ff23fSmrgfi 9682ad43ddacSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9683ad43ddacSmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9684209ff23fSmrg 9685ad43ddacSmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 9686ad43ddacSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 9687ad43ddacSmrg test x$BUILD_PDFDOC != xno; then 9688ad43ddacSmrg BUILDPDFDOC=yes 9689ad43ddacSmrgfi 9690ad43ddacSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9691ad43ddacSmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9692ad43ddacSmrg 9693ad43ddacSmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 9694ad43ddacSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 9695ad43ddacSmrg test x$BUILD_PSDOC != xno; then 9696ad43ddacSmrg BUILDPSDOC=yes 9697ad43ddacSmrgfi 9698ad43ddacSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9699ad43ddacSmrgAC_MSG_RESULT([$BUILDPSDOC]) 9700209ff23fSmrg 9701ad43ddacSmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 9702ad43ddacSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 9703ad43ddacSmrg test x$BUILD_HTMLDOC != xno; then 9704ad43ddacSmrg BUILDHTMLDOC=yes 9705ad43ddacSmrgfi 9706ad43ddacSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9707ad43ddacSmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9708209ff23fSmrg 9709ad43ddacSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9710ad43ddacSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9711ad43ddacSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9712ad43ddacSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9713c503f109Smrg 9714ad43ddacSmrgAC_SUBST(MAKE_TEXT) 9715ad43ddacSmrgAC_SUBST(MAKE_PS) 9716ad43ddacSmrgAC_SUBST(MAKE_PDF) 9717ad43ddacSmrgAC_SUBST(MAKE_HTML) 9718ad43ddacSmrg]) # XORG_CHECK_DOCBOOK 9719c503f109Smrg 9720ad43ddacSmrg# XORG_CHECK_MALLOC_ZERO 9721ad43ddacSmrg# ---------------------- 9722ad43ddacSmrg# Minimum version: 1.0.0 9723ad43ddacSmrg# 9724ad43ddacSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 9725ad43ddacSmrg# malloc(0) returns NULL. Packages should add one of these cflags to 9726ad43ddacSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 9727ad43ddacSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 9728ad43ddacSmrgAC_ARG_ENABLE(malloc0returnsnull, 9729ad43ddacSmrg AS_HELP_STRING([--enable-malloc0returnsnull], 9730ad43ddacSmrg [malloc(0) returns NULL (default: auto)]), 9731ad43ddacSmrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 9732ad43ddacSmrg [MALLOC_ZERO_RETURNS_NULL=auto]) 9733c503f109Smrg 9734ad43ddacSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 9735ad43ddacSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 9736ad43ddacSmrg AC_RUN_IFELSE([ 9737ad43ddacSmrgchar *malloc(); 9738ad43ddacSmrgchar *realloc(); 9739ad43ddacSmrgchar *calloc(); 9740ad43ddacSmrgmain() { 9741ad43ddacSmrg char *m0, *r0, *c0, *p; 9742ad43ddacSmrg m0 = malloc(0); 9743ad43ddacSmrg p = malloc(10); 9744ad43ddacSmrg r0 = realloc(p,0); 9745ad43ddacSmrg c0 = calloc(0); 9746ad43ddacSmrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 9747ad43ddacSmrg}], 9748ad43ddacSmrg [MALLOC_ZERO_RETURNS_NULL=yes], 9749ad43ddacSmrg [MALLOC_ZERO_RETURNS_NULL=no]) 9750209ff23fSmrgfi 9751ad43ddacSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 9752ad43ddacSmrg 9753ad43ddacSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 9754ad43ddacSmrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 9755ad43ddacSmrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 9756ad43ddacSmrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 9757c503f109Smrgelse 9758ad43ddacSmrg MALLOC_ZERO_CFLAGS="" 9759ad43ddacSmrg XMALLOC_ZERO_CFLAGS="" 9760ad43ddacSmrg XTMALLOC_ZERO_CFLAGS="" 9761209ff23fSmrgfi 9762209ff23fSmrg 9763ad43ddacSmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 9764ad43ddacSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 9765ad43ddacSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 9766ad43ddacSmrg]) # XORG_CHECK_MALLOC_ZERO 9767c503f109Smrg 9768ad43ddacSmrg# XORG_WITH_LINT() 9769ad43ddacSmrg# ---------------- 9770ad43ddacSmrg# Minimum version: 1.1.0 9771209ff23fSmrg# 9772ad43ddacSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint 9773ad43ddacSmrg# is specified. (Use --with-lint=sparse for sparse.) 9774ad43ddacSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 9775ad43ddacSmrg# Sets $LINT_FLAGS to flags to pass to source checker 9776ad43ddacSmrg# Sets LINT automake conditional if enabled (default: disabled) 9777ad43ddacSmrg# 9778ad43ddacSmrgAC_DEFUN([XORG_WITH_LINT],[ 9779209ff23fSmrg 9780ad43ddacSmrg# Allow checking code with lint, sparse, etc. 9781ad43ddacSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 9782ad43ddacSmrg [Use a lint-style source code checker (default: disabled)])], 9783ad43ddacSmrg [use_lint=$withval], [use_lint=no]) 9784ad43ddacSmrgif test "x$use_lint" = "xyes" ; then 9785ad43ddacSmrg LINT="lint" 9786ad43ddacSmrgelse 9787ad43ddacSmrg LINT="$use_lint" 9788ad43ddacSmrgfi 9789ad43ddacSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 9790ad43ddacSmrg case $LINT in 9791ad43ddacSmrg lint|*/lint) 9792ad43ddacSmrg case $host_os in 9793ad43ddacSmrg solaris*) 9794ad43ddacSmrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 9795ad43ddacSmrg ;; 9796ad43ddacSmrg esac 9797ad43ddacSmrg ;; 9798ad43ddacSmrg esac 9799ad43ddacSmrgfi 9800209ff23fSmrg 9801ad43ddacSmrgAC_SUBST(LINT) 9802ad43ddacSmrgAC_SUBST(LINT_FLAGS) 9803ad43ddacSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 9804209ff23fSmrg 9805ad43ddacSmrg]) # XORG_WITH_LINT 9806209ff23fSmrg 9807ad43ddacSmrg# XORG_LINT_LIBRARY(LIBNAME) 9808ad43ddacSmrg# -------------------------- 9809ad43ddacSmrg# Minimum version: 1.1.0 9810ad43ddacSmrg# 9811ad43ddacSmrg# Sets up flags for building lint libraries for checking programs that call 9812ad43ddacSmrg# functions in the library. 9813ad43ddacSmrg# Disabled by default, enable with --enable-lint-library 9814ad43ddacSmrg# Sets: 9815ad43ddacSmrg# @LINTLIB@ - name of lint library file to make 9816ad43ddacSmrg# MAKE_LINT_LIB - automake conditional 9817c503f109Smrg# 9818c503f109Smrg 9819ad43ddacSmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 9820ad43ddacSmrgAC_REQUIRE([XORG_WITH_LINT]) 9821ad43ddacSmrg# Build lint "library" for more indepth checks of programs calling this library 9822ad43ddacSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 9823ad43ddacSmrg [Create lint library (default: disabled)])], 9824ad43ddacSmrg [make_lint_lib=$enableval], [make_lint_lib=no]) 9825ad43ddacSmrgif test "x$make_lint_lib" != "xno" ; then 9826ad43ddacSmrg if test "x$LINT" = "xno" ; then 9827ad43ddacSmrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 9828ad43ddacSmrg fi 9829ad43ddacSmrg if test "x$make_lint_lib" = "xyes" ; then 9830ad43ddacSmrg LINTLIB=llib-l$1.ln 9831ad43ddacSmrg else 9832ad43ddacSmrg LINTLIB=$make_lint_lib 9833ad43ddacSmrg fi 9834ad43ddacSmrgfi 9835ad43ddacSmrgAC_SUBST(LINTLIB) 9836ad43ddacSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 9837c503f109Smrg 9838ad43ddacSmrg]) # XORG_LINT_LIBRARY 9839c503f109Smrg 9840ad43ddacSmrg# XORG_CWARNFLAGS 9841ad43ddacSmrg# --------------- 9842ad43ddacSmrg# Minimum version: 1.2.0 9843ad43ddacSmrg# 9844ad43ddacSmrg# Defines CWARNFLAGS to enable C compiler warnings. 9845ad43ddacSmrg# 9846ad43ddacSmrgAC_DEFUN([XORG_CWARNFLAGS], [ 9847ad43ddacSmrgAC_REQUIRE([AC_PROG_CC]) 9848ad43ddacSmrgif test "x$GCC" = xyes ; then 9849ad43ddacSmrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 9850ad43ddacSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 9851ad43ddacSmrg-Wbad-function-cast" 9852ad43ddacSmrg case `$CC -dumpversion` in 9853ad43ddacSmrg 3.4.* | 4.*) 9854ad43ddacSmrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 9855ad43ddacSmrg ;; 9856ad43ddacSmrg esac 9857ad43ddacSmrgelse 9858ad43ddacSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 9859ad43ddacSmrg if test "x$SUNCC" = "xyes"; then 9860ad43ddacSmrg CWARNFLAGS="-v" 9861ad43ddacSmrg fi 9862c503f109Smrgfi 9863ad43ddacSmrgAC_SUBST(CWARNFLAGS) 9864ad43ddacSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 9865ad43ddacSmrg]) # XORG_CWARNFLAGS 9866c503f109Smrg 9867ad43ddacSmrg# XORG_STRICT_OPTION 9868ad43ddacSmrg# ----------------------- 9869ad43ddacSmrg# Minimum version: 1.3.0 9870c503f109Smrg# 9871ad43ddacSmrg# Add configure option to enable strict compilation 9872ad43ddacSmrgAC_DEFUN([XORG_STRICT_OPTION], [ 9873ad43ddacSmrgAC_REQUIRE([AC_PROG_CC]) 9874ad43ddacSmrgAC_REQUIRE([AC_PROG_CC_C99]) 9875ad43ddacSmrgAC_REQUIRE([XORG_CWARNFLAGS]) 9876ad43ddacSmrg 9877ad43ddacSmrgAC_ARG_ENABLE(strict-compilation, 9878ad43ddacSmrg AS_HELP_STRING([--enable-strict-compilation], 9879ad43ddacSmrg [Enable all warnings from compiler and make them errors (default: disabled)]), 9880ad43ddacSmrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 9881ad43ddacSmrgif test "x$STRICT_COMPILE" = "xyes"; then 9882ad43ddacSmrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 9883ad43ddacSmrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 9884ad43ddacSmrg if test "x$GCC" = xyes ; then 9885ad43ddacSmrg STRICT_CFLAGS="-pedantic -Werror" 9886ad43ddacSmrg elif test "x$SUNCC" = "xyes"; then 9887ad43ddacSmrg STRICT_CFLAGS="-errwarn" 9888ad43ddacSmrg elif test "x$INTELCC" = "xyes"; then 9889ad43ddacSmrg STRICT_CFLAGS="-Werror" 9890ad43ddacSmrg fi 9891c503f109Smrgfi 9892ad43ddacSmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 9893ad43ddacSmrgAC_SUBST([CWARNFLAGS]) 9894ad43ddacSmrg]) # XORG_STRICT_OPTION 9895c503f109Smrg 9896ad43ddacSmrg# XORG_DEFAULT_OPTIONS 9897ad43ddacSmrg# -------------------- 9898ad43ddacSmrg# Minimum version: 1.3.0 9899c503f109Smrg# 9900ad43ddacSmrg# Defines default options for X.Org modules. 9901c503f109Smrg# 9902ad43ddacSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 9903ad43ddacSmrgXORG_CWARNFLAGS 9904ad43ddacSmrgXORG_STRICT_OPTION 9905ad43ddacSmrgXORG_RELEASE_VERSION 9906ad43ddacSmrgXORG_CHANGELOG 9907ad43ddacSmrgXORG_INSTALL 9908ad43ddacSmrgXORG_MANPAGE_SECTIONS 9909ad43ddacSmrg]) # XORG_DEFAULT_OPTIONS 9910ad43ddacSmrg 9911ad43ddacSmrg# XORG_INSTALL() 9912ad43ddacSmrg# ---------------- 9913ad43ddacSmrg# Minimum version: 1.4.0 9914ad43ddacSmrg# 9915ad43ddacSmrg# Defines the variable INSTALL_CMD as the command to copy 9916ad43ddacSmrg# INSTALL from $prefix/share/doc/util-macros. 9917ad43ddacSmrg# 9918ad43ddacSmrgAC_DEFUN([XORG_INSTALL], [ 9919ad43ddacSmrgINSTALL_CMD="if test -f "$prefix/share/doc/util-macros/INSTALL"; then \ 9920ad43ddacSmrgcp -f "$prefix/share/doc/util-macros/INSTALL" \$(top_srcdir); \ 9921ad43ddacSmrgelse echo '$prefix/share/doc/util-macros/INSTALL cannot be found.' >&2; fi " 9922ad43ddacSmrgAC_SUBST([INSTALL_CMD]) 9923ad43ddacSmrg]) # XORG_INSTALL 9924ad43ddacSmrgdnl Copyright 2005 Red Hat, Inc 9925ad43ddacSmrgdnl 9926ad43ddacSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 9927ad43ddacSmrgdnl documentation for any purpose is hereby granted without fee, provided that 9928ad43ddacSmrgdnl the above copyright notice appear in all copies and that both that 9929ad43ddacSmrgdnl copyright notice and this permission notice appear in supporting 9930ad43ddacSmrgdnl documentation. 9931ad43ddacSmrgdnl 9932ad43ddacSmrgdnl The above copyright notice and this permission notice shall be included 9933ad43ddacSmrgdnl in all copies or substantial portions of the Software. 9934ad43ddacSmrgdnl 9935ad43ddacSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9936ad43ddacSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9937ad43ddacSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 9938ad43ddacSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 9939ad43ddacSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 9940ad43ddacSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 9941ad43ddacSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 9942ad43ddacSmrgdnl 9943ad43ddacSmrgdnl Except as contained in this notice, the name of the copyright holders shall 9944ad43ddacSmrgdnl not be used in advertising or otherwise to promote the sale, use or 9945ad43ddacSmrgdnl other dealings in this Software without prior written authorization 9946ad43ddacSmrgdnl from the copyright holders. 9947ad43ddacSmrgdnl 9948c503f109Smrg 9949ad43ddacSmrg# XORG_RELEASE_VERSION 9950209ff23fSmrg# -------------------- 9951ad43ddacSmrg# Adds --with/without-release-string and changes the PACKAGE and 9952ad43ddacSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 9953ad43ddacSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 9954ad43ddacSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 9955ad43ddacSmrg 9956ad43ddacSmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 9957ad43ddacSmrg AC_ARG_WITH(release-version, 9958ad43ddacSmrg AS_HELP_STRING([--with-release-version=STRING], 9959ad43ddacSmrg [Use release version string in package name]), 9960ad43ddacSmrg [RELEASE_VERSION="$withval"], 9961ad43ddacSmrg [RELEASE_VERSION=""]) 9962ad43ddacSmrg if test "x$RELEASE_VERSION" != "x"; then 9963ad43ddacSmrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 9964ad43ddacSmrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 9965ad43ddacSmrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 9966ad43ddacSmrg fi 9967ad43ddacSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 9968ad43ddacSmrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 9969ad43ddacSmrg [Major version of this package]) 9970ad43ddacSmrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 9971ad43ddacSmrg if test "x$PVM" = "x"; then 9972ad43ddacSmrg PVM="0" 9973ad43ddacSmrg fi 9974ad43ddacSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 9975ad43ddacSmrg [$PVM], 9976ad43ddacSmrg [Minor version of this package]) 9977ad43ddacSmrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 9978ad43ddacSmrg if test "x$PVP" = "x"; then 9979ad43ddacSmrg PVP="0" 9980ad43ddacSmrg fi 9981ad43ddacSmrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 9982ad43ddacSmrg [$PVP], 9983ad43ddacSmrg [Patch version of this package]) 9984ad43ddacSmrg]) 9985ad43ddacSmrg 9986ad43ddacSmrg# XORG_CHANGELOG() 9987ad43ddacSmrg# ---------------- 9988ad43ddacSmrg# Minimum version: 1.2.0 9989c503f109Smrg# 9990ad43ddacSmrg# Defines the variable CHANGELOG_CMD as the command to generate 9991ad43ddacSmrg# ChangeLog from git. 9992c503f109Smrg# 9993ad43ddacSmrg# 9994ad43ddacSmrgAC_DEFUN([XORG_CHANGELOG], [ 9995ad43ddacSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \ 9996ad43ddacSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \ 9997ad43ddacSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \ 9998ad43ddacSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 9999ad43ddacSmrgAC_SUBST([CHANGELOG_CMD]) 10000ad43ddacSmrg]) # XORG_CHANGELOG 10001c503f109Smrg 10002ad43ddacSmrgdnl Copyright 2005 Red Hat, Inc 10003ad43ddacSmrgdnl 10004ad43ddacSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its 10005ad43ddacSmrgdnl documentation for any purpose is hereby granted without fee, provided that 10006ad43ddacSmrgdnl the above copyright notice appear in all copies and that both that 10007ad43ddacSmrgdnl copyright notice and this permission notice appear in supporting 10008ad43ddacSmrgdnl documentation. 10009ad43ddacSmrgdnl 10010ad43ddacSmrgdnl The above copyright notice and this permission notice shall be included 10011ad43ddacSmrgdnl in all copies or substantial portions of the Software. 10012ad43ddacSmrgdnl 10013ad43ddacSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 10014ad43ddacSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 10015ad43ddacSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 10016ad43ddacSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 10017ad43ddacSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 10018ad43ddacSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 10019ad43ddacSmrgdnl OTHER DEALINGS IN THE SOFTWARE. 10020ad43ddacSmrgdnl 10021ad43ddacSmrgdnl Except as contained in this notice, the name of the copyright holders shall 10022ad43ddacSmrgdnl not be used in advertising or otherwise to promote the sale, use or 10023ad43ddacSmrgdnl other dealings in this Software without prior written authorization 10024ad43ddacSmrgdnl from the copyright holders. 10025ad43ddacSmrgdnl 10026c503f109Smrg 10027ad43ddacSmrg# XORG_DRIVER_CHECK_EXT() 10028ad43ddacSmrg# -------------------------- 10029ad43ddacSmrg# Checks for the $1 define in xorg-server.h (from the sdk). If it 10030ad43ddacSmrg# is defined, then add $1 to $REQUIRED_MODULES. 10031c503f109Smrg 10032ad43ddacSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[ 10033ad43ddacSmrg SAVE_CFLAGS="$CFLAGS" 10034ad43ddacSmrg CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`" 10035ad43ddacSmrg AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ 10036ad43ddacSmrg#include "xorg-server.h" 10037ad43ddacSmrg#if !defined $1 10038ad43ddacSmrg#error $1 not defined 10039ad43ddacSmrg#endif 10040ad43ddacSmrg ]])], 10041ad43ddacSmrg [_EXT_CHECK=yes], 10042ad43ddacSmrg [_EXT_CHECK=no]) 10043ad43ddacSmrg CFLAGS="$SAVE_CFLAGS" 10044ad43ddacSmrg AC_MSG_CHECKING([if $1 is defined]) 10045ad43ddacSmrg AC_MSG_RESULT([$_EXT_CHECK]) 10046ad43ddacSmrg if test "$_EXT_CHECK" != no; then 10047ad43ddacSmrg REQUIRED_MODULES="$REQUIRED_MODULES $2" 10048ad43ddacSmrg fi 10049ad43ddacSmrg]) 10050209ff23fSmrg 10051