aclocal.m4 revision ea133fd7
1ea133fd7Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*- 2a253d6aeSmrg 3a253d6aeSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 4ea133fd7Smrg# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 5a253d6aeSmrg# This file is free software; the Free Software Foundation 6a253d6aeSmrg# gives unlimited permission to copy and/or distribute it, 7a253d6aeSmrg# with or without modifications, as long as this notice is preserved. 8a253d6aeSmrg 9a253d6aeSmrg# This program is distributed in the hope that it will be useful, 10a253d6aeSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without 11a253d6aeSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A 12a253d6aeSmrg# PARTICULAR PURPOSE. 13a253d6aeSmrg 14ea133fd7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 15ea133fd7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 16ea133fd7Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],, 17ea133fd7Smrg[m4_warning([this file was generated for autoconf 2.63. 18ea133fd7SmrgYou have another version of autoconf. It may work, but is not guaranteed to. 19ea133fd7SmrgIf you have problems, you may need to regenerate the build system entirely. 20ea133fd7SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])]) 21a253d6aeSmrg 22ea133fd7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- 23a253d6aeSmrg# 24ea133fd7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 25ea133fd7Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 26ea133fd7Smrg# Written by Gordon Matzigkeit, 1996 27a253d6aeSmrg# 28ea133fd7Smrg# This file is free software; the Free Software Foundation gives 29ea133fd7Smrg# unlimited permission to copy and/or distribute it, with or without 30ea133fd7Smrg# modifications, as long as this notice is preserved. 31ea133fd7Smrg 32ea133fd7Smrgm4_define([_LT_COPYING], [dnl 33ea133fd7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 34ea133fd7Smrg# 2006, 2007, 2008 Free Software Foundation, Inc. 35ea133fd7Smrg# Written by Gordon Matzigkeit, 1996 36a253d6aeSmrg# 37ea133fd7Smrg# This file is part of GNU Libtool. 38a253d6aeSmrg# 39ea133fd7Smrg# GNU Libtool is free software; you can redistribute it and/or 40ea133fd7Smrg# modify it under the terms of the GNU General Public License as 41ea133fd7Smrg# published by the Free Software Foundation; either version 2 of 42ea133fd7Smrg# the License, or (at your option) any later version. 43a253d6aeSmrg# 44ea133fd7Smrg# As a special exception to the GNU General Public License, 45ea133fd7Smrg# if you distribute this file as part of a program or library that 46ea133fd7Smrg# is built using GNU Libtool, you may include this file under the 47ea133fd7Smrg# same distribution terms that you use for the rest of that program. 48a253d6aeSmrg# 49ea133fd7Smrg# GNU Libtool is distributed in the hope that it will be useful, 50ea133fd7Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of 51ea133fd7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 52ea133fd7Smrg# GNU General Public License for more details. 53a253d6aeSmrg# 54ea133fd7Smrg# You should have received a copy of the GNU General Public License 55ea133fd7Smrg# along with GNU Libtool; see the file COPYING. If not, a copy 56ea133fd7Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or 57ea133fd7Smrg# obtained by writing to the Free Software Foundation, Inc., 58ea133fd7Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 59a253d6aeSmrg]) 60a253d6aeSmrg 61ea133fd7Smrg# serial 56 LT_INIT 62a253d6aeSmrg 63a253d6aeSmrg 64ea133fd7Smrg# LT_PREREQ(VERSION) 65ea133fd7Smrg# ------------------ 66ea133fd7Smrg# Complain and exit if this libtool version is less that VERSION. 67ea133fd7Smrgm4_defun([LT_PREREQ], 68ea133fd7Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, 69ea133fd7Smrg [m4_default([$3], 70ea133fd7Smrg [m4_fatal([Libtool version $1 or higher is required], 71ea133fd7Smrg 63)])], 72ea133fd7Smrg [$2])]) 73a253d6aeSmrg 74a253d6aeSmrg 75ea133fd7Smrg# _LT_CHECK_BUILDDIR 76ea133fd7Smrg# ------------------ 77ea133fd7Smrg# Complain if the absolute build directory name contains unusual characters 78ea133fd7Smrgm4_defun([_LT_CHECK_BUILDDIR], 79ea133fd7Smrg[case `pwd` in 80ea133fd7Smrg *\ * | *\ *) 81ea133fd7Smrg AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; 82ea133fd7Smrgesac 83ea133fd7Smrg]) 84a253d6aeSmrg 85a253d6aeSmrg 86ea133fd7Smrg# LT_INIT([OPTIONS]) 87ea133fd7Smrg# ------------------ 88ea133fd7SmrgAC_DEFUN([LT_INIT], 89ea133fd7Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT 90ea133fd7SmrgAC_BEFORE([$0], [LT_LANG])dnl 91ea133fd7SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl 92ea133fd7SmrgAC_BEFORE([$0], [LTDL_INIT])dnl 93ea133fd7Smrgm4_require([_LT_CHECK_BUILDDIR])dnl 94ea133fd7Smrg 95ea133fd7Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default: 96ea133fd7Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl 97ea133fd7Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl 98ea133fd7Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 99ea133fd7Smrgdnl unless we require an AC_DEFUNed macro: 100ea133fd7SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl 101ea133fd7SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl 102ea133fd7SmrgAC_REQUIRE([LTVERSION_VERSION])dnl 103ea133fd7SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl 104ea133fd7Smrgm4_require([_LT_PROG_LTMAIN])dnl 105ea133fd7Smrg 106ea133fd7Smrgdnl Parse OPTIONS 107ea133fd7Smrg_LT_SET_OPTIONS([$0], [$1]) 108a253d6aeSmrg 109ea133fd7Smrg# This can be used to rebuild libtool when needed 110ea133fd7SmrgLIBTOOL_DEPS="$ltmain" 111a253d6aeSmrg 112ea133fd7Smrg# Always use our own libtool. 113ea133fd7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool' 114ea133fd7SmrgAC_SUBST(LIBTOOL)dnl 115a253d6aeSmrg 116ea133fd7Smrg_LT_SETUP 117a253d6aeSmrg 118ea133fd7Smrg# Only expand once: 119ea133fd7Smrgm4_define([LT_INIT]) 120ea133fd7Smrg])# LT_INIT 121a253d6aeSmrg 122ea133fd7Smrg# Old names: 123ea133fd7SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) 124ea133fd7SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) 125ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 126ea133fd7Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], []) 127ea133fd7Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], []) 128a253d6aeSmrg 129a253d6aeSmrg 130ea133fd7Smrg# _LT_CC_BASENAME(CC) 131ea133fd7Smrg# ------------------- 132ea133fd7Smrg# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. 133ea133fd7Smrgm4_defun([_LT_CC_BASENAME], 134ea133fd7Smrg[for cc_temp in $1""; do 135ea133fd7Smrg case $cc_temp in 136ea133fd7Smrg compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; 137ea133fd7Smrg distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; 138ea133fd7Smrg \-*) ;; 139ea133fd7Smrg *) break;; 140ea133fd7Smrg esac 141ea133fd7Smrgdone 142ea133fd7Smrgcc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` 143a253d6aeSmrg]) 144ea133fd7Smrg 145ea133fd7Smrg 146ea133fd7Smrg# _LT_FILEUTILS_DEFAULTS 147ea133fd7Smrg# ---------------------- 148ea133fd7Smrg# It is okay to use these file commands and assume they have been set 149ea133fd7Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. 150ea133fd7Smrgm4_defun([_LT_FILEUTILS_DEFAULTS], 151ea133fd7Smrg[: ${CP="cp -f"} 152ea133fd7Smrg: ${MV="mv -f"} 153ea133fd7Smrg: ${RM="rm -f"} 154ea133fd7Smrg])# _LT_FILEUTILS_DEFAULTS 155ea133fd7Smrg 156ea133fd7Smrg 157ea133fd7Smrg# _LT_SETUP 158ea133fd7Smrg# --------- 159ea133fd7Smrgm4_defun([_LT_SETUP], 160ea133fd7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 161ea133fd7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 162ea133fd7Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl 163ea133fd7Smrg_LT_DECL([], [host], [0])dnl 164ea133fd7Smrg_LT_DECL([], [host_os], [0])dnl 165ea133fd7Smrgdnl 166ea133fd7Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl 167ea133fd7Smrg_LT_DECL([], [build], [0])dnl 168ea133fd7Smrg_LT_DECL([], [build_os], [0])dnl 169ea133fd7Smrgdnl 170ea133fd7SmrgAC_REQUIRE([AC_PROG_CC])dnl 171ea133fd7SmrgAC_REQUIRE([LT_PATH_LD])dnl 172ea133fd7SmrgAC_REQUIRE([LT_PATH_NM])dnl 173ea133fd7Smrgdnl 174ea133fd7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl 175ea133fd7Smrgtest -z "$LN_S" && LN_S="ln -s" 176ea133fd7Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl 177ea133fd7Smrgdnl 178ea133fd7SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl 179ea133fd7Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl 180ea133fd7Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl 181ea133fd7Smrgdnl 182ea133fd7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 183ea133fd7Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl 184ea133fd7Smrgm4_require([_LT_CMD_RELOAD])dnl 185ea133fd7Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl 186ea133fd7Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl 187ea133fd7Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 188ea133fd7Smrg 189ea133fd7Smrg_LT_CONFIG_LIBTOOL_INIT([ 190ea133fd7Smrg# See if we are running on zsh, and set the options which allow our 191ea133fd7Smrg# commands through without removal of \ escapes INIT. 192ea133fd7Smrgif test -n "\${ZSH_VERSION+set}" ; then 193ea133fd7Smrg setopt NO_GLOB_SUBST 194ea133fd7Smrgfi 195a253d6aeSmrg]) 196ea133fd7Smrgif test -n "${ZSH_VERSION+set}" ; then 197ea133fd7Smrg setopt NO_GLOB_SUBST 198ea133fd7Smrgfi 199a253d6aeSmrg 200ea133fd7Smrg_LT_CHECK_OBJDIR 201a253d6aeSmrg 202ea133fd7Smrgm4_require([_LT_TAG_COMPILER])dnl 203ea133fd7Smrg_LT_PROG_ECHO_BACKSLASH 204a253d6aeSmrg 205ea133fd7Smrgcase $host_os in 206ea133fd7Smrgaix3*) 207ea133fd7Smrg # AIX sometimes has problems with the GCC collect2 program. For some 208ea133fd7Smrg # reason, if we set the COLLECT_NAMES environment variable, the problems 209ea133fd7Smrg # vanish in a puff of smoke. 210ea133fd7Smrg if test "X${COLLECT_NAMES+set}" != Xset; then 211ea133fd7Smrg COLLECT_NAMES= 212ea133fd7Smrg export COLLECT_NAMES 213ea133fd7Smrg fi 214ea133fd7Smrg ;; 215ea133fd7Smrgesac 216a253d6aeSmrg 217ea133fd7Smrg# Sed substitution that helps us do robust quoting. It backslashifies 218ea133fd7Smrg# metacharacters that are still active within double-quoted strings. 219ea133fd7Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g' 220a253d6aeSmrg 221ea133fd7Smrg# Same as above, but do not quote variable references. 222ea133fd7Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g' 223a253d6aeSmrg 224ea133fd7Smrg# Sed substitution to delay expansion of an escaped shell variable in a 225ea133fd7Smrg# double_quote_subst'ed string. 226ea133fd7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' 227a253d6aeSmrg 228ea133fd7Smrg# Sed substitution to delay expansion of an escaped single quote. 229ea133fd7Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' 230a253d6aeSmrg 231ea133fd7Smrg# Sed substitution to avoid accidental globbing in evaled expressions 232ea133fd7Smrgno_glob_subst='s/\*/\\\*/g' 233a253d6aeSmrg 234ea133fd7Smrg# Global variables: 235ea133fd7Smrgofile=libtool 236ea133fd7Smrgcan_build_shared=yes 237a253d6aeSmrg 238ea133fd7Smrg# All known linkers require a `.a' archive for static linking (except MSVC, 239ea133fd7Smrg# which needs '.lib'). 240ea133fd7Smrglibext=a 241a253d6aeSmrg 242ea133fd7Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld" 243a253d6aeSmrg 244ea133fd7Smrgold_CC="$CC" 245ea133fd7Smrgold_CFLAGS="$CFLAGS" 246a253d6aeSmrg 247ea133fd7Smrg# Set sane defaults for various variables 248ea133fd7Smrgtest -z "$CC" && CC=cc 249ea133fd7Smrgtest -z "$LTCC" && LTCC=$CC 250ea133fd7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS 251ea133fd7Smrgtest -z "$LD" && LD=ld 252ea133fd7Smrgtest -z "$ac_objext" && ac_objext=o 253a253d6aeSmrg 254ea133fd7Smrg_LT_CC_BASENAME([$compiler]) 255a253d6aeSmrg 256ea133fd7Smrg# Only perform the check for file, if the check method requires it 257ea133fd7Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file 258ea133fd7Smrgcase $deplibs_check_method in 259ea133fd7Smrgfile_magic*) 260ea133fd7Smrg if test "$file_magic_cmd" = '$MAGIC_CMD'; then 261ea133fd7Smrg _LT_PATH_MAGIC 262ea133fd7Smrg fi 263ea133fd7Smrg ;; 264ea133fd7Smrgesac 265a253d6aeSmrg 266ea133fd7Smrg# Use C for the default configuration in the libtool script 267ea133fd7SmrgLT_SUPPORTED_TAG([CC]) 268ea133fd7Smrg_LT_LANG_C_CONFIG 269ea133fd7Smrg_LT_LANG_DEFAULT_CONFIG 270ea133fd7Smrg_LT_CONFIG_COMMANDS 271ea133fd7Smrg])# _LT_SETUP 272a253d6aeSmrg 273a253d6aeSmrg 274ea133fd7Smrg# _LT_PROG_LTMAIN 275ea133fd7Smrg# --------------- 276ea133fd7Smrg# Note that this code is called both from `configure', and `config.status' 277ea133fd7Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, 278ea133fd7Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake, 279ea133fd7Smrg# so we pass a copy along to make sure it has a sensible value anyway. 280ea133fd7Smrgm4_defun([_LT_PROG_LTMAIN], 281ea133fd7Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl 282ea133fd7Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) 283ea133fd7Smrgltmain="$ac_aux_dir/ltmain.sh" 284ea133fd7Smrg])# _LT_PROG_LTMAIN 285a253d6aeSmrg 286a253d6aeSmrg 287a253d6aeSmrg 288ea133fd7Smrg# So that we can recreate a full libtool script including additional 289ea133fd7Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS 290ea133fd7Smrg# in macros and then make a single call at the end using the `libtool' 291ea133fd7Smrg# label. 292a253d6aeSmrg 293ea133fd7Smrg 294ea133fd7Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) 295ea133fd7Smrg# ---------------------------------------- 296ea133fd7Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. 297ea133fd7Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT], 298ea133fd7Smrg[m4_ifval([$1], 299ea133fd7Smrg [m4_append([_LT_OUTPUT_LIBTOOL_INIT], 300ea133fd7Smrg [$1 301ea133fd7Smrg])])]) 302ea133fd7Smrg 303ea133fd7Smrg# Initialize. 304ea133fd7Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT]) 305ea133fd7Smrg 306ea133fd7Smrg 307ea133fd7Smrg# _LT_CONFIG_LIBTOOL([COMMANDS]) 308ea133fd7Smrg# ------------------------------ 309ea133fd7Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. 310ea133fd7Smrgm4_define([_LT_CONFIG_LIBTOOL], 311ea133fd7Smrg[m4_ifval([$1], 312ea133fd7Smrg [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], 313ea133fd7Smrg [$1 314ea133fd7Smrg])])]) 315ea133fd7Smrg 316ea133fd7Smrg# Initialize. 317ea133fd7Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) 318ea133fd7Smrg 319ea133fd7Smrg 320ea133fd7Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) 321ea133fd7Smrg# ----------------------------------------------------- 322ea133fd7Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS], 323ea133fd7Smrg[_LT_CONFIG_LIBTOOL([$1]) 324ea133fd7Smrg_LT_CONFIG_LIBTOOL_INIT([$2]) 325a253d6aeSmrg]) 326ea133fd7Smrg 327ea133fd7Smrg 328ea133fd7Smrg# _LT_FORMAT_COMMENT([COMMENT]) 329ea133fd7Smrg# ----------------------------- 330ea133fd7Smrg# Add leading comment marks to the start of each line, and a trailing 331ea133fd7Smrg# full-stop to the whole comment if one is not present already. 332ea133fd7Smrgm4_define([_LT_FORMAT_COMMENT], 333ea133fd7Smrg[m4_ifval([$1], [ 334ea133fd7Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], 335ea133fd7Smrg [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) 336ea133fd7Smrg)]) 337ea133fd7Smrg 338ea133fd7Smrg 339ea133fd7Smrg 340ea133fd7Smrg 341ea133fd7Smrg 342ea133fd7Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) 343ea133fd7Smrg# ------------------------------------------------------------------- 344ea133fd7Smrg# CONFIGNAME is the name given to the value in the libtool script. 345ea133fd7Smrg# VARNAME is the (base) name used in the configure script. 346ea133fd7Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on 347ea133fd7Smrg# VARNAME. Any other value will be used directly. 348ea133fd7Smrgm4_define([_LT_DECL], 349ea133fd7Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ], 350ea133fd7Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], 351ea133fd7Smrg [m4_ifval([$1], [$1], [$2])]) 352ea133fd7Smrg lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) 353ea133fd7Smrg m4_ifval([$4], 354ea133fd7Smrg [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) 355ea133fd7Smrg lt_dict_add_subkey([lt_decl_dict], [$2], 356ea133fd7Smrg [tagged?], [m4_ifval([$5], [yes], [no])])]) 357a253d6aeSmrg]) 358a253d6aeSmrg 359a253d6aeSmrg 360ea133fd7Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) 361ea133fd7Smrg# -------------------------------------------------------- 362ea133fd7Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) 363a253d6aeSmrg 364a253d6aeSmrg 365ea133fd7Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) 366ea133fd7Smrg# ------------------------------------------------ 367ea133fd7Smrgm4_define([lt_decl_tag_varnames], 368ea133fd7Smrg[_lt_decl_filter([tagged?], [yes], $@)]) 369a253d6aeSmrg 370a253d6aeSmrg 371ea133fd7Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) 372ea133fd7Smrg# --------------------------------------------------------- 373ea133fd7Smrgm4_define([_lt_decl_filter], 374ea133fd7Smrg[m4_case([$#], 375ea133fd7Smrg [0], [m4_fatal([$0: too few arguments: $#])], 376ea133fd7Smrg [1], [m4_fatal([$0: too few arguments: $#: $1])], 377ea133fd7Smrg [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], 378ea133fd7Smrg [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], 379ea133fd7Smrg [lt_dict_filter([lt_decl_dict], $@)])[]dnl 380ea133fd7Smrg]) 381a253d6aeSmrg 382a253d6aeSmrg 383ea133fd7Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) 384ea133fd7Smrg# -------------------------------------------------- 385ea133fd7Smrgm4_define([lt_decl_quote_varnames], 386ea133fd7Smrg[_lt_decl_filter([value], [1], $@)]) 387a253d6aeSmrg 388a253d6aeSmrg 389ea133fd7Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) 390ea133fd7Smrg# --------------------------------------------------- 391ea133fd7Smrgm4_define([lt_decl_dquote_varnames], 392ea133fd7Smrg[_lt_decl_filter([value], [2], $@)]) 393a253d6aeSmrg 394a253d6aeSmrg 395ea133fd7Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) 396ea133fd7Smrg# --------------------------------------------------- 397ea133fd7Smrgm4_define([lt_decl_varnames_tagged], 398ea133fd7Smrg[m4_assert([$# <= 2])dnl 399ea133fd7Smrg_$0(m4_quote(m4_default([$1], [[, ]])), 400ea133fd7Smrg m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), 401ea133fd7Smrg m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) 402ea133fd7Smrgm4_define([_lt_decl_varnames_tagged], 403ea133fd7Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) 404a253d6aeSmrg 405a253d6aeSmrg 406ea133fd7Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) 407ea133fd7Smrg# ------------------------------------------------ 408ea133fd7Smrgm4_define([lt_decl_all_varnames], 409ea133fd7Smrg[_$0(m4_quote(m4_default([$1], [[, ]])), 410ea133fd7Smrg m4_if([$2], [], 411ea133fd7Smrg m4_quote(lt_decl_varnames), 412ea133fd7Smrg m4_quote(m4_shift($@))))[]dnl 413ea133fd7Smrg]) 414ea133fd7Smrgm4_define([_lt_decl_all_varnames], 415ea133fd7Smrg[lt_join($@, lt_decl_varnames_tagged([$1], 416ea133fd7Smrg lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl 417ea133fd7Smrg]) 418a253d6aeSmrg 419a253d6aeSmrg 420ea133fd7Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME]) 421ea133fd7Smrg# ------------------------------------ 422ea133fd7Smrg# Quote a variable value, and forward it to `config.status' so that its 423ea133fd7Smrg# declaration there will have the same value as in `configure'. VARNAME 424ea133fd7Smrg# must have a single quote delimited value for this to work. 425ea133fd7Smrgm4_define([_LT_CONFIG_STATUS_DECLARE], 426ea133fd7Smrg[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) 427a253d6aeSmrg 428ea133fd7Smrg 429ea133fd7Smrg# _LT_CONFIG_STATUS_DECLARATIONS 430ea133fd7Smrg# ------------------------------ 431ea133fd7Smrg# We delimit libtool config variables with single quotes, so when 432ea133fd7Smrg# we write them to config.status, we have to be sure to quote all 433ea133fd7Smrg# embedded single quotes properly. In configure, this macro expands 434ea133fd7Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into: 435ea133fd7Smrg# 436ea133fd7Smrg# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`' 437ea133fd7Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS], 438ea133fd7Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), 439ea133fd7Smrg [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) 440ea133fd7Smrg 441ea133fd7Smrg 442ea133fd7Smrg# _LT_LIBTOOL_TAGS 443ea133fd7Smrg# ---------------- 444ea133fd7Smrg# Output comment and list of tags supported by the script 445ea133fd7Smrgm4_defun([_LT_LIBTOOL_TAGS], 446ea133fd7Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl 447ea133fd7Smrgavailable_tags="_LT_TAGS"dnl 448a253d6aeSmrg]) 449a253d6aeSmrg 450a253d6aeSmrg 451ea133fd7Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) 452ea133fd7Smrg# ----------------------------------- 453ea133fd7Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and 454ea133fd7Smrg# expand to a commented shell variable setting: 455a253d6aeSmrg# 456ea133fd7Smrg# # Some comment about what VAR is for. 457ea133fd7Smrg# visible_name=$lt_internal_name 458ea133fd7Smrgm4_define([_LT_LIBTOOL_DECLARE], 459ea133fd7Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], 460ea133fd7Smrg [description])))[]dnl 461ea133fd7Smrgm4_pushdef([_libtool_name], 462ea133fd7Smrg m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl 463ea133fd7Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), 464ea133fd7Smrg [0], [_libtool_name=[$]$1], 465ea133fd7Smrg [1], [_libtool_name=$lt_[]$1], 466ea133fd7Smrg [2], [_libtool_name=$lt_[]$1], 467ea133fd7Smrg [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl 468ea133fd7Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl 469ea133fd7Smrg]) 470a253d6aeSmrg 471a253d6aeSmrg 472ea133fd7Smrg# _LT_LIBTOOL_CONFIG_VARS 473ea133fd7Smrg# ----------------------- 474ea133fd7Smrg# Produce commented declarations of non-tagged libtool config variables 475ea133fd7Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool' 476ea133fd7Smrg# script. Tagged libtool config variables (even for the LIBTOOL CONFIG 477ea133fd7Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS. 478ea133fd7Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS], 479ea133fd7Smrg[m4_foreach([_lt_var], 480ea133fd7Smrg m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), 481ea133fd7Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) 482ea133fd7Smrg 483ea133fd7Smrg 484ea133fd7Smrg# _LT_LIBTOOL_TAG_VARS(TAG) 485ea133fd7Smrg# ------------------------- 486ea133fd7Smrgm4_define([_LT_LIBTOOL_TAG_VARS], 487ea133fd7Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), 488ea133fd7Smrg [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) 489ea133fd7Smrg 490ea133fd7Smrg 491ea133fd7Smrg# _LT_TAGVAR(VARNAME, [TAGNAME]) 492a253d6aeSmrg# ------------------------------ 493ea133fd7Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) 494a253d6aeSmrg 495a253d6aeSmrg 496ea133fd7Smrg# _LT_CONFIG_COMMANDS 497ea133fd7Smrg# ------------------- 498ea133fd7Smrg# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of 499ea133fd7Smrg# variables for single and double quote escaping we saved from calls 500ea133fd7Smrg# to _LT_DECL, we can put quote escaped variables declarations 501ea133fd7Smrg# into `config.status', and then the shell code to quote escape them in 502ea133fd7Smrg# for loops in `config.status'. Finally, any additional code accumulated 503ea133fd7Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. 504ea133fd7Smrgm4_defun([_LT_CONFIG_COMMANDS], 505ea133fd7Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT], 506ea133fd7Smrg dnl If the libtool generation code has been placed in $CONFIG_LT, 507ea133fd7Smrg dnl instead of duplicating it all over again into config.status, 508ea133fd7Smrg dnl then we will have config.status run $CONFIG_LT later, so it 509ea133fd7Smrg dnl needs to know what name is stored there: 510ea133fd7Smrg [AC_CONFIG_COMMANDS([libtool], 511ea133fd7Smrg [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], 512ea133fd7Smrg dnl If the libtool generation code is destined for config.status, 513ea133fd7Smrg dnl expand the accumulated commands and init code now: 514ea133fd7Smrg [AC_CONFIG_COMMANDS([libtool], 515ea133fd7Smrg [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) 516ea133fd7Smrg])#_LT_CONFIG_COMMANDS 517ea133fd7Smrg 518ea133fd7Smrg 519ea133fd7Smrg# Initialize. 520ea133fd7Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], 521ea133fd7Smrg[ 522a253d6aeSmrg 523ea133fd7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 524ea133fd7Smrg# if CDPATH is set. 525ea133fd7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 526a253d6aeSmrg 527ea133fd7Smrgsed_quote_subst='$sed_quote_subst' 528ea133fd7Smrgdouble_quote_subst='$double_quote_subst' 529ea133fd7Smrgdelay_variable_subst='$delay_variable_subst' 530ea133fd7Smrg_LT_CONFIG_STATUS_DECLARATIONS 531ea133fd7SmrgLTCC='$LTCC' 532ea133fd7SmrgLTCFLAGS='$LTCFLAGS' 533ea133fd7Smrgcompiler='$compiler_DEFAULT' 534ea133fd7Smrg 535ea133fd7Smrg# Quote evaled strings. 536ea133fd7Smrgfor var in lt_decl_all_varnames([[ \ 537ea133fd7Smrg]], lt_decl_quote_varnames); do 538ea133fd7Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 539ea133fd7Smrg *[[\\\\\\\`\\"\\\$]]*) 540ea133fd7Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" 541ea133fd7Smrg ;; 542ea133fd7Smrg *) 543ea133fd7Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 544ea133fd7Smrg ;; 545ea133fd7Smrg esac 546ea133fd7Smrgdone 547ea133fd7Smrg 548ea133fd7Smrg# Double-quote double-evaled strings. 549ea133fd7Smrgfor var in lt_decl_all_varnames([[ \ 550ea133fd7Smrg]], lt_decl_dquote_varnames); do 551ea133fd7Smrg case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in 552ea133fd7Smrg *[[\\\\\\\`\\"\\\$]]*) 553ea133fd7Smrg eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" 554ea133fd7Smrg ;; 555ea133fd7Smrg *) 556ea133fd7Smrg eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" 557ea133fd7Smrg ;; 558ea133fd7Smrg esac 559ea133fd7Smrgdone 560ea133fd7Smrg 561ea133fd7Smrg# Fix-up fallback echo if it was mangled by the above quoting rules. 562ea133fd7Smrgcase \$lt_ECHO in 563ea133fd7Smrg*'\\\[$]0 --fallback-echo"')dnl " 564ea133fd7Smrg lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` 565ea133fd7Smrg ;; 566a253d6aeSmrgesac 567ea133fd7Smrg 568ea133fd7Smrg_LT_OUTPUT_LIBTOOL_INIT 569a253d6aeSmrg]) 570a253d6aeSmrg 571a253d6aeSmrg 572ea133fd7Smrg# LT_OUTPUT 573ea133fd7Smrg# --------- 574ea133fd7Smrg# This macro allows early generation of the libtool script (before 575ea133fd7Smrg# AC_OUTPUT is called), incase it is used in configure for compilation 576ea133fd7Smrg# tests. 577ea133fd7SmrgAC_DEFUN([LT_OUTPUT], 578ea133fd7Smrg[: ${CONFIG_LT=./config.lt} 579ea133fd7SmrgAC_MSG_NOTICE([creating $CONFIG_LT]) 580ea133fd7Smrgcat >"$CONFIG_LT" <<_LTEOF 581ea133fd7Smrg#! $SHELL 582ea133fd7Smrg# Generated by $as_me. 583ea133fd7Smrg# Run this file to recreate a libtool stub with the current configuration. 584ea133fd7Smrg 585ea133fd7Smrglt_cl_silent=false 586ea133fd7SmrgSHELL=\${CONFIG_SHELL-$SHELL} 587ea133fd7Smrg_LTEOF 588ea133fd7Smrg 589ea133fd7Smrgcat >>"$CONFIG_LT" <<\_LTEOF 590ea133fd7SmrgAS_SHELL_SANITIZE 591ea133fd7Smrg_AS_PREPARE 592ea133fd7Smrg 593ea133fd7Smrgexec AS_MESSAGE_FD>&1 594ea133fd7Smrgexec AS_MESSAGE_LOG_FD>>config.log 595ea133fd7Smrg{ 596ea133fd7Smrg echo 597ea133fd7Smrg AS_BOX([Running $as_me.]) 598ea133fd7Smrg} >&AS_MESSAGE_LOG_FD 599a253d6aeSmrg 600ea133fd7Smrglt_cl_help="\ 601ea133fd7Smrg\`$as_me' creates a local libtool stub from the current configuration, 602ea133fd7Smrgfor use in further configure time tests before the real libtool is 603ea133fd7Smrggenerated. 604a253d6aeSmrg 605ea133fd7SmrgUsage: $[0] [[OPTIONS]] 606a253d6aeSmrg 607ea133fd7Smrg -h, --help print this help, then exit 608ea133fd7Smrg -V, --version print version number, then exit 609ea133fd7Smrg -q, --quiet do not print progress messages 610ea133fd7Smrg -d, --debug don't remove temporary files 611a253d6aeSmrg 612ea133fd7SmrgReport bugs to <bug-libtool@gnu.org>." 613a253d6aeSmrg 614ea133fd7Smrglt_cl_version="\ 615ea133fd7Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl 616ea133fd7Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) 617ea133fd7Smrgconfigured by $[0], generated by m4_PACKAGE_STRING. 618a253d6aeSmrg 619ea133fd7SmrgCopyright (C) 2008 Free Software Foundation, Inc. 620ea133fd7SmrgThis config.lt script is free software; the Free Software Foundation 621ea133fd7Smrggives unlimited permision to copy, distribute and modify it." 622a253d6aeSmrg 623ea133fd7Smrgwhile test $[#] != 0 624ea133fd7Smrgdo 625ea133fd7Smrg case $[1] in 626ea133fd7Smrg --version | --v* | -V ) 627ea133fd7Smrg echo "$lt_cl_version"; exit 0 ;; 628ea133fd7Smrg --help | --h* | -h ) 629ea133fd7Smrg echo "$lt_cl_help"; exit 0 ;; 630ea133fd7Smrg --debug | --d* | -d ) 631ea133fd7Smrg debug=: ;; 632ea133fd7Smrg --quiet | --q* | --silent | --s* | -q ) 633ea133fd7Smrg lt_cl_silent=: ;; 634ea133fd7Smrg 635ea133fd7Smrg -*) AC_MSG_ERROR([unrecognized option: $[1] 636ea133fd7SmrgTry \`$[0] --help' for more information.]) ;; 637ea133fd7Smrg 638ea133fd7Smrg *) AC_MSG_ERROR([unrecognized argument: $[1] 639ea133fd7SmrgTry \`$[0] --help' for more information.]) ;; 640ea133fd7Smrg esac 641ea133fd7Smrg shift 642ea133fd7Smrgdone 643a253d6aeSmrg 644ea133fd7Smrgif $lt_cl_silent; then 645ea133fd7Smrg exec AS_MESSAGE_FD>/dev/null 646ea133fd7Smrgfi 647ea133fd7Smrg_LTEOF 648ea133fd7Smrg 649ea133fd7Smrgcat >>"$CONFIG_LT" <<_LTEOF 650ea133fd7Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT 651ea133fd7Smrg_LTEOF 652ea133fd7Smrg 653ea133fd7Smrgcat >>"$CONFIG_LT" <<\_LTEOF 654ea133fd7SmrgAC_MSG_NOTICE([creating $ofile]) 655ea133fd7Smrg_LT_OUTPUT_LIBTOOL_COMMANDS 656ea133fd7SmrgAS_EXIT(0) 657ea133fd7Smrg_LTEOF 658ea133fd7Smrgchmod +x "$CONFIG_LT" 659ea133fd7Smrg 660ea133fd7Smrg# configure is writing to config.log, but config.lt does its own redirection, 661ea133fd7Smrg# appending to config.log, which fails on DOS, as config.log is still kept 662ea133fd7Smrg# open by configure. Here we exec the FD to /dev/null, effectively closing 663ea133fd7Smrg# config.log, so it can be properly (re)opened and appended to by config.lt. 664ea133fd7Smrgif test "$no_create" != yes; then 665ea133fd7Smrg lt_cl_success=: 666ea133fd7Smrg test "$silent" = yes && 667ea133fd7Smrg lt_config_lt_args="$lt_config_lt_args --quiet" 668ea133fd7Smrg exec AS_MESSAGE_LOG_FD>/dev/null 669ea133fd7Smrg $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false 670ea133fd7Smrg exec AS_MESSAGE_LOG_FD>>config.log 671ea133fd7Smrg $lt_cl_success || AS_EXIT(1) 672ea133fd7Smrgfi 673ea133fd7Smrg])# LT_OUTPUT 674a253d6aeSmrg 675ea133fd7Smrg 676ea133fd7Smrg# _LT_CONFIG(TAG) 677a253d6aeSmrg# --------------- 678ea133fd7Smrg# If TAG is the built-in tag, create an initial libtool script with a 679ea133fd7Smrg# default configuration from the untagged config vars. Otherwise add code 680ea133fd7Smrg# to config.status for appending the configuration named by TAG from the 681ea133fd7Smrg# matching tagged config vars. 682ea133fd7Smrgm4_defun([_LT_CONFIG], 683ea133fd7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 684ea133fd7Smrg_LT_CONFIG_SAVE_COMMANDS([ 685ea133fd7Smrg m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl 686ea133fd7Smrg m4_if(_LT_TAG, [C], [ 687ea133fd7Smrg # See if we are running on zsh, and set the options which allow our 688ea133fd7Smrg # commands through without removal of \ escapes. 689ea133fd7Smrg if test -n "${ZSH_VERSION+set}" ; then 690ea133fd7Smrg setopt NO_GLOB_SUBST 691ea133fd7Smrg fi 692a253d6aeSmrg 693ea133fd7Smrg cfgfile="${ofile}T" 694ea133fd7Smrg trap "$RM \"$cfgfile\"; exit 1" 1 2 15 695ea133fd7Smrg $RM "$cfgfile" 696a253d6aeSmrg 697ea133fd7Smrg cat <<_LT_EOF >> "$cfgfile" 698ea133fd7Smrg#! $SHELL 699a253d6aeSmrg 700ea133fd7Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. 701ea133fd7Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION 702ea133fd7Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: 703ea133fd7Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh. 704a253d6aeSmrg# 705ea133fd7Smrg_LT_COPYING 706ea133fd7Smrg_LT_LIBTOOL_TAGS 707a253d6aeSmrg 708ea133fd7Smrg# ### BEGIN LIBTOOL CONFIG 709ea133fd7Smrg_LT_LIBTOOL_CONFIG_VARS 710ea133fd7Smrg_LT_LIBTOOL_TAG_VARS 711ea133fd7Smrg# ### END LIBTOOL CONFIG 712ea133fd7Smrg 713ea133fd7Smrg_LT_EOF 714ea133fd7Smrg 715ea133fd7Smrg case $host_os in 716ea133fd7Smrg aix3*) 717ea133fd7Smrg cat <<\_LT_EOF >> "$cfgfile" 718ea133fd7Smrg# AIX sometimes has problems with the GCC collect2 program. For some 719ea133fd7Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems 720ea133fd7Smrg# vanish in a puff of smoke. 721ea133fd7Smrgif test "X${COLLECT_NAMES+set}" != Xset; then 722ea133fd7Smrg COLLECT_NAMES= 723ea133fd7Smrg export COLLECT_NAMES 724a253d6aeSmrgfi 725ea133fd7Smrg_LT_EOF 726ea133fd7Smrg ;; 727ea133fd7Smrg esac 728a253d6aeSmrg 729ea133fd7Smrg _LT_PROG_LTMAIN 730a253d6aeSmrg 731ea133fd7Smrg # We use sed instead of cat because bash on DJGPP gets confused if 732ea133fd7Smrg # if finds mixed CR/LF and LF-only lines. Since sed operates in 733ea133fd7Smrg # text mode, it properly converts lines to CR/LF. This bash problem 734ea133fd7Smrg # is reportedly fixed, but why not run on old versions too? 735ea133fd7Smrg sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ 736ea133fd7Smrg || (rm -f "$cfgfile"; exit 1) 737a253d6aeSmrg 738ea133fd7Smrg _LT_PROG_XSI_SHELLFNS 739a253d6aeSmrg 740ea133fd7Smrg sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ 741ea133fd7Smrg || (rm -f "$cfgfile"; exit 1) 742a253d6aeSmrg 743ea133fd7Smrg mv -f "$cfgfile" "$ofile" || 744ea133fd7Smrg (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") 745ea133fd7Smrg chmod +x "$ofile" 746ea133fd7Smrg], 747ea133fd7Smrg[cat <<_LT_EOF >> "$ofile" 748a253d6aeSmrg 749ea133fd7Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded 750ea133fd7Smrgdnl in a comment (ie after a #). 751ea133fd7Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1 752ea133fd7Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG) 753ea133fd7Smrg# ### END LIBTOOL TAG CONFIG: $1 754ea133fd7Smrg_LT_EOF 755ea133fd7Smrg])dnl /m4_if 756ea133fd7Smrg], 757ea133fd7Smrg[m4_if([$1], [], [ 758ea133fd7Smrg PACKAGE='$PACKAGE' 759ea133fd7Smrg VERSION='$VERSION' 760ea133fd7Smrg TIMESTAMP='$TIMESTAMP' 761ea133fd7Smrg RM='$RM' 762ea133fd7Smrg ofile='$ofile'], []) 763ea133fd7Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS 764ea133fd7Smrg])# _LT_CONFIG 765a253d6aeSmrg 766a253d6aeSmrg 767ea133fd7Smrg# LT_SUPPORTED_TAG(TAG) 768ea133fd7Smrg# --------------------- 769ea133fd7Smrg# Trace this macro to discover what tags are supported by the libtool 770ea133fd7Smrg# --tag option, using: 771ea133fd7Smrg# autoconf --trace 'LT_SUPPORTED_TAG:$1' 772ea133fd7SmrgAC_DEFUN([LT_SUPPORTED_TAG], []) 773a253d6aeSmrg 774a253d6aeSmrg 775ea133fd7Smrg# C support is built-in for now 776ea133fd7Smrgm4_define([_LT_LANG_C_enabled], []) 777ea133fd7Smrgm4_define([_LT_TAGS], []) 778a253d6aeSmrg 779a253d6aeSmrg 780ea133fd7Smrg# LT_LANG(LANG) 781ea133fd7Smrg# ------------- 782ea133fd7Smrg# Enable libtool support for the given language if not already enabled. 783ea133fd7SmrgAC_DEFUN([LT_LANG], 784ea133fd7Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl 785ea133fd7Smrgm4_case([$1], 786ea133fd7Smrg [C], [_LT_LANG(C)], 787ea133fd7Smrg [C++], [_LT_LANG(CXX)], 788ea133fd7Smrg [Java], [_LT_LANG(GCJ)], 789ea133fd7Smrg [Fortran 77], [_LT_LANG(F77)], 790ea133fd7Smrg [Fortran], [_LT_LANG(FC)], 791ea133fd7Smrg [Windows Resource], [_LT_LANG(RC)], 792ea133fd7Smrg [m4_ifdef([_LT_LANG_]$1[_CONFIG], 793ea133fd7Smrg [_LT_LANG($1)], 794ea133fd7Smrg [m4_fatal([$0: unsupported language: "$1"])])])dnl 795ea133fd7Smrg])# LT_LANG 796ea133fd7Smrg 797ea133fd7Smrg 798ea133fd7Smrg# _LT_LANG(LANGNAME) 799a253d6aeSmrg# ------------------ 800ea133fd7Smrgm4_defun([_LT_LANG], 801ea133fd7Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [], 802ea133fd7Smrg [LT_SUPPORTED_TAG([$1])dnl 803ea133fd7Smrg m4_append([_LT_TAGS], [$1 ])dnl 804ea133fd7Smrg m4_define([_LT_LANG_]$1[_enabled], [])dnl 805ea133fd7Smrg _LT_LANG_$1_CONFIG($1)])dnl 806ea133fd7Smrg])# _LT_LANG 807a253d6aeSmrg 808a253d6aeSmrg 809ea133fd7Smrg# _LT_LANG_DEFAULT_CONFIG 810a253d6aeSmrg# ----------------------- 811ea133fd7Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG], 812ea133fd7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX], 813ea133fd7Smrg [LT_LANG(CXX)], 814ea133fd7Smrg [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) 815ea133fd7Smrg 816ea133fd7SmrgAC_PROVIDE_IFELSE([AC_PROG_F77], 817ea133fd7Smrg [LT_LANG(F77)], 818ea133fd7Smrg [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) 819ea133fd7Smrg 820ea133fd7SmrgAC_PROVIDE_IFELSE([AC_PROG_FC], 821ea133fd7Smrg [LT_LANG(FC)], 822ea133fd7Smrg [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) 823ea133fd7Smrg 824ea133fd7Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal 825ea133fd7Smrgdnl pulling things in needlessly. 826ea133fd7SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ], 827ea133fd7Smrg [LT_LANG(GCJ)], 828ea133fd7Smrg [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], 829ea133fd7Smrg [LT_LANG(GCJ)], 830ea133fd7Smrg [AC_PROVIDE_IFELSE([LT_PROG_GCJ], 831ea133fd7Smrg [LT_LANG(GCJ)], 832ea133fd7Smrg [m4_ifdef([AC_PROG_GCJ], 833ea133fd7Smrg [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) 834ea133fd7Smrg m4_ifdef([A][M_PROG_GCJ], 835ea133fd7Smrg [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) 836ea133fd7Smrg m4_ifdef([LT_PROG_GCJ], 837ea133fd7Smrg [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) 838ea133fd7Smrg 839ea133fd7SmrgAC_PROVIDE_IFELSE([LT_PROG_RC], 840ea133fd7Smrg [LT_LANG(RC)], 841ea133fd7Smrg [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) 842ea133fd7Smrg])# _LT_LANG_DEFAULT_CONFIG 843ea133fd7Smrg 844ea133fd7Smrg# Obsolete macros: 845ea133fd7SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) 846ea133fd7SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) 847ea133fd7SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) 848ea133fd7SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) 849ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 850ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], []) 851ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], []) 852ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], []) 853ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], []) 854ea133fd7Smrg 855ea133fd7Smrg 856ea133fd7Smrg# _LT_TAG_COMPILER 857ea133fd7Smrg# ---------------- 858ea133fd7Smrgm4_defun([_LT_TAG_COMPILER], 859ea133fd7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 860a253d6aeSmrg 861ea133fd7Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl 862ea133fd7Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl 863ea133fd7Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl 864ea133fd7Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl 865a253d6aeSmrg 866ea133fd7Smrg# If no C compiler was specified, use CC. 867ea133fd7SmrgLTCC=${LTCC-"$CC"} 868a253d6aeSmrg 869ea133fd7Smrg# If no C compiler flags were specified, use CFLAGS. 870ea133fd7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"} 871a253d6aeSmrg 872ea133fd7Smrg# Allow CC to be a program name with arguments. 873ea133fd7Smrgcompiler=$CC 874ea133fd7Smrg])# _LT_TAG_COMPILER 875a253d6aeSmrg 876a253d6aeSmrg 877ea133fd7Smrg# _LT_COMPILER_BOILERPLATE 878ea133fd7Smrg# ------------------------ 879ea133fd7Smrg# Check for compiler boilerplate output or warnings with 880ea133fd7Smrg# the simple compiler test code. 881ea133fd7Smrgm4_defun([_LT_COMPILER_BOILERPLATE], 882ea133fd7Smrg[m4_require([_LT_DECL_SED])dnl 883ea133fd7Smrgac_outfile=conftest.$ac_objext 884ea133fd7Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext 885ea133fd7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 886ea133fd7Smrg_lt_compiler_boilerplate=`cat conftest.err` 887ea133fd7Smrg$RM conftest* 888ea133fd7Smrg])# _LT_COMPILER_BOILERPLATE 889a253d6aeSmrg 890ea133fd7Smrg 891ea133fd7Smrg# _LT_LINKER_BOILERPLATE 892ea133fd7Smrg# ---------------------- 893ea133fd7Smrg# Check for linker boilerplate output or warnings with 894ea133fd7Smrg# the simple link test code. 895ea133fd7Smrgm4_defun([_LT_LINKER_BOILERPLATE], 896ea133fd7Smrg[m4_require([_LT_DECL_SED])dnl 897ea133fd7Smrgac_outfile=conftest.$ac_objext 898ea133fd7Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext 899ea133fd7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err 900ea133fd7Smrg_lt_linker_boilerplate=`cat conftest.err` 901ea133fd7Smrg$RM -r conftest* 902ea133fd7Smrg])# _LT_LINKER_BOILERPLATE 903ea133fd7Smrg 904ea133fd7Smrg# _LT_REQUIRED_DARWIN_CHECKS 905ea133fd7Smrg# ------------------------- 906ea133fd7Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ 907ea133fd7Smrg case $host_os in 908ea133fd7Smrg rhapsody* | darwin*) 909ea133fd7Smrg AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) 910ea133fd7Smrg AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) 911ea133fd7Smrg AC_CHECK_TOOL([LIPO], [lipo], [:]) 912ea133fd7Smrg AC_CHECK_TOOL([OTOOL], [otool], [:]) 913ea133fd7Smrg AC_CHECK_TOOL([OTOOL64], [otool64], [:]) 914ea133fd7Smrg _LT_DECL([], [DSYMUTIL], [1], 915ea133fd7Smrg [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) 916ea133fd7Smrg _LT_DECL([], [NMEDIT], [1], 917ea133fd7Smrg [Tool to change global to local symbols on Mac OS X]) 918ea133fd7Smrg _LT_DECL([], [LIPO], [1], 919ea133fd7Smrg [Tool to manipulate fat objects and archives on Mac OS X]) 920ea133fd7Smrg _LT_DECL([], [OTOOL], [1], 921ea133fd7Smrg [ldd/readelf like tool for Mach-O binaries on Mac OS X]) 922ea133fd7Smrg _LT_DECL([], [OTOOL64], [1], 923ea133fd7Smrg [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) 924ea133fd7Smrg 925ea133fd7Smrg AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], 926ea133fd7Smrg [lt_cv_apple_cc_single_mod=no 927ea133fd7Smrg if test -z "${LT_MULTI_MODULE}"; then 928ea133fd7Smrg # By default we will add the -single_module flag. You can override 929ea133fd7Smrg # by either setting the environment variable LT_MULTI_MODULE 930ea133fd7Smrg # non-empty at configure time, or by adding -multi_module to the 931ea133fd7Smrg # link flags. 932ea133fd7Smrg rm -rf libconftest.dylib* 933ea133fd7Smrg echo "int foo(void){return 1;}" > conftest.c 934ea133fd7Smrg echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 935ea133fd7Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD 936ea133fd7Smrg $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ 937ea133fd7Smrg -dynamiclib -Wl,-single_module conftest.c 2>conftest.err 938ea133fd7Smrg _lt_result=$? 939ea133fd7Smrg if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then 940ea133fd7Smrg lt_cv_apple_cc_single_mod=yes 941ea133fd7Smrg else 942ea133fd7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 943ea133fd7Smrg fi 944ea133fd7Smrg rm -rf libconftest.dylib* 945ea133fd7Smrg rm -f conftest.* 946ea133fd7Smrg fi]) 947ea133fd7Smrg AC_CACHE_CHECK([for -exported_symbols_list linker flag], 948ea133fd7Smrg [lt_cv_ld_exported_symbols_list], 949ea133fd7Smrg [lt_cv_ld_exported_symbols_list=no 950ea133fd7Smrg save_LDFLAGS=$LDFLAGS 951ea133fd7Smrg echo "_main" > conftest.sym 952ea133fd7Smrg LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" 953ea133fd7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 954ea133fd7Smrg [lt_cv_ld_exported_symbols_list=yes], 955ea133fd7Smrg [lt_cv_ld_exported_symbols_list=no]) 956ea133fd7Smrg LDFLAGS="$save_LDFLAGS" 957ea133fd7Smrg ]) 958a253d6aeSmrg case $host_os in 959ea133fd7Smrg rhapsody* | darwin1.[[012]]) 960ea133fd7Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; 961ea133fd7Smrg darwin1.*) 962ea133fd7Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 963ea133fd7Smrg darwin*) # darwin 5.x on 964ea133fd7Smrg # if running on 10.5 or later, the deployment target defaults 965ea133fd7Smrg # to the OS version, if on x86, and 10.4, the deployment 966ea133fd7Smrg # target defaults to 10.4. Don't you love it? 967ea133fd7Smrg case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 968ea133fd7Smrg 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) 969ea133fd7Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 970ea133fd7Smrg 10.[[012]]*) 971ea133fd7Smrg _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 972ea133fd7Smrg 10.*) 973ea133fd7Smrg _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 974ea133fd7Smrg esac 975ea133fd7Smrg ;; 976ea133fd7Smrg esac 977ea133fd7Smrg if test "$lt_cv_apple_cc_single_mod" = "yes"; then 978ea133fd7Smrg _lt_dar_single_mod='$single_module' 979ea133fd7Smrg fi 980ea133fd7Smrg if test "$lt_cv_ld_exported_symbols_list" = "yes"; then 981ea133fd7Smrg _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' 982ea133fd7Smrg else 983ea133fd7Smrg _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' 984ea133fd7Smrg fi 985ea133fd7Smrg if test "$DSYMUTIL" != ":"; then 986ea133fd7Smrg _lt_dsymutil='~$DSYMUTIL $lib || :' 987ea133fd7Smrg else 988ea133fd7Smrg _lt_dsymutil= 989ea133fd7Smrg fi 990ea133fd7Smrg ;; 991ea133fd7Smrg esac 992ea133fd7Smrg]) 993a253d6aeSmrg 994a253d6aeSmrg 995ea133fd7Smrg# _LT_DARWIN_LINKER_FEATURES 996ea133fd7Smrg# -------------------------- 997ea133fd7Smrg# Checks for linker and compiler features on darwin 998ea133fd7Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES], 999ea133fd7Smrg[ 1000ea133fd7Smrg m4_require([_LT_REQUIRED_DARWIN_CHECKS]) 1001ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 1002ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 1003ea133fd7Smrg _LT_TAGVAR(hardcode_automatic, $1)=yes 1004ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 1005ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='' 1006ea133fd7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 1007ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" 1008ea133fd7Smrg case $cc_basename in 1009ea133fd7Smrg ifort*) _lt_dar_can_shared=yes ;; 1010ea133fd7Smrg *) _lt_dar_can_shared=$GCC ;; 1011ea133fd7Smrg esac 1012ea133fd7Smrg if test "$_lt_dar_can_shared" = "yes"; then 1013ea133fd7Smrg output_verbose_link_cmd=echo 1014ea133fd7Smrg _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}" 1015ea133fd7Smrg _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" 1016ea133fd7Smrg _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}" 1017ea133fd7Smrg _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}" 1018ea133fd7Smrg m4_if([$1], [CXX], 1019ea133fd7Smrg[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then 1020ea133fd7Smrg _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}" 1021ea133fd7Smrg _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}" 1022ea133fd7Smrg fi 1023ea133fd7Smrg],[]) 1024ea133fd7Smrg else 1025ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 1026ea133fd7Smrg fi 1027ea133fd7Smrg]) 1028a253d6aeSmrg 1029ea133fd7Smrg# _LT_SYS_MODULE_PATH_AIX 1030ea133fd7Smrg# ----------------------- 1031ea133fd7Smrg# Links a minimal program and checks the executable 1032ea133fd7Smrg# for the system default hardcoded library path. In most cases, 1033ea133fd7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used 1034ea133fd7Smrg# the location of the communication and MPI libs are included too. 1035ea133fd7Smrg# If we don't find anything, use the default library path according 1036ea133fd7Smrg# to the aix ld manual. 1037ea133fd7Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX], 1038ea133fd7Smrg[m4_require([_LT_DECL_SED])dnl 1039ea133fd7SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[ 1040ea133fd7Smrglt_aix_libpath_sed=' 1041ea133fd7Smrg /Import File Strings/,/^$/ { 1042ea133fd7Smrg /^0/ { 1043ea133fd7Smrg s/^0 *\(.*\)$/\1/ 1044ea133fd7Smrg p 1045ea133fd7Smrg } 1046ea133fd7Smrg }' 1047ea133fd7Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1048ea133fd7Smrg# Check for a 64-bit object if we didn't find anything. 1049ea133fd7Smrgif test -z "$aix_libpath"; then 1050ea133fd7Smrg aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` 1051ea133fd7Smrgfi],[]) 1052ea133fd7Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi 1053ea133fd7Smrg])# _LT_SYS_MODULE_PATH_AIX 1054a253d6aeSmrg 1055a253d6aeSmrg 1056ea133fd7Smrg# _LT_SHELL_INIT(ARG) 1057ea133fd7Smrg# ------------------- 1058ea133fd7Smrgm4_define([_LT_SHELL_INIT], 1059ea133fd7Smrg[ifdef([AC_DIVERSION_NOTICE], 1060ea133fd7Smrg [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], 1061ea133fd7Smrg [AC_DIVERT_PUSH(NOTICE)]) 1062ea133fd7Smrg$1 1063ea133fd7SmrgAC_DIVERT_POP 1064ea133fd7Smrg])# _LT_SHELL_INIT 1065a253d6aeSmrg 1066a253d6aeSmrg 1067ea133fd7Smrg# _LT_PROG_ECHO_BACKSLASH 1068ea133fd7Smrg# ----------------------- 1069ea133fd7Smrg# Add some code to the start of the generated configure script which 1070ea133fd7Smrg# will find an echo command which doesn't interpret backslashes. 1071ea133fd7Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH], 1072ea133fd7Smrg[_LT_SHELL_INIT([ 1073ea133fd7Smrg# Check that we are running under the correct shell. 1074ea133fd7SmrgSHELL=${CONFIG_SHELL-/bin/sh} 1075a253d6aeSmrg 1076ea133fd7Smrgcase X$lt_ECHO in 1077ea133fd7SmrgX*--fallback-echo) 1078ea133fd7Smrg # Remove one level of quotation (which was required for Make). 1079ea133fd7Smrg ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` 1080ea133fd7Smrg ;; 1081ea133fd7Smrgesac 1082a253d6aeSmrg 1083ea133fd7SmrgECHO=${lt_ECHO-echo} 1084ea133fd7Smrgif test "X[$]1" = X--no-reexec; then 1085ea133fd7Smrg # Discard the --no-reexec flag, and continue. 1086ea133fd7Smrg shift 1087ea133fd7Smrgelif test "X[$]1" = X--fallback-echo; then 1088ea133fd7Smrg # Avoid inline document here, it may be left over 1089ea133fd7Smrg : 1090ea133fd7Smrgelif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then 1091ea133fd7Smrg # Yippee, $ECHO works! 1092ea133fd7Smrg : 1093a253d6aeSmrgelse 1094ea133fd7Smrg # Restart under the correct shell. 1095ea133fd7Smrg exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} 1096a253d6aeSmrgfi 1097a253d6aeSmrg 1098ea133fd7Smrgif test "X[$]1" = X--fallback-echo; then 1099ea133fd7Smrg # used as fallback echo 1100ea133fd7Smrg shift 1101ea133fd7Smrg cat <<_LT_EOF 1102ea133fd7Smrg[$]* 1103ea133fd7Smrg_LT_EOF 1104ea133fd7Smrg exit 0 1105ea133fd7Smrgfi 1106a253d6aeSmrg 1107ea133fd7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout 1108ea133fd7Smrg# if CDPATH is set. 1109ea133fd7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 1110a253d6aeSmrg 1111ea133fd7Smrgif test -z "$lt_ECHO"; then 1112ea133fd7Smrg if test "X${echo_test_string+set}" != Xset; then 1113ea133fd7Smrg # find a string as large as possible, as long as the shell can cope with it 1114ea133fd7Smrg for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do 1115ea133fd7Smrg # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... 1116ea133fd7Smrg if { echo_test_string=`eval $cmd`; } 2>/dev/null && 1117ea133fd7Smrg { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null 1118ea133fd7Smrg then 1119ea133fd7Smrg break 1120ea133fd7Smrg fi 1121ea133fd7Smrg done 1122ea133fd7Smrg fi 1123a253d6aeSmrg 1124ea133fd7Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1125ea133fd7Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1126ea133fd7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1127ea133fd7Smrg : 1128ea133fd7Smrg else 1129ea133fd7Smrg # The Solaris, AIX, and Digital Unix default echo programs unquote 1130ea133fd7Smrg # backslashes. This makes it impossible to quote backslashes using 1131ea133fd7Smrg # echo "$something" | sed 's/\\/\\\\/g' 1132ea133fd7Smrg # 1133ea133fd7Smrg # So, first we look for a working echo in the user's PATH. 1134a253d6aeSmrg 1135ea133fd7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 1136ea133fd7Smrg for dir in $PATH /usr/ucb; do 1137ea133fd7Smrg IFS="$lt_save_ifs" 1138ea133fd7Smrg if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && 1139ea133fd7Smrg test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && 1140ea133fd7Smrg echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && 1141ea133fd7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1142ea133fd7Smrg ECHO="$dir/echo" 1143ea133fd7Smrg break 1144ea133fd7Smrg fi 1145ea133fd7Smrg done 1146ea133fd7Smrg IFS="$lt_save_ifs" 1147a253d6aeSmrg 1148ea133fd7Smrg if test "X$ECHO" = Xecho; then 1149ea133fd7Smrg # We didn't find a better echo, so look for alternatives. 1150ea133fd7Smrg if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && 1151ea133fd7Smrg echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && 1152ea133fd7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1153ea133fd7Smrg # This shell has a builtin print -r that does the trick. 1154ea133fd7Smrg ECHO='print -r' 1155ea133fd7Smrg elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && 1156ea133fd7Smrg test "X$CONFIG_SHELL" != X/bin/ksh; then 1157ea133fd7Smrg # If we have ksh, try running configure again with it. 1158ea133fd7Smrg ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} 1159ea133fd7Smrg export ORIGINAL_CONFIG_SHELL 1160ea133fd7Smrg CONFIG_SHELL=/bin/ksh 1161ea133fd7Smrg export CONFIG_SHELL 1162ea133fd7Smrg exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} 1163ea133fd7Smrg else 1164ea133fd7Smrg # Try using printf. 1165ea133fd7Smrg ECHO='printf %s\n' 1166ea133fd7Smrg if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && 1167ea133fd7Smrg echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && 1168ea133fd7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1169ea133fd7Smrg # Cool, printf works 1170ea133fd7Smrg : 1171ea133fd7Smrg elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1172ea133fd7Smrg test "X$echo_testing_string" = 'X\t' && 1173ea133fd7Smrg echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1174ea133fd7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1175ea133fd7Smrg CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL 1176ea133fd7Smrg export CONFIG_SHELL 1177ea133fd7Smrg SHELL="$CONFIG_SHELL" 1178ea133fd7Smrg export SHELL 1179ea133fd7Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1180ea133fd7Smrg elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && 1181ea133fd7Smrg test "X$echo_testing_string" = 'X\t' && 1182ea133fd7Smrg echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && 1183ea133fd7Smrg test "X$echo_testing_string" = "X$echo_test_string"; then 1184ea133fd7Smrg ECHO="$CONFIG_SHELL [$]0 --fallback-echo" 1185ea133fd7Smrg else 1186ea133fd7Smrg # maybe with a smaller string... 1187ea133fd7Smrg prev=: 1188a253d6aeSmrg 1189ea133fd7Smrg for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do 1190ea133fd7Smrg if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null 1191ea133fd7Smrg then 1192ea133fd7Smrg break 1193ea133fd7Smrg fi 1194ea133fd7Smrg prev="$cmd" 1195ea133fd7Smrg done 1196a253d6aeSmrg 1197ea133fd7Smrg if test "$prev" != 'sed 50q "[$]0"'; then 1198ea133fd7Smrg echo_test_string=`eval $prev` 1199ea133fd7Smrg export echo_test_string 1200ea133fd7Smrg exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} 1201ea133fd7Smrg else 1202ea133fd7Smrg # Oops. We lost completely, so just stick with echo. 1203ea133fd7Smrg ECHO=echo 1204ea133fd7Smrg fi 1205ea133fd7Smrg fi 1206ea133fd7Smrg fi 1207ea133fd7Smrg fi 1208ea133fd7Smrg fi 1209a253d6aeSmrgfi 1210a253d6aeSmrg 1211ea133fd7Smrg# Copy echo and quote the copy suitably for passing to libtool from 1212ea133fd7Smrg# the Makefile, instead of quoting the original, which is used later. 1213ea133fd7Smrglt_ECHO=$ECHO 1214ea133fd7Smrgif test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then 1215ea133fd7Smrg lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" 1216a253d6aeSmrgfi 1217a253d6aeSmrg 1218ea133fd7SmrgAC_SUBST(lt_ECHO) 1219ea133fd7Smrg]) 1220ea133fd7Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) 1221ea133fd7Smrg_LT_DECL([], [ECHO], [1], 1222ea133fd7Smrg [An echo program that does not interpret backslashes]) 1223ea133fd7Smrg])# _LT_PROG_ECHO_BACKSLASH 1224a253d6aeSmrg 1225a253d6aeSmrg 1226ea133fd7Smrg# _LT_ENABLE_LOCK 1227ea133fd7Smrg# --------------- 1228ea133fd7Smrgm4_defun([_LT_ENABLE_LOCK], 1229ea133fd7Smrg[AC_ARG_ENABLE([libtool-lock], 1230ea133fd7Smrg [AS_HELP_STRING([--disable-libtool-lock], 1231ea133fd7Smrg [avoid locking (might break parallel builds)])]) 1232ea133fd7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes 1233a253d6aeSmrg 1234ea133fd7Smrg# Some flags need to be propagated to the compiler or linker for good 1235ea133fd7Smrg# libtool support. 1236ea133fd7Smrgcase $host in 1237ea133fd7Smrgia64-*-hpux*) 1238ea133fd7Smrg # Find out which ABI we are using. 1239ea133fd7Smrg echo 'int i;' > conftest.$ac_ext 1240ea133fd7Smrg if AC_TRY_EVAL(ac_compile); then 1241ea133fd7Smrg case `/usr/bin/file conftest.$ac_objext` in 1242ea133fd7Smrg *ELF-32*) 1243ea133fd7Smrg HPUX_IA64_MODE="32" 1244ea133fd7Smrg ;; 1245ea133fd7Smrg *ELF-64*) 1246ea133fd7Smrg HPUX_IA64_MODE="64" 1247ea133fd7Smrg ;; 1248ea133fd7Smrg esac 1249ea133fd7Smrg fi 1250ea133fd7Smrg rm -rf conftest* 1251ea133fd7Smrg ;; 1252ea133fd7Smrg*-*-irix6*) 1253ea133fd7Smrg # Find out which ABI we are using. 1254ea133fd7Smrg echo '[#]line __oline__ "configure"' > conftest.$ac_ext 1255ea133fd7Smrg if AC_TRY_EVAL(ac_compile); then 1256ea133fd7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 1257ea133fd7Smrg case `/usr/bin/file conftest.$ac_objext` in 1258ea133fd7Smrg *32-bit*) 1259ea133fd7Smrg LD="${LD-ld} -melf32bsmip" 1260ea133fd7Smrg ;; 1261ea133fd7Smrg *N32*) 1262ea133fd7Smrg LD="${LD-ld} -melf32bmipn32" 1263ea133fd7Smrg ;; 1264ea133fd7Smrg *64-bit*) 1265ea133fd7Smrg LD="${LD-ld} -melf64bmip" 1266ea133fd7Smrg ;; 1267ea133fd7Smrg esac 1268ea133fd7Smrg else 1269ea133fd7Smrg case `/usr/bin/file conftest.$ac_objext` in 1270ea133fd7Smrg *32-bit*) 1271ea133fd7Smrg LD="${LD-ld} -32" 1272ea133fd7Smrg ;; 1273ea133fd7Smrg *N32*) 1274ea133fd7Smrg LD="${LD-ld} -n32" 1275ea133fd7Smrg ;; 1276ea133fd7Smrg *64-bit*) 1277ea133fd7Smrg LD="${LD-ld} -64" 1278ea133fd7Smrg ;; 1279ea133fd7Smrg esac 1280ea133fd7Smrg fi 1281ea133fd7Smrg fi 1282ea133fd7Smrg rm -rf conftest* 1283ea133fd7Smrg ;; 1284a253d6aeSmrg 1285ea133fd7Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ 1286ea133fd7Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*) 1287ea133fd7Smrg # Find out which ABI we are using. 1288ea133fd7Smrg echo 'int i;' > conftest.$ac_ext 1289ea133fd7Smrg if AC_TRY_EVAL(ac_compile); then 1290ea133fd7Smrg case `/usr/bin/file conftest.o` in 1291ea133fd7Smrg *32-bit*) 1292ea133fd7Smrg case $host in 1293ea133fd7Smrg x86_64-*kfreebsd*-gnu) 1294ea133fd7Smrg LD="${LD-ld} -m elf_i386_fbsd" 1295ea133fd7Smrg ;; 1296ea133fd7Smrg x86_64-*linux*) 1297ea133fd7Smrg LD="${LD-ld} -m elf_i386" 1298ea133fd7Smrg ;; 1299ea133fd7Smrg ppc64-*linux*|powerpc64-*linux*) 1300ea133fd7Smrg LD="${LD-ld} -m elf32ppclinux" 1301ea133fd7Smrg ;; 1302ea133fd7Smrg s390x-*linux*) 1303ea133fd7Smrg LD="${LD-ld} -m elf_s390" 1304ea133fd7Smrg ;; 1305ea133fd7Smrg sparc64-*linux*) 1306ea133fd7Smrg LD="${LD-ld} -m elf32_sparc" 1307ea133fd7Smrg ;; 1308ea133fd7Smrg esac 1309ea133fd7Smrg ;; 1310ea133fd7Smrg *64-bit*) 1311ea133fd7Smrg case $host in 1312ea133fd7Smrg x86_64-*kfreebsd*-gnu) 1313ea133fd7Smrg LD="${LD-ld} -m elf_x86_64_fbsd" 1314ea133fd7Smrg ;; 1315ea133fd7Smrg x86_64-*linux*) 1316ea133fd7Smrg LD="${LD-ld} -m elf_x86_64" 1317ea133fd7Smrg ;; 1318ea133fd7Smrg ppc*-*linux*|powerpc*-*linux*) 1319ea133fd7Smrg LD="${LD-ld} -m elf64ppc" 1320ea133fd7Smrg ;; 1321ea133fd7Smrg s390*-*linux*|s390*-*tpf*) 1322ea133fd7Smrg LD="${LD-ld} -m elf64_s390" 1323ea133fd7Smrg ;; 1324ea133fd7Smrg sparc*-*linux*) 1325ea133fd7Smrg LD="${LD-ld} -m elf64_sparc" 1326ea133fd7Smrg ;; 1327ea133fd7Smrg esac 1328ea133fd7Smrg ;; 1329ea133fd7Smrg esac 1330ea133fd7Smrg fi 1331ea133fd7Smrg rm -rf conftest* 1332ea133fd7Smrg ;; 1333a253d6aeSmrg 1334ea133fd7Smrg*-*-sco3.2v5*) 1335ea133fd7Smrg # On SCO OpenServer 5, we need -belf to get full-featured binaries. 1336ea133fd7Smrg SAVE_CFLAGS="$CFLAGS" 1337ea133fd7Smrg CFLAGS="$CFLAGS -belf" 1338ea133fd7Smrg AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, 1339ea133fd7Smrg [AC_LANG_PUSH(C) 1340ea133fd7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) 1341ea133fd7Smrg AC_LANG_POP]) 1342ea133fd7Smrg if test x"$lt_cv_cc_needs_belf" != x"yes"; then 1343ea133fd7Smrg # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf 1344ea133fd7Smrg CFLAGS="$SAVE_CFLAGS" 1345ea133fd7Smrg fi 1346ea133fd7Smrg ;; 1347ea133fd7Smrgsparc*-*solaris*) 1348ea133fd7Smrg # Find out which ABI we are using. 1349ea133fd7Smrg echo 'int i;' > conftest.$ac_ext 1350ea133fd7Smrg if AC_TRY_EVAL(ac_compile); then 1351ea133fd7Smrg case `/usr/bin/file conftest.o` in 1352ea133fd7Smrg *64-bit*) 1353ea133fd7Smrg case $lt_cv_prog_gnu_ld in 1354ea133fd7Smrg yes*) LD="${LD-ld} -m elf64_sparc" ;; 1355ea133fd7Smrg *) 1356ea133fd7Smrg if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then 1357ea133fd7Smrg LD="${LD-ld} -64" 1358ea133fd7Smrg fi 1359ea133fd7Smrg ;; 1360ea133fd7Smrg esac 1361ea133fd7Smrg ;; 1362ea133fd7Smrg esac 1363ea133fd7Smrg fi 1364ea133fd7Smrg rm -rf conftest* 1365ea133fd7Smrg ;; 1366ea133fd7Smrgesac 1367a253d6aeSmrg 1368ea133fd7Smrgneed_locks="$enable_libtool_lock" 1369ea133fd7Smrg])# _LT_ENABLE_LOCK 1370a253d6aeSmrg 1371a253d6aeSmrg 1372ea133fd7Smrg# _LT_CMD_OLD_ARCHIVE 1373ea133fd7Smrg# ------------------- 1374ea133fd7Smrgm4_defun([_LT_CMD_OLD_ARCHIVE], 1375ea133fd7Smrg[AC_CHECK_TOOL(AR, ar, false) 1376ea133fd7Smrgtest -z "$AR" && AR=ar 1377ea133fd7Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru 1378ea133fd7Smrg_LT_DECL([], [AR], [1], [The archiver]) 1379ea133fd7Smrg_LT_DECL([], [AR_FLAGS], [1]) 1380a253d6aeSmrg 1381ea133fd7SmrgAC_CHECK_TOOL(STRIP, strip, :) 1382ea133fd7Smrgtest -z "$STRIP" && STRIP=: 1383ea133fd7Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program]) 1384a253d6aeSmrg 1385ea133fd7SmrgAC_CHECK_TOOL(RANLIB, ranlib, :) 1386ea133fd7Smrgtest -z "$RANLIB" && RANLIB=: 1387ea133fd7Smrg_LT_DECL([], [RANLIB], [1], 1388ea133fd7Smrg [Commands used to install an old-style archive]) 1389a253d6aeSmrg 1390ea133fd7Smrg# Determine commands to create old-style static archives. 1391ea133fd7Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' 1392ea133fd7Smrgold_postinstall_cmds='chmod 644 $oldlib' 1393ea133fd7Smrgold_postuninstall_cmds= 1394a253d6aeSmrg 1395ea133fd7Smrgif test -n "$RANLIB"; then 1396ea133fd7Smrg case $host_os in 1397ea133fd7Smrg openbsd*) 1398ea133fd7Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" 1399ea133fd7Smrg ;; 1400ea133fd7Smrg *) 1401ea133fd7Smrg old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" 1402ea133fd7Smrg ;; 1403ea133fd7Smrg esac 1404ea133fd7Smrg old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" 1405a253d6aeSmrgfi 1406ea133fd7Smrg_LT_DECL([], [old_postinstall_cmds], [2]) 1407ea133fd7Smrg_LT_DECL([], [old_postuninstall_cmds], [2]) 1408ea133fd7Smrg_LT_TAGDECL([], [old_archive_cmds], [2], 1409ea133fd7Smrg [Commands used to build an old-style archive]) 1410ea133fd7Smrg])# _LT_CMD_OLD_ARCHIVE 1411a253d6aeSmrg 1412a253d6aeSmrg 1413ea133fd7Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1414ea133fd7Smrg# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) 1415ea133fd7Smrg# ---------------------------------------------------------------- 1416ea133fd7Smrg# Check whether the given compiler option works 1417ea133fd7SmrgAC_DEFUN([_LT_COMPILER_OPTION], 1418ea133fd7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1419ea133fd7Smrgm4_require([_LT_DECL_SED])dnl 1420ea133fd7SmrgAC_CACHE_CHECK([$1], [$2], 1421ea133fd7Smrg [$2=no 1422ea133fd7Smrg m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) 1423ea133fd7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1424ea133fd7Smrg lt_compiler_flag="$3" 1425ea133fd7Smrg # Insert the option either (1) after the last *FLAGS variable, or 1426ea133fd7Smrg # (2) before a word containing "conftest.", or (3) at the end. 1427ea133fd7Smrg # Note that $ac_compile itself does not contain backslashes and begins 1428ea133fd7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1429ea133fd7Smrg # The option is referenced via a variable to avoid confusing sed. 1430ea133fd7Smrg lt_compile=`echo "$ac_compile" | $SED \ 1431ea133fd7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1432ea133fd7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1433ea133fd7Smrg -e 's:$: $lt_compiler_flag:'` 1434ea133fd7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1435ea133fd7Smrg (eval "$lt_compile" 2>conftest.err) 1436ea133fd7Smrg ac_status=$? 1437ea133fd7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 1438ea133fd7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1439ea133fd7Smrg if (exit $ac_status) && test -s "$ac_outfile"; then 1440ea133fd7Smrg # The compiler can only warn and ignore the option if not recognized 1441ea133fd7Smrg # So say no if there are warnings other than the usual output. 1442ea133fd7Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp 1443ea133fd7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1444ea133fd7Smrg if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then 1445ea133fd7Smrg $2=yes 1446ea133fd7Smrg fi 1447ea133fd7Smrg fi 1448ea133fd7Smrg $RM conftest* 1449a253d6aeSmrg]) 1450a253d6aeSmrg 1451ea133fd7Smrgif test x"[$]$2" = xyes; then 1452ea133fd7Smrg m4_if([$5], , :, [$5]) 1453ea133fd7Smrgelse 1454ea133fd7Smrg m4_if([$6], , :, [$6]) 1455ea133fd7Smrgfi 1456ea133fd7Smrg])# _LT_COMPILER_OPTION 1457a253d6aeSmrg 1458ea133fd7Smrg# Old name: 1459ea133fd7SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) 1460ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 1461ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) 1462a253d6aeSmrg 1463a253d6aeSmrg 1464ea133fd7Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, 1465ea133fd7Smrg# [ACTION-SUCCESS], [ACTION-FAILURE]) 1466ea133fd7Smrg# ---------------------------------------------------- 1467ea133fd7Smrg# Check whether the given linker option works 1468ea133fd7SmrgAC_DEFUN([_LT_LINKER_OPTION], 1469ea133fd7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 1470ea133fd7Smrgm4_require([_LT_DECL_SED])dnl 1471ea133fd7SmrgAC_CACHE_CHECK([$1], [$2], 1472ea133fd7Smrg [$2=no 1473ea133fd7Smrg save_LDFLAGS="$LDFLAGS" 1474ea133fd7Smrg LDFLAGS="$LDFLAGS $3" 1475ea133fd7Smrg echo "$lt_simple_link_test_code" > conftest.$ac_ext 1476ea133fd7Smrg if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then 1477ea133fd7Smrg # The linker can only warn and ignore the option if not recognized 1478ea133fd7Smrg # So say no if there are warnings 1479ea133fd7Smrg if test -s conftest.err; then 1480ea133fd7Smrg # Append any errors to the config.log. 1481ea133fd7Smrg cat conftest.err 1>&AS_MESSAGE_LOG_FD 1482ea133fd7Smrg $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp 1483ea133fd7Smrg $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 1484ea133fd7Smrg if diff conftest.exp conftest.er2 >/dev/null; then 1485ea133fd7Smrg $2=yes 1486ea133fd7Smrg fi 1487ea133fd7Smrg else 1488ea133fd7Smrg $2=yes 1489ea133fd7Smrg fi 1490ea133fd7Smrg fi 1491ea133fd7Smrg $RM -r conftest* 1492ea133fd7Smrg LDFLAGS="$save_LDFLAGS" 1493ea133fd7Smrg]) 1494a253d6aeSmrg 1495ea133fd7Smrgif test x"[$]$2" = xyes; then 1496ea133fd7Smrg m4_if([$4], , :, [$4]) 1497ea133fd7Smrgelse 1498ea133fd7Smrg m4_if([$5], , :, [$5]) 1499ea133fd7Smrgfi 1500ea133fd7Smrg])# _LT_LINKER_OPTION 1501a253d6aeSmrg 1502ea133fd7Smrg# Old name: 1503ea133fd7SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) 1504ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 1505ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) 1506a253d6aeSmrg 1507a253d6aeSmrg 1508ea133fd7Smrg# LT_CMD_MAX_LEN 1509ea133fd7Smrg#--------------- 1510ea133fd7SmrgAC_DEFUN([LT_CMD_MAX_LEN], 1511ea133fd7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 1512ea133fd7Smrg# find the maximum length of command line arguments 1513ea133fd7SmrgAC_MSG_CHECKING([the maximum length of command line arguments]) 1514ea133fd7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl 1515ea133fd7Smrg i=0 1516ea133fd7Smrg teststring="ABCD" 1517a253d6aeSmrg 1518ea133fd7Smrg case $build_os in 1519ea133fd7Smrg msdosdjgpp*) 1520ea133fd7Smrg # On DJGPP, this test can blow up pretty badly due to problems in libc 1521ea133fd7Smrg # (any single argument exceeding 2000 bytes causes a buffer overrun 1522ea133fd7Smrg # during glob expansion). Even if it were fixed, the result of this 1523ea133fd7Smrg # check would be larger than it should be. 1524ea133fd7Smrg lt_cv_sys_max_cmd_len=12288; # 12K is about right 1525ea133fd7Smrg ;; 1526a253d6aeSmrg 1527ea133fd7Smrg gnu*) 1528ea133fd7Smrg # Under GNU Hurd, this test is not required because there is 1529ea133fd7Smrg # no limit to the length of command line arguments. 1530ea133fd7Smrg # Libtool will interpret -1 as no limit whatsoever 1531ea133fd7Smrg lt_cv_sys_max_cmd_len=-1; 1532ea133fd7Smrg ;; 1533a253d6aeSmrg 1534ea133fd7Smrg cygwin* | mingw* | cegcc*) 1535ea133fd7Smrg # On Win9x/ME, this test blows up -- it succeeds, but takes 1536ea133fd7Smrg # about 5 minutes as the teststring grows exponentially. 1537ea133fd7Smrg # Worse, since 9x/ME are not pre-emptively multitasking, 1538ea133fd7Smrg # you end up with a "frozen" computer, even though with patience 1539ea133fd7Smrg # the test eventually succeeds (with a max line length of 256k). 1540ea133fd7Smrg # Instead, let's just punt: use the minimum linelength reported by 1541ea133fd7Smrg # all of the supported platforms: 8192 (on NT/2K/XP). 1542ea133fd7Smrg lt_cv_sys_max_cmd_len=8192; 1543ea133fd7Smrg ;; 1544a253d6aeSmrg 1545ea133fd7Smrg amigaos*) 1546ea133fd7Smrg # On AmigaOS with pdksh, this test takes hours, literally. 1547ea133fd7Smrg # So we just punt and use a minimum line length of 8192. 1548ea133fd7Smrg lt_cv_sys_max_cmd_len=8192; 1549ea133fd7Smrg ;; 1550a253d6aeSmrg 1551ea133fd7Smrg netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) 1552ea133fd7Smrg # This has been around since 386BSD, at least. Likely further. 1553ea133fd7Smrg if test -x /sbin/sysctl; then 1554ea133fd7Smrg lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` 1555ea133fd7Smrg elif test -x /usr/sbin/sysctl; then 1556ea133fd7Smrg lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` 1557ea133fd7Smrg else 1558ea133fd7Smrg lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs 1559ea133fd7Smrg fi 1560ea133fd7Smrg # And add a safety zone 1561ea133fd7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1562ea133fd7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1563ea133fd7Smrg ;; 1564a253d6aeSmrg 1565ea133fd7Smrg interix*) 1566ea133fd7Smrg # We know the value 262144 and hardcode it with a safety zone (like BSD) 1567ea133fd7Smrg lt_cv_sys_max_cmd_len=196608 1568ea133fd7Smrg ;; 1569a253d6aeSmrg 1570ea133fd7Smrg osf*) 1571ea133fd7Smrg # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure 1572ea133fd7Smrg # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not 1573ea133fd7Smrg # nice to cause kernel panics so lets avoid the loop below. 1574ea133fd7Smrg # First set a reasonable default. 1575ea133fd7Smrg lt_cv_sys_max_cmd_len=16384 1576ea133fd7Smrg # 1577ea133fd7Smrg if test -x /sbin/sysconfig; then 1578ea133fd7Smrg case `/sbin/sysconfig -q proc exec_disable_arg_limit` in 1579ea133fd7Smrg *1*) lt_cv_sys_max_cmd_len=-1 ;; 1580ea133fd7Smrg esac 1581ea133fd7Smrg fi 1582ea133fd7Smrg ;; 1583ea133fd7Smrg sco3.2v5*) 1584ea133fd7Smrg lt_cv_sys_max_cmd_len=102400 1585ea133fd7Smrg ;; 1586ea133fd7Smrg sysv5* | sco5v6* | sysv4.2uw2*) 1587ea133fd7Smrg kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` 1588ea133fd7Smrg if test -n "$kargmax"; then 1589ea133fd7Smrg lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` 1590ea133fd7Smrg else 1591ea133fd7Smrg lt_cv_sys_max_cmd_len=32768 1592ea133fd7Smrg fi 1593a253d6aeSmrg ;; 1594a253d6aeSmrg *) 1595ea133fd7Smrg lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` 1596ea133fd7Smrg if test -n "$lt_cv_sys_max_cmd_len"; then 1597ea133fd7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` 1598ea133fd7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` 1599ea133fd7Smrg else 1600ea133fd7Smrg # Make teststring a little bigger before we do anything with it. 1601ea133fd7Smrg # a 1K string should be a reasonable start. 1602ea133fd7Smrg for i in 1 2 3 4 5 6 7 8 ; do 1603ea133fd7Smrg teststring=$teststring$teststring 1604ea133fd7Smrg done 1605ea133fd7Smrg SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} 1606ea133fd7Smrg # If test is not a shell built-in, we'll probably end up computing a 1607ea133fd7Smrg # maximum length that is only half of the actual maximum length, but 1608ea133fd7Smrg # we can't tell. 1609ea133fd7Smrg while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ 1610ea133fd7Smrg = "XX$teststring$teststring"; } >/dev/null 2>&1 && 1611ea133fd7Smrg test $i != 17 # 1/2 MB should be enough 1612ea133fd7Smrg do 1613ea133fd7Smrg i=`expr $i + 1` 1614ea133fd7Smrg teststring=$teststring$teststring 1615ea133fd7Smrg done 1616ea133fd7Smrg # Only check the string length outside the loop. 1617ea133fd7Smrg lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` 1618ea133fd7Smrg teststring= 1619ea133fd7Smrg # Add a significant safety factor because C++ compilers can tack on 1620ea133fd7Smrg # massive amounts of additional arguments before passing them to the 1621ea133fd7Smrg # linker. It appears as though 1/2 is a usable value. 1622ea133fd7Smrg lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` 1623ea133fd7Smrg fi 1624a253d6aeSmrg ;; 1625a253d6aeSmrg esac 1626ea133fd7Smrg]) 1627ea133fd7Smrgif test -n $lt_cv_sys_max_cmd_len ; then 1628ea133fd7Smrg AC_MSG_RESULT($lt_cv_sys_max_cmd_len) 1629ea133fd7Smrgelse 1630ea133fd7Smrg AC_MSG_RESULT(none) 1631a253d6aeSmrgfi 1632ea133fd7Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len 1633ea133fd7Smrg_LT_DECL([], [max_cmd_len], [0], 1634ea133fd7Smrg [What is the maximum length of a command?]) 1635ea133fd7Smrg])# LT_CMD_MAX_LEN 1636a253d6aeSmrg 1637ea133fd7Smrg# Old name: 1638ea133fd7SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) 1639ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 1640ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) 1641a253d6aeSmrg 1642a253d6aeSmrg 1643ea133fd7Smrg# _LT_HEADER_DLFCN 1644ea133fd7Smrg# ---------------- 1645ea133fd7Smrgm4_defun([_LT_HEADER_DLFCN], 1646ea133fd7Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl 1647ea133fd7Smrg])# _LT_HEADER_DLFCN 1648a253d6aeSmrg 1649a253d6aeSmrg 1650ea133fd7Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, 1651ea133fd7Smrg# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) 1652ea133fd7Smrg# ---------------------------------------------------------------- 1653ea133fd7Smrgm4_defun([_LT_TRY_DLOPEN_SELF], 1654ea133fd7Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1655ea133fd7Smrgif test "$cross_compiling" = yes; then : 1656ea133fd7Smrg [$4] 1657ea133fd7Smrgelse 1658ea133fd7Smrg lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 1659ea133fd7Smrg lt_status=$lt_dlunknown 1660ea133fd7Smrg cat > conftest.$ac_ext <<_LT_EOF 1661ea133fd7Smrg[#line __oline__ "configure" 1662ea133fd7Smrg#include "confdefs.h" 1663a253d6aeSmrg 1664ea133fd7Smrg#if HAVE_DLFCN_H 1665ea133fd7Smrg#include <dlfcn.h> 1666ea133fd7Smrg#endif 1667a253d6aeSmrg 1668ea133fd7Smrg#include <stdio.h> 1669a253d6aeSmrg 1670ea133fd7Smrg#ifdef RTLD_GLOBAL 1671ea133fd7Smrg# define LT_DLGLOBAL RTLD_GLOBAL 1672ea133fd7Smrg#else 1673ea133fd7Smrg# ifdef DL_GLOBAL 1674ea133fd7Smrg# define LT_DLGLOBAL DL_GLOBAL 1675ea133fd7Smrg# else 1676ea133fd7Smrg# define LT_DLGLOBAL 0 1677ea133fd7Smrg# endif 1678ea133fd7Smrg#endif 1679a253d6aeSmrg 1680ea133fd7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we 1681ea133fd7Smrg find out it does not work in some platform. */ 1682ea133fd7Smrg#ifndef LT_DLLAZY_OR_NOW 1683ea133fd7Smrg# ifdef RTLD_LAZY 1684ea133fd7Smrg# define LT_DLLAZY_OR_NOW RTLD_LAZY 1685ea133fd7Smrg# else 1686ea133fd7Smrg# ifdef DL_LAZY 1687ea133fd7Smrg# define LT_DLLAZY_OR_NOW DL_LAZY 1688ea133fd7Smrg# else 1689ea133fd7Smrg# ifdef RTLD_NOW 1690ea133fd7Smrg# define LT_DLLAZY_OR_NOW RTLD_NOW 1691ea133fd7Smrg# else 1692ea133fd7Smrg# ifdef DL_NOW 1693ea133fd7Smrg# define LT_DLLAZY_OR_NOW DL_NOW 1694ea133fd7Smrg# else 1695ea133fd7Smrg# define LT_DLLAZY_OR_NOW 0 1696ea133fd7Smrg# endif 1697ea133fd7Smrg# endif 1698ea133fd7Smrg# endif 1699ea133fd7Smrg# endif 1700ea133fd7Smrg#endif 1701a253d6aeSmrg 1702ea133fd7Smrgvoid fnord() { int i=42;} 1703ea133fd7Smrgint main () 1704ea133fd7Smrg{ 1705ea133fd7Smrg void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); 1706ea133fd7Smrg int status = $lt_dlunknown; 1707a253d6aeSmrg 1708ea133fd7Smrg if (self) 1709ea133fd7Smrg { 1710ea133fd7Smrg if (dlsym (self,"fnord")) status = $lt_dlno_uscore; 1711ea133fd7Smrg else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; 1712ea133fd7Smrg /* dlclose (self); */ 1713ea133fd7Smrg } 1714ea133fd7Smrg else 1715ea133fd7Smrg puts (dlerror ()); 1716a253d6aeSmrg 1717ea133fd7Smrg return status; 1718ea133fd7Smrg}] 1719ea133fd7Smrg_LT_EOF 1720ea133fd7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then 1721ea133fd7Smrg (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null 1722ea133fd7Smrg lt_status=$? 1723ea133fd7Smrg case x$lt_status in 1724ea133fd7Smrg x$lt_dlno_uscore) $1 ;; 1725ea133fd7Smrg x$lt_dlneed_uscore) $2 ;; 1726ea133fd7Smrg x$lt_dlunknown|x*) $3 ;; 1727ea133fd7Smrg esac 1728ea133fd7Smrg else : 1729ea133fd7Smrg # compilation failed 1730ea133fd7Smrg $3 1731ea133fd7Smrg fi 1732ea133fd7Smrgfi 1733ea133fd7Smrgrm -fr conftest* 1734ea133fd7Smrg])# _LT_TRY_DLOPEN_SELF 1735a253d6aeSmrg 1736a253d6aeSmrg 1737ea133fd7Smrg# LT_SYS_DLOPEN_SELF 1738ea133fd7Smrg# ------------------ 1739ea133fd7SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF], 1740ea133fd7Smrg[m4_require([_LT_HEADER_DLFCN])dnl 1741ea133fd7Smrgif test "x$enable_dlopen" != xyes; then 1742ea133fd7Smrg enable_dlopen=unknown 1743ea133fd7Smrg enable_dlopen_self=unknown 1744ea133fd7Smrg enable_dlopen_self_static=unknown 1745ea133fd7Smrgelse 1746ea133fd7Smrg lt_cv_dlopen=no 1747ea133fd7Smrg lt_cv_dlopen_libs= 1748a253d6aeSmrg 1749ea133fd7Smrg case $host_os in 1750ea133fd7Smrg beos*) 1751ea133fd7Smrg lt_cv_dlopen="load_add_on" 1752ea133fd7Smrg lt_cv_dlopen_libs= 1753ea133fd7Smrg lt_cv_dlopen_self=yes 1754ea133fd7Smrg ;; 1755a253d6aeSmrg 1756ea133fd7Smrg mingw* | pw32* | cegcc*) 1757ea133fd7Smrg lt_cv_dlopen="LoadLibrary" 1758ea133fd7Smrg lt_cv_dlopen_libs= 1759ea133fd7Smrg ;; 1760a253d6aeSmrg 1761ea133fd7Smrg cygwin*) 1762ea133fd7Smrg lt_cv_dlopen="dlopen" 1763ea133fd7Smrg lt_cv_dlopen_libs= 1764ea133fd7Smrg ;; 1765a253d6aeSmrg 1766ea133fd7Smrg darwin*) 1767ea133fd7Smrg # if libdl is installed we need to link against it 1768ea133fd7Smrg AC_CHECK_LIB([dl], [dlopen], 1769ea133fd7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ 1770ea133fd7Smrg lt_cv_dlopen="dyld" 1771ea133fd7Smrg lt_cv_dlopen_libs= 1772ea133fd7Smrg lt_cv_dlopen_self=yes 1773ea133fd7Smrg ]) 1774ea133fd7Smrg ;; 1775a253d6aeSmrg 1776ea133fd7Smrg *) 1777ea133fd7Smrg AC_CHECK_FUNC([shl_load], 1778ea133fd7Smrg [lt_cv_dlopen="shl_load"], 1779ea133fd7Smrg [AC_CHECK_LIB([dld], [shl_load], 1780ea133fd7Smrg [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], 1781ea133fd7Smrg [AC_CHECK_FUNC([dlopen], 1782ea133fd7Smrg [lt_cv_dlopen="dlopen"], 1783ea133fd7Smrg [AC_CHECK_LIB([dl], [dlopen], 1784ea133fd7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], 1785ea133fd7Smrg [AC_CHECK_LIB([svld], [dlopen], 1786ea133fd7Smrg [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], 1787ea133fd7Smrg [AC_CHECK_LIB([dld], [dld_link], 1788ea133fd7Smrg [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) 1789ea133fd7Smrg ]) 1790ea133fd7Smrg ]) 1791ea133fd7Smrg ]) 1792ea133fd7Smrg ]) 1793ea133fd7Smrg ]) 1794ea133fd7Smrg ;; 1795ea133fd7Smrg esac 1796a253d6aeSmrg 1797ea133fd7Smrg if test "x$lt_cv_dlopen" != xno; then 1798ea133fd7Smrg enable_dlopen=yes 1799ea133fd7Smrg else 1800ea133fd7Smrg enable_dlopen=no 1801ea133fd7Smrg fi 1802a253d6aeSmrg 1803ea133fd7Smrg case $lt_cv_dlopen in 1804ea133fd7Smrg dlopen) 1805ea133fd7Smrg save_CPPFLAGS="$CPPFLAGS" 1806ea133fd7Smrg test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" 1807a253d6aeSmrg 1808ea133fd7Smrg save_LDFLAGS="$LDFLAGS" 1809ea133fd7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" 1810a253d6aeSmrg 1811ea133fd7Smrg save_LIBS="$LIBS" 1812ea133fd7Smrg LIBS="$lt_cv_dlopen_libs $LIBS" 1813a253d6aeSmrg 1814ea133fd7Smrg AC_CACHE_CHECK([whether a program can dlopen itself], 1815ea133fd7Smrg lt_cv_dlopen_self, [dnl 1816ea133fd7Smrg _LT_TRY_DLOPEN_SELF( 1817ea133fd7Smrg lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, 1818ea133fd7Smrg lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) 1819ea133fd7Smrg ]) 1820a253d6aeSmrg 1821ea133fd7Smrg if test "x$lt_cv_dlopen_self" = xyes; then 1822ea133fd7Smrg wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" 1823ea133fd7Smrg AC_CACHE_CHECK([whether a statically linked program can dlopen itself], 1824ea133fd7Smrg lt_cv_dlopen_self_static, [dnl 1825ea133fd7Smrg _LT_TRY_DLOPEN_SELF( 1826ea133fd7Smrg lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, 1827ea133fd7Smrg lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) 1828ea133fd7Smrg ]) 1829ea133fd7Smrg fi 1830a253d6aeSmrg 1831ea133fd7Smrg CPPFLAGS="$save_CPPFLAGS" 1832ea133fd7Smrg LDFLAGS="$save_LDFLAGS" 1833ea133fd7Smrg LIBS="$save_LIBS" 1834ea133fd7Smrg ;; 1835ea133fd7Smrg esac 1836a253d6aeSmrg 1837ea133fd7Smrg case $lt_cv_dlopen_self in 1838ea133fd7Smrg yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; 1839ea133fd7Smrg *) enable_dlopen_self=unknown ;; 1840ea133fd7Smrg esac 1841a253d6aeSmrg 1842ea133fd7Smrg case $lt_cv_dlopen_self_static in 1843ea133fd7Smrg yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; 1844ea133fd7Smrg *) enable_dlopen_self_static=unknown ;; 1845ea133fd7Smrg esac 1846a253d6aeSmrgfi 1847ea133fd7Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0], 1848ea133fd7Smrg [Whether dlopen is supported]) 1849ea133fd7Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0], 1850ea133fd7Smrg [Whether dlopen of programs is supported]) 1851ea133fd7Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], 1852ea133fd7Smrg [Whether dlopen of statically linked programs is supported]) 1853ea133fd7Smrg])# LT_SYS_DLOPEN_SELF 1854a253d6aeSmrg 1855ea133fd7Smrg# Old name: 1856ea133fd7SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) 1857ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 1858ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) 1859a253d6aeSmrg 1860a253d6aeSmrg 1861ea133fd7Smrg# _LT_COMPILER_C_O([TAGNAME]) 1862ea133fd7Smrg# --------------------------- 1863ea133fd7Smrg# Check to see if options -c and -o are simultaneously supported by compiler. 1864ea133fd7Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O. 1865ea133fd7Smrgm4_defun([_LT_COMPILER_C_O], 1866ea133fd7Smrg[m4_require([_LT_DECL_SED])dnl 1867ea133fd7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1868ea133fd7Smrgm4_require([_LT_TAG_COMPILER])dnl 1869ea133fd7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], 1870ea133fd7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], 1871ea133fd7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no 1872ea133fd7Smrg $RM -r conftest 2>/dev/null 1873ea133fd7Smrg mkdir conftest 1874ea133fd7Smrg cd conftest 1875ea133fd7Smrg mkdir out 1876ea133fd7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 1877a253d6aeSmrg 1878ea133fd7Smrg lt_compiler_flag="-o out/conftest2.$ac_objext" 1879ea133fd7Smrg # Insert the option either (1) after the last *FLAGS variable, or 1880ea133fd7Smrg # (2) before a word containing "conftest.", or (3) at the end. 1881ea133fd7Smrg # Note that $ac_compile itself does not contain backslashes and begins 1882ea133fd7Smrg # with a dollar sign (not a hyphen), so the echo should work correctly. 1883ea133fd7Smrg lt_compile=`echo "$ac_compile" | $SED \ 1884ea133fd7Smrg -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ 1885ea133fd7Smrg -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ 1886ea133fd7Smrg -e 's:$: $lt_compiler_flag:'` 1887ea133fd7Smrg (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) 1888ea133fd7Smrg (eval "$lt_compile" 2>out/conftest.err) 1889ea133fd7Smrg ac_status=$? 1890ea133fd7Smrg cat out/conftest.err >&AS_MESSAGE_LOG_FD 1891ea133fd7Smrg echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD 1892ea133fd7Smrg if (exit $ac_status) && test -s out/conftest2.$ac_objext 1893ea133fd7Smrg then 1894ea133fd7Smrg # The compiler can only warn and ignore the option if not recognized 1895ea133fd7Smrg # So say no if there are warnings 1896ea133fd7Smrg $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp 1897ea133fd7Smrg $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 1898ea133fd7Smrg if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then 1899ea133fd7Smrg _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 1900ea133fd7Smrg fi 1901ea133fd7Smrg fi 1902ea133fd7Smrg chmod u+w . 2>&AS_MESSAGE_LOG_FD 1903ea133fd7Smrg $RM conftest* 1904ea133fd7Smrg # SGI C++ compiler will create directory out/ii_files/ for 1905ea133fd7Smrg # template instantiation 1906ea133fd7Smrg test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files 1907ea133fd7Smrg $RM out/* && rmdir out 1908ea133fd7Smrg cd .. 1909ea133fd7Smrg $RM -r conftest 1910ea133fd7Smrg $RM conftest* 1911ea133fd7Smrg]) 1912ea133fd7Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], 1913ea133fd7Smrg [Does compiler simultaneously support -c and -o options?]) 1914ea133fd7Smrg])# _LT_COMPILER_C_O 1915a253d6aeSmrg 1916ea133fd7Smrg 1917ea133fd7Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME]) 1918ea133fd7Smrg# ---------------------------------- 1919ea133fd7Smrg# Check to see if we can do hard links to lock some files if needed 1920ea133fd7Smrgm4_defun([_LT_COMPILER_FILE_LOCKS], 1921ea133fd7Smrg[m4_require([_LT_ENABLE_LOCK])dnl 1922ea133fd7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 1923ea133fd7Smrg_LT_COMPILER_C_O([$1]) 1924ea133fd7Smrg 1925ea133fd7Smrghard_links="nottested" 1926ea133fd7Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then 1927ea133fd7Smrg # do not overwrite the value of need_locks provided by the user 1928ea133fd7Smrg AC_MSG_CHECKING([if we can lock with hard links]) 1929ea133fd7Smrg hard_links=yes 1930ea133fd7Smrg $RM conftest* 1931ea133fd7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1932ea133fd7Smrg touch conftest.a 1933ea133fd7Smrg ln conftest.a conftest.b 2>&5 || hard_links=no 1934ea133fd7Smrg ln conftest.a conftest.b 2>/dev/null && hard_links=no 1935ea133fd7Smrg AC_MSG_RESULT([$hard_links]) 1936ea133fd7Smrg if test "$hard_links" = no; then 1937ea133fd7Smrg AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) 1938ea133fd7Smrg need_locks=warn 1939a253d6aeSmrg fi 1940ea133fd7Smrgelse 1941ea133fd7Smrg need_locks=no 1942a253d6aeSmrgfi 1943ea133fd7Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) 1944ea133fd7Smrg])# _LT_COMPILER_FILE_LOCKS 1945a253d6aeSmrg 1946ea133fd7Smrg 1947ea133fd7Smrg# _LT_CHECK_OBJDIR 1948ea133fd7Smrg# ---------------- 1949ea133fd7Smrgm4_defun([_LT_CHECK_OBJDIR], 1950ea133fd7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], 1951ea133fd7Smrg[rm -f .libs 2>/dev/null 1952ea133fd7Smrgmkdir .libs 2>/dev/null 1953ea133fd7Smrgif test -d .libs; then 1954ea133fd7Smrg lt_cv_objdir=.libs 1955ea133fd7Smrgelse 1956ea133fd7Smrg # MS-DOS does not allow filenames that begin with a dot. 1957ea133fd7Smrg lt_cv_objdir=_libs 1958a253d6aeSmrgfi 1959ea133fd7Smrgrmdir .libs 2>/dev/null]) 1960ea133fd7Smrgobjdir=$lt_cv_objdir 1961ea133fd7Smrg_LT_DECL([], [objdir], [0], 1962ea133fd7Smrg [The name of the directory that contains temporary libtool files])dnl 1963ea133fd7Smrgm4_pattern_allow([LT_OBJDIR])dnl 1964ea133fd7SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", 1965ea133fd7Smrg [Define to the sub-directory in which libtool stores uninstalled libraries.]) 1966ea133fd7Smrg])# _LT_CHECK_OBJDIR 1967a253d6aeSmrg 1968a253d6aeSmrg 1969ea133fd7Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) 1970ea133fd7Smrg# -------------------------------------- 1971ea133fd7Smrg# Check hardcoding attributes. 1972ea133fd7Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH], 1973ea133fd7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs]) 1974ea133fd7Smrg_LT_TAGVAR(hardcode_action, $1)= 1975ea133fd7Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || 1976ea133fd7Smrg test -n "$_LT_TAGVAR(runpath_var, $1)" || 1977ea133fd7Smrg test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then 1978a253d6aeSmrg 1979ea133fd7Smrg # We can hardcode non-existent directories. 1980ea133fd7Smrg if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && 1981ea133fd7Smrg # If the only mechanism to avoid hardcoding is shlibpath_var, we 1982ea133fd7Smrg # have to relink, otherwise we might link with an installed library 1983ea133fd7Smrg # when we should be linking with a yet-to-be-installed one 1984ea133fd7Smrg ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && 1985ea133fd7Smrg test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then 1986ea133fd7Smrg # Linking always hardcodes the temporary library directory. 1987ea133fd7Smrg _LT_TAGVAR(hardcode_action, $1)=relink 1988ea133fd7Smrg else 1989ea133fd7Smrg # We can link without hardcoding, and we can hardcode nonexisting dirs. 1990ea133fd7Smrg _LT_TAGVAR(hardcode_action, $1)=immediate 1991ea133fd7Smrg fi 1992ea133fd7Smrgelse 1993ea133fd7Smrg # We cannot hardcode anything, or else we can only hardcode existing 1994ea133fd7Smrg # directories. 1995ea133fd7Smrg _LT_TAGVAR(hardcode_action, $1)=unsupported 1996ea133fd7Smrgfi 1997ea133fd7SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) 1998a253d6aeSmrg 1999ea133fd7Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink || 2000ea133fd7Smrg test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then 2001ea133fd7Smrg # Fast installation is not supported 2002ea133fd7Smrg enable_fast_install=no 2003ea133fd7Smrgelif test "$shlibpath_overrides_runpath" = yes || 2004ea133fd7Smrg test "$enable_shared" = no; then 2005ea133fd7Smrg # Fast installation is not necessary 2006ea133fd7Smrg enable_fast_install=needless 2007ea133fd7Smrgfi 2008ea133fd7Smrg_LT_TAGDECL([], [hardcode_action], [0], 2009ea133fd7Smrg [How to hardcode a shared library path into an executable]) 2010ea133fd7Smrg])# _LT_LINKER_HARDCODE_LIBPATH 2011ea133fd7Smrg 2012ea133fd7Smrg 2013ea133fd7Smrg# _LT_CMD_STRIPLIB 2014ea133fd7Smrg# ---------------- 2015ea133fd7Smrgm4_defun([_LT_CMD_STRIPLIB], 2016ea133fd7Smrg[m4_require([_LT_DECL_EGREP]) 2017ea133fd7Smrgstriplib= 2018ea133fd7Smrgold_striplib= 2019ea133fd7SmrgAC_MSG_CHECKING([whether stripping libraries is possible]) 2020ea133fd7Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then 2021ea133fd7Smrg test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" 2022ea133fd7Smrg test -z "$striplib" && striplib="$STRIP --strip-unneeded" 2023ea133fd7Smrg AC_MSG_RESULT([yes]) 2024ea133fd7Smrgelse 2025ea133fd7Smrg# FIXME - insert some real tests, host_os isn't really good enough 2026ea133fd7Smrg case $host_os in 2027ea133fd7Smrg darwin*) 2028ea133fd7Smrg if test -n "$STRIP" ; then 2029ea133fd7Smrg striplib="$STRIP -x" 2030ea133fd7Smrg old_striplib="$STRIP -S" 2031ea133fd7Smrg AC_MSG_RESULT([yes]) 2032ea133fd7Smrg else 2033ea133fd7Smrg AC_MSG_RESULT([no]) 2034ea133fd7Smrg fi 2035ea133fd7Smrg ;; 2036ea133fd7Smrg *) 2037ea133fd7Smrg AC_MSG_RESULT([no]) 2038ea133fd7Smrg ;; 2039ea133fd7Smrg esac 2040ea133fd7Smrgfi 2041ea133fd7Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) 2042ea133fd7Smrg_LT_DECL([], [striplib], [1]) 2043ea133fd7Smrg])# _LT_CMD_STRIPLIB 2044ea133fd7Smrg 2045ea133fd7Smrg 2046ea133fd7Smrg# _LT_SYS_DYNAMIC_LINKER([TAG]) 2047ea133fd7Smrg# ----------------------------- 2048ea133fd7Smrg# PORTME Fill in your ld.so characteristics 2049ea133fd7Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER], 2050ea133fd7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 2051ea133fd7Smrgm4_require([_LT_DECL_EGREP])dnl 2052ea133fd7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 2053ea133fd7Smrgm4_require([_LT_DECL_OBJDUMP])dnl 2054ea133fd7Smrgm4_require([_LT_DECL_SED])dnl 2055ea133fd7SmrgAC_MSG_CHECKING([dynamic linker characteristics]) 2056ea133fd7Smrgm4_if([$1], 2057ea133fd7Smrg [], [ 2058ea133fd7Smrgif test "$GCC" = yes; then 2059ea133fd7Smrg case $host_os in 2060ea133fd7Smrg darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; 2061ea133fd7Smrg *) lt_awk_arg="/^libraries:/" ;; 2062ea133fd7Smrg esac 2063ea133fd7Smrg lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2064ea133fd7Smrg if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then 2065ea133fd7Smrg # if the path contains ";" then we assume it to be the separator 2066ea133fd7Smrg # otherwise default to the standard path separator (i.e. ":") - it is 2067ea133fd7Smrg # assumed that no part of a normal pathname contains ";" but that should 2068ea133fd7Smrg # okay in the real world where ";" in dirpaths is itself problematic. 2069ea133fd7Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` 2070ea133fd7Smrg else 2071ea133fd7Smrg lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2072a253d6aeSmrg fi 2073ea133fd7Smrg # Ok, now we have the path, separated by spaces, we can step through it 2074ea133fd7Smrg # and add multilib dir if necessary. 2075ea133fd7Smrg lt_tmp_lt_search_path_spec= 2076ea133fd7Smrg lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` 2077ea133fd7Smrg for lt_sys_path in $lt_search_path_spec; do 2078ea133fd7Smrg if test -d "$lt_sys_path/$lt_multi_os_dir"; then 2079ea133fd7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" 2080ea133fd7Smrg else 2081ea133fd7Smrg test -d "$lt_sys_path" && \ 2082ea133fd7Smrg lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" 2083ea133fd7Smrg fi 2084ea133fd7Smrg done 2085ea133fd7Smrg lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' 2086ea133fd7SmrgBEGIN {RS=" "; FS="/|\n";} { 2087ea133fd7Smrg lt_foo=""; 2088ea133fd7Smrg lt_count=0; 2089ea133fd7Smrg for (lt_i = NF; lt_i > 0; lt_i--) { 2090ea133fd7Smrg if ($lt_i != "" && $lt_i != ".") { 2091ea133fd7Smrg if ($lt_i == "..") { 2092ea133fd7Smrg lt_count++; 2093ea133fd7Smrg } else { 2094ea133fd7Smrg if (lt_count == 0) { 2095ea133fd7Smrg lt_foo="/" $lt_i lt_foo; 2096ea133fd7Smrg } else { 2097ea133fd7Smrg lt_count--; 2098ea133fd7Smrg } 2099ea133fd7Smrg } 2100ea133fd7Smrg } 2101ea133fd7Smrg } 2102ea133fd7Smrg if (lt_foo != "") { lt_freq[[lt_foo]]++; } 2103ea133fd7Smrg if (lt_freq[[lt_foo]] == 1) { print lt_foo; } 2104ea133fd7Smrg}'` 2105ea133fd7Smrg sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` 2106ea133fd7Smrgelse 2107ea133fd7Smrg sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" 2108ea133fd7Smrgfi]) 2109ea133fd7Smrglibrary_names_spec= 2110ea133fd7Smrglibname_spec='lib$name' 2111ea133fd7Smrgsoname_spec= 2112ea133fd7Smrgshrext_cmds=".so" 2113ea133fd7Smrgpostinstall_cmds= 2114ea133fd7Smrgpostuninstall_cmds= 2115ea133fd7Smrgfinish_cmds= 2116ea133fd7Smrgfinish_eval= 2117ea133fd7Smrgshlibpath_var= 2118ea133fd7Smrgshlibpath_overrides_runpath=unknown 2119ea133fd7Smrgversion_type=none 2120ea133fd7Smrgdynamic_linker="$host_os ld.so" 2121ea133fd7Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib" 2122ea133fd7Smrgneed_lib_prefix=unknown 2123ea133fd7Smrghardcode_into_libs=no 2124ea133fd7Smrg 2125ea133fd7Smrg# when you set need_version to no, make sure it does not cause -set_version 2126ea133fd7Smrg# flags to be left without arguments 2127ea133fd7Smrgneed_version=unknown 2128ea133fd7Smrg 2129ea133fd7Smrgcase $host_os in 2130ea133fd7Smrgaix3*) 2131ea133fd7Smrg version_type=linux 2132ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' 2133ea133fd7Smrg shlibpath_var=LIBPATH 2134ea133fd7Smrg 2135ea133fd7Smrg # AIX 3 has no versioning support, so we append a major version to the name. 2136ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2137a253d6aeSmrg ;; 2138a253d6aeSmrg 2139ea133fd7Smrgaix[[4-9]]*) 2140ea133fd7Smrg version_type=linux 2141ea133fd7Smrg need_lib_prefix=no 2142ea133fd7Smrg need_version=no 2143ea133fd7Smrg hardcode_into_libs=yes 2144ea133fd7Smrg if test "$host_cpu" = ia64; then 2145ea133fd7Smrg # AIX 5 supports IA64 2146ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' 2147ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2148ea133fd7Smrg else 2149ea133fd7Smrg # With GCC up to 2.95.x, collect2 would create an import file 2150ea133fd7Smrg # for dependence libraries. The import file would start with 2151ea133fd7Smrg # the line `#! .'. This would cause the generated library to 2152ea133fd7Smrg # depend on `.', always an invalid library. This was fixed in 2153ea133fd7Smrg # development snapshots of GCC prior to 3.0. 2154ea133fd7Smrg case $host_os in 2155ea133fd7Smrg aix4 | aix4.[[01]] | aix4.[[01]].*) 2156ea133fd7Smrg if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' 2157ea133fd7Smrg echo ' yes ' 2158ea133fd7Smrg echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then 2159ea133fd7Smrg : 2160ea133fd7Smrg else 2161ea133fd7Smrg can_build_shared=no 2162ea133fd7Smrg fi 2163a253d6aeSmrg ;; 2164a253d6aeSmrg esac 2165ea133fd7Smrg # AIX (on Power*) has no versioning support, so currently we can not hardcode correct 2166ea133fd7Smrg # soname into executable. Probably we can add versioning support to 2167ea133fd7Smrg # collect2, so additional links can be useful in future. 2168ea133fd7Smrg if test "$aix_use_runtimelinking" = yes; then 2169ea133fd7Smrg # If using run time linking (on AIX 4.2 or later) use lib<name>.so 2170ea133fd7Smrg # instead of lib<name>.a to let people know that these are not 2171ea133fd7Smrg # typical AIX shared libraries. 2172ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2173ea133fd7Smrg else 2174ea133fd7Smrg # We preserve .a as extension for shared libraries through AIX4.2 2175ea133fd7Smrg # and later when we are not doing run time linking. 2176ea133fd7Smrg library_names_spec='${libname}${release}.a $libname.a' 2177ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2178ea133fd7Smrg fi 2179ea133fd7Smrg shlibpath_var=LIBPATH 2180a253d6aeSmrg fi 2181a253d6aeSmrg ;; 2182a253d6aeSmrg 2183ea133fd7Smrgamigaos*) 2184ea133fd7Smrg case $host_cpu in 2185ea133fd7Smrg powerpc) 2186ea133fd7Smrg # Since July 2007 AmigaOS4 officially supports .so libraries. 2187ea133fd7Smrg # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. 2188ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2189ea133fd7Smrg ;; 2190ea133fd7Smrg m68k) 2191ea133fd7Smrg library_names_spec='$libname.ixlibrary $libname.a' 2192ea133fd7Smrg # Create ${libname}_ixlibrary.a entries in /sys/libs. 2193ea133fd7Smrg 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' 2194ea133fd7Smrg ;; 2195ea133fd7Smrg esac 2196a253d6aeSmrg ;; 2197ea133fd7Smrg 2198ea133fd7Smrgbeos*) 2199ea133fd7Smrg library_names_spec='${libname}${shared_ext}' 2200ea133fd7Smrg dynamic_linker="$host_os ld.so" 2201ea133fd7Smrg shlibpath_var=LIBRARY_PATH 2202a253d6aeSmrg ;; 2203a253d6aeSmrg 2204ea133fd7Smrgbsdi[[45]]*) 2205ea133fd7Smrg version_type=linux 2206ea133fd7Smrg need_version=no 2207ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2208ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2209ea133fd7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' 2210ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2211ea133fd7Smrg sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" 2212ea133fd7Smrg sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" 2213ea133fd7Smrg # the default ld.so.conf also contains /usr/contrib/lib and 2214ea133fd7Smrg # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow 2215ea133fd7Smrg # libtool to hard-code these into programs 2216a253d6aeSmrg ;; 2217a253d6aeSmrg 2218ea133fd7Smrgcygwin* | mingw* | pw32* | cegcc*) 2219ea133fd7Smrg version_type=windows 2220ea133fd7Smrg shrext_cmds=".dll" 2221ea133fd7Smrg need_version=no 2222ea133fd7Smrg need_lib_prefix=no 2223a253d6aeSmrg 2224ea133fd7Smrg case $GCC,$host_os in 2225ea133fd7Smrg yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) 2226ea133fd7Smrg library_names_spec='$libname.dll.a' 2227ea133fd7Smrg # DLL is installed to $(libdir)/../bin by postinstall_cmds 2228ea133fd7Smrg postinstall_cmds='base_file=`basename \${file}`~ 2229ea133fd7Smrg dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ 2230ea133fd7Smrg dldir=$destdir/`dirname \$dlpath`~ 2231ea133fd7Smrg test -d \$dldir || mkdir -p \$dldir~ 2232ea133fd7Smrg $install_prog $dir/$dlname \$dldir/$dlname~ 2233ea133fd7Smrg chmod a+x \$dldir/$dlname~ 2234ea133fd7Smrg if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then 2235ea133fd7Smrg eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; 2236ea133fd7Smrg fi' 2237ea133fd7Smrg postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ 2238ea133fd7Smrg dlpath=$dir/\$dldll~ 2239ea133fd7Smrg $RM \$dlpath' 2240ea133fd7Smrg shlibpath_overrides_runpath=yes 2241a253d6aeSmrg 2242ea133fd7Smrg case $host_os in 2243ea133fd7Smrg cygwin*) 2244ea133fd7Smrg # Cygwin DLLs use 'cyg' prefix rather than 'lib' 2245ea133fd7Smrg soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2246ea133fd7Smrg sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" 2247ea133fd7Smrg ;; 2248ea133fd7Smrg mingw* | cegcc*) 2249ea133fd7Smrg # MinGW DLLs use traditional 'lib' prefix 2250ea133fd7Smrg soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2251ea133fd7Smrg sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` 2252ea133fd7Smrg if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then 2253ea133fd7Smrg # It is most probably a Windows format PATH printed by 2254ea133fd7Smrg # mingw gcc, but we are running on Cygwin. Gcc prints its search 2255ea133fd7Smrg # path with ; separators, and with drive letters. We can handle the 2256ea133fd7Smrg # drive letters (cygwin fileutils understands them), so leave them, 2257ea133fd7Smrg # especially as we might pass files found there to a mingw objdump, 2258ea133fd7Smrg # which wouldn't understand a cygwinified path. Ahh. 2259ea133fd7Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` 2260ea133fd7Smrg else 2261ea133fd7Smrg sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` 2262ea133fd7Smrg fi 2263ea133fd7Smrg ;; 2264ea133fd7Smrg pw32*) 2265ea133fd7Smrg # pw32 DLLs use 'pw' prefix rather than 'lib' 2266ea133fd7Smrg library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' 2267ea133fd7Smrg ;; 2268ea133fd7Smrg esac 2269ea133fd7Smrg ;; 2270a253d6aeSmrg 2271ea133fd7Smrg *) 2272ea133fd7Smrg library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' 2273ea133fd7Smrg ;; 2274ea133fd7Smrg esac 2275ea133fd7Smrg dynamic_linker='Win32 ld.exe' 2276ea133fd7Smrg # FIXME: first we should search . and the directory the executable is in 2277ea133fd7Smrg shlibpath_var=PATH 2278ea133fd7Smrg ;; 2279a253d6aeSmrg 2280ea133fd7Smrgdarwin* | rhapsody*) 2281ea133fd7Smrg dynamic_linker="$host_os dyld" 2282ea133fd7Smrg version_type=darwin 2283ea133fd7Smrg need_lib_prefix=no 2284ea133fd7Smrg need_version=no 2285ea133fd7Smrg library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' 2286ea133fd7Smrg soname_spec='${libname}${release}${major}$shared_ext' 2287ea133fd7Smrg shlibpath_overrides_runpath=yes 2288ea133fd7Smrg shlibpath_var=DYLD_LIBRARY_PATH 2289ea133fd7Smrg shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' 2290ea133fd7Smrgm4_if([$1], [],[ 2291ea133fd7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 2292ea133fd7Smrg sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' 2293ea133fd7Smrg ;; 2294a253d6aeSmrg 2295ea133fd7Smrgdgux*) 2296ea133fd7Smrg version_type=linux 2297ea133fd7Smrg need_lib_prefix=no 2298ea133fd7Smrg need_version=no 2299ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' 2300ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2301ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2302ea133fd7Smrg ;; 2303a253d6aeSmrg 2304ea133fd7Smrgfreebsd1*) 2305ea133fd7Smrg dynamic_linker=no 2306ea133fd7Smrg ;; 2307a253d6aeSmrg 2308ea133fd7Smrgfreebsd* | dragonfly*) 2309ea133fd7Smrg # DragonFly does not have aout. When/if they implement a new 2310ea133fd7Smrg # versioning mechanism, adjust this. 2311ea133fd7Smrg if test -x /usr/bin/objformat; then 2312ea133fd7Smrg objformat=`/usr/bin/objformat` 2313ea133fd7Smrg else 2314ea133fd7Smrg case $host_os in 2315ea133fd7Smrg freebsd[[123]]*) objformat=aout ;; 2316ea133fd7Smrg *) objformat=elf ;; 2317ea133fd7Smrg esac 2318ea133fd7Smrg fi 2319ea133fd7Smrg version_type=freebsd-$objformat 2320ea133fd7Smrg case $version_type in 2321ea133fd7Smrg freebsd-elf*) 2322ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2323ea133fd7Smrg need_version=no 2324ea133fd7Smrg need_lib_prefix=no 2325ea133fd7Smrg ;; 2326ea133fd7Smrg freebsd-*) 2327ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' 2328ea133fd7Smrg need_version=yes 2329ea133fd7Smrg ;; 2330ea133fd7Smrg esac 2331ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2332ea133fd7Smrg case $host_os in 2333ea133fd7Smrg freebsd2*) 2334ea133fd7Smrg shlibpath_overrides_runpath=yes 2335a253d6aeSmrg ;; 2336ea133fd7Smrg freebsd3.[[01]]* | freebsdelf3.[[01]]*) 2337ea133fd7Smrg shlibpath_overrides_runpath=yes 2338ea133fd7Smrg hardcode_into_libs=yes 2339a253d6aeSmrg ;; 2340ea133fd7Smrg freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ 2341ea133fd7Smrg freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) 2342ea133fd7Smrg shlibpath_overrides_runpath=no 2343ea133fd7Smrg hardcode_into_libs=yes 2344a253d6aeSmrg ;; 2345ea133fd7Smrg *) # from 4.6 on, and DragonFly 2346ea133fd7Smrg shlibpath_overrides_runpath=yes 2347ea133fd7Smrg hardcode_into_libs=yes 2348a253d6aeSmrg ;; 2349ea133fd7Smrg esac 2350ea133fd7Smrg ;; 2351a253d6aeSmrg 2352ea133fd7Smrggnu*) 2353ea133fd7Smrg version_type=linux 2354ea133fd7Smrg need_lib_prefix=no 2355ea133fd7Smrg need_version=no 2356ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' 2357ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2358ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2359ea133fd7Smrg hardcode_into_libs=yes 2360ea133fd7Smrg ;; 2361a253d6aeSmrg 2362ea133fd7Smrghpux9* | hpux10* | hpux11*) 2363ea133fd7Smrg # Give a soname corresponding to the major version so that dld.sl refuses to 2364ea133fd7Smrg # link against other versions. 2365ea133fd7Smrg version_type=sunos 2366ea133fd7Smrg need_lib_prefix=no 2367ea133fd7Smrg need_version=no 2368ea133fd7Smrg case $host_cpu in 2369ea133fd7Smrg ia64*) 2370ea133fd7Smrg shrext_cmds='.so' 2371ea133fd7Smrg hardcode_into_libs=yes 2372ea133fd7Smrg dynamic_linker="$host_os dld.so" 2373ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2374ea133fd7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2375ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2376ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2377ea133fd7Smrg if test "X$HPUX_IA64_MODE" = X32; then 2378ea133fd7Smrg sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" 2379a253d6aeSmrg else 2380ea133fd7Smrg sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" 2381a253d6aeSmrg fi 2382ea133fd7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2383ea133fd7Smrg ;; 2384ea133fd7Smrg hppa*64*) 2385ea133fd7Smrg shrext_cmds='.sl' 2386ea133fd7Smrg hardcode_into_libs=yes 2387ea133fd7Smrg dynamic_linker="$host_os dld.sl" 2388ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH 2389ea133fd7Smrg shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. 2390ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2391ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2392ea133fd7Smrg sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" 2393ea133fd7Smrg sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec 2394a253d6aeSmrg ;; 2395a253d6aeSmrg *) 2396ea133fd7Smrg shrext_cmds='.sl' 2397ea133fd7Smrg dynamic_linker="$host_os dld.sl" 2398ea133fd7Smrg shlibpath_var=SHLIB_PATH 2399ea133fd7Smrg shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH 2400ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2401ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2402a253d6aeSmrg ;; 2403a253d6aeSmrg esac 2404ea133fd7Smrg # HP-UX runs *really* slowly unless shared libraries are mode 555. 2405ea133fd7Smrg postinstall_cmds='chmod 555 $lib' 2406ea133fd7Smrg ;; 2407a253d6aeSmrg 2408ea133fd7Smrginterix[[3-9]]*) 2409ea133fd7Smrg version_type=linux 2410ea133fd7Smrg need_lib_prefix=no 2411ea133fd7Smrg need_version=no 2412ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2413ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2414ea133fd7Smrg dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' 2415ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2416ea133fd7Smrg shlibpath_overrides_runpath=no 2417ea133fd7Smrg hardcode_into_libs=yes 2418ea133fd7Smrg ;; 2419a253d6aeSmrg 2420ea133fd7Smrgirix5* | irix6* | nonstopux*) 2421ea133fd7Smrg case $host_os in 2422ea133fd7Smrg nonstopux*) version_type=nonstopux ;; 2423ea133fd7Smrg *) 2424ea133fd7Smrg if test "$lt_cv_prog_gnu_ld" = yes; then 2425ea133fd7Smrg version_type=linux 2426ea133fd7Smrg else 2427ea133fd7Smrg version_type=irix 2428ea133fd7Smrg fi ;; 2429ea133fd7Smrg esac 2430ea133fd7Smrg need_lib_prefix=no 2431ea133fd7Smrg need_version=no 2432ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2433ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' 2434ea133fd7Smrg case $host_os in 2435ea133fd7Smrg irix5* | nonstopux*) 2436ea133fd7Smrg libsuff= shlibsuff= 2437ea133fd7Smrg ;; 2438ea133fd7Smrg *) 2439ea133fd7Smrg case $LD in # libtool.m4 will add one of these switches to LD 2440ea133fd7Smrg *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") 2441ea133fd7Smrg libsuff= shlibsuff= libmagic=32-bit;; 2442ea133fd7Smrg *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") 2443ea133fd7Smrg libsuff=32 shlibsuff=N32 libmagic=N32;; 2444ea133fd7Smrg *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") 2445ea133fd7Smrg libsuff=64 shlibsuff=64 libmagic=64-bit;; 2446ea133fd7Smrg *) libsuff= shlibsuff= libmagic=never-match;; 2447ea133fd7Smrg esac 2448ea133fd7Smrg ;; 2449ea133fd7Smrg esac 2450ea133fd7Smrg shlibpath_var=LD_LIBRARY${shlibsuff}_PATH 2451ea133fd7Smrg shlibpath_overrides_runpath=no 2452ea133fd7Smrg sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" 2453ea133fd7Smrg sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" 2454ea133fd7Smrg hardcode_into_libs=yes 2455ea133fd7Smrg ;; 2456a253d6aeSmrg 2457ea133fd7Smrg# No shared lib support for Linux oldld, aout, or coff. 2458ea133fd7Smrglinux*oldld* | linux*aout* | linux*coff*) 2459ea133fd7Smrg dynamic_linker=no 2460ea133fd7Smrg ;; 2461a253d6aeSmrg 2462ea133fd7Smrg# This must be Linux ELF. 2463ea133fd7Smrglinux* | k*bsd*-gnu) 2464ea133fd7Smrg version_type=linux 2465ea133fd7Smrg need_lib_prefix=no 2466ea133fd7Smrg need_version=no 2467ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2468ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2469ea133fd7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' 2470ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2471ea133fd7Smrg shlibpath_overrides_runpath=no 2472ea133fd7Smrg # Some binutils ld are patched to set DT_RUNPATH 2473ea133fd7Smrg save_LDFLAGS=$LDFLAGS 2474ea133fd7Smrg save_libdir=$libdir 2475ea133fd7Smrg eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ 2476ea133fd7Smrg LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" 2477ea133fd7Smrg AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], 2478ea133fd7Smrg [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], 2479ea133fd7Smrg [shlibpath_overrides_runpath=yes])]) 2480ea133fd7Smrg LDFLAGS=$save_LDFLAGS 2481ea133fd7Smrg libdir=$save_libdir 2482a253d6aeSmrg 2483ea133fd7Smrg # This implies no fast_install, which is unacceptable. 2484ea133fd7Smrg # Some rework will be needed to allow for fast_install 2485ea133fd7Smrg # before this can be enabled. 2486ea133fd7Smrg hardcode_into_libs=yes 2487a253d6aeSmrg 2488ea133fd7Smrg # Add ABI-specific directories to the system library path. 2489ea133fd7Smrg sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" 2490a253d6aeSmrg 2491ea133fd7Smrg # Append ld.so.conf contents to the search path 2492ea133fd7Smrg if test -f /etc/ld.so.conf; then 2493ea133fd7Smrg 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' ' '` 2494ea133fd7Smrg sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" 2495ea133fd7Smrg fi 2496a253d6aeSmrg 2497ea133fd7Smrg # We used to test for /lib/ld.so.1 and disable shared libraries on 2498ea133fd7Smrg # powerpc, because MkLinux only supported shared libraries with the 2499ea133fd7Smrg # GNU dynamic linker. Since this was broken with cross compilers, 2500ea133fd7Smrg # most powerpc-linux boxes support dynamic linking these days and 2501ea133fd7Smrg # people can always --disable-shared, the test was removed, and we 2502ea133fd7Smrg # assume the GNU/Linux dynamic linker is in use. 2503ea133fd7Smrg dynamic_linker='GNU/Linux ld.so' 2504ea133fd7Smrg ;; 2505a253d6aeSmrg 2506ea133fd7Smrgnetbsd*) 2507ea133fd7Smrg version_type=sunos 2508ea133fd7Smrg need_lib_prefix=no 2509ea133fd7Smrg need_version=no 2510ea133fd7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 2511ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2512ea133fd7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2513ea133fd7Smrg dynamic_linker='NetBSD (a.out) ld.so' 2514a253d6aeSmrg else 2515ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' 2516ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2517ea133fd7Smrg dynamic_linker='NetBSD ld.elf_so' 2518a253d6aeSmrg fi 2519ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2520ea133fd7Smrg shlibpath_overrides_runpath=yes 2521ea133fd7Smrg hardcode_into_libs=yes 2522ea133fd7Smrg ;; 2523a253d6aeSmrg 2524ea133fd7Smrgnewsos6) 2525ea133fd7Smrg version_type=linux 2526ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2527ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2528ea133fd7Smrg shlibpath_overrides_runpath=yes 2529ea133fd7Smrg ;; 2530a253d6aeSmrg 2531ea133fd7Smrg*nto* | *qnx*) 2532ea133fd7Smrg version_type=qnx 2533ea133fd7Smrg need_lib_prefix=no 2534ea133fd7Smrg need_version=no 2535ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2536ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2537ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2538ea133fd7Smrg shlibpath_overrides_runpath=no 2539ea133fd7Smrg hardcode_into_libs=yes 2540ea133fd7Smrg dynamic_linker='ldqnx.so' 2541ea133fd7Smrg ;; 2542a253d6aeSmrg 2543ea133fd7Smrgopenbsd*) 2544ea133fd7Smrg version_type=sunos 2545ea133fd7Smrg sys_lib_dlsearch_path_spec="/usr/lib" 2546ea133fd7Smrg need_lib_prefix=no 2547ea133fd7Smrg # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. 2548a253d6aeSmrg case $host_os in 2549ea133fd7Smrg openbsd3.3 | openbsd3.3.*) need_version=yes ;; 2550ea133fd7Smrg *) need_version=no ;; 2551a253d6aeSmrg esac 2552ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2553ea133fd7Smrg finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' 2554ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2555ea133fd7Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 2556ea133fd7Smrg case $host_os in 2557ea133fd7Smrg openbsd2.[[89]] | openbsd2.[[89]].*) 2558ea133fd7Smrg shlibpath_overrides_runpath=no 2559ea133fd7Smrg ;; 2560ea133fd7Smrg *) 2561ea133fd7Smrg shlibpath_overrides_runpath=yes 2562ea133fd7Smrg ;; 2563ea133fd7Smrg esac 2564a253d6aeSmrg else 2565ea133fd7Smrg shlibpath_overrides_runpath=yes 2566a253d6aeSmrg fi 2567ea133fd7Smrg ;; 2568a253d6aeSmrg 2569ea133fd7Smrgos2*) 2570ea133fd7Smrg libname_spec='$name' 2571ea133fd7Smrg shrext_cmds=".dll" 2572ea133fd7Smrg need_lib_prefix=no 2573ea133fd7Smrg library_names_spec='$libname${shared_ext} $libname.a' 2574ea133fd7Smrg dynamic_linker='OS/2 ld.exe' 2575ea133fd7Smrg shlibpath_var=LIBPATH 2576ea133fd7Smrg ;; 2577a253d6aeSmrg 2578ea133fd7Smrgosf3* | osf4* | osf5*) 2579ea133fd7Smrg version_type=osf 2580ea133fd7Smrg need_lib_prefix=no 2581ea133fd7Smrg need_version=no 2582ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2583ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2584ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2585ea133fd7Smrg sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" 2586ea133fd7Smrg sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" 2587ea133fd7Smrg ;; 2588a253d6aeSmrg 2589ea133fd7Smrgrdos*) 2590ea133fd7Smrg dynamic_linker=no 2591ea133fd7Smrg ;; 2592a253d6aeSmrg 2593ea133fd7Smrgsolaris*) 2594ea133fd7Smrg version_type=linux 2595ea133fd7Smrg need_lib_prefix=no 2596ea133fd7Smrg need_version=no 2597ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2598ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2599ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2600ea133fd7Smrg shlibpath_overrides_runpath=yes 2601ea133fd7Smrg hardcode_into_libs=yes 2602ea133fd7Smrg # ldd complains unless libraries are executable 2603ea133fd7Smrg postinstall_cmds='chmod +x $lib' 2604ea133fd7Smrg ;; 2605a253d6aeSmrg 2606ea133fd7Smrgsunos4*) 2607ea133fd7Smrg version_type=sunos 2608ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' 2609ea133fd7Smrg finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' 2610ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2611ea133fd7Smrg shlibpath_overrides_runpath=yes 2612ea133fd7Smrg if test "$with_gnu_ld" = yes; then 2613ea133fd7Smrg need_lib_prefix=no 2614ea133fd7Smrg fi 2615ea133fd7Smrg need_version=yes 2616ea133fd7Smrg ;; 2617a253d6aeSmrg 2618ea133fd7Smrgsysv4 | sysv4.3*) 2619ea133fd7Smrg version_type=linux 2620ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2621ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2622ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2623ea133fd7Smrg case $host_vendor in 2624ea133fd7Smrg sni) 2625ea133fd7Smrg shlibpath_overrides_runpath=no 2626ea133fd7Smrg need_lib_prefix=no 2627ea133fd7Smrg runpath_var=LD_RUN_PATH 2628ea133fd7Smrg ;; 2629ea133fd7Smrg siemens) 2630ea133fd7Smrg need_lib_prefix=no 2631ea133fd7Smrg ;; 2632ea133fd7Smrg motorola) 2633ea133fd7Smrg need_lib_prefix=no 2634ea133fd7Smrg need_version=no 2635ea133fd7Smrg shlibpath_overrides_runpath=no 2636ea133fd7Smrg sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' 2637ea133fd7Smrg ;; 2638a253d6aeSmrg esac 2639ea133fd7Smrg ;; 2640a253d6aeSmrg 2641ea133fd7Smrgsysv4*MP*) 2642ea133fd7Smrg if test -d /usr/nec ;then 2643ea133fd7Smrg version_type=linux 2644ea133fd7Smrg library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' 2645ea133fd7Smrg soname_spec='$libname${shared_ext}.$major' 2646ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2647ea133fd7Smrg fi 2648ea133fd7Smrg ;; 2649a253d6aeSmrg 2650ea133fd7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 2651ea133fd7Smrg version_type=freebsd-elf 2652ea133fd7Smrg need_lib_prefix=no 2653ea133fd7Smrg need_version=no 2654ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' 2655ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2656ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2657ea133fd7Smrg shlibpath_overrides_runpath=yes 2658ea133fd7Smrg hardcode_into_libs=yes 2659ea133fd7Smrg if test "$with_gnu_ld" = yes; then 2660ea133fd7Smrg sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' 2661ea133fd7Smrg else 2662ea133fd7Smrg sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' 2663ea133fd7Smrg case $host_os in 2664ea133fd7Smrg sco3.2v5*) 2665ea133fd7Smrg sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" 2666ea133fd7Smrg ;; 2667ea133fd7Smrg esac 2668ea133fd7Smrg fi 2669ea133fd7Smrg sys_lib_dlsearch_path_spec='/usr/lib' 2670ea133fd7Smrg ;; 2671a253d6aeSmrg 2672ea133fd7Smrgtpf*) 2673ea133fd7Smrg # TPF is a cross-target only. Preferred cross-host = GNU/Linux. 2674ea133fd7Smrg version_type=linux 2675ea133fd7Smrg need_lib_prefix=no 2676ea133fd7Smrg need_version=no 2677ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2678ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2679ea133fd7Smrg shlibpath_overrides_runpath=no 2680ea133fd7Smrg hardcode_into_libs=yes 2681ea133fd7Smrg ;; 2682a253d6aeSmrg 2683ea133fd7Smrguts4*) 2684ea133fd7Smrg version_type=linux 2685ea133fd7Smrg library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' 2686ea133fd7Smrg soname_spec='${libname}${release}${shared_ext}$major' 2687ea133fd7Smrg shlibpath_var=LD_LIBRARY_PATH 2688ea133fd7Smrg ;; 2689a253d6aeSmrg 2690ea133fd7Smrg*) 2691ea133fd7Smrg dynamic_linker=no 2692ea133fd7Smrg ;; 2693ea133fd7Smrgesac 2694ea133fd7SmrgAC_MSG_RESULT([$dynamic_linker]) 2695ea133fd7Smrgtest "$dynamic_linker" = no && can_build_shared=no 2696a253d6aeSmrg 2697ea133fd7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var" 2698ea133fd7Smrgif test "$GCC" = yes; then 2699ea133fd7Smrg variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" 2700ea133fd7Smrgfi 2701a253d6aeSmrg 2702ea133fd7Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then 2703ea133fd7Smrg sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" 2704a253d6aeSmrgfi 2705ea133fd7Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then 2706ea133fd7Smrg sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" 2707ea133fd7Smrgfi 2708ea133fd7Smrg 2709ea133fd7Smrg_LT_DECL([], [variables_saved_for_relink], [1], 2710ea133fd7Smrg [Variables whose values should be saved in libtool wrapper scripts and 2711ea133fd7Smrg restored at link time]) 2712ea133fd7Smrg_LT_DECL([], [need_lib_prefix], [0], 2713ea133fd7Smrg [Do we need the "lib" prefix for modules?]) 2714ea133fd7Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) 2715ea133fd7Smrg_LT_DECL([], [version_type], [0], [Library versioning type]) 2716ea133fd7Smrg_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) 2717ea133fd7Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) 2718ea133fd7Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0], 2719ea133fd7Smrg [Is shlibpath searched before the hard-coded library search path?]) 2720ea133fd7Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix]) 2721ea133fd7Smrg_LT_DECL([], [library_names_spec], [1], 2722ea133fd7Smrg [[List of archive names. First name is the real one, the rest are links. 2723ea133fd7Smrg The last name is the one that the linker finds with -lNAME]]) 2724ea133fd7Smrg_LT_DECL([], [soname_spec], [1], 2725ea133fd7Smrg [[The coded name of the library, if different from the real name]]) 2726ea133fd7Smrg_LT_DECL([], [postinstall_cmds], [2], 2727ea133fd7Smrg [Command to use after installation of a shared archive]) 2728ea133fd7Smrg_LT_DECL([], [postuninstall_cmds], [2], 2729ea133fd7Smrg [Command to use after uninstallation of a shared archive]) 2730ea133fd7Smrg_LT_DECL([], [finish_cmds], [2], 2731ea133fd7Smrg [Commands used to finish a libtool library installation in a directory]) 2732ea133fd7Smrg_LT_DECL([], [finish_eval], [1], 2733ea133fd7Smrg [[As "finish_cmds", except a single script fragment to be evaled but 2734ea133fd7Smrg not shown]]) 2735ea133fd7Smrg_LT_DECL([], [hardcode_into_libs], [0], 2736ea133fd7Smrg [Whether we should hardcode library paths into libraries]) 2737ea133fd7Smrg_LT_DECL([], [sys_lib_search_path_spec], [2], 2738ea133fd7Smrg [Compile-time system search path for libraries]) 2739ea133fd7Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2], 2740ea133fd7Smrg [Run-time system search path for libraries]) 2741ea133fd7Smrg])# _LT_SYS_DYNAMIC_LINKER 2742ea133fd7Smrg 2743ea133fd7Smrg 2744ea133fd7Smrg# _LT_PATH_TOOL_PREFIX(TOOL) 2745ea133fd7Smrg# -------------------------- 2746ea133fd7Smrg# find a file program which can recognize shared library 2747ea133fd7SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX], 2748ea133fd7Smrg[m4_require([_LT_DECL_EGREP])dnl 2749ea133fd7SmrgAC_MSG_CHECKING([for $1]) 2750ea133fd7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD, 2751ea133fd7Smrg[case $MAGIC_CMD in 2752ea133fd7Smrg[[\\/*] | ?:[\\/]*]) 2753ea133fd7Smrg lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. 2754ea133fd7Smrg ;; 2755ea133fd7Smrg*) 2756ea133fd7Smrg lt_save_MAGIC_CMD="$MAGIC_CMD" 2757ea133fd7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2758ea133fd7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths. 2759ea133fd7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions, 2760ea133fd7Smrgdnl not every word. This closes a longstanding sh security hole. 2761ea133fd7Smrg ac_dummy="m4_if([$2], , $PATH, [$2])" 2762ea133fd7Smrg for ac_dir in $ac_dummy; do 2763ea133fd7Smrg IFS="$lt_save_ifs" 2764ea133fd7Smrg test -z "$ac_dir" && ac_dir=. 2765ea133fd7Smrg if test -f $ac_dir/$1; then 2766ea133fd7Smrg lt_cv_path_MAGIC_CMD="$ac_dir/$1" 2767ea133fd7Smrg if test -n "$file_magic_test_file"; then 2768ea133fd7Smrg case $deplibs_check_method in 2769ea133fd7Smrg "file_magic "*) 2770ea133fd7Smrg file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` 2771ea133fd7Smrg MAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2772ea133fd7Smrg if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | 2773ea133fd7Smrg $EGREP "$file_magic_regex" > /dev/null; then 2774ea133fd7Smrg : 2775ea133fd7Smrg else 2776ea133fd7Smrg cat <<_LT_EOF 1>&2 2777a253d6aeSmrg 2778ea133fd7Smrg*** Warning: the command libtool uses to detect shared libraries, 2779ea133fd7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize. 2780ea133fd7Smrg*** The result is that libtool may fail to recognize shared libraries 2781ea133fd7Smrg*** as such. This will affect the creation of libtool libraries that 2782ea133fd7Smrg*** depend on shared libraries, but programs linked with such libtool 2783ea133fd7Smrg*** libraries will work regardless of this problem. Nevertheless, you 2784ea133fd7Smrg*** may want to report the problem to your system manager and/or to 2785ea133fd7Smrg*** bug-libtool@gnu.org 2786a253d6aeSmrg 2787ea133fd7Smrg_LT_EOF 2788ea133fd7Smrg fi ;; 2789ea133fd7Smrg esac 2790ea133fd7Smrg fi 2791ea133fd7Smrg break 2792ea133fd7Smrg fi 2793ea133fd7Smrg done 2794ea133fd7Smrg IFS="$lt_save_ifs" 2795ea133fd7Smrg MAGIC_CMD="$lt_save_MAGIC_CMD" 2796ea133fd7Smrg ;; 2797ea133fd7Smrgesac]) 2798ea133fd7SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD" 2799ea133fd7Smrgif test -n "$MAGIC_CMD"; then 2800ea133fd7Smrg AC_MSG_RESULT($MAGIC_CMD) 2801a253d6aeSmrgelse 2802ea133fd7Smrg AC_MSG_RESULT(no) 2803a253d6aeSmrgfi 2804ea133fd7Smrg_LT_DECL([], [MAGIC_CMD], [0], 2805ea133fd7Smrg [Used to examine libraries when file_magic_cmd begins with "file"])dnl 2806ea133fd7Smrg])# _LT_PATH_TOOL_PREFIX 2807a253d6aeSmrg 2808ea133fd7Smrg# Old name: 2809ea133fd7SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) 2810ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 2811ea133fd7Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) 2812a253d6aeSmrg 2813a253d6aeSmrg 2814ea133fd7Smrg# _LT_PATH_MAGIC 2815ea133fd7Smrg# -------------- 2816ea133fd7Smrg# find a file program which can recognize a shared library 2817ea133fd7Smrgm4_defun([_LT_PATH_MAGIC], 2818ea133fd7Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) 2819ea133fd7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then 2820ea133fd7Smrg if test -n "$ac_tool_prefix"; then 2821ea133fd7Smrg _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) 2822a253d6aeSmrg else 2823ea133fd7Smrg MAGIC_CMD=: 2824a253d6aeSmrg fi 2825a253d6aeSmrgfi 2826ea133fd7Smrg])# _LT_PATH_MAGIC 2827a253d6aeSmrg 2828a253d6aeSmrg 2829ea133fd7Smrg# LT_PATH_LD 2830ea133fd7Smrg# ---------- 2831ea133fd7Smrg# find the pathname to the GNU or non-GNU linker 2832ea133fd7SmrgAC_DEFUN([LT_PATH_LD], 2833ea133fd7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 2834ea133fd7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl 2835ea133fd7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl 2836ea133fd7Smrgm4_require([_LT_DECL_SED])dnl 2837ea133fd7Smrgm4_require([_LT_DECL_EGREP])dnl 2838a253d6aeSmrg 2839ea133fd7SmrgAC_ARG_WITH([gnu-ld], 2840ea133fd7Smrg [AS_HELP_STRING([--with-gnu-ld], 2841ea133fd7Smrg [assume the C compiler uses GNU ld @<:@default=no@:>@])], 2842ea133fd7Smrg [test "$withval" = no || with_gnu_ld=yes], 2843ea133fd7Smrg [with_gnu_ld=no])dnl 2844a253d6aeSmrg 2845ea133fd7Smrgac_prog=ld 2846a253d6aeSmrgif test "$GCC" = yes; then 2847ea133fd7Smrg # Check if gcc -print-prog-name=ld gives a path. 2848ea133fd7Smrg AC_MSG_CHECKING([for ld used by $CC]) 2849ea133fd7Smrg case $host in 2850ea133fd7Smrg *-*-mingw*) 2851ea133fd7Smrg # gcc leaves a trailing carriage return which upsets mingw 2852ea133fd7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 2853ea133fd7Smrg *) 2854ea133fd7Smrg ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 2855ea133fd7Smrg esac 2856ea133fd7Smrg case $ac_prog in 2857ea133fd7Smrg # Accept absolute paths. 2858ea133fd7Smrg [[\\/]]* | ?:[[\\/]]*) 2859ea133fd7Smrg re_direlt='/[[^/]][[^/]]*/\.\./' 2860ea133fd7Smrg # Canonicalize the pathname of ld 2861ea133fd7Smrg ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` 2862ea133fd7Smrg while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do 2863ea133fd7Smrg ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` 2864ea133fd7Smrg done 2865ea133fd7Smrg test -z "$LD" && LD="$ac_prog" 2866ea133fd7Smrg ;; 2867ea133fd7Smrg "") 2868ea133fd7Smrg # If it fails, then pretend we aren't using GCC. 2869ea133fd7Smrg ac_prog=ld 2870ea133fd7Smrg ;; 2871ea133fd7Smrg *) 2872ea133fd7Smrg # If it is relative, then search for the first ld in PATH. 2873ea133fd7Smrg with_gnu_ld=unknown 2874ea133fd7Smrg ;; 2875ea133fd7Smrg esac 2876ea133fd7Smrgelif test "$with_gnu_ld" = yes; then 2877ea133fd7Smrg AC_MSG_CHECKING([for GNU ld]) 2878a253d6aeSmrgelse 2879ea133fd7Smrg AC_MSG_CHECKING([for non-GNU ld]) 2880a253d6aeSmrgfi 2881ea133fd7SmrgAC_CACHE_VAL(lt_cv_path_LD, 2882ea133fd7Smrg[if test -z "$LD"; then 2883ea133fd7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 2884ea133fd7Smrg for ac_dir in $PATH; do 2885ea133fd7Smrg IFS="$lt_save_ifs" 2886ea133fd7Smrg test -z "$ac_dir" && ac_dir=. 2887ea133fd7Smrg if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 2888ea133fd7Smrg lt_cv_path_LD="$ac_dir/$ac_prog" 2889ea133fd7Smrg # Check to see if the program is GNU ld. I'd rather use --version, 2890ea133fd7Smrg # but apparently some variants of GNU ld only accept -v. 2891ea133fd7Smrg # Break only if it was the GNU/non-GNU ld that we prefer. 2892ea133fd7Smrg case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in 2893ea133fd7Smrg *GNU* | *'with BFD'*) 2894ea133fd7Smrg test "$with_gnu_ld" != no && break 2895ea133fd7Smrg ;; 2896ea133fd7Smrg *) 2897ea133fd7Smrg test "$with_gnu_ld" != yes && break 2898ea133fd7Smrg ;; 2899ea133fd7Smrg esac 2900ea133fd7Smrg fi 2901ea133fd7Smrg done 2902ea133fd7Smrg IFS="$lt_save_ifs" 2903ea133fd7Smrgelse 2904ea133fd7Smrg lt_cv_path_LD="$LD" # Let the user override the test with a path. 2905ea133fd7Smrgfi]) 2906ea133fd7SmrgLD="$lt_cv_path_LD" 2907ea133fd7Smrgif test -n "$LD"; then 2908ea133fd7Smrg AC_MSG_RESULT($LD) 2909ea133fd7Smrgelse 2910ea133fd7Smrg AC_MSG_RESULT(no) 2911ea133fd7Smrgfi 2912ea133fd7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) 2913ea133fd7Smrg_LT_PATH_LD_GNU 2914ea133fd7SmrgAC_SUBST([LD]) 2915a253d6aeSmrg 2916ea133fd7Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) 2917ea133fd7Smrg])# LT_PATH_LD 2918a253d6aeSmrg 2919ea133fd7Smrg# Old names: 2920ea133fd7SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD]) 2921ea133fd7SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD]) 2922ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 2923ea133fd7Smrgdnl AC_DEFUN([AM_PROG_LD], []) 2924ea133fd7Smrgdnl AC_DEFUN([AC_PROG_LD], []) 2925a253d6aeSmrg 2926ea133fd7Smrg 2927ea133fd7Smrg# _LT_PATH_LD_GNU 2928ea133fd7Smrg#- -------------- 2929ea133fd7Smrgm4_defun([_LT_PATH_LD_GNU], 2930ea133fd7Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld, 2931ea133fd7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v. 2932ea133fd7Smrgcase `$LD -v 2>&1 </dev/null` in 2933ea133fd7Smrg*GNU* | *'with BFD'*) 2934ea133fd7Smrg lt_cv_prog_gnu_ld=yes 2935ea133fd7Smrg ;; 2936ea133fd7Smrg*) 2937ea133fd7Smrg lt_cv_prog_gnu_ld=no 2938a253d6aeSmrg ;; 2939ea133fd7Smrgesac]) 2940ea133fd7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld 2941ea133fd7Smrg])# _LT_PATH_LD_GNU 2942a253d6aeSmrg 2943ea133fd7Smrg 2944ea133fd7Smrg# _LT_CMD_RELOAD 2945ea133fd7Smrg# -------------- 2946ea133fd7Smrg# find reload flag for linker 2947ea133fd7Smrg# -- PORTME Some linkers may need a different reload flag. 2948ea133fd7Smrgm4_defun([_LT_CMD_RELOAD], 2949ea133fd7Smrg[AC_CACHE_CHECK([for $LD option to reload object files], 2950ea133fd7Smrg lt_cv_ld_reload_flag, 2951ea133fd7Smrg [lt_cv_ld_reload_flag='-r']) 2952ea133fd7Smrgreload_flag=$lt_cv_ld_reload_flag 2953ea133fd7Smrgcase $reload_flag in 2954ea133fd7Smrg"" | " "*) ;; 2955ea133fd7Smrg*) reload_flag=" $reload_flag" ;; 2956ea133fd7Smrgesac 2957ea133fd7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs' 2958ea133fd7Smrgcase $host_os in 2959ea133fd7Smrg darwin*) 2960ea133fd7Smrg if test "$GCC" = yes; then 2961ea133fd7Smrg reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' 2962a253d6aeSmrg else 2963ea133fd7Smrg reload_cmds='$LD$reload_flag -o $output$reload_objs' 2964a253d6aeSmrg fi 2965ea133fd7Smrg ;; 2966ea133fd7Smrgesac 2967ea133fd7Smrg_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl 2968ea133fd7Smrg_LT_DECL([], [reload_cmds], [2])dnl 2969ea133fd7Smrg])# _LT_CMD_RELOAD 2970a253d6aeSmrg 2971ea133fd7Smrg 2972ea133fd7Smrg# _LT_CHECK_MAGIC_METHOD 2973ea133fd7Smrg# ---------------------- 2974ea133fd7Smrg# how to check for library dependencies 2975ea133fd7Smrg# -- PORTME fill in with the dynamic library characteristics 2976ea133fd7Smrgm4_defun([_LT_CHECK_MAGIC_METHOD], 2977ea133fd7Smrg[m4_require([_LT_DECL_EGREP]) 2978ea133fd7Smrgm4_require([_LT_DECL_OBJDUMP]) 2979ea133fd7SmrgAC_CACHE_CHECK([how to recognize dependent libraries], 2980ea133fd7Smrglt_cv_deplibs_check_method, 2981ea133fd7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD' 2982ea133fd7Smrglt_cv_file_magic_test_file= 2983ea133fd7Smrglt_cv_deplibs_check_method='unknown' 2984ea133fd7Smrg# Need to set the preceding variable on all platforms that support 2985ea133fd7Smrg# interlibrary dependencies. 2986ea133fd7Smrg# 'none' -- dependencies not supported. 2987ea133fd7Smrg# `unknown' -- same as none, but documents that we really don't know. 2988ea133fd7Smrg# 'pass_all' -- all dependencies passed with no checks. 2989ea133fd7Smrg# 'test_compile' -- check by making test program. 2990ea133fd7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path 2991ea133fd7Smrg# which responds to the $file_magic_cmd with a given extended regex. 2992ea133fd7Smrg# If you have `file' or equivalent on your system and you're not sure 2993ea133fd7Smrg# whether `pass_all' will *always* work, you probably want this one. 2994ea133fd7Smrg 2995ea133fd7Smrgcase $host_os in 2996ea133fd7Smrgaix[[4-9]]*) 2997ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 2998a253d6aeSmrg ;; 2999a253d6aeSmrg 3000a253d6aeSmrgbeos*) 3001ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3002a253d6aeSmrg ;; 3003a253d6aeSmrg 3004a253d6aeSmrgbsdi[[45]]*) 3005ea133fd7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' 3006ea133fd7Smrg lt_cv_file_magic_cmd='/usr/bin/file -L' 3007ea133fd7Smrg lt_cv_file_magic_test_file=/shlib/libc.so 3008a253d6aeSmrg ;; 3009a253d6aeSmrg 3010ea133fd7Smrgcygwin*) 3011ea133fd7Smrg # func_win32_libid is a shell function defined in ltmain.sh 3012ea133fd7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3013ea133fd7Smrg lt_cv_file_magic_cmd='func_win32_libid' 3014ea133fd7Smrg ;; 3015a253d6aeSmrg 3016ea133fd7Smrgmingw* | pw32*) 3017ea133fd7Smrg # Base MSYS/MinGW do not provide the 'file' command needed by 3018ea133fd7Smrg # func_win32_libid shell function, so use a weaker test based on 'objdump', 3019ea133fd7Smrg # unless we find 'file', for example because we are cross-compiling. 3020ea133fd7Smrg if ( file / ) >/dev/null 2>&1; then 3021ea133fd7Smrg lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' 3022ea133fd7Smrg lt_cv_file_magic_cmd='func_win32_libid' 3023ea133fd7Smrg else 3024ea133fd7Smrg lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' 3025ea133fd7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3026ea133fd7Smrg fi 3027ea133fd7Smrg ;; 3028a253d6aeSmrg 3029ea133fd7Smrgcegcc) 3030ea133fd7Smrg # use the weaker test based on 'objdump'. See mingw*. 3031ea133fd7Smrg lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' 3032ea133fd7Smrg lt_cv_file_magic_cmd='$OBJDUMP -f' 3033a253d6aeSmrg ;; 3034a253d6aeSmrg 3035a253d6aeSmrgdarwin* | rhapsody*) 3036ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3037a253d6aeSmrg ;; 3038a253d6aeSmrg 3039a253d6aeSmrgfreebsd* | dragonfly*) 3040ea133fd7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3041ea133fd7Smrg case $host_cpu in 3042ea133fd7Smrg i*86 ) 3043ea133fd7Smrg # Not sure whether the presence of OpenBSD here was a mistake. 3044ea133fd7Smrg # Let's accept both of them until this is cleared up. 3045ea133fd7Smrg lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' 3046ea133fd7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3047ea133fd7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` 3048ea133fd7Smrg ;; 3049a253d6aeSmrg esac 3050ea133fd7Smrg else 3051ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3052a253d6aeSmrg fi 3053a253d6aeSmrg ;; 3054a253d6aeSmrg 3055a253d6aeSmrggnu*) 3056ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3057a253d6aeSmrg ;; 3058a253d6aeSmrg 3059ea133fd7Smrghpux10.20* | hpux11*) 3060ea133fd7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3061a253d6aeSmrg case $host_cpu in 3062a253d6aeSmrg ia64*) 3063ea133fd7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' 3064ea133fd7Smrg lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so 3065a253d6aeSmrg ;; 3066ea133fd7Smrg hppa*64*) 3067ea133fd7Smrg [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]'] 3068ea133fd7Smrg lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl 3069ea133fd7Smrg ;; 3070ea133fd7Smrg *) 3071ea133fd7Smrg lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' 3072ea133fd7Smrg lt_cv_file_magic_test_file=/usr/lib/libc.sl 3073a253d6aeSmrg ;; 3074a253d6aeSmrg esac 3075a253d6aeSmrg ;; 3076a253d6aeSmrg 3077ea133fd7Smrginterix[[3-9]]*) 3078ea133fd7Smrg # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here 3079ea133fd7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' 3080a253d6aeSmrg ;; 3081a253d6aeSmrg 3082a253d6aeSmrgirix5* | irix6* | nonstopux*) 3083ea133fd7Smrg case $LD in 3084ea133fd7Smrg *-32|*"-32 ") libmagic=32-bit;; 3085ea133fd7Smrg *-n32|*"-n32 ") libmagic=N32;; 3086ea133fd7Smrg *-64|*"-64 ") libmagic=64-bit;; 3087ea133fd7Smrg *) libmagic=never-match;; 3088a253d6aeSmrg esac 3089ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3090a253d6aeSmrg ;; 3091a253d6aeSmrg 3092a253d6aeSmrg# This must be Linux ELF. 3093ea133fd7Smrglinux* | k*bsd*-gnu) 3094ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3095ea133fd7Smrg ;; 3096a253d6aeSmrg 3097ea133fd7Smrgnetbsd*) 3098ea133fd7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then 3099ea133fd7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3100ea133fd7Smrg else 3101ea133fd7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' 3102a253d6aeSmrg fi 3103ea133fd7Smrg ;; 3104a253d6aeSmrg 3105ea133fd7Smrgnewos6*) 3106ea133fd7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' 3107ea133fd7Smrg lt_cv_file_magic_cmd=/usr/bin/file 3108ea133fd7Smrg lt_cv_file_magic_test_file=/usr/lib/libnls.so 3109a253d6aeSmrg ;; 3110a253d6aeSmrg 3111ea133fd7Smrg*nto* | *qnx*) 3112ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3113a253d6aeSmrg ;; 3114a253d6aeSmrg 3115a253d6aeSmrgopenbsd*) 3116ea133fd7Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 3117ea133fd7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' 3118a253d6aeSmrg else 3119ea133fd7Smrg lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' 3120a253d6aeSmrg fi 3121a253d6aeSmrg ;; 3122a253d6aeSmrg 3123ea133fd7Smrgosf3* | osf4* | osf5*) 3124ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3125a253d6aeSmrg ;; 3126a253d6aeSmrg 3127ea133fd7Smrgrdos*) 3128ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3129a253d6aeSmrg ;; 3130a253d6aeSmrg 3131a253d6aeSmrgsolaris*) 3132ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3133a253d6aeSmrg ;; 3134a253d6aeSmrg 3135ea133fd7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) 3136ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3137a253d6aeSmrg ;; 3138a253d6aeSmrg 3139a253d6aeSmrgsysv4 | sysv4.3*) 3140a253d6aeSmrg case $host_vendor in 3141ea133fd7Smrg motorola) 3142ea133fd7Smrg 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]]' 3143ea133fd7Smrg lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` 3144ea133fd7Smrg ;; 3145ea133fd7Smrg ncr) 3146ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3147ea133fd7Smrg ;; 3148ea133fd7Smrg sequent) 3149ea133fd7Smrg lt_cv_file_magic_cmd='/bin/file' 3150ea133fd7Smrg lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' 3151ea133fd7Smrg ;; 3152ea133fd7Smrg sni) 3153ea133fd7Smrg lt_cv_file_magic_cmd='/bin/file' 3154ea133fd7Smrg lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" 3155ea133fd7Smrg lt_cv_file_magic_test_file=/lib/libc.so 3156ea133fd7Smrg ;; 3157ea133fd7Smrg siemens) 3158ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3159ea133fd7Smrg ;; 3160ea133fd7Smrg pc) 3161ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3162ea133fd7Smrg ;; 3163a253d6aeSmrg esac 3164a253d6aeSmrg ;; 3165a253d6aeSmrg 3166ea133fd7Smrgtpf*) 3167ea133fd7Smrg lt_cv_deplibs_check_method=pass_all 3168a253d6aeSmrg ;; 3169ea133fd7Smrgesac 3170ea133fd7Smrg]) 3171ea133fd7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd 3172ea133fd7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method 3173ea133fd7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown 3174a253d6aeSmrg 3175ea133fd7Smrg_LT_DECL([], [deplibs_check_method], [1], 3176ea133fd7Smrg [Method to check whether dependent libraries are shared objects]) 3177ea133fd7Smrg_LT_DECL([], [file_magic_cmd], [1], 3178ea133fd7Smrg [Command to use when deplibs_check_method == "file_magic"]) 3179ea133fd7Smrg])# _LT_CHECK_MAGIC_METHOD 3180ea133fd7Smrg 3181ea133fd7Smrg 3182ea133fd7Smrg# LT_PATH_NM 3183ea133fd7Smrg# ---------- 3184ea133fd7Smrg# find the pathname to a BSD- or MS-compatible name lister 3185ea133fd7SmrgAC_DEFUN([LT_PATH_NM], 3186ea133fd7Smrg[AC_REQUIRE([AC_PROG_CC])dnl 3187ea133fd7SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, 3188ea133fd7Smrg[if test -n "$NM"; then 3189ea133fd7Smrg # Let the user override the test. 3190ea133fd7Smrg lt_cv_path_NM="$NM" 3191ea133fd7Smrgelse 3192ea133fd7Smrg lt_nm_to_check="${ac_tool_prefix}nm" 3193ea133fd7Smrg if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 3194ea133fd7Smrg lt_nm_to_check="$lt_nm_to_check nm" 3195a253d6aeSmrg fi 3196ea133fd7Smrg for lt_tmp_nm in $lt_nm_to_check; do 3197ea133fd7Smrg lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 3198ea133fd7Smrg for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do 3199ea133fd7Smrg IFS="$lt_save_ifs" 3200ea133fd7Smrg test -z "$ac_dir" && ac_dir=. 3201ea133fd7Smrg tmp_nm="$ac_dir/$lt_tmp_nm" 3202ea133fd7Smrg if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then 3203ea133fd7Smrg # Check to see if the nm accepts a BSD-compat flag. 3204ea133fd7Smrg # Adding the `sed 1q' prevents false positives on HP-UX, which says: 3205ea133fd7Smrg # nm: unknown option "B" ignored 3206ea133fd7Smrg # Tru64's nm complains that /dev/null is an invalid object file 3207ea133fd7Smrg case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in 3208ea133fd7Smrg */dev/null* | *'Invalid file or object type'*) 3209ea133fd7Smrg lt_cv_path_NM="$tmp_nm -B" 3210ea133fd7Smrg break 3211ea133fd7Smrg ;; 3212ea133fd7Smrg *) 3213ea133fd7Smrg case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in 3214ea133fd7Smrg */dev/null*) 3215ea133fd7Smrg lt_cv_path_NM="$tmp_nm -p" 3216ea133fd7Smrg break 3217ea133fd7Smrg ;; 3218ea133fd7Smrg *) 3219ea133fd7Smrg lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but 3220ea133fd7Smrg continue # so that we can try to find one that supports BSD flags 3221ea133fd7Smrg ;; 3222ea133fd7Smrg esac 3223ea133fd7Smrg ;; 3224ea133fd7Smrg esac 3225ea133fd7Smrg fi 3226ea133fd7Smrg done 3227ea133fd7Smrg IFS="$lt_save_ifs" 3228ea133fd7Smrg done 3229ea133fd7Smrg : ${lt_cv_path_NM=no} 3230ea133fd7Smrgfi]) 3231ea133fd7Smrgif test "$lt_cv_path_NM" != "no"; then 3232ea133fd7Smrg NM="$lt_cv_path_NM" 3233ea133fd7Smrgelse 3234ea133fd7Smrg # Didn't find any BSD compatible name lister, look for dumpbin. 3235ea133fd7Smrg AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) 3236ea133fd7Smrg AC_SUBST([DUMPBIN]) 3237ea133fd7Smrg if test "$DUMPBIN" != ":"; then 3238ea133fd7Smrg NM="$DUMPBIN" 3239ea133fd7Smrg fi 3240ea133fd7Smrgfi 3241ea133fd7Smrgtest -z "$NM" && NM=nm 3242ea133fd7SmrgAC_SUBST([NM]) 3243ea133fd7Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl 3244ea133fd7Smrg 3245ea133fd7SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], 3246ea133fd7Smrg [lt_cv_nm_interface="BSD nm" 3247ea133fd7Smrg echo "int some_variable = 0;" > conftest.$ac_ext 3248ea133fd7Smrg (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) 3249ea133fd7Smrg (eval "$ac_compile" 2>conftest.err) 3250ea133fd7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3251ea133fd7Smrg (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) 3252ea133fd7Smrg (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) 3253ea133fd7Smrg cat conftest.err >&AS_MESSAGE_LOG_FD 3254ea133fd7Smrg (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) 3255ea133fd7Smrg cat conftest.out >&AS_MESSAGE_LOG_FD 3256ea133fd7Smrg if $GREP 'External.*some_variable' conftest.out > /dev/null; then 3257ea133fd7Smrg lt_cv_nm_interface="MS dumpbin" 3258ea133fd7Smrg fi 3259ea133fd7Smrg rm -f conftest*]) 3260ea133fd7Smrg])# LT_PATH_NM 3261ea133fd7Smrg 3262ea133fd7Smrg# Old names: 3263ea133fd7SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) 3264ea133fd7SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) 3265ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 3266ea133fd7Smrgdnl AC_DEFUN([AM_PROG_NM], []) 3267ea133fd7Smrgdnl AC_DEFUN([AC_PROG_NM], []) 3268a253d6aeSmrg 3269a253d6aeSmrg 3270ea133fd7Smrg# LT_LIB_M 3271ea133fd7Smrg# -------- 3272ea133fd7Smrg# check for math library 3273ea133fd7SmrgAC_DEFUN([LT_LIB_M], 3274ea133fd7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3275ea133fd7SmrgLIBM= 3276ea133fd7Smrgcase $host in 3277ea133fd7Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) 3278ea133fd7Smrg # These system don't have libm, or don't need it 3279ea133fd7Smrg ;; 3280ea133fd7Smrg*-ncr-sysv4.3*) 3281ea133fd7Smrg AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") 3282ea133fd7Smrg AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") 3283ea133fd7Smrg ;; 3284a253d6aeSmrg*) 3285ea133fd7Smrg AC_CHECK_LIB(m, cos, LIBM="-lm") 3286a253d6aeSmrg ;; 3287a253d6aeSmrgesac 3288ea133fd7SmrgAC_SUBST([LIBM]) 3289ea133fd7Smrg])# LT_LIB_M 3290a253d6aeSmrg 3291ea133fd7Smrg# Old name: 3292ea133fd7SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) 3293ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 3294ea133fd7Smrgdnl AC_DEFUN([AC_CHECK_LIBM], []) 3295a253d6aeSmrg 3296a253d6aeSmrg 3297ea133fd7Smrg# _LT_COMPILER_NO_RTTI([TAGNAME]) 3298ea133fd7Smrg# ------------------------------- 3299ea133fd7Smrgm4_defun([_LT_COMPILER_NO_RTTI], 3300ea133fd7Smrg[m4_require([_LT_TAG_COMPILER])dnl 3301a253d6aeSmrg 3302ea133fd7Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 3303a253d6aeSmrg 3304ea133fd7Smrgif test "$GCC" = yes; then 3305ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 3306a253d6aeSmrg 3307ea133fd7Smrg _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], 3308ea133fd7Smrg lt_cv_prog_compiler_rtti_exceptions, 3309ea133fd7Smrg [-fno-rtti -fno-exceptions], [], 3310ea133fd7Smrg [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) 3311ea133fd7Smrgfi 3312ea133fd7Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], 3313ea133fd7Smrg [Compiler flag to turn off builtin functions]) 3314ea133fd7Smrg])# _LT_COMPILER_NO_RTTI 3315a253d6aeSmrg 3316a253d6aeSmrg 3317ea133fd7Smrg# _LT_CMD_GLOBAL_SYMBOLS 3318ea133fd7Smrg# ---------------------- 3319ea133fd7Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS], 3320ea133fd7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 3321ea133fd7SmrgAC_REQUIRE([AC_PROG_CC])dnl 3322ea133fd7SmrgAC_REQUIRE([LT_PATH_NM])dnl 3323ea133fd7SmrgAC_REQUIRE([LT_PATH_LD])dnl 3324ea133fd7Smrgm4_require([_LT_DECL_SED])dnl 3325ea133fd7Smrgm4_require([_LT_DECL_EGREP])dnl 3326ea133fd7Smrgm4_require([_LT_TAG_COMPILER])dnl 3327a253d6aeSmrg 3328ea133fd7Smrg# Check for command to grab the raw symbol name followed by C symbol from nm. 3329ea133fd7SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object]) 3330ea133fd7SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], 3331ea133fd7Smrg[ 3332ea133fd7Smrg# These are sane defaults that work on at least a few old systems. 3333ea133fd7Smrg# [They come from Ultrix. What could be older than Ultrix?!! ;)] 3334a253d6aeSmrg 3335ea133fd7Smrg# Character class describing NM global symbol codes. 3336ea133fd7Smrgsymcode='[[BCDEGRST]]' 3337a253d6aeSmrg 3338ea133fd7Smrg# Regexp to match symbols that can be accessed directly from C. 3339ea133fd7Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' 3340a253d6aeSmrg 3341ea133fd7Smrg# Define system-specific variables. 3342ea133fd7Smrgcase $host_os in 3343ea133fd7Smrgaix*) 3344ea133fd7Smrg symcode='[[BCDT]]' 3345ea133fd7Smrg ;; 3346ea133fd7Smrgcygwin* | mingw* | pw32* | cegcc*) 3347ea133fd7Smrg symcode='[[ABCDGISTW]]' 3348ea133fd7Smrg ;; 3349ea133fd7Smrghpux*) 3350ea133fd7Smrg if test "$host_cpu" = ia64; then 3351ea133fd7Smrg symcode='[[ABCDEGRST]]' 3352ea133fd7Smrg fi 3353ea133fd7Smrg ;; 3354ea133fd7Smrgirix* | nonstopux*) 3355ea133fd7Smrg symcode='[[BCDEGRST]]' 3356ea133fd7Smrg ;; 3357ea133fd7Smrgosf*) 3358ea133fd7Smrg symcode='[[BCDEGQRST]]' 3359ea133fd7Smrg ;; 3360ea133fd7Smrgsolaris*) 3361ea133fd7Smrg symcode='[[BDRT]]' 3362ea133fd7Smrg ;; 3363ea133fd7Smrgsco3.2v5*) 3364ea133fd7Smrg symcode='[[DT]]' 3365ea133fd7Smrg ;; 3366ea133fd7Smrgsysv4.2uw2*) 3367ea133fd7Smrg symcode='[[DT]]' 3368ea133fd7Smrg ;; 3369ea133fd7Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*) 3370ea133fd7Smrg symcode='[[ABDT]]' 3371ea133fd7Smrg ;; 3372ea133fd7Smrgsysv4) 3373ea133fd7Smrg symcode='[[DFNSTU]]' 3374ea133fd7Smrg ;; 3375ea133fd7Smrgesac 3376a253d6aeSmrg 3377ea133fd7Smrg# If we're using GNU nm, then use its standard symbol codes. 3378ea133fd7Smrgcase `$NM -V 2>&1` in 3379ea133fd7Smrg*GNU* | *'with BFD'*) 3380ea133fd7Smrg symcode='[[ABCDGIRSTW]]' ;; 3381ea133fd7Smrgesac 3382a253d6aeSmrg 3383ea133fd7Smrg# Transform an extracted symbol line into a proper C declaration. 3384ea133fd7Smrg# Some systems (esp. on ia64) link data and code symbols differently, 3385ea133fd7Smrg# so use this general approach. 3386ea133fd7Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" 3387a253d6aeSmrg 3388ea133fd7Smrg# Transform an extracted symbol line into symbol name and symbol address 3389ea133fd7Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" 3390ea133fd7Smrglt_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'" 3391a253d6aeSmrg 3392ea133fd7Smrg# Handle CRLF in mingw tool chain 3393ea133fd7Smrgopt_cr= 3394ea133fd7Smrgcase $build_os in 3395ea133fd7Smrgmingw*) 3396ea133fd7Smrg opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp 3397ea133fd7Smrg ;; 3398ea133fd7Smrgesac 3399a253d6aeSmrg 3400ea133fd7Smrg# Try without a prefix underscore, then with it. 3401ea133fd7Smrgfor ac_symprfx in "" "_"; do 3402a253d6aeSmrg 3403ea133fd7Smrg # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. 3404ea133fd7Smrg symxfrm="\\1 $ac_symprfx\\2 \\2" 3405a253d6aeSmrg 3406ea133fd7Smrg # Write the raw and C identifiers. 3407ea133fd7Smrg if test "$lt_cv_nm_interface" = "MS dumpbin"; then 3408ea133fd7Smrg # Fake it for dumpbin and say T for any non-static function 3409ea133fd7Smrg # and D for any global variable. 3410ea133fd7Smrg # Also find C++ and __fastcall symbols from MSVC++, 3411ea133fd7Smrg # which start with @ or ?. 3412ea133fd7Smrg lt_cv_sys_global_symbol_pipe="$AWK ['"\ 3413ea133fd7Smrg" {last_section=section; section=\$ 3};"\ 3414ea133fd7Smrg" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ 3415ea133fd7Smrg" \$ 0!~/External *\|/{next};"\ 3416ea133fd7Smrg" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ 3417ea133fd7Smrg" {if(hide[section]) next};"\ 3418ea133fd7Smrg" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ 3419ea133fd7Smrg" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ 3420ea133fd7Smrg" s[1]~/^[@?]/{print s[1], s[1]; next};"\ 3421ea133fd7Smrg" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ 3422ea133fd7Smrg" ' prfx=^$ac_symprfx]" 3423ea133fd7Smrg else 3424ea133fd7Smrg lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" 3425ea133fd7Smrg fi 3426a253d6aeSmrg 3427ea133fd7Smrg # Check to see that the pipe works correctly. 3428ea133fd7Smrg pipe_works=no 3429a253d6aeSmrg 3430ea133fd7Smrg rm -f conftest* 3431ea133fd7Smrg cat > conftest.$ac_ext <<_LT_EOF 3432ea133fd7Smrg#ifdef __cplusplus 3433ea133fd7Smrgextern "C" { 3434ea133fd7Smrg#endif 3435ea133fd7Smrgchar nm_test_var; 3436ea133fd7Smrgvoid nm_test_func(void); 3437ea133fd7Smrgvoid nm_test_func(void){} 3438ea133fd7Smrg#ifdef __cplusplus 3439ea133fd7Smrg} 3440ea133fd7Smrg#endif 3441ea133fd7Smrgint main(){nm_test_var='a';nm_test_func();return(0);} 3442ea133fd7Smrg_LT_EOF 3443a253d6aeSmrg 3444ea133fd7Smrg if AC_TRY_EVAL(ac_compile); then 3445ea133fd7Smrg # Now try to grab the symbols. 3446ea133fd7Smrg nlist=conftest.nm 3447ea133fd7Smrg if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then 3448ea133fd7Smrg # Try sorting and uniquifying the output. 3449ea133fd7Smrg if sort "$nlist" | uniq > "$nlist"T; then 3450ea133fd7Smrg mv -f "$nlist"T "$nlist" 3451ea133fd7Smrg else 3452ea133fd7Smrg rm -f "$nlist"T 3453ea133fd7Smrg fi 3454a253d6aeSmrg 3455ea133fd7Smrg # Make sure that we snagged all the symbols we need. 3456ea133fd7Smrg if $GREP ' nm_test_var$' "$nlist" >/dev/null; then 3457ea133fd7Smrg if $GREP ' nm_test_func$' "$nlist" >/dev/null; then 3458ea133fd7Smrg cat <<_LT_EOF > conftest.$ac_ext 3459ea133fd7Smrg#ifdef __cplusplus 3460ea133fd7Smrgextern "C" { 3461ea133fd7Smrg#endif 3462a253d6aeSmrg 3463ea133fd7Smrg_LT_EOF 3464ea133fd7Smrg # Now generate the symbol file. 3465ea133fd7Smrg eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' 3466a253d6aeSmrg 3467ea133fd7Smrg cat <<_LT_EOF >> conftest.$ac_ext 3468a253d6aeSmrg 3469ea133fd7Smrg/* The mapping between symbol names and symbols. */ 3470ea133fd7Smrgconst struct { 3471ea133fd7Smrg const char *name; 3472ea133fd7Smrg void *address; 3473ea133fd7Smrg} 3474ea133fd7Smrglt__PROGRAM__LTX_preloaded_symbols[[]] = 3475ea133fd7Smrg{ 3476ea133fd7Smrg { "@PROGRAM@", (void *) 0 }, 3477ea133fd7Smrg_LT_EOF 3478ea133fd7Smrg $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext 3479ea133fd7Smrg cat <<\_LT_EOF >> conftest.$ac_ext 3480ea133fd7Smrg {0, (void *) 0} 3481ea133fd7Smrg}; 3482a253d6aeSmrg 3483ea133fd7Smrg/* This works around a problem in FreeBSD linker */ 3484ea133fd7Smrg#ifdef FREEBSD_WORKAROUND 3485ea133fd7Smrgstatic const void *lt_preloaded_setup() { 3486ea133fd7Smrg return lt__PROGRAM__LTX_preloaded_symbols; 3487ea133fd7Smrg} 3488ea133fd7Smrg#endif 3489a253d6aeSmrg 3490ea133fd7Smrg#ifdef __cplusplus 3491ea133fd7Smrg} 3492ea133fd7Smrg#endif 3493ea133fd7Smrg_LT_EOF 3494ea133fd7Smrg # Now try linking the two files. 3495ea133fd7Smrg mv conftest.$ac_objext conftstm.$ac_objext 3496ea133fd7Smrg lt_save_LIBS="$LIBS" 3497ea133fd7Smrg lt_save_CFLAGS="$CFLAGS" 3498ea133fd7Smrg LIBS="conftstm.$ac_objext" 3499ea133fd7Smrg CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" 3500ea133fd7Smrg if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then 3501ea133fd7Smrg pipe_works=yes 3502ea133fd7Smrg fi 3503ea133fd7Smrg LIBS="$lt_save_LIBS" 3504ea133fd7Smrg CFLAGS="$lt_save_CFLAGS" 3505ea133fd7Smrg else 3506ea133fd7Smrg echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD 3507a253d6aeSmrg fi 3508ea133fd7Smrg else 3509ea133fd7Smrg echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD 3510ea133fd7Smrg fi 3511ea133fd7Smrg else 3512ea133fd7Smrg echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD 3513ea133fd7Smrg fi 3514ea133fd7Smrg else 3515ea133fd7Smrg echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD 3516ea133fd7Smrg cat conftest.$ac_ext >&5 3517ea133fd7Smrg fi 3518ea133fd7Smrg rm -rf conftest* conftst* 3519a253d6aeSmrg 3520ea133fd7Smrg # Do not use the global_symbol_pipe unless it works. 3521ea133fd7Smrg if test "$pipe_works" = yes; then 3522ea133fd7Smrg break 3523ea133fd7Smrg else 3524ea133fd7Smrg lt_cv_sys_global_symbol_pipe= 3525ea133fd7Smrg fi 3526ea133fd7Smrgdone 3527ea133fd7Smrg]) 3528ea133fd7Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then 3529ea133fd7Smrg lt_cv_sys_global_symbol_to_cdecl= 3530ea133fd7Smrgfi 3531ea133fd7Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then 3532ea133fd7Smrg AC_MSG_RESULT(failed) 3533ea133fd7Smrgelse 3534ea133fd7Smrg AC_MSG_RESULT(ok) 3535ea133fd7Smrgfi 3536a253d6aeSmrg 3537ea133fd7Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], 3538ea133fd7Smrg [Take the output of nm and produce a listing of raw symbols and C names]) 3539ea133fd7Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], 3540ea133fd7Smrg [Transform the output of nm in a proper C declaration]) 3541ea133fd7Smrg_LT_DECL([global_symbol_to_c_name_address], 3542ea133fd7Smrg [lt_cv_sys_global_symbol_to_c_name_address], [1], 3543ea133fd7Smrg [Transform the output of nm in a C name address pair]) 3544ea133fd7Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix], 3545ea133fd7Smrg [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], 3546ea133fd7Smrg [Transform the output of nm in a C name address pair when lib prefix is needed]) 3547ea133fd7Smrg]) # _LT_CMD_GLOBAL_SYMBOLS 3548a253d6aeSmrg 3549a253d6aeSmrg 3550ea133fd7Smrg# _LT_COMPILER_PIC([TAGNAME]) 3551ea133fd7Smrg# --------------------------- 3552ea133fd7Smrgm4_defun([_LT_COMPILER_PIC], 3553ea133fd7Smrg[m4_require([_LT_TAG_COMPILER])dnl 3554ea133fd7Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)= 3555ea133fd7Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)= 3556ea133fd7Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)= 3557a253d6aeSmrg 3558ea133fd7SmrgAC_MSG_CHECKING([for $compiler option to produce PIC]) 3559ea133fd7Smrgm4_if([$1], [CXX], [ 3560ea133fd7Smrg # C++ specific cases for pic, static, wl, etc. 3561ea133fd7Smrg if test "$GXX" = yes; then 3562ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3563ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3564a253d6aeSmrg 3565ea133fd7Smrg case $host_os in 3566ea133fd7Smrg aix*) 3567ea133fd7Smrg # All AIX code is PIC. 3568ea133fd7Smrg if test "$host_cpu" = ia64; then 3569ea133fd7Smrg # AIX 5 now supports IA64 processor 3570ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3571a253d6aeSmrg fi 3572ea133fd7Smrg ;; 3573a253d6aeSmrg 3574ea133fd7Smrg amigaos*) 3575ea133fd7Smrg case $host_cpu in 3576ea133fd7Smrg powerpc) 3577ea133fd7Smrg # see comment about AmigaOS4 .so support 3578ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3579ea133fd7Smrg ;; 3580ea133fd7Smrg m68k) 3581ea133fd7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3582ea133fd7Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3583ea133fd7Smrg # like `-m68040'. 3584ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3585ea133fd7Smrg ;; 3586ea133fd7Smrg esac 3587ea133fd7Smrg ;; 3588a253d6aeSmrg 3589ea133fd7Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3590ea133fd7Smrg # PIC is the default for these OSes. 3591a253d6aeSmrg ;; 3592ea133fd7Smrg mingw* | cygwin* | os2* | pw32* | cegcc*) 3593ea133fd7Smrg # This hack is so that the source file can tell whether it is being 3594ea133fd7Smrg # built for inclusion in a dll (and should export symbols for example). 3595ea133fd7Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3596ea133fd7Smrg # (--disable-auto-import) libraries 3597ea133fd7Smrg m4_if([$1], [GCJ], [], 3598ea133fd7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3599ea133fd7Smrg ;; 3600ea133fd7Smrg darwin* | rhapsody*) 3601ea133fd7Smrg # PIC is the default on this platform 3602ea133fd7Smrg # Common symbols not allowed in MH_DYLIB files 3603ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3604ea133fd7Smrg ;; 3605ea133fd7Smrg *djgpp*) 3606ea133fd7Smrg # DJGPP does not support shared libraries at all 3607ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3608ea133fd7Smrg ;; 3609ea133fd7Smrg interix[[3-9]]*) 3610ea133fd7Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3611ea133fd7Smrg # Instead, we relocate shared libraries at runtime. 3612ea133fd7Smrg ;; 3613ea133fd7Smrg sysv4*MP*) 3614ea133fd7Smrg if test -d /usr/nec; then 3615ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3616ea133fd7Smrg fi 3617ea133fd7Smrg ;; 3618ea133fd7Smrg hpux*) 3619ea133fd7Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3620ea133fd7Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3621ea133fd7Smrg # sets the default TLS model and affects inlining. 3622ea133fd7Smrg case $host_cpu in 3623ea133fd7Smrg hppa*64*) 3624a253d6aeSmrg ;; 3625a253d6aeSmrg *) 3626ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3627a253d6aeSmrg ;; 3628a253d6aeSmrg esac 3629ea133fd7Smrg ;; 3630ea133fd7Smrg *qnx* | *nto*) 3631ea133fd7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3632ea133fd7Smrg # it will coredump. 3633ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3634ea133fd7Smrg ;; 3635ea133fd7Smrg *) 3636ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3637a253d6aeSmrg ;; 3638a253d6aeSmrg esac 3639a253d6aeSmrg else 3640ea133fd7Smrg case $host_os in 3641ea133fd7Smrg aix[[4-9]]*) 3642ea133fd7Smrg # All AIX code is PIC. 3643ea133fd7Smrg if test "$host_cpu" = ia64; then 3644ea133fd7Smrg # AIX 5 now supports IA64 processor 3645ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3646ea133fd7Smrg else 3647ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3648ea133fd7Smrg fi 3649ea133fd7Smrg ;; 3650ea133fd7Smrg chorus*) 3651ea133fd7Smrg case $cc_basename in 3652ea133fd7Smrg cxch68*) 3653ea133fd7Smrg # Green Hills C++ Compiler 3654ea133fd7Smrg # _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" 3655ea133fd7Smrg ;; 3656ea133fd7Smrg esac 3657ea133fd7Smrg ;; 3658ea133fd7Smrg dgux*) 3659ea133fd7Smrg case $cc_basename in 3660ea133fd7Smrg ec++*) 3661ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3662ea133fd7Smrg ;; 3663ea133fd7Smrg ghcx*) 3664ea133fd7Smrg # Green Hills C++ Compiler 3665ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3666ea133fd7Smrg ;; 3667ea133fd7Smrg *) 3668ea133fd7Smrg ;; 3669ea133fd7Smrg esac 3670ea133fd7Smrg ;; 3671ea133fd7Smrg freebsd* | dragonfly*) 3672ea133fd7Smrg # FreeBSD uses GNU C++ 3673ea133fd7Smrg ;; 3674ea133fd7Smrg hpux9* | hpux10* | hpux11*) 3675ea133fd7Smrg case $cc_basename in 3676ea133fd7Smrg CC*) 3677ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3678ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3679ea133fd7Smrg if test "$host_cpu" != ia64; then 3680ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3681ea133fd7Smrg fi 3682ea133fd7Smrg ;; 3683ea133fd7Smrg aCC*) 3684ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3685ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3686ea133fd7Smrg case $host_cpu in 3687ea133fd7Smrg hppa*64*|ia64*) 3688ea133fd7Smrg # +Z the default 3689ea133fd7Smrg ;; 3690ea133fd7Smrg *) 3691ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3692ea133fd7Smrg ;; 3693ea133fd7Smrg esac 3694ea133fd7Smrg ;; 3695ea133fd7Smrg *) 3696ea133fd7Smrg ;; 3697ea133fd7Smrg esac 3698ea133fd7Smrg ;; 3699ea133fd7Smrg interix*) 3700ea133fd7Smrg # This is c89, which is MS Visual C++ (no shared libs) 3701ea133fd7Smrg # Anyone wants to do a port? 3702ea133fd7Smrg ;; 3703ea133fd7Smrg irix5* | irix6* | nonstopux*) 3704ea133fd7Smrg case $cc_basename in 3705ea133fd7Smrg CC*) 3706ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3707ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3708ea133fd7Smrg # CC pic flag -KPIC is the default. 3709ea133fd7Smrg ;; 3710ea133fd7Smrg *) 3711ea133fd7Smrg ;; 3712ea133fd7Smrg esac 3713ea133fd7Smrg ;; 3714ea133fd7Smrg linux* | k*bsd*-gnu) 3715ea133fd7Smrg case $cc_basename in 3716ea133fd7Smrg KCC*) 3717ea133fd7Smrg # KAI C++ Compiler 3718ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3719ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3720ea133fd7Smrg ;; 3721ea133fd7Smrg ecpc* ) 3722ea133fd7Smrg # old Intel C++ for x86_64 which still supported -KPIC. 3723ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3724ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3725ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3726ea133fd7Smrg ;; 3727ea133fd7Smrg icpc* ) 3728ea133fd7Smrg # Intel C++, used to be incompatible with GCC. 3729ea133fd7Smrg # ICC 10 doesn't accept -KPIC any more. 3730ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3731ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3732ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3733ea133fd7Smrg ;; 3734ea133fd7Smrg pgCC* | pgcpp*) 3735ea133fd7Smrg # Portland Group C++ compiler 3736ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3737ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 3738ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3739ea133fd7Smrg ;; 3740ea133fd7Smrg cxx*) 3741ea133fd7Smrg # Compaq C++ 3742ea133fd7Smrg # Make sure the PIC flag is empty. It appears that all Alpha 3743ea133fd7Smrg # Linux and Compaq Tru64 Unix objects are PIC. 3744ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3745ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3746ea133fd7Smrg ;; 3747ea133fd7Smrg xlc* | xlC*) 3748ea133fd7Smrg # IBM XL 8.0 on PPC 3749ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3750ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 3751ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 3752ea133fd7Smrg ;; 3753ea133fd7Smrg *) 3754ea133fd7Smrg case `$CC -V 2>&1 | sed 5q` in 3755ea133fd7Smrg *Sun\ C*) 3756ea133fd7Smrg # Sun C++ 5.9 3757ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3758ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3759ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3760ea133fd7Smrg ;; 3761ea133fd7Smrg esac 3762ea133fd7Smrg ;; 3763ea133fd7Smrg esac 3764ea133fd7Smrg ;; 3765ea133fd7Smrg lynxos*) 3766ea133fd7Smrg ;; 3767ea133fd7Smrg m88k*) 3768ea133fd7Smrg ;; 3769ea133fd7Smrg mvs*) 3770ea133fd7Smrg case $cc_basename in 3771ea133fd7Smrg cxx*) 3772ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' 3773ea133fd7Smrg ;; 3774ea133fd7Smrg *) 3775ea133fd7Smrg ;; 3776ea133fd7Smrg esac 3777ea133fd7Smrg ;; 3778ea133fd7Smrg netbsd*) 3779ea133fd7Smrg ;; 3780ea133fd7Smrg *qnx* | *nto*) 3781ea133fd7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3782ea133fd7Smrg # it will coredump. 3783ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3784ea133fd7Smrg ;; 3785ea133fd7Smrg osf3* | osf4* | osf5*) 3786ea133fd7Smrg case $cc_basename in 3787ea133fd7Smrg KCC*) 3788ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' 3789ea133fd7Smrg ;; 3790ea133fd7Smrg RCC*) 3791ea133fd7Smrg # Rational C++ 2.4.1 3792ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3793ea133fd7Smrg ;; 3794ea133fd7Smrg cxx*) 3795ea133fd7Smrg # Digital/Compaq C++ 3796ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3797ea133fd7Smrg # Make sure the PIC flag is empty. It appears that all Alpha 3798ea133fd7Smrg # Linux and Compaq Tru64 Unix objects are PIC. 3799ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 3800ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3801ea133fd7Smrg ;; 3802ea133fd7Smrg *) 3803ea133fd7Smrg ;; 3804ea133fd7Smrg esac 3805ea133fd7Smrg ;; 3806ea133fd7Smrg psos*) 3807ea133fd7Smrg ;; 3808ea133fd7Smrg solaris*) 3809ea133fd7Smrg case $cc_basename in 3810ea133fd7Smrg CC*) 3811ea133fd7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 3812ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3813ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3814ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 3815ea133fd7Smrg ;; 3816ea133fd7Smrg gcx*) 3817ea133fd7Smrg # Green Hills C++ Compiler 3818ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 3819ea133fd7Smrg ;; 3820ea133fd7Smrg *) 3821ea133fd7Smrg ;; 3822ea133fd7Smrg esac 3823ea133fd7Smrg ;; 3824ea133fd7Smrg sunos4*) 3825ea133fd7Smrg case $cc_basename in 3826ea133fd7Smrg CC*) 3827ea133fd7Smrg # Sun C++ 4.x 3828ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3829ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3830ea133fd7Smrg ;; 3831ea133fd7Smrg lcc*) 3832ea133fd7Smrg # Lucid 3833ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 3834ea133fd7Smrg ;; 3835ea133fd7Smrg *) 3836ea133fd7Smrg ;; 3837ea133fd7Smrg esac 3838ea133fd7Smrg ;; 3839ea133fd7Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 3840ea133fd7Smrg case $cc_basename in 3841ea133fd7Smrg CC*) 3842ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3843ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3844ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3845ea133fd7Smrg ;; 3846ea133fd7Smrg esac 3847ea133fd7Smrg ;; 3848ea133fd7Smrg tandem*) 3849ea133fd7Smrg case $cc_basename in 3850ea133fd7Smrg NCC*) 3851ea133fd7Smrg # NonStop-UX NCC 3.20 3852ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 3853ea133fd7Smrg ;; 3854ea133fd7Smrg *) 3855ea133fd7Smrg ;; 3856ea133fd7Smrg esac 3857ea133fd7Smrg ;; 3858ea133fd7Smrg vxworks*) 3859ea133fd7Smrg ;; 3860ea133fd7Smrg *) 3861ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3862ea133fd7Smrg ;; 3863ea133fd7Smrg esac 3864ea133fd7Smrg fi 3865ea133fd7Smrg], 3866ea133fd7Smrg[ 3867ea133fd7Smrg if test "$GCC" = yes; then 3868ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3869ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 3870a253d6aeSmrg 3871ea133fd7Smrg case $host_os in 3872ea133fd7Smrg aix*) 3873ea133fd7Smrg # All AIX code is PIC. 3874ea133fd7Smrg if test "$host_cpu" = ia64; then 3875ea133fd7Smrg # AIX 5 now supports IA64 processor 3876ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3877ea133fd7Smrg fi 3878ea133fd7Smrg ;; 3879a253d6aeSmrg 3880ea133fd7Smrg amigaos*) 3881ea133fd7Smrg case $host_cpu in 3882ea133fd7Smrg powerpc) 3883ea133fd7Smrg # see comment about AmigaOS4 .so support 3884ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3885ea133fd7Smrg ;; 3886ea133fd7Smrg m68k) 3887ea133fd7Smrg # FIXME: we need at least 68020 code to build shared libraries, but 3888ea133fd7Smrg # adding the `-m68020' flag to GCC prevents building anything better, 3889ea133fd7Smrg # like `-m68040'. 3890ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' 3891ea133fd7Smrg ;; 3892ea133fd7Smrg esac 3893ea133fd7Smrg ;; 3894a253d6aeSmrg 3895ea133fd7Smrg beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) 3896ea133fd7Smrg # PIC is the default for these OSes. 3897ea133fd7Smrg ;; 3898a253d6aeSmrg 3899ea133fd7Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3900ea133fd7Smrg # This hack is so that the source file can tell whether it is being 3901ea133fd7Smrg # built for inclusion in a dll (and should export symbols for example). 3902ea133fd7Smrg # Although the cygwin gcc ignores -fPIC, still need this for old-style 3903ea133fd7Smrg # (--disable-auto-import) libraries 3904ea133fd7Smrg m4_if([$1], [GCJ], [], 3905ea133fd7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3906ea133fd7Smrg ;; 3907a253d6aeSmrg 3908ea133fd7Smrg darwin* | rhapsody*) 3909ea133fd7Smrg # PIC is the default on this platform 3910ea133fd7Smrg # Common symbols not allowed in MH_DYLIB files 3911ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' 3912ea133fd7Smrg ;; 3913a253d6aeSmrg 3914ea133fd7Smrg hpux*) 3915ea133fd7Smrg # PIC is the default for 64-bit PA HP-UX, but not for 32-bit 3916ea133fd7Smrg # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag 3917ea133fd7Smrg # sets the default TLS model and affects inlining. 3918ea133fd7Smrg case $host_cpu in 3919ea133fd7Smrg hppa*64*) 3920ea133fd7Smrg # +Z the default 3921ea133fd7Smrg ;; 3922ea133fd7Smrg *) 3923ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3924ea133fd7Smrg ;; 3925ea133fd7Smrg esac 3926ea133fd7Smrg ;; 3927a253d6aeSmrg 3928ea133fd7Smrg interix[[3-9]]*) 3929ea133fd7Smrg # Interix 3.x gcc -fpic/-fPIC options generate broken code. 3930ea133fd7Smrg # Instead, we relocate shared libraries at runtime. 3931ea133fd7Smrg ;; 3932a253d6aeSmrg 3933ea133fd7Smrg msdosdjgpp*) 3934ea133fd7Smrg # Just because we use GCC doesn't mean we suddenly get shared libraries 3935ea133fd7Smrg # on systems that don't support them. 3936ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 3937ea133fd7Smrg enable_shared=no 3938ea133fd7Smrg ;; 3939a253d6aeSmrg 3940ea133fd7Smrg *nto* | *qnx*) 3941ea133fd7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 3942ea133fd7Smrg # it will coredump. 3943ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 3944ea133fd7Smrg ;; 3945a253d6aeSmrg 3946ea133fd7Smrg sysv4*MP*) 3947ea133fd7Smrg if test -d /usr/nec; then 3948ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic 3949a253d6aeSmrg fi 3950ea133fd7Smrg ;; 3951a253d6aeSmrg 3952ea133fd7Smrg *) 3953ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 3954ea133fd7Smrg ;; 3955ea133fd7Smrg esac 3956a253d6aeSmrg else 3957ea133fd7Smrg # PORTME Check for flag to pass linker flags through the system compiler. 3958ea133fd7Smrg case $host_os in 3959ea133fd7Smrg aix*) 3960ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3961ea133fd7Smrg if test "$host_cpu" = ia64; then 3962ea133fd7Smrg # AIX 5 now supports IA64 processor 3963ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 3964ea133fd7Smrg else 3965ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' 3966ea133fd7Smrg fi 3967ea133fd7Smrg ;; 3968a253d6aeSmrg 3969ea133fd7Smrg mingw* | cygwin* | pw32* | os2* | cegcc*) 3970ea133fd7Smrg # This hack is so that the source file can tell whether it is being 3971ea133fd7Smrg # built for inclusion in a dll (and should export symbols for example). 3972ea133fd7Smrg m4_if([$1], [GCJ], [], 3973ea133fd7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) 3974ea133fd7Smrg ;; 3975a253d6aeSmrg 3976ea133fd7Smrg hpux9* | hpux10* | hpux11*) 3977ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3978ea133fd7Smrg # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but 3979ea133fd7Smrg # not for PA HP-UX. 3980ea133fd7Smrg case $host_cpu in 3981ea133fd7Smrg hppa*64*|ia64*) 3982ea133fd7Smrg # +Z the default 3983ea133fd7Smrg ;; 3984ea133fd7Smrg *) 3985ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' 3986ea133fd7Smrg ;; 3987ea133fd7Smrg esac 3988ea133fd7Smrg # Is there a better lt_prog_compiler_static that works with the bundled CC? 3989ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' 3990ea133fd7Smrg ;; 3991a253d6aeSmrg 3992ea133fd7Smrg irix5* | irix6* | nonstopux*) 3993ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 3994ea133fd7Smrg # PIC (with -KPIC) is the default. 3995ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 3996ea133fd7Smrg ;; 3997a253d6aeSmrg 3998ea133fd7Smrg linux* | k*bsd*-gnu) 3999ea133fd7Smrg case $cc_basename in 4000ea133fd7Smrg # old Intel for x86_64 which still supported -KPIC. 4001ea133fd7Smrg ecc*) 4002ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4003ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4004ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4005ea133fd7Smrg ;; 4006ea133fd7Smrg # icc used to be incompatible with GCC. 4007ea133fd7Smrg # ICC 10 doesn't accept -KPIC any more. 4008ea133fd7Smrg icc* | ifort*) 4009ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4010ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' 4011ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' 4012ea133fd7Smrg ;; 4013ea133fd7Smrg # Lahey Fortran 8.1. 4014ea133fd7Smrg lf95*) 4015ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4016ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' 4017ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' 4018ea133fd7Smrg ;; 4019ea133fd7Smrg pgcc* | pgf77* | pgf90* | pgf95*) 4020ea133fd7Smrg # Portland Group compilers (*not* the Pentium gcc compiler, 4021ea133fd7Smrg # which looks to be a dead project) 4022ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4023ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' 4024ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4025ea133fd7Smrg ;; 4026ea133fd7Smrg ccc*) 4027ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4028ea133fd7Smrg # All Alpha code is PIC. 4029ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4030ea133fd7Smrg ;; 4031ea133fd7Smrg xl*) 4032ea133fd7Smrg # IBM XL C 8.0/Fortran 10.1 on PPC 4033ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4034ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' 4035ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' 4036ea133fd7Smrg ;; 4037ea133fd7Smrg *) 4038ea133fd7Smrg case `$CC -V 2>&1 | sed 5q` in 4039ea133fd7Smrg *Sun\ C*) 4040ea133fd7Smrg # Sun C 5.9 4041ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4042ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4043ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4044ea133fd7Smrg ;; 4045ea133fd7Smrg *Sun\ F*) 4046ea133fd7Smrg # Sun Fortran 8.3 passes all unrecognized flags to the linker 4047ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4048ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4049ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='' 4050ea133fd7Smrg ;; 4051ea133fd7Smrg esac 4052ea133fd7Smrg ;; 4053ea133fd7Smrg esac 4054ea133fd7Smrg ;; 4055a253d6aeSmrg 4056ea133fd7Smrg newsos6) 4057ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4058ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4059ea133fd7Smrg ;; 4060a253d6aeSmrg 4061ea133fd7Smrg *nto* | *qnx*) 4062ea133fd7Smrg # QNX uses GNU C++, but need to define -shared option too, otherwise 4063ea133fd7Smrg # it will coredump. 4064ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' 4065ea133fd7Smrg ;; 4066a253d6aeSmrg 4067ea133fd7Smrg osf3* | osf4* | osf5*) 4068ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4069ea133fd7Smrg # All OSF/1 code is PIC. 4070ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4071ea133fd7Smrg ;; 4072a253d6aeSmrg 4073ea133fd7Smrg rdos*) 4074ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' 4075ea133fd7Smrg ;; 4076a253d6aeSmrg 4077ea133fd7Smrg solaris*) 4078ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4079ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4080ea133fd7Smrg case $cc_basename in 4081ea133fd7Smrg f77* | f90* | f95*) 4082ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; 4083ea133fd7Smrg *) 4084ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; 4085ea133fd7Smrg esac 4086ea133fd7Smrg ;; 4087a253d6aeSmrg 4088ea133fd7Smrg sunos4*) 4089ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' 4090ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' 4091ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4092ea133fd7Smrg ;; 4093a253d6aeSmrg 4094ea133fd7Smrg sysv4 | sysv4.2uw2* | sysv4.3*) 4095ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4096ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4097ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4098ea133fd7Smrg ;; 4099a253d6aeSmrg 4100ea133fd7Smrg sysv4*MP*) 4101ea133fd7Smrg if test -d /usr/nec ;then 4102ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' 4103ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4104ea133fd7Smrg fi 4105ea133fd7Smrg ;; 4106a253d6aeSmrg 4107ea133fd7Smrg sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) 4108ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4109ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' 4110ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4111ea133fd7Smrg ;; 4112a253d6aeSmrg 4113ea133fd7Smrg unicos*) 4114ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' 4115ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4116ea133fd7Smrg ;; 4117a253d6aeSmrg 4118ea133fd7Smrg uts4*) 4119ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' 4120ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' 4121ea133fd7Smrg ;; 4122a253d6aeSmrg 4123ea133fd7Smrg *) 4124ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no 4125ea133fd7Smrg ;; 4126ea133fd7Smrg esac 4127a253d6aeSmrg fi 4128ea133fd7Smrg]) 4129ea133fd7Smrgcase $host_os in 4130ea133fd7Smrg # For platforms which do not support PIC, -DPIC is meaningless: 4131ea133fd7Smrg *djgpp*) 4132ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)= 4133ea133fd7Smrg ;; 4134ea133fd7Smrg *) 4135ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" 4136a253d6aeSmrg ;; 4137a253d6aeSmrgesac 4138ea133fd7SmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) 4139ea133fd7Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], 4140ea133fd7Smrg [How to pass a linker flag through the compiler]) 4141a253d6aeSmrg 4142ea133fd7Smrg# 4143ea133fd7Smrg# Check to make sure the PIC flag actually works. 4144ea133fd7Smrg# 4145ea133fd7Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then 4146ea133fd7Smrg _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], 4147ea133fd7Smrg [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], 4148ea133fd7Smrg [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], 4149ea133fd7Smrg [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in 4150ea133fd7Smrg "" | " "*) ;; 4151ea133fd7Smrg *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; 4152ea133fd7Smrg esac], 4153ea133fd7Smrg [_LT_TAGVAR(lt_prog_compiler_pic, $1)= 4154ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) 4155ea133fd7Smrgfi 4156ea133fd7Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], 4157ea133fd7Smrg [Additional compiler flags for building library objects]) 4158a253d6aeSmrg 4159ea133fd7Smrg# 4160ea133fd7Smrg# Check to make sure the static flag actually works. 4161ea133fd7Smrg# 4162ea133fd7Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" 4163ea133fd7Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], 4164ea133fd7Smrg _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), 4165ea133fd7Smrg $lt_tmp_static_flag, 4166ea133fd7Smrg [], 4167ea133fd7Smrg [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) 4168ea133fd7Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], 4169ea133fd7Smrg [Compiler flag to prevent dynamic linking]) 4170ea133fd7Smrg])# _LT_COMPILER_PIC 4171a253d6aeSmrg 4172a253d6aeSmrg 4173ea133fd7Smrg# _LT_LINKER_SHLIBS([TAGNAME]) 4174ea133fd7Smrg# ---------------------------- 4175ea133fd7Smrg# See if the linker supports building shared libraries. 4176ea133fd7Smrgm4_defun([_LT_LINKER_SHLIBS], 4177ea133fd7Smrg[AC_REQUIRE([LT_PATH_LD])dnl 4178ea133fd7SmrgAC_REQUIRE([LT_PATH_NM])dnl 4179ea133fd7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 4180ea133fd7Smrgm4_require([_LT_DECL_EGREP])dnl 4181ea133fd7Smrgm4_require([_LT_DECL_SED])dnl 4182ea133fd7Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl 4183ea133fd7Smrgm4_require([_LT_TAG_COMPILER])dnl 4184ea133fd7SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 4185ea133fd7Smrgm4_if([$1], [CXX], [ 4186ea133fd7Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4187ea133fd7Smrg case $host_os in 4188ea133fd7Smrg aix[[4-9]]*) 4189ea133fd7Smrg # If we're using GNU nm, then we don't want the "-C" option. 4190ea133fd7Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4191ea133fd7Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4192ea133fd7Smrg _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' 4193ea133fd7Smrg else 4194ea133fd7Smrg _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' 4195ea133fd7Smrg fi 4196ea133fd7Smrg ;; 4197ea133fd7Smrg pw32*) 4198ea133fd7Smrg _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" 4199ea133fd7Smrg ;; 4200ea133fd7Smrg cygwin* | mingw* | cegcc*) 4201ea133fd7Smrg _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' 4202ea133fd7Smrg ;; 4203ea133fd7Smrg *) 4204ea133fd7Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4205ea133fd7Smrg ;; 4206ea133fd7Smrg esac 4207ea133fd7Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4208ea133fd7Smrg], [ 4209ea133fd7Smrg runpath_var= 4210ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 4211ea133fd7Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4212ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)= 4213ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)= 4214ea133fd7Smrg _LT_TAGVAR(compiler_needs_object, $1)=no 4215ea133fd7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 4216ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4217ea133fd7Smrg _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' 4218ea133fd7Smrg _LT_TAGVAR(hardcode_automatic, $1)=no 4219ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4220ea133fd7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=no 4221ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4222ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 4223ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4224ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=no 4225ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 4226ea133fd7Smrg _LT_TAGVAR(inherit_rpath, $1)=no 4227ea133fd7Smrg _LT_TAGVAR(link_all_deplibs, $1)=unknown 4228ea133fd7Smrg _LT_TAGVAR(module_cmds, $1)= 4229ea133fd7Smrg _LT_TAGVAR(module_expsym_cmds, $1)= 4230ea133fd7Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)= 4231ea133fd7Smrg _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= 4232ea133fd7Smrg _LT_TAGVAR(thread_safe_flag_spec, $1)= 4233ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4234ea133fd7Smrg # include_expsyms should be a list of space-separated symbols to be *always* 4235ea133fd7Smrg # included in the symbol list 4236ea133fd7Smrg _LT_TAGVAR(include_expsyms, $1)= 4237ea133fd7Smrg # exclude_expsyms can be an extended regexp of symbols to exclude 4238ea133fd7Smrg # it will be wrapped by ` (' and `)$', so one must not match beginning or 4239ea133fd7Smrg # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', 4240ea133fd7Smrg # as well as any symbol that contains `d'. 4241ea133fd7Smrg _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] 4242ea133fd7Smrg # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out 4243ea133fd7Smrg # platforms (ab)use it in PIC code, but their linkers get confused if 4244ea133fd7Smrg # the symbol is explicitly referenced. Since portable code cannot 4245ea133fd7Smrg # rely on this symbol name, it's probably fine to never include it in 4246ea133fd7Smrg # preloaded symbol tables. 4247ea133fd7Smrg # Exclude shared library initialization/finalization symbols. 4248ea133fd7Smrgdnl Note also adjust exclude_expsyms for C++ above. 4249ea133fd7Smrg extract_expsyms_cmds= 4250a253d6aeSmrg 4251ea133fd7Smrg case $host_os in 4252ea133fd7Smrg cygwin* | mingw* | pw32* | cegcc*) 4253ea133fd7Smrg # FIXME: the MSVC++ port hasn't been tested in a loooong time 4254ea133fd7Smrg # When not using gcc, we currently assume that we are using 4255ea133fd7Smrg # Microsoft Visual C++. 4256ea133fd7Smrg if test "$GCC" != yes; then 4257ea133fd7Smrg with_gnu_ld=no 4258ea133fd7Smrg fi 4259ea133fd7Smrg ;; 4260ea133fd7Smrg interix*) 4261ea133fd7Smrg # we just hope/assume this is gcc and not c89 (= MSVC++) 4262ea133fd7Smrg with_gnu_ld=yes 4263ea133fd7Smrg ;; 4264ea133fd7Smrg openbsd*) 4265ea133fd7Smrg with_gnu_ld=no 4266ea133fd7Smrg ;; 4267ea133fd7Smrg esac 4268a253d6aeSmrg 4269ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 4270a253d6aeSmrg if test "$with_gnu_ld" = yes; then 4271a253d6aeSmrg # If archive_cmds runs LD, not CC, wlarc should be empty 4272a253d6aeSmrg wlarc='${wl}' 4273a253d6aeSmrg 4274ea133fd7Smrg # Set some defaults for GNU ld with shared library support. These 4275ea133fd7Smrg # are reset later if shared libraries are not supported. Putting them 4276ea133fd7Smrg # here allows them to be overridden if necessary. 4277ea133fd7Smrg runpath_var=LD_RUN_PATH 4278ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4279ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 4280a253d6aeSmrg # ancient GNU ld didn't support --whole-archive et. al. 4281ea133fd7Smrg if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then 4282ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 4283a253d6aeSmrg else 4284ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4285a253d6aeSmrg fi 4286ea133fd7Smrg supports_anon_versioning=no 4287ea133fd7Smrg case `$LD -v 2>&1` in 4288ea133fd7Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 4289ea133fd7Smrg *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... 4290ea133fd7Smrg *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... 4291ea133fd7Smrg *\ 2.11.*) ;; # other 2.11 versions 4292ea133fd7Smrg *) supports_anon_versioning=yes ;; 4293ea133fd7Smrg esac 4294a253d6aeSmrg 4295ea133fd7Smrg # See if GNU ld supports shared libraries. 4296ea133fd7Smrg case $host_os in 4297ea133fd7Smrg aix[[3-9]]*) 4298ea133fd7Smrg # On AIX/PPC, the GNU linker is very broken 4299ea133fd7Smrg if test "$host_cpu" != ia64; then 4300ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4301ea133fd7Smrg cat <<_LT_EOF 1>&2 4302a253d6aeSmrg 4303ea133fd7Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported 4304ea133fd7Smrg*** to be unable to reliably create shared libraries on AIX. 4305ea133fd7Smrg*** Therefore, libtool is disabling shared libraries support. If you 4306ea133fd7Smrg*** really care for shared libraries, you may want to modify your PATH 4307ea133fd7Smrg*** so that a non-GNU linker is found, and then restart. 4308a253d6aeSmrg 4309ea133fd7Smrg_LT_EOF 4310ea133fd7Smrg fi 4311ea133fd7Smrg ;; 4312ea133fd7Smrg 4313ea133fd7Smrg amigaos*) 4314ea133fd7Smrg case $host_cpu in 4315ea133fd7Smrg powerpc) 4316ea133fd7Smrg # see comment about AmigaOS4 .so support 4317ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4318ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4319ea133fd7Smrg ;; 4320ea133fd7Smrg m68k) 4321ea133fd7Smrg _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)' 4322ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4323ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4324ea133fd7Smrg ;; 4325a253d6aeSmrg esac 4326ea133fd7Smrg ;; 4327a253d6aeSmrg 4328ea133fd7Smrg beos*) 4329ea133fd7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4330ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4331ea133fd7Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 4332ea133fd7Smrg # support --undefined. This deserves some investigation. FIXME 4333ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4334ea133fd7Smrg else 4335ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4336ea133fd7Smrg fi 4337ea133fd7Smrg ;; 4338a253d6aeSmrg 4339ea133fd7Smrg cygwin* | mingw* | pw32* | cegcc*) 4340ea133fd7Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 4341ea133fd7Smrg # as there is no search path for DLLs. 4342ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4343ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4344ea133fd7Smrg _LT_TAGVAR(always_export_symbols, $1)=no 4345ea133fd7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4346ea133fd7Smrg _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' 4347ea133fd7Smrg 4348ea133fd7Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 4349ea133fd7Smrg _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' 4350ea133fd7Smrg # If the export-symbols file already is a .def file (1st line 4351ea133fd7Smrg # is EXPORTS), use it as is; otherwise, prepend... 4352ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 4353ea133fd7Smrg cp $export_symbols $output_objdir/$soname.def; 4354ea133fd7Smrg else 4355ea133fd7Smrg echo EXPORTS > $output_objdir/$soname.def; 4356ea133fd7Smrg cat $export_symbols >> $output_objdir/$soname.def; 4357ea133fd7Smrg fi~ 4358ea133fd7Smrg $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' 4359ea133fd7Smrg else 4360ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4361ea133fd7Smrg fi 4362ea133fd7Smrg ;; 4363a253d6aeSmrg 4364ea133fd7Smrg interix[[3-9]]*) 4365ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4366ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4367ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4368ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4369ea133fd7Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 4370ea133fd7Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 4371ea133fd7Smrg # default) and relocated if they conflict, which is a slow very memory 4372ea133fd7Smrg # consuming and fragmenting process. To avoid this, we pick a random, 4373ea133fd7Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 4374ea133fd7Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 4375ea133fd7Smrg _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' 4376ea133fd7Smrg _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' 4377ea133fd7Smrg ;; 4378a253d6aeSmrg 4379ea133fd7Smrg gnu* | linux* | tpf* | k*bsd*-gnu) 4380ea133fd7Smrg tmp_diet=no 4381ea133fd7Smrg if test "$host_os" = linux-dietlibc; then 4382ea133fd7Smrg case $cc_basename in 4383ea133fd7Smrg diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) 4384ea133fd7Smrg esac 4385a253d6aeSmrg fi 4386ea133fd7Smrg if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ 4387ea133fd7Smrg && test "$tmp_diet" = no 4388ea133fd7Smrg then 4389ea133fd7Smrg tmp_addflag= 4390ea133fd7Smrg tmp_sharedflag='-shared' 4391ea133fd7Smrg case $cc_basename,$host_cpu in 4392ea133fd7Smrg pgcc*) # Portland Group C compiler 4393ea133fd7Smrg _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' 4394ea133fd7Smrg tmp_addflag=' $pic_flag' 4395ea133fd7Smrg ;; 4396ea133fd7Smrg pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers 4397ea133fd7Smrg _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' 4398ea133fd7Smrg tmp_addflag=' $pic_flag -Mnomain' ;; 4399ea133fd7Smrg ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 4400ea133fd7Smrg tmp_addflag=' -i_dynamic' ;; 4401ea133fd7Smrg efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 4402ea133fd7Smrg tmp_addflag=' -i_dynamic -nofor_main' ;; 4403ea133fd7Smrg ifc* | ifort*) # Intel Fortran compiler 4404ea133fd7Smrg tmp_addflag=' -nofor_main' ;; 4405ea133fd7Smrg lf95*) # Lahey Fortran 8.1 4406ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4407ea133fd7Smrg tmp_sharedflag='--shared' ;; 4408ea133fd7Smrg xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) 4409ea133fd7Smrg tmp_sharedflag='-qmkshrobj' 4410ea133fd7Smrg tmp_addflag= ;; 4411ea133fd7Smrg esac 4412ea133fd7Smrg case `$CC -V 2>&1 | sed 5q` in 4413ea133fd7Smrg *Sun\ C*) # Sun C 5.9 4414ea133fd7Smrg _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' 4415ea133fd7Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 4416ea133fd7Smrg tmp_sharedflag='-G' ;; 4417ea133fd7Smrg *Sun\ F*) # Sun Fortran 8.3 4418ea133fd7Smrg tmp_sharedflag='-G' ;; 4419ea133fd7Smrg esac 4420ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4421ea133fd7Smrg 4422ea133fd7Smrg if test "x$supports_anon_versioning" = xyes; then 4423ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4424ea133fd7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4425ea133fd7Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4426ea133fd7Smrg $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 4427ea133fd7Smrg fi 4428ea133fd7Smrg 4429ea133fd7Smrg case $cc_basename in 4430ea133fd7Smrg xlf*) 4431ea133fd7Smrg # IBM XL Fortran 10.1 on PPC cannot create shared libs itself 4432ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' 4433ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4434ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' 4435ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' 4436ea133fd7Smrg if test "x$supports_anon_versioning" = xyes; then 4437ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 4438ea133fd7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 4439ea133fd7Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 4440ea133fd7Smrg $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' 4441ea133fd7Smrg fi 4442ea133fd7Smrg ;; 4443ea133fd7Smrg esac 4444a253d6aeSmrg else 4445ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4446a253d6aeSmrg fi 4447ea133fd7Smrg ;; 4448a253d6aeSmrg 4449ea133fd7Smrg netbsd*) 4450ea133fd7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4451ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' 4452ea133fd7Smrg wlarc= 4453a253d6aeSmrg else 4454ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4455ea133fd7Smrg _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' 4456a253d6aeSmrg fi 4457ea133fd7Smrg ;; 4458a253d6aeSmrg 4459ea133fd7Smrg solaris*) 4460ea133fd7Smrg if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then 4461ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4462ea133fd7Smrg cat <<_LT_EOF 1>&2 4463a253d6aeSmrg 4464ea133fd7Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably 4465ea133fd7Smrg*** create shared libraries on Solaris systems. Therefore, libtool 4466ea133fd7Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4467ea133fd7Smrg*** binutils to release 2.9.1 or newer. Another option is to modify 4468ea133fd7Smrg*** your PATH or compiler configuration so that the native linker is 4469ea133fd7Smrg*** used, and then restart. 4470a253d6aeSmrg 4471ea133fd7Smrg_LT_EOF 4472ea133fd7Smrg elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4473ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4474ea133fd7Smrg _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' 4475a253d6aeSmrg else 4476ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4477a253d6aeSmrg fi 4478ea133fd7Smrg ;; 4479a253d6aeSmrg 4480ea133fd7Smrg sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) 4481ea133fd7Smrg case `$LD -v 2>&1` in 4482ea133fd7Smrg *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 4483ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4484ea133fd7Smrg cat <<_LT_EOF 1>&2 4485ea133fd7Smrg 4486ea133fd7Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not 4487ea133fd7Smrg*** reliably create shared libraries on SCO systems. Therefore, libtool 4488ea133fd7Smrg*** is disabling shared libraries support. We urge you to upgrade GNU 4489ea133fd7Smrg*** binutils to release 2.16.91.0.3 or newer. Another option is to modify 4490ea133fd7Smrg*** your PATH or compiler configuration so that the native linker is 4491ea133fd7Smrg*** used, and then restart. 4492ea133fd7Smrg 4493ea133fd7Smrg_LT_EOF 4494a253d6aeSmrg ;; 4495ea133fd7Smrg *) 4496ea133fd7Smrg # For security reasons, it is highly recommended that you always 4497ea133fd7Smrg # use absolute paths for naming shared libraries, and exclude the 4498ea133fd7Smrg # DT_RUNPATH tag from executables and libraries. But doing so 4499ea133fd7Smrg # requires that you compile everything twice, which is a pain. 4500ea133fd7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4501ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4502ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4503ea133fd7Smrg _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' 4504ea133fd7Smrg else 4505ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4506ea133fd7Smrg fi 4507a253d6aeSmrg ;; 4508ea133fd7Smrg esac 4509a253d6aeSmrg ;; 4510ea133fd7Smrg 4511ea133fd7Smrg sunos4*) 4512ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4513ea133fd7Smrg wlarc= 4514ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4515ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4516a253d6aeSmrg ;; 4517ea133fd7Smrg 4518a253d6aeSmrg *) 4519ea133fd7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 4520ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4521ea133fd7Smrg _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' 4522a253d6aeSmrg else 4523ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4524a253d6aeSmrg fi 4525a253d6aeSmrg ;; 4526a253d6aeSmrg esac 4527a253d6aeSmrg 4528ea133fd7Smrg if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then 4529ea133fd7Smrg runpath_var= 4530ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 4531ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)= 4532ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 4533a253d6aeSmrg fi 4534ea133fd7Smrg else 4535ea133fd7Smrg # PORTME fill in a description of your system's linker (not GNU ld) 4536ea133fd7Smrg case $host_os in 4537ea133fd7Smrg aix3*) 4538ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4539ea133fd7Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4540ea133fd7Smrg _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' 4541ea133fd7Smrg # Note: this linker hardcodes the directories in LIBPATH if there 4542ea133fd7Smrg # are no directories specified by -L. 4543ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4544ea133fd7Smrg if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then 4545ea133fd7Smrg # Neither direct hardcoding nor static linking is supported with a 4546ea133fd7Smrg # broken collect2. 4547ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4548ea133fd7Smrg fi 4549ea133fd7Smrg ;; 4550a253d6aeSmrg 4551ea133fd7Smrg aix[[4-9]]*) 4552ea133fd7Smrg if test "$host_cpu" = ia64; then 4553ea133fd7Smrg # On IA64, the linker does run time linking by default, so we don't 4554ea133fd7Smrg # have to do anything special. 4555ea133fd7Smrg aix_use_runtimelinking=no 4556ea133fd7Smrg exp_sym_flag='-Bexport' 4557ea133fd7Smrg no_entry_flag="" 4558ea133fd7Smrg else 4559ea133fd7Smrg # If we're using GNU nm, then we don't want the "-C" option. 4560ea133fd7Smrg # -C means demangle to AIX nm, but means don't demangle with GNU nm 4561ea133fd7Smrg if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then 4562ea133fd7Smrg _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' 4563a253d6aeSmrg else 4564ea133fd7Smrg _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' 4565a253d6aeSmrg fi 4566ea133fd7Smrg aix_use_runtimelinking=no 4567ea133fd7Smrg 4568ea133fd7Smrg # Test if we are trying to use run time linking or normal 4569ea133fd7Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 4570ea133fd7Smrg # need to do runtime linking. 4571ea133fd7Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 4572ea133fd7Smrg for ld_flag in $LDFLAGS; do 4573ea133fd7Smrg if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then 4574ea133fd7Smrg aix_use_runtimelinking=yes 4575ea133fd7Smrg break 4576a253d6aeSmrg fi 4577ea133fd7Smrg done 4578a253d6aeSmrg ;; 4579a253d6aeSmrg esac 4580a253d6aeSmrg 4581ea133fd7Smrg exp_sym_flag='-bexport' 4582ea133fd7Smrg no_entry_flag='-bnoentry' 4583ea133fd7Smrg fi 4584a253d6aeSmrg 4585ea133fd7Smrg # When large executables or shared objects are built, AIX ld can 4586ea133fd7Smrg # have problems creating the table of contents. If linking a library 4587ea133fd7Smrg # or program results in "error TOC overflow" add -mminimal-toc to 4588ea133fd7Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 4589ea133fd7Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 4590a253d6aeSmrg 4591ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='' 4592ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4593ea133fd7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4594ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 4595ea133fd7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4596ea133fd7Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 4597a253d6aeSmrg 4598ea133fd7Smrg if test "$GCC" = yes; then 4599ea133fd7Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 4600ea133fd7Smrg # We only want to do this on AIX 4.2 and lower, the check 4601ea133fd7Smrg # below for broken collect2 doesn't work under 4.3+ 4602ea133fd7Smrg collect2name=`${CC} -print-prog-name=collect2` 4603ea133fd7Smrg if test -f "$collect2name" && 4604ea133fd7Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 4605ea133fd7Smrg then 4606ea133fd7Smrg # We have reworked collect2 4607ea133fd7Smrg : 4608ea133fd7Smrg else 4609ea133fd7Smrg # We have old collect2 4610ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 4611ea133fd7Smrg # It fails to find uninstalled libraries when the uninstalled 4612ea133fd7Smrg # path is not listed in the libpath. Setting hardcode_minus_L 4613ea133fd7Smrg # to unsupported forces relinking 4614ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4615ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4616ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 4617ea133fd7Smrg fi 4618ea133fd7Smrg ;; 4619ea133fd7Smrg esac 4620ea133fd7Smrg shared_flag='-shared' 4621ea133fd7Smrg if test "$aix_use_runtimelinking" = yes; then 4622ea133fd7Smrg shared_flag="$shared_flag "'${wl}-G' 4623ea133fd7Smrg fi 4624ea133fd7Smrg else 4625ea133fd7Smrg # not using gcc 4626ea133fd7Smrg if test "$host_cpu" = ia64; then 4627ea133fd7Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 4628ea133fd7Smrg # chokes on -Wl,-G. The following line is correct: 4629ea133fd7Smrg shared_flag='-G' 4630ea133fd7Smrg else 4631ea133fd7Smrg if test "$aix_use_runtimelinking" = yes; then 4632ea133fd7Smrg shared_flag='${wl}-G' 4633ea133fd7Smrg else 4634ea133fd7Smrg shared_flag='${wl}-bM:SRE' 4635ea133fd7Smrg fi 4636ea133fd7Smrg fi 4637ea133fd7Smrg fi 4638a253d6aeSmrg 4639ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 4640ea133fd7Smrg # It seems that -bexpall does not export symbols beginning with 4641ea133fd7Smrg # underscore (_), so it is better to generate a list of symbols to export. 4642ea133fd7Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 4643ea133fd7Smrg if test "$aix_use_runtimelinking" = yes; then 4644ea133fd7Smrg # Warning - without using the other runtime loading flags (-brtl), 4645ea133fd7Smrg # -berok will link without error, but may produce a broken library. 4646ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 4647ea133fd7Smrg # Determine the default libpath from the value encoded in an 4648ea133fd7Smrg # empty executable. 4649ea133fd7Smrg _LT_SYS_MODULE_PATH_AIX 4650ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4651ea133fd7Smrg _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" 4652ea133fd7Smrg else 4653ea133fd7Smrg if test "$host_cpu" = ia64; then 4654ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 4655ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 4656ea133fd7Smrg _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" 4657a253d6aeSmrg else 4658ea133fd7Smrg # Determine the default libpath from the value encoded in an 4659ea133fd7Smrg # empty executable. 4660ea133fd7Smrg _LT_SYS_MODULE_PATH_AIX 4661ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 4662ea133fd7Smrg # Warning - without using the other run time loading flags, 4663ea133fd7Smrg # -berok will link without error, but may produce a broken library. 4664ea133fd7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 4665ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 4666ea133fd7Smrg # Exported symbols can be pulled into shared objects from archives 4667ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 4668ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 4669ea133fd7Smrg # This is similar to how AIX traditionally builds its shared libraries. 4670ea133fd7Smrg _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' 4671a253d6aeSmrg fi 4672ea133fd7Smrg fi 4673ea133fd7Smrg ;; 4674a253d6aeSmrg 4675ea133fd7Smrg amigaos*) 4676ea133fd7Smrg case $host_cpu in 4677ea133fd7Smrg powerpc) 4678ea133fd7Smrg # see comment about AmigaOS4 .so support 4679ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 4680ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='' 4681ea133fd7Smrg ;; 4682ea133fd7Smrg m68k) 4683ea133fd7Smrg _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)' 4684ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4685ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4686ea133fd7Smrg ;; 4687ea133fd7Smrg esac 4688ea133fd7Smrg ;; 4689a253d6aeSmrg 4690ea133fd7Smrg bsdi[[45]]*) 4691ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic 4692ea133fd7Smrg ;; 4693a253d6aeSmrg 4694ea133fd7Smrg cygwin* | mingw* | pw32* | cegcc*) 4695ea133fd7Smrg # When not using gcc, we currently assume that we are using 4696ea133fd7Smrg # Microsoft Visual C++. 4697ea133fd7Smrg # hardcode_libdir_flag_spec is actually meaningless, as there is 4698ea133fd7Smrg # no search path for DLLs. 4699ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' 4700ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4701ea133fd7Smrg # Tell ltmain to make .lib files, not .a files. 4702ea133fd7Smrg libext=lib 4703ea133fd7Smrg # Tell ltmain to make .dll files, not .so files. 4704ea133fd7Smrg shrext_cmds=".dll" 4705ea133fd7Smrg # FIXME: Setting linknames here is a bad hack. 4706ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' 4707ea133fd7Smrg # The linker will automatically build a .lib file if we build a DLL. 4708ea133fd7Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' 4709ea133fd7Smrg # FIXME: Should let the user specify the lib program. 4710ea133fd7Smrg _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' 4711ea133fd7Smrg _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' 4712ea133fd7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 4713ea133fd7Smrg ;; 4714a253d6aeSmrg 4715ea133fd7Smrg darwin* | rhapsody*) 4716ea133fd7Smrg _LT_DARWIN_LINKER_FEATURES($1) 4717ea133fd7Smrg ;; 4718a253d6aeSmrg 4719ea133fd7Smrg dgux*) 4720ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4721ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4722ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4723ea133fd7Smrg ;; 4724a253d6aeSmrg 4725ea133fd7Smrg freebsd1*) 4726ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4727ea133fd7Smrg ;; 4728a253d6aeSmrg 4729ea133fd7Smrg # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor 4730ea133fd7Smrg # support. Future versions do this automatically, but an explicit c++rt0.o 4731ea133fd7Smrg # does not break anything, and helps significantly (at the cost of a little 4732ea133fd7Smrg # extra space). 4733ea133fd7Smrg freebsd2.2*) 4734ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' 4735ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4736ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4737ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4738ea133fd7Smrg ;; 4739a253d6aeSmrg 4740ea133fd7Smrg # Unfortunately, older versions of FreeBSD 2 do not have this feature. 4741ea133fd7Smrg freebsd2*) 4742ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4743ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4744ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4745ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4746ea133fd7Smrg ;; 4747a253d6aeSmrg 4748ea133fd7Smrg # FreeBSD 3 and greater uses gcc -shared to do shared libraries. 4749ea133fd7Smrg freebsd* | dragonfly*) 4750ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' 4751ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4752ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4753ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4754ea133fd7Smrg ;; 4755a253d6aeSmrg 4756ea133fd7Smrg hpux9*) 4757ea133fd7Smrg if test "$GCC" = yes; then 4758ea133fd7Smrg _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' 4759ea133fd7Smrg else 4760ea133fd7Smrg _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' 4761ea133fd7Smrg fi 4762ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4763ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4764ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4765a253d6aeSmrg 4766ea133fd7Smrg # hardcode_minus_L: Not really in the search PATH, 4767ea133fd7Smrg # but as the default location of the library. 4768ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4769ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4770ea133fd7Smrg ;; 4771a253d6aeSmrg 4772ea133fd7Smrg hpux10*) 4773ea133fd7Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4774ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4775ea133fd7Smrg else 4776ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' 4777ea133fd7Smrg fi 4778ea133fd7Smrg if test "$with_gnu_ld" = no; then 4779ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4780ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' 4781ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4782ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4783ea133fd7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4784ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4785ea133fd7Smrg # hardcode_minus_L: Not really in the search PATH, 4786ea133fd7Smrg # but as the default location of the library. 4787ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4788ea133fd7Smrg fi 4789ea133fd7Smrg ;; 4790a253d6aeSmrg 4791ea133fd7Smrg hpux11*) 4792ea133fd7Smrg if test "$GCC" = yes -a "$with_gnu_ld" = no; then 4793ea133fd7Smrg case $host_cpu in 4794ea133fd7Smrg hppa*64*) 4795ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4796ea133fd7Smrg ;; 4797ea133fd7Smrg ia64*) 4798ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4799ea133fd7Smrg ;; 4800ea133fd7Smrg *) 4801ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4802ea133fd7Smrg ;; 4803ea133fd7Smrg esac 4804ea133fd7Smrg else 4805ea133fd7Smrg case $host_cpu in 4806ea133fd7Smrg hppa*64*) 4807ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4808ea133fd7Smrg ;; 4809ea133fd7Smrg ia64*) 4810ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' 4811ea133fd7Smrg ;; 4812ea133fd7Smrg *) 4813ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' 4814ea133fd7Smrg ;; 4815ea133fd7Smrg esac 4816ea133fd7Smrg fi 4817ea133fd7Smrg if test "$with_gnu_ld" = no; then 4818ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 4819ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4820a253d6aeSmrg 4821ea133fd7Smrg case $host_cpu in 4822ea133fd7Smrg hppa*64*|ia64*) 4823ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 4824ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4825ea133fd7Smrg ;; 4826ea133fd7Smrg *) 4827ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4828ea133fd7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4829ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4830a253d6aeSmrg 4831ea133fd7Smrg # hardcode_minus_L: Not really in the search PATH, 4832ea133fd7Smrg # but as the default location of the library. 4833ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4834ea133fd7Smrg ;; 4835ea133fd7Smrg esac 4836ea133fd7Smrg fi 4837ea133fd7Smrg ;; 4838a253d6aeSmrg 4839ea133fd7Smrg irix5* | irix6* | nonstopux*) 4840ea133fd7Smrg if test "$GCC" = yes; then 4841ea133fd7Smrg _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' 4842ea133fd7Smrg # Try to use the -exported_symbol ld option, if it does not 4843ea133fd7Smrg # work, assume that -exports_file does not work either and 4844ea133fd7Smrg # implicitly export all symbols. 4845ea133fd7Smrg save_LDFLAGS="$LDFLAGS" 4846ea133fd7Smrg LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" 4847ea133fd7Smrg AC_LINK_IFELSE(int foo(void) {}, 4848ea133fd7Smrg _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' 4849ea133fd7Smrg ) 4850ea133fd7Smrg LDFLAGS="$save_LDFLAGS" 4851ea133fd7Smrg else 4852ea133fd7Smrg _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' 4853ea133fd7Smrg _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' 4854ea133fd7Smrg fi 4855ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4856ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4857ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4858ea133fd7Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 4859ea133fd7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4860ea133fd7Smrg ;; 4861a253d6aeSmrg 4862ea133fd7Smrg netbsd*) 4863ea133fd7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 4864ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out 4865ea133fd7Smrg else 4866ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF 4867ea133fd7Smrg fi 4868ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4869ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4870ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4871ea133fd7Smrg ;; 4872a253d6aeSmrg 4873ea133fd7Smrg newsos6) 4874ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 4875ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4876ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4877ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4878ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4879ea133fd7Smrg ;; 4880a253d6aeSmrg 4881ea133fd7Smrg *nto* | *qnx*) 4882ea133fd7Smrg ;; 4883a253d6aeSmrg 4884ea133fd7Smrg openbsd*) 4885ea133fd7Smrg if test -f /usr/libexec/ld.so; then 4886ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 4887ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4888ea133fd7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 4889ea133fd7Smrg if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 4890ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4891ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' 4892ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4893ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 4894ea133fd7Smrg else 4895ea133fd7Smrg case $host_os in 4896ea133fd7Smrg openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) 4897ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' 4898ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4899ea133fd7Smrg ;; 4900ea133fd7Smrg *) 4901ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' 4902ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 4903ea133fd7Smrg ;; 4904ea133fd7Smrg esac 4905ea133fd7Smrg fi 4906ea133fd7Smrg else 4907ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 4908ea133fd7Smrg fi 4909ea133fd7Smrg ;; 4910a253d6aeSmrg 4911ea133fd7Smrg os2*) 4912ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 4913ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 4914ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 4915ea133fd7Smrg _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' 4916ea133fd7Smrg _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' 4917ea133fd7Smrg ;; 4918a253d6aeSmrg 4919ea133fd7Smrg osf3*) 4920ea133fd7Smrg if test "$GCC" = yes; then 4921ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4922ea133fd7Smrg _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' 4923ea133fd7Smrg else 4924ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4925ea133fd7Smrg _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' 4926ea133fd7Smrg fi 4927ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4928ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4929ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4930ea133fd7Smrg ;; 4931a253d6aeSmrg 4932ea133fd7Smrg osf4* | osf5*) # as osf3* with the addition of -msym flag 4933ea133fd7Smrg if test "$GCC" = yes; then 4934ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 4935ea133fd7Smrg _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' 4936ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 4937ea133fd7Smrg else 4938ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 4939ea133fd7Smrg _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' 4940ea133fd7Smrg _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~ 4941ea133fd7Smrg $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' 4942a253d6aeSmrg 4943ea133fd7Smrg # Both c and cxx compiler support -rpath directly 4944ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 4945ea133fd7Smrg fi 4946ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)='no' 4947ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 4948ea133fd7Smrg ;; 4949a253d6aeSmrg 4950ea133fd7Smrg solaris*) 4951ea133fd7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' 4952ea133fd7Smrg if test "$GCC" = yes; then 4953ea133fd7Smrg wlarc='${wl}' 4954ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' 4955ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4956ea133fd7Smrg $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4957ea133fd7Smrg else 4958ea133fd7Smrg case `$CC -V 2>&1` in 4959ea133fd7Smrg *"Compilers 5.0"*) 4960ea133fd7Smrg wlarc='' 4961ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' 4962ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4963ea133fd7Smrg $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' 4964ea133fd7Smrg ;; 4965ea133fd7Smrg *) 4966ea133fd7Smrg wlarc='${wl}' 4967ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' 4968ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 4969ea133fd7Smrg $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' 4970ea133fd7Smrg ;; 4971ea133fd7Smrg esac 4972ea133fd7Smrg fi 4973ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 4974ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 4975ea133fd7Smrg case $host_os in 4976ea133fd7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 4977ea133fd7Smrg *) 4978ea133fd7Smrg # The compiler driver will combine and reorder linker options, 4979ea133fd7Smrg # but understands `-z linker_flag'. GCC discards it without `$wl', 4980ea133fd7Smrg # but is careful enough not to reorder. 4981ea133fd7Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 4982ea133fd7Smrg if test "$GCC" = yes; then 4983ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 4984ea133fd7Smrg else 4985ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 4986ea133fd7Smrg fi 4987ea133fd7Smrg ;; 4988ea133fd7Smrg esac 4989ea133fd7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 4990ea133fd7Smrg ;; 4991a253d6aeSmrg 4992ea133fd7Smrg sunos4*) 4993ea133fd7Smrg if test "x$host_vendor" = xsequent; then 4994ea133fd7Smrg # Use $CC to link under sequent, because it throws in some extra .o 4995ea133fd7Smrg # files that make .init and .fini sections work. 4996ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' 4997ea133fd7Smrg else 4998ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' 4999ea133fd7Smrg fi 5000ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5001ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5002ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5003ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5004ea133fd7Smrg ;; 5005a253d6aeSmrg 5006ea133fd7Smrg sysv4) 5007ea133fd7Smrg case $host_vendor in 5008ea133fd7Smrg sni) 5009ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5010ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? 5011ea133fd7Smrg ;; 5012ea133fd7Smrg siemens) 5013ea133fd7Smrg ## LD is ld it makes a PLAMLIB 5014ea133fd7Smrg ## CC just makes a GrossModule. 5015ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' 5016ea133fd7Smrg _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' 5017ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5018ea133fd7Smrg ;; 5019ea133fd7Smrg motorola) 5020ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5021ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie 5022ea133fd7Smrg ;; 5023ea133fd7Smrg esac 5024ea133fd7Smrg runpath_var='LD_RUN_PATH' 5025ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5026ea133fd7Smrg ;; 5027a253d6aeSmrg 5028ea133fd7Smrg sysv4.3*) 5029ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5030ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5031ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' 5032ea133fd7Smrg ;; 5033a253d6aeSmrg 5034ea133fd7Smrg sysv4*MP*) 5035ea133fd7Smrg if test -d /usr/nec; then 5036ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5037ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5038ea133fd7Smrg runpath_var=LD_RUN_PATH 5039ea133fd7Smrg hardcode_runpath_var=yes 5040ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5041ea133fd7Smrg fi 5042ea133fd7Smrg ;; 5043a253d6aeSmrg 5044ea133fd7Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 5045ea133fd7Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5046ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5047ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5048ea133fd7Smrg runpath_var='LD_RUN_PATH' 5049a253d6aeSmrg 5050ea133fd7Smrg if test "$GCC" = yes; then 5051ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5052ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5053ea133fd7Smrg else 5054ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5055ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5056ea133fd7Smrg fi 5057ea133fd7Smrg ;; 5058a253d6aeSmrg 5059ea133fd7Smrg sysv5* | sco3.2v5* | sco5v6*) 5060ea133fd7Smrg # Note: We can NOT use -z defs as we might desire, because we do not 5061ea133fd7Smrg # link with -lc, and that would cause any symbols used from libc to 5062ea133fd7Smrg # always be unresolved, which means just about no library would 5063ea133fd7Smrg # ever link correctly. If we're not using GNU ld we use -z text 5064ea133fd7Smrg # though, which does catch some bad symbols but isn't as heavy-handed 5065ea133fd7Smrg # as -z defs. 5066ea133fd7Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 5067ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 5068ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5069ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5070ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 5071ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5072ea133fd7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5073ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 5074ea133fd7Smrg runpath_var='LD_RUN_PATH' 5075a253d6aeSmrg 5076ea133fd7Smrg if test "$GCC" = yes; then 5077ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5078ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5079ea133fd7Smrg else 5080ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5081ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 5082ea133fd7Smrg fi 5083ea133fd7Smrg ;; 5084a253d6aeSmrg 5085ea133fd7Smrg uts4*) 5086ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' 5087ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5088ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5089ea133fd7Smrg ;; 5090a253d6aeSmrg 5091ea133fd7Smrg *) 5092ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5093ea133fd7Smrg ;; 5094ea133fd7Smrg esac 5095a253d6aeSmrg 5096ea133fd7Smrg if test x$host_vendor = xsni; then 5097ea133fd7Smrg case $host in 5098ea133fd7Smrg sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) 5099ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' 5100ea133fd7Smrg ;; 5101ea133fd7Smrg esac 5102ea133fd7Smrg fi 5103a253d6aeSmrg fi 5104ea133fd7Smrg]) 5105ea133fd7SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 5106ea133fd7Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 5107a253d6aeSmrg 5108ea133fd7Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld 5109a253d6aeSmrg 5110ea133fd7Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl 5111ea133fd7Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl 5112ea133fd7Smrg_LT_DECL([], [extract_expsyms_cmds], [2], 5113ea133fd7Smrg [The commands to extract the exported symbol list from a shared archive]) 5114a253d6aeSmrg 5115ea133fd7Smrg# 5116ea133fd7Smrg# Do we need to explicitly link libc? 5117ea133fd7Smrg# 5118ea133fd7Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in 5119ea133fd7Smrgx|xyes) 5120ea133fd7Smrg # Assume -lc should be added 5121ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5122a253d6aeSmrg 5123ea133fd7Smrg if test "$enable_shared" = yes && test "$GCC" = yes; then 5124ea133fd7Smrg case $_LT_TAGVAR(archive_cmds, $1) in 5125ea133fd7Smrg *'~'*) 5126ea133fd7Smrg # FIXME: we may have to deal with multi-command sequences. 5127ea133fd7Smrg ;; 5128ea133fd7Smrg '$CC '*) 5129ea133fd7Smrg # Test whether the compiler implicitly links with -lc since on some 5130ea133fd7Smrg # systems, -lgcc has to come before -lc. If gcc already passes -lc 5131ea133fd7Smrg # to ld, don't add -lc before -lgcc. 5132ea133fd7Smrg AC_MSG_CHECKING([whether -lc should be explicitly linked in]) 5133ea133fd7Smrg $RM conftest* 5134ea133fd7Smrg echo "$lt_simple_compile_test_code" > conftest.$ac_ext 5135a253d6aeSmrg 5136ea133fd7Smrg if AC_TRY_EVAL(ac_compile) 2>conftest.err; then 5137ea133fd7Smrg soname=conftest 5138ea133fd7Smrg lib=conftest 5139ea133fd7Smrg libobjs=conftest.$ac_objext 5140ea133fd7Smrg deplibs= 5141ea133fd7Smrg wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) 5142ea133fd7Smrg pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) 5143ea133fd7Smrg compiler_flags=-v 5144ea133fd7Smrg linker_flags=-v 5145ea133fd7Smrg verstring= 5146ea133fd7Smrg output_objdir=. 5147ea133fd7Smrg libname=conftest 5148ea133fd7Smrg lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) 5149ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)= 5150ea133fd7Smrg if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 5151ea133fd7Smrg then 5152ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5153ea133fd7Smrg else 5154ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5155ea133fd7Smrg fi 5156ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag 5157ea133fd7Smrg else 5158ea133fd7Smrg cat conftest.err 1>&5 5159ea133fd7Smrg fi 5160ea133fd7Smrg $RM conftest* 5161ea133fd7Smrg AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) 5162ea133fd7Smrg ;; 5163ea133fd7Smrg esac 5164ea133fd7Smrg fi 5165ea133fd7Smrg ;; 5166ea133fd7Smrgesac 5167a253d6aeSmrg 5168ea133fd7Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], 5169ea133fd7Smrg [Whether or not to add -lc for building shared libraries]) 5170ea133fd7Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes], 5171ea133fd7Smrg [enable_shared_with_static_runtimes], [0], 5172ea133fd7Smrg [Whether or not to disallow shared libs when runtime libs are static]) 5173ea133fd7Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1], 5174ea133fd7Smrg [Compiler flag to allow reflexive dlopens]) 5175ea133fd7Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1], 5176ea133fd7Smrg [Compiler flag to generate shared objects directly from archives]) 5177ea133fd7Smrg_LT_TAGDECL([], [compiler_needs_object], [1], 5178ea133fd7Smrg [Whether the compiler copes with passing no objects directly]) 5179ea133fd7Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2], 5180ea133fd7Smrg [Create an old-style archive from a shared archive]) 5181ea133fd7Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], 5182ea133fd7Smrg [Create a temporary old-style archive to link instead of a shared archive]) 5183ea133fd7Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) 5184ea133fd7Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2]) 5185ea133fd7Smrg_LT_TAGDECL([], [module_cmds], [2], 5186ea133fd7Smrg [Commands used to build a loadable module if different from building 5187ea133fd7Smrg a shared archive.]) 5188ea133fd7Smrg_LT_TAGDECL([], [module_expsym_cmds], [2]) 5189ea133fd7Smrg_LT_TAGDECL([], [with_gnu_ld], [1], 5190ea133fd7Smrg [Whether we are building with GNU ld or not]) 5191ea133fd7Smrg_LT_TAGDECL([], [allow_undefined_flag], [1], 5192ea133fd7Smrg [Flag that allows shared libraries with undefined symbols to be built]) 5193ea133fd7Smrg_LT_TAGDECL([], [no_undefined_flag], [1], 5194ea133fd7Smrg [Flag that enforces no undefined symbols]) 5195ea133fd7Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], 5196ea133fd7Smrg [Flag to hardcode $libdir into a binary during linking. 5197ea133fd7Smrg This must work even if $libdir does not exist]) 5198ea133fd7Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], 5199ea133fd7Smrg [[If ld is used when linking, flag to hardcode $libdir into a binary 5200ea133fd7Smrg during linking. This must work even if $libdir does not exist]]) 5201ea133fd7Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1], 5202ea133fd7Smrg [Whether we need a single "-rpath" flag with a separated argument]) 5203ea133fd7Smrg_LT_TAGDECL([], [hardcode_direct], [0], 5204ea133fd7Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5205ea133fd7Smrg DIR into the resulting binary]) 5206ea133fd7Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0], 5207ea133fd7Smrg [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes 5208ea133fd7Smrg DIR into the resulting binary and the resulting library dependency is 5209ea133fd7Smrg "absolute", i.e impossible to change by setting ${shlibpath_var} if the 5210ea133fd7Smrg library is relocated]) 5211ea133fd7Smrg_LT_TAGDECL([], [hardcode_minus_L], [0], 5212ea133fd7Smrg [Set to "yes" if using the -LDIR flag during linking hardcodes DIR 5213ea133fd7Smrg into the resulting binary]) 5214ea133fd7Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0], 5215ea133fd7Smrg [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR 5216ea133fd7Smrg into the resulting binary]) 5217ea133fd7Smrg_LT_TAGDECL([], [hardcode_automatic], [0], 5218ea133fd7Smrg [Set to "yes" if building a shared library automatically hardcodes DIR 5219ea133fd7Smrg into the library and all subsequent libraries and executables linked 5220ea133fd7Smrg against it]) 5221ea133fd7Smrg_LT_TAGDECL([], [inherit_rpath], [0], 5222ea133fd7Smrg [Set to yes if linker adds runtime paths of dependent libraries 5223ea133fd7Smrg to runtime path list]) 5224ea133fd7Smrg_LT_TAGDECL([], [link_all_deplibs], [0], 5225ea133fd7Smrg [Whether libtool must link a program against all its dependency libraries]) 5226ea133fd7Smrg_LT_TAGDECL([], [fix_srcfile_path], [1], 5227ea133fd7Smrg [Fix the shell variable $srcfile for the compiler]) 5228ea133fd7Smrg_LT_TAGDECL([], [always_export_symbols], [0], 5229ea133fd7Smrg [Set to "yes" if exported symbols are required]) 5230ea133fd7Smrg_LT_TAGDECL([], [export_symbols_cmds], [2], 5231ea133fd7Smrg [The commands to list exported symbols]) 5232ea133fd7Smrg_LT_TAGDECL([], [exclude_expsyms], [1], 5233ea133fd7Smrg [Symbols that should not be listed in the preloaded symbols]) 5234ea133fd7Smrg_LT_TAGDECL([], [include_expsyms], [1], 5235ea133fd7Smrg [Symbols that must always be exported]) 5236ea133fd7Smrg_LT_TAGDECL([], [prelink_cmds], [2], 5237ea133fd7Smrg [Commands necessary for linking programs (against libraries) with templates]) 5238ea133fd7Smrg_LT_TAGDECL([], [file_list_spec], [1], 5239ea133fd7Smrg [Specify filename containing input files]) 5240ea133fd7Smrgdnl FIXME: Not yet implemented 5241ea133fd7Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], 5242ea133fd7Smrgdnl [Compiler flag to generate thread safe objects]) 5243ea133fd7Smrg])# _LT_LINKER_SHLIBS 5244ea133fd7Smrg 5245ea133fd7Smrg 5246ea133fd7Smrg# _LT_LANG_C_CONFIG([TAG]) 5247ea133fd7Smrg# ------------------------ 5248ea133fd7Smrg# Ensure that the configuration variables for a C compiler are suitably 5249ea133fd7Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5250ea133fd7Smrg# the compiler configuration to `libtool'. 5251ea133fd7Smrgm4_defun([_LT_LANG_C_CONFIG], 5252ea133fd7Smrg[m4_require([_LT_DECL_EGREP])dnl 5253ea133fd7Smrglt_save_CC="$CC" 5254ea133fd7SmrgAC_LANG_PUSH(C) 5255a253d6aeSmrg 5256ea133fd7Smrg# Source file extension for C test sources. 5257ea133fd7Smrgac_ext=c 5258a253d6aeSmrg 5259ea133fd7Smrg# Object file extension for compiled C test sources. 5260a253d6aeSmrgobjext=o 5261ea133fd7Smrg_LT_TAGVAR(objext, $1)=$objext 5262a253d6aeSmrg 5263a253d6aeSmrg# Code to be used in simple compile tests 5264ea133fd7Smrglt_simple_compile_test_code="int some_variable = 0;" 5265a253d6aeSmrg 5266a253d6aeSmrg# Code to be used in simple link tests 5267ea133fd7Smrglt_simple_link_test_code='int main(){return(0);}' 5268a253d6aeSmrg 5269ea133fd7Smrg_LT_TAG_COMPILER 5270ea133fd7Smrg# Save the default compiler, since it gets overwritten when the other 5271ea133fd7Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. 5272ea133fd7Smrgcompiler_DEFAULT=$CC 5273a253d6aeSmrg 5274a253d6aeSmrg# save warnings/boilerplate of simple test code 5275a253d6aeSmrg_LT_COMPILER_BOILERPLATE 5276a253d6aeSmrg_LT_LINKER_BOILERPLATE 5277a253d6aeSmrg 5278ea133fd7Smrgif test -n "$compiler"; then 5279ea133fd7Smrg _LT_COMPILER_NO_RTTI($1) 5280ea133fd7Smrg _LT_COMPILER_PIC($1) 5281ea133fd7Smrg _LT_COMPILER_C_O($1) 5282ea133fd7Smrg _LT_COMPILER_FILE_LOCKS($1) 5283ea133fd7Smrg _LT_LINKER_SHLIBS($1) 5284ea133fd7Smrg _LT_SYS_DYNAMIC_LINKER($1) 5285ea133fd7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 5286ea133fd7Smrg LT_SYS_DLOPEN_SELF 5287ea133fd7Smrg _LT_CMD_STRIPLIB 5288ea133fd7Smrg 5289ea133fd7Smrg # Report which library types will actually be built 5290ea133fd7Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 5291ea133fd7Smrg AC_MSG_RESULT([$can_build_shared]) 5292ea133fd7Smrg 5293ea133fd7Smrg AC_MSG_CHECKING([whether to build shared libraries]) 5294ea133fd7Smrg test "$can_build_shared" = "no" && enable_shared=no 5295ea133fd7Smrg 5296ea133fd7Smrg # On AIX, shared libraries and static libraries use the same namespace, and 5297ea133fd7Smrg # are all built from PIC. 5298ea133fd7Smrg case $host_os in 5299ea133fd7Smrg aix3*) 5300ea133fd7Smrg test "$enable_shared" = yes && enable_static=no 5301ea133fd7Smrg if test -n "$RANLIB"; then 5302ea133fd7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 5303ea133fd7Smrg postinstall_cmds='$RANLIB $lib' 5304ea133fd7Smrg fi 5305ea133fd7Smrg ;; 5306a253d6aeSmrg 5307ea133fd7Smrg aix[[4-9]]*) 5308ea133fd7Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 5309ea133fd7Smrg test "$enable_shared" = yes && enable_static=no 5310ea133fd7Smrg fi 5311ea133fd7Smrg ;; 5312ea133fd7Smrg esac 5313ea133fd7Smrg AC_MSG_RESULT([$enable_shared]) 5314a253d6aeSmrg 5315ea133fd7Smrg AC_MSG_CHECKING([whether to build static libraries]) 5316ea133fd7Smrg # Make sure either enable_shared or enable_static is yes. 5317ea133fd7Smrg test "$enable_shared" = yes || enable_static=yes 5318ea133fd7Smrg AC_MSG_RESULT([$enable_static]) 5319a253d6aeSmrg 5320ea133fd7Smrg _LT_CONFIG($1) 5321ea133fd7Smrgfi 5322ea133fd7SmrgAC_LANG_POP 5323a253d6aeSmrgCC="$lt_save_CC" 5324ea133fd7Smrg])# _LT_LANG_C_CONFIG 5325a253d6aeSmrg 5326a253d6aeSmrg 5327ea133fd7Smrg# _LT_PROG_CXX 5328ea133fd7Smrg# ------------ 5329ea133fd7Smrg# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ 5330ea133fd7Smrg# compiler, we have our own version here. 5331ea133fd7Smrgm4_defun([_LT_PROG_CXX], 5332ea133fd7Smrg[ 5333ea133fd7Smrgpushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) 5334ea133fd7SmrgAC_PROG_CXX 5335ea133fd7Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" && 5336ea133fd7Smrg ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || 5337ea133fd7Smrg (test "X$CXX" != "Xg++"))) ; then 5338ea133fd7Smrg AC_PROG_CXXCPP 5339ea133fd7Smrgelse 5340ea133fd7Smrg _lt_caught_CXX_error=yes 5341ea133fd7Smrgfi 5342ea133fd7Smrgpopdef([AC_MSG_ERROR]) 5343ea133fd7Smrg])# _LT_PROG_CXX 5344a253d6aeSmrg 5345ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 5346ea133fd7Smrgdnl AC_DEFUN([_LT_PROG_CXX], []) 5347a253d6aeSmrg 5348a253d6aeSmrg 5349ea133fd7Smrg# _LT_LANG_CXX_CONFIG([TAG]) 5350ea133fd7Smrg# -------------------------- 5351ea133fd7Smrg# Ensure that the configuration variables for a C++ compiler are suitably 5352ea133fd7Smrg# defined. These variables are subsequently used by _LT_CONFIG to write 5353ea133fd7Smrg# the compiler configuration to `libtool'. 5354ea133fd7Smrgm4_defun([_LT_LANG_CXX_CONFIG], 5355ea133fd7Smrg[AC_REQUIRE([_LT_PROG_CXX])dnl 5356ea133fd7Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl 5357ea133fd7Smrgm4_require([_LT_DECL_EGREP])dnl 5358ea133fd7Smrg 5359ea133fd7SmrgAC_LANG_PUSH(C++) 5360ea133fd7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 5361ea133fd7Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 5362ea133fd7Smrg_LT_TAGVAR(always_export_symbols, $1)=no 5363ea133fd7Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 5364ea133fd7Smrg_LT_TAGVAR(compiler_needs_object, $1)=no 5365ea133fd7Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 5366ea133fd7Smrg_LT_TAGVAR(hardcode_direct, $1)=no 5367ea133fd7Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 5368ea133fd7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 5369ea133fd7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 5370ea133fd7Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 5371ea133fd7Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 5372ea133fd7Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported 5373ea133fd7Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 5374ea133fd7Smrg_LT_TAGVAR(inherit_rpath, $1)=no 5375ea133fd7Smrg_LT_TAGVAR(module_cmds, $1)= 5376ea133fd7Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 5377ea133fd7Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 5378ea133fd7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 5379ea133fd7Smrg_LT_TAGVAR(no_undefined_flag, $1)= 5380ea133fd7Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 5381ea133fd7Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 5382a253d6aeSmrg 5383ea133fd7Smrg# Source file extension for C++ test sources. 5384ea133fd7Smrgac_ext=cpp 5385a253d6aeSmrg 5386ea133fd7Smrg# Object file extension for compiled C++ test sources. 5387ea133fd7Smrgobjext=o 5388ea133fd7Smrg_LT_TAGVAR(objext, $1)=$objext 5389ea133fd7Smrg 5390ea133fd7Smrg# No sense in running all these tests if we already determined that 5391ea133fd7Smrg# the CXX compiler isn't working. Some variables (like enable_shared) 5392ea133fd7Smrg# are currently assumed to apply to all compilers on this platform, 5393ea133fd7Smrg# and will be corrupted by setting them based on a non-working compiler. 5394ea133fd7Smrgif test "$_lt_caught_CXX_error" != yes; then 5395ea133fd7Smrg # Code to be used in simple compile tests 5396ea133fd7Smrg lt_simple_compile_test_code="int some_variable = 0;" 5397ea133fd7Smrg 5398ea133fd7Smrg # Code to be used in simple link tests 5399ea133fd7Smrg lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' 5400ea133fd7Smrg 5401ea133fd7Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 5402ea133fd7Smrg _LT_TAG_COMPILER 5403ea133fd7Smrg 5404ea133fd7Smrg # save warnings/boilerplate of simple test code 5405ea133fd7Smrg _LT_COMPILER_BOILERPLATE 5406ea133fd7Smrg _LT_LINKER_BOILERPLATE 5407ea133fd7Smrg 5408ea133fd7Smrg # Allow CC to be a program name with arguments. 5409ea133fd7Smrg lt_save_CC=$CC 5410ea133fd7Smrg lt_save_LD=$LD 5411ea133fd7Smrg lt_save_GCC=$GCC 5412ea133fd7Smrg GCC=$GXX 5413ea133fd7Smrg lt_save_with_gnu_ld=$with_gnu_ld 5414ea133fd7Smrg lt_save_path_LD=$lt_cv_path_LD 5415ea133fd7Smrg if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then 5416ea133fd7Smrg lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx 5417ea133fd7Smrg else 5418ea133fd7Smrg $as_unset lt_cv_prog_gnu_ld 5419a253d6aeSmrg fi 5420ea133fd7Smrg if test -n "${lt_cv_path_LDCXX+set}"; then 5421ea133fd7Smrg lt_cv_path_LD=$lt_cv_path_LDCXX 5422ea133fd7Smrg else 5423ea133fd7Smrg $as_unset lt_cv_path_LD 5424ea133fd7Smrg fi 5425ea133fd7Smrg test -z "${LDCXX+set}" || LD=$LDCXX 5426ea133fd7Smrg CC=${CXX-"c++"} 5427ea133fd7Smrg compiler=$CC 5428ea133fd7Smrg _LT_TAGVAR(compiler, $1)=$CC 5429ea133fd7Smrg _LT_CC_BASENAME([$compiler]) 5430a253d6aeSmrg 5431ea133fd7Smrg if test -n "$compiler"; then 5432ea133fd7Smrg # We don't want -fno-exception when compiling C++ code, so set the 5433ea133fd7Smrg # no_builtin_flag separately 5434ea133fd7Smrg if test "$GXX" = yes; then 5435ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' 5436ea133fd7Smrg else 5437ea133fd7Smrg _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= 5438ea133fd7Smrg fi 5439a253d6aeSmrg 5440ea133fd7Smrg if test "$GXX" = yes; then 5441ea133fd7Smrg # Set up default GNU C++ configuration 5442a253d6aeSmrg 5443ea133fd7Smrg LT_PATH_LD 5444a253d6aeSmrg 5445ea133fd7Smrg # Check if GNU C++ uses GNU ld as the underlying linker, since the 5446ea133fd7Smrg # archiving commands below assume that GNU ld is being used. 5447ea133fd7Smrg if test "$with_gnu_ld" = yes; then 5448ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5449ea133fd7Smrg _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' 5450a253d6aeSmrg 5451ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5452ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5453a253d6aeSmrg 5454ea133fd7Smrg # If archive_cmds runs LD, not CC, wlarc should be empty 5455ea133fd7Smrg # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to 5456ea133fd7Smrg # investigate it a little bit more. (MM) 5457ea133fd7Smrg wlarc='${wl}' 5458a253d6aeSmrg 5459ea133fd7Smrg # ancient GNU ld didn't support --whole-archive et. al. 5460ea133fd7Smrg if eval "`$CC -print-prog-name=ld` --help 2>&1" | 5461ea133fd7Smrg $GREP 'no-whole-archive' > /dev/null; then 5462ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 5463ea133fd7Smrg else 5464ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)= 5465ea133fd7Smrg fi 5466ea133fd7Smrg else 5467ea133fd7Smrg with_gnu_ld=no 5468ea133fd7Smrg wlarc= 5469ea133fd7Smrg 5470ea133fd7Smrg # A generic and very simple default shared library creation 5471ea133fd7Smrg # command for GNU C++ for the case where it uses the native 5472ea133fd7Smrg # linker, instead of GNU ld. If possible, this setting should 5473ea133fd7Smrg # overridden to take advantage of the native linker features on 5474ea133fd7Smrg # the platform it is being used on. 5475ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 5476ea133fd7Smrg fi 5477a253d6aeSmrg 5478ea133fd7Smrg # Commands to make compiler produce verbose output that lists 5479ea133fd7Smrg # what "hidden" libraries, object files and flags are used when 5480ea133fd7Smrg # linking a shared library. 5481ea133fd7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 5482a253d6aeSmrg 5483ea133fd7Smrg else 5484ea133fd7Smrg GXX=no 5485ea133fd7Smrg with_gnu_ld=no 5486ea133fd7Smrg wlarc= 5487ea133fd7Smrg fi 5488a253d6aeSmrg 5489ea133fd7Smrg # PORTME: fill in a description of your system's C++ link characteristics 5490ea133fd7Smrg AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) 5491ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5492ea133fd7Smrg case $host_os in 5493ea133fd7Smrg aix3*) 5494ea133fd7Smrg # FIXME: insert proper C++ library support 5495ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5496ea133fd7Smrg ;; 5497ea133fd7Smrg aix[[4-9]]*) 5498ea133fd7Smrg if test "$host_cpu" = ia64; then 5499ea133fd7Smrg # On IA64, the linker does run time linking by default, so we don't 5500ea133fd7Smrg # have to do anything special. 5501ea133fd7Smrg aix_use_runtimelinking=no 5502ea133fd7Smrg exp_sym_flag='-Bexport' 5503ea133fd7Smrg no_entry_flag="" 5504ea133fd7Smrg else 5505ea133fd7Smrg aix_use_runtimelinking=no 5506ea133fd7Smrg 5507ea133fd7Smrg # Test if we are trying to use run time linking or normal 5508ea133fd7Smrg # AIX style linking. If -brtl is somewhere in LDFLAGS, we 5509ea133fd7Smrg # need to do runtime linking. 5510ea133fd7Smrg case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) 5511ea133fd7Smrg for ld_flag in $LDFLAGS; do 5512ea133fd7Smrg case $ld_flag in 5513ea133fd7Smrg *-brtl*) 5514ea133fd7Smrg aix_use_runtimelinking=yes 5515ea133fd7Smrg break 5516ea133fd7Smrg ;; 5517ea133fd7Smrg esac 5518ea133fd7Smrg done 5519ea133fd7Smrg ;; 5520ea133fd7Smrg esac 5521a253d6aeSmrg 5522ea133fd7Smrg exp_sym_flag='-bexport' 5523ea133fd7Smrg no_entry_flag='-bnoentry' 5524ea133fd7Smrg fi 5525a253d6aeSmrg 5526ea133fd7Smrg # When large executables or shared objects are built, AIX ld can 5527ea133fd7Smrg # have problems creating the table of contents. If linking a library 5528ea133fd7Smrg # or program results in "error TOC overflow" add -mminimal-toc to 5529ea133fd7Smrg # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not 5530ea133fd7Smrg # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. 5531ea133fd7Smrg 5532ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='' 5533ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5534ea133fd7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5535ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 5536ea133fd7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5537ea133fd7Smrg _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' 5538ea133fd7Smrg 5539ea133fd7Smrg if test "$GXX" = yes; then 5540ea133fd7Smrg case $host_os in aix4.[[012]]|aix4.[[012]].*) 5541ea133fd7Smrg # We only want to do this on AIX 4.2 and lower, the check 5542ea133fd7Smrg # below for broken collect2 doesn't work under 4.3+ 5543ea133fd7Smrg collect2name=`${CC} -print-prog-name=collect2` 5544ea133fd7Smrg if test -f "$collect2name" && 5545ea133fd7Smrg strings "$collect2name" | $GREP resolve_lib_name >/dev/null 5546ea133fd7Smrg then 5547ea133fd7Smrg # We have reworked collect2 5548ea133fd7Smrg : 5549ea133fd7Smrg else 5550ea133fd7Smrg # We have old collect2 5551ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=unsupported 5552ea133fd7Smrg # It fails to find uninstalled libraries when the uninstalled 5553ea133fd7Smrg # path is not listed in the libpath. Setting hardcode_minus_L 5554ea133fd7Smrg # to unsupported forces relinking 5555ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes 5556ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5557ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)= 5558ea133fd7Smrg fi 5559ea133fd7Smrg esac 5560ea133fd7Smrg shared_flag='-shared' 5561ea133fd7Smrg if test "$aix_use_runtimelinking" = yes; then 5562ea133fd7Smrg shared_flag="$shared_flag "'${wl}-G' 5563ea133fd7Smrg fi 5564ea133fd7Smrg else 5565ea133fd7Smrg # not using gcc 5566ea133fd7Smrg if test "$host_cpu" = ia64; then 5567ea133fd7Smrg # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release 5568ea133fd7Smrg # chokes on -Wl,-G. The following line is correct: 5569ea133fd7Smrg shared_flag='-G' 5570ea133fd7Smrg else 5571ea133fd7Smrg if test "$aix_use_runtimelinking" = yes; then 5572ea133fd7Smrg shared_flag='${wl}-G' 5573ea133fd7Smrg else 5574ea133fd7Smrg shared_flag='${wl}-bM:SRE' 5575ea133fd7Smrg fi 5576ea133fd7Smrg fi 5577ea133fd7Smrg fi 5578a253d6aeSmrg 5579ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' 5580ea133fd7Smrg # It seems that -bexpall does not export symbols beginning with 5581ea133fd7Smrg # underscore (_), so it is better to generate a list of symbols to 5582ea133fd7Smrg # export. 5583ea133fd7Smrg _LT_TAGVAR(always_export_symbols, $1)=yes 5584ea133fd7Smrg if test "$aix_use_runtimelinking" = yes; then 5585ea133fd7Smrg # Warning - without using the other runtime loading flags (-brtl), 5586ea133fd7Smrg # -berok will link without error, but may produce a broken library. 5587ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='-berok' 5588ea133fd7Smrg # Determine the default libpath from the value encoded in an empty 5589ea133fd7Smrg # executable. 5590ea133fd7Smrg _LT_SYS_MODULE_PATH_AIX 5591ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5592ea133fd7Smrg 5593ea133fd7Smrg _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" 5594ea133fd7Smrg else 5595ea133fd7Smrg if test "$host_cpu" = ia64; then 5596ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' 5597ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" 5598ea133fd7Smrg _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" 5599ea133fd7Smrg else 5600ea133fd7Smrg # Determine the default libpath from the value encoded in an 5601ea133fd7Smrg # empty executable. 5602ea133fd7Smrg _LT_SYS_MODULE_PATH_AIX 5603ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" 5604ea133fd7Smrg # Warning - without using the other run time loading flags, 5605ea133fd7Smrg # -berok will link without error, but may produce a broken library. 5606ea133fd7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' 5607ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' 5608ea133fd7Smrg # Exported symbols can be pulled into shared objects from archives 5609ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' 5610ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=yes 5611ea133fd7Smrg # This is similar to how AIX traditionally builds its shared 5612ea133fd7Smrg # libraries. 5613ea133fd7Smrg _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' 5614ea133fd7Smrg fi 5615ea133fd7Smrg fi 5616ea133fd7Smrg ;; 5617a253d6aeSmrg 5618ea133fd7Smrg beos*) 5619ea133fd7Smrg if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then 5620ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5621ea133fd7Smrg # Joseph Beckenbach <jrb3@best.com> says some releases of gcc 5622ea133fd7Smrg # support --undefined. This deserves some investigation. FIXME 5623ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5624ea133fd7Smrg else 5625ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5626ea133fd7Smrg fi 5627ea133fd7Smrg ;; 5628a253d6aeSmrg 5629ea133fd7Smrg chorus*) 5630ea133fd7Smrg case $cc_basename in 5631ea133fd7Smrg *) 5632ea133fd7Smrg # FIXME: insert proper C++ library support 5633ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5634ea133fd7Smrg ;; 5635ea133fd7Smrg esac 5636ea133fd7Smrg ;; 5637a253d6aeSmrg 5638ea133fd7Smrg cygwin* | mingw* | pw32* | cegcc*) 5639ea133fd7Smrg # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, 5640ea133fd7Smrg # as there is no search path for DLLs. 5641ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' 5642ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=unsupported 5643ea133fd7Smrg _LT_TAGVAR(always_export_symbols, $1)=no 5644ea133fd7Smrg _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes 5645ea133fd7Smrg 5646ea133fd7Smrg if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then 5647ea133fd7Smrg _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' 5648ea133fd7Smrg # If the export-symbols file already is a .def file (1st line 5649ea133fd7Smrg # is EXPORTS), use it as is; otherwise, prepend... 5650ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then 5651ea133fd7Smrg cp $export_symbols $output_objdir/$soname.def; 5652ea133fd7Smrg else 5653ea133fd7Smrg echo EXPORTS > $output_objdir/$soname.def; 5654ea133fd7Smrg cat $export_symbols >> $output_objdir/$soname.def; 5655ea133fd7Smrg fi~ 5656ea133fd7Smrg $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' 5657ea133fd7Smrg else 5658ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5659ea133fd7Smrg fi 5660ea133fd7Smrg ;; 5661ea133fd7Smrg darwin* | rhapsody*) 5662ea133fd7Smrg _LT_DARWIN_LINKER_FEATURES($1) 5663ea133fd7Smrg ;; 5664a253d6aeSmrg 5665ea133fd7Smrg dgux*) 5666ea133fd7Smrg case $cc_basename in 5667ea133fd7Smrg ec++*) 5668ea133fd7Smrg # FIXME: insert proper C++ library support 5669ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5670ea133fd7Smrg ;; 5671ea133fd7Smrg ghcx*) 5672ea133fd7Smrg # Green Hills C++ Compiler 5673ea133fd7Smrg # FIXME: insert proper C++ library support 5674ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5675ea133fd7Smrg ;; 5676ea133fd7Smrg *) 5677ea133fd7Smrg # FIXME: insert proper C++ library support 5678ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5679ea133fd7Smrg ;; 5680ea133fd7Smrg esac 5681ea133fd7Smrg ;; 5682a253d6aeSmrg 5683ea133fd7Smrg freebsd[[12]]*) 5684ea133fd7Smrg # C++ shared libraries reported to be fairly broken before 5685ea133fd7Smrg # switch to ELF 5686ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5687ea133fd7Smrg ;; 5688a253d6aeSmrg 5689ea133fd7Smrg freebsd-elf*) 5690ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5691ea133fd7Smrg ;; 5692a253d6aeSmrg 5693ea133fd7Smrg freebsd* | dragonfly*) 5694ea133fd7Smrg # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF 5695ea133fd7Smrg # conventions 5696ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 5697ea133fd7Smrg ;; 5698a253d6aeSmrg 5699ea133fd7Smrg gnu*) 5700ea133fd7Smrg ;; 5701a253d6aeSmrg 5702ea133fd7Smrg hpux9*) 5703ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5704ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5705ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5706ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5707ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5708ea133fd7Smrg # but as the default 5709ea133fd7Smrg # location of the library. 5710ea133fd7Smrg 5711ea133fd7Smrg case $cc_basename in 5712ea133fd7Smrg CC*) 5713ea133fd7Smrg # FIXME: insert proper C++ library support 5714ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5715ea133fd7Smrg ;; 5716ea133fd7Smrg aCC*) 5717ea133fd7Smrg _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' 5718ea133fd7Smrg # Commands to make compiler produce verbose output that lists 5719ea133fd7Smrg # what "hidden" libraries, object files and flags are used when 5720ea133fd7Smrg # linking a shared library. 5721ea133fd7Smrg # 5722ea133fd7Smrg # There doesn't appear to be a way to prevent this compiler from 5723ea133fd7Smrg # explicitly linking system object files so we need to strip them 5724ea133fd7Smrg # from the output so that they don't get included in the library 5725ea133fd7Smrg # dependencies. 5726ea133fd7Smrg 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' 5727ea133fd7Smrg ;; 5728ea133fd7Smrg *) 5729ea133fd7Smrg if test "$GXX" = yes; then 5730ea133fd7Smrg _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' 5731ea133fd7Smrg else 5732ea133fd7Smrg # FIXME: insert proper C++ library support 5733ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5734ea133fd7Smrg fi 5735ea133fd7Smrg ;; 5736ea133fd7Smrg esac 5737ea133fd7Smrg ;; 5738a253d6aeSmrg 5739ea133fd7Smrg hpux10*|hpux11*) 5740ea133fd7Smrg if test $with_gnu_ld = no; then 5741ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' 5742ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5743ea133fd7Smrg 5744ea133fd7Smrg case $host_cpu in 5745ea133fd7Smrg hppa*64*|ia64*) 5746ea133fd7Smrg ;; 5747ea133fd7Smrg *) 5748ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5749ea133fd7Smrg ;; 5750ea133fd7Smrg esac 5751ea133fd7Smrg fi 5752ea133fd7Smrg case $host_cpu in 5753ea133fd7Smrg hppa*64*|ia64*) 5754ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5755ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5756ea133fd7Smrg ;; 5757ea133fd7Smrg *) 5758ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 5759ea133fd7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 5760ea133fd7Smrg _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, 5761ea133fd7Smrg # but as the default 5762ea133fd7Smrg # location of the library. 5763ea133fd7Smrg ;; 5764ea133fd7Smrg esac 5765a253d6aeSmrg 5766ea133fd7Smrg case $cc_basename in 5767ea133fd7Smrg CC*) 5768ea133fd7Smrg # FIXME: insert proper C++ library support 5769ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5770ea133fd7Smrg ;; 5771ea133fd7Smrg aCC*) 5772ea133fd7Smrg case $host_cpu in 5773ea133fd7Smrg hppa*64*) 5774ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5775ea133fd7Smrg ;; 5776ea133fd7Smrg ia64*) 5777ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5778ea133fd7Smrg ;; 5779ea133fd7Smrg *) 5780ea133fd7Smrg _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' 5781ea133fd7Smrg ;; 5782ea133fd7Smrg esac 5783ea133fd7Smrg # Commands to make compiler produce verbose output that lists 5784ea133fd7Smrg # what "hidden" libraries, object files and flags are used when 5785ea133fd7Smrg # linking a shared library. 5786ea133fd7Smrg # 5787ea133fd7Smrg # There doesn't appear to be a way to prevent this compiler from 5788ea133fd7Smrg # explicitly linking system object files so we need to strip them 5789ea133fd7Smrg # from the output so that they don't get included in the library 5790ea133fd7Smrg # dependencies. 5791ea133fd7Smrg 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' 5792ea133fd7Smrg ;; 5793ea133fd7Smrg *) 5794ea133fd7Smrg if test "$GXX" = yes; then 5795ea133fd7Smrg if test $with_gnu_ld = no; then 5796ea133fd7Smrg case $host_cpu in 5797ea133fd7Smrg hppa*64*) 5798ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5799ea133fd7Smrg ;; 5800ea133fd7Smrg ia64*) 5801ea133fd7Smrg _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' 5802ea133fd7Smrg ;; 5803ea133fd7Smrg *) 5804ea133fd7Smrg _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' 5805ea133fd7Smrg ;; 5806ea133fd7Smrg esac 5807ea133fd7Smrg fi 5808ea133fd7Smrg else 5809ea133fd7Smrg # FIXME: insert proper C++ library support 5810ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 5811ea133fd7Smrg fi 5812ea133fd7Smrg ;; 5813ea133fd7Smrg esac 5814ea133fd7Smrg ;; 5815a253d6aeSmrg 5816ea133fd7Smrg interix[[3-9]]*) 5817ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=no 5818ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 5819ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5820ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 5821ea133fd7Smrg # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. 5822ea133fd7Smrg # Instead, shared libraries are loaded at an image base (0x10000000 by 5823ea133fd7Smrg # default) and relocated if they conflict, which is a slow very memory 5824ea133fd7Smrg # consuming and fragmenting process. To avoid this, we pick a random, 5825ea133fd7Smrg # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link 5826ea133fd7Smrg # time. Moving up from 0x10000000 also allows more sbrk(2) space. 5827ea133fd7Smrg _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' 5828ea133fd7Smrg _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' 5829ea133fd7Smrg ;; 5830ea133fd7Smrg irix5* | irix6*) 5831ea133fd7Smrg case $cc_basename in 5832ea133fd7Smrg CC*) 5833ea133fd7Smrg # SGI C++ 5834ea133fd7Smrg _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' 5835ea133fd7Smrg 5836ea133fd7Smrg # Archives containing C++ object files must be created using 5837ea133fd7Smrg # "CC -ar", where "CC" is the IRIX C++ compiler. This is 5838ea133fd7Smrg # necessary to make sure instantiated templates are included 5839ea133fd7Smrg # in the archive. 5840ea133fd7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' 5841ea133fd7Smrg ;; 5842ea133fd7Smrg *) 5843ea133fd7Smrg if test "$GXX" = yes; then 5844ea133fd7Smrg if test "$with_gnu_ld" = no; then 5845ea133fd7Smrg _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' 5846ea133fd7Smrg else 5847ea133fd7Smrg _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' 5848ea133fd7Smrg fi 5849ea133fd7Smrg fi 5850ea133fd7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 5851ea133fd7Smrg ;; 5852ea133fd7Smrg esac 5853ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5854ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5855ea133fd7Smrg _LT_TAGVAR(inherit_rpath, $1)=yes 5856ea133fd7Smrg ;; 5857a253d6aeSmrg 5858ea133fd7Smrg linux* | k*bsd*-gnu) 5859ea133fd7Smrg case $cc_basename in 5860ea133fd7Smrg KCC*) 5861ea133fd7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 5862a253d6aeSmrg 5863ea133fd7Smrg # KCC will only create a shared library if the output file 5864ea133fd7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 5865ea133fd7Smrg # to its proper name (with version) after linking. 5866ea133fd7Smrg _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' 5867ea133fd7Smrg _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' 5868ea133fd7Smrg # Commands to make compiler produce verbose output that lists 5869ea133fd7Smrg # what "hidden" libraries, object files and flags are used when 5870ea133fd7Smrg # linking a shared library. 5871ea133fd7Smrg # 5872ea133fd7Smrg # There doesn't appear to be a way to prevent this compiler from 5873ea133fd7Smrg # explicitly linking system object files so we need to strip them 5874ea133fd7Smrg # from the output so that they don't get included in the library 5875ea133fd7Smrg # dependencies. 5876ea133fd7Smrg 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' 5877ea133fd7Smrg 5878ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5879ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5880ea133fd7Smrg 5881ea133fd7Smrg # Archives containing C++ object files must be created using 5882ea133fd7Smrg # "CC -Bstatic", where "CC" is the KAI C++ compiler. 5883ea133fd7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' 5884ea133fd7Smrg ;; 5885ea133fd7Smrg icpc* | ecpc* ) 5886ea133fd7Smrg # Intel C++ 5887ea133fd7Smrg with_gnu_ld=yes 5888ea133fd7Smrg # version 8.0 and above of icpc choke on multiply defined symbols 5889ea133fd7Smrg # if we add $predep_objects and $postdep_objects, however 7.1 and 5890ea133fd7Smrg # earlier do not add the objects themselves. 5891ea133fd7Smrg case `$CC -V 2>&1` in 5892ea133fd7Smrg *"Version 7."*) 5893ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5894ea133fd7Smrg _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' 5895ea133fd7Smrg ;; 5896ea133fd7Smrg *) # Version 8.0 or newer 5897ea133fd7Smrg tmp_idyn= 5898ea133fd7Smrg case $host_cpu in 5899ea133fd7Smrg ia64*) tmp_idyn=' -i_dynamic';; 5900ea133fd7Smrg esac 5901ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5902ea133fd7Smrg _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' 5903ea133fd7Smrg ;; 5904ea133fd7Smrg esac 5905ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 5906ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 5907ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5908ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' 5909ea133fd7Smrg ;; 5910ea133fd7Smrg pgCC* | pgcpp*) 5911ea133fd7Smrg # Portland Group C++ compiler 5912ea133fd7Smrg case `$CC -V` in 5913ea133fd7Smrg *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) 5914ea133fd7Smrg _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ 5915ea133fd7Smrg rm -rf $tpldir~ 5916ea133fd7Smrg $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ 5917ea133fd7Smrg compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' 5918ea133fd7Smrg _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ 5919ea133fd7Smrg rm -rf $tpldir~ 5920ea133fd7Smrg $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ 5921ea133fd7Smrg $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ 5922ea133fd7Smrg $RANLIB $oldlib' 5923ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ 5924ea133fd7Smrg rm -rf $tpldir~ 5925ea133fd7Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5926ea133fd7Smrg $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5927ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ 5928ea133fd7Smrg rm -rf $tpldir~ 5929ea133fd7Smrg $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ 5930ea133fd7Smrg $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' 5931ea133fd7Smrg ;; 5932ea133fd7Smrg *) # Version 6 will use weak symbols 5933ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' 5934ea133fd7Smrg _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' 5935ea133fd7Smrg ;; 5936ea133fd7Smrg esac 5937a253d6aeSmrg 5938ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' 5939ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5940ea133fd7Smrg _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' 5941ea133fd7Smrg ;; 5942ea133fd7Smrg cxx*) 5943ea133fd7Smrg # Compaq C++ 5944ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' 5945ea133fd7Smrg _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' 5946a253d6aeSmrg 5947ea133fd7Smrg runpath_var=LD_RUN_PATH 5948ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 5949ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 5950a253d6aeSmrg 5951ea133fd7Smrg # Commands to make compiler produce verbose output that lists 5952ea133fd7Smrg # what "hidden" libraries, object files and flags are used when 5953ea133fd7Smrg # linking a shared library. 5954ea133fd7Smrg # 5955ea133fd7Smrg # There doesn't appear to be a way to prevent this compiler from 5956ea133fd7Smrg # explicitly linking system object files so we need to strip them 5957ea133fd7Smrg # from the output so that they don't get included in the library 5958ea133fd7Smrg # dependencies. 5959ea133fd7Smrg 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' 5960ea133fd7Smrg ;; 5961ea133fd7Smrg xl*) 5962ea133fd7Smrg # IBM XL 8.0 on PPC, with GNU ld 5963ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 5964ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' 5965ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' 5966ea133fd7Smrg if test "x$supports_anon_versioning" = xyes; then 5967ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ 5968ea133fd7Smrg cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ 5969ea133fd7Smrg echo "local: *; };" >> $output_objdir/$libname.ver~ 5970ea133fd7Smrg $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' 5971ea133fd7Smrg fi 5972ea133fd7Smrg ;; 5973ea133fd7Smrg *) 5974ea133fd7Smrg case `$CC -V 2>&1 | sed 5q` in 5975ea133fd7Smrg *Sun\ C*) 5976ea133fd7Smrg # Sun C++ 5.9 5977ea133fd7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 5978ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 5979ea133fd7Smrg _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' 5980ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 5981ea133fd7Smrg _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' 5982ea133fd7Smrg _LT_TAGVAR(compiler_needs_object, $1)=yes 5983ea133fd7Smrg 5984ea133fd7Smrg # Not sure whether something based on 5985ea133fd7Smrg # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 5986ea133fd7Smrg # would be better. 5987ea133fd7Smrg output_verbose_link_cmd='echo' 5988ea133fd7Smrg 5989ea133fd7Smrg # Archives containing C++ object files must be created using 5990ea133fd7Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 5991ea133fd7Smrg # necessary to make sure instantiated templates are included 5992ea133fd7Smrg # in the archive. 5993ea133fd7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 5994ea133fd7Smrg ;; 5995ea133fd7Smrg esac 5996ea133fd7Smrg ;; 5997ea133fd7Smrg esac 5998ea133fd7Smrg ;; 5999a253d6aeSmrg 6000ea133fd7Smrg lynxos*) 6001ea133fd7Smrg # FIXME: insert proper C++ library support 6002ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6003ea133fd7Smrg ;; 6004a253d6aeSmrg 6005ea133fd7Smrg m88k*) 6006ea133fd7Smrg # FIXME: insert proper C++ library support 6007ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6008ea133fd7Smrg ;; 6009a253d6aeSmrg 6010ea133fd7Smrg mvs*) 6011ea133fd7Smrg case $cc_basename in 6012ea133fd7Smrg cxx*) 6013ea133fd7Smrg # FIXME: insert proper C++ library support 6014ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6015ea133fd7Smrg ;; 6016ea133fd7Smrg *) 6017ea133fd7Smrg # FIXME: insert proper C++ library support 6018ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6019ea133fd7Smrg ;; 6020ea133fd7Smrg esac 6021ea133fd7Smrg ;; 6022a253d6aeSmrg 6023ea133fd7Smrg netbsd*) 6024ea133fd7Smrg if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then 6025ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' 6026ea133fd7Smrg wlarc= 6027ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6028ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6029ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6030ea133fd7Smrg fi 6031ea133fd7Smrg # Workaround some broken pre-1.5 toolchains 6032ea133fd7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' 6033ea133fd7Smrg ;; 6034a253d6aeSmrg 6035ea133fd7Smrg *nto* | *qnx*) 6036ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=yes 6037ea133fd7Smrg ;; 6038a253d6aeSmrg 6039ea133fd7Smrg openbsd2*) 6040ea133fd7Smrg # C++ shared libraries are fairly broken 6041ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6042ea133fd7Smrg ;; 6043a253d6aeSmrg 6044ea133fd7Smrg openbsd*) 6045ea133fd7Smrg if test -f /usr/libexec/ld.so; then 6046ea133fd7Smrg _LT_TAGVAR(hardcode_direct, $1)=yes 6047ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6048ea133fd7Smrg _LT_TAGVAR(hardcode_direct_absolute, $1)=yes 6049ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' 6050ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6051ea133fd7Smrg if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then 6052ea133fd7Smrg _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' 6053ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' 6054ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' 6055ea133fd7Smrg fi 6056ea133fd7Smrg output_verbose_link_cmd=echo 6057ea133fd7Smrg else 6058ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6059ea133fd7Smrg fi 6060ea133fd7Smrg ;; 6061a253d6aeSmrg 6062ea133fd7Smrg osf3* | osf4* | osf5*) 6063ea133fd7Smrg case $cc_basename in 6064ea133fd7Smrg KCC*) 6065ea133fd7Smrg # Kuck and Associates, Inc. (KAI) C++ Compiler 6066ea133fd7Smrg 6067ea133fd7Smrg # KCC will only create a shared library if the output file 6068ea133fd7Smrg # ends with ".so" (or ".sl" for HP-UX), so rename the library 6069ea133fd7Smrg # to its proper name (with version) after linking. 6070ea133fd7Smrg _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' 6071ea133fd7Smrg 6072ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' 6073ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6074ea133fd7Smrg 6075ea133fd7Smrg # Archives containing C++ object files must be created using 6076ea133fd7Smrg # the KAI C++ compiler. 6077ea133fd7Smrg case $host in 6078ea133fd7Smrg osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; 6079ea133fd7Smrg *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; 6080ea133fd7Smrg esac 6081ea133fd7Smrg ;; 6082ea133fd7Smrg RCC*) 6083ea133fd7Smrg # Rational C++ 2.4.1 6084ea133fd7Smrg # FIXME: insert proper C++ library support 6085ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6086ea133fd7Smrg ;; 6087ea133fd7Smrg cxx*) 6088ea133fd7Smrg case $host in 6089ea133fd7Smrg osf3*) 6090ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6091ea133fd7Smrg _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' 6092ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6093ea133fd7Smrg ;; 6094ea133fd7Smrg *) 6095ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' 6096ea133fd7Smrg _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' 6097ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ 6098ea133fd7Smrg echo "-hidden">> $lib.exp~ 6099ea133fd7Smrg $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~ 6100ea133fd7Smrg $RM $lib.exp' 6101ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' 6102ea133fd7Smrg ;; 6103ea133fd7Smrg esac 6104a253d6aeSmrg 6105ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6106a253d6aeSmrg 6107ea133fd7Smrg # Commands to make compiler produce verbose output that lists 6108ea133fd7Smrg # what "hidden" libraries, object files and flags are used when 6109ea133fd7Smrg # linking a shared library. 6110ea133fd7Smrg # 6111ea133fd7Smrg # There doesn't appear to be a way to prevent this compiler from 6112ea133fd7Smrg # explicitly linking system object files so we need to strip them 6113ea133fd7Smrg # from the output so that they don't get included in the library 6114ea133fd7Smrg # dependencies. 6115ea133fd7Smrg 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' 6116ea133fd7Smrg ;; 6117ea133fd7Smrg *) 6118ea133fd7Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6119ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' 6120ea133fd7Smrg case $host in 6121ea133fd7Smrg osf3*) 6122ea133fd7Smrg _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' 6123ea133fd7Smrg ;; 6124ea133fd7Smrg *) 6125ea133fd7Smrg _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' 6126ea133fd7Smrg ;; 6127ea133fd7Smrg esac 6128ea133fd7Smrg 6129ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' 6130ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=: 6131ea133fd7Smrg 6132ea133fd7Smrg # Commands to make compiler produce verbose output that lists 6133ea133fd7Smrg # what "hidden" libraries, object files and flags are used when 6134ea133fd7Smrg # linking a shared library. 6135ea133fd7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6136ea133fd7Smrg 6137ea133fd7Smrg else 6138ea133fd7Smrg # FIXME: insert proper C++ library support 6139ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6140ea133fd7Smrg fi 6141ea133fd7Smrg ;; 6142ea133fd7Smrg esac 6143ea133fd7Smrg ;; 6144a253d6aeSmrg 6145ea133fd7Smrg psos*) 6146ea133fd7Smrg # FIXME: insert proper C++ library support 6147ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6148ea133fd7Smrg ;; 6149a253d6aeSmrg 6150ea133fd7Smrg sunos4*) 6151ea133fd7Smrg case $cc_basename in 6152ea133fd7Smrg CC*) 6153ea133fd7Smrg # Sun C++ 4.x 6154ea133fd7Smrg # FIXME: insert proper C++ library support 6155ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6156ea133fd7Smrg ;; 6157ea133fd7Smrg lcc*) 6158ea133fd7Smrg # Lucid 6159ea133fd7Smrg # FIXME: insert proper C++ library support 6160ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6161ea133fd7Smrg ;; 6162ea133fd7Smrg *) 6163ea133fd7Smrg # FIXME: insert proper C++ library support 6164ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6165ea133fd7Smrg ;; 6166ea133fd7Smrg esac 6167ea133fd7Smrg ;; 6168a253d6aeSmrg 6169ea133fd7Smrg solaris*) 6170ea133fd7Smrg case $cc_basename in 6171ea133fd7Smrg CC*) 6172ea133fd7Smrg # Sun C++ 4.2, 5.x and Centerline C++ 6173ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc,$1)=yes 6174ea133fd7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' 6175ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' 6176ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6177ea133fd7Smrg $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' 6178ea133fd7Smrg 6179ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' 6180ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6181ea133fd7Smrg case $host_os in 6182ea133fd7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6183ea133fd7Smrg *) 6184ea133fd7Smrg # The compiler driver will combine and reorder linker options, 6185ea133fd7Smrg # but understands `-z linker_flag'. 6186ea133fd7Smrg # Supported since Solaris 2.6 (maybe 2.5.1?) 6187ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' 6188ea133fd7Smrg ;; 6189ea133fd7Smrg esac 6190ea133fd7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6191a253d6aeSmrg 6192ea133fd7Smrg output_verbose_link_cmd='echo' 6193a253d6aeSmrg 6194ea133fd7Smrg # Archives containing C++ object files must be created using 6195ea133fd7Smrg # "CC -xar", where "CC" is the Sun C++ compiler. This is 6196ea133fd7Smrg # necessary to make sure instantiated templates are included 6197ea133fd7Smrg # in the archive. 6198ea133fd7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' 6199ea133fd7Smrg ;; 6200ea133fd7Smrg gcx*) 6201ea133fd7Smrg # Green Hills C++ Compiler 6202ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6203a253d6aeSmrg 6204ea133fd7Smrg # The C++ compiler must be used to create the archive. 6205ea133fd7Smrg _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' 6206ea133fd7Smrg ;; 6207ea133fd7Smrg *) 6208ea133fd7Smrg # GNU C++ compiler with Solaris linker 6209ea133fd7Smrg if test "$GXX" = yes && test "$with_gnu_ld" = no; then 6210ea133fd7Smrg _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' 6211ea133fd7Smrg if $CC --version | $GREP -v '^2\.7' > /dev/null; then 6212ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6213ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6214ea133fd7Smrg $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6215ea133fd7Smrg 6216ea133fd7Smrg # Commands to make compiler produce verbose output that lists 6217ea133fd7Smrg # what "hidden" libraries, object files and flags are used when 6218ea133fd7Smrg # linking a shared library. 6219ea133fd7Smrg output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6220ea133fd7Smrg else 6221ea133fd7Smrg # g++ 2.7 appears to require `-G' NOT `-shared' on this 6222ea133fd7Smrg # platform. 6223ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' 6224ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ 6225ea133fd7Smrg $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' 6226ea133fd7Smrg 6227ea133fd7Smrg # Commands to make compiler produce verbose output that lists 6228ea133fd7Smrg # what "hidden" libraries, object files and flags are used when 6229ea133fd7Smrg # linking a shared library. 6230ea133fd7Smrg output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' 6231ea133fd7Smrg fi 6232ea133fd7Smrg 6233ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' 6234ea133fd7Smrg case $host_os in 6235ea133fd7Smrg solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; 6236ea133fd7Smrg *) 6237ea133fd7Smrg _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' 6238ea133fd7Smrg ;; 6239ea133fd7Smrg esac 6240ea133fd7Smrg fi 6241ea133fd7Smrg ;; 6242ea133fd7Smrg esac 6243ea133fd7Smrg ;; 6244a253d6aeSmrg 6245ea133fd7Smrg sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) 6246ea133fd7Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6247ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6248ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6249ea133fd7Smrg runpath_var='LD_RUN_PATH' 6250a253d6aeSmrg 6251ea133fd7Smrg case $cc_basename in 6252ea133fd7Smrg CC*) 6253ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6254ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6255ea133fd7Smrg ;; 6256ea133fd7Smrg *) 6257ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6258ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6259ea133fd7Smrg ;; 6260ea133fd7Smrg esac 6261ea133fd7Smrg ;; 6262a253d6aeSmrg 6263ea133fd7Smrg sysv5* | sco3.2v5* | sco5v6*) 6264ea133fd7Smrg # Note: We can NOT use -z defs as we might desire, because we do not 6265ea133fd7Smrg # link with -lc, and that would cause any symbols used from libc to 6266ea133fd7Smrg # always be unresolved, which means just about no library would 6267ea133fd7Smrg # ever link correctly. If we're not using GNU ld we use -z text 6268ea133fd7Smrg # though, which does catch some bad symbols but isn't as heavy-handed 6269ea133fd7Smrg # as -z defs. 6270ea133fd7Smrg _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' 6271ea133fd7Smrg _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' 6272ea133fd7Smrg _LT_TAGVAR(archive_cmds_need_lc, $1)=no 6273ea133fd7Smrg _LT_TAGVAR(hardcode_shlibpath_var, $1)=no 6274ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' 6275ea133fd7Smrg _LT_TAGVAR(hardcode_libdir_separator, $1)=':' 6276ea133fd7Smrg _LT_TAGVAR(link_all_deplibs, $1)=yes 6277ea133fd7Smrg _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' 6278ea133fd7Smrg runpath_var='LD_RUN_PATH' 6279a253d6aeSmrg 6280ea133fd7Smrg case $cc_basename in 6281ea133fd7Smrg CC*) 6282ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6283ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6284ea133fd7Smrg ;; 6285ea133fd7Smrg *) 6286ea133fd7Smrg _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6287ea133fd7Smrg _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' 6288ea133fd7Smrg ;; 6289ea133fd7Smrg esac 6290ea133fd7Smrg ;; 6291a253d6aeSmrg 6292ea133fd7Smrg tandem*) 6293ea133fd7Smrg case $cc_basename in 6294ea133fd7Smrg NCC*) 6295ea133fd7Smrg # NonStop-UX NCC 3.20 6296ea133fd7Smrg # FIXME: insert proper C++ library support 6297ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6298ea133fd7Smrg ;; 6299ea133fd7Smrg *) 6300ea133fd7Smrg # FIXME: insert proper C++ library support 6301ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6302ea133fd7Smrg ;; 6303ea133fd7Smrg esac 6304ea133fd7Smrg ;; 6305a253d6aeSmrg 6306ea133fd7Smrg vxworks*) 6307ea133fd7Smrg # FIXME: insert proper C++ library support 6308ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6309ea133fd7Smrg ;; 6310a253d6aeSmrg 6311ea133fd7Smrg *) 6312ea133fd7Smrg # FIXME: insert proper C++ library support 6313ea133fd7Smrg _LT_TAGVAR(ld_shlibs, $1)=no 6314ea133fd7Smrg ;; 6315ea133fd7Smrg esac 6316a253d6aeSmrg 6317ea133fd7Smrg AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) 6318ea133fd7Smrg test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no 6319ea133fd7Smrg 6320ea133fd7Smrg _LT_TAGVAR(GCC, $1)="$GXX" 6321ea133fd7Smrg _LT_TAGVAR(LD, $1)="$LD" 6322ea133fd7Smrg 6323ea133fd7Smrg ## CAVEAT EMPTOR: 6324ea133fd7Smrg ## There is no encapsulation within the following macros, do not change 6325ea133fd7Smrg ## the running order or otherwise move them around unless you know exactly 6326ea133fd7Smrg ## what you are doing... 6327ea133fd7Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6328ea133fd7Smrg _LT_COMPILER_PIC($1) 6329ea133fd7Smrg _LT_COMPILER_C_O($1) 6330ea133fd7Smrg _LT_COMPILER_FILE_LOCKS($1) 6331ea133fd7Smrg _LT_LINKER_SHLIBS($1) 6332ea133fd7Smrg _LT_SYS_DYNAMIC_LINKER($1) 6333ea133fd7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6334ea133fd7Smrg 6335ea133fd7Smrg _LT_CONFIG($1) 6336ea133fd7Smrg fi # test -n "$compiler" 6337ea133fd7Smrg 6338ea133fd7Smrg CC=$lt_save_CC 6339ea133fd7Smrg LDCXX=$LD 6340ea133fd7Smrg LD=$lt_save_LD 6341ea133fd7Smrg GCC=$lt_save_GCC 6342ea133fd7Smrg with_gnu_ld=$lt_save_with_gnu_ld 6343ea133fd7Smrg lt_cv_path_LDCXX=$lt_cv_path_LD 6344ea133fd7Smrg lt_cv_path_LD=$lt_save_path_LD 6345ea133fd7Smrg lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld 6346ea133fd7Smrg lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld 6347ea133fd7Smrgfi # test "$_lt_caught_CXX_error" != yes 6348a253d6aeSmrg 6349ea133fd7SmrgAC_LANG_POP 6350ea133fd7Smrg])# _LT_LANG_CXX_CONFIG 6351a253d6aeSmrg 6352a253d6aeSmrg 6353ea133fd7Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) 6354ea133fd7Smrg# --------------------------------- 6355ea133fd7Smrg# Figure out "hidden" library dependencies from verbose 6356ea133fd7Smrg# compiler output when linking a shared library. 6357ea133fd7Smrg# Parse the compiler output and extract the necessary 6358ea133fd7Smrg# objects, libraries and library flags. 6359ea133fd7Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS], 6360ea133fd7Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl 6361ea133fd7Smrg# Dependencies to place before and after the object being linked: 6362ea133fd7Smrg_LT_TAGVAR(predep_objects, $1)= 6363ea133fd7Smrg_LT_TAGVAR(postdep_objects, $1)= 6364ea133fd7Smrg_LT_TAGVAR(predeps, $1)= 6365ea133fd7Smrg_LT_TAGVAR(postdeps, $1)= 6366ea133fd7Smrg_LT_TAGVAR(compiler_lib_search_path, $1)= 6367a253d6aeSmrg 6368ea133fd7Smrgdnl we can't use the lt_simple_compile_test_code here, 6369ea133fd7Smrgdnl because it contains code intended for an executable, 6370ea133fd7Smrgdnl not a library. It's possible we should let each 6371ea133fd7Smrgdnl tag define a new lt_????_link_test_code variable, 6372ea133fd7Smrgdnl but it's only used here... 6373ea133fd7Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF 6374ea133fd7Smrgint a; 6375ea133fd7Smrgvoid foo (void) { a = 0; } 6376ea133fd7Smrg_LT_EOF 6377ea133fd7Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF 6378ea133fd7Smrgclass Foo 6379ea133fd7Smrg{ 6380ea133fd7Smrgpublic: 6381ea133fd7Smrg Foo (void) { a = 0; } 6382ea133fd7Smrgprivate: 6383ea133fd7Smrg int a; 6384ea133fd7Smrg}; 6385ea133fd7Smrg_LT_EOF 6386ea133fd7Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF 6387ea133fd7Smrg subroutine foo 6388ea133fd7Smrg implicit none 6389ea133fd7Smrg integer*4 a 6390ea133fd7Smrg a=0 6391ea133fd7Smrg return 6392ea133fd7Smrg end 6393ea133fd7Smrg_LT_EOF 6394ea133fd7Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF 6395ea133fd7Smrg subroutine foo 6396ea133fd7Smrg implicit none 6397ea133fd7Smrg integer a 6398ea133fd7Smrg a=0 6399ea133fd7Smrg return 6400ea133fd7Smrg end 6401ea133fd7Smrg_LT_EOF 6402ea133fd7Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF 6403ea133fd7Smrgpublic class foo { 6404ea133fd7Smrg private int a; 6405ea133fd7Smrg public void bar (void) { 6406ea133fd7Smrg a = 0; 6407ea133fd7Smrg } 6408ea133fd7Smrg}; 6409ea133fd7Smrg_LT_EOF 6410ea133fd7Smrg]) 6411ea133fd7Smrgdnl Parse the compiler output and extract the necessary 6412ea133fd7Smrgdnl objects, libraries and library flags. 6413ea133fd7Smrgif AC_TRY_EVAL(ac_compile); then 6414ea133fd7Smrg # Parse the compiler output and extract the necessary 6415ea133fd7Smrg # objects, libraries and library flags. 6416a253d6aeSmrg 6417ea133fd7Smrg # Sentinel used to keep track of whether or not we are before 6418ea133fd7Smrg # the conftest object file. 6419ea133fd7Smrg pre_test_object_deps_done=no 6420a253d6aeSmrg 6421ea133fd7Smrg for p in `eval "$output_verbose_link_cmd"`; do 6422ea133fd7Smrg case $p in 6423a253d6aeSmrg 6424ea133fd7Smrg -L* | -R* | -l*) 6425ea133fd7Smrg # Some compilers place space between "-{L,R}" and the path. 6426ea133fd7Smrg # Remove the space. 6427ea133fd7Smrg if test $p = "-L" || 6428ea133fd7Smrg test $p = "-R"; then 6429ea133fd7Smrg prev=$p 6430ea133fd7Smrg continue 6431ea133fd7Smrg else 6432ea133fd7Smrg prev= 6433ea133fd7Smrg fi 6434a253d6aeSmrg 6435ea133fd7Smrg if test "$pre_test_object_deps_done" = no; then 6436ea133fd7Smrg case $p in 6437ea133fd7Smrg -L* | -R*) 6438ea133fd7Smrg # Internal compiler library paths should come after those 6439ea133fd7Smrg # provided the user. The postdeps already come after the 6440ea133fd7Smrg # user supplied libs so there is no need to process them. 6441ea133fd7Smrg if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then 6442ea133fd7Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" 6443ea133fd7Smrg else 6444ea133fd7Smrg _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" 6445ea133fd7Smrg fi 6446ea133fd7Smrg ;; 6447ea133fd7Smrg # The "-l" case would never come before the object being 6448ea133fd7Smrg # linked, so don't bother handling this case. 6449ea133fd7Smrg esac 6450ea133fd7Smrg else 6451ea133fd7Smrg if test -z "$_LT_TAGVAR(postdeps, $1)"; then 6452ea133fd7Smrg _LT_TAGVAR(postdeps, $1)="${prev}${p}" 6453ea133fd7Smrg else 6454ea133fd7Smrg _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" 6455ea133fd7Smrg fi 6456ea133fd7Smrg fi 6457ea133fd7Smrg ;; 6458a253d6aeSmrg 6459ea133fd7Smrg *.$objext) 6460ea133fd7Smrg # This assumes that the test object file only shows up 6461ea133fd7Smrg # once in the compiler output. 6462ea133fd7Smrg if test "$p" = "conftest.$objext"; then 6463ea133fd7Smrg pre_test_object_deps_done=yes 6464ea133fd7Smrg continue 6465ea133fd7Smrg fi 6466a253d6aeSmrg 6467ea133fd7Smrg if test "$pre_test_object_deps_done" = no; then 6468ea133fd7Smrg if test -z "$_LT_TAGVAR(predep_objects, $1)"; then 6469ea133fd7Smrg _LT_TAGVAR(predep_objects, $1)="$p" 6470ea133fd7Smrg else 6471ea133fd7Smrg _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" 6472ea133fd7Smrg fi 6473ea133fd7Smrg else 6474ea133fd7Smrg if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then 6475ea133fd7Smrg _LT_TAGVAR(postdep_objects, $1)="$p" 6476ea133fd7Smrg else 6477ea133fd7Smrg _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" 6478ea133fd7Smrg fi 6479ea133fd7Smrg fi 6480ea133fd7Smrg ;; 6481a253d6aeSmrg 6482ea133fd7Smrg *) ;; # Ignore the rest. 6483a253d6aeSmrg 6484ea133fd7Smrg esac 6485ea133fd7Smrg done 6486a253d6aeSmrg 6487ea133fd7Smrg # Clean up. 6488ea133fd7Smrg rm -f a.out a.exe 6489ea133fd7Smrgelse 6490ea133fd7Smrg echo "libtool.m4: error: problem compiling $1 test program" 6491ea133fd7Smrgfi 6492a253d6aeSmrg 6493ea133fd7Smrg$RM -f confest.$objext 6494a253d6aeSmrg 6495ea133fd7Smrg# PORTME: override above test on systems where it is broken 6496ea133fd7Smrgm4_if([$1], [CXX], 6497ea133fd7Smrg[case $host_os in 6498ea133fd7Smrginterix[[3-9]]*) 6499ea133fd7Smrg # Interix 3.5 installs completely hosed .la files for C++, so rather than 6500ea133fd7Smrg # hack all around it, let's just trust "g++" to DTRT. 6501ea133fd7Smrg _LT_TAGVAR(predep_objects,$1)= 6502ea133fd7Smrg _LT_TAGVAR(postdep_objects,$1)= 6503ea133fd7Smrg _LT_TAGVAR(postdeps,$1)= 6504ea133fd7Smrg ;; 6505a253d6aeSmrg 6506ea133fd7Smrglinux*) 6507ea133fd7Smrg case `$CC -V 2>&1 | sed 5q` in 6508ea133fd7Smrg *Sun\ C*) 6509ea133fd7Smrg # Sun C++ 5.9 6510ea133fd7Smrg 6511ea133fd7Smrg # The more standards-conforming stlport4 library is 6512ea133fd7Smrg # incompatible with the Cstd library. Avoid specifying 6513ea133fd7Smrg # it if it's in CXXFLAGS. Ignore libCrun as 6514ea133fd7Smrg # -library=stlport4 depends on it. 6515ea133fd7Smrg case " $CXX $CXXFLAGS " in 6516ea133fd7Smrg *" -library=stlport4 "*) 6517ea133fd7Smrg solaris_use_stlport4=yes 6518ea133fd7Smrg ;; 6519ea133fd7Smrg esac 6520a253d6aeSmrg 6521ea133fd7Smrg if test "$solaris_use_stlport4" != yes; then 6522ea133fd7Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6523ea133fd7Smrg fi 6524ea133fd7Smrg ;; 6525ea133fd7Smrg esac 6526ea133fd7Smrg ;; 6527a253d6aeSmrg 6528ea133fd7Smrgsolaris*) 6529ea133fd7Smrg case $cc_basename in 6530ea133fd7Smrg CC*) 6531ea133fd7Smrg # The more standards-conforming stlport4 library is 6532ea133fd7Smrg # incompatible with the Cstd library. Avoid specifying 6533ea133fd7Smrg # it if it's in CXXFLAGS. Ignore libCrun as 6534ea133fd7Smrg # -library=stlport4 depends on it. 6535ea133fd7Smrg case " $CXX $CXXFLAGS " in 6536ea133fd7Smrg *" -library=stlport4 "*) 6537ea133fd7Smrg solaris_use_stlport4=yes 6538ea133fd7Smrg ;; 6539ea133fd7Smrg esac 6540a253d6aeSmrg 6541ea133fd7Smrg # Adding this requires a known-good setup of shared libraries for 6542ea133fd7Smrg # Sun compiler versions before 5.6, else PIC objects from an old 6543ea133fd7Smrg # archive will be linked into the output, leading to subtle bugs. 6544ea133fd7Smrg if test "$solaris_use_stlport4" != yes; then 6545ea133fd7Smrg _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' 6546ea133fd7Smrg fi 6547ea133fd7Smrg ;; 6548ea133fd7Smrg esac 6549ea133fd7Smrg ;; 6550ea133fd7Smrgesac 6551ea133fd7Smrg]) 6552a253d6aeSmrg 6553ea133fd7Smrgcase " $_LT_TAGVAR(postdeps, $1) " in 6554ea133fd7Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; 6555ea133fd7Smrgesac 6556ea133fd7Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)= 6557ea133fd7Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then 6558ea133fd7Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` 6559ea133fd7Smrgfi 6560ea133fd7Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1], 6561ea133fd7Smrg [The directories searched by this compiler when creating a shared library]) 6562ea133fd7Smrg_LT_TAGDECL([], [predep_objects], [1], 6563ea133fd7Smrg [Dependencies to place before and after the objects being linked to 6564ea133fd7Smrg create a shared library]) 6565ea133fd7Smrg_LT_TAGDECL([], [postdep_objects], [1]) 6566ea133fd7Smrg_LT_TAGDECL([], [predeps], [1]) 6567ea133fd7Smrg_LT_TAGDECL([], [postdeps], [1]) 6568ea133fd7Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1], 6569ea133fd7Smrg [The library search path used internally by the compiler when linking 6570ea133fd7Smrg a shared library]) 6571ea133fd7Smrg])# _LT_SYS_HIDDEN_LIBDEPS 6572ea133fd7Smrg 6573ea133fd7Smrg 6574ea133fd7Smrg# _LT_PROG_F77 6575ea133fd7Smrg# ------------ 6576ea133fd7Smrg# Since AC_PROG_F77 is broken, in that it returns the empty string 6577ea133fd7Smrg# if there is no fortran compiler, we have our own version here. 6578ea133fd7Smrgm4_defun([_LT_PROG_F77], 6579ea133fd7Smrg[ 6580ea133fd7Smrgpushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) 6581ea133fd7SmrgAC_PROG_F77 6582ea133fd7Smrgif test -z "$F77" || test "X$F77" = "Xno"; then 6583ea133fd7Smrg _lt_disable_F77=yes 6584ea133fd7Smrgfi 6585ea133fd7Smrgpopdef([AC_MSG_ERROR]) 6586ea133fd7Smrg])# _LT_PROG_F77 6587a253d6aeSmrg 6588ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 6589ea133fd7Smrgdnl AC_DEFUN([_LT_PROG_F77], []) 6590a253d6aeSmrg 6591a253d6aeSmrg 6592ea133fd7Smrg# _LT_LANG_F77_CONFIG([TAG]) 6593ea133fd7Smrg# -------------------------- 6594ea133fd7Smrg# Ensure that the configuration variables for a Fortran 77 compiler are 6595ea133fd7Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6596ea133fd7Smrg# to write the compiler configuration to `libtool'. 6597ea133fd7Smrgm4_defun([_LT_LANG_F77_CONFIG], 6598ea133fd7Smrg[AC_REQUIRE([_LT_PROG_F77])dnl 6599ea133fd7SmrgAC_LANG_PUSH(Fortran 77) 6600a253d6aeSmrg 6601ea133fd7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6602ea133fd7Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6603ea133fd7Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6604ea133fd7Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6605ea133fd7Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6606ea133fd7Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6607ea133fd7Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6608ea133fd7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6609ea133fd7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6610ea133fd7Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6611ea133fd7Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6612ea133fd7Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6613ea133fd7Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6614ea133fd7Smrg_LT_TAGVAR(module_cmds, $1)= 6615ea133fd7Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6616ea133fd7Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6617ea133fd7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6618ea133fd7Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6619ea133fd7Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6620ea133fd7Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6621a253d6aeSmrg 6622ea133fd7Smrg# Source file extension for f77 test sources. 6623ea133fd7Smrgac_ext=f 6624a253d6aeSmrg 6625ea133fd7Smrg# Object file extension for compiled f77 test sources. 6626ea133fd7Smrgobjext=o 6627ea133fd7Smrg_LT_TAGVAR(objext, $1)=$objext 6628ea133fd7Smrg 6629ea133fd7Smrg# No sense in running all these tests if we already determined that 6630ea133fd7Smrg# the F77 compiler isn't working. Some variables (like enable_shared) 6631ea133fd7Smrg# are currently assumed to apply to all compilers on this platform, 6632ea133fd7Smrg# and will be corrupted by setting them based on a non-working compiler. 6633ea133fd7Smrgif test "$_lt_disable_F77" != yes; then 6634ea133fd7Smrg # Code to be used in simple compile tests 6635ea133fd7Smrg lt_simple_compile_test_code="\ 6636ea133fd7Smrg subroutine t 6637ea133fd7Smrg return 6638ea133fd7Smrg end 6639ea133fd7Smrg" 6640a253d6aeSmrg 6641ea133fd7Smrg # Code to be used in simple link tests 6642ea133fd7Smrg lt_simple_link_test_code="\ 6643ea133fd7Smrg program t 6644ea133fd7Smrg end 6645ea133fd7Smrg" 6646a253d6aeSmrg 6647ea133fd7Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6648ea133fd7Smrg _LT_TAG_COMPILER 6649a253d6aeSmrg 6650ea133fd7Smrg # save warnings/boilerplate of simple test code 6651ea133fd7Smrg _LT_COMPILER_BOILERPLATE 6652ea133fd7Smrg _LT_LINKER_BOILERPLATE 6653a253d6aeSmrg 6654ea133fd7Smrg # Allow CC to be a program name with arguments. 6655ea133fd7Smrg lt_save_CC="$CC" 6656ea133fd7Smrg lt_save_GCC=$GCC 6657ea133fd7Smrg CC=${F77-"f77"} 6658ea133fd7Smrg compiler=$CC 6659ea133fd7Smrg _LT_TAGVAR(compiler, $1)=$CC 6660ea133fd7Smrg _LT_CC_BASENAME([$compiler]) 6661ea133fd7Smrg GCC=$G77 6662ea133fd7Smrg if test -n "$compiler"; then 6663ea133fd7Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6664ea133fd7Smrg AC_MSG_RESULT([$can_build_shared]) 6665a253d6aeSmrg 6666ea133fd7Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6667ea133fd7Smrg test "$can_build_shared" = "no" && enable_shared=no 6668a253d6aeSmrg 6669ea133fd7Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6670ea133fd7Smrg # are all built from PIC. 6671ea133fd7Smrg case $host_os in 6672ea133fd7Smrg aix3*) 6673ea133fd7Smrg test "$enable_shared" = yes && enable_static=no 6674ea133fd7Smrg if test -n "$RANLIB"; then 6675ea133fd7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6676ea133fd7Smrg postinstall_cmds='$RANLIB $lib' 6677ea133fd7Smrg fi 6678ea133fd7Smrg ;; 6679ea133fd7Smrg aix[[4-9]]*) 6680ea133fd7Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6681ea133fd7Smrg test "$enable_shared" = yes && enable_static=no 6682ea133fd7Smrg fi 6683ea133fd7Smrg ;; 6684ea133fd7Smrg esac 6685ea133fd7Smrg AC_MSG_RESULT([$enable_shared]) 6686ea133fd7Smrg 6687ea133fd7Smrg AC_MSG_CHECKING([whether to build static libraries]) 6688ea133fd7Smrg # Make sure either enable_shared or enable_static is yes. 6689ea133fd7Smrg test "$enable_shared" = yes || enable_static=yes 6690ea133fd7Smrg AC_MSG_RESULT([$enable_static]) 6691ea133fd7Smrg 6692ea133fd7Smrg _LT_TAGVAR(GCC, $1)="$G77" 6693ea133fd7Smrg _LT_TAGVAR(LD, $1)="$LD" 6694ea133fd7Smrg 6695ea133fd7Smrg ## CAVEAT EMPTOR: 6696ea133fd7Smrg ## There is no encapsulation within the following macros, do not change 6697ea133fd7Smrg ## the running order or otherwise move them around unless you know exactly 6698ea133fd7Smrg ## what you are doing... 6699ea133fd7Smrg _LT_COMPILER_PIC($1) 6700ea133fd7Smrg _LT_COMPILER_C_O($1) 6701ea133fd7Smrg _LT_COMPILER_FILE_LOCKS($1) 6702ea133fd7Smrg _LT_LINKER_SHLIBS($1) 6703ea133fd7Smrg _LT_SYS_DYNAMIC_LINKER($1) 6704ea133fd7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6705ea133fd7Smrg 6706ea133fd7Smrg _LT_CONFIG($1) 6707ea133fd7Smrg fi # test -n "$compiler" 6708ea133fd7Smrg 6709ea133fd7Smrg GCC=$lt_save_GCC 6710ea133fd7Smrg CC="$lt_save_CC" 6711ea133fd7Smrgfi # test "$_lt_disable_F77" != yes 6712a253d6aeSmrg 6713ea133fd7SmrgAC_LANG_POP 6714ea133fd7Smrg])# _LT_LANG_F77_CONFIG 6715a253d6aeSmrg 6716a253d6aeSmrg 6717ea133fd7Smrg# _LT_PROG_FC 6718ea133fd7Smrg# ----------- 6719ea133fd7Smrg# Since AC_PROG_FC is broken, in that it returns the empty string 6720ea133fd7Smrg# if there is no fortran compiler, we have our own version here. 6721ea133fd7Smrgm4_defun([_LT_PROG_FC], 6722ea133fd7Smrg[ 6723ea133fd7Smrgpushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) 6724ea133fd7SmrgAC_PROG_FC 6725ea133fd7Smrgif test -z "$FC" || test "X$FC" = "Xno"; then 6726ea133fd7Smrg _lt_disable_FC=yes 6727ea133fd7Smrgfi 6728ea133fd7Smrgpopdef([AC_MSG_ERROR]) 6729ea133fd7Smrg])# _LT_PROG_FC 6730a253d6aeSmrg 6731ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 6732ea133fd7Smrgdnl AC_DEFUN([_LT_PROG_FC], []) 6733a253d6aeSmrg 6734a253d6aeSmrg 6735ea133fd7Smrg# _LT_LANG_FC_CONFIG([TAG]) 6736ea133fd7Smrg# ------------------------- 6737ea133fd7Smrg# Ensure that the configuration variables for a Fortran compiler are 6738ea133fd7Smrg# suitably defined. These variables are subsequently used by _LT_CONFIG 6739ea133fd7Smrg# to write the compiler configuration to `libtool'. 6740ea133fd7Smrgm4_defun([_LT_LANG_FC_CONFIG], 6741ea133fd7Smrg[AC_REQUIRE([_LT_PROG_FC])dnl 6742ea133fd7SmrgAC_LANG_PUSH(Fortran) 6743ea133fd7Smrg 6744ea133fd7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6745ea133fd7Smrg_LT_TAGVAR(allow_undefined_flag, $1)= 6746ea133fd7Smrg_LT_TAGVAR(always_export_symbols, $1)=no 6747ea133fd7Smrg_LT_TAGVAR(archive_expsym_cmds, $1)= 6748ea133fd7Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)= 6749ea133fd7Smrg_LT_TAGVAR(hardcode_direct, $1)=no 6750ea133fd7Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no 6751ea133fd7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)= 6752ea133fd7Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= 6753ea133fd7Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)= 6754ea133fd7Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no 6755ea133fd7Smrg_LT_TAGVAR(hardcode_automatic, $1)=no 6756ea133fd7Smrg_LT_TAGVAR(inherit_rpath, $1)=no 6757ea133fd7Smrg_LT_TAGVAR(module_cmds, $1)= 6758ea133fd7Smrg_LT_TAGVAR(module_expsym_cmds, $1)= 6759ea133fd7Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown 6760ea133fd7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6761ea133fd7Smrg_LT_TAGVAR(no_undefined_flag, $1)= 6762ea133fd7Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)= 6763ea133fd7Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no 6764ea133fd7Smrg 6765ea133fd7Smrg# Source file extension for fc test sources. 6766ea133fd7Smrgac_ext=${ac_fc_srcext-f} 6767ea133fd7Smrg 6768ea133fd7Smrg# Object file extension for compiled fc test sources. 6769ea133fd7Smrgobjext=o 6770ea133fd7Smrg_LT_TAGVAR(objext, $1)=$objext 6771ea133fd7Smrg 6772ea133fd7Smrg# No sense in running all these tests if we already determined that 6773ea133fd7Smrg# the FC compiler isn't working. Some variables (like enable_shared) 6774ea133fd7Smrg# are currently assumed to apply to all compilers on this platform, 6775ea133fd7Smrg# and will be corrupted by setting them based on a non-working compiler. 6776ea133fd7Smrgif test "$_lt_disable_FC" != yes; then 6777ea133fd7Smrg # Code to be used in simple compile tests 6778ea133fd7Smrg lt_simple_compile_test_code="\ 6779ea133fd7Smrg subroutine t 6780ea133fd7Smrg return 6781ea133fd7Smrg end 6782ea133fd7Smrg" 6783a253d6aeSmrg 6784ea133fd7Smrg # Code to be used in simple link tests 6785ea133fd7Smrg lt_simple_link_test_code="\ 6786ea133fd7Smrg program t 6787ea133fd7Smrg end 6788ea133fd7Smrg" 6789a253d6aeSmrg 6790ea133fd7Smrg # ltmain only uses $CC for tagged configurations so make sure $CC is set. 6791ea133fd7Smrg _LT_TAG_COMPILER 6792a253d6aeSmrg 6793ea133fd7Smrg # save warnings/boilerplate of simple test code 6794ea133fd7Smrg _LT_COMPILER_BOILERPLATE 6795ea133fd7Smrg _LT_LINKER_BOILERPLATE 6796a253d6aeSmrg 6797ea133fd7Smrg # Allow CC to be a program name with arguments. 6798ea133fd7Smrg lt_save_CC="$CC" 6799ea133fd7Smrg lt_save_GCC=$GCC 6800ea133fd7Smrg CC=${FC-"f95"} 6801ea133fd7Smrg compiler=$CC 6802ea133fd7Smrg GCC=$ac_cv_fc_compiler_gnu 6803a253d6aeSmrg 6804ea133fd7Smrg _LT_TAGVAR(compiler, $1)=$CC 6805ea133fd7Smrg _LT_CC_BASENAME([$compiler]) 6806a253d6aeSmrg 6807ea133fd7Smrg if test -n "$compiler"; then 6808ea133fd7Smrg AC_MSG_CHECKING([if libtool supports shared libraries]) 6809ea133fd7Smrg AC_MSG_RESULT([$can_build_shared]) 6810a253d6aeSmrg 6811ea133fd7Smrg AC_MSG_CHECKING([whether to build shared libraries]) 6812ea133fd7Smrg test "$can_build_shared" = "no" && enable_shared=no 6813a253d6aeSmrg 6814ea133fd7Smrg # On AIX, shared libraries and static libraries use the same namespace, and 6815ea133fd7Smrg # are all built from PIC. 6816ea133fd7Smrg case $host_os in 6817ea133fd7Smrg aix3*) 6818ea133fd7Smrg test "$enable_shared" = yes && enable_static=no 6819ea133fd7Smrg if test -n "$RANLIB"; then 6820ea133fd7Smrg archive_cmds="$archive_cmds~\$RANLIB \$lib" 6821ea133fd7Smrg postinstall_cmds='$RANLIB $lib' 6822ea133fd7Smrg fi 6823ea133fd7Smrg ;; 6824ea133fd7Smrg aix[[4-9]]*) 6825ea133fd7Smrg if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then 6826ea133fd7Smrg test "$enable_shared" = yes && enable_static=no 6827ea133fd7Smrg fi 6828ea133fd7Smrg ;; 6829ea133fd7Smrg esac 6830ea133fd7Smrg AC_MSG_RESULT([$enable_shared]) 6831ea133fd7Smrg 6832ea133fd7Smrg AC_MSG_CHECKING([whether to build static libraries]) 6833ea133fd7Smrg # Make sure either enable_shared or enable_static is yes. 6834ea133fd7Smrg test "$enable_shared" = yes || enable_static=yes 6835ea133fd7Smrg AC_MSG_RESULT([$enable_static]) 6836ea133fd7Smrg 6837ea133fd7Smrg _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" 6838ea133fd7Smrg _LT_TAGVAR(LD, $1)="$LD" 6839ea133fd7Smrg 6840ea133fd7Smrg ## CAVEAT EMPTOR: 6841ea133fd7Smrg ## There is no encapsulation within the following macros, do not change 6842ea133fd7Smrg ## the running order or otherwise move them around unless you know exactly 6843ea133fd7Smrg ## what you are doing... 6844ea133fd7Smrg _LT_SYS_HIDDEN_LIBDEPS($1) 6845ea133fd7Smrg _LT_COMPILER_PIC($1) 6846ea133fd7Smrg _LT_COMPILER_C_O($1) 6847ea133fd7Smrg _LT_COMPILER_FILE_LOCKS($1) 6848ea133fd7Smrg _LT_LINKER_SHLIBS($1) 6849ea133fd7Smrg _LT_SYS_DYNAMIC_LINKER($1) 6850ea133fd7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6851ea133fd7Smrg 6852ea133fd7Smrg _LT_CONFIG($1) 6853ea133fd7Smrg fi # test -n "$compiler" 6854ea133fd7Smrg 6855ea133fd7Smrg GCC=$lt_save_GCC 6856ea133fd7Smrg CC="$lt_save_CC" 6857ea133fd7Smrgfi # test "$_lt_disable_FC" != yes 6858a253d6aeSmrg 6859ea133fd7SmrgAC_LANG_POP 6860ea133fd7Smrg])# _LT_LANG_FC_CONFIG 6861a253d6aeSmrg 6862a253d6aeSmrg 6863ea133fd7Smrg# _LT_LANG_GCJ_CONFIG([TAG]) 6864ea133fd7Smrg# -------------------------- 6865ea133fd7Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler 6866ea133fd7Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6867ea133fd7Smrg# to write the compiler configuration to `libtool'. 6868ea133fd7Smrgm4_defun([_LT_LANG_GCJ_CONFIG], 6869ea133fd7Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl 6870ea133fd7SmrgAC_LANG_SAVE 6871a253d6aeSmrg 6872ea133fd7Smrg# Source file extension for Java test sources. 6873ea133fd7Smrgac_ext=java 6874ea133fd7Smrg 6875ea133fd7Smrg# Object file extension for compiled Java test sources. 6876ea133fd7Smrgobjext=o 6877ea133fd7Smrg_LT_TAGVAR(objext, $1)=$objext 6878a253d6aeSmrg 6879ea133fd7Smrg# Code to be used in simple compile tests 6880ea133fd7Smrglt_simple_compile_test_code="class foo {}" 6881a253d6aeSmrg 6882ea133fd7Smrg# Code to be used in simple link tests 6883ea133fd7Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' 6884a253d6aeSmrg 6885ea133fd7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6886ea133fd7Smrg_LT_TAG_COMPILER 6887a253d6aeSmrg 6888ea133fd7Smrg# save warnings/boilerplate of simple test code 6889ea133fd7Smrg_LT_COMPILER_BOILERPLATE 6890ea133fd7Smrg_LT_LINKER_BOILERPLATE 6891a253d6aeSmrg 6892ea133fd7Smrg# Allow CC to be a program name with arguments. 6893ea133fd7Smrglt_save_CC="$CC" 6894ea133fd7Smrglt_save_GCC=$GCC 6895ea133fd7SmrgGCC=yes 6896ea133fd7SmrgCC=${GCJ-"gcj"} 6897ea133fd7Smrgcompiler=$CC 6898ea133fd7Smrg_LT_TAGVAR(compiler, $1)=$CC 6899ea133fd7Smrg_LT_TAGVAR(LD, $1)="$LD" 6900ea133fd7Smrg_LT_CC_BASENAME([$compiler]) 6901ea133fd7Smrg 6902ea133fd7Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in. 6903ea133fd7Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no 6904ea133fd7Smrg 6905ea133fd7Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds 6906ea133fd7Smrg 6907ea133fd7Smrgif test -n "$compiler"; then 6908ea133fd7Smrg _LT_COMPILER_NO_RTTI($1) 6909ea133fd7Smrg _LT_COMPILER_PIC($1) 6910ea133fd7Smrg _LT_COMPILER_C_O($1) 6911ea133fd7Smrg _LT_COMPILER_FILE_LOCKS($1) 6912ea133fd7Smrg _LT_LINKER_SHLIBS($1) 6913ea133fd7Smrg _LT_LINKER_HARDCODE_LIBPATH($1) 6914ea133fd7Smrg 6915ea133fd7Smrg _LT_CONFIG($1) 6916a253d6aeSmrgfi 6917a253d6aeSmrg 6918ea133fd7SmrgAC_LANG_RESTORE 6919a253d6aeSmrg 6920ea133fd7SmrgGCC=$lt_save_GCC 6921ea133fd7SmrgCC="$lt_save_CC" 6922ea133fd7Smrg])# _LT_LANG_GCJ_CONFIG 6923a253d6aeSmrg 6924a253d6aeSmrg 6925ea133fd7Smrg# _LT_LANG_RC_CONFIG([TAG]) 6926ea133fd7Smrg# ------------------------- 6927ea133fd7Smrg# Ensure that the configuration variables for the Windows resource compiler 6928ea133fd7Smrg# are suitably defined. These variables are subsequently used by _LT_CONFIG 6929ea133fd7Smrg# to write the compiler configuration to `libtool'. 6930ea133fd7Smrgm4_defun([_LT_LANG_RC_CONFIG], 6931ea133fd7Smrg[AC_REQUIRE([LT_PROG_RC])dnl 6932ea133fd7SmrgAC_LANG_SAVE 6933a253d6aeSmrg 6934ea133fd7Smrg# Source file extension for RC test sources. 6935ea133fd7Smrgac_ext=rc 6936a253d6aeSmrg 6937ea133fd7Smrg# Object file extension for compiled RC test sources. 6938ea133fd7Smrgobjext=o 6939ea133fd7Smrg_LT_TAGVAR(objext, $1)=$objext 6940a253d6aeSmrg 6941ea133fd7Smrg# Code to be used in simple compile tests 6942ea133fd7Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' 6943a253d6aeSmrg 6944ea133fd7Smrg# Code to be used in simple link tests 6945ea133fd7Smrglt_simple_link_test_code="$lt_simple_compile_test_code" 6946a253d6aeSmrg 6947ea133fd7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set. 6948ea133fd7Smrg_LT_TAG_COMPILER 6949a253d6aeSmrg 6950ea133fd7Smrg# save warnings/boilerplate of simple test code 6951ea133fd7Smrg_LT_COMPILER_BOILERPLATE 6952ea133fd7Smrg_LT_LINKER_BOILERPLATE 6953a253d6aeSmrg 6954ea133fd7Smrg# Allow CC to be a program name with arguments. 6955ea133fd7Smrglt_save_CC="$CC" 6956ea133fd7Smrglt_save_GCC=$GCC 6957ea133fd7SmrgGCC= 6958ea133fd7SmrgCC=${RC-"windres"} 6959ea133fd7Smrgcompiler=$CC 6960ea133fd7Smrg_LT_TAGVAR(compiler, $1)=$CC 6961ea133fd7Smrg_LT_CC_BASENAME([$compiler]) 6962ea133fd7Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes 6963a253d6aeSmrg 6964ea133fd7Smrgif test -n "$compiler"; then 6965ea133fd7Smrg : 6966ea133fd7Smrg _LT_CONFIG($1) 6967ea133fd7Smrgfi 6968a253d6aeSmrg 6969ea133fd7SmrgGCC=$lt_save_GCC 6970ea133fd7SmrgAC_LANG_RESTORE 6971ea133fd7SmrgCC="$lt_save_CC" 6972ea133fd7Smrg])# _LT_LANG_RC_CONFIG 6973a253d6aeSmrg 6974a253d6aeSmrg 6975ea133fd7Smrg# LT_PROG_GCJ 6976ea133fd7Smrg# ----------- 6977ea133fd7SmrgAC_DEFUN([LT_PROG_GCJ], 6978ea133fd7Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], 6979ea133fd7Smrg [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], 6980ea133fd7Smrg [AC_CHECK_TOOL(GCJ, gcj,) 6981ea133fd7Smrg test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" 6982ea133fd7Smrg AC_SUBST(GCJFLAGS)])])[]dnl 6983ea133fd7Smrg]) 6984a253d6aeSmrg 6985ea133fd7Smrg# Old name: 6986ea133fd7SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) 6987ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 6988ea133fd7Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], []) 6989a253d6aeSmrg 6990a253d6aeSmrg 6991ea133fd7Smrg# LT_PROG_RC 6992ea133fd7Smrg# ---------- 6993ea133fd7SmrgAC_DEFUN([LT_PROG_RC], 6994ea133fd7Smrg[AC_CHECK_TOOL(RC, windres,) 6995ea133fd7Smrg]) 6996a253d6aeSmrg 6997ea133fd7Smrg# Old name: 6998ea133fd7SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) 6999ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 7000ea133fd7Smrgdnl AC_DEFUN([LT_AC_PROG_RC], []) 7001a253d6aeSmrg 7002a253d6aeSmrg 7003ea133fd7Smrg# _LT_DECL_EGREP 7004ea133fd7Smrg# -------------- 7005ea133fd7Smrg# If we don't have a new enough Autoconf to choose the best grep 7006ea133fd7Smrg# available, choose the one first in the user's PATH. 7007ea133fd7Smrgm4_defun([_LT_DECL_EGREP], 7008ea133fd7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl 7009ea133fd7SmrgAC_REQUIRE([AC_PROG_FGREP])dnl 7010ea133fd7Smrgtest -z "$GREP" && GREP=grep 7011ea133fd7Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines]) 7012ea133fd7Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher]) 7013ea133fd7Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher]) 7014ea133fd7Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too 7015ea133fd7SmrgAC_SUBST([GREP]) 7016a253d6aeSmrg]) 7017a253d6aeSmrg 7018a253d6aeSmrg 7019ea133fd7Smrg# _LT_DECL_OBJDUMP 7020ea133fd7Smrg# -------------- 7021ea133fd7Smrg# If we don't have a new enough Autoconf to choose the best objdump 7022ea133fd7Smrg# available, choose the one first in the user's PATH. 7023ea133fd7Smrgm4_defun([_LT_DECL_OBJDUMP], 7024ea133fd7Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false) 7025ea133fd7Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7026ea133fd7Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) 7027ea133fd7SmrgAC_SUBST([OBJDUMP]) 7028ea133fd7Smrg]) 7029a253d6aeSmrg 7030a253d6aeSmrg 7031ea133fd7Smrg# _LT_DECL_SED 7032ea133fd7Smrg# ------------ 7033ea133fd7Smrg# Check for a fully-functional sed program, that truncates 7034ea133fd7Smrg# as few characters as possible. Prefer GNU sed if found. 7035ea133fd7Smrgm4_defun([_LT_DECL_SED], 7036ea133fd7Smrg[AC_PROG_SED 7037ea133fd7Smrgtest -z "$SED" && SED=sed 7038ea133fd7SmrgXsed="$SED -e 1s/^X//" 7039ea133fd7Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output]) 7040ea133fd7Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], 7041ea133fd7Smrg [Sed that helps us avoid accidentally triggering echo(1) options like -n]) 7042ea133fd7Smrg])# _LT_DECL_SED 7043ea133fd7Smrg 7044ea133fd7Smrgm4_ifndef([AC_PROG_SED], [ 7045ea133fd7Smrg# NOTE: This macro has been submitted for inclusion into # 7046ea133fd7Smrg# GNU Autoconf as AC_PROG_SED. When it is available in # 7047ea133fd7Smrg# a released version of Autoconf we should remove this # 7048ea133fd7Smrg# macro and use it instead. # 7049ea133fd7Smrg 7050ea133fd7Smrgm4_defun([AC_PROG_SED], 7051ea133fd7Smrg[AC_MSG_CHECKING([for a sed that does not truncate output]) 7052ea133fd7SmrgAC_CACHE_VAL(lt_cv_path_SED, 7053ea133fd7Smrg[# Loop through the user's path and test for sed and gsed. 7054ea133fd7Smrg# Then use that list of sed's as ones to test for truncation. 7055ea133fd7Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7056ea133fd7Smrgfor as_dir in $PATH 7057ea133fd7Smrgdo 7058ea133fd7Smrg IFS=$as_save_IFS 7059ea133fd7Smrg test -z "$as_dir" && as_dir=. 7060ea133fd7Smrg for lt_ac_prog in sed gsed; do 7061ea133fd7Smrg for ac_exec_ext in '' $ac_executable_extensions; do 7062ea133fd7Smrg if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then 7063ea133fd7Smrg lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" 7064a253d6aeSmrg fi 7065ea133fd7Smrg done 7066ea133fd7Smrg done 7067ea133fd7Smrgdone 7068ea133fd7SmrgIFS=$as_save_IFS 7069ea133fd7Smrglt_ac_max=0 7070ea133fd7Smrglt_ac_count=0 7071ea133fd7Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris 7072ea133fd7Smrg# along with /bin/sed that truncates output. 7073ea133fd7Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do 7074ea133fd7Smrg test ! -f $lt_ac_sed && continue 7075ea133fd7Smrg cat /dev/null > conftest.in 7076ea133fd7Smrg lt_ac_count=0 7077ea133fd7Smrg echo $ECHO_N "0123456789$ECHO_C" >conftest.in 7078ea133fd7Smrg # Check for GNU sed and select it if it is found. 7079ea133fd7Smrg if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then 7080ea133fd7Smrg lt_cv_path_SED=$lt_ac_sed 7081ea133fd7Smrg break 7082ea133fd7Smrg fi 7083ea133fd7Smrg while true; do 7084ea133fd7Smrg cat conftest.in conftest.in >conftest.tmp 7085ea133fd7Smrg mv conftest.tmp conftest.in 7086ea133fd7Smrg cp conftest.in conftest.nl 7087ea133fd7Smrg echo >>conftest.nl 7088ea133fd7Smrg $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break 7089ea133fd7Smrg cmp -s conftest.out conftest.nl || break 7090ea133fd7Smrg # 10000 chars as input seems more than enough 7091ea133fd7Smrg test $lt_ac_count -gt 10 && break 7092ea133fd7Smrg lt_ac_count=`expr $lt_ac_count + 1` 7093ea133fd7Smrg if test $lt_ac_count -gt $lt_ac_max; then 7094ea133fd7Smrg lt_ac_max=$lt_ac_count 7095ea133fd7Smrg lt_cv_path_SED=$lt_ac_sed 7096ea133fd7Smrg fi 7097ea133fd7Smrg done 7098ea133fd7Smrgdone 7099ea133fd7Smrg]) 7100ea133fd7SmrgSED=$lt_cv_path_SED 7101ea133fd7SmrgAC_SUBST([SED]) 7102ea133fd7SmrgAC_MSG_RESULT([$SED]) 7103ea133fd7Smrg])#AC_PROG_SED 7104ea133fd7Smrg])#m4_ifndef 7105ea133fd7Smrg 7106ea133fd7Smrg# Old name: 7107ea133fd7SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) 7108ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 7109ea133fd7Smrgdnl AC_DEFUN([LT_AC_PROG_SED], []) 7110ea133fd7Smrg 7111ea133fd7Smrg 7112ea133fd7Smrg# _LT_CHECK_SHELL_FEATURES 7113ea133fd7Smrg# ------------------------ 7114ea133fd7Smrg# Find out whether the shell is Bourne or XSI compatible, 7115ea133fd7Smrg# or has some other useful features. 7116ea133fd7Smrgm4_defun([_LT_CHECK_SHELL_FEATURES], 7117ea133fd7Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs]) 7118ea133fd7Smrg# Try some XSI features 7119ea133fd7Smrgxsi_shell=no 7120ea133fd7Smrg( _lt_dummy="a/b/c" 7121ea133fd7Smrg test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ 7122ea133fd7Smrg = c,a/b,, \ 7123ea133fd7Smrg && eval 'test $(( 1 + 1 )) -eq 2 \ 7124ea133fd7Smrg && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ 7125ea133fd7Smrg && xsi_shell=yes 7126ea133fd7SmrgAC_MSG_RESULT([$xsi_shell]) 7127ea133fd7Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) 7128ea133fd7Smrg 7129ea133fd7SmrgAC_MSG_CHECKING([whether the shell understands "+="]) 7130ea133fd7Smrglt_shell_append=no 7131ea133fd7Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ 7132ea133fd7Smrg >/dev/null 2>&1 \ 7133ea133fd7Smrg && lt_shell_append=yes 7134ea133fd7SmrgAC_MSG_RESULT([$lt_shell_append]) 7135ea133fd7Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) 7136ea133fd7Smrg 7137ea133fd7Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 7138ea133fd7Smrg lt_unset=unset 7139ea133fd7Smrgelse 7140ea133fd7Smrg lt_unset=false 7141ea133fd7Smrgfi 7142ea133fd7Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl 7143ea133fd7Smrg 7144ea133fd7Smrg# test EBCDIC or ASCII 7145ea133fd7Smrgcase `echo X|tr X '\101'` in 7146ea133fd7Smrg A) # ASCII based system 7147ea133fd7Smrg # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr 7148ea133fd7Smrg lt_SP2NL='tr \040 \012' 7149ea133fd7Smrg lt_NL2SP='tr \015\012 \040\040' 7150ea133fd7Smrg ;; 7151ea133fd7Smrg *) # EBCDIC based system 7152ea133fd7Smrg lt_SP2NL='tr \100 \n' 7153ea133fd7Smrg lt_NL2SP='tr \r\n \100\100' 7154ea133fd7Smrg ;; 7155ea133fd7Smrgesac 7156ea133fd7Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl 7157ea133fd7Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl 7158ea133fd7Smrg])# _LT_CHECK_SHELL_FEATURES 7159ea133fd7Smrg 7160ea133fd7Smrg 7161ea133fd7Smrg# _LT_PROG_XSI_SHELLFNS 7162ea133fd7Smrg# --------------------- 7163ea133fd7Smrg# Bourne and XSI compatible variants of some useful shell functions. 7164ea133fd7Smrgm4_defun([_LT_PROG_XSI_SHELLFNS], 7165ea133fd7Smrg[case $xsi_shell in 7166ea133fd7Smrg yes) 7167ea133fd7Smrg cat << \_LT_EOF >> "$cfgfile" 7168ea133fd7Smrg 7169ea133fd7Smrg# func_dirname file append nondir_replacement 7170ea133fd7Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7171ea133fd7Smrg# otherwise set result to NONDIR_REPLACEMENT. 7172ea133fd7Smrgfunc_dirname () 7173ea133fd7Smrg{ 7174ea133fd7Smrg case ${1} in 7175ea133fd7Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7176ea133fd7Smrg * ) func_dirname_result="${3}" ;; 7177ea133fd7Smrg esac 7178ea133fd7Smrg} 7179ea133fd7Smrg 7180ea133fd7Smrg# func_basename file 7181ea133fd7Smrgfunc_basename () 7182ea133fd7Smrg{ 7183ea133fd7Smrg func_basename_result="${1##*/}" 7184ea133fd7Smrg} 7185ea133fd7Smrg 7186ea133fd7Smrg# func_dirname_and_basename file append nondir_replacement 7187ea133fd7Smrg# perform func_basename and func_dirname in a single function 7188ea133fd7Smrg# call: 7189ea133fd7Smrg# dirname: Compute the dirname of FILE. If nonempty, 7190ea133fd7Smrg# add APPEND to the result, otherwise set result 7191ea133fd7Smrg# to NONDIR_REPLACEMENT. 7192ea133fd7Smrg# value returned in "$func_dirname_result" 7193ea133fd7Smrg# basename: Compute filename of FILE. 7194ea133fd7Smrg# value retuned in "$func_basename_result" 7195ea133fd7Smrg# Implementation must be kept synchronized with func_dirname 7196ea133fd7Smrg# and func_basename. For efficiency, we do not delegate to 7197ea133fd7Smrg# those functions but instead duplicate the functionality here. 7198ea133fd7Smrgfunc_dirname_and_basename () 7199ea133fd7Smrg{ 7200ea133fd7Smrg case ${1} in 7201ea133fd7Smrg */*) func_dirname_result="${1%/*}${2}" ;; 7202ea133fd7Smrg * ) func_dirname_result="${3}" ;; 7203ea133fd7Smrg esac 7204ea133fd7Smrg func_basename_result="${1##*/}" 7205ea133fd7Smrg} 7206ea133fd7Smrg 7207ea133fd7Smrg# func_stripname prefix suffix name 7208ea133fd7Smrg# strip PREFIX and SUFFIX off of NAME. 7209ea133fd7Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7210ea133fd7Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7211ea133fd7Smrg# dot (in which case that matches only a dot). 7212ea133fd7Smrgfunc_stripname () 7213ea133fd7Smrg{ 7214ea133fd7Smrg # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are 7215ea133fd7Smrg # positional parameters, so assign one to ordinary parameter first. 7216ea133fd7Smrg func_stripname_result=${3} 7217ea133fd7Smrg func_stripname_result=${func_stripname_result#"${1}"} 7218ea133fd7Smrg func_stripname_result=${func_stripname_result%"${2}"} 7219ea133fd7Smrg} 7220ea133fd7Smrg 7221ea133fd7Smrg# func_opt_split 7222ea133fd7Smrgfunc_opt_split () 7223ea133fd7Smrg{ 7224ea133fd7Smrg func_opt_split_opt=${1%%=*} 7225ea133fd7Smrg func_opt_split_arg=${1#*=} 7226ea133fd7Smrg} 7227ea133fd7Smrg 7228ea133fd7Smrg# func_lo2o object 7229ea133fd7Smrgfunc_lo2o () 7230ea133fd7Smrg{ 7231ea133fd7Smrg case ${1} in 7232ea133fd7Smrg *.lo) func_lo2o_result=${1%.lo}.${objext} ;; 7233ea133fd7Smrg *) func_lo2o_result=${1} ;; 7234ea133fd7Smrg esac 7235ea133fd7Smrg} 7236ea133fd7Smrg 7237ea133fd7Smrg# func_xform libobj-or-source 7238ea133fd7Smrgfunc_xform () 7239ea133fd7Smrg{ 7240ea133fd7Smrg func_xform_result=${1%.*}.lo 7241ea133fd7Smrg} 7242ea133fd7Smrg 7243ea133fd7Smrg# func_arith arithmetic-term... 7244ea133fd7Smrgfunc_arith () 7245ea133fd7Smrg{ 7246ea133fd7Smrg func_arith_result=$(( $[*] )) 7247ea133fd7Smrg} 7248ea133fd7Smrg 7249ea133fd7Smrg# func_len string 7250ea133fd7Smrg# STRING may not start with a hyphen. 7251ea133fd7Smrgfunc_len () 7252ea133fd7Smrg{ 7253ea133fd7Smrg func_len_result=${#1} 7254ea133fd7Smrg} 7255ea133fd7Smrg 7256ea133fd7Smrg_LT_EOF 7257ea133fd7Smrg ;; 7258ea133fd7Smrg *) # Bourne compatible functions. 7259ea133fd7Smrg cat << \_LT_EOF >> "$cfgfile" 7260ea133fd7Smrg 7261ea133fd7Smrg# func_dirname file append nondir_replacement 7262ea133fd7Smrg# Compute the dirname of FILE. If nonempty, add APPEND to the result, 7263ea133fd7Smrg# otherwise set result to NONDIR_REPLACEMENT. 7264ea133fd7Smrgfunc_dirname () 7265ea133fd7Smrg{ 7266ea133fd7Smrg # Extract subdirectory from the argument. 7267ea133fd7Smrg func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` 7268ea133fd7Smrg if test "X$func_dirname_result" = "X${1}"; then 7269ea133fd7Smrg func_dirname_result="${3}" 7270a253d6aeSmrg else 7271ea133fd7Smrg func_dirname_result="$func_dirname_result${2}" 7272ea133fd7Smrg fi 7273ea133fd7Smrg} 7274ea133fd7Smrg 7275ea133fd7Smrg# func_basename file 7276ea133fd7Smrgfunc_basename () 7277ea133fd7Smrg{ 7278ea133fd7Smrg func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` 7279ea133fd7Smrg} 7280ea133fd7Smrg 7281ea133fd7Smrgdnl func_dirname_and_basename 7282ea133fd7Smrgdnl A portable version of this function is already defined in general.m4sh 7283ea133fd7Smrgdnl so there is no need for it here. 7284ea133fd7Smrg 7285ea133fd7Smrg# func_stripname prefix suffix name 7286ea133fd7Smrg# strip PREFIX and SUFFIX off of NAME. 7287ea133fd7Smrg# PREFIX and SUFFIX must not contain globbing or regex special 7288ea133fd7Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading 7289ea133fd7Smrg# dot (in which case that matches only a dot). 7290ea133fd7Smrg# func_strip_suffix prefix name 7291ea133fd7Smrgfunc_stripname () 7292ea133fd7Smrg{ 7293ea133fd7Smrg case ${2} in 7294ea133fd7Smrg .*) func_stripname_result=`$ECHO "X${3}" \ 7295ea133fd7Smrg | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; 7296ea133fd7Smrg *) func_stripname_result=`$ECHO "X${3}" \ 7297ea133fd7Smrg | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; 7298ea133fd7Smrg esac 7299ea133fd7Smrg} 7300ea133fd7Smrg 7301ea133fd7Smrg# sed scripts: 7302ea133fd7Smrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' 7303ea133fd7Smrgmy_sed_long_arg='1s/^-[[^=]]*=//' 7304ea133fd7Smrg 7305ea133fd7Smrg# func_opt_split 7306ea133fd7Smrgfunc_opt_split () 7307ea133fd7Smrg{ 7308ea133fd7Smrg func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` 7309ea133fd7Smrg func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` 7310ea133fd7Smrg} 7311ea133fd7Smrg 7312ea133fd7Smrg# func_lo2o object 7313ea133fd7Smrgfunc_lo2o () 7314ea133fd7Smrg{ 7315ea133fd7Smrg func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` 7316ea133fd7Smrg} 7317ea133fd7Smrg 7318ea133fd7Smrg# func_xform libobj-or-source 7319ea133fd7Smrgfunc_xform () 7320ea133fd7Smrg{ 7321ea133fd7Smrg func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` 7322ea133fd7Smrg} 7323ea133fd7Smrg 7324ea133fd7Smrg# func_arith arithmetic-term... 7325ea133fd7Smrgfunc_arith () 7326ea133fd7Smrg{ 7327ea133fd7Smrg func_arith_result=`expr "$[@]"` 7328ea133fd7Smrg} 7329ea133fd7Smrg 7330ea133fd7Smrg# func_len string 7331ea133fd7Smrg# STRING may not start with a hyphen. 7332ea133fd7Smrgfunc_len () 7333ea133fd7Smrg{ 7334ea133fd7Smrg func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` 7335ea133fd7Smrg} 7336ea133fd7Smrg 7337ea133fd7Smrg_LT_EOF 7338ea133fd7Smrgesac 7339ea133fd7Smrg 7340ea133fd7Smrgcase $lt_shell_append in 7341ea133fd7Smrg yes) 7342ea133fd7Smrg cat << \_LT_EOF >> "$cfgfile" 7343ea133fd7Smrg 7344ea133fd7Smrg# func_append var value 7345ea133fd7Smrg# Append VALUE to the end of shell variable VAR. 7346ea133fd7Smrgfunc_append () 7347ea133fd7Smrg{ 7348ea133fd7Smrg eval "$[1]+=\$[2]" 7349ea133fd7Smrg} 7350ea133fd7Smrg_LT_EOF 7351ea133fd7Smrg ;; 7352ea133fd7Smrg *) 7353ea133fd7Smrg cat << \_LT_EOF >> "$cfgfile" 7354ea133fd7Smrg 7355ea133fd7Smrg# func_append var value 7356ea133fd7Smrg# Append VALUE to the end of shell variable VAR. 7357ea133fd7Smrgfunc_append () 7358ea133fd7Smrg{ 7359ea133fd7Smrg eval "$[1]=\$$[1]\$[2]" 7360ea133fd7Smrg} 7361ea133fd7Smrg 7362ea133fd7Smrg_LT_EOF 7363ea133fd7Smrg ;; 7364ea133fd7Smrg esac 7365ea133fd7Smrg]) 7366ea133fd7Smrg 7367ea133fd7Smrg# Helper functions for option handling. -*- Autoconf -*- 7368ea133fd7Smrg# 7369ea133fd7Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7370ea133fd7Smrg# Written by Gary V. Vaughan, 2004 7371ea133fd7Smrg# 7372ea133fd7Smrg# This file is free software; the Free Software Foundation gives 7373ea133fd7Smrg# unlimited permission to copy and/or distribute it, with or without 7374ea133fd7Smrg# modifications, as long as this notice is preserved. 7375ea133fd7Smrg 7376ea133fd7Smrg# serial 6 ltoptions.m4 7377ea133fd7Smrg 7378ea133fd7Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7379ea133fd7SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) 7380ea133fd7Smrg 7381ea133fd7Smrg 7382ea133fd7Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) 7383ea133fd7Smrg# ------------------------------------------ 7384ea133fd7Smrgm4_define([_LT_MANGLE_OPTION], 7385ea133fd7Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) 7386ea133fd7Smrg 7387ea133fd7Smrg 7388ea133fd7Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) 7389ea133fd7Smrg# --------------------------------------- 7390ea133fd7Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a 7391ea133fd7Smrg# matching handler defined, dispatch to it. Other OPTION-NAMEs are 7392ea133fd7Smrg# saved as a flag. 7393ea133fd7Smrgm4_define([_LT_SET_OPTION], 7394ea133fd7Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl 7395ea133fd7Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), 7396ea133fd7Smrg _LT_MANGLE_DEFUN([$1], [$2]), 7397ea133fd7Smrg [m4_warning([Unknown $1 option `$2'])])[]dnl 7398ea133fd7Smrg]) 7399ea133fd7Smrg 7400ea133fd7Smrg 7401ea133fd7Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) 7402ea133fd7Smrg# ------------------------------------------------------------ 7403ea133fd7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 7404ea133fd7Smrgm4_define([_LT_IF_OPTION], 7405ea133fd7Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) 7406ea133fd7Smrg 7407ea133fd7Smrg 7408ea133fd7Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) 7409ea133fd7Smrg# ------------------------------------------------------- 7410ea133fd7Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME 7411ea133fd7Smrg# are set. 7412ea133fd7Smrgm4_define([_LT_UNLESS_OPTIONS], 7413ea133fd7Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7414ea133fd7Smrg [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), 7415ea133fd7Smrg [m4_define([$0_found])])])[]dnl 7416ea133fd7Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 7417ea133fd7Smrg])[]dnl 7418ea133fd7Smrg]) 7419ea133fd7Smrg 7420ea133fd7Smrg 7421ea133fd7Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) 7422ea133fd7Smrg# ---------------------------------------- 7423ea133fd7Smrg# OPTION-LIST is a space-separated list of Libtool options associated 7424ea133fd7Smrg# with MACRO-NAME. If any OPTION has a matching handler declared with 7425ea133fd7Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about 7426ea133fd7Smrg# the unknown option and exit. 7427ea133fd7Smrgm4_defun([_LT_SET_OPTIONS], 7428ea133fd7Smrg[# Set options 7429ea133fd7Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])), 7430ea133fd7Smrg [_LT_SET_OPTION([$1], _LT_Option)]) 7431ea133fd7Smrg 7432ea133fd7Smrgm4_if([$1],[LT_INIT],[ 7433ea133fd7Smrg dnl 7434ea133fd7Smrg dnl Simply set some default values (i.e off) if boolean options were not 7435ea133fd7Smrg dnl specified: 7436ea133fd7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no 7437ea133fd7Smrg ]) 7438ea133fd7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no 7439ea133fd7Smrg ]) 7440ea133fd7Smrg dnl 7441ea133fd7Smrg dnl If no reference was made to various pairs of opposing options, then 7442ea133fd7Smrg dnl we run the default mode handler for the pair. For example, if neither 7443ea133fd7Smrg dnl `shared' nor `disable-shared' was passed, we enable building of shared 7444ea133fd7Smrg dnl archives by default: 7445ea133fd7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) 7446ea133fd7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) 7447ea133fd7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) 7448ea133fd7Smrg _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], 7449ea133fd7Smrg [_LT_ENABLE_FAST_INSTALL]) 7450ea133fd7Smrg ]) 7451ea133fd7Smrg])# _LT_SET_OPTIONS 7452ea133fd7Smrg 7453ea133fd7Smrg 7454ea133fd7Smrg 7455ea133fd7Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) 7456ea133fd7Smrg# ----------------------------------------- 7457ea133fd7Smrgm4_define([_LT_MANGLE_DEFUN], 7458ea133fd7Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) 7459ea133fd7Smrg 7460ea133fd7Smrg 7461ea133fd7Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) 7462ea133fd7Smrg# ----------------------------------------------- 7463ea133fd7Smrgm4_define([LT_OPTION_DEFINE], 7464ea133fd7Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl 7465ea133fd7Smrg])# LT_OPTION_DEFINE 7466ea133fd7Smrg 7467ea133fd7Smrg 7468ea133fd7Smrg# dlopen 7469ea133fd7Smrg# ------ 7470ea133fd7SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes 7471ea133fd7Smrg]) 7472ea133fd7Smrg 7473ea133fd7SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN], 7474ea133fd7Smrg[_LT_SET_OPTION([LT_INIT], [dlopen]) 7475ea133fd7SmrgAC_DIAGNOSE([obsolete], 7476ea133fd7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7477ea133fd7Smrgput the `dlopen' option into LT_INIT's first parameter.]) 7478ea133fd7Smrg]) 7479ea133fd7Smrg 7480ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 7481ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) 7482ea133fd7Smrg 7483ea133fd7Smrg 7484ea133fd7Smrg# win32-dll 7485ea133fd7Smrg# --------- 7486ea133fd7Smrg# Declare package support for building win32 dll's. 7487ea133fd7SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll], 7488ea133fd7Smrg[enable_win32_dll=yes 7489ea133fd7Smrg 7490ea133fd7Smrgcase $host in 7491ea133fd7Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) 7492ea133fd7Smrg AC_CHECK_TOOL(AS, as, false) 7493ea133fd7Smrg AC_CHECK_TOOL(DLLTOOL, dlltool, false) 7494ea133fd7Smrg AC_CHECK_TOOL(OBJDUMP, objdump, false) 7495ea133fd7Smrg ;; 7496ea133fd7Smrgesac 7497ea133fd7Smrg 7498ea133fd7Smrgtest -z "$AS" && AS=as 7499ea133fd7Smrg_LT_DECL([], [AS], [0], [Assembler program])dnl 7500ea133fd7Smrg 7501ea133fd7Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool 7502ea133fd7Smrg_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl 7503ea133fd7Smrg 7504ea133fd7Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump 7505ea133fd7Smrg_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl 7506ea133fd7Smrg])# win32-dll 7507ea133fd7Smrg 7508ea133fd7SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL], 7509ea133fd7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl 7510ea133fd7Smrg_LT_SET_OPTION([LT_INIT], [win32-dll]) 7511ea133fd7SmrgAC_DIAGNOSE([obsolete], 7512ea133fd7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7513ea133fd7Smrgput the `win32-dll' option into LT_INIT's first parameter.]) 7514ea133fd7Smrg]) 7515ea133fd7Smrg 7516ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 7517ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) 7518ea133fd7Smrg 7519ea133fd7Smrg 7520ea133fd7Smrg# _LT_ENABLE_SHARED([DEFAULT]) 7521ea133fd7Smrg# ---------------------------- 7522ea133fd7Smrg# implement the --enable-shared flag, and supports the `shared' and 7523ea133fd7Smrg# `disable-shared' LT_INIT options. 7524ea133fd7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7525ea133fd7Smrgm4_define([_LT_ENABLE_SHARED], 7526ea133fd7Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl 7527ea133fd7SmrgAC_ARG_ENABLE([shared], 7528ea133fd7Smrg [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], 7529ea133fd7Smrg [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], 7530ea133fd7Smrg [p=${PACKAGE-default} 7531ea133fd7Smrg case $enableval in 7532ea133fd7Smrg yes) enable_shared=yes ;; 7533ea133fd7Smrg no) enable_shared=no ;; 7534ea133fd7Smrg *) 7535ea133fd7Smrg enable_shared=no 7536ea133fd7Smrg # Look at the argument we got. We use all the common list separators. 7537ea133fd7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7538ea133fd7Smrg for pkg in $enableval; do 7539ea133fd7Smrg IFS="$lt_save_ifs" 7540ea133fd7Smrg if test "X$pkg" = "X$p"; then 7541ea133fd7Smrg enable_shared=yes 7542a253d6aeSmrg fi 7543ea133fd7Smrg done 7544ea133fd7Smrg IFS="$lt_save_ifs" 7545ea133fd7Smrg ;; 7546ea133fd7Smrg esac], 7547ea133fd7Smrg [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) 7548ea133fd7Smrg 7549ea133fd7Smrg _LT_DECL([build_libtool_libs], [enable_shared], [0], 7550ea133fd7Smrg [Whether or not to build shared libraries]) 7551ea133fd7Smrg])# _LT_ENABLE_SHARED 7552ea133fd7Smrg 7553ea133fd7SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) 7554ea133fd7SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) 7555ea133fd7Smrg 7556ea133fd7Smrg# Old names: 7557ea133fd7SmrgAC_DEFUN([AC_ENABLE_SHARED], 7558ea133fd7Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) 7559ea133fd7Smrg]) 7560ea133fd7Smrg 7561ea133fd7SmrgAC_DEFUN([AC_DISABLE_SHARED], 7562ea133fd7Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared]) 7563ea133fd7Smrg]) 7564ea133fd7Smrg 7565ea133fd7SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) 7566ea133fd7SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) 7567ea133fd7Smrg 7568ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 7569ea133fd7Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], []) 7570ea133fd7Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], []) 7571ea133fd7Smrg 7572ea133fd7Smrg 7573ea133fd7Smrg 7574ea133fd7Smrg# _LT_ENABLE_STATIC([DEFAULT]) 7575ea133fd7Smrg# ---------------------------- 7576ea133fd7Smrg# implement the --enable-static flag, and support the `static' and 7577ea133fd7Smrg# `disable-static' LT_INIT options. 7578ea133fd7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7579ea133fd7Smrgm4_define([_LT_ENABLE_STATIC], 7580ea133fd7Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl 7581ea133fd7SmrgAC_ARG_ENABLE([static], 7582ea133fd7Smrg [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], 7583ea133fd7Smrg [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], 7584ea133fd7Smrg [p=${PACKAGE-default} 7585ea133fd7Smrg case $enableval in 7586ea133fd7Smrg yes) enable_static=yes ;; 7587ea133fd7Smrg no) enable_static=no ;; 7588ea133fd7Smrg *) 7589ea133fd7Smrg enable_static=no 7590ea133fd7Smrg # Look at the argument we got. We use all the common list separators. 7591ea133fd7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7592ea133fd7Smrg for pkg in $enableval; do 7593ea133fd7Smrg IFS="$lt_save_ifs" 7594ea133fd7Smrg if test "X$pkg" = "X$p"; then 7595ea133fd7Smrg enable_static=yes 7596ea133fd7Smrg fi 7597ea133fd7Smrg done 7598ea133fd7Smrg IFS="$lt_save_ifs" 7599ea133fd7Smrg ;; 7600ea133fd7Smrg esac], 7601ea133fd7Smrg [enable_static=]_LT_ENABLE_STATIC_DEFAULT) 7602ea133fd7Smrg 7603ea133fd7Smrg _LT_DECL([build_old_libs], [enable_static], [0], 7604ea133fd7Smrg [Whether or not to build static libraries]) 7605ea133fd7Smrg])# _LT_ENABLE_STATIC 7606ea133fd7Smrg 7607ea133fd7SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) 7608ea133fd7SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) 7609ea133fd7Smrg 7610ea133fd7Smrg# Old names: 7611ea133fd7SmrgAC_DEFUN([AC_ENABLE_STATIC], 7612ea133fd7Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) 7613ea133fd7Smrg]) 7614ea133fd7Smrg 7615ea133fd7SmrgAC_DEFUN([AC_DISABLE_STATIC], 7616ea133fd7Smrg[_LT_SET_OPTION([LT_INIT], [disable-static]) 7617ea133fd7Smrg]) 7618ea133fd7Smrg 7619ea133fd7SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) 7620ea133fd7SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) 7621ea133fd7Smrg 7622ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 7623ea133fd7Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], []) 7624ea133fd7Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], []) 7625ea133fd7Smrg 7626ea133fd7Smrg 7627ea133fd7Smrg 7628ea133fd7Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT]) 7629ea133fd7Smrg# ---------------------------------- 7630ea133fd7Smrg# implement the --enable-fast-install flag, and support the `fast-install' 7631ea133fd7Smrg# and `disable-fast-install' LT_INIT options. 7632ea133fd7Smrg# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. 7633ea133fd7Smrgm4_define([_LT_ENABLE_FAST_INSTALL], 7634ea133fd7Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl 7635ea133fd7SmrgAC_ARG_ENABLE([fast-install], 7636ea133fd7Smrg [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], 7637ea133fd7Smrg [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], 7638ea133fd7Smrg [p=${PACKAGE-default} 7639ea133fd7Smrg case $enableval in 7640ea133fd7Smrg yes) enable_fast_install=yes ;; 7641ea133fd7Smrg no) enable_fast_install=no ;; 7642ea133fd7Smrg *) 7643ea133fd7Smrg enable_fast_install=no 7644ea133fd7Smrg # Look at the argument we got. We use all the common list separators. 7645ea133fd7Smrg lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," 7646ea133fd7Smrg for pkg in $enableval; do 7647ea133fd7Smrg IFS="$lt_save_ifs" 7648ea133fd7Smrg if test "X$pkg" = "X$p"; then 7649ea133fd7Smrg enable_fast_install=yes 7650ea133fd7Smrg fi 7651ea133fd7Smrg done 7652ea133fd7Smrg IFS="$lt_save_ifs" 7653ea133fd7Smrg ;; 7654ea133fd7Smrg esac], 7655ea133fd7Smrg [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) 7656ea133fd7Smrg 7657ea133fd7Smrg_LT_DECL([fast_install], [enable_fast_install], [0], 7658ea133fd7Smrg [Whether or not to optimize for fast installation])dnl 7659ea133fd7Smrg])# _LT_ENABLE_FAST_INSTALL 7660ea133fd7Smrg 7661ea133fd7SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) 7662ea133fd7SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) 7663ea133fd7Smrg 7664ea133fd7Smrg# Old names: 7665ea133fd7SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL], 7666ea133fd7Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) 7667ea133fd7SmrgAC_DIAGNOSE([obsolete], 7668ea133fd7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7669ea133fd7Smrgthe `fast-install' option into LT_INIT's first parameter.]) 7670ea133fd7Smrg]) 7671ea133fd7Smrg 7672ea133fd7SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL], 7673ea133fd7Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install]) 7674ea133fd7SmrgAC_DIAGNOSE([obsolete], 7675ea133fd7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put 7676ea133fd7Smrgthe `disable-fast-install' option into LT_INIT's first parameter.]) 7677ea133fd7Smrg]) 7678ea133fd7Smrg 7679ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 7680ea133fd7Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) 7681ea133fd7Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) 7682ea133fd7Smrg 7683ea133fd7Smrg 7684ea133fd7Smrg# _LT_WITH_PIC([MODE]) 7685ea133fd7Smrg# -------------------- 7686ea133fd7Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic' 7687ea133fd7Smrg# LT_INIT options. 7688ea133fd7Smrg# MODE is either `yes' or `no'. If omitted, it defaults to `both'. 7689ea133fd7Smrgm4_define([_LT_WITH_PIC], 7690ea133fd7Smrg[AC_ARG_WITH([pic], 7691ea133fd7Smrg [AS_HELP_STRING([--with-pic], 7692ea133fd7Smrg [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], 7693ea133fd7Smrg [pic_mode="$withval"], 7694ea133fd7Smrg [pic_mode=default]) 7695ea133fd7Smrg 7696ea133fd7Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default]) 7697ea133fd7Smrg 7698ea133fd7Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl 7699ea133fd7Smrg])# _LT_WITH_PIC 7700ea133fd7Smrg 7701ea133fd7SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) 7702ea133fd7SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) 7703ea133fd7Smrg 7704ea133fd7Smrg# Old name: 7705ea133fd7SmrgAU_DEFUN([AC_LIBTOOL_PICMODE], 7706ea133fd7Smrg[_LT_SET_OPTION([LT_INIT], [pic-only]) 7707ea133fd7SmrgAC_DIAGNOSE([obsolete], 7708ea133fd7Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you 7709ea133fd7Smrgput the `pic-only' option into LT_INIT's first parameter.]) 7710ea133fd7Smrg]) 7711ea133fd7Smrg 7712ea133fd7Smrgdnl aclocal-1.4 backwards compatibility: 7713ea133fd7Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) 7714ea133fd7Smrg 7715ea133fd7Smrg 7716ea133fd7Smrgm4_define([_LTDL_MODE], []) 7717ea133fd7SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], 7718ea133fd7Smrg [m4_define([_LTDL_MODE], [nonrecursive])]) 7719ea133fd7SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive], 7720ea133fd7Smrg [m4_define([_LTDL_MODE], [recursive])]) 7721ea133fd7SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject], 7722ea133fd7Smrg [m4_define([_LTDL_MODE], [subproject])]) 7723ea133fd7Smrg 7724ea133fd7Smrgm4_define([_LTDL_TYPE], []) 7725ea133fd7SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable], 7726ea133fd7Smrg [m4_define([_LTDL_TYPE], [installable])]) 7727ea133fd7SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience], 7728ea133fd7Smrg [m4_define([_LTDL_TYPE], [convenience])]) 7729ea133fd7Smrg 7730ea133fd7Smrg# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- 7731ea133fd7Smrg# 7732ea133fd7Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. 7733ea133fd7Smrg# Written by Gary V. Vaughan, 2004 7734ea133fd7Smrg# 7735ea133fd7Smrg# This file is free software; the Free Software Foundation gives 7736ea133fd7Smrg# unlimited permission to copy and/or distribute it, with or without 7737ea133fd7Smrg# modifications, as long as this notice is preserved. 7738ea133fd7Smrg 7739ea133fd7Smrg# serial 6 ltsugar.m4 7740ea133fd7Smrg 7741ea133fd7Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7742ea133fd7SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) 7743ea133fd7Smrg 7744ea133fd7Smrg 7745ea133fd7Smrg# lt_join(SEP, ARG1, [ARG2...]) 7746ea133fd7Smrg# ----------------------------- 7747ea133fd7Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their 7748ea133fd7Smrg# associated separator. 7749ea133fd7Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier 7750ea133fd7Smrg# versions in m4sugar had bugs. 7751ea133fd7Smrgm4_define([lt_join], 7752ea133fd7Smrg[m4_if([$#], [1], [], 7753ea133fd7Smrg [$#], [2], [[$2]], 7754ea133fd7Smrg [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) 7755ea133fd7Smrgm4_define([_lt_join], 7756ea133fd7Smrg[m4_if([$#$2], [2], [], 7757ea133fd7Smrg [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) 7758ea133fd7Smrg 7759ea133fd7Smrg 7760ea133fd7Smrg# lt_car(LIST) 7761ea133fd7Smrg# lt_cdr(LIST) 7762ea133fd7Smrg# ------------ 7763ea133fd7Smrg# Manipulate m4 lists. 7764ea133fd7Smrg# These macros are necessary as long as will still need to support 7765ea133fd7Smrg# Autoconf-2.59 which quotes differently. 7766ea133fd7Smrgm4_define([lt_car], [[$1]]) 7767ea133fd7Smrgm4_define([lt_cdr], 7768ea133fd7Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], 7769ea133fd7Smrg [$#], 1, [], 7770ea133fd7Smrg [m4_dquote(m4_shift($@))])]) 7771ea133fd7Smrgm4_define([lt_unquote], $1) 7772ea133fd7Smrg 7773ea133fd7Smrg 7774ea133fd7Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR]) 7775ea133fd7Smrg# ------------------------------------------ 7776ea133fd7Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. 7777ea133fd7Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended 7778ea133fd7Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). 7779ea133fd7Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different 7780ea133fd7Smrg# than defined and empty). 7781ea133fd7Smrg# 7782ea133fd7Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier 7783ea133fd7Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING. 7784ea133fd7Smrgm4_define([lt_append], 7785ea133fd7Smrg[m4_define([$1], 7786ea133fd7Smrg m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) 7787ea133fd7Smrg 7788ea133fd7Smrg 7789ea133fd7Smrg 7790ea133fd7Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) 7791ea133fd7Smrg# ---------------------------------------------------------- 7792ea133fd7Smrg# Produce a SEP delimited list of all paired combinations of elements of 7793ea133fd7Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list 7794ea133fd7Smrg# has the form PREFIXmINFIXSUFFIXn. 7795ea133fd7Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62. 7796ea133fd7Smrgm4_define([lt_combine], 7797ea133fd7Smrg[m4_if(m4_eval([$# > 3]), [1], 7798ea133fd7Smrg [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl 7799ea133fd7Smrg[[m4_foreach([_Lt_prefix], [$2], 7800ea133fd7Smrg [m4_foreach([_Lt_suffix], 7801ea133fd7Smrg ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, 7802ea133fd7Smrg [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) 7803ea133fd7Smrg 7804ea133fd7Smrg 7805ea133fd7Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) 7806ea133fd7Smrg# ----------------------------------------------------------------------- 7807ea133fd7Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited 7808ea133fd7Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. 7809ea133fd7Smrgm4_define([lt_if_append_uniq], 7810ea133fd7Smrg[m4_ifdef([$1], 7811ea133fd7Smrg [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], 7812ea133fd7Smrg [lt_append([$1], [$2], [$3])$4], 7813ea133fd7Smrg [$5])], 7814ea133fd7Smrg [lt_append([$1], [$2], [$3])$4])]) 7815ea133fd7Smrg 7816ea133fd7Smrg 7817ea133fd7Smrg# lt_dict_add(DICT, KEY, VALUE) 7818ea133fd7Smrg# ----------------------------- 7819ea133fd7Smrgm4_define([lt_dict_add], 7820ea133fd7Smrg[m4_define([$1($2)], [$3])]) 7821ea133fd7Smrg 7822ea133fd7Smrg 7823ea133fd7Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) 7824ea133fd7Smrg# -------------------------------------------- 7825ea133fd7Smrgm4_define([lt_dict_add_subkey], 7826ea133fd7Smrg[m4_define([$1($2:$3)], [$4])]) 7827ea133fd7Smrg 7828ea133fd7Smrg 7829ea133fd7Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY]) 7830ea133fd7Smrg# ---------------------------------- 7831ea133fd7Smrgm4_define([lt_dict_fetch], 7832ea133fd7Smrg[m4_ifval([$3], 7833ea133fd7Smrg m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), 7834ea133fd7Smrg m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) 7835ea133fd7Smrg 7836ea133fd7Smrg 7837ea133fd7Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) 7838ea133fd7Smrg# ----------------------------------------------------------------- 7839ea133fd7Smrgm4_define([lt_if_dict_fetch], 7840ea133fd7Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], 7841ea133fd7Smrg [$5], 7842ea133fd7Smrg [$6])]) 7843ea133fd7Smrg 7844ea133fd7Smrg 7845ea133fd7Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) 7846ea133fd7Smrg# -------------------------------------------------------------- 7847ea133fd7Smrgm4_define([lt_dict_filter], 7848ea133fd7Smrg[m4_if([$5], [], [], 7849ea133fd7Smrg [lt_join(m4_quote(m4_default([$4], [[, ]])), 7850ea133fd7Smrg lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), 7851ea133fd7Smrg [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl 7852ea133fd7Smrg]) 7853ea133fd7Smrg 7854ea133fd7Smrg# ltversion.m4 -- version numbers -*- Autoconf -*- 7855ea133fd7Smrg# 7856ea133fd7Smrg# Copyright (C) 2004 Free Software Foundation, Inc. 7857ea133fd7Smrg# Written by Scott James Remnant, 2004 7858ea133fd7Smrg# 7859ea133fd7Smrg# This file is free software; the Free Software Foundation gives 7860ea133fd7Smrg# unlimited permission to copy and/or distribute it, with or without 7861ea133fd7Smrg# modifications, as long as this notice is preserved. 7862ea133fd7Smrg 7863ea133fd7Smrg# Generated from ltversion.in. 7864ea133fd7Smrg 7865ea133fd7Smrg# serial 3012 ltversion.m4 7866ea133fd7Smrg# This file is part of GNU Libtool 7867ea133fd7Smrg 7868ea133fd7Smrgm4_define([LT_PACKAGE_VERSION], [2.2.6]) 7869ea133fd7Smrgm4_define([LT_PACKAGE_REVISION], [1.3012]) 7870ea133fd7Smrg 7871ea133fd7SmrgAC_DEFUN([LTVERSION_VERSION], 7872ea133fd7Smrg[macro_version='2.2.6' 7873ea133fd7Smrgmacro_revision='1.3012' 7874ea133fd7Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) 7875ea133fd7Smrg_LT_DECL(, macro_revision, 0) 7876ea133fd7Smrg]) 7877ea133fd7Smrg 7878ea133fd7Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- 7879ea133fd7Smrg# 7880ea133fd7Smrg# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. 7881ea133fd7Smrg# Written by Scott James Remnant, 2004. 7882ea133fd7Smrg# 7883ea133fd7Smrg# This file is free software; the Free Software Foundation gives 7884ea133fd7Smrg# unlimited permission to copy and/or distribute it, with or without 7885ea133fd7Smrg# modifications, as long as this notice is preserved. 7886ea133fd7Smrg 7887ea133fd7Smrg# serial 4 lt~obsolete.m4 7888ea133fd7Smrg 7889ea133fd7Smrg# These exist entirely to fool aclocal when bootstrapping libtool. 7890ea133fd7Smrg# 7891ea133fd7Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) 7892ea133fd7Smrg# which have later been changed to m4_define as they aren't part of the 7893ea133fd7Smrg# exported API, or moved to Autoconf or Automake where they belong. 7894ea133fd7Smrg# 7895ea133fd7Smrg# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN 7896ea133fd7Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us 7897ea133fd7Smrg# using a macro with the same name in our local m4/libtool.m4 it'll 7898ea133fd7Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define 7899ea133fd7Smrg# and doesn't know about Autoconf macros at all.) 7900ea133fd7Smrg# 7901ea133fd7Smrg# So we provide this file, which has a silly filename so it's always 7902ea133fd7Smrg# included after everything else. This provides aclocal with the 7903ea133fd7Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything 7904ea133fd7Smrg# because those macros already exist, or will be overwritten later. 7905ea133fd7Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 7906ea133fd7Smrg# 7907ea133fd7Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. 7908ea133fd7Smrg# Yes, that means every name once taken will need to remain here until 7909ea133fd7Smrg# we give up compatibility with versions before 1.7, at which point 7910ea133fd7Smrg# we need to keep only those names which we still refer to. 7911ea133fd7Smrg 7912ea133fd7Smrg# This is to help aclocal find these macros, as it can't see m4_define. 7913ea133fd7SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) 7914ea133fd7Smrg 7915ea133fd7Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) 7916ea133fd7Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) 7917ea133fd7Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) 7918ea133fd7Smrgm4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) 7919ea133fd7Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) 7920ea133fd7Smrgm4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) 7921ea133fd7Smrgm4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) 7922ea133fd7Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) 7923ea133fd7Smrgm4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) 7924ea133fd7Smrgm4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) 7925ea133fd7Smrgm4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) 7926ea133fd7Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) 7927ea133fd7Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) 7928ea133fd7Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) 7929ea133fd7Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) 7930ea133fd7Smrgm4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) 7931ea133fd7Smrgm4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) 7932ea133fd7Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) 7933ea133fd7Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) 7934ea133fd7Smrgm4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) 7935ea133fd7Smrgm4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) 7936ea133fd7Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) 7937ea133fd7Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) 7938ea133fd7Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) 7939ea133fd7Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) 7940ea133fd7Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) 7941ea133fd7Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) 7942ea133fd7Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) 7943ea133fd7Smrgm4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) 7944ea133fd7Smrgm4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) 7945ea133fd7Smrgm4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) 7946ea133fd7Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) 7947ea133fd7Smrgm4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) 7948ea133fd7Smrgm4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) 7949ea133fd7Smrgm4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) 7950ea133fd7Smrgm4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) 7951ea133fd7Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) 7952ea133fd7Smrgm4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) 7953ea133fd7Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) 7954ea133fd7Smrgm4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) 7955ea133fd7Smrgm4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) 7956ea133fd7Smrgm4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) 7957ea133fd7Smrgm4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) 7958ea133fd7Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) 7959ea133fd7Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) 7960ea133fd7Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) 7961ea133fd7Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) 7962ea133fd7Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) 7963ea133fd7Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) 7964ea133fd7Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) 7965ea133fd7Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) 7966ea133fd7Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) 7967ea133fd7Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) 7968ea133fd7Smrgm4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) 7969ea133fd7Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) 7970ea133fd7Smrg 7971ea133fd7Smrg# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- 7972ea133fd7Smrg# 7973ea133fd7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>. 7974ea133fd7Smrg# 7975ea133fd7Smrg# This program is free software; you can redistribute it and/or modify 7976ea133fd7Smrg# it under the terms of the GNU General Public License as published by 7977ea133fd7Smrg# the Free Software Foundation; either version 2 of the License, or 7978ea133fd7Smrg# (at your option) any later version. 7979ea133fd7Smrg# 7980ea133fd7Smrg# This program is distributed in the hope that it will be useful, but 7981ea133fd7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of 7982ea133fd7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 7983ea133fd7Smrg# General Public License for more details. 7984ea133fd7Smrg# 7985ea133fd7Smrg# You should have received a copy of the GNU General Public License 7986ea133fd7Smrg# along with this program; if not, write to the Free Software 7987ea133fd7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 7988ea133fd7Smrg# 7989ea133fd7Smrg# As a special exception to the GNU General Public License, if you 7990ea133fd7Smrg# distribute this file as part of a program that contains a 7991ea133fd7Smrg# configuration script generated by Autoconf, you may include it under 7992ea133fd7Smrg# the same distribution terms that you use for the rest of that program. 7993ea133fd7Smrg 7994ea133fd7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION]) 7995ea133fd7Smrg# ---------------------------------- 7996ea133fd7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG], 7997ea133fd7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$]) 7998ea133fd7Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$]) 7999ea133fd7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 8000ea133fd7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 8001ea133fd7Smrg AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) 8002ea133fd7Smrgfi 8003ea133fd7Smrgif test -n "$PKG_CONFIG"; then 8004ea133fd7Smrg _pkg_min_version=m4_default([$1], [0.9.0]) 8005ea133fd7Smrg AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) 8006ea133fd7Smrg if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 8007ea133fd7Smrg AC_MSG_RESULT([yes]) 8008ea133fd7Smrg else 8009ea133fd7Smrg AC_MSG_RESULT([no]) 8010ea133fd7Smrg PKG_CONFIG="" 8011ea133fd7Smrg fi 8012ea133fd7Smrg 8013ea133fd7Smrgfi[]dnl 8014ea133fd7Smrg])# PKG_PROG_PKG_CONFIG 8015ea133fd7Smrg 8016ea133fd7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) 8017ea133fd7Smrg# 8018ea133fd7Smrg# Check to see whether a particular set of modules exists. Similar 8019ea133fd7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors. 8020ea133fd7Smrg# 8021ea133fd7Smrg# 8022ea133fd7Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of 8023ea133fd7Smrg# this or PKG_CHECK_MODULES is called, or make sure to call 8024ea133fd7Smrg# PKG_CHECK_EXISTS manually 8025ea133fd7Smrg# -------------------------------------------------------------- 8026ea133fd7SmrgAC_DEFUN([PKG_CHECK_EXISTS], 8027ea133fd7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8028ea133fd7Smrgif test -n "$PKG_CONFIG" && \ 8029ea133fd7Smrg AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then 8030ea133fd7Smrg m4_ifval([$2], [$2], [:]) 8031ea133fd7Smrgm4_ifvaln([$3], [else 8032ea133fd7Smrg $3])dnl 8033ea133fd7Smrgfi]) 8034ea133fd7Smrg 8035ea133fd7Smrg 8036ea133fd7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) 8037ea133fd7Smrg# --------------------------------------------- 8038ea133fd7Smrgm4_define([_PKG_CONFIG], 8039ea133fd7Smrg[if test -n "$$1"; then 8040ea133fd7Smrg pkg_cv_[]$1="$$1" 8041ea133fd7Smrg elif test -n "$PKG_CONFIG"; then 8042ea133fd7Smrg PKG_CHECK_EXISTS([$3], 8043ea133fd7Smrg [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], 8044ea133fd7Smrg [pkg_failed=yes]) 8045ea133fd7Smrg else 8046ea133fd7Smrg pkg_failed=untried 8047ea133fd7Smrgfi[]dnl 8048ea133fd7Smrg])# _PKG_CONFIG 8049ea133fd7Smrg 8050ea133fd7Smrg# _PKG_SHORT_ERRORS_SUPPORTED 8051ea133fd7Smrg# ----------------------------- 8052ea133fd7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], 8053ea133fd7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG]) 8054ea133fd7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8055ea133fd7Smrg _pkg_short_errors_supported=yes 8056ea133fd7Smrgelse 8057ea133fd7Smrg _pkg_short_errors_supported=no 8058ea133fd7Smrgfi[]dnl 8059ea133fd7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED 8060ea133fd7Smrg 8061ea133fd7Smrg 8062ea133fd7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], 8063ea133fd7Smrg# [ACTION-IF-NOT-FOUND]) 8064ea133fd7Smrg# 8065ea133fd7Smrg# 8066ea133fd7Smrg# Note that if there is a possibility the first call to 8067ea133fd7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an 8068ea133fd7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac 8069ea133fd7Smrg# 8070ea133fd7Smrg# 8071ea133fd7Smrg# -------------------------------------------------------------- 8072ea133fd7SmrgAC_DEFUN([PKG_CHECK_MODULES], 8073ea133fd7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl 8074ea133fd7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl 8075ea133fd7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl 8076ea133fd7Smrg 8077ea133fd7Smrgpkg_failed=no 8078ea133fd7SmrgAC_MSG_CHECKING([for $1]) 8079ea133fd7Smrg 8080ea133fd7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) 8081ea133fd7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2]) 8082ea133fd7Smrg 8083ea133fd7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS 8084ea133fd7Smrgand $1[]_LIBS to avoid the need to call pkg-config. 8085ea133fd7SmrgSee the pkg-config man page for more details.]) 8086ea133fd7Smrg 8087ea133fd7Smrgif test $pkg_failed = yes; then 8088ea133fd7Smrg _PKG_SHORT_ERRORS_SUPPORTED 8089ea133fd7Smrg if test $_pkg_short_errors_supported = yes; then 8090ea133fd7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` 8091ea133fd7Smrg else 8092ea133fd7Smrg $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` 8093ea133fd7Smrg fi 8094ea133fd7Smrg # Put the nasty error message in config.log where it belongs 8095ea133fd7Smrg echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD 8096ea133fd7Smrg 8097ea133fd7Smrg ifelse([$4], , [AC_MSG_ERROR(dnl 8098ea133fd7Smrg[Package requirements ($2) were not met: 8099ea133fd7Smrg 8100ea133fd7Smrg$$1_PKG_ERRORS 8101ea133fd7Smrg 8102ea133fd7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you 8103ea133fd7Smrginstalled software in a non-standard prefix. 8104ea133fd7Smrg 8105ea133fd7Smrg_PKG_TEXT 8106ea133fd7Smrg])], 8107ea133fd7Smrg [AC_MSG_RESULT([no]) 8108ea133fd7Smrg $4]) 8109ea133fd7Smrgelif test $pkg_failed = untried; then 8110ea133fd7Smrg ifelse([$4], , [AC_MSG_FAILURE(dnl 8111ea133fd7Smrg[The pkg-config script could not be found or is too old. Make sure it 8112ea133fd7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full 8113ea133fd7Smrgpath to pkg-config. 8114ea133fd7Smrg 8115ea133fd7Smrg_PKG_TEXT 8116ea133fd7Smrg 8117ea133fd7SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])], 8118ea133fd7Smrg [$4]) 8119ea133fd7Smrgelse 8120ea133fd7Smrg $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS 8121ea133fd7Smrg $1[]_LIBS=$pkg_cv_[]$1[]_LIBS 8122ea133fd7Smrg AC_MSG_RESULT([yes]) 8123ea133fd7Smrg ifelse([$3], , :, [$3]) 8124ea133fd7Smrgfi[]dnl 8125ea133fd7Smrg])# PKG_CHECK_MODULES 8126ea133fd7Smrg 8127ea133fd7Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. 8128ea133fd7Smrg# 8129ea133fd7Smrg# This file is free software; the Free Software Foundation 8130ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8131ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8132ea133fd7Smrg 8133ea133fd7Smrg# AM_AUTOMAKE_VERSION(VERSION) 8134ea133fd7Smrg# ---------------------------- 8135ea133fd7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been 8136ea133fd7Smrg# generated from the m4 files accompanying Automake X.Y. 8137ea133fd7Smrg# (This private macro should not be called outside this file.) 8138ea133fd7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], 8139ea133fd7Smrg[am__api_version='1.11' 8140ea133fd7Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to 8141ea133fd7Smrgdnl require some minimum version. Point them to the right macro. 8142ea133fd7Smrgm4_if([$1], [1.11], [], 8143ea133fd7Smrg [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl 8144ea133fd7Smrg]) 8145ea133fd7Smrg 8146ea133fd7Smrg# _AM_AUTOCONF_VERSION(VERSION) 8147ea133fd7Smrg# ----------------------------- 8148ea133fd7Smrg# aclocal traces this macro to find the Autoconf version. 8149ea133fd7Smrg# This is a private macro too. Using m4_define simplifies 8150ea133fd7Smrg# the logic in aclocal, which can simply ignore this definition. 8151ea133fd7Smrgm4_define([_AM_AUTOCONF_VERSION], []) 8152ea133fd7Smrg 8153ea133fd7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION 8154ea133fd7Smrg# ------------------------------- 8155ea133fd7Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. 8156ea133fd7Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE. 8157ea133fd7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], 8158ea133fd7Smrg[AM_AUTOMAKE_VERSION([1.11])dnl 8159ea133fd7Smrgm4_ifndef([AC_AUTOCONF_VERSION], 8160ea133fd7Smrg [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 8161ea133fd7Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) 8162ea133fd7Smrg 8163ea133fd7Smrg# AM_AUX_DIR_EXPAND -*- Autoconf -*- 8164ea133fd7Smrg 8165ea133fd7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8166ea133fd7Smrg# 8167ea133fd7Smrg# This file is free software; the Free Software Foundation 8168ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8169ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8170ea133fd7Smrg 8171ea133fd7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets 8172ea133fd7Smrg# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to 8173ea133fd7Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'. 8174ea133fd7Smrg# 8175ea133fd7Smrg# Of course, Automake must honor this variable whenever it calls a 8176ea133fd7Smrg# tool from the auxiliary directory. The problem is that $srcdir (and 8177ea133fd7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative, 8178ea133fd7Smrg# depending on how configure is run. This is pretty annoying, since 8179ea133fd7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top 8180ea133fd7Smrg# source directory, any form will work fine, but in subdirectories a 8181ea133fd7Smrg# relative path needs to be adjusted first. 8182ea133fd7Smrg# 8183ea133fd7Smrg# $ac_aux_dir/missing 8184ea133fd7Smrg# fails when called from a subdirectory if $ac_aux_dir is relative 8185ea133fd7Smrg# $top_srcdir/$ac_aux_dir/missing 8186ea133fd7Smrg# fails if $ac_aux_dir is absolute, 8187ea133fd7Smrg# fails when called from a subdirectory in a VPATH build with 8188ea133fd7Smrg# a relative $ac_aux_dir 8189ea133fd7Smrg# 8190ea133fd7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir 8191ea133fd7Smrg# are both prefixed by $srcdir. In an in-source build this is usually 8192ea133fd7Smrg# harmless because $srcdir is `.', but things will broke when you 8193ea133fd7Smrg# start a VPATH build or use an absolute $srcdir. 8194ea133fd7Smrg# 8195ea133fd7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, 8196ea133fd7Smrg# iff we strip the leading $srcdir from $ac_aux_dir. That would be: 8197ea133fd7Smrg# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` 8198ea133fd7Smrg# and then we would define $MISSING as 8199ea133fd7Smrg# MISSING="\${SHELL} $am_aux_dir/missing" 8200ea133fd7Smrg# This will work as long as MISSING is not called from configure, because 8201ea133fd7Smrg# unfortunately $(top_srcdir) has no meaning in configure. 8202ea133fd7Smrg# However there are other variables, like CC, which are often used in 8203ea133fd7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir. 8204ea133fd7Smrg# 8205ea133fd7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an 8206ea133fd7Smrg# absolute PATH. The drawback is that using absolute paths prevent a 8207ea133fd7Smrg# configured tree to be moved without reconfiguration. 8208ea133fd7Smrg 8209ea133fd7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND], 8210ea133fd7Smrg[dnl Rely on autoconf to set up CDPATH properly. 8211ea133fd7SmrgAC_PREREQ([2.50])dnl 8212ea133fd7Smrg# expand $ac_aux_dir to an absolute path 8213ea133fd7Smrgam_aux_dir=`cd $ac_aux_dir && pwd` 8214ea133fd7Smrg]) 8215ea133fd7Smrg 8216ea133fd7Smrg# AM_CONDITIONAL -*- Autoconf -*- 8217ea133fd7Smrg 8218ea133fd7Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 8219ea133fd7Smrg# Free Software Foundation, Inc. 8220ea133fd7Smrg# 8221ea133fd7Smrg# This file is free software; the Free Software Foundation 8222ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8223ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8224ea133fd7Smrg 8225ea133fd7Smrg# serial 9 8226ea133fd7Smrg 8227ea133fd7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION) 8228ea133fd7Smrg# ------------------------------------- 8229ea133fd7Smrg# Define a conditional. 8230ea133fd7SmrgAC_DEFUN([AM_CONDITIONAL], 8231ea133fd7Smrg[AC_PREREQ(2.52)dnl 8232ea133fd7Smrg ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], 8233ea133fd7Smrg [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl 8234ea133fd7SmrgAC_SUBST([$1_TRUE])dnl 8235ea133fd7SmrgAC_SUBST([$1_FALSE])dnl 8236ea133fd7Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl 8237ea133fd7Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl 8238ea133fd7Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl 8239ea133fd7Smrgif $2; then 8240ea133fd7Smrg $1_TRUE= 8241ea133fd7Smrg $1_FALSE='#' 8242ea133fd7Smrgelse 8243ea133fd7Smrg $1_TRUE='#' 8244ea133fd7Smrg $1_FALSE= 8245ea133fd7Smrgfi 8246ea133fd7SmrgAC_CONFIG_COMMANDS_PRE( 8247ea133fd7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then 8248ea133fd7Smrg AC_MSG_ERROR([[conditional "$1" was never defined. 8249ea133fd7SmrgUsually this means the macro was only invoked conditionally.]]) 8250ea133fd7Smrgfi])]) 8251a253d6aeSmrg 8252ea133fd7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 8253ea133fd7Smrg# Free Software Foundation, Inc. 8254ea133fd7Smrg# 8255ea133fd7Smrg# This file is free software; the Free Software Foundation 8256ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8257ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8258a253d6aeSmrg 8259ea133fd7Smrg# serial 10 8260a253d6aeSmrg 8261ea133fd7Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be 8262ea133fd7Smrg# written in clear, in which case automake, when reading aclocal.m4, 8263ea133fd7Smrg# will think it sees a *use*, and therefore will trigger all it's 8264ea133fd7Smrg# C support machinery. Also note that it means that autoscan, seeing 8265ea133fd7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use... 8266a253d6aeSmrg 8267a253d6aeSmrg 8268ea133fd7Smrg# _AM_DEPENDENCIES(NAME) 8269ea133fd7Smrg# ---------------------- 8270ea133fd7Smrg# See how the compiler implements dependency checking. 8271ea133fd7Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC". 8272ea133fd7Smrg# We try a few techniques and use that to set a single cache variable. 8273ea133fd7Smrg# 8274ea133fd7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was 8275ea133fd7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular 8276ea133fd7Smrg# dependency, and given that the user is not expected to run this macro, 8277ea133fd7Smrg# just rely on AC_PROG_CC. 8278ea133fd7SmrgAC_DEFUN([_AM_DEPENDENCIES], 8279ea133fd7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl 8280ea133fd7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl 8281ea133fd7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl 8282ea133fd7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl 8283a253d6aeSmrg 8284ea133fd7Smrgifelse([$1], CC, [depcc="$CC" am_compiler_list=], 8285ea133fd7Smrg [$1], CXX, [depcc="$CXX" am_compiler_list=], 8286ea133fd7Smrg [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], 8287ea133fd7Smrg [$1], UPC, [depcc="$UPC" am_compiler_list=], 8288ea133fd7Smrg [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], 8289ea133fd7Smrg [depcc="$$1" am_compiler_list=]) 8290a253d6aeSmrg 8291ea133fd7SmrgAC_CACHE_CHECK([dependency style of $depcc], 8292ea133fd7Smrg [am_cv_$1_dependencies_compiler_type], 8293ea133fd7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 8294ea133fd7Smrg # We make a subdir and do the tests there. Otherwise we can end up 8295ea133fd7Smrg # making bogus files that we don't know about and never remove. For 8296ea133fd7Smrg # instance it was reported that on HP-UX the gcc test will end up 8297ea133fd7Smrg # making a dummy file named `D' -- because `-MD' means `put the output 8298ea133fd7Smrg # in D'. 8299ea133fd7Smrg mkdir conftest.dir 8300ea133fd7Smrg # Copy depcomp to subdir because otherwise we won't find it if we're 8301ea133fd7Smrg # using a relative directory. 8302ea133fd7Smrg cp "$am_depcomp" conftest.dir 8303ea133fd7Smrg cd conftest.dir 8304ea133fd7Smrg # We will build objects and dependencies in a subdirectory because 8305ea133fd7Smrg # it helps to detect inapplicable dependency modes. For instance 8306ea133fd7Smrg # both Tru64's cc and ICC support -MD to output dependencies as a 8307ea133fd7Smrg # side effect of compilation, but ICC will put the dependencies in 8308ea133fd7Smrg # the current directory while Tru64 will put them in the object 8309ea133fd7Smrg # directory. 8310ea133fd7Smrg mkdir sub 8311a253d6aeSmrg 8312ea133fd7Smrg am_cv_$1_dependencies_compiler_type=none 8313ea133fd7Smrg if test "$am_compiler_list" = ""; then 8314ea133fd7Smrg am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` 8315ea133fd7Smrg fi 8316ea133fd7Smrg am__universal=false 8317ea133fd7Smrg m4_case([$1], [CC], 8318ea133fd7Smrg [case " $depcc " in #( 8319ea133fd7Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8320ea133fd7Smrg esac], 8321ea133fd7Smrg [CXX], 8322ea133fd7Smrg [case " $depcc " in #( 8323ea133fd7Smrg *\ -arch\ *\ -arch\ *) am__universal=true ;; 8324ea133fd7Smrg esac]) 8325a253d6aeSmrg 8326ea133fd7Smrg for depmode in $am_compiler_list; do 8327ea133fd7Smrg # Setup a source with many dependencies, because some compilers 8328ea133fd7Smrg # like to wrap large dependency lists on column 80 (with \), and 8329ea133fd7Smrg # we should not choose a depcomp mode which is confused by this. 8330ea133fd7Smrg # 8331ea133fd7Smrg # We need to recreate these files for each test, as the compiler may 8332ea133fd7Smrg # overwrite some of them when testing with obscure command lines. 8333ea133fd7Smrg # This happens at least with the AIX C compiler. 8334ea133fd7Smrg : > sub/conftest.c 8335ea133fd7Smrg for i in 1 2 3 4 5 6; do 8336ea133fd7Smrg echo '#include "conftst'$i'.h"' >> sub/conftest.c 8337ea133fd7Smrg # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with 8338ea133fd7Smrg # Solaris 8's {/usr,}/bin/sh. 8339ea133fd7Smrg touch sub/conftst$i.h 8340ea133fd7Smrg done 8341ea133fd7Smrg echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 8342a253d6aeSmrg 8343ea133fd7Smrg # We check with `-c' and `-o' for the sake of the "dashmstdout" 8344ea133fd7Smrg # mode. It turns out that the SunPro C++ compiler does not properly 8345ea133fd7Smrg # handle `-M -o', and we need to detect this. Also, some Intel 8346ea133fd7Smrg # versions had trouble with output in subdirs 8347ea133fd7Smrg am__obj=sub/conftest.${OBJEXT-o} 8348ea133fd7Smrg am__minus_obj="-o $am__obj" 8349ea133fd7Smrg case $depmode in 8350ea133fd7Smrg gcc) 8351ea133fd7Smrg # This depmode causes a compiler race in universal mode. 8352ea133fd7Smrg test "$am__universal" = false || continue 8353a253d6aeSmrg ;; 8354ea133fd7Smrg nosideeffect) 8355ea133fd7Smrg # after this tag, mechanisms are not by side-effect, so they'll 8356ea133fd7Smrg # only be used when explicitly requested 8357ea133fd7Smrg if test "x$enable_dependency_tracking" = xyes; then 8358ea133fd7Smrg continue 8359a253d6aeSmrg else 8360ea133fd7Smrg break 8361a253d6aeSmrg fi 8362a253d6aeSmrg ;; 8363ea133fd7Smrg msvisualcpp | msvcmsys) 8364ea133fd7Smrg # This compiler won't grok `-c -o', but also, the minuso test has 8365ea133fd7Smrg # not run yet. These depmodes are late enough in the game, and 8366ea133fd7Smrg # so weak that their functioning should not be impacted. 8367ea133fd7Smrg am__obj=conftest.${OBJEXT-o} 8368ea133fd7Smrg am__minus_obj= 8369a253d6aeSmrg ;; 8370ea133fd7Smrg none) break ;; 8371ea133fd7Smrg esac 8372ea133fd7Smrg if depmode=$depmode \ 8373ea133fd7Smrg source=sub/conftest.c object=$am__obj \ 8374ea133fd7Smrg depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 8375ea133fd7Smrg $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 8376ea133fd7Smrg >/dev/null 2>conftest.err && 8377ea133fd7Smrg grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 8378ea133fd7Smrg grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 8379ea133fd7Smrg grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 8380ea133fd7Smrg ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 8381ea133fd7Smrg # icc doesn't choke on unknown options, it will just issue warnings 8382ea133fd7Smrg # or remarks (even with -Werror). So we grep stderr for any message 8383ea133fd7Smrg # that says an option was ignored or not supported. 8384ea133fd7Smrg # When given -MP, icc 7.0 and 7.1 complain thusly: 8385ea133fd7Smrg # icc: Command line warning: ignoring option '-M'; no argument required 8386ea133fd7Smrg # The diagnosis changed in icc 8.0: 8387ea133fd7Smrg # icc: Command line remark: option '-MP' not supported 8388ea133fd7Smrg if (grep 'ignoring option' conftest.err || 8389ea133fd7Smrg grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 8390ea133fd7Smrg am_cv_$1_dependencies_compiler_type=$depmode 8391ea133fd7Smrg break 8392ea133fd7Smrg fi 8393ea133fd7Smrg fi 8394ea133fd7Smrg done 8395a253d6aeSmrg 8396ea133fd7Smrg cd .. 8397ea133fd7Smrg rm -rf conftest.dir 8398ea133fd7Smrgelse 8399ea133fd7Smrg am_cv_$1_dependencies_compiler_type=none 8400ea133fd7Smrgfi 8401ea133fd7Smrg]) 8402ea133fd7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) 8403ea133fd7SmrgAM_CONDITIONAL([am__fastdep$1], [ 8404ea133fd7Smrg test "x$enable_dependency_tracking" != xno \ 8405ea133fd7Smrg && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) 8406ea133fd7Smrg]) 8407a253d6aeSmrg 8408a253d6aeSmrg 8409ea133fd7Smrg# AM_SET_DEPDIR 8410ea133fd7Smrg# ------------- 8411ea133fd7Smrg# Choose a directory name for dependency files. 8412ea133fd7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES 8413ea133fd7SmrgAC_DEFUN([AM_SET_DEPDIR], 8414ea133fd7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl 8415ea133fd7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl 8416ea133fd7Smrg]) 8417ea133fd7Smrg 8418ea133fd7Smrg 8419ea133fd7Smrg# AM_DEP_TRACK 8420ea133fd7Smrg# ------------ 8421ea133fd7SmrgAC_DEFUN([AM_DEP_TRACK], 8422ea133fd7Smrg[AC_ARG_ENABLE(dependency-tracking, 8423ea133fd7Smrg[ --disable-dependency-tracking speeds up one-time build 8424ea133fd7Smrg --enable-dependency-tracking do not reject slow dependency extractors]) 8425ea133fd7Smrgif test "x$enable_dependency_tracking" != xno; then 8426ea133fd7Smrg am_depcomp="$ac_aux_dir/depcomp" 8427ea133fd7Smrg AMDEPBACKSLASH='\' 8428ea133fd7Smrgfi 8429ea133fd7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) 8430ea133fd7SmrgAC_SUBST([AMDEPBACKSLASH])dnl 8431ea133fd7Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl 8432ea133fd7Smrg]) 8433ea133fd7Smrg 8434ea133fd7Smrg# Generate code to set up dependency tracking. -*- Autoconf -*- 8435ea133fd7Smrg 8436ea133fd7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 8437ea133fd7Smrg# Free Software Foundation, Inc. 8438ea133fd7Smrg# 8439ea133fd7Smrg# This file is free software; the Free Software Foundation 8440ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8441ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8442ea133fd7Smrg 8443ea133fd7Smrg#serial 5 8444ea133fd7Smrg 8445ea133fd7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS 8446ea133fd7Smrg# ------------------------------ 8447ea133fd7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], 8448ea133fd7Smrg[{ 8449ea133fd7Smrg # Autoconf 2.62 quotes --file arguments for eval, but not when files 8450ea133fd7Smrg # are listed without --file. Let's play safe and only enable the eval 8451ea133fd7Smrg # if we detect the quoting. 8452ea133fd7Smrg case $CONFIG_FILES in 8453ea133fd7Smrg *\'*) eval set x "$CONFIG_FILES" ;; 8454ea133fd7Smrg *) set x $CONFIG_FILES ;; 8455ea133fd7Smrg esac 8456ea133fd7Smrg shift 8457ea133fd7Smrg for mf 8458ea133fd7Smrg do 8459ea133fd7Smrg # Strip MF so we end up with the name of the file. 8460ea133fd7Smrg mf=`echo "$mf" | sed -e 's/:.*$//'` 8461ea133fd7Smrg # Check whether this is an Automake generated Makefile or not. 8462ea133fd7Smrg # We used to match only the files named `Makefile.in', but 8463ea133fd7Smrg # some people rename them; so instead we look at the file content. 8464ea133fd7Smrg # Grep'ing the first line is not enough: some people post-process 8465ea133fd7Smrg # each Makefile.in and add a new line on top of each file to say so. 8466ea133fd7Smrg # Grep'ing the whole file is not good either: AIX grep has a line 8467ea133fd7Smrg # limit of 2048, but all sed's we know have understand at least 4000. 8468ea133fd7Smrg if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 8469ea133fd7Smrg dirpart=`AS_DIRNAME("$mf")` 8470ea133fd7Smrg else 8471ea133fd7Smrg continue 8472ea133fd7Smrg fi 8473ea133fd7Smrg # Extract the definition of DEPDIR, am__include, and am__quote 8474ea133fd7Smrg # from the Makefile without running `make'. 8475ea133fd7Smrg DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 8476ea133fd7Smrg test -z "$DEPDIR" && continue 8477ea133fd7Smrg am__include=`sed -n 's/^am__include = //p' < "$mf"` 8478ea133fd7Smrg test -z "am__include" && continue 8479ea133fd7Smrg am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 8480ea133fd7Smrg # When using ansi2knr, U may be empty or an underscore; expand it 8481ea133fd7Smrg U=`sed -n 's/^U = //p' < "$mf"` 8482ea133fd7Smrg # Find all dependency output files, they are included files with 8483ea133fd7Smrg # $(DEPDIR) in their names. We invoke sed twice because it is the 8484ea133fd7Smrg # simplest approach to changing $(DEPDIR) to its actual value in the 8485ea133fd7Smrg # expansion. 8486ea133fd7Smrg for file in `sed -n " 8487ea133fd7Smrg s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 8488ea133fd7Smrg sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do 8489ea133fd7Smrg # Make sure the directory exists. 8490ea133fd7Smrg test -f "$dirpart/$file" && continue 8491ea133fd7Smrg fdir=`AS_DIRNAME(["$file"])` 8492ea133fd7Smrg AS_MKDIR_P([$dirpart/$fdir]) 8493ea133fd7Smrg # echo "creating $dirpart/$file" 8494ea133fd7Smrg echo '# dummy' > "$dirpart/$file" 8495ea133fd7Smrg done 8496ea133fd7Smrg done 8497ea133fd7Smrg} 8498ea133fd7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS 8499ea133fd7Smrg 8500ea133fd7Smrg 8501ea133fd7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS 8502ea133fd7Smrg# ----------------------------- 8503ea133fd7Smrg# This macro should only be invoked once -- use via AC_REQUIRE. 8504ea133fd7Smrg# 8505ea133fd7Smrg# This code is only required when automatic dependency tracking 8506ea133fd7Smrg# is enabled. FIXME. This creates each `.P' file that we will 8507ea133fd7Smrg# need in order to bootstrap the dependency handling code. 8508ea133fd7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], 8509ea133fd7Smrg[AC_CONFIG_COMMANDS([depfiles], 8510ea133fd7Smrg [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], 8511ea133fd7Smrg [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) 8512ea133fd7Smrg]) 8513ea133fd7Smrg 8514ea133fd7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 8515ea133fd7Smrg# Free Software Foundation, Inc. 8516ea133fd7Smrg# 8517ea133fd7Smrg# This file is free software; the Free Software Foundation 8518ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8519ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8520ea133fd7Smrg 8521ea133fd7Smrg# serial 8 8522a253d6aeSmrg 8523ea133fd7Smrg# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. 8524ea133fd7SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) 8525a253d6aeSmrg 8526ea133fd7Smrg# Do all the work for Automake. -*- Autoconf -*- 8527a253d6aeSmrg 8528ea133fd7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 8529ea133fd7Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. 8530ea133fd7Smrg# 8531ea133fd7Smrg# This file is free software; the Free Software Foundation 8532ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8533ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8534a253d6aeSmrg 8535ea133fd7Smrg# serial 16 8536a253d6aeSmrg 8537ea133fd7Smrg# This macro actually does too much. Some checks are only needed if 8538ea133fd7Smrg# your package does certain things. But this isn't really a big deal. 8539a253d6aeSmrg 8540ea133fd7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) 8541ea133fd7Smrg# AM_INIT_AUTOMAKE([OPTIONS]) 8542ea133fd7Smrg# ----------------------------------------------- 8543ea133fd7Smrg# The call with PACKAGE and VERSION arguments is the old style 8544ea133fd7Smrg# call (pre autoconf-2.50), which is being phased out. PACKAGE 8545ea133fd7Smrg# and VERSION should now be passed to AC_INIT and removed from 8546ea133fd7Smrg# the call to AM_INIT_AUTOMAKE. 8547ea133fd7Smrg# We support both call styles for the transition. After 8548ea133fd7Smrg# the next Automake release, Autoconf can make the AC_INIT 8549ea133fd7Smrg# arguments mandatory, and then we can depend on a new Autoconf 8550ea133fd7Smrg# release and drop the old call support. 8551ea133fd7SmrgAC_DEFUN([AM_INIT_AUTOMAKE], 8552ea133fd7Smrg[AC_PREREQ([2.62])dnl 8553ea133fd7Smrgdnl Autoconf wants to disallow AM_ names. We explicitly allow 8554ea133fd7Smrgdnl the ones we care about. 8555ea133fd7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl 8556ea133fd7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl 8557ea133fd7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl 8558ea133fd7Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then 8559ea133fd7Smrg # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 8560ea133fd7Smrg # is not polluted with repeated "-I." 8561ea133fd7Smrg AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl 8562ea133fd7Smrg # test to see if srcdir already configured 8563ea133fd7Smrg if test -f $srcdir/config.status; then 8564ea133fd7Smrg AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) 8565ea133fd7Smrg fi 8566ea133fd7Smrgfi 8567a253d6aeSmrg 8568ea133fd7Smrg# test whether we have cygpath 8569ea133fd7Smrgif test -z "$CYGPATH_W"; then 8570ea133fd7Smrg if (cygpath --version) >/dev/null 2>/dev/null; then 8571ea133fd7Smrg CYGPATH_W='cygpath -w' 8572ea133fd7Smrg else 8573ea133fd7Smrg CYGPATH_W=echo 8574ea133fd7Smrg fi 8575ea133fd7Smrgfi 8576ea133fd7SmrgAC_SUBST([CYGPATH_W]) 8577a253d6aeSmrg 8578ea133fd7Smrg# Define the identity of the package. 8579ea133fd7Smrgdnl Distinguish between old-style and new-style calls. 8580ea133fd7Smrgm4_ifval([$2], 8581ea133fd7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl 8582ea133fd7Smrg AC_SUBST([PACKAGE], [$1])dnl 8583ea133fd7Smrg AC_SUBST([VERSION], [$2])], 8584ea133fd7Smrg[_AM_SET_OPTIONS([$1])dnl 8585ea133fd7Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. 8586ea133fd7Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, 8587ea133fd7Smrg [m4_fatal([AC_INIT should be called with package and version arguments])])dnl 8588ea133fd7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl 8589ea133fd7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl 8590a253d6aeSmrg 8591ea133fd7Smrg_AM_IF_OPTION([no-define],, 8592ea133fd7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) 8593ea133fd7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl 8594a253d6aeSmrg 8595ea133fd7Smrg# Some tools Automake needs. 8596ea133fd7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl 8597ea133fd7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl 8598ea133fd7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) 8599ea133fd7SmrgAM_MISSING_PROG(AUTOCONF, autoconf) 8600ea133fd7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) 8601ea133fd7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader) 8602ea133fd7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo) 8603ea133fd7SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl 8604ea133fd7SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl 8605ea133fd7SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl 8606ea133fd7Smrg# We need awk for the "check" target. The system "awk" is bad on 8607ea133fd7Smrg# some platforms. 8608ea133fd7SmrgAC_REQUIRE([AC_PROG_AWK])dnl 8609ea133fd7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl 8610ea133fd7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl 8611ea133fd7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], 8612ea133fd7Smrg [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], 8613ea133fd7Smrg [_AM_PROG_TAR([v7])])]) 8614ea133fd7Smrg_AM_IF_OPTION([no-dependencies],, 8615ea133fd7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC], 8616ea133fd7Smrg [_AM_DEPENDENCIES(CC)], 8617ea133fd7Smrg [define([AC_PROG_CC], 8618ea133fd7Smrg defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl 8619ea133fd7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX], 8620ea133fd7Smrg [_AM_DEPENDENCIES(CXX)], 8621ea133fd7Smrg [define([AC_PROG_CXX], 8622ea133fd7Smrg defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl 8623ea133fd7SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC], 8624ea133fd7Smrg [_AM_DEPENDENCIES(OBJC)], 8625ea133fd7Smrg [define([AC_PROG_OBJC], 8626ea133fd7Smrg defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl 8627ea133fd7Smrg]) 8628ea133fd7Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl 8629ea133fd7Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the 8630ea133fd7Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro 8631ea133fd7Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below. 8632ea133fd7SmrgAC_CONFIG_COMMANDS_PRE(dnl 8633ea133fd7Smrg[m4_provide_if([_AM_COMPILER_EXEEXT], 8634ea133fd7Smrg [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl 8635a253d6aeSmrg]) 8636a253d6aeSmrg 8637ea133fd7Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not 8638ea133fd7Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further 8639ea133fd7Smrgdnl mangled by Autoconf and run in a shell conditional statement. 8640ea133fd7Smrgm4_define([_AC_COMPILER_EXEEXT], 8641ea133fd7Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) 8642ea133fd7Smrg 8643ea133fd7Smrg 8644ea133fd7Smrg# When config.status generates a header, we must update the stamp-h file. 8645ea133fd7Smrg# This file resides in the same directory as the config header 8646ea133fd7Smrg# that is generated. The stamp files are numbered to have different names. 8647ea133fd7Smrg 8648ea133fd7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the 8649ea133fd7Smrg# loop where config.status creates the headers, so we can generate 8650ea133fd7Smrg# our stamp files there. 8651ea133fd7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], 8652ea133fd7Smrg[# Compute $1's index in $config_headers. 8653ea133fd7Smrg_am_arg=$1 8654ea133fd7Smrg_am_stamp_count=1 8655ea133fd7Smrgfor _am_header in $config_headers :; do 8656ea133fd7Smrg case $_am_header in 8657ea133fd7Smrg $_am_arg | $_am_arg:* ) 8658ea133fd7Smrg break ;; 8659ea133fd7Smrg * ) 8660ea133fd7Smrg _am_stamp_count=`expr $_am_stamp_count + 1` ;; 8661ea133fd7Smrg esac 8662ea133fd7Smrgdone 8663ea133fd7Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) 8664ea133fd7Smrg 8665ea133fd7Smrg# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. 8666a253d6aeSmrg# 8667ea133fd7Smrg# This file is free software; the Free Software Foundation 8668ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8669ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8670ea133fd7Smrg 8671ea133fd7Smrg# AM_PROG_INSTALL_SH 8672ea133fd7Smrg# ------------------ 8673ea133fd7Smrg# Define $install_sh. 8674ea133fd7SmrgAC_DEFUN([AM_PROG_INSTALL_SH], 8675ea133fd7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8676ea133fd7Smrgif test x"${install_sh}" != xset; then 8677ea133fd7Smrg case $am_aux_dir in 8678ea133fd7Smrg *\ * | *\ *) 8679ea133fd7Smrg install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 8680a253d6aeSmrg *) 8681ea133fd7Smrg install_sh="\${SHELL} $am_aux_dir/install-sh" 8682ea133fd7Smrg esac 8683ea133fd7Smrgfi 8684ea133fd7SmrgAC_SUBST(install_sh)]) 8685a253d6aeSmrg 8686ea133fd7Smrg# Copyright (C) 2003, 2005 Free Software Foundation, Inc. 8687a253d6aeSmrg# 8688ea133fd7Smrg# This file is free software; the Free Software Foundation 8689ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8690ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8691ea133fd7Smrg 8692ea133fd7Smrg# serial 2 8693ea133fd7Smrg 8694ea133fd7Smrg# Check whether the underlying file-system supports filenames 8695ea133fd7Smrg# with a leading dot. For instance MS-DOS doesn't. 8696ea133fd7SmrgAC_DEFUN([AM_SET_LEADING_DOT], 8697ea133fd7Smrg[rm -rf .tst 2>/dev/null 8698ea133fd7Smrgmkdir .tst 2>/dev/null 8699ea133fd7Smrgif test -d .tst; then 8700ea133fd7Smrg am__leading_dot=. 8701ea133fd7Smrgelse 8702ea133fd7Smrg am__leading_dot=_ 8703ea133fd7Smrgfi 8704ea133fd7Smrgrmdir .tst 2>/dev/null 8705ea133fd7SmrgAC_SUBST([am__leading_dot])]) 8706ea133fd7Smrg 8707ea133fd7Smrg# Add --enable-maintainer-mode option to configure. -*- Autoconf -*- 8708ea133fd7Smrg# From Jim Meyering 8709ea133fd7Smrg 8710ea133fd7Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 8711ea133fd7Smrg# Free Software Foundation, Inc. 8712a253d6aeSmrg# 8713ea133fd7Smrg# This file is free software; the Free Software Foundation 8714ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8715ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8716a253d6aeSmrg 8717ea133fd7Smrg# serial 5 8718a253d6aeSmrg 8719ea133fd7Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE]) 8720ea133fd7Smrg# ---------------------------------- 8721ea133fd7Smrg# Control maintainer-specific portions of Makefiles. 8722ea133fd7Smrg# Default is to disable them, unless `enable' is passed literally. 8723ea133fd7Smrg# For symmetry, `disable' may be passed as well. Anyway, the user 8724ea133fd7Smrg# can override the default with the --enable/--disable switch. 8725ea133fd7SmrgAC_DEFUN([AM_MAINTAINER_MODE], 8726ea133fd7Smrg[m4_case(m4_default([$1], [disable]), 8727ea133fd7Smrg [enable], [m4_define([am_maintainer_other], [disable])], 8728ea133fd7Smrg [disable], [m4_define([am_maintainer_other], [enable])], 8729ea133fd7Smrg [m4_define([am_maintainer_other], [enable]) 8730ea133fd7Smrg m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) 8731ea133fd7SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) 8732ea133fd7Smrg dnl maintainer-mode's default is 'disable' unless 'enable' is passed 8733ea133fd7Smrg AC_ARG_ENABLE([maintainer-mode], 8734ea133fd7Smrg[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful 8735ea133fd7Smrg (and sometimes confusing) to the casual installer], 8736ea133fd7Smrg [USE_MAINTAINER_MODE=$enableval], 8737ea133fd7Smrg [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) 8738ea133fd7Smrg AC_MSG_RESULT([$USE_MAINTAINER_MODE]) 8739ea133fd7Smrg AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) 8740ea133fd7Smrg MAINT=$MAINTAINER_MODE_TRUE 8741ea133fd7Smrg AC_SUBST([MAINT])dnl 8742ea133fd7Smrg] 8743ea133fd7Smrg) 8744a253d6aeSmrg 8745ea133fd7SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) 8746ea133fd7Smrg 8747ea133fd7Smrg# Check to see how 'make' treats includes. -*- Autoconf -*- 8748ea133fd7Smrg 8749ea133fd7Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. 8750ea133fd7Smrg# 8751ea133fd7Smrg# This file is free software; the Free Software Foundation 8752ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8753ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8754a253d6aeSmrg 8755ea133fd7Smrg# serial 4 8756a253d6aeSmrg 8757ea133fd7Smrg# AM_MAKE_INCLUDE() 8758ea133fd7Smrg# ----------------- 8759ea133fd7Smrg# Check to see how make treats includes. 8760ea133fd7SmrgAC_DEFUN([AM_MAKE_INCLUDE], 8761ea133fd7Smrg[am_make=${MAKE-make} 8762ea133fd7Smrgcat > confinc << 'END' 8763ea133fd7Smrgam__doit: 8764ea133fd7Smrg @echo this is the am__doit target 8765ea133fd7Smrg.PHONY: am__doit 8766ea133fd7SmrgEND 8767ea133fd7Smrg# If we don't find an include directive, just comment out the code. 8768ea133fd7SmrgAC_MSG_CHECKING([for style of include used by $am_make]) 8769ea133fd7Smrgam__include="#" 8770ea133fd7Smrgam__quote= 8771ea133fd7Smrg_am_result=none 8772ea133fd7Smrg# First try GNU make style include. 8773ea133fd7Smrgecho "include confinc" > confmf 8774ea133fd7Smrg# Ignore all kinds of additional output from `make'. 8775ea133fd7Smrgcase `$am_make -s -f confmf 2> /dev/null` in #( 8776ea133fd7Smrg*the\ am__doit\ target*) 8777ea133fd7Smrg am__include=include 8778ea133fd7Smrg am__quote= 8779ea133fd7Smrg _am_result=GNU 8780ea133fd7Smrg ;; 8781ea133fd7Smrgesac 8782ea133fd7Smrg# Now try BSD make style include. 8783ea133fd7Smrgif test "$am__include" = "#"; then 8784ea133fd7Smrg echo '.include "confinc"' > confmf 8785ea133fd7Smrg case `$am_make -s -f confmf 2> /dev/null` in #( 8786ea133fd7Smrg *the\ am__doit\ target*) 8787ea133fd7Smrg am__include=.include 8788ea133fd7Smrg am__quote="\"" 8789ea133fd7Smrg _am_result=BSD 8790ea133fd7Smrg ;; 8791ea133fd7Smrg esac 8792ea133fd7Smrgfi 8793ea133fd7SmrgAC_SUBST([am__include]) 8794ea133fd7SmrgAC_SUBST([am__quote]) 8795ea133fd7SmrgAC_MSG_RESULT([$_am_result]) 8796ea133fd7Smrgrm -f confinc confmf 8797ea133fd7Smrg]) 8798a253d6aeSmrg 8799ea133fd7Smrg# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- 8800a253d6aeSmrg 8801ea133fd7Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 8802ea133fd7Smrg# Free Software Foundation, Inc. 8803ea133fd7Smrg# 8804ea133fd7Smrg# This file is free software; the Free Software Foundation 8805ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8806ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8807a253d6aeSmrg 8808ea133fd7Smrg# serial 6 8809a253d6aeSmrg 8810ea133fd7Smrg# AM_MISSING_PROG(NAME, PROGRAM) 8811ea133fd7Smrg# ------------------------------ 8812ea133fd7SmrgAC_DEFUN([AM_MISSING_PROG], 8813ea133fd7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN]) 8814ea133fd7Smrg$1=${$1-"${am_missing_run}$2"} 8815ea133fd7SmrgAC_SUBST($1)]) 8816a253d6aeSmrg 8817a253d6aeSmrg 8818ea133fd7Smrg# AM_MISSING_HAS_RUN 8819ea133fd7Smrg# ------------------ 8820ea133fd7Smrg# Define MISSING if not defined so far and test if it supports --run. 8821ea133fd7Smrg# If it does, set am_missing_run to use it, otherwise, to nothing. 8822ea133fd7SmrgAC_DEFUN([AM_MISSING_HAS_RUN], 8823ea133fd7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl 8824ea133fd7SmrgAC_REQUIRE_AUX_FILE([missing])dnl 8825ea133fd7Smrgif test x"${MISSING+set}" != xset; then 8826ea133fd7Smrg case $am_aux_dir in 8827ea133fd7Smrg *\ * | *\ *) 8828ea133fd7Smrg MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 8829ea133fd7Smrg *) 8830ea133fd7Smrg MISSING="\${SHELL} $am_aux_dir/missing" ;; 8831ea133fd7Smrg esac 8832ea133fd7Smrgfi 8833ea133fd7Smrg# Use eval to expand $SHELL 8834ea133fd7Smrgif eval "$MISSING --run true"; then 8835ea133fd7Smrg am_missing_run="$MISSING --run " 8836ea133fd7Smrgelse 8837ea133fd7Smrg am_missing_run= 8838ea133fd7Smrg AC_MSG_WARN([`missing' script is too old or missing]) 8839ea133fd7Smrgfi 8840ea133fd7Smrg]) 8841a253d6aeSmrg 8842ea133fd7Smrg# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 8843ea133fd7Smrg# 8844ea133fd7Smrg# This file is free software; the Free Software Foundation 8845ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8846ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8847a253d6aeSmrg 8848ea133fd7Smrg# AM_PROG_MKDIR_P 8849ea133fd7Smrg# --------------- 8850ea133fd7Smrg# Check for `mkdir -p'. 8851ea133fd7SmrgAC_DEFUN([AM_PROG_MKDIR_P], 8852ea133fd7Smrg[AC_PREREQ([2.60])dnl 8853ea133fd7SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl 8854ea133fd7Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, 8855ea133fd7Smrgdnl while keeping a definition of mkdir_p for backward compatibility. 8856ea133fd7Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. 8857ea133fd7Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of 8858ea133fd7Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own 8859ea133fd7Smrgdnl adjustment using top_builddir (which is defined more often than 8860ea133fd7Smrgdnl MKDIR_P). 8861ea133fd7SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl 8862ea133fd7Smrgcase $mkdir_p in 8863ea133fd7Smrg [[\\/$]]* | ?:[[\\/]]*) ;; 8864ea133fd7Smrg */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 8865ea133fd7Smrgesac 8866ea133fd7Smrg]) 8867a253d6aeSmrg 8868ea133fd7Smrg# Helper functions for option handling. -*- Autoconf -*- 8869a253d6aeSmrg 8870ea133fd7Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. 8871ea133fd7Smrg# 8872ea133fd7Smrg# This file is free software; the Free Software Foundation 8873ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8874ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8875a253d6aeSmrg 8876ea133fd7Smrg# serial 4 8877a253d6aeSmrg 8878ea133fd7Smrg# _AM_MANGLE_OPTION(NAME) 8879ea133fd7Smrg# ----------------------- 8880ea133fd7SmrgAC_DEFUN([_AM_MANGLE_OPTION], 8881ea133fd7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) 8882a253d6aeSmrg 8883ea133fd7Smrg# _AM_SET_OPTION(NAME) 8884ea133fd7Smrg# ------------------------------ 8885ea133fd7Smrg# Set option NAME. Presently that only means defining a flag for this option. 8886ea133fd7SmrgAC_DEFUN([_AM_SET_OPTION], 8887ea133fd7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) 8888a253d6aeSmrg 8889ea133fd7Smrg# _AM_SET_OPTIONS(OPTIONS) 8890ea133fd7Smrg# ---------------------------------- 8891ea133fd7Smrg# OPTIONS is a space-separated list of Automake options. 8892ea133fd7SmrgAC_DEFUN([_AM_SET_OPTIONS], 8893ea133fd7Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) 8894a253d6aeSmrg 8895ea133fd7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) 8896ea133fd7Smrg# ------------------------------------------- 8897ea133fd7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. 8898ea133fd7SmrgAC_DEFUN([_AM_IF_OPTION], 8899ea133fd7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) 8900a253d6aeSmrg 8901ea133fd7Smrg# Check to make sure that the build environment is sane. -*- Autoconf -*- 8902a253d6aeSmrg 8903ea133fd7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 8904ea133fd7Smrg# Free Software Foundation, Inc. 8905ea133fd7Smrg# 8906ea133fd7Smrg# This file is free software; the Free Software Foundation 8907ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8908ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8909a253d6aeSmrg 8910ea133fd7Smrg# serial 5 8911a253d6aeSmrg 8912ea133fd7Smrg# AM_SANITY_CHECK 8913ea133fd7Smrg# --------------- 8914ea133fd7SmrgAC_DEFUN([AM_SANITY_CHECK], 8915ea133fd7Smrg[AC_MSG_CHECKING([whether build environment is sane]) 8916ea133fd7Smrg# Just in case 8917ea133fd7Smrgsleep 1 8918ea133fd7Smrgecho timestamp > conftest.file 8919ea133fd7Smrg# Reject unsafe characters in $srcdir or the absolute working directory 8920ea133fd7Smrg# name. Accept space and tab only in the latter. 8921ea133fd7Smrgam_lf=' 8922ea133fd7Smrg' 8923ea133fd7Smrgcase `pwd` in 8924ea133fd7Smrg *[[\\\"\#\$\&\'\`$am_lf]]*) 8925ea133fd7Smrg AC_MSG_ERROR([unsafe absolute working directory name]);; 8926ea133fd7Smrgesac 8927ea133fd7Smrgcase $srcdir in 8928ea133fd7Smrg *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) 8929ea133fd7Smrg AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; 8930ea133fd7Smrgesac 8931a253d6aeSmrg 8932ea133fd7Smrg# Do `set' in a subshell so we don't clobber the current shell's 8933ea133fd7Smrg# arguments. Must try -L first in case configure is actually a 8934ea133fd7Smrg# symlink; some systems play weird games with the mod time of symlinks 8935ea133fd7Smrg# (eg FreeBSD returns the mod time of the symlink's containing 8936ea133fd7Smrg# directory). 8937ea133fd7Smrgif ( 8938ea133fd7Smrg set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 8939ea133fd7Smrg if test "$[*]" = "X"; then 8940ea133fd7Smrg # -L didn't work. 8941ea133fd7Smrg set X `ls -t "$srcdir/configure" conftest.file` 8942ea133fd7Smrg fi 8943ea133fd7Smrg rm -f conftest.file 8944ea133fd7Smrg if test "$[*]" != "X $srcdir/configure conftest.file" \ 8945ea133fd7Smrg && test "$[*]" != "X conftest.file $srcdir/configure"; then 8946a253d6aeSmrg 8947ea133fd7Smrg # If neither matched, then we have a broken ls. This can happen 8948ea133fd7Smrg # if, for instance, CONFIG_SHELL is bash and it inherits a 8949ea133fd7Smrg # broken ls alias from the environment. This has actually 8950ea133fd7Smrg # happened. Such a system could not be considered "sane". 8951ea133fd7Smrg AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken 8952ea133fd7Smrgalias in your environment]) 8953ea133fd7Smrg fi 8954a253d6aeSmrg 8955ea133fd7Smrg test "$[2]" = conftest.file 8956ea133fd7Smrg ) 8957ea133fd7Smrgthen 8958ea133fd7Smrg # Ok. 8959ea133fd7Smrg : 8960ea133fd7Smrgelse 8961ea133fd7Smrg AC_MSG_ERROR([newly created file is older than distributed files! 8962ea133fd7SmrgCheck your system clock]) 8963ea133fd7Smrgfi 8964ea133fd7SmrgAC_MSG_RESULT(yes)]) 8965a253d6aeSmrg 8966ea133fd7Smrg# Copyright (C) 2009 Free Software Foundation, Inc. 8967ea133fd7Smrg# 8968ea133fd7Smrg# This file is free software; the Free Software Foundation 8969ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8970ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8971a253d6aeSmrg 8972ea133fd7Smrg# serial 1 8973a253d6aeSmrg 8974ea133fd7Smrg# AM_SILENT_RULES([DEFAULT]) 8975ea133fd7Smrg# -------------------------- 8976ea133fd7Smrg# Enable less verbose build rules; with the default set to DEFAULT 8977ea133fd7Smrg# (`yes' being less verbose, `no' or empty being verbose). 8978ea133fd7SmrgAC_DEFUN([AM_SILENT_RULES], 8979ea133fd7Smrg[AC_ARG_ENABLE([silent-rules], 8980ea133fd7Smrg[ --enable-silent-rules less verbose build output (undo: `make V=1') 8981ea133fd7Smrg --disable-silent-rules verbose build output (undo: `make V=0')]) 8982ea133fd7Smrgcase $enable_silent_rules in 8983ea133fd7Smrgyes) AM_DEFAULT_VERBOSITY=0;; 8984ea133fd7Smrgno) AM_DEFAULT_VERBOSITY=1;; 8985ea133fd7Smrg*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; 8986ea133fd7Smrgesac 8987ea133fd7SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl 8988ea133fd7SmrgAM_BACKSLASH='\' 8989ea133fd7SmrgAC_SUBST([AM_BACKSLASH])dnl 8990ea133fd7Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl 8991ea133fd7Smrg]) 8992a253d6aeSmrg 8993ea133fd7Smrg# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. 8994ea133fd7Smrg# 8995ea133fd7Smrg# This file is free software; the Free Software Foundation 8996ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 8997ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 8998a253d6aeSmrg 8999ea133fd7Smrg# AM_PROG_INSTALL_STRIP 9000ea133fd7Smrg# --------------------- 9001ea133fd7Smrg# One issue with vendor `install' (even GNU) is that you can't 9002ea133fd7Smrg# specify the program used to strip binaries. This is especially 9003ea133fd7Smrg# annoying in cross-compiling environments, where the build's strip 9004ea133fd7Smrg# is unlikely to handle the host's binaries. 9005ea133fd7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we 9006ea133fd7Smrg# always use install-sh in `make install-strip', and initialize 9007ea133fd7Smrg# STRIPPROG with the value of the STRIP variable (set by the user). 9008ea133fd7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP], 9009ea133fd7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl 9010ea133fd7Smrg# Installed binaries are usually stripped using `strip' when the user 9011ea133fd7Smrg# run `make install-strip'. However `strip' might not be the right 9012ea133fd7Smrg# tool to use in cross-compilation environments, therefore Automake 9013ea133fd7Smrg# will honor the `STRIP' environment variable to overrule this program. 9014ea133fd7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'. 9015ea133fd7Smrgif test "$cross_compiling" != no; then 9016ea133fd7Smrg AC_CHECK_TOOL([STRIP], [strip], :) 9017ea133fd7Smrgfi 9018ea133fd7SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 9019ea133fd7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])]) 9020a253d6aeSmrg 9021ea133fd7Smrg# Copyright (C) 2006, 2008 Free Software Foundation, Inc. 9022ea133fd7Smrg# 9023ea133fd7Smrg# This file is free software; the Free Software Foundation 9024ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 9025ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 9026a253d6aeSmrg 9027ea133fd7Smrg# serial 2 9028a253d6aeSmrg 9029ea133fd7Smrg# _AM_SUBST_NOTMAKE(VARIABLE) 9030ea133fd7Smrg# --------------------------- 9031ea133fd7Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. 9032ea133fd7Smrg# This macro is traced by Automake. 9033ea133fd7SmrgAC_DEFUN([_AM_SUBST_NOTMAKE]) 9034a253d6aeSmrg 9035ea133fd7Smrg# AM_SUBST_NOTMAKE(VARIABLE) 9036ea133fd7Smrg# --------------------------- 9037ea133fd7Smrg# Public sister of _AM_SUBST_NOTMAKE. 9038ea133fd7SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) 9039a253d6aeSmrg 9040ea133fd7Smrg# Check how to create a tarball. -*- Autoconf -*- 9041a253d6aeSmrg 9042ea133fd7Smrg# Copyright (C) 2004, 2005 Free Software Foundation, Inc. 9043ea133fd7Smrg# 9044ea133fd7Smrg# This file is free software; the Free Software Foundation 9045ea133fd7Smrg# gives unlimited permission to copy and/or distribute it, 9046ea133fd7Smrg# with or without modifications, as long as this notice is preserved. 9047a253d6aeSmrg 9048ea133fd7Smrg# serial 2 9049a253d6aeSmrg 9050ea133fd7Smrg# _AM_PROG_TAR(FORMAT) 9051ea133fd7Smrg# -------------------- 9052ea133fd7Smrg# Check how to create a tarball in format FORMAT. 9053ea133fd7Smrg# FORMAT should be one of `v7', `ustar', or `pax'. 9054ea133fd7Smrg# 9055ea133fd7Smrg# Substitute a variable $(am__tar) that is a command 9056ea133fd7Smrg# writing to stdout a FORMAT-tarball containing the directory 9057ea133fd7Smrg# $tardir. 9058ea133fd7Smrg# tardir=directory && $(am__tar) > result.tar 9059ea133fd7Smrg# 9060ea133fd7Smrg# Substitute a variable $(am__untar) that extract such 9061ea133fd7Smrg# a tarball read from stdin. 9062ea133fd7Smrg# $(am__untar) < result.tar 9063ea133fd7SmrgAC_DEFUN([_AM_PROG_TAR], 9064ea133fd7Smrg[# Always define AMTAR for backward compatibility. 9065ea133fd7SmrgAM_MISSING_PROG([AMTAR], [tar]) 9066ea133fd7Smrgm4_if([$1], [v7], 9067ea133fd7Smrg [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], 9068ea133fd7Smrg [m4_case([$1], [ustar],, [pax],, 9069ea133fd7Smrg [m4_fatal([Unknown tar format])]) 9070ea133fd7SmrgAC_MSG_CHECKING([how to create a $1 tar archive]) 9071ea133fd7Smrg# Loop over all known methods to create a tar archive until one works. 9072ea133fd7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' 9073ea133fd7Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools} 9074ea133fd7Smrg# Do not fold the above two line into one, because Tru64 sh and 9075ea133fd7Smrg# Solaris sh will not grok spaces in the rhs of `-'. 9076ea133fd7Smrgfor _am_tool in $_am_tools 9077ea133fd7Smrgdo 9078ea133fd7Smrg case $_am_tool in 9079ea133fd7Smrg gnutar) 9080ea133fd7Smrg for _am_tar in tar gnutar gtar; 9081ea133fd7Smrg do 9082ea133fd7Smrg AM_RUN_LOG([$_am_tar --version]) && break 9083ea133fd7Smrg done 9084ea133fd7Smrg am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' 9085ea133fd7Smrg am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' 9086ea133fd7Smrg am__untar="$_am_tar -xf -" 9087ea133fd7Smrg ;; 9088ea133fd7Smrg plaintar) 9089ea133fd7Smrg # Must skip GNU tar: if it does not support --format= it doesn't create 9090ea133fd7Smrg # ustar tarball either. 9091ea133fd7Smrg (tar --version) >/dev/null 2>&1 && continue 9092ea133fd7Smrg am__tar='tar chf - "$$tardir"' 9093ea133fd7Smrg am__tar_='tar chf - "$tardir"' 9094ea133fd7Smrg am__untar='tar xf -' 9095ea133fd7Smrg ;; 9096ea133fd7Smrg pax) 9097ea133fd7Smrg am__tar='pax -L -x $1 -w "$$tardir"' 9098ea133fd7Smrg am__tar_='pax -L -x $1 -w "$tardir"' 9099ea133fd7Smrg am__untar='pax -r' 9100ea133fd7Smrg ;; 9101ea133fd7Smrg cpio) 9102ea133fd7Smrg am__tar='find "$$tardir" -print | cpio -o -H $1 -L' 9103ea133fd7Smrg am__tar_='find "$tardir" -print | cpio -o -H $1 -L' 9104ea133fd7Smrg am__untar='cpio -i -H $1 -d' 9105ea133fd7Smrg ;; 9106ea133fd7Smrg none) 9107ea133fd7Smrg am__tar=false 9108ea133fd7Smrg am__tar_=false 9109ea133fd7Smrg am__untar=false 9110ea133fd7Smrg ;; 9111ea133fd7Smrg esac 9112a253d6aeSmrg 9113ea133fd7Smrg # If the value was cached, stop now. We just wanted to have am__tar 9114ea133fd7Smrg # and am__untar set. 9115ea133fd7Smrg test -n "${am_cv_prog_tar_$1}" && break 9116a253d6aeSmrg 9117ea133fd7Smrg # tar/untar a dummy directory, and stop if the command works 9118ea133fd7Smrg rm -rf conftest.dir 9119ea133fd7Smrg mkdir conftest.dir 9120ea133fd7Smrg echo GrepMe > conftest.dir/file 9121ea133fd7Smrg AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) 9122ea133fd7Smrg rm -rf conftest.dir 9123ea133fd7Smrg if test -s conftest.tar; then 9124ea133fd7Smrg AM_RUN_LOG([$am__untar <conftest.tar]) 9125ea133fd7Smrg grep GrepMe conftest.dir/file >/dev/null 2>&1 && break 9126ea133fd7Smrg fi 9127ea133fd7Smrgdone 9128ea133fd7Smrgrm -rf conftest.dir 9129a253d6aeSmrg 9130ea133fd7SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) 9131ea133fd7SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])]) 9132ea133fd7SmrgAC_SUBST([am__tar]) 9133ea133fd7SmrgAC_SUBST([am__untar]) 9134ea133fd7Smrg]) # _AM_PROG_TAR 9135a253d6aeSmrg 9136ea133fd7Smrgdnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure. 9137ea133fd7Smrgdnl 9138ea133fd7Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved. 9139ea133fd7Smrgdnl 9140ea133fd7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a 9141ea133fd7Smrgdnl copy of this software and associated documentation files (the 9142ea133fd7Smrgdnl "Software"), to deal in the Software without restriction, including 9143ea133fd7Smrgdnl without limitation the rights to use, copy, modify, merge, publish, 9144ea133fd7Smrgdnl distribute, and/or sell copies of the Software, and to permit persons 9145ea133fd7Smrgdnl to whom the Software is furnished to do so, provided that the above 9146ea133fd7Smrgdnl copyright notice(s) and this permission notice appear in all copies of 9147ea133fd7Smrgdnl the Software and that both the above copyright notice(s) and this 9148ea133fd7Smrgdnl permission notice appear in supporting documentation. 9149ea133fd7Smrgdnl 9150ea133fd7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9151ea133fd7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9152ea133fd7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 9153ea133fd7Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 9154ea133fd7Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL 9155ea133fd7Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING 9156ea133fd7Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, 9157ea133fd7Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION 9158ea133fd7Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 9159ea133fd7Smrgdnl 9160ea133fd7Smrgdnl Except as contained in this notice, the name of a copyright holder 9161ea133fd7Smrgdnl shall not be used in advertising or otherwise to promote the sale, use 9162ea133fd7Smrgdnl or other dealings in this Software without prior written authorization 9163ea133fd7Smrgdnl of the copyright holder. 9164a253d6aeSmrg 9165ea133fd7Smrg# XORG_MACROS_VERSION(required-version) 9166ea133fd7Smrg# ------------------------------------- 9167ea133fd7Smrg# Minimum version: 1.1.0 9168ea133fd7Smrg# 9169ea133fd7Smrg# If you're using a macro added in Version 1.1 or newer, include this in 9170ea133fd7Smrg# your configure.ac with the minimum required version, such as: 9171ea133fd7Smrg# XORG_MACROS_VERSION(1.1) 9172ea133fd7Smrg# 9173ea133fd7Smrg# To ensure that this macro is defined, also add: 9174ea133fd7Smrg# m4_ifndef([XORG_MACROS_VERSION], 9175ea133fd7Smrg# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])]) 9176ea133fd7Smrg# 9177ea133fd7Smrg# 9178ea133fd7Smrg# See the "minimum version" comment for each macro you use to see what 9179ea133fd7Smrg# version you require. 9180ea133fd7Smrgm4_defun([XORG_MACROS_VERSION],[ 9181ea133fd7Smrgm4_define([vers_have], [1.3.0]) 9182ea133fd7Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.]))) 9183ea133fd7Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.]))) 9184ea133fd7Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,, 9185ea133fd7Smrg [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])]) 9186ea133fd7Smrgm4_if(m4_version_compare(vers_have, [$1]), -1, 9187ea133fd7Smrg [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])]) 9188ea133fd7Smrgm4_undefine([vers_have]) 9189ea133fd7Smrgm4_undefine([maj_have]) 9190ea133fd7Smrgm4_undefine([maj_needed]) 9191ea133fd7Smrg]) # XORG_MACROS_VERSION 9192a253d6aeSmrg 9193ea133fd7Smrg# XORG_PROG_RAWCPP() 9194ea133fd7Smrg# ------------------ 9195ea133fd7Smrg# Minimum version: 1.0.0 9196ea133fd7Smrg# 9197ea133fd7Smrg# Find cpp program and necessary flags for use in pre-processing text files 9198ea133fd7Smrg# such as man pages and config files 9199ea133fd7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[ 9200ea133fd7SmrgAC_REQUIRE([AC_PROG_CPP]) 9201ea133fd7SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 9202ea133fd7Smrg [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib]) 9203a253d6aeSmrg 9204ea133fd7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined, 9205ea133fd7Smrg# which is not the best choice for supporting other OS'es, but covers most 9206ea133fd7Smrg# of the ones we need for now. 9207ea133fd7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef]) 9208ea133fd7SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?]) 9209ea133fd7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9210ea133fd7Smrg AC_MSG_RESULT([no]) 9211ea133fd7Smrgelse 9212ea133fd7Smrg if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9213ea133fd7Smrg RAWCPPFLAGS=-undef 9214ea133fd7Smrg AC_MSG_RESULT([yes]) 9215ea133fd7Smrg # under Cygwin unix is still defined even with -undef 9216ea133fd7Smrg elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then 9217ea133fd7Smrg RAWCPPFLAGS="-undef -ansi" 9218ea133fd7Smrg AC_MSG_RESULT([yes, with -ansi]) 9219ea133fd7Smrg else 9220ea133fd7Smrg AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.]) 9221ea133fd7Smrg fi 9222ea133fd7Smrgfi 9223ea133fd7Smrgrm -f conftest.$ac_ext 9224a253d6aeSmrg 9225ea133fd7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional]) 9226ea133fd7SmrgAC_LANG_CONFTEST([Does cpp preserve "whitespace"?]) 9227ea133fd7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9228ea133fd7Smrg AC_MSG_RESULT([no]) 9229ea133fd7Smrgelse 9230ea133fd7Smrg if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve \"'` -eq 1 ; then 9231ea133fd7Smrg RAWCPPFLAGS="${RAWCPPFLAGS} -traditional" 9232ea133fd7Smrg AC_MSG_RESULT([yes]) 9233ea133fd7Smrg else 9234ea133fd7Smrg AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional. I don't know what to do.]) 9235ea133fd7Smrg fi 9236ea133fd7Smrgfi 9237ea133fd7Smrgrm -f conftest.$ac_ext 9238ea133fd7SmrgAC_SUBST(RAWCPPFLAGS) 9239ea133fd7Smrg]) # XORG_PROG_RAWCPP 9240a253d6aeSmrg 9241ea133fd7Smrg# XORG_MANPAGE_SECTIONS() 9242ea133fd7Smrg# ----------------------- 9243ea133fd7Smrg# Minimum version: 1.0.0 9244ea133fd7Smrg# 9245ea133fd7Smrg# Determine which sections man pages go in for the different man page types 9246ea133fd7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files. 9247ea133fd7Smrg# Not sure if there's any better way than just hardcoding by OS name. 9248ea133fd7Smrg# Override default settings by setting environment variables 9249a253d6aeSmrg 9250ea133fd7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[ 9251ea133fd7SmrgAC_REQUIRE([AC_CANONICAL_HOST]) 9252a253d6aeSmrg 9253ea133fd7Smrgif test x$APP_MAN_SUFFIX = x ; then 9254ea133fd7Smrg APP_MAN_SUFFIX=1 9255ea133fd7Smrgfi 9256ea133fd7Smrgif test x$APP_MAN_DIR = x ; then 9257ea133fd7Smrg APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' 9258ea133fd7Smrgfi 9259a253d6aeSmrg 9260ea133fd7Smrgif test x$LIB_MAN_SUFFIX = x ; then 9261ea133fd7Smrg LIB_MAN_SUFFIX=3 9262ea133fd7Smrgfi 9263ea133fd7Smrgif test x$LIB_MAN_DIR = x ; then 9264ea133fd7Smrg LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' 9265ea133fd7Smrgfi 9266a253d6aeSmrg 9267ea133fd7Smrgif test x$FILE_MAN_SUFFIX = x ; then 9268ea133fd7Smrg case $host_os in 9269ea133fd7Smrg solaris*) FILE_MAN_SUFFIX=4 ;; 9270ea133fd7Smrg *) FILE_MAN_SUFFIX=5 ;; 9271ea133fd7Smrg esac 9272ea133fd7Smrgfi 9273ea133fd7Smrgif test x$FILE_MAN_DIR = x ; then 9274ea133fd7Smrg FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' 9275ea133fd7Smrgfi 9276a253d6aeSmrg 9277ea133fd7Smrgif test x$MISC_MAN_SUFFIX = x ; then 9278ea133fd7Smrg case $host_os in 9279ea133fd7Smrg solaris*) MISC_MAN_SUFFIX=5 ;; 9280ea133fd7Smrg *) MISC_MAN_SUFFIX=7 ;; 9281ea133fd7Smrg esac 9282ea133fd7Smrgfi 9283ea133fd7Smrgif test x$MISC_MAN_DIR = x ; then 9284ea133fd7Smrg MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' 9285ea133fd7Smrgfi 9286a253d6aeSmrg 9287ea133fd7Smrgif test x$DRIVER_MAN_SUFFIX = x ; then 9288ea133fd7Smrg case $host_os in 9289ea133fd7Smrg solaris*) DRIVER_MAN_SUFFIX=7 ;; 9290ea133fd7Smrg *) DRIVER_MAN_SUFFIX=4 ;; 9291ea133fd7Smrg esac 9292ea133fd7Smrgfi 9293ea133fd7Smrgif test x$DRIVER_MAN_DIR = x ; then 9294ea133fd7Smrg DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' 9295ea133fd7Smrgfi 9296a253d6aeSmrg 9297ea133fd7Smrgif test x$ADMIN_MAN_SUFFIX = x ; then 9298ea133fd7Smrg case $host_os in 9299ea133fd7Smrg solaris*) ADMIN_MAN_SUFFIX=1m ;; 9300ea133fd7Smrg *) ADMIN_MAN_SUFFIX=8 ;; 9301ea133fd7Smrg esac 9302ea133fd7Smrgfi 9303ea133fd7Smrgif test x$ADMIN_MAN_DIR = x ; then 9304ea133fd7Smrg ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)' 9305ea133fd7Smrgfi 9306a253d6aeSmrg 9307a253d6aeSmrg 9308ea133fd7SmrgAC_SUBST([APP_MAN_SUFFIX]) 9309ea133fd7SmrgAC_SUBST([LIB_MAN_SUFFIX]) 9310ea133fd7SmrgAC_SUBST([FILE_MAN_SUFFIX]) 9311ea133fd7SmrgAC_SUBST([MISC_MAN_SUFFIX]) 9312ea133fd7SmrgAC_SUBST([DRIVER_MAN_SUFFIX]) 9313ea133fd7SmrgAC_SUBST([ADMIN_MAN_SUFFIX]) 9314ea133fd7SmrgAC_SUBST([APP_MAN_DIR]) 9315ea133fd7SmrgAC_SUBST([LIB_MAN_DIR]) 9316ea133fd7SmrgAC_SUBST([FILE_MAN_DIR]) 9317ea133fd7SmrgAC_SUBST([MISC_MAN_DIR]) 9318ea133fd7SmrgAC_SUBST([DRIVER_MAN_DIR]) 9319ea133fd7SmrgAC_SUBST([ADMIN_MAN_DIR]) 9320ea133fd7Smrg]) # XORG_MANPAGE_SECTIONS 9321a253d6aeSmrg 9322ea133fd7Smrg# XORG_CHECK_LINUXDOC 9323ea133fd7Smrg# ------------------- 9324ea133fd7Smrg# Minimum version: 1.0.0 9325ea133fd7Smrg# 9326ea133fd7Smrg# Defines the variable MAKE_TEXT if the necessary tools and 9327ea133fd7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt. 9328ea133fd7Smrg# Whether or not the necessary tools and files are found can be checked 9329ea133fd7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC" 9330ea133fd7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[ 9331ea133fd7Smrgif test x$XORG_SGML_PATH = x ; then 9332ea133fd7Smrg XORG_SGML_PATH=$prefix/share/sgml 9333ea133fd7Smrgfi 9334ea133fd7SmrgHAVE_DEFS_ENT= 9335a253d6aeSmrg 9336ea133fd7Smrgif test x"$cross_compiling" = x"yes" ; then 9337ea133fd7Smrg HAVE_DEFS_ENT=no 9338ea133fd7Smrgelse 9339ea133fd7Smrg AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 9340ea133fd7Smrgfi 9341a253d6aeSmrg 9342ea133fd7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc) 9343ea133fd7SmrgAC_PATH_PROG(PS2PDF, ps2pdf) 9344a253d6aeSmrg 9345ea133fd7SmrgAC_MSG_CHECKING([Whether to build documentation]) 9346a253d6aeSmrg 9347ea133fd7Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then 9348ea133fd7Smrg BUILDDOC=yes 9349ea133fd7Smrgelse 9350ea133fd7Smrg BUILDDOC=no 9351ea133fd7Smrgfi 9352a253d6aeSmrg 9353ea133fd7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes]) 9354a253d6aeSmrg 9355ea133fd7SmrgAC_MSG_RESULT([$BUILDDOC]) 9356a253d6aeSmrg 9357ea133fd7SmrgAC_MSG_CHECKING([Whether to build pdf documentation]) 9358a253d6aeSmrg 9359ea133fd7Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then 9360ea133fd7Smrg BUILDPDFDOC=yes 9361ea133fd7Smrgelse 9362ea133fd7Smrg BUILDPDFDOC=no 9363ea133fd7Smrgfi 9364a253d6aeSmrg 9365ea133fd7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9366a253d6aeSmrg 9367ea133fd7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9368ea133fd7Smrg 9369ea133fd7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt" 9370ea133fd7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps" 9371ea133fd7SmrgMAKE_PDF="$PS2PDF" 9372ea133fd7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B html --split=0" 9373a253d6aeSmrg 9374ea133fd7SmrgAC_SUBST(MAKE_TEXT) 9375ea133fd7SmrgAC_SUBST(MAKE_PS) 9376ea133fd7SmrgAC_SUBST(MAKE_PDF) 9377ea133fd7SmrgAC_SUBST(MAKE_HTML) 9378ea133fd7Smrg]) # XORG_CHECK_LINUXDOC 9379a253d6aeSmrg 9380ea133fd7Smrg# XORG_CHECK_DOCBOOK 9381a253d6aeSmrg# ------------------- 9382ea133fd7Smrg# Minimum version: 1.0.0 9383a253d6aeSmrg# 9384ea133fd7Smrg# Checks for the ability to build output formats from SGML DocBook source. 9385ea133fd7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC" 9386ea133fd7Smrg# indicates whether the necessary tools and files are found and, if set, 9387ea133fd7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx. 9388ea133fd7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[ 9389ea133fd7Smrgif test x$XORG_SGML_PATH = x ; then 9390ea133fd7Smrg XORG_SGML_PATH=$prefix/share/sgml 9391ea133fd7Smrgfi 9392ea133fd7SmrgHAVE_DEFS_ENT= 9393ea133fd7SmrgBUILDTXTDOC=no 9394ea133fd7SmrgBUILDPDFDOC=no 9395ea133fd7SmrgBUILDPSDOC=no 9396ea133fd7SmrgBUILDHTMLDOC=no 9397a253d6aeSmrg 9398ea133fd7SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes]) 9399a253d6aeSmrg 9400ea133fd7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps) 9401ea133fd7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf) 9402ea133fd7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html) 9403ea133fd7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt) 9404a253d6aeSmrg 9405ea133fd7SmrgAC_MSG_CHECKING([Whether to build text documentation]) 9406ea133fd7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x && 9407ea133fd7Smrg test x$BUILD_TXTDOC != xno; then 9408ea133fd7Smrg BUILDTXTDOC=yes 9409ea133fd7Smrgfi 9410ea133fd7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes]) 9411ea133fd7SmrgAC_MSG_RESULT([$BUILDTXTDOC]) 9412a253d6aeSmrg 9413ea133fd7SmrgAC_MSG_CHECKING([Whether to build PDF documentation]) 9414ea133fd7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x && 9415ea133fd7Smrg test x$BUILD_PDFDOC != xno; then 9416ea133fd7Smrg BUILDPDFDOC=yes 9417ea133fd7Smrgfi 9418ea133fd7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes]) 9419ea133fd7SmrgAC_MSG_RESULT([$BUILDPDFDOC]) 9420a253d6aeSmrg 9421ea133fd7SmrgAC_MSG_CHECKING([Whether to build PostScript documentation]) 9422ea133fd7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x && 9423ea133fd7Smrg test x$BUILD_PSDOC != xno; then 9424ea133fd7Smrg BUILDPSDOC=yes 9425ea133fd7Smrgfi 9426ea133fd7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes]) 9427ea133fd7SmrgAC_MSG_RESULT([$BUILDPSDOC]) 9428a253d6aeSmrg 9429ea133fd7SmrgAC_MSG_CHECKING([Whether to build HTML documentation]) 9430ea133fd7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x && 9431ea133fd7Smrg test x$BUILD_HTMLDOC != xno; then 9432ea133fd7Smrg BUILDHTMLDOC=yes 9433ea133fd7Smrgfi 9434ea133fd7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes]) 9435ea133fd7SmrgAC_MSG_RESULT([$BUILDHTMLDOC]) 9436a253d6aeSmrg 9437ea133fd7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT" 9438ea133fd7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS" 9439ea133fd7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF" 9440ea133fd7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML" 9441a253d6aeSmrg 9442ea133fd7SmrgAC_SUBST(MAKE_TEXT) 9443ea133fd7SmrgAC_SUBST(MAKE_PS) 9444ea133fd7SmrgAC_SUBST(MAKE_PDF) 9445ea133fd7SmrgAC_SUBST(MAKE_HTML) 9446ea133fd7Smrg]) # XORG_CHECK_DOCBOOK 9447a253d6aeSmrg 9448ea133fd7Smrg# XORG_CHECK_MALLOC_ZERO 9449ea133fd7Smrg# ---------------------- 9450ea133fd7Smrg# Minimum version: 1.0.0 9451a253d6aeSmrg# 9452ea133fd7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if 9453ea133fd7Smrg# malloc(0) returns NULL. Packages should add one of these cflags to 9454ea133fd7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them. 9455ea133fd7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[ 9456ea133fd7SmrgAC_ARG_ENABLE(malloc0returnsnull, 9457ea133fd7Smrg AS_HELP_STRING([--enable-malloc0returnsnull], 9458ea133fd7Smrg [malloc(0) returns NULL (default: auto)]), 9459ea133fd7Smrg [MALLOC_ZERO_RETURNS_NULL=$enableval], 9460ea133fd7Smrg [MALLOC_ZERO_RETURNS_NULL=auto]) 9461a253d6aeSmrg 9462ea133fd7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL]) 9463ea133fd7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then 9464ea133fd7Smrg AC_RUN_IFELSE([ 9465ea133fd7Smrgchar *malloc(); 9466ea133fd7Smrgchar *realloc(); 9467ea133fd7Smrgchar *calloc(); 9468ea133fd7Smrgmain() { 9469ea133fd7Smrg char *m0, *r0, *c0, *p; 9470ea133fd7Smrg m0 = malloc(0); 9471ea133fd7Smrg p = malloc(10); 9472ea133fd7Smrg r0 = realloc(p,0); 9473ea133fd7Smrg c0 = calloc(0); 9474ea133fd7Smrg exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1); 9475ea133fd7Smrg}], 9476ea133fd7Smrg [MALLOC_ZERO_RETURNS_NULL=yes], 9477ea133fd7Smrg [MALLOC_ZERO_RETURNS_NULL=no]) 9478a253d6aeSmrgfi 9479ea133fd7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL]) 9480a253d6aeSmrg 9481ea133fd7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then 9482ea133fd7Smrg MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL" 9483ea133fd7Smrg XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS 9484ea133fd7Smrg XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC" 9485ea133fd7Smrgelse 9486ea133fd7Smrg MALLOC_ZERO_CFLAGS="" 9487ea133fd7Smrg XMALLOC_ZERO_CFLAGS="" 9488ea133fd7Smrg XTMALLOC_ZERO_CFLAGS="" 9489ea133fd7Smrgfi 9490ea133fd7Smrg 9491ea133fd7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS]) 9492ea133fd7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS]) 9493ea133fd7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS]) 9494ea133fd7Smrg]) # XORG_CHECK_MALLOC_ZERO 9495ea133fd7Smrg 9496ea133fd7Smrg# XORG_WITH_LINT() 9497ea133fd7Smrg# ---------------- 9498ea133fd7Smrg# Minimum version: 1.1.0 9499a253d6aeSmrg# 9500ea133fd7Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint 9501ea133fd7Smrg# is specified. (Use --with-lint=sparse for sparse.) 9502ea133fd7Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint) 9503ea133fd7Smrg# Sets $LINT_FLAGS to flags to pass to source checker 9504ea133fd7Smrg# Sets LINT automake conditional if enabled (default: disabled) 9505a253d6aeSmrg# 9506ea133fd7SmrgAC_DEFUN([XORG_WITH_LINT],[ 9507a253d6aeSmrg 9508ea133fd7Smrg# Allow checking code with lint, sparse, etc. 9509ea133fd7SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint], 9510ea133fd7Smrg [Use a lint-style source code checker (default: disabled)])], 9511ea133fd7Smrg [use_lint=$withval], [use_lint=no]) 9512ea133fd7Smrgif test "x$use_lint" = "xyes" ; then 9513ea133fd7Smrg LINT="lint" 9514a253d6aeSmrgelse 9515ea133fd7Smrg LINT="$use_lint" 9516ea133fd7Smrgfi 9517ea133fd7Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then 9518ea133fd7Smrg case $LINT in 9519ea133fd7Smrg lint|*/lint) 9520ea133fd7Smrg case $host_os in 9521ea133fd7Smrg solaris*) 9522ea133fd7Smrg LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2" 9523ea133fd7Smrg ;; 9524ea133fd7Smrg esac 9525ea133fd7Smrg ;; 9526ea133fd7Smrg esac 9527ea133fd7Smrgfi 9528a253d6aeSmrg 9529ea133fd7SmrgAC_SUBST(LINT) 9530ea133fd7SmrgAC_SUBST(LINT_FLAGS) 9531ea133fd7SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno]) 9532ea133fd7Smrg 9533ea133fd7Smrg]) # XORG_WITH_LINT 9534ea133fd7Smrg 9535ea133fd7Smrg# XORG_LINT_LIBRARY(LIBNAME) 9536ea133fd7Smrg# -------------------------- 9537ea133fd7Smrg# Minimum version: 1.1.0 9538a253d6aeSmrg# 9539ea133fd7Smrg# Sets up flags for building lint libraries for checking programs that call 9540ea133fd7Smrg# functions in the library. 9541ea133fd7Smrg# Disabled by default, enable with --enable-lint-library 9542ea133fd7Smrg# Sets: 9543ea133fd7Smrg# @LINTLIB@ - name of lint library file to make 9544ea133fd7Smrg# MAKE_LINT_LIB - automake conditional 9545a253d6aeSmrg# 9546a253d6aeSmrg 9547ea133fd7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[ 9548ea133fd7SmrgAC_REQUIRE([XORG_WITH_LINT]) 9549ea133fd7Smrg# Build lint "library" for more indepth checks of programs calling this library 9550ea133fd7SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library], 9551ea133fd7Smrg [Create lint library (default: disabled)])], 9552ea133fd7Smrg [make_lint_lib=$enableval], [make_lint_lib=no]) 9553ea133fd7Smrgif test "x$make_lint_lib" != "xno" ; then 9554ea133fd7Smrg if test "x$LINT" = "xno" ; then 9555ea133fd7Smrg AC_MSG_ERROR([Cannot make lint library without --with-lint]) 9556ea133fd7Smrg fi 9557ea133fd7Smrg if test "x$make_lint_lib" = "xyes" ; then 9558ea133fd7Smrg LINTLIB=llib-l$1.ln 9559ea133fd7Smrg else 9560ea133fd7Smrg LINTLIB=$make_lint_lib 9561ea133fd7Smrg fi 9562ea133fd7Smrgfi 9563ea133fd7SmrgAC_SUBST(LINTLIB) 9564ea133fd7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno]) 9565a253d6aeSmrg 9566ea133fd7Smrg]) # XORG_LINT_LIBRARY 9567a253d6aeSmrg 9568ea133fd7Smrg# XORG_CWARNFLAGS 9569ea133fd7Smrg# --------------- 9570ea133fd7Smrg# Minimum version: 1.2.0 9571ea133fd7Smrg# 9572ea133fd7Smrg# Defines CWARNFLAGS to enable C compiler warnings. 9573ea133fd7Smrg# 9574ea133fd7SmrgAC_DEFUN([XORG_CWARNFLAGS], [ 9575ea133fd7SmrgAC_REQUIRE([AC_PROG_CC]) 9576ea133fd7Smrgif test "x$GCC" = xyes ; then 9577ea133fd7Smrg CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \ 9578ea133fd7Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \ 9579ea133fd7Smrg-Wbad-function-cast" 9580ea133fd7Smrg case `$CC -dumpversion` in 9581ea133fd7Smrg 3.4.* | 4.*) 9582ea133fd7Smrg CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement" 9583ea133fd7Smrg ;; 9584ea133fd7Smrg esac 9585ea133fd7Smrgelse 9586ea133fd7Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 9587ea133fd7Smrg if test "x$SUNCC" = "xyes"; then 9588ea133fd7Smrg CWARNFLAGS="-v" 9589ea133fd7Smrg fi 9590ea133fd7Smrgfi 9591ea133fd7SmrgAC_SUBST(CWARNFLAGS) 9592ea133fd7Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) 9593ea133fd7Smrg]) # XORG_CWARNFLAGS 9594a253d6aeSmrg 9595ea133fd7Smrg# XORG_STRICT_OPTION 9596ea133fd7Smrg# ----------------------- 9597ea133fd7Smrg# Minimum version: 1.3.0 9598ea133fd7Smrg# 9599ea133fd7Smrg# Add configure option to enable strict compilation 9600ea133fd7SmrgAC_DEFUN([XORG_STRICT_OPTION], [ 9601ea133fd7SmrgAC_REQUIRE([AC_PROG_CC]) 9602ea133fd7SmrgAC_REQUIRE([AC_PROG_CC_C99]) 9603ea133fd7SmrgAC_REQUIRE([XORG_CWARNFLAGS]) 9604ea133fd7Smrg 9605ea133fd7SmrgAC_ARG_ENABLE(strict-compilation, 9606ea133fd7Smrg AS_HELP_STRING([--enable-strict-compilation], 9607ea133fd7Smrg [Enable all warnings from compiler and make them errors (default: disabled)]), 9608ea133fd7Smrg [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no]) 9609ea133fd7Smrgif test "x$STRICT_COMPILE" = "xyes"; then 9610ea133fd7Smrg AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"]) 9611ea133fd7Smrg AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"]) 9612ea133fd7Smrg if test "x$GCC" = xyes ; then 9613ea133fd7Smrg STRICT_CFLAGS="-pedantic -Werror" 9614ea133fd7Smrg elif test "x$SUNCC" = "xyes"; then 9615ea133fd7Smrg STRICT_CFLAGS="-errwarn" 9616ea133fd7Smrg elif test "x$INTELCC" = "xyes"; then 9617ea133fd7Smrg STRICT_CFLAGS="-Werror" 9618ea133fd7Smrg fi 9619ea133fd7Smrgfi 9620ea133fd7SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS" 9621ea133fd7SmrgAC_SUBST([CWARNFLAGS]) 9622ea133fd7Smrg]) # XORG_STRICT_OPTION 9623a253d6aeSmrg 9624ea133fd7Smrg# XORG_DEFAULT_OPTIONS 9625ea133fd7Smrg# -------------------- 9626ea133fd7Smrg# Minimum version: 1.3.0 9627ea133fd7Smrg# 9628ea133fd7Smrg# Defines default options for X.Org modules. 9629ea133fd7Smrg# 9630ea133fd7SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [ 9631ea133fd7SmrgXORG_CWARNFLAGS 9632ea133fd7SmrgXORG_STRICT_OPTION 9633ea133fd7SmrgXORG_RELEASE_VERSION 9634ea133fd7SmrgXORG_CHANGELOG 9635ea133fd7SmrgXORG_MANPAGE_SECTIONS 9636ea133fd7Smrg]) # XORG_DEFAULT_OPTIONS 9637ea133fd7Smrgdnl Copyright 2005 Red Hat, Inc 9638ea133fd7Smrgdnl 9639ea133fd7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its 9640ea133fd7Smrgdnl documentation for any purpose is hereby granted without fee, provided that 9641ea133fd7Smrgdnl the above copyright notice appear in all copies and that both that 9642ea133fd7Smrgdnl copyright notice and this permission notice appear in supporting 9643ea133fd7Smrgdnl documentation. 9644ea133fd7Smrgdnl 9645ea133fd7Smrgdnl The above copyright notice and this permission notice shall be included 9646ea133fd7Smrgdnl in all copies or substantial portions of the Software. 9647ea133fd7Smrgdnl 9648ea133fd7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 9649ea133fd7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 9650ea133fd7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 9651ea133fd7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR 9652ea133fd7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 9653ea133fd7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 9654ea133fd7Smrgdnl OTHER DEALINGS IN THE SOFTWARE. 9655ea133fd7Smrgdnl 9656ea133fd7Smrgdnl Except as contained in this notice, the name of the copyright holders shall 9657ea133fd7Smrgdnl not be used in advertising or otherwise to promote the sale, use or 9658ea133fd7Smrgdnl other dealings in this Software without prior written authorization 9659ea133fd7Smrgdnl from the copyright holders. 9660ea133fd7Smrgdnl 9661a253d6aeSmrg 9662ea133fd7Smrg# XORG_RELEASE_VERSION 9663ea133fd7Smrg# -------------------- 9664ea133fd7Smrg# Adds --with/without-release-string and changes the PACKAGE and 9665ea133fd7Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If 9666ea133fd7Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also 9667ea133fd7Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use. 9668ea133fd7Smrg 9669ea133fd7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[ 9670ea133fd7Smrg AC_ARG_WITH(release-version, 9671ea133fd7Smrg AS_HELP_STRING([--with-release-version=STRING], 9672ea133fd7Smrg [Use release version string in package name]), 9673ea133fd7Smrg [RELEASE_VERSION="$withval"], 9674ea133fd7Smrg [RELEASE_VERSION=""]) 9675ea133fd7Smrg if test "x$RELEASE_VERSION" != "x"; then 9676ea133fd7Smrg PACKAGE="$PACKAGE-$RELEASE_VERSION" 9677ea133fd7Smrg PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION" 9678ea133fd7Smrg AC_MSG_NOTICE([Building with package name set to $PACKAGE]) 9679ea133fd7Smrg fi 9680ea133fd7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR], 9681ea133fd7Smrg [`echo $PACKAGE_VERSION | cut -d . -f 1`], 9682ea133fd7Smrg [Major version of this package]) 9683ea133fd7Smrg PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1` 9684ea133fd7Smrg if test "x$PVM" = "x"; then 9685ea133fd7Smrg PVM="0" 9686ea133fd7Smrg fi 9687ea133fd7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR], 9688ea133fd7Smrg [$PVM], 9689ea133fd7Smrg [Minor version of this package]) 9690ea133fd7Smrg PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1` 9691ea133fd7Smrg if test "x$PVP" = "x"; then 9692ea133fd7Smrg PVP="0" 9693ea133fd7Smrg fi 9694ea133fd7Smrg AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL], 9695ea133fd7Smrg [$PVP], 9696ea133fd7Smrg [Patch version of this package]) 9697ea133fd7Smrg]) 9698a253d6aeSmrg 9699ea133fd7Smrg# XORG_CHANGELOG() 9700ea133fd7Smrg# ---------------- 9701ea133fd7Smrg# Minimum version: 1.2.0 9702ea133fd7Smrg# 9703ea133fd7Smrg# Defines the variable CHANGELOG_CMD as the command to generate 9704ea133fd7Smrg# ChangeLog from git. 9705ea133fd7Smrg# 9706ea133fd7Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean. 9707ea133fd7Smrg# 9708ea133fd7SmrgAC_DEFUN([XORG_CHANGELOG], [ 9709ea133fd7SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \ 9710ea133fd7Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \ 9711ea133fd7Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)" 9712ea133fd7SmrgAC_SUBST([CHANGELOG_CMD]) 9713ea133fd7SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print']) 9714ea133fd7Smrg]) # XORG_CHANGELOG 9715a253d6aeSmrg 9716