annotate fft/fftw/fftw-3.3.4/m4/libtool.m4 @ 40:223f770b5341 kissfft-double tip

Try a double-precision kissfft
author Chris Cannam
date Wed, 07 Sep 2016 10:40:32 +0100
parents 26056e866c29
children
rev   line source
Chris@19 1 # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
Chris@19 2 #
Chris@19 3 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
Chris@19 4 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
Chris@19 5 # Foundation, Inc.
Chris@19 6 # Written by Gordon Matzigkeit, 1996
Chris@19 7 #
Chris@19 8 # This file is free software; the Free Software Foundation gives
Chris@19 9 # unlimited permission to copy and/or distribute it, with or without
Chris@19 10 # modifications, as long as this notice is preserved.
Chris@19 11
Chris@19 12 m4_define([_LT_COPYING], [dnl
Chris@19 13 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
Chris@19 14 # 2006, 2007, 2008, 2009, 2010, 2011 Free Software
Chris@19 15 # Foundation, Inc.
Chris@19 16 # Written by Gordon Matzigkeit, 1996
Chris@19 17 #
Chris@19 18 # This file is part of GNU Libtool.
Chris@19 19 #
Chris@19 20 # GNU Libtool is free software; you can redistribute it and/or
Chris@19 21 # modify it under the terms of the GNU General Public License as
Chris@19 22 # published by the Free Software Foundation; either version 2 of
Chris@19 23 # the License, or (at your option) any later version.
Chris@19 24 #
Chris@19 25 # As a special exception to the GNU General Public License,
Chris@19 26 # if you distribute this file as part of a program or library that
Chris@19 27 # is built using GNU Libtool, you may include this file under the
Chris@19 28 # same distribution terms that you use for the rest of that program.
Chris@19 29 #
Chris@19 30 # GNU Libtool is distributed in the hope that it will be useful,
Chris@19 31 # but WITHOUT ANY WARRANTY; without even the implied warranty of
Chris@19 32 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Chris@19 33 # GNU General Public License for more details.
Chris@19 34 #
Chris@19 35 # You should have received a copy of the GNU General Public License
Chris@19 36 # along with GNU Libtool; see the file COPYING. If not, a copy
Chris@19 37 # can be downloaded from http://www.gnu.org/licenses/gpl.html, or
Chris@19 38 # obtained by writing to the Free Software Foundation, Inc.,
Chris@19 39 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Chris@19 40 ])
Chris@19 41
Chris@19 42 # serial 57 LT_INIT
Chris@19 43
Chris@19 44
Chris@19 45 # LT_PREREQ(VERSION)
Chris@19 46 # ------------------
Chris@19 47 # Complain and exit if this libtool version is less that VERSION.
Chris@19 48 m4_defun([LT_PREREQ],
Chris@19 49 [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
Chris@19 50 [m4_default([$3],
Chris@19 51 [m4_fatal([Libtool version $1 or higher is required],
Chris@19 52 63)])],
Chris@19 53 [$2])])
Chris@19 54
Chris@19 55
Chris@19 56 # _LT_CHECK_BUILDDIR
Chris@19 57 # ------------------
Chris@19 58 # Complain if the absolute build directory name contains unusual characters
Chris@19 59 m4_defun([_LT_CHECK_BUILDDIR],
Chris@19 60 [case `pwd` in
Chris@19 61 *\ * | *\ *)
Chris@19 62 AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
Chris@19 63 esac
Chris@19 64 ])
Chris@19 65
Chris@19 66
Chris@19 67 # LT_INIT([OPTIONS])
Chris@19 68 # ------------------
Chris@19 69 AC_DEFUN([LT_INIT],
Chris@19 70 [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
Chris@19 71 AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
Chris@19 72 AC_BEFORE([$0], [LT_LANG])dnl
Chris@19 73 AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@19 74 AC_BEFORE([$0], [LTDL_INIT])dnl
Chris@19 75 m4_require([_LT_CHECK_BUILDDIR])dnl
Chris@19 76
Chris@19 77 dnl Autoconf doesn't catch unexpanded LT_ macros by default:
Chris@19 78 m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
Chris@19 79 m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
Chris@19 80 dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
Chris@19 81 dnl unless we require an AC_DEFUNed macro:
Chris@19 82 AC_REQUIRE([LTOPTIONS_VERSION])dnl
Chris@19 83 AC_REQUIRE([LTSUGAR_VERSION])dnl
Chris@19 84 AC_REQUIRE([LTVERSION_VERSION])dnl
Chris@19 85 AC_REQUIRE([LTOBSOLETE_VERSION])dnl
Chris@19 86 m4_require([_LT_PROG_LTMAIN])dnl
Chris@19 87
Chris@19 88 _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
Chris@19 89
Chris@19 90 dnl Parse OPTIONS
Chris@19 91 _LT_SET_OPTIONS([$0], [$1])
Chris@19 92
Chris@19 93 # This can be used to rebuild libtool when needed
Chris@19 94 LIBTOOL_DEPS="$ltmain"
Chris@19 95
Chris@19 96 # Always use our own libtool.
Chris@19 97 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
Chris@19 98 AC_SUBST(LIBTOOL)dnl
Chris@19 99
Chris@19 100 _LT_SETUP
Chris@19 101
Chris@19 102 # Only expand once:
Chris@19 103 m4_define([LT_INIT])
Chris@19 104 ])# LT_INIT
Chris@19 105
Chris@19 106 # Old names:
Chris@19 107 AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
Chris@19 108 AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
Chris@19 109 dnl aclocal-1.4 backwards compatibility:
Chris@19 110 dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
Chris@19 111 dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
Chris@19 112
Chris@19 113
Chris@19 114 # _LT_CC_BASENAME(CC)
Chris@19 115 # -------------------
Chris@19 116 # Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
Chris@19 117 m4_defun([_LT_CC_BASENAME],
Chris@19 118 [for cc_temp in $1""; do
Chris@19 119 case $cc_temp in
Chris@19 120 compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
Chris@19 121 distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
Chris@19 122 \-*) ;;
Chris@19 123 *) break;;
Chris@19 124 esac
Chris@19 125 done
Chris@19 126 cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
Chris@19 127 ])
Chris@19 128
Chris@19 129
Chris@19 130 # _LT_FILEUTILS_DEFAULTS
Chris@19 131 # ----------------------
Chris@19 132 # It is okay to use these file commands and assume they have been set
Chris@19 133 # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
Chris@19 134 m4_defun([_LT_FILEUTILS_DEFAULTS],
Chris@19 135 [: ${CP="cp -f"}
Chris@19 136 : ${MV="mv -f"}
Chris@19 137 : ${RM="rm -f"}
Chris@19 138 ])# _LT_FILEUTILS_DEFAULTS
Chris@19 139
Chris@19 140
Chris@19 141 # _LT_SETUP
Chris@19 142 # ---------
Chris@19 143 m4_defun([_LT_SETUP],
Chris@19 144 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@19 145 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@19 146 AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
Chris@19 147 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@19 148
Chris@19 149 _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
Chris@19 150 dnl
Chris@19 151 _LT_DECL([], [host_alias], [0], [The host system])dnl
Chris@19 152 _LT_DECL([], [host], [0])dnl
Chris@19 153 _LT_DECL([], [host_os], [0])dnl
Chris@19 154 dnl
Chris@19 155 _LT_DECL([], [build_alias], [0], [The build system])dnl
Chris@19 156 _LT_DECL([], [build], [0])dnl
Chris@19 157 _LT_DECL([], [build_os], [0])dnl
Chris@19 158 dnl
Chris@19 159 AC_REQUIRE([AC_PROG_CC])dnl
Chris@19 160 AC_REQUIRE([LT_PATH_LD])dnl
Chris@19 161 AC_REQUIRE([LT_PATH_NM])dnl
Chris@19 162 dnl
Chris@19 163 AC_REQUIRE([AC_PROG_LN_S])dnl
Chris@19 164 test -z "$LN_S" && LN_S="ln -s"
Chris@19 165 _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
Chris@19 166 dnl
Chris@19 167 AC_REQUIRE([LT_CMD_MAX_LEN])dnl
Chris@19 168 _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
Chris@19 169 _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
Chris@19 170 dnl
Chris@19 171 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@19 172 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@19 173 m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
Chris@19 174 m4_require([_LT_CMD_RELOAD])dnl
Chris@19 175 m4_require([_LT_CHECK_MAGIC_METHOD])dnl
Chris@19 176 m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
Chris@19 177 m4_require([_LT_CMD_OLD_ARCHIVE])dnl
Chris@19 178 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@19 179 m4_require([_LT_WITH_SYSROOT])dnl
Chris@19 180
Chris@19 181 _LT_CONFIG_LIBTOOL_INIT([
Chris@19 182 # See if we are running on zsh, and set the options which allow our
Chris@19 183 # commands through without removal of \ escapes INIT.
Chris@19 184 if test -n "\${ZSH_VERSION+set}" ; then
Chris@19 185 setopt NO_GLOB_SUBST
Chris@19 186 fi
Chris@19 187 ])
Chris@19 188 if test -n "${ZSH_VERSION+set}" ; then
Chris@19 189 setopt NO_GLOB_SUBST
Chris@19 190 fi
Chris@19 191
Chris@19 192 _LT_CHECK_OBJDIR
Chris@19 193
Chris@19 194 m4_require([_LT_TAG_COMPILER])dnl
Chris@19 195
Chris@19 196 case $host_os in
Chris@19 197 aix3*)
Chris@19 198 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@19 199 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@19 200 # vanish in a puff of smoke.
Chris@19 201 if test "X${COLLECT_NAMES+set}" != Xset; then
Chris@19 202 COLLECT_NAMES=
Chris@19 203 export COLLECT_NAMES
Chris@19 204 fi
Chris@19 205 ;;
Chris@19 206 esac
Chris@19 207
Chris@19 208 # Global variables:
Chris@19 209 ofile=libtool
Chris@19 210 can_build_shared=yes
Chris@19 211
Chris@19 212 # All known linkers require a `.a' archive for static linking (except MSVC,
Chris@19 213 # which needs '.lib').
Chris@19 214 libext=a
Chris@19 215
Chris@19 216 with_gnu_ld="$lt_cv_prog_gnu_ld"
Chris@19 217
Chris@19 218 old_CC="$CC"
Chris@19 219 old_CFLAGS="$CFLAGS"
Chris@19 220
Chris@19 221 # Set sane defaults for various variables
Chris@19 222 test -z "$CC" && CC=cc
Chris@19 223 test -z "$LTCC" && LTCC=$CC
Chris@19 224 test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
Chris@19 225 test -z "$LD" && LD=ld
Chris@19 226 test -z "$ac_objext" && ac_objext=o
Chris@19 227
Chris@19 228 _LT_CC_BASENAME([$compiler])
Chris@19 229
Chris@19 230 # Only perform the check for file, if the check method requires it
Chris@19 231 test -z "$MAGIC_CMD" && MAGIC_CMD=file
Chris@19 232 case $deplibs_check_method in
Chris@19 233 file_magic*)
Chris@19 234 if test "$file_magic_cmd" = '$MAGIC_CMD'; then
Chris@19 235 _LT_PATH_MAGIC
Chris@19 236 fi
Chris@19 237 ;;
Chris@19 238 esac
Chris@19 239
Chris@19 240 # Use C for the default configuration in the libtool script
Chris@19 241 LT_SUPPORTED_TAG([CC])
Chris@19 242 _LT_LANG_C_CONFIG
Chris@19 243 _LT_LANG_DEFAULT_CONFIG
Chris@19 244 _LT_CONFIG_COMMANDS
Chris@19 245 ])# _LT_SETUP
Chris@19 246
Chris@19 247
Chris@19 248 # _LT_PREPARE_SED_QUOTE_VARS
Chris@19 249 # --------------------------
Chris@19 250 # Define a few sed substitution that help us do robust quoting.
Chris@19 251 m4_defun([_LT_PREPARE_SED_QUOTE_VARS],
Chris@19 252 [# Backslashify metacharacters that are still active within
Chris@19 253 # double-quoted strings.
Chris@19 254 sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
Chris@19 255
Chris@19 256 # Same as above, but do not quote variable references.
Chris@19 257 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
Chris@19 258
Chris@19 259 # Sed substitution to delay expansion of an escaped shell variable in a
Chris@19 260 # double_quote_subst'ed string.
Chris@19 261 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
Chris@19 262
Chris@19 263 # Sed substitution to delay expansion of an escaped single quote.
Chris@19 264 delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
Chris@19 265
Chris@19 266 # Sed substitution to avoid accidental globbing in evaled expressions
Chris@19 267 no_glob_subst='s/\*/\\\*/g'
Chris@19 268 ])
Chris@19 269
Chris@19 270 # _LT_PROG_LTMAIN
Chris@19 271 # ---------------
Chris@19 272 # Note that this code is called both from `configure', and `config.status'
Chris@19 273 # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
Chris@19 274 # `config.status' has no value for ac_aux_dir unless we are using Automake,
Chris@19 275 # so we pass a copy along to make sure it has a sensible value anyway.
Chris@19 276 m4_defun([_LT_PROG_LTMAIN],
Chris@19 277 [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
Chris@19 278 _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
Chris@19 279 ltmain="$ac_aux_dir/ltmain.sh"
Chris@19 280 ])# _LT_PROG_LTMAIN
Chris@19 281
Chris@19 282
Chris@19 283 ## ------------------------------------- ##
Chris@19 284 ## Accumulate code for creating libtool. ##
Chris@19 285 ## ------------------------------------- ##
Chris@19 286
Chris@19 287 # So that we can recreate a full libtool script including additional
Chris@19 288 # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
Chris@19 289 # in macros and then make a single call at the end using the `libtool'
Chris@19 290 # label.
Chris@19 291
Chris@19 292
Chris@19 293 # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
Chris@19 294 # ----------------------------------------
Chris@19 295 # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@19 296 m4_define([_LT_CONFIG_LIBTOOL_INIT],
Chris@19 297 [m4_ifval([$1],
Chris@19 298 [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
Chris@19 299 [$1
Chris@19 300 ])])])
Chris@19 301
Chris@19 302 # Initialize.
Chris@19 303 m4_define([_LT_OUTPUT_LIBTOOL_INIT])
Chris@19 304
Chris@19 305
Chris@19 306 # _LT_CONFIG_LIBTOOL([COMMANDS])
Chris@19 307 # ------------------------------
Chris@19 308 # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
Chris@19 309 m4_define([_LT_CONFIG_LIBTOOL],
Chris@19 310 [m4_ifval([$1],
Chris@19 311 [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
Chris@19 312 [$1
Chris@19 313 ])])])
Chris@19 314
Chris@19 315 # Initialize.
Chris@19 316 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
Chris@19 317
Chris@19 318
Chris@19 319 # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
Chris@19 320 # -----------------------------------------------------
Chris@19 321 m4_defun([_LT_CONFIG_SAVE_COMMANDS],
Chris@19 322 [_LT_CONFIG_LIBTOOL([$1])
Chris@19 323 _LT_CONFIG_LIBTOOL_INIT([$2])
Chris@19 324 ])
Chris@19 325
Chris@19 326
Chris@19 327 # _LT_FORMAT_COMMENT([COMMENT])
Chris@19 328 # -----------------------------
Chris@19 329 # Add leading comment marks to the start of each line, and a trailing
Chris@19 330 # full-stop to the whole comment if one is not present already.
Chris@19 331 m4_define([_LT_FORMAT_COMMENT],
Chris@19 332 [m4_ifval([$1], [
Chris@19 333 m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
Chris@19 334 [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
Chris@19 335 )])
Chris@19 336
Chris@19 337
Chris@19 338
Chris@19 339 ## ------------------------ ##
Chris@19 340 ## FIXME: Eliminate VARNAME ##
Chris@19 341 ## ------------------------ ##
Chris@19 342
Chris@19 343
Chris@19 344 # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
Chris@19 345 # -------------------------------------------------------------------
Chris@19 346 # CONFIGNAME is the name given to the value in the libtool script.
Chris@19 347 # VARNAME is the (base) name used in the configure script.
Chris@19 348 # VALUE may be 0, 1 or 2 for a computed quote escaped value based on
Chris@19 349 # VARNAME. Any other value will be used directly.
Chris@19 350 m4_define([_LT_DECL],
Chris@19 351 [lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
Chris@19 352 [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
Chris@19 353 [m4_ifval([$1], [$1], [$2])])
Chris@19 354 lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
Chris@19 355 m4_ifval([$4],
Chris@19 356 [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
Chris@19 357 lt_dict_add_subkey([lt_decl_dict], [$2],
Chris@19 358 [tagged?], [m4_ifval([$5], [yes], [no])])])
Chris@19 359 ])
Chris@19 360
Chris@19 361
Chris@19 362 # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
Chris@19 363 # --------------------------------------------------------
Chris@19 364 m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
Chris@19 365
Chris@19 366
Chris@19 367 # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
Chris@19 368 # ------------------------------------------------
Chris@19 369 m4_define([lt_decl_tag_varnames],
Chris@19 370 [_lt_decl_filter([tagged?], [yes], $@)])
Chris@19 371
Chris@19 372
Chris@19 373 # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
Chris@19 374 # ---------------------------------------------------------
Chris@19 375 m4_define([_lt_decl_filter],
Chris@19 376 [m4_case([$#],
Chris@19 377 [0], [m4_fatal([$0: too few arguments: $#])],
Chris@19 378 [1], [m4_fatal([$0: too few arguments: $#: $1])],
Chris@19 379 [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
Chris@19 380 [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
Chris@19 381 [lt_dict_filter([lt_decl_dict], $@)])[]dnl
Chris@19 382 ])
Chris@19 383
Chris@19 384
Chris@19 385 # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
Chris@19 386 # --------------------------------------------------
Chris@19 387 m4_define([lt_decl_quote_varnames],
Chris@19 388 [_lt_decl_filter([value], [1], $@)])
Chris@19 389
Chris@19 390
Chris@19 391 # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
Chris@19 392 # ---------------------------------------------------
Chris@19 393 m4_define([lt_decl_dquote_varnames],
Chris@19 394 [_lt_decl_filter([value], [2], $@)])
Chris@19 395
Chris@19 396
Chris@19 397 # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
Chris@19 398 # ---------------------------------------------------
Chris@19 399 m4_define([lt_decl_varnames_tagged],
Chris@19 400 [m4_assert([$# <= 2])dnl
Chris@19 401 _$0(m4_quote(m4_default([$1], [[, ]])),
Chris@19 402 m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
Chris@19 403 m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
Chris@19 404 m4_define([_lt_decl_varnames_tagged],
Chris@19 405 [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
Chris@19 406
Chris@19 407
Chris@19 408 # lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
Chris@19 409 # ------------------------------------------------
Chris@19 410 m4_define([lt_decl_all_varnames],
Chris@19 411 [_$0(m4_quote(m4_default([$1], [[, ]])),
Chris@19 412 m4_if([$2], [],
Chris@19 413 m4_quote(lt_decl_varnames),
Chris@19 414 m4_quote(m4_shift($@))))[]dnl
Chris@19 415 ])
Chris@19 416 m4_define([_lt_decl_all_varnames],
Chris@19 417 [lt_join($@, lt_decl_varnames_tagged([$1],
Chris@19 418 lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
Chris@19 419 ])
Chris@19 420
Chris@19 421
Chris@19 422 # _LT_CONFIG_STATUS_DECLARE([VARNAME])
Chris@19 423 # ------------------------------------
Chris@19 424 # Quote a variable value, and forward it to `config.status' so that its
Chris@19 425 # declaration there will have the same value as in `configure'. VARNAME
Chris@19 426 # must have a single quote delimited value for this to work.
Chris@19 427 m4_define([_LT_CONFIG_STATUS_DECLARE],
Chris@19 428 [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
Chris@19 429
Chris@19 430
Chris@19 431 # _LT_CONFIG_STATUS_DECLARATIONS
Chris@19 432 # ------------------------------
Chris@19 433 # We delimit libtool config variables with single quotes, so when
Chris@19 434 # we write them to config.status, we have to be sure to quote all
Chris@19 435 # embedded single quotes properly. In configure, this macro expands
Chris@19 436 # each variable declared with _LT_DECL (and _LT_TAGDECL) into:
Chris@19 437 #
Chris@19 438 # <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
Chris@19 439 m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
Chris@19 440 [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
Chris@19 441 [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
Chris@19 442
Chris@19 443
Chris@19 444 # _LT_LIBTOOL_TAGS
Chris@19 445 # ----------------
Chris@19 446 # Output comment and list of tags supported by the script
Chris@19 447 m4_defun([_LT_LIBTOOL_TAGS],
Chris@19 448 [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
Chris@19 449 available_tags="_LT_TAGS"dnl
Chris@19 450 ])
Chris@19 451
Chris@19 452
Chris@19 453 # _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
Chris@19 454 # -----------------------------------
Chris@19 455 # Extract the dictionary values for VARNAME (optionally with TAG) and
Chris@19 456 # expand to a commented shell variable setting:
Chris@19 457 #
Chris@19 458 # # Some comment about what VAR is for.
Chris@19 459 # visible_name=$lt_internal_name
Chris@19 460 m4_define([_LT_LIBTOOL_DECLARE],
Chris@19 461 [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
Chris@19 462 [description])))[]dnl
Chris@19 463 m4_pushdef([_libtool_name],
Chris@19 464 m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
Chris@19 465 m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
Chris@19 466 [0], [_libtool_name=[$]$1],
Chris@19 467 [1], [_libtool_name=$lt_[]$1],
Chris@19 468 [2], [_libtool_name=$lt_[]$1],
Chris@19 469 [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
Chris@19 470 m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
Chris@19 471 ])
Chris@19 472
Chris@19 473
Chris@19 474 # _LT_LIBTOOL_CONFIG_VARS
Chris@19 475 # -----------------------
Chris@19 476 # Produce commented declarations of non-tagged libtool config variables
Chris@19 477 # suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
Chris@19 478 # script. Tagged libtool config variables (even for the LIBTOOL CONFIG
Chris@19 479 # section) are produced by _LT_LIBTOOL_TAG_VARS.
Chris@19 480 m4_defun([_LT_LIBTOOL_CONFIG_VARS],
Chris@19 481 [m4_foreach([_lt_var],
Chris@19 482 m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
Chris@19 483 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
Chris@19 484
Chris@19 485
Chris@19 486 # _LT_LIBTOOL_TAG_VARS(TAG)
Chris@19 487 # -------------------------
Chris@19 488 m4_define([_LT_LIBTOOL_TAG_VARS],
Chris@19 489 [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
Chris@19 490 [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
Chris@19 491
Chris@19 492
Chris@19 493 # _LT_TAGVAR(VARNAME, [TAGNAME])
Chris@19 494 # ------------------------------
Chris@19 495 m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
Chris@19 496
Chris@19 497
Chris@19 498 # _LT_CONFIG_COMMANDS
Chris@19 499 # -------------------
Chris@19 500 # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
Chris@19 501 # variables for single and double quote escaping we saved from calls
Chris@19 502 # to _LT_DECL, we can put quote escaped variables declarations
Chris@19 503 # into `config.status', and then the shell code to quote escape them in
Chris@19 504 # for loops in `config.status'. Finally, any additional code accumulated
Chris@19 505 # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
Chris@19 506 m4_defun([_LT_CONFIG_COMMANDS],
Chris@19 507 [AC_PROVIDE_IFELSE([LT_OUTPUT],
Chris@19 508 dnl If the libtool generation code has been placed in $CONFIG_LT,
Chris@19 509 dnl instead of duplicating it all over again into config.status,
Chris@19 510 dnl then we will have config.status run $CONFIG_LT later, so it
Chris@19 511 dnl needs to know what name is stored there:
Chris@19 512 [AC_CONFIG_COMMANDS([libtool],
Chris@19 513 [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
Chris@19 514 dnl If the libtool generation code is destined for config.status,
Chris@19 515 dnl expand the accumulated commands and init code now:
Chris@19 516 [AC_CONFIG_COMMANDS([libtool],
Chris@19 517 [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
Chris@19 518 ])#_LT_CONFIG_COMMANDS
Chris@19 519
Chris@19 520
Chris@19 521 # Initialize.
Chris@19 522 m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
Chris@19 523 [
Chris@19 524
Chris@19 525 # The HP-UX ksh and POSIX shell print the target directory to stdout
Chris@19 526 # if CDPATH is set.
Chris@19 527 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
Chris@19 528
Chris@19 529 sed_quote_subst='$sed_quote_subst'
Chris@19 530 double_quote_subst='$double_quote_subst'
Chris@19 531 delay_variable_subst='$delay_variable_subst'
Chris@19 532 _LT_CONFIG_STATUS_DECLARATIONS
Chris@19 533 LTCC='$LTCC'
Chris@19 534 LTCFLAGS='$LTCFLAGS'
Chris@19 535 compiler='$compiler_DEFAULT'
Chris@19 536
Chris@19 537 # A function that is used when there is no print builtin or printf.
Chris@19 538 func_fallback_echo ()
Chris@19 539 {
Chris@19 540 eval 'cat <<_LTECHO_EOF
Chris@19 541 \$[]1
Chris@19 542 _LTECHO_EOF'
Chris@19 543 }
Chris@19 544
Chris@19 545 # Quote evaled strings.
Chris@19 546 for var in lt_decl_all_varnames([[ \
Chris@19 547 ]], lt_decl_quote_varnames); do
Chris@19 548 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@19 549 *[[\\\\\\\`\\"\\\$]]*)
Chris@19 550 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
Chris@19 551 ;;
Chris@19 552 *)
Chris@19 553 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@19 554 ;;
Chris@19 555 esac
Chris@19 556 done
Chris@19 557
Chris@19 558 # Double-quote double-evaled strings.
Chris@19 559 for var in lt_decl_all_varnames([[ \
Chris@19 560 ]], lt_decl_dquote_varnames); do
Chris@19 561 case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
Chris@19 562 *[[\\\\\\\`\\"\\\$]]*)
Chris@19 563 eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
Chris@19 564 ;;
Chris@19 565 *)
Chris@19 566 eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
Chris@19 567 ;;
Chris@19 568 esac
Chris@19 569 done
Chris@19 570
Chris@19 571 _LT_OUTPUT_LIBTOOL_INIT
Chris@19 572 ])
Chris@19 573
Chris@19 574 # _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
Chris@19 575 # ------------------------------------
Chris@19 576 # Generate a child script FILE with all initialization necessary to
Chris@19 577 # reuse the environment learned by the parent script, and make the
Chris@19 578 # file executable. If COMMENT is supplied, it is inserted after the
Chris@19 579 # `#!' sequence but before initialization text begins. After this
Chris@19 580 # macro, additional text can be appended to FILE to form the body of
Chris@19 581 # the child script. The macro ends with non-zero status if the
Chris@19 582 # file could not be fully written (such as if the disk is full).
Chris@19 583 m4_ifdef([AS_INIT_GENERATED],
Chris@19 584 [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
Chris@19 585 [m4_defun([_LT_GENERATED_FILE_INIT],
Chris@19 586 [m4_require([AS_PREPARE])]dnl
Chris@19 587 [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
Chris@19 588 [lt_write_fail=0
Chris@19 589 cat >$1 <<_ASEOF || lt_write_fail=1
Chris@19 590 #! $SHELL
Chris@19 591 # Generated by $as_me.
Chris@19 592 $2
Chris@19 593 SHELL=\${CONFIG_SHELL-$SHELL}
Chris@19 594 export SHELL
Chris@19 595 _ASEOF
Chris@19 596 cat >>$1 <<\_ASEOF || lt_write_fail=1
Chris@19 597 AS_SHELL_SANITIZE
Chris@19 598 _AS_PREPARE
Chris@19 599 exec AS_MESSAGE_FD>&1
Chris@19 600 _ASEOF
Chris@19 601 test $lt_write_fail = 0 && chmod +x $1[]dnl
Chris@19 602 m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
Chris@19 603
Chris@19 604 # LT_OUTPUT
Chris@19 605 # ---------
Chris@19 606 # This macro allows early generation of the libtool script (before
Chris@19 607 # AC_OUTPUT is called), incase it is used in configure for compilation
Chris@19 608 # tests.
Chris@19 609 AC_DEFUN([LT_OUTPUT],
Chris@19 610 [: ${CONFIG_LT=./config.lt}
Chris@19 611 AC_MSG_NOTICE([creating $CONFIG_LT])
Chris@19 612 _LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
Chris@19 613 [# Run this file to recreate a libtool stub with the current configuration.])
Chris@19 614
Chris@19 615 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@19 616 lt_cl_silent=false
Chris@19 617 exec AS_MESSAGE_LOG_FD>>config.log
Chris@19 618 {
Chris@19 619 echo
Chris@19 620 AS_BOX([Running $as_me.])
Chris@19 621 } >&AS_MESSAGE_LOG_FD
Chris@19 622
Chris@19 623 lt_cl_help="\
Chris@19 624 \`$as_me' creates a local libtool stub from the current configuration,
Chris@19 625 for use in further configure time tests before the real libtool is
Chris@19 626 generated.
Chris@19 627
Chris@19 628 Usage: $[0] [[OPTIONS]]
Chris@19 629
Chris@19 630 -h, --help print this help, then exit
Chris@19 631 -V, --version print version number, then exit
Chris@19 632 -q, --quiet do not print progress messages
Chris@19 633 -d, --debug don't remove temporary files
Chris@19 634
Chris@19 635 Report bugs to <bug-libtool@gnu.org>."
Chris@19 636
Chris@19 637 lt_cl_version="\
Chris@19 638 m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
Chris@19 639 m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
Chris@19 640 configured by $[0], generated by m4_PACKAGE_STRING.
Chris@19 641
Chris@19 642 Copyright (C) 2011 Free Software Foundation, Inc.
Chris@19 643 This config.lt script is free software; the Free Software Foundation
Chris@19 644 gives unlimited permision to copy, distribute and modify it."
Chris@19 645
Chris@19 646 while test $[#] != 0
Chris@19 647 do
Chris@19 648 case $[1] in
Chris@19 649 --version | --v* | -V )
Chris@19 650 echo "$lt_cl_version"; exit 0 ;;
Chris@19 651 --help | --h* | -h )
Chris@19 652 echo "$lt_cl_help"; exit 0 ;;
Chris@19 653 --debug | --d* | -d )
Chris@19 654 debug=: ;;
Chris@19 655 --quiet | --q* | --silent | --s* | -q )
Chris@19 656 lt_cl_silent=: ;;
Chris@19 657
Chris@19 658 -*) AC_MSG_ERROR([unrecognized option: $[1]
Chris@19 659 Try \`$[0] --help' for more information.]) ;;
Chris@19 660
Chris@19 661 *) AC_MSG_ERROR([unrecognized argument: $[1]
Chris@19 662 Try \`$[0] --help' for more information.]) ;;
Chris@19 663 esac
Chris@19 664 shift
Chris@19 665 done
Chris@19 666
Chris@19 667 if $lt_cl_silent; then
Chris@19 668 exec AS_MESSAGE_FD>/dev/null
Chris@19 669 fi
Chris@19 670 _LTEOF
Chris@19 671
Chris@19 672 cat >>"$CONFIG_LT" <<_LTEOF
Chris@19 673 _LT_OUTPUT_LIBTOOL_COMMANDS_INIT
Chris@19 674 _LTEOF
Chris@19 675
Chris@19 676 cat >>"$CONFIG_LT" <<\_LTEOF
Chris@19 677 AC_MSG_NOTICE([creating $ofile])
Chris@19 678 _LT_OUTPUT_LIBTOOL_COMMANDS
Chris@19 679 AS_EXIT(0)
Chris@19 680 _LTEOF
Chris@19 681 chmod +x "$CONFIG_LT"
Chris@19 682
Chris@19 683 # configure is writing to config.log, but config.lt does its own redirection,
Chris@19 684 # appending to config.log, which fails on DOS, as config.log is still kept
Chris@19 685 # open by configure. Here we exec the FD to /dev/null, effectively closing
Chris@19 686 # config.log, so it can be properly (re)opened and appended to by config.lt.
Chris@19 687 lt_cl_success=:
Chris@19 688 test "$silent" = yes &&
Chris@19 689 lt_config_lt_args="$lt_config_lt_args --quiet"
Chris@19 690 exec AS_MESSAGE_LOG_FD>/dev/null
Chris@19 691 $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
Chris@19 692 exec AS_MESSAGE_LOG_FD>>config.log
Chris@19 693 $lt_cl_success || AS_EXIT(1)
Chris@19 694 ])# LT_OUTPUT
Chris@19 695
Chris@19 696
Chris@19 697 # _LT_CONFIG(TAG)
Chris@19 698 # ---------------
Chris@19 699 # If TAG is the built-in tag, create an initial libtool script with a
Chris@19 700 # default configuration from the untagged config vars. Otherwise add code
Chris@19 701 # to config.status for appending the configuration named by TAG from the
Chris@19 702 # matching tagged config vars.
Chris@19 703 m4_defun([_LT_CONFIG],
Chris@19 704 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@19 705 _LT_CONFIG_SAVE_COMMANDS([
Chris@19 706 m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
Chris@19 707 m4_if(_LT_TAG, [C], [
Chris@19 708 # See if we are running on zsh, and set the options which allow our
Chris@19 709 # commands through without removal of \ escapes.
Chris@19 710 if test -n "${ZSH_VERSION+set}" ; then
Chris@19 711 setopt NO_GLOB_SUBST
Chris@19 712 fi
Chris@19 713
Chris@19 714 cfgfile="${ofile}T"
Chris@19 715 trap "$RM \"$cfgfile\"; exit 1" 1 2 15
Chris@19 716 $RM "$cfgfile"
Chris@19 717
Chris@19 718 cat <<_LT_EOF >> "$cfgfile"
Chris@19 719 #! $SHELL
Chris@19 720
Chris@19 721 # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
Chris@19 722 # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
Chris@19 723 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
Chris@19 724 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
Chris@19 725 #
Chris@19 726 _LT_COPYING
Chris@19 727 _LT_LIBTOOL_TAGS
Chris@19 728
Chris@19 729 # ### BEGIN LIBTOOL CONFIG
Chris@19 730 _LT_LIBTOOL_CONFIG_VARS
Chris@19 731 _LT_LIBTOOL_TAG_VARS
Chris@19 732 # ### END LIBTOOL CONFIG
Chris@19 733
Chris@19 734 _LT_EOF
Chris@19 735
Chris@19 736 case $host_os in
Chris@19 737 aix3*)
Chris@19 738 cat <<\_LT_EOF >> "$cfgfile"
Chris@19 739 # AIX sometimes has problems with the GCC collect2 program. For some
Chris@19 740 # reason, if we set the COLLECT_NAMES environment variable, the problems
Chris@19 741 # vanish in a puff of smoke.
Chris@19 742 if test "X${COLLECT_NAMES+set}" != Xset; then
Chris@19 743 COLLECT_NAMES=
Chris@19 744 export COLLECT_NAMES
Chris@19 745 fi
Chris@19 746 _LT_EOF
Chris@19 747 ;;
Chris@19 748 esac
Chris@19 749
Chris@19 750 _LT_PROG_LTMAIN
Chris@19 751
Chris@19 752 # We use sed instead of cat because bash on DJGPP gets confused if
Chris@19 753 # if finds mixed CR/LF and LF-only lines. Since sed operates in
Chris@19 754 # text mode, it properly converts lines to CR/LF. This bash problem
Chris@19 755 # is reportedly fixed, but why not run on old versions too?
Chris@19 756 sed '$q' "$ltmain" >> "$cfgfile" \
Chris@19 757 || (rm -f "$cfgfile"; exit 1)
Chris@19 758
Chris@19 759 _LT_PROG_REPLACE_SHELLFNS
Chris@19 760
Chris@19 761 mv -f "$cfgfile" "$ofile" ||
Chris@19 762 (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
Chris@19 763 chmod +x "$ofile"
Chris@19 764 ],
Chris@19 765 [cat <<_LT_EOF >> "$ofile"
Chris@19 766
Chris@19 767 dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
Chris@19 768 dnl in a comment (ie after a #).
Chris@19 769 # ### BEGIN LIBTOOL TAG CONFIG: $1
Chris@19 770 _LT_LIBTOOL_TAG_VARS(_LT_TAG)
Chris@19 771 # ### END LIBTOOL TAG CONFIG: $1
Chris@19 772 _LT_EOF
Chris@19 773 ])dnl /m4_if
Chris@19 774 ],
Chris@19 775 [m4_if([$1], [], [
Chris@19 776 PACKAGE='$PACKAGE'
Chris@19 777 VERSION='$VERSION'
Chris@19 778 TIMESTAMP='$TIMESTAMP'
Chris@19 779 RM='$RM'
Chris@19 780 ofile='$ofile'], [])
Chris@19 781 ])dnl /_LT_CONFIG_SAVE_COMMANDS
Chris@19 782 ])# _LT_CONFIG
Chris@19 783
Chris@19 784
Chris@19 785 # LT_SUPPORTED_TAG(TAG)
Chris@19 786 # ---------------------
Chris@19 787 # Trace this macro to discover what tags are supported by the libtool
Chris@19 788 # --tag option, using:
Chris@19 789 # autoconf --trace 'LT_SUPPORTED_TAG:$1'
Chris@19 790 AC_DEFUN([LT_SUPPORTED_TAG], [])
Chris@19 791
Chris@19 792
Chris@19 793 # C support is built-in for now
Chris@19 794 m4_define([_LT_LANG_C_enabled], [])
Chris@19 795 m4_define([_LT_TAGS], [])
Chris@19 796
Chris@19 797
Chris@19 798 # LT_LANG(LANG)
Chris@19 799 # -------------
Chris@19 800 # Enable libtool support for the given language if not already enabled.
Chris@19 801 AC_DEFUN([LT_LANG],
Chris@19 802 [AC_BEFORE([$0], [LT_OUTPUT])dnl
Chris@19 803 m4_case([$1],
Chris@19 804 [C], [_LT_LANG(C)],
Chris@19 805 [C++], [_LT_LANG(CXX)],
Chris@19 806 [Go], [_LT_LANG(GO)],
Chris@19 807 [Java], [_LT_LANG(GCJ)],
Chris@19 808 [Fortran 77], [_LT_LANG(F77)],
Chris@19 809 [Fortran], [_LT_LANG(FC)],
Chris@19 810 [Windows Resource], [_LT_LANG(RC)],
Chris@19 811 [m4_ifdef([_LT_LANG_]$1[_CONFIG],
Chris@19 812 [_LT_LANG($1)],
Chris@19 813 [m4_fatal([$0: unsupported language: "$1"])])])dnl
Chris@19 814 ])# LT_LANG
Chris@19 815
Chris@19 816
Chris@19 817 # _LT_LANG(LANGNAME)
Chris@19 818 # ------------------
Chris@19 819 m4_defun([_LT_LANG],
Chris@19 820 [m4_ifdef([_LT_LANG_]$1[_enabled], [],
Chris@19 821 [LT_SUPPORTED_TAG([$1])dnl
Chris@19 822 m4_append([_LT_TAGS], [$1 ])dnl
Chris@19 823 m4_define([_LT_LANG_]$1[_enabled], [])dnl
Chris@19 824 _LT_LANG_$1_CONFIG($1)])dnl
Chris@19 825 ])# _LT_LANG
Chris@19 826
Chris@19 827
Chris@19 828 m4_ifndef([AC_PROG_GO], [
Chris@19 829 ############################################################
Chris@19 830 # NOTE: This macro has been submitted for inclusion into #
Chris@19 831 # GNU Autoconf as AC_PROG_GO. When it is available in #
Chris@19 832 # a released version of Autoconf we should remove this #
Chris@19 833 # macro and use it instead. #
Chris@19 834 ############################################################
Chris@19 835 m4_defun([AC_PROG_GO],
Chris@19 836 [AC_LANG_PUSH(Go)dnl
Chris@19 837 AC_ARG_VAR([GOC], [Go compiler command])dnl
Chris@19 838 AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
Chris@19 839 _AC_ARG_VAR_LDFLAGS()dnl
Chris@19 840 AC_CHECK_TOOL(GOC, gccgo)
Chris@19 841 if test -z "$GOC"; then
Chris@19 842 if test -n "$ac_tool_prefix"; then
Chris@19 843 AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
Chris@19 844 fi
Chris@19 845 fi
Chris@19 846 if test -z "$GOC"; then
Chris@19 847 AC_CHECK_PROG(GOC, gccgo, gccgo, false)
Chris@19 848 fi
Chris@19 849 ])#m4_defun
Chris@19 850 ])#m4_ifndef
Chris@19 851
Chris@19 852
Chris@19 853 # _LT_LANG_DEFAULT_CONFIG
Chris@19 854 # -----------------------
Chris@19 855 m4_defun([_LT_LANG_DEFAULT_CONFIG],
Chris@19 856 [AC_PROVIDE_IFELSE([AC_PROG_CXX],
Chris@19 857 [LT_LANG(CXX)],
Chris@19 858 [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
Chris@19 859
Chris@19 860 AC_PROVIDE_IFELSE([AC_PROG_F77],
Chris@19 861 [LT_LANG(F77)],
Chris@19 862 [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
Chris@19 863
Chris@19 864 AC_PROVIDE_IFELSE([AC_PROG_FC],
Chris@19 865 [LT_LANG(FC)],
Chris@19 866 [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
Chris@19 867
Chris@19 868 dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
Chris@19 869 dnl pulling things in needlessly.
Chris@19 870 AC_PROVIDE_IFELSE([AC_PROG_GCJ],
Chris@19 871 [LT_LANG(GCJ)],
Chris@19 872 [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
Chris@19 873 [LT_LANG(GCJ)],
Chris@19 874 [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
Chris@19 875 [LT_LANG(GCJ)],
Chris@19 876 [m4_ifdef([AC_PROG_GCJ],
Chris@19 877 [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@19 878 m4_ifdef([A][M_PROG_GCJ],
Chris@19 879 [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
Chris@19 880 m4_ifdef([LT_PROG_GCJ],
Chris@19 881 [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
Chris@19 882
Chris@19 883 AC_PROVIDE_IFELSE([AC_PROG_GO],
Chris@19 884 [LT_LANG(GO)],
Chris@19 885 [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
Chris@19 886
Chris@19 887 AC_PROVIDE_IFELSE([LT_PROG_RC],
Chris@19 888 [LT_LANG(RC)],
Chris@19 889 [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
Chris@19 890 ])# _LT_LANG_DEFAULT_CONFIG
Chris@19 891
Chris@19 892 # Obsolete macros:
Chris@19 893 AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
Chris@19 894 AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
Chris@19 895 AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
Chris@19 896 AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
Chris@19 897 AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
Chris@19 898 dnl aclocal-1.4 backwards compatibility:
Chris@19 899 dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
Chris@19 900 dnl AC_DEFUN([AC_LIBTOOL_F77], [])
Chris@19 901 dnl AC_DEFUN([AC_LIBTOOL_FC], [])
Chris@19 902 dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
Chris@19 903 dnl AC_DEFUN([AC_LIBTOOL_RC], [])
Chris@19 904
Chris@19 905
Chris@19 906 # _LT_TAG_COMPILER
Chris@19 907 # ----------------
Chris@19 908 m4_defun([_LT_TAG_COMPILER],
Chris@19 909 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@19 910
Chris@19 911 _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
Chris@19 912 _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
Chris@19 913 _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
Chris@19 914 _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
Chris@19 915
Chris@19 916 # If no C compiler was specified, use CC.
Chris@19 917 LTCC=${LTCC-"$CC"}
Chris@19 918
Chris@19 919 # If no C compiler flags were specified, use CFLAGS.
Chris@19 920 LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
Chris@19 921
Chris@19 922 # Allow CC to be a program name with arguments.
Chris@19 923 compiler=$CC
Chris@19 924 ])# _LT_TAG_COMPILER
Chris@19 925
Chris@19 926
Chris@19 927 # _LT_COMPILER_BOILERPLATE
Chris@19 928 # ------------------------
Chris@19 929 # Check for compiler boilerplate output or warnings with
Chris@19 930 # the simple compiler test code.
Chris@19 931 m4_defun([_LT_COMPILER_BOILERPLATE],
Chris@19 932 [m4_require([_LT_DECL_SED])dnl
Chris@19 933 ac_outfile=conftest.$ac_objext
Chris@19 934 echo "$lt_simple_compile_test_code" >conftest.$ac_ext
Chris@19 935 eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@19 936 _lt_compiler_boilerplate=`cat conftest.err`
Chris@19 937 $RM conftest*
Chris@19 938 ])# _LT_COMPILER_BOILERPLATE
Chris@19 939
Chris@19 940
Chris@19 941 # _LT_LINKER_BOILERPLATE
Chris@19 942 # ----------------------
Chris@19 943 # Check for linker boilerplate output or warnings with
Chris@19 944 # the simple link test code.
Chris@19 945 m4_defun([_LT_LINKER_BOILERPLATE],
Chris@19 946 [m4_require([_LT_DECL_SED])dnl
Chris@19 947 ac_outfile=conftest.$ac_objext
Chris@19 948 echo "$lt_simple_link_test_code" >conftest.$ac_ext
Chris@19 949 eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
Chris@19 950 _lt_linker_boilerplate=`cat conftest.err`
Chris@19 951 $RM -r conftest*
Chris@19 952 ])# _LT_LINKER_BOILERPLATE
Chris@19 953
Chris@19 954 # _LT_REQUIRED_DARWIN_CHECKS
Chris@19 955 # -------------------------
Chris@19 956 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
Chris@19 957 case $host_os in
Chris@19 958 rhapsody* | darwin*)
Chris@19 959 AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
Chris@19 960 AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
Chris@19 961 AC_CHECK_TOOL([LIPO], [lipo], [:])
Chris@19 962 AC_CHECK_TOOL([OTOOL], [otool], [:])
Chris@19 963 AC_CHECK_TOOL([OTOOL64], [otool64], [:])
Chris@19 964 _LT_DECL([], [DSYMUTIL], [1],
Chris@19 965 [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
Chris@19 966 _LT_DECL([], [NMEDIT], [1],
Chris@19 967 [Tool to change global to local symbols on Mac OS X])
Chris@19 968 _LT_DECL([], [LIPO], [1],
Chris@19 969 [Tool to manipulate fat objects and archives on Mac OS X])
Chris@19 970 _LT_DECL([], [OTOOL], [1],
Chris@19 971 [ldd/readelf like tool for Mach-O binaries on Mac OS X])
Chris@19 972 _LT_DECL([], [OTOOL64], [1],
Chris@19 973 [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
Chris@19 974
Chris@19 975 AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
Chris@19 976 [lt_cv_apple_cc_single_mod=no
Chris@19 977 if test -z "${LT_MULTI_MODULE}"; then
Chris@19 978 # By default we will add the -single_module flag. You can override
Chris@19 979 # by either setting the environment variable LT_MULTI_MODULE
Chris@19 980 # non-empty at configure time, or by adding -multi_module to the
Chris@19 981 # link flags.
Chris@19 982 rm -rf libconftest.dylib*
Chris@19 983 echo "int foo(void){return 1;}" > conftest.c
Chris@19 984 echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@19 985 -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
Chris@19 986 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
Chris@19 987 -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
Chris@19 988 _lt_result=$?
Chris@19 989 # If there is a non-empty error log, and "single_module"
Chris@19 990 # appears in it, assume the flag caused a linker warning
Chris@19 991 if test -s conftest.err && $GREP single_module conftest.err; then
Chris@19 992 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@19 993 # Otherwise, if the output was created with a 0 exit code from
Chris@19 994 # the compiler, it worked.
Chris@19 995 elif test -f libconftest.dylib && test $_lt_result -eq 0; then
Chris@19 996 lt_cv_apple_cc_single_mod=yes
Chris@19 997 else
Chris@19 998 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@19 999 fi
Chris@19 1000 rm -rf libconftest.dylib*
Chris@19 1001 rm -f conftest.*
Chris@19 1002 fi])
Chris@19 1003
Chris@19 1004 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
Chris@19 1005 [lt_cv_ld_exported_symbols_list],
Chris@19 1006 [lt_cv_ld_exported_symbols_list=no
Chris@19 1007 save_LDFLAGS=$LDFLAGS
Chris@19 1008 echo "_main" > conftest.sym
Chris@19 1009 LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
Chris@19 1010 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@19 1011 [lt_cv_ld_exported_symbols_list=yes],
Chris@19 1012 [lt_cv_ld_exported_symbols_list=no])
Chris@19 1013 LDFLAGS="$save_LDFLAGS"
Chris@19 1014 ])
Chris@19 1015
Chris@19 1016 AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
Chris@19 1017 [lt_cv_ld_force_load=no
Chris@19 1018 cat > conftest.c << _LT_EOF
Chris@19 1019 int forced_loaded() { return 2;}
Chris@19 1020 _LT_EOF
Chris@19 1021 echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
Chris@19 1022 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
Chris@19 1023 echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
Chris@19 1024 $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
Chris@19 1025 echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@19 1026 $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
Chris@19 1027 cat > conftest.c << _LT_EOF
Chris@19 1028 int main() { return 0;}
Chris@19 1029 _LT_EOF
Chris@19 1030 echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
Chris@19 1031 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
Chris@19 1032 _lt_result=$?
Chris@19 1033 if test -s conftest.err && $GREP force_load conftest.err; then
Chris@19 1034 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@19 1035 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
Chris@19 1036 lt_cv_ld_force_load=yes
Chris@19 1037 else
Chris@19 1038 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@19 1039 fi
Chris@19 1040 rm -f conftest.err libconftest.a conftest conftest.c
Chris@19 1041 rm -rf conftest.dSYM
Chris@19 1042 ])
Chris@19 1043 case $host_os in
Chris@19 1044 rhapsody* | darwin1.[[012]])
Chris@19 1045 _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
Chris@19 1046 darwin1.*)
Chris@19 1047 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
Chris@19 1048 darwin*) # darwin 5.x on
Chris@19 1049 # if running on 10.5 or later, the deployment target defaults
Chris@19 1050 # to the OS version, if on x86, and 10.4, the deployment
Chris@19 1051 # target defaults to 10.4. Don't you love it?
Chris@19 1052 case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
Chris@19 1053 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
Chris@19 1054 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
Chris@19 1055 10.[[012]]*)
Chris@19 1056 _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
Chris@19 1057 10.*)
Chris@19 1058 _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
Chris@19 1059 esac
Chris@19 1060 ;;
Chris@19 1061 esac
Chris@19 1062 if test "$lt_cv_apple_cc_single_mod" = "yes"; then
Chris@19 1063 _lt_dar_single_mod='$single_module'
Chris@19 1064 fi
Chris@19 1065 if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
Chris@19 1066 _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
Chris@19 1067 else
Chris@19 1068 _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
Chris@19 1069 fi
Chris@19 1070 if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
Chris@19 1071 _lt_dsymutil='~$DSYMUTIL $lib || :'
Chris@19 1072 else
Chris@19 1073 _lt_dsymutil=
Chris@19 1074 fi
Chris@19 1075 ;;
Chris@19 1076 esac
Chris@19 1077 ])
Chris@19 1078
Chris@19 1079
Chris@19 1080 # _LT_DARWIN_LINKER_FEATURES([TAG])
Chris@19 1081 # ---------------------------------
Chris@19 1082 # Checks for linker and compiler features on darwin
Chris@19 1083 m4_defun([_LT_DARWIN_LINKER_FEATURES],
Chris@19 1084 [
Chris@19 1085 m4_require([_LT_REQUIRED_DARWIN_CHECKS])
Chris@19 1086 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 1087 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@19 1088 _LT_TAGVAR(hardcode_automatic, $1)=yes
Chris@19 1089 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@19 1090 if test "$lt_cv_ld_force_load" = "yes"; then
Chris@19 1091 _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
Chris@19 1092 m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
Chris@19 1093 [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes])
Chris@19 1094 else
Chris@19 1095 _LT_TAGVAR(whole_archive_flag_spec, $1)=''
Chris@19 1096 fi
Chris@19 1097 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 1098 _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
Chris@19 1099 case $cc_basename in
Chris@19 1100 ifort*) _lt_dar_can_shared=yes ;;
Chris@19 1101 *) _lt_dar_can_shared=$GCC ;;
Chris@19 1102 esac
Chris@19 1103 if test "$_lt_dar_can_shared" = "yes"; then
Chris@19 1104 output_verbose_link_cmd=func_echo_all
Chris@19 1105 _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}"
Chris@19 1106 _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
Chris@19 1107 _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}"
Chris@19 1108 _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}"
Chris@19 1109 m4_if([$1], [CXX],
Chris@19 1110 [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
Chris@19 1111 _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}"
Chris@19 1112 _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}"
Chris@19 1113 fi
Chris@19 1114 ],[])
Chris@19 1115 else
Chris@19 1116 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 1117 fi
Chris@19 1118 ])
Chris@19 1119
Chris@19 1120 # _LT_SYS_MODULE_PATH_AIX([TAGNAME])
Chris@19 1121 # ----------------------------------
Chris@19 1122 # Links a minimal program and checks the executable
Chris@19 1123 # for the system default hardcoded library path. In most cases,
Chris@19 1124 # this is /usr/lib:/lib, but when the MPI compilers are used
Chris@19 1125 # the location of the communication and MPI libs are included too.
Chris@19 1126 # If we don't find anything, use the default library path according
Chris@19 1127 # to the aix ld manual.
Chris@19 1128 # Store the results from the different compilers for each TAGNAME.
Chris@19 1129 # Allow to override them for all tags through lt_cv_aix_libpath.
Chris@19 1130 m4_defun([_LT_SYS_MODULE_PATH_AIX],
Chris@19 1131 [m4_require([_LT_DECL_SED])dnl
Chris@19 1132 if test "${lt_cv_aix_libpath+set}" = set; then
Chris@19 1133 aix_libpath=$lt_cv_aix_libpath
Chris@19 1134 else
Chris@19 1135 AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
Chris@19 1136 [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
Chris@19 1137 lt_aix_libpath_sed='[
Chris@19 1138 /Import File Strings/,/^$/ {
Chris@19 1139 /^0/ {
Chris@19 1140 s/^0 *\([^ ]*\) *$/\1/
Chris@19 1141 p
Chris@19 1142 }
Chris@19 1143 }]'
Chris@19 1144 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@19 1145 # Check for a 64-bit object if we didn't find anything.
Chris@19 1146 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@19 1147 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
Chris@19 1148 fi],[])
Chris@19 1149 if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
Chris@19 1150 _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
Chris@19 1151 fi
Chris@19 1152 ])
Chris@19 1153 aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
Chris@19 1154 fi
Chris@19 1155 ])# _LT_SYS_MODULE_PATH_AIX
Chris@19 1156
Chris@19 1157
Chris@19 1158 # _LT_SHELL_INIT(ARG)
Chris@19 1159 # -------------------
Chris@19 1160 m4_define([_LT_SHELL_INIT],
Chris@19 1161 [m4_divert_text([M4SH-INIT], [$1
Chris@19 1162 ])])# _LT_SHELL_INIT
Chris@19 1163
Chris@19 1164
Chris@19 1165
Chris@19 1166 # _LT_PROG_ECHO_BACKSLASH
Chris@19 1167 # -----------------------
Chris@19 1168 # Find how we can fake an echo command that does not interpret backslash.
Chris@19 1169 # In particular, with Autoconf 2.60 or later we add some code to the start
Chris@19 1170 # of the generated configure script which will find a shell with a builtin
Chris@19 1171 # printf (which we can use as an echo command).
Chris@19 1172 m4_defun([_LT_PROG_ECHO_BACKSLASH],
Chris@19 1173 [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@19 1174 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@19 1175 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@19 1176
Chris@19 1177 AC_MSG_CHECKING([how to print strings])
Chris@19 1178 # Test print first, because it will be a builtin if present.
Chris@19 1179 if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
Chris@19 1180 test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@19 1181 ECHO='print -r --'
Chris@19 1182 elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
Chris@19 1183 ECHO='printf %s\n'
Chris@19 1184 else
Chris@19 1185 # Use this function as a fallback that always works.
Chris@19 1186 func_fallback_echo ()
Chris@19 1187 {
Chris@19 1188 eval 'cat <<_LTECHO_EOF
Chris@19 1189 $[]1
Chris@19 1190 _LTECHO_EOF'
Chris@19 1191 }
Chris@19 1192 ECHO='func_fallback_echo'
Chris@19 1193 fi
Chris@19 1194
Chris@19 1195 # func_echo_all arg...
Chris@19 1196 # Invoke $ECHO with all args, space-separated.
Chris@19 1197 func_echo_all ()
Chris@19 1198 {
Chris@19 1199 $ECHO "$*"
Chris@19 1200 }
Chris@19 1201
Chris@19 1202 case "$ECHO" in
Chris@19 1203 printf*) AC_MSG_RESULT([printf]) ;;
Chris@19 1204 print*) AC_MSG_RESULT([print -r]) ;;
Chris@19 1205 *) AC_MSG_RESULT([cat]) ;;
Chris@19 1206 esac
Chris@19 1207
Chris@19 1208 m4_ifdef([_AS_DETECT_SUGGESTED],
Chris@19 1209 [_AS_DETECT_SUGGESTED([
Chris@19 1210 test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
Chris@19 1211 ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
Chris@19 1212 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@19 1213 ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
Chris@19 1214 PATH=/empty FPATH=/empty; export PATH FPATH
Chris@19 1215 test "X`printf %s $ECHO`" = "X$ECHO" \
Chris@19 1216 || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
Chris@19 1217
Chris@19 1218 _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
Chris@19 1219 _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
Chris@19 1220 ])# _LT_PROG_ECHO_BACKSLASH
Chris@19 1221
Chris@19 1222
Chris@19 1223 # _LT_WITH_SYSROOT
Chris@19 1224 # ----------------
Chris@19 1225 AC_DEFUN([_LT_WITH_SYSROOT],
Chris@19 1226 [AC_MSG_CHECKING([for sysroot])
Chris@19 1227 AC_ARG_WITH([sysroot],
Chris@19 1228 [ --with-sysroot[=DIR] Search for dependent libraries within DIR
Chris@19 1229 (or the compiler's sysroot if not specified).],
Chris@19 1230 [], [with_sysroot=no])
Chris@19 1231
Chris@19 1232 dnl lt_sysroot will always be passed unquoted. We quote it here
Chris@19 1233 dnl in case the user passed a directory name.
Chris@19 1234 lt_sysroot=
Chris@19 1235 case ${with_sysroot} in #(
Chris@19 1236 yes)
Chris@19 1237 if test "$GCC" = yes; then
Chris@19 1238 lt_sysroot=`$CC --print-sysroot 2>/dev/null`
Chris@19 1239 fi
Chris@19 1240 ;; #(
Chris@19 1241 /*)
Chris@19 1242 lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
Chris@19 1243 ;; #(
Chris@19 1244 no|'')
Chris@19 1245 ;; #(
Chris@19 1246 *)
Chris@19 1247 AC_MSG_RESULT([${with_sysroot}])
Chris@19 1248 AC_MSG_ERROR([The sysroot must be an absolute path.])
Chris@19 1249 ;;
Chris@19 1250 esac
Chris@19 1251
Chris@19 1252 AC_MSG_RESULT([${lt_sysroot:-no}])
Chris@19 1253 _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
Chris@19 1254 [dependent libraries, and in which our libraries should be installed.])])
Chris@19 1255
Chris@19 1256 # _LT_ENABLE_LOCK
Chris@19 1257 # ---------------
Chris@19 1258 m4_defun([_LT_ENABLE_LOCK],
Chris@19 1259 [AC_ARG_ENABLE([libtool-lock],
Chris@19 1260 [AS_HELP_STRING([--disable-libtool-lock],
Chris@19 1261 [avoid locking (might break parallel builds)])])
Chris@19 1262 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
Chris@19 1263
Chris@19 1264 # Some flags need to be propagated to the compiler or linker for good
Chris@19 1265 # libtool support.
Chris@19 1266 case $host in
Chris@19 1267 ia64-*-hpux*)
Chris@19 1268 # Find out which ABI we are using.
Chris@19 1269 echo 'int i;' > conftest.$ac_ext
Chris@19 1270 if AC_TRY_EVAL(ac_compile); then
Chris@19 1271 case `/usr/bin/file conftest.$ac_objext` in
Chris@19 1272 *ELF-32*)
Chris@19 1273 HPUX_IA64_MODE="32"
Chris@19 1274 ;;
Chris@19 1275 *ELF-64*)
Chris@19 1276 HPUX_IA64_MODE="64"
Chris@19 1277 ;;
Chris@19 1278 esac
Chris@19 1279 fi
Chris@19 1280 rm -rf conftest*
Chris@19 1281 ;;
Chris@19 1282 *-*-irix6*)
Chris@19 1283 # Find out which ABI we are using.
Chris@19 1284 echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
Chris@19 1285 if AC_TRY_EVAL(ac_compile); then
Chris@19 1286 if test "$lt_cv_prog_gnu_ld" = yes; then
Chris@19 1287 case `/usr/bin/file conftest.$ac_objext` in
Chris@19 1288 *32-bit*)
Chris@19 1289 LD="${LD-ld} -melf32bsmip"
Chris@19 1290 ;;
Chris@19 1291 *N32*)
Chris@19 1292 LD="${LD-ld} -melf32bmipn32"
Chris@19 1293 ;;
Chris@19 1294 *64-bit*)
Chris@19 1295 LD="${LD-ld} -melf64bmip"
Chris@19 1296 ;;
Chris@19 1297 esac
Chris@19 1298 else
Chris@19 1299 case `/usr/bin/file conftest.$ac_objext` in
Chris@19 1300 *32-bit*)
Chris@19 1301 LD="${LD-ld} -32"
Chris@19 1302 ;;
Chris@19 1303 *N32*)
Chris@19 1304 LD="${LD-ld} -n32"
Chris@19 1305 ;;
Chris@19 1306 *64-bit*)
Chris@19 1307 LD="${LD-ld} -64"
Chris@19 1308 ;;
Chris@19 1309 esac
Chris@19 1310 fi
Chris@19 1311 fi
Chris@19 1312 rm -rf conftest*
Chris@19 1313 ;;
Chris@19 1314
Chris@19 1315 x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
Chris@19 1316 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
Chris@19 1317 # Find out which ABI we are using.
Chris@19 1318 echo 'int i;' > conftest.$ac_ext
Chris@19 1319 if AC_TRY_EVAL(ac_compile); then
Chris@19 1320 case `/usr/bin/file conftest.o` in
Chris@19 1321 *32-bit*)
Chris@19 1322 case $host in
Chris@19 1323 x86_64-*kfreebsd*-gnu)
Chris@19 1324 LD="${LD-ld} -m elf_i386_fbsd"
Chris@19 1325 ;;
Chris@19 1326 x86_64-*linux*)
Chris@19 1327 LD="${LD-ld} -m elf_i386"
Chris@19 1328 ;;
Chris@19 1329 ppc64-*linux*|powerpc64-*linux*)
Chris@19 1330 LD="${LD-ld} -m elf32ppclinux"
Chris@19 1331 ;;
Chris@19 1332 s390x-*linux*)
Chris@19 1333 LD="${LD-ld} -m elf_s390"
Chris@19 1334 ;;
Chris@19 1335 sparc64-*linux*)
Chris@19 1336 LD="${LD-ld} -m elf32_sparc"
Chris@19 1337 ;;
Chris@19 1338 esac
Chris@19 1339 ;;
Chris@19 1340 *64-bit*)
Chris@19 1341 case $host in
Chris@19 1342 x86_64-*kfreebsd*-gnu)
Chris@19 1343 LD="${LD-ld} -m elf_x86_64_fbsd"
Chris@19 1344 ;;
Chris@19 1345 x86_64-*linux*)
Chris@19 1346 LD="${LD-ld} -m elf_x86_64"
Chris@19 1347 ;;
Chris@19 1348 ppc*-*linux*|powerpc*-*linux*)
Chris@19 1349 LD="${LD-ld} -m elf64ppc"
Chris@19 1350 ;;
Chris@19 1351 s390*-*linux*|s390*-*tpf*)
Chris@19 1352 LD="${LD-ld} -m elf64_s390"
Chris@19 1353 ;;
Chris@19 1354 sparc*-*linux*)
Chris@19 1355 LD="${LD-ld} -m elf64_sparc"
Chris@19 1356 ;;
Chris@19 1357 esac
Chris@19 1358 ;;
Chris@19 1359 esac
Chris@19 1360 fi
Chris@19 1361 rm -rf conftest*
Chris@19 1362 ;;
Chris@19 1363
Chris@19 1364 *-*-sco3.2v5*)
Chris@19 1365 # On SCO OpenServer 5, we need -belf to get full-featured binaries.
Chris@19 1366 SAVE_CFLAGS="$CFLAGS"
Chris@19 1367 CFLAGS="$CFLAGS -belf"
Chris@19 1368 AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
Chris@19 1369 [AC_LANG_PUSH(C)
Chris@19 1370 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
Chris@19 1371 AC_LANG_POP])
Chris@19 1372 if test x"$lt_cv_cc_needs_belf" != x"yes"; then
Chris@19 1373 # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
Chris@19 1374 CFLAGS="$SAVE_CFLAGS"
Chris@19 1375 fi
Chris@19 1376 ;;
Chris@19 1377 *-*solaris*)
Chris@19 1378 # Find out which ABI we are using.
Chris@19 1379 echo 'int i;' > conftest.$ac_ext
Chris@19 1380 if AC_TRY_EVAL(ac_compile); then
Chris@19 1381 case `/usr/bin/file conftest.o` in
Chris@19 1382 *64-bit*)
Chris@19 1383 case $lt_cv_prog_gnu_ld in
Chris@19 1384 yes*)
Chris@19 1385 case $host in
Chris@19 1386 i?86-*-solaris*)
Chris@19 1387 LD="${LD-ld} -m elf_x86_64"
Chris@19 1388 ;;
Chris@19 1389 sparc*-*-solaris*)
Chris@19 1390 LD="${LD-ld} -m elf64_sparc"
Chris@19 1391 ;;
Chris@19 1392 esac
Chris@19 1393 # GNU ld 2.21 introduced _sol2 emulations. Use them if available.
Chris@19 1394 if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
Chris@19 1395 LD="${LD-ld}_sol2"
Chris@19 1396 fi
Chris@19 1397 ;;
Chris@19 1398 *)
Chris@19 1399 if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
Chris@19 1400 LD="${LD-ld} -64"
Chris@19 1401 fi
Chris@19 1402 ;;
Chris@19 1403 esac
Chris@19 1404 ;;
Chris@19 1405 esac
Chris@19 1406 fi
Chris@19 1407 rm -rf conftest*
Chris@19 1408 ;;
Chris@19 1409 esac
Chris@19 1410
Chris@19 1411 need_locks="$enable_libtool_lock"
Chris@19 1412 ])# _LT_ENABLE_LOCK
Chris@19 1413
Chris@19 1414
Chris@19 1415 # _LT_PROG_AR
Chris@19 1416 # -----------
Chris@19 1417 m4_defun([_LT_PROG_AR],
Chris@19 1418 [AC_CHECK_TOOLS(AR, [ar], false)
Chris@19 1419 : ${AR=ar}
Chris@19 1420 : ${AR_FLAGS=cru}
Chris@19 1421 _LT_DECL([], [AR], [1], [The archiver])
Chris@19 1422 _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
Chris@19 1423
Chris@19 1424 AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
Chris@19 1425 [lt_cv_ar_at_file=no
Chris@19 1426 AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
Chris@19 1427 [echo conftest.$ac_objext > conftest.lst
Chris@19 1428 lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
Chris@19 1429 AC_TRY_EVAL([lt_ar_try])
Chris@19 1430 if test "$ac_status" -eq 0; then
Chris@19 1431 # Ensure the archiver fails upon bogus file names.
Chris@19 1432 rm -f conftest.$ac_objext libconftest.a
Chris@19 1433 AC_TRY_EVAL([lt_ar_try])
Chris@19 1434 if test "$ac_status" -ne 0; then
Chris@19 1435 lt_cv_ar_at_file=@
Chris@19 1436 fi
Chris@19 1437 fi
Chris@19 1438 rm -f conftest.* libconftest.a
Chris@19 1439 ])
Chris@19 1440 ])
Chris@19 1441
Chris@19 1442 if test "x$lt_cv_ar_at_file" = xno; then
Chris@19 1443 archiver_list_spec=
Chris@19 1444 else
Chris@19 1445 archiver_list_spec=$lt_cv_ar_at_file
Chris@19 1446 fi
Chris@19 1447 _LT_DECL([], [archiver_list_spec], [1],
Chris@19 1448 [How to feed a file listing to the archiver])
Chris@19 1449 ])# _LT_PROG_AR
Chris@19 1450
Chris@19 1451
Chris@19 1452 # _LT_CMD_OLD_ARCHIVE
Chris@19 1453 # -------------------
Chris@19 1454 m4_defun([_LT_CMD_OLD_ARCHIVE],
Chris@19 1455 [_LT_PROG_AR
Chris@19 1456
Chris@19 1457 AC_CHECK_TOOL(STRIP, strip, :)
Chris@19 1458 test -z "$STRIP" && STRIP=:
Chris@19 1459 _LT_DECL([], [STRIP], [1], [A symbol stripping program])
Chris@19 1460
Chris@19 1461 AC_CHECK_TOOL(RANLIB, ranlib, :)
Chris@19 1462 test -z "$RANLIB" && RANLIB=:
Chris@19 1463 _LT_DECL([], [RANLIB], [1],
Chris@19 1464 [Commands used to install an old-style archive])
Chris@19 1465
Chris@19 1466 # Determine commands to create old-style static archives.
Chris@19 1467 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
Chris@19 1468 old_postinstall_cmds='chmod 644 $oldlib'
Chris@19 1469 old_postuninstall_cmds=
Chris@19 1470
Chris@19 1471 if test -n "$RANLIB"; then
Chris@19 1472 case $host_os in
Chris@19 1473 openbsd*)
Chris@19 1474 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
Chris@19 1475 ;;
Chris@19 1476 *)
Chris@19 1477 old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
Chris@19 1478 ;;
Chris@19 1479 esac
Chris@19 1480 old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
Chris@19 1481 fi
Chris@19 1482
Chris@19 1483 case $host_os in
Chris@19 1484 darwin*)
Chris@19 1485 lock_old_archive_extraction=yes ;;
Chris@19 1486 *)
Chris@19 1487 lock_old_archive_extraction=no ;;
Chris@19 1488 esac
Chris@19 1489 _LT_DECL([], [old_postinstall_cmds], [2])
Chris@19 1490 _LT_DECL([], [old_postuninstall_cmds], [2])
Chris@19 1491 _LT_TAGDECL([], [old_archive_cmds], [2],
Chris@19 1492 [Commands used to build an old-style archive])
Chris@19 1493 _LT_DECL([], [lock_old_archive_extraction], [0],
Chris@19 1494 [Whether to use a lock for old archive extraction])
Chris@19 1495 ])# _LT_CMD_OLD_ARCHIVE
Chris@19 1496
Chris@19 1497
Chris@19 1498 # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@19 1499 # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@19 1500 # ----------------------------------------------------------------
Chris@19 1501 # Check whether the given compiler option works
Chris@19 1502 AC_DEFUN([_LT_COMPILER_OPTION],
Chris@19 1503 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@19 1504 m4_require([_LT_DECL_SED])dnl
Chris@19 1505 AC_CACHE_CHECK([$1], [$2],
Chris@19 1506 [$2=no
Chris@19 1507 m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
Chris@19 1508 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@19 1509 lt_compiler_flag="$3"
Chris@19 1510 # Insert the option either (1) after the last *FLAGS variable, or
Chris@19 1511 # (2) before a word containing "conftest.", or (3) at the end.
Chris@19 1512 # Note that $ac_compile itself does not contain backslashes and begins
Chris@19 1513 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@19 1514 # The option is referenced via a variable to avoid confusing sed.
Chris@19 1515 lt_compile=`echo "$ac_compile" | $SED \
Chris@19 1516 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@19 1517 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@19 1518 -e 's:$: $lt_compiler_flag:'`
Chris@19 1519 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@19 1520 (eval "$lt_compile" 2>conftest.err)
Chris@19 1521 ac_status=$?
Chris@19 1522 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@19 1523 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@19 1524 if (exit $ac_status) && test -s "$ac_outfile"; then
Chris@19 1525 # The compiler can only warn and ignore the option if not recognized
Chris@19 1526 # So say no if there are warnings other than the usual output.
Chris@19 1527 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
Chris@19 1528 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@19 1529 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
Chris@19 1530 $2=yes
Chris@19 1531 fi
Chris@19 1532 fi
Chris@19 1533 $RM conftest*
Chris@19 1534 ])
Chris@19 1535
Chris@19 1536 if test x"[$]$2" = xyes; then
Chris@19 1537 m4_if([$5], , :, [$5])
Chris@19 1538 else
Chris@19 1539 m4_if([$6], , :, [$6])
Chris@19 1540 fi
Chris@19 1541 ])# _LT_COMPILER_OPTION
Chris@19 1542
Chris@19 1543 # Old name:
Chris@19 1544 AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
Chris@19 1545 dnl aclocal-1.4 backwards compatibility:
Chris@19 1546 dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
Chris@19 1547
Chris@19 1548
Chris@19 1549 # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
Chris@19 1550 # [ACTION-SUCCESS], [ACTION-FAILURE])
Chris@19 1551 # ----------------------------------------------------
Chris@19 1552 # Check whether the given linker option works
Chris@19 1553 AC_DEFUN([_LT_LINKER_OPTION],
Chris@19 1554 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@19 1555 m4_require([_LT_DECL_SED])dnl
Chris@19 1556 AC_CACHE_CHECK([$1], [$2],
Chris@19 1557 [$2=no
Chris@19 1558 save_LDFLAGS="$LDFLAGS"
Chris@19 1559 LDFLAGS="$LDFLAGS $3"
Chris@19 1560 echo "$lt_simple_link_test_code" > conftest.$ac_ext
Chris@19 1561 if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
Chris@19 1562 # The linker can only warn and ignore the option if not recognized
Chris@19 1563 # So say no if there are warnings
Chris@19 1564 if test -s conftest.err; then
Chris@19 1565 # Append any errors to the config.log.
Chris@19 1566 cat conftest.err 1>&AS_MESSAGE_LOG_FD
Chris@19 1567 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
Chris@19 1568 $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
Chris@19 1569 if diff conftest.exp conftest.er2 >/dev/null; then
Chris@19 1570 $2=yes
Chris@19 1571 fi
Chris@19 1572 else
Chris@19 1573 $2=yes
Chris@19 1574 fi
Chris@19 1575 fi
Chris@19 1576 $RM -r conftest*
Chris@19 1577 LDFLAGS="$save_LDFLAGS"
Chris@19 1578 ])
Chris@19 1579
Chris@19 1580 if test x"[$]$2" = xyes; then
Chris@19 1581 m4_if([$4], , :, [$4])
Chris@19 1582 else
Chris@19 1583 m4_if([$5], , :, [$5])
Chris@19 1584 fi
Chris@19 1585 ])# _LT_LINKER_OPTION
Chris@19 1586
Chris@19 1587 # Old name:
Chris@19 1588 AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
Chris@19 1589 dnl aclocal-1.4 backwards compatibility:
Chris@19 1590 dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
Chris@19 1591
Chris@19 1592
Chris@19 1593 # LT_CMD_MAX_LEN
Chris@19 1594 #---------------
Chris@19 1595 AC_DEFUN([LT_CMD_MAX_LEN],
Chris@19 1596 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@19 1597 # find the maximum length of command line arguments
Chris@19 1598 AC_MSG_CHECKING([the maximum length of command line arguments])
Chris@19 1599 AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
Chris@19 1600 i=0
Chris@19 1601 teststring="ABCD"
Chris@19 1602
Chris@19 1603 case $build_os in
Chris@19 1604 msdosdjgpp*)
Chris@19 1605 # On DJGPP, this test can blow up pretty badly due to problems in libc
Chris@19 1606 # (any single argument exceeding 2000 bytes causes a buffer overrun
Chris@19 1607 # during glob expansion). Even if it were fixed, the result of this
Chris@19 1608 # check would be larger than it should be.
Chris@19 1609 lt_cv_sys_max_cmd_len=12288; # 12K is about right
Chris@19 1610 ;;
Chris@19 1611
Chris@19 1612 gnu*)
Chris@19 1613 # Under GNU Hurd, this test is not required because there is
Chris@19 1614 # no limit to the length of command line arguments.
Chris@19 1615 # Libtool will interpret -1 as no limit whatsoever
Chris@19 1616 lt_cv_sys_max_cmd_len=-1;
Chris@19 1617 ;;
Chris@19 1618
Chris@19 1619 cygwin* | mingw* | cegcc*)
Chris@19 1620 # On Win9x/ME, this test blows up -- it succeeds, but takes
Chris@19 1621 # about 5 minutes as the teststring grows exponentially.
Chris@19 1622 # Worse, since 9x/ME are not pre-emptively multitasking,
Chris@19 1623 # you end up with a "frozen" computer, even though with patience
Chris@19 1624 # the test eventually succeeds (with a max line length of 256k).
Chris@19 1625 # Instead, let's just punt: use the minimum linelength reported by
Chris@19 1626 # all of the supported platforms: 8192 (on NT/2K/XP).
Chris@19 1627 lt_cv_sys_max_cmd_len=8192;
Chris@19 1628 ;;
Chris@19 1629
Chris@19 1630 mint*)
Chris@19 1631 # On MiNT this can take a long time and run out of memory.
Chris@19 1632 lt_cv_sys_max_cmd_len=8192;
Chris@19 1633 ;;
Chris@19 1634
Chris@19 1635 amigaos*)
Chris@19 1636 # On AmigaOS with pdksh, this test takes hours, literally.
Chris@19 1637 # So we just punt and use a minimum line length of 8192.
Chris@19 1638 lt_cv_sys_max_cmd_len=8192;
Chris@19 1639 ;;
Chris@19 1640
Chris@19 1641 netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
Chris@19 1642 # This has been around since 386BSD, at least. Likely further.
Chris@19 1643 if test -x /sbin/sysctl; then
Chris@19 1644 lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
Chris@19 1645 elif test -x /usr/sbin/sysctl; then
Chris@19 1646 lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
Chris@19 1647 else
Chris@19 1648 lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
Chris@19 1649 fi
Chris@19 1650 # And add a safety zone
Chris@19 1651 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@19 1652 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@19 1653 ;;
Chris@19 1654
Chris@19 1655 interix*)
Chris@19 1656 # We know the value 262144 and hardcode it with a safety zone (like BSD)
Chris@19 1657 lt_cv_sys_max_cmd_len=196608
Chris@19 1658 ;;
Chris@19 1659
Chris@19 1660 os2*)
Chris@19 1661 # The test takes a long time on OS/2.
Chris@19 1662 lt_cv_sys_max_cmd_len=8192
Chris@19 1663 ;;
Chris@19 1664
Chris@19 1665 osf*)
Chris@19 1666 # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
Chris@19 1667 # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
Chris@19 1668 # nice to cause kernel panics so lets avoid the loop below.
Chris@19 1669 # First set a reasonable default.
Chris@19 1670 lt_cv_sys_max_cmd_len=16384
Chris@19 1671 #
Chris@19 1672 if test -x /sbin/sysconfig; then
Chris@19 1673 case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
Chris@19 1674 *1*) lt_cv_sys_max_cmd_len=-1 ;;
Chris@19 1675 esac
Chris@19 1676 fi
Chris@19 1677 ;;
Chris@19 1678 sco3.2v5*)
Chris@19 1679 lt_cv_sys_max_cmd_len=102400
Chris@19 1680 ;;
Chris@19 1681 sysv5* | sco5v6* | sysv4.2uw2*)
Chris@19 1682 kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
Chris@19 1683 if test -n "$kargmax"; then
Chris@19 1684 lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
Chris@19 1685 else
Chris@19 1686 lt_cv_sys_max_cmd_len=32768
Chris@19 1687 fi
Chris@19 1688 ;;
Chris@19 1689 *)
Chris@19 1690 lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
Chris@19 1691 if test -n "$lt_cv_sys_max_cmd_len"; then
Chris@19 1692 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
Chris@19 1693 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
Chris@19 1694 else
Chris@19 1695 # Make teststring a little bigger before we do anything with it.
Chris@19 1696 # a 1K string should be a reasonable start.
Chris@19 1697 for i in 1 2 3 4 5 6 7 8 ; do
Chris@19 1698 teststring=$teststring$teststring
Chris@19 1699 done
Chris@19 1700 SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
Chris@19 1701 # If test is not a shell built-in, we'll probably end up computing a
Chris@19 1702 # maximum length that is only half of the actual maximum length, but
Chris@19 1703 # we can't tell.
Chris@19 1704 while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
Chris@19 1705 = "X$teststring$teststring"; } >/dev/null 2>&1 &&
Chris@19 1706 test $i != 17 # 1/2 MB should be enough
Chris@19 1707 do
Chris@19 1708 i=`expr $i + 1`
Chris@19 1709 teststring=$teststring$teststring
Chris@19 1710 done
Chris@19 1711 # Only check the string length outside the loop.
Chris@19 1712 lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
Chris@19 1713 teststring=
Chris@19 1714 # Add a significant safety factor because C++ compilers can tack on
Chris@19 1715 # massive amounts of additional arguments before passing them to the
Chris@19 1716 # linker. It appears as though 1/2 is a usable value.
Chris@19 1717 lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
Chris@19 1718 fi
Chris@19 1719 ;;
Chris@19 1720 esac
Chris@19 1721 ])
Chris@19 1722 if test -n $lt_cv_sys_max_cmd_len ; then
Chris@19 1723 AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
Chris@19 1724 else
Chris@19 1725 AC_MSG_RESULT(none)
Chris@19 1726 fi
Chris@19 1727 max_cmd_len=$lt_cv_sys_max_cmd_len
Chris@19 1728 _LT_DECL([], [max_cmd_len], [0],
Chris@19 1729 [What is the maximum length of a command?])
Chris@19 1730 ])# LT_CMD_MAX_LEN
Chris@19 1731
Chris@19 1732 # Old name:
Chris@19 1733 AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
Chris@19 1734 dnl aclocal-1.4 backwards compatibility:
Chris@19 1735 dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
Chris@19 1736
Chris@19 1737
Chris@19 1738 # _LT_HEADER_DLFCN
Chris@19 1739 # ----------------
Chris@19 1740 m4_defun([_LT_HEADER_DLFCN],
Chris@19 1741 [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
Chris@19 1742 ])# _LT_HEADER_DLFCN
Chris@19 1743
Chris@19 1744
Chris@19 1745 # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
Chris@19 1746 # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
Chris@19 1747 # ----------------------------------------------------------------
Chris@19 1748 m4_defun([_LT_TRY_DLOPEN_SELF],
Chris@19 1749 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@19 1750 if test "$cross_compiling" = yes; then :
Chris@19 1751 [$4]
Chris@19 1752 else
Chris@19 1753 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
Chris@19 1754 lt_status=$lt_dlunknown
Chris@19 1755 cat > conftest.$ac_ext <<_LT_EOF
Chris@19 1756 [#line $LINENO "configure"
Chris@19 1757 #include "confdefs.h"
Chris@19 1758
Chris@19 1759 #if HAVE_DLFCN_H
Chris@19 1760 #include <dlfcn.h>
Chris@19 1761 #endif
Chris@19 1762
Chris@19 1763 #include <stdio.h>
Chris@19 1764
Chris@19 1765 #ifdef RTLD_GLOBAL
Chris@19 1766 # define LT_DLGLOBAL RTLD_GLOBAL
Chris@19 1767 #else
Chris@19 1768 # ifdef DL_GLOBAL
Chris@19 1769 # define LT_DLGLOBAL DL_GLOBAL
Chris@19 1770 # else
Chris@19 1771 # define LT_DLGLOBAL 0
Chris@19 1772 # endif
Chris@19 1773 #endif
Chris@19 1774
Chris@19 1775 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
Chris@19 1776 find out it does not work in some platform. */
Chris@19 1777 #ifndef LT_DLLAZY_OR_NOW
Chris@19 1778 # ifdef RTLD_LAZY
Chris@19 1779 # define LT_DLLAZY_OR_NOW RTLD_LAZY
Chris@19 1780 # else
Chris@19 1781 # ifdef DL_LAZY
Chris@19 1782 # define LT_DLLAZY_OR_NOW DL_LAZY
Chris@19 1783 # else
Chris@19 1784 # ifdef RTLD_NOW
Chris@19 1785 # define LT_DLLAZY_OR_NOW RTLD_NOW
Chris@19 1786 # else
Chris@19 1787 # ifdef DL_NOW
Chris@19 1788 # define LT_DLLAZY_OR_NOW DL_NOW
Chris@19 1789 # else
Chris@19 1790 # define LT_DLLAZY_OR_NOW 0
Chris@19 1791 # endif
Chris@19 1792 # endif
Chris@19 1793 # endif
Chris@19 1794 # endif
Chris@19 1795 #endif
Chris@19 1796
Chris@19 1797 /* When -fvisbility=hidden is used, assume the code has been annotated
Chris@19 1798 correspondingly for the symbols needed. */
Chris@19 1799 #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
Chris@19 1800 int fnord () __attribute__((visibility("default")));
Chris@19 1801 #endif
Chris@19 1802
Chris@19 1803 int fnord () { return 42; }
Chris@19 1804 int main ()
Chris@19 1805 {
Chris@19 1806 void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
Chris@19 1807 int status = $lt_dlunknown;
Chris@19 1808
Chris@19 1809 if (self)
Chris@19 1810 {
Chris@19 1811 if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
Chris@19 1812 else
Chris@19 1813 {
Chris@19 1814 if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
Chris@19 1815 else puts (dlerror ());
Chris@19 1816 }
Chris@19 1817 /* dlclose (self); */
Chris@19 1818 }
Chris@19 1819 else
Chris@19 1820 puts (dlerror ());
Chris@19 1821
Chris@19 1822 return status;
Chris@19 1823 }]
Chris@19 1824 _LT_EOF
Chris@19 1825 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
Chris@19 1826 (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
Chris@19 1827 lt_status=$?
Chris@19 1828 case x$lt_status in
Chris@19 1829 x$lt_dlno_uscore) $1 ;;
Chris@19 1830 x$lt_dlneed_uscore) $2 ;;
Chris@19 1831 x$lt_dlunknown|x*) $3 ;;
Chris@19 1832 esac
Chris@19 1833 else :
Chris@19 1834 # compilation failed
Chris@19 1835 $3
Chris@19 1836 fi
Chris@19 1837 fi
Chris@19 1838 rm -fr conftest*
Chris@19 1839 ])# _LT_TRY_DLOPEN_SELF
Chris@19 1840
Chris@19 1841
Chris@19 1842 # LT_SYS_DLOPEN_SELF
Chris@19 1843 # ------------------
Chris@19 1844 AC_DEFUN([LT_SYS_DLOPEN_SELF],
Chris@19 1845 [m4_require([_LT_HEADER_DLFCN])dnl
Chris@19 1846 if test "x$enable_dlopen" != xyes; then
Chris@19 1847 enable_dlopen=unknown
Chris@19 1848 enable_dlopen_self=unknown
Chris@19 1849 enable_dlopen_self_static=unknown
Chris@19 1850 else
Chris@19 1851 lt_cv_dlopen=no
Chris@19 1852 lt_cv_dlopen_libs=
Chris@19 1853
Chris@19 1854 case $host_os in
Chris@19 1855 beos*)
Chris@19 1856 lt_cv_dlopen="load_add_on"
Chris@19 1857 lt_cv_dlopen_libs=
Chris@19 1858 lt_cv_dlopen_self=yes
Chris@19 1859 ;;
Chris@19 1860
Chris@19 1861 mingw* | pw32* | cegcc*)
Chris@19 1862 lt_cv_dlopen="LoadLibrary"
Chris@19 1863 lt_cv_dlopen_libs=
Chris@19 1864 ;;
Chris@19 1865
Chris@19 1866 cygwin*)
Chris@19 1867 lt_cv_dlopen="dlopen"
Chris@19 1868 lt_cv_dlopen_libs=
Chris@19 1869 ;;
Chris@19 1870
Chris@19 1871 darwin*)
Chris@19 1872 # if libdl is installed we need to link against it
Chris@19 1873 AC_CHECK_LIB([dl], [dlopen],
Chris@19 1874 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
Chris@19 1875 lt_cv_dlopen="dyld"
Chris@19 1876 lt_cv_dlopen_libs=
Chris@19 1877 lt_cv_dlopen_self=yes
Chris@19 1878 ])
Chris@19 1879 ;;
Chris@19 1880
Chris@19 1881 *)
Chris@19 1882 AC_CHECK_FUNC([shl_load],
Chris@19 1883 [lt_cv_dlopen="shl_load"],
Chris@19 1884 [AC_CHECK_LIB([dld], [shl_load],
Chris@19 1885 [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
Chris@19 1886 [AC_CHECK_FUNC([dlopen],
Chris@19 1887 [lt_cv_dlopen="dlopen"],
Chris@19 1888 [AC_CHECK_LIB([dl], [dlopen],
Chris@19 1889 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
Chris@19 1890 [AC_CHECK_LIB([svld], [dlopen],
Chris@19 1891 [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
Chris@19 1892 [AC_CHECK_LIB([dld], [dld_link],
Chris@19 1893 [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
Chris@19 1894 ])
Chris@19 1895 ])
Chris@19 1896 ])
Chris@19 1897 ])
Chris@19 1898 ])
Chris@19 1899 ;;
Chris@19 1900 esac
Chris@19 1901
Chris@19 1902 if test "x$lt_cv_dlopen" != xno; then
Chris@19 1903 enable_dlopen=yes
Chris@19 1904 else
Chris@19 1905 enable_dlopen=no
Chris@19 1906 fi
Chris@19 1907
Chris@19 1908 case $lt_cv_dlopen in
Chris@19 1909 dlopen)
Chris@19 1910 save_CPPFLAGS="$CPPFLAGS"
Chris@19 1911 test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
Chris@19 1912
Chris@19 1913 save_LDFLAGS="$LDFLAGS"
Chris@19 1914 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
Chris@19 1915
Chris@19 1916 save_LIBS="$LIBS"
Chris@19 1917 LIBS="$lt_cv_dlopen_libs $LIBS"
Chris@19 1918
Chris@19 1919 AC_CACHE_CHECK([whether a program can dlopen itself],
Chris@19 1920 lt_cv_dlopen_self, [dnl
Chris@19 1921 _LT_TRY_DLOPEN_SELF(
Chris@19 1922 lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
Chris@19 1923 lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
Chris@19 1924 ])
Chris@19 1925
Chris@19 1926 if test "x$lt_cv_dlopen_self" = xyes; then
Chris@19 1927 wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
Chris@19 1928 AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
Chris@19 1929 lt_cv_dlopen_self_static, [dnl
Chris@19 1930 _LT_TRY_DLOPEN_SELF(
Chris@19 1931 lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
Chris@19 1932 lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
Chris@19 1933 ])
Chris@19 1934 fi
Chris@19 1935
Chris@19 1936 CPPFLAGS="$save_CPPFLAGS"
Chris@19 1937 LDFLAGS="$save_LDFLAGS"
Chris@19 1938 LIBS="$save_LIBS"
Chris@19 1939 ;;
Chris@19 1940 esac
Chris@19 1941
Chris@19 1942 case $lt_cv_dlopen_self in
Chris@19 1943 yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
Chris@19 1944 *) enable_dlopen_self=unknown ;;
Chris@19 1945 esac
Chris@19 1946
Chris@19 1947 case $lt_cv_dlopen_self_static in
Chris@19 1948 yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
Chris@19 1949 *) enable_dlopen_self_static=unknown ;;
Chris@19 1950 esac
Chris@19 1951 fi
Chris@19 1952 _LT_DECL([dlopen_support], [enable_dlopen], [0],
Chris@19 1953 [Whether dlopen is supported])
Chris@19 1954 _LT_DECL([dlopen_self], [enable_dlopen_self], [0],
Chris@19 1955 [Whether dlopen of programs is supported])
Chris@19 1956 _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
Chris@19 1957 [Whether dlopen of statically linked programs is supported])
Chris@19 1958 ])# LT_SYS_DLOPEN_SELF
Chris@19 1959
Chris@19 1960 # Old name:
Chris@19 1961 AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
Chris@19 1962 dnl aclocal-1.4 backwards compatibility:
Chris@19 1963 dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
Chris@19 1964
Chris@19 1965
Chris@19 1966 # _LT_COMPILER_C_O([TAGNAME])
Chris@19 1967 # ---------------------------
Chris@19 1968 # Check to see if options -c and -o are simultaneously supported by compiler.
Chris@19 1969 # This macro does not hard code the compiler like AC_PROG_CC_C_O.
Chris@19 1970 m4_defun([_LT_COMPILER_C_O],
Chris@19 1971 [m4_require([_LT_DECL_SED])dnl
Chris@19 1972 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@19 1973 m4_require([_LT_TAG_COMPILER])dnl
Chris@19 1974 AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
Chris@19 1975 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
Chris@19 1976 [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
Chris@19 1977 $RM -r conftest 2>/dev/null
Chris@19 1978 mkdir conftest
Chris@19 1979 cd conftest
Chris@19 1980 mkdir out
Chris@19 1981 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@19 1982
Chris@19 1983 lt_compiler_flag="-o out/conftest2.$ac_objext"
Chris@19 1984 # Insert the option either (1) after the last *FLAGS variable, or
Chris@19 1985 # (2) before a word containing "conftest.", or (3) at the end.
Chris@19 1986 # Note that $ac_compile itself does not contain backslashes and begins
Chris@19 1987 # with a dollar sign (not a hyphen), so the echo should work correctly.
Chris@19 1988 lt_compile=`echo "$ac_compile" | $SED \
Chris@19 1989 -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
Chris@19 1990 -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
Chris@19 1991 -e 's:$: $lt_compiler_flag:'`
Chris@19 1992 (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@19 1993 (eval "$lt_compile" 2>out/conftest.err)
Chris@19 1994 ac_status=$?
Chris@19 1995 cat out/conftest.err >&AS_MESSAGE_LOG_FD
Chris@19 1996 echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
Chris@19 1997 if (exit $ac_status) && test -s out/conftest2.$ac_objext
Chris@19 1998 then
Chris@19 1999 # The compiler can only warn and ignore the option if not recognized
Chris@19 2000 # So say no if there are warnings
Chris@19 2001 $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
Chris@19 2002 $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
Chris@19 2003 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
Chris@19 2004 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@19 2005 fi
Chris@19 2006 fi
Chris@19 2007 chmod u+w . 2>&AS_MESSAGE_LOG_FD
Chris@19 2008 $RM conftest*
Chris@19 2009 # SGI C++ compiler will create directory out/ii_files/ for
Chris@19 2010 # template instantiation
Chris@19 2011 test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
Chris@19 2012 $RM out/* && rmdir out
Chris@19 2013 cd ..
Chris@19 2014 $RM -r conftest
Chris@19 2015 $RM conftest*
Chris@19 2016 ])
Chris@19 2017 _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
Chris@19 2018 [Does compiler simultaneously support -c and -o options?])
Chris@19 2019 ])# _LT_COMPILER_C_O
Chris@19 2020
Chris@19 2021
Chris@19 2022 # _LT_COMPILER_FILE_LOCKS([TAGNAME])
Chris@19 2023 # ----------------------------------
Chris@19 2024 # Check to see if we can do hard links to lock some files if needed
Chris@19 2025 m4_defun([_LT_COMPILER_FILE_LOCKS],
Chris@19 2026 [m4_require([_LT_ENABLE_LOCK])dnl
Chris@19 2027 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@19 2028 _LT_COMPILER_C_O([$1])
Chris@19 2029
Chris@19 2030 hard_links="nottested"
Chris@19 2031 if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
Chris@19 2032 # do not overwrite the value of need_locks provided by the user
Chris@19 2033 AC_MSG_CHECKING([if we can lock with hard links])
Chris@19 2034 hard_links=yes
Chris@19 2035 $RM conftest*
Chris@19 2036 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@19 2037 touch conftest.a
Chris@19 2038 ln conftest.a conftest.b 2>&5 || hard_links=no
Chris@19 2039 ln conftest.a conftest.b 2>/dev/null && hard_links=no
Chris@19 2040 AC_MSG_RESULT([$hard_links])
Chris@19 2041 if test "$hard_links" = no; then
Chris@19 2042 AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
Chris@19 2043 need_locks=warn
Chris@19 2044 fi
Chris@19 2045 else
Chris@19 2046 need_locks=no
Chris@19 2047 fi
Chris@19 2048 _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
Chris@19 2049 ])# _LT_COMPILER_FILE_LOCKS
Chris@19 2050
Chris@19 2051
Chris@19 2052 # _LT_CHECK_OBJDIR
Chris@19 2053 # ----------------
Chris@19 2054 m4_defun([_LT_CHECK_OBJDIR],
Chris@19 2055 [AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
Chris@19 2056 [rm -f .libs 2>/dev/null
Chris@19 2057 mkdir .libs 2>/dev/null
Chris@19 2058 if test -d .libs; then
Chris@19 2059 lt_cv_objdir=.libs
Chris@19 2060 else
Chris@19 2061 # MS-DOS does not allow filenames that begin with a dot.
Chris@19 2062 lt_cv_objdir=_libs
Chris@19 2063 fi
Chris@19 2064 rmdir .libs 2>/dev/null])
Chris@19 2065 objdir=$lt_cv_objdir
Chris@19 2066 _LT_DECL([], [objdir], [0],
Chris@19 2067 [The name of the directory that contains temporary libtool files])dnl
Chris@19 2068 m4_pattern_allow([LT_OBJDIR])dnl
Chris@19 2069 AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
Chris@19 2070 [Define to the sub-directory in which libtool stores uninstalled libraries.])
Chris@19 2071 ])# _LT_CHECK_OBJDIR
Chris@19 2072
Chris@19 2073
Chris@19 2074 # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
Chris@19 2075 # --------------------------------------
Chris@19 2076 # Check hardcoding attributes.
Chris@19 2077 m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
Chris@19 2078 [AC_MSG_CHECKING([how to hardcode library paths into programs])
Chris@19 2079 _LT_TAGVAR(hardcode_action, $1)=
Chris@19 2080 if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
Chris@19 2081 test -n "$_LT_TAGVAR(runpath_var, $1)" ||
Chris@19 2082 test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
Chris@19 2083
Chris@19 2084 # We can hardcode non-existent directories.
Chris@19 2085 if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
Chris@19 2086 # If the only mechanism to avoid hardcoding is shlibpath_var, we
Chris@19 2087 # have to relink, otherwise we might link with an installed library
Chris@19 2088 # when we should be linking with a yet-to-be-installed one
Chris@19 2089 ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
Chris@19 2090 test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
Chris@19 2091 # Linking always hardcodes the temporary library directory.
Chris@19 2092 _LT_TAGVAR(hardcode_action, $1)=relink
Chris@19 2093 else
Chris@19 2094 # We can link without hardcoding, and we can hardcode nonexisting dirs.
Chris@19 2095 _LT_TAGVAR(hardcode_action, $1)=immediate
Chris@19 2096 fi
Chris@19 2097 else
Chris@19 2098 # We cannot hardcode anything, or else we can only hardcode existing
Chris@19 2099 # directories.
Chris@19 2100 _LT_TAGVAR(hardcode_action, $1)=unsupported
Chris@19 2101 fi
Chris@19 2102 AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
Chris@19 2103
Chris@19 2104 if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
Chris@19 2105 test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
Chris@19 2106 # Fast installation is not supported
Chris@19 2107 enable_fast_install=no
Chris@19 2108 elif test "$shlibpath_overrides_runpath" = yes ||
Chris@19 2109 test "$enable_shared" = no; then
Chris@19 2110 # Fast installation is not necessary
Chris@19 2111 enable_fast_install=needless
Chris@19 2112 fi
Chris@19 2113 _LT_TAGDECL([], [hardcode_action], [0],
Chris@19 2114 [How to hardcode a shared library path into an executable])
Chris@19 2115 ])# _LT_LINKER_HARDCODE_LIBPATH
Chris@19 2116
Chris@19 2117
Chris@19 2118 # _LT_CMD_STRIPLIB
Chris@19 2119 # ----------------
Chris@19 2120 m4_defun([_LT_CMD_STRIPLIB],
Chris@19 2121 [m4_require([_LT_DECL_EGREP])
Chris@19 2122 striplib=
Chris@19 2123 old_striplib=
Chris@19 2124 AC_MSG_CHECKING([whether stripping libraries is possible])
Chris@19 2125 if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
Chris@19 2126 test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
Chris@19 2127 test -z "$striplib" && striplib="$STRIP --strip-unneeded"
Chris@19 2128 AC_MSG_RESULT([yes])
Chris@19 2129 else
Chris@19 2130 # FIXME - insert some real tests, host_os isn't really good enough
Chris@19 2131 case $host_os in
Chris@19 2132 darwin*)
Chris@19 2133 if test -n "$STRIP" ; then
Chris@19 2134 striplib="$STRIP -x"
Chris@19 2135 old_striplib="$STRIP -S"
Chris@19 2136 AC_MSG_RESULT([yes])
Chris@19 2137 else
Chris@19 2138 AC_MSG_RESULT([no])
Chris@19 2139 fi
Chris@19 2140 ;;
Chris@19 2141 *)
Chris@19 2142 AC_MSG_RESULT([no])
Chris@19 2143 ;;
Chris@19 2144 esac
Chris@19 2145 fi
Chris@19 2146 _LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
Chris@19 2147 _LT_DECL([], [striplib], [1])
Chris@19 2148 ])# _LT_CMD_STRIPLIB
Chris@19 2149
Chris@19 2150
Chris@19 2151 # _LT_SYS_DYNAMIC_LINKER([TAG])
Chris@19 2152 # -----------------------------
Chris@19 2153 # PORTME Fill in your ld.so characteristics
Chris@19 2154 m4_defun([_LT_SYS_DYNAMIC_LINKER],
Chris@19 2155 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@19 2156 m4_require([_LT_DECL_EGREP])dnl
Chris@19 2157 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@19 2158 m4_require([_LT_DECL_OBJDUMP])dnl
Chris@19 2159 m4_require([_LT_DECL_SED])dnl
Chris@19 2160 m4_require([_LT_CHECK_SHELL_FEATURES])dnl
Chris@19 2161 AC_MSG_CHECKING([dynamic linker characteristics])
Chris@19 2162 m4_if([$1],
Chris@19 2163 [], [
Chris@19 2164 if test "$GCC" = yes; then
Chris@19 2165 case $host_os in
Chris@19 2166 darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
Chris@19 2167 *) lt_awk_arg="/^libraries:/" ;;
Chris@19 2168 esac
Chris@19 2169 case $host_os in
Chris@19 2170 mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
Chris@19 2171 *) lt_sed_strip_eq="s,=/,/,g" ;;
Chris@19 2172 esac
Chris@19 2173 lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
Chris@19 2174 case $lt_search_path_spec in
Chris@19 2175 *\;*)
Chris@19 2176 # if the path contains ";" then we assume it to be the separator
Chris@19 2177 # otherwise default to the standard path separator (i.e. ":") - it is
Chris@19 2178 # assumed that no part of a normal pathname contains ";" but that should
Chris@19 2179 # okay in the real world where ";" in dirpaths is itself problematic.
Chris@19 2180 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
Chris@19 2181 ;;
Chris@19 2182 *)
Chris@19 2183 lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
Chris@19 2184 ;;
Chris@19 2185 esac
Chris@19 2186 # Ok, now we have the path, separated by spaces, we can step through it
Chris@19 2187 # and add multilib dir if necessary.
Chris@19 2188 lt_tmp_lt_search_path_spec=
Chris@19 2189 lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
Chris@19 2190 for lt_sys_path in $lt_search_path_spec; do
Chris@19 2191 if test -d "$lt_sys_path/$lt_multi_os_dir"; then
Chris@19 2192 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
Chris@19 2193 else
Chris@19 2194 test -d "$lt_sys_path" && \
Chris@19 2195 lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
Chris@19 2196 fi
Chris@19 2197 done
Chris@19 2198 lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
Chris@19 2199 BEGIN {RS=" "; FS="/|\n";} {
Chris@19 2200 lt_foo="";
Chris@19 2201 lt_count=0;
Chris@19 2202 for (lt_i = NF; lt_i > 0; lt_i--) {
Chris@19 2203 if ($lt_i != "" && $lt_i != ".") {
Chris@19 2204 if ($lt_i == "..") {
Chris@19 2205 lt_count++;
Chris@19 2206 } else {
Chris@19 2207 if (lt_count == 0) {
Chris@19 2208 lt_foo="/" $lt_i lt_foo;
Chris@19 2209 } else {
Chris@19 2210 lt_count--;
Chris@19 2211 }
Chris@19 2212 }
Chris@19 2213 }
Chris@19 2214 }
Chris@19 2215 if (lt_foo != "") { lt_freq[[lt_foo]]++; }
Chris@19 2216 if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
Chris@19 2217 }'`
Chris@19 2218 # AWK program above erroneously prepends '/' to C:/dos/paths
Chris@19 2219 # for these hosts.
Chris@19 2220 case $host_os in
Chris@19 2221 mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
Chris@19 2222 $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
Chris@19 2223 esac
Chris@19 2224 sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
Chris@19 2225 else
Chris@19 2226 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
Chris@19 2227 fi])
Chris@19 2228 library_names_spec=
Chris@19 2229 libname_spec='lib$name'
Chris@19 2230 soname_spec=
Chris@19 2231 shrext_cmds=".so"
Chris@19 2232 postinstall_cmds=
Chris@19 2233 postuninstall_cmds=
Chris@19 2234 finish_cmds=
Chris@19 2235 finish_eval=
Chris@19 2236 shlibpath_var=
Chris@19 2237 shlibpath_overrides_runpath=unknown
Chris@19 2238 version_type=none
Chris@19 2239 dynamic_linker="$host_os ld.so"
Chris@19 2240 sys_lib_dlsearch_path_spec="/lib /usr/lib"
Chris@19 2241 need_lib_prefix=unknown
Chris@19 2242 hardcode_into_libs=no
Chris@19 2243
Chris@19 2244 # when you set need_version to no, make sure it does not cause -set_version
Chris@19 2245 # flags to be left without arguments
Chris@19 2246 need_version=unknown
Chris@19 2247
Chris@19 2248 case $host_os in
Chris@19 2249 aix3*)
Chris@19 2250 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2251 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
Chris@19 2252 shlibpath_var=LIBPATH
Chris@19 2253
Chris@19 2254 # AIX 3 has no versioning support, so we append a major version to the name.
Chris@19 2255 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2256 ;;
Chris@19 2257
Chris@19 2258 aix[[4-9]]*)
Chris@19 2259 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2260 need_lib_prefix=no
Chris@19 2261 need_version=no
Chris@19 2262 hardcode_into_libs=yes
Chris@19 2263 if test "$host_cpu" = ia64; then
Chris@19 2264 # AIX 5 supports IA64
Chris@19 2265 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
Chris@19 2266 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2267 else
Chris@19 2268 # With GCC up to 2.95.x, collect2 would create an import file
Chris@19 2269 # for dependence libraries. The import file would start with
Chris@19 2270 # the line `#! .'. This would cause the generated library to
Chris@19 2271 # depend on `.', always an invalid library. This was fixed in
Chris@19 2272 # development snapshots of GCC prior to 3.0.
Chris@19 2273 case $host_os in
Chris@19 2274 aix4 | aix4.[[01]] | aix4.[[01]].*)
Chris@19 2275 if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
Chris@19 2276 echo ' yes '
Chris@19 2277 echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
Chris@19 2278 :
Chris@19 2279 else
Chris@19 2280 can_build_shared=no
Chris@19 2281 fi
Chris@19 2282 ;;
Chris@19 2283 esac
Chris@19 2284 # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
Chris@19 2285 # soname into executable. Probably we can add versioning support to
Chris@19 2286 # collect2, so additional links can be useful in future.
Chris@19 2287 if test "$aix_use_runtimelinking" = yes; then
Chris@19 2288 # If using run time linking (on AIX 4.2 or later) use lib<name>.so
Chris@19 2289 # instead of lib<name>.a to let people know that these are not
Chris@19 2290 # typical AIX shared libraries.
Chris@19 2291 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2292 else
Chris@19 2293 # We preserve .a as extension for shared libraries through AIX4.2
Chris@19 2294 # and later when we are not doing run time linking.
Chris@19 2295 library_names_spec='${libname}${release}.a $libname.a'
Chris@19 2296 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2297 fi
Chris@19 2298 shlibpath_var=LIBPATH
Chris@19 2299 fi
Chris@19 2300 ;;
Chris@19 2301
Chris@19 2302 amigaos*)
Chris@19 2303 case $host_cpu in
Chris@19 2304 powerpc)
Chris@19 2305 # Since July 2007 AmigaOS4 officially supports .so libraries.
Chris@19 2306 # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
Chris@19 2307 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2308 ;;
Chris@19 2309 m68k)
Chris@19 2310 library_names_spec='$libname.ixlibrary $libname.a'
Chris@19 2311 # Create ${libname}_ixlibrary.a entries in /sys/libs.
Chris@19 2312 finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
Chris@19 2313 ;;
Chris@19 2314 esac
Chris@19 2315 ;;
Chris@19 2316
Chris@19 2317 beos*)
Chris@19 2318 library_names_spec='${libname}${shared_ext}'
Chris@19 2319 dynamic_linker="$host_os ld.so"
Chris@19 2320 shlibpath_var=LIBRARY_PATH
Chris@19 2321 ;;
Chris@19 2322
Chris@19 2323 bsdi[[45]]*)
Chris@19 2324 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2325 need_version=no
Chris@19 2326 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2327 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2328 finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
Chris@19 2329 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2330 sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
Chris@19 2331 sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
Chris@19 2332 # the default ld.so.conf also contains /usr/contrib/lib and
Chris@19 2333 # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
Chris@19 2334 # libtool to hard-code these into programs
Chris@19 2335 ;;
Chris@19 2336
Chris@19 2337 cygwin* | mingw* | pw32* | cegcc*)
Chris@19 2338 version_type=windows
Chris@19 2339 shrext_cmds=".dll"
Chris@19 2340 need_version=no
Chris@19 2341 need_lib_prefix=no
Chris@19 2342
Chris@19 2343 case $GCC,$cc_basename in
Chris@19 2344 yes,*)
Chris@19 2345 # gcc
Chris@19 2346 library_names_spec='$libname.dll.a'
Chris@19 2347 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@19 2348 postinstall_cmds='base_file=`basename \${file}`~
Chris@19 2349 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
Chris@19 2350 dldir=$destdir/`dirname \$dlpath`~
Chris@19 2351 test -d \$dldir || mkdir -p \$dldir~
Chris@19 2352 $install_prog $dir/$dlname \$dldir/$dlname~
Chris@19 2353 chmod a+x \$dldir/$dlname~
Chris@19 2354 if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
Chris@19 2355 eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
Chris@19 2356 fi'
Chris@19 2357 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@19 2358 dlpath=$dir/\$dldll~
Chris@19 2359 $RM \$dlpath'
Chris@19 2360 shlibpath_overrides_runpath=yes
Chris@19 2361
Chris@19 2362 case $host_os in
Chris@19 2363 cygwin*)
Chris@19 2364 # Cygwin DLLs use 'cyg' prefix rather than 'lib'
Chris@19 2365 soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@19 2366 m4_if([$1], [],[
Chris@19 2367 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
Chris@19 2368 ;;
Chris@19 2369 mingw* | cegcc*)
Chris@19 2370 # MinGW DLLs use traditional 'lib' prefix
Chris@19 2371 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@19 2372 ;;
Chris@19 2373 pw32*)
Chris@19 2374 # pw32 DLLs use 'pw' prefix rather than 'lib'
Chris@19 2375 library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@19 2376 ;;
Chris@19 2377 esac
Chris@19 2378 dynamic_linker='Win32 ld.exe'
Chris@19 2379 ;;
Chris@19 2380
Chris@19 2381 *,cl*)
Chris@19 2382 # Native MSVC
Chris@19 2383 libname_spec='$name'
Chris@19 2384 soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
Chris@19 2385 library_names_spec='${libname}.dll.lib'
Chris@19 2386
Chris@19 2387 case $build_os in
Chris@19 2388 mingw*)
Chris@19 2389 sys_lib_search_path_spec=
Chris@19 2390 lt_save_ifs=$IFS
Chris@19 2391 IFS=';'
Chris@19 2392 for lt_path in $LIB
Chris@19 2393 do
Chris@19 2394 IFS=$lt_save_ifs
Chris@19 2395 # Let DOS variable expansion print the short 8.3 style file name.
Chris@19 2396 lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
Chris@19 2397 sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
Chris@19 2398 done
Chris@19 2399 IFS=$lt_save_ifs
Chris@19 2400 # Convert to MSYS style.
Chris@19 2401 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
Chris@19 2402 ;;
Chris@19 2403 cygwin*)
Chris@19 2404 # Convert to unix form, then to dos form, then back to unix form
Chris@19 2405 # but this time dos style (no spaces!) so that the unix form looks
Chris@19 2406 # like /cygdrive/c/PROGRA~1:/cygdr...
Chris@19 2407 sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
Chris@19 2408 sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
Chris@19 2409 sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@19 2410 ;;
Chris@19 2411 *)
Chris@19 2412 sys_lib_search_path_spec="$LIB"
Chris@19 2413 if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
Chris@19 2414 # It is most probably a Windows format PATH.
Chris@19 2415 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
Chris@19 2416 else
Chris@19 2417 sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
Chris@19 2418 fi
Chris@19 2419 # FIXME: find the short name or the path components, as spaces are
Chris@19 2420 # common. (e.g. "Program Files" -> "PROGRA~1")
Chris@19 2421 ;;
Chris@19 2422 esac
Chris@19 2423
Chris@19 2424 # DLL is installed to $(libdir)/../bin by postinstall_cmds
Chris@19 2425 postinstall_cmds='base_file=`basename \${file}`~
Chris@19 2426 dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
Chris@19 2427 dldir=$destdir/`dirname \$dlpath`~
Chris@19 2428 test -d \$dldir || mkdir -p \$dldir~
Chris@19 2429 $install_prog $dir/$dlname \$dldir/$dlname'
Chris@19 2430 postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
Chris@19 2431 dlpath=$dir/\$dldll~
Chris@19 2432 $RM \$dlpath'
Chris@19 2433 shlibpath_overrides_runpath=yes
Chris@19 2434 dynamic_linker='Win32 link.exe'
Chris@19 2435 ;;
Chris@19 2436
Chris@19 2437 *)
Chris@19 2438 # Assume MSVC wrapper
Chris@19 2439 library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
Chris@19 2440 dynamic_linker='Win32 ld.exe'
Chris@19 2441 ;;
Chris@19 2442 esac
Chris@19 2443 # FIXME: first we should search . and the directory the executable is in
Chris@19 2444 shlibpath_var=PATH
Chris@19 2445 ;;
Chris@19 2446
Chris@19 2447 darwin* | rhapsody*)
Chris@19 2448 dynamic_linker="$host_os dyld"
Chris@19 2449 version_type=darwin
Chris@19 2450 need_lib_prefix=no
Chris@19 2451 need_version=no
Chris@19 2452 library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
Chris@19 2453 soname_spec='${libname}${release}${major}$shared_ext'
Chris@19 2454 shlibpath_overrides_runpath=yes
Chris@19 2455 shlibpath_var=DYLD_LIBRARY_PATH
Chris@19 2456 shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
Chris@19 2457 m4_if([$1], [],[
Chris@19 2458 sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
Chris@19 2459 sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
Chris@19 2460 ;;
Chris@19 2461
Chris@19 2462 dgux*)
Chris@19 2463 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2464 need_lib_prefix=no
Chris@19 2465 need_version=no
Chris@19 2466 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
Chris@19 2467 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2468 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2469 ;;
Chris@19 2470
Chris@19 2471 freebsd* | dragonfly*)
Chris@19 2472 # DragonFly does not have aout. When/if they implement a new
Chris@19 2473 # versioning mechanism, adjust this.
Chris@19 2474 if test -x /usr/bin/objformat; then
Chris@19 2475 objformat=`/usr/bin/objformat`
Chris@19 2476 else
Chris@19 2477 case $host_os in
Chris@19 2478 freebsd[[23]].*) objformat=aout ;;
Chris@19 2479 *) objformat=elf ;;
Chris@19 2480 esac
Chris@19 2481 fi
Chris@19 2482 version_type=freebsd-$objformat
Chris@19 2483 case $version_type in
Chris@19 2484 freebsd-elf*)
Chris@19 2485 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
Chris@19 2486 need_version=no
Chris@19 2487 need_lib_prefix=no
Chris@19 2488 ;;
Chris@19 2489 freebsd-*)
Chris@19 2490 library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
Chris@19 2491 need_version=yes
Chris@19 2492 ;;
Chris@19 2493 esac
Chris@19 2494 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2495 case $host_os in
Chris@19 2496 freebsd2.*)
Chris@19 2497 shlibpath_overrides_runpath=yes
Chris@19 2498 ;;
Chris@19 2499 freebsd3.[[01]]* | freebsdelf3.[[01]]*)
Chris@19 2500 shlibpath_overrides_runpath=yes
Chris@19 2501 hardcode_into_libs=yes
Chris@19 2502 ;;
Chris@19 2503 freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
Chris@19 2504 freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
Chris@19 2505 shlibpath_overrides_runpath=no
Chris@19 2506 hardcode_into_libs=yes
Chris@19 2507 ;;
Chris@19 2508 *) # from 4.6 on, and DragonFly
Chris@19 2509 shlibpath_overrides_runpath=yes
Chris@19 2510 hardcode_into_libs=yes
Chris@19 2511 ;;
Chris@19 2512 esac
Chris@19 2513 ;;
Chris@19 2514
Chris@19 2515 gnu*)
Chris@19 2516 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2517 need_lib_prefix=no
Chris@19 2518 need_version=no
Chris@19 2519 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
Chris@19 2520 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2521 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2522 shlibpath_overrides_runpath=no
Chris@19 2523 hardcode_into_libs=yes
Chris@19 2524 ;;
Chris@19 2525
Chris@19 2526 haiku*)
Chris@19 2527 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2528 need_lib_prefix=no
Chris@19 2529 need_version=no
Chris@19 2530 dynamic_linker="$host_os runtime_loader"
Chris@19 2531 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
Chris@19 2532 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2533 shlibpath_var=LIBRARY_PATH
Chris@19 2534 shlibpath_overrides_runpath=yes
Chris@19 2535 sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
Chris@19 2536 hardcode_into_libs=yes
Chris@19 2537 ;;
Chris@19 2538
Chris@19 2539 hpux9* | hpux10* | hpux11*)
Chris@19 2540 # Give a soname corresponding to the major version so that dld.sl refuses to
Chris@19 2541 # link against other versions.
Chris@19 2542 version_type=sunos
Chris@19 2543 need_lib_prefix=no
Chris@19 2544 need_version=no
Chris@19 2545 case $host_cpu in
Chris@19 2546 ia64*)
Chris@19 2547 shrext_cmds='.so'
Chris@19 2548 hardcode_into_libs=yes
Chris@19 2549 dynamic_linker="$host_os dld.so"
Chris@19 2550 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2551 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@19 2552 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2553 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2554 if test "X$HPUX_IA64_MODE" = X32; then
Chris@19 2555 sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
Chris@19 2556 else
Chris@19 2557 sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
Chris@19 2558 fi
Chris@19 2559 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@19 2560 ;;
Chris@19 2561 hppa*64*)
Chris@19 2562 shrext_cmds='.sl'
Chris@19 2563 hardcode_into_libs=yes
Chris@19 2564 dynamic_linker="$host_os dld.sl"
Chris@19 2565 shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
Chris@19 2566 shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
Chris@19 2567 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2568 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2569 sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
Chris@19 2570 sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
Chris@19 2571 ;;
Chris@19 2572 *)
Chris@19 2573 shrext_cmds='.sl'
Chris@19 2574 dynamic_linker="$host_os dld.sl"
Chris@19 2575 shlibpath_var=SHLIB_PATH
Chris@19 2576 shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
Chris@19 2577 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2578 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2579 ;;
Chris@19 2580 esac
Chris@19 2581 # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
Chris@19 2582 postinstall_cmds='chmod 555 $lib'
Chris@19 2583 # or fails outright, so override atomically:
Chris@19 2584 install_override_mode=555
Chris@19 2585 ;;
Chris@19 2586
Chris@19 2587 interix[[3-9]]*)
Chris@19 2588 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2589 need_lib_prefix=no
Chris@19 2590 need_version=no
Chris@19 2591 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@19 2592 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2593 dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
Chris@19 2594 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2595 shlibpath_overrides_runpath=no
Chris@19 2596 hardcode_into_libs=yes
Chris@19 2597 ;;
Chris@19 2598
Chris@19 2599 irix5* | irix6* | nonstopux*)
Chris@19 2600 case $host_os in
Chris@19 2601 nonstopux*) version_type=nonstopux ;;
Chris@19 2602 *)
Chris@19 2603 if test "$lt_cv_prog_gnu_ld" = yes; then
Chris@19 2604 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2605 else
Chris@19 2606 version_type=irix
Chris@19 2607 fi ;;
Chris@19 2608 esac
Chris@19 2609 need_lib_prefix=no
Chris@19 2610 need_version=no
Chris@19 2611 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2612 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
Chris@19 2613 case $host_os in
Chris@19 2614 irix5* | nonstopux*)
Chris@19 2615 libsuff= shlibsuff=
Chris@19 2616 ;;
Chris@19 2617 *)
Chris@19 2618 case $LD in # libtool.m4 will add one of these switches to LD
Chris@19 2619 *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
Chris@19 2620 libsuff= shlibsuff= libmagic=32-bit;;
Chris@19 2621 *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
Chris@19 2622 libsuff=32 shlibsuff=N32 libmagic=N32;;
Chris@19 2623 *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
Chris@19 2624 libsuff=64 shlibsuff=64 libmagic=64-bit;;
Chris@19 2625 *) libsuff= shlibsuff= libmagic=never-match;;
Chris@19 2626 esac
Chris@19 2627 ;;
Chris@19 2628 esac
Chris@19 2629 shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
Chris@19 2630 shlibpath_overrides_runpath=no
Chris@19 2631 sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
Chris@19 2632 sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
Chris@19 2633 hardcode_into_libs=yes
Chris@19 2634 ;;
Chris@19 2635
Chris@19 2636 # No shared lib support for Linux oldld, aout, or coff.
Chris@19 2637 linux*oldld* | linux*aout* | linux*coff*)
Chris@19 2638 dynamic_linker=no
Chris@19 2639 ;;
Chris@19 2640
Chris@19 2641 # This must be glibc/ELF.
Chris@19 2642 linux* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@19 2643 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2644 need_lib_prefix=no
Chris@19 2645 need_version=no
Chris@19 2646 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2647 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2648 finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
Chris@19 2649 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2650 shlibpath_overrides_runpath=no
Chris@19 2651
Chris@19 2652 # Some binutils ld are patched to set DT_RUNPATH
Chris@19 2653 AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
Chris@19 2654 [lt_cv_shlibpath_overrides_runpath=no
Chris@19 2655 save_LDFLAGS=$LDFLAGS
Chris@19 2656 save_libdir=$libdir
Chris@19 2657 eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
Chris@19 2658 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
Chris@19 2659 AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
Chris@19 2660 [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
Chris@19 2661 [lt_cv_shlibpath_overrides_runpath=yes])])
Chris@19 2662 LDFLAGS=$save_LDFLAGS
Chris@19 2663 libdir=$save_libdir
Chris@19 2664 ])
Chris@19 2665 shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
Chris@19 2666
Chris@19 2667 # This implies no fast_install, which is unacceptable.
Chris@19 2668 # Some rework will be needed to allow for fast_install
Chris@19 2669 # before this can be enabled.
Chris@19 2670 hardcode_into_libs=yes
Chris@19 2671
Chris@19 2672 # Append ld.so.conf contents to the search path
Chris@19 2673 if test -f /etc/ld.so.conf; then
Chris@19 2674 lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
Chris@19 2675 sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
Chris@19 2676 fi
Chris@19 2677
Chris@19 2678 # We used to test for /lib/ld.so.1 and disable shared libraries on
Chris@19 2679 # powerpc, because MkLinux only supported shared libraries with the
Chris@19 2680 # GNU dynamic linker. Since this was broken with cross compilers,
Chris@19 2681 # most powerpc-linux boxes support dynamic linking these days and
Chris@19 2682 # people can always --disable-shared, the test was removed, and we
Chris@19 2683 # assume the GNU/Linux dynamic linker is in use.
Chris@19 2684 dynamic_linker='GNU/Linux ld.so'
Chris@19 2685 ;;
Chris@19 2686
Chris@19 2687 netbsd*)
Chris@19 2688 version_type=sunos
Chris@19 2689 need_lib_prefix=no
Chris@19 2690 need_version=no
Chris@19 2691 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@19 2692 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
Chris@19 2693 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@19 2694 dynamic_linker='NetBSD (a.out) ld.so'
Chris@19 2695 else
Chris@19 2696 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
Chris@19 2697 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2698 dynamic_linker='NetBSD ld.elf_so'
Chris@19 2699 fi
Chris@19 2700 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2701 shlibpath_overrides_runpath=yes
Chris@19 2702 hardcode_into_libs=yes
Chris@19 2703 ;;
Chris@19 2704
Chris@19 2705 newsos6)
Chris@19 2706 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2707 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2708 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2709 shlibpath_overrides_runpath=yes
Chris@19 2710 ;;
Chris@19 2711
Chris@19 2712 *nto* | *qnx*)
Chris@19 2713 version_type=qnx
Chris@19 2714 need_lib_prefix=no
Chris@19 2715 need_version=no
Chris@19 2716 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2717 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2718 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2719 shlibpath_overrides_runpath=no
Chris@19 2720 hardcode_into_libs=yes
Chris@19 2721 dynamic_linker='ldqnx.so'
Chris@19 2722 ;;
Chris@19 2723
Chris@19 2724 openbsd*)
Chris@19 2725 version_type=sunos
Chris@19 2726 sys_lib_dlsearch_path_spec="/usr/lib"
Chris@19 2727 need_lib_prefix=no
Chris@19 2728 # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
Chris@19 2729 case $host_os in
Chris@19 2730 openbsd3.3 | openbsd3.3.*) need_version=yes ;;
Chris@19 2731 *) need_version=no ;;
Chris@19 2732 esac
Chris@19 2733 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
Chris@19 2734 finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
Chris@19 2735 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2736 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@19 2737 case $host_os in
Chris@19 2738 openbsd2.[[89]] | openbsd2.[[89]].*)
Chris@19 2739 shlibpath_overrides_runpath=no
Chris@19 2740 ;;
Chris@19 2741 *)
Chris@19 2742 shlibpath_overrides_runpath=yes
Chris@19 2743 ;;
Chris@19 2744 esac
Chris@19 2745 else
Chris@19 2746 shlibpath_overrides_runpath=yes
Chris@19 2747 fi
Chris@19 2748 ;;
Chris@19 2749
Chris@19 2750 os2*)
Chris@19 2751 libname_spec='$name'
Chris@19 2752 shrext_cmds=".dll"
Chris@19 2753 need_lib_prefix=no
Chris@19 2754 library_names_spec='$libname${shared_ext} $libname.a'
Chris@19 2755 dynamic_linker='OS/2 ld.exe'
Chris@19 2756 shlibpath_var=LIBPATH
Chris@19 2757 ;;
Chris@19 2758
Chris@19 2759 osf3* | osf4* | osf5*)
Chris@19 2760 version_type=osf
Chris@19 2761 need_lib_prefix=no
Chris@19 2762 need_version=no
Chris@19 2763 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2764 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2765 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2766 sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
Chris@19 2767 sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
Chris@19 2768 ;;
Chris@19 2769
Chris@19 2770 rdos*)
Chris@19 2771 dynamic_linker=no
Chris@19 2772 ;;
Chris@19 2773
Chris@19 2774 solaris*)
Chris@19 2775 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2776 need_lib_prefix=no
Chris@19 2777 need_version=no
Chris@19 2778 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2779 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2780 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2781 shlibpath_overrides_runpath=yes
Chris@19 2782 hardcode_into_libs=yes
Chris@19 2783 # ldd complains unless libraries are executable
Chris@19 2784 postinstall_cmds='chmod +x $lib'
Chris@19 2785 ;;
Chris@19 2786
Chris@19 2787 sunos4*)
Chris@19 2788 version_type=sunos
Chris@19 2789 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
Chris@19 2790 finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
Chris@19 2791 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2792 shlibpath_overrides_runpath=yes
Chris@19 2793 if test "$with_gnu_ld" = yes; then
Chris@19 2794 need_lib_prefix=no
Chris@19 2795 fi
Chris@19 2796 need_version=yes
Chris@19 2797 ;;
Chris@19 2798
Chris@19 2799 sysv4 | sysv4.3*)
Chris@19 2800 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2801 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2802 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2803 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2804 case $host_vendor in
Chris@19 2805 sni)
Chris@19 2806 shlibpath_overrides_runpath=no
Chris@19 2807 need_lib_prefix=no
Chris@19 2808 runpath_var=LD_RUN_PATH
Chris@19 2809 ;;
Chris@19 2810 siemens)
Chris@19 2811 need_lib_prefix=no
Chris@19 2812 ;;
Chris@19 2813 motorola)
Chris@19 2814 need_lib_prefix=no
Chris@19 2815 need_version=no
Chris@19 2816 shlibpath_overrides_runpath=no
Chris@19 2817 sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
Chris@19 2818 ;;
Chris@19 2819 esac
Chris@19 2820 ;;
Chris@19 2821
Chris@19 2822 sysv4*MP*)
Chris@19 2823 if test -d /usr/nec ;then
Chris@19 2824 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2825 library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
Chris@19 2826 soname_spec='$libname${shared_ext}.$major'
Chris@19 2827 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2828 fi
Chris@19 2829 ;;
Chris@19 2830
Chris@19 2831 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@19 2832 version_type=freebsd-elf
Chris@19 2833 need_lib_prefix=no
Chris@19 2834 need_version=no
Chris@19 2835 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
Chris@19 2836 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2837 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2838 shlibpath_overrides_runpath=yes
Chris@19 2839 hardcode_into_libs=yes
Chris@19 2840 if test "$with_gnu_ld" = yes; then
Chris@19 2841 sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
Chris@19 2842 else
Chris@19 2843 sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
Chris@19 2844 case $host_os in
Chris@19 2845 sco3.2v5*)
Chris@19 2846 sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
Chris@19 2847 ;;
Chris@19 2848 esac
Chris@19 2849 fi
Chris@19 2850 sys_lib_dlsearch_path_spec='/usr/lib'
Chris@19 2851 ;;
Chris@19 2852
Chris@19 2853 tpf*)
Chris@19 2854 # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
Chris@19 2855 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2856 need_lib_prefix=no
Chris@19 2857 need_version=no
Chris@19 2858 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2859 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2860 shlibpath_overrides_runpath=no
Chris@19 2861 hardcode_into_libs=yes
Chris@19 2862 ;;
Chris@19 2863
Chris@19 2864 uts4*)
Chris@19 2865 version_type=linux # correct to gnu/linux during the next big refactor
Chris@19 2866 library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
Chris@19 2867 soname_spec='${libname}${release}${shared_ext}$major'
Chris@19 2868 shlibpath_var=LD_LIBRARY_PATH
Chris@19 2869 ;;
Chris@19 2870
Chris@19 2871 *)
Chris@19 2872 dynamic_linker=no
Chris@19 2873 ;;
Chris@19 2874 esac
Chris@19 2875 AC_MSG_RESULT([$dynamic_linker])
Chris@19 2876 test "$dynamic_linker" = no && can_build_shared=no
Chris@19 2877
Chris@19 2878 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
Chris@19 2879 if test "$GCC" = yes; then
Chris@19 2880 variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
Chris@19 2881 fi
Chris@19 2882
Chris@19 2883 if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
Chris@19 2884 sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
Chris@19 2885 fi
Chris@19 2886 if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
Chris@19 2887 sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
Chris@19 2888 fi
Chris@19 2889
Chris@19 2890 _LT_DECL([], [variables_saved_for_relink], [1],
Chris@19 2891 [Variables whose values should be saved in libtool wrapper scripts and
Chris@19 2892 restored at link time])
Chris@19 2893 _LT_DECL([], [need_lib_prefix], [0],
Chris@19 2894 [Do we need the "lib" prefix for modules?])
Chris@19 2895 _LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
Chris@19 2896 _LT_DECL([], [version_type], [0], [Library versioning type])
Chris@19 2897 _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
Chris@19 2898 _LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
Chris@19 2899 _LT_DECL([], [shlibpath_overrides_runpath], [0],
Chris@19 2900 [Is shlibpath searched before the hard-coded library search path?])
Chris@19 2901 _LT_DECL([], [libname_spec], [1], [Format of library name prefix])
Chris@19 2902 _LT_DECL([], [library_names_spec], [1],
Chris@19 2903 [[List of archive names. First name is the real one, the rest are links.
Chris@19 2904 The last name is the one that the linker finds with -lNAME]])
Chris@19 2905 _LT_DECL([], [soname_spec], [1],
Chris@19 2906 [[The coded name of the library, if different from the real name]])
Chris@19 2907 _LT_DECL([], [install_override_mode], [1],
Chris@19 2908 [Permission mode override for installation of shared libraries])
Chris@19 2909 _LT_DECL([], [postinstall_cmds], [2],
Chris@19 2910 [Command to use after installation of a shared archive])
Chris@19 2911 _LT_DECL([], [postuninstall_cmds], [2],
Chris@19 2912 [Command to use after uninstallation of a shared archive])
Chris@19 2913 _LT_DECL([], [finish_cmds], [2],
Chris@19 2914 [Commands used to finish a libtool library installation in a directory])
Chris@19 2915 _LT_DECL([], [finish_eval], [1],
Chris@19 2916 [[As "finish_cmds", except a single script fragment to be evaled but
Chris@19 2917 not shown]])
Chris@19 2918 _LT_DECL([], [hardcode_into_libs], [0],
Chris@19 2919 [Whether we should hardcode library paths into libraries])
Chris@19 2920 _LT_DECL([], [sys_lib_search_path_spec], [2],
Chris@19 2921 [Compile-time system search path for libraries])
Chris@19 2922 _LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
Chris@19 2923 [Run-time system search path for libraries])
Chris@19 2924 ])# _LT_SYS_DYNAMIC_LINKER
Chris@19 2925
Chris@19 2926
Chris@19 2927 # _LT_PATH_TOOL_PREFIX(TOOL)
Chris@19 2928 # --------------------------
Chris@19 2929 # find a file program which can recognize shared library
Chris@19 2930 AC_DEFUN([_LT_PATH_TOOL_PREFIX],
Chris@19 2931 [m4_require([_LT_DECL_EGREP])dnl
Chris@19 2932 AC_MSG_CHECKING([for $1])
Chris@19 2933 AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
Chris@19 2934 [case $MAGIC_CMD in
Chris@19 2935 [[\\/*] | ?:[\\/]*])
Chris@19 2936 lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
Chris@19 2937 ;;
Chris@19 2938 *)
Chris@19 2939 lt_save_MAGIC_CMD="$MAGIC_CMD"
Chris@19 2940 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
Chris@19 2941 dnl $ac_dummy forces splitting on constant user-supplied paths.
Chris@19 2942 dnl POSIX.2 word splitting is done only on the output of word expansions,
Chris@19 2943 dnl not every word. This closes a longstanding sh security hole.
Chris@19 2944 ac_dummy="m4_if([$2], , $PATH, [$2])"
Chris@19 2945 for ac_dir in $ac_dummy; do
Chris@19 2946 IFS="$lt_save_ifs"
Chris@19 2947 test -z "$ac_dir" && ac_dir=.
Chris@19 2948 if test -f $ac_dir/$1; then
Chris@19 2949 lt_cv_path_MAGIC_CMD="$ac_dir/$1"
Chris@19 2950 if test -n "$file_magic_test_file"; then
Chris@19 2951 case $deplibs_check_method in
Chris@19 2952 "file_magic "*)
Chris@19 2953 file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
Chris@19 2954 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
Chris@19 2955 if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
Chris@19 2956 $EGREP "$file_magic_regex" > /dev/null; then
Chris@19 2957 :
Chris@19 2958 else
Chris@19 2959 cat <<_LT_EOF 1>&2
Chris@19 2960
Chris@19 2961 *** Warning: the command libtool uses to detect shared libraries,
Chris@19 2962 *** $file_magic_cmd, produces output that libtool cannot recognize.
Chris@19 2963 *** The result is that libtool may fail to recognize shared libraries
Chris@19 2964 *** as such. This will affect the creation of libtool libraries that
Chris@19 2965 *** depend on shared libraries, but programs linked with such libtool
Chris@19 2966 *** libraries will work regardless of this problem. Nevertheless, you
Chris@19 2967 *** may want to report the problem to your system manager and/or to
Chris@19 2968 *** bug-libtool@gnu.org
Chris@19 2969
Chris@19 2970 _LT_EOF
Chris@19 2971 fi ;;
Chris@19 2972 esac
Chris@19 2973 fi
Chris@19 2974 break
Chris@19 2975 fi
Chris@19 2976 done
Chris@19 2977 IFS="$lt_save_ifs"
Chris@19 2978 MAGIC_CMD="$lt_save_MAGIC_CMD"
Chris@19 2979 ;;
Chris@19 2980 esac])
Chris@19 2981 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
Chris@19 2982 if test -n "$MAGIC_CMD"; then
Chris@19 2983 AC_MSG_RESULT($MAGIC_CMD)
Chris@19 2984 else
Chris@19 2985 AC_MSG_RESULT(no)
Chris@19 2986 fi
Chris@19 2987 _LT_DECL([], [MAGIC_CMD], [0],
Chris@19 2988 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
Chris@19 2989 ])# _LT_PATH_TOOL_PREFIX
Chris@19 2990
Chris@19 2991 # Old name:
Chris@19 2992 AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
Chris@19 2993 dnl aclocal-1.4 backwards compatibility:
Chris@19 2994 dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
Chris@19 2995
Chris@19 2996
Chris@19 2997 # _LT_PATH_MAGIC
Chris@19 2998 # --------------
Chris@19 2999 # find a file program which can recognize a shared library
Chris@19 3000 m4_defun([_LT_PATH_MAGIC],
Chris@19 3001 [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@19 3002 if test -z "$lt_cv_path_MAGIC_CMD"; then
Chris@19 3003 if test -n "$ac_tool_prefix"; then
Chris@19 3004 _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
Chris@19 3005 else
Chris@19 3006 MAGIC_CMD=:
Chris@19 3007 fi
Chris@19 3008 fi
Chris@19 3009 ])# _LT_PATH_MAGIC
Chris@19 3010
Chris@19 3011
Chris@19 3012 # LT_PATH_LD
Chris@19 3013 # ----------
Chris@19 3014 # find the pathname to the GNU or non-GNU linker
Chris@19 3015 AC_DEFUN([LT_PATH_LD],
Chris@19 3016 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@19 3017 AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@19 3018 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@19 3019 m4_require([_LT_DECL_SED])dnl
Chris@19 3020 m4_require([_LT_DECL_EGREP])dnl
Chris@19 3021 m4_require([_LT_PROG_ECHO_BACKSLASH])dnl
Chris@19 3022
Chris@19 3023 AC_ARG_WITH([gnu-ld],
Chris@19 3024 [AS_HELP_STRING([--with-gnu-ld],
Chris@19 3025 [assume the C compiler uses GNU ld @<:@default=no@:>@])],
Chris@19 3026 [test "$withval" = no || with_gnu_ld=yes],
Chris@19 3027 [with_gnu_ld=no])dnl
Chris@19 3028
Chris@19 3029 ac_prog=ld
Chris@19 3030 if test "$GCC" = yes; then
Chris@19 3031 # Check if gcc -print-prog-name=ld gives a path.
Chris@19 3032 AC_MSG_CHECKING([for ld used by $CC])
Chris@19 3033 case $host in
Chris@19 3034 *-*-mingw*)
Chris@19 3035 # gcc leaves a trailing carriage return which upsets mingw
Chris@19 3036 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
Chris@19 3037 *)
Chris@19 3038 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
Chris@19 3039 esac
Chris@19 3040 case $ac_prog in
Chris@19 3041 # Accept absolute paths.
Chris@19 3042 [[\\/]]* | ?:[[\\/]]*)
Chris@19 3043 re_direlt='/[[^/]][[^/]]*/\.\./'
Chris@19 3044 # Canonicalize the pathname of ld
Chris@19 3045 ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
Chris@19 3046 while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
Chris@19 3047 ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
Chris@19 3048 done
Chris@19 3049 test -z "$LD" && LD="$ac_prog"
Chris@19 3050 ;;
Chris@19 3051 "")
Chris@19 3052 # If it fails, then pretend we aren't using GCC.
Chris@19 3053 ac_prog=ld
Chris@19 3054 ;;
Chris@19 3055 *)
Chris@19 3056 # If it is relative, then search for the first ld in PATH.
Chris@19 3057 with_gnu_ld=unknown
Chris@19 3058 ;;
Chris@19 3059 esac
Chris@19 3060 elif test "$with_gnu_ld" = yes; then
Chris@19 3061 AC_MSG_CHECKING([for GNU ld])
Chris@19 3062 else
Chris@19 3063 AC_MSG_CHECKING([for non-GNU ld])
Chris@19 3064 fi
Chris@19 3065 AC_CACHE_VAL(lt_cv_path_LD,
Chris@19 3066 [if test -z "$LD"; then
Chris@19 3067 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
Chris@19 3068 for ac_dir in $PATH; do
Chris@19 3069 IFS="$lt_save_ifs"
Chris@19 3070 test -z "$ac_dir" && ac_dir=.
Chris@19 3071 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
Chris@19 3072 lt_cv_path_LD="$ac_dir/$ac_prog"
Chris@19 3073 # Check to see if the program is GNU ld. I'd rather use --version,
Chris@19 3074 # but apparently some variants of GNU ld only accept -v.
Chris@19 3075 # Break only if it was the GNU/non-GNU ld that we prefer.
Chris@19 3076 case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
Chris@19 3077 *GNU* | *'with BFD'*)
Chris@19 3078 test "$with_gnu_ld" != no && break
Chris@19 3079 ;;
Chris@19 3080 *)
Chris@19 3081 test "$with_gnu_ld" != yes && break
Chris@19 3082 ;;
Chris@19 3083 esac
Chris@19 3084 fi
Chris@19 3085 done
Chris@19 3086 IFS="$lt_save_ifs"
Chris@19 3087 else
Chris@19 3088 lt_cv_path_LD="$LD" # Let the user override the test with a path.
Chris@19 3089 fi])
Chris@19 3090 LD="$lt_cv_path_LD"
Chris@19 3091 if test -n "$LD"; then
Chris@19 3092 AC_MSG_RESULT($LD)
Chris@19 3093 else
Chris@19 3094 AC_MSG_RESULT(no)
Chris@19 3095 fi
Chris@19 3096 test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
Chris@19 3097 _LT_PATH_LD_GNU
Chris@19 3098 AC_SUBST([LD])
Chris@19 3099
Chris@19 3100 _LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
Chris@19 3101 ])# LT_PATH_LD
Chris@19 3102
Chris@19 3103 # Old names:
Chris@19 3104 AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
Chris@19 3105 AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
Chris@19 3106 dnl aclocal-1.4 backwards compatibility:
Chris@19 3107 dnl AC_DEFUN([AM_PROG_LD], [])
Chris@19 3108 dnl AC_DEFUN([AC_PROG_LD], [])
Chris@19 3109
Chris@19 3110
Chris@19 3111 # _LT_PATH_LD_GNU
Chris@19 3112 #- --------------
Chris@19 3113 m4_defun([_LT_PATH_LD_GNU],
Chris@19 3114 [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
Chris@19 3115 [# I'd rather use --version here, but apparently some GNU lds only accept -v.
Chris@19 3116 case `$LD -v 2>&1 </dev/null` in
Chris@19 3117 *GNU* | *'with BFD'*)
Chris@19 3118 lt_cv_prog_gnu_ld=yes
Chris@19 3119 ;;
Chris@19 3120 *)
Chris@19 3121 lt_cv_prog_gnu_ld=no
Chris@19 3122 ;;
Chris@19 3123 esac])
Chris@19 3124 with_gnu_ld=$lt_cv_prog_gnu_ld
Chris@19 3125 ])# _LT_PATH_LD_GNU
Chris@19 3126
Chris@19 3127
Chris@19 3128 # _LT_CMD_RELOAD
Chris@19 3129 # --------------
Chris@19 3130 # find reload flag for linker
Chris@19 3131 # -- PORTME Some linkers may need a different reload flag.
Chris@19 3132 m4_defun([_LT_CMD_RELOAD],
Chris@19 3133 [AC_CACHE_CHECK([for $LD option to reload object files],
Chris@19 3134 lt_cv_ld_reload_flag,
Chris@19 3135 [lt_cv_ld_reload_flag='-r'])
Chris@19 3136 reload_flag=$lt_cv_ld_reload_flag
Chris@19 3137 case $reload_flag in
Chris@19 3138 "" | " "*) ;;
Chris@19 3139 *) reload_flag=" $reload_flag" ;;
Chris@19 3140 esac
Chris@19 3141 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@19 3142 case $host_os in
Chris@19 3143 cygwin* | mingw* | pw32* | cegcc*)
Chris@19 3144 if test "$GCC" != yes; then
Chris@19 3145 reload_cmds=false
Chris@19 3146 fi
Chris@19 3147 ;;
Chris@19 3148 darwin*)
Chris@19 3149 if test "$GCC" = yes; then
Chris@19 3150 reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
Chris@19 3151 else
Chris@19 3152 reload_cmds='$LD$reload_flag -o $output$reload_objs'
Chris@19 3153 fi
Chris@19 3154 ;;
Chris@19 3155 esac
Chris@19 3156 _LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
Chris@19 3157 _LT_TAGDECL([], [reload_cmds], [2])dnl
Chris@19 3158 ])# _LT_CMD_RELOAD
Chris@19 3159
Chris@19 3160
Chris@19 3161 # _LT_CHECK_MAGIC_METHOD
Chris@19 3162 # ----------------------
Chris@19 3163 # how to check for library dependencies
Chris@19 3164 # -- PORTME fill in with the dynamic library characteristics
Chris@19 3165 m4_defun([_LT_CHECK_MAGIC_METHOD],
Chris@19 3166 [m4_require([_LT_DECL_EGREP])
Chris@19 3167 m4_require([_LT_DECL_OBJDUMP])
Chris@19 3168 AC_CACHE_CHECK([how to recognize dependent libraries],
Chris@19 3169 lt_cv_deplibs_check_method,
Chris@19 3170 [lt_cv_file_magic_cmd='$MAGIC_CMD'
Chris@19 3171 lt_cv_file_magic_test_file=
Chris@19 3172 lt_cv_deplibs_check_method='unknown'
Chris@19 3173 # Need to set the preceding variable on all platforms that support
Chris@19 3174 # interlibrary dependencies.
Chris@19 3175 # 'none' -- dependencies not supported.
Chris@19 3176 # `unknown' -- same as none, but documents that we really don't know.
Chris@19 3177 # 'pass_all' -- all dependencies passed with no checks.
Chris@19 3178 # 'test_compile' -- check by making test program.
Chris@19 3179 # 'file_magic [[regex]]' -- check by looking for files in library path
Chris@19 3180 # which responds to the $file_magic_cmd with a given extended regex.
Chris@19 3181 # If you have `file' or equivalent on your system and you're not sure
Chris@19 3182 # whether `pass_all' will *always* work, you probably want this one.
Chris@19 3183
Chris@19 3184 case $host_os in
Chris@19 3185 aix[[4-9]]*)
Chris@19 3186 lt_cv_deplibs_check_method=pass_all
Chris@19 3187 ;;
Chris@19 3188
Chris@19 3189 beos*)
Chris@19 3190 lt_cv_deplibs_check_method=pass_all
Chris@19 3191 ;;
Chris@19 3192
Chris@19 3193 bsdi[[45]]*)
Chris@19 3194 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
Chris@19 3195 lt_cv_file_magic_cmd='/usr/bin/file -L'
Chris@19 3196 lt_cv_file_magic_test_file=/shlib/libc.so
Chris@19 3197 ;;
Chris@19 3198
Chris@19 3199 cygwin*)
Chris@19 3200 # func_win32_libid is a shell function defined in ltmain.sh
Chris@19 3201 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@19 3202 lt_cv_file_magic_cmd='func_win32_libid'
Chris@19 3203 ;;
Chris@19 3204
Chris@19 3205 mingw* | pw32*)
Chris@19 3206 # Base MSYS/MinGW do not provide the 'file' command needed by
Chris@19 3207 # func_win32_libid shell function, so use a weaker test based on 'objdump',
Chris@19 3208 # unless we find 'file', for example because we are cross-compiling.
Chris@19 3209 # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
Chris@19 3210 if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
Chris@19 3211 lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
Chris@19 3212 lt_cv_file_magic_cmd='func_win32_libid'
Chris@19 3213 else
Chris@19 3214 # Keep this pattern in sync with the one in func_win32_libid.
Chris@19 3215 lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
Chris@19 3216 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@19 3217 fi
Chris@19 3218 ;;
Chris@19 3219
Chris@19 3220 cegcc*)
Chris@19 3221 # use the weaker test based on 'objdump'. See mingw*.
Chris@19 3222 lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
Chris@19 3223 lt_cv_file_magic_cmd='$OBJDUMP -f'
Chris@19 3224 ;;
Chris@19 3225
Chris@19 3226 darwin* | rhapsody*)
Chris@19 3227 lt_cv_deplibs_check_method=pass_all
Chris@19 3228 ;;
Chris@19 3229
Chris@19 3230 freebsd* | dragonfly*)
Chris@19 3231 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@19 3232 case $host_cpu in
Chris@19 3233 i*86 )
Chris@19 3234 # Not sure whether the presence of OpenBSD here was a mistake.
Chris@19 3235 # Let's accept both of them until this is cleared up.
Chris@19 3236 lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
Chris@19 3237 lt_cv_file_magic_cmd=/usr/bin/file
Chris@19 3238 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
Chris@19 3239 ;;
Chris@19 3240 esac
Chris@19 3241 else
Chris@19 3242 lt_cv_deplibs_check_method=pass_all
Chris@19 3243 fi
Chris@19 3244 ;;
Chris@19 3245
Chris@19 3246 gnu*)
Chris@19 3247 lt_cv_deplibs_check_method=pass_all
Chris@19 3248 ;;
Chris@19 3249
Chris@19 3250 haiku*)
Chris@19 3251 lt_cv_deplibs_check_method=pass_all
Chris@19 3252 ;;
Chris@19 3253
Chris@19 3254 hpux10.20* | hpux11*)
Chris@19 3255 lt_cv_file_magic_cmd=/usr/bin/file
Chris@19 3256 case $host_cpu in
Chris@19 3257 ia64*)
Chris@19 3258 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
Chris@19 3259 lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
Chris@19 3260 ;;
Chris@19 3261 hppa*64*)
Chris@19 3262 [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
Chris@19 3263 lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
Chris@19 3264 ;;
Chris@19 3265 *)
Chris@19 3266 lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
Chris@19 3267 lt_cv_file_magic_test_file=/usr/lib/libc.sl
Chris@19 3268 ;;
Chris@19 3269 esac
Chris@19 3270 ;;
Chris@19 3271
Chris@19 3272 interix[[3-9]]*)
Chris@19 3273 # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
Chris@19 3274 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
Chris@19 3275 ;;
Chris@19 3276
Chris@19 3277 irix5* | irix6* | nonstopux*)
Chris@19 3278 case $LD in
Chris@19 3279 *-32|*"-32 ") libmagic=32-bit;;
Chris@19 3280 *-n32|*"-n32 ") libmagic=N32;;
Chris@19 3281 *-64|*"-64 ") libmagic=64-bit;;
Chris@19 3282 *) libmagic=never-match;;
Chris@19 3283 esac
Chris@19 3284 lt_cv_deplibs_check_method=pass_all
Chris@19 3285 ;;
Chris@19 3286
Chris@19 3287 # This must be glibc/ELF.
Chris@19 3288 linux* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@19 3289 lt_cv_deplibs_check_method=pass_all
Chris@19 3290 ;;
Chris@19 3291
Chris@19 3292 netbsd*)
Chris@19 3293 if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
Chris@19 3294 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@19 3295 else
Chris@19 3296 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
Chris@19 3297 fi
Chris@19 3298 ;;
Chris@19 3299
Chris@19 3300 newos6*)
Chris@19 3301 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
Chris@19 3302 lt_cv_file_magic_cmd=/usr/bin/file
Chris@19 3303 lt_cv_file_magic_test_file=/usr/lib/libnls.so
Chris@19 3304 ;;
Chris@19 3305
Chris@19 3306 *nto* | *qnx*)
Chris@19 3307 lt_cv_deplibs_check_method=pass_all
Chris@19 3308 ;;
Chris@19 3309
Chris@19 3310 openbsd*)
Chris@19 3311 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@19 3312 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
Chris@19 3313 else
Chris@19 3314 lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
Chris@19 3315 fi
Chris@19 3316 ;;
Chris@19 3317
Chris@19 3318 osf3* | osf4* | osf5*)
Chris@19 3319 lt_cv_deplibs_check_method=pass_all
Chris@19 3320 ;;
Chris@19 3321
Chris@19 3322 rdos*)
Chris@19 3323 lt_cv_deplibs_check_method=pass_all
Chris@19 3324 ;;
Chris@19 3325
Chris@19 3326 solaris*)
Chris@19 3327 lt_cv_deplibs_check_method=pass_all
Chris@19 3328 ;;
Chris@19 3329
Chris@19 3330 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
Chris@19 3331 lt_cv_deplibs_check_method=pass_all
Chris@19 3332 ;;
Chris@19 3333
Chris@19 3334 sysv4 | sysv4.3*)
Chris@19 3335 case $host_vendor in
Chris@19 3336 motorola)
Chris@19 3337 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]]'
Chris@19 3338 lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
Chris@19 3339 ;;
Chris@19 3340 ncr)
Chris@19 3341 lt_cv_deplibs_check_method=pass_all
Chris@19 3342 ;;
Chris@19 3343 sequent)
Chris@19 3344 lt_cv_file_magic_cmd='/bin/file'
Chris@19 3345 lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
Chris@19 3346 ;;
Chris@19 3347 sni)
Chris@19 3348 lt_cv_file_magic_cmd='/bin/file'
Chris@19 3349 lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
Chris@19 3350 lt_cv_file_magic_test_file=/lib/libc.so
Chris@19 3351 ;;
Chris@19 3352 siemens)
Chris@19 3353 lt_cv_deplibs_check_method=pass_all
Chris@19 3354 ;;
Chris@19 3355 pc)
Chris@19 3356 lt_cv_deplibs_check_method=pass_all
Chris@19 3357 ;;
Chris@19 3358 esac
Chris@19 3359 ;;
Chris@19 3360
Chris@19 3361 tpf*)
Chris@19 3362 lt_cv_deplibs_check_method=pass_all
Chris@19 3363 ;;
Chris@19 3364 esac
Chris@19 3365 ])
Chris@19 3366
Chris@19 3367 file_magic_glob=
Chris@19 3368 want_nocaseglob=no
Chris@19 3369 if test "$build" = "$host"; then
Chris@19 3370 case $host_os in
Chris@19 3371 mingw* | pw32*)
Chris@19 3372 if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
Chris@19 3373 want_nocaseglob=yes
Chris@19 3374 else
Chris@19 3375 file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
Chris@19 3376 fi
Chris@19 3377 ;;
Chris@19 3378 esac
Chris@19 3379 fi
Chris@19 3380
Chris@19 3381 file_magic_cmd=$lt_cv_file_magic_cmd
Chris@19 3382 deplibs_check_method=$lt_cv_deplibs_check_method
Chris@19 3383 test -z "$deplibs_check_method" && deplibs_check_method=unknown
Chris@19 3384
Chris@19 3385 _LT_DECL([], [deplibs_check_method], [1],
Chris@19 3386 [Method to check whether dependent libraries are shared objects])
Chris@19 3387 _LT_DECL([], [file_magic_cmd], [1],
Chris@19 3388 [Command to use when deplibs_check_method = "file_magic"])
Chris@19 3389 _LT_DECL([], [file_magic_glob], [1],
Chris@19 3390 [How to find potential files when deplibs_check_method = "file_magic"])
Chris@19 3391 _LT_DECL([], [want_nocaseglob], [1],
Chris@19 3392 [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
Chris@19 3393 ])# _LT_CHECK_MAGIC_METHOD
Chris@19 3394
Chris@19 3395
Chris@19 3396 # LT_PATH_NM
Chris@19 3397 # ----------
Chris@19 3398 # find the pathname to a BSD- or MS-compatible name lister
Chris@19 3399 AC_DEFUN([LT_PATH_NM],
Chris@19 3400 [AC_REQUIRE([AC_PROG_CC])dnl
Chris@19 3401 AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
Chris@19 3402 [if test -n "$NM"; then
Chris@19 3403 # Let the user override the test.
Chris@19 3404 lt_cv_path_NM="$NM"
Chris@19 3405 else
Chris@19 3406 lt_nm_to_check="${ac_tool_prefix}nm"
Chris@19 3407 if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
Chris@19 3408 lt_nm_to_check="$lt_nm_to_check nm"
Chris@19 3409 fi
Chris@19 3410 for lt_tmp_nm in $lt_nm_to_check; do
Chris@19 3411 lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
Chris@19 3412 for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
Chris@19 3413 IFS="$lt_save_ifs"
Chris@19 3414 test -z "$ac_dir" && ac_dir=.
Chris@19 3415 tmp_nm="$ac_dir/$lt_tmp_nm"
Chris@19 3416 if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
Chris@19 3417 # Check to see if the nm accepts a BSD-compat flag.
Chris@19 3418 # Adding the `sed 1q' prevents false positives on HP-UX, which says:
Chris@19 3419 # nm: unknown option "B" ignored
Chris@19 3420 # Tru64's nm complains that /dev/null is an invalid object file
Chris@19 3421 case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
Chris@19 3422 */dev/null* | *'Invalid file or object type'*)
Chris@19 3423 lt_cv_path_NM="$tmp_nm -B"
Chris@19 3424 break
Chris@19 3425 ;;
Chris@19 3426 *)
Chris@19 3427 case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
Chris@19 3428 */dev/null*)
Chris@19 3429 lt_cv_path_NM="$tmp_nm -p"
Chris@19 3430 break
Chris@19 3431 ;;
Chris@19 3432 *)
Chris@19 3433 lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
Chris@19 3434 continue # so that we can try to find one that supports BSD flags
Chris@19 3435 ;;
Chris@19 3436 esac
Chris@19 3437 ;;
Chris@19 3438 esac
Chris@19 3439 fi
Chris@19 3440 done
Chris@19 3441 IFS="$lt_save_ifs"
Chris@19 3442 done
Chris@19 3443 : ${lt_cv_path_NM=no}
Chris@19 3444 fi])
Chris@19 3445 if test "$lt_cv_path_NM" != "no"; then
Chris@19 3446 NM="$lt_cv_path_NM"
Chris@19 3447 else
Chris@19 3448 # Didn't find any BSD compatible name lister, look for dumpbin.
Chris@19 3449 if test -n "$DUMPBIN"; then :
Chris@19 3450 # Let the user override the test.
Chris@19 3451 else
Chris@19 3452 AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
Chris@19 3453 case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
Chris@19 3454 *COFF*)
Chris@19 3455 DUMPBIN="$DUMPBIN -symbols"
Chris@19 3456 ;;
Chris@19 3457 *)
Chris@19 3458 DUMPBIN=:
Chris@19 3459 ;;
Chris@19 3460 esac
Chris@19 3461 fi
Chris@19 3462 AC_SUBST([DUMPBIN])
Chris@19 3463 if test "$DUMPBIN" != ":"; then
Chris@19 3464 NM="$DUMPBIN"
Chris@19 3465 fi
Chris@19 3466 fi
Chris@19 3467 test -z "$NM" && NM=nm
Chris@19 3468 AC_SUBST([NM])
Chris@19 3469 _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
Chris@19 3470
Chris@19 3471 AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
Chris@19 3472 [lt_cv_nm_interface="BSD nm"
Chris@19 3473 echo "int some_variable = 0;" > conftest.$ac_ext
Chris@19 3474 (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
Chris@19 3475 (eval "$ac_compile" 2>conftest.err)
Chris@19 3476 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@19 3477 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
Chris@19 3478 (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
Chris@19 3479 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@19 3480 (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
Chris@19 3481 cat conftest.out >&AS_MESSAGE_LOG_FD
Chris@19 3482 if $GREP 'External.*some_variable' conftest.out > /dev/null; then
Chris@19 3483 lt_cv_nm_interface="MS dumpbin"
Chris@19 3484 fi
Chris@19 3485 rm -f conftest*])
Chris@19 3486 ])# LT_PATH_NM
Chris@19 3487
Chris@19 3488 # Old names:
Chris@19 3489 AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
Chris@19 3490 AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
Chris@19 3491 dnl aclocal-1.4 backwards compatibility:
Chris@19 3492 dnl AC_DEFUN([AM_PROG_NM], [])
Chris@19 3493 dnl AC_DEFUN([AC_PROG_NM], [])
Chris@19 3494
Chris@19 3495 # _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@19 3496 # --------------------------------
Chris@19 3497 # how to determine the name of the shared library
Chris@19 3498 # associated with a specific link library.
Chris@19 3499 # -- PORTME fill in with the dynamic library characteristics
Chris@19 3500 m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
Chris@19 3501 [m4_require([_LT_DECL_EGREP])
Chris@19 3502 m4_require([_LT_DECL_OBJDUMP])
Chris@19 3503 m4_require([_LT_DECL_DLLTOOL])
Chris@19 3504 AC_CACHE_CHECK([how to associate runtime and link libraries],
Chris@19 3505 lt_cv_sharedlib_from_linklib_cmd,
Chris@19 3506 [lt_cv_sharedlib_from_linklib_cmd='unknown'
Chris@19 3507
Chris@19 3508 case $host_os in
Chris@19 3509 cygwin* | mingw* | pw32* | cegcc*)
Chris@19 3510 # two different shell functions defined in ltmain.sh
Chris@19 3511 # decide which to use based on capabilities of $DLLTOOL
Chris@19 3512 case `$DLLTOOL --help 2>&1` in
Chris@19 3513 *--identify-strict*)
Chris@19 3514 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
Chris@19 3515 ;;
Chris@19 3516 *)
Chris@19 3517 lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
Chris@19 3518 ;;
Chris@19 3519 esac
Chris@19 3520 ;;
Chris@19 3521 *)
Chris@19 3522 # fallback: assume linklib IS sharedlib
Chris@19 3523 lt_cv_sharedlib_from_linklib_cmd="$ECHO"
Chris@19 3524 ;;
Chris@19 3525 esac
Chris@19 3526 ])
Chris@19 3527 sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
Chris@19 3528 test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
Chris@19 3529
Chris@19 3530 _LT_DECL([], [sharedlib_from_linklib_cmd], [1],
Chris@19 3531 [Command to associate shared and link libraries])
Chris@19 3532 ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
Chris@19 3533
Chris@19 3534
Chris@19 3535 # _LT_PATH_MANIFEST_TOOL
Chris@19 3536 # ----------------------
Chris@19 3537 # locate the manifest tool
Chris@19 3538 m4_defun([_LT_PATH_MANIFEST_TOOL],
Chris@19 3539 [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
Chris@19 3540 test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
Chris@19 3541 AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
Chris@19 3542 [lt_cv_path_mainfest_tool=no
Chris@19 3543 echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
Chris@19 3544 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
Chris@19 3545 cat conftest.err >&AS_MESSAGE_LOG_FD
Chris@19 3546 if $GREP 'Manifest Tool' conftest.out > /dev/null; then
Chris@19 3547 lt_cv_path_mainfest_tool=yes
Chris@19 3548 fi
Chris@19 3549 rm -f conftest*])
Chris@19 3550 if test "x$lt_cv_path_mainfest_tool" != xyes; then
Chris@19 3551 MANIFEST_TOOL=:
Chris@19 3552 fi
Chris@19 3553 _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
Chris@19 3554 ])# _LT_PATH_MANIFEST_TOOL
Chris@19 3555
Chris@19 3556
Chris@19 3557 # LT_LIB_M
Chris@19 3558 # --------
Chris@19 3559 # check for math library
Chris@19 3560 AC_DEFUN([LT_LIB_M],
Chris@19 3561 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@19 3562 LIBM=
Chris@19 3563 case $host in
Chris@19 3564 *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
Chris@19 3565 # These system don't have libm, or don't need it
Chris@19 3566 ;;
Chris@19 3567 *-ncr-sysv4.3*)
Chris@19 3568 AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
Chris@19 3569 AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
Chris@19 3570 ;;
Chris@19 3571 *)
Chris@19 3572 AC_CHECK_LIB(m, cos, LIBM="-lm")
Chris@19 3573 ;;
Chris@19 3574 esac
Chris@19 3575 AC_SUBST([LIBM])
Chris@19 3576 ])# LT_LIB_M
Chris@19 3577
Chris@19 3578 # Old name:
Chris@19 3579 AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
Chris@19 3580 dnl aclocal-1.4 backwards compatibility:
Chris@19 3581 dnl AC_DEFUN([AC_CHECK_LIBM], [])
Chris@19 3582
Chris@19 3583
Chris@19 3584 # _LT_COMPILER_NO_RTTI([TAGNAME])
Chris@19 3585 # -------------------------------
Chris@19 3586 m4_defun([_LT_COMPILER_NO_RTTI],
Chris@19 3587 [m4_require([_LT_TAG_COMPILER])dnl
Chris@19 3588
Chris@19 3589 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@19 3590
Chris@19 3591 if test "$GCC" = yes; then
Chris@19 3592 case $cc_basename in
Chris@19 3593 nvcc*)
Chris@19 3594 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
Chris@19 3595 *)
Chris@19 3596 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
Chris@19 3597 esac
Chris@19 3598
Chris@19 3599 _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
Chris@19 3600 lt_cv_prog_compiler_rtti_exceptions,
Chris@19 3601 [-fno-rtti -fno-exceptions], [],
Chris@19 3602 [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
Chris@19 3603 fi
Chris@19 3604 _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
Chris@19 3605 [Compiler flag to turn off builtin functions])
Chris@19 3606 ])# _LT_COMPILER_NO_RTTI
Chris@19 3607
Chris@19 3608
Chris@19 3609 # _LT_CMD_GLOBAL_SYMBOLS
Chris@19 3610 # ----------------------
Chris@19 3611 m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
Chris@19 3612 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@19 3613 AC_REQUIRE([AC_PROG_CC])dnl
Chris@19 3614 AC_REQUIRE([AC_PROG_AWK])dnl
Chris@19 3615 AC_REQUIRE([LT_PATH_NM])dnl
Chris@19 3616 AC_REQUIRE([LT_PATH_LD])dnl
Chris@19 3617 m4_require([_LT_DECL_SED])dnl
Chris@19 3618 m4_require([_LT_DECL_EGREP])dnl
Chris@19 3619 m4_require([_LT_TAG_COMPILER])dnl
Chris@19 3620
Chris@19 3621 # Check for command to grab the raw symbol name followed by C symbol from nm.
Chris@19 3622 AC_MSG_CHECKING([command to parse $NM output from $compiler object])
Chris@19 3623 AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
Chris@19 3624 [
Chris@19 3625 # These are sane defaults that work on at least a few old systems.
Chris@19 3626 # [They come from Ultrix. What could be older than Ultrix?!! ;)]
Chris@19 3627
Chris@19 3628 # Character class describing NM global symbol codes.
Chris@19 3629 symcode='[[BCDEGRST]]'
Chris@19 3630
Chris@19 3631 # Regexp to match symbols that can be accessed directly from C.
Chris@19 3632 sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
Chris@19 3633
Chris@19 3634 # Define system-specific variables.
Chris@19 3635 case $host_os in
Chris@19 3636 aix*)
Chris@19 3637 symcode='[[BCDT]]'
Chris@19 3638 ;;
Chris@19 3639 cygwin* | mingw* | pw32* | cegcc*)
Chris@19 3640 symcode='[[ABCDGISTW]]'
Chris@19 3641 ;;
Chris@19 3642 hpux*)
Chris@19 3643 if test "$host_cpu" = ia64; then
Chris@19 3644 symcode='[[ABCDEGRST]]'
Chris@19 3645 fi
Chris@19 3646 ;;
Chris@19 3647 irix* | nonstopux*)
Chris@19 3648 symcode='[[BCDEGRST]]'
Chris@19 3649 ;;
Chris@19 3650 osf*)
Chris@19 3651 symcode='[[BCDEGQRST]]'
Chris@19 3652 ;;
Chris@19 3653 solaris*)
Chris@19 3654 symcode='[[BDRT]]'
Chris@19 3655 ;;
Chris@19 3656 sco3.2v5*)
Chris@19 3657 symcode='[[DT]]'
Chris@19 3658 ;;
Chris@19 3659 sysv4.2uw2*)
Chris@19 3660 symcode='[[DT]]'
Chris@19 3661 ;;
Chris@19 3662 sysv5* | sco5v6* | unixware* | OpenUNIX*)
Chris@19 3663 symcode='[[ABDT]]'
Chris@19 3664 ;;
Chris@19 3665 sysv4)
Chris@19 3666 symcode='[[DFNSTU]]'
Chris@19 3667 ;;
Chris@19 3668 esac
Chris@19 3669
Chris@19 3670 # If we're using GNU nm, then use its standard symbol codes.
Chris@19 3671 case `$NM -V 2>&1` in
Chris@19 3672 *GNU* | *'with BFD'*)
Chris@19 3673 symcode='[[ABCDGIRSTW]]' ;;
Chris@19 3674 esac
Chris@19 3675
Chris@19 3676 # Transform an extracted symbol line into a proper C declaration.
Chris@19 3677 # Some systems (esp. on ia64) link data and code symbols differently,
Chris@19 3678 # so use this general approach.
Chris@19 3679 lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
Chris@19 3680
Chris@19 3681 # Transform an extracted symbol line into symbol name and symbol address
Chris@19 3682 lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
Chris@19 3683 lt_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'"
Chris@19 3684
Chris@19 3685 # Handle CRLF in mingw tool chain
Chris@19 3686 opt_cr=
Chris@19 3687 case $build_os in
Chris@19 3688 mingw*)
Chris@19 3689 opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
Chris@19 3690 ;;
Chris@19 3691 esac
Chris@19 3692
Chris@19 3693 # Try without a prefix underscore, then with it.
Chris@19 3694 for ac_symprfx in "" "_"; do
Chris@19 3695
Chris@19 3696 # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
Chris@19 3697 symxfrm="\\1 $ac_symprfx\\2 \\2"
Chris@19 3698
Chris@19 3699 # Write the raw and C identifiers.
Chris@19 3700 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@19 3701 # Fake it for dumpbin and say T for any non-static function
Chris@19 3702 # and D for any global variable.
Chris@19 3703 # Also find C++ and __fastcall symbols from MSVC++,
Chris@19 3704 # which start with @ or ?.
Chris@19 3705 lt_cv_sys_global_symbol_pipe="$AWK ['"\
Chris@19 3706 " {last_section=section; section=\$ 3};"\
Chris@19 3707 " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
Chris@19 3708 " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
Chris@19 3709 " \$ 0!~/External *\|/{next};"\
Chris@19 3710 " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
Chris@19 3711 " {if(hide[section]) next};"\
Chris@19 3712 " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
Chris@19 3713 " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
Chris@19 3714 " s[1]~/^[@?]/{print s[1], s[1]; next};"\
Chris@19 3715 " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
Chris@19 3716 " ' prfx=^$ac_symprfx]"
Chris@19 3717 else
Chris@19 3718 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
Chris@19 3719 fi
Chris@19 3720 lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
Chris@19 3721
Chris@19 3722 # Check to see that the pipe works correctly.
Chris@19 3723 pipe_works=no
Chris@19 3724
Chris@19 3725 rm -f conftest*
Chris@19 3726 cat > conftest.$ac_ext <<_LT_EOF
Chris@19 3727 #ifdef __cplusplus
Chris@19 3728 extern "C" {
Chris@19 3729 #endif
Chris@19 3730 char nm_test_var;
Chris@19 3731 void nm_test_func(void);
Chris@19 3732 void nm_test_func(void){}
Chris@19 3733 #ifdef __cplusplus
Chris@19 3734 }
Chris@19 3735 #endif
Chris@19 3736 int main(){nm_test_var='a';nm_test_func();return(0);}
Chris@19 3737 _LT_EOF
Chris@19 3738
Chris@19 3739 if AC_TRY_EVAL(ac_compile); then
Chris@19 3740 # Now try to grab the symbols.
Chris@19 3741 nlist=conftest.nm
Chris@19 3742 if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
Chris@19 3743 # Try sorting and uniquifying the output.
Chris@19 3744 if sort "$nlist" | uniq > "$nlist"T; then
Chris@19 3745 mv -f "$nlist"T "$nlist"
Chris@19 3746 else
Chris@19 3747 rm -f "$nlist"T
Chris@19 3748 fi
Chris@19 3749
Chris@19 3750 # Make sure that we snagged all the symbols we need.
Chris@19 3751 if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
Chris@19 3752 if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
Chris@19 3753 cat <<_LT_EOF > conftest.$ac_ext
Chris@19 3754 /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */
Chris@19 3755 #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
Chris@19 3756 /* DATA imports from DLLs on WIN32 con't be const, because runtime
Chris@19 3757 relocations are performed -- see ld's documentation on pseudo-relocs. */
Chris@19 3758 # define LT@&t@_DLSYM_CONST
Chris@19 3759 #elif defined(__osf__)
Chris@19 3760 /* This system does not cope well with relocations in const data. */
Chris@19 3761 # define LT@&t@_DLSYM_CONST
Chris@19 3762 #else
Chris@19 3763 # define LT@&t@_DLSYM_CONST const
Chris@19 3764 #endif
Chris@19 3765
Chris@19 3766 #ifdef __cplusplus
Chris@19 3767 extern "C" {
Chris@19 3768 #endif
Chris@19 3769
Chris@19 3770 _LT_EOF
Chris@19 3771 # Now generate the symbol file.
Chris@19 3772 eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
Chris@19 3773
Chris@19 3774 cat <<_LT_EOF >> conftest.$ac_ext
Chris@19 3775
Chris@19 3776 /* The mapping between symbol names and symbols. */
Chris@19 3777 LT@&t@_DLSYM_CONST struct {
Chris@19 3778 const char *name;
Chris@19 3779 void *address;
Chris@19 3780 }
Chris@19 3781 lt__PROGRAM__LTX_preloaded_symbols[[]] =
Chris@19 3782 {
Chris@19 3783 { "@PROGRAM@", (void *) 0 },
Chris@19 3784 _LT_EOF
Chris@19 3785 $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
Chris@19 3786 cat <<\_LT_EOF >> conftest.$ac_ext
Chris@19 3787 {0, (void *) 0}
Chris@19 3788 };
Chris@19 3789
Chris@19 3790 /* This works around a problem in FreeBSD linker */
Chris@19 3791 #ifdef FREEBSD_WORKAROUND
Chris@19 3792 static const void *lt_preloaded_setup() {
Chris@19 3793 return lt__PROGRAM__LTX_preloaded_symbols;
Chris@19 3794 }
Chris@19 3795 #endif
Chris@19 3796
Chris@19 3797 #ifdef __cplusplus
Chris@19 3798 }
Chris@19 3799 #endif
Chris@19 3800 _LT_EOF
Chris@19 3801 # Now try linking the two files.
Chris@19 3802 mv conftest.$ac_objext conftstm.$ac_objext
Chris@19 3803 lt_globsym_save_LIBS=$LIBS
Chris@19 3804 lt_globsym_save_CFLAGS=$CFLAGS
Chris@19 3805 LIBS="conftstm.$ac_objext"
Chris@19 3806 CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
Chris@19 3807 if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
Chris@19 3808 pipe_works=yes
Chris@19 3809 fi
Chris@19 3810 LIBS=$lt_globsym_save_LIBS
Chris@19 3811 CFLAGS=$lt_globsym_save_CFLAGS
Chris@19 3812 else
Chris@19 3813 echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
Chris@19 3814 fi
Chris@19 3815 else
Chris@19 3816 echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
Chris@19 3817 fi
Chris@19 3818 else
Chris@19 3819 echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
Chris@19 3820 fi
Chris@19 3821 else
Chris@19 3822 echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
Chris@19 3823 cat conftest.$ac_ext >&5
Chris@19 3824 fi
Chris@19 3825 rm -rf conftest* conftst*
Chris@19 3826
Chris@19 3827 # Do not use the global_symbol_pipe unless it works.
Chris@19 3828 if test "$pipe_works" = yes; then
Chris@19 3829 break
Chris@19 3830 else
Chris@19 3831 lt_cv_sys_global_symbol_pipe=
Chris@19 3832 fi
Chris@19 3833 done
Chris@19 3834 ])
Chris@19 3835 if test -z "$lt_cv_sys_global_symbol_pipe"; then
Chris@19 3836 lt_cv_sys_global_symbol_to_cdecl=
Chris@19 3837 fi
Chris@19 3838 if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
Chris@19 3839 AC_MSG_RESULT(failed)
Chris@19 3840 else
Chris@19 3841 AC_MSG_RESULT(ok)
Chris@19 3842 fi
Chris@19 3843
Chris@19 3844 # Response file support.
Chris@19 3845 if test "$lt_cv_nm_interface" = "MS dumpbin"; then
Chris@19 3846 nm_file_list_spec='@'
Chris@19 3847 elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
Chris@19 3848 nm_file_list_spec='@'
Chris@19 3849 fi
Chris@19 3850
Chris@19 3851 _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
Chris@19 3852 [Take the output of nm and produce a listing of raw symbols and C names])
Chris@19 3853 _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
Chris@19 3854 [Transform the output of nm in a proper C declaration])
Chris@19 3855 _LT_DECL([global_symbol_to_c_name_address],
Chris@19 3856 [lt_cv_sys_global_symbol_to_c_name_address], [1],
Chris@19 3857 [Transform the output of nm in a C name address pair])
Chris@19 3858 _LT_DECL([global_symbol_to_c_name_address_lib_prefix],
Chris@19 3859 [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
Chris@19 3860 [Transform the output of nm in a C name address pair when lib prefix is needed])
Chris@19 3861 _LT_DECL([], [nm_file_list_spec], [1],
Chris@19 3862 [Specify filename containing input files for $NM])
Chris@19 3863 ]) # _LT_CMD_GLOBAL_SYMBOLS
Chris@19 3864
Chris@19 3865
Chris@19 3866 # _LT_COMPILER_PIC([TAGNAME])
Chris@19 3867 # ---------------------------
Chris@19 3868 m4_defun([_LT_COMPILER_PIC],
Chris@19 3869 [m4_require([_LT_TAG_COMPILER])dnl
Chris@19 3870 _LT_TAGVAR(lt_prog_compiler_wl, $1)=
Chris@19 3871 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@19 3872 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@19 3873
Chris@19 3874 m4_if([$1], [CXX], [
Chris@19 3875 # C++ specific cases for pic, static, wl, etc.
Chris@19 3876 if test "$GXX" = yes; then
Chris@19 3877 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 3878 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@19 3879
Chris@19 3880 case $host_os in
Chris@19 3881 aix*)
Chris@19 3882 # All AIX code is PIC.
Chris@19 3883 if test "$host_cpu" = ia64; then
Chris@19 3884 # AIX 5 now supports IA64 processor
Chris@19 3885 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 3886 fi
Chris@19 3887 ;;
Chris@19 3888
Chris@19 3889 amigaos*)
Chris@19 3890 case $host_cpu in
Chris@19 3891 powerpc)
Chris@19 3892 # see comment about AmigaOS4 .so support
Chris@19 3893 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@19 3894 ;;
Chris@19 3895 m68k)
Chris@19 3896 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@19 3897 # adding the `-m68020' flag to GCC prevents building anything better,
Chris@19 3898 # like `-m68040'.
Chris@19 3899 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@19 3900 ;;
Chris@19 3901 esac
Chris@19 3902 ;;
Chris@19 3903
Chris@19 3904 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@19 3905 # PIC is the default for these OSes.
Chris@19 3906 ;;
Chris@19 3907 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@19 3908 # This hack is so that the source file can tell whether it is being
Chris@19 3909 # built for inclusion in a dll (and should export symbols for example).
Chris@19 3910 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@19 3911 # (--disable-auto-import) libraries
Chris@19 3912 m4_if([$1], [GCJ], [],
Chris@19 3913 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@19 3914 ;;
Chris@19 3915 darwin* | rhapsody*)
Chris@19 3916 # PIC is the default on this platform
Chris@19 3917 # Common symbols not allowed in MH_DYLIB files
Chris@19 3918 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@19 3919 ;;
Chris@19 3920 *djgpp*)
Chris@19 3921 # DJGPP does not support shared libraries at all
Chris@19 3922 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@19 3923 ;;
Chris@19 3924 haiku*)
Chris@19 3925 # PIC is the default for Haiku.
Chris@19 3926 # The "-static" flag exists, but is broken.
Chris@19 3927 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@19 3928 ;;
Chris@19 3929 interix[[3-9]]*)
Chris@19 3930 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@19 3931 # Instead, we relocate shared libraries at runtime.
Chris@19 3932 ;;
Chris@19 3933 sysv4*MP*)
Chris@19 3934 if test -d /usr/nec; then
Chris@19 3935 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@19 3936 fi
Chris@19 3937 ;;
Chris@19 3938 hpux*)
Chris@19 3939 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@19 3940 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@19 3941 # sets the default TLS model and affects inlining.
Chris@19 3942 case $host_cpu in
Chris@19 3943 hppa*64*)
Chris@19 3944 ;;
Chris@19 3945 *)
Chris@19 3946 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@19 3947 ;;
Chris@19 3948 esac
Chris@19 3949 ;;
Chris@19 3950 *qnx* | *nto*)
Chris@19 3951 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@19 3952 # it will coredump.
Chris@19 3953 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@19 3954 ;;
Chris@19 3955 *)
Chris@19 3956 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@19 3957 ;;
Chris@19 3958 esac
Chris@19 3959 else
Chris@19 3960 case $host_os in
Chris@19 3961 aix[[4-9]]*)
Chris@19 3962 # All AIX code is PIC.
Chris@19 3963 if test "$host_cpu" = ia64; then
Chris@19 3964 # AIX 5 now supports IA64 processor
Chris@19 3965 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 3966 else
Chris@19 3967 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@19 3968 fi
Chris@19 3969 ;;
Chris@19 3970 chorus*)
Chris@19 3971 case $cc_basename in
Chris@19 3972 cxch68*)
Chris@19 3973 # Green Hills C++ Compiler
Chris@19 3974 # _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"
Chris@19 3975 ;;
Chris@19 3976 esac
Chris@19 3977 ;;
Chris@19 3978 mingw* | cygwin* | os2* | pw32* | cegcc*)
Chris@19 3979 # This hack is so that the source file can tell whether it is being
Chris@19 3980 # built for inclusion in a dll (and should export symbols for example).
Chris@19 3981 m4_if([$1], [GCJ], [],
Chris@19 3982 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@19 3983 ;;
Chris@19 3984 dgux*)
Chris@19 3985 case $cc_basename in
Chris@19 3986 ec++*)
Chris@19 3987 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 3988 ;;
Chris@19 3989 ghcx*)
Chris@19 3990 # Green Hills C++ Compiler
Chris@19 3991 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@19 3992 ;;
Chris@19 3993 *)
Chris@19 3994 ;;
Chris@19 3995 esac
Chris@19 3996 ;;
Chris@19 3997 freebsd* | dragonfly*)
Chris@19 3998 # FreeBSD uses GNU C++
Chris@19 3999 ;;
Chris@19 4000 hpux9* | hpux10* | hpux11*)
Chris@19 4001 case $cc_basename in
Chris@19 4002 CC*)
Chris@19 4003 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4004 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
Chris@19 4005 if test "$host_cpu" != ia64; then
Chris@19 4006 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@19 4007 fi
Chris@19 4008 ;;
Chris@19 4009 aCC*)
Chris@19 4010 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4011 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
Chris@19 4012 case $host_cpu in
Chris@19 4013 hppa*64*|ia64*)
Chris@19 4014 # +Z the default
Chris@19 4015 ;;
Chris@19 4016 *)
Chris@19 4017 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@19 4018 ;;
Chris@19 4019 esac
Chris@19 4020 ;;
Chris@19 4021 *)
Chris@19 4022 ;;
Chris@19 4023 esac
Chris@19 4024 ;;
Chris@19 4025 interix*)
Chris@19 4026 # This is c89, which is MS Visual C++ (no shared libs)
Chris@19 4027 # Anyone wants to do a port?
Chris@19 4028 ;;
Chris@19 4029 irix5* | irix6* | nonstopux*)
Chris@19 4030 case $cc_basename in
Chris@19 4031 CC*)
Chris@19 4032 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4033 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@19 4034 # CC pic flag -KPIC is the default.
Chris@19 4035 ;;
Chris@19 4036 *)
Chris@19 4037 ;;
Chris@19 4038 esac
Chris@19 4039 ;;
Chris@19 4040 linux* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@19 4041 case $cc_basename in
Chris@19 4042 KCC*)
Chris@19 4043 # KAI C++ Compiler
Chris@19 4044 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@19 4045 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@19 4046 ;;
Chris@19 4047 ecpc* )
Chris@19 4048 # old Intel C++ for x86_64 which still supported -KPIC.
Chris@19 4049 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4050 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4051 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@19 4052 ;;
Chris@19 4053 icpc* )
Chris@19 4054 # Intel C++, used to be incompatible with GCC.
Chris@19 4055 # ICC 10 doesn't accept -KPIC any more.
Chris@19 4056 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4057 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@19 4058 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@19 4059 ;;
Chris@19 4060 pgCC* | pgcpp*)
Chris@19 4061 # Portland Group C++ compiler
Chris@19 4062 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4063 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@19 4064 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4065 ;;
Chris@19 4066 cxx*)
Chris@19 4067 # Compaq C++
Chris@19 4068 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@19 4069 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@19 4070 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@19 4071 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@19 4072 ;;
Chris@19 4073 xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
Chris@19 4074 # IBM XL 8.0, 9.0 on PPC and BlueGene
Chris@19 4075 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4076 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@19 4077 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@19 4078 ;;
Chris@19 4079 *)
Chris@19 4080 case `$CC -V 2>&1 | sed 5q` in
Chris@19 4081 *Sun\ C*)
Chris@19 4082 # Sun C++ 5.9
Chris@19 4083 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4084 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4085 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@19 4086 ;;
Chris@19 4087 esac
Chris@19 4088 ;;
Chris@19 4089 esac
Chris@19 4090 ;;
Chris@19 4091 lynxos*)
Chris@19 4092 ;;
Chris@19 4093 m88k*)
Chris@19 4094 ;;
Chris@19 4095 mvs*)
Chris@19 4096 case $cc_basename in
Chris@19 4097 cxx*)
Chris@19 4098 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
Chris@19 4099 ;;
Chris@19 4100 *)
Chris@19 4101 ;;
Chris@19 4102 esac
Chris@19 4103 ;;
Chris@19 4104 netbsd*)
Chris@19 4105 ;;
Chris@19 4106 *qnx* | *nto*)
Chris@19 4107 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@19 4108 # it will coredump.
Chris@19 4109 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@19 4110 ;;
Chris@19 4111 osf3* | osf4* | osf5*)
Chris@19 4112 case $cc_basename in
Chris@19 4113 KCC*)
Chris@19 4114 _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
Chris@19 4115 ;;
Chris@19 4116 RCC*)
Chris@19 4117 # Rational C++ 2.4.1
Chris@19 4118 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@19 4119 ;;
Chris@19 4120 cxx*)
Chris@19 4121 # Digital/Compaq C++
Chris@19 4122 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4123 # Make sure the PIC flag is empty. It appears that all Alpha
Chris@19 4124 # Linux and Compaq Tru64 Unix objects are PIC.
Chris@19 4125 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@19 4126 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@19 4127 ;;
Chris@19 4128 *)
Chris@19 4129 ;;
Chris@19 4130 esac
Chris@19 4131 ;;
Chris@19 4132 psos*)
Chris@19 4133 ;;
Chris@19 4134 solaris*)
Chris@19 4135 case $cc_basename in
Chris@19 4136 CC* | sunCC*)
Chris@19 4137 # Sun C++ 4.2, 5.x and Centerline C++
Chris@19 4138 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4139 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4140 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@19 4141 ;;
Chris@19 4142 gcx*)
Chris@19 4143 # Green Hills C++ Compiler
Chris@19 4144 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@19 4145 ;;
Chris@19 4146 *)
Chris@19 4147 ;;
Chris@19 4148 esac
Chris@19 4149 ;;
Chris@19 4150 sunos4*)
Chris@19 4151 case $cc_basename in
Chris@19 4152 CC*)
Chris@19 4153 # Sun C++ 4.x
Chris@19 4154 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@19 4155 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4156 ;;
Chris@19 4157 lcc*)
Chris@19 4158 # Lucid
Chris@19 4159 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@19 4160 ;;
Chris@19 4161 *)
Chris@19 4162 ;;
Chris@19 4163 esac
Chris@19 4164 ;;
Chris@19 4165 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@19 4166 case $cc_basename in
Chris@19 4167 CC*)
Chris@19 4168 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4169 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4170 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4171 ;;
Chris@19 4172 esac
Chris@19 4173 ;;
Chris@19 4174 tandem*)
Chris@19 4175 case $cc_basename in
Chris@19 4176 NCC*)
Chris@19 4177 # NonStop-UX NCC 3.20
Chris@19 4178 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4179 ;;
Chris@19 4180 *)
Chris@19 4181 ;;
Chris@19 4182 esac
Chris@19 4183 ;;
Chris@19 4184 vxworks*)
Chris@19 4185 ;;
Chris@19 4186 *)
Chris@19 4187 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@19 4188 ;;
Chris@19 4189 esac
Chris@19 4190 fi
Chris@19 4191 ],
Chris@19 4192 [
Chris@19 4193 if test "$GCC" = yes; then
Chris@19 4194 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4195 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@19 4196
Chris@19 4197 case $host_os in
Chris@19 4198 aix*)
Chris@19 4199 # All AIX code is PIC.
Chris@19 4200 if test "$host_cpu" = ia64; then
Chris@19 4201 # AIX 5 now supports IA64 processor
Chris@19 4202 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4203 fi
Chris@19 4204 ;;
Chris@19 4205
Chris@19 4206 amigaos*)
Chris@19 4207 case $host_cpu in
Chris@19 4208 powerpc)
Chris@19 4209 # see comment about AmigaOS4 .so support
Chris@19 4210 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@19 4211 ;;
Chris@19 4212 m68k)
Chris@19 4213 # FIXME: we need at least 68020 code to build shared libraries, but
Chris@19 4214 # adding the `-m68020' flag to GCC prevents building anything better,
Chris@19 4215 # like `-m68040'.
Chris@19 4216 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
Chris@19 4217 ;;
Chris@19 4218 esac
Chris@19 4219 ;;
Chris@19 4220
Chris@19 4221 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
Chris@19 4222 # PIC is the default for these OSes.
Chris@19 4223 ;;
Chris@19 4224
Chris@19 4225 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@19 4226 # This hack is so that the source file can tell whether it is being
Chris@19 4227 # built for inclusion in a dll (and should export symbols for example).
Chris@19 4228 # Although the cygwin gcc ignores -fPIC, still need this for old-style
Chris@19 4229 # (--disable-auto-import) libraries
Chris@19 4230 m4_if([$1], [GCJ], [],
Chris@19 4231 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@19 4232 ;;
Chris@19 4233
Chris@19 4234 darwin* | rhapsody*)
Chris@19 4235 # PIC is the default on this platform
Chris@19 4236 # Common symbols not allowed in MH_DYLIB files
Chris@19 4237 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
Chris@19 4238 ;;
Chris@19 4239
Chris@19 4240 haiku*)
Chris@19 4241 # PIC is the default for Haiku.
Chris@19 4242 # The "-static" flag exists, but is broken.
Chris@19 4243 _LT_TAGVAR(lt_prog_compiler_static, $1)=
Chris@19 4244 ;;
Chris@19 4245
Chris@19 4246 hpux*)
Chris@19 4247 # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
Chris@19 4248 # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
Chris@19 4249 # sets the default TLS model and affects inlining.
Chris@19 4250 case $host_cpu in
Chris@19 4251 hppa*64*)
Chris@19 4252 # +Z the default
Chris@19 4253 ;;
Chris@19 4254 *)
Chris@19 4255 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@19 4256 ;;
Chris@19 4257 esac
Chris@19 4258 ;;
Chris@19 4259
Chris@19 4260 interix[[3-9]]*)
Chris@19 4261 # Interix 3.x gcc -fpic/-fPIC options generate broken code.
Chris@19 4262 # Instead, we relocate shared libraries at runtime.
Chris@19 4263 ;;
Chris@19 4264
Chris@19 4265 msdosdjgpp*)
Chris@19 4266 # Just because we use GCC doesn't mean we suddenly get shared libraries
Chris@19 4267 # on systems that don't support them.
Chris@19 4268 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@19 4269 enable_shared=no
Chris@19 4270 ;;
Chris@19 4271
Chris@19 4272 *nto* | *qnx*)
Chris@19 4273 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@19 4274 # it will coredump.
Chris@19 4275 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@19 4276 ;;
Chris@19 4277
Chris@19 4278 sysv4*MP*)
Chris@19 4279 if test -d /usr/nec; then
Chris@19 4280 _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
Chris@19 4281 fi
Chris@19 4282 ;;
Chris@19 4283
Chris@19 4284 *)
Chris@19 4285 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@19 4286 ;;
Chris@19 4287 esac
Chris@19 4288
Chris@19 4289 case $cc_basename in
Chris@19 4290 nvcc*) # Cuda Compiler Driver 2.2
Chris@19 4291 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
Chris@19 4292 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@19 4293 _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
Chris@19 4294 fi
Chris@19 4295 ;;
Chris@19 4296 esac
Chris@19 4297 else
Chris@19 4298 # PORTME Check for flag to pass linker flags through the system compiler.
Chris@19 4299 case $host_os in
Chris@19 4300 aix*)
Chris@19 4301 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4302 if test "$host_cpu" = ia64; then
Chris@19 4303 # AIX 5 now supports IA64 processor
Chris@19 4304 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4305 else
Chris@19 4306 _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
Chris@19 4307 fi
Chris@19 4308 ;;
Chris@19 4309
Chris@19 4310 mingw* | cygwin* | pw32* | os2* | cegcc*)
Chris@19 4311 # This hack is so that the source file can tell whether it is being
Chris@19 4312 # built for inclusion in a dll (and should export symbols for example).
Chris@19 4313 m4_if([$1], [GCJ], [],
Chris@19 4314 [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
Chris@19 4315 ;;
Chris@19 4316
Chris@19 4317 hpux9* | hpux10* | hpux11*)
Chris@19 4318 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4319 # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
Chris@19 4320 # not for PA HP-UX.
Chris@19 4321 case $host_cpu in
Chris@19 4322 hppa*64*|ia64*)
Chris@19 4323 # +Z the default
Chris@19 4324 ;;
Chris@19 4325 *)
Chris@19 4326 _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
Chris@19 4327 ;;
Chris@19 4328 esac
Chris@19 4329 # Is there a better lt_prog_compiler_static that works with the bundled CC?
Chris@19 4330 _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
Chris@19 4331 ;;
Chris@19 4332
Chris@19 4333 irix5* | irix6* | nonstopux*)
Chris@19 4334 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4335 # PIC (with -KPIC) is the default.
Chris@19 4336 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@19 4337 ;;
Chris@19 4338
Chris@19 4339 linux* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@19 4340 case $cc_basename in
Chris@19 4341 # old Intel for x86_64 which still supported -KPIC.
Chris@19 4342 ecc*)
Chris@19 4343 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4344 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4345 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@19 4346 ;;
Chris@19 4347 # icc used to be incompatible with GCC.
Chris@19 4348 # ICC 10 doesn't accept -KPIC any more.
Chris@19 4349 icc* | ifort*)
Chris@19 4350 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4351 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@19 4352 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@19 4353 ;;
Chris@19 4354 # Lahey Fortran 8.1.
Chris@19 4355 lf95*)
Chris@19 4356 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4357 _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
Chris@19 4358 _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
Chris@19 4359 ;;
Chris@19 4360 nagfor*)
Chris@19 4361 # NAG Fortran compiler
Chris@19 4362 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
Chris@19 4363 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@19 4364 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4365 ;;
Chris@19 4366 pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@19 4367 # Portland Group compilers (*not* the Pentium gcc compiler,
Chris@19 4368 # which looks to be a dead project)
Chris@19 4369 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4370 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@19 4371 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4372 ;;
Chris@19 4373 ccc*)
Chris@19 4374 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4375 # All Alpha code is PIC.
Chris@19 4376 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@19 4377 ;;
Chris@19 4378 xl* | bgxl* | bgf* | mpixl*)
Chris@19 4379 # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
Chris@19 4380 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4381 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
Chris@19 4382 _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
Chris@19 4383 ;;
Chris@19 4384 *)
Chris@19 4385 case `$CC -V 2>&1 | sed 5q` in
Chris@19 4386 *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
Chris@19 4387 # Sun Fortran 8.3 passes all unrecognized flags to the linker
Chris@19 4388 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4389 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4390 _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
Chris@19 4391 ;;
Chris@19 4392 *Sun\ F* | *Sun*Fortran*)
Chris@19 4393 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4394 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4395 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@19 4396 ;;
Chris@19 4397 *Sun\ C*)
Chris@19 4398 # Sun C 5.9
Chris@19 4399 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4400 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4401 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4402 ;;
Chris@19 4403 *Intel*\ [[CF]]*Compiler*)
Chris@19 4404 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4405 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
Chris@19 4406 _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
Chris@19 4407 ;;
Chris@19 4408 *Portland\ Group*)
Chris@19 4409 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4410 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
Chris@19 4411 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4412 ;;
Chris@19 4413 esac
Chris@19 4414 ;;
Chris@19 4415 esac
Chris@19 4416 ;;
Chris@19 4417
Chris@19 4418 newsos6)
Chris@19 4419 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4420 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4421 ;;
Chris@19 4422
Chris@19 4423 *nto* | *qnx*)
Chris@19 4424 # QNX uses GNU C++, but need to define -shared option too, otherwise
Chris@19 4425 # it will coredump.
Chris@19 4426 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
Chris@19 4427 ;;
Chris@19 4428
Chris@19 4429 osf3* | osf4* | osf5*)
Chris@19 4430 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4431 # All OSF/1 code is PIC.
Chris@19 4432 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@19 4433 ;;
Chris@19 4434
Chris@19 4435 rdos*)
Chris@19 4436 _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
Chris@19 4437 ;;
Chris@19 4438
Chris@19 4439 solaris*)
Chris@19 4440 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4441 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4442 case $cc_basename in
Chris@19 4443 f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
Chris@19 4444 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
Chris@19 4445 *)
Chris@19 4446 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
Chris@19 4447 esac
Chris@19 4448 ;;
Chris@19 4449
Chris@19 4450 sunos4*)
Chris@19 4451 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
Chris@19 4452 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
Chris@19 4453 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4454 ;;
Chris@19 4455
Chris@19 4456 sysv4 | sysv4.2uw2* | sysv4.3*)
Chris@19 4457 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4458 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4459 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4460 ;;
Chris@19 4461
Chris@19 4462 sysv4*MP*)
Chris@19 4463 if test -d /usr/nec ;then
Chris@19 4464 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
Chris@19 4465 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4466 fi
Chris@19 4467 ;;
Chris@19 4468
Chris@19 4469 sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
Chris@19 4470 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4471 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
Chris@19 4472 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4473 ;;
Chris@19 4474
Chris@19 4475 unicos*)
Chris@19 4476 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
Chris@19 4477 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@19 4478 ;;
Chris@19 4479
Chris@19 4480 uts4*)
Chris@19 4481 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
Chris@19 4482 _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
Chris@19 4483 ;;
Chris@19 4484
Chris@19 4485 *)
Chris@19 4486 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
Chris@19 4487 ;;
Chris@19 4488 esac
Chris@19 4489 fi
Chris@19 4490 ])
Chris@19 4491 case $host_os in
Chris@19 4492 # For platforms which do not support PIC, -DPIC is meaningless:
Chris@19 4493 *djgpp*)
Chris@19 4494 _LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@19 4495 ;;
Chris@19 4496 *)
Chris@19 4497 _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
Chris@19 4498 ;;
Chris@19 4499 esac
Chris@19 4500
Chris@19 4501 AC_CACHE_CHECK([for $compiler option to produce PIC],
Chris@19 4502 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
Chris@19 4503 [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
Chris@19 4504 _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
Chris@19 4505
Chris@19 4506 #
Chris@19 4507 # Check to make sure the PIC flag actually works.
Chris@19 4508 #
Chris@19 4509 if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
Chris@19 4510 _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
Chris@19 4511 [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
Chris@19 4512 [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
Chris@19 4513 [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
Chris@19 4514 "" | " "*) ;;
Chris@19 4515 *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
Chris@19 4516 esac],
Chris@19 4517 [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
Chris@19 4518 _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
Chris@19 4519 fi
Chris@19 4520 _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
Chris@19 4521 [Additional compiler flags for building library objects])
Chris@19 4522
Chris@19 4523 _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
Chris@19 4524 [How to pass a linker flag through the compiler])
Chris@19 4525 #
Chris@19 4526 # Check to make sure the static flag actually works.
Chris@19 4527 #
Chris@19 4528 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
Chris@19 4529 _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
Chris@19 4530 _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
Chris@19 4531 $lt_tmp_static_flag,
Chris@19 4532 [],
Chris@19 4533 [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
Chris@19 4534 _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
Chris@19 4535 [Compiler flag to prevent dynamic linking])
Chris@19 4536 ])# _LT_COMPILER_PIC
Chris@19 4537
Chris@19 4538
Chris@19 4539 # _LT_LINKER_SHLIBS([TAGNAME])
Chris@19 4540 # ----------------------------
Chris@19 4541 # See if the linker supports building shared libraries.
Chris@19 4542 m4_defun([_LT_LINKER_SHLIBS],
Chris@19 4543 [AC_REQUIRE([LT_PATH_LD])dnl
Chris@19 4544 AC_REQUIRE([LT_PATH_NM])dnl
Chris@19 4545 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@19 4546 m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@19 4547 m4_require([_LT_DECL_EGREP])dnl
Chris@19 4548 m4_require([_LT_DECL_SED])dnl
Chris@19 4549 m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
Chris@19 4550 m4_require([_LT_TAG_COMPILER])dnl
Chris@19 4551 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@19 4552 m4_if([$1], [CXX], [
Chris@19 4553 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@19 4554 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@19 4555 case $host_os in
Chris@19 4556 aix[[4-9]]*)
Chris@19 4557 # If we're using GNU nm, then we don't want the "-C" option.
Chris@19 4558 # -C means demangle to AIX nm, but means don't demangle with GNU nm
Chris@19 4559 # Also, AIX nm treats weak defined symbols like other global defined
Chris@19 4560 # symbols, whereas GNU nm marks them as "W".
Chris@19 4561 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@19 4562 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
Chris@19 4563 else
Chris@19 4564 _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'
Chris@19 4565 fi
Chris@19 4566 ;;
Chris@19 4567 pw32*)
Chris@19 4568 _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
Chris@19 4569 ;;
Chris@19 4570 cygwin* | mingw* | cegcc*)
Chris@19 4571 case $cc_basename in
Chris@19 4572 cl*)
Chris@19 4573 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@19 4574 ;;
Chris@19 4575 *)
Chris@19 4576 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
Chris@19 4577 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@19 4578 ;;
Chris@19 4579 esac
Chris@19 4580 ;;
Chris@19 4581 *)
Chris@19 4582 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@19 4583 ;;
Chris@19 4584 esac
Chris@19 4585 ], [
Chris@19 4586 runpath_var=
Chris@19 4587 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@19 4588 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@19 4589 _LT_TAGVAR(archive_cmds, $1)=
Chris@19 4590 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@19 4591 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@19 4592 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@19 4593 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@19 4594 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
Chris@19 4595 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@19 4596 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@19 4597 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@19 4598 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@19 4599 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@19 4600 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@19 4601 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@19 4602 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@19 4603 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@19 4604 _LT_TAGVAR(module_cmds, $1)=
Chris@19 4605 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@19 4606 _LT_TAGVAR(old_archive_from_new_cmds, $1)=
Chris@19 4607 _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
Chris@19 4608 _LT_TAGVAR(thread_safe_flag_spec, $1)=
Chris@19 4609 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@19 4610 # include_expsyms should be a list of space-separated symbols to be *always*
Chris@19 4611 # included in the symbol list
Chris@19 4612 _LT_TAGVAR(include_expsyms, $1)=
Chris@19 4613 # exclude_expsyms can be an extended regexp of symbols to exclude
Chris@19 4614 # it will be wrapped by ` (' and `)$', so one must not match beginning or
Chris@19 4615 # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
Chris@19 4616 # as well as any symbol that contains `d'.
Chris@19 4617 _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
Chris@19 4618 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
Chris@19 4619 # platforms (ab)use it in PIC code, but their linkers get confused if
Chris@19 4620 # the symbol is explicitly referenced. Since portable code cannot
Chris@19 4621 # rely on this symbol name, it's probably fine to never include it in
Chris@19 4622 # preloaded symbol tables.
Chris@19 4623 # Exclude shared library initialization/finalization symbols.
Chris@19 4624 dnl Note also adjust exclude_expsyms for C++ above.
Chris@19 4625 extract_expsyms_cmds=
Chris@19 4626
Chris@19 4627 case $host_os in
Chris@19 4628 cygwin* | mingw* | pw32* | cegcc*)
Chris@19 4629 # FIXME: the MSVC++ port hasn't been tested in a loooong time
Chris@19 4630 # When not using gcc, we currently assume that we are using
Chris@19 4631 # Microsoft Visual C++.
Chris@19 4632 if test "$GCC" != yes; then
Chris@19 4633 with_gnu_ld=no
Chris@19 4634 fi
Chris@19 4635 ;;
Chris@19 4636 interix*)
Chris@19 4637 # we just hope/assume this is gcc and not c89 (= MSVC++)
Chris@19 4638 with_gnu_ld=yes
Chris@19 4639 ;;
Chris@19 4640 openbsd*)
Chris@19 4641 with_gnu_ld=no
Chris@19 4642 ;;
Chris@19 4643 esac
Chris@19 4644
Chris@19 4645 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@19 4646
Chris@19 4647 # On some targets, GNU ld is compatible enough with the native linker
Chris@19 4648 # that we're better off using the native interface for both.
Chris@19 4649 lt_use_gnu_ld_interface=no
Chris@19 4650 if test "$with_gnu_ld" = yes; then
Chris@19 4651 case $host_os in
Chris@19 4652 aix*)
Chris@19 4653 # The AIX port of GNU ld has always aspired to compatibility
Chris@19 4654 # with the native linker. However, as the warning in the GNU ld
Chris@19 4655 # block says, versions before 2.19.5* couldn't really create working
Chris@19 4656 # shared libraries, regardless of the interface used.
Chris@19 4657 case `$LD -v 2>&1` in
Chris@19 4658 *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
Chris@19 4659 *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
Chris@19 4660 *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
Chris@19 4661 *)
Chris@19 4662 lt_use_gnu_ld_interface=yes
Chris@19 4663 ;;
Chris@19 4664 esac
Chris@19 4665 ;;
Chris@19 4666 *)
Chris@19 4667 lt_use_gnu_ld_interface=yes
Chris@19 4668 ;;
Chris@19 4669 esac
Chris@19 4670 fi
Chris@19 4671
Chris@19 4672 if test "$lt_use_gnu_ld_interface" = yes; then
Chris@19 4673 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@19 4674 wlarc='${wl}'
Chris@19 4675
Chris@19 4676 # Set some defaults for GNU ld with shared library support. These
Chris@19 4677 # are reset later if shared libraries are not supported. Putting them
Chris@19 4678 # here allows them to be overridden if necessary.
Chris@19 4679 runpath_var=LD_RUN_PATH
Chris@19 4680 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 4681 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@19 4682 # ancient GNU ld didn't support --whole-archive et. al.
Chris@19 4683 if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
Chris@19 4684 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
Chris@19 4685 else
Chris@19 4686 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@19 4687 fi
Chris@19 4688 supports_anon_versioning=no
Chris@19 4689 case `$LD -v 2>&1` in
Chris@19 4690 *GNU\ gold*) supports_anon_versioning=yes ;;
Chris@19 4691 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
Chris@19 4692 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
Chris@19 4693 *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
Chris@19 4694 *\ 2.11.*) ;; # other 2.11 versions
Chris@19 4695 *) supports_anon_versioning=yes ;;
Chris@19 4696 esac
Chris@19 4697
Chris@19 4698 # See if GNU ld supports shared libraries.
Chris@19 4699 case $host_os in
Chris@19 4700 aix[[3-9]]*)
Chris@19 4701 # On AIX/PPC, the GNU linker is very broken
Chris@19 4702 if test "$host_cpu" != ia64; then
Chris@19 4703 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 4704 cat <<_LT_EOF 1>&2
Chris@19 4705
Chris@19 4706 *** Warning: the GNU linker, at least up to release 2.19, is reported
Chris@19 4707 *** to be unable to reliably create shared libraries on AIX.
Chris@19 4708 *** Therefore, libtool is disabling shared libraries support. If you
Chris@19 4709 *** really care for shared libraries, you may want to install binutils
Chris@19 4710 *** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
Chris@19 4711 *** You will then need to restart the configuration process.
Chris@19 4712
Chris@19 4713 _LT_EOF
Chris@19 4714 fi
Chris@19 4715 ;;
Chris@19 4716
Chris@19 4717 amigaos*)
Chris@19 4718 case $host_cpu in
Chris@19 4719 powerpc)
Chris@19 4720 # see comment about AmigaOS4 .so support
Chris@19 4721 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 4722 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@19 4723 ;;
Chris@19 4724 m68k)
Chris@19 4725 _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)'
Chris@19 4726 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@19 4727 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 4728 ;;
Chris@19 4729 esac
Chris@19 4730 ;;
Chris@19 4731
Chris@19 4732 beos*)
Chris@19 4733 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@19 4734 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@19 4735 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@19 4736 # support --undefined. This deserves some investigation. FIXME
Chris@19 4737 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 4738 else
Chris@19 4739 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 4740 fi
Chris@19 4741 ;;
Chris@19 4742
Chris@19 4743 cygwin* | mingw* | pw32* | cegcc*)
Chris@19 4744 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@19 4745 # as there is no search path for DLLs.
Chris@19 4746 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@19 4747 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
Chris@19 4748 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@19 4749 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@19 4750 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@19 4751 _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
Chris@19 4752 _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
Chris@19 4753
Chris@19 4754 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@19 4755 _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'
Chris@19 4756 # If the export-symbols file already is a .def file (1st line
Chris@19 4757 # is EXPORTS), use it as is; otherwise, prepend...
Chris@19 4758 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Chris@19 4759 cp $export_symbols $output_objdir/$soname.def;
Chris@19 4760 else
Chris@19 4761 echo EXPORTS > $output_objdir/$soname.def;
Chris@19 4762 cat $export_symbols >> $output_objdir/$soname.def;
Chris@19 4763 fi~
Chris@19 4764 $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
Chris@19 4765 else
Chris@19 4766 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 4767 fi
Chris@19 4768 ;;
Chris@19 4769
Chris@19 4770 haiku*)
Chris@19 4771 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 4772 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 4773 ;;
Chris@19 4774
Chris@19 4775 interix[[3-9]]*)
Chris@19 4776 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@19 4777 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 4778 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@19 4779 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@19 4780 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@19 4781 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@19 4782 # default) and relocated if they conflict, which is a slow very memory
Chris@19 4783 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@19 4784 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@19 4785 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@19 4786 _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'
Chris@19 4787 _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'
Chris@19 4788 ;;
Chris@19 4789
Chris@19 4790 gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@19 4791 tmp_diet=no
Chris@19 4792 if test "$host_os" = linux-dietlibc; then
Chris@19 4793 case $cc_basename in
Chris@19 4794 diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
Chris@19 4795 esac
Chris@19 4796 fi
Chris@19 4797 if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
Chris@19 4798 && test "$tmp_diet" = no
Chris@19 4799 then
Chris@19 4800 tmp_addflag=' $pic_flag'
Chris@19 4801 tmp_sharedflag='-shared'
Chris@19 4802 case $cc_basename,$host_cpu in
Chris@19 4803 pgcc*) # Portland Group C compiler
Chris@19 4804 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
Chris@19 4805 tmp_addflag=' $pic_flag'
Chris@19 4806 ;;
Chris@19 4807 pgf77* | pgf90* | pgf95* | pgfortran*)
Chris@19 4808 # Portland Group f77 and f90 compilers
Chris@19 4809 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
Chris@19 4810 tmp_addflag=' $pic_flag -Mnomain' ;;
Chris@19 4811 ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
Chris@19 4812 tmp_addflag=' -i_dynamic' ;;
Chris@19 4813 efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
Chris@19 4814 tmp_addflag=' -i_dynamic -nofor_main' ;;
Chris@19 4815 ifc* | ifort*) # Intel Fortran compiler
Chris@19 4816 tmp_addflag=' -nofor_main' ;;
Chris@19 4817 lf95*) # Lahey Fortran 8.1
Chris@19 4818 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@19 4819 tmp_sharedflag='--shared' ;;
Chris@19 4820 xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
Chris@19 4821 tmp_sharedflag='-qmkshrobj'
Chris@19 4822 tmp_addflag= ;;
Chris@19 4823 nvcc*) # Cuda Compiler Driver 2.2
Chris@19 4824 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
Chris@19 4825 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@19 4826 ;;
Chris@19 4827 esac
Chris@19 4828 case `$CC -V 2>&1 | sed 5q` in
Chris@19 4829 *Sun\ C*) # Sun C 5.9
Chris@19 4830 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
Chris@19 4831 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@19 4832 tmp_sharedflag='-G' ;;
Chris@19 4833 *Sun\ F*) # Sun Fortran 8.3
Chris@19 4834 tmp_sharedflag='-G' ;;
Chris@19 4835 esac
Chris@19 4836 _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 4837
Chris@19 4838 if test "x$supports_anon_versioning" = xyes; then
Chris@19 4839 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@19 4840 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@19 4841 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@19 4842 $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
Chris@19 4843 fi
Chris@19 4844
Chris@19 4845 case $cc_basename in
Chris@19 4846 xlf* | bgf* | bgxlf* | mpixlf*)
Chris@19 4847 # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
Chris@19 4848 _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
Chris@19 4849 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 4850 _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
Chris@19 4851 if test "x$supports_anon_versioning" = xyes; then
Chris@19 4852 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@19 4853 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@19 4854 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@19 4855 $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
Chris@19 4856 fi
Chris@19 4857 ;;
Chris@19 4858 esac
Chris@19 4859 else
Chris@19 4860 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 4861 fi
Chris@19 4862 ;;
Chris@19 4863
Chris@19 4864 netbsd*)
Chris@19 4865 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@19 4866 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
Chris@19 4867 wlarc=
Chris@19 4868 else
Chris@19 4869 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 4870 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
Chris@19 4871 fi
Chris@19 4872 ;;
Chris@19 4873
Chris@19 4874 solaris*)
Chris@19 4875 if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
Chris@19 4876 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 4877 cat <<_LT_EOF 1>&2
Chris@19 4878
Chris@19 4879 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
Chris@19 4880 *** create shared libraries on Solaris systems. Therefore, libtool
Chris@19 4881 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@19 4882 *** binutils to release 2.9.1 or newer. Another option is to modify
Chris@19 4883 *** your PATH or compiler configuration so that the native linker is
Chris@19 4884 *** used, and then restart.
Chris@19 4885
Chris@19 4886 _LT_EOF
Chris@19 4887 elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@19 4888 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 4889 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
Chris@19 4890 else
Chris@19 4891 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 4892 fi
Chris@19 4893 ;;
Chris@19 4894
Chris@19 4895 sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
Chris@19 4896 case `$LD -v 2>&1` in
Chris@19 4897 *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
Chris@19 4898 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 4899 cat <<_LT_EOF 1>&2
Chris@19 4900
Chris@19 4901 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
Chris@19 4902 *** reliably create shared libraries on SCO systems. Therefore, libtool
Chris@19 4903 *** is disabling shared libraries support. We urge you to upgrade GNU
Chris@19 4904 *** binutils to release 2.16.91.0.3 or newer. Another option is to modify
Chris@19 4905 *** your PATH or compiler configuration so that the native linker is
Chris@19 4906 *** used, and then restart.
Chris@19 4907
Chris@19 4908 _LT_EOF
Chris@19 4909 ;;
Chris@19 4910 *)
Chris@19 4911 # For security reasons, it is highly recommended that you always
Chris@19 4912 # use absolute paths for naming shared libraries, and exclude the
Chris@19 4913 # DT_RUNPATH tag from executables and libraries. But doing so
Chris@19 4914 # requires that you compile everything twice, which is a pain.
Chris@19 4915 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@19 4916 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 4917 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 4918 _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'
Chris@19 4919 else
Chris@19 4920 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 4921 fi
Chris@19 4922 ;;
Chris@19 4923 esac
Chris@19 4924 ;;
Chris@19 4925
Chris@19 4926 sunos4*)
Chris@19 4927 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@19 4928 wlarc=
Chris@19 4929 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 4930 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 4931 ;;
Chris@19 4932
Chris@19 4933 *)
Chris@19 4934 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@19 4935 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 4936 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
Chris@19 4937 else
Chris@19 4938 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 4939 fi
Chris@19 4940 ;;
Chris@19 4941 esac
Chris@19 4942
Chris@19 4943 if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
Chris@19 4944 runpath_var=
Chris@19 4945 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@19 4946 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@19 4947 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@19 4948 fi
Chris@19 4949 else
Chris@19 4950 # PORTME fill in a description of your system's linker (not GNU ld)
Chris@19 4951 case $host_os in
Chris@19 4952 aix3*)
Chris@19 4953 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@19 4954 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@19 4955 _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'
Chris@19 4956 # Note: this linker hardcodes the directories in LIBPATH if there
Chris@19 4957 # are no directories specified by -L.
Chris@19 4958 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 4959 if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
Chris@19 4960 # Neither direct hardcoding nor static linking is supported with a
Chris@19 4961 # broken collect2.
Chris@19 4962 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@19 4963 fi
Chris@19 4964 ;;
Chris@19 4965
Chris@19 4966 aix[[4-9]]*)
Chris@19 4967 if test "$host_cpu" = ia64; then
Chris@19 4968 # On IA64, the linker does run time linking by default, so we don't
Chris@19 4969 # have to do anything special.
Chris@19 4970 aix_use_runtimelinking=no
Chris@19 4971 exp_sym_flag='-Bexport'
Chris@19 4972 no_entry_flag=""
Chris@19 4973 else
Chris@19 4974 # If we're using GNU nm, then we don't want the "-C" option.
Chris@19 4975 # -C means demangle to AIX nm, but means don't demangle with GNU nm
Chris@19 4976 # Also, AIX nm treats weak defined symbols like other global
Chris@19 4977 # defined symbols, whereas GNU nm marks them as "W".
Chris@19 4978 if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
Chris@19 4979 _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
Chris@19 4980 else
Chris@19 4981 _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'
Chris@19 4982 fi
Chris@19 4983 aix_use_runtimelinking=no
Chris@19 4984
Chris@19 4985 # Test if we are trying to use run time linking or normal
Chris@19 4986 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@19 4987 # need to do runtime linking.
Chris@19 4988 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@19 4989 for ld_flag in $LDFLAGS; do
Chris@19 4990 if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
Chris@19 4991 aix_use_runtimelinking=yes
Chris@19 4992 break
Chris@19 4993 fi
Chris@19 4994 done
Chris@19 4995 ;;
Chris@19 4996 esac
Chris@19 4997
Chris@19 4998 exp_sym_flag='-bexport'
Chris@19 4999 no_entry_flag='-bnoentry'
Chris@19 5000 fi
Chris@19 5001
Chris@19 5002 # When large executables or shared objects are built, AIX ld can
Chris@19 5003 # have problems creating the table of contents. If linking a library
Chris@19 5004 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@19 5005 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@19 5006 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@19 5007
Chris@19 5008 _LT_TAGVAR(archive_cmds, $1)=''
Chris@19 5009 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5010 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@19 5011 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@19 5012 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 5013 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
Chris@19 5014
Chris@19 5015 if test "$GCC" = yes; then
Chris@19 5016 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@19 5017 # We only want to do this on AIX 4.2 and lower, the check
Chris@19 5018 # below for broken collect2 doesn't work under 4.3+
Chris@19 5019 collect2name=`${CC} -print-prog-name=collect2`
Chris@19 5020 if test -f "$collect2name" &&
Chris@19 5021 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@19 5022 then
Chris@19 5023 # We have reworked collect2
Chris@19 5024 :
Chris@19 5025 else
Chris@19 5026 # We have old collect2
Chris@19 5027 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@19 5028 # It fails to find uninstalled libraries when the uninstalled
Chris@19 5029 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@19 5030 # to unsupported forces relinking
Chris@19 5031 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 5032 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@19 5033 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@19 5034 fi
Chris@19 5035 ;;
Chris@19 5036 esac
Chris@19 5037 shared_flag='-shared'
Chris@19 5038 if test "$aix_use_runtimelinking" = yes; then
Chris@19 5039 shared_flag="$shared_flag "'${wl}-G'
Chris@19 5040 fi
Chris@19 5041 else
Chris@19 5042 # not using gcc
Chris@19 5043 if test "$host_cpu" = ia64; then
Chris@19 5044 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@19 5045 # chokes on -Wl,-G. The following line is correct:
Chris@19 5046 shared_flag='-G'
Chris@19 5047 else
Chris@19 5048 if test "$aix_use_runtimelinking" = yes; then
Chris@19 5049 shared_flag='${wl}-G'
Chris@19 5050 else
Chris@19 5051 shared_flag='${wl}-bM:SRE'
Chris@19 5052 fi
Chris@19 5053 fi
Chris@19 5054 fi
Chris@19 5055
Chris@19 5056 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
Chris@19 5057 # It seems that -bexpall does not export symbols beginning with
Chris@19 5058 # underscore (_), so it is better to generate a list of symbols to export.
Chris@19 5059 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@19 5060 if test "$aix_use_runtimelinking" = yes; then
Chris@19 5061 # Warning - without using the other runtime loading flags (-brtl),
Chris@19 5062 # -berok will link without error, but may produce a broken library.
Chris@19 5063 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
Chris@19 5064 # Determine the default libpath from the value encoded in an
Chris@19 5065 # empty executable.
Chris@19 5066 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@19 5067 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@19 5068 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
Chris@19 5069 else
Chris@19 5070 if test "$host_cpu" = ia64; then
Chris@19 5071 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
Chris@19 5072 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@19 5073 _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"
Chris@19 5074 else
Chris@19 5075 # Determine the default libpath from the value encoded in an
Chris@19 5076 # empty executable.
Chris@19 5077 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@19 5078 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@19 5079 # Warning - without using the other run time loading flags,
Chris@19 5080 # -berok will link without error, but may produce a broken library.
Chris@19 5081 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
Chris@19 5082 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
Chris@19 5083 if test "$with_gnu_ld" = yes; then
Chris@19 5084 # We only use this code for GNU lds that support --whole-archive.
Chris@19 5085 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
Chris@19 5086 else
Chris@19 5087 # Exported symbols can be pulled into shared objects from archives
Chris@19 5088 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@19 5089 fi
Chris@19 5090 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@19 5091 # This is similar to how AIX traditionally builds its shared libraries.
Chris@19 5092 _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'
Chris@19 5093 fi
Chris@19 5094 fi
Chris@19 5095 ;;
Chris@19 5096
Chris@19 5097 amigaos*)
Chris@19 5098 case $host_cpu in
Chris@19 5099 powerpc)
Chris@19 5100 # see comment about AmigaOS4 .so support
Chris@19 5101 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 5102 _LT_TAGVAR(archive_expsym_cmds, $1)=''
Chris@19 5103 ;;
Chris@19 5104 m68k)
Chris@19 5105 _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)'
Chris@19 5106 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@19 5107 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 5108 ;;
Chris@19 5109 esac
Chris@19 5110 ;;
Chris@19 5111
Chris@19 5112 bsdi[[45]]*)
Chris@19 5113 _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
Chris@19 5114 ;;
Chris@19 5115
Chris@19 5116 cygwin* | mingw* | pw32* | cegcc*)
Chris@19 5117 # When not using gcc, we currently assume that we are using
Chris@19 5118 # Microsoft Visual C++.
Chris@19 5119 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@19 5120 # no search path for DLLs.
Chris@19 5121 case $cc_basename in
Chris@19 5122 cl*)
Chris@19 5123 # Native MSVC
Chris@19 5124 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@19 5125 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@19 5126 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@19 5127 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@19 5128 # Tell ltmain to make .lib files, not .a files.
Chris@19 5129 libext=lib
Chris@19 5130 # Tell ltmain to make .dll files, not .so files.
Chris@19 5131 shrext_cmds=".dll"
Chris@19 5132 # FIXME: Setting linknames here is a bad hack.
Chris@19 5133 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
Chris@19 5134 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Chris@19 5135 sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
Chris@19 5136 else
Chris@19 5137 sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
Chris@19 5138 fi~
Chris@19 5139 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
Chris@19 5140 linknames='
Chris@19 5141 # The linker will not automatically build a static lib if we build a DLL.
Chris@19 5142 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@19 5143 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@19 5144 _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
Chris@19 5145 _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'
Chris@19 5146 # Don't use ranlib
Chris@19 5147 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@19 5148 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@19 5149 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@19 5150 case $lt_outputfile in
Chris@19 5151 *.exe|*.EXE) ;;
Chris@19 5152 *)
Chris@19 5153 lt_outputfile="$lt_outputfile.exe"
Chris@19 5154 lt_tool_outputfile="$lt_tool_outputfile.exe"
Chris@19 5155 ;;
Chris@19 5156 esac~
Chris@19 5157 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
Chris@19 5158 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@19 5159 $RM "$lt_outputfile.manifest";
Chris@19 5160 fi'
Chris@19 5161 ;;
Chris@19 5162 *)
Chris@19 5163 # Assume MSVC wrapper
Chris@19 5164 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@19 5165 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@19 5166 # Tell ltmain to make .lib files, not .a files.
Chris@19 5167 libext=lib
Chris@19 5168 # Tell ltmain to make .dll files, not .so files.
Chris@19 5169 shrext_cmds=".dll"
Chris@19 5170 # FIXME: Setting linknames here is a bad hack.
Chris@19 5171 _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
Chris@19 5172 # The linker will automatically build a .lib file if we build a DLL.
Chris@19 5173 _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@19 5174 # FIXME: Should let the user specify the lib program.
Chris@19 5175 _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
Chris@19 5176 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@19 5177 ;;
Chris@19 5178 esac
Chris@19 5179 ;;
Chris@19 5180
Chris@19 5181 darwin* | rhapsody*)
Chris@19 5182 _LT_DARWIN_LINKER_FEATURES($1)
Chris@19 5183 ;;
Chris@19 5184
Chris@19 5185 dgux*)
Chris@19 5186 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5187 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@19 5188 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5189 ;;
Chris@19 5190
Chris@19 5191 # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
Chris@19 5192 # support. Future versions do this automatically, but an explicit c++rt0.o
Chris@19 5193 # does not break anything, and helps significantly (at the cost of a little
Chris@19 5194 # extra space).
Chris@19 5195 freebsd2.2*)
Chris@19 5196 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
Chris@19 5197 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@19 5198 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5199 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5200 ;;
Chris@19 5201
Chris@19 5202 # Unfortunately, older versions of FreeBSD 2 do not have this feature.
Chris@19 5203 freebsd2.*)
Chris@19 5204 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5205 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5206 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 5207 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5208 ;;
Chris@19 5209
Chris@19 5210 # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
Chris@19 5211 freebsd* | dragonfly*)
Chris@19 5212 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5213 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@19 5214 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5215 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5216 ;;
Chris@19 5217
Chris@19 5218 hpux9*)
Chris@19 5219 if test "$GCC" = yes; then
Chris@19 5220 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
Chris@19 5221 else
Chris@19 5222 _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'
Chris@19 5223 fi
Chris@19 5224 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@19 5225 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 5226 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5227
Chris@19 5228 # hardcode_minus_L: Not really in the search PATH,
Chris@19 5229 # but as the default location of the library.
Chris@19 5230 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 5231 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@19 5232 ;;
Chris@19 5233
Chris@19 5234 hpux10*)
Chris@19 5235 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
Chris@19 5236 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5237 else
Chris@19 5238 _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5239 fi
Chris@19 5240 if test "$with_gnu_ld" = no; then
Chris@19 5241 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@19 5242 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 5243 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5244 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@19 5245 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@19 5246 # hardcode_minus_L: Not really in the search PATH,
Chris@19 5247 # but as the default location of the library.
Chris@19 5248 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 5249 fi
Chris@19 5250 ;;
Chris@19 5251
Chris@19 5252 hpux11*)
Chris@19 5253 if test "$GCC" = yes && test "$with_gnu_ld" = no; then
Chris@19 5254 case $host_cpu in
Chris@19 5255 hppa*64*)
Chris@19 5256 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5257 ;;
Chris@19 5258 ia64*)
Chris@19 5259 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5260 ;;
Chris@19 5261 *)
Chris@19 5262 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5263 ;;
Chris@19 5264 esac
Chris@19 5265 else
Chris@19 5266 case $host_cpu in
Chris@19 5267 hppa*64*)
Chris@19 5268 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5269 ;;
Chris@19 5270 ia64*)
Chris@19 5271 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5272 ;;
Chris@19 5273 *)
Chris@19 5274 m4_if($1, [], [
Chris@19 5275 # Older versions of the 11.00 compiler do not understand -b yet
Chris@19 5276 # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
Chris@19 5277 _LT_LINKER_OPTION([if $CC understands -b],
Chris@19 5278 _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
Chris@19 5279 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
Chris@19 5280 [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
Chris@19 5281 [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
Chris@19 5282 ;;
Chris@19 5283 esac
Chris@19 5284 fi
Chris@19 5285 if test "$with_gnu_ld" = no; then
Chris@19 5286 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@19 5287 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 5288
Chris@19 5289 case $host_cpu in
Chris@19 5290 hppa*64*|ia64*)
Chris@19 5291 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@19 5292 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5293 ;;
Chris@19 5294 *)
Chris@19 5295 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5296 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@19 5297 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@19 5298
Chris@19 5299 # hardcode_minus_L: Not really in the search PATH,
Chris@19 5300 # but as the default location of the library.
Chris@19 5301 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 5302 ;;
Chris@19 5303 esac
Chris@19 5304 fi
Chris@19 5305 ;;
Chris@19 5306
Chris@19 5307 irix5* | irix6* | nonstopux*)
Chris@19 5308 if test "$GCC" = yes; then
Chris@19 5309 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
Chris@19 5310 # Try to use the -exported_symbol ld option, if it does not
Chris@19 5311 # work, assume that -exports_file does not work either and
Chris@19 5312 # implicitly export all symbols.
Chris@19 5313 # This should be the same for all languages, so no per-tag cache variable.
Chris@19 5314 AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
Chris@19 5315 [lt_cv_irix_exported_symbol],
Chris@19 5316 [save_LDFLAGS="$LDFLAGS"
Chris@19 5317 LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
Chris@19 5318 AC_LINK_IFELSE(
Chris@19 5319 [AC_LANG_SOURCE(
Chris@19 5320 [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
Chris@19 5321 [C++], [[int foo (void) { return 0; }]],
Chris@19 5322 [Fortran 77], [[
Chris@19 5323 subroutine foo
Chris@19 5324 end]],
Chris@19 5325 [Fortran], [[
Chris@19 5326 subroutine foo
Chris@19 5327 end]])])],
Chris@19 5328 [lt_cv_irix_exported_symbol=yes],
Chris@19 5329 [lt_cv_irix_exported_symbol=no])
Chris@19 5330 LDFLAGS="$save_LDFLAGS"])
Chris@19 5331 if test "$lt_cv_irix_exported_symbol" = yes; then
Chris@19 5332 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
Chris@19 5333 fi
Chris@19 5334 else
Chris@19 5335 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
Chris@19 5336 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
Chris@19 5337 fi
Chris@19 5338 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@19 5339 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 5340 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 5341 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@19 5342 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 5343 ;;
Chris@19 5344
Chris@19 5345 netbsd*)
Chris@19 5346 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@19 5347 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
Chris@19 5348 else
Chris@19 5349 _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
Chris@19 5350 fi
Chris@19 5351 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@19 5352 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5353 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5354 ;;
Chris@19 5355
Chris@19 5356 newsos6)
Chris@19 5357 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5358 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5359 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 5360 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 5361 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5362 ;;
Chris@19 5363
Chris@19 5364 *nto* | *qnx*)
Chris@19 5365 ;;
Chris@19 5366
Chris@19 5367 openbsd*)
Chris@19 5368 if test -f /usr/libexec/ld.so; then
Chris@19 5369 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5370 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5371 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@19 5372 if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@19 5373 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5374 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
Chris@19 5375 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@19 5376 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@19 5377 else
Chris@19 5378 case $host_os in
Chris@19 5379 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
Chris@19 5380 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5381 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@19 5382 ;;
Chris@19 5383 *)
Chris@19 5384 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5385 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@19 5386 ;;
Chris@19 5387 esac
Chris@19 5388 fi
Chris@19 5389 else
Chris@19 5390 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 5391 fi
Chris@19 5392 ;;
Chris@19 5393
Chris@19 5394 os2*)
Chris@19 5395 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@19 5396 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 5397 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@19 5398 _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'
Chris@19 5399 _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
Chris@19 5400 ;;
Chris@19 5401
Chris@19 5402 osf3*)
Chris@19 5403 if test "$GCC" = yes; then
Chris@19 5404 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@19 5405 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
Chris@19 5406 else
Chris@19 5407 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@19 5408 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
Chris@19 5409 fi
Chris@19 5410 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@19 5411 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 5412 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 5413 ;;
Chris@19 5414
Chris@19 5415 osf4* | osf5*) # as osf3* with the addition of -msym flag
Chris@19 5416 if test "$GCC" = yes; then
Chris@19 5417 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@19 5418 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
Chris@19 5419 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 5420 else
Chris@19 5421 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@19 5422 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
Chris@19 5423 _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~
Chris@19 5424 $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
Chris@19 5425
Chris@19 5426 # Both c and cxx compiler support -rpath directly
Chris@19 5427 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@19 5428 fi
Chris@19 5429 _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
Chris@19 5430 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 5431 ;;
Chris@19 5432
Chris@19 5433 solaris*)
Chris@19 5434 _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
Chris@19 5435 if test "$GCC" = yes; then
Chris@19 5436 wlarc='${wl}'
Chris@19 5437 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5438 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@19 5439 $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
Chris@19 5440 else
Chris@19 5441 case `$CC -V 2>&1` in
Chris@19 5442 *"Compilers 5.0"*)
Chris@19 5443 wlarc=''
Chris@19 5444 _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5445 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@19 5446 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
Chris@19 5447 ;;
Chris@19 5448 *)
Chris@19 5449 wlarc='${wl}'
Chris@19 5450 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5451 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@19 5452 $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
Chris@19 5453 ;;
Chris@19 5454 esac
Chris@19 5455 fi
Chris@19 5456 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@19 5457 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5458 case $host_os in
Chris@19 5459 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@19 5460 *)
Chris@19 5461 # The compiler driver will combine and reorder linker options,
Chris@19 5462 # but understands `-z linker_flag'. GCC discards it without `$wl',
Chris@19 5463 # but is careful enough not to reorder.
Chris@19 5464 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@19 5465 if test "$GCC" = yes; then
Chris@19 5466 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
Chris@19 5467 else
Chris@19 5468 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@19 5469 fi
Chris@19 5470 ;;
Chris@19 5471 esac
Chris@19 5472 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 5473 ;;
Chris@19 5474
Chris@19 5475 sunos4*)
Chris@19 5476 if test "x$host_vendor" = xsequent; then
Chris@19 5477 # Use $CC to link under sequent, because it throws in some extra .o
Chris@19 5478 # files that make .init and .fini sections work.
Chris@19 5479 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5480 else
Chris@19 5481 _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5482 fi
Chris@19 5483 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@19 5484 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 5485 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 5486 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5487 ;;
Chris@19 5488
Chris@19 5489 sysv4)
Chris@19 5490 case $host_vendor in
Chris@19 5491 sni)
Chris@19 5492 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5493 _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
Chris@19 5494 ;;
Chris@19 5495 siemens)
Chris@19 5496 ## LD is ld it makes a PLAMLIB
Chris@19 5497 ## CC just makes a GrossModule.
Chris@19 5498 _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5499 _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
Chris@19 5500 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@19 5501 ;;
Chris@19 5502 motorola)
Chris@19 5503 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5504 _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
Chris@19 5505 ;;
Chris@19 5506 esac
Chris@19 5507 runpath_var='LD_RUN_PATH'
Chris@19 5508 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5509 ;;
Chris@19 5510
Chris@19 5511 sysv4.3*)
Chris@19 5512 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5513 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5514 _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
Chris@19 5515 ;;
Chris@19 5516
Chris@19 5517 sysv4*MP*)
Chris@19 5518 if test -d /usr/nec; then
Chris@19 5519 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5520 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5521 runpath_var=LD_RUN_PATH
Chris@19 5522 hardcode_runpath_var=yes
Chris@19 5523 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@19 5524 fi
Chris@19 5525 ;;
Chris@19 5526
Chris@19 5527 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@19 5528 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
Chris@19 5529 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 5530 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5531 runpath_var='LD_RUN_PATH'
Chris@19 5532
Chris@19 5533 if test "$GCC" = yes; then
Chris@19 5534 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5535 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5536 else
Chris@19 5537 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5538 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5539 fi
Chris@19 5540 ;;
Chris@19 5541
Chris@19 5542 sysv5* | sco3.2v5* | sco5v6*)
Chris@19 5543 # Note: We can NOT use -z defs as we might desire, because we do not
Chris@19 5544 # link with -lc, and that would cause any symbols used from libc to
Chris@19 5545 # always be unresolved, which means just about no library would
Chris@19 5546 # ever link correctly. If we're not using GNU ld we use -z text
Chris@19 5547 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@19 5548 # as -z defs.
Chris@19 5549 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
Chris@19 5550 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
Chris@19 5551 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 5552 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5553 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
Chris@19 5554 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@19 5555 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 5556 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
Chris@19 5557 runpath_var='LD_RUN_PATH'
Chris@19 5558
Chris@19 5559 if test "$GCC" = yes; then
Chris@19 5560 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5561 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5562 else
Chris@19 5563 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5564 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 5565 fi
Chris@19 5566 ;;
Chris@19 5567
Chris@19 5568 uts4*)
Chris@19 5569 _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
Chris@19 5570 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@19 5571 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 5572 ;;
Chris@19 5573
Chris@19 5574 *)
Chris@19 5575 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 5576 ;;
Chris@19 5577 esac
Chris@19 5578
Chris@19 5579 if test x$host_vendor = xsni; then
Chris@19 5580 case $host in
Chris@19 5581 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
Chris@19 5582 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
Chris@19 5583 ;;
Chris@19 5584 esac
Chris@19 5585 fi
Chris@19 5586 fi
Chris@19 5587 ])
Chris@19 5588 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@19 5589 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
Chris@19 5590
Chris@19 5591 _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
Chris@19 5592
Chris@19 5593 _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
Chris@19 5594 _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
Chris@19 5595 _LT_DECL([], [extract_expsyms_cmds], [2],
Chris@19 5596 [The commands to extract the exported symbol list from a shared archive])
Chris@19 5597
Chris@19 5598 #
Chris@19 5599 # Do we need to explicitly link libc?
Chris@19 5600 #
Chris@19 5601 case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
Chris@19 5602 x|xyes)
Chris@19 5603 # Assume -lc should be added
Chris@19 5604 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@19 5605
Chris@19 5606 if test "$enable_shared" = yes && test "$GCC" = yes; then
Chris@19 5607 case $_LT_TAGVAR(archive_cmds, $1) in
Chris@19 5608 *'~'*)
Chris@19 5609 # FIXME: we may have to deal with multi-command sequences.
Chris@19 5610 ;;
Chris@19 5611 '$CC '*)
Chris@19 5612 # Test whether the compiler implicitly links with -lc since on some
Chris@19 5613 # systems, -lgcc has to come before -lc. If gcc already passes -lc
Chris@19 5614 # to ld, don't add -lc before -lgcc.
Chris@19 5615 AC_CACHE_CHECK([whether -lc should be explicitly linked in],
Chris@19 5616 [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
Chris@19 5617 [$RM conftest*
Chris@19 5618 echo "$lt_simple_compile_test_code" > conftest.$ac_ext
Chris@19 5619
Chris@19 5620 if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
Chris@19 5621 soname=conftest
Chris@19 5622 lib=conftest
Chris@19 5623 libobjs=conftest.$ac_objext
Chris@19 5624 deplibs=
Chris@19 5625 wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
Chris@19 5626 pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
Chris@19 5627 compiler_flags=-v
Chris@19 5628 linker_flags=-v
Chris@19 5629 verstring=
Chris@19 5630 output_objdir=.
Chris@19 5631 libname=conftest
Chris@19 5632 lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
Chris@19 5633 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@19 5634 if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
Chris@19 5635 then
Chris@19 5636 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 5637 else
Chris@19 5638 lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@19 5639 fi
Chris@19 5640 _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
Chris@19 5641 else
Chris@19 5642 cat conftest.err 1>&5
Chris@19 5643 fi
Chris@19 5644 $RM conftest*
Chris@19 5645 ])
Chris@19 5646 _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
Chris@19 5647 ;;
Chris@19 5648 esac
Chris@19 5649 fi
Chris@19 5650 ;;
Chris@19 5651 esac
Chris@19 5652
Chris@19 5653 _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
Chris@19 5654 [Whether or not to add -lc for building shared libraries])
Chris@19 5655 _LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
Chris@19 5656 [enable_shared_with_static_runtimes], [0],
Chris@19 5657 [Whether or not to disallow shared libs when runtime libs are static])
Chris@19 5658 _LT_TAGDECL([], [export_dynamic_flag_spec], [1],
Chris@19 5659 [Compiler flag to allow reflexive dlopens])
Chris@19 5660 _LT_TAGDECL([], [whole_archive_flag_spec], [1],
Chris@19 5661 [Compiler flag to generate shared objects directly from archives])
Chris@19 5662 _LT_TAGDECL([], [compiler_needs_object], [1],
Chris@19 5663 [Whether the compiler copes with passing no objects directly])
Chris@19 5664 _LT_TAGDECL([], [old_archive_from_new_cmds], [2],
Chris@19 5665 [Create an old-style archive from a shared archive])
Chris@19 5666 _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
Chris@19 5667 [Create a temporary old-style archive to link instead of a shared archive])
Chris@19 5668 _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
Chris@19 5669 _LT_TAGDECL([], [archive_expsym_cmds], [2])
Chris@19 5670 _LT_TAGDECL([], [module_cmds], [2],
Chris@19 5671 [Commands used to build a loadable module if different from building
Chris@19 5672 a shared archive.])
Chris@19 5673 _LT_TAGDECL([], [module_expsym_cmds], [2])
Chris@19 5674 _LT_TAGDECL([], [with_gnu_ld], [1],
Chris@19 5675 [Whether we are building with GNU ld or not])
Chris@19 5676 _LT_TAGDECL([], [allow_undefined_flag], [1],
Chris@19 5677 [Flag that allows shared libraries with undefined symbols to be built])
Chris@19 5678 _LT_TAGDECL([], [no_undefined_flag], [1],
Chris@19 5679 [Flag that enforces no undefined symbols])
Chris@19 5680 _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
Chris@19 5681 [Flag to hardcode $libdir into a binary during linking.
Chris@19 5682 This must work even if $libdir does not exist])
Chris@19 5683 _LT_TAGDECL([], [hardcode_libdir_separator], [1],
Chris@19 5684 [Whether we need a single "-rpath" flag with a separated argument])
Chris@19 5685 _LT_TAGDECL([], [hardcode_direct], [0],
Chris@19 5686 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
Chris@19 5687 DIR into the resulting binary])
Chris@19 5688 _LT_TAGDECL([], [hardcode_direct_absolute], [0],
Chris@19 5689 [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
Chris@19 5690 DIR into the resulting binary and the resulting library dependency is
Chris@19 5691 "absolute", i.e impossible to change by setting ${shlibpath_var} if the
Chris@19 5692 library is relocated])
Chris@19 5693 _LT_TAGDECL([], [hardcode_minus_L], [0],
Chris@19 5694 [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
Chris@19 5695 into the resulting binary])
Chris@19 5696 _LT_TAGDECL([], [hardcode_shlibpath_var], [0],
Chris@19 5697 [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
Chris@19 5698 into the resulting binary])
Chris@19 5699 _LT_TAGDECL([], [hardcode_automatic], [0],
Chris@19 5700 [Set to "yes" if building a shared library automatically hardcodes DIR
Chris@19 5701 into the library and all subsequent libraries and executables linked
Chris@19 5702 against it])
Chris@19 5703 _LT_TAGDECL([], [inherit_rpath], [0],
Chris@19 5704 [Set to yes if linker adds runtime paths of dependent libraries
Chris@19 5705 to runtime path list])
Chris@19 5706 _LT_TAGDECL([], [link_all_deplibs], [0],
Chris@19 5707 [Whether libtool must link a program against all its dependency libraries])
Chris@19 5708 _LT_TAGDECL([], [always_export_symbols], [0],
Chris@19 5709 [Set to "yes" if exported symbols are required])
Chris@19 5710 _LT_TAGDECL([], [export_symbols_cmds], [2],
Chris@19 5711 [The commands to list exported symbols])
Chris@19 5712 _LT_TAGDECL([], [exclude_expsyms], [1],
Chris@19 5713 [Symbols that should not be listed in the preloaded symbols])
Chris@19 5714 _LT_TAGDECL([], [include_expsyms], [1],
Chris@19 5715 [Symbols that must always be exported])
Chris@19 5716 _LT_TAGDECL([], [prelink_cmds], [2],
Chris@19 5717 [Commands necessary for linking programs (against libraries) with templates])
Chris@19 5718 _LT_TAGDECL([], [postlink_cmds], [2],
Chris@19 5719 [Commands necessary for finishing linking programs])
Chris@19 5720 _LT_TAGDECL([], [file_list_spec], [1],
Chris@19 5721 [Specify filename containing input files])
Chris@19 5722 dnl FIXME: Not yet implemented
Chris@19 5723 dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
Chris@19 5724 dnl [Compiler flag to generate thread safe objects])
Chris@19 5725 ])# _LT_LINKER_SHLIBS
Chris@19 5726
Chris@19 5727
Chris@19 5728 # _LT_LANG_C_CONFIG([TAG])
Chris@19 5729 # ------------------------
Chris@19 5730 # Ensure that the configuration variables for a C compiler are suitably
Chris@19 5731 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@19 5732 # the compiler configuration to `libtool'.
Chris@19 5733 m4_defun([_LT_LANG_C_CONFIG],
Chris@19 5734 [m4_require([_LT_DECL_EGREP])dnl
Chris@19 5735 lt_save_CC="$CC"
Chris@19 5736 AC_LANG_PUSH(C)
Chris@19 5737
Chris@19 5738 # Source file extension for C test sources.
Chris@19 5739 ac_ext=c
Chris@19 5740
Chris@19 5741 # Object file extension for compiled C test sources.
Chris@19 5742 objext=o
Chris@19 5743 _LT_TAGVAR(objext, $1)=$objext
Chris@19 5744
Chris@19 5745 # Code to be used in simple compile tests
Chris@19 5746 lt_simple_compile_test_code="int some_variable = 0;"
Chris@19 5747
Chris@19 5748 # Code to be used in simple link tests
Chris@19 5749 lt_simple_link_test_code='int main(){return(0);}'
Chris@19 5750
Chris@19 5751 _LT_TAG_COMPILER
Chris@19 5752 # Save the default compiler, since it gets overwritten when the other
Chris@19 5753 # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
Chris@19 5754 compiler_DEFAULT=$CC
Chris@19 5755
Chris@19 5756 # save warnings/boilerplate of simple test code
Chris@19 5757 _LT_COMPILER_BOILERPLATE
Chris@19 5758 _LT_LINKER_BOILERPLATE
Chris@19 5759
Chris@19 5760 ## CAVEAT EMPTOR:
Chris@19 5761 ## There is no encapsulation within the following macros, do not change
Chris@19 5762 ## the running order or otherwise move them around unless you know exactly
Chris@19 5763 ## what you are doing...
Chris@19 5764 if test -n "$compiler"; then
Chris@19 5765 _LT_COMPILER_NO_RTTI($1)
Chris@19 5766 _LT_COMPILER_PIC($1)
Chris@19 5767 _LT_COMPILER_C_O($1)
Chris@19 5768 _LT_COMPILER_FILE_LOCKS($1)
Chris@19 5769 _LT_LINKER_SHLIBS($1)
Chris@19 5770 _LT_SYS_DYNAMIC_LINKER($1)
Chris@19 5771 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@19 5772 LT_SYS_DLOPEN_SELF
Chris@19 5773 _LT_CMD_STRIPLIB
Chris@19 5774
Chris@19 5775 # Report which library types will actually be built
Chris@19 5776 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@19 5777 AC_MSG_RESULT([$can_build_shared])
Chris@19 5778
Chris@19 5779 AC_MSG_CHECKING([whether to build shared libraries])
Chris@19 5780 test "$can_build_shared" = "no" && enable_shared=no
Chris@19 5781
Chris@19 5782 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@19 5783 # are all built from PIC.
Chris@19 5784 case $host_os in
Chris@19 5785 aix3*)
Chris@19 5786 test "$enable_shared" = yes && enable_static=no
Chris@19 5787 if test -n "$RANLIB"; then
Chris@19 5788 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@19 5789 postinstall_cmds='$RANLIB $lib'
Chris@19 5790 fi
Chris@19 5791 ;;
Chris@19 5792
Chris@19 5793 aix[[4-9]]*)
Chris@19 5794 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
Chris@19 5795 test "$enable_shared" = yes && enable_static=no
Chris@19 5796 fi
Chris@19 5797 ;;
Chris@19 5798 esac
Chris@19 5799 AC_MSG_RESULT([$enable_shared])
Chris@19 5800
Chris@19 5801 AC_MSG_CHECKING([whether to build static libraries])
Chris@19 5802 # Make sure either enable_shared or enable_static is yes.
Chris@19 5803 test "$enable_shared" = yes || enable_static=yes
Chris@19 5804 AC_MSG_RESULT([$enable_static])
Chris@19 5805
Chris@19 5806 _LT_CONFIG($1)
Chris@19 5807 fi
Chris@19 5808 AC_LANG_POP
Chris@19 5809 CC="$lt_save_CC"
Chris@19 5810 ])# _LT_LANG_C_CONFIG
Chris@19 5811
Chris@19 5812
Chris@19 5813 # _LT_LANG_CXX_CONFIG([TAG])
Chris@19 5814 # --------------------------
Chris@19 5815 # Ensure that the configuration variables for a C++ compiler are suitably
Chris@19 5816 # defined. These variables are subsequently used by _LT_CONFIG to write
Chris@19 5817 # the compiler configuration to `libtool'.
Chris@19 5818 m4_defun([_LT_LANG_CXX_CONFIG],
Chris@19 5819 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@19 5820 m4_require([_LT_DECL_EGREP])dnl
Chris@19 5821 m4_require([_LT_PATH_MANIFEST_TOOL])dnl
Chris@19 5822 if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
Chris@19 5823 ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
Chris@19 5824 (test "X$CXX" != "Xg++"))) ; then
Chris@19 5825 AC_PROG_CXXCPP
Chris@19 5826 else
Chris@19 5827 _lt_caught_CXX_error=yes
Chris@19 5828 fi
Chris@19 5829
Chris@19 5830 AC_LANG_PUSH(C++)
Chris@19 5831 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 5832 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@19 5833 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@19 5834 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@19 5835 _LT_TAGVAR(compiler_needs_object, $1)=no
Chris@19 5836 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@19 5837 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@19 5838 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@19 5839 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@19 5840 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@19 5841 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@19 5842 _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
Chris@19 5843 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@19 5844 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@19 5845 _LT_TAGVAR(module_cmds, $1)=
Chris@19 5846 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@19 5847 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@19 5848 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@19 5849 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@19 5850 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@19 5851 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@19 5852 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@19 5853 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@19 5854
Chris@19 5855 # Source file extension for C++ test sources.
Chris@19 5856 ac_ext=cpp
Chris@19 5857
Chris@19 5858 # Object file extension for compiled C++ test sources.
Chris@19 5859 objext=o
Chris@19 5860 _LT_TAGVAR(objext, $1)=$objext
Chris@19 5861
Chris@19 5862 # No sense in running all these tests if we already determined that
Chris@19 5863 # the CXX compiler isn't working. Some variables (like enable_shared)
Chris@19 5864 # are currently assumed to apply to all compilers on this platform,
Chris@19 5865 # and will be corrupted by setting them based on a non-working compiler.
Chris@19 5866 if test "$_lt_caught_CXX_error" != yes; then
Chris@19 5867 # Code to be used in simple compile tests
Chris@19 5868 lt_simple_compile_test_code="int some_variable = 0;"
Chris@19 5869
Chris@19 5870 # Code to be used in simple link tests
Chris@19 5871 lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
Chris@19 5872
Chris@19 5873 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@19 5874 _LT_TAG_COMPILER
Chris@19 5875
Chris@19 5876 # save warnings/boilerplate of simple test code
Chris@19 5877 _LT_COMPILER_BOILERPLATE
Chris@19 5878 _LT_LINKER_BOILERPLATE
Chris@19 5879
Chris@19 5880 # Allow CC to be a program name with arguments.
Chris@19 5881 lt_save_CC=$CC
Chris@19 5882 lt_save_CFLAGS=$CFLAGS
Chris@19 5883 lt_save_LD=$LD
Chris@19 5884 lt_save_GCC=$GCC
Chris@19 5885 GCC=$GXX
Chris@19 5886 lt_save_with_gnu_ld=$with_gnu_ld
Chris@19 5887 lt_save_path_LD=$lt_cv_path_LD
Chris@19 5888 if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
Chris@19 5889 lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
Chris@19 5890 else
Chris@19 5891 $as_unset lt_cv_prog_gnu_ld
Chris@19 5892 fi
Chris@19 5893 if test -n "${lt_cv_path_LDCXX+set}"; then
Chris@19 5894 lt_cv_path_LD=$lt_cv_path_LDCXX
Chris@19 5895 else
Chris@19 5896 $as_unset lt_cv_path_LD
Chris@19 5897 fi
Chris@19 5898 test -z "${LDCXX+set}" || LD=$LDCXX
Chris@19 5899 CC=${CXX-"c++"}
Chris@19 5900 CFLAGS=$CXXFLAGS
Chris@19 5901 compiler=$CC
Chris@19 5902 _LT_TAGVAR(compiler, $1)=$CC
Chris@19 5903 _LT_CC_BASENAME([$compiler])
Chris@19 5904
Chris@19 5905 if test -n "$compiler"; then
Chris@19 5906 # We don't want -fno-exception when compiling C++ code, so set the
Chris@19 5907 # no_builtin_flag separately
Chris@19 5908 if test "$GXX" = yes; then
Chris@19 5909 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
Chris@19 5910 else
Chris@19 5911 _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
Chris@19 5912 fi
Chris@19 5913
Chris@19 5914 if test "$GXX" = yes; then
Chris@19 5915 # Set up default GNU C++ configuration
Chris@19 5916
Chris@19 5917 LT_PATH_LD
Chris@19 5918
Chris@19 5919 # Check if GNU C++ uses GNU ld as the underlying linker, since the
Chris@19 5920 # archiving commands below assume that GNU ld is being used.
Chris@19 5921 if test "$with_gnu_ld" = yes; then
Chris@19 5922 _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 5923 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
Chris@19 5924
Chris@19 5925 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 5926 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@19 5927
Chris@19 5928 # If archive_cmds runs LD, not CC, wlarc should be empty
Chris@19 5929 # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
Chris@19 5930 # investigate it a little bit more. (MM)
Chris@19 5931 wlarc='${wl}'
Chris@19 5932
Chris@19 5933 # ancient GNU ld didn't support --whole-archive et. al.
Chris@19 5934 if eval "`$CC -print-prog-name=ld` --help 2>&1" |
Chris@19 5935 $GREP 'no-whole-archive' > /dev/null; then
Chris@19 5936 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
Chris@19 5937 else
Chris@19 5938 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@19 5939 fi
Chris@19 5940 else
Chris@19 5941 with_gnu_ld=no
Chris@19 5942 wlarc=
Chris@19 5943
Chris@19 5944 # A generic and very simple default shared library creation
Chris@19 5945 # command for GNU C++ for the case where it uses the native
Chris@19 5946 # linker, instead of GNU ld. If possible, this setting should
Chris@19 5947 # overridden to take advantage of the native linker features on
Chris@19 5948 # the platform it is being used on.
Chris@19 5949 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@19 5950 fi
Chris@19 5951
Chris@19 5952 # Commands to make compiler produce verbose output that lists
Chris@19 5953 # what "hidden" libraries, object files and flags are used when
Chris@19 5954 # linking a shared library.
Chris@19 5955 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@19 5956
Chris@19 5957 else
Chris@19 5958 GXX=no
Chris@19 5959 with_gnu_ld=no
Chris@19 5960 wlarc=
Chris@19 5961 fi
Chris@19 5962
Chris@19 5963 # PORTME: fill in a description of your system's C++ link characteristics
Chris@19 5964 AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
Chris@19 5965 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@19 5966 case $host_os in
Chris@19 5967 aix3*)
Chris@19 5968 # FIXME: insert proper C++ library support
Chris@19 5969 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 5970 ;;
Chris@19 5971 aix[[4-9]]*)
Chris@19 5972 if test "$host_cpu" = ia64; then
Chris@19 5973 # On IA64, the linker does run time linking by default, so we don't
Chris@19 5974 # have to do anything special.
Chris@19 5975 aix_use_runtimelinking=no
Chris@19 5976 exp_sym_flag='-Bexport'
Chris@19 5977 no_entry_flag=""
Chris@19 5978 else
Chris@19 5979 aix_use_runtimelinking=no
Chris@19 5980
Chris@19 5981 # Test if we are trying to use run time linking or normal
Chris@19 5982 # AIX style linking. If -brtl is somewhere in LDFLAGS, we
Chris@19 5983 # need to do runtime linking.
Chris@19 5984 case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
Chris@19 5985 for ld_flag in $LDFLAGS; do
Chris@19 5986 case $ld_flag in
Chris@19 5987 *-brtl*)
Chris@19 5988 aix_use_runtimelinking=yes
Chris@19 5989 break
Chris@19 5990 ;;
Chris@19 5991 esac
Chris@19 5992 done
Chris@19 5993 ;;
Chris@19 5994 esac
Chris@19 5995
Chris@19 5996 exp_sym_flag='-bexport'
Chris@19 5997 no_entry_flag='-bnoentry'
Chris@19 5998 fi
Chris@19 5999
Chris@19 6000 # When large executables or shared objects are built, AIX ld can
Chris@19 6001 # have problems creating the table of contents. If linking a library
Chris@19 6002 # or program results in "error TOC overflow" add -mminimal-toc to
Chris@19 6003 # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
Chris@19 6004 # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
Chris@19 6005
Chris@19 6006 _LT_TAGVAR(archive_cmds, $1)=''
Chris@19 6007 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 6008 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@19 6009 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@19 6010 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 6011 _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
Chris@19 6012
Chris@19 6013 if test "$GXX" = yes; then
Chris@19 6014 case $host_os in aix4.[[012]]|aix4.[[012]].*)
Chris@19 6015 # We only want to do this on AIX 4.2 and lower, the check
Chris@19 6016 # below for broken collect2 doesn't work under 4.3+
Chris@19 6017 collect2name=`${CC} -print-prog-name=collect2`
Chris@19 6018 if test -f "$collect2name" &&
Chris@19 6019 strings "$collect2name" | $GREP resolve_lib_name >/dev/null
Chris@19 6020 then
Chris@19 6021 # We have reworked collect2
Chris@19 6022 :
Chris@19 6023 else
Chris@19 6024 # We have old collect2
Chris@19 6025 _LT_TAGVAR(hardcode_direct, $1)=unsupported
Chris@19 6026 # It fails to find uninstalled libraries when the uninstalled
Chris@19 6027 # path is not listed in the libpath. Setting hardcode_minus_L
Chris@19 6028 # to unsupported forces relinking
Chris@19 6029 _LT_TAGVAR(hardcode_minus_L, $1)=yes
Chris@19 6030 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@19 6031 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@19 6032 fi
Chris@19 6033 esac
Chris@19 6034 shared_flag='-shared'
Chris@19 6035 if test "$aix_use_runtimelinking" = yes; then
Chris@19 6036 shared_flag="$shared_flag "'${wl}-G'
Chris@19 6037 fi
Chris@19 6038 else
Chris@19 6039 # not using gcc
Chris@19 6040 if test "$host_cpu" = ia64; then
Chris@19 6041 # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
Chris@19 6042 # chokes on -Wl,-G. The following line is correct:
Chris@19 6043 shared_flag='-G'
Chris@19 6044 else
Chris@19 6045 if test "$aix_use_runtimelinking" = yes; then
Chris@19 6046 shared_flag='${wl}-G'
Chris@19 6047 else
Chris@19 6048 shared_flag='${wl}-bM:SRE'
Chris@19 6049 fi
Chris@19 6050 fi
Chris@19 6051 fi
Chris@19 6052
Chris@19 6053 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
Chris@19 6054 # It seems that -bexpall does not export symbols beginning with
Chris@19 6055 # underscore (_), so it is better to generate a list of symbols to
Chris@19 6056 # export.
Chris@19 6057 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@19 6058 if test "$aix_use_runtimelinking" = yes; then
Chris@19 6059 # Warning - without using the other runtime loading flags (-brtl),
Chris@19 6060 # -berok will link without error, but may produce a broken library.
Chris@19 6061 _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
Chris@19 6062 # Determine the default libpath from the value encoded in an empty
Chris@19 6063 # executable.
Chris@19 6064 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@19 6065 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@19 6066
Chris@19 6067 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
Chris@19 6068 else
Chris@19 6069 if test "$host_cpu" = ia64; then
Chris@19 6070 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
Chris@19 6071 _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
Chris@19 6072 _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"
Chris@19 6073 else
Chris@19 6074 # Determine the default libpath from the value encoded in an
Chris@19 6075 # empty executable.
Chris@19 6076 _LT_SYS_MODULE_PATH_AIX([$1])
Chris@19 6077 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
Chris@19 6078 # Warning - without using the other run time loading flags,
Chris@19 6079 # -berok will link without error, but may produce a broken library.
Chris@19 6080 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
Chris@19 6081 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
Chris@19 6082 if test "$with_gnu_ld" = yes; then
Chris@19 6083 # We only use this code for GNU lds that support --whole-archive.
Chris@19 6084 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
Chris@19 6085 else
Chris@19 6086 # Exported symbols can be pulled into shared objects from archives
Chris@19 6087 _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
Chris@19 6088 fi
Chris@19 6089 _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
Chris@19 6090 # This is similar to how AIX traditionally builds its shared
Chris@19 6091 # libraries.
Chris@19 6092 _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'
Chris@19 6093 fi
Chris@19 6094 fi
Chris@19 6095 ;;
Chris@19 6096
Chris@19 6097 beos*)
Chris@19 6098 if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
Chris@19 6099 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@19 6100 # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
Chris@19 6101 # support --undefined. This deserves some investigation. FIXME
Chris@19 6102 _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 6103 else
Chris@19 6104 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6105 fi
Chris@19 6106 ;;
Chris@19 6107
Chris@19 6108 chorus*)
Chris@19 6109 case $cc_basename in
Chris@19 6110 *)
Chris@19 6111 # FIXME: insert proper C++ library support
Chris@19 6112 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6113 ;;
Chris@19 6114 esac
Chris@19 6115 ;;
Chris@19 6116
Chris@19 6117 cygwin* | mingw* | pw32* | cegcc*)
Chris@19 6118 case $GXX,$cc_basename in
Chris@19 6119 ,cl* | no,cl*)
Chris@19 6120 # Native MSVC
Chris@19 6121 # hardcode_libdir_flag_spec is actually meaningless, as there is
Chris@19 6122 # no search path for DLLs.
Chris@19 6123 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
Chris@19 6124 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@19 6125 _LT_TAGVAR(always_export_symbols, $1)=yes
Chris@19 6126 _LT_TAGVAR(file_list_spec, $1)='@'
Chris@19 6127 # Tell ltmain to make .lib files, not .a files.
Chris@19 6128 libext=lib
Chris@19 6129 # Tell ltmain to make .dll files, not .so files.
Chris@19 6130 shrext_cmds=".dll"
Chris@19 6131 # FIXME: Setting linknames here is a bad hack.
Chris@19 6132 _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
Chris@19 6133 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Chris@19 6134 $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
Chris@19 6135 else
Chris@19 6136 $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
Chris@19 6137 fi~
Chris@19 6138 $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
Chris@19 6139 linknames='
Chris@19 6140 # The linker will not automatically build a static lib if we build a DLL.
Chris@19 6141 # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
Chris@19 6142 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@19 6143 # Don't use ranlib
Chris@19 6144 _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
Chris@19 6145 _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
Chris@19 6146 lt_tool_outputfile="@TOOL_OUTPUT@"~
Chris@19 6147 case $lt_outputfile in
Chris@19 6148 *.exe|*.EXE) ;;
Chris@19 6149 *)
Chris@19 6150 lt_outputfile="$lt_outputfile.exe"
Chris@19 6151 lt_tool_outputfile="$lt_tool_outputfile.exe"
Chris@19 6152 ;;
Chris@19 6153 esac~
Chris@19 6154 func_to_tool_file "$lt_outputfile"~
Chris@19 6155 if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
Chris@19 6156 $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
Chris@19 6157 $RM "$lt_outputfile.manifest";
Chris@19 6158 fi'
Chris@19 6159 ;;
Chris@19 6160 *)
Chris@19 6161 # g++
Chris@19 6162 # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
Chris@19 6163 # as there is no search path for DLLs.
Chris@19 6164 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
Chris@19 6165 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
Chris@19 6166 _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
Chris@19 6167 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@19 6168 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
Chris@19 6169
Chris@19 6170 if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
Chris@19 6171 _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'
Chris@19 6172 # If the export-symbols file already is a .def file (1st line
Chris@19 6173 # is EXPORTS), use it as is; otherwise, prepend...
Chris@19 6174 _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
Chris@19 6175 cp $export_symbols $output_objdir/$soname.def;
Chris@19 6176 else
Chris@19 6177 echo EXPORTS > $output_objdir/$soname.def;
Chris@19 6178 cat $export_symbols >> $output_objdir/$soname.def;
Chris@19 6179 fi~
Chris@19 6180 $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'
Chris@19 6181 else
Chris@19 6182 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6183 fi
Chris@19 6184 ;;
Chris@19 6185 esac
Chris@19 6186 ;;
Chris@19 6187 darwin* | rhapsody*)
Chris@19 6188 _LT_DARWIN_LINKER_FEATURES($1)
Chris@19 6189 ;;
Chris@19 6190
Chris@19 6191 dgux*)
Chris@19 6192 case $cc_basename in
Chris@19 6193 ec++*)
Chris@19 6194 # FIXME: insert proper C++ library support
Chris@19 6195 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6196 ;;
Chris@19 6197 ghcx*)
Chris@19 6198 # Green Hills C++ Compiler
Chris@19 6199 # FIXME: insert proper C++ library support
Chris@19 6200 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6201 ;;
Chris@19 6202 *)
Chris@19 6203 # FIXME: insert proper C++ library support
Chris@19 6204 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6205 ;;
Chris@19 6206 esac
Chris@19 6207 ;;
Chris@19 6208
Chris@19 6209 freebsd2.*)
Chris@19 6210 # C++ shared libraries reported to be fairly broken before
Chris@19 6211 # switch to ELF
Chris@19 6212 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6213 ;;
Chris@19 6214
Chris@19 6215 freebsd-elf*)
Chris@19 6216 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 6217 ;;
Chris@19 6218
Chris@19 6219 freebsd* | dragonfly*)
Chris@19 6220 # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
Chris@19 6221 # conventions
Chris@19 6222 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@19 6223 ;;
Chris@19 6224
Chris@19 6225 gnu*)
Chris@19 6226 ;;
Chris@19 6227
Chris@19 6228 haiku*)
Chris@19 6229 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 6230 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 6231 ;;
Chris@19 6232
Chris@19 6233 hpux9*)
Chris@19 6234 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@19 6235 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 6236 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@19 6237 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 6238 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@19 6239 # but as the default
Chris@19 6240 # location of the library.
Chris@19 6241
Chris@19 6242 case $cc_basename in
Chris@19 6243 CC*)
Chris@19 6244 # FIXME: insert proper C++ library support
Chris@19 6245 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6246 ;;
Chris@19 6247 aCC*)
Chris@19 6248 _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'
Chris@19 6249 # Commands to make compiler produce verbose output that lists
Chris@19 6250 # what "hidden" libraries, object files and flags are used when
Chris@19 6251 # linking a shared library.
Chris@19 6252 #
Chris@19 6253 # There doesn't appear to be a way to prevent this compiler from
Chris@19 6254 # explicitly linking system object files so we need to strip them
Chris@19 6255 # from the output so that they don't get included in the library
Chris@19 6256 # dependencies.
Chris@19 6257 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
Chris@19 6258 ;;
Chris@19 6259 *)
Chris@19 6260 if test "$GXX" = yes; then
Chris@19 6261 _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
Chris@19 6262 else
Chris@19 6263 # FIXME: insert proper C++ library support
Chris@19 6264 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6265 fi
Chris@19 6266 ;;
Chris@19 6267 esac
Chris@19 6268 ;;
Chris@19 6269
Chris@19 6270 hpux10*|hpux11*)
Chris@19 6271 if test $with_gnu_ld = no; then
Chris@19 6272 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
Chris@19 6273 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 6274
Chris@19 6275 case $host_cpu in
Chris@19 6276 hppa*64*|ia64*)
Chris@19 6277 ;;
Chris@19 6278 *)
Chris@19 6279 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@19 6280 ;;
Chris@19 6281 esac
Chris@19 6282 fi
Chris@19 6283 case $host_cpu in
Chris@19 6284 hppa*64*|ia64*)
Chris@19 6285 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@19 6286 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 6287 ;;
Chris@19 6288 *)
Chris@19 6289 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 6290 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@19 6291 _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
Chris@19 6292 # but as the default
Chris@19 6293 # location of the library.
Chris@19 6294 ;;
Chris@19 6295 esac
Chris@19 6296
Chris@19 6297 case $cc_basename in
Chris@19 6298 CC*)
Chris@19 6299 # FIXME: insert proper C++ library support
Chris@19 6300 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6301 ;;
Chris@19 6302 aCC*)
Chris@19 6303 case $host_cpu in
Chris@19 6304 hppa*64*)
Chris@19 6305 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@19 6306 ;;
Chris@19 6307 ia64*)
Chris@19 6308 _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@19 6309 ;;
Chris@19 6310 *)
Chris@19 6311 _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'
Chris@19 6312 ;;
Chris@19 6313 esac
Chris@19 6314 # Commands to make compiler produce verbose output that lists
Chris@19 6315 # what "hidden" libraries, object files and flags are used when
Chris@19 6316 # linking a shared library.
Chris@19 6317 #
Chris@19 6318 # There doesn't appear to be a way to prevent this compiler from
Chris@19 6319 # explicitly linking system object files so we need to strip them
Chris@19 6320 # from the output so that they don't get included in the library
Chris@19 6321 # dependencies.
Chris@19 6322 output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
Chris@19 6323 ;;
Chris@19 6324 *)
Chris@19 6325 if test "$GXX" = yes; then
Chris@19 6326 if test $with_gnu_ld = no; then
Chris@19 6327 case $host_cpu in
Chris@19 6328 hppa*64*)
Chris@19 6329 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@19 6330 ;;
Chris@19 6331 ia64*)
Chris@19 6332 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@19 6333 ;;
Chris@19 6334 *)
Chris@19 6335 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@19 6336 ;;
Chris@19 6337 esac
Chris@19 6338 fi
Chris@19 6339 else
Chris@19 6340 # FIXME: insert proper C++ library support
Chris@19 6341 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6342 fi
Chris@19 6343 ;;
Chris@19 6344 esac
Chris@19 6345 ;;
Chris@19 6346
Chris@19 6347 interix[[3-9]]*)
Chris@19 6348 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@19 6349 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 6350 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@19 6351 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@19 6352 # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
Chris@19 6353 # Instead, shared libraries are loaded at an image base (0x10000000 by
Chris@19 6354 # default) and relocated if they conflict, which is a slow very memory
Chris@19 6355 # consuming and fragmenting process. To avoid this, we pick a random,
Chris@19 6356 # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
Chris@19 6357 # time. Moving up from 0x10000000 also allows more sbrk(2) space.
Chris@19 6358 _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'
Chris@19 6359 _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'
Chris@19 6360 ;;
Chris@19 6361 irix5* | irix6*)
Chris@19 6362 case $cc_basename in
Chris@19 6363 CC*)
Chris@19 6364 # SGI C++
Chris@19 6365 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
Chris@19 6366
Chris@19 6367 # Archives containing C++ object files must be created using
Chris@19 6368 # "CC -ar", where "CC" is the IRIX C++ compiler. This is
Chris@19 6369 # necessary to make sure instantiated templates are included
Chris@19 6370 # in the archive.
Chris@19 6371 _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
Chris@19 6372 ;;
Chris@19 6373 *)
Chris@19 6374 if test "$GXX" = yes; then
Chris@19 6375 if test "$with_gnu_ld" = no; then
Chris@19 6376 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
Chris@19 6377 else
Chris@19 6378 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
Chris@19 6379 fi
Chris@19 6380 fi
Chris@19 6381 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 6382 ;;
Chris@19 6383 esac
Chris@19 6384 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 6385 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 6386 _LT_TAGVAR(inherit_rpath, $1)=yes
Chris@19 6387 ;;
Chris@19 6388
Chris@19 6389 linux* | k*bsd*-gnu | kopensolaris*-gnu)
Chris@19 6390 case $cc_basename in
Chris@19 6391 KCC*)
Chris@19 6392 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@19 6393
Chris@19 6394 # KCC will only create a shared library if the output file
Chris@19 6395 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@19 6396 # to its proper name (with version) after linking.
Chris@19 6397 _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'
Chris@19 6398 _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'
Chris@19 6399 # Commands to make compiler produce verbose output that lists
Chris@19 6400 # what "hidden" libraries, object files and flags are used when
Chris@19 6401 # linking a shared library.
Chris@19 6402 #
Chris@19 6403 # There doesn't appear to be a way to prevent this compiler from
Chris@19 6404 # explicitly linking system object files so we need to strip them
Chris@19 6405 # from the output so that they don't get included in the library
Chris@19 6406 # dependencies.
Chris@19 6407 output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
Chris@19 6408
Chris@19 6409 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@19 6410 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@19 6411
Chris@19 6412 # Archives containing C++ object files must be created using
Chris@19 6413 # "CC -Bstatic", where "CC" is the KAI C++ compiler.
Chris@19 6414 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
Chris@19 6415 ;;
Chris@19 6416 icpc* | ecpc* )
Chris@19 6417 # Intel C++
Chris@19 6418 with_gnu_ld=yes
Chris@19 6419 # version 8.0 and above of icpc choke on multiply defined symbols
Chris@19 6420 # if we add $predep_objects and $postdep_objects, however 7.1 and
Chris@19 6421 # earlier do not add the objects themselves.
Chris@19 6422 case `$CC -V 2>&1` in
Chris@19 6423 *"Version 7."*)
Chris@19 6424 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 6425 _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'
Chris@19 6426 ;;
Chris@19 6427 *) # Version 8.0 or newer
Chris@19 6428 tmp_idyn=
Chris@19 6429 case $host_cpu in
Chris@19 6430 ia64*) tmp_idyn=' -i_dynamic';;
Chris@19 6431 esac
Chris@19 6432 _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 6433 _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'
Chris@19 6434 ;;
Chris@19 6435 esac
Chris@19 6436 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 6437 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@19 6438 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@19 6439 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
Chris@19 6440 ;;
Chris@19 6441 pgCC* | pgcpp*)
Chris@19 6442 # Portland Group C++ compiler
Chris@19 6443 case `$CC -V` in
Chris@19 6444 *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
Chris@19 6445 _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
Chris@19 6446 rm -rf $tpldir~
Chris@19 6447 $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
Chris@19 6448 compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
Chris@19 6449 _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
Chris@19 6450 rm -rf $tpldir~
Chris@19 6451 $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
Chris@19 6452 $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
Chris@19 6453 $RANLIB $oldlib'
Chris@19 6454 _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
Chris@19 6455 rm -rf $tpldir~
Chris@19 6456 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@19 6457 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
Chris@19 6458 _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
Chris@19 6459 rm -rf $tpldir~
Chris@19 6460 $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
Chris@19 6461 $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
Chris@19 6462 ;;
Chris@19 6463 *) # Version 6 and above use weak symbols
Chris@19 6464 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
Chris@19 6465 _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'
Chris@19 6466 ;;
Chris@19 6467 esac
Chris@19 6468
Chris@19 6469 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
Chris@19 6470 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@19 6471 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
Chris@19 6472 ;;
Chris@19 6473 cxx*)
Chris@19 6474 # Compaq C++
Chris@19 6475 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 6476 _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'
Chris@19 6477
Chris@19 6478 runpath_var=LD_RUN_PATH
Chris@19 6479 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@19 6480 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 6481
Chris@19 6482 # Commands to make compiler produce verbose output that lists
Chris@19 6483 # what "hidden" libraries, object files and flags are used when
Chris@19 6484 # linking a shared library.
Chris@19 6485 #
Chris@19 6486 # There doesn't appear to be a way to prevent this compiler from
Chris@19 6487 # explicitly linking system object files so we need to strip them
Chris@19 6488 # from the output so that they don't get included in the library
Chris@19 6489 # dependencies.
Chris@19 6490 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
Chris@19 6491 ;;
Chris@19 6492 xl* | mpixl* | bgxl*)
Chris@19 6493 # IBM XL 8.0 on PPC, with GNU ld
Chris@19 6494 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 6495 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
Chris@19 6496 _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
Chris@19 6497 if test "x$supports_anon_versioning" = xyes; then
Chris@19 6498 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
Chris@19 6499 cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
Chris@19 6500 echo "local: *; };" >> $output_objdir/$libname.ver~
Chris@19 6501 $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
Chris@19 6502 fi
Chris@19 6503 ;;
Chris@19 6504 *)
Chris@19 6505 case `$CC -V 2>&1 | sed 5q` in
Chris@19 6506 *Sun\ C*)
Chris@19 6507 # Sun C++ 5.9
Chris@19 6508 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@19 6509 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@19 6510 _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'
Chris@19 6511 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@19 6512 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
Chris@19 6513 _LT_TAGVAR(compiler_needs_object, $1)=yes
Chris@19 6514
Chris@19 6515 # Not sure whether something based on
Chris@19 6516 # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
Chris@19 6517 # would be better.
Chris@19 6518 output_verbose_link_cmd='func_echo_all'
Chris@19 6519
Chris@19 6520 # Archives containing C++ object files must be created using
Chris@19 6521 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@19 6522 # necessary to make sure instantiated templates are included
Chris@19 6523 # in the archive.
Chris@19 6524 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@19 6525 ;;
Chris@19 6526 esac
Chris@19 6527 ;;
Chris@19 6528 esac
Chris@19 6529 ;;
Chris@19 6530
Chris@19 6531 lynxos*)
Chris@19 6532 # FIXME: insert proper C++ library support
Chris@19 6533 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6534 ;;
Chris@19 6535
Chris@19 6536 m88k*)
Chris@19 6537 # FIXME: insert proper C++ library support
Chris@19 6538 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6539 ;;
Chris@19 6540
Chris@19 6541 mvs*)
Chris@19 6542 case $cc_basename in
Chris@19 6543 cxx*)
Chris@19 6544 # FIXME: insert proper C++ library support
Chris@19 6545 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6546 ;;
Chris@19 6547 *)
Chris@19 6548 # FIXME: insert proper C++ library support
Chris@19 6549 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6550 ;;
Chris@19 6551 esac
Chris@19 6552 ;;
Chris@19 6553
Chris@19 6554 netbsd*)
Chris@19 6555 if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
Chris@19 6556 _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
Chris@19 6557 wlarc=
Chris@19 6558 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@19 6559 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 6560 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 6561 fi
Chris@19 6562 # Workaround some broken pre-1.5 toolchains
Chris@19 6563 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
Chris@19 6564 ;;
Chris@19 6565
Chris@19 6566 *nto* | *qnx*)
Chris@19 6567 _LT_TAGVAR(ld_shlibs, $1)=yes
Chris@19 6568 ;;
Chris@19 6569
Chris@19 6570 openbsd2*)
Chris@19 6571 # C++ shared libraries are fairly broken
Chris@19 6572 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6573 ;;
Chris@19 6574
Chris@19 6575 openbsd*)
Chris@19 6576 if test -f /usr/libexec/ld.so; then
Chris@19 6577 _LT_TAGVAR(hardcode_direct, $1)=yes
Chris@19 6578 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 6579 _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
Chris@19 6580 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
Chris@19 6581 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@19 6582 if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
Chris@19 6583 _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'
Chris@19 6584 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
Chris@19 6585 _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
Chris@19 6586 fi
Chris@19 6587 output_verbose_link_cmd=func_echo_all
Chris@19 6588 else
Chris@19 6589 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6590 fi
Chris@19 6591 ;;
Chris@19 6592
Chris@19 6593 osf3* | osf4* | osf5*)
Chris@19 6594 case $cc_basename in
Chris@19 6595 KCC*)
Chris@19 6596 # Kuck and Associates, Inc. (KAI) C++ Compiler
Chris@19 6597
Chris@19 6598 # KCC will only create a shared library if the output file
Chris@19 6599 # ends with ".so" (or ".sl" for HP-UX), so rename the library
Chris@19 6600 # to its proper name (with version) after linking.
Chris@19 6601 _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'
Chris@19 6602
Chris@19 6603 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
Chris@19 6604 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 6605
Chris@19 6606 # Archives containing C++ object files must be created using
Chris@19 6607 # the KAI C++ compiler.
Chris@19 6608 case $host in
Chris@19 6609 osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
Chris@19 6610 *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
Chris@19 6611 esac
Chris@19 6612 ;;
Chris@19 6613 RCC*)
Chris@19 6614 # Rational C++ 2.4.1
Chris@19 6615 # FIXME: insert proper C++ library support
Chris@19 6616 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6617 ;;
Chris@19 6618 cxx*)
Chris@19 6619 case $host in
Chris@19 6620 osf3*)
Chris@19 6621 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@19 6622 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
Chris@19 6623 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 6624 ;;
Chris@19 6625 *)
Chris@19 6626 _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
Chris@19 6627 _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
Chris@19 6628 _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
Chris@19 6629 echo "-hidden">> $lib.exp~
Chris@19 6630 $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~
Chris@19 6631 $RM $lib.exp'
Chris@19 6632 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
Chris@19 6633 ;;
Chris@19 6634 esac
Chris@19 6635
Chris@19 6636 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 6637
Chris@19 6638 # Commands to make compiler produce verbose output that lists
Chris@19 6639 # what "hidden" libraries, object files and flags are used when
Chris@19 6640 # linking a shared library.
Chris@19 6641 #
Chris@19 6642 # There doesn't appear to be a way to prevent this compiler from
Chris@19 6643 # explicitly linking system object files so we need to strip them
Chris@19 6644 # from the output so that they don't get included in the library
Chris@19 6645 # dependencies.
Chris@19 6646 output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
Chris@19 6647 ;;
Chris@19 6648 *)
Chris@19 6649 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
Chris@19 6650 _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
Chris@19 6651 case $host in
Chris@19 6652 osf3*)
Chris@19 6653 _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
Chris@19 6654 ;;
Chris@19 6655 *)
Chris@19 6656 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
Chris@19 6657 ;;
Chris@19 6658 esac
Chris@19 6659
Chris@19 6660 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
Chris@19 6661 _LT_TAGVAR(hardcode_libdir_separator, $1)=:
Chris@19 6662
Chris@19 6663 # Commands to make compiler produce verbose output that lists
Chris@19 6664 # what "hidden" libraries, object files and flags are used when
Chris@19 6665 # linking a shared library.
Chris@19 6666 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@19 6667
Chris@19 6668 else
Chris@19 6669 # FIXME: insert proper C++ library support
Chris@19 6670 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6671 fi
Chris@19 6672 ;;
Chris@19 6673 esac
Chris@19 6674 ;;
Chris@19 6675
Chris@19 6676 psos*)
Chris@19 6677 # FIXME: insert proper C++ library support
Chris@19 6678 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6679 ;;
Chris@19 6680
Chris@19 6681 sunos4*)
Chris@19 6682 case $cc_basename in
Chris@19 6683 CC*)
Chris@19 6684 # Sun C++ 4.x
Chris@19 6685 # FIXME: insert proper C++ library support
Chris@19 6686 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6687 ;;
Chris@19 6688 lcc*)
Chris@19 6689 # Lucid
Chris@19 6690 # FIXME: insert proper C++ library support
Chris@19 6691 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6692 ;;
Chris@19 6693 *)
Chris@19 6694 # FIXME: insert proper C++ library support
Chris@19 6695 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6696 ;;
Chris@19 6697 esac
Chris@19 6698 ;;
Chris@19 6699
Chris@19 6700 solaris*)
Chris@19 6701 case $cc_basename in
Chris@19 6702 CC* | sunCC*)
Chris@19 6703 # Sun C++ 4.2, 5.x and Centerline C++
Chris@19 6704 _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
Chris@19 6705 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
Chris@19 6706 _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
Chris@19 6707 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@19 6708 $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'
Chris@19 6709
Chris@19 6710 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
Chris@19 6711 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 6712 case $host_os in
Chris@19 6713 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@19 6714 *)
Chris@19 6715 # The compiler driver will combine and reorder linker options,
Chris@19 6716 # but understands `-z linker_flag'.
Chris@19 6717 # Supported since Solaris 2.6 (maybe 2.5.1?)
Chris@19 6718 _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
Chris@19 6719 ;;
Chris@19 6720 esac
Chris@19 6721 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 6722
Chris@19 6723 output_verbose_link_cmd='func_echo_all'
Chris@19 6724
Chris@19 6725 # Archives containing C++ object files must be created using
Chris@19 6726 # "CC -xar", where "CC" is the Sun C++ compiler. This is
Chris@19 6727 # necessary to make sure instantiated templates are included
Chris@19 6728 # in the archive.
Chris@19 6729 _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
Chris@19 6730 ;;
Chris@19 6731 gcx*)
Chris@19 6732 # Green Hills C++ Compiler
Chris@19 6733 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
Chris@19 6734
Chris@19 6735 # The C++ compiler must be used to create the archive.
Chris@19 6736 _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
Chris@19 6737 ;;
Chris@19 6738 *)
Chris@19 6739 # GNU C++ compiler with Solaris linker
Chris@19 6740 if test "$GXX" = yes && test "$with_gnu_ld" = no; then
Chris@19 6741 _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
Chris@19 6742 if $CC --version | $GREP -v '^2\.7' > /dev/null; then
Chris@19 6743 _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
Chris@19 6744 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@19 6745 $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
Chris@19 6746
Chris@19 6747 # Commands to make compiler produce verbose output that lists
Chris@19 6748 # what "hidden" libraries, object files and flags are used when
Chris@19 6749 # linking a shared library.
Chris@19 6750 output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@19 6751 else
Chris@19 6752 # g++ 2.7 appears to require `-G' NOT `-shared' on this
Chris@19 6753 # platform.
Chris@19 6754 _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
Chris@19 6755 _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
Chris@19 6756 $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
Chris@19 6757
Chris@19 6758 # Commands to make compiler produce verbose output that lists
Chris@19 6759 # what "hidden" libraries, object files and flags are used when
Chris@19 6760 # linking a shared library.
Chris@19 6761 output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
Chris@19 6762 fi
Chris@19 6763
Chris@19 6764 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
Chris@19 6765 case $host_os in
Chris@19 6766 solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
Chris@19 6767 *)
Chris@19 6768 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
Chris@19 6769 ;;
Chris@19 6770 esac
Chris@19 6771 fi
Chris@19 6772 ;;
Chris@19 6773 esac
Chris@19 6774 ;;
Chris@19 6775
Chris@19 6776 sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
Chris@19 6777 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
Chris@19 6778 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 6779 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 6780 runpath_var='LD_RUN_PATH'
Chris@19 6781
Chris@19 6782 case $cc_basename in
Chris@19 6783 CC*)
Chris@19 6784 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 6785 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 6786 ;;
Chris@19 6787 *)
Chris@19 6788 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 6789 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 6790 ;;
Chris@19 6791 esac
Chris@19 6792 ;;
Chris@19 6793
Chris@19 6794 sysv5* | sco3.2v5* | sco5v6*)
Chris@19 6795 # Note: We can NOT use -z defs as we might desire, because we do not
Chris@19 6796 # link with -lc, and that would cause any symbols used from libc to
Chris@19 6797 # always be unresolved, which means just about no library would
Chris@19 6798 # ever link correctly. If we're not using GNU ld we use -z text
Chris@19 6799 # though, which does catch some bad symbols but isn't as heavy-handed
Chris@19 6800 # as -z defs.
Chris@19 6801 _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
Chris@19 6802 _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
Chris@19 6803 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 6804 _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
Chris@19 6805 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
Chris@19 6806 _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
Chris@19 6807 _LT_TAGVAR(link_all_deplibs, $1)=yes
Chris@19 6808 _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
Chris@19 6809 runpath_var='LD_RUN_PATH'
Chris@19 6810
Chris@19 6811 case $cc_basename in
Chris@19 6812 CC*)
Chris@19 6813 _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 6814 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 6815 _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
Chris@19 6816 '"$_LT_TAGVAR(old_archive_cmds, $1)"
Chris@19 6817 _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
Chris@19 6818 '"$_LT_TAGVAR(reload_cmds, $1)"
Chris@19 6819 ;;
Chris@19 6820 *)
Chris@19 6821 _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 6822 _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
Chris@19 6823 ;;
Chris@19 6824 esac
Chris@19 6825 ;;
Chris@19 6826
Chris@19 6827 tandem*)
Chris@19 6828 case $cc_basename in
Chris@19 6829 NCC*)
Chris@19 6830 # NonStop-UX NCC 3.20
Chris@19 6831 # FIXME: insert proper C++ library support
Chris@19 6832 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6833 ;;
Chris@19 6834 *)
Chris@19 6835 # FIXME: insert proper C++ library support
Chris@19 6836 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6837 ;;
Chris@19 6838 esac
Chris@19 6839 ;;
Chris@19 6840
Chris@19 6841 vxworks*)
Chris@19 6842 # FIXME: insert proper C++ library support
Chris@19 6843 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6844 ;;
Chris@19 6845
Chris@19 6846 *)
Chris@19 6847 # FIXME: insert proper C++ library support
Chris@19 6848 _LT_TAGVAR(ld_shlibs, $1)=no
Chris@19 6849 ;;
Chris@19 6850 esac
Chris@19 6851
Chris@19 6852 AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
Chris@19 6853 test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
Chris@19 6854
Chris@19 6855 _LT_TAGVAR(GCC, $1)="$GXX"
Chris@19 6856 _LT_TAGVAR(LD, $1)="$LD"
Chris@19 6857
Chris@19 6858 ## CAVEAT EMPTOR:
Chris@19 6859 ## There is no encapsulation within the following macros, do not change
Chris@19 6860 ## the running order or otherwise move them around unless you know exactly
Chris@19 6861 ## what you are doing...
Chris@19 6862 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@19 6863 _LT_COMPILER_PIC($1)
Chris@19 6864 _LT_COMPILER_C_O($1)
Chris@19 6865 _LT_COMPILER_FILE_LOCKS($1)
Chris@19 6866 _LT_LINKER_SHLIBS($1)
Chris@19 6867 _LT_SYS_DYNAMIC_LINKER($1)
Chris@19 6868 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@19 6869
Chris@19 6870 _LT_CONFIG($1)
Chris@19 6871 fi # test -n "$compiler"
Chris@19 6872
Chris@19 6873 CC=$lt_save_CC
Chris@19 6874 CFLAGS=$lt_save_CFLAGS
Chris@19 6875 LDCXX=$LD
Chris@19 6876 LD=$lt_save_LD
Chris@19 6877 GCC=$lt_save_GCC
Chris@19 6878 with_gnu_ld=$lt_save_with_gnu_ld
Chris@19 6879 lt_cv_path_LDCXX=$lt_cv_path_LD
Chris@19 6880 lt_cv_path_LD=$lt_save_path_LD
Chris@19 6881 lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
Chris@19 6882 lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
Chris@19 6883 fi # test "$_lt_caught_CXX_error" != yes
Chris@19 6884
Chris@19 6885 AC_LANG_POP
Chris@19 6886 ])# _LT_LANG_CXX_CONFIG
Chris@19 6887
Chris@19 6888
Chris@19 6889 # _LT_FUNC_STRIPNAME_CNF
Chris@19 6890 # ----------------------
Chris@19 6891 # func_stripname_cnf prefix suffix name
Chris@19 6892 # strip PREFIX and SUFFIX off of NAME.
Chris@19 6893 # PREFIX and SUFFIX must not contain globbing or regex special
Chris@19 6894 # characters, hashes, percent signs, but SUFFIX may contain a leading
Chris@19 6895 # dot (in which case that matches only a dot).
Chris@19 6896 #
Chris@19 6897 # This function is identical to the (non-XSI) version of func_stripname,
Chris@19 6898 # except this one can be used by m4 code that may be executed by configure,
Chris@19 6899 # rather than the libtool script.
Chris@19 6900 m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
Chris@19 6901 AC_REQUIRE([_LT_DECL_SED])
Chris@19 6902 AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
Chris@19 6903 func_stripname_cnf ()
Chris@19 6904 {
Chris@19 6905 case ${2} in
Chris@19 6906 .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
Chris@19 6907 *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
Chris@19 6908 esac
Chris@19 6909 } # func_stripname_cnf
Chris@19 6910 ])# _LT_FUNC_STRIPNAME_CNF
Chris@19 6911
Chris@19 6912 # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
Chris@19 6913 # ---------------------------------
Chris@19 6914 # Figure out "hidden" library dependencies from verbose
Chris@19 6915 # compiler output when linking a shared library.
Chris@19 6916 # Parse the compiler output and extract the necessary
Chris@19 6917 # objects, libraries and library flags.
Chris@19 6918 m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
Chris@19 6919 [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
Chris@19 6920 AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
Chris@19 6921 # Dependencies to place before and after the object being linked:
Chris@19 6922 _LT_TAGVAR(predep_objects, $1)=
Chris@19 6923 _LT_TAGVAR(postdep_objects, $1)=
Chris@19 6924 _LT_TAGVAR(predeps, $1)=
Chris@19 6925 _LT_TAGVAR(postdeps, $1)=
Chris@19 6926 _LT_TAGVAR(compiler_lib_search_path, $1)=
Chris@19 6927
Chris@19 6928 dnl we can't use the lt_simple_compile_test_code here,
Chris@19 6929 dnl because it contains code intended for an executable,
Chris@19 6930 dnl not a library. It's possible we should let each
Chris@19 6931 dnl tag define a new lt_????_link_test_code variable,
Chris@19 6932 dnl but it's only used here...
Chris@19 6933 m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
Chris@19 6934 int a;
Chris@19 6935 void foo (void) { a = 0; }
Chris@19 6936 _LT_EOF
Chris@19 6937 ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
Chris@19 6938 class Foo
Chris@19 6939 {
Chris@19 6940 public:
Chris@19 6941 Foo (void) { a = 0; }
Chris@19 6942 private:
Chris@19 6943 int a;
Chris@19 6944 };
Chris@19 6945 _LT_EOF
Chris@19 6946 ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
Chris@19 6947 subroutine foo
Chris@19 6948 implicit none
Chris@19 6949 integer*4 a
Chris@19 6950 a=0
Chris@19 6951 return
Chris@19 6952 end
Chris@19 6953 _LT_EOF
Chris@19 6954 ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
Chris@19 6955 subroutine foo
Chris@19 6956 implicit none
Chris@19 6957 integer a
Chris@19 6958 a=0
Chris@19 6959 return
Chris@19 6960 end
Chris@19 6961 _LT_EOF
Chris@19 6962 ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
Chris@19 6963 public class foo {
Chris@19 6964 private int a;
Chris@19 6965 public void bar (void) {
Chris@19 6966 a = 0;
Chris@19 6967 }
Chris@19 6968 };
Chris@19 6969 _LT_EOF
Chris@19 6970 ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
Chris@19 6971 package foo
Chris@19 6972 func foo() {
Chris@19 6973 }
Chris@19 6974 _LT_EOF
Chris@19 6975 ])
Chris@19 6976
Chris@19 6977 _lt_libdeps_save_CFLAGS=$CFLAGS
Chris@19 6978 case "$CC $CFLAGS " in #(
Chris@19 6979 *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
Chris@19 6980 *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
Chris@19 6981 *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
Chris@19 6982 esac
Chris@19 6983
Chris@19 6984 dnl Parse the compiler output and extract the necessary
Chris@19 6985 dnl objects, libraries and library flags.
Chris@19 6986 if AC_TRY_EVAL(ac_compile); then
Chris@19 6987 # Parse the compiler output and extract the necessary
Chris@19 6988 # objects, libraries and library flags.
Chris@19 6989
Chris@19 6990 # Sentinel used to keep track of whether or not we are before
Chris@19 6991 # the conftest object file.
Chris@19 6992 pre_test_object_deps_done=no
Chris@19 6993
Chris@19 6994 for p in `eval "$output_verbose_link_cmd"`; do
Chris@19 6995 case ${prev}${p} in
Chris@19 6996
Chris@19 6997 -L* | -R* | -l*)
Chris@19 6998 # Some compilers place space between "-{L,R}" and the path.
Chris@19 6999 # Remove the space.
Chris@19 7000 if test $p = "-L" ||
Chris@19 7001 test $p = "-R"; then
Chris@19 7002 prev=$p
Chris@19 7003 continue
Chris@19 7004 fi
Chris@19 7005
Chris@19 7006 # Expand the sysroot to ease extracting the directories later.
Chris@19 7007 if test -z "$prev"; then
Chris@19 7008 case $p in
Chris@19 7009 -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
Chris@19 7010 -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
Chris@19 7011 -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
Chris@19 7012 esac
Chris@19 7013 fi
Chris@19 7014 case $p in
Chris@19 7015 =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
Chris@19 7016 esac
Chris@19 7017 if test "$pre_test_object_deps_done" = no; then
Chris@19 7018 case ${prev} in
Chris@19 7019 -L | -R)
Chris@19 7020 # Internal compiler library paths should come after those
Chris@19 7021 # provided the user. The postdeps already come after the
Chris@19 7022 # user supplied libs so there is no need to process them.
Chris@19 7023 if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
Chris@19 7024 _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
Chris@19 7025 else
Chris@19 7026 _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
Chris@19 7027 fi
Chris@19 7028 ;;
Chris@19 7029 # The "-l" case would never come before the object being
Chris@19 7030 # linked, so don't bother handling this case.
Chris@19 7031 esac
Chris@19 7032 else
Chris@19 7033 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
Chris@19 7034 _LT_TAGVAR(postdeps, $1)="${prev}${p}"
Chris@19 7035 else
Chris@19 7036 _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
Chris@19 7037 fi
Chris@19 7038 fi
Chris@19 7039 prev=
Chris@19 7040 ;;
Chris@19 7041
Chris@19 7042 *.lto.$objext) ;; # Ignore GCC LTO objects
Chris@19 7043 *.$objext)
Chris@19 7044 # This assumes that the test object file only shows up
Chris@19 7045 # once in the compiler output.
Chris@19 7046 if test "$p" = "conftest.$objext"; then
Chris@19 7047 pre_test_object_deps_done=yes
Chris@19 7048 continue
Chris@19 7049 fi
Chris@19 7050
Chris@19 7051 if test "$pre_test_object_deps_done" = no; then
Chris@19 7052 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
Chris@19 7053 _LT_TAGVAR(predep_objects, $1)="$p"
Chris@19 7054 else
Chris@19 7055 _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
Chris@19 7056 fi
Chris@19 7057 else
Chris@19 7058 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
Chris@19 7059 _LT_TAGVAR(postdep_objects, $1)="$p"
Chris@19 7060 else
Chris@19 7061 _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
Chris@19 7062 fi
Chris@19 7063 fi
Chris@19 7064 ;;
Chris@19 7065
Chris@19 7066 *) ;; # Ignore the rest.
Chris@19 7067
Chris@19 7068 esac
Chris@19 7069 done
Chris@19 7070
Chris@19 7071 # Clean up.
Chris@19 7072 rm -f a.out a.exe
Chris@19 7073 else
Chris@19 7074 echo "libtool.m4: error: problem compiling $1 test program"
Chris@19 7075 fi
Chris@19 7076
Chris@19 7077 $RM -f confest.$objext
Chris@19 7078 CFLAGS=$_lt_libdeps_save_CFLAGS
Chris@19 7079
Chris@19 7080 # PORTME: override above test on systems where it is broken
Chris@19 7081 m4_if([$1], [CXX],
Chris@19 7082 [case $host_os in
Chris@19 7083 interix[[3-9]]*)
Chris@19 7084 # Interix 3.5 installs completely hosed .la files for C++, so rather than
Chris@19 7085 # hack all around it, let's just trust "g++" to DTRT.
Chris@19 7086 _LT_TAGVAR(predep_objects,$1)=
Chris@19 7087 _LT_TAGVAR(postdep_objects,$1)=
Chris@19 7088 _LT_TAGVAR(postdeps,$1)=
Chris@19 7089 ;;
Chris@19 7090
Chris@19 7091 linux*)
Chris@19 7092 case `$CC -V 2>&1 | sed 5q` in
Chris@19 7093 *Sun\ C*)
Chris@19 7094 # Sun C++ 5.9
Chris@19 7095
Chris@19 7096 # The more standards-conforming stlport4 library is
Chris@19 7097 # incompatible with the Cstd library. Avoid specifying
Chris@19 7098 # it if it's in CXXFLAGS. Ignore libCrun as
Chris@19 7099 # -library=stlport4 depends on it.
Chris@19 7100 case " $CXX $CXXFLAGS " in
Chris@19 7101 *" -library=stlport4 "*)
Chris@19 7102 solaris_use_stlport4=yes
Chris@19 7103 ;;
Chris@19 7104 esac
Chris@19 7105
Chris@19 7106 if test "$solaris_use_stlport4" != yes; then
Chris@19 7107 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
Chris@19 7108 fi
Chris@19 7109 ;;
Chris@19 7110 esac
Chris@19 7111 ;;
Chris@19 7112
Chris@19 7113 solaris*)
Chris@19 7114 case $cc_basename in
Chris@19 7115 CC* | sunCC*)
Chris@19 7116 # The more standards-conforming stlport4 library is
Chris@19 7117 # incompatible with the Cstd library. Avoid specifying
Chris@19 7118 # it if it's in CXXFLAGS. Ignore libCrun as
Chris@19 7119 # -library=stlport4 depends on it.
Chris@19 7120 case " $CXX $CXXFLAGS " in
Chris@19 7121 *" -library=stlport4 "*)
Chris@19 7122 solaris_use_stlport4=yes
Chris@19 7123 ;;
Chris@19 7124 esac
Chris@19 7125
Chris@19 7126 # Adding this requires a known-good setup of shared libraries for
Chris@19 7127 # Sun compiler versions before 5.6, else PIC objects from an old
Chris@19 7128 # archive will be linked into the output, leading to subtle bugs.
Chris@19 7129 if test "$solaris_use_stlport4" != yes; then
Chris@19 7130 _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
Chris@19 7131 fi
Chris@19 7132 ;;
Chris@19 7133 esac
Chris@19 7134 ;;
Chris@19 7135 esac
Chris@19 7136 ])
Chris@19 7137
Chris@19 7138 case " $_LT_TAGVAR(postdeps, $1) " in
Chris@19 7139 *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
Chris@19 7140 esac
Chris@19 7141 _LT_TAGVAR(compiler_lib_search_dirs, $1)=
Chris@19 7142 if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
Chris@19 7143 _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
Chris@19 7144 fi
Chris@19 7145 _LT_TAGDECL([], [compiler_lib_search_dirs], [1],
Chris@19 7146 [The directories searched by this compiler when creating a shared library])
Chris@19 7147 _LT_TAGDECL([], [predep_objects], [1],
Chris@19 7148 [Dependencies to place before and after the objects being linked to
Chris@19 7149 create a shared library])
Chris@19 7150 _LT_TAGDECL([], [postdep_objects], [1])
Chris@19 7151 _LT_TAGDECL([], [predeps], [1])
Chris@19 7152 _LT_TAGDECL([], [postdeps], [1])
Chris@19 7153 _LT_TAGDECL([], [compiler_lib_search_path], [1],
Chris@19 7154 [The library search path used internally by the compiler when linking
Chris@19 7155 a shared library])
Chris@19 7156 ])# _LT_SYS_HIDDEN_LIBDEPS
Chris@19 7157
Chris@19 7158
Chris@19 7159 # _LT_LANG_F77_CONFIG([TAG])
Chris@19 7160 # --------------------------
Chris@19 7161 # Ensure that the configuration variables for a Fortran 77 compiler are
Chris@19 7162 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@19 7163 # to write the compiler configuration to `libtool'.
Chris@19 7164 m4_defun([_LT_LANG_F77_CONFIG],
Chris@19 7165 [AC_LANG_PUSH(Fortran 77)
Chris@19 7166 if test -z "$F77" || test "X$F77" = "Xno"; then
Chris@19 7167 _lt_disable_F77=yes
Chris@19 7168 fi
Chris@19 7169
Chris@19 7170 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 7171 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@19 7172 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@19 7173 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@19 7174 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@19 7175 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@19 7176 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@19 7177 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@19 7178 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@19 7179 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@19 7180 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@19 7181 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@19 7182 _LT_TAGVAR(module_cmds, $1)=
Chris@19 7183 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@19 7184 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@19 7185 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@19 7186 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@19 7187 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@19 7188 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@19 7189 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@19 7190 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@19 7191
Chris@19 7192 # Source file extension for f77 test sources.
Chris@19 7193 ac_ext=f
Chris@19 7194
Chris@19 7195 # Object file extension for compiled f77 test sources.
Chris@19 7196 objext=o
Chris@19 7197 _LT_TAGVAR(objext, $1)=$objext
Chris@19 7198
Chris@19 7199 # No sense in running all these tests if we already determined that
Chris@19 7200 # the F77 compiler isn't working. Some variables (like enable_shared)
Chris@19 7201 # are currently assumed to apply to all compilers on this platform,
Chris@19 7202 # and will be corrupted by setting them based on a non-working compiler.
Chris@19 7203 if test "$_lt_disable_F77" != yes; then
Chris@19 7204 # Code to be used in simple compile tests
Chris@19 7205 lt_simple_compile_test_code="\
Chris@19 7206 subroutine t
Chris@19 7207 return
Chris@19 7208 end
Chris@19 7209 "
Chris@19 7210
Chris@19 7211 # Code to be used in simple link tests
Chris@19 7212 lt_simple_link_test_code="\
Chris@19 7213 program t
Chris@19 7214 end
Chris@19 7215 "
Chris@19 7216
Chris@19 7217 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@19 7218 _LT_TAG_COMPILER
Chris@19 7219
Chris@19 7220 # save warnings/boilerplate of simple test code
Chris@19 7221 _LT_COMPILER_BOILERPLATE
Chris@19 7222 _LT_LINKER_BOILERPLATE
Chris@19 7223
Chris@19 7224 # Allow CC to be a program name with arguments.
Chris@19 7225 lt_save_CC="$CC"
Chris@19 7226 lt_save_GCC=$GCC
Chris@19 7227 lt_save_CFLAGS=$CFLAGS
Chris@19 7228 CC=${F77-"f77"}
Chris@19 7229 CFLAGS=$FFLAGS
Chris@19 7230 compiler=$CC
Chris@19 7231 _LT_TAGVAR(compiler, $1)=$CC
Chris@19 7232 _LT_CC_BASENAME([$compiler])
Chris@19 7233 GCC=$G77
Chris@19 7234 if test -n "$compiler"; then
Chris@19 7235 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@19 7236 AC_MSG_RESULT([$can_build_shared])
Chris@19 7237
Chris@19 7238 AC_MSG_CHECKING([whether to build shared libraries])
Chris@19 7239 test "$can_build_shared" = "no" && enable_shared=no
Chris@19 7240
Chris@19 7241 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@19 7242 # are all built from PIC.
Chris@19 7243 case $host_os in
Chris@19 7244 aix3*)
Chris@19 7245 test "$enable_shared" = yes && enable_static=no
Chris@19 7246 if test -n "$RANLIB"; then
Chris@19 7247 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@19 7248 postinstall_cmds='$RANLIB $lib'
Chris@19 7249 fi
Chris@19 7250 ;;
Chris@19 7251 aix[[4-9]]*)
Chris@19 7252 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
Chris@19 7253 test "$enable_shared" = yes && enable_static=no
Chris@19 7254 fi
Chris@19 7255 ;;
Chris@19 7256 esac
Chris@19 7257 AC_MSG_RESULT([$enable_shared])
Chris@19 7258
Chris@19 7259 AC_MSG_CHECKING([whether to build static libraries])
Chris@19 7260 # Make sure either enable_shared or enable_static is yes.
Chris@19 7261 test "$enable_shared" = yes || enable_static=yes
Chris@19 7262 AC_MSG_RESULT([$enable_static])
Chris@19 7263
Chris@19 7264 _LT_TAGVAR(GCC, $1)="$G77"
Chris@19 7265 _LT_TAGVAR(LD, $1)="$LD"
Chris@19 7266
Chris@19 7267 ## CAVEAT EMPTOR:
Chris@19 7268 ## There is no encapsulation within the following macros, do not change
Chris@19 7269 ## the running order or otherwise move them around unless you know exactly
Chris@19 7270 ## what you are doing...
Chris@19 7271 _LT_COMPILER_PIC($1)
Chris@19 7272 _LT_COMPILER_C_O($1)
Chris@19 7273 _LT_COMPILER_FILE_LOCKS($1)
Chris@19 7274 _LT_LINKER_SHLIBS($1)
Chris@19 7275 _LT_SYS_DYNAMIC_LINKER($1)
Chris@19 7276 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@19 7277
Chris@19 7278 _LT_CONFIG($1)
Chris@19 7279 fi # test -n "$compiler"
Chris@19 7280
Chris@19 7281 GCC=$lt_save_GCC
Chris@19 7282 CC="$lt_save_CC"
Chris@19 7283 CFLAGS="$lt_save_CFLAGS"
Chris@19 7284 fi # test "$_lt_disable_F77" != yes
Chris@19 7285
Chris@19 7286 AC_LANG_POP
Chris@19 7287 ])# _LT_LANG_F77_CONFIG
Chris@19 7288
Chris@19 7289
Chris@19 7290 # _LT_LANG_FC_CONFIG([TAG])
Chris@19 7291 # -------------------------
Chris@19 7292 # Ensure that the configuration variables for a Fortran compiler are
Chris@19 7293 # suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@19 7294 # to write the compiler configuration to `libtool'.
Chris@19 7295 m4_defun([_LT_LANG_FC_CONFIG],
Chris@19 7296 [AC_LANG_PUSH(Fortran)
Chris@19 7297
Chris@19 7298 if test -z "$FC" || test "X$FC" = "Xno"; then
Chris@19 7299 _lt_disable_FC=yes
Chris@19 7300 fi
Chris@19 7301
Chris@19 7302 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 7303 _LT_TAGVAR(allow_undefined_flag, $1)=
Chris@19 7304 _LT_TAGVAR(always_export_symbols, $1)=no
Chris@19 7305 _LT_TAGVAR(archive_expsym_cmds, $1)=
Chris@19 7306 _LT_TAGVAR(export_dynamic_flag_spec, $1)=
Chris@19 7307 _LT_TAGVAR(hardcode_direct, $1)=no
Chris@19 7308 _LT_TAGVAR(hardcode_direct_absolute, $1)=no
Chris@19 7309 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
Chris@19 7310 _LT_TAGVAR(hardcode_libdir_separator, $1)=
Chris@19 7311 _LT_TAGVAR(hardcode_minus_L, $1)=no
Chris@19 7312 _LT_TAGVAR(hardcode_automatic, $1)=no
Chris@19 7313 _LT_TAGVAR(inherit_rpath, $1)=no
Chris@19 7314 _LT_TAGVAR(module_cmds, $1)=
Chris@19 7315 _LT_TAGVAR(module_expsym_cmds, $1)=
Chris@19 7316 _LT_TAGVAR(link_all_deplibs, $1)=unknown
Chris@19 7317 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@19 7318 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@19 7319 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@19 7320 _LT_TAGVAR(no_undefined_flag, $1)=
Chris@19 7321 _LT_TAGVAR(whole_archive_flag_spec, $1)=
Chris@19 7322 _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
Chris@19 7323
Chris@19 7324 # Source file extension for fc test sources.
Chris@19 7325 ac_ext=${ac_fc_srcext-f}
Chris@19 7326
Chris@19 7327 # Object file extension for compiled fc test sources.
Chris@19 7328 objext=o
Chris@19 7329 _LT_TAGVAR(objext, $1)=$objext
Chris@19 7330
Chris@19 7331 # No sense in running all these tests if we already determined that
Chris@19 7332 # the FC compiler isn't working. Some variables (like enable_shared)
Chris@19 7333 # are currently assumed to apply to all compilers on this platform,
Chris@19 7334 # and will be corrupted by setting them based on a non-working compiler.
Chris@19 7335 if test "$_lt_disable_FC" != yes; then
Chris@19 7336 # Code to be used in simple compile tests
Chris@19 7337 lt_simple_compile_test_code="\
Chris@19 7338 subroutine t
Chris@19 7339 return
Chris@19 7340 end
Chris@19 7341 "
Chris@19 7342
Chris@19 7343 # Code to be used in simple link tests
Chris@19 7344 lt_simple_link_test_code="\
Chris@19 7345 program t
Chris@19 7346 end
Chris@19 7347 "
Chris@19 7348
Chris@19 7349 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@19 7350 _LT_TAG_COMPILER
Chris@19 7351
Chris@19 7352 # save warnings/boilerplate of simple test code
Chris@19 7353 _LT_COMPILER_BOILERPLATE
Chris@19 7354 _LT_LINKER_BOILERPLATE
Chris@19 7355
Chris@19 7356 # Allow CC to be a program name with arguments.
Chris@19 7357 lt_save_CC="$CC"
Chris@19 7358 lt_save_GCC=$GCC
Chris@19 7359 lt_save_CFLAGS=$CFLAGS
Chris@19 7360 CC=${FC-"f95"}
Chris@19 7361 CFLAGS=$FCFLAGS
Chris@19 7362 compiler=$CC
Chris@19 7363 GCC=$ac_cv_fc_compiler_gnu
Chris@19 7364
Chris@19 7365 _LT_TAGVAR(compiler, $1)=$CC
Chris@19 7366 _LT_CC_BASENAME([$compiler])
Chris@19 7367
Chris@19 7368 if test -n "$compiler"; then
Chris@19 7369 AC_MSG_CHECKING([if libtool supports shared libraries])
Chris@19 7370 AC_MSG_RESULT([$can_build_shared])
Chris@19 7371
Chris@19 7372 AC_MSG_CHECKING([whether to build shared libraries])
Chris@19 7373 test "$can_build_shared" = "no" && enable_shared=no
Chris@19 7374
Chris@19 7375 # On AIX, shared libraries and static libraries use the same namespace, and
Chris@19 7376 # are all built from PIC.
Chris@19 7377 case $host_os in
Chris@19 7378 aix3*)
Chris@19 7379 test "$enable_shared" = yes && enable_static=no
Chris@19 7380 if test -n "$RANLIB"; then
Chris@19 7381 archive_cmds="$archive_cmds~\$RANLIB \$lib"
Chris@19 7382 postinstall_cmds='$RANLIB $lib'
Chris@19 7383 fi
Chris@19 7384 ;;
Chris@19 7385 aix[[4-9]]*)
Chris@19 7386 if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
Chris@19 7387 test "$enable_shared" = yes && enable_static=no
Chris@19 7388 fi
Chris@19 7389 ;;
Chris@19 7390 esac
Chris@19 7391 AC_MSG_RESULT([$enable_shared])
Chris@19 7392
Chris@19 7393 AC_MSG_CHECKING([whether to build static libraries])
Chris@19 7394 # Make sure either enable_shared or enable_static is yes.
Chris@19 7395 test "$enable_shared" = yes || enable_static=yes
Chris@19 7396 AC_MSG_RESULT([$enable_static])
Chris@19 7397
Chris@19 7398 _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
Chris@19 7399 _LT_TAGVAR(LD, $1)="$LD"
Chris@19 7400
Chris@19 7401 ## CAVEAT EMPTOR:
Chris@19 7402 ## There is no encapsulation within the following macros, do not change
Chris@19 7403 ## the running order or otherwise move them around unless you know exactly
Chris@19 7404 ## what you are doing...
Chris@19 7405 _LT_SYS_HIDDEN_LIBDEPS($1)
Chris@19 7406 _LT_COMPILER_PIC($1)
Chris@19 7407 _LT_COMPILER_C_O($1)
Chris@19 7408 _LT_COMPILER_FILE_LOCKS($1)
Chris@19 7409 _LT_LINKER_SHLIBS($1)
Chris@19 7410 _LT_SYS_DYNAMIC_LINKER($1)
Chris@19 7411 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@19 7412
Chris@19 7413 _LT_CONFIG($1)
Chris@19 7414 fi # test -n "$compiler"
Chris@19 7415
Chris@19 7416 GCC=$lt_save_GCC
Chris@19 7417 CC=$lt_save_CC
Chris@19 7418 CFLAGS=$lt_save_CFLAGS
Chris@19 7419 fi # test "$_lt_disable_FC" != yes
Chris@19 7420
Chris@19 7421 AC_LANG_POP
Chris@19 7422 ])# _LT_LANG_FC_CONFIG
Chris@19 7423
Chris@19 7424
Chris@19 7425 # _LT_LANG_GCJ_CONFIG([TAG])
Chris@19 7426 # --------------------------
Chris@19 7427 # Ensure that the configuration variables for the GNU Java Compiler compiler
Chris@19 7428 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@19 7429 # to write the compiler configuration to `libtool'.
Chris@19 7430 m4_defun([_LT_LANG_GCJ_CONFIG],
Chris@19 7431 [AC_REQUIRE([LT_PROG_GCJ])dnl
Chris@19 7432 AC_LANG_SAVE
Chris@19 7433
Chris@19 7434 # Source file extension for Java test sources.
Chris@19 7435 ac_ext=java
Chris@19 7436
Chris@19 7437 # Object file extension for compiled Java test sources.
Chris@19 7438 objext=o
Chris@19 7439 _LT_TAGVAR(objext, $1)=$objext
Chris@19 7440
Chris@19 7441 # Code to be used in simple compile tests
Chris@19 7442 lt_simple_compile_test_code="class foo {}"
Chris@19 7443
Chris@19 7444 # Code to be used in simple link tests
Chris@19 7445 lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
Chris@19 7446
Chris@19 7447 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@19 7448 _LT_TAG_COMPILER
Chris@19 7449
Chris@19 7450 # save warnings/boilerplate of simple test code
Chris@19 7451 _LT_COMPILER_BOILERPLATE
Chris@19 7452 _LT_LINKER_BOILERPLATE
Chris@19 7453
Chris@19 7454 # Allow CC to be a program name with arguments.
Chris@19 7455 lt_save_CC=$CC
Chris@19 7456 lt_save_CFLAGS=$CFLAGS
Chris@19 7457 lt_save_GCC=$GCC
Chris@19 7458 GCC=yes
Chris@19 7459 CC=${GCJ-"gcj"}
Chris@19 7460 CFLAGS=$GCJFLAGS
Chris@19 7461 compiler=$CC
Chris@19 7462 _LT_TAGVAR(compiler, $1)=$CC
Chris@19 7463 _LT_TAGVAR(LD, $1)="$LD"
Chris@19 7464 _LT_CC_BASENAME([$compiler])
Chris@19 7465
Chris@19 7466 # GCJ did not exist at the time GCC didn't implicitly link libc in.
Chris@19 7467 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 7468
Chris@19 7469 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@19 7470 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@19 7471 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@19 7472
Chris@19 7473 ## CAVEAT EMPTOR:
Chris@19 7474 ## There is no encapsulation within the following macros, do not change
Chris@19 7475 ## the running order or otherwise move them around unless you know exactly
Chris@19 7476 ## what you are doing...
Chris@19 7477 if test -n "$compiler"; then
Chris@19 7478 _LT_COMPILER_NO_RTTI($1)
Chris@19 7479 _LT_COMPILER_PIC($1)
Chris@19 7480 _LT_COMPILER_C_O($1)
Chris@19 7481 _LT_COMPILER_FILE_LOCKS($1)
Chris@19 7482 _LT_LINKER_SHLIBS($1)
Chris@19 7483 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@19 7484
Chris@19 7485 _LT_CONFIG($1)
Chris@19 7486 fi
Chris@19 7487
Chris@19 7488 AC_LANG_RESTORE
Chris@19 7489
Chris@19 7490 GCC=$lt_save_GCC
Chris@19 7491 CC=$lt_save_CC
Chris@19 7492 CFLAGS=$lt_save_CFLAGS
Chris@19 7493 ])# _LT_LANG_GCJ_CONFIG
Chris@19 7494
Chris@19 7495
Chris@19 7496 # _LT_LANG_GO_CONFIG([TAG])
Chris@19 7497 # --------------------------
Chris@19 7498 # Ensure that the configuration variables for the GNU Go compiler
Chris@19 7499 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@19 7500 # to write the compiler configuration to `libtool'.
Chris@19 7501 m4_defun([_LT_LANG_GO_CONFIG],
Chris@19 7502 [AC_REQUIRE([LT_PROG_GO])dnl
Chris@19 7503 AC_LANG_SAVE
Chris@19 7504
Chris@19 7505 # Source file extension for Go test sources.
Chris@19 7506 ac_ext=go
Chris@19 7507
Chris@19 7508 # Object file extension for compiled Go test sources.
Chris@19 7509 objext=o
Chris@19 7510 _LT_TAGVAR(objext, $1)=$objext
Chris@19 7511
Chris@19 7512 # Code to be used in simple compile tests
Chris@19 7513 lt_simple_compile_test_code="package main; func main() { }"
Chris@19 7514
Chris@19 7515 # Code to be used in simple link tests
Chris@19 7516 lt_simple_link_test_code='package main; func main() { }'
Chris@19 7517
Chris@19 7518 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@19 7519 _LT_TAG_COMPILER
Chris@19 7520
Chris@19 7521 # save warnings/boilerplate of simple test code
Chris@19 7522 _LT_COMPILER_BOILERPLATE
Chris@19 7523 _LT_LINKER_BOILERPLATE
Chris@19 7524
Chris@19 7525 # Allow CC to be a program name with arguments.
Chris@19 7526 lt_save_CC=$CC
Chris@19 7527 lt_save_CFLAGS=$CFLAGS
Chris@19 7528 lt_save_GCC=$GCC
Chris@19 7529 GCC=yes
Chris@19 7530 CC=${GOC-"gccgo"}
Chris@19 7531 CFLAGS=$GOFLAGS
Chris@19 7532 compiler=$CC
Chris@19 7533 _LT_TAGVAR(compiler, $1)=$CC
Chris@19 7534 _LT_TAGVAR(LD, $1)="$LD"
Chris@19 7535 _LT_CC_BASENAME([$compiler])
Chris@19 7536
Chris@19 7537 # Go did not exist at the time GCC didn't implicitly link libc in.
Chris@19 7538 _LT_TAGVAR(archive_cmds_need_lc, $1)=no
Chris@19 7539
Chris@19 7540 _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
Chris@19 7541 _LT_TAGVAR(reload_flag, $1)=$reload_flag
Chris@19 7542 _LT_TAGVAR(reload_cmds, $1)=$reload_cmds
Chris@19 7543
Chris@19 7544 ## CAVEAT EMPTOR:
Chris@19 7545 ## There is no encapsulation within the following macros, do not change
Chris@19 7546 ## the running order or otherwise move them around unless you know exactly
Chris@19 7547 ## what you are doing...
Chris@19 7548 if test -n "$compiler"; then
Chris@19 7549 _LT_COMPILER_NO_RTTI($1)
Chris@19 7550 _LT_COMPILER_PIC($1)
Chris@19 7551 _LT_COMPILER_C_O($1)
Chris@19 7552 _LT_COMPILER_FILE_LOCKS($1)
Chris@19 7553 _LT_LINKER_SHLIBS($1)
Chris@19 7554 _LT_LINKER_HARDCODE_LIBPATH($1)
Chris@19 7555
Chris@19 7556 _LT_CONFIG($1)
Chris@19 7557 fi
Chris@19 7558
Chris@19 7559 AC_LANG_RESTORE
Chris@19 7560
Chris@19 7561 GCC=$lt_save_GCC
Chris@19 7562 CC=$lt_save_CC
Chris@19 7563 CFLAGS=$lt_save_CFLAGS
Chris@19 7564 ])# _LT_LANG_GO_CONFIG
Chris@19 7565
Chris@19 7566
Chris@19 7567 # _LT_LANG_RC_CONFIG([TAG])
Chris@19 7568 # -------------------------
Chris@19 7569 # Ensure that the configuration variables for the Windows resource compiler
Chris@19 7570 # are suitably defined. These variables are subsequently used by _LT_CONFIG
Chris@19 7571 # to write the compiler configuration to `libtool'.
Chris@19 7572 m4_defun([_LT_LANG_RC_CONFIG],
Chris@19 7573 [AC_REQUIRE([LT_PROG_RC])dnl
Chris@19 7574 AC_LANG_SAVE
Chris@19 7575
Chris@19 7576 # Source file extension for RC test sources.
Chris@19 7577 ac_ext=rc
Chris@19 7578
Chris@19 7579 # Object file extension for compiled RC test sources.
Chris@19 7580 objext=o
Chris@19 7581 _LT_TAGVAR(objext, $1)=$objext
Chris@19 7582
Chris@19 7583 # Code to be used in simple compile tests
Chris@19 7584 lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
Chris@19 7585
Chris@19 7586 # Code to be used in simple link tests
Chris@19 7587 lt_simple_link_test_code="$lt_simple_compile_test_code"
Chris@19 7588
Chris@19 7589 # ltmain only uses $CC for tagged configurations so make sure $CC is set.
Chris@19 7590 _LT_TAG_COMPILER
Chris@19 7591
Chris@19 7592 # save warnings/boilerplate of simple test code
Chris@19 7593 _LT_COMPILER_BOILERPLATE
Chris@19 7594 _LT_LINKER_BOILERPLATE
Chris@19 7595
Chris@19 7596 # Allow CC to be a program name with arguments.
Chris@19 7597 lt_save_CC="$CC"
Chris@19 7598 lt_save_CFLAGS=$CFLAGS
Chris@19 7599 lt_save_GCC=$GCC
Chris@19 7600 GCC=
Chris@19 7601 CC=${RC-"windres"}
Chris@19 7602 CFLAGS=
Chris@19 7603 compiler=$CC
Chris@19 7604 _LT_TAGVAR(compiler, $1)=$CC
Chris@19 7605 _LT_CC_BASENAME([$compiler])
Chris@19 7606 _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
Chris@19 7607
Chris@19 7608 if test -n "$compiler"; then
Chris@19 7609 :
Chris@19 7610 _LT_CONFIG($1)
Chris@19 7611 fi
Chris@19 7612
Chris@19 7613 GCC=$lt_save_GCC
Chris@19 7614 AC_LANG_RESTORE
Chris@19 7615 CC=$lt_save_CC
Chris@19 7616 CFLAGS=$lt_save_CFLAGS
Chris@19 7617 ])# _LT_LANG_RC_CONFIG
Chris@19 7618
Chris@19 7619
Chris@19 7620 # LT_PROG_GCJ
Chris@19 7621 # -----------
Chris@19 7622 AC_DEFUN([LT_PROG_GCJ],
Chris@19 7623 [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
Chris@19 7624 [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
Chris@19 7625 [AC_CHECK_TOOL(GCJ, gcj,)
Chris@19 7626 test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
Chris@19 7627 AC_SUBST(GCJFLAGS)])])[]dnl
Chris@19 7628 ])
Chris@19 7629
Chris@19 7630 # Old name:
Chris@19 7631 AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
Chris@19 7632 dnl aclocal-1.4 backwards compatibility:
Chris@19 7633 dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
Chris@19 7634
Chris@19 7635
Chris@19 7636 # LT_PROG_GO
Chris@19 7637 # ----------
Chris@19 7638 AC_DEFUN([LT_PROG_GO],
Chris@19 7639 [AC_CHECK_TOOL(GOC, gccgo,)
Chris@19 7640 ])
Chris@19 7641
Chris@19 7642
Chris@19 7643 # LT_PROG_RC
Chris@19 7644 # ----------
Chris@19 7645 AC_DEFUN([LT_PROG_RC],
Chris@19 7646 [AC_CHECK_TOOL(RC, windres,)
Chris@19 7647 ])
Chris@19 7648
Chris@19 7649 # Old name:
Chris@19 7650 AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
Chris@19 7651 dnl aclocal-1.4 backwards compatibility:
Chris@19 7652 dnl AC_DEFUN([LT_AC_PROG_RC], [])
Chris@19 7653
Chris@19 7654
Chris@19 7655 # _LT_DECL_EGREP
Chris@19 7656 # --------------
Chris@19 7657 # If we don't have a new enough Autoconf to choose the best grep
Chris@19 7658 # available, choose the one first in the user's PATH.
Chris@19 7659 m4_defun([_LT_DECL_EGREP],
Chris@19 7660 [AC_REQUIRE([AC_PROG_EGREP])dnl
Chris@19 7661 AC_REQUIRE([AC_PROG_FGREP])dnl
Chris@19 7662 test -z "$GREP" && GREP=grep
Chris@19 7663 _LT_DECL([], [GREP], [1], [A grep program that handles long lines])
Chris@19 7664 _LT_DECL([], [EGREP], [1], [An ERE matcher])
Chris@19 7665 _LT_DECL([], [FGREP], [1], [A literal string matcher])
Chris@19 7666 dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
Chris@19 7667 AC_SUBST([GREP])
Chris@19 7668 ])
Chris@19 7669
Chris@19 7670
Chris@19 7671 # _LT_DECL_OBJDUMP
Chris@19 7672 # --------------
Chris@19 7673 # If we don't have a new enough Autoconf to choose the best objdump
Chris@19 7674 # available, choose the one first in the user's PATH.
Chris@19 7675 m4_defun([_LT_DECL_OBJDUMP],
Chris@19 7676 [AC_CHECK_TOOL(OBJDUMP, objdump, false)
Chris@19 7677 test -z "$OBJDUMP" && OBJDUMP=objdump
Chris@19 7678 _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
Chris@19 7679 AC_SUBST([OBJDUMP])
Chris@19 7680 ])
Chris@19 7681
Chris@19 7682 # _LT_DECL_DLLTOOL
Chris@19 7683 # ----------------
Chris@19 7684 # Ensure DLLTOOL variable is set.
Chris@19 7685 m4_defun([_LT_DECL_DLLTOOL],
Chris@19 7686 [AC_CHECK_TOOL(DLLTOOL, dlltool, false)
Chris@19 7687 test -z "$DLLTOOL" && DLLTOOL=dlltool
Chris@19 7688 _LT_DECL([], [DLLTOOL], [1], [DLL creation program])
Chris@19 7689 AC_SUBST([DLLTOOL])
Chris@19 7690 ])
Chris@19 7691
Chris@19 7692 # _LT_DECL_SED
Chris@19 7693 # ------------
Chris@19 7694 # Check for a fully-functional sed program, that truncates
Chris@19 7695 # as few characters as possible. Prefer GNU sed if found.
Chris@19 7696 m4_defun([_LT_DECL_SED],
Chris@19 7697 [AC_PROG_SED
Chris@19 7698 test -z "$SED" && SED=sed
Chris@19 7699 Xsed="$SED -e 1s/^X//"
Chris@19 7700 _LT_DECL([], [SED], [1], [A sed program that does not truncate output])
Chris@19 7701 _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
Chris@19 7702 [Sed that helps us avoid accidentally triggering echo(1) options like -n])
Chris@19 7703 ])# _LT_DECL_SED
Chris@19 7704
Chris@19 7705 m4_ifndef([AC_PROG_SED], [
Chris@19 7706 ############################################################
Chris@19 7707 # NOTE: This macro has been submitted for inclusion into #
Chris@19 7708 # GNU Autoconf as AC_PROG_SED. When it is available in #
Chris@19 7709 # a released version of Autoconf we should remove this #
Chris@19 7710 # macro and use it instead. #
Chris@19 7711 ############################################################
Chris@19 7712
Chris@19 7713 m4_defun([AC_PROG_SED],
Chris@19 7714 [AC_MSG_CHECKING([for a sed that does not truncate output])
Chris@19 7715 AC_CACHE_VAL(lt_cv_path_SED,
Chris@19 7716 [# Loop through the user's path and test for sed and gsed.
Chris@19 7717 # Then use that list of sed's as ones to test for truncation.
Chris@19 7718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Chris@19 7719 for as_dir in $PATH
Chris@19 7720 do
Chris@19 7721 IFS=$as_save_IFS
Chris@19 7722 test -z "$as_dir" && as_dir=.
Chris@19 7723 for lt_ac_prog in sed gsed; do
Chris@19 7724 for ac_exec_ext in '' $ac_executable_extensions; do
Chris@19 7725 if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
Chris@19 7726 lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
Chris@19 7727 fi
Chris@19 7728 done
Chris@19 7729 done
Chris@19 7730 done
Chris@19 7731 IFS=$as_save_IFS
Chris@19 7732 lt_ac_max=0
Chris@19 7733 lt_ac_count=0
Chris@19 7734 # Add /usr/xpg4/bin/sed as it is typically found on Solaris
Chris@19 7735 # along with /bin/sed that truncates output.
Chris@19 7736 for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
Chris@19 7737 test ! -f $lt_ac_sed && continue
Chris@19 7738 cat /dev/null > conftest.in
Chris@19 7739 lt_ac_count=0
Chris@19 7740 echo $ECHO_N "0123456789$ECHO_C" >conftest.in
Chris@19 7741 # Check for GNU sed and select it if it is found.
Chris@19 7742 if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
Chris@19 7743 lt_cv_path_SED=$lt_ac_sed
Chris@19 7744 break
Chris@19 7745 fi
Chris@19 7746 while true; do
Chris@19 7747 cat conftest.in conftest.in >conftest.tmp
Chris@19 7748 mv conftest.tmp conftest.in
Chris@19 7749 cp conftest.in conftest.nl
Chris@19 7750 echo >>conftest.nl
Chris@19 7751 $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
Chris@19 7752 cmp -s conftest.out conftest.nl || break
Chris@19 7753 # 10000 chars as input seems more than enough
Chris@19 7754 test $lt_ac_count -gt 10 && break
Chris@19 7755 lt_ac_count=`expr $lt_ac_count + 1`
Chris@19 7756 if test $lt_ac_count -gt $lt_ac_max; then
Chris@19 7757 lt_ac_max=$lt_ac_count
Chris@19 7758 lt_cv_path_SED=$lt_ac_sed
Chris@19 7759 fi
Chris@19 7760 done
Chris@19 7761 done
Chris@19 7762 ])
Chris@19 7763 SED=$lt_cv_path_SED
Chris@19 7764 AC_SUBST([SED])
Chris@19 7765 AC_MSG_RESULT([$SED])
Chris@19 7766 ])#AC_PROG_SED
Chris@19 7767 ])#m4_ifndef
Chris@19 7768
Chris@19 7769 # Old name:
Chris@19 7770 AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
Chris@19 7771 dnl aclocal-1.4 backwards compatibility:
Chris@19 7772 dnl AC_DEFUN([LT_AC_PROG_SED], [])
Chris@19 7773
Chris@19 7774
Chris@19 7775 # _LT_CHECK_SHELL_FEATURES
Chris@19 7776 # ------------------------
Chris@19 7777 # Find out whether the shell is Bourne or XSI compatible,
Chris@19 7778 # or has some other useful features.
Chris@19 7779 m4_defun([_LT_CHECK_SHELL_FEATURES],
Chris@19 7780 [AC_MSG_CHECKING([whether the shell understands some XSI constructs])
Chris@19 7781 # Try some XSI features
Chris@19 7782 xsi_shell=no
Chris@19 7783 ( _lt_dummy="a/b/c"
Chris@19 7784 test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
Chris@19 7785 = c,a/b,b/c, \
Chris@19 7786 && eval 'test $(( 1 + 1 )) -eq 2 \
Chris@19 7787 && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
Chris@19 7788 && xsi_shell=yes
Chris@19 7789 AC_MSG_RESULT([$xsi_shell])
Chris@19 7790 _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
Chris@19 7791
Chris@19 7792 AC_MSG_CHECKING([whether the shell understands "+="])
Chris@19 7793 lt_shell_append=no
Chris@19 7794 ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
Chris@19 7795 >/dev/null 2>&1 \
Chris@19 7796 && lt_shell_append=yes
Chris@19 7797 AC_MSG_RESULT([$lt_shell_append])
Chris@19 7798 _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
Chris@19 7799
Chris@19 7800 if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
Chris@19 7801 lt_unset=unset
Chris@19 7802 else
Chris@19 7803 lt_unset=false
Chris@19 7804 fi
Chris@19 7805 _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
Chris@19 7806
Chris@19 7807 # test EBCDIC or ASCII
Chris@19 7808 case `echo X|tr X '\101'` in
Chris@19 7809 A) # ASCII based system
Chris@19 7810 # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
Chris@19 7811 lt_SP2NL='tr \040 \012'
Chris@19 7812 lt_NL2SP='tr \015\012 \040\040'
Chris@19 7813 ;;
Chris@19 7814 *) # EBCDIC based system
Chris@19 7815 lt_SP2NL='tr \100 \n'
Chris@19 7816 lt_NL2SP='tr \r\n \100\100'
Chris@19 7817 ;;
Chris@19 7818 esac
Chris@19 7819 _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
Chris@19 7820 _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
Chris@19 7821 ])# _LT_CHECK_SHELL_FEATURES
Chris@19 7822
Chris@19 7823
Chris@19 7824 # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
Chris@19 7825 # ------------------------------------------------------
Chris@19 7826 # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
Chris@19 7827 # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
Chris@19 7828 m4_defun([_LT_PROG_FUNCTION_REPLACE],
Chris@19 7829 [dnl {
Chris@19 7830 sed -e '/^$1 ()$/,/^} # $1 /c\
Chris@19 7831 $1 ()\
Chris@19 7832 {\
Chris@19 7833 m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1])
Chris@19 7834 } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
Chris@19 7835 && mv -f "$cfgfile.tmp" "$cfgfile" \
Chris@19 7836 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
Chris@19 7837 test 0 -eq $? || _lt_function_replace_fail=:
Chris@19 7838 ])
Chris@19 7839
Chris@19 7840
Chris@19 7841 # _LT_PROG_REPLACE_SHELLFNS
Chris@19 7842 # -------------------------
Chris@19 7843 # Replace existing portable implementations of several shell functions with
Chris@19 7844 # equivalent extended shell implementations where those features are available..
Chris@19 7845 m4_defun([_LT_PROG_REPLACE_SHELLFNS],
Chris@19 7846 [if test x"$xsi_shell" = xyes; then
Chris@19 7847 _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
Chris@19 7848 case ${1} in
Chris@19 7849 */*) func_dirname_result="${1%/*}${2}" ;;
Chris@19 7850 * ) func_dirname_result="${3}" ;;
Chris@19 7851 esac])
Chris@19 7852
Chris@19 7853 _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
Chris@19 7854 func_basename_result="${1##*/}"])
Chris@19 7855
Chris@19 7856 _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
Chris@19 7857 case ${1} in
Chris@19 7858 */*) func_dirname_result="${1%/*}${2}" ;;
Chris@19 7859 * ) func_dirname_result="${3}" ;;
Chris@19 7860 esac
Chris@19 7861 func_basename_result="${1##*/}"])
Chris@19 7862
Chris@19 7863 _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
Chris@19 7864 # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
Chris@19 7865 # positional parameters, so assign one to ordinary parameter first.
Chris@19 7866 func_stripname_result=${3}
Chris@19 7867 func_stripname_result=${func_stripname_result#"${1}"}
Chris@19 7868 func_stripname_result=${func_stripname_result%"${2}"}])
Chris@19 7869
Chris@19 7870 _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
Chris@19 7871 func_split_long_opt_name=${1%%=*}
Chris@19 7872 func_split_long_opt_arg=${1#*=}])
Chris@19 7873
Chris@19 7874 _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
Chris@19 7875 func_split_short_opt_arg=${1#??}
Chris@19 7876 func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
Chris@19 7877
Chris@19 7878 _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
Chris@19 7879 case ${1} in
Chris@19 7880 *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
Chris@19 7881 *) func_lo2o_result=${1} ;;
Chris@19 7882 esac])
Chris@19 7883
Chris@19 7884 _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo])
Chris@19 7885
Chris@19 7886 _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))])
Chris@19 7887
Chris@19 7888 _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}])
Chris@19 7889 fi
Chris@19 7890
Chris@19 7891 if test x"$lt_shell_append" = xyes; then
Chris@19 7892 _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"])
Chris@19 7893
Chris@19 7894 _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
Chris@19 7895 func_quote_for_eval "${2}"
Chris@19 7896 dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
Chris@19 7897 eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
Chris@19 7898
Chris@19 7899 # Save a `func_append' function call where possible by direct use of '+='
Chris@19 7900 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
Chris@19 7901 && mv -f "$cfgfile.tmp" "$cfgfile" \
Chris@19 7902 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
Chris@19 7903 test 0 -eq $? || _lt_function_replace_fail=:
Chris@19 7904 else
Chris@19 7905 # Save a `func_append' function call even when '+=' is not available
Chris@19 7906 sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
Chris@19 7907 && mv -f "$cfgfile.tmp" "$cfgfile" \
Chris@19 7908 || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
Chris@19 7909 test 0 -eq $? || _lt_function_replace_fail=:
Chris@19 7910 fi
Chris@19 7911
Chris@19 7912 if test x"$_lt_function_replace_fail" = x":"; then
Chris@19 7913 AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
Chris@19 7914 fi
Chris@19 7915 ])
Chris@19 7916
Chris@19 7917 # _LT_PATH_CONVERSION_FUNCTIONS
Chris@19 7918 # -----------------------------
Chris@19 7919 # Determine which file name conversion functions should be used by
Chris@19 7920 # func_to_host_file (and, implicitly, by func_to_host_path). These are needed
Chris@19 7921 # for certain cross-compile configurations and native mingw.
Chris@19 7922 m4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
Chris@19 7923 [AC_REQUIRE([AC_CANONICAL_HOST])dnl
Chris@19 7924 AC_REQUIRE([AC_CANONICAL_BUILD])dnl
Chris@19 7925 AC_MSG_CHECKING([how to convert $build file names to $host format])
Chris@19 7926 AC_CACHE_VAL(lt_cv_to_host_file_cmd,
Chris@19 7927 [case $host in
Chris@19 7928 *-*-mingw* )
Chris@19 7929 case $build in
Chris@19 7930 *-*-mingw* ) # actually msys
Chris@19 7931 lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
Chris@19 7932 ;;
Chris@19 7933 *-*-cygwin* )
Chris@19 7934 lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
Chris@19 7935 ;;
Chris@19 7936 * ) # otherwise, assume *nix
Chris@19 7937 lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
Chris@19 7938 ;;
Chris@19 7939 esac
Chris@19 7940 ;;
Chris@19 7941 *-*-cygwin* )
Chris@19 7942 case $build in
Chris@19 7943 *-*-mingw* ) # actually msys
Chris@19 7944 lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
Chris@19 7945 ;;
Chris@19 7946 *-*-cygwin* )
Chris@19 7947 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@19 7948 ;;
Chris@19 7949 * ) # otherwise, assume *nix
Chris@19 7950 lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
Chris@19 7951 ;;
Chris@19 7952 esac
Chris@19 7953 ;;
Chris@19 7954 * ) # unhandled hosts (and "normal" native builds)
Chris@19 7955 lt_cv_to_host_file_cmd=func_convert_file_noop
Chris@19 7956 ;;
Chris@19 7957 esac
Chris@19 7958 ])
Chris@19 7959 to_host_file_cmd=$lt_cv_to_host_file_cmd
Chris@19 7960 AC_MSG_RESULT([$lt_cv_to_host_file_cmd])
Chris@19 7961 _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
Chris@19 7962 [0], [convert $build file names to $host format])dnl
Chris@19 7963
Chris@19 7964 AC_MSG_CHECKING([how to convert $build file names to toolchain format])
Chris@19 7965 AC_CACHE_VAL(lt_cv_to_tool_file_cmd,
Chris@19 7966 [#assume ordinary cross tools, or native build.
Chris@19 7967 lt_cv_to_tool_file_cmd=func_convert_file_noop
Chris@19 7968 case $host in
Chris@19 7969 *-*-mingw* )
Chris@19 7970 case $build in
Chris@19 7971 *-*-mingw* ) # actually msys
Chris@19 7972 lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
Chris@19 7973 ;;
Chris@19 7974 esac
Chris@19 7975 ;;
Chris@19 7976 esac
Chris@19 7977 ])
Chris@19 7978 to_tool_file_cmd=$lt_cv_to_tool_file_cmd
Chris@19 7979 AC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
Chris@19 7980 _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
Chris@19 7981 [0], [convert $build files to toolchain format])dnl
Chris@19 7982 ])# _LT_PATH_CONVERSION_FUNCTIONS